!function(p,S){var e,n,v=typeof S,t=p.location,g=p.document,i=g.documentElement,r=p.jQuery,o=p.$,a={},h=[],s="1.10.2",m=h.concat,l=h.push,u=h.slice,c=h.indexOf,d=a.toString,y=a.hasOwnProperty,f=s.trim,Ct=function(t,e){return new Ct.fn.init(t,e,n)},b=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,C=/\S+/g,x=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,_=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,w=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,T=/^[\],:{}\s]*$/,$=/(?:^|:|,)(?:\s*\[)+/g,k=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,O=/^-ms-/,D=/-([\da-z])/gi,P=function(t,e){return e.toUpperCase()},M=function(t){(g.addEventListener||"load"===t.type||"complete"===g.readyState)&&(E(),Ct.ready())},E=function(){g.addEventListener?(g.removeEventListener("DOMContentLoaded",M,!1),p.removeEventListener("load",M,!1)):(g.detachEvent("onreadystatechange",M),p.detachEvent("onload",M))};function I(t){var e=t.length,n=Ct.type(t);return!Ct.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===n||"function"!==n&&(0===e||"number"==typeof e&&0<e&&e-1 in t)))}Ct.fn=Ct.prototype={jquery:s,constructor:Ct,init:function(t,e,n){var i,r;if(!t)return this;if("string"!=typeof t)return t.nodeType?(this.context=this[0]=t,this.length=1,this):Ct.isFunction(t)?n.ready(t):(t.selector!==S&&(this.selector=t.selector,this.context=t.context),Ct.makeArray(t,this));if(!(i="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&3<=t.length?[null,t,null]:_.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof Ct?e[0]:e,Ct.merge(this,Ct.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:g,!0)),w.test(i[1])&&Ct.isPlainObject(e))for(i in e)Ct.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}if((r=g.getElementById(i[2]))&&r.parentNode){if(r.id!==i[2])return n.find(t);this.length=1,this[0]=r}return this.context=g,this.selector=t,this},selector:"",length:0,toArray:function(){return u.call(this)},get:function(t){return null==t?this.toArray():t<0?this[this.length+t]:this[t]},pushStack:function(t){var e=Ct.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return Ct.each(this,t,e)},ready:function(t){return Ct.ready.promise().done(t),this},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(0<=n&&n<e?[this[n]]:[])},map:function(n){return this.pushStack(Ct.map(this,function(t,e){return n.call(t,e,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:l,sort:[].sort,splice:[].splice},Ct.fn.init.prototype=Ct.fn,Ct.extend=Ct.fn.extend=function(){var t,e,n,i,r,o,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[1]||{},s=2),"object"==typeof a||Ct.isFunction(a)||(a={}),l===s&&(a=this,--s);s<l;s++)if(null!=(r=arguments[s]))for(i in r)t=a[i],a!==(n=r[i])&&(c&&n&&(Ct.isPlainObject(n)||(e=Ct.isArray(n)))?(o=e?(e=!1,t&&Ct.isArray(t)?t:[]):t&&Ct.isPlainObject(t)?t:{},a[i]=Ct.extend(c,o,n)):n!==S&&(a[i]=n));return a},Ct.extend({expando:"jQuery"+(s+Math.random()).replace(/\D/g,""),noConflict:function(t){return p.$===Ct&&(p.$=o),t&&p.jQuery===Ct&&(p.jQuery=r),Ct},isReady:!1,readyWait:1,holdReady:function(t){t?Ct.readyWait++:Ct.ready(!0)},ready:function(t){if(!0===t?!--Ct.readyWait:!Ct.isReady){if(!g.body)return setTimeout(Ct.ready);(Ct.isReady=!0)!==t&&0<--Ct.readyWait||(e.resolveWith(g,[Ct]),Ct.fn.trigger&&Ct(g).trigger("ready").off("ready"))}},isFunction:function(t){return"function"===Ct.type(t)},isArray:Array.isArray||function(t){return"array"===Ct.type(t)},isWindow:function(t){return null!=t&&t==t.window},isNumeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},type:function(t){return null==t?String(t):"object"==typeof t||"function"==typeof t?a[d.call(t)]||"object":typeof t},isPlainObject:function(t){var e;if(!t||"object"!==Ct.type(t)||t.nodeType||Ct.isWindow(t))return!1;try{if(t.constructor&&!y.call(t,"constructor")&&!y.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}if(Ct.support.ownLast)for(e in t)return y.call(t,e);for(e in t);return e===S||y.call(t,e)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},error:function(t){throw new Error(t)},parseHTML:function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||g;var i=w.exec(t),r=!n&&[];return i?[e.createElement(i[1])]:(i=Ct.buildFragment([t],e,r),r&&Ct(r).remove(),Ct.merge([],i.childNodes))},parseJSON:function(t){return p.JSON&&p.JSON.parse?p.JSON.parse(t):null===t?t:"string"==typeof t&&(t=Ct.trim(t))&&T.test(t.replace(k,"@").replace(A,"]").replace($,""))?new Function("return "+t)():void Ct.error("Invalid JSON: "+t)},parseXML:function(t){var e;if(!t||"string"!=typeof t)return null;try{p.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):((e=new ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t))}catch(t){e=S}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length||Ct.error("Invalid XML: "+t),e},noop:function(){},globalEval:function(t){t&&Ct.trim(t)&&(p.execScript||function(t){p.eval.call(p,t)})(t)},camelCase:function(t){return t.replace(O,"ms-").replace(D,P)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,n){var i=0,r=t.length,o=I(t);if(n){if(o)for(;i<r&&!1!==e.apply(t[i],n);i++);else for(i in t)if(!1===e.apply(t[i],n))break}else if(o)for(;i<r&&!1!==e.call(t[i],i,t[i]);i++);else for(i in t)if(!1===e.call(t[i],i,t[i]))break;return t},trim:f&&!f.call("\ufeff ")?function(t){return null==t?"":f.call(t)}:function(t){return null==t?"":(t+"").replace(x,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(I(Object(t))?Ct.merge(n,"string"==typeof t?[t]:t):l.call(n,t)),n},inArray:function(t,e,n){var i;if(e){if(c)return c.call(e,t,n);for(i=e.length,n=n?n<0?Math.max(0,i+n):n:0;n<i;n++)if(n in e&&e[n]===t)return n}return-1},merge:function(t,e){var n=e.length,i=t.length,r=0;if("number"==typeof n)for(;r<n;r++)t[i++]=e[r];else for(;e[r]!==S;)t[i++]=e[r++];return t.length=i,t},grep:function(t,e,n){var i=[],r=0,o=t.length;for(n=!!n;r<o;r++)n!==!!e(t[r],r)&&i.push(t[r]);return i},map:function(t,e,n){var i,r=0,o=t.length,a=[];if(I(t))for(;r<o;r++)null!=(i=e(t[r],r,n))&&(a[a.length]=i);else for(r in t)null!=(i=e(t[r],r,n))&&(a[a.length]=i);return m.apply([],a)},guid:1,proxy:function(t,e){var n,i,r;return"string"==typeof e&&(r=t[e],e=t,t=r),Ct.isFunction(t)?(n=u.call(arguments,2),(i=function(){return t.apply(e||this,n.concat(u.call(arguments)))}).guid=t.guid=t.guid||Ct.guid++,i):S},access:function(t,e,n,i,r,o,a){var s=0,l=t.length,c=null==n;if("object"===Ct.type(n))for(s in r=!0,n)Ct.access(t,e,s,n[s],!0,o,a);else if(i!==S&&(r=!0,Ct.isFunction(i)||(a=!0),c&&(e=a?(e.call(t,i),null):(c=e,function(t,e,n){return c.call(Ct(t),n)})),e))for(;s<l;s++)e(t[s],n,a?i:i.call(t[s],s,e(t[s],n)));return r?t:c?e.call(t):l?e(t[0],n):o},now:function(){return(new Date).getTime()},swap:function(t,e,n,i){var r,o,a={};for(o in e)a[o]=t.style[o],t.style[o]=e[o];for(o in r=n.apply(t,i||[]),e)t.style[o]=a[o];return r}}),Ct.ready.promise=function(t){if(!e)if(e=Ct.Deferred(),"complete"===g.readyState)setTimeout(Ct.ready);else if(g.addEventListener)g.addEventListener("DOMContentLoaded",M,!1),p.addEventListener("load",M,!1);else{g.attachEvent("onreadystatechange",M),p.attachEvent("onload",M);var n=!1;try{n=null==p.frameElement&&g.documentElement}catch(t){}n&&n.doScroll&&function e(){if(!Ct.isReady){try{n.doScroll("left")}catch(t){return setTimeout(e,50)}E(),Ct.ready()}}()}return e.promise(t)},Ct.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){a["[object "+e+"]"]=e.toLowerCase()}),n=Ct(g),function(n,r){var t,p,_,w,o,i,u,S,c,g,C,a,m,v,s,h,y,b="sizzle"+-new Date,x=n.document,T=0,d=0,l=ot(),f=ot(),$=ot(),k=!1,A=function(t,e){return t===e&&(k=!0),0},O=typeof r,D=1<<31,P={}.hasOwnProperty,e=[],M=e.pop,E=e.push,I=e.push,N=e.slice,R=e.indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(this[e]===t)return e;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="[\\x20\\t\\r\\n\\f]",j="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",F=j.replace("w","w#"),z="\\["+H+"*("+j+")"+H+"*(?:([*^$|!~]?=)"+H+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+F+")|)|)"+H+"*\\]",B=":("+j+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+z.replace(3,8)+")*)|.*)\\)|)",V=new RegExp("^"+H+"+|((?:^|[^\\\\])(?:\\\\.)*)"+H+"+$","g"),W=new RegExp("^"+H+"*,"+H+"*"),q=new RegExp("^"+H+"*([>+~]|"+H+")"+H+"*"),U=new RegExp(H+"*[+~]"),J=new RegExp("="+H+"*([^\\]'\"]*)"+H+"*\\]","g"),G=new RegExp(B),Y=new RegExp("^"+F+"$"),X={ID:new RegExp("^#("+j+")"),CLASS:new RegExp("^\\.("+j+")"),TAG:new RegExp("^("+j.replace("w","w*")+")"),ATTR:new RegExp("^"+z),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+H+"*(even|odd|(([+-]|)(\\d*)n|)"+H+"*(?:([+-]|)"+H+"*(\\d+)|))"+H+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+H+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+H+"*((?:-\\d)?\\d*)"+H+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,et=/'|\\/g,nt=new RegExp("\\\\([\\da-f]{1,6}"+H+"?|("+H+")|.)","ig"),it=function(t,e,n){var i="0x"+e-65536;return i!=i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{I.apply(e=N.call(x.childNodes),x.childNodes),e[x.childNodes.length].nodeType}catch(t){I={apply:e.length?function(t,e){E.apply(t,N.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}function rt(t,e,n,i){var r,o,a,s,l,c,u,h,d,f;if((e?e.ownerDocument||e:x)!==C&&g(e),n=n||[],!t||"string"!=typeof t)return n;if(1!==(s=(e=e||C).nodeType)&&9!==s)return[];if(m&&!i){if(r=Q.exec(t))if(a=r[1]){if(9===s){if(!(o=e.getElementById(a))||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(e.ownerDocument&&(o=e.ownerDocument.getElementById(a))&&y(e,o)&&o.id===a)return n.push(o),n}else{if(r[2])return I.apply(n,e.getElementsByTagName(t)),n;if((a=r[3])&&p.getElementsByClassName&&e.getElementsByClassName)return I.apply(n,e.getElementsByClassName(a)),n}if(p.qsa&&(!v||!v.test(t))){if(h=u=b,d=e,f=9===s&&t,1===s&&"object"!==e.nodeName.toLowerCase()){for(c=pt(t),(u=e.getAttribute("id"))?h=u.replace(et,"\\$&"):e.setAttribute("id",h),h="[id='"+h+"'] ",l=c.length;l--;)c[l]=h+gt(c[l]);d=U.test(t)&&e.parentNode||e,f=c.join(",")}if(f)try{return I.apply(n,d.querySelectorAll(f)),n}catch(t){}finally{u||e.removeAttribute("id")}}}return St(t.replace(V,"$1"),e,n,i)}function ot(){var n=[];function i(t,e){return n.push(t+=" ")>w.cacheLength&&delete i[n.shift()],i[t]=e}return i}function at(t){return t[b]=!0,t}function st(t){var e=C.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function lt(t,e){for(var n=t.split("|"),i=t.length;i--;)w.attrHandle[n[i]]=e}function ct(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||D)-(~t.sourceIndex||D);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ut(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function ht(n){return function(t){var e=t.nodeName.toLowerCase();return("input"===e||"button"===e)&&t.type===n}}function dt(a){return at(function(o){return o=+o,at(function(t,e){for(var n,i=a([],t.length,o),r=i.length;r--;)t[n=i[r]]&&(t[n]=!(e[n]=t[n]))})})}for(t in i=rt.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},p=rt.support={},g=rt.setDocument=function(t){var l=t?t.ownerDocument||t:x,e=l.defaultView;return l!==C&&9===l.nodeType&&l.documentElement?(a=(C=l).documentElement,m=!i(l),e&&e.attachEvent&&e!==e.top&&e.attachEvent("onbeforeunload",function(){g()}),p.attributes=st(function(t){return t.className="i",!t.getAttribute("className")}),p.getElementsByTagName=st(function(t){return t.appendChild(l.createComment("")),!t.getElementsByTagName("*").length}),p.getElementsByClassName=st(function(t){return t.innerHTML="<div class='a'></div><div class='a i'></div>",t.firstChild.className="i",2===t.getElementsByClassName("i").length}),p.getById=st(function(t){return a.appendChild(t).id=b,!l.getElementsByName||!l.getElementsByName(b).length}),p.getById?(w.find.ID=function(t,e){if(typeof e.getElementById!==O&&m){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},w.filter.ID=function(t){var e=t.replace(nt,it);return function(t){return t.getAttribute("id")===e}}):(delete w.find.ID,w.filter.ID=function(t){var n=t.replace(nt,it);return function(t){var e=typeof t.getAttributeNode!==O&&t.getAttributeNode("id");return e&&e.value===n}}),w.find.TAG=p.getElementsByTagName?function(t,e){if(typeof e.getElementsByTagName!==O)return e.getElementsByTagName(t)}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"!==t)return o;for(;n=o[r++];)1===n.nodeType&&i.push(n);return i},w.find.CLASS=p.getElementsByClassName&&function(t,e){if(typeof e.getElementsByClassName!==O&&m)return e.getElementsByClassName(t)},s=[],v=[],(p.qsa=K.test(l.querySelectorAll))&&(st(function(t){t.innerHTML="<select><option selected=''></option></select>",t.querySelectorAll("[selected]").length||v.push("\\["+H+"*(?:value|"+L+")"),t.querySelectorAll(":checked").length||v.push(":checked")}),st(function(t){var e=l.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("t",""),t.querySelectorAll("[t^='']").length&&v.push("[*^$]="+H+"*(?:''|\"\")"),t.querySelectorAll(":enabled").length||v.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),v.push(",.*:")})),(p.matchesSelector=K.test(h=a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&st(function(t){p.disconnectedMatch=h.call(t,"div"),h.call(t,"[s!='']:x"),s.push("!=",B)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),y=K.test(a.contains)||a.compareDocumentPosition?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},A=a.compareDocumentPosition?function(t,e){if(t===e)return k=!0,0;var n=e.compareDocumentPosition&&t.compareDocumentPosition&&t.compareDocumentPosition(e);return n?1&n||!p.sortDetached&&e.compareDocumentPosition(t)===n?t===l||y(x,t)?-1:e===l||y(x,e)?1:c?R.call(c,t)-R.call(c,e):0:4&n?-1:1:t.compareDocumentPosition?-1:1}:function(t,e){var n,i=0,r=t.parentNode,o=e.parentNode,a=[t],s=[e];if(t===e)return k=!0,0;if(!r||!o)return t===l?-1:e===l?1:r?-1:o?1:c?R.call(c,t)-R.call(c,e):0;if(r===o)return ct(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;a[i]===s[i];)i++;return i?ct(a[i],s[i]):a[i]===x?-1:s[i]===x?1:0},l):C},rt.matches=function(t,e){return rt(t,null,null,e)},rt.matchesSelector=function(t,e){if((t.ownerDocument||t)!==C&&g(t),e=e.replace(J,"='$1']"),p.matchesSelector&&m&&(!s||!s.test(e))&&(!v||!v.test(e)))try{var n=h.call(t,e);if(n||p.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){}return 0<rt(e,C,null,[t]).length},rt.contains=function(t,e){return(t.ownerDocument||t)!==C&&g(t),y(t,e)},rt.attr=function(t,e){(t.ownerDocument||t)!==C&&g(t);var n=w.attrHandle[e.toLowerCase()],i=n&&P.call(w.attrHandle,e.toLowerCase())?n(t,e,!m):r;return i===r?p.attributes||!m?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null:i},rt.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},rt.uniqueSort=function(t){var e,n=[],i=0,r=0;if(k=!p.detectDuplicates,c=!p.sortStable&&t.slice(0),t.sort(A),k){for(;e=t[r++];)e===t[r]&&(i=n.push(r));for(;i--;)t.splice(n[i],1)}return t},o=rt.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=o(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i];i++)n+=o(e);return n},(w=rt.selectors={cacheLength:50,createPseudo:at,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(nt,it),t[3]=(t[4]||t[5]||"").replace(nt,it),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||rt.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&rt.error(t[0]),t},PSEUDO:function(t){var e,n=!t[5]&&t[2];return X.CHILD.test(t[0])?null:(t[3]&&t[4]!==r?t[2]=t[4]:n&&G.test(n)&&(e=pt(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(nt,it).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=l[t+" "];return e||(e=new RegExp("(^|"+H+")"+t+"("+H+"|$)"))&&l(t,function(t){return e.test("string"==typeof t.className&&t.className||typeof t.getAttribute!==O&&t.getAttribute("class")||"")})},ATTR:function(n,i,r){return function(t){var e=rt.attr(t,n);return null==e?"!="===i:!i||(e+="","="===i?e===r:"!="===i?e!==r:"^="===i?r&&0===e.indexOf(r):"*="===i?r&&-1<e.indexOf(r):"$="===i?r&&e.slice(-r.length)===r:"~="===i?-1<(" "+e+" ").indexOf(r):"|="===i&&(e===r||e.slice(0,r.length+1)===r+"-"))}},CHILD:function(f,t,e,p,g){var m="nth"!==f.slice(0,3),v="last"!==f.slice(-4),y="of-type"===t;return 1===p&&0===g?function(t){return!!t.parentNode}:function(t,e,n){var i,r,o,a,s,l,c=m!==v?"nextSibling":"previousSibling",u=t.parentNode,h=y&&t.nodeName.toLowerCase(),d=!n&&!y;if(u){if(m){for(;c;){for(o=t;o=o[c];)if(y?o.nodeName.toLowerCase()===h:1===o.nodeType)return!1;l=c="only"===f&&!l&&"nextSibling"}return!0}if(l=[v?u.firstChild:u.lastChild],v&&d){for(s=(i=(r=u[b]||(u[b]={}))[f]||[])[0]===T&&i[1],a=i[0]===T&&i[2],o=s&&u.childNodes[s];o=++s&&o&&o[c]||(a=s=0)||l.pop();)if(1===o.nodeType&&++a&&o===t){r[f]=[T,s,a];break}}else if(d&&(i=(t[b]||(t[b]={}))[f])&&i[0]===T)a=i[1];else for(;(o=++s&&o&&o[c]||(a=s=0)||l.pop())&&((y?o.nodeName.toLowerCase()!==h:1!==o.nodeType)||!++a||(d&&((o[b]||(o[b]={}))[f]=[T,a]),o!==t)););return(a-=g)===p||a%p==0&&0<=a/p}}},PSEUDO:function(t,o){var e,a=w.pseudos[t]||w.setFilters[t.toLowerCase()]||rt.error("unsupported pseudo: "+t);return a[b]?a(o):1<a.length?(e=[t,t,"",o],w.setFilters.hasOwnProperty(t.toLowerCase())?at(function(t,e){for(var n,i=a(t,o),r=i.length;r--;)t[n=R.call(t,i[r])]=!(e[n]=i[r])}):function(t){return a(t,0,e)}):a}},pseudos:{not:at(function(t){var i=[],r=[],s=u(t.replace(V,"$1"));return s[b]?at(function(t,e,n,i){for(var r,o=s(t,null,i,[]),a=t.length;a--;)(r=o[a])&&(t[a]=!(e[a]=r))}):function(t,e,n){return i[0]=t,s(i,null,n,r),!r.pop()}}),has:at(function(e){return function(t){return 0<rt(e,t).length}}),contains:at(function(e){return function(t){return-1<(t.textContent||t.innerText||o(t)).indexOf(e)}}),lang:at(function(n){return Y.test(n||"")||rt.error("unsupported lang: "+n),n=n.replace(nt,it).toLowerCase(),function(t){var e;do{if(e=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(e=e.toLowerCase())===n||0===e.indexOf(n+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var e=n.location&&n.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===a},focus:function(t){return t===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if("@"<t.nodeName||3===t.nodeType||4===t.nodeType)return!1;return!0},parent:function(t){return!w.pseudos.empty(t)},header:function(t){return tt.test(t.nodeName)},input:function(t){return Z.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||e.toLowerCase()===t.type)},first:dt(function(){return[0]}),last:dt(function(t,e){return[e-1]}),eq:dt(function(t,e,n){return[n<0?n+e:n]}),even:dt(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:dt(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:dt(function(t,e,n){for(var i=n<0?n+e:n;0<=--i;)t.push(i);return t}),gt:dt(function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t})}}).pseudos.nth=w.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[t]=ut(t);for(t in{submit:!0,reset:!0})w.pseudos[t]=ht(t);function ft(){}function pt(t,e){var n,i,r,o,a,s,l,c=f[t+" "];if(c)return e?0:c.slice(0);for(a=t,s=[],l=w.preFilter;a;){for(o in n&&!(i=W.exec(a))||(i&&(a=a.slice(i[0].length)||a),s.push(r=[])),n=!1,(i=q.exec(a))&&(n=i.shift(),r.push({value:n,type:i[0].replace(V," ")}),a=a.slice(n.length)),w.filter)!(i=X[o].exec(a))||l[o]&&!(i=l[o](i))||(n=i.shift(),r.push({value:n,type:o,matches:i}),a=a.slice(n.length));if(!n)break}return e?a.length:a?rt.error(t):f(t,s).slice(0)}function gt(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function mt(s,t,e){var l=t.dir,c=e&&"parentNode"===l,u=d++;return t.first?function(t,e,n){for(;t=t[l];)if(1===t.nodeType||c)return s(t,e,n)}:function(t,e,n){var i,r,o,a=T+" "+u;if(n){for(;t=t[l];)if((1===t.nodeType||c)&&s(t,e,n))return!0}else for(;t=t[l];)if(1===t.nodeType||c)if((r=(o=t[b]||(t[b]={}))[l])&&r[0]===a){if(!0===(i=r[1])||i===_)return!0===i}else if((r=o[l]=[a])[1]=s(t,e,n)||_,!0===r[1])return!0}}function vt(r){return 1<r.length?function(t,e,n){for(var i=r.length;i--;)if(!r[i](t,e,n))return!1;return!0}:r[0]}function yt(t,e,n,i,r){for(var o,a=[],s=0,l=t.length,c=null!=e;s<l;s++)(o=t[s])&&(n&&!n(o,i,r)||(a.push(o),c&&e.push(s)));return a}function bt(f,p,g,m,v,t){return m&&!m[b]&&(m=bt(m)),v&&!v[b]&&(v=bt(v,t)),at(function(t,e,n,i){var r,o,a,s=[],l=[],c=e.length,u=t||wt(p||"*",n.nodeType?[n]:n,[]),h=!f||!t&&p?u:yt(u,s,f,n,i),d=g?v||(t?f:c||m)?[]:e:h;if(g&&g(h,d,n,i),m)for(r=yt(d,l),m(r,[],n,i),o=r.length;o--;)(a=r[o])&&(d[l[o]]=!(h[l[o]]=a));if(t){if(v||f){if(v){for(r=[],o=d.length;o--;)(a=d[o])&&r.push(h[o]=a);v(null,d=[],r,i)}for(o=d.length;o--;)(a=d[o])&&-1<(r=v?R.call(t,a):s[o])&&(t[r]=!(e[r]=a))}}else d=yt(d===e?d.splice(c,d.length):d),v?v(null,e,d,i):I.apply(e,d)})}function xt(t){for(var i,e,n,r=t.length,o=w.relative[t[0].type],a=o||w.relative[" "],s=o?1:0,l=mt(function(t){return t===i},a,!0),c=mt(function(t){return-1<R.call(i,t)},a,!0),u=[function(t,e,n){return!o&&(n||e!==S)||((i=e).nodeType?l(t,e,n):c(t,e,n))}];s<r;s++)if(e=w.relative[t[s].type])u=[mt(vt(u),e)];else{if((e=w.filter[t[s].type].apply(null,t[s].matches))[b]){for(n=++s;n<r&&!w.relative[t[n].type];n++);return bt(1<s&&vt(u),1<s&&gt(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace(V,"$1"),e,s<n&&xt(t.slice(s,n)),n<r&&xt(t=t.slice(n)),n<r&&gt(t))}u.push(e)}return vt(u)}function _t(m,v){var y=0,b=0<v.length,x=0<m.length,t=function(t,e,n,i,r){var o,a,s,l=[],c=0,u="0",h=t&&[],d=null!=r,f=S,p=t||x&&w.find.TAG("*",r&&e.parentNode||e),g=T+=null==f?1:Math.random()||.1;for(d&&(S=e!==C&&e,_=y);null!=(o=p[u]);u++){if(x&&o){for(a=0;s=m[a++];)if(s(o,e,n)){i.push(o);break}d&&(T=g,_=++y)}b&&((o=!s&&o)&&c--,t&&h.push(o))}if(c+=u,b&&u!==c){for(a=0;s=v[a++];)s(h,l,e,n);if(t){if(0<c)for(;u--;)h[u]||l[u]||(l[u]=M.call(i));l=yt(l)}I.apply(i,l),d&&!t&&0<l.length&&1<c+v.length&&rt.uniqueSort(i)}return d&&(T=g,S=f),h};return b?at(t):t}function wt(t,e,n){for(var i=0,r=e.length;i<r;i++)rt(t,e[i],n);return n}function St(t,e,n,i){var r,o,a,s,l,c=pt(t);if(!i&&1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&p.getById&&9===e.nodeType&&m&&w.relative[o[1].type]){if(!(e=(w.find.ID(a.matches[0].replace(nt,it),e)||[])[0]))return n;t=t.slice(o.shift().value.length)}for(r=X.needsContext.test(t)?0:o.length;r--&&(a=o[r],!w.relative[s=a.type]);)if((l=w.find[s])&&(i=l(a.matches[0].replace(nt,it),U.test(o[0].type)&&e.parentNode||e))){if(o.splice(r,1),!(t=i.length&&gt(o)))return I.apply(n,i),n;break}}return u(t,c)(i,e,!m,n,U.test(t)),n}ft.prototype=w.filters=w.pseudos,w.setFilters=new ft,u=rt.compile=function(t,e){var n,i=[],r=[],o=$[t+" "];if(!o){for(e||(e=pt(t)),n=e.length;n--;)(o=xt(e[n]))[b]?i.push(o):r.push(o);o=$(t,_t(r,i))}return o},p.sortStable=b.split("").sort(A).join("")===b,p.detectDuplicates=k,g(),p.sortDetached=st(function(t){return 1&t.compareDocumentPosition(C.createElement("div"))}),st(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||lt("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),p.attributes&&st(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||lt("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),st(function(t){return null==t.getAttribute("disabled")})||lt(L,function(t,e,n){var i;if(!n)return(i=t.getAttributeNode(e))&&i.specified?i.value:!0===t[e]?e.toLowerCase():null}),Ct.find=rt,Ct.expr=rt.selectors,Ct.expr[":"]=Ct.expr.pseudos,Ct.unique=rt.uniqueSort,Ct.text=rt.getText,Ct.isXMLDoc=rt.isXML,Ct.contains=rt.contains}(p);var N={};function R(t){var n=N[t]={};return Ct.each(t.match(C)||[],function(t,e){n[e]=!0}),n}Ct.Callbacks=function(r){r="string"==typeof r?N[r]||R(r):Ct.extend({},r);var i,e,n,o,a,s,l=[],c=!r.once&&[],u=function(t){for(e=r.memory&&t,n=!0,a=s||0,s=0,o=l.length,i=!0;l&&a<o;a++)if(!1===l[a].apply(t[0],t[1])&&r.stopOnFalse){e=!1;break}i=!1,l&&(c?c.length&&u(c.shift()):e?l=[]:h.disable())},h={add:function(){if(l){var t=l.length;!function i(t){Ct.each(t,function(t,e){var n=Ct.type(e);"function"===n?r.unique&&h.has(e)||l.push(e):e&&e.length&&"string"!==n&&i(e)})}(arguments),i?o=l.length:e&&(s=t,u(e))}return this},remove:function(){return l&&Ct.each(arguments,function(t,e){for(var n;-1<(n=Ct.inArray(e,l,n));)l.splice(n,1),i&&(n<=o&&o--,n<=a&&a--)}),this},has:function(t){return t?-1<Ct.inArray(t,l):!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=c=e=S,this},disabled:function(){return!l},lock:function(){return c=S,e||h.disable(),this},locked:function(){return!c},fireWith:function(t,e){return!l||n&&!c||(e=[t,(e=e||[]).slice?e.slice():e],i?c.push(e):u(e)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!n}};return h},Ct.extend({Deferred:function(t){var a=[["resolve","done",Ct.Callbacks("once memory"),"resolved"],["reject","fail",Ct.Callbacks("once memory"),"rejected"],["notify","progress",Ct.Callbacks("memory")]],r="pending",s={state:function(){return r},always:function(){return l.done(arguments).fail(arguments),this},then:function(){var o=arguments;return Ct.Deferred(function(r){Ct.each(a,function(t,e){var n=e[0],i=Ct.isFunction(o[t])&&o[t];l[e[1]](function(){var t=i&&i.apply(this,arguments);t&&Ct.isFunction(t.promise)?t.promise().done(r.resolve).fail(r.reject).progress(r.notify):r[n+"With"](this===s?r.promise():this,i?[t]:arguments)})}),o=null}).promise()},promise:function(t){return null!=t?Ct.extend(t,s):s}},l={};return s.pipe=s.then,Ct.each(a,function(t,e){var n=e[2],i=e[3];s[e[1]]=n.add,i&&n.add(function(){r=i},a[1^t][2].disable,a[2][2].lock),l[e[0]]=function(){return l[e[0]+"With"](this===l?s:this,arguments),this},l[e[0]+"With"]=n.fireWith}),s.promise(l),t&&t.call(l,l),l},when:function(t){var r,e,n,i=0,o=u.call(arguments),a=o.length,s=1!==a||t&&Ct.isFunction(t.promise)?a:0,l=1===s?t:Ct.Deferred(),c=function(e,n,i){return function(t){n[e]=this,i[e]=1<arguments.length?u.call(arguments):t,i===r?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(1<a)for(r=new Array(a),e=new Array(a),n=new Array(a);i<a;i++)o[i]&&Ct.isFunction(o[i].promise)?o[i].promise().done(c(i,n,o)).fail(l.reject).progress(c(i,e,r)):--s;return s||l.resolveWith(n,o),l.promise()}}),Ct.support=function(o){var t,e,n,i,r,a,s,l,c,u=g.createElement("div");if(u.setAttribute("className","t"),u.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",t=u.getElementsByTagName("*")||[],!(e=u.getElementsByTagName("a")[0])||!e.style||!t.length)return o;a=(i=g.createElement("select")).appendChild(g.createElement("option")),n=u.getElementsByTagName("input")[0],e.style.cssText="top:1px;float:left;opacity:.5",o.getSetAttribute="t"!==u.className,o.leadingWhitespace=3===u.firstChild.nodeType,o.tbody=!u.getElementsByTagName("tbody").length,o.htmlSerialize=!!u.getElementsByTagName("link").length,o.style=/top/.test(e.getAttribute("style")),o.hrefNormalized="/a"===e.getAttribute("href"),o.opacity=/^0.5/.test(e.style.opacity),o.cssFloat=!!e.style.cssFloat,o.checkOn=!!n.value,o.optSelected=a.selected,o.enctype=!!g.createElement("form").enctype,o.html5Clone="<:nav></:nav>"!==g.createElement("nav").cloneNode(!0).outerHTML,o.inlineBlockNeedsLayout=!1,o.shrinkWrapBlocks=!1,o.pixelPosition=!1,o.deleteExpando=!0,o.noCloneEvent=!0,o.reliableMarginRight=!0,o.boxSizingReliable=!0,n.checked=!0,o.noCloneChecked=n.cloneNode(!0).checked,i.disabled=!0,o.optDisabled=!a.disabled;try{delete u.test}catch(t){o.deleteExpando=!1}for(c in(n=g.createElement("input")).setAttribute("value",""),o.input=""===n.getAttribute("value"),n.value="t",n.setAttribute("type","radio"),o.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),(r=g.createDocumentFragment()).appendChild(n),o.appendChecked=n.checked,o.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,u.attachEvent&&(u.attachEvent("onclick",function(){o.noCloneEvent=!1}),u.cloneNode(!0).click()),{submit:!0,change:!0,focusin:!0})u.setAttribute(s="on"+c,"t"),o[c+"Bubbles"]=s in p||!1===u.attributes[s].expando;for(c in u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===u.style.backgroundClip,Ct(o))break;return o.ownLast="0"!==c,Ct(function(){var t,e,n,i="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",r=g.getElementsByTagName("body")[0];r&&((t=g.createElement("div")).style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",r.appendChild(t).appendChild(u),u.innerHTML="<table><tr><td></td><td>t</td></tr></table>",(n=u.getElementsByTagName("td"))[0].style.cssText="padding:0;margin:0;border:0;display:none",l=0===n[0].offsetHeight,n[0].style.display="",n[1].style.display="none",o.reliableHiddenOffsets=l&&0===n[0].offsetHeight,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%;",Ct.swap(r,null!=r.style.zoom?{zoom:1}:{},function(){o.boxSizing=4===u.offsetWidth}),p.getComputedStyle&&(o.pixelPosition="1%"!==(p.getComputedStyle(u,null)||{}).top,o.boxSizingReliable="4px"===(p.getComputedStyle(u,null)||{width:"4px"}).width,(e=u.appendChild(g.createElement("div"))).style.cssText=u.style.cssText=i,e.style.marginRight=e.style.width="0",u.style.width="1px",o.reliableMarginRight=!parseFloat((p.getComputedStyle(e,null)||{}).marginRight)),typeof u.style.zoom!==v&&(u.innerHTML="",u.style.cssText=i+"width:1px;padding:1px;display:inline;zoom:1",o.inlineBlockNeedsLayout=3===u.offsetWidth,u.style.display="block",u.innerHTML="<div></div>",u.firstChild.style.width="5px",o.shrinkWrapBlocks=3!==u.offsetWidth,o.inlineBlockNeedsLayout&&(r.style.zoom=1)),r.removeChild(t),t=u=n=e=null)}),t=i=r=a=e=n=null,o}({});var L=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,H=/([A-Z])/g;function j(t,e,n,i){if(Ct.acceptData(t)){var r,o,a=Ct.expando,s=t.nodeType,l=s?Ct.cache:t,c=s?t[a]:t[a]&&a;if(c&&l[c]&&(i||l[c].data)||n!==S||"string"!=typeof e)return c||(c=s?t[a]=h.pop()||Ct.guid++:a),l[c]||(l[c]=s?{}:{toJSON:Ct.noop}),"object"!=typeof e&&"function"!=typeof e||(i?l[c]=Ct.extend(l[c],e):l[c].data=Ct.extend(l[c].data,e)),o=l[c],i||(o.data||(o.data={}),o=o.data),n!==S&&(o[Ct.camelCase(e)]=n),"string"==typeof e?null==(r=o[e])&&(r=o[Ct.camelCase(e)]):r=o,r}}function F(t,e,n){if(Ct.acceptData(t)){var i,r,o=t.nodeType,a=o?Ct.cache:t,s=o?t[Ct.expando]:Ct.expando;if(a[s]){if(e&&(i=n?a[s]:a[s].data)){r=(e=Ct.isArray(e)?e.concat(Ct.map(e,Ct.camelCase)):e in i?[e]:(e=Ct.camelCase(e))in i?[e]:e.split(" ")).length;for(;r--;)delete i[e[r]];if(n?!B(i):!Ct.isEmptyObject(i))return}(n||(delete a[s].data,B(a[s])))&&(o?Ct.cleanData([t],!0):Ct.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}function z(t,e,n){if(n===S&&1===t.nodeType){var i="data-"+e.replace(H,"-$1").toLowerCase();if("string"==typeof(n=t.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:L.test(n)?Ct.parseJSON(n):n)}catch(t){}Ct.data(t,e,n)}else n=S}return n}function B(t){var e;for(e in t)if(("data"!==e||!Ct.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}Ct.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return!!(t=t.nodeType?Ct.cache[t[Ct.expando]]:t[Ct.expando])&&!B(t)},data:function(t,e,n){return j(t,e,n)},removeData:function(t,e){return F(t,e)},_data:function(t,e,n){return j(t,e,n,!0)},_removeData:function(t,e){return F(t,e,!0)},acceptData:function(t){if(t.nodeType&&1!==t.nodeType&&9!==t.nodeType)return!1;var e=t.nodeName&&Ct.noData[t.nodeName.toLowerCase()];return!e||!0!==e&&t.getAttribute("classid")===e}}),Ct.fn.extend({data:function(t,e){var n,i,r=null,o=0,a=this[0];if(t!==S)return"object"==typeof t?this.each(function(){Ct.data(this,t)}):1<arguments.length?this.each(function(){Ct.data(this,t,e)}):a?z(a,t,Ct.data(a,t)):null;if(this.length&&(r=Ct.data(a),1===a.nodeType&&!Ct._data(a,"parsedAttrs"))){for(n=a.attributes;o<n.length;o++)0===(i=n[o].name).indexOf("data-")&&z(a,i=Ct.camelCase(i.slice(5)),r[i]);Ct._data(a,"parsedAttrs",!0)}return r},removeData:function(t){return this.each(function(){Ct.removeData(this,t)})}}),Ct.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=Ct._data(t,e),n&&(!i||Ct.isArray(n)?i=Ct._data(t,e,Ct.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=Ct.queue(t,e),i=n.length,r=n.shift(),o=Ct._queueHooks(t,e),a=function(){Ct.dequeue(t,e)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Ct._data(t,n)||Ct._data(t,n,{empty:Ct.Callbacks("once memory").add(function(){Ct._removeData(t,e+"queue"),Ct._removeData(t,n)})})}}),Ct.fn.extend({queue:function(e,n){var t=2;return"string"!=typeof e&&(n=e,e="fx",t--),arguments.length<t?Ct.queue(this[0],e):n===S?this:this.each(function(){var t=Ct.queue(this,e,n);Ct._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&Ct.dequeue(this,e)})},dequeue:function(t){return this.each(function(){Ct.dequeue(this,t)})},delay:function(i,t){return i=Ct.fx&&Ct.fx.speeds[i]||i,t=t||"fx",this.queue(t,function(t,e){var n=setTimeout(t,i);e.stop=function(){clearTimeout(n)}})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,r=Ct.Deferred(),o=this,a=this.length,s=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=S),t=t||"fx";a--;)(n=Ct._data(o[a],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(e)}});var V,W,q=/[\t\r\n\f]/g,U=/\r/g,J=/^(?:input|select|textarea|button|object)$/i,G=/^(?:a|area)$/i,Y=/^(?:checked|selected)$/i,X=Ct.support.getSetAttribute,K=Ct.support.input;Ct.fn.extend({attr:function(t,e){return Ct.access(this,Ct.attr,t,e,1<arguments.length)},removeAttr:function(t){return this.each(function(){Ct.removeAttr(this,t)})},prop:function(t,e){return Ct.access(this,Ct.prop,t,e,1<arguments.length)},removeProp:function(t){return t=Ct.propFix[t]||t,this.each(function(){try{this[t]=S,delete this[t]}catch(t){}})},addClass:function(e){var t,n,i,r,o,a=0,s=this.length,l="string"==typeof e&&e;if(Ct.isFunction(e))return this.each(function(t){Ct(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(C)||[];a<s;a++)if(i=1===(n=this[a]).nodeType&&(n.className?(" "+n.className+" ").replace(q," "):" ")){for(o=0;r=t[o++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");n.className=Ct.trim(i)}return this},removeClass:function(e){var t,n,i,r,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(Ct.isFunction(e))return this.each(function(t){Ct(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(C)||[];a<s;a++)if(i=1===(n=this[a]).nodeType&&(n.className?(" "+n.className+" ").replace(q," "):"")){for(o=0;r=t[o++];)for(;0<=i.indexOf(" "+r+" ");)i=i.replace(" "+r+" "," ");n.className=e?Ct.trim(i):""}return this},toggleClass:function(r,e){var o=typeof r;return"boolean"==typeof e&&"string"===o?e?this.addClass(r):this.removeClass(r):Ct.isFunction(r)?this.each(function(t){Ct(this).toggleClass(r.call(this,t,this.className,e),e)}):this.each(function(){if("string"===o)for(var t,e=0,n=Ct(this),i=r.match(C)||[];t=i[e++];)n.hasClass(t)?n.removeClass(t):n.addClass(t);else o!==v&&"boolean"!==o||(this.className&&Ct._data(this,"__className__",this.className),this.className=this.className||!1===r?"":Ct._data(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",n=0,i=this.length;n<i;n++)if(1===this[n].nodeType&&0<=(" "+this[n].className+" ").replace(q," ").indexOf(e))return!0;return!1},val:function(n){var t,i,r,e=this[0];return arguments.length?(r=Ct.isFunction(n),this.each(function(t){var e;1===this.nodeType&&(null==(e=r?n.call(this,t,Ct(this).val()):n)?e="":"number"==typeof e?e+="":Ct.isArray(e)&&(e=Ct.map(e,function(t){return null==t?"":t+""})),(i=Ct.valHooks[this.type]||Ct.valHooks[this.nodeName.toLowerCase()])&&"set"in i&&i.set(this,e,"value")!==S||(this.value=e))})):e?(i=Ct.valHooks[e.type]||Ct.valHooks[e.nodeName.toLowerCase()])&&"get"in i&&(t=i.get(e,"value"))!==S?t:"string"==typeof(t=e.value)?t.replace(U,""):null==t?"":t:void 0}}),Ct.extend({valHooks:{option:{get:function(t){var e=Ct.find.attr(t,"value");return null!=e?e:t.text}},select:{get:function(t){for(var e,n,i=t.options,r=t.selectedIndex,o="select-one"===t.type||r<0,a=o?null:[],s=o?r+1:i.length,l=r<0?s:o?r:0;l<s;l++)if(((n=i[l]).selected||l===r)&&(Ct.support.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!Ct.nodeName(n.parentNode,"optgroup"))){if(e=Ct(n).val(),o)return e;a.push(e)}return a},set:function(t,e){for(var n,i,r=t.options,o=Ct.makeArray(e),a=r.length;a--;)((i=r[a]).selected=0<=Ct.inArray(Ct(i).val(),o))&&(n=!0);return n||(t.selectedIndex=-1),o}}},attr:function(t,e,n){var i,r,o=t.nodeType;if(t&&3!==o&&8!==o&&2!==o)return typeof t.getAttribute===v?Ct.prop(t,e,n):(1===o&&Ct.isXMLDoc(t)||(e=e.toLowerCase(),i=Ct.attrHooks[e]||(Ct.expr.match.bool.test(e)?W:V)),n===S?i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=Ct.find.attr(t,e))?S:r:null!==n?i&&"set"in i&&(r=i.set(t,n,e))!==S?r:(t.setAttribute(e,n+""),n):void Ct.removeAttr(t,e))},removeAttr:function(t,e){var n,i,r=0,o=e&&e.match(C);if(o&&1===t.nodeType)for(;n=o[r++];)i=Ct.propFix[n]||n,Ct.expr.match.bool.test(n)?K&&X||!Y.test(n)?t[i]=!1:t[Ct.camelCase("default-"+n)]=t[i]=!1:Ct.attr(t,n,""),t.removeAttribute(X?n:i)},attrHooks:{type:{set:function(t,e){if(!Ct.support.radioValue&&"radio"===e&&Ct.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},propFix:{for:"htmlFor",class:"className"},prop:function(t,e,n){var i,r,o=t.nodeType;if(t&&3!==o&&8!==o&&2!==o)return(1!==o||!Ct.isXMLDoc(t))&&(e=Ct.propFix[e]||e,r=Ct.propHooks[e]),n!==S?r&&"set"in r&&(i=r.set(t,n,e))!==S?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=Ct.find.attr(t,"tabindex");return e?parseInt(e,10):J.test(t.nodeName)||G.test(t.nodeName)&&t.href?0:-1}}}}),W={set:function(t,e,n){return!1===e?Ct.removeAttr(t,n):K&&X||!Y.test(n)?t.setAttribute(!X&&Ct.propFix[n]||n,n):t[Ct.camelCase("default-"+n)]=t[n]=!0,n}},Ct.each(Ct.expr.match.bool.source.match(/\w+/g),function(t,e){var o=Ct.expr.attrHandle[e]||Ct.find.attr;Ct.expr.attrHandle[e]=K&&X||!Y.test(e)?function(t,e,n){var i=Ct.expr.attrHandle[e],r=n?S:(Ct.expr.attrHandle[e]=S)!=o(t,e,n)?e.toLowerCase():null;return Ct.expr.attrHandle[e]=i,r}:function(t,e,n){return n?S:t[Ct.camelCase("default-"+e)]?e.toLowerCase():null}}),K&&X||(Ct.attrHooks.value={set:function(t,e,n){if(!Ct.nodeName(t,"input"))return V&&V.set(t,e,n);t.defaultValue=e}}),X||(V={set:function(t,e,n){var i=t.getAttributeNode(n);return i||t.setAttributeNode(i=t.ownerDocument.createAttribute(n)),i.value=e+="","value"===n||e===t.getAttribute(n)?e:S}},Ct.expr.attrHandle.id=Ct.expr.attrHandle.name=Ct.expr.attrHandle.coords=function(t,e,n){var i;return n?S:(i=t.getAttributeNode(e))&&""!==i.value?i.value:null},Ct.valHooks.button={get:function(t,e){var n=t.getAttributeNode(e);return n&&n.specified?n.value:S},set:V.set},Ct.attrHooks.contenteditable={set:function(t,e,n){V.set(t,""!==e&&e,n)}},Ct.each(["width","height"],function(t,n){Ct.attrHooks[n]={set:function(t,e){if(""===e)return t.setAttribute(n,"auto"),e}}})),Ct.support.hrefNormalized||Ct.each(["href","src"],function(t,e){Ct.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),Ct.support.style||(Ct.attrHooks.style={get:function(t){return t.style.cssText||S},set:function(t,e){return t.style.cssText=e+""}}),Ct.support.optSelected||(Ct.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}}),Ct.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Ct.propFix[this.toLowerCase()]=this}),Ct.support.enctype||(Ct.propFix.enctype="encoding"),Ct.each(["radio","checkbox"],function(){Ct.valHooks[this]={set:function(t,e){if(Ct.isArray(e))return t.checked=0<=Ct.inArray(Ct(t).val(),e)}},Ct.support.checkOn||(Ct.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Q=/^(?:input|select|textarea)$/i,Z=/^key/,tt=/^(?:mouse|contextmenu)|click/,et=/^(?:focusinfocus|focusoutblur)$/,nt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function rt(){return!1}function ot(){try{return g.activeElement}catch(t){}}Ct.event={global:{},add:function(t,e,n,i,r){var o,a,s,l,c,u,h,d,f,p,g,m=Ct._data(t);if(m){for(n.handler&&(n=(l=n).handler,r=l.selector),n.guid||(n.guid=Ct.guid++),(a=m.events)||(a=m.events={}),(u=m.handle)||((u=m.handle=function(t){return typeof Ct===v||t&&Ct.event.triggered===t.type?S:Ct.event.dispatch.apply(u.elem,arguments)}).elem=t),s=(e=(e||"").match(C)||[""]).length;s--;)f=g=(o=nt.exec(e[s])||[])[1],p=(o[2]||"").split(".").sort(),f&&(c=Ct.event.special[f]||{},f=(r?c.delegateType:c.bindType)||f,c=Ct.event.special[f]||{},h=Ct.extend({type:f,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&Ct.expr.match.needsContext.test(r),namespace:p.join(".")},l),(d=a[f])||((d=a[f]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(t,i,p,u)||(t.addEventListener?t.addEventListener(f,u,!1):t.attachEvent&&t.attachEvent("on"+f,u))),c.add&&(c.add.call(t,h),h.handler.guid||(h.handler.guid=n.guid)),r?d.splice(d.delegateCount++,0,h):d.push(h),Ct.event.global[f]=!0);t=null}},remove:function(t,e,n,i,r){var o,a,s,l,c,u,h,d,f,p,g,m=Ct.hasData(t)&&Ct._data(t);if(m&&(u=m.events)){for(c=(e=(e||"").match(C)||[""]).length;c--;)if(f=g=(s=nt.exec(e[c])||[])[1],p=(s[2]||"").split(".").sort(),f){for(h=Ct.event.special[f]||{},d=u[f=(i?h.delegateType:h.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=d.length;o--;)a=d[o],!r&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||i&&i!==a.selector&&("**"!==i||!a.selector)||(d.splice(o,1),a.selector&&d.delegateCount--,h.remove&&h.remove.call(t,a));l&&!d.length&&(h.teardown&&!1!==h.teardown.call(t,p,m.handle)||Ct.removeEvent(t,f,m.handle),delete u[f])}else for(f in u)Ct.event.remove(t,f+e[c],n,i,!0);Ct.isEmptyObject(u)&&(delete m.handle,Ct._removeData(t,"events"))}},trigger:function(t,e,n,i){var r,o,a,s,l,c,u,h=[n||g],d=y.call(t,"type")?t.type:t,f=y.call(t,"namespace")?t.namespace.split("."):[];if(a=c=n=n||g,3!==n.nodeType&&8!==n.nodeType&&!et.test(d+Ct.event.triggered)&&(0<=d.indexOf(".")&&(d=(f=d.split(".")).shift(),f.sort()),o=d.indexOf(":")<0&&"on"+d,(t=t[Ct.expando]?t:new Ct.Event(d,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=f.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=S,t.target||(t.target=n),e=null==e?[t]:Ct.makeArray(e,[t]),l=Ct.event.special[d]||{},i||!l.trigger||!1!==l.trigger.apply(n,e))){if(!i&&!l.noBubble&&!Ct.isWindow(n)){for(s=l.delegateType||d,et.test(s+d)||(a=a.parentNode);a;a=a.parentNode)h.push(a),c=a;c===(n.ownerDocument||g)&&h.push(c.defaultView||c.parentWindow||p)}for(u=0;(a=h[u++])&&!t.isPropagationStopped();)t.type=1<u?s:l.bindType||d,(r=(Ct._data(a,"events")||{})[t.type]&&Ct._data(a,"handle"))&&r.apply(a,e),(r=o&&a[o])&&Ct.acceptData(a)&&r.apply&&!1===r.apply(a,e)&&t.preventDefault();if(t.type=d,!i&&!t.isDefaultPrevented()&&(!l._default||!1===l._default.apply(h.pop(),e))&&Ct.acceptData(n)&&o&&n[d]&&!Ct.isWindow(n)){(c=n[o])&&(n[o]=null),Ct.event.triggered=d;try{n[d]()}catch(t){}Ct.event.triggered=S,c&&(n[o]=c)}return t.result}},dispatch:function(t){t=Ct.event.fix(t);var e,n,i,r,o,a=[],s=u.call(arguments),l=(Ct._data(this,"events")||{})[t.type]||[],c=Ct.event.special[t.type]||{};if((s[0]=t).delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){for(a=Ct.event.handlers.call(this,t,l),e=0;(r=a[e++])&&!t.isPropagationStopped();)for(t.currentTarget=r.elem,o=0;(i=r.handlers[o++])&&!t.isImmediatePropagationStopped();)t.namespace_re&&!t.namespace_re.test(i.namespace)||(t.handleObj=i,t.data=i.data,(n=((Ct.event.special[i.origType]||{}).handle||i.handler).apply(r.elem,s))!==S&&!1===(t.result=n)&&(t.preventDefault(),t.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,r,o,a=[],s=e.delegateCount,l=t.target;if(s&&l.nodeType&&(!t.button||"click"!==t.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==t.type)){for(r=[],o=0;o<s;o++)r[n=(i=e[o]).selector+" "]===S&&(r[n]=i.needsContext?0<=Ct(n,this).index(l):Ct.find(n,this,null,[l]).length),r[n]&&r.push(i);r.length&&a.push({elem:l,handlers:r})}return s<e.length&&a.push({elem:this,handlers:e.slice(s)}),a},fix:function(t){if(t[Ct.expando])return t;var e,n,i,r=t.type,o=t,a=this.fixHooks[r];for(a||(this.fixHooks[r]=a=tt.test(r)?this.mouseHooks:Z.test(r)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,t=new Ct.Event(o),e=i.length;e--;)t[n=i[e]]=o[n];return t.target||(t.target=o.srcElement||g),3===t.target.nodeType&&(t.target=t.target.parentNode),t.metaKey=!!t.metaKey,a.filter?a.filter(t,o):t},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(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var n,i,r,o=e.button,a=e.fromElement;return null==t.pageX&&null!=e.clientX&&(r=(i=t.target.ownerDocument||g).documentElement,n=i.body,t.pageX=e.clientX+(r&&r.scrollLeft||n&&n.scrollLeft||0)-(r&&r.clientLeft||n&&n.clientLeft||0),t.pageY=e.clientY+(r&&r.scrollTop||n&&n.scrollTop||0)-(r&&r.clientTop||n&&n.clientTop||0)),!t.relatedTarget&&a&&(t.relatedTarget=a===t.target?e.toElement:a),t.which||o===S||(t.which=1&o?1:2&o?3:4&o?2:0),t}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ot()&&this.focus)try{return this.focus(),!1}catch(t){}},delegateType:"focusin"},blur:{trigger:function(){if(this===ot()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(Ct.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1},_default:function(t){return Ct.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){t.result!==S&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,n,i){var r=Ct.extend(new Ct.Event,n,{type:t,isSimulated:!0,originalEvent:{}});i?Ct.event.trigger(r,null,e):Ct.event.dispatch.call(e,r),r.isDefaultPrevented()&&n.preventDefault()}},Ct.removeEvent=g.removeEventListener?function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n,!1)}:function(t,e,n){var i="on"+e;t.detachEvent&&(typeof t[i]===v&&(t[i]=null),t.detachEvent(i,n))},Ct.Event=function(t,e){if(!(this instanceof Ct.Event))return new Ct.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||!1===t.returnValue||t.getPreventDefault&&t.getPreventDefault()?it:rt):this.type=t,e&&Ct.extend(this,e),this.timeStamp=t&&t.timeStamp||Ct.now(),this[Ct.expando]=!0},Ct.Event.prototype={isDefaultPrevented:rt,isPropagationStopped:rt,isImmediatePropagationStopped:rt,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=it,t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=it,t&&(t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},Ct.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(t,o){Ct.event.special[t]={delegateType:o,bindType:o,handle:function(t){var e,n=this,i=t.relatedTarget,r=t.handleObj;return i&&(i===n||Ct.contains(n,i))||(t.type=r.origType,e=r.handler.apply(this,arguments),t.type=o),e}}}),Ct.support.submitBubbles||(Ct.event.special.submit={setup:function(){if(Ct.nodeName(this,"form"))return!1;Ct.event.add(this,"click._submit keypress._submit",function(t){var e=t.target,n=Ct.nodeName(e,"input")||Ct.nodeName(e,"button")?e.form:S;n&&!Ct._data(n,"submitBubbles")&&(Ct.event.add(n,"submit._submit",function(t){t._submit_bubble=!0}),Ct._data(n,"submitBubbles",!0))})},postDispatch:function(t){t._submit_bubble&&(delete t._submit_bubble,this.parentNode&&!t.isTrigger&&Ct.event.simulate("submit",this.parentNode,t,!0))},teardown:function(){if(Ct.nodeName(this,"form"))return!1;Ct.event.remove(this,"._submit")}}),Ct.support.changeBubbles||(Ct.event.special.change={setup:function(){if(Q.test(this.nodeName))return"checkbox"!==this.type&&"radio"!==this.type||(Ct.event.add(this,"propertychange._change",function(t){"checked"===t.originalEvent.propertyName&&(this._just_changed=!0)}),Ct.event.add(this,"click._change",function(t){this._just_changed&&!t.isTrigger&&(this._just_changed=!1),Ct.event.simulate("change",this,t,!0)})),!1;Ct.event.add(this,"beforeactivate._change",function(t){var e=t.target;Q.test(e.nodeName)&&!Ct._data(e,"changeBubbles")&&(Ct.event.add(e,"change._change",function(t){!this.parentNode||t.isSimulated||t.isTrigger||Ct.event.simulate("change",this.parentNode,t,!0)}),Ct._data(e,"changeBubbles",!0))})},handle:function(t){var e=t.target;if(this!==e||t.isSimulated||t.isTrigger||"radio"!==e.type&&"checkbox"!==e.type)return t.handleObj.handler.apply(this,arguments)},teardown:function(){return Ct.event.remove(this,"._change"),!Q.test(this.nodeName)}}),Ct.support.focusinBubbles||Ct.each({focus:"focusin",blur:"focusout"},function(t,e){var n=0,i=function(t){Ct.event.simulate(e,t.target,Ct.event.fix(t),!0)};Ct.event.special[e]={setup:function(){0==n++&&g.addEventListener(t,i,!0)},teardown:function(){0==--n&&g.removeEventListener(t,i,!0)}}}),Ct.fn.extend({on:function(t,e,n,i,r){var o,a;if("object"==typeof t){for(o in"string"!=typeof e&&(n=n||e,e=S),t)this.on(o,e,n,t[o],r);return this}if(null==n&&null==i?(i=e,n=e=S):null==i&&("string"==typeof e?(i=n,n=S):(i=n,n=e,e=S)),!1===i)i=rt;else if(!i)return this;return 1===r&&(a=i,(i=function(t){return Ct().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=Ct.guid++)),this.each(function(){Ct.event.add(this,t,i,n,e)})},one:function(t,e,n,i){return this.on(t,e,n,i,1)},off:function(t,e,n){var i,r;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,Ct(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"!=typeof t)return!1!==e&&"function"!=typeof e||(n=e,e=S),!1===n&&(n=rt),this.each(function(){Ct.event.remove(this,t,n,e)});for(r in t)this.off(r,e,t[r]);return this},trigger:function(t,e){return this.each(function(){Ct.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return Ct.event.trigger(t,e,n,!0)}});var at=/^.[^:#\[\.,]*$/,st=/^(?:parents|prev(?:Until|All))/,lt=Ct.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};function ut(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function ht(t,n,i){if(Ct.isFunction(n))return Ct.grep(t,function(t,e){return!!n.call(t,e,t)!==i});if(n.nodeType)return Ct.grep(t,function(t){return t===n!==i});if("string"==typeof n){if(at.test(n))return Ct.filter(n,t,i);n=Ct.filter(n,t)}return Ct.grep(t,function(t){return 0<=Ct.inArray(t,n)!==i})}function dt(t){var e=ft.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}Ct.fn.extend({find:function(t){var e,n=[],i=this,r=i.length;if("string"!=typeof t)return this.pushStack(Ct(t).filter(function(){for(e=0;e<r;e++)if(Ct.contains(i[e],this))return!0}));for(e=0;e<r;e++)Ct.find(t,i[e],n);return(n=this.pushStack(1<r?Ct.unique(n):n)).selector=this.selector?this.selector+" "+t:t,n},has:function(t){var e,n=Ct(t,this),i=n.length;return this.filter(function(){for(e=0;e<i;e++)if(Ct.contains(this,n[e]))return!0})},not:function(t){return this.pushStack(ht(this,t||[],!0))},filter:function(t){return this.pushStack(ht(this,t||[],!1))},is:function(t){return!!ht(this,"string"==typeof t&&lt.test(t)?Ct(t):t||[],!1).length},closest:function(t,e){for(var n,i=0,r=this.length,o=[],a=lt.test(t)||"string"!=typeof t?Ct(t,e||this.context):0;i<r;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&Ct.find.matchesSelector(n,t))){n=o.push(n);break}return this.pushStack(1<o.length?Ct.unique(o):o)},index:function(t){return t?"string"==typeof t?Ct.inArray(this[0],Ct(t)):Ct.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){var n="string"==typeof t?Ct(t,e):Ct.makeArray(t&&t.nodeType?[t]:t),i=Ct.merge(this.get(),n);return this.pushStack(Ct.unique(i))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),Ct.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return Ct.dir(t,"parentNode")},parentsUntil:function(t,e,n){return Ct.dir(t,"parentNode",n)},next:function(t){return ut(t,"nextSibling")},prev:function(t){return ut(t,"previousSibling")},nextAll:function(t){return Ct.dir(t,"nextSibling")},prevAll:function(t){return Ct.dir(t,"previousSibling")},nextUntil:function(t,e,n){return Ct.dir(t,"nextSibling",n)},prevUntil:function(t,e,n){return Ct.dir(t,"previousSibling",n)},siblings:function(t){return Ct.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return Ct.sibling(t.firstChild)},contents:function(t){return Ct.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:Ct.merge([],t.childNodes)}},function(i,r){Ct.fn[i]=function(t,e){var n=Ct.map(this,r,t);return"Until"!==i.slice(-5)&&(e=t),e&&"string"==typeof e&&(n=Ct.filter(e,n)),1<this.length&&(ct[i]||(n=Ct.unique(n)),st.test(i)&&(n=n.reverse())),this.pushStack(n)}}),Ct.extend({filter:function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?Ct.find.matchesSelector(i,t)?[i]:[]:Ct.find.matches(t,Ct.grep(e,function(t){return 1===t.nodeType}))},dir:function(t,e,n){for(var i=[],r=t[e];r&&9!==r.nodeType&&(n===S||1!==r.nodeType||!Ct(r).is(n));)1===r.nodeType&&i.push(r),r=r[e];return i},sibling:function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}});var ft="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",pt=/ jQuery\d+="(?:null|\d+)"/g,gt=new RegExp("<(?:"+ft+")[\\s/>]","i"),mt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,yt=/<([\w:]+)/,bt=/<tbody/i,xt=/<|&#?\w+;/,_t=/<(?:script|style|link)/i,wt=/^(?:checkbox|radio)$/i,St=/checked\s*(?:[^=]|=\s*.checked.)/i,Tt=/^$|\/(?:java|ecma)script/i,$t=/^true\/(.*)/,kt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:Ct.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Ot=dt(g).appendChild(g.createElement("div"));function Dt(t,e){return Ct.nodeName(t,"table")&&Ct.nodeName(1===e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function Pt(t){return t.type=(null!==Ct.find.attr(t,"type"))+"/"+t.type,t}function Mt(t){var e=$t.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function Et(t,e){for(var n,i=0;null!=(n=t[i]);i++)Ct._data(n,"globalEval",!e||Ct._data(e[i],"globalEval"))}function It(t,e){if(1===e.nodeType&&Ct.hasData(t)){var n,i,r,o=Ct._data(t),a=Ct._data(e,o),s=o.events;if(s)for(n in delete a.handle,a.events={},s)for(i=0,r=s[n].length;i<r;i++)Ct.event.add(e,n,s[n][i]);a.data&&(a.data=Ct.extend({},a.data))}}function Nt(t,e){var n,i,r;if(1===e.nodeType){if(n=e.nodeName.toLowerCase(),!Ct.support.noCloneEvent&&e[Ct.expando]){for(i in(r=Ct._data(e)).events)Ct.removeEvent(e,i,r.handle);e.removeAttribute(Ct.expando)}"script"===n&&e.text!==t.text?(Pt(e).text=t.text,Mt(e)):"object"===n?(e.parentNode&&(e.outerHTML=t.outerHTML),Ct.support.html5Clone&&t.innerHTML&&!Ct.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===n&&wt.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===n?e.defaultSelected=e.selected=t.defaultSelected:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}}function Rt(t,e){var n,i,r=0,o=typeof t.getElementsByTagName!==v?t.getElementsByTagName(e||"*"):typeof t.querySelectorAll!==v?t.querySelectorAll(e||"*"):S;if(!o)for(o=[],n=t.childNodes||t;null!=(i=n[r]);r++)!e||Ct.nodeName(i,e)?o.push(i):Ct.merge(o,Rt(i,e));return e===S||e&&Ct.nodeName(t,e)?Ct.merge([t],o):o}function Lt(t){wt.test(t.type)&&(t.defaultChecked=t.checked)}At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,Ct.fn.extend({text:function(t){return Ct.access(this,function(t){return t===S?Ct.text(this):this.empty().append((this[0]&&this[0].ownerDocument||g).createTextNode(t))},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Dt(this,t).appendChild(t)})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Dt(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var n,i=t?Ct.filter(t,this):this,r=0;null!=(n=i[r]);r++)e||1!==n.nodeType||Ct.cleanData(Rt(n)),n.parentNode&&(e&&Ct.contains(n.ownerDocument,n)&&Et(Rt(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&Ct.cleanData(Rt(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&Ct.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return Ct.clone(this,t,e)})},html:function(t){return Ct.access(this,function(t){var e=this[0]||{},n=0,i=this.length;if(t===S)return 1===e.nodeType?e.innerHTML.replace(pt,""):S;if("string"==typeof t&&!_t.test(t)&&(Ct.support.htmlSerialize||!gt.test(t))&&(Ct.support.leadingWhitespace||!mt.test(t))&&!At[(yt.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(vt,"<$1></$2>");try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&(Ct.cleanData(Rt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var i=Ct.map(this,function(t){return[t.nextSibling,t.parentNode]}),r=0;return this.domManip(arguments,function(t){var e=i[r++],n=i[r++];n&&(e&&e.parentNode!==n&&(e=this.nextSibling),Ct(this).remove(),n.insertBefore(t,e))},!0),r?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(n,i,r){n=m.apply([],n);var t,e,o,a,s,l,c=0,u=this.length,h=this,d=u-1,f=n[0],p=Ct.isFunction(f);if(p||!(u<=1||"string"!=typeof f||Ct.support.checkClone)&&St.test(f))return this.each(function(t){var e=h.eq(t);p&&(n[0]=f.call(this,t,e.html())),e.domManip(n,i,r)});if(u&&(t=(l=Ct.buildFragment(n,this[0].ownerDocument,!1,!r&&this)).firstChild,1===l.childNodes.length&&(l=t),t)){for(o=(a=Ct.map(Rt(l,"script"),Pt)).length;c<u;c++)e=l,c!==d&&(e=Ct.clone(e,!0,!0),o&&Ct.merge(a,Rt(e,"script"))),i.call(this[c],e,c);if(o)for(s=a[a.length-1].ownerDocument,Ct.map(a,Mt),c=0;c<o;c++)e=a[c],Tt.test(e.type||"")&&!Ct._data(e,"globalEval")&&Ct.contains(s,e)&&(e.src?Ct._evalUrl(e.src):Ct.globalEval((e.text||e.textContent||e.innerHTML||"").replace(kt,"")));l=t=null}return this}}),Ct.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,a){Ct.fn[t]=function(t){for(var e,n=0,i=[],r=Ct(t),o=r.length-1;n<=o;n++)e=n===o?this:this.clone(!0),Ct(r[n])[a](e),l.apply(i,e.get());return this.pushStack(i)}}),Ct.extend({clone:function(t,e,n){var i,r,o,a,s,l=Ct.contains(t.ownerDocument,t);if(Ct.support.html5Clone||Ct.isXMLDoc(t)||!gt.test("<"+t.nodeName+">")?o=t.cloneNode(!0):(Ot.innerHTML=t.outerHTML,Ot.removeChild(o=Ot.firstChild)),!(Ct.support.noCloneEvent&&Ct.support.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||Ct.isXMLDoc(t)))for(i=Rt(o),s=Rt(t),a=0;null!=(r=s[a]);++a)i[a]&&Nt(r,i[a]);if(e)if(n)for(s=s||Rt(t),i=i||Rt(o),a=0;null!=(r=s[a]);a++)It(r,i[a]);else It(t,o);return 0<(i=Rt(o,"script")).length&&Et(i,!l&&Rt(t,"script")),i=s=r=null,o},buildFragment:function(t,e,n,i){for(var r,o,a,s,l,c,u,h=t.length,d=dt(e),f=[],p=0;p<h;p++)if((o=t[p])||0===o)if("object"===Ct.type(o))Ct.merge(f,o.nodeType?[o]:o);else if(xt.test(o)){for(s=s||d.appendChild(e.createElement("div")),l=(yt.exec(o)||["",""])[1].toLowerCase(),u=At[l]||At._default,s.innerHTML=u[1]+o.replace(vt,"<$1></$2>")+u[2],r=u[0];r--;)s=s.lastChild;if(!Ct.support.leadingWhitespace&&mt.test(o)&&f.push(e.createTextNode(mt.exec(o)[0])),!Ct.support.tbody)for(r=(o="table"!==l||bt.test(o)?"<table>"!==u[1]||bt.test(o)?0:s:s.firstChild)&&o.childNodes.length;r--;)Ct.nodeName(c=o.childNodes[r],"tbody")&&!c.childNodes.length&&o.removeChild(c);for(Ct.merge(f,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=d.lastChild}else f.push(e.createTextNode(o));for(s&&d.removeChild(s),Ct.support.appendChecked||Ct.grep(Rt(f,"input"),Lt),p=0;o=f[p++];)if((!i||-1===Ct.inArray(o,i))&&(a=Ct.contains(o.ownerDocument,o),s=Rt(d.appendChild(o),"script"),a&&Et(s),n))for(r=0;o=s[r++];)Tt.test(o.type||"")&&n.push(o);return s=null,d},cleanData:function(t,e){for(var n,i,r,o,a=0,s=Ct.expando,l=Ct.cache,c=Ct.support.deleteExpando,u=Ct.event.special;null!=(n=t[a]);a++)if((e||Ct.acceptData(n))&&(o=(r=n[s])&&l[r])){if(o.events)for(i in o.events)u[i]?Ct.event.remove(n,i):Ct.removeEvent(n,i,o.handle);l[r]&&(delete l[r],c?delete n[s]:typeof n.removeAttribute!==v?n.removeAttribute(s):n[s]=null,h.push(r))}},_evalUrl:function(t){return Ct.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})}}),Ct.fn.extend({wrapAll:function(e){if(Ct.isFunction(e))return this.each(function(t){Ct(this).wrapAll(e.call(this,t))});if(this[0]){var t=Ct(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(n){return Ct.isFunction(n)?this.each(function(t){Ct(this).wrapInner(n.call(this,t))}):this.each(function(){var t=Ct(this),e=t.contents();e.length?e.wrapAll(n):t.append(n)})},wrap:function(e){var n=Ct.isFunction(e);return this.each(function(t){Ct(this).wrapAll(n?e.call(this,t):e)})},unwrap:function(){return this.parent().each(function(){Ct.nodeName(this,"body")||Ct(this).replaceWith(this.childNodes)}).end()}});var Ht,jt,Ft,zt=/alpha\([^)]*\)/i,Bt=/opacity\s*=\s*([^)]*)/,Vt=/^(top|right|bottom|left)$/,Wt=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Ut=new RegExp("^("+b+")(.*)$","i"),Jt=new RegExp("^("+b+")(?!px)[a-z%]+$","i"),Gt=new RegExp("^([+-])=("+b+")","i"),Yt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Qt=["Top","Right","Bottom","Left"],Zt=["Webkit","O","Moz","ms"];function te(t,e){if(e in t)return e;for(var n=e.charAt(0).toUpperCase()+e.slice(1),i=e,r=Zt.length;r--;)if((e=Zt[r]+n)in t)return e;return i}function ee(t,e){return t=e||t,"none"===Ct.css(t,"display")||!Ct.contains(t.ownerDocument,t)}function ne(t,e){for(var n,i,r,o=[],a=0,s=t.length;a<s;a++)(i=t[a]).style&&(o[a]=Ct._data(i,"olddisplay"),n=i.style.display,e?(o[a]||"none"!==n||(i.style.display=""),""===i.style.display&&ee(i)&&(o[a]=Ct._data(i,"olddisplay",ae(i.nodeName)))):o[a]||(r=ee(i),(n&&"none"!==n||!r)&&Ct._data(i,"olddisplay",r?n:Ct.css(i,"display"))));for(a=0;a<s;a++)(i=t[a]).style&&(e&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=e?o[a]||"":"none"));return t}function ie(t,e,n){var i=Ut.exec(e);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):e}function re(t,e,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===e?1:0,a=0;o<4;o+=2)"margin"===n&&(a+=Ct.css(t,n+Qt[o],!0,r)),i?("content"===n&&(a-=Ct.css(t,"padding"+Qt[o],!0,r)),"margin"!==n&&(a-=Ct.css(t,"border"+Qt[o]+"Width",!0,r))):(a+=Ct.css(t,"padding"+Qt[o],!0,r),"padding"!==n&&(a+=Ct.css(t,"border"+Qt[o]+"Width",!0,r)));return a}function oe(t,e,n){var i=!0,r="width"===e?t.offsetWidth:t.offsetHeight,o=jt(t),a=Ct.support.boxSizing&&"border-box"===Ct.css(t,"boxSizing",!1,o);if(r<=0||null==r){if(((r=Ft(t,e,o))<0||null==r)&&(r=t.style[e]),Jt.test(r))return r;i=a&&(Ct.support.boxSizingReliable||r===t.style[e]),r=parseFloat(r)||0}return r+re(t,e,n||(a?"border":"content"),i,o)+"px"}function ae(t){var e=g,n=Yt[t];return n||("none"!==(n=se(t,e))&&n||((e=((Ht=(Ht||Ct("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(e.documentElement))[0].contentWindow||Ht[0].contentDocument).document).write("<!doctype html><html><body>"),e.close(),n=se(t,e),Ht.detach()),Yt[t]=n),n}function se(t,e){var n=Ct(e.createElement(t)).appendTo(e.body),i=Ct.css(n[0],"display");return n.remove(),i}Ct.fn.extend({css:function(t,e){return Ct.access(this,function(t,e,n){var i,r,o={},a=0;if(Ct.isArray(e)){for(r=jt(t),i=e.length;a<i;a++)o[e[a]]=Ct.css(t,e[a],!1,r);return o}return n!==S?Ct.style(t,e,n):Ct.css(t,e)},t,e,1<arguments.length)},show:function(){return ne(this,!0)},hide:function(){return ne(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){ee(this)?Ct(this).show():Ct(this).hide()})}}),Ct.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Ft(t,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:Ct.support.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,a,s=Ct.camelCase(e),l=t.style;if(e=Ct.cssProps[s]||(Ct.cssProps[s]=te(l,s)),a=Ct.cssHooks[e]||Ct.cssHooks[s],n===S)return a&&"get"in a&&(r=a.get(t,!1,i))!==S?r:l[e];if(!("string"===(o=typeof n)&&(r=Gt.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(Ct.css(t,e)),o="number"),null==n||"number"===o&&isNaN(n)||("number"!==o||Ct.cssNumber[s]||(n+="px"),Ct.support.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),a&&"set"in a&&(n=a.set(t,n,i))===S)))try{l[e]=n}catch(t){}}},css:function(t,e,n,i){var r,o,a,s=Ct.camelCase(e);return e=Ct.cssProps[s]||(Ct.cssProps[s]=te(t.style,s)),(a=Ct.cssHooks[e]||Ct.cssHooks[s])&&"get"in a&&(o=a.get(t,!0,n)),o===S&&(o=Ft(t,e,i)),"normal"===o&&e in Kt&&(o=Kt[e]),""===n||n?(r=parseFloat(o),!0===n||Ct.isNumeric(r)?r||0:o):o}}),p.getComputedStyle?(jt=function(t){return p.getComputedStyle(t,null)},Ft=function(t,e,n){var i,r,o,a=n||jt(t),s=a?a.getPropertyValue(e)||a[e]:S,l=t.style;return a&&(""!==s||Ct.contains(t.ownerDocument,t)||(s=Ct.style(t,e)),Jt.test(s)&&qt.test(e)&&(i=l.width,r=l.minWidth,o=l.maxWidth,l.minWidth=l.maxWidth=l.width=s,s=a.width,l.width=i,l.minWidth=r,l.maxWidth=o)),s}):g.documentElement.currentStyle&&(jt=function(t){return t.currentStyle},Ft=function(t,e,n){var i,r,o,a=n||jt(t),s=a?a[e]:S,l=t.style;return null==s&&l&&l[e]&&(s=l[e]),Jt.test(s)&&!Vt.test(e)&&(i=l.left,(o=(r=t.runtimeStyle)&&r.left)&&(r.left=t.currentStyle.left),l.left="fontSize"===e?"1em":s,s=l.pixelLeft+"px",l.left=i,o&&(r.left=o)),""===s?"auto":s}),Ct.each(["height","width"],function(t,r){Ct.cssHooks[r]={get:function(t,e,n){if(e)return 0===t.offsetWidth&&Wt.test(Ct.css(t,"display"))?Ct.swap(t,Xt,function(){return oe(t,r,n)}):oe(t,r,n)},set:function(t,e,n){var i=n&&jt(t);return ie(t,e,n?re(t,r,n,Ct.support.boxSizing&&"border-box"===Ct.css(t,"boxSizing",!1,i),i):0)}}}),Ct.support.opacity||(Ct.cssHooks.opacity={get:function(t,e){return Bt.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var n=t.style,i=t.currentStyle,r=Ct.isNumeric(e)?"alpha(opacity="+100*e+")":"",o=i&&i.filter||n.filter||"";((n.zoom=1)<=e||""===e)&&""===Ct.trim(o.replace(zt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===e||i&&!i.filter)||(n.filter=zt.test(o)?o.replace(zt,r):o+" "+r)}}),Ct(function(){Ct.support.reliableMarginRight||(Ct.cssHooks.marginRight={get:function(t,e){if(e)return Ct.swap(t,{display:"inline-block"},Ft,[t,"marginRight"])}}),!Ct.support.pixelPosition&&Ct.fn.position&&Ct.each(["top","left"],function(t,n){Ct.cssHooks[n]={get:function(t,e){if(e)return e=Ft(t,n),Jt.test(e)?Ct(t).position()[n]+"px":e}}})}),Ct.expr&&Ct.expr.filters&&(Ct.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0||!Ct.support.reliableHiddenOffsets&&"none"===(t.style&&t.style.display||Ct.css(t,"display"))},Ct.expr.filters.visible=function(t){return!Ct.expr.filters.hidden(t)}),Ct.each({margin:"",padding:"",border:"Width"},function(r,o){Ct.cssHooks[r+o]={expand:function(t){for(var e=0,n={},i="string"==typeof t?t.split(" "):[t];e<4;e++)n[r+Qt[e]+o]=i[e]||i[e-2]||i[0];return n}},qt.test(r)||(Ct.cssHooks[r+o].set=ie)});var le=/%20/g,ce=/\[\]$/,ue=/\r?\n/g,he=/^(?:submit|button|image|reset|file)$/i,de=/^(?:input|select|textarea|keygen)/i;function fe(n,t,i,r){var e;if(Ct.isArray(t))Ct.each(t,function(t,e){i||ce.test(n)?r(n,e):fe(n+"["+("object"==typeof e?t:"")+"]",e,i,r)});else if(i||"object"!==Ct.type(t))r(n,t);else for(e in t)fe(n+"["+e+"]",t[e],i,r)}Ct.fn.extend({serialize:function(){return Ct.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=Ct.prop(this,"elements");return t?Ct.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!Ct(this).is(":disabled")&&de.test(this.nodeName)&&!he.test(t)&&(this.checked||!wt.test(t))}).map(function(t,e){var n=Ct(this).val();return null==n?null:Ct.isArray(n)?Ct.map(n,function(t){return{name:e.name,value:t.replace(ue,"\r\n")}}):{name:e.name,value:n.replace(ue,"\r\n")}}).get()}}),Ct.param=function(t,e){var n,i=[],r=function(t,e){e=Ct.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(e===S&&(e=Ct.ajaxSettings&&Ct.ajaxSettings.traditional),Ct.isArray(t)||t.jquery&&!Ct.isPlainObject(t))Ct.each(t,function(){r(this.name,this.value)});else for(n in t)fe(n,t[n],e,r);return i.join("&").replace(le,"+")},Ct.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(t,n){Ct.fn[n]=function(t,e){return 0<arguments.length?this.on(n,null,t,e):this.trigger(n)}}),Ct.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}});var pe,ge,me=Ct.now(),ve=/\?/,ye=/#.*$/,be=/([?&])_=[^&]*/,xe=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,_e=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,we=/^(?:GET|HEAD)$/,Se=/^\/\//,Ce=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Te=Ct.fn.load,$e={},ke={},Ae="*/".concat("*");try{ge=t.href}catch(t){(ge=g.createElement("a")).href="",ge=ge.href}function Oe(o){return function(t,e){"string"!=typeof t&&(e=t,t="*");var n,i=0,r=t.toLowerCase().match(C)||[];if(Ct.isFunction(e))for(;n=r[i++];)"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(e)):(o[n]=o[n]||[]).push(e)}}function De(e,r,o,a){var s={},l=e===ke;function c(t){var i;return s[t]=!0,Ct.each(e[t]||[],function(t,e){var n=e(r,o,a);return"string"!=typeof n||l||s[n]?l?!(i=n):void 0:(r.dataTypes.unshift(n),c(n),!1)}),i}return c(r.dataTypes[0])||!s["*"]&&c("*")}function Pe(t,e){var n,i,r=Ct.ajaxSettings.flatOptions||{};for(i in e)e[i]!==S&&((r[i]?t:n||(n={}))[i]=e[i]);return n&&Ct.extend(!0,t,n),t}function Me(t,e,n){for(var i,r,o,a,s=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),r===S&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(a in s)if(s[a]&&s[a].test(r)){l.unshift(a);break}if(l[0]in n)o=l[0];else{for(a in n){if(!l[0]||t.converters[a+" "+l[0]]){o=a;break}i||(i=a)}o=o||i}if(o)return o!==l[0]&&l.unshift(o),n[o]}function Ee(t,e,n,i){var r,o,a,s,l,c={},u=t.dataTypes.slice();if(u[1])for(a in t.converters)c[a.toLowerCase()]=t.converters[a];for(o=u.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=c[l+" "+o]||c["* "+o]))for(r in c)if((s=r.split(" "))[1]===o&&(a=c[l+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[r]:!0!==c[r]&&(o=s[0],u.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}pe=Ce.exec(ge.toLowerCase())||[],Ct.fn.load=function(t,e,n){if("string"!=typeof t&&Te)return Te.apply(this,arguments);var i,r,o,a=this,s=t.indexOf(" ");return 0<=s&&(i=t.slice(s,t.length),t=t.slice(0,s)),Ct.isFunction(e)?(n=e,e=S):e&&"object"==typeof e&&(o="POST"),0<a.length&&Ct.ajax({url:t,type:o,dataType:"html",data:e}).done(function(t){r=arguments,a.html(i?Ct("<div>").append(Ct.parseHTML(t)).find(i):t)}).complete(n&&function(t,e){a.each(n,r||[t.responseText,e,t])}),this},Ct.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){Ct.fn[e]=function(t){return this.on(e,t)}}),Ct.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ge,type:"GET",isLocal:_e.test(pe[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ae,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":Ct.parseJSON,"text xml":Ct.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Pe(Pe(t,Ct.ajaxSettings),e):Pe(Ct.ajaxSettings,t)},ajaxPrefilter:Oe($e),ajaxTransport:Oe(ke),ajax:function(t,e){"object"==typeof t&&(e=t,t=S),e=e||{};var n,i,u,h,d,f,p,r,g=Ct.ajaxSetup({},e),m=g.context||g,v=g.context&&(m.nodeType||m.jquery)?Ct(m):Ct.event,y=Ct.Deferred(),b=Ct.Callbacks("once memory"),x=g.statusCode||{},o={},a={},_=0,s="canceled",w={readyState:0,getResponseHeader:function(t){var e;if(2===_){if(!r)for(r={};e=xe.exec(h);)r[e[1].toLowerCase()]=e[2];e=r[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===_?h:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return _||(t=a[n]=a[n]||t,o[t]=e),this},overrideMimeType:function(t){return _||(g.mimeType=t),this},statusCode:function(t){var e;if(t)if(_<2)for(e in t)x[e]=[x[e],t[e]];else w.always(t[w.status]);return this},abort:function(t){var e=t||s;return p&&p.abort(e),l(0,e),this}};if(y.promise(w).complete=b.add,w.success=w.done,w.error=w.fail,g.url=((t||g.url||ge)+"").replace(ye,"").replace(Se,pe[1]+"//"),g.type=e.method||e.type||g.method||g.type,g.dataTypes=Ct.trim(g.dataType||"*").toLowerCase().match(C)||[""],null==g.crossDomain&&(n=Ce.exec(g.url.toLowerCase()),g.crossDomain=!(!n||n[1]===pe[1]&&n[2]===pe[2]&&(n[3]||("http:"===n[1]?"80":"443"))===(pe[3]||("http:"===pe[1]?"80":"443")))),g.data&&g.processData&&"string"!=typeof g.data&&(g.data=Ct.param(g.data,g.traditional)),De($e,g,e,w),2===_)return w;for(i in(f=g.global)&&0==Ct.active++&&Ct.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!we.test(g.type),u=g.url,g.hasContent||(g.data&&(u=g.url+=(ve.test(u)?"&":"?")+g.data,delete g.data),!1===g.cache&&(g.url=be.test(u)?u.replace(be,"$1_="+me++):u+(ve.test(u)?"&":"?")+"_="+me++)),g.ifModified&&(Ct.lastModified[u]&&w.setRequestHeader("If-Modified-Since",Ct.lastModified[u]),Ct.etag[u]&&w.setRequestHeader("If-None-Match",Ct.etag[u])),(g.data&&g.hasContent&&!1!==g.contentType||e.contentType)&&w.setRequestHeader("Content-Type",g.contentType),w.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+Ae+"; q=0.01":""):g.accepts["*"]),g.headers)w.setRequestHeader(i,g.headers[i]);if(g.beforeSend&&(!1===g.beforeSend.call(m,w,g)||2===_))return w.abort();for(i in s="abort",{success:1,error:1,complete:1})w[i](g[i]);if(p=De(ke,g,e,w)){w.readyState=1,f&&v.trigger("ajaxSend",[w,g]),g.async&&0<g.timeout&&(d=setTimeout(function(){w.abort("timeout")},g.timeout));try{_=1,p.send(o,l)}catch(t){if(!(_<2))throw t;l(-1,t)}}else l(-1,"No Transport");function l(t,e,n,i){var r,o,a,s,l,c=e;2!==_&&(_=2,d&&clearTimeout(d),p=S,h=i||"",w.readyState=0<t?4:0,r=200<=t&&t<300||304===t,n&&(s=Me(g,w,n)),s=Ee(g,s,w,r),r?(g.ifModified&&((l=w.getResponseHeader("Last-Modified"))&&(Ct.lastModified[u]=l),(l=w.getResponseHeader("etag"))&&(Ct.etag[u]=l)),204===t||"HEAD"===g.type?c="nocontent":304===t?c="notmodified":(c=s.state,o=s.data,r=!(a=s.error))):(a=c,!t&&c||(c="error",t<0&&(t=0))),w.status=t,w.statusText=(e||c)+"",r?y.resolveWith(m,[o,c,w]):y.rejectWith(m,[w,c,a]),w.statusCode(x),x=S,f&&v.trigger(r?"ajaxSuccess":"ajaxError",[w,g,r?o:a]),b.fireWith(m,[w,c]),f&&(v.trigger("ajaxComplete",[w,g]),--Ct.active||Ct.event.trigger("ajaxStop")))}return w},getJSON:function(t,e,n){return Ct.get(t,e,n,"json")},getScript:function(t,e){return Ct.get(t,S,e,"script")}}),Ct.each(["get","post"],function(t,r){Ct[r]=function(t,e,n,i){return Ct.isFunction(e)&&(i=i||n,n=e,e=S),Ct.ajax({url:t,type:r,dataType:i,data:e,success:n})}}),Ct.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return Ct.globalEval(t),t}}}),Ct.ajaxPrefilter("script",function(t){t.cache===S&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),Ct.ajaxTransport("script",function(e){if(e.crossDomain){var i,r=g.head||Ct("head")[0]||g.documentElement;return{send:function(t,n){(i=g.createElement("script")).async=!0,e.scriptCharset&&(i.charset=e.scriptCharset),i.src=e.url,i.onload=i.onreadystatechange=function(t,e){(e||!i.readyState||/loaded|complete/.test(i.readyState))&&(i.onload=i.onreadystatechange=null,i.parentNode&&i.parentNode.removeChild(i),i=null,e||n(200,"success"))},r.insertBefore(i,r.firstChild)},abort:function(){i&&i.onload(S,!0)}}}});var Ie=[],Ne=/(=)\?(?=&|$)|\?\?/;Ct.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ie.pop()||Ct.expando+"_"+me++;return this[t]=!0,t}}),Ct.ajaxPrefilter("json jsonp",function(t,e,n){var i,r,o,a=!1!==t.jsonp&&(Ne.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ne.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=Ct.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Ne,"$1"+i):!1!==t.jsonp&&(t.url+=(ve.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return o||Ct.error(i+" was not called"),o[0]},t.dataTypes[0]="json",r=p[i],p[i]=function(){o=arguments},n.always(function(){p[i]=r,t[i]&&(t.jsonpCallback=e.jsonpCallback,Ie.push(i)),o&&Ct.isFunction(r)&&r(o[0]),o=r=S}),"script"});var Re,Le,He=0,je=p.ActiveXObject&&function(){var t;for(t in Re)Re[t](S,!0)};function Fe(){try{return new p.XMLHttpRequest}catch(t){}}function ze(){try{return new p.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}Ct.ajaxSettings.xhr=p.ActiveXObject?function(){return!this.isLocal&&Fe()||ze()}:Fe,Le=Ct.ajaxSettings.xhr(),Ct.support.cors=!!Le&&"withCredentials"in Le,(Le=Ct.support.ajax=!!Le)&&Ct.ajaxTransport(function(l){var c;if(!l.crossDomain||Ct.support.cors)return{send:function(t,complete){var a,e,s=l.xhr();if(l.username?s.open(l.type,l.url,l.async,l.username,l.password):s.open(l.type,l.url,l.async),l.xhrFields)for(e in l.xhrFields)s[e]=l.xhrFields[e];l.mimeType&&s.overrideMimeType&&s.overrideMimeType(l.mimeType),l.crossDomain||t["X-Requested-With"]||(t["X-Requested-With"]="XMLHttpRequest");try{for(e in t)s.setRequestHeader(e,t[e])}catch(t){}s.send(l.hasContent&&l.data||null),c=function(t,e){var n,i,r,o;try{if(c&&(e||4===s.readyState))if(c=S,a&&(s.onreadystatechange=Ct.noop,je&&delete Re[a]),e)4!==s.readyState&&s.abort();else{o={},n=s.status,i=s.getAllResponseHeaders(),"string"==typeof s.responseText&&(o.text=s.responseText);try{r=s.statusText}catch(t){r=""}n||!l.isLocal||l.crossDomain?1223===n&&(n=204):n=o.text?200:404}}catch(t){e||complete(-1,t)}o&&complete(n,r,o,i)},l.async?4===s.readyState?setTimeout(c):(a=++He,je&&(Re||(Re={},Ct(p).unload(je)),Re[a]=c),s.onreadystatechange=c):c()},abort:function(){c&&c(S,!0)}}});var Be,Ve,We=/^(?:toggle|show|hide)$/,qe=new RegExp("^(?:([+-])=|)("+b+")([a-z%]*)$","i"),Ue=/queueHooks$/,Je=[Ze],Ge={"*":[function(t,e){var n=this.createTween(t,e),i=n.cur(),r=qe.exec(e),o=r&&r[3]||(Ct.cssNumber[t]?"":"px"),a=(Ct.cssNumber[t]||"px"!==o&&+i)&&qe.exec(Ct.css(n.elem,t)),s=1,l=20;if(a&&a[3]!==o)for(o=o||a[3],r=r||[],a=+i||1;a/=s=s||".5",Ct.style(n.elem,t,a+o),s!==(s=n.cur()/i)&&1!==s&&--l;);return r&&(a=n.start=+a||+i||0,n.unit=o,n.end=r[1]?a+(r[1]+1)*r[2]:+r[2]),n}]};function Ye(){return setTimeout(function(){Be=S}),Be=Ct.now()}function Xe(t,e,n){for(var i,r=(Ge[e]||[]).concat(Ge["*"]),o=0,a=r.length;o<a;o++)if(i=r[o].call(n,e,t))return i}function Ke(o,t,e){var n,a,i=0,r=Je.length,s=Ct.Deferred().always(function(){delete l.elem}),l=function(){if(a)return!1;for(var t=Be||Ye(),e=Math.max(0,c.startTime+c.duration-t),n=1-(e/c.duration||0),i=0,r=c.tweens.length;i<r;i++)c.tweens[i].run(n);return s.notifyWith(o,[c,n,e]),n<1&&r?e:(s.resolveWith(o,[c]),!1)},c=s.promise({elem:o,props:Ct.extend({},t),opts:Ct.extend(!0,{specialEasing:{}},e),originalProperties:t,originalOptions:e,startTime:Be||Ye(),duration:e.duration,tweens:[],createTween:function(t,e){var n=Ct.Tween(o,c.opts,t,e,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(n),n},stop:function(t){var e=0,n=t?c.tweens.length:0;if(a)return this;for(a=!0;e<n;e++)c.tweens[e].run(1);return t?s.resolveWith(o,[c,t]):s.rejectWith(o,[c,t]),this}}),u=c.props;for(Qe(u,c.opts.specialEasing);i<r;i++)if(n=Je[i].call(c,o,u,c.opts))return n;return Ct.map(u,Xe,c),Ct.isFunction(c.opts.start)&&c.opts.start.call(o,c),Ct.fx.timer(Ct.extend(l,{elem:o,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function Qe(t,e){var n,i,r,o,a;for(n in t)if(r=e[i=Ct.camelCase(n)],o=t[n],Ct.isArray(o)&&(r=o[1],o=t[n]=o[0]),n!==i&&(t[i]=o,delete t[n]),(a=Ct.cssHooks[i])&&"expand"in a)for(n in o=a.expand(o),delete t[i],o)n in t||(t[n]=o[n],e[n]=r);else e[i]=r}function Ze(e,t,n){var i,r,o,a,s,l,c=this,u={},h=e.style,d=e.nodeType&&ee(e),f=Ct._data(e,"fxshow");for(i in n.queue||(null==(s=Ct._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,c.always(function(){c.always(function(){s.unqueued--,Ct.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],"inline"===Ct.css(e,"display")&&"none"===Ct.css(e,"float")&&(Ct.support.inlineBlockNeedsLayout&&"inline"!==ae(e.nodeName)?h.zoom=1:h.display="inline-block")),n.overflow&&(h.overflow="hidden",Ct.support.shrinkWrapBlocks||c.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),t)if(r=t[i],We.exec(r)){if(delete t[i],o=o||"toggle"===r,r===(d?"hide":"show"))continue;u[i]=f&&f[i]||Ct.style(e,i)}if(!Ct.isEmptyObject(u))for(i in f?"hidden"in f&&(d=f.hidden):f=Ct._data(e,"fxshow",{}),o&&(f.hidden=!d),d?Ct(e).show():c.done(function(){Ct(e).hide()}),c.done(function(){var t;for(t in Ct._removeData(e,"fxshow"),u)Ct.style(e,t,u[t])}),u)a=Xe(d?f[i]:0,i,c),i in f||(f[i]=a.start,d&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}function tn(t,e,n,i,r){return new tn.prototype.init(t,e,n,i,r)}function en(t,e){var n,i={height:t},r=0;for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=Qt[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function nn(t){return Ct.isWindow(t)?t:9===t.nodeType&&(t.defaultView||t.parentWindow)}Ct.Animation=Ct.extend(Ke,{tweener:function(t,e){for(var n,i=0,r=(t=Ct.isFunction(t)?(e=t,["*"]):t.split(" ")).length;i<r;i++)n=t[i],Ge[n]=Ge[n]||[],Ge[n].unshift(e)},prefilter:function(t,e){e?Je.unshift(t):Je.push(t)}}),(Ct.Tween=tn).prototype={constructor:tn,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||"swing",this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(Ct.cssNumber[n]?"":"px")},cur:function(){var t=tn.propHooks[this.prop];return t&&t.get?t.get(this):tn.propHooks._default.get(this)},run:function(t){var e,n=tn.propHooks[this.prop];return this.options.duration?this.pos=e=Ct.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tn.propHooks._default.set(this),this}},tn.prototype.init.prototype=tn.prototype,tn.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=Ct.css(t.elem,t.prop,""))&&"auto"!==e?e:0:t.elem[t.prop]},set:function(t){Ct.fx.step[t.prop]?Ct.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[Ct.cssProps[t.prop]]||Ct.cssHooks[t.prop])?Ct.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},tn.propHooks.scrollTop=tn.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},Ct.each(["toggle","show","hide"],function(t,i){var r=Ct.fn[i];Ct.fn[i]=function(t,e,n){return null==t||"boolean"==typeof t?r.apply(this,arguments):this.animate(en(i,!0),t,e,n)}}),Ct.fn.extend({fadeTo:function(t,e,n,i){return this.filter(ee).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(e,t,n,i){var r=Ct.isEmptyObject(e),o=Ct.speed(t,n,i),a=function(){var t=Ke(this,Ct.extend({},e),o);(r||Ct._data(this,"finish"))&&t.stop(!0)};return a.finish=a,r||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(r,t,o){var a=function(t){var e=t.stop;delete t.stop,e(o)};return"string"!=typeof r&&(o=t,t=r,r=S),t&&!1!==r&&this.queue(r||"fx",[]),this.each(function(){var t=!0,e=null!=r&&r+"queueHooks",n=Ct.timers,i=Ct._data(this);if(e)i[e]&&i[e].stop&&a(i[e]);else for(e in i)i[e]&&i[e].stop&&Ue.test(e)&&a(i[e]);for(e=n.length;e--;)n[e].elem!==this||null!=r&&n[e].queue!==r||(n[e].anim.stop(o),t=!1,n.splice(e,1));!t&&o||Ct.dequeue(this,r)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var t,e=Ct._data(this),n=e[a+"queue"],i=e[a+"queueHooks"],r=Ct.timers,o=n?n.length:0;for(e.finish=!0,Ct.queue(this,a,[]),i&&i.stop&&i.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===a&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;t<o;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete e.finish})}}),Ct.each({slideDown:en("show"),slideUp:en("hide"),slideToggle:en("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,i){Ct.fn[t]=function(t,e,n){return this.animate(i,t,e,n)}}),Ct.speed=function(t,e,n){var i=t&&"object"==typeof t?Ct.extend({},t):{complete:n||!n&&e||Ct.isFunction(t)&&t,duration:t,easing:n&&e||e&&!Ct.isFunction(e)&&e};return i.duration=Ct.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in Ct.fx.speeds?Ct.fx.speeds[i.duration]:Ct.fx.speeds._default,null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){Ct.isFunction(i.old)&&i.old.call(this),i.queue&&Ct.dequeue(this,i.queue)},i},Ct.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},Ct.timers=[],Ct.fx=tn.prototype.init,Ct.fx.tick=function(){var t,e=Ct.timers,n=0;for(Be=Ct.now();n<e.length;n++)(t=e[n])()||e[n]!==t||e.splice(n--,1);e.length||Ct.fx.stop(),Be=S},Ct.fx.timer=function(t){t()&&Ct.timers.push(t)&&Ct.fx.start()},Ct.fx.interval=13,Ct.fx.start=function(){Ve||(Ve=setInterval(Ct.fx.tick,Ct.fx.interval))},Ct.fx.stop=function(){clearInterval(Ve),Ve=null},Ct.fx.speeds={slow:600,fast:200,_default:400},Ct.fx.step={},Ct.expr&&Ct.expr.filters&&(Ct.expr.filters.animated=function(e){return Ct.grep(Ct.timers,function(t){return e===t.elem}).length}),Ct.fn.offset=function(e){if(arguments.length)return e===S?this:this.each(function(t){Ct.offset.setOffset(this,e,t)});var t,n,i={top:0,left:0},r=this[0],o=r&&r.ownerDocument;return o?(t=o.documentElement,Ct.contains(t,r)?(typeof r.getBoundingClientRect!==v&&(i=r.getBoundingClientRect()),n=nn(o),{top:i.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:i.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):i):void 0},Ct.offset={setOffset:function(t,e,n){var i=Ct.css(t,"position");"static"===i&&(t.style.position="relative");var r,o,a=Ct(t),s=a.offset(),l=Ct.css(t,"top"),c=Ct.css(t,"left"),u={},h={};o=("absolute"===i||"fixed"===i)&&-1<Ct.inArray("auto",[l,c])?(r=(h=a.position()).top,h.left):(r=parseFloat(l)||0,parseFloat(c)||0),Ct.isFunction(e)&&(e=e.call(t,n,s)),null!=e.top&&(u.top=e.top-s.top+r),null!=e.left&&(u.left=e.left-s.left+o),"using"in e?e.using.call(t,u):a.css(u)}},Ct.fn.extend({position:function(){if(this[0]){var t,e,n={top:0,left:0},i=this[0];return"fixed"===Ct.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),Ct.nodeName(t[0],"html")||(n=t.offset()),n.top+=Ct.css(t[0],"borderTopWidth",!0),n.left+=Ct.css(t[0],"borderLeftWidth",!0)),{top:e.top-n.top-Ct.css(i,"marginTop",!0),left:e.left-n.left-Ct.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||i;t&&!Ct.nodeName(t,"html")&&"static"===Ct.css(t,"position");)t=t.offsetParent;return t||i})}}),Ct.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,r){var o=/Y/.test(r);Ct.fn[e]=function(t){return Ct.access(this,function(t,e,n){var i=nn(t);if(n===S)return i?r in i?i[r]:i.document.documentElement[e]:t[e];i?i.scrollTo(o?Ct(i).scrollLeft():n,o?n:Ct(i).scrollTop()):t[e]=n},e,t,arguments.length,null)}}),Ct.each({Height:"height",Width:"width"},function(o,a){Ct.each({padding:"inner"+o,content:a,"":"outer"+o},function(i,t){Ct.fn[t]=function(t,e){var n=arguments.length&&(i||"boolean"!=typeof t),r=i||(!0===t||!0===e?"margin":"border");return Ct.access(this,function(t,e,n){var i;return Ct.isWindow(t)?t.document.documentElement["client"+o]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+o],i["scroll"+o],t.body["offset"+o],i["offset"+o],i["client"+o])):n===S?Ct.css(t,e,r):Ct.style(t,e,n,r)},a,n?t:S,n,null)}})}),Ct.fn.size=function(){return this.length},Ct.fn.andSelf=Ct.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=Ct:(p.jQuery=p.$=Ct,"function"==typeof define&&define.amd&&define("jquery",[],function(){return Ct}))}(window),
/**
 * @license AngularJS v1.4.14
 * (c) 2010-2015 Google, Inc. http://angularjs.org
 * License: MIT
 */
function(a,et,nt){"use strict";function w(a,s){return s=s||Error,function(){var t,e,n=2,i=arguments,r=i[0],o="["+(a?a+":":"")+r+"] ";for(o+=i[1].replace(/\{\d+\}/g,function(t){var e=+t.slice(1,-1)+n;return e<i.length?ee(i[e]):t}),o+="\nhttp://errors.angularjs.org/1.4.14/"+(a?a+"/":"")+r,e=n,t="?";e<i.length;e++,t="&")o+=t+"p"+(e-n)+"="+encodeURIComponent(ee(i[e]));return new s(o)}}var o=/^\/(.+)\/([a-z]*)$/,h="validity",N=function(t){return ft(t)?t.toLowerCase():t},R=Object.prototype.hasOwnProperty,S=function(t){return ft(t)?t.toUpperCase():t},t=function(t){return ft(t)?t.replace(/[A-Z]/g,function(t){return String.fromCharCode(32|t.charCodeAt(0))}):t},e=function(t){return ft(t)?t.replace(/[a-z]/g,function(t){return String.fromCharCode(-33&t.charCodeAt(0))}):t};"i"!=="I".toLowerCase()&&(N=t,S=e);var it,rt,_,x,s=[].slice,n=[].splice,i=[].push,l=Object.prototype.toString,c=Object.getPrototypeOf,u=w("ng"),A=a.angular||(a.angular={}),r=0;function L(t){if(null==t||D(t))return!1;if(pt(t)||ft(t)||rt&&t instanceof rt)return!0;var e="length"in Object(t)&&t.length;return b(e)&&(0<=e&&(e-1 in t||t instanceof Array)||"function"==typeof t.item)}function ot(t,e,n){var i,r;if(t)if(gt(t))for(i in t)"prototype"==i||"length"==i||"name"==i||t.hasOwnProperty&&!t.hasOwnProperty(i)||e.call(n,t[i],i,t);else if(pt(t)||L(t)){var o="object"!=typeof t;for(i=0,r=t.length;i<r;i++)(o||i in t)&&e.call(n,t[i],i,t)}else if(t.forEach&&t.forEach!==ot)t.forEach(e,n,t);else if(y(t))for(i in t)e.call(n,t[i],i,t);else if("function"==typeof t.hasOwnProperty)for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t);else for(i in t)R.call(t,i)&&e.call(n,t[i],i,t);return t}function d(t,e,n){for(var i=Object.keys(t).sort(),r=0;r<i.length;r++)e.call(n,t[i[r]],i[r]);return i}function C(n){return function(t,e){n(e,t)}}function k(){return++r}function f(t,e){e?t.$$hashKey=e:delete t.$$hashKey}function p(t,e,n){for(var i=t.$$hashKey,r=0,o=e.length;r<o;++r){var a=e[r];if(dt(a)||gt(a))for(var s=Object.keys(a),l=0,c=s.length;l<c;l++){var u=s[l],h=a[u];n&&dt(h)?$(h)?t[u]=new Date(h.valueOf()):O(h)?t[u]=new RegExp(h):h.nodeName?t[u]=h.cloneNode(!0):z(h)?t[u]=h.clone():(dt(t[u])||(t[u]=pt(h)?[]:{}),p(t[u],[h],!0)):t[u]=h}}return f(t,i),t}function at(t){return p(t,s.call(arguments,1),!1)}function g(t){return p(t,s.call(arguments,1),!0)}function m(t){return parseInt(t,10)}function st(t,e){return at(Object.create(t),e)}function lt(){}function ct(t){return t}function T(t){return function(){return t}}function v(t){return gt(t.toString)&&t.toString!==l}function ut(t){return void 0===t}function ht(t){return void 0!==t}function dt(t){return null!==t&&"object"==typeof t}function y(t){return null!==t&&"object"==typeof t&&!c(t)}function ft(t){return"string"==typeof t}function b(t){return"number"==typeof t}function $(t){return"[object Date]"===l.call(t)}it=et.documentMode,lt.$inject=[],ct.$inject=[];var pt=Array.isArray;function gt(t){return"function"==typeof t}function O(t){return"[object RegExp]"===l.call(t)}function D(t){return t&&t.window===t}function mt(t){return t&&t.$evalAsync&&t.$watch}function P(t){return"[object File]"===l.call(t)}function M(t){return"[object FormData]"===l.call(t)}function E(t){return"[object Blob]"===l.call(t)}function vt(t){return"boolean"==typeof t}function I(t){return t&&gt(t.then)}var H=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/;function j(t){return t&&b(t.length)&&H.test(l.call(t))}var yt=function(t){return ft(t)?t.trim():t},F=function(t){return t.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};function z(t){return!(!t||!(t.nodeName||t.prop&&t.attr&&t.find))}function B(t){var e,n={},i=t.split(",");for(e=0;e<i.length;e++)n[i[e]]=!0;return n}function bt(t){return N(t.nodeName||t[0]&&t[0].nodeName)}function xt(t,e){var n=t.indexOf(e);return 0<=n&&t.splice(n,1),n}function V(t,n){var r=[],o=[];if(n){if(j(n))throw u("cpta","Can't copy! TypedArray destination cannot be mutated.");if(t===n)throw u("cpi","Can't copy! Source and destination are identical.");return pt(n)?n.length=0:ot(n,function(t,e){"$$hashKey"!==e&&delete n[e]}),r.push(t),o.push(n),a(t,n)}return s(t);function a(t,e){var n,i=e.$$hashKey;if(pt(t))for(var r=0,o=t.length;r<o;r++)e.push(s(t[r]));else if(y(t))for(n in t)e[n]=s(t[n]);else if(t&&"function"==typeof t.hasOwnProperty)for(n in t)t.hasOwnProperty(n)&&(e[n]=s(t[n]));else for(n in t)R.call(t,n)&&(e[n]=s(t[n]));return f(e,i),e}function s(t){if(!dt(t))return t;var e=r.indexOf(t);if(-1!==e)return o[e];if(D(t)||mt(t))throw u("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var n,i=!1;return pt(t)?(n=[],i=!0):j(t)?n=new t.constructor(t):$(t)?n=new Date(t.getTime()):O(t)?(n=new RegExp(t.source,t.toString().match(/[^\/]*$/)[0])).lastIndex=t.lastIndex:E(t)?n=new t.constructor([t],{type:t.type}):gt(t.cloneNode)?n=t.cloneNode(!0):(n=Object.create(c(t)),i=!0),r.push(t),o.push(n),i?a(t,n):n}}function W(t,e){if(pt(t)){e=e||[];for(var n=0,i=t.length;n<i;n++)e[n]=t[n]}else if(dt(t))for(var r in e=e||{},t)"$"===r.charAt(0)&&"$"===r.charAt(1)||(e[r]=t[r]);return e||t}function _t(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!=t&&e!=e)return!0;var n,i,r,o=typeof t;if(o==typeof e&&"object"==o){if(!pt(t)){if($(t))return!!$(e)&&_t(t.getTime(),e.getTime());if(O(t))return!!O(e)&&t.toString()==e.toString();if(mt(t)||mt(e)||D(t)||D(e)||pt(e)||$(e)||O(e))return!1;for(i in r=Ut(),t)if("$"!==i.charAt(0)&&!gt(t[i])){if(!_t(t[i],e[i]))return!1;r[i]=!0}for(i in e)if(!(i in r)&&"$"!==i.charAt(0)&&ht(e[i])&&!gt(e[i]))return!1;return!0}if(!pt(e))return!1;if((n=t.length)==e.length){for(i=0;i<n;i++)if(!_t(t[i],e[i]))return!1;return!0}}return!1}var q=function(){if(!ht(q.rules)){var t=et.querySelector("[ng-csp]")||et.querySelector("[data-ng-csp]");if(t){var e=t.getAttribute("ng-csp")||t.getAttribute("data-ng-csp");q.rules={noUnsafeEval:!e||-1!==e.indexOf("no-unsafe-eval"),noInlineStyle:!e||-1!==e.indexOf("no-inline-style")}}else q.rules={noUnsafeEval:n(),noInlineStyle:!1}}return q.rules;function n(){try{return new Function(""),!1}catch(t){return!0}}},U=function(){if(ht(U.name_))return U.name_;var t,e,n,i,r=Dt.length;for(e=0;e<r;++e)if(n=Dt[e],t=et.querySelector("["+n.replace(":","\\:")+"jq]")){i=t.getAttribute(n+"jq");break}return U.name_=i};function J(t,e,n){return t.concat(s.call(e,n))}function wt(t,e){return s.call(t,e||0)}function G(t,e){var n=2<arguments.length?wt(arguments,2):[];return!gt(e)||e instanceof RegExp?e:n.length?function(){return arguments.length?e.apply(t,J(n,arguments,0)):e.apply(t,n)}:function(){return arguments.length?e.apply(t,arguments):e.call(t)}}function Y(t,e){var n=e;return"string"==typeof t&&"$"===t.charAt(0)&&"$"===t.charAt(1)?n=nt:D(e)?n="$WINDOW":e&&et===e?n="$DOCUMENT":mt(e)&&(n="$SCOPE"),n}function X(t,e){return ut(t)?nt:(b(e)||(e=e?2:null),JSON.stringify(t,Y,e))}function K(t){return ft(t)?JSON.parse(t):t}var Q=/:/g;function Z(t,e){t=t.replace(Q,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function tt(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}function St(t,e,n){n=n?-1:1;var i=t.getTimezoneOffset();return tt(t,n*(Z(e,i)-i))}function Ct(t){t=rt(t).clone();try{t.empty()}catch(t){}var e=rt("<div>").append(t).html();try{return t[0].nodeType===Yt?N(e):e.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(t,e){return"<"+N(e)})}catch(t){return N(e)}}function Tt(t){try{return decodeURIComponent(t)}catch(t){}}function $t(t){var r={};return ot((t||"").split("&"),function(t){var e,n,i;t&&(n=t=t.replace(/\+/g,"%20"),-1!==(e=t.indexOf("="))&&(n=t.substring(0,e),i=t.substring(e+1)),ht(n=Tt(n))&&(i=!ht(i)||Tt(i),R.call(r,n)?pt(r[n])?r[n].push(i):r[n]=[r[n],i]:r[n]=i))}),r}function kt(t){var n=[];return ot(t,function(t,e){pt(t)?ot(t,function(t){n.push(Ot(e,!0)+(!0===t?"":"="+Ot(t,!0)))}):n.push(Ot(e,!0)+(!0===t?"":"="+Ot(t,!0)))}),n.length?n.join("&"):""}function At(t){return Ot(t,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Ot(t,e){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,e?"%20":"+")}var Dt=["ng-","data-ng-","ng:","x-ng-"];function Pt(t,e){var n,i,r=Dt.length;for(i=0;i<r;++i)if(n=Dt[i]+e,ft(n=t.getAttribute(n)))return n;return null}function Mt(i,t){var r,o,e={};ot(Dt,function(t){var e=t+"app";!r&&i.hasAttribute&&i.hasAttribute(e)&&(o=(r=i).getAttribute(e))}),ot(Dt,function(t){var e,n=t+"app";!r&&(e=i.querySelector("["+n.replace(":","\\:")+"]"))&&(o=(r=e).getAttribute(n))}),r&&(e.strictDi=null!==Pt(r,"strict-di"),t(r,o?[o]:[],e))}function Et(n,i,r){dt(r)||(r={}),r=at({strictDi:!1},r);var e=function(){if((n=rt(n)).injector()){var t=n[0]===et?"document":Ct(n);throw u("btstrpd","App already bootstrapped with this element '{0}'",t.replace(/</,"&lt;").replace(/>/,"&gt;"))}(i=i||[]).unshift(["$provide",function(t){t.value("$rootElement",n)}]),r.debugInfoEnabled&&i.push(["$compileProvider",function(t){t.debugInfoEnabled(!0)}]),i.unshift("ng");var e=cn(i,r.strictDi);return e.invoke(["$rootScope","$rootElement","$compile","$injector",function(t,e,n,i){t.$apply(function(){e.data("$injector",i),n(e)(t)})}]),e},t=/^NG_ENABLE_DEBUG_INFO!/,o=/^NG_DEFER_BOOTSTRAP!/;if(a&&t.test(a.name)&&(r.debugInfoEnabled=!0,a.name=a.name.replace(t,"")),a&&!o.test(a.name))return e();a.name=a.name.replace(o,""),A.resumeBootstrap=function(t){return ot(t,function(t){i.push(t)}),e()},gt(A.resumeDeferredBootstrap)&&A.resumeDeferredBootstrap()}function It(){a.name="NG_ENABLE_DEBUG_INFO!"+a.name,a.location.reload()}function Nt(t){var e=A.element(t).injector();if(!e)throw u("test","no injector found for element argument to getTestability");return e.get("$$testability")}var Rt=/[A-Z]/g;function Lt(t,n){return n=n||"_",t.replace(Rt,function(t,e){return(e?n:"")+t.toLowerCase()})}var Ht,jt=!1;function Ft(){var r;if(!jt){var t=U();(_=ut(t)?a.jQuery:t?a[t]:nt)&&_.fn.on?(at((rt=_).fn,{scope:Be.scope,isolateScope:Be.isolateScope,controller:Be.controller,injector:Be.injector,inheritedData:Be.inheritedData}),r=_.cleanData,_.cleanData=function(t){var e;if(Ht)Ht=!1;else for(var n,i=0;null!=(n=t[i]);i++)(e=_._data(n,"events"))&&e.$destroy&&_(n).triggerHandler("$destroy");r(t)}):rt=$e,A.element=rt,jt=!0}}function zt(t,e,n){if(!t)throw u("areq","Argument '{0}' is {1}",e||"?",n||"required");return t}function Bt(t,e,n){return n&&pt(t)&&(t=t[t.length-1]),zt(gt(t),e,"not a function, got "+(t&&"object"==typeof t?t.constructor.name||"Object":typeof t)),t}function Vt(t,e){if("hasOwnProperty"===t)throw u("badname","hasOwnProperty is not a valid {0} name",e)}function Wt(t,e,n){if(!e)return t;for(var i,r=e.split("."),o=t,a=r.length,s=0;s<a;s++)i=r[s],t&&(t=(o=t)[i]);return!n&&gt(t)?G(o,t):t}function qt(t){for(var e,n=t[0],i=t[t.length-1],r=1;n!==i&&(n=n.nextSibling);r++)(e||t[r]!==n)&&(e||(e=rt(s.call(t,0,r))),e.push(n));return e||t}function Ut(){return Object.create(null)}var Jt=1,Gt=2,Yt=3,Xt=8,Kt=9,Qt=11;function Zt(t){var u=w("$injector"),n=w("ng");function e(t,e,n){return t[e]||(t[e]=n())}var i=e(t,"angular",Object);return i.$$minErr=i.$$minErr||w,e(i,"module",function(){var t={};return function(s,l,c){return function(t,e){if("hasOwnProperty"===t)throw n("badname","hasOwnProperty is not a valid {0} name",e)}(s,"module"),l&&t.hasOwnProperty(s)&&(t[s]=null),e(t,s,function(){if(!l)throw u("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.",s);var r=[],t=[],e=[],n=i("$injector","invoke","push",t),o={_invokeQueue:r,_configBlocks:t,_runBlocks:e,requires:l,name:s,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),value:i("$provide","value"),constant:i("$provide","constant","unshift"),decorator:a("$provide","decorator"),animation:a("$animateProvider","register"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:n,run:function(t){return e.push(t),this}};return c&&n(c),o;function i(t,e,n,i){return i||(i=r),function(){return i[n||"push"]([t,e,arguments]),o}}function a(n,i){return function(t,e){return e&&gt(e)&&(e.$$moduleName=s),r.push([n,i,arguments]),o}}})}})}function te(t){var n=[];return JSON.stringify(t,function(t,e){if(dt(e=Y(t,e))){if(0<=n.indexOf(e))return"...";n.push(e)}return e})}function ee(t){return"function"==typeof t?t.toString().replace(/ \{[\s\S]*$/,""):ut(t)?"undefined":"string"!=typeof t?te(t):t}var ne={full:"1.4.14",major:1,minor:4,dot:14,codeName:"material-distinction"};function ie(t){at(t,{bootstrap:Et,copy:V,extend:at,merge:g,equals:_t,element:rt,forEach:ot,injector:cn,noop:lt,bind:G,toJson:X,fromJson:K,identity:ct,isUndefined:ut,isDefined:ht,isString:ft,isFunction:gt,isObject:dt,isNumber:b,isElement:z,isArray:pt,version:ne,isDate:$,lowercase:N,uppercase:S,callbacks:{counter:0},getTestability:Nt,$$minErr:w,$$csp:q,reloadWithDebugInfo:It}),(x=Zt(a))("ng",["ngLocale"],["$provide",function(t){t.provider({$$sanitizeUri:cr}),t.provider("$compile",On).directive({a:ao,input:zo,textarea:zo,form:po,script:Ra,select:Fa,style:Ba,option:za,ngBind:Wo,ngBindHtml:Uo,ngBindTemplate:qo,ngClass:Yo,ngClassEven:Ko,ngClassOdd:Xo,ngCloak:Qo,ngController:Zo,ngForm:go,ngHide:Da,ngIf:na,ngInclude:ia,ngInit:oa,ngNonBindable:_a,ngPluralize:Ta,ngRepeat:$a,ngShow:Oa,ngStyle:Pa,ngSwitch:Ma,ngSwitchWhen:Ea,ngSwitchDefault:Ia,ngOptions:Ca,ngTransclude:Na,ngModel:ma,ngList:aa,ngChange:Jo,pattern:Wa,ngPattern:Wa,required:Va,ngRequired:Va,minlength:Ua,ngMinlength:Ua,maxlength:qa,ngMaxlength:qa,ngValue:Vo,ngModelOptions:ya}).directive({ngInclude:ra}).directive(so).directive(ta),t.provider({$anchorScroll:un,$animate:xn,$animateCss:Sn,$$animateJs:yn,$$animateQueue:bn,$$AnimateRunner:wn,$$animateAsyncRun:_n,$browser:Tn,$cacheFactory:$n,$controller:Ln,$document:Hn,$exceptionHandler:jn,$filter:kr,$$forceReflow:Fn,$interpolate:li,$interval:ci,$http:ii,$httpParamSerializer:Yn,$httpParamSerializerJQLike:Xn,$httpBackend:oi,$xhrFactory:ri,$location:ki,$log:Ai,$parse:ir,$rootScope:lr,$q:rr,$$q:or,$sce:gr,$sceDelegate:pr,$sniffer:mr,$templateCache:kn,$templateRequest:vr,$$testability:yr,$timeout:br,$window:Cr,$$rAF:sr,$$jqLite:Ke,$$HashMap:tn,$$cookieReader:$r})}])}$e.expando="ng339";var re=$e.cache={},oe=1,ae=function(t,e,n){t.addEventListener(e,n,!1)},se=function(t,e,n){t.removeEventListener(e,n,!1)};function le(){return++oe}$e._data=function(t){return this.cache[t[this.expando]]||{}};var ce=/([\:\-\_]+(.))/g,ue=/^moz([A-Z])/,he={mouseleave:"mouseout",mouseenter:"mouseover"},de=w("jqLite");function fe(t){return t.replace(ce,function(t,e,n,i){return i?n.toUpperCase():n}).replace(ue,"Moz$1")}var pe=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,ge=/<|&#?\w+;/,me=/<([\w:-]+)/,ve=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ye={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,"",""]};function be(t){return!ge.test(t)}function xe(t){var e=t.nodeType;return e===Jt||!e||e===Kt}function _e(t){for(var e in re[t.ng339])return!0;return!1}function we(t,e){var n,i,r,o,a=e.createDocumentFragment(),s=[];if(be(t))s.push(e.createTextNode(t));else{for(n=n||a.appendChild(e.createElement("div")),i=(me.exec(t)||["",""])[1].toLowerCase(),r=ye[i]||ye._default,n.innerHTML=r[1]+t.replace(ve,"<$1></$2>")+r[2],o=r[0];o--;)n=n.lastChild;s=J(s,n.childNodes),(n=a.firstChild).textContent=""}return a.textContent="",a.innerHTML="",ot(s,function(t){a.appendChild(t)}),a}function Se(t,e){var n;return e=e||et,(n=pe.exec(t))?[e.createElement(n[1])]:(n=we(t,e))?n.childNodes:[]}function Ce(t,e){var n=t.parentNode;n&&n.replaceChild(e,t),e.appendChild(t)}ye.optgroup=ye.option,ye.tbody=ye.tfoot=ye.colgroup=ye.caption=ye.thead,ye.th=ye.td;var Te=Node.prototype.contains||function(t){return!!(16&this.compareDocumentPosition(t))};function $e(t){if(t instanceof $e)return t;var e;if(ft(t)&&(t=yt(t),e=!0),!(this instanceof $e)){if(e&&"<"!=t.charAt(0))throw de("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new $e(t)}Re(this,e?Se(t):t)}function ke(t){return t.cloneNode(!0)}function Ae(t,e){if(e||De(t),t.querySelectorAll)for(var n=t.querySelectorAll("*"),i=0,r=n.length;i<r;i++)De(n[i])}function Oe(n,t,i,e){if(ht(e))throw de("offargs","jqLite#off() does not support the `selector` argument");var r=Pe(n),o=r&&r.events,a=r&&r.handle;if(a)if(t){var s=function(t){var e=o[t];ht(i)&&xt(e||[],i),ht(i)&&e&&0<e.length||(se(n,t,a),delete o[t])};ot(t.split(" "),function(t){s(t),he[t]&&s(he[t])})}else for(t in o)"$destroy"!==t&&se(n,t,a),delete o[t]}function De(t,e){var n=t.ng339,i=n&&re[n];if(i){if(e)return void delete i.data[e];i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),Oe(t)),delete re[n],t.ng339=nt}}function Pe(t,e){var n=t.ng339,i=n&&re[n];return e&&!i&&(t.ng339=n=le(),i=re[n]={events:{},data:{},handle:nt}),i}function Me(t,e,n){if(xe(t)){var i=ht(n),r=!i&&e&&!dt(e),o=!e,a=Pe(t,!r),s=a&&a.data;if(i)s[e]=n;else{if(o)return s;if(r)return s&&s[e];at(s,e)}}}function Ee(t,e){return!!t.getAttribute&&-1<(" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+e+" ")}function Ie(e,t){t&&e.setAttribute&&ot(t.split(" "),function(t){e.setAttribute("class",yt((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+yt(t)+" "," ")))})}function Ne(t,e){if(e&&t.setAttribute){var n=(" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");ot(e.split(" "),function(t){t=yt(t),-1===n.indexOf(" "+t+" ")&&(n+=t+" ")}),t.setAttribute("class",yt(n))}}function Re(t,e){if(e)if(e.nodeType)t[t.length++]=e;else{var n=e.length;if("number"==typeof n&&e.window!==e){if(n)for(var i=0;i<n;i++)t[t.length++]=e[i]}else t[t.length++]=e}}function Le(t,e){return He(t,"$"+(e||"ngController")+"Controller")}function He(t,e,n){t.nodeType==Kt&&(t=t.documentElement);for(var i=pt(e)?e:[e];t;){for(var r=0,o=i.length;r<o;r++)if(ht(n=rt.data(t,i[r])))return n;t=t.parentNode||t.nodeType===Qt&&t.host}}function je(t){for(Ae(t,!0);t.firstChild;)t.removeChild(t.firstChild)}function Fe(t,e){e||Ae(t);var n=t.parentNode;n&&n.removeChild(t)}function ze(t,e){"complete"===(e=e||a).document.readyState?e.setTimeout(t):rt(e).on("load",t)}var Be=$e.prototype={ready:function(t){var e=!1;function n(){e||(e=!0,t())}"complete"===et.readyState?setTimeout(n):(this.on("DOMContentLoaded",n),$e(a).on("load",n))},toString:function(){var e=[];return ot(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(t){return rt(0<=t?this[t]:this[this.length+t])},length:0,push:i,sort:[].sort,splice:[].splice},Ve={};ot("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(t){Ve[N(t)]=t});var We={};ot("input,select,option,textarea,button,form,details".split(","),function(t){We[t]=!0});var qe={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};function Ue(t,e){var n=Ve[e.toLowerCase()];return n&&We[bt(t)]&&n}function Je(t){return qe[t]}function Ge(s,l){var t=function(t,e){t.isDefaultPrevented=function(){return t.defaultPrevented};var n=l[e||t.type],i=n?n.length:0;if(i){if(ut(t.immediatePropagationStopped)){var r=t.stopImmediatePropagation;t.stopImmediatePropagation=function(){t.immediatePropagationStopped=!0,t.stopPropagation&&t.stopPropagation(),r&&r.call(t)}}t.isImmediatePropagationStopped=function(){return!0===t.immediatePropagationStopped};var o=n.specialHandlerWrapper||Ye;1<i&&(n=W(n));for(var a=0;a<i;a++)t.isImmediatePropagationStopped()||o(s,t,n[a])}};return t.elem=s,t}function Ye(t,e,n){n.call(t,e)}function Xe(t,e,n){var i=e.relatedTarget;i&&(i===t||Te.call(t,i))||n.call(t,e)}function Ke(){this.$get=function(){return at($e,{hasClass:function(t,e){return t.attr&&(t=t[0]),Ee(t,e)},addClass:function(t,e){return t.attr&&(t=t[0]),Ne(t,e)},removeClass:function(t,e){return t.attr&&(t=t[0]),Ie(t,e)}})}}function Qe(t,e){var n=t&&t.$$hashKey;if(n)return"function"==typeof n&&(n=t.$$hashKey()),n;var i=typeof t;return n="function"==i||"object"==i&&null!==t?t.$$hashKey=i+":"+(e||k)():i+":"+t}function Ze(t,e){if(e){var n=0;this.nextUid=function(){return++n}}ot(t,this.put,this)}ot({data:Me,removeData:De,hasData:_e},function(t,e){$e[e]=t}),ot({data:Me,inheritedData:He,scope:function(t){return rt.data(t,"$scope")||He(t.parentNode||t,["$isolateScope","$scope"])},isolateScope:function(t){return rt.data(t,"$isolateScope")||rt.data(t,"$isolateScopeNoTemplate")},controller:Le,injector:function(t){return He(t,"$injector")},removeAttr:function(t,e){t.removeAttribute(e)},hasClass:Ee,css:function(t,e,n){if(e=fe(e),!ht(n))return t.style[e];t.style[e]=n},attr:function(t,e,n){var i=t.nodeType;if(i!==Yt&&i!==Gt&&i!==Xt){var r=N(e);if(Ve[r]){if(!ht(n))return t[e]||(t.attributes.getNamedItem(e)||lt).specified?r:nt;n?(t[e]=!0,t.setAttribute(e,r)):(t[e]=!1,t.removeAttribute(r))}else if(ht(n))t.setAttribute(e,n);else if(t.getAttribute){var o=t.getAttribute(e,2);return null===o?nt:o}}},prop:function(t,e,n){if(!ht(n))return t[e];t[e]=n},text:function(){return t.$dv="",t;function t(t,e){if(ut(e)){var n=t.nodeType;return n===Jt||n===Yt?t.textContent:""}t.textContent=e}}(),val:function(t,e){if(ut(e)){if(t.multiple&&"select"===bt(t)){var n=[];return ot(t.options,function(t){t.selected&&n.push(t.value||t.text)}),0===n.length?null:n}return t.value}t.value=e},html:function(t,e){if(ut(e))return t.innerHTML;Ae(t,!0),t.innerHTML=e},empty:je},function(c,t){$e.prototype[t]=function(t,e){var n,i,r=this.length;if(c!==je&&ut(2==c.length&&c!==Ee&&c!==Le?t:e)){if(dt(t)){for(n=0;n<r;n++)if(c===Me)c(this[n],t);else for(i in t)c(this[n],i,t[i]);return this}for(var o=c.$dv,a=ut(o)?Math.min(r,1):r,s=0;s<a;s++){var l=c(this[s],t,e);o=o?o+l:l}return o}for(n=0;n<r;n++)c(this[n],t,e);return this}}),ot({removeData:De,on:function(r,t,o,e){if(ht(e))throw de("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(xe(r)){var n=Pe(r,!0),a=n.events,s=n.handle;s||(s=n.handle=Ge(r,a));for(var i=0<=t.indexOf(" ")?t.split(" "):[t],l=i.length,c=function(t,e,n){var i=a[t];i||((i=a[t]=[]).specialHandlerWrapper=e,"$destroy"===t||n||ae(r,t,s)),i.push(o)};l--;)t=i[l],he[t]?(c(he[t],Xe),c(t,nt,!0)):c(t)}},off:Oe,one:function(e,n,i){(e=rt(e)).on(n,function t(){e.off(n,i),e.off(n,t)}),e.on(n,i)},replaceWith:function(e,t){var n,i=e.parentNode;Ae(e),ot(new $e(t),function(t){n?i.insertBefore(t,n.nextSibling):i.replaceChild(t,e),n=t})},children:function(t){var e=[];return ot(t.childNodes,function(t){t.nodeType===Jt&&e.push(t)}),e},contents:function(t){return t.contentDocument||t.childNodes||[]},append:function(t,e){var n=t.nodeType;if(n===Jt||n===Qt)for(var i=0,r=(e=new $e(e)).length;i<r;i++){var o=e[i];t.appendChild(o)}},prepend:function(e,t){if(e.nodeType===Jt){var n=e.firstChild;ot(new $e(t),function(t){e.insertBefore(t,n)})}},wrap:function(t,e){Ce(t,rt(e).eq(0).clone()[0])},remove:Fe,detach:function(t){Fe(t,!0)},after:function(t,e){for(var n=t,i=t.parentNode,r=0,o=(e=new $e(e)).length;r<o;r++){var a=e[r];i.insertBefore(a,n.nextSibling),n=a}},addClass:Ne,removeClass:Ie,toggleClass:function(n,t,i){t&&ot(t.split(" "),function(t){var e=i;ut(e)&&(e=!Ee(n,t)),(e?Ne:Ie)(n,t)})},parent:function(t){var e=t.parentNode;return e&&e.nodeType!==Qt?e:null},next:function(t){return t.nextElementSibling},find:function(t,e){return t.getElementsByTagName?t.getElementsByTagName(e):[]},clone:ke,triggerHandler:function(e,t,n){var i,r,o,a=t.type||t,s=Pe(e),l=s&&s.events,c=l&&l[a];c&&(i={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:lt,type:a,target:e},t.type&&(i=at(i,t)),r=W(c),o=n?[i].concat(n):[i],ot(r,function(t){i.isImmediatePropagationStopped()||t.apply(e,o)}))}},function(a,t){$e.prototype[t]=function(t,e,n){for(var i,r=0,o=this.length;r<o;r++)ut(i)?ht(i=a(this[r],t,e,n))&&(i=rt(i)):Re(i,a(this[r],t,e,n));return ht(i)?i:this},$e.prototype.bind=$e.prototype.on,$e.prototype.unbind=$e.prototype.off}),Ze.prototype={put:function(t,e){this[Qe(t,this.nextUid)]=e},get:function(t){return this[Qe(t,this.nextUid)]},remove:function(t){var e=this[t=Qe(t,this.nextUid)];return delete this[t],e}};var tn=[function(){this.$get=[function(){return Ze}]}],en=/^[^\(]*\(\s*([^\)]*)\)/m,nn=/,/,rn=/^\s*(_?)(\S+?)\1\s*$/,on=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,an=w("$injector");function sn(t){var e=t.toString().replace(on,"").match(en);return e?"function("+(e[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function ln(t,e,n){var i,r;if("function"==typeof t){if(!(i=t.$inject)){if(i=[],t.length){if(e)throw ft(n)&&n||(n=t.name||sn(t)),an("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);ot(t.toString().replace(on,"").match(en)[1].split(nn),function(t){t.replace(rn,function(t,e,n){i.push(n)})})}t.$inject=i}}else pt(t)?(Bt(t[r=t.length-1],"fn"),i=t.slice(0,r)):Bt(t,"fn",!0);return i}function cn(t,u){u=!0===u;var r={},a="Provider",s=[],o=new Ze([],!0),l={$provide:{provider:e(i),factory:e(f),service:e(p),value:e(g),constant:e(m),decorator:v}},c=l.$injector=b(l,function(t,e){throw A.isString(e)&&s.push(e),an("unpr","Unknown provider: {0}",s.join(" <- "))}),n={},h=n.$injector=b(n,function(t,e){var n=c.get(t+a,e);return h.invoke(n.$get,n,nt,t)});return ot(y(t),function(t){t&&h.invoke(t)}),h;function e(n){return function(t,e){if(!dt(t))return n(t,e);ot(t,C(n))}}function i(t,e){if(Vt(t,"service"),(gt(e)||pt(e))&&(e=c.instantiate(e)),!e.$get)throw an("pget","Provider '{0}' must define $get factory method.",t);return l[t+a]=e}function d(e,n){return function(){var t=h.invoke(n,this);if(ut(t))throw an("undef","Provider '{0}' must return a value from $get factory method.",e);return t}}function f(t,e,n){return i(t,{$get:!1!==n?d(t,e):e})}function p(t,e){return f(t,["$injector",function(t){return t.instantiate(e)}])}function g(t,e){return f(t,T(e),!1)}function m(t,e){Vt(t,"constant"),l[t]=e,n[t]=e}function v(t,e){var n=c.get(t+a),i=n.$get;n.$get=function(){var t=h.invoke(i,n);return h.invoke(e,null,{$delegate:t})}}function y(t){zt(ut(t)||pt(t),"modulesToLoad","not an array");var n,i=[];return ot(t,function(e){if(!o.get(e)){o.put(e,!0);try{ft(e)?(n=x(e),i=i.concat(y(n.requires)).concat(n._runBlocks),t(n._invokeQueue),t(n._configBlocks)):gt(e)?i.push(c.invoke(e)):pt(e)?i.push(c.invoke(e)):Bt(e,"module")}catch(t){throw pt(e)&&(e=e[e.length-1]),t.message&&t.stack&&-1==t.stack.indexOf(t.message)&&(t=t.message+"\n"+t.stack),an("modulerr","Failed to instantiate module {0} due to:\n{1}",e,t.stack||t.message||t)}}function t(t){var e,n;for(e=0,n=t.length;e<n;e++){var i=t[e],r=c.get(i[0]);r[i[1]].apply(r,i[2])}}}),i}function b(n,i){function c(e,t){if(n.hasOwnProperty(e)){if(n[e]===r)throw an("cdep","Circular dependency found: {0}",e+" <- "+s.join(" <- "));return n[e]}try{return s.unshift(e),n[e]=r,n[e]=i(e,t)}catch(t){throw n[e]===r&&delete n[e],t}finally{s.shift()}}function o(t,e,n,i){"string"==typeof n&&(i=n,n=null);var r,o,a,s=[],l=cn.$$annotate(t,u,i);for(o=0,r=l.length;o<r;o++){if("string"!=typeof(a=l[o]))throw an("itkn","Incorrect injection token! Expected service name as string, got {0}",a);s.push(n&&n.hasOwnProperty(a)?n[a]:c(a,i))}return pt(t)&&(t=t[r]),t.apply(e,s)}function t(t,e,n){var i=Object.create((pt(t)?t[t.length-1]:t).prototype||null),r=o(t,i,e,n);return dt(r)||gt(r)?r:i}return{invoke:o,instantiate:t,get:c,annotate:cn.$$annotate,has:function(t){return l.hasOwnProperty(t+a)||n.hasOwnProperty(t)}}}}function un(){var t=!0;this.disableAutoScrolling=function(){t=!1},this.$get=["$window","$location","$rootScope",function(i,n,r){var o=i.document;function a(t){var e=null;return Array.prototype.some.call(t,function(t){if("a"===bt(t))return e=t,!0}),e}function s(){var t=c.yOffset;if(gt(t))t=t();else if(z(t)){var e=t[0];t="fixed"!==i.getComputedStyle(e).position?0:e.getBoundingClientRect().bottom}else b(t)||(t=0);return t}function l(t){if(t){t.scrollIntoView();var e=s();if(e){var n=t.getBoundingClientRect().top;i.scrollBy(0,n-e)}}else i.scrollTo(0,0)}function c(t){var e;(t=ft(t)?t:n.hash())?(e=o.getElementById(t))?l(e):(e=a(o.getElementsByName(t)))?l(e):"top"===t&&l(null):l(null)}return t&&r.$watch(function(){return n.hash()},function(t,e){t===e&&""===t||ze(function(){r.$evalAsync(c)})}),c}]}cn.$$annotate=ln;var hn=w("$animate"),dn=1,fn="ng-animate";function pn(t,e){return t||e?t?e?(pt(t)&&(t=t.join(" ")),pt(e)&&(e=e.join(" ")),t+" "+e):t:e:""}function gn(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.nodeType===dn)return n}}function mn(t){ft(t)&&(t=t.split(" "));var e=Ut();return ot(t,function(t){t.length&&(e[t]=!0)}),e}function vn(t){return dt(t)?t:{}}var yn=function(){this.$get=function(){}},bn=function(){var u=new Ze,h=[];this.$get=["$$AnimateRunner","$rootScope",function(o,a){return{enabled:lt,on:lt,off:lt,pin:lt,push:function(t,e,n,i){i&&i(),(n=n||{}).from&&t.css(n.from),n.to&&t.css(n.to),(n.addClass||n.removeClass)&&c(t,n.addClass,n.removeClass);var r=new o;return r.complete(),r}};function s(e,t,n){var i=!1;return t&&ot(t=ft(t)?t.split(" "):pt(t)?t:[],function(t){t&&(i=!0,e[t]=n)}),i}function l(){ot(h,function(t){var e=u.get(t);if(e){var n=mn(t.attr("class")),i="",r="";ot(e,function(t,e){t!==!!n[e]&&(t?i+=(i.length?" ":"")+e:r+=(r.length?" ":"")+e)}),ot(t,function(t){i&&Ne(t,i),r&&Ie(t,r)}),u.remove(t)}}),h.length=0}function c(t,e,n){var i=u.get(t)||{},r=s(i,e,!0),o=s(i,n,!1);(r||o)&&(u.put(t,i),h.push(t),1===h.length&&a.$$postDigest(l))}}]},xn=["$provide",function(i){var r=this;this.$$registeredAnimations=Object.create(null),this.register=function(t,e){if(t&&"."!==t.charAt(0))throw hn("notcsel","Expecting class selector starting with '.' got '{0}'.",t);var n=t+"-animation";r.$$registeredAnimations[t.substr(1)]=n,i.factory(n,e)},this.classNameFilter=function(t){if(1===arguments.length&&(this.$$classNameFilter=t instanceof RegExp?t:null,this.$$classNameFilter&&new RegExp("(\\s+|\\/)"+fn+"(\\s+|\\/)").test(this.$$classNameFilter.toString())))throw hn("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',fn);return this.$$classNameFilter},this.$get=["$$animateQueue",function(o){function r(t,e,n){if(n){var i=gn(n);!i||i.parentNode||i.previousElementSibling||(n=null)}n?n.after(t):e.prepend(t)}return{on:o.on,off:o.off,pin:o.pin,enabled:o.enabled,cancel:function(t){t.end&&t.end()},enter:function(t,e,n,i){return e=e&&rt(e),n=n&&rt(n),r(t,e=e||n.parent(),n),o.push(t,"enter",vn(i))},move:function(t,e,n,i){return e=e&&rt(e),n=n&&rt(n),r(t,e=e||n.parent(),n),o.push(t,"move",vn(i))},leave:function(t,e){return o.push(t,"leave",vn(e),function(){t.remove()})},addClass:function(t,e,n){return(n=vn(n)).addClass=pn(n.addclass,e),o.push(t,"addClass",n)},removeClass:function(t,e,n){return(n=vn(n)).removeClass=pn(n.removeClass,e),o.push(t,"removeClass",n)},setClass:function(t,e,n,i){return(i=vn(i)).addClass=pn(i.addClass,e),i.removeClass=pn(i.removeClass,n),o.push(t,"setClass",i)},animate:function(t,e,n,i,r){return(r=vn(r)).from=r.from?at(r.from,e):e,r.to=r.to?at(r.to,n):n,i=i||"ng-inline-animate",r.tempClasses=pn(r.tempClasses,i),o.push(t,"animate",r)}}}]}],_n=function(){this.$get=["$$rAF",function(e){var n=[];function i(t){n.push(t),1<n.length||e(function(){for(var t=0;t<n.length;t++)n[t]();n=[]})}return function(){var e=!1;return i(function(){e=!0}),function(t){e?t():i(t)}}}]},wn=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$document","$timeout",function(e,t,r,o,a){var n=0,i=1,s=2;function l(t){this.setHost(t);var n=r(),i=function(t){a(t,0,!1)};this._doneCallbacks=[],this._tick=function(t){var e=o[0];e&&e.hidden?i(t):n(t)},this._state=0}return l.chain=function(t,e){var n=0;function i(){n!==t.length?t[n](function(t){!1!==t?(n++,i()):e(!1)}):e(!0)}i()},l.all=function(e,n){var i=0,r=!0;function o(t){r=r&&t,++i===e.length&&n(r)}ot(e,function(t){t.done(o)})},l.prototype={setHost:function(t){this.host=t||{}},done:function(t){this._state===s?t():this._doneCallbacks.push(t)},progress:lt,getPromise:function(){if(!this.promise){var t=this;this.promise=e(function(e,n){t.done(function(t){!1===t?n():e()})})}return this.promise},then:function(t,e){return this.getPromise().then(t,e)},catch:function(t){return this.getPromise().catch(t)},finally:function(t){return this.getPromise().finally(t)},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(t){var e=this;e._state===n&&(e._state=i,e._tick(function(){e._resolve(t)}))},_resolve:function(e){this._state!==s&&(ot(this._doneCallbacks,function(t){t(e)}),this._doneCallbacks.length=0,this._state=s)}},l}]},Sn=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(s,t,l){return function(t,e){var n=e||{};n.$$prepared||(n=V(n)),n.cleanupStyles&&(n.from=n.to=null),n.from&&(t.css(n.from),n.from=null);var i,r=new l;return{start:o,end:o};function o(){return s(function(){a(),i||r.complete(),i=!0}),r}function a(){n.addClass&&(t.addClass(n.addClass),n.addClass=null),n.removeClass&&(t.removeClass(n.removeClass),n.removeClass=null),n.to&&(t.css(n.to),n.to=null)}}}]};function Cn(o,t,e,a){var s=this,l=(t[0],o.location),c=o.history,i=o.setTimeout,n=o.clearTimeout,r={};s.isMock=!1;var u=0,h=[];function d(t){try{t.apply(null,wt(arguments,1))}finally{if(0===--u)for(;h.length;)try{h.pop()()}catch(t){e.error(t)}}}function f(t){var e=t.indexOf("#");return-1===e?"":t.substr(e)}s.$$completeOutstandingRequest=d,s.$$incOutstandingRequestCount=function(){u++},s.notifyWhenNoOutstandingRequests=function(t){0===u?t():h.push(t)};var p,g,m=l.href,v=t.find("base"),y=null;C(),g=p,s.url=function(t,e,n){if(ut(n)&&(n=null),l!==o.location&&(l=o.location),c!==o.history&&(c=o.history),t){var i=g===n;if(m===t&&(!a.history||i))return s;var r=m&&vi(m)===vi(t);return m=t,g=n,!a.history||r&&i?(r&&!y||(y=t),e?l.replace(t):r?l.hash=f(t):l.href=t,l.href!==t&&(y=t)):(c[e?"replaceState":"pushState"](n,"",t),C(),g=p),s}return y||l.href.replace(/%27/g,"'")},s.state=function(){return p};var b=[],x=!1;function _(){y=null,C(),T()}function w(){try{return c.state}catch(t){}}var S=null;function C(){_t(p=ut(p=w())?null:p,S)&&(p=S),S=p}function T(){m===s.url()&&g===p||(m=s.url(),g=p,ot(b,function(t){t(s.url(),p)}))}s.onUrlChange=function(t){return x||(a.history&&rt(o).on("popstate",_),rt(o).on("hashchange",_),x=!0),b.push(t),t},s.$$applicationDestroyed=function(){rt(o).off("hashchange popstate",_)},s.$$checkUrlChange=T,s.baseHref=function(){var t=v.attr("href");return t?t.replace(/^(https?\:)?\/\/[^\/]*/,""):""},s.defer=function(t,e){var n;return u++,n=i(function(){delete r[n],d(t)},e||0),r[n]=!0,n},s.defer.cancel=function(t){return!!r[t]&&(delete r[t],n(t),d(lt),!0)}}function Tn(){this.$get=["$window","$log","$sniffer","$document",function(t,e,n,i){return new Cn(t,i,e,n)}]}function $n(){this.$get=function(){var h={};function t(t,e){if(t in h)throw w("$cacheFactory")("iid","CacheId '{0}' is already taken!",t);var n=0,i=at({},e,{id:t}),r=Ut(),o=e&&e.capacity||Number.MAX_VALUE,a=Ut(),s=null,l=null;return h[t]={put:function(t,e){if(!ut(e)){if(o<Number.MAX_VALUE)c(a[t]||(a[t]={key:t}));return t in r||n++,r[t]=e,o<n&&this.remove(l.key),e}},get:function(t){if(o<Number.MAX_VALUE){var e=a[t];if(!e)return;c(e)}return r[t]},remove:function(t){if(o<Number.MAX_VALUE){var e=a[t];if(!e)return;e==s&&(s=e.p),e==l&&(l=e.n),u(e.n,e.p),delete a[t]}t in r&&(delete r[t],n--)},removeAll:function(){r=Ut(),n=0,a=Ut(),s=l=null},destroy:function(){a=i=r=null,delete h[t]},info:function(){return at({},i,{size:n})}};function c(t){t!=s&&(l?l==t&&(l=t.n):l=t,u(t.n,t.p),u(t,s),(s=t).n=null)}function u(t,e){t!=e&&(t&&(t.p=e),e&&(e.n=t))}}return t.info=function(){var n={};return ot(h,function(t,e){n[e]=t.info()}),n},t.get=function(t){return h[t]},t}}function kn(){this.$get=["$cacheFactory",function(t){return t("templates")}]}var An=w("$compile");function On(n,e){var p={},v="Directive",E=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,I=/(([\w\-]+)(?:\:([^;]+))?;?)/,h=B("ngSrc,ngSrcset,src,srcset"),tt=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,b=/^(on[a-z]+|formaction)$/,s=Ut();function o(t,i,r){var o=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,a=Ut();return ot(t,function(t,e){if(t in s)a[e]=s[t];else{var n=t.match(o);if(!n)throw An("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",i,e,t,r?"controller bindings definition":"isolate scope definition");a[e]={mode:n[1][0],collection:"*"===n[2],optional:"?"===n[3],attrName:n[4]||e},n[4]&&(s[t]=a[e])}}),a}function x(t,e){var n={isolateScope:null,bindToController:null};if(dt(t.scope)&&(!0===t.bindToController?(n.bindToController=o(t.scope,e,!0),n.isolateScope={}):n.isolateScope=o(t.scope,e,!1)),dt(t.bindToController)&&(n.bindToController=o(t.bindToController,e,!0)),dt(n.bindToController)){var i=t.controller,r=t.controllerAs;if(!i)throw An("noctrl","Cannot bind to controller without directive '{0}'s controller.",e);if(!Rn(i,r))throw An("noident","Cannot bind to controller without identifier for directive '{0}'.",e)}return n}function i(t){var e=t.charAt(0);if(!e||e!==N(e))throw An("baddir","Directive name '{0}' is invalid. The first character must be a lowercase letter",t);if(t!==t.trim())throw An("baddir","Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces",t)}this.directive=function t(a,e){return Vt(a,"directive"),ft(a)?(i(a),zt(e,"directiveFactory"),p.hasOwnProperty(a)||(p[a]=[],n.factory(a+v,["$injector","$exceptionHandler",function(i,r){var o=[];return ot(p[a],function(t,e){try{var n=i.invoke(t);gt(n)?n={compile:T(n)}:!n.compile&&n.link&&(n.compile=T(n.link)),n.priority=n.priority||0,n.index=e,n.name=n.name||a,n.require=n.require||n.controller&&n.name,n.restrict=n.restrict||"EA",n.$$moduleName=t.$$moduleName,o.push(n)}catch(t){r(t)}}),o}])),p[a].push(e)):ot(a,C(t)),this},this.aHrefSanitizationWhitelist=function(t){return ht(t)?(e.aHrefSanitizationWhitelist(t),this):e.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(t){return ht(t)?(e.imgSrcSanitizationWhitelist(t),this):e.imgSrcSanitizationWhitelist()};var a=!0;this.debugInfoEnabled=function(t){return ht(t)?(a=t,this):a},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(f,g,L,t,m,H,o,i,r,y){var j=function(t,e){if(e){var n,i,r,o=Object.keys(e);for(n=0,i=o.length;n<i;n++)this[r=o[n]]=e[r]}else this.$attr={};this.$$element=t};function A(t,e){try{t.addClass(e)}catch(t){}}j.prototype={$normalize:Pn,$addClass:function(t){t&&0<t.length&&r.addClass(this.$$element,t)},$removeClass:function(t){t&&0<t.length&&r.removeClass(this.$$element,t)},$updateClass:function(t,e){var n=Mn(t,e);n&&n.length&&r.addClass(this.$$element,n);var i=Mn(e,t);i&&i.length&&r.removeClass(this.$$element,i)},$set:function(t,e,n,i){var r,o=Ue(this.$$element[0],t),a=Je(t),s=t;if(o?(this.$$element.prop(t,e),i=o):a&&(this[a]=e,s=a),this[t]=e,i?this.$attr[t]=i:(i=this.$attr[t])||(this.$attr[t]=i=Lt(t,"-")),"a"===(r=bt(this.$$element))&&"href"===t||"img"===r&&"src"===t)this[t]=e=y(e,"src"===t);else if("img"===r&&"srcset"===t&&ht(e)){for(var l="",c=yt(e),u=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,h=/\s/.test(c)?u:/(,)/,d=c.split(h),f=Math.floor(d.length/2),p=0;p<f;p++){var g=2*p;l+=y(yt(d[g]),!0),l+=" "+yt(d[g+1])}var m=yt(d[2*p]).split(/\s/);l+=y(yt(m[0]),!0),2===m.length&&(l+=" "+yt(m[1])),this[t]=e=l}!1!==n&&(null===e||ut(e)?this.$$element.removeAttr(i):this.$$element.attr(i,e));var v=this.$$observers;v&&ot(v[s],function(t){try{t(e)}catch(t){L(t)}})},$observe:function(t,e){var n=this,i=n.$$observers||(n.$$observers=Ut()),r=i[t]||(i[t]=[]);return r.push(e),o.$evalAsync(function(){r.$$inter||!n.hasOwnProperty(t)||ut(n[t])||e(n[t])}),function(){xt(r,e)}}};var e=g.startSymbol(),n=g.endSymbol(),F="{{"==e&&"}}"==n?ct:function(t){return t.replace(/\{\{/g,e).replace(/}}/g,n)},w=/^ngAttr[A-Z]/,S=/^(.+)Start$/;return z.$$addBindingInfo=a?function(t,e){var n=t.data("$binding")||[];pt(e)?n=n.concat(e):n.push(e),t.data("$binding",n)}:lt,z.$$addBindingClass=a?function(t){A(t,"ng-binding")}:lt,z.$$addScopeInfo=a?function(t,e,n,i){var r=n?i?"$isolateScopeNoTemplate":"$isolateScope":"$scope";t.data(r,e)}:lt,z.$$addScopeClass=a?function(t,e){A(t,e?"ng-isolate-scope":"ng-scope")}:lt,z;function z(l,t,e,n,c){l instanceof rt||(l=rt(l));for(var i=/\S+/,r=0,o=l.length;r<o;r++){var a=l[r];a.nodeType===Yt&&a.nodeValue.match(i)&&Ce(a,l[r]=et.createElement("span"))}var u=O(l,t,l,e,n,c);z.$$addScopeClass(l);var h=null;return function(t,e,n){zt(t,"scope"),c&&c.needsNewScope&&(t=t.$parent.$new());var i,r=(n=n||{}).parentBoundTranscludeFn,o=n.transcludeControllers,a=n.futureParentElement;if(r&&r.$$boundTransclude&&(r=r.$$boundTransclude),h||(h=d(a)),i="html"!==h?rt(Y(h,rt("<div>").append(l).html())):e?Be.clone.call(l):l,o)for(var s in o)i.data("$"+s+"Controller",o[s].instance);return z.$$addScopeInfo(i,t),e&&e(i,t),u&&u(t,i,i,r),i}}function d(t){var e=t&&t[0];return e&&"foreignobject"!==bt(e)&&e.toString().match(/SVG/)?"svg":"html"}function O(t,f,e,n,i,r){for(var o,a,s,l,c,u,p,g=[],h=0;h<t.length;h++)o=new j,(s=(a=B(t[h],[],o,0===h?n:nt,i)).length?P(a,t[h],o,f,e,null,[],[],r):null)&&s.scope&&z.$$addScopeClass(o.$$element),c=s&&s.terminal||!(l=t[h].childNodes)||!l.length?null:O(l,s?(s.transcludeOnThisElement||!s.templateOnThisElement)&&s.transclude:f),(s||c)&&(g.push(h,s,c),u=!0,p=p||s),r=null;return u?d:null;function d(t,e,n,i){var r,o,a,s,l,c,u,h;if(p){var d=e.length;for(h=new Array(d),l=0;l<g.length;l+=3)h[u=g[l]]=e[u]}else h=e;for(l=0,c=g.length;l<c;)a=h[g[l++]],r=g[l++],o=g[l++],r?(r.scope?(s=t.$new(),z.$$addScopeInfo(rt(a),s)):s=t,r(o,s,a,n,r.transcludeOnThisElement?D(t,r.transclude,i):!r.templateOnThisElement&&i?i:!i&&f?D(t,f):null)):o&&o(t,a.childNodes,nt,i)}}function D(o,a,s){return function(t,e,n,i,r){return t||((t=o.$new(!1,r)).$$transcluded=!0),a(t,e,{parentBoundTranscludeFn:s,transcludeControllers:n,futureParentElement:i})}}function B(t,e,n,i,r){var o,a,s,l=t.nodeType,c=n.$attr;switch(l){case Jt:C(e,Pn(a=bt(t)),"E",i,r);for(var u,h,d,f,p,g,m=t.attributes,v=0,y=m&&m.length;v<y;v++){var b=!1,x=!1;h=(u=m[v]).name,p=yt(u.value),f=Pn(h),(g=w.test(f))&&(h=h.replace(Dn,"").substr(8).replace(/_(.)/g,function(t,e){return e.toUpperCase()}));var _=f.match(S);_&&T(_[1])&&(x=(b=h).substr(0,h.length-5)+"end",h=h.substr(0,h.length-6)),c[d=Pn(h.toLowerCase())]=h,!g&&n.hasOwnProperty(d)||(n[d]=p,Ue(t,d)&&(n[d]=!0)),M(t,e,p,d,g),C(e,d,"A",i,r,b,x)}if("input"===a&&"hidden"===t.getAttribute("type")&&t.setAttribute("autocomplete","off"),dt(s=t.className)&&(s=s.animVal),ft(s)&&""!==s)for(;o=I.exec(s);)C(e,d=Pn(o[2]),"C",i,r)&&(n[d]=yt(o[3])),s=s.substr(o.index+o[0].length);break;case Yt:if(11===it)for(;t.parentNode&&t.nextSibling&&t.nextSibling.nodeType===Yt;)t.nodeValue=t.nodeValue+t.nextSibling.nodeValue,t.parentNode.removeChild(t.nextSibling);k(e,t.nodeValue);break;case Xt:try{(o=E.exec(t.nodeValue))&&C(e,d=Pn(o[1]),"M",i,r)&&(n[d]=yt(o[2]))}catch(t){}}return e.sort($),e}function V(t,e,n){var i=[],r=0;if(e&&t.hasAttribute&&t.hasAttribute(e))do{if(!t)throw An("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",e,n);t.nodeType==Jt&&(t.hasAttribute(e)&&r++,t.hasAttribute(n)&&r--),i.push(t),t=t.nextSibling}while(0<r);else i.push(t);return rt(i)}function W(o,a,s){return function(t,e,n,i,r){return e=V(e[0],a,s),o(t,e,n,i,r)}}function P(t,_,w,e,n,i,S,C,r){r=r||{};for(var o,a,s,l,c,u=-Number.MAX_VALUE,T=r.newScopeDirective,$=r.controllerDirectives,k=r.newIsolateScopeDirective,A=r.templateDirective,h=r.nonTlbTranscludeDirective,d=!1,f=!1,O=r.hasElementTranscludeDirective,p=w.$$element=rt(_),g=i,m=e,D=0,P=t.length;D<P;D++){var v=(o=t[D]).$$start,y=o.$$end;if(v&&(p=V(_,v,y)),s=nt,u>o.priority)break;if((c=o.scope)&&(o.templateUrl||(dt(c)?(G("new/isolated scope",k||T,o,p),k=o):G("new/isolated scope",k,o,p)),T=T||o),a=o.name,!o.templateUrl&&o.controller&&(c=o.controller,$=$||Ut(),G("'"+a+"' controller",$[a],o,p),$[a]=o),(c=o.transclude)&&(d=!0,o.$$tlb||(G("transclusion",h,o,p),h=o),m="element"==c?(O=!0,u=o.priority,s=p,p=w.$$element=rt(et.createComment(" "+a+": "+w[a]+" ")),_=p[0],X(n,wt(s),_),z(s,e,u,g&&g.name,{nonTlbTranscludeDirective:h})):(s=rt(ke(_)).contents(),p.empty(),z(s,e,nt,nt,{needsNewScope:o.$$isolateScope||o.$$newScope}))),o.template)if(f=!0,G("template",A,o,p),c=gt((A=o).template)?o.template(p,w):o.template,c=F(c),o.replace){if(g=o,s=be(c)?[]:En(Y(o.templateNamespace,yt(c))),_=s[0],1!=s.length||_.nodeType!==Jt)throw An("tplrt","Template for directive '{0}' must have exactly one root element. {1}",a,"");X(n,p,_);var b={$attr:{}},x=B(_,[],b),M=t.splice(D+1,t.length-(D+1));(k||T)&&q(x,k,T),t=t.concat(x).concat(M),U(w,b),P=t.length}else p.html(c);if(o.templateUrl)f=!0,G("template",A,o,p),(A=o).replace&&(g=o),R=J(t.splice(D,t.length-D),p,w,n,d&&m,S,C,{controllerDirectives:$,newScopeDirective:T!==o&&T,newIsolateScopeDirective:k,templateDirective:A,nonTlbTranscludeDirective:h}),P=t.length;else if(o.compile)try{gt(l=o.compile(p,w,m))?E(null,l,v,y):l&&E(l.pre,l.post,v,y)}catch(t){L(t,Ct(p))}o.terminal&&(R.terminal=!0,u=Math.max(u,o.priority))}return R.scope=T&&!0===T.scope,R.transcludeOnThisElement=d,R.templateOnThisElement=f,R.transclude=m,r.hasElementTranscludeDirective=O,R;function E(t,e,n,i){t&&(n&&(t=W(t,n,i)),t.require=o.require,t.directiveName=a,(k===o||o.$$isolateScope)&&(t=K(t,{isolateScope:!0})),S.push(t)),e&&(n&&(e=W(e,n,i)),e.require=o.require,e.directiveName=a,(k===o||o.$$isolateScope)&&(e=K(e,{isolateScope:!0})),C.push(e))}function I(t,e,n,i){var r;if(ft(e)){var o=e.match(tt),a=e.substring(o[0].length),s=o[1]||o[3],l="?"===o[2];if("^^"===s?n=n.parent():r=(r=i&&i[a])&&r.instance,!r){var c="$"+a+"Controller";r=s?n.inheritedData(c):n.data(c)}if(!r&&!l)throw An("ctreq","Controller '{0}', required by directive '{1}', can't be found!",a,t)}else if(pt(e)){r=[];for(var u=0,h=e.length;u<h;u++)r[u]=I(t,e[u],n,i)}return r||null}function N(t,e,n,i,r,o){var a=Ut();for(var s in i){var l=i[s],c={$scope:l===k||l.$$isolateScope?r:o,$element:t,$attrs:e,$transclude:n},u=l.controller;"@"==u&&(u=e[l.name]);var h=H(u,c,!0,l.controllerAs);a[l.name]=h,t.data("$"+l.name+"Controller",h.instance)}return a}function R(t,e,n,i,r){var o,a,s,l,c,u,h,d,f;for(var p in _===n?u=(h=w).$$element:(u=rt(n),h=new j(u,w)),s=e,k?a=e.$new(!0):T&&(s=e.$parent),r&&((c=x).$$boundTransclude=r),$&&(l=N(u,h,c,$,a,e)),k&&(z.$$addScopeInfo(u,a,!0,!(A&&(A===k||A===k.$$originalDirective))),z.$$addScopeClass(u,!0),a.$$isolateBindings=k.$$isolateBindings,(d=Z(e,h,a,a.$$isolateBindings,k))&&a.$on("$destroy",d)),l){var g=$[p],m=l[p],v=g.$$bindings.bindToController;m.identifier&&v&&(f=Z(s,h,m.instance,v,g));var y=m();y!==m.instance&&(m.instance=y,u.data("$"+g.name+"Controller",y),f&&f(),f=Z(s,h,m.instance,v,g))}for(D=0,P=S.length;D<P;D++)Q(o=S[D],o.isolateScope?a:e,u,h,o.require&&I(o.directiveName,o.require,u,l),c);var b=e;for(k&&(k.template||null===k.templateUrl)&&(b=a),t&&t(b,n.childNodes,nt,r),D=C.length-1;0<=D;D--)Q(o=C[D],o.isolateScope?a:e,u,h,o.require&&I(o.directiveName,o.require,u,l),c);function x(t,e,n){var i;return mt(t)||(n=e,e=t,t=nt),O&&(i=l),n||(n=O?u.parent():u),r(t,e,i,n,b)}}}function q(t,e,n){for(var i=0,r=t.length;i<r;i++)t[i]=st(t[i],{$$isolateScope:e,$$newScope:n})}function C(t,e,n,i,r,o,a){if(e===r)return null;var s=null;if(p.hasOwnProperty(e))for(var l,c=f.get(e+v),u=0,h=c.length;u<h;u++)try{if(l=c[u],(ut(i)||i>l.priority)&&-1!=l.restrict.indexOf(n)){if(o&&(l=st(l,{$$start:o,$$end:a})),!l.$$bindings){var d=l.$$bindings=x(l,l.name);dt(d.isolateScope)&&(l.$$isolateBindings=d.isolateScope)}t.push(l),s=l}}catch(t){L(t)}return s}function T(t){if(p.hasOwnProperty(t))for(var e=f.get(t+v),n=0,i=e.length;n<i;n++)if(e[n].multiElement)return!0;return!1}function U(n,i){var r=i.$attr,o=n.$attr,a=n.$$element;ot(n,function(t,e){"$"!=e.charAt(0)&&(i[e]&&i[e]!==t&&(t+=("style"===e?";":" ")+i[e]),n.$set(e,t,!0,r[e]))}),ot(i,function(t,e){"class"==e?(A(a,t),n.class=(n.class?n.class+" ":"")+t):"style"==e?(a.attr("style",a.attr("style")+";"+t),n.style=(n.style?n.style+";":"")+t):"$"==e.charAt(0)||n.hasOwnProperty(e)||(n[e]=t,o[e]=r[e])})}function J(d,f,p,g,m,v,y,b){var x,_,w=[],S=f[0],C=d.shift(),T=st(C,{templateUrl:null,transclude:null,replace:null,$$originalDirective:C}),$=gt(C.templateUrl)?C.templateUrl(f,p):C.templateUrl,k=C.templateNamespace;return f.empty(),t($).then(function(t){var n,e,i,r;if(t=F(t),C.replace){if(i=be(t)?[]:En(Y(k,yt(t))),n=i[0],1!=i.length||n.nodeType!==Jt)throw An("tplrt","Template for directive '{0}' must have exactly one root element. {1}",C.name,$);e={$attr:{}},X(g,f,n);var o=B(n,[],e);dt(C.scope)&&q(o,!0),d=o.concat(d),U(p,e)}else n=S,f.html(t);for(d.unshift(T),x=P(d,n,p,m,f,C,v,y,b),ot(g,function(t,e){t==n&&(g[e]=f[0])}),_=O(f[0].childNodes,m);w.length;){var a=w.shift(),s=w.shift(),l=w.shift(),c=w.shift(),u=f[0];if(!a.$$destroyed){if(s!==S){var h=s.className;b.hasElementTranscludeDirective&&C.replace||(u=ke(n)),X(l,rt(s),u),A(rt(u),h)}r=x.transcludeOnThisElement?D(a,x.transclude,c):c,x(_,a,u,g,r)}}w=null}),function(t,e,n,i,r){var o=r;e.$$destroyed||(w?w.push(e,n,i,o):(x.transcludeOnThisElement&&(o=D(e,x.transclude,r)),x(_,e,n,i,o)))}}function $(t,e){var n=e.priority-t.priority;return 0!==n?n:t.name!==e.name?t.name<e.name?-1:1:t.index-e.index}function G(t,e,n,i){function r(t){return t?" (module: "+t+")":""}if(e)throw An("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",e.name,r(e.$$moduleName),n.name,r(n.$$moduleName),t,Ct(i))}function k(t,e){var r=g(e,!0);r&&t.push({priority:0,compile:function(t){var e=t.parent(),i=!!e.length;return i&&z.$$addBindingClass(e),function(t,e){var n=e.parent();i||z.$$addBindingClass(n),z.$$addBindingInfo(n,r.expressions),t.$watch(r,function(t){e[0].nodeValue=t})}}})}function Y(t,e){switch(t=N(t||"html")){case"svg":case"math":var n=et.createElement("div");return n.innerHTML="<"+t+">"+e+"</"+t+">",n.childNodes[0].childNodes;default:return e}}function u(t,e){if("srcdoc"==e)return i.HTML;var n=bt(t);return"xlinkHref"==e||"form"==n&&"action"==e||"img"!=n&&("src"==e||"ngSrc"==e)?i.RESOURCE_URL:void 0}function M(t,e,o,a,s){var l=u(t,a);s=h[a]||s;var c=g(o,!0,l,s);if(c){if("multiple"===a&&"select"===bt(t))throw An("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",Ct(t));e.push({priority:100,compile:function(){return{pre:function(t,e,n){var i=n.$$observers||(n.$$observers=Ut());if(b.test(a))throw An("nodomevents","Interpolations for HTML DOM event attributes are disallowed.  Please use the ng- versions (such as ng-click instead of onclick) instead.");var r=n[a];r!==o&&(c=r&&g(r,!0,l,s),o=r),c&&(n[a]=c(t),(i[a]||(i[a]=[])).$$inter=!0,(n.$$observers&&n.$$observers[a].$$scope||t).$watch(c,function(t,e){"class"===a&&t!=e?n.$updateClass(t,e):n.$set(a,t)}))}}}})}}function X(t,e,n){var i,r,o=e[0],a=e.length,s=o.parentNode;if(t)for(i=0,r=t.length;i<r;i++)if(t[i]==o){t[i++]=n;for(var l=i,c=l+a-1,u=t.length;l<u;l++,c++)c<u?t[l]=t[c]:delete t[l];t.length-=a-1,t.context===o&&(t.context=n);break}s&&s.replaceChild(n,o);var h=et.createDocumentFragment();h.appendChild(o),rt.hasData(o)&&(rt.data(n,rt.data(o)),_?(Ht=!0,_.cleanData([o])):delete rt.cache[o[rt.expando]]);for(var d=1,f=e.length;d<f;d++){var p=e[d];rt(p).remove(),h.appendChild(p),delete e[d]}e[0]=n,e.length=1}function K(t,e){return at(function(){return t.apply(null,arguments)},t,e)}function Q(t,e,n,i,r,o){try{t(e,n,i,r,o)}catch(t){L(t,Ct(n))}}function Z(u,h,d,t,f){var p=[];return ot(t,function(t,e){var n,i,r,o,a=t.attrName,s=t.optional;switch(t.mode){case"@":s||R.call(h,a)||(d[e]=h[a]=void 0),h.$observe(a,function(t){ft(t)&&(d[e]=t)}),h.$$observers[a].$$scope=u,ft(n=h[a])?d[e]=g(n)(u):vt(n)&&(d[e]=n);break;case"=":if(!R.call(h,a)){if(s)break;h[a]=void 0}if(s&&!h[a])break;i=m(h[a]),o=i.literal?_t:function(t,e){return t===e||t!=t&&e!=e},r=i.assign||function(){throw n=d[e]=i(u),An("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",h[a],a,f.name)},n=d[e]=i(u);var l,c=function(t){return o(t,d[e])||(o(t,n)?r(u,t=d[e]):d[e]=t),n=t};c.$stateful=!0,l=t.collection?u.$watchCollection(h[a],c):u.$watch(m(h[a],c),null,i.literal),p.push(l);break;case"&":if((i=h.hasOwnProperty(a)?m(h[a]):lt)===lt&&s)break;d[e]=function(t){return i(u,t)}}}),p.length&&function(){for(var t=0,e=p.length;t<e;++t)p[t]()}}}]}On.$inject=["$provide","$$sanitizeUriProvider"];var Dn=/^((?:x|data)[\:\-_])/i;function Pn(t){return fe(t.replace(Dn,""))}function Mn(t,e){var n="",i=t.split(/\s+/),r=e.split(/\s+/);t:for(var o=0;o<i.length;o++){for(var a=i[o],s=0;s<r.length;s++)if(a==r[s])continue t;n+=(0<n.length?" ":"")+a}return n}function En(t){var e=(t=rt(t)).length;if(e<=1)return t;for(;e--;){t[e].nodeType===Xt&&n.call(t,e,1)}return t}var In=w("$controller"),Nn=/^(\S+)(\s+as\s+([\w$]+))?$/;function Rn(t,e){if(e&&ft(e))return e;if(ft(t)){var n=Nn.exec(t);if(n)return n[3]}}function Ln(){var d={},f=!1;this.register=function(t,e){Vt(t,"controller"),dt(t)?at(d,t):d[t]=e},this.allowGlobals=function(){f=!0},this.$get=["$injector","$window",function(c,u){return function(e,n,t,i){var r,o,a,s;if(t=!0===t,i&&ft(i)&&(s=i),ft(e)){if(!(o=e.match(Nn)))throw In("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",e);a=o[1],s=s||o[3],Bt(e=d.hasOwnProperty(a)?d[a]:Wt(n.$scope,a,!0)||(f?Wt(u,a,!0):nt),a,!0)}if(t){var l=(pt(e)?e[e.length-1]:e).prototype;return r=Object.create(l||null),s&&h(n,s,r,a||e.name),at(function(){var t=c.invoke(e,r,n,a);return t!==r&&(dt(t)||gt(t))&&(r=t,s&&h(n,s,r,a||e.name)),r},{instance:r,identifier:s})}return r=c.instantiate(e,n,a),s&&h(n,s,r,a||e.name),r};function h(t,e,n,i){if(!t||!dt(t.$scope))throw w("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,e);t.$scope[e]=n}}]}function Hn(){this.$get=["$window",function(t){return rt(t.document)}]}function jn(){this.$get=["$log",function(n){return function(t,e){n.error.apply(n,arguments)}}]}var Fn=function(){this.$get=["$document",function(e){return function(t){return t?!t.nodeType&&t instanceof rt&&(t=t[0]):t=e[0].body,t.offsetWidth+1}}]},zn="application/json",Bn={"Content-Type":zn+";charset=utf-8"},Vn=/^\[|^\{(?!\{)/,Wn={"[":/]$/,"{":/}$/},qn=/^\)\]\}',?\n/,Un=w("$http"),Jn=function(t){return function(){throw Un("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",t)}};function Gn(t){return dt(t)?$(t)?t.toISOString():X(t):t}function Yn(){this.$get=function(){return function(t){if(!t)return"";var i=[];return d(t,function(t,n){null===t||ut(t)||(pt(t)?ot(t,function(t,e){i.push(Ot(n)+"="+Ot(Gn(t)))}):i.push(Ot(n)+"="+Ot(Gn(t))))}),i.join("&")}}}function Xn(){this.$get=function(){return function(t){if(!t)return"";var e=[];return r(t,"",!0),e.join("&");function r(t,n,i){null===t||ut(t)||(pt(t)?ot(t,function(t,e){r(t,n+"["+(dt(t)?e:"")+"]")}):dt(t)&&!$(t)?d(t,function(t,e){r(t,n+(i?"":"[")+e+(i?"":"]"))}):e.push(Ot(n)+"="+Ot(Gn(t))))}}}}function Kn(t,e){if(ft(t)){var n=t.replace(qn,"").trim();if(n){var i=e("Content-Type");(i&&0===i.indexOf(zn)||Qn(n))&&(t=K(n))}}return t}function Qn(t){var e=t.match(Vn);return e&&Wn[e[0]].test(t)}function Zn(t){var e,n=Ut();function i(t,e){t&&(n[t]=n[t]?n[t]+", "+e:e)}return ft(t)?ot(t.split("\n"),function(t){e=t.indexOf(":"),i(N(yt(t.substr(0,e))),yt(t.substr(e+1)))}):dt(t)&&ot(t,function(t,e){i(N(e),yt(t))}),n}function ti(n){var i;return function(t){if(i||(i=Zn(n)),t){var e=i[N(t)];return void 0===e&&(e=null),e}return i}}function ei(e,n,i,t){return gt(t)?t(e,n,i):(ot(t,function(t){e=t(e,n,i)}),e)}function ni(t){return 200<=t&&t<300}function ii(){var x=this.defaults={transformResponse:[Kn],transformRequest:[function(t){return!dt(t)||P(t)||E(t)||M(t)?t:X(t)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:W(Bn),put:W(Bn),patch:W(Bn)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},_=!1;this.useApplyAsync=function(t){return ht(t)?(_=!!t,this):_};var d=!0;this.useLegacyPromiseExtensions=function(t){return ht(t)?(d=!!t,this):d};var i=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(f,p,t,g,m,c){var v=t("$http");x.paramSerializer=ft(x.paramSerializer)?c.get(x.paramSerializer):x.paramSerializer;var u=[];function y(t){if(!A.isObject(t))throw w("$http")("badreq","Http request configuration must be an object.  Received: {0}",t);if(!ft(t.url))throw w("$http")("badreq","Http request configuration url must be a string.  Received: {0}",t.url);var n=at({method:"get",transformRequest:x.transformRequest,transformResponse:x.transformResponse,paramSerializer:x.paramSerializer},t);n.headers=l(t),n.method=S(n.method),n.paramSerializer=ft(n.paramSerializer)?c.get(n.paramSerializer):n.paramSerializer;var e=[function(t){var n=t.headers,e=ei(t.data,ti(n),nt,t.transformRequest);return ut(e)&&ot(n,function(t,e){"content-type"===N(e)&&delete n[e]}),ut(t.withCredentials)&&!ut(x.withCredentials)&&(t.withCredentials=x.withCredentials),h(t,e).then(a,a)},nt],i=m.when(n);for(ot(u,function(t){(t.request||t.requestError)&&e.unshift(t.request,t.requestError),(t.response||t.responseError)&&e.push(t.response,t.responseError)});e.length;){var r=e.shift(),o=e.shift();i=i.then(r,o)}return i.error=d?(i.success=function(e){return Bt(e,"fn"),i.then(function(t){e(t.data,t.status,t.headers,n)}),i},function(e){return Bt(e,"fn"),i.then(null,function(t){e(t.data,t.status,t.headers,n)}),i}):(i.success=Jn("success"),Jn("error")),i;function a(t){var e=at({},t);return e.data=ei(t.data,t.headers,t.status,n.transformResponse),ni(t.status)?e:m.reject(e)}function s(t,n){var i,r={};return ot(t,function(t,e){gt(t)?null!=(i=t(n))&&(r[e]=i):r[e]=t}),r}function l(t){var e,n,i,r=x.headers,o=at({},t.headers);r=at({},r.common,r[N(t.method)]);t:for(e in r){for(i in n=N(e),o)if(N(i)===n)continue t;o[e]=r[e]}return s(o,W(t))}}return ot(i,function(t){u.unshift(ft(t)?c.get(t):c.invoke(t))}),y.pendingRequests=[],e("get","delete","head","jsonp"),n("post","put","patch"),y.defaults=x,y;function e(t){ot(arguments,function(n){y[n]=function(t,e){return y(at({},e||{},{method:n,url:t}))}})}function n(t){ot(arguments,function(i){y[i]=function(t,e,n){return y(at({},n||{},{method:i,url:t,data:e}))}})}function h(r,t){var o,e,a=m.defer(),n=a.promise,i=r.headers,s=b(r.url,r.paramSerializer(r.params));if(y.pendingRequests.push(r),n.then(d,d),!r.cache&&!x.cache||!1===r.cache||"GET"!==r.method&&"JSONP"!==r.method||(o=dt(r.cache)?r.cache:dt(x.cache)?x.cache:v),o&&(ht(e=o.get(s))?I(e)?e.then(h,h):pt(e)?u(e[1],e[0],W(e[2]),e[3]):u(e,200,{},"OK"):o.put(s,n)),ut(e)){var l=Sr(r.url)?p()[r.xsrfCookieName||x.xsrfCookieName]:nt;l&&(i[r.xsrfHeaderName||x.xsrfHeaderName]=l),f(r.method,s,t,c,i,r.timeout,r.withCredentials,r.responseType)}return n;function c(t,e,n,i){function r(){u(e,t,n,i)}o&&(ni(t)?o.put(s,[t,e,Zn(n),i]):o.remove(s)),_?g.$applyAsync(r):(r(),g.$$phase||g.$apply())}function u(t,e,n,i){(ni(e=-1<=e?e:0)?a.resolve:a.reject)({data:t,status:e,headers:ti(n),config:r,statusText:i})}function h(t){u(t.data,t.status,W(t.headers()),t.statusText)}function d(){var t=y.pendingRequests.indexOf(r);-1!==t&&y.pendingRequests.splice(t,1)}}function b(t,e){return 0<e.length&&(t+=(-1==t.indexOf("?")?"?":"&")+e),t}}]}function ri(){this.$get=function(){return function(){return new a.XMLHttpRequest}}}function oi(){this.$get=["$browser","$window","$document","$xhrFactory",function(t,e,n,i){return ai(t,i,t.defer,e.angular.callbacks,n[0])}]}function ai(g,m,v,y,s){return function(t,i,e,r,n,o,a,s){if(g.$$incOutstandingRequestCount(),i=i||g.url(),"jsonp"==N(t)){var l="_"+(y.counter++).toString(36);y[l]=function(t){y[l].data=t,y[l].called=!0};var c=b(i.replace("JSON_CALLBACK","angular.callbacks."+l),l,function(t,e){p(r,t,y[l].data,"",e),y[l]=lt})}else{var u=m(t,i);u.open(t,i,!0),ot(n,function(t,e){ht(t)&&u.setRequestHeader(e,t)}),u.onload=function(){var t=u.statusText||"",e="response"in u?u.response:u.responseText,n=1223===u.status?204:u.status;0===n&&(n=e?200:"file"==wr(i).protocol?404:0),p(r,n,e,u.getAllResponseHeaders(),t)};var h=function(){p(r,-1,null,null,"")};if(u.onerror=h,u.onabort=h,a&&(u.withCredentials=!0),s)try{u.responseType=s}catch(t){if("json"!==s)throw t}u.send(ut(e)?null:e)}if(0<o)var d=v(f,o);else I(o)&&o.then(f);function f(){c&&c(),u&&u.abort()}function p(t,e,n,i,r){ht(d)&&v.cancel(d),c=u=null,t(e,n,i,r),g.$$completeOutstandingRequest(lt)}};function b(t,i,r){var o=s.createElement("script"),a=null;return o.type="text/javascript",o.src=t,o.async=!0,ae(o,"load",a=function(t){se(o,"load",a),se(o,"error",a),s.body.removeChild(o),o=null;var e=-1,n="unknown";t&&("load"!==t.type||y[i].called||(t={type:"error"}),n=t.type,e="error"===t.type?404:200),r&&r(e,n)}),ae(o,"error",a),s.body.appendChild(o),a}}var si=A.$interpolateMinErr=w("$interpolate");function li(){var S="{{",C="}}";this.startSymbol=function(t){return t?(S=t,this):S},this.endSymbol=function(t){return t?(C=t,this):C},this.$get=["$parse","$exceptionHandler","$sce",function(m,v,y){var b=S.length,x=C.length,e=new RegExp(S.replace(/./g,t),"g"),n=new RegExp(C.replace(/./g,t),"g");function t(t){return"\\\\\\"+t}function _(t){return t.replace(e,S).replace(n,C)}function w(t){if(null==t)return"";switch(typeof t){case"string":break;case"number":t=""+t;break;default:t=X(t)}return t}function i(r,t,e,i){i=!!i;for(var n,o,a,s=0,l=[],c=[],u=r.length,h=[],d=[];s<u;){if(-1==(n=r.indexOf(S,s))||-1==(o=r.indexOf(C,n+b))){s!==u&&h.push(_(r.substring(s)));break}s!==n&&h.push(_(r.substring(s,n))),a=r.substring(n+b,o),l.push(a),c.push(m(a,g)),s=o+x,d.push(h.length),h.push("")}if(e&&1<h.length&&si.throwNoconcat(r),!t||l.length){var f=function(t){for(var e=0,n=l.length;e<n;e++){if(i&&ut(t[e]))return;h[d[e]]=t[e]}return h.join("")},p=function(t){return e?y.getTrusted(e,t):y.valueOf(t)};return at(function(t){var e=0,n=l.length,i=new Array(n);try{for(;e<n;e++)i[e]=c[e](t);return f(i)}catch(t){v(si.interr(r,t))}},{exp:r,expressions:l,$$watchDelegate:function(i,r){var o;return i.$watchGroup(c,function(t,e){var n=f(t);gt(r)&&r.call(this,n,t!==e?o:n,i),o=n})}})}function g(t){try{return t=p(t),i&&!ht(t)?t:w(t)}catch(t){v(si.interr(r,t))}}}return i.startSymbol=function(){return S},i.endSymbol=function(){return C},i}]}function ci(){this.$get=["$rootScope","$window","$q","$$q",function(d,f,p,g){var m={};function t(t,e,n,i){var r=4<arguments.length,o=r?wt(arguments,4):[],a=f.setInterval,s=f.clearInterval,l=0,c=ht(i)&&!i,u=(c?g:p).defer(),h=u.promise;return n=ht(n)?n:0,h.then(null,null,r?function(){t.apply(null,o)}:t),h.$$intervalId=a(function(){u.notify(l++),0<n&&n<=l&&(u.resolve(l),s(h.$$intervalId),delete m[h.$$intervalId]),c||d.$apply()},e),m[h.$$intervalId]=u,h}return t.cancel=function(t){return!!(t&&t.$$intervalId in m)&&(m[t.$$intervalId].reject("canceled"),f.clearInterval(t.$$intervalId),delete m[t.$$intervalId],!0)},t}]}si.throwNoconcat=function(t){throw si("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",t)},si.interr=function(t,e){return si("interr","Can't interpolate: {0}\n{1}",t,e.toString())};var ui=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,hi={http:80,https:443,ftp:21},di=w("$location");function fi(t){for(var e=t.split("/"),n=e.length;n--;)e[n]=At(e[n]);return e.join("/")}function pi(t,e){var n=wr(t);e.$$protocol=n.protocol,e.$$host=n.hostname,e.$$port=m(n.port)||hi[n.protocol]||null}function gi(t,e){var n="/"!==t.charAt(0);n&&(t="/"+t);var i=wr(t);e.$$path=decodeURIComponent(n&&"/"===i.pathname.charAt(0)?i.pathname.substring(1):i.pathname),e.$$search=$t(i.search),e.$$hash=decodeURIComponent(i.hash),e.$$path&&"/"!=e.$$path.charAt(0)&&(e.$$path="/"+e.$$path)}function mi(t,e){if(0===e.indexOf(t))return e.substr(t.length)}function vi(t){var e=t.indexOf("#");return-1==e?t:t.substr(0,e)}function yi(t){return t.replace(/(#.+)|#$/,"$1")}function bi(t){return t.substr(0,vi(t).lastIndexOf("/")+1)}function xi(t){return t.substring(0,t.indexOf("/",t.indexOf("//")+2))}function _i(o,a,s){this.$$html5=!0,s=s||"",pi(o,this),this.$$parse=function(t){var e=mi(a,t);if(!ft(e))throw di("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',t,a);gi(e,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var t=kt(this.$$search),e=this.$$hash?"#"+At(this.$$hash):"";this.$$url=fi(this.$$path)+(t?"?"+t:"")+e,this.$$absUrl=a+this.$$url.substr(1)},this.$$parseLinkUrl=function(t,e){return e&&"#"===e[0]?(this.hash(e.slice(1)),!0):(ht(n=mi(o,t))?r=ht(n=mi(s,i=n))?a+(mi("/",n)||n):o+i:ht(n=mi(a,t))?r=a+n:a==t+"/"&&(r=a),r&&this.$$parse(r),!!r);var n,i,r}}function wi(r,o,a){pi(r,this),this.$$parse=function(t){var e,n=mi(r,t)||mi(o,t);function i(t,e,n){var i,r=/^\/[A-Z]:(\/.*)/;return 0===e.indexOf(n)&&(e=e.replace(n,"")),r.exec(e)?t:(i=r.exec(t))?i[1]:t}ut(n)||"#"!==n.charAt(0)?this.$$html5?e=n:(e="",ut(n)&&(r=t,this.replace())):ut(e=mi(a,n))&&(e=n),gi(e,this),this.$$path=i(this.$$path,e,r),this.$$compose()},this.$$compose=function(){var t=kt(this.$$search),e=this.$$hash?"#"+At(this.$$hash):"";this.$$url=fi(this.$$path)+(t?"?"+t:"")+e,this.$$absUrl=r+(this.$$url?a+this.$$url:"")},this.$$parseLinkUrl=function(t,e){return vi(r)==vi(t)&&(this.$$parse(t),!0)}}function Si(r,o,a){this.$$html5=!0,wi.apply(this,arguments),this.$$parseLinkUrl=function(t,e){return e&&"#"===e[0]?(this.hash(e.slice(1)),!0):(r==vi(t)?n=t:(i=mi(o,t))?n=r+a+i:o===t+"/"&&(n=o),n&&this.$$parse(n),!!n);var n,i},this.$$compose=function(){var t=kt(this.$$search),e=this.$$hash?"#"+At(this.$$hash):"";this.$$url=fi(this.$$path)+(t?"?"+t:"")+e,this.$$absUrl=r+a+this.$$url}}var Ci={$$html5:!1,$$replace:!1,absUrl:Ti("$$absUrl"),url:function(t){if(ut(t))return this.$$url;var e=ui.exec(t);return(e[1]||""===t)&&this.path(decodeURIComponent(e[1])),(e[2]||e[1]||""===t)&&this.search(e[3]||""),this.hash(e[5]||""),this},protocol:Ti("$$protocol"),host:Ti("$$host"),port:Ti("$$port"),path:$i("$$path",function(t){return"/"==(t=null!==t?t.toString():"").charAt(0)?t:"/"+t}),search:function(n,t){switch(arguments.length){case 0:return this.$$search;case 1:if(ft(n)||b(n))n=n.toString(),this.$$search=$t(n);else{if(!dt(n))throw di("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");ot(n=V(n,{}),function(t,e){null==t&&delete n[e]}),this.$$search=n}break;default:ut(t)||null===t?delete this.$$search[n]:this.$$search[n]=t}return this.$$compose(),this},hash:$i("$$hash",function(t){return null!==t?t.toString():""}),replace:function(){return this.$$replace=!0,this}};function Ti(t){return function(){return this[t]}}function $i(e,n){return function(t){return ut(t)?this[e]:(this[e]=n(t),this.$$compose(),this)}}function ki(){var g="",m={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return ht(t)?(g=t,this):g},this.html5Mode=function(t){return vt(t)?(m.enabled=t,this):dt(t)?(vt(t.enabled)&&(m.enabled=t.enabled),vt(t.requireBase)&&(m.requireBase=t.requireBase),vt(t.rewriteLinks)&&(m.rewriteLinks=t.rewriteLinks),this):m},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(a,s,e,r,o){var l,t,n,i=s.baseHref(),c=s.url();if(m.enabled){if(!i&&m.requireBase)throw di("nobase","$location in HTML5 mode requires a <base> tag to be present!");n=xi(c)+(i||"/"),t=e.history?_i:Si}else n=vi(c),t=wi;var u=bi(n);(l=new t(n,u,"#"+g)).$$parseLinkUrl(c,c),l.$$state=s.state();var h=/^\s*(javascript|mailto):/i;function d(t,e,n){var i=l.url(),r=l.$$state;try{s.url(t,e,n),l.$$state=s.state()}catch(t){throw l.url(i),l.$$state=r,t}}r.on("click",function(t){if(m.rewriteLinks&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&2!=t.which&&2!=t.button){for(var e=rt(t.target);"a"!==bt(e[0]);)if(e[0]===r[0]||!(e=e.parent())[0])return;var n=e.prop("href"),i=e.attr("href")||e.attr("xlink:href");dt(n)&&"[object SVGAnimatedString]"===n.toString()&&(n=wr(n.animVal).href),h.test(n)||!n||e.attr("target")||t.isDefaultPrevented()||l.$$parseLinkUrl(n,i)&&(t.preventDefault(),l.absUrl()!=s.url()&&(a.$apply(),o.angular["ff-684208-preventDefault"]=!0))}}),yi(l.absUrl())!=yi(c)&&s.url(l.absUrl(),!0);var f=!0;return s.onUrlChange(function(i,r){ut(mi(u,i))?o.location.href=i:(a.$evalAsync(function(){var t,e=l.absUrl(),n=l.$$state;i=yi(i),l.$$parse(i),l.$$state=r,t=a.$broadcast("$locationChangeStart",i,e,r,n).defaultPrevented,l.absUrl()===i&&(t?(l.$$parse(e),d(e,!1,l.$$state=n)):(f=!1,p(e,n)))}),a.$$phase||a.$digest())}),a.$watch(function(){var n=yi(s.url()),t=yi(l.absUrl()),i=s.state(),r=l.$$replace,o=n!==t||l.$$html5&&e.history&&i!==l.$$state;(f||o)&&(f=!1,a.$evalAsync(function(){var t=l.absUrl(),e=a.$broadcast("$locationChangeStart",t,n,l.$$state,i).defaultPrevented;l.absUrl()===t&&(e?(l.$$parse(n),l.$$state=i):(o&&d(t,r,i===l.$$state?null:l.$$state),p(n,i)))})),l.$$replace=!1}),l;function p(t,e){a.$broadcast("$locationChangeSuccess",l.absUrl(),t,l.$$state,e)}}]}function Ai(){var n=!0,i=this;this.debugEnabled=function(t){return ht(t)?(n=t,this):n},this.$get=["$window",function(r){return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:(t=e("debug"),function(){n&&t.apply(i,arguments)})};var t;function o(t){return t instanceof Error&&(t.stack?t=t.message&&-1===t.stack.indexOf(t.message)?"Error: "+t.message+"\n"+t.stack:t.stack:t.sourceURL&&(t=t.message+"\n"+t.sourceURL+":"+t.line)),t}function e(t){var n=r.console||{},i=n[t]||n.log||lt,e=!1;try{e=!!i.apply}catch(t){}return e?function(){var e=[];return ot(arguments,function(t){e.push(o(t))}),i.apply(n,e)}:function(t,e){i(t,null==e?"":e)}}}]}ot([Si,wi,_i],function(e){e.prototype=Object.create(Ci),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==_i||!this.$$html5)throw di("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=ut(t)?null:t,this}});var Oi=w("$parse");function Di(t,e){if("__defineGetter__"===t||"__defineSetter__"===t||"__lookupGetter__"===t||"__lookupSetter__"===t||"__proto__"===t)throw Oi("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",e);return t}function Pi(t,e){if(!ft(t+=""))throw Oi("iseccst","Cannot convert object to primitive value! Expression: {0}",e);return t}function Mi(t,e){if(t){if(t.constructor===t)throw Oi("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",e);if(t.window===t)throw Oi("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",e);if(t.children&&(t.nodeName||t.prop&&t.attr&&t.find))throw Oi("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",e);if(t===Object)throw Oi("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",e)}return t}var Ei=Function.prototype.call,Ii=Function.prototype.apply,Ni=Function.prototype.bind;function Ri(t,e){if(t){if(t.constructor===t)throw Oi("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",e);if(t===Ei||t===Ii||t===Ni)throw Oi("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",e)}}function Li(t,e){if(t&&(t===(0).constructor||t===(!1).constructor||t==="".constructor||t==={}.constructor||t===[].constructor||t===Function.constructor))throw Oi("isecaf","Assigning to a constructor is disallowed! Expression: {0}",e)}var Hi=Ut();ot("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(t){Hi[t]=!0});var ji={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Fi=function(t){this.options=t};Fi.prototype={constructor:Fi,lex:function(t){for(this.text=t,this.index=0,this.tokens=[];this.index<this.text.length;){var e=this.text.charAt(this.index);if('"'===e||"'"===e)this.readString(e);else if(this.isNumber(e)||"."===e&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(e))this.readIdent();else if(this.is(e,"(){}[].,;:?"))this.tokens.push({index:this.index,text:e}),this.index++;else if(this.isWhitespace(e))this.index++;else{var n=e+this.peek(),i=n+this.peek(2),r=Hi[e],o=Hi[n],a=Hi[i];if(r||o||a){var s=a?i:o?n:e;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(t,e){return-1!==e.indexOf(t)},peek:function(t){var e=t||1;return this.index+e<this.text.length&&this.text.charAt(this.index+e)},isNumber:function(t){return"0"<=t&&t<="9"&&"string"==typeof t},isWhitespace:function(t){return" "===t||"\r"===t||"\t"===t||"\n"===t||"\v"===t||" "===t},isIdent:function(t){return"a"<=t&&t<="z"||"A"<=t&&t<="Z"||"_"===t||"$"===t},isExpOperator:function(t){return"-"===t||"+"===t||this.isNumber(t)},throwError:function(t,e,n){n=n||this.index;var i=ht(e)?"s "+e+"-"+this.index+" ["+this.text.substring(e,n)+"]":" "+n;throw Oi("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",t,i,this.text)},readNumber:function(){for(var t="",e=this.index;this.index<this.text.length;){var n=N(this.text.charAt(this.index));if("."==n||this.isNumber(n))t+=n;else{var i=this.peek();if("e"==n&&this.isExpOperator(i))t+=n;else if(this.isExpOperator(n)&&i&&this.isNumber(i)&&"e"==t.charAt(t.length-1))t+=n;else{if(!this.isExpOperator(n)||i&&this.isNumber(i)||"e"!=t.charAt(t.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:e,text:t,constant:!0,value:Number(t)})},readIdent:function(){for(var t=this.index;this.index<this.text.length;){var e=this.text.charAt(this.index);if(!this.isIdent(e)&&!this.isNumber(e))break;this.index++}this.tokens.push({index:t,text:this.text.slice(t,this.index),identifier:!0})},readString:function(t){var e=this.index;this.index++;for(var n="",i=t,r=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(i+=o,r){if("u"===o){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,n+=String.fromCharCode(parseInt(a,16))}else{n+=ji[o]||o}r=!1}else if("\\"===o)r=!0;else{if(o===t)return this.index++,void this.tokens.push({index:e,text:i,constant:!0,value:n});n+=o}this.index++}this.throwError("Unterminated quote",e)}};var zi=function(t,e){this.lexer=t,this.options=e};function Bi(t,e){return void 0!==t?t:e}function Vi(t,e){return void 0===t?e:void 0===e?t:t+e}function Wi(t,e){return!t(e).$stateful}function qi(t,e){var n,i;switch(t.type){case zi.Program:n=!0,ot(t.body,function(t){qi(t.expression,e),n=n&&t.expression.constant}),t.constant=n;break;case zi.Literal:t.constant=!0,t.toWatch=[];break;case zi.UnaryExpression:qi(t.argument,e),t.constant=t.argument.constant,t.toWatch=t.argument.toWatch;break;case zi.BinaryExpression:qi(t.left,e),qi(t.right,e),t.constant=t.left.constant&&t.right.constant,t.toWatch=t.left.toWatch.concat(t.right.toWatch);break;case zi.LogicalExpression:qi(t.left,e),qi(t.right,e),t.constant=t.left.constant&&t.right.constant,t.toWatch=t.constant?[]:[t];break;case zi.ConditionalExpression:qi(t.test,e),qi(t.alternate,e),qi(t.consequent,e),t.constant=t.test.constant&&t.alternate.constant&&t.consequent.constant,t.toWatch=t.constant?[]:[t];break;case zi.Identifier:t.constant=!1,t.toWatch=[t];break;case zi.MemberExpression:qi(t.object,e),t.computed&&qi(t.property,e),t.constant=t.object.constant&&(!t.computed||t.property.constant),t.toWatch=[t];break;case zi.CallExpression:n=!!t.filter&&Wi(e,t.callee.name),i=[],ot(t.arguments,function(t){qi(t,e),n=n&&t.constant,t.constant||i.push.apply(i,t.toWatch)}),t.constant=n,t.toWatch=t.filter&&Wi(e,t.callee.name)?i:[t];break;case zi.AssignmentExpression:qi(t.left,e),qi(t.right,e),t.constant=t.left.constant&&t.right.constant,t.toWatch=[t];break;case zi.ArrayExpression:n=!0,i=[],ot(t.elements,function(t){qi(t,e),n=n&&t.constant,t.constant||i.push.apply(i,t.toWatch)}),t.constant=n,t.toWatch=i;break;case zi.ObjectExpression:n=!0,i=[],ot(t.properties,function(t){qi(t.value,e),n=n&&t.value.constant,t.value.constant||i.push.apply(i,t.value.toWatch)}),t.constant=n,t.toWatch=i;break;case zi.ThisExpression:t.constant=!1,t.toWatch=[]}}function Ui(t){if(1==t.length){var e=t[0].expression,n=e.toWatch;return 1!==n.length?n:n[0]!==e?n:nt}}function Ji(t){return t.type===zi.Identifier||t.type===zi.MemberExpression}function Gi(t){if(1===t.body.length&&Ji(t.body[0].expression))return{type:zi.AssignmentExpression,left:t.body[0].expression,right:{type:zi.NGValueParameter},operator:"="}}function Yi(t){return 0===t.body.length||1===t.body.length&&(t.body[0].expression.type===zi.Literal||t.body[0].expression.type===zi.ArrayExpression||t.body[0].expression.type===zi.ObjectExpression)}function Xi(t){return t.constant}function Ki(t,e){this.astBuilder=t,this.$filter=e}function Qi(t,e){this.astBuilder=t,this.$filter=e}zi.Program="Program",zi.ExpressionStatement="ExpressionStatement",zi.AssignmentExpression="AssignmentExpression",zi.ConditionalExpression="ConditionalExpression",zi.LogicalExpression="LogicalExpression",zi.BinaryExpression="BinaryExpression",zi.UnaryExpression="UnaryExpression",zi.CallExpression="CallExpression",zi.MemberExpression="MemberExpression",zi.Identifier="Identifier",zi.Literal="Literal",zi.ArrayExpression="ArrayExpression",zi.Property="Property",zi.ObjectExpression="ObjectExpression",zi.ThisExpression="ThisExpression",zi.NGValueParameter="NGValueParameter",zi.prototype={ast:function(t){this.text=t,this.tokens=this.lexer.lex(t);var e=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),e},program:function(){for(var t=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&t.push(this.expressionStatement()),!this.expect(";"))return{type:zi.Program,body:t}},expressionStatement:function(){return{type:zi.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var t=this.expression();this.expect("|");)t=this.filter(t);return t},expression:function(){return this.assignment()},assignment:function(){var t=this.ternary();return this.expect("=")&&(t={type:zi.AssignmentExpression,left:t,right:this.assignment(),operator:"="}),t},ternary:function(){var t,e,n=this.logicalOR();return this.expect("?")&&(t=this.expression(),this.consume(":"))?(e=this.expression(),{type:zi.ConditionalExpression,test:n,alternate:t,consequent:e}):n},logicalOR:function(){for(var t=this.logicalAND();this.expect("||");)t={type:zi.LogicalExpression,operator:"||",left:t,right:this.logicalAND()};return t},logicalAND:function(){for(var t=this.equality();this.expect("&&");)t={type:zi.LogicalExpression,operator:"&&",left:t,right:this.equality()};return t},equality:function(){for(var t,e=this.relational();t=this.expect("==","!=","===","!==");)e={type:zi.BinaryExpression,operator:t.text,left:e,right:this.relational()};return e},relational:function(){for(var t,e=this.additive();t=this.expect("<",">","<=",">=");)e={type:zi.BinaryExpression,operator:t.text,left:e,right:this.additive()};return e},additive:function(){for(var t,e=this.multiplicative();t=this.expect("+","-");)e={type:zi.BinaryExpression,operator:t.text,left:e,right:this.multiplicative()};return e},multiplicative:function(){for(var t,e=this.unary();t=this.expect("*","/","%");)e={type:zi.BinaryExpression,operator:t.text,left:e,right:this.unary()};return e},unary:function(){var t;return(t=this.expect("+","-","!"))?{type:zi.UnaryExpression,operator:t.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var t,e;for(this.expect("(")?(t=this.filterChain(),this.consume(")")):this.expect("[")?t=this.arrayDeclaration():this.expect("{")?t=this.object():this.constants.hasOwnProperty(this.peek().text)?t=V(this.constants[this.consume().text]):this.peek().identifier?t=this.identifier():this.peek().constant?t=this.constant():this.throwError("not a primary expression",this.peek());e=this.expect("(","[",".");)"("===e.text?(t={type:zi.CallExpression,callee:t,arguments:this.parseArguments()},this.consume(")")):"["===e.text?(t={type:zi.MemberExpression,object:t,property:this.expression(),computed:!0},this.consume("]")):"."===e.text?t={type:zi.MemberExpression,object:t,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return t},filter:function(t){for(var e=[t],n={type:zi.CallExpression,callee:this.identifier(),arguments:e,filter:!0};this.expect(":");)e.push(this.expression());return n},parseArguments:function(){var t=[];if(")"!==this.peekToken().text)for(;t.push(this.expression()),this.expect(","););return t},identifier:function(){var t=this.consume();return t.identifier||this.throwError("is not a valid identifier",t),{type:zi.Identifier,name:t.text}},constant:function(){return{type:zi.Literal,value:this.consume().value}},arrayDeclaration:function(){var t=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;t.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:zi.ArrayExpression,elements:t}},object:function(){var t,e=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;t={type:zi.Property,kind:"init"},this.peek().constant?t.key=this.constant():this.peek().identifier?t.key=this.identifier():this.throwError("invalid key",this.peek()),this.consume(":"),t.value=this.expression(),e.push(t)}while(this.expect(","));return this.consume("}"),{type:zi.ObjectExpression,properties:e}},throwError:function(t,e){throw Oi("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",e.text,t,e.index+1,this.text,this.text.substring(e.index))},consume:function(t){if(0===this.tokens.length)throw Oi("ueoe","Unexpected end of expression: {0}",this.text);var e=this.expect(t);return e||this.throwError("is unexpected, expecting ["+t+"]",this.peek()),e},peekToken:function(){if(0===this.tokens.length)throw Oi("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(t,e,n,i){return this.peekAhead(0,t,e,n,i)},peekAhead:function(t,e,n,i,r){if(this.tokens.length>t){var o=this.tokens[t],a=o.text;if(a===e||a===n||a===i||a===r||!e&&!n&&!i&&!r)return o}return!1},expect:function(t,e,n,i){var r=this.peek(t,e,n,i);return!!r&&(this.tokens.shift(),r)},constants:{true:{type:zi.Literal,value:!0},false:{type:zi.Literal,value:!1},null:{type:zi.Literal,value:null},undefined:{type:zi.Literal,value:nt},this:{type:zi.ThisExpression}}},Ki.prototype={compile:function(t,e){var r=this,n=this.astBuilder.ast(t);this.state={nextId:0,filters:{},expensiveChecks:e,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},qi(n,r.$filter);var i,o="";if(this.stage="assign",i=Gi(n)){this.state.computing="assign";var a=this.nextId();this.recurse(i,a),this.return_(a),o="fn.assign="+this.generateFunction("assign","s,v,l")}var s=Ui(n.body);r.stage="inputs",ot(s,function(t,e){var n="fn"+e;r.state[n]={vars:[],body:[],own:{}},r.state.computing=n;var i=r.nextId();r.recurse(t,i),r.return_(i),r.state.inputs.push(n),t.watchId=e}),this.state.computing="fn",this.stage="main",this.recurse(n);var l='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+o+this.watchFns()+"return fn;",c=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",l)(this.$filter,Di,Mi,Ri,Pi,Li,Bi,Vi,t);return this.state=this.stage=nt,c.literal=Yi(n),c.constant=Xi(n),c},USE:"use",STRICT:"strict",watchFns:function(){var e=[],t=this.state.inputs,n=this;return ot(t,function(t){e.push("var "+t+"="+n.generateFunction(t,"s"))}),t.length&&e.push("fn.inputs=["+t.join(",")+"];"),e.join("")},generateFunction:function(t,e){return"function("+e+"){"+this.varsPrefix(t)+this.body(t)+"};"},filterPrefix:function(){var n=[],i=this;return ot(this.state.filters,function(t,e){n.push(t+"=$filter("+i.escape(e)+")")}),n.length?"var "+n.join(",")+";":""},varsPrefix:function(t){return this.state[t].vars.length?"var "+this.state[t].vars.join(",")+";":""},body:function(t){return this.state[t].body.join("")},recurse:function(n,t,e,i,r,o){var a,s,l,c,u=this;if(i=i||lt,!o&&ht(n.watchId))return t=t||this.nextId(),void this.if_("i",this.lazyAssign(t,this.computedMember("i",n.watchId)),this.lazyRecurse(n,t,e,i,r,!0));switch(n.type){case zi.Program:ot(n.body,function(t,e){u.recurse(t.expression,nt,nt,function(t){s=t}),e!==n.body.length-1?u.current().body.push(s,";"):u.return_(s)});break;case zi.Literal:c=this.escape(n.value),this.assign(t,c),i(c);break;case zi.UnaryExpression:this.recurse(n.argument,nt,nt,function(t){s=t}),c=n.operator+"("+this.ifDefined(s,0)+")",this.assign(t,c),i(c);break;case zi.BinaryExpression:this.recurse(n.left,nt,nt,function(t){a=t}),this.recurse(n.right,nt,nt,function(t){s=t}),c="+"===n.operator?this.plus(a,s):"-"===n.operator?this.ifDefined(a,0)+n.operator+this.ifDefined(s,0):"("+a+")"+n.operator+"("+s+")",this.assign(t,c),i(c);break;case zi.LogicalExpression:t=t||this.nextId(),u.recurse(n.left,t),u.if_("&&"===n.operator?t:u.not(t),u.lazyRecurse(n.right,t)),i(t);break;case zi.ConditionalExpression:t=t||this.nextId(),u.recurse(n.test,t),u.if_(t,u.lazyRecurse(n.alternate,t),u.lazyRecurse(n.consequent,t)),i(t);break;case zi.Identifier:t=t||this.nextId(),e&&(e.context="inputs"===u.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",n.name)+"?l:s"),e.computed=!1,e.name=n.name),Di(n.name),u.if_("inputs"===u.stage||u.not(u.getHasOwnProperty("l",n.name)),function(){u.if_("inputs"===u.stage||"s",function(){r&&1!==r&&u.if_(u.not(u.nonComputedMember("s",n.name)),u.lazyAssign(u.nonComputedMember("s",n.name),"{}")),u.assign(t,u.nonComputedMember("s",n.name))})},t&&u.lazyAssign(t,u.nonComputedMember("l",n.name))),(u.state.expensiveChecks||tr(n.name))&&u.addEnsureSafeObject(t),i(t);break;case zi.MemberExpression:a=e&&(e.context=this.nextId())||this.nextId(),t=t||this.nextId(),u.recurse(n.object,a,nt,function(){u.if_(u.notNull(a),function(){r&&1!==r&&u.addEnsureSafeAssignContext(a),n.computed?(s=u.nextId(),u.recurse(n.property,s),u.getStringValue(s),u.addEnsureSafeMemberName(s),r&&1!==r&&u.if_(u.not(u.computedMember(a,s)),u.lazyAssign(u.computedMember(a,s),"{}")),c=u.ensureSafeObject(u.computedMember(a,s)),u.assign(t,c),e&&(e.computed=!0,e.name=s)):(Di(n.property.name),r&&1!==r&&u.if_(u.not(u.nonComputedMember(a,n.property.name)),u.lazyAssign(u.nonComputedMember(a,n.property.name),"{}")),c=u.nonComputedMember(a,n.property.name),(u.state.expensiveChecks||tr(n.property.name))&&(c=u.ensureSafeObject(c)),u.assign(t,c),e&&(e.computed=!1,e.name=n.property.name))},function(){u.assign(t,"undefined")}),i(t)},!!r);break;case zi.CallExpression:t=t||this.nextId(),n.filter?(s=u.filter(n.callee.name),l=[],ot(n.arguments,function(t){var e=u.nextId();u.recurse(t,e),l.push(e)}),c=s+"("+l.join(",")+")",u.assign(t,c),i(t)):(s=u.nextId(),a={},l=[],u.recurse(n.callee,s,a,function(){u.if_(u.notNull(s),function(){u.addEnsureSafeFunction(s),ot(n.arguments,function(t){u.recurse(t,u.nextId(),nt,function(t){l.push(u.ensureSafeObject(t))})}),c=a.name?(u.state.expensiveChecks||u.addEnsureSafeObject(a.context),u.member(a.context,a.name,a.computed)+"("+l.join(",")+")"):s+"("+l.join(",")+")",c=u.ensureSafeObject(c),u.assign(t,c)},function(){u.assign(t,"undefined")}),i(t)}));break;case zi.AssignmentExpression:if(s=this.nextId(),a={},!Ji(n.left))throw Oi("lval","Trying to assign a value to a non l-value");this.recurse(n.left,nt,a,function(){u.if_(u.notNull(a.context),function(){u.recurse(n.right,s),u.addEnsureSafeObject(u.member(a.context,a.name,a.computed)),u.addEnsureSafeAssignContext(a.context),c=u.member(a.context,a.name,a.computed)+n.operator+s,u.assign(t,c),i(t||c)})},1);break;case zi.ArrayExpression:l=[],ot(n.elements,function(t){u.recurse(t,u.nextId(),nt,function(t){l.push(t)})}),c="["+l.join(",")+"]",this.assign(t,c),i(c);break;case zi.ObjectExpression:l=[],ot(n.properties,function(e){u.recurse(e.value,u.nextId(),nt,function(t){l.push(u.escape(e.key.type===zi.Identifier?e.key.name:""+e.key.value)+":"+t)})}),c="{"+l.join(",")+"}",this.assign(t,c),i(c);break;case zi.ThisExpression:this.assign(t,"s"),i("s");break;case zi.NGValueParameter:this.assign(t,"v"),i("v")}},getHasOwnProperty:function(t,e){var n=t+"."+e,i=this.current().own;return i.hasOwnProperty(n)||(i[n]=this.nextId(!1,t+"&&("+this.escape(e)+" in "+t+")")),i[n]},assign:function(t,e){if(t)return this.current().body.push(t,"=",e,";"),t},filter:function(t){return this.state.filters.hasOwnProperty(t)||(this.state.filters[t]=this.nextId(!0)),this.state.filters[t]},ifDefined:function(t,e){return"ifDefined("+t+","+this.escape(e)+")"},plus:function(t,e){return"plus("+t+","+e+")"},return_:function(t){this.current().body.push("return ",t,";")},if_:function(t,e,n){if(!0===t)e();else{var i=this.current().body;i.push("if(",t,"){"),e(),i.push("}"),n&&(i.push("else{"),n(),i.push("}"))}},not:function(t){return"!("+t+")"},notNull:function(t){return t+"!=null"},nonComputedMember:function(t,e){return t+"."+e},computedMember:function(t,e){return t+"["+e+"]"},member:function(t,e,n){return n?this.computedMember(t,e):this.nonComputedMember(t,e)},addEnsureSafeObject:function(t){this.current().body.push(this.ensureSafeObject(t),";")},addEnsureSafeMemberName:function(t){this.current().body.push(this.ensureSafeMemberName(t),";")},addEnsureSafeFunction:function(t){this.current().body.push(this.ensureSafeFunction(t),";")},addEnsureSafeAssignContext:function(t){this.current().body.push(this.ensureSafeAssignContext(t),";")},ensureSafeObject:function(t){return"ensureSafeObject("+t+",text)"},ensureSafeMemberName:function(t){return"ensureSafeMemberName("+t+",text)"},ensureSafeFunction:function(t){return"ensureSafeFunction("+t+",text)"},getStringValue:function(t){this.assign(t,"getStringValue("+t+",text)")},ensureSafeAssignContext:function(t){return"ensureSafeAssignContext("+t+",text)"},lazyRecurse:function(t,e,n,i,r,o){var a=this;return function(){a.recurse(t,e,n,i,r,o)}},lazyAssign:function(t,e){var n=this;return function(){n.assign(t,e)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)},escape:function(t){if(ft(t))return"'"+t.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(b(t))return t.toString();if(!0===t)return"true";if(!1===t)return"false";if(null===t)return"null";if(void 0===t)return"undefined";throw Oi("esc","IMPOSSIBLE")},nextId:function(t,e){var n="v"+this.state.nextId++;return t||this.current().vars.push(n+(e?"="+e:"")),n},current:function(){return this.state[this.state.computing]}},Qi.prototype={compile:function(t,e){var n,i,r=this,o=this.astBuilder.ast(t);this.expression=t,this.expensiveChecks=e,qi(o,r.$filter),(n=Gi(o))&&(i=this.recurse(n));var a,s=Ui(o.body);s&&(a=[],ot(s,function(t,e){var n=r.recurse(t);t.input=n,a.push(n),t.watchId=e}));var l=[];ot(o.body,function(t){l.push(r.recurse(t.expression))});var c=0===o.body.length?function(){}:1===o.body.length?l[0]:function(e,n){var i;return ot(l,function(t){i=t(e,n)}),i};return i&&(c.assign=function(t,e,n){return i(t,n,e)}),a&&(c.inputs=a),c.literal=Yi(o),c.constant=Xi(o),c},recurse:function(t,l,e){var a,c,u,h=this;if(t.input)return this.inputs(t.input,t.watchId);switch(t.type){case zi.Literal:return this.value(t.value,l);case zi.UnaryExpression:return c=this.recurse(t.argument),this["unary"+t.operator](c,l);case zi.BinaryExpression:case zi.LogicalExpression:return a=this.recurse(t.left),c=this.recurse(t.right),this["binary"+t.operator](a,c,l);case zi.ConditionalExpression:return this["ternary?:"](this.recurse(t.test),this.recurse(t.alternate),this.recurse(t.consequent),l);case zi.Identifier:return Di(t.name,h.expression),h.identifier(t.name,h.expensiveChecks||tr(t.name),l,e,h.expression);case zi.MemberExpression:return a=this.recurse(t.object,!1,!!e),t.computed||(Di(t.property.name,h.expression),c=t.property.name),t.computed&&(c=this.recurse(t.property)),t.computed?this.computedMember(a,c,l,e,h.expression):this.nonComputedMember(a,c,h.expensiveChecks,l,e,h.expression);case zi.CallExpression:return u=[],ot(t.arguments,function(t){u.push(h.recurse(t))}),t.filter&&(c=this.$filter(t.callee.name)),t.filter||(c=this.recurse(t.callee,!0)),t.filter?function(t,e,n,i){for(var r=[],o=0;o<u.length;++o)r.push(u[o](t,e,n,i));var a=c.apply(nt,r,i);return l?{context:nt,name:nt,value:a}:a}:function(t,e,n,i){var r,o=c(t,e,n,i);if(null!=o.value){Mi(o.context,h.expression),Ri(o.value,h.expression);for(var a=[],s=0;s<u.length;++s)a.push(Mi(u[s](t,e,n,i),h.expression));r=Mi(o.value.apply(o.context,a),h.expression)}return l?{value:r}:r};case zi.AssignmentExpression:return a=this.recurse(t.left,!0,1),c=this.recurse(t.right),function(t,e,n,i){var r=a(t,e,n,i),o=c(t,e,n,i);return Mi(r.value,h.expression),Li(r.context),r.context[r.name]=o,l?{value:o}:o};case zi.ArrayExpression:return u=[],ot(t.elements,function(t){u.push(h.recurse(t))}),function(t,e,n,i){for(var r=[],o=0;o<u.length;++o)r.push(u[o](t,e,n,i));return l?{value:r}:r};case zi.ObjectExpression:return u=[],ot(t.properties,function(t){u.push({key:t.key.type===zi.Identifier?t.key.name:""+t.key.value,value:h.recurse(t.value)})}),function(t,e,n,i){for(var r={},o=0;o<u.length;++o)r[u[o].key]=u[o].value(t,e,n,i);return l?{value:r}:r};case zi.ThisExpression:return function(t){return l?{value:t}:t};case zi.NGValueParameter:return function(t,e,n,i){return l?{value:n}:n}}},"unary+":function(o,a){return function(t,e,n,i){var r=o(t,e,n,i);return r=ht(r)?+r:0,a?{value:r}:r}},"unary-":function(o,a){return function(t,e,n,i){var r=o(t,e,n,i);return r=ht(r)?-r:0,a?{value:r}:r}},"unary!":function(o,a){return function(t,e,n,i){var r=!o(t,e,n,i);return a?{value:r}:r}},"binary+":function(o,a,s){return function(t,e,n,i){var r=Vi(o(t,e,n,i),a(t,e,n,i));return s?{value:r}:r}},"binary-":function(s,l,c){return function(t,e,n,i){var r=s(t,e,n,i),o=l(t,e,n,i),a=(ht(r)?r:0)-(ht(o)?o:0);return c?{value:a}:a}},"binary*":function(o,a,s){return function(t,e,n,i){var r=o(t,e,n,i)*a(t,e,n,i);return s?{value:r}:r}},"binary/":function(o,a,s){return function(t,e,n,i){var r=o(t,e,n,i)/a(t,e,n,i);return s?{value:r}:r}},"binary%":function(o,a,s){return function(t,e,n,i){var r=o(t,e,n,i)%a(t,e,n,i);return s?{value:r}:r}},"binary===":function(o,a,s){return function(t,e,n,i){var r=o(t,e,n,i)===a(t,e,n,i);return s?{value:r}:r}},"binary!==":function(o,a,s){return function(t,e,n,i){var r=o(t,e,n,i)!==a(t,e,n,i);return s?{value:r}:r}},"binary==":function(o,a,s){return function(t,e,n,i){var r=o(t,e,n,i)==a(t,e,n,i);return s?{value:r}:r}},"binary!=":function(o,a,s){return function(t,e,n,i){var r=o(t,e,n,i)!=a(t,e,n,i);return s?{value:r}:r}},"binary<":function(o,a,s){return function(t,e,n,i){var r=o(t,e,n,i)<a(t,e,n,i);return s?{value:r}:r}},"binary>":function(o,a,s){return function(t,e,n,i){var r=o(t,e,n,i)>a(t,e,n,i);return s?{value:r}:r}},"binary<=":function(o,a,s){return function(t,e,n,i){var r=o(t,e,n,i)<=a(t,e,n,i);return s?{value:r}:r}},"binary>=":function(o,a,s){return function(t,e,n,i){var r=o(t,e,n,i)>=a(t,e,n,i);return s?{value:r}:r}},"binary&&":function(o,a,s){return function(t,e,n,i){var r=o(t,e,n,i)&&a(t,e,n,i);return s?{value:r}:r}},"binary||":function(o,a,s){return function(t,e,n,i){var r=o(t,e,n,i)||a(t,e,n,i);return s?{value:r}:r}},"ternary?:":function(o,a,s,l){return function(t,e,n,i){var r=o(t,e,n,i)?a(t,e,n,i):s(t,e,n,i);return l?{value:r}:r}},value:function(t,e){return function(){return e?{context:nt,name:nt,value:t}:t}},identifier:function(a,s,l,c,u){return function(t,e,n,i){var r=e&&a in e?e:t;c&&1!==c&&r&&!r[a]&&(r[a]={});var o=r?r[a]:nt;return s&&Mi(o,u),l?{context:r,name:a,value:o}:o}},computedMember:function(s,l,c,u,h){return function(t,e,n,i){var r,o,a=s(t,e,n,i);return null!=a&&(Di(r=Pi(r=l(t,e,n,i)),h),u&&1!==u&&(Li(a),a&&!a[r]&&(a[r]={})),Mi(o=a[r],h)),c?{context:a,name:r,value:o}:o}},nonComputedMember:function(a,s,l,c,u,h){return function(t,e,n,i){var r=a(t,e,n,i);u&&1!==u&&(Li(r),r&&!r[s]&&(r[s]={}));var o=null!=r?r[s]:nt;return(l||tr(s))&&Mi(o,h),c?{context:r,name:s,value:o}:o}},inputs:function(r,o){return function(t,e,n,i){return i?i[o]:r(t,e,n)}}};var Zi=function(t,e,n){this.lexer=t,this.$filter=e,this.options=n,this.ast=new zi(this.lexer),this.astCompiler=n.csp?new Qi(this.ast,e):new Ki(this.ast,e)};function tr(t){return"constructor"==t}Zi.prototype={constructor:Zi,parse:function(t){return this.astCompiler.compile(t,this.options.expensiveChecks)}};var er=Object.prototype.valueOf;function nr(t){return gt(t.valueOf)?t.valueOf():er.call(t)}function ir(){var x=Ut(),_=Ut();this.$get=["$filter",function(c){var t=q().noUnsafeEval,u={csp:t,expensiveChecks:!1},h={csp:t,expensiveChecks:!0},d=!1;return e.$$runningExpensiveChecks=function(){return d},e;function e(t,e,n){var i,r,o;switch(n=n||d,typeof t){case"string":t=t.trim();var a=n?_:x;if(!(i=a[o=t])){":"===t.charAt(0)&&":"===t.charAt(1)&&(r=!0,t=t.substring(2));var s=n?h:u,l=new Fi(s);(i=new Zi(l,c,s).parse(t)).constant?i.$$watchDelegate=y:r?i.$$watchDelegate=i.literal?v:m:i.inputs&&(i.$$watchDelegate=g),n&&(i=f(i)),a[o]=i}return b(i,e);case"function":return b(t,e);default:return b(lt,e)}}function f(o){if(!o)return o;e.$$watchDelegate=o.$$watchDelegate,e.assign=f(o.assign),e.constant=o.constant,e.literal=o.literal;for(var t=0;o.inputs&&t<o.inputs.length;++t)o.inputs[t]=f(o.inputs[t]);return e.inputs=o.inputs,e;function e(t,e,n,i){var r=d;d=!0;try{return o(t,e,n,i)}finally{d=r}}}function p(t,e){return null==t||null==e?t===e:("object"!=typeof t||"object"!=typeof(t=nr(t)))&&(t===e||t!=t&&e!=e)}function g(t,e,n,o,i){var a,s=o.inputs;if(1===s.length){var r=p;return s=s[0],t.$watch(function(t){var e=s(t);return p(e,r)||(a=o(t,nt,nt,[e]),r=e&&nr(e)),a},e,n,i)}for(var l=[],c=[],u=0,h=s.length;u<h;u++)l[u]=p,c[u]=null;return t.$watch(function(t){for(var e=!1,n=0,i=s.length;n<i;n++){var r=s[n](t);(e||(e=!p(r,l[n])))&&(c[n]=r,l[n]=r&&nr(r))}return e&&(a=o(t,nt,nt,c)),a},e,n,i)}function m(t,i,e,n){var r,o;return r=t.$watch(function(t){return n(t)},function(t,e,n){o=t,gt(i)&&i.apply(this,arguments),ht(t)&&n.$$postDigest(function(){ht(o)&&r()})},e)}function v(t,i,e,n){var r,o;return r=t.$watch(function(t){return n(t)},function(t,e,n){o=t,gt(i)&&i.call(this,t,e,n),a(t)&&n.$$postDigest(function(){a(o)&&r()})},e);function a(t){var e=!0;return ot(t,function(t){ht(t)||(e=!1)}),e}}function y(t,i,e,n){var r;return r=t.$watch(function(t){return n(t)},function(t,e,n){gt(i)&&i.apply(this,arguments),r()},e)}function b(a,s){if(!s)return a;var t=a.$$watchDelegate,o=!1,e=t!==v&&t!==m?function(t,e,n,i){var r=o&&i?i[0]:a(t,e,n,i);return s(r,t,e)}:function(t,e,n,i){var r=a(t,e,n,i),o=s(r,t,e);return ht(r)?o:r};return a.$$watchDelegate&&a.$$watchDelegate!==g?e.$$watchDelegate=a.$$watchDelegate:s.$stateful||(e.$$watchDelegate=g,o=!a.inputs,e.inputs=a.inputs?a.inputs:[a]),e}}]}function rr(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return ar(function(t){e.$evalAsync(t)},t)}]}function or(){this.$get=["$browser","$exceptionHandler",function(e,t){return ar(function(t){e.defer(t)},t)}]}function ar(e,a){var o=w("$q",TypeError);function i(n,t,e){var i=!1;function r(e){return function(t){i||(i=!0,e.call(n,t))}}return[r(t),r(e)]}var t=function(){return new c};function n(){this.$$state={status:0}}function r(e,n){return function(t){n.call(e,t)}}function s(t){var e,n,i;i=t.pending,t.processScheduled=!1,t.pending=nt;for(var r=0,o=i.length;r<o;++r){n=i[r][0],e=i[r][t.status];try{gt(e)?n.resolve(e(t.value)):1===t.status?n.resolve(t.value):n.reject(t.value)}catch(t){n.reject(t),a(t)}}}function l(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){s(t)}))}function c(){this.promise=new n,this.resolve=r(this,this.resolve),this.reject=r(this,this.reject),this.notify=r(this,this.notify)}at(n.prototype,{then:function(t,e,n){if(ut(t)&&ut(e)&&ut(n))return this;var i=new c;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([i,t,e,n]),0<this.$$state.status&&l(this.$$state),i.promise},catch:function(t){return this.then(null,t)},finally:function(e,t){return this.then(function(t){return d(t,!0,e)},function(t){return d(t,!1,e)},t)}}),at(c.prototype,{resolve:function(t){this.promise.$$state.status||(t===this.promise?this.$$reject(o("qcycle","Expected promise to be resolved with value other than itself '{0}'",t)):this.$$resolve(t))},$$resolve:function(t){var e,n;n=i(this,this.$$resolve,this.$$reject);try{(dt(t)||gt(t))&&(e=t&&t.then),gt(e)?(this.promise.$$state.status=-1,e.call(t,n[0],n[1],this.notify)):(this.promise.$$state.value=t,this.promise.$$state.status=1,l(this.promise.$$state))}catch(t){n[1](t),a(t)}},reject:function(t){this.promise.$$state.status||this.$$reject(t)},$$reject:function(t){this.promise.$$state.value=t,this.promise.$$state.status=2,l(this.promise.$$state)},notify:function(r){var o=this.promise.$$state.pending;this.promise.$$state.status<=0&&o&&o.length&&e(function(){for(var t,e,n=0,i=o.length;n<i;n++){e=o[n][0],t=o[n][3];try{e.notify(gt(t)?t(r):r)}catch(t){a(t)}}})}});var u=function(t){var e=new c;return e.reject(t),e.promise},h=function(t,e){var n=new c;return e?n.resolve(t):n.reject(t),n.promise},d=function(t,e,n){var i=null;try{gt(n)&&(i=n())}catch(t){return h(t,!1)}return I(i)?i.then(function(){return h(t,e)},function(t){return h(t,!1)}):h(t,e)},f=function(t,e,n,i){var r=new c;return r.resolve(t),r.promise.then(e,n,i)},p=f;function g(t){var n=new c,i=0,r=pt(t)?[]:{};return ot(t,function(t,e){i++,f(t).then(function(t){r.hasOwnProperty(e)||(r[e]=t,--i||n.resolve(r))},function(t){r.hasOwnProperty(e)||n.reject(t)})}),0===i&&n.resolve(r),n.promise}var m=function t(e){if(!gt(e))throw o("norslvr","Expected resolverFn, got '{0}'",e);if(!(this instanceof t))return new t(e);var n=new c;function i(t){n.resolve(t)}function r(t){n.reject(t)}return e(i,r),n.promise};return m.defer=t,m.reject=u,m.when=f,m.resolve=p,m.all=g,m}function sr(){this.$get=["$window","$timeout",function(t,n){var i=t.requestAnimationFrame||t.webkitRequestAnimationFrame,r=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.webkitCancelRequestAnimationFrame,e=!!i,o=e?function(t){var e=i(t);return function(){r(e)}}:function(t){var e=n(t,16.66,!1);return function(){n.cancel(e)}};return o.supported=e,o}]}function lr(){var S=10,C=w("$rootScope"),T=null,$=null;function c(t){function e(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=k(),this.$$ChildScope=null}return e.prototype=t,e}this.digestTtl=function(t){return arguments.length&&(S=t),S},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(t,f,g,p){function i(t){t.currentScope.$$destroyed=!0}function n(t){9===it&&(t.$$childHead&&n(t.$$childHead),t.$$nextSibling&&n(t.$$nextSibling)),t.$parent=t.$$nextSibling=t.$$prevSibling=t.$$childHead=t.$$childTail=t.$root=t.$$watchers=null}function r(){this.$id=k(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,(this.$root=this).$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}r.prototype={constructor:r,$new:function(t,e){var n;return e=e||this,t?(n=new r).$root=this.$root:(this.$$ChildScope||(this.$$ChildScope=c(this)),n=new this.$$ChildScope),n.$parent=e,n.$$prevSibling=e.$$childTail,e.$$childHead?(e.$$childTail.$$nextSibling=n,e.$$childTail=n):e.$$childHead=e.$$childTail=n,(t||e!=this)&&n.$on("$destroy",i),n},$watch:function(t,e,n,i){var r=g(t);if(r.$$watchDelegate)return r.$$watchDelegate(this,e,n,r,t);var o=this,a=o.$$watchers,s={fn:e,last:_,get:r,exp:i||t,eq:!!n};return T=null,gt(e)||(s.fn=lt),a||(a=o.$$watchers=[]),a.unshift(s),l(this,1),function(){0<=xt(a,s)&&l(o,-1),T=null}},$watchGroup:function(t,i){var r=new Array(t.length),o=new Array(t.length),a=[],s=this,l=!1,e=!0;if(!t.length){var n=!0;return s.$evalAsync(function(){n&&i(o,o,s)}),function(){n=!1}}if(1===t.length)return this.$watch(t[0],function(t,e,n){o[0]=t,r[0]=e,i(o,t===e?o:r,n)});function c(){l=!1,e?(e=!1,i(o,o,s)):i(o,r,s)}return ot(t,function(t,n){var e=s.$watch(t,function(t,e){o[n]=t,r[n]=e,l||(l=!0,s.$evalAsync(c))});a.push(e)}),function(){for(;a.length;)a.shift()()}},$watchCollection:function(t,n){f.$stateful=!0;var a,s,i,r=this,o=1<n.length,l=0,e=g(t,f),c=[],u={},h=!0,d=0;function f(t){var e,n,i,r;if(!ut(a=t)){if(dt(a))if(L(a)){s!==c&&(d=(s=c).length=0,l++),e=a.length,d!==e&&(l++,s.length=d=e);for(var o=0;o<e;o++)r=s[o],i=a[o],r!=r&&i!=i||r===i||(l++,s[o]=i)}else{for(n in s!==u&&(s=u={},d=0,l++),e=0,a)R.call(a,n)&&(e++,i=a[n],r=s[n],n in s?r!=r&&i!=i||r===i||(l++,s[n]=i):(d++,s[n]=i,l++));if(e<d)for(n in l++,s)R.call(a,n)||(d--,delete s[n])}else s!==a&&(s=a,l++);return l}}function p(){if(h?(h=!1,n(a,a,r)):n(a,i,r),o)if(dt(a))if(L(a)){i=new Array(a.length);for(var t=0;t<a.length;t++)i[t]=a[t]}else for(var e in i={},a)R.call(a,e)&&(i[e]=a[e]);else i=a}return this.$watch(e,p)},$digest:function(){var t,e,n,i,r,o,a,s,l,c,u=S,h=this,d=[];b("$digest"),p.$$checkUrlChange(),this===m&&null!==$&&(p.defer.cancel($),w()),T=null;do{for(o=!1,s=h;v.length;){try{(c=v.shift()).scope.$eval(c.expression,c.locals)}catch(t){f(t)}T=null}t:do{if(i=s.$$watchers)for(r=i.length;r--;)try{if(t=i[r])if((e=(0,t.get)(s))===(n=t.last)||(t.eq?_t(e,n):"number"==typeof e&&"number"==typeof n&&isNaN(e)&&isNaN(n))){if(t===T){o=!1;break t}}else o=!0,(T=t).last=t.eq?V(e,null):e,(0,t.fn)(e,n===_?e:n,s),u<5&&(d[l=4-u]||(d[l]=[]),d[l].push({msg:gt(t.exp)?"fn: "+(t.exp.name||t.exp.toString()):t.exp,newVal:e,oldVal:n}))}catch(t){f(t)}if(!(a=s.$$watchersCount&&s.$$childHead||s!==h&&s.$$nextSibling))for(;s!==h&&!(a=s.$$nextSibling);)s=s.$parent}while(s=a);if((o||v.length)&&!u--)throw x(),C("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",S,d)}while(o||v.length);for(x();y.length;)try{y.shift()()}catch(t){f(t)}},$destroy:function(){if(!this.$$destroyed){var t=this.$parent;for(var e in this.$broadcast("$destroy"),this.$$destroyed=!0,this===m&&p.$$applicationDestroyed(),l(this,-this.$$watchersCount),this.$$listenerCount)a(this,this.$$listenerCount[e],e);t&&t.$$childHead==this&&(t.$$childHead=this.$$nextSibling),t&&t.$$childTail==this&&(t.$$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=lt,this.$on=this.$watch=this.$watchGroup=function(){return lt},this.$$listeners={},this.$$nextSibling=null,n(this)}},$eval:function(t,e){return g(t)(this,e)},$evalAsync:function(t,e){m.$$phase||v.length||p.defer(function(){v.length&&m.$digest()}),v.push({scope:this,expression:g(t),locals:e})},$$postDigest:function(t){y.push(t)},$apply:function(t){try{b("$apply");try{return this.$eval(t)}finally{x()}}catch(t){f(t)}finally{try{m.$digest()}catch(t){throw f(t),t}}},$applyAsync:function(t){var e=this;function n(){e.$eval(t)}t&&o.push(n),t=g(t),s()},$on:function(e,n){var i=this.$$listeners[e];i||(this.$$listeners[e]=i=[]),i.push(n);for(var t=this;t.$$listenerCount[e]||(t.$$listenerCount[e]=0),t.$$listenerCount[e]++,t=t.$parent;);var r=this;return function(){var t=i.indexOf(n);-1!==t&&(i[t]=null,a(r,1,e))}},$emit:function(t,e){var n,i,r,o=[],a=this,s=!1,l={name:t,targetScope:a,stopPropagation:function(){s=!0},preventDefault:function(){l.defaultPrevented=!0},defaultPrevented:!1},c=J([l],arguments,1);do{for(n=a.$$listeners[t]||o,l.currentScope=a,i=0,r=n.length;i<r;i++)if(n[i])try{n[i].apply(null,c)}catch(t){f(t)}else n.splice(i,1),i--,r--;if(s)return l.currentScope=null,l;a=a.$parent}while(a);return l.currentScope=null,l},$broadcast:function(t,e){var n=this,i=n,r=n,o={name:t,targetScope:n,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!n.$$listenerCount[t])return o;for(var a,s,l,c=J([o],arguments,1);i=r;){for(s=0,l=(a=(o.currentScope=i).$$listeners[t]||[]).length;s<l;s++)if(a[s])try{a[s].apply(null,c)}catch(t){f(t)}else a.splice(s,1),s--,l--;if(!(r=i.$$listenerCount[t]&&i.$$childHead||i!==n&&i.$$nextSibling))for(;i!==n&&!(r=i.$$nextSibling);)i=i.$parent}return o.currentScope=null,o}};var m=new r,v=m.$$asyncQueue=[],y=m.$$postDigestQueue=[],o=m.$$applyAsyncQueue=[];return m;function b(t){if(m.$$phase)throw C("inprog","{0} already in progress",m.$$phase);m.$$phase=t}function x(){m.$$phase=null}function l(t,e){for(;t.$$watchersCount+=e,t=t.$parent;);}function a(t,e,n){for(;t.$$listenerCount[n]-=e,0===t.$$listenerCount[n]&&delete t.$$listenerCount[n],t=t.$parent;);}function _(){}function w(){for(;o.length;)try{o.shift()()}catch(t){f(t)}$=null}function s(){null===$&&($=p.defer(function(){m.$apply(w)}))}}]}function cr(){var r=/^\s*(https?|ftp|mailto|tel|file):/,o=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return ht(t)?(r=t,this):r},this.imgSrcSanitizationWhitelist=function(t){return ht(t)?(o=t,this):o},this.$get=function(){return function(t,e){var n,i=e?o:r;return""===(n=wr(t).href)||n.match(i)?t:"unsafe:"+n}}}var ur=w("$sce"),hr={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"};function dr(t){if("self"===t)return t;if(ft(t)){if(-1<t.indexOf("***"))throw ur("iwcard","Illegal sequence *** in string matcher.  String: {0}",t);return t=F(t).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+t+"$")}if(O(t))return new RegExp("^"+t.source+"$");throw ur("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function fr(t){var e=[];return ht(t)&&ot(t,function(t){e.push(dr(t))}),e}function pr(){this.SCE_CONTEXTS=hr;var u=["self"],h=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(u=fr(t)),u},this.resourceUrlBlacklist=function(t){return arguments.length&&(h=fr(t)),h},this.$get=["$injector",function(t){var i=function(t){throw ur("unsafe","Attempting to use an unsafe value in a safe context.")};function o(t,e){return"self"===t?Sr(e):!!t.exec(e.href)}function r(t){var e,n,i=wr(t.toString()),r=!1;for(e=0,n=u.length;e<n;e++)if(o(u[e],i)){r=!0;break}if(r)for(e=0,n=h.length;e<n;e++)if(o(h[e],i)){r=!1;break}return r}function e(t){var e=function(t){this.$$unwrapTrustedValue=function(){return t}};return t&&(e.prototype=new t),e.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},e.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},e}t.has("$sanitize")&&(i=t.get("$sanitize"));var n=e(),a={};function s(t,e){var n=a.hasOwnProperty(t)?a[t]:null;if(!n)throw ur("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",t,e);if(null===e||ut(e)||""===e)return e;if("string"!=typeof e)throw ur("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",t);return new n(e)}function l(t){return t instanceof n?t.$$unwrapTrustedValue():t}function c(t,e){if(null===e||ut(e)||""===e)return e;var n=a.hasOwnProperty(t)?a[t]:null;if(n&&e instanceof n)return e.$$unwrapTrustedValue();if(t===hr.RESOURCE_URL){if(r(e))return e;throw ur("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}",e.toString())}if(t===hr.HTML)return i(e);throw ur("unsafe","Attempting to use an unsafe value in a safe context.")}return a[hr.HTML]=e(n),a[hr.CSS]=e(n),a[hr.URL]=e(n),a[hr.JS]=e(n),a[hr.RESOURCE_URL]=e(a[hr.URL]),{trustAs:s,getTrusted:c,valueOf:l}}]}function gr(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(i,t){if(e&&it<8)throw ur("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.");var r=W(hr);r.isEnabled=function(){return e},r.trustAs=t.trustAs,r.getTrusted=t.getTrusted,r.valueOf=t.valueOf,e||(r.trustAs=r.getTrusted=function(t,e){return e},r.valueOf=ct),r.parseAs=function(e,t){var n=i(t);return n.literal&&n.constant?n:i(t,function(t){return r.getTrusted(e,t)})};var o=r.parseAs,a=r.getTrusted,s=r.trustAs;return ot(hr,function(e,t){var n=N(t);r[fe("parse_as_"+n)]=function(t){return o(e,t)},r[fe("get_trusted_"+n)]=function(t){return a(e,t)},r[fe("trust_as_"+n)]=function(t){return s(e,t)}}),r}]}function mr(){this.$get=["$window","$document",function(t,e){var n,i,r={},o=m((/android (\d+)/.exec(N((t.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((t.navigator||{}).userAgent),s=e[0]||{},l=/^(Moz|webkit|ms)(?=[A-Z])/,c=s.body&&s.body.style,u=!1,h=!1;if(c){for(var d in c)if(i=l.exec(d)){n=(n=i[0]).substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in c&&"webkit"),u=!!("transition"in c||n+"Transition"in c),h=!!("animation"in c||n+"Animation"in c),!o||u&&h||(u=ft(c.webkitTransition),h=ft(c.webkitAnimation))}return{history:!(!t.history||!t.history.pushState||o<4||a),hasEvent:function(t){if("input"===t&&it<=11)return!1;if(ut(r[t])){var e=s.createElement("div");r[t]="on"+t in e}return r[t]},csp:q(),vendorPrefix:n,transitions:u,animations:h,android:o}}]}An=w("$compile");function vr(){this.$get=["$templateCache","$http","$q","$sce",function(o,a,s,l){function c(e,n){c.totalPendingRequests++,ft(e)&&!ut(o.get(e))||(e=l.getTrustedResourceUrl(e));var t=a.defaults&&a.defaults.transformResponse;pt(t)?t=t.filter(function(t){return t!==Kn}):t===Kn&&(t=null);var i={cache:o,transformResponse:t};return a.get(e,i).finally(function(){c.totalPendingRequests--}).then(function(t){return o.put(e,t.data),t.data},r);function r(t){if(!n)throw An("tpload","Failed to load template: {0} (HTTP status: {1} {2})",e,t.status,t.statusText);return s.reject(t)}}return c.totalPendingRequests=0,c}]}function yr(){this.$get=["$rootScope","$browser","$location",function(e,n,i){var t={findBindings:function(t,n,i){var e=t.getElementsByClassName("ng-binding"),r=[];return ot(e,function(e){var t=A.element(e).data("$binding");t&&ot(t,function(t){i?new RegExp("(^|\\s)"+F(n)+"(\\s|\\||$)").test(t)&&r.push(e):-1!=t.indexOf(n)&&r.push(e)})}),r},findModels:function(t,e,n){for(var i=["ng-","data-ng-","ng\\:"],r=0;r<i.length;++r){var o=n?"=":"*=",a="["+i[r]+"model"+o+'"'+e+'"]',s=t.querySelectorAll(a);if(s.length)return s}},getLocation:function(){return i.url()},setLocation:function(t){t!==i.url()&&(i.url(t),e.$digest())},whenStable:function(t){n.notifyWhenNoOutstandingRequests(t)}};return t}]}function br(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(l,c,u,h,d){var f={};function t(t,e,n){gt(t)||(n=e,e=t,t=lt);var i,r=wt(arguments,3),o=ht(n)&&!n,a=(o?h:u).defer(),s=a.promise;return i=c.defer(function(){try{a.resolve(t.apply(null,r))}catch(t){a.reject(t),d(t)}finally{delete f[s.$$timeoutId]}o||l.$apply()},e),s.$$timeoutId=i,f[i]=a,s}return t.cancel=function(t){return!!(t&&t.$$timeoutId in f)&&(f[t.$$timeoutId].reject("canceled"),delete f[t.$$timeoutId],c.defer.cancel(t.$$timeoutId))},t}]}var xr=et.createElement("a"),_r=wr(a.location.href);function wr(t){var e=t;return it&&(xr.setAttribute("href",e),e=xr.href),xr.setAttribute("href",e),{href:xr.href,protocol:xr.protocol?xr.protocol.replace(/:$/,""):"",host:xr.host,search:xr.search?xr.search.replace(/^\?/,""):"",hash:xr.hash?xr.hash.replace(/^#/,""):"",hostname:xr.hostname,port:xr.port,pathname:"/"===xr.pathname.charAt(0)?xr.pathname:"/"+xr.pathname}}function Sr(t){var e=ft(t)?wr(t):t;return e.protocol===_r.protocol&&e.host===_r.host}function Cr(){this.$get=T(a)}function Tr(t){var a=t[0]||{},s={},l="";function c(e){try{return decodeURIComponent(e)}catch(t){return e}}return function(){var t,e,n,i,r,o=a.cookie||"";if(o!==l)for(t=(l=o).split("; "),s={},n=0;n<t.length;n++)0<(i=(e=t[n]).indexOf("="))&&(r=c(e.substring(0,i)),ut(s[r])&&(s[r]=c(e.substring(i+1))));return s}}function $r(){this.$get=Tr}function kr(i){var r="Filter";function o(t,e){if(dt(t)){var n={};return ot(t,function(t,e){n[e]=o(e,t)}),n}return i.factory(t+r,e)}this.register=o,this.$get=["$injector",function(e){return function(t){return e.get(t+r)}}],o("currency",Nr),o("date",Zr),o("filter",Ar),o("json",to),o("limitTo",io),o("lowercase",eo),o("number",Rr),o("orderBy",ro),o("uppercase",no)}function Ar(){return function(t,e,n){if(!L(t)){if(null==t)return t;throw w("filter")("notarray","Expected array but received: {0}",t)}var i,r;switch(Pr(e)){case"function":i=e;break;case"boolean":case"null":case"number":case"string":r=!0;case"object":i=Or(e,n,r);break;default:return t}return Array.prototype.filter.call(t,i)}}function Or(e,n,i){var r=dt(e)&&"$"in e;return!0===n?n=_t:gt(n)||(n=function(t,e){return!ut(t)&&(null===t||null===e?t===e:!(dt(e)||dt(t)&&!v(t))&&(t=N(""+t),e=N(""+e),-1!==t.indexOf(e)))}),function(t){return r&&!dt(t)?Dr(t,e.$,n,!1):Dr(t,e,n,i)}}function Dr(t,e,n,i,r){var o=Pr(t),a=Pr(e);if("string"===a&&"!"===e.charAt(0))return!Dr(t,e.substring(1),n,i);if(pt(t))return t.some(function(t){return Dr(t,e,n,i)});switch(o){case"object":var s;if(i){for(s in t)if("$"!==s.charAt(0)&&Dr(t[s],e,n,!0))return!0;return!r&&Dr(t,e,n,!1)}if("object"!==a)return n(t,e);for(s in e){var l=e[s];if(!gt(l)&&!ut(l)){var c="$"===s;if(!Dr(c?t:t[s],l,n,c,c))return!1}}return!0;case"function":return!1;default:return n(t,e)}}function Pr(t){return null===t?"null":typeof t}Tr.$inject=["$document"],kr.$inject=["$provide"];var Mr=22,Er=".",Ir="0";function Nr(t){var i=t.NUMBER_FORMATS;return function(t,e,n){return ut(e)&&(e=i.CURRENCY_SYM),ut(n)&&(n=i.PATTERNS[1].maxFrac),null==t?t:jr(t,i.PATTERNS[1],i.GROUP_SEP,i.DECIMAL_SEP,n).replace(/\u00A4/g,e)}}function Rr(t){var n=t.NUMBER_FORMATS;return function(t,e){return null==t?t:jr(t,n.PATTERNS[0],n.GROUP_SEP,n.DECIMAL_SEP,e)}}function Lr(t){var e,n,i,r,o,a=0;for(-1<(n=t.indexOf(Er))&&(t=t.replace(Er,"")),0<(i=t.search(/e/i))?(n<0&&(n=i),n+=+t.slice(i+1),t=t.substring(0,i)):n<0&&(n=t.length),i=0;t.charAt(i)==Ir;i++);if(i==(o=t.length))e=[0],n=1;else{for(o--;t.charAt(o)==Ir;)o--;for(n-=i,e=[],r=0;i<=o;i++,r++)e[r]=+t.charAt(i)}return Mr<n&&(e=e.splice(0,Mr-1),a=n-1,n=1),{d:e,e:a,i:n}}function Hr(t,e,n,i){var r=t.d,o=r.length-t.i,a=(e=ut(e)?Math.min(Math.max(n,o),i):+e)+t.i,s=r[a];if(0<a)r.splice(a);else{t.i=1,r.length=a=e+1;for(var l=0;l<a;l++)r[l]=0}for(5<=s&&r[a-1]++;o<e;o++)r.push(0);var c=r.reduceRight(function(t,e,n,i){return e+=t,i[n]=e%10,Math.floor(e/10)},0);c&&(r.unshift(c),t.i++)}function jr(t,e,n,i,r){if(!ft(t)&&!b(t)||isNaN(t))return"";var o,a=!isFinite(t),s=!1,l=Math.abs(t)+"",c="";if(a)c="∞";else{Hr(o=Lr(l),r,e.minFrac,e.maxFrac);var u=o.d,h=o.i,d=o.e,f=[];for(s=u.reduce(function(t,e){return t&&!e},!0);h<0;)u.unshift(0),h++;0<h?f=u.splice(h,u.length):(f=u,u=[0]);var p=[];for(u.length>=e.lgSize&&p.unshift(u.splice(-e.lgSize,u.length).join(""));u.length>e.gSize;)p.unshift(u.splice(-e.gSize,u.length).join(""));u.length&&p.unshift(u.join("")),c=p.join(n),f.length&&(c+=i+f.join("")),d&&(c+="e+"+d)}return t<0&&!s?e.negPre+c+e.negSuf:e.posPre+c+e.posSuf}function Fr(t,e,n){var i="";for(t<0&&(i="-",t=-t),t=""+t;t.length<e;)t=Ir+t;return n&&(t=t.substr(t.length-e)),i+t}function zr(n,i,r,o){return r=r||0,function(t){var e=t["get"+n]();return(0<r||-r<e)&&(e+=r),0===e&&-12==r&&(e=12),Fr(e,i,o)}}function Br(i,r){return function(t,e){var n=t["get"+i]();return e[S(r?"SHORT"+i:i)][n]}}function Vr(t,e,n){var i=-1*n,r=0<=i?"+":"";return r+=Fr(Math[0<i?"floor":"ceil"](i/60),2)+Fr(Math.abs(i%60),2)}function Wr(t){var e=new Date(t,0,1).getDay();return new Date(t,0,(e<=4?5:12)-e)}function qr(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))}function Ur(i){return function(t){var e=Wr(t.getFullYear()),n=+qr(t)-+e;return Fr(1+Math.round(n/6048e5),i)}}function Jr(t,e){return t.getHours()<12?e.AMPMS[0]:e.AMPMS[1]}function Gr(t,e){return t.getFullYear()<=0?e.ERAS[0]:e.ERAS[1]}function Yr(t,e){return t.getFullYear()<=0?e.ERANAMES[0]:e.ERANAMES[1]}Nr.$inject=["$locale"],Rr.$inject=["$locale"];var Xr={yyyy:zr("FullYear",4),yy:zr("FullYear",2,0,!0),y:zr("FullYear",1),MMMM:Br("Month"),MMM:Br("Month",!0),MM:zr("Month",2,1),M:zr("Month",1,1),dd:zr("Date",2),d:zr("Date",1),HH:zr("Hours",2),H:zr("Hours",1),hh:zr("Hours",2,-12),h:zr("Hours",1,-12),mm:zr("Minutes",2),m:zr("Minutes",1),ss:zr("Seconds",2),s:zr("Seconds",1),sss:zr("Milliseconds",3),EEEE:Br("Day"),EEE:Br("Day",!0),a:Jr,Z:Vr,ww:Ur(2),w:Ur(1),G:Gr,GG:Gr,GGG:Gr,GGGG:Yr},Kr=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Qr=/^\-?\d+$/;function Zr(l){var h=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;function c(t){var e;if(e=t.match(h)){var n=new Date(0),i=0,r=0,o=e[8]?n.setUTCFullYear:n.setFullYear,a=e[8]?n.setUTCHours:n.setHours;e[9]&&(i=m(e[9]+e[10]),r=m(e[9]+e[11])),o.call(n,m(e[1]),m(e[2])-1,m(e[3]));var s=m(e[4]||0)-i,l=m(e[5]||0)-r,c=m(e[6]||0),u=Math.round(1e3*parseFloat("0."+(e[7]||0)));return a.call(n,s,l,c,u),n}return t}return function(e,t,n){var i,r,o="",a=[];if(t=t||"mediumDate",t=l.DATETIME_FORMATS[t]||t,ft(e)&&(e=Qr.test(e)?m(e):c(e)),b(e)&&(e=new Date(e)),!$(e)||!isFinite(e.getTime()))return e;for(;t;)t=(r=Kr.exec(t))?(a=J(a,r,1)).pop():(a.push(t),null);var s=e.getTimezoneOffset();return n&&(s=Z(n,s),e=St(e,n,!0)),ot(a,function(t){i=Xr[t],o+=i?i(e,l.DATETIME_FORMATS,s):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),o}}function to(){return function(t,e){return ut(e)&&(e=2),X(t,e)}}Zr.$inject=["$locale"];var eo=T(N),no=T(S);function io(){return function(t,e,n){return e=Math.abs(Number(e))===1/0?Number(e):m(e),isNaN(e)?t:(b(t)&&(t=t.toString()),pt(t)||ft(t)?(n=(n=!n||isNaN(n)?0:m(n))<0?Math.max(0,t.length+n):n,0<=e?t.slice(n,n+e):0===n?t.slice(e,t.length):t.slice(Math.max(0,n+e),n)):t)}}function ro(o){return function(t,e,n){if(!L(t))return t;pt(e)||(e=[e]),0===e.length&&(e=["+"]);var o=s(e,n);o.push({get:function(){return{}},descending:n?-1:1});var i=Array.prototype.map.call(t,r);return i.sort(a),t=i.map(function(t){return t.value});function r(e,n){return{value:e,predicateValues:o.map(function(t){return l(t.get(e),n)})}}function a(t,e){for(var n=0,i=0,r=o.length;i<r&&!(n=c(t.predicateValues[i],e.predicateValues[i])*o[i].descending);++i);return n}};function s(t,r){return r=r?-1:1,t.map(function(t){var e=1,n=ct;if(gt(t))n=t;else if(ft(t)&&("+"!=t.charAt(0)&&"-"!=t.charAt(0)||(e="-"==t.charAt(0)?-1:1,t=t.substring(1)),""!==t&&(n=o(t)).constant)){var i=n();n=function(t){return t[i]}}return{get:n,descending:e*r}})}function n(t){switch(typeof t){case"number":case"boolean":case"string":return!0;default:return!1}}function i(t,e){return"function"==typeof t.valueOf&&n(t=t.valueOf())?t:v(t)&&n(t=t.toString())?t:e}function l(t,e){var n=typeof t;return null===t?(n="string",t="null"):"string"===n?t=t.toLowerCase():"object"===n&&(t=i(t,e)),{value:t,type:n}}function c(t,e){var n=0;return t.type===e.type?t.value!==e.value&&(n=t.value<e.value?-1:1):n=t.type<e.type?-1:1,n}}function oo(t){return gt(t)&&(t={link:t}),t.restrict=t.restrict||"AC",T(t)}ro.$inject=["$parse"];var ao=T({restrict:"E",compile:function(t,e){if(!e.href&&!e.xlinkHref)return function(t,e){if("a"===e[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===l.call(e.prop("href"))?"xlink:href":"href";e.on("click",function(t){e.attr(n)||t.preventDefault()})}}}}),so={};ot(Ve,function(t,i){if("multiple"!=t){var r=Pn("ng-"+i),e=o;"checked"===t&&(e=function(t,e,n){n.ngModel!==n[r]&&o(t,e,n)}),so[r]=function(){return{restrict:"A",priority:100,link:e}}}function o(t,e,n){t.$watch(n[r],function(t){n.$set(i,!!t)})}}),ot(qe,function(t,r){so[r]=function(){return{priority:100,link:function(t,e,n){if("ngPattern"===r&&"/"==n.ngPattern.charAt(0)){var i=n.ngPattern.match(o);if(i)return void n.$set("ngPattern",new RegExp(i[1],i[2]))}t.$watch(n[r],function(t){n.$set(r,t)})}}}}),ot(["src","srcset","href"],function(o){var a=Pn("ng-"+o);so[a]=function(){return{priority:99,link:function(t,e,n){var i=o,r=o;"href"===o&&"[object SVGAnimatedString]"===l.call(e.prop("href"))&&(r="xlinkHref",n.$attr[r]="xlink:href",i=null),n.$observe(a,function(t){t?(n.$set(r,t),it&&i&&e.prop(i,n[r])):"href"===o&&n.$set(r,null)})}}}});var lo={$addControl:lt,$$renameControl:uo,$removeControl:lt,$setValidity:lt,$setDirty:lt,$setPristine:lt,$setSubmitted:lt},co="ng-submitted";function uo(t,e){t.$name=e}function ho(t,e,n,i,r){var o=this,a=[];o.$error={},o.$$success={},o.$pending=nt,o.$name=r(e.name||e.ngForm||"")(n),o.$dirty=!1,o.$pristine=!0,o.$valid=!0,o.$invalid=!1,o.$submitted=!1,o.$$parentForm=lo,o.$rollbackViewValue=function(){ot(a,function(t){t.$rollbackViewValue()})},o.$commitViewValue=function(){ot(a,function(t){t.$commitViewValue()})},o.$addControl=function(t){Vt(t.$name,"input"),a.push(t),t.$name&&(o[t.$name]=t),t.$$parentForm=o},o.$$renameControl=function(t,e){var n=t.$name;o[n]===t&&delete o[n],(o[e]=t).$name=e},o.$removeControl=function(n){n.$name&&o[n.$name]===n&&delete o[n.$name],ot(o.$pending,function(t,e){o.$setValidity(e,null,n)}),ot(o.$error,function(t,e){o.$setValidity(e,null,n)}),ot(o.$$success,function(t,e){o.$setValidity(e,null,n)}),xt(a,n),n.$$parentForm=lo},ba({ctrl:this,$element:t,set:function(t,e,n){var i=t[e];i?-1===i.indexOf(n)&&i.push(n):t[e]=[n]},unset:function(t,e,n){var i=t[e];i&&(xt(i,n),0===i.length&&delete t[e])},$animate:i}),o.$setDirty=function(){i.removeClass(t,ca),i.addClass(t,ua),o.$dirty=!0,o.$pristine=!1,o.$$parentForm.$setDirty()},o.$setPristine=function(){i.setClass(t,ca,ua+" "+co),o.$dirty=!1,o.$pristine=!0,o.$submitted=!1,ot(a,function(t){t.$setPristine()})},o.$setUntouched=function(){ot(a,function(t){t.$setUntouched()})},o.$setSubmitted=function(){i.addClass(t,co),o.$submitted=!0,o.$$parentForm.$setSubmitted()}}ho.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var fo=function(n){return["$timeout","$parse",function(l,e){return{name:"form",restrict:n?"EAC":"E",require:["form","^^?form"],controller:ho,compile:function(t,e){t.addClass(ca).addClass(sa);var s=e.name?"name":!(!n||!e.ngForm)&&"ngForm";return{pre:function(e,t,n,i){var r=i[0];if(!("action"in n)){var o=function(t){e.$apply(function(){r.$commitViewValue(),r.$setSubmitted()}),t.preventDefault()};ae(t[0],"submit",o),t.on("$destroy",function(){l(function(){se(t[0],"submit",o)},0,!1)})}(i[1]||r.$$parentForm).$addControl(r);var a=s?c(r.$name):lt;s&&(a(e,r),n.$observe(s,function(t){r.$name!==t&&(a(e,nt),r.$$parentForm.$$renameControl(r,t),(a=c(r.$name))(e,r))})),t.on("$destroy",function(){r.$$parentForm.$removeControl(r),a(e,nt),at(r,lo)})}}}};function c(t){return""===t?e('this[""]').assign:e(t).assign||lt}}]},po=fo(),go=fo(!0),mo=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,vo=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,yo=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,bo=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,xo=/^(\d{4})-(\d{2})-(\d{2})$/,_o=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,wo=/^(\d{4})-W(\d\d)$/,So=/^(\d{4})-(\d\d)$/,Co=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,To="keydown wheel mousedown",$o=Ut();ot("date,datetime-local,month,time,week".split(","),function(t){$o[t]=!0});var ko={text:Oo,date:Eo("date",xo,Mo(xo,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":Eo("datetimelocal",_o,Mo(_o,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:Eo("time",Co,Mo(Co,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:Eo("week",wo,Po,"yyyy-Www"),month:Eo("month",So,Mo(So,["yyyy","MM"]),"yyyy-MM"),number:No,url:Ro,email:Lo,radio:Ho,checkbox:Fo,hidden:lt,button:lt,submit:lt,reset:lt,file:lt};function Ao(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function Oo(t,e,n,i,r,o){Do(t,e,n,i,r,o),Ao(i)}function Do(t,i,r,o,e,a){var s,l=N(i[0].type);if(!e.android){var c=!1;i.on("compositionstart",function(t){c=!0}),i.on("compositionend",function(){c=!1,u()})}var u=function(t){if(s&&(a.defer.cancel(s),s=null),!c){var e=i.val(),n=t&&t.type;"password"===l||r.ngTrim&&"false"===r.ngTrim||(e=yt(e)),(o.$viewValue!==e||""===e&&o.$$hasNativeValidators)&&o.$setViewValue(e,n)}};if(e.hasEvent("input"))i.on("input",u);else{var n=function(t,e,n){s||(s=a.defer(function(){s=null,e&&e.value===n||u(t)}))};i.on("keydown",function(t){var e=t.keyCode;91===e||15<e&&e<19||37<=e&&e<=40||n(t,this,this.value)}),e.hasEvent("paste")&&i.on("paste cut",n)}i.on("change",u),$o[l]&&o.$$hasNativeValidators&&l===r.type&&i.on(To,function(t){if(!s){var e=this[h],n=e.badInput,i=e.typeMismatch;s=a.defer(function(){s=null,e.badInput===n&&e.typeMismatch===i||u(t)})}}),o.$render=function(){var t=o.$isEmpty(o.$viewValue)?"":o.$viewValue;i.val()!==t&&i.val(t)}}function Po(t,e){if($(t))return t;if(ft(t)){wo.lastIndex=0;var n=wo.exec(t);if(n){var i=+n[1],r=+n[2],o=0,a=0,s=0,l=0,c=Wr(i),u=7*(r-1);return e&&(o=e.getHours(),a=e.getMinutes(),s=e.getSeconds(),l=e.getMilliseconds()),new Date(i,0,c.getDate()+u,o,a,s,l)}}return NaN}function Mo(r,o){return function(t,e){var n,i;if($(t))return t;if(ft(t)){if('"'==t.charAt(0)&&'"'==t.charAt(t.length-1)&&(t=t.substring(1,t.length-1)),mo.test(t))return new Date(t);if(r.lastIndex=0,n=r.exec(t))return n.shift(),i=e?{yyyy:e.getFullYear(),MM:e.getMonth()+1,dd:e.getDate(),HH:e.getHours(),mm:e.getMinutes(),ss:e.getSeconds(),sss:e.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},ot(n,function(t,e){e<o.length&&(i[o[e]]=+t)}),new Date(i.yyyy,i.MM-1,i.dd,i.HH,i.mm,i.ss||0,1e3*i.sss||0)}return NaN}}function Eo(f,p,g,m){return function(t,e,n,i,r,o,a){Io(t,e,n,i),Do(t,e,n,i,r,o);var s,l,c,u=i&&i.$options&&i.$options.timezone;(i.$$parserName=f,i.$parsers.push(function(t){if(i.$isEmpty(t))return null;if(p.test(t)){var e=g(t,s);return u&&(e=St(e,u)),e}return nt}),i.$formatters.push(function(t){if(t&&!$(t))throw pa("datefmt","Expected `{0}` to be a date",t);return h(t)?((s=t)&&u&&(s=St(s,u,!0)),a("date")(t,m,u)):(s=null,"")}),ht(n.min)||n.ngMin)&&(i.$validators.min=function(t){return!h(t)||ut(l)||g(t)>=l},n.$observe("min",function(t){l=d(t),i.$validate()}));(ht(n.max)||n.ngMax)&&(i.$validators.max=function(t){return!h(t)||ut(c)||g(t)<=c},n.$observe("max",function(t){c=d(t),i.$validate()}));function h(t){return t&&!(t.getTime&&t.getTime()!=t.getTime())}function d(t){return ht(t)&&!$(t)?g(t)||nt:t}}}function Io(t,n,e,i){var r=n[0];(i.$$hasNativeValidators=dt(r.validity))&&i.$parsers.push(function(t){var e=n.prop(h)||{};return e.badInput&&!e.typeMismatch?nt:t})}function No(t,e,n,i,r,o){var a,s;(Io(t,e,n,i),Do(t,e,n,i,r,o),i.$$parserName="number",i.$parsers.push(function(t){return i.$isEmpty(t)?null:bo.test(t)?parseFloat(t):nt}),i.$formatters.push(function(t){if(!i.$isEmpty(t)){if(!b(t))throw pa("numfmt","Expected `{0}` to be a number",t);t=t.toString()}return t}),ht(n.min)||n.ngMin)&&(i.$validators.min=function(t){return i.$isEmpty(t)||ut(a)||a<=t},n.$observe("min",function(t){ht(t)&&!b(t)&&(t=parseFloat(t,10)),a=b(t)&&!isNaN(t)?t:nt,i.$validate()}));(ht(n.max)||n.ngMax)&&(i.$validators.max=function(t){return i.$isEmpty(t)||ut(s)||t<=s},n.$observe("max",function(t){ht(t)&&!b(t)&&(t=parseFloat(t,10)),s=b(t)&&!isNaN(t)?t:nt,i.$validate()}))}function Ro(t,e,n,i,r,o){Do(t,e,n,i,r,o),Ao(i),i.$$parserName="url",i.$validators.url=function(t,e){var n=t||e;return i.$isEmpty(n)||vo.test(n)}}function Lo(t,e,n,i,r,o){Do(t,e,n,i,r,o),Ao(i),i.$$parserName="email",i.$validators.email=function(t,e){var n=t||e;return i.$isEmpty(n)||yo.test(n)}}function Ho(t,e,n,i){ut(n.name)&&e.attr("name",k());var r=function(t){e[0].checked&&i.$setViewValue(n.value,t&&t.type)};e.on("click",r),i.$render=function(){var t=n.value;e[0].checked=t==i.$viewValue},n.$observe("value",i.$render)}function jo(t,e,n,i,r){var o;if(ht(i)){if(!(o=t(i)).constant)throw pa("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,i);return o(e)}return r}function Fo(t,e,n,i,r,o,a,s){var l=jo(s,t,"ngTrueValue",n.ngTrueValue,!0),c=jo(s,t,"ngFalseValue",n.ngFalseValue,!1),u=function(t){i.$setViewValue(e[0].checked,t&&t.type)};e.on("click",u),i.$render=function(){e[0].checked=i.$viewValue},i.$isEmpty=function(t){return!1===t},i.$formatters.push(function(t){return _t(t,l)}),i.$parsers.push(function(t){return t?l:c})}var zo=["$browser","$sniffer","$filter","$parse",function(r,o,a,s){return{restrict:"E",require:["?ngModel"],link:{pre:function(t,e,n,i){i[0]&&(ko[N(n.type)]||ko.text)(t,e,n,i[0],o,r,a,s)}}}}],Bo=/^(true|false|\d+)$/,Vo=function(){return{restrict:"A",priority:100,compile:function(t,e){return Bo.test(e.ngValue)?function(t,e,n){n.$set("value",t.$eval(n.ngValue))}:function(t,e,n){t.$watch(n.ngValue,function(t){n.$set("value",t)})}}}},Wo=["$compile",function(i){return{restrict:"AC",compile:function(t){return i.$$addBindingClass(t),function(t,e,n){i.$$addBindingInfo(e,n.ngBind),e=e[0],t.$watch(n.ngBind,function(t){e.textContent=ut(t)?"":t})}}}}],qo=["$interpolate","$compile",function(r,o){return{compile:function(t){return o.$$addBindingClass(t),function(t,e,n){var i=r(e.attr(n.$attr.ngBindTemplate));o.$$addBindingInfo(e,i.expressions),e=e[0],n.$observe("ngBindTemplate",function(t){e.textContent=ut(t)?"":t})}}}}],Uo=["$sce","$parse","$compile",function(o,n,a){return{restrict:"A",compile:function(t,e){var i=n(e.ngBindHtml),r=n(e.ngBindHtml,function(t){return o.valueOf(t)});return a.$$addBindingClass(t),function(e,n,t){a.$$addBindingInfo(n,t.ngBindHtml),e.$watch(r,function(){var t=i(e);n.html(o.getTrustedHtml(t)||"")})}}}}],Jo=T({restrict:"A",require:"ngModel",link:function(t,e,n,i){i.$viewChangeListeners.push(function(){t.$eval(n.ngChange)})}});function Go(f,p){return f="ngClass"+f,["$animate",function(u){return{restrict:"AC",link:function(r,o,a){var n;function s(t){var e=c(t,1);a.$addClass(e)}function l(t){var e=c(t,-1);a.$removeClass(e)}function c(t,e){var n=o.data("$classCounts")||Ut(),i=[];return ot(t,function(t){(0<e||n[t])&&(n[t]=(n[t]||0)+e,n[t]===+(0<e)&&i.push(t))}),o.data("$classCounts",n),i.join(" ")}function i(t,e){var n=h(e,t),i=h(t,e);n=c(n,1),i=c(i,-1),n&&n.length&&u.addClass(o,n),i&&i.length&&u.removeClass(o,i)}function e(t){if(!0===p||r.$index%2===p){var e=d(t||[]);if(n){if(!_t(t,n)){i(d(n),e)}}else s(e)}n=pt(t)?t.map(function(t){return W(t)}):W(t)}r.$watch(a[f],e,!0),a.$observe("class",function(t){e(r.$eval(a[f]))}),"ngClass"!==f&&r.$watch("$index",function(t,e){var n=1&t;if(n!==(1&e)){var i=d(r.$eval(a[f]));n===p?s(i):l(i)}})}};function h(t,e){var n=[];t:for(var i=0;i<t.length;i++){for(var r=t[i],o=0;o<e.length;o++)if(r==e[o])continue t;n.push(r)}return n}function d(t){var n=[];return pt(t)?(ot(t,function(t){n=n.concat(d(t))}),n):ft(t)?t.split(" "):dt(t)?(ot(t,function(t,e){t&&(n=n.concat(e.split(" ")))}),n):t}}]}var Yo=Go("",!0),Xo=Go("Odd",0),Ko=Go("Even",1),Qo=oo({compile:function(t,e){e.$set("ngCloak",nt),t.removeClass("ng-cloak")}}),Zo=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ta={},ea={blur:!0,focus:!0};ot("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(o){var a=Pn("ng-"+o);ta[a]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(t,e){var i=n(e[a],null,!0);return function(n,t){t.on(o,function(t){var e=function(){i(n,{$event:t})};ea[o]&&r.$$phase?n.$evalAsync(e):n.$apply(e)})}}}}]});var na=["$animate",function(l){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(t,n,i,e,r){var o,a,s;t.$watch(i.ngIf,function(t){t?a||r(function(t,e){a=e,t[t.length++]=et.createComment(" end ngIf: "+i.ngIf+" "),o={clone:t},l.enter(t,n.parent(),n)}):(s&&(s.remove(),s=null),a&&(a.$destroy(),a=null),o&&(s=qt(o.clone),l.leave(s).then(function(){s=null}),o=null))})}}}],ia=["$templateRequest","$anchorScroll","$animate",function(m,v,y){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:A.noop,compile:function(t,e){var n=e.ngInclude||e.src,p=e.onload||"",g=e.autoscroll;return function(a,s,t,l,c){var u,e,h,d=0,f=function(){e&&(e.remove(),e=null),u&&(u.$destroy(),u=null),h&&(y.leave(h).then(function(){e=null}),e=h,h=null)};a.$watch(n,function(i){var r=function(){!ht(g)||g&&!a.$eval(g)||v()},o=++d;i?(m(i,!0).then(function(t){if(!a.$$destroyed&&o===d){var e=a.$new();l.template=t;var n=c(e,function(t){f(),y.enter(t,null,s).then(r)});h=n,(u=e).$emit("$includeContentLoaded",i),a.$eval(p)}},function(){a.$$destroyed||o===d&&(f(),a.$emit("$includeContentError",i))}),a.$emit("$includeContentRequested",i)):(f(),l.template=null)})}}}}],ra=["$compile",function(r){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(t,e,n,i){if(/SVG/.test(e[0].toString()))return e.empty(),void r(we(i.template,et).childNodes)(t,function(t){e.append(t)},{futureParentElement:e});e.html(i.template),r(e.contents())(t)}}}],oa=oo({priority:450,compile:function(){return{pre:function(t,e,n){t.$eval(n.ngInit)}}}}),aa=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(t,e,n,i){var r=e.attr(n.$attr.ngList)||", ",o="false"!==n.ngTrim,a=o?yt(r):r,s=function(t){if(!ut(t)){var e=[];return t&&ot(t.split(a),function(t){t&&e.push(o?yt(t):t)}),e}};i.$parsers.push(s),i.$formatters.push(function(t){return pt(t)?t.join(r):nt}),i.$isEmpty=function(t){return!t||!t.length}}}},sa="ng-valid",la="ng-invalid",ca="ng-pristine",ua="ng-dirty",ha="ng-untouched",da="ng-touched",fa="ng-pending",pa=w("ngModel"),ga=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(o,e,r,a,s,t,l,c,u,n){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=nt,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=nt,this.$name=n(r.name||"",!1)(o),this.$$parentForm=lo;var h,d=s(r.ngModel),f=d.assign,p=d,g=f,m=null,v=this;this.$$setOptions=function(t){if((v.$options=t)&&t.getterSetter){var n=s(r.ngModel+"()"),i=s(r.ngModel+"($$$p)");p=function(t){var e=d(t);return gt(e)&&(e=n(t)),e},g=function(t,e){gt(d(t))?i(t,{$$$p:v.$modelValue}):f(t,v.$modelValue)}}else if(!d.assign)throw pa("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,Ct(a))},this.$render=lt,this.$isEmpty=function(t){return ut(t)||""===t||null===t||t!=t};var y=0;ba({ctrl:this,$element:a,set:function(t,e){t[e]=!0},unset:function(t,e){delete t[e]},$animate:t}),this.$setPristine=function(){v.$dirty=!1,v.$pristine=!0,t.removeClass(a,ua),t.addClass(a,ca)},this.$setDirty=function(){v.$dirty=!0,v.$pristine=!1,t.removeClass(a,ca),t.addClass(a,ua),v.$$parentForm.$setDirty()},this.$setUntouched=function(){v.$touched=!1,v.$untouched=!0,t.setClass(a,ha,da)},this.$setTouched=function(){v.$touched=!0,v.$untouched=!1,t.setClass(a,da,ha)},this.$rollbackViewValue=function(){l.cancel(m),v.$viewValue=v.$$lastCommittedViewValue,v.$render()},this.$validate=function(){if(!b(v.$modelValue)||!isNaN(v.$modelValue)){var t=v.$$lastCommittedViewValue,e=v.$$rawModelValue,n=v.$valid,i=v.$modelValue,r=v.$options&&v.$options.allowInvalid;v.$$runValidators(e,t,function(t){r||n===t||(v.$modelValue=t?e:nt,v.$modelValue!==i&&v.$$writeModelToScope())})}},this.$$runValidators=function(o,a,e){var n=++y;function t(){var t=v.$$parserName||"parse";return ut(h)?(s(t,null),!0):(h||(ot(v.$validators,function(t,e){s(e,null)}),ot(v.$asyncValidators,function(t,e){s(e,null)})),s(t,h),h)}function i(){var i=!0;return ot(v.$validators,function(t,e){var n=t(o,a);i=i&&n,s(e,n)}),!!i||(ot(v.$asyncValidators,function(t,e){s(e,null)}),!1)}function r(){var i=[],r=!0;ot(v.$asyncValidators,function(t,e){var n=t(o,a);if(!I(n))throw pa("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",n);s(e,nt),i.push(n.then(function(){s(e,!0)},function(t){s(e,r=!1)}))}),i.length?u.all(i).then(function(){l(r)},lt):l(!0)}function s(t,e){n===y&&v.$setValidity(t,e)}function l(t){n===y&&e(t)}t()&&i()?r():l(!1)},this.$commitViewValue=function(){var t=v.$viewValue;l.cancel(m),(v.$$lastCommittedViewValue!==t||""===t&&v.$$hasNativeValidators)&&(v.$$lastCommittedViewValue=t,v.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){var e=v.$$lastCommittedViewValue;if(h=!ut(e)||nt)for(var t=0;t<v.$parsers.length;t++)if(ut(e=v.$parsers[t](e))){h=!1;break}b(v.$modelValue)&&isNaN(v.$modelValue)&&(v.$modelValue=p(o));var n=v.$modelValue,i=v.$options&&v.$options.allowInvalid;function r(){v.$modelValue!==n&&v.$$writeModelToScope()}v.$$rawModelValue=e,i&&(v.$modelValue=e,r()),v.$$runValidators(e,v.$$lastCommittedViewValue,function(t){i||(v.$modelValue=t?e:nt,r())})},this.$$writeModelToScope=function(){g(o,v.$modelValue),ot(v.$viewChangeListeners,function(t){try{t()}catch(t){e(t)}})},this.$setViewValue=function(t,e){v.$viewValue=t,v.$options&&!v.$options.updateOnDefault||v.$$debounceViewValueCommit(e)},this.$$debounceViewValueCommit=function(t){var e,n=0,i=v.$options;i&&ht(i.debounce)&&(b(e=i.debounce)?n=e:b(e[t])?n=e[t]:b(e.default)&&(n=e.default)),l.cancel(m),n?m=l(function(){v.$commitViewValue()},n):c.$$phase?v.$commitViewValue():o.$apply(function(){v.$commitViewValue()})},o.$watch(function(){var t=p(o);if(t!==v.$modelValue&&(v.$modelValue==v.$modelValue||t==t)){v.$modelValue=v.$$rawModelValue=t,h=nt;for(var e=v.$formatters,n=e.length,i=t;n--;)i=e[n](i);v.$viewValue!==i&&(v.$viewValue=v.$$lastCommittedViewValue=i,v.$render(),v.$$runValidators(t,i,lt))}return t})}],ma=["$rootScope",function(o){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:ga,priority:1,compile:function(t){return t.addClass(ca).addClass(ha).addClass(sa),{pre:function(t,e,n,i){var r=i[0],o=i[1]||r.$$parentForm;r.$$setOptions(i[2]&&i[2].$options),o.$addControl(r),n.$observe("name",function(t){r.$name!==t&&r.$$parentForm.$$renameControl(r,t)}),t.$on("$destroy",function(){r.$$parentForm.$removeControl(r)})},post:function(e,t,n,i){var r=i[0];r.$options&&r.$options.updateOn&&t.on(r.$options.updateOn,function(t){r.$$debounceViewValueCommit(t&&t.type)}),t.on("blur",function(t){r.$touched||(o.$$phase?e.$evalAsync(r.$setTouched):e.$apply(r.$setTouched))})}}}}}],va=/(\s+|^)default(\s+|$)/,ya=function(){return{restrict:"A",controller:["$scope","$attrs",function(t,e){var n=this;this.$options=V(t.$eval(e.ngModelOptions)),ht(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=yt(this.$options.updateOn.replace(va,function(){return n.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}};function ba(t){var r=t.ctrl,n=t.$element,i={},o=t.set,a=t.unset,s=t.$animate;function e(t,e,n){var i;ut(e)?l("$pending",t,n):c("$pending",t,n),vt(e)?e?(a(r.$error,t,n),o(r.$$success,t,n)):(o(r.$error,t,n),a(r.$$success,t,n)):(a(r.$error,t,n),a(r.$$success,t,n)),r.$pending?(u(fa,!0),r.$valid=r.$invalid=nt,h("",null)):(u(fa,!1),r.$valid=xa(r.$error),r.$invalid=!r.$valid,h("",r.$valid)),h(t,i=r.$pending&&r.$pending[t]?nt:!r.$error[t]&&(!!r.$$success[t]||null)),r.$$parentForm.$setValidity(t,i,r)}function l(t,e,n){r[t]||(r[t]={}),o(r[t],e,n)}function c(t,e,n){r[t]&&a(r[t],e,n),xa(r[t])&&(r[t]=nt)}function u(t,e){e&&!i[t]?(s.addClass(n,t),i[t]=!0):!e&&i[t]&&(s.removeClass(n,t),i[t]=!1)}function h(t,e){t=t?"-"+Lt(t,"-"):"",u(sa+t,!0===e),u(la+t,!1===e)}i[la]=!(i[sa]=n.hasClass(sa)),r.$setValidity=e}function xa(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}var _a=oo({terminal:!0,priority:1e3}),wa=w("ngOptions"),Sa=/^\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]+?))?$/,Ca=["$compile","$parse",function(C,l){function T(t,e,d){var u=t.match(Sa);if(!u)throw wa("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",t,Ct(e));var n=u[5]||u[7],i=u[6],r=/ as /.test(u[0])&&u[1],f=u[9],o=l(u[2]?u[1]:n),p=r&&l(r)||o,a=f&&l(f),g=f?function(t,e){return a(d,e)}:function(t){return Qe(t)},m=function(t,e){return g(t,_(t,e))},v=l(u[2]||u[1]),y=l(u[3]||""),b=l(u[4]||""),x=l(u[8]),s={},_=i?function(t,e){return s[i]=e,s[n]=t,s}:function(t){return s[n]=t,s};function w(t,e,n,i,r){this.selectValue=t,this.viewValue=e,this.label=n,this.group=i,this.disabled=r}function S(t){var e;if(!i&&L(t))e=t;else for(var n in e=[],t)t.hasOwnProperty(n)&&"$"!==n.charAt(0)&&e.push(n);return e}return{trackBy:f,getTrackByValue:m,getWatchables:l(x,function(t){for(var e=[],n=S(t=t||[]),i=n.length,r=0;r<i;r++){var o=t===n?r:n[r],a=(t[o],_(t[o],o)),s=g(t[o],a);if(e.push(s),u[2]||u[1]){var l=v(d,a);e.push(l)}if(u[4]){var c=b(d,a);e.push(c)}}return e}),getOptions:function(){for(var t=[],e={},n=x(d)||[],i=S(n),r=i.length,o=0;o<r;o++){var a=n===i?o:i[o],s=n[a],l=_(s,a),c=p(d,l),u=g(c,l),h=new w(u,c,v(d,l),y(d,l),b(d,l));t.push(h),e[u]=h}return{items:t,selectValueMap:e,getOptionFromViewValue:function(t){return e[m(t)]},getViewValueFromOption:function(t){return f?A.copy(t.viewValue):t.viewValue}}}}}var $=et.createElement("option"),k=et.createElement("optgroup");function t(t,a,e,n){var i=n[1];if(i){for(var s,l=n[0],c=e.multiple,r=0,o=a.children(),u=o.length;r<u;r++)if(""===o[r].value){s=o.eq(r);break}var h,d=!!s,f=rt($.cloneNode(!1));f.val("?");var p=T(e.ngOptions,a,t),g=function(){d||a.prepend(s),a.val(""),s.prop("selected",!0),s.attr("selected",!0)},m=function(){d||s.remove()},v=function(){a.prepend(f),a.val("?"),f.prop("selected",!0),f.attr("selected",!0)},y=function(){f.remove()};c?(i.$isEmpty=function(t){return!t||0===t.length},l.writeValue=function(t){h.items.forEach(function(t){t.element.selected=!1}),t&&t.forEach(function(t){var e=h.getOptionFromViewValue(t);e&&!e.disabled&&(e.element.selected=!0)})},l.readValue=function(){var t=a.val()||[],n=[];return ot(t,function(t){var e=h.selectValueMap[t];e&&!e.disabled&&n.push(h.getViewValueFromOption(e))}),n},p.trackBy&&t.$watchCollection(function(){if(pt(i.$viewValue))return i.$viewValue.map(function(t){return p.getTrackByValue(t)})},function(){i.$render()})):(l.writeValue=function(t){var e=h.getOptionFromViewValue(t);e&&!e.disabled?(a[0].value!==e.selectValue&&(y(),m(),a[0].value=e.selectValue,e.element.selected=!0),e.element.setAttribute("selected","selected")):null===t||d?(y(),g()):(m(),v())},l.readValue=function(){var t=h.selectValueMap[a.val()];return t&&!t.disabled?(m(),y(),h.getViewValueFromOption(t)):null},p.trackBy&&t.$watch(function(){return p.getTrackByValue(i.$viewValue)},function(){i.$render()})),d?(s.remove(),C(s)(t),s.removeClass("ng-scope")):s=rt($.cloneNode(!1)),S(),t.$watchCollection(p.getWatchables,S)}function b(t,e){(t.element=e).disabled=t.disabled,t.label!==e.label&&(e.label=t.label,e.textContent=t.label),t.value!==e.value&&(e.value=t.selectValue)}function x(t,e,n,i){var r;return e&&N(e.nodeName)===n?r=e:(r=i.cloneNode(!1),e?t.insertBefore(r,e):t.appendChild(r)),r}function _(t){for(var e;t;)e=t.nextSibling,Fe(t),t=e}function w(t){var e=s&&s[0],n=f&&f[0];if(e||n)for(;t&&(t===e||t===n||t.nodeType===Xt||"option"===bt(t)&&""===t.value);)t=t.nextSibling;return t}function S(){var t=h&&l.readValue();h=p.getOptions();var r={},o=a[0].firstChild;if(d&&a.prepend(s),o=w(o),h.items.forEach(function(t){var e,n,i;t.group?((e=r[t.group])||(n=x(a[0],o,"optgroup",k),o=n.nextSibling,n.label=t.group,e=r[t.group]={groupElement:n,currentOptionElement:n.firstChild}),b(t,i=x(e.groupElement,e.currentOptionElement,"option",$)),e.currentOptionElement=i.nextSibling):(b(t,i=x(a[0],o,"option",$)),o=i.nextSibling)}),Object.keys(r).forEach(function(t){_(r[t].currentOptionElement)}),_(o),i.$render(),!i.$isEmpty(t)){var e=l.readValue();(p.trackBy||c?_t(t,e):t===e)||(i.$setViewValue(e),i.$render())}}}return{restrict:"A",terminal:!0,require:["select","?ngModel"],link:{pre:function(t,e,n,i){i[0].registerOption=lt},post:t}}}],Ta=["$locale","$interpolate","$log",function(p,g,m){var v=/{}/g,y=/^when(Minus)?(.+)$/;return{link:function(r,o,a){var s,t=a.count,l=a.$attr.when&&o.attr(a.$attr.when),c=a.offset||0,u=r.$eval(l)||{},h={},e=g.startSymbol(),n=g.endSymbol(),i=e+t+"-"+c+n,d=A.noop;function f(t){o.text(t||"")}ot(a,function(t,e){var n=y.exec(e);if(n){var i=(n[1]?"-":"")+N(n[2]);u[i]=o.attr(a.$attr[e])}}),ot(u,function(t,e){h[e]=g(t.replace(v,i))}),r.$watch(t,function(t){var e=parseFloat(t),n=isNaN(e);if(n||e in u||(e=p.pluralCat(e-c)),e!==s&&!(n&&b(s)&&isNaN(s))){d();var i=h[e];ut(i)?(null!=t&&m.debug("ngPluralize: no rule defined for '"+e+"' in "+l),d=lt,f()):d=r.$watch(i,f),s=e}})}}}],$a=["$parse","$animate",function(l,O){var D="$$NG_REMOVED",P=w("ngRepeat"),M=function(t,e,n,i,r,o,a){t[n]=i,r&&(t[r]=o),t.$index=e,t.$first=0===e,t.$last=e===a-1,t.$middle=!(t.$first||t.$last),t.$odd=!(t.$even=0==(1&e))},E=function(t){return t.clone[0]},I=function(t){return t.clone[t.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(t,e){var _=e.ngRepeat,w=et.createComment(" end ngRepeat: "+_+" "),n=_.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!n)throw P("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",_);var i=n[1],r=n[2],S=n[3],o=n[4];if(!(n=i.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/)))throw P("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",i);var a,C,T,$,k=n[3]||n[1],A=n[2];if(S&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(S)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(S)))throw P("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",S);var s={$id:Qe};return o?a=l(o):(T=function(t,e){return Qe(e)},$=function(t){return t}),function(v,y,t,e,b){a&&(C=function(t,e,n){return A&&(s[A]=t),s[k]=e,s.$index=n,a(v,s)});var x=Ut();v.$watchCollection(r,function(t){var i,e,n,r,o,a,s,l,c,u,h,d,f=y[0],p=Ut();if(S&&(v[S]=t),L(t))c=t,l=C||T;else for(var g in l=C||$,c=[],t)R.call(t,g)&&"$"!==g.charAt(0)&&c.push(g);for(r=c.length,h=new Array(r),i=0;i<r;i++)if(o=t===c?i:c[i],a=t[o],s=l(o,a,i),x[s])u=x[s],delete x[s],p[s]=u,h[i]=u;else{if(p[s])throw ot(h,function(t){t&&t.scope&&(x[t.id]=t)}),P("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",_,s,a);h[i]={id:s,scope:nt,clone:nt},p[s]=!0}for(var m in x){if(d=qt((u=x[m]).clone),O.leave(d),d[0].parentNode)for(i=0,e=d.length;i<e;i++)d[i][D]=!0;u.scope.$destroy()}for(i=0;i<r;i++)if(o=t===c?i:c[i],a=t[o],(u=h[i]).scope){for(n=f;(n=n.nextSibling)&&n[D];);E(u)!=n&&O.move(qt(u.clone),null,f),f=I(u),M(u.scope,i,k,a,A,o,r)}else b(function(t,e){u.scope=e;var n=w.cloneNode(!1);t[t.length++]=n,O.enter(t,null,f),f=n,u.clone=t,p[u.id]=u,M(u.scope,i,k,a,A,o,r)});x=p})}}}}],ka="ng-hide",Aa="ng-hide-animate",Oa=["$animate",function(i){return{restrict:"A",multiElement:!0,link:function(t,e,n){t.$watch(n.ngShow,function(t){i[t?"removeClass":"addClass"](e,ka,{tempClasses:Aa})})}}}],Da=["$animate",function(i){return{restrict:"A",multiElement:!0,link:function(t,e,n){t.$watch(n.ngHide,function(t){i[t?"addClass":"removeClass"](e,ka,{tempClasses:Aa})})}}}],Pa=oo(function(t,n,e){t.$watch(e.ngStyle,function(t,e){e&&t!==e&&ot(e,function(t,e){n.css(e,"")}),t&&n.css(t)},!0)}),Ma=["$animate",function(u){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(t,e,n,r){var i=n.ngSwitch||n.on,o=[],a=[],s=[],l=[],c=function(t,e){return function(){t.splice(e,1)}};t.$watch(i,function(t){var e,n;for(e=0,n=s.length;e<n;++e)u.cancel(s[e]);for(e=s.length=0,n=l.length;e<n;++e){var i=qt(a[e].clone);l[e].$destroy(),(s[e]=u.leave(i)).then(c(s,e))}a.length=0,l.length=0,(o=r.cases["!"+t]||r.cases["?"])&&ot(o,function(r){r.transclude(function(t,e){l.push(e);var n=r.element;t[t.length++]=et.createComment(" end ngSwitchWhen: ");var i={clone:t};a.push(i),u.enter(t,n.parent(),n)})})})}}}],Ea=oo({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,i,r){i.cases["!"+n.ngSwitchWhen]=i.cases["!"+n.ngSwitchWhen]||[],i.cases["!"+n.ngSwitchWhen].push({transclude:r,element:e})}}),Ia=oo({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,i,r){i.cases["?"]=i.cases["?"]||[],i.cases["?"].push({transclude:r,element:e})}}),Na=oo({restrict:"EAC",link:function(t,e,n,i,r){if(!r)throw w("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",Ct(e));r(function(t){e.empty(),e.append(t)})}}),Ra=["$templateCache",function(r){return{restrict:"E",terminal:!0,compile:function(t,e){if("text/ng-template"==e.type){var n=e.id,i=t[0].text;r.put(n,i)}}}}],La={$setViewValue:lt,$render:lt};function Ha(t){t[0].hasAttribute("selected")&&(t[0].selected=!0)}var ja=["$element","$scope","$attrs",function(n,t,e){var a=this,i=new Ze;a.ngModelCtrl=La,a.unknownOption=rt(et.createElement("option")),a.renderUnknownOption=function(t){var e="? "+Qe(t)+" ?";a.unknownOption.val(e),n.prepend(a.unknownOption),n.val(e)},t.$on("$destroy",function(){a.renderUnknownOption=lt}),a.removeUnknownOption=function(){a.unknownOption.parent()&&a.unknownOption.remove()},a.readValue=function(){return a.removeUnknownOption(),n.val()},a.writeValue=function(t){a.hasOption(t)?(a.removeUnknownOption(),n.val(t),""===t&&a.emptyOption.prop("selected",!0)):null==t&&a.emptyOption?(a.removeUnknownOption(),n.val("")):a.renderUnknownOption(t)},a.addOption=function(t,e){if(e[0].nodeType!==Xt){Vt(t,'"option value"'),""===t&&(a.emptyOption=e);var n=i.get(t)||0;i.put(t,n+1),a.ngModelCtrl.$render(),Ha(e)}},a.removeOption=function(t){var e=i.get(t);e&&(1===e?(i.remove(t),""===t&&(a.emptyOption=nt)):i.put(t,e-1))},a.hasOption=function(t){return!!i.get(t)},a.registerOption=function(t,n,i,e,r){var o;e?i.$observe("value",function(t){ht(o)&&a.removeOption(o),o=t,a.addOption(t,n)}):r?t.$watch(r,function(t,e){i.$set("value",t),e!==t&&a.removeOption(e),a.addOption(t,n)}):a.addOption(i.value,n);n.on("$destroy",function(){a.removeOption(i.value),a.ngModelCtrl.$render()})}}],Fa=function(){return{restrict:"E",require:["select","?ngModel"],controller:ja,priority:1,link:{pre:t,post:e}};function t(t,n,e,i){var r=i[1];if(r){var o=i[0];if(o.ngModelCtrl=r,n.on("change",function(){t.$apply(function(){r.$setViewValue(o.readValue())})}),e.multiple){o.readValue=function(){var e=[];return ot(n.find("option"),function(t){t.selected&&e.push(t.value)}),e},o.writeValue=function(t){var e=new Ze(t);ot(n.find("option"),function(t){t.selected=ht(e.get(t.value))})};var a,s=NaN;t.$watch(function(){s!==r.$viewValue||_t(a,r.$viewValue)||(a=W(r.$viewValue),r.$render()),s=r.$viewValue}),r.$isEmpty=function(t){return!t||0===t.length}}}}function e(t,e,n,i){var r=i[1];if(r){var o=i[0];r.$render=function(){o.writeValue(r.$viewValue)}}}},za=["$interpolate",function(n){return{restrict:"E",priority:100,compile:function(t,e){if(ht(e.value))var a=n(e.value,!0);else{var s=n(t.text(),!0);s||e.$set("value",t.text())}return function(t,e,n){var i="$selectController",r=e.parent(),o=r.data(i)||r.parent().data(i);o&&o.registerOption(t,e,n,a,s)}}}}],Ba=T({restrict:"E",terminal:!1}),Va=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,i){i&&(n.required=!0,i.$validators.required=function(t,e){return!n.required||!i.$isEmpty(e)},n.$observe("required",function(){i.$validate()}))}}},Wa=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,i){if(i){var r,o=n.ngPattern||n.pattern;n.$observe("pattern",function(t){if(ft(t)&&0<t.length&&(t=new RegExp("^"+t+"$")),t&&!t.test)throw w("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",o,t,Ct(e));r=t||nt,i.$validate()}),i.$validators.pattern=function(t,e){return i.$isEmpty(e)||ut(r)||r.test(e)}}}}},qa=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,i){if(i){var r=-1;n.$observe("maxlength",function(t){var e=m(t);r=isNaN(e)?-1:e,i.$validate()}),i.$validators.maxlength=function(t,e){return r<0||i.$isEmpty(e)||e.length<=r}}}}},Ua=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,i){if(i){var r=0;n.$observe("minlength",function(t){r=m(t)||0,i.$validate()}),i.$validators.minlength=function(t,e){return i.$isEmpty(e)||e.length>=r}}}}};a.angular.bootstrap?a.console&&console.log("WARNING: Tried to load angular more than once."):(Ft(),ie(A),A.module("ngLocale",[],["$provide",function(t){var r={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};function o(t){var e=(t+="").indexOf(".");return-1==e?0:t.length-e-1}function a(t,e){var n=e;nt===n&&(n=Math.min(o(t),3));var i=Math.pow(10,n);return{v:n,f:(t*i|0)%i}}t.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(t,e){var n=0|t,i=a(t,e);return 1==n&&0==i.v?r.ONE:r.OTHER}})}]),rt(et).ready(function(){Mt(et,Et)}))}(window,document),!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(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function($){$.ui=$.ui||{};$.ui.version="1.12.1";var r,n=0,s=Array.prototype.slice;$.cleanData=(r=$.cleanData,function(t){var e,n,i;for(i=0;null!=(n=t[i]);i++)try{(e=$._data(n,"events"))&&e.remove&&$(n).triggerHandler("remove")}catch(t){}r(t)}),$.widget=function(t,n,e){var i,r,o,a={},s=t.split(".")[0],l=s+"-"+(t=t.split(".")[1]);return e||(e=n,n=$.Widget),$.isArray(e)&&(e=$.extend.apply(null,[{}].concat(e))),$.expr[":"][l.toLowerCase()]=function(t){return!!$.data(t,l)},$[s]=$[s]||{},i=$[s][t],r=$[s][t]=function(t,e){if(!this._createWidget)return new r(t,e);arguments.length&&this._createWidget(t,e)},$.extend(r,i,{version:e.version,_proto:$.extend({},e),_childConstructors:[]}),(o=new n).options=$.widget.extend({},o.options),$.each(e,function(e,o){$.isFunction(o)?a[e]=function(){function i(){return n.prototype[e].apply(this,arguments)}function r(t){return n.prototype[e].apply(this,t)}return function(){var t,e=this._super,n=this._superApply;return this._super=i,this._superApply=r,t=o.apply(this,arguments),this._super=e,this._superApply=n,t}}():a[e]=o}),r.prototype=$.widget.extend(o,{widgetEventPrefix:i&&o.widgetEventPrefix||t},a,{constructor:r,namespace:s,widgetName:t,widgetFullName:l}),i?($.each(i._childConstructors,function(t,e){var n=e.prototype;$.widget(n.namespace+"."+n.widgetName,r,e._proto)}),delete i._childConstructors):n._childConstructors.push(r),$.widget.bridge(t,r),r},$.widget.extend=function(t){for(var e,n,i=s.call(arguments,1),r=0,o=i.length;r<o;r++)for(e in i[r])n=i[r][e],i[r].hasOwnProperty(e)&&void 0!==n&&($.isPlainObject(n)?t[e]=$.isPlainObject(t[e])?$.widget.extend({},t[e],n):$.widget.extend({},n):t[e]=n);return t},$.widget.bridge=function(o,e){var a=e.prototype.widgetFullName||o;$.fn[o]=function(n){var t="string"==typeof n,i=s.call(arguments,1),r=this;return t?this.length||"instance"!==n?this.each(function(){var t,e=$.data(this,a);return"instance"===n?(r=e,!1):e?$.isFunction(e[n])&&"_"!==n.charAt(0)?(t=e[n].apply(e,i))!==e&&void 0!==t?(r=t&&t.jquery?r.pushStack(t.get()):t,!1):void 0:$.error("no such method '"+n+"' for "+o+" widget instance"):$.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+n+"'")}):r=void 0:(i.length&&(n=$.widget.extend.apply(null,[n].concat(i))),this.each(function(){var t=$.data(this,a);t?(t.option(n||{}),t._init&&t._init()):$.data(this,a,new e(n,this))})),r}},$.Widget=function(){},$.Widget._childConstructors=[],$.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=$(e||this.defaultElement||this)[0],this.element=$(e),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=$(),this.hoverable=$(),this.focusable=$(),this.classesElementLookup={},e!==this&&($.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=$(e.style?e.ownerDocument:e.document||e),this.window=$(this.document[0].defaultView||this.document[0].parentWindow)),this.options=$.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:$.noop,_create:$.noop,_init:$.noop,destroy:function(){var n=this;this._destroy(),$.each(this.classesElementLookup,function(t,e){n._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:$.noop,widget:function(){return this.element},option:function(t,e){var n,i,r,o=t;if(0===arguments.length)return $.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(n=t.split(".")).shift(),n.length){for(i=o[t]=$.widget.extend({},this.options[t]),r=0;r<n.length-1;r++)i[n[r]]=i[n[r]]||{},i=i[n[r]];if(t=n.pop(),1===arguments.length)return void 0===i[t]?null:i[t];i[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=e}return this._setOptions(o),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,n,i;for(e in t)i=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&i&&i.length&&(n=$(i.get()),this._removeClass(i,e),n.addClass(this._classes({element:n,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(r){var o=[],a=this;function t(t,e){var n,i;for(i=0;i<t.length;i++)n=a.classesElementLookup[t[i]]||$(),n=r.add?$($.unique(n.get().concat(r.element.get()))):$(n.not(r.element).get()),a.classesElementLookup[t[i]]=n,o.push(t[i]),e&&r.classes[t[i]]&&o.push(r.classes[t[i]])}return r=$.extend({element:this.element,classes:this.options.classes||{}},r),this._on(r.element,{remove:"_untrackClassesElement"}),r.keys&&t(r.keys.match(/\S+/g)||[],!0),r.extra&&t(r.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(n){var i=this;$.each(i.classesElementLookup,function(t,e){-1!==$.inArray(n.target,e)&&(i.classesElementLookup[t]=$(e.not(n.target).get()))})},_removeClass:function(t,e,n){return this._toggleClass(t,e,n,!1)},_addClass:function(t,e,n){return this._toggleClass(t,e,n,!0)},_toggleClass:function(t,e,n,i){i="boolean"==typeof i?i:n;var r="string"==typeof t||null===t,o={extra:r?e:n,keys:r?t:e,element:r?this.element:t,add:i};return o.element.toggleClass(this._classes(o),i),this},_on:function(a,s,t){var l,c=this;"boolean"!=typeof a&&(t=s,s=a,a=!1),t?(s=l=$(s),this.bindings=this.bindings.add(s)):(t=s,s=this.element,l=this.widget()),$.each(t,function(t,e){function n(){if(a||!0!==c.options.disabled&&!$(this).hasClass("ui-state-disabled"))return("string"==typeof e?c[e]:e).apply(c,arguments)}"string"!=typeof e&&(n.guid=e.guid=e.guid||n.guid||$.guid++);var i=t.match(/^([\w:-]*)\s*(.*)$/),r=i[1]+c.eventNamespace,o=i[2];o?l.on(r,o,n):s.on(r,n)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e).off(e),this.bindings=$(this.bindings.not(t).get()),this.focusable=$(this.focusable.not(t).get()),this.hoverable=$(this.hoverable.not(t).get())},_delay:function(t,e){function n(){return("string"==typeof t?i[t]:t).apply(i,arguments)}var i=this;return setTimeout(n,e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass($(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass($(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass($(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass($(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,n){var i,r,o=this.options[t];if(n=n||{},(e=$.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],r=e.originalEvent)for(i in r)i in e||(e[i]=r[i]);return this.element.trigger(e,n),!($.isFunction(o)&&!1===o.apply(this.element[0],[e].concat(n))||e.isDefaultPrevented())}},$.each({show:"fadeIn",hide:"fadeOut"},function(o,a){$.Widget.prototype["_"+o]=function(e,t,n){var i;"string"==typeof t&&(t={effect:t});var r=t?!0===t||"number"==typeof t?a:t.effect||a:o;"number"==typeof(t=t||{})&&(t={duration:t}),i=!$.isEmptyObject(t),t.complete=n,t.delay&&e.delay(t.delay),i&&$.effects&&$.effects.effect[r]?e[o](t):r!==o&&e[r]?e[r](t.duration,t.easing,n):e.queue(function(t){$(this)[o](),n&&n.call(e[0]),t()})}});$.widget;!function(){var r,w=Math.max,S=Math.abs,i=/left|center|right/,o=/top|center|bottom/,a=/[\+\-]\d+(\.[\d]+)?%?/,s=/^\w+/,l=/%$/,e=$.fn.position;function C(t,e,n){return[parseFloat(t[0])*(l.test(t[0])?e/100:1),parseFloat(t[1])*(l.test(t[1])?n/100:1)]}function T(t,e){return parseInt($.css(t,e),10)||0}function n(t){var e=t[0];return 9===e.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:$.isWindow(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}$.position={scrollbarWidth:function(){if(void 0!==r)return r;var t,e,n=$("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),i=n.children()[0];return $("body").append(n),t=i.offsetWidth,n.css("overflow","scroll"),t===(e=i.offsetWidth)&&(e=n[0].clientWidth),n.remove(),r=t-e},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),n=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),i="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===n||"auto"===n&&t.height<t.element[0].scrollHeight?$.position.scrollbarWidth():0,height:i?$.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=$(t||window),n=$.isWindow(e[0]),i=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:n,isDocument:i,offset:!n&&!i?$(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},$.fn.position=function(h){if(!h||!h.of)return e.apply(this,arguments);h=$.extend({},h);var d,f,p,g,m,t,v=$(h.of),y=$.position.getWithinInfo(h.within),b=$.position.getScrollInfo(y),x=(h.collision||"flip").split(" "),_={};return t=n(v),v[0].preventDefault&&(h.at="left top"),f=t.width,p=t.height,g=t.offset,m=$.extend({},g),$.each(["my","at"],function(){var t,e,n=(h[this]||"").split(" ");1===n.length&&(n=i.test(n[0])?n.concat(["center"]):o.test(n[0])?["center"].concat(n):["center","center"]),n[0]=i.test(n[0])?n[0]:"center",n[1]=o.test(n[1])?n[1]:"center",t=a.exec(n[0]),e=a.exec(n[1]),_[this]=[t?t[0]:0,e?e[0]:0],h[this]=[s.exec(n[0])[0],s.exec(n[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===h.at[0]?m.left+=f:"center"===h.at[0]&&(m.left+=f/2),"bottom"===h.at[1]?m.top+=p:"center"===h.at[1]&&(m.top+=p/2),d=C(_.at,f,p),m.left+=d[0],m.top+=d[1],this.each(function(){var n,t,a=$(this),s=a.outerWidth(),l=a.outerHeight(),e=T(this,"marginLeft"),i=T(this,"marginTop"),r=s+e+T(this,"marginRight")+b.width,o=l+i+T(this,"marginBottom")+b.height,c=$.extend({},m),u=C(_.my,a.outerWidth(),a.outerHeight());"right"===h.my[0]?c.left-=s:"center"===h.my[0]&&(c.left-=s/2),"bottom"===h.my[1]?c.top-=l:"center"===h.my[1]&&(c.top-=l/2),c.left+=u[0],c.top+=u[1],n={marginLeft:e,marginTop:i},$.each(["left","top"],function(t,e){$.ui.position[x[t]]&&$.ui.position[x[t]][e](c,{targetWidth:f,targetHeight:p,elemWidth:s,elemHeight:l,collisionPosition:n,collisionWidth:r,collisionHeight:o,offset:[d[0]+u[0],d[1]+u[1]],my:h.my,at:h.at,within:y,elem:a})}),h.using&&(t=function(t){var e=g.left-c.left,n=e+f-s,i=g.top-c.top,r=i+p-l,o={target:{element:v,left:g.left,top:g.top,width:f,height:p},element:{element:a,left:c.left,top:c.top,width:s,height:l},horizontal:n<0?"left":0<e?"right":"center",vertical:r<0?"top":0<i?"bottom":"middle"};f<s&&S(e+n)<f&&(o.horizontal="center"),p<l&&S(i+r)<p&&(o.vertical="middle"),w(S(e),S(n))>w(S(i),S(r))?o.important="horizontal":o.important="vertical",h.using.call(this,t,o)}),a.offset($.extend(c,{using:t}))})},$.ui.position={fit:{left:function(t,e){var n,i=e.within,r=i.isWindow?i.scrollLeft:i.offset.left,o=i.width,a=t.left-e.collisionPosition.marginLeft,s=r-a,l=a+e.collisionWidth-o-r;e.collisionWidth>o?0<s&&l<=0?(n=t.left+s+e.collisionWidth-o-r,t.left+=s-n):t.left=0<l&&s<=0?r:l<s?r+o-e.collisionWidth:r:0<s?t.left+=s:0<l?t.left-=l:t.left=w(t.left-a,t.left)},top:function(t,e){var n,i=e.within,r=i.isWindow?i.scrollTop:i.offset.top,o=e.within.height,a=t.top-e.collisionPosition.marginTop,s=r-a,l=a+e.collisionHeight-o-r;e.collisionHeight>o?0<s&&l<=0?(n=t.top+s+e.collisionHeight-o-r,t.top+=s-n):t.top=0<l&&s<=0?r:l<s?r+o-e.collisionHeight:r:0<s?t.top+=s:0<l?t.top-=l:t.top=w(t.top-a,t.top)}},flip:{left:function(t,e){var n,i,r=e.within,o=r.offset.left+r.scrollLeft,a=r.width,s=r.isWindow?r.scrollLeft:r.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-s,u=l+e.collisionWidth-a-s,h="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,d="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];c<0?((n=t.left+h+d+f+e.collisionWidth-a-o)<0||n<S(c))&&(t.left+=h+d+f):0<u&&(0<(i=t.left-e.collisionPosition.marginLeft+h+d+f-s)||S(i)<u)&&(t.left+=h+d+f)},top:function(t,e){var n,i,r=e.within,o=r.offset.top+r.scrollTop,a=r.height,s=r.isWindow?r.scrollTop:r.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-s,u=l+e.collisionHeight-a-s,h="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,d="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,f=-2*e.offset[1];c<0?((i=t.top+h+d+f+e.collisionHeight-a-o)<0||i<S(c))&&(t.top+=h+d+f):0<u&&(0<(n=t.top-e.collisionPosition.marginTop+h+d+f-s)||S(n)<u)&&(t.top+=h+d+f)}},flipfit:{left:function(){$.ui.position.flip.left.apply(this,arguments),$.ui.position.fit.left.apply(this,arguments)},top:function(){$.ui.position.flip.top.apply(this,arguments),$.ui.position.fit.top.apply(this,arguments)}}}}();$.ui.position,$.extend($.expr[":"],{data:$.expr.createPseudo?$.expr.createPseudo(function(e){return function(t){return!!$.data(t,e)}}):function(t,e,n){return!!$.data(t,n[3])}}),$.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});var t,i,l="ui-effects-",u="ui-effects-style",h="ui-effects-animated",d=$;$.effects={effect:{}},function(u,h){var c,t="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",d=/^([\-+])=\s*(\d+\.?\d*)/,e=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],f=u.Color=function(t,e,n,i){return new u.Color.fn.parse(t,e,n,i)},p={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},g={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},a=f.support={},n=u("<p>")[0],m=u.each;function v(t,e,n){var i=g[e.type]||{};return null==t?n||!e.def?null:e.def:(t=i.floor?~~t:parseFloat(t),isNaN(t)?e.def:i.mod?(t+i.mod)%i.mod:t<0?0:i.max<t?i.max:t)}function s(a){var s=f(),l=s._rgba=[];return a=a.toLowerCase(),m(e,function(t,e){var n,i=e.re.exec(a),r=i&&e.parse(i),o=e.space||"rgba";if(r)return n=s[o](r),s[p[o].cache]=n[p[o].cache],l=s._rgba=n._rgba,!1}),l.length?("0,0,0,0"===l.join()&&u.extend(l,c.transparent),s):c[a]}function l(t,e,n){return 6*(n=(n+1)%1)<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}n.style.cssText="background-color:rgba(1,1,1,.5)",a.rgba=-1<n.style.backgroundColor.indexOf("rgba"),m(p,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),f.fn=u.extend(f.prototype,{parse:function(r,t,e,n){if(r===h)return this._rgba=[null,null,null,null],this;(r.jquery||r.nodeType)&&(r=u(r).css(t),t=h);var o=this,i=u.type(r),a=this._rgba=[];return t!==h&&(r=[r,t,e,n],i="array"),"string"===i?this.parse(s(r)||c._default):"array"===i?(m(p.rgba.props,function(t,e){a[e.idx]=v(r[e.idx],e)}),this):"object"===i?(m(p,r instanceof f?function(t,e){r[e.cache]&&(o[e.cache]=r[e.cache].slice())}:function(t,n){var i=n.cache;m(n.props,function(t,e){if(!o[i]&&n.to){if("alpha"===t||null==r[t])return;o[i]=n.to(o._rgba)}o[i][e.idx]=v(r[t],e,!0)}),o[i]&&u.inArray(null,o[i].slice(0,3))<0&&(o[i][3]=1,n.from&&(o._rgba=n.from(o[i])))}),this):void 0},is:function(t){var r=f(t),o=!0,a=this;return m(p,function(t,e){var n,i=r[e.cache];return i&&(n=a[e.cache]||e.to&&e.to(a._rgba)||[],m(e.props,function(t,e){if(null!=i[e.idx])return o=i[e.idx]===n[e.idx]})),o}),o},_space:function(){var n=[],i=this;return m(p,function(t,e){i[e.cache]&&n.push(t)}),n.pop()},transition:function(t,a){var s=f(t),e=s._space(),n=p[e],i=0===this.alpha()?f("transparent"):this,l=i[n.cache]||n.to(i._rgba),c=l.slice();return s=s[n.cache],m(n.props,function(t,e){var n=e.idx,i=l[n],r=s[n],o=g[e.type]||{};null!==r&&(c[n]=null===i?r:(o.mod&&(r-i>o.mod/2?i+=o.mod:i-r>o.mod/2&&(i-=o.mod)),v((r-i)*a+i,e)))}),this[e](c)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),n=e.pop(),i=f(t)._rgba;return f(u.map(e,function(t,e){return(1-n)*i[e]+n*t}))},toRgbaString:function(){var t="rgba(",e=u.map(this._rgba,function(t,e){return null==t?2<e?1:0:t});return 1===e[3]&&(e.pop(),t="rgb("),t+e.join()+")"},toHslaString:function(){var t="hsla(",e=u.map(this.hsla(),function(t,e){return null==t&&(t=2<e?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t});return 1===e[3]&&(e.pop(),t="hsl("),t+e.join()+")"},toHexString:function(t){var e=this._rgba.slice(),n=e.pop();return t&&e.push(~~(255*n)),"#"+u.map(e,function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),f.fn.parse.prototype=f.fn,p.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=t[3],s=Math.max(i,r,o),l=Math.min(i,r,o),c=s-l,u=s+l,h=.5*u;return e=l===s?0:i===s?60*(r-o)/c+360:r===s?60*(o-i)/c+120:60*(i-r)/c+240,n=0===c?0:h<=.5?c/u:c/(2-u),[Math.round(e)%360,n,h,null==a?1:a]},p.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,n=t[1],i=t[2],r=t[3],o=i<=.5?i*(1+n):i+n-i*n,a=2*i-o;return[Math.round(255*l(a,o,e+1/3)),Math.round(255*l(a,o,e)),Math.round(255*l(a,o,e-1/3)),r]},m(p,function(l,t){var n=t.props,a=t.cache,s=t.to,c=t.from;f.fn[l]=function(t){if(s&&!this[a]&&(this[a]=s(this._rgba)),t===h)return this[a].slice();var e,i=u.type(t),r="array"===i||"object"===i?t:arguments,o=this[a].slice();return m(n,function(t,e){var n=r["object"===i?t:e.idx];null==n&&(n=o[e.idx]),o[e.idx]=v(n,e)}),c?((e=f(c(o)))[a]=o,e):f(o)},m(n,function(a,s){f.fn[a]||(f.fn[a]=function(t){var e,n=u.type(t),i="alpha"===a?this._hsla?"hsla":"rgba":l,r=this[i](),o=r[s.idx];return"undefined"===n?o:("function"===n&&(t=t.call(this,o),n=u.type(t)),null==t&&s.empty?this:("string"===n&&(e=d.exec(t))&&(t=o+parseFloat(e[2])*("+"===e[1]?1:-1)),r[s.idx]=t,this[i](r)))})})}),f.hook=function(t){var e=t.split(" ");m(e,function(t,o){u.cssHooks[o]={set:function(t,e){var n,i,r="";if("transparent"!==e&&("string"!==u.type(e)||(n=s(e)))){if(e=f(n||e),!a.rgba&&1!==e._rgba[3]){for(i="backgroundColor"===o?t.parentNode:t;(""===r||"transparent"===r)&&i&&i.style;)try{r=u.css(i,"backgroundColor"),i=i.parentNode}catch(t){}e=e.blend(r&&"transparent"!==r?r:"_default")}e=e.toRgbaString()}try{t.style[o]=e}catch(t){}}},u.fx.step[o]=function(t){t.colorInit||(t.start=f(t.elem,o),t.end=f(t.end),t.colorInit=!0),u.cssHooks[o].set(t.elem,t.start.transition(t.end,t.pos))}})},f.hook(t),u.cssHooks.borderColor={expand:function(n){var i={};return m(["Top","Right","Bottom","Left"],function(t,e){i["border"+e+"Color"]=n}),i}},c=u.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(d),function(){var o,r,a,s=["add","remove","toggle"],l={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function c(t){var e,n,i=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,r={};if(i&&i.length&&i[0]&&i[i[0]])for(n=i.length;n--;)"string"==typeof i[e=i[n]]&&(r[$.camelCase(e)]=i[e]);else for(e in i)"string"==typeof i[e]&&(r[e]=i[e]);return r}function u(t,e){var n,i,r={};for(n in e)i=e[n],t[n]!==i&&(l[n]||!$.fx.step[n]&&isNaN(parseFloat(i))||(r[n]=i));return r}$.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,e){$.fx.step[e]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(d.style(t.elem,e,t.end),t.setAttr=!0)}}),$.fn.addBack||($.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),$.effects.animateClass=function(r,t,e,n){var o=$.speed(t,e,n);return this.queue(function(){var t,n=$(this),e=n.attr("class")||"",i=o.children?n.find("*").addBack():n;i=i.map(function(){return{el:$(this),start:c(this)}}),(t=function(){$.each(s,function(t,e){r[e]&&n[e+"Class"](r[e])})})(),i=i.map(function(){return this.end=c(this.el[0]),this.diff=u(this.start,this.end),this}),n.attr("class",e),i=i.map(function(){var t=this,e=$.Deferred(),n=$.extend({},o,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,n),e.promise()}),$.when.apply($,i.get()).done(function(){t(),$.each(arguments,function(){var e=this.el;$.each(this.diff,function(t){e.css(t,"")})}),o.complete.call(n[0])})})},$.fn.extend({addClass:(a=$.fn.addClass,function(t,e,n,i){return e?$.effects.animateClass.call(this,{add:t},e,n,i):a.apply(this,arguments)}),removeClass:(r=$.fn.removeClass,function(t,e,n,i){return 1<arguments.length?$.effects.animateClass.call(this,{remove:t},e,n,i):r.apply(this,arguments)}),toggleClass:(o=$.fn.toggleClass,function(t,e,n,i,r){return"boolean"==typeof e||void 0===e?n?$.effects.animateClass.call(this,e?{add:t}:{remove:t},n,i,r):o.apply(this,arguments):$.effects.animateClass.call(this,{toggle:t},e,n,i)}),switchClass:function(t,e,n,i,r){return $.effects.animateClass.call(this,{add:e,remove:t},n,i,r)}})}(),function(){var e,n,i,r;function c(t,e,n,i){return $.isPlainObject(t)&&(t=(e=t).effect),t={effect:t},null==e&&(e={}),$.isFunction(e)&&(i=e,n=null,e={}),("number"==typeof e||$.fx.speeds[e])&&(i=n,n=e,e={}),$.isFunction(n)&&(i=n,n=null),e&&$.extend(t,e),n=n||e.duration,t.duration=$.fx.off?0:"number"==typeof n?n:n in $.fx.speeds?$.fx.speeds[n]:$.fx.speeds._default,t.complete=i||e.complete,t}function o(t){return!(t&&"number"!=typeof t&&!$.fx.speeds[t])||("string"==typeof t&&!$.effects.effect[t]||(!!$.isFunction(t)||"object"==typeof t&&!t.effect))}function a(t,e){var n=e.outerWidth(),i=e.outerHeight(),r=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,n,i,0];return{top:parseFloat(r[1])||0,right:"auto"===r[2]?n:parseFloat(r[2]),bottom:"auto"===r[3]?i:parseFloat(r[3]),left:parseFloat(r[4])||0}}$.expr&&$.expr.filters&&$.expr.filters.animated&&($.expr.filters.animated=(e=$.expr.filters.animated,function(t){return!!$(t).data(h)||e(t)})),!1!==$.uiBackCompat&&$.extend($.effects,{save:function(t,e){for(var n=0,i=e.length;n<i;n++)null!==e[n]&&t.data(l+e[n],t[0].style[e[n]])},restore:function(t,e){for(var n,i=0,r=e.length;i<r;i++)null!==e[i]&&(n=t.data(l+e[i]),t.css(e[i],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(n){if(n.parent().is(".ui-effects-wrapper"))return n.parent();var i={width:n.outerWidth(!0),height:n.outerHeight(!0),float:n.css("float")},t=$("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:n.width(),height:n.height()},r=document.activeElement;try{r.id}catch(t){r=document.body}return n.wrap(t),(n[0]===r||$.contains(n[0],r))&&$(r).trigger("focus"),t=n.parent(),"static"===n.css("position")?(t.css({position:"relative"}),n.css({position:"relative"})):($.extend(i,{position:n.css("position"),zIndex:n.css("z-index")}),$.each(["top","left","bottom","right"],function(t,e){i[e]=n.css(e),isNaN(parseInt(i[e],10))&&(i[e]="auto")}),n.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),n.css(e),t.css(i).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===e||$.contains(t[0],e))&&$(e).trigger("focus")),t}}),$.extend($.effects,{version:"1.12.1",define:function(t,e,n){return n||(n=e,e="effect"),$.effects.effect[t]=n,$.effects.effect[t].mode=e,n},scaledDimensions:function(t,e,n){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var i="horizontal"!==n?(e||100)/100:1,r="vertical"!==n?(e||100)/100:1;return{height:t.height()*r,width:t.width()*i,outerHeight:t.outerHeight()*r,outerWidth:t.outerWidth()*i}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,n){var i=t.queue();1<e&&i.splice.apply(i,[1,0].concat(i.splice(e,n))),t.dequeue()},saveStyle:function(t){t.data(u,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(u)||"",t.removeData(u)},mode:function(t,e){var n=t.is(":hidden");return"toggle"===e&&(e=n?"show":"hide"),(n?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var n,i;switch(t[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=t[0]/e.height}switch(t[1]){case"left":i=0;break;case"center":i=.5;break;case"right":i=1;break;default:i=t[1]/e.width}return{x:i,y:n}},createPlaceholder:function(t){var e,n=t.css("position"),i=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",e=$("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(l+"placeholder",e)),t.css({position:n,left:i.left,top:i.top}),e},removePlaceholder:function(t){var e=l+"placeholder",n=t.data(e);n&&(n.remove(),t.removeData(e))},cleanUp:function(t){$.effects.restoreStyle(t),$.effects.removePlaceholder(t)},setTransition:function(i,t,r,o){return o=o||{},$.each(t,function(t,e){var n=i.cssUnit(e);0<n[0]&&(o[e]=n[0]*r+n[1])}),o}}),$.fn.extend({effect:function(){var r=c.apply(this,arguments),o=$.effects.effect[r.effect],a=o.mode,t=r.queue,e=t||"fx",complete=r.complete,s=r.mode,l=[],n=function(t){var e=$(this),n=$.effects.mode(e,s)||a;e.data(h,!0),l.push(n),a&&("show"===n||n===a&&"hide"===n)&&e.show(),a&&"none"===n||$.effects.saveStyle(e),$.isFunction(t)&&t()};if($.fx.off||!o)return s?this[s](r.duration,complete):this.each(function(){complete&&complete.call(this)});function i(t){var e=$(this);function n(){e.removeData(h),$.effects.cleanUp(e),"hide"===r.mode&&e.hide(),i()}function i(){$.isFunction(complete)&&complete.call(e[0]),$.isFunction(t)&&t()}r.mode=l.shift(),!1===$.uiBackCompat||a?"none"===r.mode?(e[s](),i()):o.call(e[0],r,n):(e.is(":hidden")?"hide"===s:"show"===s)?(e[s](),i()):o.call(e[0],r,i)}return!1===t?this.each(n).each(i):this.queue(e,n).queue(e,i)},show:(r=$.fn.show,function(t){if(o(t))return r.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="show",this.effect.call(this,e)}),hide:(i=$.fn.hide,function(t){if(o(t))return i.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)}),toggle:(n=$.fn.toggle,function(t){if(o(t)||"boolean"==typeof t)return n.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="toggle",this.effect.call(this,e)}),cssUnit:function(t){var n=this.css(t),i=[];return $.each(["em","px","%","pt"],function(t,e){0<n.indexOf(e)&&(i=[parseFloat(n),e])}),i},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):a(this.css("clip"),this)},transfer:function(t,e){var n=$(this),i=$(t.to),r="fixed"===i.css("position"),o=$("body"),a=r?o.scrollTop():0,s=r?o.scrollLeft():0,l=i.offset(),c={top:l.top-a,left:l.left-s,height:i.innerHeight(),width:i.innerWidth()},u=n.offset(),h=$("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(t.className).css({top:u.top-a,left:u.left-s,height:n.innerHeight(),width:n.innerWidth(),position:r?"fixed":"absolute"}).animate(c,t.duration,t.easing,function(){h.remove(),$.isFunction(e)&&e()})}}),$.fx.step.clip=function(t){t.clipInit||(t.start=$(t.elem).cssClip(),"string"==typeof t.end&&(t.end=a(t.end,t.elem)),t.clipInit=!0),$(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})}}(),i={},$.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){i[t]=function(t){return Math.pow(t,e+2)}}),$.extend(i,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}}),$.each(i,function(t,e){$.easing["easeIn"+t]=e,$.easing["easeOut"+t]=function(t){return 1-e(1-t)},$.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});$.effects,$.effects.define("blind","hide",function(t,e){var n={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},i=$(this),r=t.direction||"up",o=i.cssClip(),a={clip:$.extend({},o)},s=$.effects.createPlaceholder(i);a.clip[n[r][0]]=a.clip[n[r][1]],"show"===t.mode&&(i.cssClip(a.clip),s&&s.css($.effects.clipToBox(a)),a.clip=o),s&&s.animate($.effects.clipToBox(a),t.duration,t.easing),i.animate(a,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),$.effects.define("bounce",function(t,e){var n,i,r,o=$(this),a=t.mode,s="hide"===a,l="show"===a,c=t.direction||"up",u=t.distance,h=t.times||5,d=2*h+(l||s?1:0),f=t.duration/d,p=t.easing,g="up"===c||"down"===c?"top":"left",m="up"===c||"left"===c,v=0,y=o.queue().length;for($.effects.createPlaceholder(o),r=o.css(g),u||(u=o["top"===g?"outerHeight":"outerWidth"]()/3),l&&((i={opacity:1})[g]=r,o.css("opacity",0).css(g,m?2*-u:2*u).animate(i,f,p)),s&&(u/=Math.pow(2,h-1)),(i={})[g]=r;v<h;v++)(n={})[g]=(m?"-=":"+=")+u,o.animate(n,f,p).animate(i,f,p),u=s?2*u:u/2;s&&((n={opacity:0})[g]=(m?"-=":"+=")+u,o.animate(n,f,p)),o.queue(e),$.effects.unshift(o,y,d+1)}),$.effects.define("clip","hide",function(t,e){var n,i={},r=$(this),o=t.direction||"vertical",a="both"===o,s=a||"horizontal"===o,l=a||"vertical"===o;n=r.cssClip(),i.clip={top:l?(n.bottom-n.top)/2:n.top,right:s?(n.right-n.left)/2:n.right,bottom:l?(n.bottom-n.top)/2:n.bottom,left:s?(n.right-n.left)/2:n.left},$.effects.createPlaceholder(r),"show"===t.mode&&(r.cssClip(i.clip),i.clip=n),r.animate(i,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),$.effects.define("drop","hide",function(t,e){var n,i=$(this),r="show"===t.mode,o=t.direction||"left",a="up"===o||"down"===o?"top":"left",s="up"===o||"left"===o?"-=":"+=",l="+="===s?"-=":"+=",c={opacity:0};$.effects.createPlaceholder(i),n=t.distance||i["top"===a?"outerHeight":"outerWidth"](!0)/2,c[a]=s+n,r&&(i.css(c),c[a]=l+n,c.opacity=1),i.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),$.effects.define("explode","hide",function(t,e){var n,i,r,o,a,s,l=t.pieces?Math.round(Math.sqrt(t.pieces)):3,c=l,u=$(this),h="show"===t.mode,d=u.show().css("visibility","hidden").offset(),f=Math.ceil(u.outerWidth()/c),p=Math.ceil(u.outerHeight()/l),g=[];function m(){g.push(this),g.length===l*c&&v()}for(n=0;n<l;n++)for(o=d.top+n*p,s=n-(l-1)/2,i=0;i<c;i++)r=d.left+i*f,a=i-(c-1)/2,u.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-i*f,top:-n*p}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:f,height:p,left:r+(h?a*f:0),top:o+(h?s*p:0),opacity:h?0:1}).animate({left:r+(h?0:a*f),top:o+(h?0:s*p),opacity:h?1:0},t.duration||500,t.easing,m);function v(){u.css({visibility:"visible"}),$(g).remove(),e()}}),$.effects.define("fade","toggle",function(t,e){var n="show"===t.mode;$(this).css("opacity",n?0:1).animate({opacity:n?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),$.effects.define("fold","hide",function(e,t){var n=$(this),i=e.mode,r="show"===i,o="hide"===i,a=e.size||15,s=/([0-9]+)%/.exec(a),l=!!e.horizFirst?["right","bottom"]:["bottom","right"],c=e.duration/2,u=$.effects.createPlaceholder(n),h=n.cssClip(),d={clip:$.extend({},h)},f={clip:$.extend({},h)},p=[h[l[0]],h[l[1]]],g=n.queue().length;s&&(a=parseInt(s[1],10)/100*p[o?0:1]),d.clip[l[0]]=a,f.clip[l[0]]=a,f.clip[l[1]]=0,r&&(n.cssClip(f.clip),u&&u.css($.effects.clipToBox(f)),f.clip=h),n.queue(function(t){u&&u.animate($.effects.clipToBox(d),c,e.easing).animate($.effects.clipToBox(f),c,e.easing),t()}).animate(d,c,e.easing).animate(f,c,e.easing).queue(t),$.effects.unshift(n,g,4)}),$.effects.define("highlight","show",function(t,e){var n=$(this),i={backgroundColor:n.css("backgroundColor")};"hide"===t.mode&&(i.opacity=0),$.effects.saveStyle(n),n.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(i,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),$.effects.define("size",function(r,e){var t,o,n,i=$(this),a=["fontSize"],s=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=r.mode,u="effect"!==c,h=r.scale||"both",d=r.origin||["middle","center"],f=i.css("position"),p=i.position(),g=$.effects.scaledDimensions(i),m=r.from||g,v=r.to||$.effects.scaledDimensions(i,0);$.effects.createPlaceholder(i),"show"===c&&(n=m,m=v,v=n),o={from:{y:m.height/g.height,x:m.width/g.width},to:{y:v.height/g.height,x:v.width/g.width}},"box"!==h&&"both"!==h||(o.from.y!==o.to.y&&(m=$.effects.setTransition(i,s,o.from.y,m),v=$.effects.setTransition(i,s,o.to.y,v)),o.from.x!==o.to.x&&(m=$.effects.setTransition(i,l,o.from.x,m),v=$.effects.setTransition(i,l,o.to.x,v))),"content"!==h&&"both"!==h||o.from.y!==o.to.y&&(m=$.effects.setTransition(i,a,o.from.y,m),v=$.effects.setTransition(i,a,o.to.y,v)),d&&(t=$.effects.getBaseline(d,g),m.top=(g.outerHeight-m.outerHeight)*t.y+p.top,m.left=(g.outerWidth-m.outerWidth)*t.x+p.left,v.top=(g.outerHeight-v.outerHeight)*t.y+p.top,v.left=(g.outerWidth-v.outerWidth)*t.x+p.left),i.css(m),"content"!==h&&"both"!==h||(s=s.concat(["marginTop","marginBottom"]).concat(a),l=l.concat(["marginLeft","marginRight"]),i.find("*[width]").each(function(){var t=$(this),e=$.effects.scaledDimensions(t),n={height:e.height*o.from.y,width:e.width*o.from.x,outerHeight:e.outerHeight*o.from.y,outerWidth:e.outerWidth*o.from.x},i={height:e.height*o.to.y,width:e.width*o.to.x,outerHeight:e.height*o.to.y,outerWidth:e.width*o.to.x};o.from.y!==o.to.y&&(n=$.effects.setTransition(t,s,o.from.y,n),i=$.effects.setTransition(t,s,o.to.y,i)),o.from.x!==o.to.x&&(n=$.effects.setTransition(t,l,o.from.x,n),i=$.effects.setTransition(t,l,o.to.x,i)),u&&$.effects.saveStyle(t),t.css(n),t.animate(i,r.duration,r.easing,function(){u&&$.effects.restoreStyle(t)})})),i.animate(v,{queue:!1,duration:r.duration,easing:r.easing,complete:function(){var t=i.offset();0===v.opacity&&i.css("opacity",m.opacity),u||(i.css("position","static"===f?"relative":f).offset(t),$.effects.saveStyle(i)),e()}})}),$.effects.define("scale",function(t,e){var n=$(this),i=t.mode,r=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"effect"!==i?0:100),o=$.extend(!0,{from:$.effects.scaledDimensions(n),to:$.effects.scaledDimensions(n,r,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(o.from.opacity=1,o.to.opacity=0),$.effects.effect.size.call(this,o,e)}),$.effects.define("puff","hide",function(t,e){var n=$.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});$.effects.effect.scale.call(this,n,e)}),$.effects.define("pulsate","show",function(t,e){var n=$(this),i=t.mode,r="show"===i,o=r||"hide"===i,a=2*(t.times||5)+(o?1:0),s=t.duration/a,l=0,c=1,u=n.queue().length;for(!r&&n.is(":visible")||(n.css("opacity",0).show(),l=1);c<a;c++)n.animate({opacity:l},s,t.easing),l=1-l;n.animate({opacity:l},s,t.easing),n.queue(e),$.effects.unshift(n,u,a+1)}),$.effects.define("shake",function(t,e){var n=1,i=$(this),r=t.direction||"left",o=t.distance||20,a=t.times||3,s=2*a+1,l=Math.round(t.duration/s),c="up"===r||"down"===r?"top":"left",u="up"===r||"left"===r,h={},d={},f={},p=i.queue().length;for($.effects.createPlaceholder(i),h[c]=(u?"-=":"+=")+o,d[c]=(u?"+=":"-=")+2*o,f[c]=(u?"-=":"+=")+2*o,i.animate(h,l,t.easing);n<a;n++)i.animate(d,l,t.easing).animate(f,l,t.easing);i.animate(d,l,t.easing).animate(h,l/2,t.easing).queue(e),$.effects.unshift(i,p,s+1)}),$.effects.define("slide","show",function(t,e){var n,i,r=$(this),o={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=t.mode,s=t.direction||"left",l="up"===s||"down"===s?"top":"left",c="up"===s||"left"===s,u=t.distance||r["top"===l?"outerHeight":"outerWidth"](!0),h={};$.effects.createPlaceholder(r),n=r.cssClip(),i=r.position()[l],h[l]=(c?-1:1)*u+i,h.clip=r.cssClip(),h.clip[o[s][1]]=h.clip[o[s][0]],"show"===a&&(r.cssClip(h.clip),r.css(l,h[l]),h.clip=n,h[l]=i),r.animate(h,{queue:!1,duration:t.duration,easing:t.easing,complete:e})});!1!==$.uiBackCompat&&$.effects.define("transfer",function(t,e){$(this).transfer(t,e)});function c(t){for(var e=t.css("visibility");"inherit"===e;)e=(t=t.parent()).css("visibility");return"hidden"!==e}$.ui.focusable=function(t,e){var n,i,r,o,a,s=t.nodeName.toLowerCase();return"area"===s?(i=(n=t.parentNode).name,!(!t.href||!i||"map"!==n.nodeName.toLowerCase())&&(0<(r=$("img[usemap='#"+i+"']")).length&&r.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(s)?(o=!t.disabled)&&(a=$(t).closest("fieldset")[0])&&(o=!a.disabled):o="a"===s&&t.href||e,o&&$(t).is(":visible")&&c($(t)))},$.extend($.expr[":"],{focusable:function(t){return $.ui.focusable(t,null!=$.attr(t,"tabindex"))}});$.ui.focusable,$.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):$(this[0].form)},$.ui.formResetMixin={_formResetHandler:function(){var e=$(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");$.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var t=this.form.data("ui-form-reset-instances");t.splice($.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}};"1.7"===$.fn.jquery.substring(0,3)&&($.each(["Width","Height"],function(t,n){var r="Width"===n?["Left","Right"]:["Top","Bottom"],i=n.toLowerCase(),o={innerWidth:$.fn.innerWidth,innerHeight:$.fn.innerHeight,outerWidth:$.fn.outerWidth,outerHeight:$.fn.outerHeight};function a(t,e,n,i){return $.each(r,function(){e-=parseFloat($.css(t,"padding"+this))||0,n&&(e-=parseFloat($.css(t,"border"+this+"Width"))||0),i&&(e-=parseFloat($.css(t,"margin"+this))||0)}),e}$.fn["inner"+n]=function(t){return void 0===t?o["inner"+n].call(this):this.each(function(){$(this).css(i,a(this,t)+"px")})},$.fn["outer"+n]=function(t,e){return"number"!=typeof t?o["outer"+n].call(this,t):this.each(function(){$(this).css(i,a(this,t,!0,e)+"px")})}}),$.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))});var e,o;$.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},$.ui.escapeSelector=(e=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,function(t){return t.replace(e,"\\$1")}),$.fn.labels=function(){var t,e,n,i,r;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(i=this.eq(0).parents("label"),(n=this.attr("id"))&&(r=(t=this.eq(0).parents().last()).add(t.length?t.siblings():this.siblings()),e="label[for='"+$.ui.escapeSelector(n)+"']",i=i.add(r.find(e).addBack(e))),this.pushStack(i))},$.fn.scrollParent=function(t){var e=this.css("position"),n="absolute"===e,i=t?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var t=$(this);return(!n||"static"!==t.css("position"))&&i.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&r.length?r:$(this[0].ownerDocument||document)},$.extend($.expr[":"],{tabbable:function(t){var e=$.attr(t,"tabindex"),n=null!=e;return(!n||0<=e)&&$.ui.focusable(t,n)}}),$.fn.extend({uniqueId:(o=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++o)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&$(this).removeAttr("id")})}}),$.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=$(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():$()}},_createIcons:function(){var t,e,n=this.options.icons;n&&(t=$("<span>"),this._addClass(t,"ui-accordion-header-icon","ui-icon "+n.header),t.prependTo(this.headers),e=this.active.children(".ui-accordion-header-icon"),this._removeClass(e,n.header)._addClass(e,null,n.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"!==t?("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons())):this._activate(e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=$.ui.keyCode,n=this.headers.length,i=this.headers.index(t.target),r=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:r=this.headers[(i+1)%n];break;case e.LEFT:case e.UP:r=this.headers[(i-1+n)%n];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:r=this.headers[0];break;case e.END:r=this.headers[n-1]}r&&($(t.target).attr("tabIndex",-1),$(r).attr("tabIndex",0),$(r).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===$.ui.keyCode.UP&&t.ctrlKey&&$(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=$()):!1===t.active?this._activate(0):this.active.length&&!$.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=$()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var n,t=this.options,e=t.heightStyle,i=this.element.parent();this.active=this._findActive(t.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=$(this),e=t.uniqueId().attr("id"),n=t.next(),i=n.uniqueId().attr("id");t.attr("aria-controls",i),n.attr("aria-labelledby",e)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(t.event),"fill"===e?(n=i.height(),this.element.siblings(":visible").each(function(){var t=$(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(n-=t.outerHeight(!0))}),this.headers.each(function(){n-=$(this).outerHeight(!0)}),this.headers.next().each(function(){$(this).height(Math.max(0,n-$(this).innerHeight()+$(this).height()))}).css("overflow","auto")):"auto"===e&&(n=0,this.headers.next().each(function(){var t=$(this).is(":visible");t||$(this).show(),n=Math.max(n,$(this).css("height","").height()),t||$(this).hide()}).height(n))},_activate:function(t){var e=this._findActive(t)[0];e!==this.active[0]&&(e=e||this.active[0],this._eventHandler({target:e,currentTarget:e,preventDefault:$.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):$()},_setupEvents:function(t){var n={keydown:"_keydown"};t&&$.each(t.split(" "),function(t,e){n[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,n),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var e,n,i=this.options,r=this.active,o=$(t.currentTarget),a=o[0]===r[0],s=a&&i.collapsible,l=s?$():o.next(),c=r.next(),u={oldHeader:r,oldPanel:c,newHeader:s?$():o,newPanel:l};t.preventDefault(),a&&!i.collapsible||!1===this._trigger("beforeActivate",t,u)||(i.active=!s&&this.headers.index(o),this.active=a?$():o,this._toggle(u),this._removeClass(r,"ui-accordion-header-active","ui-state-active"),i.icons&&(e=r.children(".ui-accordion-header-icon"),this._removeClass(e,null,i.icons.activeHeader)._addClass(e,null,i.icons.header)),a||(this._removeClass(o,"ui-accordion-header-collapsed")._addClass(o,"ui-accordion-header-active","ui-state-active"),i.icons&&(n=o.children(".ui-accordion-header-icon"),this._removeClass(n,null,i.icons.header)._addClass(n,null,i.icons.activeHeader)),this._addClass(o.next(),"ui-accordion-content-active")))},_toggle:function(t){var e=t.newPanel,n=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=n,this.options.animate?this._animate(e,n,t):(n.hide(),e.show(),this._toggleComplete(t)),n.attr({"aria-hidden":"true"}),n.prev().attr({"aria-selected":"false","aria-expanded":"false"}),e.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):e.length&&this.headers.filter(function(){return 0===parseInt($(this).attr("tabIndex"),10)}).attr("tabIndex",-1),e.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,n,e){var i,r,o,a=this,s=0,l=t.css("box-sizing"),c=t.length&&(!n.length||t.index()<n.index()),u=this.options.animate||{},h=c&&u.down||u,complete=function(){a._toggleComplete(e)};return"number"==typeof h&&(o=h),"string"==typeof h&&(r=h),r=r||h.easing||u.easing,o=o||h.duration||u.duration,n.length?t.length?(i=t.show().outerHeight(),n.animate(this.hideProps,{duration:o,easing:r,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:o,easing:r,complete:complete,step:function(t,e){e.now=Math.round(t),"height"!==e.prop?"content-box"===l&&(s+=e.now):"content"!==a.options.heightStyle&&(e.now=Math.round(i-n.outerHeight()-s),s=0)}})):n.animate(this.hideProps,o,r,complete):t.animate(this.showProps,o,r,complete)},_toggleComplete:function(t){var e=t.oldPanel,n=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(n,"ui-accordion-header-active")._addClass(n,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),$.ui.safeActiveElement=function(e){var n;try{n=e.activeElement}catch(t){n=e.body}return n||(n=e.body),n.nodeName||(n=e.body),n},$.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(t){var e=$(t.target),n=$($.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&n.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var e=$(t.target).closest(".ui-menu-item"),n=$(t.currentTarget);e[0]===n[0]&&(this._removeClass(n.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,n))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var n=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,n)},blur:function(t){this._delay(function(){!$.contains(this.element[0],$.ui.safeActiveElement(this.document[0]))&&this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=$(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,n,i,r,o=!0;switch(t.keyCode){case $.ui.keyCode.PAGE_UP:this.previousPage(t);break;case $.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case $.ui.keyCode.HOME:this._move("first","first",t);break;case $.ui.keyCode.END:this._move("last","last",t);break;case $.ui.keyCode.UP:this.previous(t);break;case $.ui.keyCode.DOWN:this.next(t);break;case $.ui.keyCode.LEFT:this.collapse(t);break;case $.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case $.ui.keyCode.ENTER:case $.ui.keyCode.SPACE:this._activate(t);break;case $.ui.keyCode.ESCAPE:this.collapse(t);break;default:o=!1,n=this.previousFilter||"",r=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===n?r=!0:i=n+i,e=this._filterMenuItems(i),(e=r&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}o&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,n,i,r=this,o=this.options.icons.submenu,a=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=a.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=$(this),e=t.prev(),n=$("<span>").data("ui-menu-submenu-caret",!0);r._addClass(n,"ui-menu-icon","ui-icon "+o),e.attr("aria-haspopup","true").prepend(n),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=a.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=$(this);r._isDivider(t)&&r._addClass(t,"ui-menu-divider","ui-widget-content")}),i=(n=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!$.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var n=this.element.find(".ui-menu-icon");this._removeClass(n,null,this.options.icons.submenu)._addClass(n,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var n,i,r;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),r=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(r,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(n=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(n),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,n,i,r,o,a;this._hasScroll()&&(e=parseFloat($.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat($.css(this.activeMenu[0],"paddingTop"))||0,i=t.offset().top-this.activeMenu.offset().top-e-n,r=this.activeMenu.scrollTop(),o=this.activeMenu.height(),a=t.outerHeight(),i<0?this.activeMenu.scrollTop(r+i):o<i+a&&this.activeMenu.scrollTop(r+i-o+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(t){var e=$.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(e)},collapseAll:function(e,n){clearTimeout(this.timer),this.timer=this._delay(function(){var t=n?this.element:$(e&&e.target).closest(this.element.find(".ui-menu"));t.length||(t=this.element),this._close(t),this.blur(e),this._removeClass(t.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=t},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(t){return!$(t.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,n){var i;this.active&&(i="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),i&&i.length&&this.active||(i=this.activeMenu.find(this.options.items)[e]()),this.focus(n,i)},nextPage:function(t){var e,n,i;this.active?this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,i=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return(e=$(this)).offset().top-n-i<0}),this.focus(t,e)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var e,n,i;this.active?this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,i=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return 0<(e=$(this)).offset().top-n+i}),this.focus(t,e)):this.focus(t,this.activeMenu.find(this.options.items).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||$(t.target).closest(".ui-menu-item");var e={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,e)},_filterMenuItems:function(t){var e=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=new RegExp("^"+e,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return n.test($.trim($(this).children(".ui-menu-item-wrapper").text()))})}});$.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var n,i,r,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,o="input"===t;this.isMultiLine=e||!o&&this._isContentEditable(this.element),this.valueMethod=this.element[e||o?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))i=r=n=!0;else{i=r=n=!1;var e=$.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:n=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:n=!0,this._move("nextPage",t);break;case e.UP:n=!0,this._keyEvent("previous",t);break;case e.DOWN:n=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(n=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:i=!0,this._searchTimeout(t)}}},keypress:function(t){if(n)return n=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!i){var e=$.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(r)return r=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),this._change(t))}}),this._initSource(),this.menu=$("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==$.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(t,e){var n,i;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){$(t.target).trigger(t.originalEvent)});i=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:i})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(i.value),(n=e.item.attr("aria-label")||i.value)&&$.trim(n).length&&(this.liveRegion.children().hide(),$("<div>").text(n).appendTo(this.liveRegion))},menuselect:function(t,e){var n=e.item.data("ui-autocomplete-item"),i=this.previous;this.element[0]!==$.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=i,this._delay(function(){this.previous=i,this.selectedItem=n})),!1!==this._trigger("select",t,{item:n})&&this._value(n.value),this.term=this._value(),this.close(t),this.selectedItem=n}}),this.liveRegion=$("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||$.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?$(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front, dialog")),t.length||(t=this.document[0].body),t},_initSource:function(){var n,i,r=this;$.isArray(this.options.source)?(n=this.options.source,this.source=function(t,e){e($.ui.autocomplete.filter(n,t.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,e){r.xhr&&r.xhr.abort(),r.xhr=$.ajax({url:i,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(i){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),n=i.altKey||i.ctrlKey||i.metaKey||i.shiftKey;t&&(!t||e||n)||(this.selectedItem=null,this.search(null,i))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return $.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:$.map(t,function(t){return"string"==typeof t?{label:t,value:t}:$.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var e=this.menu.element.empty();this._renderMenu(e,t),this.isNewMenu=!0,this.menu.refresh(),e.show(),this._resizeMenu(),e.position($.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(n,t){var i=this;$.each(t,function(t,e){i._renderItemData(n,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(t,e){return $("<li>").append($("<div>").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),$.extend($.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var n=new RegExp($.ui.autocomplete.escapeRegex(e),"i");return $.grep(t,function(t){return n.test(t.label||t.value||t)})}}),$.widget("ui.autocomplete",$.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1<t?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),$("<div>").text(e).appendTo(this.liveRegion))}});$.ui.autocomplete;var a=/ui-corner-([a-z]){2,6}/g;$.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var a=this,s=[];$.each(this.options.items,function(r,t){var e,o={};if(t)return"controlgroupLabel"===r?((e=a.element.find(t)).each(function(){var t=$(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),a._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),void(s=s.concat(e.get()))):void($.fn[r]&&(o=a["_"+r+"Options"]?a["_"+r+"Options"]("middle"):{classes:{}},a.element.find(t).each(function(){var t=$(this),e=t[r]("instance"),n=$.widget.extend({},o);if("button"!==r||!t.parent(".ui-spinner").length){e||(e=t[r]()[r]("instance")),e&&(n.classes=a._resolveClassesValues(n.classes,e)),t[r](n);var i=t[r]("widget");$.data(i[0],"ui-controlgroup-data",e||t[r]("instance")),s.push(i[0])}})))}),this.childWidgets=$($.unique(s)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var t=$(this).data("ui-controlgroup-data");t&&t[e]&&t[e]()})},_updateCornerClass:function(t,e){var n="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",i=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,n),this._addClass(t,null,i)},_buildSimpleOptions:function(t,e){var n="vertical"===this.options.direction,i={classes:{}};return i.classes[e]={middle:"",first:"ui-corner-"+(n?"top":"left"),last:"ui-corner-"+(n?"bottom":"right"),only:"ui-corner-all"}[t],i},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:!!e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(n,i){var r={};return $.each(n,function(t){var e=i.options.classes[t]||"";e=$.trim(e.replace(a,"")),r[t]=(e+" "+n[t]).replace(/\s+/g," ")}),r},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"!==t?this.refresh():this._callChildMethod(e?"disable":"enable")},refresh:function(){var r,o=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),r=this.childWidgets,this.options.onlyVisible&&(r=r.filter(":visible")),r.length&&($.each(["first","last"],function(t,e){var n=r[e]().data("ui-controlgroup-data");if(n&&o["_"+n.widgetName+"Options"]){var i=o["_"+n.widgetName+"Options"](1===r.length?"only":e);i.classes=o._resolveClassesValues(i.classes,n),n.element[n.widgetName](i)}else o._updateCornerClass(r[e](),e)}),this._callChildMethod("refresh"))}});$.widget("ui.checkboxradio",[$.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,e,n=this,i=this._super()||{};return this._readType(),e=this.element.labels(),this.label=$(e[e.length-1]),this.label.length||$.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){n.originalLabel+=3===this.nodeType?$(this).text():this.outerHTML}),this.originalLabel&&(i.label=this.originalLabel),null!=(t=this.element[0].disabled)&&(i.disabled=t),i},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===t&&/radio|checkbox/.test(this.type)||$.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t=this.element[0].name,e="input[name='"+$.ui.escapeSelector(t)+"']";return t?(this.form.length?$(this.form[0].elements).filter(e):$(e).filter(function(){return 0===$(this).form().length})).not(this.element):$([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t),"radio"===this.type&&this._getRadioGroup().each(function(){var t=$(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){if("label"!==t||e){if(this._super(t,e),"disabled"===t)return this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e);this.refresh()}},_updateIcon:function(t){var e="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=$("<span>"),this.iconSpace=$("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(e+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):e+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",e),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]);var f;$.ui.checkboxradio;$.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(t){t.keyCode===$.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,e){var n="iconPosition"!==t,i=n?this.options.iconPosition:e,r="top"===i||"bottom"===i;this.icon?n&&this._removeClass(this.icon,null,this.options.icon):(this.icon=$("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),n&&this._addClass(this.icon,null,e),this._attachIcon(i),r?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=$("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(i))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,n=void 0===t.icon?this.options.icon:t.icon;e||n||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),(this.element[0].disabled=e)&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!1!==$.uiBackCompat&&($.widget("ui.button",$.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){"text"!==t?("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments)):this._super("showLabel",e)}}),$.fn.button=(f=$.fn.button,function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?f.apply(this,arguments):($.ui.checkboxradio||$.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}),$.fn.buttonset=function(){return $.ui.controlgroup||$.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))});var p;$.ui.button;function g(t){for(var e,n;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(n=parseInt(t.css("zIndex"),10),!isNaN(n)&&0!==n))return n;t=t.parent()}return 0}function m(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.regional.en=$.extend(!0,{},this.regional[""]),this.regional["en-US"]=$.extend(!0,{},this.regional.en),this.dpDiv=v($("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function v(t){var e="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",e,function(){$(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&$(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&$(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",e,y)}function y(){$.datepicker._isDisabledDatepicker(p.inline?p.dpDiv.parent()[0]:p.input[0])||($(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),$(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&$(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&$(this).addClass("ui-datepicker-next-hover"))}function b(t,e){for(var n in $.extend(t,e),e)null==e[n]&&(t[n]=e[n]);return t}$.extend($.ui,{datepicker:{version:"1.12.1"}}),$.extend(m.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return b(this._defaults,t||{}),this},_attachDatepicker:function(t,e){var n,i,r;i="div"===(n=t.nodeName.toLowerCase())||"span"===n,t.id||(this.uuid+=1,t.id="dp"+this.uuid),(r=this._newInst($(t),i)).settings=$.extend({},e||{}),"input"===n?this._connectDatepicker(t,r):i&&this._inlineDatepicker(t,r)},_newInst:function(t,e){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:e?v($("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,e){var n=$(t);e.append=$([]),e.trigger=$([]),n.hasClass(this.markerClassName)||(this._attachments(n,e),n.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(e),$.data(t,"datepicker",e),e.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,e){var n,i,r,o=this._get(e,"appendText"),a=this._get(e,"isRTL");e.append&&e.append.remove(),o&&(e.append=$("<span class='"+this._appendClass+"'>"+o+"</span>"),t[a?"before":"after"](e.append)),t.off("focus",this._showDatepicker),e.trigger&&e.trigger.remove(),"focus"!==(n=this._get(e,"showOn"))&&"both"!==n||t.on("focus",this._showDatepicker),"button"!==n&&"both"!==n||(i=this._get(e,"buttonText"),r=this._get(e,"buttonImage"),e.trigger=$(this._get(e,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:r,alt:i,title:i}):$("<button type='button'></button>").addClass(this._triggerClass).html(r?$("<img/>").attr({src:r,alt:i,title:i}):i)),t[a?"before":"after"](e.trigger),e.trigger.on("click",function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput===t[0]?$.datepicker._hideDatepicker():($.datepicker._datepickerShowing&&$.datepicker._lastInput!==t[0]&&$.datepicker._hideDatepicker(),$.datepicker._showDatepicker(t[0])),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,n,i,r,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(r=i=n=0;r<t.length;r++)t[r].length>n&&(n=t[r].length,i=r);return i},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(t,e){var n=$(t);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(e.dpDiv),$.data(t,"datepicker",e),this._setDate(e,this._getDefaultDate(e),!0),this._updateDatepicker(e),this._updateAlternate(e),e.settings.disabled&&this._disableDatepicker(t),e.dpDiv.css("display","block"))},_dialogDatepicker:function(t,e,n,i,r){var o,a,s,l,c,u=this._dialogInst;return u||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=$("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),$("body").append(this._dialogInput),(u=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},$.data(this._dialogInput[0],"datepicker",u)),b(u.settings,i||{}),e=e&&e.constructor===Date?this._formatDate(u,e):e,this._dialogInput.val(e),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(a=document.documentElement.clientWidth,s=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,c=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[a/2-100+l,s/2-150+c]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),u.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],"datepicker",u),this},_destroyDatepicker:function(t){var e,n=$(t),i=$.data(t,"datepicker");n.hasClass(this.markerClassName)&&(e=t.nodeName.toLowerCase(),$.removeData(t,"datepicker"),"input"===e?(i.append.remove(),i.trigger.remove(),n.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==e&&"span"!==e||n.removeClass(this.markerClassName).empty(),p===i&&(p=null))},_enableDatepicker:function(e){var t,n,i=$(e),r=$.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!1,r.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==t&&"span"!==t||((n=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=$.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var t,n,i=$(e),r=$.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!0,r.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==t&&"span"!==t||((n=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=$.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(t){try{return $.data(t,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,e,n){var i,r,o,a,s=this._getInst(t);if(2===arguments.length&&"string"==typeof e)return"defaults"===e?$.extend({},$.datepicker._defaults):s?"all"===e?$.extend({},s.settings):this._get(s,e):null;i=e||{},"string"==typeof e&&((i={})[e]=n),s&&(this._curInst===s&&this._hideDatepicker(),r=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(s,"min"),a=this._getMinMaxDate(s,"max"),b(s.settings,i),null!==o&&void 0!==i.dateFormat&&void 0===i.minDate&&(s.settings.minDate=this._formatDate(s,o)),null!==a&&void 0!==i.dateFormat&&void 0===i.maxDate&&(s.settings.maxDate=this._formatDate(s,a)),"disabled"in i&&(i.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments($(t),s),this._autoSize(s),this._setDate(s,r),this._updateAlternate(s),this._updateDatepicker(s))},_changeDatepicker:function(t,e,n){this._optionDatepicker(t,e,n)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var n=this._getInst(t);n&&(this._setDate(n,e),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(t,e){var n=this._getInst(t);return n&&!n.inline&&this._setDateFromField(n,e),n?this._getDate(n):null},_doKeyDown:function(t){var e,n,i,r=$.datepicker._getInst(t.target),o=!0,a=r.dpDiv.is(".ui-datepicker-rtl");if(r._keyEvent=!0,$.datepicker._datepickerShowing)switch(t.keyCode){case 9:$.datepicker._hideDatepicker(),o=!1;break;case 13:return(i=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",r.dpDiv))[0]&&$.datepicker._selectDay(t.target,r.selectedMonth,r.selectedYear,i[0]),(e=$.datepicker._get(r,"onSelect"))?(n=$.datepicker._formatDate(r),e.apply(r.input?r.input[0]:null,[n,r])):$.datepicker._hideDatepicker(),!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(t.target,t.ctrlKey?-$.datepicker._get(r,"stepBigMonths"):-$.datepicker._get(r,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(t.target,t.ctrlKey?+$.datepicker._get(r,"stepBigMonths"):+$.datepicker._get(r,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&$.datepicker._clearDate(t.target),o=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&$.datepicker._gotoToday(t.target),o=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&$.datepicker._adjustDate(t.target,a?1:-1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&$.datepicker._adjustDate(t.target,t.ctrlKey?-$.datepicker._get(r,"stepBigMonths"):-$.datepicker._get(r,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&$.datepicker._adjustDate(t.target,-7,"D"),o=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&$.datepicker._adjustDate(t.target,a?-1:1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&$.datepicker._adjustDate(t.target,t.ctrlKey?+$.datepicker._get(r,"stepBigMonths"):+$.datepicker._get(r,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&$.datepicker._adjustDate(t.target,7,"D"),o=t.ctrlKey||t.metaKey;break;default:o=!1}else 36===t.keyCode&&t.ctrlKey?$.datepicker._showDatepicker(this):o=!1;o&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var e,n,i=$.datepicker._getInst(t.target);if($.datepicker._get(i,"constrainInput"))return e=$.datepicker._possibleChars($.datepicker._get(i,"dateFormat")),n=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||n<" "||!e||-1<e.indexOf(n)},_doKeyUp:function(t){var e=$.datepicker._getInst(t.target);if(e.input.val()!==e.lastVal)try{$.datepicker.parseDate($.datepicker._get(e,"dateFormat"),e.input?e.input.val():null,$.datepicker._getFormatConfig(e))&&($.datepicker._setDateFromField(e),$.datepicker._updateAlternate(e),$.datepicker._updateDatepicker(e))}catch(t){}return!0},_showDatepicker:function(t){var e,n,i,r,o,a,s;("input"!==(t=t.target||t).nodeName.toLowerCase()&&(t=$("input",t.parentNode)[0]),$.datepicker._isDisabledDatepicker(t)||$.datepicker._lastInput===t)||(e=$.datepicker._getInst(t),$.datepicker._curInst&&$.datepicker._curInst!==e&&($.datepicker._curInst.dpDiv.stop(!0,!0),e&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0])),!1!==(i=(n=$.datepicker._get(e,"beforeShow"))?n.apply(t,[t,e]):{})&&(b(e.settings,i),e.lastVal=null,$.datepicker._lastInput=t,$.datepicker._setDateFromField(e),$.datepicker._inDialog&&(t.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(t),$.datepicker._pos[1]+=t.offsetHeight),r=!1,$(t).parents().each(function(){return!(r|="fixed"===$(this).css("position"))}),o={left:$.datepicker._pos[0],top:$.datepicker._pos[1]},$.datepicker._pos=null,e.dpDiv.empty(),e.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(e),o=$.datepicker._checkOffset(e,o,r),e.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),e.inline||(a=$.datepicker._get(e,"showAnim"),s=$.datepicker._get(e,"duration"),e.dpDiv.css("z-index",g($(t))+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects.effect[a]?e.dpDiv.show(a,$.datepicker._get(e,"showOptions"),s):e.dpDiv[a||"show"](a?s:null),$.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),$.datepicker._curInst=e)))},_updateDatepicker:function(t){this.maxRows=4,(p=t).dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var e,n=this._getNumberOfMonths(t),i=n[1],r=17,o=t.dpDiv.find("."+this._dayOverClass+" a");0<o.length&&y.apply(o.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<i&&t.dpDiv.addClass("ui-datepicker-multi-"+i).css("width",r*i+"em"),t.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===$.datepicker._curInst&&$.datepicker._datepickerShowing&&$.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(e=t.yearshtml,setTimeout(function(){e===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),e=t.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(t,e,n){var i=t.dpDiv.outerWidth(),r=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,s=document.documentElement.clientWidth+(n?0:$(document).scrollLeft()),l=document.documentElement.clientHeight+(n?0:$(document).scrollTop());return e.left-=this._get(t,"isRTL")?i-o:0,e.left-=n&&e.left===t.input.offset().left?$(document).scrollLeft():0,e.top-=n&&e.top===t.input.offset().top+a?$(document).scrollTop():0,e.left-=Math.min(e.left,e.left+i>s&&i<s?Math.abs(e.left+i-s):0),e.top-=Math.min(e.top,e.top+r>l&&r<l?Math.abs(r+a):0),e},_findPos:function(t){for(var e,n=this._getInst(t),i=this._get(n,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||$.expr.filters.hidden(t));)t=t[i?"previousSibling":"nextSibling"];return[(e=$(t).offset()).left,e.top]},_hideDatepicker:function(t){var e,n,i,r,o=this._curInst;!o||t&&o!==$.data(t,"datepicker")||this._datepickerShowing&&(e=this._get(o,"showAnim"),n=this._get(o,"duration"),i=function(){$.datepicker._tidyDialog(o)},$.effects&&($.effects.effect[e]||$.effects[e])?o.dpDiv.hide(e,$.datepicker._get(o,"showOptions"),n,i):o.dpDiv["slideDown"===e?"slideUp":"fadeIn"===e?"fadeOut":"hide"](e?n:null,i),e||i(),this._datepickerShowing=!1,(r=this._get(o,"onClose"))&&r.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){if($.datepicker._curInst){var e=$(t.target),n=$.datepicker._getInst(e[0]);(e[0].id===$.datepicker._mainDivId||0!==e.parents("#"+$.datepicker._mainDivId).length||e.hasClass($.datepicker.markerClassName)||e.closest("."+$.datepicker._triggerClass).length||!$.datepicker._datepickerShowing||$.datepicker._inDialog&&$.blockUI)&&(!e.hasClass($.datepicker.markerClassName)||$.datepicker._curInst===n)||$.datepicker._hideDatepicker()}},_adjustDate:function(t,e,n){var i=$(t),r=this._getInst(i[0]);this._isDisabledDatepicker(i[0])||(this._adjustInstDate(r,e+("M"===n?this._get(r,"showCurrentAtPos"):0),n),this._updateDatepicker(r))},_gotoToday:function(t){var e,n=$(t),i=this._getInst(n[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(e=new Date,i.selectedDay=e.getDate(),i.drawMonth=i.selectedMonth=e.getMonth(),i.drawYear=i.selectedYear=e.getFullYear()),this._notifyChange(i),this._adjustDate(n)},_selectMonthYear:function(t,e,n){var i=$(t),r=this._getInst(i[0]);r["selected"+("M"===n?"Month":"Year")]=r["draw"+("M"===n?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10),this._notifyChange(r),this._adjustDate(i)},_selectDay:function(t,e,n,i){var r,o=$(t);$(i).hasClass(this._unselectableClass)||this._isDisabledDatepicker(o[0])||((r=this._getInst(o[0])).selectedDay=r.currentDay=$("a",i).html(),r.selectedMonth=r.currentMonth=e,r.selectedYear=r.currentYear=n,this._selectDate(t,this._formatDate(r,r.currentDay,r.currentMonth,r.currentYear)))},_clearDate:function(t){var e=$(t);this._selectDate(e,"")},_selectDate:function(t,e){var n,i=$(t),r=this._getInst(i[0]);e=null!=e?e:this._formatDate(r),r.input&&r.input.val(e),this._updateAlternate(r),(n=this._get(r,"onSelect"))?n.apply(r.input?r.input[0]:null,[e,r]):r.input&&r.input.trigger("change"),r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],"object"!=typeof r.input[0]&&r.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var e,n,i,r=this._get(t,"altField");r&&(e=this._get(t,"altFormat")||this._get(t,"dateFormat"),n=this._getDate(t),i=this.formatDate(e,n,this._getFormatConfig(t)),$(r).val(i))},noWeekends:function(t){var e=t.getDay();return[0<e&&e<6,""]},iso8601Week:function(t){var e,n=new Date(t.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),e=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((e-n)/864e5)/7)+1},parseDate:function(n,o,t){if(null==n||null==o)throw"Invalid arguments";if(""===(o="object"==typeof o?o.toString():o+""))return null;var i,e,r,a,s=0,l=(t?t.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),u=(t?t.dayNamesShort:null)||this._defaults.dayNamesShort,h=(t?t.dayNames:null)||this._defaults.dayNames,d=(t?t.monthNamesShort:null)||this._defaults.monthNamesShort,f=(t?t.monthNames:null)||this._defaults.monthNames,p=-1,g=-1,m=-1,v=-1,y=!1,b=function(t){var e=i+1<n.length&&n.charAt(i+1)===t;return e&&i++,e},x=function(t){var e=b(t),n="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,i=new RegExp("^\\d{"+("y"===t?n:1)+","+n+"}"),r=o.substring(s).match(i);if(!r)throw"Missing number at position "+s;return s+=r[0].length,parseInt(r[0],10)},_=function(t,e,n){var i=-1,r=$.map(b(t)?n:e,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if($.each(r,function(t,e){var n=e[1];if(o.substr(s,n.length).toLowerCase()===n.toLowerCase())return i=e[0],s+=n.length,!1}),-1!==i)return i+1;throw"Unknown name at position "+s},w=function(){if(o.charAt(s)!==n.charAt(i))throw"Unexpected literal at position "+s;s++};for(i=0;i<n.length;i++)if(y)"'"!==n.charAt(i)||b("'")?w():y=!1;else switch(n.charAt(i)){case"d":m=x("d");break;case"D":_("D",u,h);break;case"o":v=x("o");break;case"m":g=x("m");break;case"M":g=_("M",d,f);break;case"y":p=x("y");break;case"@":p=(a=new Date(x("@"))).getFullYear(),g=a.getMonth()+1,m=a.getDate();break;case"!":p=(a=new Date((x("!")-this._ticksTo1970)/1e4)).getFullYear(),g=a.getMonth()+1,m=a.getDate();break;case"'":b("'")?w():y=!0;break;default:w()}if(s<o.length&&(r=o.substr(s),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===p?p=(new Date).getFullYear():p<100&&(p+=(new Date).getFullYear()-(new Date).getFullYear()%100+(p<=c?0:-100)),-1<v)for(g=1,m=v;;){if(m<=(e=this._getDaysInMonth(p,g-1)))break;g++,m-=e}if((a=this._daylightSavingAdjust(new Date(p,g-1,m))).getFullYear()!==p||a.getMonth()+1!==g||a.getDate()!==m)throw"Invalid date";return a},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(n,t,e){if(!t)return"";var i,r=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,o=(e?e.dayNames:null)||this._defaults.dayNames,a=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,s=(e?e.monthNames:null)||this._defaults.monthNames,l=function(t){var e=i+1<n.length&&n.charAt(i+1)===t;return e&&i++,e},c=function(t,e,n){var i=""+e;if(l(t))for(;i.length<n;)i="0"+i;return i},u=function(t,e,n,i){return l(t)?i[e]:n[e]},h="",d=!1;if(t)for(i=0;i<n.length;i++)if(d)"'"!==n.charAt(i)||l("'")?h+=n.charAt(i):d=!1;else switch(n.charAt(i)){case"d":h+=c("d",t.getDate(),2);break;case"D":h+=u("D",t.getDay(),r,o);break;case"o":h+=c("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=c("m",t.getMonth()+1,2);break;case"M":h+=u("M",t.getMonth(),a,s);break;case"y":h+=l("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":h+=t.getTime();break;case"!":h+=1e4*t.getTime()+this._ticksTo1970;break;case"'":l("'")?h+="'":d=!0;break;default:h+=n.charAt(i)}return h},_possibleChars:function(n){var i,t="",e=!1,r=function(t){var e=i+1<n.length&&n.charAt(i+1)===t;return e&&i++,e};for(i=0;i<n.length;i++)if(e)"'"!==n.charAt(i)||r("'")?t+=n.charAt(i):e=!1;else switch(n.charAt(i)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":r("'")?t+="'":e=!0;break;default:t+=n.charAt(i)}return t},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var n=this._get(t,"dateFormat"),i=t.lastVal=t.input?t.input.val():null,r=this._getDefaultDate(t),o=r,a=this._getFormatConfig(t);try{o=this.parseDate(n,i,a)||r}catch(t){i=e?"":i}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=i?o.getDate():0,t.currentMonth=i?o.getMonth():0,t.currentYear=i?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(s,t,e){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},i=null==t||""===t?e:"string"==typeof t?function(t){try{return $.datepicker.parseDate($.datepicker._get(s,"dateFormat"),t,$.datepicker._getFormatConfig(s))}catch(t){}for(var e=(t.toLowerCase().match(/^c/)?$.datepicker._getDate(s):null)||new Date,n=e.getFullYear(),i=e.getMonth(),r=e.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,a=o.exec(t);a;){switch(a[2]||"d"){case"d":case"D":r+=parseInt(a[1],10);break;case"w":case"W":r+=7*parseInt(a[1],10);break;case"m":case"M":i+=parseInt(a[1],10),r=Math.min(r,$.datepicker._getDaysInMonth(n,i));break;case"y":case"Y":n+=parseInt(a[1],10),r=Math.min(r,$.datepicker._getDaysInMonth(n,i))}a=o.exec(t)}return new Date(n,i,r)}(t):"number"==typeof t?isNaN(t)?e:n(t):new Date(t.getTime());return(i=i&&"Invalid Date"===i.toString()?e:i)&&(i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0)),this._daylightSavingAdjust(i)},_daylightSavingAdjust:function(t){return t?(t.setHours(12<t.getHours()?t.getHours()+2:0),t):null},_setDate:function(t,e,n){var i=!e,r=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),r===t.selectedMonth&&o===t.selectedYear||n||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(i?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(t){var e=this._get(t,"stepMonths"),n="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){$.datepicker._adjustDate(n,-e,"M")},next:function(){$.datepicker._adjustDate(n,+e,"M")},hide:function(){$.datepicker._hideDatepicker()},today:function(){$.datepicker._gotoToday(n)},selectDay:function(){return $.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return $.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return $.datepicker._selectMonthYear(n,this,"Y"),!1}};$(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,n,i,r,o,a,s,l,c,u,h,d,f,p,g,m,v,y,b,x,_,w,S,C,T,$,k,A,O,D,P,M,E,I,N,R,L,H,j,F=new Date,z=this._daylightSavingAdjust(new Date(F.getFullYear(),F.getMonth(),F.getDate())),B=this._get(t,"isRTL"),V=this._get(t,"showButtonPanel"),W=this._get(t,"hideIfNoPrevNext"),q=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),J=this._get(t,"showCurrentAtPos"),G=this._get(t,"stepMonths"),Y=1!==U[0]||1!==U[1],X=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),K=this._getMinMaxDate(t,"min"),Q=this._getMinMaxDate(t,"max"),Z=t.drawMonth-J,tt=t.drawYear;if(Z<0&&(Z+=12,tt--),Q)for(e=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-U[0]*U[1]+1,Q.getDate())),e=K&&e<K?K:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)--Z<0&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,n=this._get(t,"prevText"),n=q?this.formatDate(n,this._daylightSavingAdjust(new Date(tt,Z-G,1)),this._getFormatConfig(t)):n,i=this._canAdjustMonth(t,-1,tt,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+n+"</span></a>":W?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+n+"</span></a>",r=this._get(t,"nextText"),r=q?this.formatDate(r,this._daylightSavingAdjust(new Date(tt,Z+G,1)),this._getFormatConfig(t)):r,o=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+r+"</span></a>":W?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+r+"</span></a>",a=this._get(t,"currentText"),s=this._get(t,"gotoCurrent")&&t.currentDay?X:z,a=q?this.formatDate(a,s,this._getFormatConfig(t)):a,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",c=V?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(B?l:"")+(this._isInRange(t,s)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(B?"":l)+"</div>":"",u=parseInt(this._get(t,"firstDay"),10),u=isNaN(u)?0:u,h=this._get(t,"showWeek"),d=this._get(t,"dayNames"),f=this._get(t,"dayNamesMin"),p=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),y=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),x="",w=0;w<U[0];w++){for(S="",this.maxRows=4,C=0;C<U[1];C++){if(T=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),$=" ui-corner-all",k="",Y){if(k+="<div class='ui-datepicker-group",1<U[1])switch(C){case 0:k+=" ui-datepicker-group-first",$=" ui-corner-"+(B?"right":"left");break;case U[1]-1:k+=" ui-datepicker-group-last",$=" ui-corner-"+(B?"left":"right");break;default:k+=" ui-datepicker-group-middle",$=""}k+="'>"}for(k+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+$+"'>"+(/all|left/.test($)&&0===w?B?o:i:"")+(/all|right/.test($)&&0===w?B?i:o:"")+this._generateMonthYearHeader(t,Z,tt,K,Q,0<w||0<C,p,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",A=h?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",_=0;_<7;_++)A+="<th scope='col'"+(5<=(_+u+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+d[O=(_+u)%7]+"'>"+f[O]+"</span></th>";for(k+=A+"</tr></thead><tbody>",D=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,D)),P=(this._getFirstDayOfMonth(tt,Z)-u+7)%7,M=Math.ceil((P+D)/7),E=Y&&this.maxRows>M?this.maxRows:M,this.maxRows=E,I=this._daylightSavingAdjust(new Date(tt,Z,1-P)),N=0;N<E;N++){for(k+="<tr>",R=h?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(I)+"</td>":"",_=0;_<7;_++)L=m?m.apply(t.input?t.input[0]:null,[I]):[!0,""],j=(H=I.getMonth()!==Z)&&!y||!L[0]||K&&I<K||Q&&Q<I,R+="<td class='"+(5<=(_+u+6)%7?" ui-datepicker-week-end":"")+(H?" ui-datepicker-other-month":"")+(I.getTime()===T.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===I.getTime()&&b.getTime()===T.getTime()?" "+this._dayOverClass:"")+(j?" "+this._unselectableClass+" ui-state-disabled":"")+(H&&!v?"":" "+L[1]+(I.getTime()===X.getTime()?" "+this._currentClass:"")+(I.getTime()===z.getTime()?" ui-datepicker-today":""))+"'"+(H&&!v||!L[2]?"":" title='"+L[2].replace(/'/g,"&#39;")+"'")+(j?"":" data-handler='selectDay' data-event='click' data-month='"+I.getMonth()+"' data-year='"+I.getFullYear()+"'")+">"+(H&&!v?"&#xa0;":j?"<span class='ui-state-default'>"+I.getDate()+"</span>":"<a class='ui-state-default"+(I.getTime()===z.getTime()?" ui-state-highlight":"")+(I.getTime()===X.getTime()?" ui-state-active":"")+(H?" ui-priority-secondary":"")+"' href='#'>"+I.getDate()+"</a>")+"</td>",I.setDate(I.getDate()+1),I=this._daylightSavingAdjust(I);k+=R+"</tr>"}11<++Z&&(Z=0,tt++),S+=k+="</tbody></table>"+(Y?"</div>"+(0<U[0]&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}x+=S}return x+=c,t._keyEvent=!1,x},_generateMonthYearHeader:function(t,e,n,i,r,o,a,s){var l,c,u,h,d,f,p,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),y=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",x="";if(o||!m)x+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=i&&i.getFullYear()===n,c=r&&r.getFullYear()===n,x+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;u<12;u++)(!l||u>=i.getMonth())&&(!c||u<=r.getMonth())&&(x+="<option value='"+u+"'"+(u===e?" selected='selected'":"")+">"+s[u]+"</option>");x+="</select>"}if(y||(b+=x+(!o&&m&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+n+"</span>";else{for(h=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=(f=function(t){var e=t.match(/c[+\-].*/)?n+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e})(h[0]),g=Math.max(p,f(h[1]||"")),p=i?Math.max(p,i.getFullYear()):p,g=r?Math.min(g,r.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";p<=g;p++)t.yearshtml+="<option value='"+p+"'"+(p===n?" selected='selected'":"")+">"+p+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),y&&(b+=(!o&&m&&v?"":"&#xa0;")+x),b+="</div>"},_adjustInstDate:function(t,e,n){var i=t.selectedYear+("Y"===n?e:0),r=t.selectedMonth+("M"===n?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(i,r))+("D"===n?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(i,r,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),"M"!==n&&"Y"!==n||this._notifyChange(t)},_restrictMinMax:function(t,e){var n=this._getMinMaxDate(t,"min"),i=this._getMinMaxDate(t,"max"),r=n&&e<n?n:e;return i&&i<r?i:r},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,n,i){var r=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(n,i+(e<0?e:r[0]*r[1]),1));return e<0&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var n,i,r=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,s=null,l=this._get(t,"yearRange");return l&&(n=l.split(":"),i=(new Date).getFullYear(),a=parseInt(n[0],10),s=parseInt(n[1],10),n[0].match(/[+\-].*/)&&(a+=i),n[1].match(/[+\-].*/)&&(s+=i)),(!r||e.getTime()>=r.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!s||e.getFullYear()<=s)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,n,i){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var r=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(i,n,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),r,this._getFormatConfig(t))}}),$.fn.datepicker=function(t){if(!this.length)return this;$.datepicker.initialized||($(document).on("mousedown",$.datepicker._checkExternalClick),$.datepicker.initialized=!0),0===$("#"+$.datepicker._mainDivId).length&&$("body").append($.datepicker.dpDiv);var e=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?$.datepicker["_"+t+"Datepicker"].apply($.datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?$.datepicker["_"+t+"Datepicker"].apply($.datepicker,[this].concat(e)):$.datepicker._attachDatepicker(this,t)}):$.datepicker["_"+t+"Datepicker"].apply($.datepicker,[this[0]].concat(e))},$.datepicker=new m,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.12.1";$.datepicker,$.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var x=!1;$(document).on("mouseup",function(){x=!1});$.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===$.data(t.target,e.widgetName+".preventClickEvent"))return $.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!x){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,n=1===t.which,i=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&$(t.target).closest(this.options.cancel).length;return!(n&&!i&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===$.data(t.target,this.widgetName+".preventClickEvent")&&$.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),x=!0))}},_mouseMove:function(t){if(this._mouseMoved){if($.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&$.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,x=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),$.ui.plugin={add:function(t,e,n){var i,r=$.ui[t].prototype;for(i in n)r.plugins[i]=r.plugins[i]||[],r.plugins[i].push([e,n[i]])},call:function(t,e,n,i){var r,o=t.plugins[e];if(o&&(i||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(r=0;r<o.length;r++)t.options[o[r][0]]&&o[r][1].apply(t.element,n)}},$.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&$(t).trigger("blur")};$.widget("ui.draggable",$.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<$(t.target).closest(".ui-resizable-handle").length)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=$(this);return $("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=$.ui.safeActiveElement(this.document[0]);$(t.target).closest(e).length||$.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),$.ui.ddmanager&&($.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===$(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),$.ui.ddmanager&&!e.dropBehaviour&&$.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),$.ui.ddmanager&&$.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){var n=this._uiHash();if(!1===this._trigger("drag",t,n))return this._mouseUp(new $.Event("mouseup",t)),!1;this.position=n.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",$.ui.ddmanager&&$.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,n=!1;return $.ui.ddmanager&&!this.options.dropBehaviour&&(n=$.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||!0===this.options.revert||$.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),$.ui.ddmanager&&$.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),$.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new $.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!$(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,n=$.isFunction(e.helper),i=n?$(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return i.parents("body").length||i.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),n&&i[0]===this.element[0]&&this._setPositionRelative(),i[0]===this.element[0]||/(fixed|absolute)/.test(i.css("position"))||i.css("position","absolute"),i},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),$.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&$.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,n,i=this.options,r=this.document[0];this.relativeContainer=null,i.containment?"window"!==i.containment?"document"!==i.containment?i.containment.constructor!==Array?("parent"===i.containment&&(i.containment=this.helper[0].parentNode),(n=(e=$(i.containment))[0])&&(t=/(scroll|auto)/.test(e.css("overflow")),this.containment=[(parseInt(e.css("borderLeftWidth"),10)||0)+(parseInt(e.css("paddingLeft"),10)||0),(parseInt(e.css("borderTopWidth"),10)||0)+(parseInt(e.css("paddingTop"),10)||0),(t?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(e.css("borderRightWidth"),10)||0)-(parseInt(e.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(e.css("borderBottomWidth"),10)||0)-(parseInt(e.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=e)):this.containment=i.containment:this.containment=[0,0,$(r).width()-this.helperProportions.width-this.margins.left,($(r).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[$(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,$(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,$(window).scrollLeft()+$(window).width()-this.helperProportions.width-this.margins.left,$(window).scrollTop()+($(window).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e||(e=this.position);var n="absolute"===t?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*n,left:e.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*n}},_generatePosition:function(t,e){var n,i,r,o,a=this.options,s=this._isRootNode(this.scrollParent[0]),l=t.pageX,c=t.pageY;return s&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(n=this.relativeContainer?(i=this.relativeContainer.offset(),[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):this.containment,t.pageX-this.offset.click.left<n[0]&&(l=n[0]+this.offset.click.left),t.pageY-this.offset.click.top<n[1]&&(c=n[1]+this.offset.click.top),t.pageX-this.offset.click.left>n[2]&&(l=n[2]+this.offset.click.left),t.pageY-this.offset.click.top>n[3]&&(c=n[3]+this.offset.click.top)),a.grid&&(r=a.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,c=n?r-this.offset.click.top>=n[1]||r-this.offset.click.top>n[3]?r:r-this.offset.click.top>=n[1]?r-a.grid[1]:r+a.grid[1]:r,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=n?o-this.offset.click.left>=n[0]||o-this.offset.click.left>n[2]?o:o-this.offset.click.left>=n[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(l=this.originalPageX),"x"===a.axis&&(c=this.originalPageY)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,n){return n=n||this._uiHash(),$.ui.plugin.call(this,t,[e,n,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),$.Widget.prototype._trigger.call(this,t,e,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),$.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,n){var i=$.extend({},t,{item:n.element});n.sortables=[],$(n.options.connectToSortable).each(function(){var t=$(this).sortable("instance");t&&!t.options.disabled&&(n.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,i))})},stop:function(e,t,n){var i=$.extend({},t,{item:n.element});n.cancelHelperRemoval=!1,$.each(n.sortables,function(){var t=this;t.isOver?(t.isOver=0,n.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,i))})},drag:function(n,i,r){$.each(r.sortables,function(){var t=!1,e=this;e.positionAbs=r.positionAbs,e.helperProportions=r.helperProportions,e.offset.click=r.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,$.each(r.sortables,function(){return this.positionAbs=r.positionAbs,this.helperProportions=r.helperProportions,this.offset.click=r.offset.click,this!==e&&this._intersectsWith(this.containerCache)&&$.contains(e.element[0],this.element[0])&&(t=!1),t})),t?(e.isOver||(e.isOver=1,r._parent=i.helper.parent(),e.currentItem=i.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return i.helper[0]},n.target=e.currentItem[0],e._mouseCapture(n,!0),e._mouseStart(n,!0,!0),e.offset.click.top=r.offset.click.top,e.offset.click.left=r.offset.click.left,e.offset.parent.left-=r.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=r.offset.parent.top-e.offset.parent.top,r._trigger("toSortable",n),r.dropped=e.element,$.each(r.sortables,function(){this.refreshPositions()}),r.currentItem=r.element,e.fromOutside=r),e.currentItem&&(e._mouseDrag(n),i.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",n,e._uiHash(e)),e._mouseStop(n,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),i.helper.appendTo(r._parent),r._refreshOffsets(n),i.position=r._generatePosition(n,!0),r._trigger("fromSortable",n),r.dropped=!1,$.each(r.sortables,function(){this.refreshPositions()}))})}}),$.ui.plugin.add("draggable","cursor",{start:function(t,e,n){var i=$("body"),r=n.options;i.css("cursor")&&(r._cursor=i.css("cursor")),i.css("cursor",r.cursor)},stop:function(t,e,n){var i=n.options;i._cursor&&$("body").css("cursor",i._cursor)}}),$.ui.plugin.add("draggable","opacity",{start:function(t,e,n){var i=$(e.helper),r=n.options;i.css("opacity")&&(r._opacity=i.css("opacity")),i.css("opacity",r.opacity)},stop:function(t,e,n){var i=n.options;i._opacity&&$(e.helper).css("opacity",i._opacity)}}),$.ui.plugin.add("draggable","scroll",{start:function(t,e,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(t,e,n){var i=n.options,r=!1,o=n.scrollParentNotHidden[0],a=n.document[0];o!==a&&"HTML"!==o.tagName?(i.axis&&"x"===i.axis||(n.overflowOffset.top+o.offsetHeight-t.pageY<i.scrollSensitivity?o.scrollTop=r=o.scrollTop+i.scrollSpeed:t.pageY-n.overflowOffset.top<i.scrollSensitivity&&(o.scrollTop=r=o.scrollTop-i.scrollSpeed)),i.axis&&"y"===i.axis||(n.overflowOffset.left+o.offsetWidth-t.pageX<i.scrollSensitivity?o.scrollLeft=r=o.scrollLeft+i.scrollSpeed:t.pageX-n.overflowOffset.left<i.scrollSensitivity&&(o.scrollLeft=r=o.scrollLeft-i.scrollSpeed))):(i.axis&&"x"===i.axis||(t.pageY-$(a).scrollTop()<i.scrollSensitivity?r=$(a).scrollTop($(a).scrollTop()-i.scrollSpeed):$(window).height()-(t.pageY-$(a).scrollTop())<i.scrollSensitivity&&(r=$(a).scrollTop($(a).scrollTop()+i.scrollSpeed))),i.axis&&"y"===i.axis||(t.pageX-$(a).scrollLeft()<i.scrollSensitivity?r=$(a).scrollLeft($(a).scrollLeft()-i.scrollSpeed):$(window).width()-(t.pageX-$(a).scrollLeft())<i.scrollSensitivity&&(r=$(a).scrollLeft($(a).scrollLeft()+i.scrollSpeed)))),!1!==r&&$.ui.ddmanager&&!i.dropBehaviour&&$.ui.ddmanager.prepareOffsets(n,t)}}),$.ui.plugin.add("draggable","snap",{start:function(t,e,n){var i=n.options;n.snapElements=[],$(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var t=$(this),e=t.offset();this!==n.element[0]&&n.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e,n){var i,r,o,a,s,l,c,u,h,d,f=n.options,p=f.snapTolerance,g=e.offset.left,m=g+n.helperProportions.width,v=e.offset.top,y=v+n.helperProportions.height;for(h=n.snapElements.length-1;0<=h;h--)l=(s=n.snapElements[h].left-n.margins.left)+n.snapElements[h].width,u=(c=n.snapElements[h].top-n.margins.top)+n.snapElements[h].height,m<s-p||l+p<g||y<c-p||u+p<v||!$.contains(n.snapElements[h].item.ownerDocument,n.snapElements[h].item)?(n.snapElements[h].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,t,$.extend(n._uiHash(),{snapItem:n.snapElements[h].item})),n.snapElements[h].snapping=!1):("inner"!==f.snapMode&&(i=Math.abs(c-y)<=p,r=Math.abs(u-v)<=p,o=Math.abs(s-m)<=p,a=Math.abs(l-g)<=p,i&&(e.position.top=n._convertPositionTo("relative",{top:c-n.helperProportions.height,left:0}).top),r&&(e.position.top=n._convertPositionTo("relative",{top:u,left:0}).top),o&&(e.position.left=n._convertPositionTo("relative",{top:0,left:s-n.helperProportions.width}).left),a&&(e.position.left=n._convertPositionTo("relative",{top:0,left:l}).left)),d=i||r||o||a,"outer"!==f.snapMode&&(i=Math.abs(c-v)<=p,r=Math.abs(u-y)<=p,o=Math.abs(s-g)<=p,a=Math.abs(l-m)<=p,i&&(e.position.top=n._convertPositionTo("relative",{top:c,left:0}).top),r&&(e.position.top=n._convertPositionTo("relative",{top:u-n.helperProportions.height,left:0}).top),o&&(e.position.left=n._convertPositionTo("relative",{top:0,left:s}).left),a&&(e.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left)),!n.snapElements[h].snapping&&(i||r||o||a||d)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,t,$.extend(n._uiHash(),{snapItem:n.snapElements[h].item})),n.snapElements[h].snapping=i||r||o||a||d)}}),$.ui.plugin.add("draggable","stack",{start:function(t,e,n){var i,r=n.options,o=$.makeArray($(r.stack)).sort(function(t,e){return(parseInt($(t).css("zIndex"),10)||0)-(parseInt($(e).css("zIndex"),10)||0)});o.length&&(i=parseInt($(o[0]).css("zIndex"),10)||0,$(o).each(function(t){$(this).css("zIndex",i+t)}),this.css("zIndex",i+o.length))}}),$.ui.plugin.add("draggable","zIndex",{start:function(t,e,n){var i=$(e.helper),r=n.options;i.css("zIndex")&&(r._zIndex=i.css("zIndex")),i.css("zIndex",r.zIndex)},stop:function(t,e,n){var i=n.options;i._zIndex&&$(e.helper).css("zIndex",i._zIndex)}});$.ui.draggable;$.widget("ui.resizable",$.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,e){if("hidden"===$(t).css("overflow"))return!1;var n=e&&"left"===e?"scrollLeft":"scrollTop",i=!1;return 0<t[n]||(t[n]=1,i=0<t[n],t[n]=0,i)},_create:function(){var t,e=this.options,n=this;this._addClass("ui-resizable"),$.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap($("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&$(this.element).on("mouseenter",function(){e.disabled||(n._removeClass("ui-resizable-autohide"),n._handles.show())}).on("mouseleave",function(){e.disabled||n.resizing||(n._addClass("ui-resizable-autohide"),n._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,e=function(t){$(t).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(e(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),e(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var t,e,n,i,r,o=this.options,a=this;if(this.handles=o.handles||($(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=$(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),n=this.handles.split(","),this.handles={},e=0;e<n.length;e++)i="ui-resizable-"+(t=$.trim(n[e])),r=$("<div>"),this._addClass(r,"ui-resizable-handle "+i),r.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.append(r);this._renderAxis=function(t){var e,n,i,r;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=$(this.handles[e]),this._on(this.handles[e],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(n=$(this.handles[e],this.element),r=/sw|ne|nw|se|n|s/.test(e)?n.outerHeight():n.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,r),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){a.resizing||(this.className&&(r=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=r&&r[1]?r[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(t){var e,n,i=!1;for(e in this.handles)((n=$(this.handles[e])[0])===t.target||$.contains(n,t.target))&&(i=!0);return!this.options.disabled&&i},_mouseStart:function(t){var e,n,i,r=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),n=this._num(this.helper.css("top")),r.containment&&(e+=$(r.containment).scrollLeft()||0,n+=$(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:e,top:n},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof r.aspectRatio?r.aspectRatio:this.originalSize.width/this.originalSize.height||1,i=$(".ui-resizable-"+this.axis).css("cursor"),$("body").css("cursor","auto"===i?this.axis+"-resize":i),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e,n,i=this.originalMousePosition,r=this.axis,o=t.pageX-i.left||0,a=t.pageY-i.top||0,s=this._change[r];return this._updatePrevProperties(),s&&(e=s.apply(this,[t,o,a]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),$.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,n,i,r,o,a,s,l=this.options,c=this;return this._helper&&(i=(n=(e=this._proportionallyResizeElements).length&&/textarea/i.test(e[0].nodeName))&&this._hasScroll(e[0],"left")?0:c.sizeDiff.height,r=n?0:c.sizeDiff.width,o={width:c.helper.width()-r,height:c.helper.height()-i},a=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,s=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css($.extend(o,{top:s,left:a})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),$("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,n,i,r,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,i=o.minWidth/this.aspectRatio,n=o.maxHeight*this.aspectRatio,r=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),i>o.minHeight&&(o.minHeight=i),n<o.maxWidth&&(o.maxWidth=n),r<o.maxHeight&&(o.maxHeight=r)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,n=this.size,i=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===i&&(t.left=e.left+(n.width-t.width),t.top=null),"nw"===i&&(t.top=e.top+(n.height-t.height),t.left=e.left+(n.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,n=this.axis,i=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,r=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,s=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,c=/sw|nw|w/.test(n),u=/nw|ne|n/.test(n);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),i&&(t.width=e.maxWidth),r&&(t.height=e.maxHeight),o&&c&&(t.left=s-e.minWidth),i&&c&&(t.left=s-e.maxWidth),a&&u&&(t.top=l-e.minHeight),r&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,n=[],i=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],r=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)n[e]=parseFloat(i[e])||0,n[e]+=parseFloat(r[e])||0;return{height:n[0]+n[2],width:n[1]+n[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,n=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:n.height()-this.outerDimensions.height||0,width:n.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||$("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var n=this.originalSize;return{left:this.originalPosition.left+e,width:n.width-e}},n:function(t,e,n){var i=this.originalSize;return{top:this.originalPosition.top+n,height:i.height-n}},s:function(t,e,n){return{height:this.originalSize.height+n}},se:function(t,e,n){return $.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,n]))},sw:function(t,e,n){return $.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,n]))},ne:function(t,e,n){return $.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,n]))},nw:function(t,e,n){return $.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,n]))}},_propagate:function(t,e){$.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),$.ui.plugin.add("resizable","animate",{stop:function(e){var n=$(this).resizable("instance"),t=n.options,i=n._proportionallyResizeElements,r=i.length&&/textarea/i.test(i[0].nodeName),o=r&&n._hasScroll(i[0],"left")?0:n.sizeDiff.height,a=r?0:n.sizeDiff.width,s={width:n.size.width-a,height:n.size.height-o},l=parseFloat(n.element.css("left"))+(n.position.left-n.originalPosition.left)||null,c=parseFloat(n.element.css("top"))+(n.position.top-n.originalPosition.top)||null;n.element.animate($.extend(s,c&&l?{top:c,left:l}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(n.element.css("width")),height:parseFloat(n.element.css("height")),top:parseFloat(n.element.css("top")),left:parseFloat(n.element.css("left"))};i&&i.length&&$(i[0]).css({width:t.width,height:t.height}),n._updateCache(t),n._propagate("resize",e)}})}}),$.ui.plugin.add("resizable","containment",{start:function(){var n,i,t,e,r,o,a,s=$(this).resizable("instance"),l=s.options,c=s.element,u=l.containment,h=u instanceof $?u.get(0):/parent/.test(u)?c.parent().get(0):u;h&&(s.containerElement=$(h),/document/.test(u)||u===document?(s.containerOffset={left:0,top:0},s.containerPosition={left:0,top:0},s.parentData={element:$(document),left:0,top:0,width:$(document).width(),height:$(document).height()||document.body.parentNode.scrollHeight}):(n=$(h),i=[],$(["Top","Right","Left","Bottom"]).each(function(t,e){i[t]=s._num(n.css("padding"+e))}),s.containerOffset=n.offset(),s.containerPosition=n.position(),s.containerSize={height:n.innerHeight()-i[3],width:n.innerWidth()-i[1]},t=s.containerOffset,e=s.containerSize.height,r=s.containerSize.width,o=s._hasScroll(h,"left")?h.scrollWidth:r,a=s._hasScroll(h)?h.scrollHeight:e,s.parentData={element:h,left:t.left,top:t.top,width:o,height:a}))},resize:function(t){var e,n,i,r,o=$(this).resizable("instance"),a=o.options,s=o.containerOffset,l=o.position,c=o._aspectRatio||t.shiftKey,u={top:0,left:0},h=o.containerElement,d=!0;h[0]!==document&&/static/.test(h.css("position"))&&(u=s),l.left<(o._helper?s.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-s.left:o.position.left-u.left),c&&(o.size.height=o.size.width/o.aspectRatio,d=!1),o.position.left=a.helper?s.left:0),l.top<(o._helper?s.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-s.top:o.position.top),c&&(o.size.width=o.size.height*o.aspectRatio,d=!1),o.position.top=o._helper?s.top:0),i=o.containerElement.get(0)===o.element.parent().get(0),r=/relative|absolute/.test(o.containerElement.css("position")),o.offset.top=i&&r?(o.offset.left=o.parentData.left+o.position.left,o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.element.offset().top),e=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-u.left:o.offset.left-s.left)),n=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-u.top:o.offset.top-s.top)),e+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-e,c&&(o.size.height=o.size.width/o.aspectRatio,d=!1)),n+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-n,c&&(o.size.width=o.size.height*o.aspectRatio,d=!1)),d||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var t=$(this).resizable("instance"),e=t.options,n=t.containerOffset,i=t.containerPosition,r=t.containerElement,o=$(t.helper),a=o.offset(),s=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(r.css("position"))&&$(this).css({left:a.left-i.left-n.left,width:s,height:l}),t._helper&&!e.animate&&/static/.test(r.css("position"))&&$(this).css({left:a.left-i.left-n.left,width:s,height:l})}}),$.ui.plugin.add("resizable","alsoResize",{start:function(){var t=$(this).resizable("instance").options;$(t.alsoResize).each(function(){var t=$(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,n){var e=$(this).resizable("instance"),i=e.options,r=e.originalSize,o=e.originalPosition,a={height:e.size.height-r.height||0,width:e.size.width-r.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};$(i.alsoResize).each(function(){var t=$(this),i=$(this).data("ui-resizable-alsoresize"),r={},e=t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];$.each(e,function(t,e){var n=(i[e]||0)+(a[e]||0);n&&0<=n&&(r[e]=n||null)}),t.css(r)})},stop:function(){$(this).removeData("ui-resizable-alsoresize")}}),$.ui.plugin.add("resizable","ghost",{start:function(){var t=$(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==$.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=$(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=$(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),$.ui.plugin.add("resizable","grid",{resize:function(){var t,e=$(this).resizable("instance"),n=e.options,i=e.size,r=e.originalSize,o=e.originalPosition,a=e.axis,s="number"==typeof n.grid?[n.grid,n.grid]:n.grid,l=s[0]||1,c=s[1]||1,u=Math.round((i.width-r.width)/l)*l,h=Math.round((i.height-r.height)/c)*c,d=r.width+u,f=r.height+h,p=n.maxWidth&&n.maxWidth<d,g=n.maxHeight&&n.maxHeight<f,m=n.minWidth&&n.minWidth>d,v=n.minHeight&&n.minHeight>f;n.grid=s,m&&(d+=l),v&&(f+=c),p&&(d-=l),g&&(f-=c),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=f):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=f,e.position.top=o.top-h):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=f,e.position.left=o.left-u):((f-c<=0||d-l<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),e.position.top=0<f-c?(e.size.height=f,o.top-h):(f=c-t.height,e.size.height=f,o.top+r.height-f),e.position.left=0<d-l?(e.size.width=d,o.left-u):(d=l-t.width,e.size.width=d,o.left+r.width-d))}});$.ui.resizable;$.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var e=$(this).css(t).offset().top;e<0&&$(this).css("top",t.top-e)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&$.fn.draggable&&this._makeDraggable(),this.options.resizable&&$.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?$(t):this.document.find(t||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(t=e.parent.children().eq(e.index)).length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:$.noop,enable:$.noop,close:function(t){var e=this;this._isOpen&&!1!==this._trigger("beforeClose",t)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||$.ui.safeBlur($.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){e._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var n=!1,i=this.uiDialog.siblings(".ui-front:visible").map(function(){return+$(this).css("z-index")}).get(),r=Math.max.apply(null,i);return r>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",r+1),n=!0),n&&!e&&this._trigger("focus",t),n},open:function(){var t=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=$($.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(t){function e(){var t=$.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===t||$.contains(this.uiDialog[0],t)||this._focusTabbable()}t.preventDefault(),e.call(this),this._delay(e)},_createWrapper:function(){this.uiDialog=$("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===$.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);if(t.keyCode===$.ui.keyCode.TAB&&!t.isDefaultPrevented()){var e=this.uiDialog.find(":tabbable"),n=e.filter(":first"),i=e.filter(":last");t.target!==i[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==n[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){i.trigger("focus")}),t.preventDefault()):(this._delay(function(){n.trigger("focus")}),t.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=$("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(t){$(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=$("<button type='button'></button>").button({label:$("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),t=$("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=$("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=$("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var r=this,t=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),$.isEmptyObject(t)||$.isArray(t)&&!t.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):($.each(t,function(t,e){var n,i;e=$.isFunction(e)?{click:e,text:t}:e,e=$.extend({type:"button"},e),n=e.click,i={icon:e.icon,iconPosition:e.iconPosition,showLabel:e.showLabel,icons:e.icons,text:e.text},delete e.click,delete e.icon,delete e.iconPosition,delete e.showLabel,delete e.icons,"boolean"==typeof e.text&&delete e.text,$("<button></button>",e).button(i).appendTo(r.uiButtonSet).on("click",function(){n.apply(r.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var r=this,o=this.options;function a(t){return{position:t.position,offset:t.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(t,e){r._addClass($(this),"ui-dialog-dragging"),r._blockFrames(),r._trigger("dragStart",t,a(e))},drag:function(t,e){r._trigger("drag",t,a(e))},stop:function(t,e){var n=e.offset.left-r.document.scrollLeft(),i=e.offset.top-r.document.scrollTop();o.position={my:"left top",at:"left"+(0<=n?"+":"")+n+" top"+(0<=i?"+":"")+i,of:r.window},r._removeClass($(this),"ui-dialog-dragging"),r._unblockFrames(),r._trigger("dragStop",t,a(e))}})},_makeResizable:function(){var o=this,a=this.options,t=a.resizable,e=this.uiDialog.css("position"),n="string"==typeof t?t:"n,e,s,w,se,sw,ne,nw";function s(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:a.maxWidth,maxHeight:a.maxHeight,minWidth:a.minWidth,minHeight:this._minHeight(),handles:n,start:function(t,e){o._addClass($(this),"ui-dialog-resizing"),o._blockFrames(),o._trigger("resizeStart",t,s(e))},resize:function(t,e){o._trigger("resize",t,s(e))},stop:function(t,e){var n=o.uiDialog.offset(),i=n.left-o.document.scrollLeft(),r=n.top-o.document.scrollTop();a.height=o.uiDialog.height(),a.width=o.uiDialog.width(),a.position={my:"left top",at:"left"+(0<=i?"+":"")+i+" top"+(0<=r?"+":"")+r,of:o.window},o._removeClass($(this),"ui-dialog-resizing"),o._unblockFrames(),o._trigger("resizeStop",t,s(e))}}).css("position",e)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=$(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),e=$.inArray(this,t);-1!==e&&t.splice(e,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(t){var n=this,i=!1,r={};$.each(t,function(t,e){n._setOption(t,e),t in n.sizeRelatedOptions&&(i=!0),t in n.resizableRelatedOptions&&(r[t]=e)}),i&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(t,e){var n,i,r=this.uiDialog;"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:$("<a>").text(""+this.options.closeText).html()}),"draggable"===t&&((n=r.is(":data(ui-draggable)"))&&!e&&r.draggable("destroy"),!n&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&((i=r.is(":data(ui-resizable)"))&&!e&&r.resizable("destroy"),i&&"string"==typeof e&&r.resizable("option","handles",e),i||!1===e||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,n,i=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),i.minWidth>i.width&&(i.width=i.minWidth),t=this.uiDialog.css({height:"auto",width:i.width}).outerHeight(),e=Math.max(0,i.minHeight-t),n="number"==typeof i.maxHeight?Math.max(0,i.maxHeight-t):"none","auto"===i.height?this.element.css({minHeight:e,maxHeight:n,height:"auto"}):this.element.height(Math.max(0,i.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=$(this);return $("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!$(t.target).closest(".ui-dialog").length||!!$(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=$("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!1!==$.uiBackCompat&&$.widget("ui.dialog",$.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}});$.ui.dialog;$.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,e=this.options,n=e.accept;this.isover=!1,this.isout=!0,this.accept=$.isFunction(n)?n:function(t){return t.is(n)},this.proportions=function(){if(!arguments.length)return t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});t=arguments[0]},this._addToManager(e.scope),e.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){$.ui.ddmanager.droppables[t]=$.ui.ddmanager.droppables[t]||[],$.ui.ddmanager.droppables[t].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var t=$.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,e){if("accept"===t)this.accept=$.isFunction(e)?e:function(t){return t.is(e)};else if("scope"===t){var n=$.ui.ddmanager.droppables[this.options.scope];this._splice(n),this._addToManager(e)}this._super(t,e)},_activate:function(t){var e=$.ui.ddmanager.current;this._addActiveClass(),e&&this._trigger("activate",t,this.ui(e))},_deactivate:function(t){var e=$.ui.ddmanager.current;this._removeActiveClass(),e&&this._trigger("deactivate",t,this.ui(e))},_over:function(t){var e=$.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(e)))},_out:function(t){var e=$.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(e)))},_drop:function(e,t){var n=t||$.ui.ddmanager.current,i=!1;return!(!n||(n.currentItem||n.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=$(this).droppable("instance");if(t.options.greedy&&!t.options.disabled&&t.options.scope===n.options.scope&&t.accept.call(t.element[0],n.currentItem||n.element)&&_(n,$.extend(t,{offset:t.element.offset()}),t.options.tolerance,e))return!(i=!0)}),!i&&(!!this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(n)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var _=$.ui.intersect=function(){function d(t,e,n){return e<=t&&t<e+n}return function(t,e,n,i){if(!e.offset)return!1;var r=(t.positionAbs||t.position.absolute).left+t.margins.left,o=(t.positionAbs||t.position.absolute).top+t.margins.top,a=r+t.helperProportions.width,s=o+t.helperProportions.height,l=e.offset.left,c=e.offset.top,u=l+e.proportions().width,h=c+e.proportions().height;switch(n){case"fit":return l<=r&&a<=u&&c<=o&&s<=h;case"intersect":return l<r+t.helperProportions.width/2&&a-t.helperProportions.width/2<u&&c<o+t.helperProportions.height/2&&s-t.helperProportions.height/2<h;case"pointer":return d(i.pageY,c,e.proportions().height)&&d(i.pageX,l,e.proportions().width);case"touch":return(c<=o&&o<=h||c<=s&&s<=h||o<c&&h<s)&&(l<=r&&r<=u||l<=a&&a<=u||r<l&&u<a);default:return!1}}}();!($.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,e){var n,i,r=$.ui.ddmanager.droppables[t.options.scope]||[],o=e?e.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();t:for(n=0;n<r.length;n++)if(!(r[n].options.disabled||t&&!r[n].accept.call(r[n].element[0],t.currentItem||t.element))){for(i=0;i<a.length;i++)if(a[i]===r[n].element[0]){r[n].proportions().height=0;continue t}r[n].visible="none"!==r[n].element.css("display"),r[n].visible&&("mousedown"===o&&r[n]._activate.call(r[n],e),r[n].offset=r[n].element.offset(),r[n].proportions({width:r[n].element[0].offsetWidth,height:r[n].element[0].offsetHeight}))}},drop:function(t,e){var n=!1;return $.each(($.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&_(t,this,this.options.tolerance,e)&&(n=this._drop.call(this,e)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,e)))}),n},dragStart:function(t,e){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||$.ui.ddmanager.prepareOffsets(t,e)})},drag:function(o,a){o.options.refreshPositions&&$.ui.ddmanager.prepareOffsets(o,a),$.each($.ui.ddmanager.droppables[o.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var t,e,n,i=_(o,this,this.options.tolerance,a),r=!i&&this.isover?"isout":i&&!this.isover?"isover":null;r&&(this.options.greedy&&(e=this.options.scope,(n=this.element.parents(":data(ui-droppable)").filter(function(){return $(this).droppable("instance").options.scope===e})).length&&((t=$(n[0]).droppable("instance")).greedyChild="isover"===r)),t&&"isover"===r&&(t.isover=!1,t.isout=!0,t._out.call(t,a)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,a),t&&"isout"===r&&(t.isout=!1,t.isover=!0,t._over.call(t,a)))}})},dragStop:function(t,e){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||$.ui.ddmanager.prepareOffsets(t,e)}})!==$.uiBackCompat&&$.widget("ui.droppable",$.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});$.ui.droppable,$.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=$("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,e=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).width(e.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,t===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=$("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),$.widget("ui.selectable",$.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var i=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){i.elementPos=$(i.element[0]).offset(),i.selectees=$(i.options.filter,i.element[0]),i._addClass(i.selectees,"ui-selectee"),i.selectees.each(function(){var t=$(this),e=t.offset(),n={left:e.left-i.elementPos.left,top:e.top-i.elementPos.top};$.data(this,"selectable-item",{element:this,$element:t,left:n.left,top:n.top,right:n.left+t.outerWidth(),bottom:n.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=$("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(n){var i=this,t=this.options;this.opos=[n.pageX,n.pageY],this.elementPos=$(this.element[0]).offset(),this.options.disabled||(this.selectees=$(t.filter,this.element[0]),this._trigger("start",n),$(t.appendTo).append(this.helper),this.helper.css({left:n.pageX,top:n.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=$.data(this,"selectable-item");t.startselected=!0,n.metaKey||n.ctrlKey||(i._removeClass(t.$element,"ui-selected"),t.selected=!1,i._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,i._trigger("unselecting",n,{unselecting:t.element}))}),$(n.target).parents().addBack().each(function(){var t,e=$.data(this,"selectable-item");if(e)return t=!n.metaKey&&!n.ctrlKey||!e.$element.hasClass("ui-selected"),i._removeClass(e.$element,t?"ui-unselecting":"ui-selected")._addClass(e.$element,t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?i._trigger("selecting",n,{selecting:e.element}):i._trigger("unselecting",n,{unselecting:e.element}),!1}))},_mouseDrag:function(i){if(this.dragged=!0,!this.options.disabled){var t,r=this,o=this.options,a=this.opos[0],s=this.opos[1],l=i.pageX,c=i.pageY;return l<a&&(t=l,l=a,a=t),c<s&&(t=c,c=s,s=t),this.helper.css({left:a,top:s,width:l-a,height:c-s}),this.selectees.each(function(){var t=$.data(this,"selectable-item"),e=!1,n={};t&&t.element!==r.element[0]&&(n.left=t.left+r.elementPos.left,n.right=t.right+r.elementPos.left,n.top=t.top+r.elementPos.top,n.bottom=t.bottom+r.elementPos.top,"touch"===o.tolerance?e=!(n.left>l||n.right<a||n.top>c||n.bottom<s):"fit"===o.tolerance&&(e=n.left>a&&n.right<l&&n.top>s&&n.bottom<c),e?(t.selected&&(r._removeClass(t.$element,"ui-selected"),t.selected=!1),t.unselecting&&(r._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1),t.selecting||(r._addClass(t.$element,"ui-selecting"),t.selecting=!0,r._trigger("selecting",i,{selecting:t.element}))):(t.selecting&&((i.metaKey||i.ctrlKey)&&t.startselected?(r._removeClass(t.$element,"ui-selecting"),t.selecting=!1,r._addClass(t.$element,"ui-selected"),t.selected=!0):(r._removeClass(t.$element,"ui-selecting"),t.selecting=!1,t.startselected&&(r._addClass(t.$element,"ui-unselecting"),t.unselecting=!0),r._trigger("unselecting",i,{unselecting:t.element}))),t.selected&&(i.metaKey||i.ctrlKey||t.startselected||(r._removeClass(t.$element,"ui-selected"),t.selected=!1,r._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,r._trigger("unselecting",i,{unselecting:t.element})))))}),!1}},_mouseStop:function(e){var n=this;return this.dragged=!1,$(".ui-unselecting",this.element[0]).each(function(){var t=$.data(this,"selectable-item");n._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1,t.startselected=!1,n._trigger("unselected",e,{unselected:t.element})}),$(".ui-selecting",this.element[0]).each(function(){var t=$.data(this,"selectable-item");n._removeClass(t.$element,"ui-selecting")._addClass(t.$element,"ui-selected"),t.selecting=!1,t.selected=!0,t.startselected=!0,n._trigger("selected",e,{selected:t.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),$.widget("ui.selectmenu",[$.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=$()},_drawButton:function(){var t,e=this,n=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=$("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),t=$("<span>").appendTo(this.button),this._addClass(t,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(n).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){e._rendered||e._refreshMenu()})},_drawMenu:function(){var i=this;this.menu=$("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=$("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,e){t.preventDefault(),i._setSelection(),i._select(e.item.data("ui-selectmenu-item"),t)},focus:function(t,e){var n=e.item.data("ui-selectmenu-item");null!=i.focusIndex&&n.index!==i.focusIndex&&(i._trigger("focus",t,{item:n}),i.isOpen||i._select(n,t)),i.focusIndex=n.index,i.button.attr("aria-activedescendant",i.menuItems.eq(n.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position($.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(t){var e=$("<span>");return this._setText(e,t.label),this._addClass(e,"ui-selectmenu-text"),e},_renderMenu:function(i,t){var r=this,o="";$.each(t,function(t,e){var n;e.optgroup!==o&&(n=$("<li>",{text:e.optgroup}),r._addClass(n,"ui-selectmenu-optgroup","ui-menu-divider"+(e.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),n.appendTo(i),o=e.optgroup),r._renderItemData(i,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(t,e){var n=$("<li>"),i=$("<div>",{title:e.element.attr("title")});return e.disabled&&this._addClass(n,null,"ui-state-disabled"),this._setText(i,e.label),n.append(i).appendTo(t)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var n,i,r=".ui-menu-item";this.isOpen?n=this.menuItems.eq(this.focusIndex).parent("li"):(n=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),r+=":not(.ui-state-disabled)"),(i="first"===t||"last"===t?n["first"===t?"prevAll":"nextAll"](r).eq(-1):n[t+"All"](r).eq(0)).length&&this.menuInstance.focus(e,i)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?((t=window.getSelection()).removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(t){this.isOpen&&($(t.target).closest(".ui-selectmenu-menu, #"+$.ui.escapeSelector(this.ids.button)).length||this.close(t))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection()).rangeCount&&(this.range=t.getRangeAt(0)):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(t){var e=!0;switch(t.keyCode){case $.ui.keyCode.TAB:case $.ui.keyCode.ESCAPE:this.close(t),e=!1;break;case $.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case $.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case $.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case $.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case $.ui.keyCode.LEFT:this._move("prev",t);break;case $.ui.keyCode.RIGHT:this._move("next",t);break;case $.ui.keyCode.HOME:case $.ui.keyCode.PAGE_UP:this._move("first",t);break;case $.ui.keyCode.END:case $.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),e=!1}e&&t.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var n=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==n&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var n=this.button.find("span.ui-icon");this._removeClass(n,null,this.options.icons.button)._addClass(n,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?$(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front, dialog")),t.length||(t=this.document[0].body),t},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;!1!==t?(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t)):this.button.css("width","")},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(t){var n=this,i=[];t.each(function(t,e){i.push(n._parseOption($(e),t))}),this.items=i},_parseOption:function(t,e){var n=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:n.attr("label")||"",disabled:n.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),$.widget("ui.slider",$.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,e,n=this.options,i=this.element.find(".ui-slider-handle"),r="<span tabindex='0'></span>",o=[];for(e=n.values&&n.values.length||1,i.length>e&&(i.slice(e).remove(),i=i.slice(0,e)),t=i.length;t<e;t++)o.push(r);this.handles=i.add($(o.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(t){$(this).data("ui-slider-handle-index",t).attr("tabIndex",0)})},_createRange:function(){var t=this.options;t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:$.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=$("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(t){var e,n,i,r,o,a,s,l=this,c=this.options;return!c.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),e={x:t.pageX,y:t.pageY},n=this._normValueFromMouse(e),i=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var e=Math.abs(n-l.values(t));(e<i||i===e&&(t===l._lastChangedValue||l.values(t)===c.min))&&(i=e,r=$(this),o=t)}),!1!==this._start(t,o)&&(this._mouseSliding=!0,this._handleIndex=o,this._addClass(r,null,"ui-state-active"),r.trigger("focus"),a=r.offset(),s=!$(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=s?{left:0,top:0}:{left:t.pageX-a.left-r.width()/2,top:t.pageY-a.top-r.height()/2-(parseInt(r.css("borderTopWidth"),10)||0)-(parseInt(r.css("borderBottomWidth"),10)||0)+(parseInt(r.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,n),this._animateOff=!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},n=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,n),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,n,i,r;return 1<(n=("horizontal"===this.orientation?(e=this.elementSize.width,t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)))/e)&&(n=1),n<0&&(n=0),"vertical"===this.orientation&&(n=1-n),i=this._valueMax()-this._valueMin(),r=this._valueMin()+n*i,this._trimAlignValue(r)},_uiHash:function(t,e,n){var i={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(i.value=void 0!==e?e:this.values(t),i.values=n||this.values()),i},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,n){var i,r=this.value(),o=this.values();this._hasMultipleValues()&&(i=this.values(e?0:1),r=this.values(e),2===this.options.values.length&&!0===this.options.range&&(n=0===e?Math.min(i,n):Math.max(i,n)),o[e]=n),n!==r&&!1!==this._trigger("slide",t,this._uiHash(e,n,o))&&(this._hasMultipleValues()?this.values(e,n):this.value(n))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(t,e){var n,i,r;if(1<arguments.length)return this.options.values[t]=this._trimAlignValue(e),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!$.isArray(t))return this._hasMultipleValues()?this._values(t):this.value();for(n=this.options.values,i=t,r=0;r<n.length;r+=1)n[r]=this._trimAlignValue(i[r]),this._change(null,r);this._refreshValue()},_setOption:function(t,e){var n,i=0;switch("range"===t&&!0===this.options.range&&("min"===e?(this.options.value=this._values(0),this.options.values=null):"max"===e&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),$.isArray(this.options.values)&&(i=this.options.values.length),this._super(t,e),t){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(e),this.handles.css("horizontal"===e?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=i-1;0<=n;n--)this._change(null,n);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,n,i;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(n=this.options.values.slice(),i=0;i<n.length;i+=1)n[i]=this._trimAlignValue(n[i]);return n}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=0<this.options.step?this.options.step:1,n=(t-this._valueMin())%e,i=t-n;return 2*Math.abs(n)>=e&&(i+=0<n?e:-e),parseFloat(i.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),n=this.options.step;(t=Math.round((t-e)/n)*n+e)>this.options.max&&(t-=n),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),n=e.indexOf(".");return-1===n?0:e.length-n-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,n,t,i,r,o=this.options.range,a=this.options,s=this,l=!this._animateOff&&a.animate,c={};this._hasMultipleValues()?this.handles.each(function(t){n=(s.values(t)-s._valueMin())/(s._valueMax()-s._valueMin())*100,c["horizontal"===s.orientation?"left":"bottom"]=n+"%",$(this).stop(1,1)[l?"animate":"css"](c,a.animate),!0===s.options.range&&("horizontal"===s.orientation?(0===t&&s.range.stop(1,1)[l?"animate":"css"]({left:n+"%"},a.animate),1===t&&s.range[l?"animate":"css"]({width:n-e+"%"},{queue:!1,duration:a.animate})):(0===t&&s.range.stop(1,1)[l?"animate":"css"]({bottom:n+"%"},a.animate),1===t&&s.range[l?"animate":"css"]({height:n-e+"%"},{queue:!1,duration:a.animate}))),e=n}):(t=this.value(),i=this._valueMin(),r=this._valueMax(),n=r!==i?(t-i)/(r-i)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=n+"%",this.handle.stop(1,1)[l?"animate":"css"](c,a.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:n+"%"},a.animate),"max"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-n+"%"},a.animate),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:n+"%"},a.animate),"max"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-n+"%"},a.animate))},_handleEvents:{keydown:function(t){var e,n,i,r=$(t.target).data("ui-slider-handle-index");switch(t.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.PAGE_UP:case $.ui.keyCode.PAGE_DOWN:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass($(t.target),null,"ui-state-active"),!1===this._start(t,r)))return}switch(i=this.options.step,e=n=this._hasMultipleValues()?this.values(r):this.value(),t.keyCode){case $.ui.keyCode.HOME:n=this._valueMin();break;case $.ui.keyCode.END:n=this._valueMax();break;case $.ui.keyCode.PAGE_UP:n=this._trimAlignValue(e+(this._valueMax()-this._valueMin())/this.numPages);break;case $.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(e-(this._valueMax()-this._valueMin())/this.numPages);break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(e===this._valueMax())return;n=this._trimAlignValue(e+i);break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(e===this._valueMin())return;n=this._trimAlignValue(e-i)}this._slide(t,r,n)},keyup:function(t){var e=$(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,e),this._change(t,e),this._removeClass($(t.target),null,"ui-state-active"))}}}),$.widget("ui.sortable",$.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,n){return e<=t&&t<e+n},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),$.each(this.items,function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;0<=t;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,e){var n=null,i=!1,r=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),$(t.target).parents().each(function(){if($.data(this,r.widgetName+"-item")===r)return n=$(this),!1}),$.data(t.target,r.widgetName+"-item")===r&&(n=$(t.target)),!!n&&(!(this.options.handle&&!e&&($(this.options.handle,n).find("*").addBack().each(function(){this===t.target&&(i=!0)}),!i))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,e,n){var i,r,o=this.options;if((this.currentContainer=this).refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},$.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(r=this.document.find("body"),this.storedCursor=r.css("cursor"),r.css("cursor",o.cursor),this.storedStylesheet=$("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(r)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(i=this.containers.length-1;0<=i;i--)this.containers[i]._trigger("activate",t,this._uiHash(this));return $.ui.ddmanager&&($.ui.ddmanager.current=this),$.ui.ddmanager&&!o.dropBehaviour&&$.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var e,n,i,r,o=this.options,a=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+o.scrollSpeed:t.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+o.scrollSpeed:t.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(t.pageY-this.document.scrollTop()<o.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<o.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed)),t.pageX-this.document.scrollLeft()<o.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-o.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<o.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+o.scrollSpeed))),!1!==a&&$.ui.ddmanager&&!o.dropBehaviour&&$.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e=this.items.length-1;0<=e;e--)if(i=(n=this.items[e]).item[0],(r=this._intersectsWithPointer(n))&&n.instance===this.currentContainer&&!(i===this.currentItem[0]||this.placeholder[1===r?"next":"prev"]()[0]===i||$.contains(this.placeholder[0],i)||"semi-dynamic"===this.options.type&&$.contains(this.element[0],i))){if(this.direction=1===r?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(t,n),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),$.ui.ddmanager&&$.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){if(t){if($.ui.ddmanager&&!this.options.dropBehaviour&&$.ui.ddmanager.drop(this,t),this.options.revert){var n=this,i=this.placeholder.offset(),r=this.options.axis,o={};r&&"x"!==r||(o.left=i.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),r&&"y"!==r||(o.top=i.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,$(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){n._clear(t)})}else this._clear(t,e);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new $.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;0<=t;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),$.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?$(this.domPosition.prev).after(this.currentItem):$(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var t=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},$(t).each(function(){var t=($(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);t&&n.push((e.key||t[1]+"[]")+"="+(e.key&&e.expression?t[1]:t[2]))}),!n.length&&e.key&&n.push(e.key+"="),n.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},e.each(function(){n.push($(t.item||this).attr(t.attribute||"id")||"")}),n},_intersectsWith:function(t){var e=this.positionAbs.left,n=e+this.helperProportions.width,i=this.positionAbs.top,r=i+this.helperProportions.height,o=t.left,a=o+t.width,s=t.top,l=s+t.height,c=this.offset.click.top,u=this.offset.click.left,h="x"===this.options.axis||s<i+c&&i+c<l,d="y"===this.options.axis||o<e+u&&e+u<a,f=h&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?f:o<e+this.helperProportions.width/2&&n-this.helperProportions.width/2<a&&s<i+this.helperProportions.height/2&&r-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e,n,i="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),r="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!i||!r)&&(e=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection(),this.floating?"right"===n||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),i=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return this.floating&&r?"right"===r&&n||"left"===r&&!n:i&&("down"===i&&e||"up"===i&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(0<t?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(0<t?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){var e,n,i,r,o=[],a=[],s=this._connectWith();if(s&&t)for(e=s.length-1;0<=e;e--)for(n=(i=$(s[e],this.document[0])).length-1;0<=n;n--)(r=$.data(i[n],this.widgetFullName))&&r!==this&&!r.options.disabled&&a.push([$.isFunction(r.options.items)?r.options.items.call(r.element):$(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);function l(){o.push(this)}for(a.push([$.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),e=a.length-1;0<=e;e--)a[e][0].each(l);return $(o)},_removeCurrentsFromItems:function(){var n=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=$.grep(this.items,function(t){for(var e=0;e<n.length;e++)if(n[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,n,i,r,o,a,s,l,c=this.items,u=[[$.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):$(this.options.items,this.element),this]],h=this._connectWith();if(h&&this.ready)for(e=h.length-1;0<=e;e--)for(n=(i=$(h[e],this.document[0])).length-1;0<=n;n--)(r=$.data(i[n],this.widgetFullName))&&r!==this&&!r.options.disabled&&(u.push([$.isFunction(r.options.items)?r.options.items.call(r.element[0],t,{item:this.currentItem}):$(r.options.items,r.element),r]),this.containers.push(r));for(e=u.length-1;0<=e;e--)for(o=u[e][1],n=0,l=(a=u[e][0]).length;n<l;n++)(s=$(a[n])).data(this.widgetName+"-item",o),c.push({item:s,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(t){var e,n,i,r;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),e=this.items.length-1;0<=e;e--)(n=this.items[e]).instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(i=this.options.toleranceElement?$(this.options.toleranceElement,n.item):n.item,t||(n.width=i.outerWidth(),n.height=i.outerHeight()),r=i.offset(),n.left=r.left,n.top=r.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)r=this.containers[e].element.offset(),this.containers[e].containerCache.left=r.left,this.containers[e].containerCache.top=r.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(n){var i,r=(n=n||this).options;r.placeholder&&r.placeholder.constructor!==String||(i=r.placeholder,r.placeholder={element:function(){var t=n.currentItem[0].nodeName.toLowerCase(),e=$("<"+t+">",n.document[0]);return n._addClass(e,"ui-sortable-placeholder",i||n.currentItem[0].className)._removeClass(e,"ui-sortable-helper"),"tbody"===t?n._createTrPlaceholder(n.currentItem.find("tr").eq(0),$("<tr>",n.document[0]).appendTo(e)):"tr"===t?n._createTrPlaceholder(n.currentItem,e):"img"===t&&e.attr("src",n.currentItem.attr("src")),i||e.css("visibility","hidden"),e},update:function(t,e){i&&!r.forcePlaceholderSize||(e.height()||e.height(n.currentItem.innerHeight()-parseInt(n.currentItem.css("paddingTop")||0,10)-parseInt(n.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(n.currentItem.innerWidth()-parseInt(n.currentItem.css("paddingLeft")||0,10)-parseInt(n.currentItem.css("paddingRight")||0,10)))}}),n.placeholder=$(r.placeholder.element.call(n.element,n.currentItem)),n.currentItem.after(n.placeholder),r.placeholder.update(n,n.placeholder)},_createTrPlaceholder:function(t,e){var n=this;t.children().each(function(){$("<td>&#160;</td>",n.document[0]).attr("colspan",$(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){var e,n,i,r,o,a,s,l,c,u,h=null,d=null;for(e=this.containers.length-1;0<=e;e--)if(!$.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(h&&$.contains(this.containers[e].element[0],h.element[0]))continue;h=this.containers[e],d=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",t,this._uiHash(this)),this.containers[e].containerCache.over=0);if(h)if(1===this.containers.length)this.containers[d].containerCache.over||(this.containers[d]._trigger("over",t,this._uiHash(this)),this.containers[d].containerCache.over=1);else{for(i=1e4,r=null,o=(c=h.floating||this._isFloating(this.currentItem))?"left":"top",a=c?"width":"height",u=c?"pageX":"pageY",n=this.items.length-1;0<=n;n--)$.contains(this.containers[d].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(s=this.items[n].item.offset()[o],l=!1,t[u]-s>this.items[n][a]/2&&(l=!0),Math.abs(t[u]-s)<i&&(i=Math.abs(t[u]-s),r=this.items[n],this.direction=l?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[d])return void(this.currentContainer.containerCache.over||(this.containers[d]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));r?this._rearrange(t,r,null,!0):this._rearrange(t,null,this.containers[d].element,!0),this._trigger("change",t,this._uiHash()),this.containers[d]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[d],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",t,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(t){var e=this.options,n=$.isFunction(e.helper)?$(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||$("parent"!==e.appendTo?e.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),n[0].style.width&&!e.forceHelperSize||n.width(this.currentItem.width()),n[0].style.height&&!e.forceHelperSize||n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),$.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&$.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&$.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,n,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode),"document"!==i.containment&&"window"!==i.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===i.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===i.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||(t=$(i.containment)[0],e=$(i.containment).offset(),n="hidden"!==$(t).css("overflow"),this.containment=[e.left+(parseInt($(t).css("borderLeftWidth"),10)||0)+(parseInt($(t).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt($(t).css("borderTopWidth"),10)||0)+(parseInt($(t).css("paddingTop"),10)||0)-this.margins.top,e.left+(n?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt($(t).css("borderLeftWidth"),10)||0)-(parseInt($(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(n?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt($(t).css("borderTopWidth"),10)||0)-(parseInt($(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e||(e=this.position);var n="absolute"===t?1:-1,i="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&$.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(i[0].tagName);return{top:e.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():r?0:i.scrollTop())*n,left:e.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():r?0:i.scrollLeft())*n}},_generatePosition:function(t){var e,n,i=this.options,r=t.pageX,o=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&$.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(r=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(r=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),i.grid&&(e=this.originalPageY+Math.round((o-this.originalPageY)/i.grid[1])*i.grid[1],o=this.containment?e-this.offset.click.top>=this.containment[1]&&e-this.offset.click.top<=this.containment[3]?e:e-this.offset.click.top>=this.containment[1]?e-i.grid[1]:e+i.grid[1]:e,n=this.originalPageX+Math.round((r-this.originalPageX)/i.grid[0])*i.grid[0],r=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-i.grid[0]:n+i.grid[0]:n)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:a.scrollTop()),left:r-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:a.scrollLeft())}},_rearrange:function(t,e,n,i){n?n[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var r=this.counter;this._delay(function(){r===this.counter&&this.refreshPositions(!i)})},_clear:function(t,e){this.reverting=!1;var n,i=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function r(e,n,i){return function(t){i._trigger(e,t,n._uiHash(n))}}for(this.fromOutside&&!e&&i.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||i.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(i.push(function(t){this._trigger("remove",t,this._uiHash())}),i.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),i.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;0<=n;n--)e||i.push(r("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(i.push(r("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(n=0;n<i.length;n++)i[n].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===$.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||$([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}});function w(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}$.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var i=this._super(),r=this.element;return $.each(["min","max","step"],function(t,e){var n=r.attr(e);null!=n&&n.length&&(i[e]=n)}),i},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((0<e?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(t){var e;function n(){this.element[0]===$.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=e,this._delay(function(){this.previous=e}))}e=this.element[0]===$.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),t.preventDefault(),n.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,n.call(this)}),!1!==this._start(t)&&this._repeat(null,$(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if($(t.currentTarget).hasClass("ui-state-active"))return!1!==this._start(t)&&void this._repeat(null,$(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&0<this.uiSpinner.height()&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(t){var e=this.options,n=$.ui.keyCode;switch(t.keyCode){case n.UP:return this._repeat(null,1,t),!0;case n.DOWN:return this._repeat(null,-1,t),!0;case n.PAGE_UP:return this._repeat(null,e.page,t),!0;case n.PAGE_DOWN:return this._repeat(null,-e.page,t),!0}return!1},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0)},_repeat:function(t,e,n){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,n)},t),this._spin(e*this.options.step,n)},_spin:function(t,e){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",e,{value:n})||(this._value(n),this.counter++)},_increment:function(t){var e=this.options.incremental;return e?$.isFunction(e)?e(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),n=e.indexOf(".");return-1===n?0:e.length-n-1},_adjustValue:function(t){var e,n,i=this.options;return n=t-(e=null!==i.min?i.min:0),t=e+(n=Math.round(n/i.step)*i.step),t=parseFloat(t.toFixed(this._precision())),null!==i.max&&t>i.max?i.max:null!==i.min&&t<i.min?i.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var n,i,r;if("culture"===t||"numberFormat"===t)return n=this._parse(this.element.val()),this.options[t]=e,void this.element.val(this._format(n));"max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(i=this.buttons.first().find(".ui-icon"),this._removeClass(i,null,this.options.icons.up),this._addClass(i,null,e.up),r=this.buttons.last().find(".ui-icon"),this._removeClass(r,null,this.options.icons.down),this._addClass(r,null,e.down)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:w(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var n;""!==t&&null!==(n=this._parse(t))&&(e||(n=this._adjustValue(n)),t=this._format(n)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:w(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:w(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:w(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:w(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){if(!arguments.length)return this._parse(this.element.val());w(this._value).call(this,t)},widget:function(){return this.uiSpinner}}),!1!==$.uiBackCompat&&$.widget("ui.spinner",$.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});var S;$.ui.spinner;$.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(S=/#.*$/,function(t){var e,n;e=t.href.replace(S,""),n=location.href.replace(S,"");try{e=decodeURIComponent(e)}catch(t){}try{n=decodeURIComponent(n)}catch(t){}return 1<t.hash.length&&e===n}),_create:function(){var e=this,t=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,t.collapsible),this._processTabs(),t.active=this._initialActive(),$.isArray(t.disabled)&&(t.disabled=$.unique(t.disabled.concat($.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(t.active):this.active=$(),this._refresh(),this.active.length&&this.load(t.active)},_initialActive:function(){var n=this.options.active,t=this.options.collapsible,i=location.hash.substring(1);return null===n&&(i&&this.tabs.each(function(t,e){if($(e).attr("aria-controls")===i)return n=t,!1}),null===n&&(n=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==n&&-1!==n||(n=!!this.tabs.length&&0)),!1!==n&&-1===(n=this.tabs.index(this.tabs.eq(n)))&&(n=!t&&0),!t&&!1===n&&this.anchors.length&&(n=0),n},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):$()}},_tabKeydown:function(t){var e=$($.ui.safeActiveElement(this.document[0])).closest("li"),n=this.tabs.index(e),i=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:n++;break;case $.ui.keyCode.UP:case $.ui.keyCode.LEFT:i=!1,n--;break;case $.ui.keyCode.END:n=this.anchors.length-1;break;case $.ui.keyCode.HOME:n=0;break;case $.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(n);case $.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(n!==this.options.active&&n);default:return}t.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,i),t.ctrlKey||t.metaKey||(e.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===$.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===$.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===$.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,e){var n=this.tabs.length-1;function i(){return n<t&&(t=0),t<0&&(t=n),t}for(;-1!==$.inArray(i(),this.options.disabled);)t=e?t+1:t-1;return t},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){"active"!==t?(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e)):this._activate(e)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=$.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!$.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=$()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=$()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var l=this,t=this.tabs,e=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){$(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){$(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return $("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=$(),this.anchors.each(function(t,e){var n,i,r,o=$(e).uniqueId().attr("id"),a=$(e).closest("li"),s=a.attr("aria-controls");l._isLocal(e)?(r=(n=e.hash).substring(1),i=l.element.find(l._sanitizeSelector(n))):(n="#"+(r=a.attr("aria-controls")||$({}).uniqueId()[0].id),(i=l.element.find(n)).length||(i=l._createPanel(r)).insertAfter(l.panels[t-1]||l.tablist),i.attr("aria-live","polite")),i.length&&(l.panels=l.panels.add(i)),s&&a.data("ui-tabs-aria-controls",s),a.attr({"aria-controls":r,"aria-labelledby":o}),i.attr("aria-labelledby",o)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),t&&(this._off(t.not(this.tabs)),this._off(e.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return $("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var e,n,i;for($.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),i=0;n=this.tabs[i];i++)e=$(n),!0===t||-1!==$.inArray(i,t)?(e.attr("aria-disabled","true"),this._addClass(e,null,"ui-state-disabled")):(e.removeAttr("aria-disabled"),this._removeClass(e,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var n={};t&&$.each(t.split(" "),function(t,e){n[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var n,e=this.element.parent();"fill"===t?(n=e.height(),n-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=$(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(n-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){n-=$(this).outerHeight(!0)}),this.panels.each(function(){$(this).height(Math.max(0,n-$(this).innerHeight()+$(this).height()))}).css("overflow","auto")):"auto"===t&&(n=0,this.panels.each(function(){n=Math.max(n,$(this).height("").height())}).height(n))},_eventHandler:function(t){var e=this.options,n=this.active,i=$(t.currentTarget).closest("li"),r=i[0]===n[0],o=r&&e.collapsible,a=o?$():this._getPanelForTab(i),s=n.length?this._getPanelForTab(n):$(),l={oldTab:n,oldPanel:s,newTab:o?$():i,newPanel:a};t.preventDefault(),i.hasClass("ui-state-disabled")||i.hasClass("ui-tabs-loading")||this.running||r&&!e.collapsible||!1===this._trigger("beforeActivate",t,l)||(e.active=!o&&this.tabs.index(i),this.active=r?$():i,this.xhr&&this.xhr.abort(),s.length||a.length||$.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(i),t),this._toggle(t,l))},_toggle:function(t,e){var n=this,i=e.newPanel,r=e.oldPanel;function complete(){n.running=!1,n._trigger("activate",t,e)}function o(){n._addClass(e.newTab.closest("li"),"ui-tabs-active","ui-state-active"),i.length&&n.options.show?n._show(i,n.options.show,complete):(i.show(),complete())}this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){n._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),o()}):(this._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),o()),r.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&r.length?e.oldTab.attr("tabIndex",-1):i.length&&this.tabs.filter(function(){return 0===$(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var e,n=this._findActive(t);n[0]!==this.active[0]&&(n.length||(n=this.active),e=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:e,currentTarget:e,preventDefault:$.noop}))},_findActive:function(t){return!1===t?$():this.tabs.eq(t)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+$.ui.escapeSelector(t)+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){$.data(this,"ui-tabs-destroy")?$(this).remove():$(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=$(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(n){var t=this.options.disabled;!1!==t&&(t=void 0!==n&&(n=this._getIndex(n),$.isArray(t)?$.map(t,function(t){return t!==n?t:null}):$.map(this.tabs,function(t,e){return e!==n?e:null})),this._setOptionDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==$.inArray(t,e))return;e=$.isArray(e)?$.merge([t],e).sort():[t]}this._setOptionDisabled(e)}},load:function(t,i){t=this._getIndex(t);var r=this,n=this.tabs.eq(t),e=n.find(".ui-tabs-anchor"),o=this._getPanelForTab(n),a={tab:n,panel:o},complete=function(t,e){"abort"===e&&r.panels.stop(!1,!0),r._removeClass(n,"ui-tabs-loading"),o.removeAttr("aria-busy"),t===r.xhr&&delete r.xhr};this._isLocal(e[0])||(this.xhr=$.ajax(this._ajaxSettings(e,i,a)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),o.attr("aria-busy","true"),this.xhr.done(function(t,e,n){setTimeout(function(){o.html(t),r._trigger("load",i,a),complete(n,e)},1)}).fail(function(t,e){setTimeout(function(){complete(t,e)},1)})))},_ajaxSettings:function(t,n,i){var r=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,e){return r._trigger("beforeLoad",n,$.extend({jqXHR:t,ajaxSettings:e},i))}}},_getPanelForTab:function(t){var e=$(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+e))}}),!1!==$.uiBackCompat&&$.widget("ui.tabs",$.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});$.ui.tabs;$.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=$(this).attr("title")||"";return $("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,e){var n=(t.attr("aria-describedby")||"").split(/\s+/);n.push(e),t.data("ui-tooltip-id",e).attr("aria-describedby",$.trim(n.join(" ")))},_removeDescribedBy:function(t){var e=t.data("ui-tooltip-id"),n=(t.attr("aria-describedby")||"").split(/\s+/),i=$.inArray(e,n);-1!==i&&n.splice(i,1),t.removeData("ui-tooltip-id"),(n=$.trim(n.join(" ")))?t.attr("aria-describedby",n):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=$("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=$([])},_setOption:function(t,e){var n=this;this._super(t,e),"content"===t&&$.each(this.tooltips,function(t,e){n._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var i=this;$.each(this.tooltips,function(t,e){var n=$.Event("blur");n.target=n.currentTarget=e.element[0],i.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=$(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=$(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=$([])},open:function(t){var n=this,e=$(t?t.target:this.element).closest(this.options.items);e.length&&!e.data("ui-tooltip-id")&&(e.attr("title")&&e.data("ui-tooltip-title",e.attr("title")),e.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&e.parents().each(function(){var t,e=$(this);e.data("ui-tooltip-open")&&((t=$.Event("blur")).target=t.currentTarget=this,n.close(t,!0)),e.attr("title")&&(e.uniqueId(),n.parents[this.id]={element:this,title:e.attr("title")},e.attr("title",""))}),this._registerCloseHandlers(t,e),this._updateContent(e,t))},_updateContent:function(e,n){var t,i=this.options.content,r=this,o=n?n.type:null;if("string"==typeof i||i.nodeType||i.jquery)return this._open(n,e,i);(t=i.call(e[0],function(t){r._delay(function(){e.data("ui-tooltip-open")&&(n&&(n.type=o),this._open(n,e,t))})}))&&this._open(n,e,t)},_open:function(t,e,n){var i,r,o,a,s=$.extend({},this.options.position);function l(t){s.of=t,r.is(":hidden")||r.position(s)}n&&((i=this._find(e))?i.tooltip.find(".ui-tooltip-content").html(n):(e.is("[title]")&&(t&&"mouseover"===t.type?e.attr("title",""):e.removeAttr("title")),i=this._tooltip(e),r=i.tooltip,this._addDescribedBy(e,r.attr("id")),r.find(".ui-tooltip-content").html(n),this.liveRegion.children().hide(),(a=$("<div>").html(r.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),a.removeAttr("id").find("[id]").removeAttr("id"),a.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:l}),l(t)):r.position($.extend({of:e},this.options.position)),r.hide(),this._show(r,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(o=this.delayedShow=setInterval(function(){r.is(":visible")&&(l(s.of),clearInterval(o))},$.fx.interval)),this._trigger("open",t,{tooltip:r})))},_registerCloseHandlers:function(t,n){var e={keyup:function(t){if(t.keyCode===$.ui.keyCode.ESCAPE){var e=$.Event(t);e.currentTarget=n[0],this.close(e,!0)}}};n[0]!==this.element[0]&&(e.remove=function(){this._removeTooltip(this._find(n).tooltip)}),t&&"mouseover"!==t.type||(e.mouseleave="close"),t&&"focusin"!==t.type||(e.focusout="close"),this._on(!0,n,e)},close:function(t){var e,n=this,i=$(t?t.currentTarget:this.element),r=this._find(i);r?(e=r.tooltip,r.closing||(clearInterval(this.delayedShow),i.data("ui-tooltip-title")&&!i.attr("title")&&i.attr("title",i.data("ui-tooltip-title")),this._removeDescribedBy(i),r.hiding=!0,e.stop(!0),this._hide(e,this.options.hide,function(){n._removeTooltip($(this))}),i.removeData("ui-tooltip-open"),this._off(i,"mouseleave focusout keyup"),i[0]!==this.element[0]&&this._off(i,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&$.each(this.parents,function(t,e){$(e.element).attr("title",e.title),delete n.parents[t]}),r.closing=!0,this._trigger("close",t,{tooltip:e}),r.hiding||(r.closing=!1))):i.removeData("ui-tooltip-open")},_tooltip:function(t){var e=$("<div>").attr("role","tooltip"),n=$("<div>").appendTo(e),i=e.uniqueId().attr("id");return this._addClass(n,"ui-tooltip-content"),this._addClass(e,"ui-tooltip","ui-widget ui-widget-content"),e.appendTo(this._appendTo(t)),this.tooltips[i]={element:t,tooltip:e}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var r=this;$.each(this.tooltips,function(t,e){var n=$.Event("blur"),i=e.element;n.target=n.currentTarget=i[0],r.close(n,!0),$("#"+t).remove(),i.data("ui-tooltip-title")&&(i.attr("title")||i.attr("title",i.data("ui-tooltip-title")),i.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==$.uiBackCompat&&$.widget("ui.tooltip",$.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}});$.ui.tooltip}),
/**
 * angular-ui-sortable - This directive allows you to jQueryUI Sortable.
 * @version v0.13.4 - 2015-06-07
 * @link http://angular-ui.github.com
 * @license MIT
 */
function(t,y,b){"use strict";y.module("ui.sortable",[]).value("uiSortableConfig",{}).directive("uiSortable",["uiSortableConfig","$timeout","$log",function(e,n,v){return{require:"?ngModel",scope:{ngModel:"=",uiSortable:"="},link:function(a,s,t,r){var l;function i(t,e){return e&&"function"==typeof e?function(){t.apply(this,arguments),e.apply(this,arguments)}:t}function o(t){var e=t.data("ui-sortable");return e&&"object"==typeof e&&"ui-sortable"===e.widgetFullName?e:null}function c(t,e){var n=t.sortable("option","helper");return"clone"===n||"function"==typeof n&&e.item.sortable.isCustomHelperUsed()}function u(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}function h(t,e){for(var n=null,i=0;i<t.length;i++){var r=t[i];if(r.element[0]===e[0]){n=r.scope;break}}return n}function d(t,e){e.item.sortable._destroy()}var f={},p={"ui-floating":b},g={receive:null,remove:null,start:null,stop:null,update:null},m={helper:null};y.extend(f,p,e,a.uiSortable),y.element.fn&&y.element.fn.jquery?(r?(a.$watch("ngModel.length",function(){n(function(){o(s)&&s.sortable("refresh")},0,!1)}),g.start=function(t,n){if("auto"===f["ui-floating"]){var e=n.item.siblings();o(y.element(t.target)).floating=u(e)}n.item.sortable={model:r.$modelValue[n.item.index()],index:n.item.index(),source:n.item.parent(),sourceModel:r.$modelValue,cancel:function(){n.item.sortable._isCanceled=!0},isCanceled:function(){return n.item.sortable._isCanceled},isCustomHelperUsed:function(){return!!n.item.sortable._isCustomHelperUsed},_isCanceled:!1,_isCustomHelperUsed:n.item.sortable._isCustomHelperUsed,_destroy:function(){y.forEach(n.item.sortable,function(t,e){n.item.sortable[e]=b})}}},g.activate=function(t,e){l=s.contents();var n=s.sortable("option","placeholder");if(n&&n.element&&"function"==typeof n.element){var i=n.element();i=y.element(i);var r=s.find('[class="'+i.attr("class")+'"]:not([ng-repeat], [data-ng-repeat])');l=l.not(r)}var o=e.item.sortable._connectedSortables||[];o.push({element:s,scope:a}),e.item.sortable._connectedSortables=o},g.update=function(t,e){if(!e.item.sortable.received){e.item.sortable.dropindex=e.item.index();var n=e.item.parent();e.item.sortable.droptarget=n;var i=h(e.item.sortable._connectedSortables,n);e.item.sortable.droptargetModel=i.ngModel,s.sortable("cancel")}c(s,e)&&!e.item.sortable.received&&"parent"===s.sortable("option","appendTo")&&(l=l.not(l.last())),l.appendTo(s),e.item.sortable.received&&(l=null),e.item.sortable.received&&!e.item.sortable.isCanceled()&&a.$apply(function(){r.$modelValue.splice(e.item.sortable.dropindex,0,e.item.sortable.moved)})},g.stop=function(t,e){!e.item.sortable.received&&"dropindex"in e.item.sortable&&!e.item.sortable.isCanceled()?a.$apply(function(){r.$modelValue.splice(e.item.sortable.dropindex,0,r.$modelValue.splice(e.item.sortable.index,1)[0])}):"dropindex"in e.item.sortable&&!e.item.sortable.isCanceled()||c(s,e)||l.appendTo(s),l=null},g.receive=function(t,e){e.item.sortable.received=!0},g.remove=function(t,e){"dropindex"in e.item.sortable||(s.sortable("cancel"),e.item.sortable.cancel()),e.item.sortable.isCanceled()||a.$apply(function(){e.item.sortable.moved=r.$modelValue.splice(e.item.sortable.index,1)[0]})},m.helper=function(i){return i&&"function"==typeof i?function(t,e){var n=i.apply(this,arguments);return e.sortable._isCustomHelperUsed=e!==n,n}:i},a.$watch("uiSortable",function(t){var n=o(s);n&&y.forEach(t,function(t,e){if(e in p)return"ui-floating"!==e||!1!==t&&!0!==t||(n.floating=t),void(f[e]=t);g[e]?("stop"===e&&(t=i(t=i(t,function(){a.$apply()}),d)),t=i(g[e],t)):m[e]&&(t=m[e](t)),f[e]=t,s.sortable("option",e,t)})},!0),y.forEach(g,function(t,e){f[e]=i(t,f[e]),"stop"===e&&(f[e]=i(f[e],d))})):v.info("ui.sortable: ngModel not provided!",s),s.sortable(f)):v.error("ui.sortable: jQuery should be included before AngularJS!")}}}])}(window,window.angular),function(){var t=this,e=t._,i=Array.prototype,n=Object.prototype,r=Function.prototype,s=i.push,c=i.slice,u=i.concat,d=n.toString,o=n.hasOwnProperty,a=Array.isArray,l=Object.keys,h=r.bind,f=function(t){return t instanceof f?t:this instanceof f?void(this._wrapped=t):new f(t)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=f),exports._=f):t._=f,f.VERSION="1.7.0";var p=function(r,o,t){if(void 0===o)return r;switch(null==t?3:t){case 1:return function(t){return r.call(o,t)};case 2:return function(t,e){return r.call(o,t,e)};case 3:return function(t,e,n){return r.call(o,t,e,n)};case 4:return function(t,e,n,i){return r.call(o,t,e,n,i)}}return function(){return r.apply(o,arguments)}};f.iteratee=function(t,e,n){return null==t?f.identity:f.isFunction(t)?p(t,e,n):f.isObject(t)?f.matches(t):f.property(t)},f.each=f.forEach=function(t,e,n){if(null==t)return t;e=p(e,n);var i,r=t.length;if(r===+r)for(i=0;i<r;i++)e(t[i],i,t);else{var o=f.keys(t);for(i=0,r=o.length;i<r;i++)e(t[o[i]],o[i],t)}return t},f.map=f.collect=function(t,e,n){if(null==t)return[];e=f.iteratee(e,n);for(var i,r=t.length!==+t.length&&f.keys(t),o=(r||t).length,a=Array(o),s=0;s<o;s++)i=r?r[s]:s,a[s]=e(t[i],i,t);return a};var g="Reduce of empty array with no initial value";f.reduce=f.foldl=f.inject=function(t,e,n,i){null==t&&(t=[]),e=p(e,i,4);var r,o=t.length!==+t.length&&f.keys(t),a=(o||t).length,s=0;if(arguments.length<3){if(!a)throw new TypeError(g);n=t[o?o[s++]:s++]}for(;s<a;s++)n=e(n,t[r=o?o[s]:s],r,t);return n},f.reduceRight=f.foldr=function(t,e,n,i){null==t&&(t=[]),e=p(e,i,4);var r,o=t.length!==+t.length&&f.keys(t),a=(o||t).length;if(arguments.length<3){if(!a)throw new TypeError(g);n=t[o?o[--a]:--a]}for(;a--;)n=e(n,t[r=o?o[a]:a],r,t);return n},f.find=f.detect=function(t,i,e){var r;return i=f.iteratee(i,e),f.some(t,function(t,e,n){if(i(t,e,n))return r=t,!0}),r},f.filter=f.select=function(t,i,e){var r=[];return null==t||(i=f.iteratee(i,e),f.each(t,function(t,e,n){i(t,e,n)&&r.push(t)})),r},f.reject=function(t,e,n){return f.filter(t,f.negate(f.iteratee(e)),n)},f.every=f.all=function(t,e,n){if(null==t)return!0;e=f.iteratee(e,n);var i,r,o=t.length!==+t.length&&f.keys(t),a=(o||t).length;for(i=0;i<a;i++)if(!e(t[r=o?o[i]:i],r,t))return!1;return!0},f.some=f.any=function(t,e,n){if(null==t)return!1;e=f.iteratee(e,n);var i,r,o=t.length!==+t.length&&f.keys(t),a=(o||t).length;for(i=0;i<a;i++)if(e(t[r=o?o[i]:i],r,t))return!0;return!1},f.contains=f.include=function(t,e){return null!=t&&(t.length!==+t.length&&(t=f.values(t)),0<=f.indexOf(t,e))},f.invoke=function(t,e){var n=c.call(arguments,2),i=f.isFunction(e);return f.map(t,function(t){return(i?e:t[e]).apply(t,n)})},f.pluck=function(t,e){return f.map(t,f.property(e))},f.where=function(t,e){return f.filter(t,f.matches(e))},f.findWhere=function(t,e){return f.find(t,f.matches(e))},f.max=function(t,i,e){var n,r,o=-1/0,a=-1/0;if(null==i&&null!=t)for(var s=0,l=(t=t.length===+t.length?t:f.values(t)).length;s<l;s++)n=t[s],o<n&&(o=n);else i=f.iteratee(i,e),f.each(t,function(t,e,n){r=i(t,e,n),(a<r||r===-1/0&&o===-1/0)&&(o=t,a=r)});return o},f.min=function(t,i,e){var n,r,o=1/0,a=1/0;if(null==i&&null!=t)for(var s=0,l=(t=t.length===+t.length?t:f.values(t)).length;s<l;s++)(n=t[s])<o&&(o=n);else i=f.iteratee(i,e),f.each(t,function(t,e,n){((r=i(t,e,n))<a||r===1/0&&o===1/0)&&(o=t,a=r)});return o},f.shuffle=function(t){for(var e,n=t&&t.length===+t.length?t:f.values(t),i=n.length,r=Array(i),o=0;o<i;o++)(e=f.random(0,o))!==o&&(r[o]=r[e]),r[e]=n[o];return r},f.sample=function(t,e,n){return null==e||n?(t.length!==+t.length&&(t=f.values(t)),t[f.random(t.length-1)]):f.shuffle(t).slice(0,Math.max(0,e))},f.sortBy=function(t,i,e){return i=f.iteratee(i,e),f.pluck(f.map(t,function(t,e,n){return{value:t,index:e,criteria:i(t,e,n)}}).sort(function(t,e){var n=t.criteria,i=e.criteria;if(n!==i){if(i<n||void 0===n)return 1;if(n<i||void 0===i)return-1}return t.index-e.index}),"value")};var m=function(a){return function(i,r,t){var o={};return r=f.iteratee(r,t),f.each(i,function(t,e){var n=r(t,e,i);a(o,t,n)}),o}};f.groupBy=m(function(t,e,n){f.has(t,n)?t[n].push(e):t[n]=[e]}),f.indexBy=m(function(t,e,n){t[n]=e}),f.countBy=m(function(t,e,n){f.has(t,n)?t[n]++:t[n]=1}),f.sortedIndex=function(t,e,n,i){for(var r=(n=f.iteratee(n,i,1))(e),o=0,a=t.length;o<a;){var s=o+a>>>1;n(t[s])<r?o=s+1:a=s}return o},f.toArray=function(t){return t?f.isArray(t)?c.call(t):t.length===+t.length?f.map(t,f.identity):f.values(t):[]},f.size=function(t){return null==t?0:t.length===+t.length?t.length:f.keys(t).length},f.partition=function(t,i,e){i=f.iteratee(i,e);var r=[],o=[];return f.each(t,function(t,e,n){(i(t,e,n)?r:o).push(t)}),[r,o]},f.first=f.head=f.take=function(t,e,n){if(null!=t)return null==e||n?t[0]:e<0?[]:c.call(t,0,e)},f.initial=function(t,e,n){return c.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},f.last=function(t,e,n){if(null!=t)return null==e||n?t[t.length-1]:c.call(t,Math.max(t.length-e,0))},f.rest=f.tail=f.drop=function(t,e,n){return c.call(t,null==e||n?1:e)},f.compact=function(t){return f.filter(t,f.identity)};var v=function(t,e,n,i){if(e&&f.every(t,f.isArray))return u.apply(i,t);for(var r=0,o=t.length;r<o;r++){var a=t[r];f.isArray(a)||f.isArguments(a)?e?s.apply(i,a):v(a,e,n,i):n||i.push(a)}return i};f.flatten=function(t,e){return v(t,e,!1,[])},f.without=function(t){return f.difference(t,c.call(arguments,1))},f.uniq=f.unique=function(t,e,n,i){if(null==t)return[];f.isBoolean(e)||(i=n,n=e,e=!1),null!=n&&(n=f.iteratee(n,i));for(var r=[],o=[],a=0,s=t.length;a<s;a++){var l=t[a];if(e)a&&o===l||r.push(l),o=l;else if(n){var c=n(l,a,t);f.indexOf(o,c)<0&&(o.push(c),r.push(l))}else f.indexOf(r,l)<0&&r.push(l)}return r},f.union=function(){return f.uniq(v(arguments,!0,!0,[]))},f.intersection=function(t){if(null==t)return[];for(var e=[],n=arguments.length,i=0,r=t.length;i<r;i++){var o=t[i];if(!f.contains(e,o)){for(var a=1;a<n&&f.contains(arguments[a],o);a++);a===n&&e.push(o)}}return e},f.difference=function(t){var e=v(c.call(arguments,1),!0,!0,[]);return f.filter(t,function(t){return!f.contains(e,t)})},f.zip=function(t){if(null==t)return[];for(var e=f.max(arguments,"length").length,n=Array(e),i=0;i<e;i++)n[i]=f.pluck(arguments,i);return n},f.object=function(t,e){if(null==t)return{};for(var n={},i=0,r=t.length;i<r;i++)e?n[t[i]]=e[i]:n[t[i][0]]=t[i][1];return n},f.indexOf=function(t,e,n){if(null==t)return-1;var i=0,r=t.length;if(n){if("number"!=typeof n)return t[i=f.sortedIndex(t,e)]===e?i:-1;i=n<0?Math.max(0,r+n):n}for(;i<r;i++)if(t[i]===e)return i;return-1},f.lastIndexOf=function(t,e,n){if(null==t)return-1;var i=t.length;for("number"==typeof n&&(i=n<0?i+n+1:Math.min(i,n+1));0<=--i;)if(t[i]===e)return i;return-1},f.range=function(t,e,n){arguments.length<=1&&(e=t||0,t=0),n=n||1;for(var i=Math.max(Math.ceil((e-t)/n),0),r=Array(i),o=0;o<i;o++,t+=n)r[o]=t;return r};var y=function(){};f.bind=function(n,i){var r,o;if(h&&n.bind===h)return h.apply(n,c.call(arguments,1));if(!f.isFunction(n))throw new TypeError("Bind must be called on a function");return r=c.call(arguments,2),o=function(){if(!(this instanceof o))return n.apply(i,r.concat(c.call(arguments)));y.prototype=n.prototype;var t=new y;y.prototype=null;var e=n.apply(t,r.concat(c.call(arguments)));return f.isObject(e)?e:t}},f.partial=function(r){var o=c.call(arguments,1);return function(){for(var t=0,e=o.slice(),n=0,i=e.length;n<i;n++)e[n]===f&&(e[n]=arguments[t++]);for(;t<arguments.length;)e.push(arguments[t++]);return r.apply(this,e)}},f.bindAll=function(t){var e,n,i=arguments.length;if(i<=1)throw new Error("bindAll must be passed function names");for(e=1;e<i;e++)t[n=arguments[e]]=f.bind(t[n],t);return t},f.memoize=function(i,r){var o=function(t){var e=o.cache,n=r?r.apply(this,arguments):t;return f.has(e,n)||(e[n]=i.apply(this,arguments)),e[n]};return o.cache={},o},f.delay=function(t,e){var n=c.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},f.defer=function(t){return f.delay.apply(f,[t,1].concat(c.call(arguments,1)))},f.throttle=function(n,i,r){var o,a,s,l=null,c=0;r||(r={});var u=function(){c=!1===r.leading?0:f.now(),l=null,s=n.apply(o,a),l||(o=a=null)};return function(){var t=f.now();c||!1!==r.leading||(c=t);var e=i-(t-c);return o=this,a=arguments,e<=0||i<e?(clearTimeout(l),l=null,c=t,s=n.apply(o,a),l||(o=a=null)):l||!1===r.trailing||(l=setTimeout(u,e)),s}},f.debounce=function(e,n,i){var r,o,a,s,l,c=function(){var t=f.now()-s;t<n&&0<t?r=setTimeout(c,n-t):(r=null,i||(l=e.apply(a,o),r||(a=o=null)))};return function(){a=this,o=arguments,s=f.now();var t=i&&!r;return r||(r=setTimeout(c,n)),t&&(l=e.apply(a,o),a=o=null),l}},f.wrap=function(t,e){return f.partial(e,t)},f.negate=function(t){return function(){return!t.apply(this,arguments)}},f.compose=function(){var n=arguments,i=n.length-1;return function(){for(var t=i,e=n[i].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},f.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},f.before=function(t,e){var n;return function(){return 0<--t?n=e.apply(this,arguments):e=null,n}},f.once=f.partial(f.before,2),f.keys=function(t){if(!f.isObject(t))return[];if(l)return l(t);var e=[];for(var n in t)f.has(t,n)&&e.push(n);return e},f.values=function(t){for(var e=f.keys(t),n=e.length,i=Array(n),r=0;r<n;r++)i[r]=t[e[r]];return i},f.pairs=function(t){for(var e=f.keys(t),n=e.length,i=Array(n),r=0;r<n;r++)i[r]=[e[r],t[e[r]]];return i},f.invert=function(t){for(var e={},n=f.keys(t),i=0,r=n.length;i<r;i++)e[t[n[i]]]=n[i];return e},f.functions=f.methods=function(t){var e=[];for(var n in t)f.isFunction(t[n])&&e.push(n);return e.sort()},f.extend=function(t){if(!f.isObject(t))return t;for(var e,n,i=1,r=arguments.length;i<r;i++)for(n in e=arguments[i])o.call(e,n)&&(t[n]=e[n]);return t},f.pick=function(t,e,n){var i,r={};if(null==t)return r;if(f.isFunction(e))for(i in e=p(e,n),t){var o=t[i];e(o,i,t)&&(r[i]=o)}else{var a=u.apply([],c.call(arguments,1));t=new Object(t);for(var s=0,l=a.length;s<l;s++)(i=a[s])in t&&(r[i]=t[i])}return r},f.omit=function(t,e,n){if(f.isFunction(e))e=f.negate(e);else{var i=f.map(u.apply([],c.call(arguments,1)),String);e=function(t,e){return!f.contains(i,e)}}return f.pick(t,e,n)},f.defaults=function(t){if(!f.isObject(t))return t;for(var e=1,n=arguments.length;e<n;e++){var i=arguments[e];for(var r in i)void 0===t[r]&&(t[r]=i[r])}return t},f.clone=function(t){return f.isObject(t)?f.isArray(t)?t.slice():f.extend({},t):t},f.tap=function(t,e){return e(t),t};var b=function(t,e,n,i){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return t===e;t instanceof f&&(t=t._wrapped),e instanceof f&&(e=e._wrapped);var r=d.call(t);if(r!==d.call(e))return!1;switch(r){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e}if("object"!=typeof t||"object"!=typeof e)return!1;for(var o=n.length;o--;)if(n[o]===t)return i[o]===e;var a,s,l=t.constructor,c=e.constructor;if(l!==c&&"constructor"in t&&"constructor"in e&&!(f.isFunction(l)&&l instanceof l&&f.isFunction(c)&&c instanceof c))return!1;if(n.push(t),i.push(e),"[object Array]"===r){if(s=(a=t.length)===e.length)for(;a--&&(s=b(t[a],e[a],n,i)););}else{var u,h=f.keys(t);if(a=h.length,s=f.keys(e).length===a)for(;a--&&(u=h[a],s=f.has(e,u)&&b(t[u],e[u],n,i)););}return n.pop(),i.pop(),s};f.isEqual=function(t,e){return b(t,e,[],[])},f.isEmpty=function(t){if(null==t)return!0;if(f.isArray(t)||f.isString(t)||f.isArguments(t))return 0===t.length;for(var e in t)if(f.has(t,e))return!1;return!0},f.isElement=function(t){return!(!t||1!==t.nodeType)},f.isArray=a||function(t){return"[object Array]"===d.call(t)},f.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},f.each(["Arguments","Function","String","Number","Date","RegExp"],function(e){f["is"+e]=function(t){return d.call(t)==="[object "+e+"]"}}),f.isArguments(arguments)||(f.isArguments=function(t){return f.has(t,"callee")}),"function"!=typeof/./&&(f.isFunction=function(t){return"function"==typeof t||!1}),f.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},f.isNaN=function(t){return f.isNumber(t)&&t!==+t},f.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===d.call(t)},f.isNull=function(t){return null===t},f.isUndefined=function(t){return void 0===t},f.has=function(t,e){return null!=t&&o.call(t,e)},f.noConflict=function(){return t._=e,this},f.identity=function(t){return t},f.constant=function(t){return function(){return t}},f.noop=function(){},f.property=function(e){return function(t){return t[e]}},f.matches=function(t){var r=f.pairs(t),o=r.length;return function(t){if(null==t)return!o;t=new Object(t);for(var e=0;e<o;e++){var n=r[e],i=n[0];if(n[1]!==t[i]||!(i in t))return!1}return!0}},f.times=function(t,e,n){var i=Array(Math.max(0,t));e=p(e,n,1);for(var r=0;r<t;r++)i[r]=e(r);return i},f.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},f.now=Date.now||function(){return(new Date).getTime()};var x={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},_=f.invert(x),w=function(e){var n=function(t){return e[t]},t="(?:"+f.keys(e).join("|")+")",i=RegExp(t),r=RegExp(t,"g");return function(t){return t=null==t?"":""+t,i.test(t)?t.replace(r,n):t}};f.escape=w(x),f.unescape=w(_),f.result=function(t,e){if(null!=t){var n=t[e];return f.isFunction(n)?t[e]():n}};var S=0;f.uniqueId=function(t){var e=++S+"";return t?t+e:e},f.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var C=/(.)^/,T={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},$=/\\|'|\r|\n|\u2028|\u2029/g,k=function(t){return"\\"+T[t]};f.template=function(o,t,e){!t&&e&&(t=e),t=f.defaults({},t,f.templateSettings);var n=RegExp([(t.escape||C).source,(t.interpolate||C).source,(t.evaluate||C).source].join("|")+"|$","g"),a=0,s="__p+='";o.replace(n,function(t,e,n,i,r){return s+=o.slice(a,r).replace($,k),a=r+t.length,e?s+="'+\n((__t=("+e+"))==null?'':_.escape(__t))+\n'":n?s+="'+\n((__t=("+n+"))==null?'':__t)+\n'":i&&(s+="';\n"+i+"\n__p+='"),t}),s+="';\n",t.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{var i=new Function(t.variable||"obj","_",s)}catch(t){throw t.source=s,t}var r=function(t){return i.call(this,t,f)},l=t.variable||"obj";return r.source="function("+l+"){\n"+s+"}",r},f.chain=function(t){var e=f(t);return e._chain=!0,e};var A=function(t){return this._chain?f(t).chain():t};f.mixin=function(n){f.each(f.functions(n),function(t){var e=f[t]=n[t];f.prototype[t]=function(){var t=[this._wrapped];return s.apply(t,arguments),A.call(this,e.apply(f,t))}})},f.mixin(f),f.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var n=i[e];f.prototype[e]=function(){var t=this._wrapped;return n.apply(t,arguments),"shift"!==e&&"splice"!==e||0!==t.length||delete t[0],A.call(this,t)}}),f.each(["concat","join","slice"],function(t){var e=i[t];f.prototype[t]=function(){return A.call(this,e.apply(this._wrapped,arguments))}}),f.prototype.value=function(){return this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return f})}.call(this),
/**
 * @license AngularJS v1.4.14
 * (c) 2010-2015 Google, Inc. http://angularjs.org
 * License: MIT
 */
function(t,d,e){"use strict";var u=d.$$minErr("$sanitize");function n(){this.$get=["$$sanitizeUri",function(n){return function(t){var e=[];return D(t,I(e,function(t,e){return!/^unsafe/.test(n(t,e))})),e.join("")}}]}function f(t){var e=[];return I(e,d.noop).chars(t),e.join("")}var h=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,p=/^<\/\s*([\w:-]+)[^>]*>/,g=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,m=/^</,v=/^<\//,y=/<!--(.*?)-->/g,b=/<!DOCTYPE([^>]*?)>/i,x=/<!\[CDATA\[(.*?)]]>/g,i=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r=/([^\#-~| |!])/g,_=O("area,br,col,hr,img,wbr"),o=O("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),a=O("rp,rt"),w=d.extend({},a,o),S=d.extend({},o,O("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),C=d.extend({},a,O("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")),s=O("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,use"),T=O("script,style"),l=d.extend({},_,S,C,w,s),c=O("background,cite,href,longdesc,src,usemap,xlink:href"),$=O("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"),k=O("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),A=d.extend({},c,k,$);function O(t,e){var n,i={},r=t.split(",");for(n=0;n<r.length;n++)i[e?d.lowercase(r[n]):r[n]]=!0;return i}function D(t,r){"string"!=typeof t&&(t=null==t?"":""+t);var e,n,i,o,s=[],a=t;for(s.last=function(){return s[s.length-1]};t;){if(n=!(o=""),s.last()&&T[s.last()]?(t=t.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+s.last()+"[^>]*>","i"),function(t,e){return e=e.replace(y,"$1").replace(x,"$1"),r.chars&&r.chars(M(e)),""}),c("",s.last())):(0===t.indexOf("\x3c!--")?0<=(e=t.indexOf("--",4))&&t.lastIndexOf("--\x3e",e)===e&&(r.comment&&r.comment(t.substring(4,e)),t=t.substring(e+3),n=!1):b.test(t)?(i=t.match(b))&&(t=t.replace(i[0],""),n=!1):v.test(t)?(i=t.match(p))&&(t=t.substring(i[0].length),i[0].replace(p,c),n=!1):m.test(t)&&((i=t.match(h))?(i[4]&&(t=t.substring(i[0].length),i[0].replace(h,l)),n=!1):(o+="<",t=t.substring(1))),n&&(o+=(e=t.indexOf("<"))<0?t:t.substring(0,e),t=e<0?"":t.substring(e),r.chars&&r.chars(M(o)))),t==a)throw u("badparse","The sanitizer was unable to parse the following block of html: {0}",t);a=t}function l(t,e,n,i){if(e=d.lowercase(e),S[e])for(;s.last()&&C[s.last()];)c("",s.last());w[e]&&s.last()==e&&c("",e),(i=_[e]||!!i)||s.push(e);var a={};n.replace(g,function(t,e,n,i,r){var o=n||i||r||"";a[e]=M(o)}),r.start&&r.start(e,a,i)}function c(t,e){var n,i=0;if(e=d.lowercase(e))for(i=s.length-1;0<=i&&s[i]!=e;i--);if(0<=i){for(n=s.length-1;i<=n;n--)r.end&&r.end(s[n]);s.length=i}}c()}var P=document.createElement("pre");function M(t){return t?(P.innerHTML=t.replace(/</g,"&lt;"),P.textContent):""}function E(t){return t.replace(/&/g,"&amp;").replace(i,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(r,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function I(t,o){var n=!1,a=d.bind(t,t.push);return{start:function(r,t,e){r=d.lowercase(r),!n&&T[r]&&(n=r),n||!0!==l[r]||(a("<"),a(r),d.forEach(t,function(t,e){var n=d.lowercase(e),i="img"===r&&"src"===n||"background"===n;!0!==A[n]||!0===c[n]&&!o(t,i)||(a(" "),a(e),a('="'),a(E(t)),a('"'))}),a(e?"/>":">"))},end:function(t){t=d.lowercase(t),n||!0!==l[t]||(a("</"),a(t),a(">")),t==n&&(n=!1)},chars:function(t){n||a(E(t))}}}d.module("ngSanitize",[]).provider("$sanitize",n),d.module("ngSanitize").filter("linky",["$sanitize",function(c){var u=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,h=/^mailto:/i;return function(t,n){if(!t)return t;for(var e,i,r,o=t,a=[];e=o.match(u);)i=e[0],e[2]||e[4]||(i=(e[3]?"http://":"mailto:")+i),r=e.index,s(o.substr(0,r)),l(i,e[0].replace(h,"")),o=o.substring(r+e[0].length);return s(o),c(a.join(""));function s(t){t&&a.push(f(t))}function l(t,e){a.push("<a "),d.isDefined(n)&&a.push('target="',n,'" '),a.push('href="',t.replace(/"/g,"&quot;"),'">'),s(e),a.push("</a>")}}}])}(window,window.angular),
/**
 * @license AngularJS v1.2.16
 * (c) 2010-2014 Google, Inc. http://angularjs.org
 * License: MIT
 */
function(t,k,A){"use strict";var O=k.$$minErr("$resource"),e=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;function a(t){return null!=t&&""!==t&&"hasOwnProperty"!==t&&e.test("."+t)}function s(t,e){if(!a(e))throw O("badmember",'Dotted member path "@{0}" is invalid.',e);for(var n=e.split("."),i=0,r=n.length;i<r&&t!==A;i++){var o=n[i];t=null!==t?t[o]:A}return t}function D(t,n){for(var e in n=n||{},k.forEach(n,function(t,e){delete n[e]}),t)!t.hasOwnProperty(e)||"$"===e.charAt(0)&&"$"===e.charAt(1)||(n[e]=t[e]);return n}k.module("ngResource",["ng"]).factory("$resource",["$http","$q",function(x,_){var t={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},delete:{method:"DELETE"}},w=k.noop,S=k.forEach,C=k.extend,T=k.copy,$=k.isFunction;function l(t){return e(t,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function e(t,e){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,e?"%20":"+")}function i(t,e){this.template=t,this.defaults=e||{},this.urlParams={}}function o(e,r,n){var m=new i(e);function v(n,t){var i={};return t=C({},r,t),S(t,function(t,e){$(t)&&(t=t()),i[e]=t&&t.charAt&&"@"==t.charAt(0)?s(n,t.substr(1)):t}),i}function y(t){return t.resource}function b(t){D(t||{},this)}return n=C({},t,n),S(n,function(p,r){var g=/^(POST|PUT|PATCH)$/i.test(p.method);b[r]=function(t,e,n,i){var r,o,a,s={};switch(arguments.length){case 4:a=i,o=n;case 3:case 2:if(!$(e)){s=t,r=e,o=n;break}if($(t)){o=t,a=e;break}o=e,a=n;case 1:$(t)?o=t:g?r=t:s=t;break;case 0:break;default:throw O("badargs","Expected up to 4 arguments [params, data, success, error], got {0} arguments",arguments.length)}var l=this instanceof b,c=l?r:p.isArray?[]:new b(r),u={},h=p.interceptor&&p.interceptor.response||y,d=p.interceptor&&p.interceptor.responseError||A;S(p,function(t,e){"params"!=e&&"isArray"!=e&&"interceptor"!=e&&(u[e]=T(t))}),g&&(u.data=r),m.setUrlParams(u,C({},v(r,p.params||{}),s),p.url);var f=x(u).then(function(t){var e=t.data,n=c.$promise;if(e){if(k.isArray(e)!==!!p.isArray)throw O("badcfg","Error in resource configuration. Expected response to contain an {0} but got an {1}",p.isArray?"array":"object",k.isArray(e)?"array":"object");p.isArray?(c.length=0,S(e,function(t){c.push(new b(t))})):(D(e,c),c.$promise=n)}return c.$resolved=!0,t.resource=c,t},function(t){return c.$resolved=!0,(a||w)(t),_.reject(t)});return f=f.then(function(t){var e=h(t);return(o||w)(e,t.headers),e},d),l?f:(c.$promise=f,c.$resolved=!1,c)},b.prototype["$"+r]=function(t,e,n){$(t)&&(n=e,e=t,t={});var i=b[r].call(this,t,this,e,n);return i.$promise||i}}),b.bind=function(t){return o(e,C({},r,t),n)},b}return i.prototype={setUrlParams:function(n,i,t){var r,o,a=this,s=t||a.template,e=a.urlParams={};S(s.split(/\W/),function(t){if("hasOwnProperty"===t)throw O("badname","hasOwnProperty is not a valid parameter name.");!new RegExp("^\\d+$").test(t)&&t&&new RegExp("(^|[^\\\\]):"+t+"(\\W|$)").test(s)&&(e[t]=!0)}),s=s.replace(/\\:/g,":"),i=i||{},S(a.urlParams,function(t,e){r=i.hasOwnProperty(e)?i[e]:a.defaults[e],s=k.isDefined(r)&&null!==r?(o=l(r),s.replace(new RegExp(":"+e+"(\\W|$)","g"),function(t,e){return o+e})):s.replace(new RegExp("(/?):"+e+"(\\W|$)","g"),function(t,e,n){return"/"==n.charAt(0)?n:e+n})}),s=(s=s.replace(/\/+$/,"")||"/").replace(/\/\.(?=\w+($|\?))/,"."),n.url=s.replace(/\/\\\./,"/."),S(i,function(t,e){a.urlParams[e]||(n.params=n.params||{},n.params[e]=t)})}},o}])}(window,window.angular),function(){"use strict";angular.module("LocalStorageModule",[]).provider("localStorageService",function(){this.prefix="ls",this.storageType="localStorage",this.cookie={expiry:30,path:"/"},this.notify={setItem:!0,removeItem:!1},this.setPrefix=function(t){this.prefix=t},this.setStorageType=function(t){this.storageType=t},this.setStorageCookie=function(t,e){this.cookie={expiry:t,path:e}},this.setStorageCookieDomain=function(t){this.cookie.domain=t},this.setNotify=function(t,e){this.notify={setItem:t,removeItem:e}},this.$get=["$rootScope","$window","$document",function(a,n,s){var o,i=this,l=i.prefix,c=i.cookie,t=i.notify,r=i.storageType;s?s[0]&&(s=s[0]):s=document,"."!==l.substr(-1)&&(l=l?l+".":"");var u=function(t){return l+t},h=function(){try{var t=r in n&&null!==n[r],e=u("__"+Math.round(1e7*Math.random()));return t&&((o=n[r]).setItem(e,""),o.removeItem(e)),t}catch(t){return r="cookie",a.$broadcast("LocalStorageModule.notification.error",t.message),!1}}(),d=function(e,n){if(!h||"cookie"===i.storageType)return a.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),t.setItem&&a.$broadcast("LocalStorageModule.notification.setitem",{key:e,newvalue:n,storageType:"cookie"}),m(e,n);void 0===n&&(n=null);try{(angular.isObject(n)||angular.isArray(n))&&(n=angular.toJson(n)),o&&o.setItem(u(e),n),t.setItem&&a.$broadcast("LocalStorageModule.notification.setitem",{key:e,newvalue:n,storageType:i.storageType})}catch(t){return a.$broadcast("LocalStorageModule.notification.error",t.message),m(e,n)}return!0},f=function(t){if(!h||"cookie"===i.storageType)return a.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),v(t);var e=o?o.getItem(u(t)):null;return e&&"null"!==e?"{"===e.charAt(0)||"["===e.charAt(0)?angular.fromJson(e):e:null},p=function(e){if(!h)return a.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),t.removeItem&&a.$broadcast("LocalStorageModule.notification.removeitem",{key:e,storageType:"cookie"}),y(e);try{o.removeItem(u(e)),t.removeItem&&a.$broadcast("LocalStorageModule.notification.removeitem",{key:e,storageType:i.storageType})}catch(t){return a.$broadcast("LocalStorageModule.notification.error",t.message),y(e)}return!0},e=function(t){t=t||"";var e=l.slice(0,-1),n=new RegExp(e+"."+t);if(!h)return a.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),b();var i=l.length;for(var r in o)if(n.test(r))try{p(r.substr(i))}catch(t){return a.$broadcast("LocalStorageModule.notification.error",t.message),b()}return!0},g=function(){try{return navigator.cookieEnabled||"cookie"in s&&(0<s.cookie.length||-1<(s.cookie="test").indexOf.call(s.cookie,"test"))}catch(t){return a.$broadcast("LocalStorageModule.notification.error",t.message),!1}},m=function(t,e){if(void 0===e)return!1;if(!g())return a.$broadcast("LocalStorageModule.notification.error","COOKIES_NOT_SUPPORTED"),!1;try{var n="",i=new Date,r="";if(null===e?(i.setTime(i.getTime()+-864e5),n="; expires="+i.toGMTString(),e=""):0!==c.expiry&&(i.setTime(i.getTime()+24*c.expiry*60*60*1e3),n="; expires="+i.toGMTString()),t){var o="; path="+c.path;c.domain&&(r="; domain="+c.domain),s.cookie=u(t)+"="+encodeURIComponent(e)+n+o+r}}catch(t){return a.$broadcast("LocalStorageModule.notification.error",t.message),!1}return!0},v=function(t){if(!g())return a.$broadcast("LocalStorageModule.notification.error","COOKIES_NOT_SUPPORTED"),!1;for(var e=s.cookie&&s.cookie.split(";")||[],n=0;n<e.length;n++){for(var i=e[n];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(u(t)+"="))return decodeURIComponent(i.substring(l.length+t.length+1,i.length))}return null},y=function(t){m(t,null)},b=function(){for(var t=null,e=l.length,n=s.cookie.split(";"),i=0;i<n.length;i++){for(t=n[i];" "===t.charAt(0);)t=t.substring(1,t.length);var r=t.substring(e,t.indexOf("="));y(r)}},x=function(t,e,n){var i=f(e);null===i&&angular.isDefined(n)?i=n:angular.isObject(i)&&angular.isObject(n)&&(i=angular.extend(n,i)),t[e]=i,t.$watchCollection(e,function(t){d(e,t)})};return{isSupported:h,getStorageType:function(){return r},set:d,add:d,get:f,keys:function(){if(!h)return a.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),!1;var t=l.length,e=[];for(var n in o)if(n.substr(0,t)===l)try{e.push(n.substr(t))}catch(t){return a.$broadcast("LocalStorageModule.notification.error",t.Description),[]}return e},remove:p,clearAll:e,bind:x,deriveKey:u,cookie:{set:m,add:m,get:v,remove:y,clearAll:b}}}]})}.call(this),angular.module("rt.eventemitter",[]).factory("eventEmitter",function(){var o="_listeners";function n(t,e,n){"string"==typeof t&&(n=e,e=t,t=null),this[o]||(this[o]={});var i=this[o];i[e]||(i[e]=[]),i[e].push(n);var r=this;return t&&t.$on("$destroy",function(){r.off(e,n)}),this}function i(t,e,n){"string"==typeof t&&(n=e,e=t,t=null);var i=this,r=function(){n.apply(this,arguments),i.off(e,r)};return this.on(t,e,r),this}function r(t,e){if(!this[o]||!this[o][t])return this;var n=this[o];if(e){var i=n[t],r=i.indexOf(e);-1<r&&i.splice(r,1)}else delete n[t];return this}function a(t){if(this[o]&&this[o][t]){for(var e=this[o][t].slice(0),n=[].slice.call(arguments,1),i=0;i<e.length;i++)e[i].apply(null,n);return this}}return{inject:function(t){var e=t.prototype||t;e.on=n,e.once=i,e.off=r,e.emit=a}}});var CryptoJS=CryptoJS||function(s,n){var t={},e=t.lib={},i=e.Base=function(){function n(){}return{extend:function(t){n.prototype=this;var e=new n;return t&&e.mixIn(t),e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.$super.extend(this)}}}(),l=e.WordArray=i.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=e!=n?e:4*t.length},toString:function(t){return(t||o).stringify(this)},concat:function(t){var e=this.words,n=t.words,i=this.sigBytes;t=t.sigBytes;if(this.clamp(),i%4)for(var r=0;r<t;r++)e[i+r>>>2]|=(n[r>>>2]>>>24-r%4*8&255)<<24-(i+r)%4*8;else if(65535<n.length)for(r=0;r<t;r+=4)e[i+r>>>2]=n[r>>>2];else e.push.apply(e,n);return this.sigBytes+=t,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=s.ceil(e/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(4294967296*s.random()|0);return l.create(e,t)}}),r=t.enc={},o=r.Hex={stringify:function(t){for(var e=t.words,n=(t=t.sigBytes,[]),i=0;i<t;i++){var r=e[i>>>2]>>>24-i%4*8&255;n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,n=[],i=0;i<e;i+=2)n[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return l.create(n,e/2)}},a=r.Latin1={stringify:function(t){for(var e=t.words,n=(t=t.sigBytes,[]),i=0;i<t;i++)n.push(String.fromCharCode(e[i>>>2]>>>24-i%4*8&255));return n.join("")},parse:function(t){for(var e=t.length,n=[],i=0;i<e;i++)n[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return l.create(n,e)}},c=r.Utf8={stringify:function(t){try{return decodeURIComponent(escape(a.stringify(t)))}catch(t){throw Error("Malformed UTF-8 data")}},parse:function(t){return a.parse(unescape(encodeURIComponent(t)))}},u=e.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=l.create(),this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=c.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var e=this._data,n=e.words,i=e.sigBytes,r=this.blockSize,o=i/(4*r);t=(o=t?s.ceil(o):s.max((0|o)-this._minBufferSize,0))*r,i=s.min(4*t,i);if(t){for(var a=0;a<t;a+=r)this._doProcessBlock(n,a);a=n.splice(0,t),e.sigBytes-=i}return l.create(a,i)},clone:function(){var t=i.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});e.Hasher=u.extend({init:function(){this.reset()},reset:function(){u.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize(),this._hash},clone:function(){var t=u.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:16,_createHelper:function(n){return function(t,e){return n.create(e).finalize(t)}},_createHmacHelper:function(n){return function(t,e){return h.HMAC.create(n,e).finalize(t)}}});var h=t.algo={};return t}(Math),TinCan;!function(){var t=CryptoJS,e=(n=t.lib).WordArray,n=n.Hasher,u=[],i=t.algo.SHA1=n.extend({_doReset:function(){this._hash=e.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,i=n[0],r=n[1],o=n[2],a=n[3],s=n[4],l=0;l<80;l++){if(l<16)u[l]=0|t[e+l];else{var c=u[l-3]^u[l-8]^u[l-14]^u[l-16];u[l]=c<<1|c>>>31}c=(i<<5|i>>>27)+s+u[l],c=l<20?c+(1518500249+(r&o|~r&a)):l<40?c+(1859775393+(r^o^a)):l<60?c+((r&o|r&a|o&a)-1894007588):c+((r^o^a)-899497514),s=a,a=o,o=r<<30|r>>>2,r=i,i=c}n[0]=n[0]+i|0,n[1]=n[1]+r|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32,e[15+(i+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process()}});t.SHA1=n._createHelper(i),t.HmacSHA1=n._createHmacHelper(i)}(),function(){var t=CryptoJS,u=t.lib.WordArray;t.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,i=this._map;t.clamp();for(var r=[],o=0;o<n;o+=3)for(var a=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<n;s++)r.push(i.charAt(a>>>6*(3-s)&63));var l=i.charAt(64);if(l)for(;r.length%4;)r.push(l);return r.join("")},parse:function(t){var e=(t=t.replace(/\s/g,"")).length,n=this._map,i=n.charAt(64);if(i){var r=t.indexOf(i);-1!=r&&(e=r)}for(var o=[],a=0,s=0;s<e;s++)if(s%4){var l=n.indexOf(t.charAt(s-1))<<s%4*2,c=n.indexOf(t.charAt(s))>>>6-s%4*2;o[a>>>2]|=(l|c)<<24-a%4*8,a++}return u.create(o,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(){"use strict";var l={statementId:!0,voidedStatementId:!0,verb:!0,object:!0,registration:!0,context:!0,actor:!0,since:!0,until:!0,limit:!0,authoritative:!0,sparse:!0,instructor:!0,ascending:!0,continueToken:!0,agent:!0,activityId:!0,stateId:!0,profileId:!0,activity_platform:!0,grouping:!0,"Accept-Language":!0};(TinCan=function(t){this.log("constructor"),this.recordStores=[],this.actor=null,this.activity=null,this.registration=null,this.context=null,this.init(t)}).prototype={LOG_SRC:"TinCan",log:function(t,e){TinCan.DEBUG&&"undefined"!=typeof console&&console.log&&(e=e||this.LOG_SRC||"TinCan",console.log("TinCan."+e+": "+t))},init:function(t){var e;if(this.log("init"),(t=t||{}).hasOwnProperty("url")&&""!==t.url&&this._initFromQueryString(t.url),t.hasOwnProperty("recordStores")&&void 0!==t.recordStores)for(e=0;e<t.recordStores.length;e+=1)this.addRecordStore(t.recordStores[e]);t.hasOwnProperty("activity")&&(this.activity=t.activity instanceof TinCan.Activity?t.activity:new TinCan.Activity(t.activity)),t.hasOwnProperty("actor")&&(this.actor=t.actor instanceof TinCan.Agent?t.actor:new TinCan.Agent(t.actor)),t.hasOwnProperty("context")&&(this.context=t.context instanceof TinCan.Context?t.context:new TinCan.Context(t.context)),t.hasOwnProperty("registration")&&(this.registration=t.registration)},_initFromQueryString:function(t){this.log("_initFromQueryString");var e,n,i,r=TinCan.Utils.parseURL(t).params,o=["endpoint","auth"],a={},s=null;if(r.hasOwnProperty("actor")){this.log("_initFromQueryString - found actor: "+r.actor);try{this.actor=TinCan.Agent.fromJSON(r.actor),delete r.actor}catch(t){this.log("_initFromQueryString - failed to set actor: "+t)}}if(r.hasOwnProperty("activity_id")&&(this.activity=new TinCan.Activity({id:r.activity_id}),delete r.activity_id),(r.hasOwnProperty("activity_platform")||r.hasOwnProperty("registration")||r.hasOwnProperty("grouping"))&&(i={},r.hasOwnProperty("activity_platform")&&(i.platform=r.activity_platform,delete r.activity_platform),r.hasOwnProperty("registration")&&(i.registration=this.registration=r.registration,delete r.registration),r.hasOwnProperty("grouping")&&(i.contextActivities={},i.contextActivities.grouping=r.grouping,delete r.grouping),this.context=new TinCan.Context(i)),r.hasOwnProperty("endpoint")){for(e=0;e<o.length;e+=1)n=o[e],r.hasOwnProperty(n)&&(a[n]=r[n],delete r[n]);for(e in r)r.hasOwnProperty(e)&&(l.hasOwnProperty(e)?delete r[e]:(s=s||{})[e]=r[e]);null!==s&&(a.extended=s),a.allowFail=!1,this.addRecordStore(a)}},addRecordStore:function(t){var e;this.log("addRecordStore"),e=t instanceof TinCan.LRS?t:new TinCan.LRS(t),this.recordStores.push(e)},prepareStatement:function(t){return this.log("prepareStatement"),t instanceof TinCan.Statement||(t=new TinCan.Statement(t)),null===t.actor&&null!==this.actor&&(t.actor=this.actor),null===t.target&&null!==this.activity&&(t.target=this.activity),null!==this.context&&(null===t.context?t.context=this.context:(null===t.context.registration&&(t.context.registration=this.context.registration),null===t.context.platform&&(t.context.platform=this.context.platform),null!==this.context.contextActivities&&(null===t.context.contextActivities?t.context.contextActivities=this.context.contextActivities:(null!==this.context.contextActivities.grouping&&null===t.context.contextActivities.grouping&&(t.context.contextActivities.grouping=this.context.contextActivities.grouping),null!==this.context.contextActivities.parent&&null===t.context.contextActivities.parent&&(t.context.contextActivities.parent=this.context.contextActivities.parent),null!==this.context.contextActivities.other&&null===t.context.contextActivities.other&&(t.context.contextActivities.other=this.context.contextActivities.other))))),t},sendStatement:function(t,i){this.log("sendStatement");var e,n,r,o=this,a=this.prepareStatement(t),s=this.recordStores.length,l=[],c=[];if(0<s)for("function"==typeof i&&(r=function(t,e){var n;o.log("sendStatement - callbackWrapper: "+s),1<s?(s-=1,c.push({err:t,xhr:e})):1===s?(c.push({err:t,xhr:e}),n=[c,a],i.apply(this,n)):o.log("sendStatement - unexpected record store count: "+s)}),n=0;n<s;n+=1)e=this.recordStores[n],l.push(e.saveStatement(a,{callback:r}));else this.log("[warning] sendStatement: No LRSs added yet (statement not sent)"),"function"==typeof i&&i.apply(this,[null,a]);return{statement:a,results:l}},getStatement:function(t,e){return this.log("getStatement"),0<this.recordStores.length?this.recordStores[0].retrieveStatement(t,{callback:e}):void this.log("[warning] getStatement: No LRSs added yet (statement not retrieved)")},voidStatement:function(t,i,e){this.log("voidStatement");var n,r,o,a,s,l=this,c=this.recordStores.length,u=[],h=[];if(t instanceof TinCan.Statement&&(t=t.id),void 0!==e.actor?r=e.actor:null!==this.actor&&(r=this.actor),o=new TinCan.Statement({actor:r,verb:{id:"http://adlnet.gov/expapi/verbs/voided"},target:{objectType:"StatementRef",id:t}}),0<c)for("function"==typeof i&&(s=function(t,e){var n;l.log("voidStatement - callbackWrapper: "+c),1<c?(c-=1,h.push({err:t,xhr:e})):1===c?(h.push({err:t,xhr:e}),n=[h,o],i.apply(this,n)):l.log("voidStatement - unexpected record store count: "+c)}),a=0;a<c;a+=1)n=this.recordStores[a],u.push(n.saveStatement(o,{callback:s}));else this.log("[warning] voidStatement: No LRSs added yet (statement not sent)"),"function"==typeof i&&i.apply(this,[null,o]);return{statement:o,results:u}},getVoidedStatement:function(t,e){return this.log("getVoidedStatement"),0<this.recordStores.length?this.recordStores[0].retrieveVoidedStatement(t,{callback:e}):void this.log("[warning] getVoidedStatement: No LRSs added yet (statement not retrieved)")},sendStatements:function(t,i){this.log("sendStatements");var e,n,r,o=this,a=[],s=this.recordStores.length,l=[],c=[];if(0===t.length)"function"==typeof i&&i.apply(this,[null,a]);else{for(n=0;n<t.length;n+=1)a.push(this.prepareStatement(t[n]));if(0<s)for("function"==typeof i&&(r=function(t,e){var n;o.log("sendStatements - callbackWrapper: "+s),1<s?(s-=1,c.push({err:t,xhr:e})):1===s?(c.push({err:t,xhr:e}),n=[c,a],i.apply(this,n)):o.log("sendStatements - unexpected record store count: "+s)}),n=0;n<s;n+=1)e=this.recordStores[n],l.push(e.saveStatements(a,{callback:r}));else this.log("[warning] sendStatements: No LRSs added yet (statements not sent)"),"function"==typeof i&&i.apply(this,[null,a])}return{statements:a,results:l}},getStatements:function(t){this.log("getStatements");var e,n,i={};return 0<this.recordStores.length?(e=this.recordStores[0],n=(t=t||{}).params||{},t.sendActor&&null!==this.actor&&("0.9"===e.version||"0.95"===e.version?n.actor=this.actor:n.agent=this.actor),t.sendActivity&&null!==this.activity&&("0.9"===e.version||"0.95"===e.version?n.target=this.activity:n.activity=this.activity),void 0===n.registration&&null!==this.registration&&(n.registration=this.registration),i={params:n},void 0!==t.callback&&(i.callback=t.callback),e.queryStatements(i)):void this.log("[warning] getStatements: No LRSs added yet (statements not read)")},getState:function(t,e){var n,i;return this.log("getState"),0<this.recordStores.length?(i=this.recordStores[0],n={agent:void 0!==(e=e||{}).agent?e.agent:this.actor,activity:void 0!==e.activity?e.activity:this.activity},void 0!==e.registration?n.registration=e.registration:null!==this.registration&&(n.registration=this.registration),void 0!==e.callback&&(n.callback=e.callback),i.retrieveState(t,n)):void this.log("[warning] getState: No LRSs added yet (state not retrieved)")},setState:function(t,e,n){var i,r;return this.log("setState"),0<this.recordStores.length?(r=this.recordStores[0],i={agent:void 0!==(n=n||{}).agent?n.agent:this.actor,activity:void 0!==n.activity?n.activity:this.activity},void 0!==n.registration?i.registration=n.registration:null!==this.registration&&(i.registration=this.registration),void 0!==n.lastSHA1&&(i.lastSHA1=n.lastSHA1),void 0!==n.contentType&&(i.contentType=n.contentType,void 0!==n.overwriteJSON&&!n.overwriteJSON&&TinCan.Utils.isApplicationJSON(n.contentType)&&(i.method="POST")),void 0!==n.callback&&(i.callback=n.callback),r.saveState(t,e,i)):void this.log("[warning] setState: No LRSs added yet (state not saved)")},deleteState:function(t,e){var n,i;return this.log("deleteState"),0<this.recordStores.length?(i=this.recordStores[0],n={agent:void 0!==(e=e||{}).agent?e.agent:this.actor,activity:void 0!==e.activity?e.activity:this.activity},void 0!==e.registration?n.registration=e.registration:null!==this.registration&&(n.registration=this.registration),void 0!==e.callback&&(n.callback=e.callback),i.dropState(t,n)):void this.log("[warning] deleteState: No LRSs added yet (state not deleted)")},getActivityProfile:function(t,e){var n,i;return this.log("getActivityProfile"),0<this.recordStores.length?(i=this.recordStores[0],n={activity:void 0!==(e=e||{}).activity?e.activity:this.activity},void 0!==e.callback&&(n.callback=e.callback),i.retrieveActivityProfile(t,n)):void this.log("[warning] getActivityProfile: No LRSs added yet (activity profile not retrieved)")},setActivityProfile:function(t,e,n){var i,r;return this.log("setActivityProfile"),0<this.recordStores.length?(r=this.recordStores[0],i={activity:void 0!==(n=n||{}).activity?n.activity:this.activity},void 0!==n.callback&&(i.callback=n.callback),void 0!==n.lastSHA1&&(i.lastSHA1=n.lastSHA1),void 0!==n.contentType&&(i.contentType=n.contentType,void 0!==n.overwriteJSON&&!n.overwriteJSON&&TinCan.Utils.isApplicationJSON(n.contentType)&&(i.method="POST")),r.saveActivityProfile(t,e,i)):void this.log("[warning] setActivityProfile: No LRSs added yet (activity profile not saved)")},deleteActivityProfile:function(t,e){var n,i;return this.log("deleteActivityProfile"),0<this.recordStores.length?(i=this.recordStores[0],n={activity:void 0!==(e=e||{}).activity?e.activity:this.activity},void 0!==e.callback&&(n.callback=e.callback),i.dropActivityProfile(t,n)):void this.log("[warning] deleteActivityProfile: No LRSs added yet (activity profile not deleted)")},getAgentProfile:function(t,e){var n,i;return this.log("getAgentProfile"),0<this.recordStores.length?(i=this.recordStores[0],n={agent:void 0!==(e=e||{}).agent?e.agent:this.actor},void 0!==e.callback&&(n.callback=e.callback),i.retrieveAgentProfile(t,n)):void this.log("[warning] getAgentProfile: No LRSs added yet (agent profile not retrieved)")},setAgentProfile:function(t,e,n){var i,r;return this.log("setAgentProfile"),0<this.recordStores.length?(r=this.recordStores[0],i={agent:void 0!==(n=n||{}).agent?n.agent:this.actor},void 0!==n.callback&&(i.callback=n.callback),void 0!==n.lastSHA1&&(i.lastSHA1=n.lastSHA1),void 0!==n.contentType&&(i.contentType=n.contentType,void 0!==n.overwriteJSON&&!n.overwriteJSON&&TinCan.Utils.isApplicationJSON(n.contentType)&&(i.method="POST")),r.saveAgentProfile(t,e,i)):void this.log("[warning] setAgentProfile: No LRSs added yet (agent profile not saved)")},deleteAgentProfile:function(t,e){var n,i;return this.log("deleteAgentProfile"),0<this.recordStores.length?(i=this.recordStores[0],n={agent:void 0!==(e=e||{}).agent?e.agent:this.actor},void 0!==e.callback&&(n.callback=e.callback),i.dropAgentProfile(t,n)):void this.log("[warning] deleteAgentProfile: No LRSs added yet (agent profile not deleted)")}},TinCan.DEBUG=!1,TinCan.enableDebug=function(){TinCan.DEBUG=!0},TinCan.disableDebug=function(){TinCan.DEBUG=!1},TinCan.versions=function(){return["1.0.2","1.0.1","1.0.0","0.95","0.9"]},"object"==typeof module&&(module.exports=TinCan)}(),function(){"use strict";TinCan.Utils={getUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},getISODateString:function(t){function e(t,e){var n,i;for(null==t&&(t=0),null==e&&(e=2),n=Math.pow(10,e-1),i=t.toString();t<n&&1<n;)i="0"+i,n/=10;return i}return t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1)+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())+"."+e(t.getUTCMilliseconds(),3)+"Z"},convertISO8601DurationToMilliseconds:function(t){var e,n,i,r,o=0<=t.indexOf("-"),a=t.indexOf("T"),s=t.indexOf("H"),l=t.indexOf("M"),c=t.indexOf("S");if(-1===a||-1!==l&&l<a||-1!==t.indexOf("D")||-1!==t.indexOf("Y"))throw new Error("ISO 8601 timestamps including years, months and/or days are not currently supported");return e=-1===s?(s=a,0):parseInt(t.slice(a+1,s),10),n=-1===l?(l=a,0):parseInt(t.slice(s+1,l),10),i=parseFloat(t.slice(l+1,c)),r=parseInt(1e3*(60*(60*e+n)+i),10),isNaN(r)&&(r=0),o&&(r*=-1),r},convertMillisecondsToISO8601Duration:function(t){var e,n,i,r=parseInt(t,10),o="",a="";return(i=Math.round(r/10))<0&&(o="-",i*=-1),a=o+"PT",0<(e=parseInt(i/36e4,10))&&(a+=e+"H"),0<(n=parseInt(i%36e4/6e3,10))&&(a+=n+"M"),a+(i%36e4%6e3/100+"S")},getSHA1String:function(t){return CryptoJS.SHA1(t).toString(CryptoJS.enc.Hex)},getBase64String:function(t){return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Latin1.parse(t))},getLangDictionaryValue:function(t,e){var n,i=this[t];if(void 0!==e&&void 0!==i[e])return i[e];if(void 0!==i.und)return i.und;if(void 0!==i["en-US"])return i["en-US"];for(n in i)if(i.hasOwnProperty(n))return i[n];return""},parseURL:function(t,e){var n,i,r,o,a="/"===t.charAt(0),s=["(/[^?#]*)","(\\?[^#]*|)","(#.*|)$"],l=/\+/g,c=/([^&=]+)=?([^&]*)/g,u=function(t){return decodeURIComponent(t.replace(l," "))};if(e=e||{},a){if(void 0===e.allowRelative||!e.allowRelative)throw new Error("Refusing to parse relative URL without 'allowRelative' option")}else s.unshift("^(https?:)//","(([^:/?#]*)(?::([0-9]+))?)"),-1===t.indexOf("/",8)&&(t+="/");if(n=new RegExp(s.join("")),null===(i=t.match(n)))throw new Error("Unable to parse URL regular expression did not match: '"+t+"'");if(r.path=a?(r={protocol:null,host:null,hostname:null,port:null,path:null,pathname:i[1],search:i[2],hash:i[3],params:{}}).pathname:(r={protocol:i[1],host:i[2],hostname:i[3],port:i[4],pathname:i[5],search:i[6],hash:i[7],params:{}}).protocol+"//"+r.host+r.pathname,""!==r.search)for(;o=c.exec(r.search.substring(1));)r.params[u(o[1])]=u(o[2]);return r},getServerRoot:function(t){var e=t.split("/");return e[0]+"//"+e[2]},getContentTypeFromHeader:function(t){return String(t).split(";")[0]},isApplicationJSON:function(t){return 0===TinCan.Utils.getContentTypeFromHeader(t).toLowerCase().indexOf("application/json")}}}(),function(){"use strict";var t=TinCan.LRS=function(t){this.log("constructor"),this.endpoint=null,this.version=null,this.auth=null,this.allowFail=!0,this.extended=null,this.init(t)};t.prototype={LOG_SRC:"LRS",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=TinCan.versions(),i=!1;if((t=t||{}).hasOwnProperty("alertOnRequestFailure")&&this.log("'alertOnRequestFailure' is deprecated (alerts have been removed) no need to set it now"),!t.hasOwnProperty("endpoint")||null===t.endpoint||""===t.endpoint)throw this.log("[error] LRS invalid: no endpoint"),{code:3,mesg:"LRS invalid: no endpoint"};if(this.endpoint=String(t.endpoint),"/"!==this.endpoint.slice(-1)&&(this.log("adding trailing slash to endpoint"),this.endpoint+="/"),t.hasOwnProperty("allowFail")&&(this.allowFail=t.allowFail),t.hasOwnProperty("auth")?this.auth=t.auth:t.hasOwnProperty("username")&&t.hasOwnProperty("password")&&(this.auth="Basic "+TinCan.Utils.getBase64String(t.username+":"+t.password)),t.hasOwnProperty("extended")&&(this.extended=t.extended),this._initByEnvironment(t),void 0!==t.version){for(this.log("version: "+t.version),e=0;e<n.length;e+=1)if(n[e]===t.version){i=!0;break}if(!i)throw this.log("[error] LRS invalid: version not supported ("+t.version+")"),{code:5,mesg:"LRS invalid: version not supported ("+t.version+")"};this.version=t.version}else this.version=n[0]},_initByEnvironment:function(){this.log("_initByEnvironment not overloaded - no environment loaded?")},_makeRequest:function(){this.log("_makeRequest not overloaded - no environment loaded?")},_IEModeConversion:function(){this.log("_IEModeConversion not overloaded - browser environment not loaded.")},sendRequest:function(t){this.log("sendRequest");var e,n=this.endpoint+t.url,i={};if(0===t.url.indexOf("http")&&(n=t.url),null!==this.extended)for(e in t.params=t.params||{},this.extended)this.extended.hasOwnProperty(e)&&(t.params.hasOwnProperty(e)||null!==this.extended[e]&&(t.params[e]=this.extended[e]));for(e in i.Authorization=this.auth,"0.9"!==this.version&&(i["X-Experience-API-Version"]=this.version),t.headers)t.headers.hasOwnProperty(e)&&(i[e]=t.headers[e]);return this._makeRequest(n,i,t)},about:function(i){var t,e,n;return this.log("about"),t={url:"about",method:"GET",params:{}},void 0!==(i=i||{}).callback&&(n=function(t,e){var n=e;null===t&&(n=TinCan.About.fromJSON(e.responseText)),i.callback(t,n)},t.callback=n),e=this.sendRequest(t),n?void 0:(null===e.err&&(e.xhr=TinCan.About.fromJSON(e.xhr.responseText)),e)},saveStatement:function(t,e){var n,i;this.log("saveStatement"),e=e||{};try{i=t.asVersion(this.version)}catch(t){return this.allowFail?(this.log("[warning] statement could not be serialized in version ("+this.version+"): "+t),void 0!==e.callback?void e.callback(null,null):{err:null,xhr:null}):(this.log("[error] statement could not be serialized in version ("+this.version+"): "+t),void 0!==e.callback?void e.callback(t,null):{err:t,xhr:null})}return n={url:"statements",data:JSON.stringify(i),headers:{"Content-Type":"application/json"}},null!==t.id?(n.method="PUT",n.params={statementId:t.id}):n.method="POST",void 0!==e.callback&&(n.callback=e.callback),this.sendRequest(n)},retrieveStatement:function(t,i){var e,n,r;return this.log("retrieveStatement"),e={url:"statements",method:"GET",params:{statementId:t}},void 0!==(i=i||{}).callback&&(r=function(t,e){var n=e;null===t&&(n=TinCan.Statement.fromJSON(e.responseText)),i.callback(t,n)},e.callback=r),n=this.sendRequest(e),r||(n.statement=null)===n.err&&(n.statement=TinCan.Statement.fromJSON(n.xhr.responseText)),n},retrieveVoidedStatement:function(t,i){var e,n,r;return this.log("retrieveVoidedStatement"),i=i||{},e={url:"statements",method:"GET",params:{}},"0.9"===this.version||"0.95"===this.version?e.params.statementId=t:e.params.voidedStatementId=t,void 0!==i.callback&&(r=function(t,e){var n=e;null===t&&(n=TinCan.Statement.fromJSON(e.responseText)),i.callback(t,n)},e.callback=r),n=this.sendRequest(e),r||(n.statement=null)===n.err&&(n.statement=TinCan.Statement.fromJSON(n.xhr.responseText)),n},saveStatements:function(t,e){this.log("saveStatements");var n,i,r,o=[];if(e=e||{},0===t.length)return void 0!==e.callback?void e.callback(new Error("no statements"),null):{err:new Error("no statements"),xhr:null};for(r=0;r<t.length;r+=1){try{i=t[r].asVersion(this.version)}catch(t){return this.allowFail?(this.log("[warning] statement could not be serialized in version ("+this.version+"): "+t),void 0!==e.callback?void e.callback(null,null):{err:null,xhr:null}):(this.log("[error] statement could not be serialized in version ("+this.version+"): "+t),void 0!==e.callback?void e.callback(t,null):{err:t,xhr:null})}o.push(i)}return n={url:"statements",method:"POST",data:JSON.stringify(o),headers:{"Content-Type":"application/json"}},void 0!==e.callback&&(n.callback=e.callback),this.sendRequest(n)},queryStatements:function(i){var t,e,n;this.log("queryStatements"),(i=i||{}).params=i.params||{};try{t=this._queryStatementsRequestCfg(i)}catch(t){return this.log("[error] Query statements failed - "+t),void 0!==i.callback&&i.callback(t,{}),{err:t,statementsResult:null}}return void 0!==i.callback&&(n=function(t,e){var n=e;null===t&&(n=TinCan.StatementsResult.fromJSON(e.responseText)),i.callback(t,n)},t.callback=n),(e=this.sendRequest(t)).config=t,n||(e.statementsResult=null)===e.err&&(e.statementsResult=TinCan.StatementsResult.fromJSON(e.xhr.responseText)),e},_queryStatementsRequestCfg:function(t){this.log("_queryStatementsRequestCfg");var e,n,i={},r={url:"statements",method:"GET",params:i},o=["agent","actor","object","instructor"],a=["verb","activity"],s=["registration","context","since","until","limit","authoritative","sparse","ascending","related_activities","related_agents","format","attachments"],l={verb:!0,registration:!0,since:!0,until:!0,limit:!0,ascending:!0},c={.9:{supported:{actor:!0,instructor:!0,target:!0,object:!0,context:!0,authoritative:!0,sparse:!0}},"1.0.0":{supported:{agent:!0,activity:!0,related_activities:!0,related_agents:!0,format:!0,attachments:!0}}};for(n in c[.95]=c[.9],c["1.0.1"]=c["1.0.0"],c["1.0.2"]=c["1.0.0"],t.params.hasOwnProperty("target")&&(t.params.object=t.params.target),t.params)if(t.params.hasOwnProperty(n)&&void 0===l[n]&&void 0===c[this.version].supported[n])throw"Unrecognized query parameter configured: "+n;for(e=0;e<o.length;e+=1)void 0!==t.params[o[e]]&&(i[o[e]]=JSON.stringify(t.params[o[e]].asVersion(this.version)));for(e=0;e<a.length;e+=1)void 0!==t.params[a[e]]&&(i[a[e]]=t.params[a[e]].id);for(e=0;e<s.length;e+=1)void 0!==t.params[s[e]]&&null!==t.params[s[e]]&&(i[s[e]]=t.params[s[e]]);return r},moreStatements:function(i){var t,e,n,r,o;return this.log("moreStatements: "+i.url),i=i||{},r=TinCan.Utils.parseURL(i.url,{allowRelative:!0}),o=TinCan.Utils.getServerRoot(this.endpoint),0===r.path.indexOf("/statements")&&(r.path=this.endpoint.replace(o,"")+r.path,this.log("converting non-standard more URL to "+r.path)),0!==r.path.indexOf("/")&&(r.path="/"+r.path),t={method:"GET",url:o+r.path,params:r.params},void 0!==i.callback&&(n=function(t,e){var n=e;null===t&&(n=TinCan.StatementsResult.fromJSON(e.responseText)),i.callback(t,n)},t.callback=n),(e=this.sendRequest(t)).config=t,n||(e.statementsResult=null)===e.err&&(e.statementsResult=TinCan.StatementsResult.fromJSON(e.xhr.responseText)),e},retrieveState:function(i,r){this.log("retrieveState");var t,e,n,o={},a={},s=this;if(n=r.requestHeaders||{},o={stateId:i,activityId:r.activity.id},"0.9"===this.version?o.actor=JSON.stringify(r.agent.asVersion(this.version)):o.agent=JSON.stringify(r.agent.asVersion(this.version)),void 0!==r.registration&&null!==r.registration&&("0.9"===this.version?o.registrationId=r.registration:o.registration=r.registration),a={url:"activities/state",method:"GET",params:o,ignore404:!0,headers:n},void 0!==r.callback&&(e=function(t,e){var n=e;if(null===t)if(404===e.status)n=null;else if((n=new TinCan.State({id:i,contents:e.responseText})).etag=void 0!==e.getResponseHeader&&null!==e.getResponseHeader("ETag")&&""!==e.getResponseHeader("ETag")?e.getResponseHeader("ETag"):TinCan.Utils.getSHA1String(e.responseText),void 0!==e.contentType?n.contentType=e.contentType:void 0!==e.getResponseHeader&&null!==e.getResponseHeader("Content-Type")&&""!==e.getResponseHeader("Content-Type")&&(n.contentType=e.getResponseHeader("Content-Type")),TinCan.Utils.isApplicationJSON(n.contentType))try{n.contents=JSON.parse(n.contents)}catch(t){s.log("retrieveState - failed to deserialize JSON: "+t)}r.callback(t,n)},a.callback=e),t=this.sendRequest(a),!e&&((t.state=null)===t.err&&404!==t.xhr.status&&(t.state=new TinCan.State({id:i,contents:t.xhr.responseText}),t.state.etag=void 0!==t.xhr.getResponseHeader&&null!==t.xhr.getResponseHeader("ETag")&&""!==t.xhr.getResponseHeader("ETag")?t.xhr.getResponseHeader("ETag"):TinCan.Utils.getSHA1String(t.xhr.responseText),void 0!==t.xhr.contentType?t.state.contentType=t.xhr.contentType:void 0!==t.xhr.getResponseHeader&&null!==t.xhr.getResponseHeader("Content-Type")&&""!==t.xhr.getResponseHeader("Content-Type")&&(t.state.contentType=t.xhr.getResponseHeader("Content-Type")),TinCan.Utils.isApplicationJSON(t.state.contentType))))try{t.state.contents=JSON.parse(t.state.contents)}catch(t){this.log("retrieveState - failed to deserialize JSON: "+t)}return t},retrieveStateIds:function(i){this.log("retrieveStateIds");var t,e,n,r,o={};if(e=(i=i||{}).requestHeaders||{},o.activityId=i.activity.id,"0.9"===this.version?o.actor=JSON.stringify(i.agent.asVersion(this.version)):o.agent=JSON.stringify(i.agent.asVersion(this.version)),void 0!==i.registration&&null!==i.registration&&("0.9"===this.version?o.registrationId=i.registration:o.registration=i.registration),t={url:"activities/state",method:"GET",params:o,headers:e,ignore404:!0},void 0!==i.callback&&(r=function(e,t){var n=t;if(null===e){if(404===t.status)n=[];else try{n=JSON.parse(t.responseText)}catch(t){e="Response JSON parse error: "+t}i.callback(e,n)}else i.callback(e,n)},t.callback=r),void 0!==i.since&&(t.params.since=i.since),n=this.sendRequest(t),!r){if((n.profileIds=null)!==n.err)return n;if(404===n.xhr.status)n.profileIds=[];else try{n.profileIds=JSON.parse(n.xhr.responseText)}catch(t){n.err="retrieveStateIds - JSON parse error: "+t}}return n},saveState:function(t,e,n){var i,r,o;return this.log("saveState"),o=n.requestHeaders||{},void 0===n.contentType&&(n.contentType="application/octet-stream"),o["Content-Type"]=n.contentType,"object"==typeof e&&TinCan.Utils.isApplicationJSON(n.contentType)&&(e=JSON.stringify(e)),(void 0===n.method||"POST"!==n.method)&&(n.method="PUT"),i={stateId:t,activityId:n.activity.id},"0.9"===this.version?i.actor=JSON.stringify(n.agent.asVersion(this.version)):i.agent=JSON.stringify(n.agent.asVersion(this.version)),void 0!==n.registration&&null!==n.registration&&("0.9"===this.version?i.registrationId=n.registration:i.registration=n.registration),r={url:"activities/state",method:n.method,params:i,data:e,headers:o},void 0!==n.callback&&(r.callback=n.callback),void 0!==n.lastSHA1&&null!==n.lastSHA1&&(r.headers["If-Match"]=n.lastSHA1),this.sendRequest(r)},dropState:function(t,e){var n,i,r;return this.log("dropState"),r=e.requestHeaders||{},n={activityId:e.activity.id},"0.9"===this.version?n.actor=JSON.stringify(e.agent.asVersion(this.version)):n.agent=JSON.stringify(e.agent.asVersion(this.version)),null!==t&&(n.stateId=t),void 0!==e.registration&&null!==e.registration&&("0.9"===this.version?n.registrationId=e.registration:n.registration=e.registration),i={url:"activities/state",method:"DELETE",params:n,headers:r},void 0!==e.callback&&(i.callback=e.callback),this.sendRequest(i)},retrieveActivity:function(i,r){this.log("retrieveActivity");var t,e,n,o={};return n=r.requestHeaders||{},o={url:"activities",method:"GET",params:{activityId:i},ignore404:!0,headers:n},void 0!==r.callback&&(e=function(t,e){var n=e;null===t&&(n=404===e.status?new TinCan.Activity({id:i}):TinCan.Activity.fromJSON(e.responseText)),r.callback(t,n)},o.callback=e),t=this.sendRequest(o),e||(t.activity=null)===t.err&&(t.activity=404===t.xhr.status?new TinCan.Activity({id:i}):TinCan.Activity.fromJSON(t.xhr.responseText)),t},retrieveActivityProfile:function(i,r){this.log("retrieveActivityProfile");var t,e,n,o={},a=this;if(n=r.requestHeaders||{},o={url:"activities/profile",method:"GET",params:{profileId:i,activityId:r.activity.id},ignore404:!0,headers:n},void 0!==r.callback&&(e=function(t,e){var n=e;if(null===t)if(404===e.status)n=null;else if((n=new TinCan.ActivityProfile({id:i,activity:r.activity,contents:e.responseText})).etag=void 0!==e.getResponseHeader&&null!==e.getResponseHeader("ETag")&&""!==e.getResponseHeader("ETag")?e.getResponseHeader("ETag"):TinCan.Utils.getSHA1String(e.responseText),void 0!==e.contentType?n.contentType=e.contentType:void 0!==e.getResponseHeader&&null!==e.getResponseHeader("Content-Type")&&""!==e.getResponseHeader("Content-Type")&&(n.contentType=e.getResponseHeader("Content-Type")),TinCan.Utils.isApplicationJSON(n.contentType))try{n.contents=JSON.parse(n.contents)}catch(t){a.log("retrieveActivityProfile - failed to deserialize JSON: "+t)}r.callback(t,n)},o.callback=e),t=this.sendRequest(o),!e&&((t.profile=null)===t.err&&404!==t.xhr.status&&(t.profile=new TinCan.ActivityProfile({id:i,activity:r.activity,contents:t.xhr.responseText}),t.profile.etag=void 0!==t.xhr.getResponseHeader&&null!==t.xhr.getResponseHeader("ETag")&&""!==t.xhr.getResponseHeader("ETag")?t.xhr.getResponseHeader("ETag"):TinCan.Utils.getSHA1String(t.xhr.responseText),void 0!==t.xhr.contentType?t.profile.contentType=t.xhr.contentType:void 0!==t.xhr.getResponseHeader&&null!==t.xhr.getResponseHeader("Content-Type")&&""!==t.xhr.getResponseHeader("Content-Type")&&(t.profile.contentType=t.xhr.getResponseHeader("Content-Type")),TinCan.Utils.isApplicationJSON(t.profile.contentType))))try{t.profile.contents=JSON.parse(t.profile.contents)}catch(t){this.log("retrieveActivityProfile - failed to deserialize JSON: "+t)}return t},retrieveActivityProfileIds:function(i){var t,e,n,r;if(this.log("retrieveActivityProfileIds"),e=(i=i||{}).requestHeaders||{},t={url:"activities/profile",method:"GET",params:{activityId:i.activity.id},headers:e,ignore404:!0},void 0!==i.callback&&(r=function(e,t){var n=t;if(null===e){if(404===t.status)n=[];else try{n=JSON.parse(t.responseText)}catch(t){e="Response JSON parse error: "+t}i.callback(e,n)}else i.callback(e,n)},t.callback=r),void 0!==i.since&&(t.params.since=i.since),n=this.sendRequest(t),!r){if((n.profileIds=null)!==n.err)return n;if(404===n.xhr.status)n.profileIds=[];else try{n.profileIds=JSON.parse(n.xhr.responseText)}catch(t){n.err="retrieveActivityProfileIds - JSON parse error: "+t}}return n},saveActivityProfile:function(t,e,n){var i,r;return this.log("saveActivityProfile"),r=n.requestHeaders||{},void 0===n.contentType&&(n.contentType="application/octet-stream"),r["Content-Type"]=n.contentType,(void 0===n.method||"POST"!==n.method)&&(n.method="PUT"),"object"==typeof e&&TinCan.Utils.isApplicationJSON(n.contentType)&&(e=JSON.stringify(e)),i={url:"activities/profile",method:n.method,params:{profileId:t,activityId:n.activity.id},data:e,headers:r},void 0!==n.callback&&(i.callback=n.callback),void 0!==n.lastSHA1&&null!==n.lastSHA1?i.headers["If-Match"]=n.lastSHA1:i.headers["If-None-Match"]="*",this.sendRequest(i)},dropActivityProfile:function(t,e){var n,i;return this.log("dropActivityProfile"),i=e.requestHeaders||{},n={url:"activities/profile",method:"DELETE",params:{profileId:t,activityId:e.activity.id},headers:i},void 0!==e.callback&&(n.callback=e.callback),this.sendRequest(n)},retrieveAgentProfile:function(i,r){this.log("retrieveAgentProfile");var t,e,n,o={},a=this;if(n=r.requestHeaders||{},o={method:"GET",params:{profileId:i},ignore404:!0,headers:n},"0.9"===this.version?(o.url="actors/profile",o.params.actor=JSON.stringify(r.agent.asVersion(this.version))):(o.url="agents/profile",o.params.agent=JSON.stringify(r.agent.asVersion(this.version))),void 0!==r.callback&&(e=function(t,e){var n=e;if(null===t)if(404===e.status)n=null;else if((n=new TinCan.AgentProfile({id:i,agent:r.agent,contents:e.responseText})).etag=void 0!==e.getResponseHeader&&null!==e.getResponseHeader("ETag")&&""!==e.getResponseHeader("ETag")?e.getResponseHeader("ETag"):TinCan.Utils.getSHA1String(e.responseText),void 0!==e.contentType?n.contentType=e.contentType:void 0!==e.getResponseHeader&&null!==e.getResponseHeader("Content-Type")&&""!==e.getResponseHeader("Content-Type")&&(n.contentType=e.getResponseHeader("Content-Type")),TinCan.Utils.isApplicationJSON(n.contentType))try{n.contents=JSON.parse(n.contents)}catch(t){a.log("retrieveAgentProfile - failed to deserialize JSON: "+t)}r.callback(t,n)},o.callback=e),t=this.sendRequest(o),!e&&((t.profile=null)===t.err&&404!==t.xhr.status&&(t.profile=new TinCan.AgentProfile({id:i,agent:r.agent,contents:t.xhr.responseText}),t.profile.etag=void 0!==t.xhr.getResponseHeader&&null!==t.xhr.getResponseHeader("ETag")&&""!==t.xhr.getResponseHeader("ETag")?t.xhr.getResponseHeader("ETag"):TinCan.Utils.getSHA1String(t.xhr.responseText),void 0!==t.xhr.contentType?t.profile.contentType=t.xhr.contentType:void 0!==t.xhr.getResponseHeader&&null!==t.xhr.getResponseHeader("Content-Type")&&""!==t.xhr.getResponseHeader("Content-Type")&&(t.profile.contentType=t.xhr.getResponseHeader("Content-Type")),TinCan.Utils.isApplicationJSON(t.profile.contentType))))try{t.profile.contents=JSON.parse(t.profile.contents)}catch(t){this.log("retrieveAgentProfile - failed to deserialize JSON: "+t)}return t},retrieveAgentProfileIds:function(i){this.log("retrieveAgentProfileIds");var t,e,n,r={};if(t={method:"GET",params:r,headers:(i=i||{}).requestHeaders||{},ignore404:!0},"0.9"===this.version?(t.url="actors/profile",r.actor=JSON.stringify(i.agent.asVersion(this.version))):(t.url="agents/profile",r.agent=JSON.stringify(i.agent.asVersion(this.version))),void 0!==i.callback&&(n=function(e,t){var n=t;if(null===e){if(404===t.status)n=[];else try{n=JSON.parse(t.responseText)}catch(t){e="Response JSON parse error: "+t}i.callback(e,n)}else i.callback(e,n)},t.callback=n),void 0!==i.since&&(t.params.since=i.since),e=this.sendRequest(t),!n){if((e.profileIds=null)!==e.err)return e;if(404===e.xhr.status)e.profileIds=[];else try{e.profileIds=JSON.parse(e.xhr.responseText)}catch(t){e.err="retrieveAgentProfileIds - JSON parse error: "+t}}return e},saveAgentProfile:function(t,e,n){var i,r;return this.log("saveAgentProfile"),r=n.requestHeaders||{},void 0===n.contentType&&(n.contentType="application/octet-stream"),r["Content-Type"]=n.contentType,(void 0===n.method||"POST"!==n.method)&&(n.method="PUT"),"object"==typeof e&&TinCan.Utils.isApplicationJSON(n.contentType)&&(e=JSON.stringify(e)),i={method:n.method,params:{profileId:t},data:e,headers:r},"0.9"===this.version?(i.url="actors/profile",i.params.actor=JSON.stringify(n.agent.asVersion(this.version))):(i.url="agents/profile",i.params.agent=JSON.stringify(n.agent.asVersion(this.version))),void 0!==n.callback&&(i.callback=n.callback),void 0!==n.lastSHA1&&null!==n.lastSHA1?i.headers["If-Match"]=n.lastSHA1:i.headers["If-None-Match"]="*",this.sendRequest(i)},dropAgentProfile:function(t,e){var n,i;return this.log("dropAgentProfile"),i={method:"DELETE",params:n={profileId:t},headers:e.requestHeaders||{}},"0.9"===this.version?(i.url="actors/profile",n.actor=JSON.stringify(e.agent.asVersion(this.version))):(i.url="agents/profile",n.agent=JSON.stringify(e.agent.asVersion(this.version))),void 0!==e.callback&&(i.callback=e.callback),this.sendRequest(i)}},t.syncEnabled=null}(),function(){"use strict";var n=TinCan.AgentAccount=function(t){this.log("constructor"),this.homePage=null,this.name=null,this.init(t)};n.prototype={LOG_SRC:"AgentAccount",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["name","homePage"];for(void 0!==(t=t||{}).accountServiceHomePage&&(t.homePage=t.accountServiceHomePage),void 0!==t.accountName&&(t.name=t.accountName),e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]])},toString:function(){this.log("toString");var t="";return null!==this.name||null!==this.homePage?(t+=null!==this.name?this.name:"-",t+=":",t+=null!==this.homePage?this.homePage:"-"):t="AgentAccount: unidentified",t},asVersion:function(t){this.log("asVersion: "+t);var e={};return"0.9"===(t=t||TinCan.versions()[0])?(e.accountName=this.name,e.accountServiceHomePage=this.homePage):(e.name=this.name,e.homePage=this.homePage),e}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.Agent=function(t){this.log("constructor"),this.name=null,this.mbox=null,this.mbox_sha1sum=null,this.openid=null,this.account=null,this.degraded=!1,this.init(t)};n.prototype={objectType:"Agent",LOG_SRC:"Agent",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n,i=["name","mbox","mbox_sha1sum","openid"];for(void 0!==(t=t||{}).lastName||void 0!==t.firstName?(t.name="",void 0!==t.firstName&&0<t.firstName.length&&(t.name=t.firstName[0],1<t.firstName.length&&(this.degraded=!0)),""!==t.name&&(t.name+=" "),void 0!==t.lastName&&0<t.lastName.length&&(t.name+=t.lastName[0],1<t.lastName.length&&(this.degraded=!0))):(void 0!==t.familyName||void 0!==t.givenName)&&(t.name="",void 0!==t.givenName&&0<t.givenName.length&&(t.name=t.givenName[0],1<t.givenName.length&&(this.degraded=!0)),""!==t.name&&(t.name+=" "),void 0!==t.familyName&&0<t.familyName.length&&(t.name+=t.familyName[0],1<t.familyName.length&&(this.degraded=!0))),"object"==typeof t.name&&null!==t.name&&(1<t.name.length&&(this.degraded=!0),t.name=t.name[0]),"object"==typeof t.mbox&&null!==t.mbox&&(1<t.mbox.length&&(this.degraded=!0),t.mbox=t.mbox[0]),"object"==typeof t.mbox_sha1sum&&null!==t.mbox_sha1sum&&(1<t.mbox_sha1sum.length&&(this.degraded=!0),t.mbox_sha1sum=t.mbox_sha1sum[0]),"object"==typeof t.openid&&null!==t.openid&&(1<t.openid.length&&(this.degraded=!0),t.openid=t.openid[0]),"object"==typeof t.account&&null!==t.account&&void 0===t.account.homePage&&void 0===t.account.name&&(0===t.account.length?delete t.account:(1<t.account.length&&(this.degraded=!0),t.account=t.account[0])),t.hasOwnProperty("account")&&(this.account=t.account instanceof TinCan.AgentAccount?t.account:new TinCan.AgentAccount(t.account)),e=0;e<i.length;e+=1)t.hasOwnProperty(i[e])&&null!==t[i[e]]&&(n=t[i[e]],"mbox"===i[e]&&-1===n.indexOf("mailto:")&&(n="mailto:"+n),this[i[e]]=n)},toString:function(){return this.log("toString"),null!==this.name?this.name:null!==this.mbox?this.mbox.replace("mailto:",""):null!==this.mbox_sha1sum?this.mbox_sha1sum:null!==this.openid?this.openid:null!==this.account?this.account.toString():this.objectType+": unidentified"},asVersion:function(t){this.log("asVersion: "+t);var e={objectType:this.objectType};return"0.9"===(t=t||TinCan.versions()[0])?(null!==this.mbox?e.mbox=[this.mbox]:null!==this.mbox_sha1sum?e.mbox_sha1sum=[this.mbox_sha1sum]:null!==this.openid?e.openid=[this.openid]:null!==this.account&&(e.account=[this.account.asVersion(t)]),null!==this.name&&(e.name=[this.name])):(null!==this.mbox?e.mbox=this.mbox:null!==this.mbox_sha1sum?e.mbox_sha1sum=this.mbox_sha1sum:null!==this.openid?e.openid=this.openid:null!==this.account&&(e.account=this.account.asVersion(t)),null!==this.name&&(e.name=this.name)),e}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.Group=function(t){this.log("constructor"),this.name=null,this.mbox=null,this.mbox_sha1sum=null,this.openid=null,this.account=null,this.member=[],this.init(t)};n.prototype={objectType:"Group",LOG_SRC:"Group",log:TinCan.prototype.log,init:function(t){var e;if(this.log("init"),t=t||{},TinCan.Agent.prototype.init.call(this,t),void 0!==t.member)for(e=0;e<t.member.length;e+=1)this.member.push(t.member[e]instanceof TinCan.Agent?t.member[e]:new TinCan.Agent(t.member[e]))},toString:function(t){this.log("toString");var e=TinCan.Agent.prototype.toString.call(this,t);return e!==this.objectType+": unidentified"&&(e=this.objectType+": "+e),e},asVersion:function(t){var e,n;if(this.log("asVersion: "+t),t=t||TinCan.versions()[0],e=TinCan.Agent.prototype.asVersion.call(this,t),0<this.member.length)for(e.member=[],n=0;n<this.member.length;n+=1)e.member.push(this.member[n].asVersion(t));return e}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var r={"http://adlnet.gov/expapi/verbs/experienced":"experienced","http://adlnet.gov/expapi/verbs/attended":"attended","http://adlnet.gov/expapi/verbs/attempted":"attempted","http://adlnet.gov/expapi/verbs/completed":"completed","http://adlnet.gov/expapi/verbs/passed":"passed","http://adlnet.gov/expapi/verbs/failed":"failed","http://adlnet.gov/expapi/verbs/answered":"answered","http://adlnet.gov/expapi/verbs/interacted":"interacted","http://adlnet.gov/expapi/verbs/imported":"imported","http://adlnet.gov/expapi/verbs/created":"created","http://adlnet.gov/expapi/verbs/shared":"shared","http://adlnet.gov/expapi/verbs/voided":"voided"},n=TinCan.Verb=function(t){this.log("constructor"),this.id=null,this.display=null,this.init(t)};n.prototype={LOG_SRC:"Verb",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n,i=["id","display"];if("string"==typeof t){for(n in this.id=t,this.display={und:this.id},r)if(r.hasOwnProperty(n)&&r[n]===t){this.id=n;break}}else{for(t=t||{},e=0;e<i.length;e+=1)t.hasOwnProperty(i[e])&&null!==t[i[e]]&&(this[i[e]]=t[i[e]]);null===this.display&&void 0!==r[this.id]&&(this.display={und:r[this.id]})}},toString:function(t){return this.log("toString"),null!==this.display?this.getLangDictionaryValue("display",t):this.id},asVersion:function(t){var e;return this.log("asVersion"),"0.9"===(t=t||TinCan.versions()[0])?e=r[this.id]:(e={id:this.id},null!==this.display&&(e.display=this.display)),e},getLangDictionaryValue:TinCan.Utils.getLangDictionaryValue},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.Result=function(t){this.log("constructor"),this.score=null,this.success=null,this.completion=null,this.duration=null,this.response=null,this.extensions=null,this.init(t)};n.prototype={LOG_SRC:"Result",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["completion","duration","extensions","response","success"];for((t=t||{}).hasOwnProperty("score")&&null!==t.score&&(this.score=t.score instanceof TinCan.Score?t.score:new TinCan.Score(t.score)),e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]]);"Completed"===this.completion&&(this.completion=!0)},asVersion:function(t){this.log("asVersion");var e,n={},i=["success","duration","response","extensions"],r=["score"];for(t=t||TinCan.versions()[0],e=0;e<i.length;e+=1)null!==this[i[e]]&&(n[i[e]]=this[i[e]]);for(e=0;e<r.length;e+=1)null!==this[r[e]]&&(n[r[e]]=this[r[e]].asVersion(t));return null!==this.completion&&("0.9"===t?this.completion&&(n.completion="Completed"):n.completion=this.completion),n}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.Score=function(t){this.log("constructor"),this.scaled=null,this.raw=null,this.min=null,this.max=null,this.init(t)};n.prototype={LOG_SRC:"Score",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["scaled","raw","min","max"];for(t=t||{},e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]])},asVersion:function(t){this.log("asVersion");var e,n={},i=["scaled","raw","min","max"];for(t=t||TinCan.versions()[0],e=0;e<i.length;e+=1)null!==this[i[e]]&&(n[i[e]]=this[i[e]]);return n}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.InteractionComponent=function(t){this.log("constructor"),this.id=null,this.description=null,this.init(t)};n.prototype={LOG_SRC:"InteractionComponent",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["id","description"];for(t=t||{},e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]])},asVersion:function(t){this.log("asVersion");var e,n,i={id:this.id},r=["description"];for(t=t||TinCan.versions()[0],e=0;e<r.length;e+=1)null!==this[n=r[e]]&&(i[n]=this[n]);return i},getLangDictionaryValue:TinCan.Utils.getLangDictionaryValue},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var s={"http://adlnet.gov/expapi/activities/course":"course","http://adlnet.gov/expapi/activities/module":"module","http://adlnet.gov/expapi/activities/meeting":"meeting","http://adlnet.gov/expapi/activities/media":"media","http://adlnet.gov/expapi/activities/performance":"performance","http://adlnet.gov/expapi/activities/simulation":"simulation","http://adlnet.gov/expapi/activities/assessment":"assessment","http://adlnet.gov/expapi/activities/interaction":"interaction","http://adlnet.gov/expapi/activities/cmi.interaction":"cmi.interaction","http://adlnet.gov/expapi/activities/question":"question","http://adlnet.gov/expapi/activities/objective":"objective","http://adlnet.gov/expapi/activities/link":"link"},n=TinCan.ActivityDefinition=function(t){this.log("constructor"),this.name=null,this.description=null,this.type=null,this.moreInfo=null,this.extensions=null,this.interactionType=null,this.correctResponsesPattern=null,this.choices=null,this.scale=null,this.source=null,this.target=null,this.steps=null,this.init(t)};n.prototype={LOG_SRC:"ActivityDefinition",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n,i,r=["name","description","moreInfo","extensions","correctResponsesPattern"],o=[];if((t=t||{}).hasOwnProperty("type")&&null!==t.type){for(i in s)s.hasOwnProperty(i)&&s[i]===t.type&&(t.type=s[i]);this.type=t.type}if(t.hasOwnProperty("interactionType")&&null!==t.interactionType&&(this.interactionType=t.interactionType,"choice"===t.interactionType||"sequencing"===t.interactionType?o.push("choices"):"likert"===t.interactionType?o.push("scale"):"matching"===t.interactionType?(o.push("source"),o.push("target")):"performance"===t.interactionType&&o.push("steps"),0<o.length))for(e=0;e<o.length;e+=1)if(i=o[e],t.hasOwnProperty(i)&&null!==t[i])for(this[i]=[],n=0;n<t[i].length;n+=1)this[i].push(t[i][n]instanceof TinCan.InteractionComponent?t[i][n]:new TinCan.InteractionComponent(t[i][n]));for(e=0;e<r.length;e+=1)t.hasOwnProperty(r[e])&&null!==t[r[e]]&&(this[r[e]]=t[r[e]])},toString:function(t){return this.log("toString"),null!==this.name?this.getLangDictionaryValue("name",t):null!==this.description?this.getLangDictionaryValue("description",t):""},asVersion:function(t){this.log("asVersion");var e,n,i,r={},o=["name","description","interactionType","correctResponsesPattern","extensions"],a=["choices","scale","source","target","steps"];for(t=t||TinCan.versions()[0],null!==this.type&&(r.type="0.9"===t?s[this.type]:this.type),e=0;e<o.length;e+=1)null!==this[i=o[e]]&&(r[i]=this[i]);for(e=0;e<a.length;e+=1)if(null!==this[i=a[e]])for(r[i]=[],n=0;n<this[i].length;n+=1)r[i].push(this[i][n].asVersion(t));return 0!==t.indexOf("0.9")&&null!==this.moreInfo&&(r.moreInfo=this.moreInfo),r},getLangDictionaryValue:TinCan.Utils.getLangDictionaryValue},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.Activity=function(t){this.log("constructor"),this.objectType="Activity",this.id=null,this.definition=null,this.init(t)};n.prototype={LOG_SRC:"Activity",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["id"];for((t=t||{}).hasOwnProperty("definition")&&(this.definition=t.definition instanceof TinCan.ActivityDefinition?t.definition:new TinCan.ActivityDefinition(t.definition)),e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]])},toString:function(t){this.log("toString");var e="";return null!==this.definition&&""!==(e=this.definition.toString(t))?e:null!==this.id?this.id:"Activity: unidentified"},asVersion:function(t){this.log("asVersion");var e={id:this.id,objectType:this.objectType};return t=t||TinCan.versions()[0],null!==this.definition&&(e.definition=this.definition.asVersion(t)),e}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.ContextActivities=function(t){this.log("constructor"),this.category=null,this.parent=null,this.grouping=null,this.other=null,this.init(t)};n.prototype={LOG_SRC:"ContextActivities",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n,i,r,o=["category","parent","grouping","other"];for(t=t||{},e=0;e<o.length;e+=1)if(i=o[e],t.hasOwnProperty(i)&&null!==t[i])if("[object Array]"===Object.prototype.toString.call(t[i]))for(n=0;n<t[i].length;n+=1)this.add(i,t[i][n]);else r=t[i],this.add(i,r)},add:function(t,e){return"category"===t||"parent"===t||"grouping"===t||"other"===t?(null===this[t]&&(this[t]=[]),e instanceof TinCan.Activity||(e="string"==typeof e?{id:e}:e,e=new TinCan.Activity(e)),this[t].push(e),this[t].length-1):void 0},asVersion:function(t){this.log("asVersion");var e,n,i={},r=["parent","grouping","other"];for(t=t||TinCan.versions()[0],e=0;e<r.length;e+=1)if(null!==this[r[e]]&&0<this[r[e]].length)if("0.9"===t||"0.95"===t)1<this[r[e]].length&&this.log("[warning] version does not support multiple values in: "+r[e]),i[r[e]]=this[r[e]][0].asVersion(t);else for(i[r[e]]=[],n=0;n<this[r[e]].length;n+=1)i[r[e]].push(this[r[e]][n].asVersion(t));if(null!==this.category&&0<this.category.length){if("0.9"===t||"0.95"===t)throw this.log("[error] version does not support the 'category' property: "+t),new Error(t+" does not support the 'category' property");for(i.category=[],e=0;e<this.category.length;e+=1)i.category.push(this.category[e].asVersion(t))}return i}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.Context=function(t){this.log("constructor"),this.registration=null,this.instructor=null,this.team=null,this.contextActivities=null,this.revision=null,this.platform=null,this.language=null,this.statement=null,this.extensions=null,this.init(t)};n.prototype={LOG_SRC:"Context",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n,i,r=["registration","revision","platform","language","extensions"],o=["instructor","team"];for(t=t||{},e=0;e<r.length;e+=1)n=r[e],t.hasOwnProperty(n)&&null!==t[n]&&(this[n]=t[n]);for(e=0;e<o.length;e+=1)n=o[e],t.hasOwnProperty(n)&&null!==t[n]&&((void 0===(i=t[n]).objectType||"Person"===i.objectType)&&(i.objectType="Agent"),"Agent"!==i.objectType||i instanceof TinCan.Agent?"Group"!==i.objectType||i instanceof TinCan.Group||(i=new TinCan.Group(i)):i=new TinCan.Agent(i),this[n]=i);t.hasOwnProperty("contextActivities")&&null!==t.contextActivities&&(this.contextActivities=t.contextActivities instanceof TinCan.ContextActivities?t.contextActivities:new TinCan.ContextActivities(t.contextActivities)),t.hasOwnProperty("statement")&&null!==t.statement&&(t.statement instanceof TinCan.StatementRef?this.statement=t.statement:t.statement instanceof TinCan.SubStatement?this.statement=t.statement:"StatementRef"===t.statement.objectType?this.statement=new TinCan.StatementRef(t.statement):"SubStatement"===t.statement.objectType?this.statement=new TinCan.SubStatement(t.statement):this.log("Unable to parse statement.context.statement property."))},asVersion:function(t){this.log("asVersion");var e,n={},i=["registration","revision","platform","language","extensions"],r=["instructor","team","contextActivities","statement"];if(t=t||TinCan.versions()[0],this.statement instanceof TinCan.SubStatement&&"0.9"!==t&&"0.95"!==t)throw this.log("[error] version does not support SubStatements in the 'statement' property: "+t),new Error(t+" does not support SubStatements in the 'statement' property");for(e=0;e<i.length;e+=1)null!==this[i[e]]&&(n[i[e]]=this[i[e]]);for(e=0;e<r.length;e+=1)null!==this[r[e]]&&(n[r[e]]=this[r[e]].asVersion(t));return n}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.StatementRef=function(t){this.log("constructor"),this.id=null,this.init(t)};n.prototype={objectType:"StatementRef",LOG_SRC:"StatementRef",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["id"];for(t=t||{},e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]])},toString:function(){return this.log("toString"),this.id},asVersion:function(t){this.log("asVersion");var e={objectType:this.objectType,id:this.id};return"0.9"===t&&(e.objectType="Statement"),e}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.SubStatement=function(t){this.log("constructor"),this.actor=null,this.verb=null,this.target=null,this.result=null,this.context=null,this.timestamp=null,this.init(t)};n.prototype={objectType:"SubStatement",LOG_SRC:"SubStatement",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["timestamp"];for((t=t||{}).hasOwnProperty("object")&&(t.target=t.object),t.hasOwnProperty("actor")&&((void 0===t.actor.objectType||"Person"===t.actor.objectType)&&(t.actor.objectType="Agent"),"Agent"===t.actor.objectType?this.actor=t.actor instanceof TinCan.Agent?t.actor:new TinCan.Agent(t.actor):"Group"===t.actor.objectType&&(this.actor=t.actor instanceof TinCan.Group?t.actor:new TinCan.Group(t.actor))),t.hasOwnProperty("verb")&&(this.verb=t.verb instanceof TinCan.Verb?t.verb:new TinCan.Verb(t.verb)),t.hasOwnProperty("target")&&(t.target instanceof TinCan.Activity||t.target instanceof TinCan.Agent||t.target instanceof TinCan.Group||t.target instanceof TinCan.SubStatement||t.target instanceof TinCan.StatementRef?this.target=t.target:(void 0===t.target.objectType&&(t.target.objectType="Activity"),"Activity"===t.target.objectType?this.target=new TinCan.Activity(t.target):"Agent"===t.target.objectType?this.target=new TinCan.Agent(t.target):"Group"===t.target.objectType?this.target=new TinCan.Group(t.target):"SubStatement"===t.target.objectType?this.target=new TinCan.SubStatement(t.target):"StatementRef"===t.target.objectType?this.target=new TinCan.StatementRef(t.target):this.log("Unrecognized target type: "+t.target.objectType))),t.hasOwnProperty("result")&&(this.result=t.result instanceof TinCan.Result?t.result:new TinCan.Result(t.result)),t.hasOwnProperty("context")&&(this.context=t.context instanceof TinCan.Context?t.context:new TinCan.Context(t.context)),e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]])},toString:function(t){return this.log("toString"),(null!==this.actor?this.actor.toString(t):"")+" "+(null!==this.verb?this.verb.toString(t):"")+" "+(null!==this.target?this.target.toString(t):"")},asVersion:function(t){this.log("asVersion");var e,n,i=["timestamp"],r=["actor","verb","result","context"];for(e={objectType:this.objectType},t=t||TinCan.versions()[0],n=0;n<i.length;n+=1)null!==this[i[n]]&&(e[i[n]]=this[i[n]]);for(n=0;n<r.length;n+=1)null!==this[r[n]]&&(e[r[n]]=this[r[n]].asVersion(t));return null!==this.target&&(e.object=this.target.asVersion(t)),"0.9"===t&&(e.objectType="Statement"),e}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.Statement=function(t,e){this.log("constructor"),void 0===(e="number"==typeof e?{storeOriginal:e}:e||{}).storeOriginal&&(e.storeOriginal=null),void 0===e.doStamp&&(e.doStamp=!0),this.id=null,this.actor=null,this.verb=null,this.target=null,this.result=null,this.context=null,this.timestamp=null,this.stored=null,this.authority=null,this.version=null,this.degraded=!1,this.voided=null,this.inProgress=null,this.originalJSON=null,this.init(t,e)};n.prototype={LOG_SRC:"Statement",log:TinCan.prototype.log,init:function(t,e){this.log("init");var n,i=["id","stored","timestamp","version","inProgress","voided"];for(t=t||{},e.storeOriginal&&(this.originalJSON=JSON.stringify(t,null,e.storeOriginal)),t.hasOwnProperty("object")&&(t.target=t.object),t.hasOwnProperty("actor")&&((void 0===t.actor.objectType||"Person"===t.actor.objectType)&&(t.actor.objectType="Agent"),"Agent"===t.actor.objectType?this.actor=t.actor instanceof TinCan.Agent?t.actor:new TinCan.Agent(t.actor):"Group"===t.actor.objectType&&(this.actor=t.actor instanceof TinCan.Group?t.actor:new TinCan.Group(t.actor))),t.hasOwnProperty("authority")&&((void 0===t.authority.objectType||"Person"===t.authority.objectType)&&(t.authority.objectType="Agent"),"Agent"===t.authority.objectType?this.authority=t.authority instanceof TinCan.Agent?t.authority:new TinCan.Agent(t.authority):"Group"===t.authority.objectType&&(this.authority=t.actor instanceof TinCan.Group?t.authority:new TinCan.Group(t.authority))),t.hasOwnProperty("verb")&&(this.verb=t.verb instanceof TinCan.Verb?t.verb:new TinCan.Verb(t.verb)),t.hasOwnProperty("target")&&(t.target instanceof TinCan.Activity||t.target instanceof TinCan.Agent||t.target instanceof TinCan.Group||t.target instanceof TinCan.SubStatement||t.target instanceof TinCan.StatementRef?this.target=t.target:(void 0===t.target.objectType&&(t.target.objectType="Activity"),"Activity"===t.target.objectType?this.target=new TinCan.Activity(t.target):"Agent"===t.target.objectType?this.target=new TinCan.Agent(t.target):"Group"===t.target.objectType?this.target=new TinCan.Group(t.target):"SubStatement"===t.target.objectType?this.target=new TinCan.SubStatement(t.target):"StatementRef"===t.target.objectType?this.target=new TinCan.StatementRef(t.target):this.log("Unrecognized target type: "+t.target.objectType))),t.hasOwnProperty("result")&&(this.result=t.result instanceof TinCan.Result?t.result:new TinCan.Result(t.result)),t.hasOwnProperty("context")&&(this.context=t.context instanceof TinCan.Context?t.context:new TinCan.Context(t.context)),n=0;n<i.length;n+=1)t.hasOwnProperty(i[n])&&null!==t[i[n]]&&(this[i[n]]=t[i[n]]);e.doStamp&&this.stamp()},toString:function(t){return this.log("toString"),(null!==this.actor?this.actor.toString(t):"")+" "+(null!==this.verb?this.verb.toString(t):"")+" "+(null!==this.target?this.target.toString(t):"")},asVersion:function(t){this.log("asVersion");var e,n={},i=["id","timestamp"],r=["actor","verb","result","context","authority"];for(t=t||TinCan.versions()[0],e=0;e<i.length;e+=1)null!==this[i[e]]&&(n[i[e]]=this[i[e]]);for(e=0;e<r.length;e+=1)null!==this[r[e]]&&(n[r[e]]=this[r[e]].asVersion(t));return null!==this.target&&(n.object=this.target.asVersion(t)),("0.9"===t||"0.95"===t)&&null!==this.voided&&(n.voided=this.voided),"0.9"===t&&null!==this.inProgress&&(n.inProgress=this.inProgress),n},stamp:function(){this.log("stamp"),null===this.id&&(this.id=TinCan.Utils.getUUID()),null===this.timestamp&&(this.timestamp=TinCan.Utils.getISODateString(new Date))}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var o=TinCan.StatementsResult=function(t){this.log("constructor"),this.statements=null,this.more=null,this.init(t)};o.prototype={LOG_SRC:"StatementsResult",log:TinCan.prototype.log,init:function(t){this.log("init"),(t=t||{}).hasOwnProperty("statements")&&(this.statements=t.statements),t.hasOwnProperty("more")&&(this.more=t.more)}},o.fromJSON=function(t){o.prototype.log("fromJSON");var e,n,i,r=[];try{e=JSON.parse(t)}catch(t){o.prototype.log("fromJSON - JSON.parse error: "+t)}if(e){for(i=0;i<e.statements.length;i+=1){try{n=new TinCan.Statement(e.statements[i],4)}catch(t){o.prototype.log("fromJSON - statement instantiation failed: "+t+" ("+JSON.stringify(e.statements[i])+")"),n=new TinCan.Statement({id:e.statements[i].id},4)}r.push(n)}e.statements=r}return new o(e)}}(),function(){"use strict";var n=TinCan.State=function(t){this.log("constructor"),this.id=null,this.updated=null,this.contents=null,this.etag=null,this.contentType=null,this.init(t)};n.prototype={LOG_SRC:"State",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["id","contents","etag","contentType"];for(t=t||{},e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]]);this.updated=!1}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.ActivityProfile=function(t){this.log("constructor"),this.id=null,this.activity=null,this.updated=null,this.contents=null,this.etag=null,this.contentType=null,this.init(t)};n.prototype={LOG_SRC:"ActivityProfile",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["id","contents","etag","contentType"];for((t=t||{}).hasOwnProperty("activity")&&(this.activity=t.activity instanceof TinCan.Activity?t.activity:new TinCan.Activity(t.activity)),e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]]);this.updated=!1}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.AgentProfile=function(t){this.log("constructor"),this.id=null,this.agent=null,this.updated=null,this.contents=null,this.etag=null,this.contentType=null,this.init(t)};n.prototype={LOG_SRC:"AgentProfile",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["id","contents","etag","contentType"];for((t=t||{}).hasOwnProperty("agent")&&(this.agent=t.agent instanceof TinCan.Agent?t.agent:new TinCan.Agent(t.agent)),e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]]);this.updated=!1}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.About=function(t){this.log("constructor"),this.version=null,this.init(t)};n.prototype={LOG_SRC:"About",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["version"];for(t=t||{},e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]])}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var LOG_SRC="Environment.Browser",nativeRequest,xdrRequest,requestComplete,__delay,__IEModeConversion,env={},log=TinCan.prototype.log;"undefined"==typeof window?log("'window' not defined",LOG_SRC):(window.JSON||(window.JSON={parse:function(sJSON){return eval("("+sJSON+")")},stringify:function(t){var e,n,i="";if(t instanceof Object){if(t.constructor===Array){for(e=0;e<t.length;e+=1)i+=this.stringify(t[e])+",";return"["+i.substr(0,i.length-1)+"]"}if(t.toString!==Object.prototype.toString)return'"'+t.toString().replace(/"/g,"\\$&")+'"';for(n in t)t.hasOwnProperty(n)&&(i+='"'+n.replace(/"/g,"\\$&")+'":'+this.stringify(t[n])+",");return"{"+i.substr(0,i.length-1)+"}"}return"string"==typeof t?'"'+t.replace(/"/g,"\\$&")+'"':String(t)}}),Date.now||(Date.now=function(){return+new Date}),env.hasCORS=!1,env.useXDR=!1,"undefined"!=typeof XMLHttpRequest&&void 0!==(new XMLHttpRequest).withCredentials?env.hasCORS=!0:"undefined"!=typeof XDomainRequest&&(env.hasCORS=!0,env.useXDR=!0),requestComplete=function(t,e,n){var i,r,o;return log("requestComplete: "+n.finished+", xhr.status: "+t.status,LOG_SRC),o=void 0===t.status?n.fakeStatus:1223===t.status?204:t.status,n.finished?i:(n.finished=!0,r=e.ignore404&&404===o,200<=o&&o<400||r?e.callback?void e.callback(null,t):i={err:null,xhr:t}:(i={err:o,xhr:t},log(0===o?"[warning] There was a problem communicating with the Learning Record Store. Aborted, offline, or invalid CORS endpoint ("+o+")":"[warning] There was a problem communicating with the Learning Record Store. ("+o+" | "+t.responseText+")",LOG_SRC),e.callback&&e.callback(o,t),i))},__IEModeConversion=function(t,e,n,i){var r;for(r in e)e.hasOwnProperty(r)&&n.push(r+"="+encodeURIComponent(e[r]));return void 0!==i.data&&n.push("content="+encodeURIComponent(i.data)),e["Content-Type"]="application/x-www-form-urlencoded",t+="?method="+i.method,i.method="POST",i.params={},0<n.length&&(i.data=n.join("&")),t},nativeRequest=function(t,e,n){log("sendRequest using XMLHttpRequest",LOG_SRC);var i,r,o,a,s=this,l=[],c={finished:!1,fakeStatus:null},u=void 0!==n.callback,h=t,d=2048;for(r in log("sendRequest using XMLHttpRequest - async: "+u,LOG_SRC),n.params)n.params.hasOwnProperty(r)&&l.push(r+"="+encodeURIComponent(n.params[r]));if(0<l.length&&(h+="?"+l.join("&")),h.length>=d){if(void 0!==e["Content-Type"]&&"application/json"!==e["Content-Type"])return a=new Error("Unsupported content type for IE Mode request"),void 0!==n.callback&&n.callback(a,null),{err:a,xhr:null};if(void 0===n.method)return a=new Error("method must not be undefined for an IE Mode Request conversion"),void 0!==n.callback&&n.callback(a,null),{err:a,xhr:null};t=__IEModeConversion(t,e,l,n)}else t=h;for(r in(i="undefined"!=typeof XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")).open(n.method,t,u),e)e.hasOwnProperty(r)&&i.setRequestHeader(r,e[r]);void 0!==n.data&&(n.data+=""),o=n.data,u&&(i.onreadystatechange=function(){log("xhr.onreadystatechange - xhr.readyState: "+i.readyState,LOG_SRC),4===i.readyState&&requestComplete.call(s,i,n,c)});try{i.send(o)}catch(t){log("sendRequest caught send exception: "+t,LOG_SRC)}return u?i:requestComplete.call(this,i,n,c)},xdrRequest=function(t,e,n){log("sendRequest using XDomainRequest",LOG_SRC);var i,r,o,a,s,l=this,c=[],u={finished:!1,fakeStatus:null};if(void 0!==e["Content-Type"]&&"application/json"!==e["Content-Type"])return s=new Error("Unsupported content type for IE Mode request"),n.callback?(n.callback(s,null),null):{err:s,xhr:null};for(o in t+="?method="+n.method,n.params)n.params.hasOwnProperty(o)&&c.push(o+"="+encodeURIComponent(n.params[o]));for(o in e)e.hasOwnProperty(o)&&c.push(o+"="+encodeURIComponent(e[o]));void 0!==n.data&&c.push("content="+encodeURIComponent(n.data)),r=c.join("&"),(i=new XDomainRequest).open("POST",t),n.callback?(i.onload=function(){u.fakeStatus=200,requestComplete.call(l,i,n,u)},i.onerror=function(){u.fakeStatus=400,requestComplete.call(l,i,n,u)},i.ontimeout=function(){u.fakeStatus=0,requestComplete.call(l,i,n,u)}):(i.onload=function(){u.fakeStatus=200},i.onerror=function(){u.fakeStatus=400},i.ontimeout=function(){u.fakeStatus=0}),i.onprogress=function(){},i.timeout=0;try{i.send(r)}catch(t){log("sendRequest caught send exception: "+t,LOG_SRC)}if(n.callback)return i;for(a=1e4+Date.now(),log("sendRequest - until: "+a+", finished: "+u.finished,LOG_SRC);Date.now()<a&&null===u.fakeStatus;)__delay();return requestComplete.call(l,i,n,u)},TinCan.LRS.prototype._initByEnvironment=function(t){var e,n,i;if(log("_initByEnvironment",LOG_SRC),t=t||{},this._makeRequest=nativeRequest,this._IEModeConversion=__IEModeConversion,null===(e=this.endpoint.toLowerCase().match(/([A-Za-z]+:)\/\/([^:\/]+):?(\d+)?(\/.*)?$/)))throw log("[error] LRS invalid: failed to divide URL parts",LOG_SRC),{code:4,mesg:"LRS invalid: failed to divide URL parts"};if(i=location.port,n=location.protocol.toLowerCase()===e[1],""===i&&(i="http:"===location.protocol.toLowerCase()?"80":"https:"===location.protocol.toLowerCase()?"443":""),!n||location.hostname.toLowerCase()!==e[2]||i!==(null!==e[3]&&void 0!==e[3]&&""!==e[3]?e[3]:"http:"===e[1]?"80":"https:"===e[1]?"443":""))if(env.hasCORS){if(env.useXDR&&n)this._makeRequest=xdrRequest;else if(env.useXDR&&!n){if(!t.allowFail)throw log("[error] LRS invalid: cross domain request for differing scheme in IE with XDR",LOG_SRC),{code:2,mesg:"LRS invalid: cross domain request for differing scheme in IE with XDR"};log("[warning] LRS invalid: cross domain request for differing scheme in IE with XDR (allowed to fail)",LOG_SRC)}}else{if(!t.allowFail)throw log("[error] LRS invalid: cross domain requests not supported in this browser",LOG_SRC),{code:1,mesg:"LRS invalid: cross domain requests not supported in this browser"};log("[warning] LRS invalid: cross domain requests not supported in this browser (allowed to fail)",LOG_SRC)}},__delay=function(){var t=new XMLHttpRequest,e=window.location+"?forcenocache="+TinCan.Utils.getUUID();t.open("GET",e,!1),t.send(null)},TinCan.LRS.syncEnabled=!0)}();var CryptoJS=CryptoJS||function(s,n){var t={},e=t.lib={},i=e.Base=function(){function n(){}return{extend:function(t){n.prototype=this;var e=new n;return t&&e.mixIn(t),e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.$super.extend(this)}}}(),l=e.WordArray=i.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=e!=n?e:4*t.length},toString:function(t){return(t||o).stringify(this)},concat:function(t){var e=this.words,n=t.words,i=this.sigBytes;t=t.sigBytes;if(this.clamp(),i%4)for(var r=0;r<t;r++)e[i+r>>>2]|=(n[r>>>2]>>>24-r%4*8&255)<<24-(i+r)%4*8;else if(65535<n.length)for(r=0;r<t;r+=4)e[i+r>>>2]=n[r>>>2];else e.push.apply(e,n);return this.sigBytes+=t,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=s.ceil(e/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(4294967296*s.random()|0);return l.create(e,t)}}),r=t.enc={},o=r.Hex={stringify:function(t){for(var e=t.words,n=(t=t.sigBytes,[]),i=0;i<t;i++){var r=e[i>>>2]>>>24-i%4*8&255;n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,n=[],i=0;i<e;i+=2)n[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return l.create(n,e/2)}},a=r.Latin1={stringify:function(t){for(var e=t.words,n=(t=t.sigBytes,[]),i=0;i<t;i++)n.push(String.fromCharCode(e[i>>>2]>>>24-i%4*8&255));return n.join("")},parse:function(t){for(var e=t.length,n=[],i=0;i<e;i++)n[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return l.create(n,e)}},c=r.Utf8={stringify:function(t){try{return decodeURIComponent(escape(a.stringify(t)))}catch(t){throw Error("Malformed UTF-8 data")}},parse:function(t){return a.parse(unescape(encodeURIComponent(t)))}},u=e.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=l.create(),this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=c.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var e=this._data,n=e.words,i=e.sigBytes,r=this.blockSize,o=i/(4*r);t=(o=t?s.ceil(o):s.max((0|o)-this._minBufferSize,0))*r,i=s.min(4*t,i);if(t){for(var a=0;a<t;a+=r)this._doProcessBlock(n,a);a=n.splice(0,t),e.sigBytes-=i}return l.create(a,i)},clone:function(){var t=i.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});e.Hasher=u.extend({init:function(){this.reset()},reset:function(){u.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize(),this._hash},clone:function(){var t=u.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:16,_createHelper:function(n){return function(t,e){return n.create(e).finalize(t)}},_createHmacHelper:function(n){return function(t,e){return h.HMAC.create(n,e).finalize(t)}}});var h=t.algo={};return t}(Math),TinCan;if(function(){var t=CryptoJS,e=(n=t.lib).WordArray,n=n.Hasher,u=[],i=t.algo.SHA1=n.extend({_doReset:function(){this._hash=e.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,i=n[0],r=n[1],o=n[2],a=n[3],s=n[4],l=0;l<80;l++){if(l<16)u[l]=0|t[e+l];else{var c=u[l-3]^u[l-8]^u[l-14]^u[l-16];u[l]=c<<1|c>>>31}c=(i<<5|i>>>27)+s+u[l],c=l<20?c+(1518500249+(r&o|~r&a)):l<40?c+(1859775393+(r^o^a)):l<60?c+((r&o|r&a|o&a)-1894007588):c+((r^o^a)-899497514),s=a,a=o,o=r<<30|r>>>2,r=i,i=c}n[0]=n[0]+i|0,n[1]=n[1]+r|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32,e[15+(i+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process()}});t.SHA1=n._createHelper(i),t.HmacSHA1=n._createHmacHelper(i)}(),function(){var t=CryptoJS,u=t.lib.WordArray;t.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,i=this._map;t.clamp();for(var r=[],o=0;o<n;o+=3)for(var a=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<n;s++)r.push(i.charAt(a>>>6*(3-s)&63));var l=i.charAt(64);if(l)for(;r.length%4;)r.push(l);return r.join("")},parse:function(t){var e=(t=t.replace(/\s/g,"")).length,n=this._map,i=n.charAt(64);if(i){var r=t.indexOf(i);-1!=r&&(e=r)}for(var o=[],a=0,s=0;s<e;s++)if(s%4){var l=n.indexOf(t.charAt(s-1))<<s%4*2,c=n.indexOf(t.charAt(s))>>>6-s%4*2;o[a>>>2]|=(l|c)<<24-a%4*8,a++}return u.create(o,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(){"use strict";var l={statementId:!0,voidedStatementId:!0,verb:!0,object:!0,registration:!0,context:!0,actor:!0,since:!0,until:!0,limit:!0,authoritative:!0,sparse:!0,instructor:!0,ascending:!0,continueToken:!0,agent:!0,activityId:!0,stateId:!0,profileId:!0,activity_platform:!0,grouping:!0,"Accept-Language":!0};(TinCan=function(t){this.log("constructor"),this.recordStores=[],this.actor=null,this.activity=null,this.registration=null,this.context=null,this.init(t)}).prototype={LOG_SRC:"TinCan",log:function(t,e){TinCan.DEBUG&&"undefined"!=typeof console&&console.log&&(e=e||this.LOG_SRC||"TinCan",console.log("TinCan."+e+": "+t))},init:function(t){var e;if(this.log("init"),(t=t||{}).hasOwnProperty("url")&&""!==t.url&&this._initFromQueryString(t.url),t.hasOwnProperty("recordStores")&&void 0!==t.recordStores)for(e=0;e<t.recordStores.length;e+=1)this.addRecordStore(t.recordStores[e]);t.hasOwnProperty("activity")&&(t.activity instanceof TinCan.Activity?this.activity=t.activity:this.activity=new TinCan.Activity(t.activity)),t.hasOwnProperty("actor")&&(t.actor instanceof TinCan.Agent?this.actor=t.actor:this.actor=new TinCan.Agent(t.actor)),t.hasOwnProperty("context")&&(t.context instanceof TinCan.Context?this.context=t.context:this.context=new TinCan.Context(t.context)),t.hasOwnProperty("registration")&&(this.registration=t.registration)},_initFromQueryString:function(t){this.log("_initFromQueryString");var e,n,i,r=TinCan.Utils.parseURL(t).params,o=["endpoint","auth"],a={},s=null;if(r.hasOwnProperty("actor")){this.log("_initFromQueryString - found actor: "+r.actor);try{this.actor=TinCan.Agent.fromJSON(r.actor),delete r.actor}catch(t){this.log("_initFromQueryString - failed to set actor: "+t)}}if(r.hasOwnProperty("activity_id")&&(this.activity=new TinCan.Activity({id:r.activity_id}),delete r.activity_id),(r.hasOwnProperty("activity_platform")||r.hasOwnProperty("registration")||r.hasOwnProperty("grouping"))&&(i={},r.hasOwnProperty("activity_platform")&&(i.platform=r.activity_platform,delete r.activity_platform),r.hasOwnProperty("registration")&&(i.registration=this.registration=r.registration,delete r.registration),r.hasOwnProperty("grouping")&&(i.contextActivities={},i.contextActivities.grouping=r.grouping,delete r.grouping),this.context=new TinCan.Context(i)),r.hasOwnProperty("endpoint")){for(e=0;e<o.length;e+=1)n=o[e],r.hasOwnProperty(n)&&(a[n]=r[n],delete r[n]);for(e in r)r.hasOwnProperty(e)&&(l.hasOwnProperty(e)?delete r[e]:(s=s||{})[e]=r[e]);null!==s&&(a.extended=s),a.allowFail=!1,this.addRecordStore(a)}},addRecordStore:function(t){var e;this.log("addRecordStore"),e=t instanceof TinCan.LRS?t:new TinCan.LRS(t),this.recordStores.push(e)},prepareStatement:function(t){return this.log("prepareStatement"),t instanceof TinCan.Statement||(t=new TinCan.Statement(t)),null===t.actor&&null!==this.actor&&(t.actor=this.actor),null===t.target&&null!==this.activity&&(t.target=this.activity),null!==this.context&&(null===t.context?t.context=this.context:(null===t.context.registration&&(t.context.registration=this.context.registration),null===t.context.platform&&(t.context.platform=this.context.platform),null!==this.context.contextActivities&&(null===t.context.contextActivities?t.context.contextActivities=this.context.contextActivities:(null!==this.context.contextActivities.grouping&&null===t.context.contextActivities.grouping&&(t.context.contextActivities.grouping=this.context.contextActivities.grouping),null!==this.context.contextActivities.parent&&null===t.context.contextActivities.parent&&(t.context.contextActivities.parent=this.context.contextActivities.parent),null!==this.context.contextActivities.other&&null===t.context.contextActivities.other&&(t.context.contextActivities.other=this.context.contextActivities.other))))),t},sendStatement:function(t,i){this.log("sendStatement");var e,n,r,o=this,a=this.prepareStatement(t),s=this.recordStores.length,l=[],c=[];if(0<s)for("function"==typeof i&&(r=function(t,e){var n;o.log("sendStatement - callbackWrapper: "+s),1<s?(s-=1,c.push({err:t,xhr:e})):1===s?(c.push({err:t,xhr:e}),n=[c,a],i.apply(this,n)):o.log("sendStatement - unexpected record store count: "+s)}),n=0;n<s;n+=1)e=this.recordStores[n],l.push(e.saveStatement(a,{callback:r}));else this.log("[warning] sendStatement: No LRSs added yet (statement not sent)"),"function"==typeof i&&i.apply(this,[null,a]);return{statement:a,results:l}},getStatement:function(t,e){if(this.log("getStatement"),0<this.recordStores.length)return this.recordStores[0].retrieveStatement(t,{callback:e});this.log("[warning] getStatement: No LRSs added yet (statement not retrieved)")},voidStatement:function(t,i,e){this.log("voidStatement");var n,r,o,a,s,l=this,c=this.recordStores.length,u=[],h=[];if(t instanceof TinCan.Statement&&(t=t.id),void 0!==e.actor?r=e.actor:null!==this.actor&&(r=this.actor),o=new TinCan.Statement({actor:r,verb:{id:"http://adlnet.gov/expapi/verbs/voided"},target:{objectType:"StatementRef",id:t}}),0<c)for("function"==typeof i&&(s=function(t,e){var n;l.log("voidStatement - callbackWrapper: "+c),1<c?(c-=1,h.push({err:t,xhr:e})):1===c?(h.push({err:t,xhr:e}),n=[h,o],i.apply(this,n)):l.log("voidStatement - unexpected record store count: "+c)}),a=0;a<c;a+=1)n=this.recordStores[a],u.push(n.saveStatement(o,{callback:s}));else this.log("[warning] voidStatement: No LRSs added yet (statement not sent)"),"function"==typeof i&&i.apply(this,[null,o]);return{statement:o,results:u}},getVoidedStatement:function(t,e){if(this.log("getVoidedStatement"),0<this.recordStores.length)return this.recordStores[0].retrieveVoidedStatement(t,{callback:e});this.log("[warning] getVoidedStatement: No LRSs added yet (statement not retrieved)")},sendStatements:function(t,i){this.log("sendStatements");var e,n,r,o=this,a=[],s=this.recordStores.length,l=[],c=[];if(0===t.length)"function"==typeof i&&i.apply(this,[null,a]);else{for(n=0;n<t.length;n+=1)a.push(this.prepareStatement(t[n]));if(0<s)for("function"==typeof i&&(r=function(t,e){var n;o.log("sendStatements - callbackWrapper: "+s),1<s?(s-=1,c.push({err:t,xhr:e})):1===s?(c.push({err:t,xhr:e}),n=[c,a],i.apply(this,n)):o.log("sendStatements - unexpected record store count: "+s)}),n=0;n<s;n+=1)e=this.recordStores[n],l.push(e.saveStatements(a,{callback:r}));else this.log("[warning] sendStatements: No LRSs added yet (statements not sent)"),"function"==typeof i&&i.apply(this,[null,a])}return{statements:a,results:l}},getStatements:function(t){this.log("getStatements");var e,n,i={};if(0<this.recordStores.length)return e=this.recordStores[0],n=(t=t||{}).params||{},t.sendActor&&null!==this.actor&&("0.9"===e.version||"0.95"===e.version?n.actor=this.actor:n.agent=this.actor),t.sendActivity&&null!==this.activity&&("0.9"===e.version||"0.95"===e.version?n.target=this.activity:n.activity=this.activity),void 0===n.registration&&null!==this.registration&&(n.registration=this.registration),i={params:n},void 0!==t.callback&&(i.callback=t.callback),e.queryStatements(i);this.log("[warning] getStatements: No LRSs added yet (statements not read)")},getState:function(t,e){var n,i;if(this.log("getState"),0<this.recordStores.length)return i=this.recordStores[0],n={agent:void 0!==(e=e||{}).agent?e.agent:this.actor,activity:void 0!==e.activity?e.activity:this.activity},void 0!==e.registration?n.registration=e.registration:null!==this.registration&&(n.registration=this.registration),void 0!==e.callback&&(n.callback=e.callback),i.retrieveState(t,n);this.log("[warning] getState: No LRSs added yet (state not retrieved)")},setState:function(t,e,n){var i,r;if(this.log("setState"),0<this.recordStores.length)return r=this.recordStores[0],i={agent:void 0!==(n=n||{}).agent?n.agent:this.actor,activity:void 0!==n.activity?n.activity:this.activity},void 0!==n.registration?i.registration=n.registration:null!==this.registration&&(i.registration=this.registration),void 0!==n.lastSHA1&&(i.lastSHA1=n.lastSHA1),void 0!==n.contentType&&(i.contentType=n.contentType,void 0!==n.overwriteJSON&&!n.overwriteJSON&&TinCan.Utils.isApplicationJSON(n.contentType)&&(i.method="POST")),void 0!==n.callback&&(i.callback=n.callback),r.saveState(t,e,i);this.log("[warning] setState: No LRSs added yet (state not saved)")},deleteState:function(t,e){var n,i;if(this.log("deleteState"),0<this.recordStores.length)return i=this.recordStores[0],n={agent:void 0!==(e=e||{}).agent?e.agent:this.actor,activity:void 0!==e.activity?e.activity:this.activity},void 0!==e.registration?n.registration=e.registration:null!==this.registration&&(n.registration=this.registration),void 0!==e.callback&&(n.callback=e.callback),i.dropState(t,n);this.log("[warning] deleteState: No LRSs added yet (state not deleted)")},getActivityProfile:function(t,e){var n,i;if(this.log("getActivityProfile"),0<this.recordStores.length)return i=this.recordStores[0],n={activity:void 0!==(e=e||{}).activity?e.activity:this.activity},void 0!==e.callback&&(n.callback=e.callback),i.retrieveActivityProfile(t,n);this.log("[warning] getActivityProfile: No LRSs added yet (activity profile not retrieved)")},setActivityProfile:function(t,e,n){var i,r;if(this.log("setActivityProfile"),0<this.recordStores.length)return r=this.recordStores[0],i={activity:void 0!==(n=n||{}).activity?n.activity:this.activity},void 0!==n.callback&&(i.callback=n.callback),void 0!==n.lastSHA1&&(i.lastSHA1=n.lastSHA1),void 0!==n.contentType&&(i.contentType=n.contentType,void 0!==n.overwriteJSON&&!n.overwriteJSON&&TinCan.Utils.isApplicationJSON(n.contentType)&&(i.method="POST")),r.saveActivityProfile(t,e,i);this.log("[warning] setActivityProfile: No LRSs added yet (activity profile not saved)")},deleteActivityProfile:function(t,e){var n,i;if(this.log("deleteActivityProfile"),0<this.recordStores.length)return i=this.recordStores[0],n={activity:void 0!==(e=e||{}).activity?e.activity:this.activity},void 0!==e.callback&&(n.callback=e.callback),i.dropActivityProfile(t,n);this.log("[warning] deleteActivityProfile: No LRSs added yet (activity profile not deleted)")},getAgentProfile:function(t,e){var n,i;if(this.log("getAgentProfile"),0<this.recordStores.length)return i=this.recordStores[0],n={agent:void 0!==(e=e||{}).agent?e.agent:this.actor},void 0!==e.callback&&(n.callback=e.callback),i.retrieveAgentProfile(t,n);this.log("[warning] getAgentProfile: No LRSs added yet (agent profile not retrieved)")},setAgentProfile:function(t,e,n){var i,r;if(this.log("setAgentProfile"),0<this.recordStores.length)return r=this.recordStores[0],i={agent:void 0!==(n=n||{}).agent?n.agent:this.actor},void 0!==n.callback&&(i.callback=n.callback),void 0!==n.lastSHA1&&(i.lastSHA1=n.lastSHA1),void 0!==n.contentType&&(i.contentType=n.contentType,void 0!==n.overwriteJSON&&!n.overwriteJSON&&TinCan.Utils.isApplicationJSON(n.contentType)&&(i.method="POST")),r.saveAgentProfile(t,e,i);this.log("[warning] setAgentProfile: No LRSs added yet (agent profile not saved)")},deleteAgentProfile:function(t,e){var n,i;if(this.log("deleteAgentProfile"),0<this.recordStores.length)return i=this.recordStores[0],n={agent:void 0!==(e=e||{}).agent?e.agent:this.actor},void 0!==e.callback&&(n.callback=e.callback),i.dropAgentProfile(t,n);this.log("[warning] deleteAgentProfile: No LRSs added yet (agent profile not deleted)")}},TinCan.DEBUG=!1,TinCan.enableDebug=function(){TinCan.DEBUG=!0},TinCan.disableDebug=function(){TinCan.DEBUG=!1},TinCan.versions=function(){return["1.0.2","1.0.1","1.0.0","0.95","0.9"]},"object"==typeof module&&(module.exports=TinCan)}(),function(){"use strict";TinCan.Utils={getUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},getISODateString:function(t){function e(t,e){var n,i;for(null==t&&(t=0),null==e&&(e=2),n=Math.pow(10,e-1),i=t.toString();t<n&&1<n;)i="0"+i,n/=10;return i}return t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1)+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())+"."+e(t.getUTCMilliseconds(),3)+"Z"},convertISO8601DurationToMilliseconds:function(t){var e,n,i,r,o=0<=t.indexOf("-"),a=t.indexOf("T"),s=t.indexOf("H"),l=t.indexOf("M"),c=t.indexOf("S");if(-1===a||-1!==l&&l<a||-1!==t.indexOf("D")||-1!==t.indexOf("Y"))throw new Error("ISO 8601 timestamps including years, months and/or days are not currently supported");return e=-1===s?(s=a,0):parseInt(t.slice(a+1,s),10),n=-1===l?(l=a,0):parseInt(t.slice(s+1,l),10),i=parseFloat(t.slice(l+1,c)),r=parseInt(1e3*(60*(60*e+n)+i),10),isNaN(r)&&(r=0),o&&(r*=-1),r},convertMillisecondsToISO8601Duration:function(t){var e,n,i,r=parseInt(t,10),o="",a="";return(i=Math.round(r/10))<0&&(o="-",i*=-1),a=o+"PT",0<(e=parseInt(i/36e4,10))&&(a+=e+"H"),0<(n=parseInt(i%36e4/6e3,10))&&(a+=n+"M"),a+=i%36e4%6e3/100+"S"},getSHA1String:function(t){return CryptoJS.SHA1(t).toString(CryptoJS.enc.Hex)},getBase64String:function(t){return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Latin1.parse(t))},getLangDictionaryValue:function(t,e){var n,i=this[t];if(void 0!==e&&void 0!==i[e])return i[e];if(void 0!==i.und)return i.und;if(void 0!==i["en-US"])return i["en-US"];for(n in i)if(i.hasOwnProperty(n))return i[n];return""},parseURL:function(t,e){var n,i,r,o,a="/"===t.charAt(0),s=["(/[^?#]*)","(\\?[^#]*|)","(#.*|)$"],l=/\+/g,c=/([^&=]+)=?([^&]*)/g,u=function(t){return decodeURIComponent(t.replace(l," "))};if(e=e||{},a){if(void 0===e.allowRelative||!e.allowRelative)throw new Error("Refusing to parse relative URL without 'allowRelative' option")}else s.unshift("^(https?:)//","(([^:/?#]*)(?::([0-9]+))?)"),-1===t.indexOf("/",8)&&(t+="/");if(n=new RegExp(s.join("")),null===(i=t.match(n)))throw new Error("Unable to parse URL regular expression did not match: '"+t+"'");if(a?(r={protocol:null,host:null,hostname:null,port:null,path:null,pathname:i[1],search:i[2],hash:i[3],params:{}}).path=r.pathname:(r={protocol:i[1],host:i[2],hostname:i[3],port:i[4],pathname:i[5],search:i[6],hash:i[7],params:{}}).path=r.protocol+"//"+r.host+r.pathname,""!==r.search)for(;o=c.exec(r.search.substring(1));)r.params[u(o[1])]=u(o[2]);return r},getServerRoot:function(t){var e=t.split("/");return e[0]+"//"+e[2]},getContentTypeFromHeader:function(t){return String(t).split(";")[0]},isApplicationJSON:function(t){return 0===TinCan.Utils.getContentTypeFromHeader(t).toLowerCase().indexOf("application/json")}}}(),function(){"use strict";var t=TinCan.LRS=function(t){this.log("constructor"),this.endpoint=null,this.version=null,this.auth=null,this.allowFail=!0,this.extended=null,this.init(t)};t.prototype={LOG_SRC:"LRS",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=TinCan.versions(),i=!1;if((t=t||{}).hasOwnProperty("alertOnRequestFailure")&&this.log("'alertOnRequestFailure' is deprecated (alerts have been removed) no need to set it now"),!t.hasOwnProperty("endpoint")||null===t.endpoint||""===t.endpoint)throw this.log("[error] LRS invalid: no endpoint"),{code:3,mesg:"LRS invalid: no endpoint"};if(this.endpoint=String(t.endpoint),"/"!==this.endpoint.slice(-1)&&(this.log("adding trailing slash to endpoint"),this.endpoint+="/"),t.hasOwnProperty("allowFail")&&(this.allowFail=t.allowFail),t.hasOwnProperty("auth")?this.auth=t.auth:t.hasOwnProperty("username")&&t.hasOwnProperty("password")&&(this.auth="Basic "+TinCan.Utils.getBase64String(t.username+":"+t.password)),t.hasOwnProperty("extended")&&(this.extended=t.extended),this._initByEnvironment(t),void 0!==t.version){for(this.log("version: "+t.version),e=0;e<n.length;e+=1)if(n[e]===t.version){i=!0;break}if(!i)throw this.log("[error] LRS invalid: version not supported ("+t.version+")"),{code:5,mesg:"LRS invalid: version not supported ("+t.version+")"};this.version=t.version}else this.version=n[0]},_initByEnvironment:function(){this.log("_initByEnvironment not overloaded - no environment loaded?")},_makeRequest:function(){this.log("_makeRequest not overloaded - no environment loaded?")},_IEModeConversion:function(){this.log("_IEModeConversion not overloaded - browser environment not loaded.")},sendRequest:function(t){this.log("sendRequest");var e,n=this.endpoint+t.url,i={};if(0===t.url.indexOf("http")&&(n=t.url),null!==this.extended)for(e in t.params=t.params||{},this.extended)this.extended.hasOwnProperty(e)&&(t.params.hasOwnProperty(e)||null!==this.extended[e]&&(t.params[e]=this.extended[e]));for(e in i.Authorization=this.auth,"0.9"!==this.version&&(i["X-Experience-API-Version"]=this.version),t.headers)t.headers.hasOwnProperty(e)&&(i[e]=t.headers[e]);return this._makeRequest(n,i,t)},about:function(i){var t,e,n;if(this.log("about"),t={url:"about",method:"GET",params:{}},void 0!==(i=i||{}).callback&&(n=function(t,e){var n=e;null===t&&(n=TinCan.About.fromJSON(e.responseText)),i.callback(t,n)},t.callback=n),e=this.sendRequest(t),!n)return null===e.err&&(e.xhr=TinCan.About.fromJSON(e.xhr.responseText)),e},saveStatement:function(t,e){var n,i;this.log("saveStatement"),e=e||{};try{i=t.asVersion(this.version)}catch(t){return this.allowFail?(this.log("[warning] statement could not be serialized in version ("+this.version+"): "+t),void 0!==e.callback?void e.callback(null,null):{err:null,xhr:null}):(this.log("[error] statement could not be serialized in version ("+this.version+"): "+t),void 0!==e.callback?void e.callback(t,null):{err:t,xhr:null})}return n={url:"statements",data:JSON.stringify(i),headers:{"Content-Type":"application/json"}},null!==t.id?(n.method="PUT",n.params={statementId:t.id}):n.method="POST",void 0!==e.callback&&(n.callback=e.callback),this.sendRequest(n)},retrieveStatement:function(t,i){var e,n,r;return this.log("retrieveStatement"),e={url:"statements",method:"GET",params:{statementId:t}},void 0!==(i=i||{}).callback&&(r=function(t,e){var n=e;null===t&&(n=TinCan.Statement.fromJSON(e.responseText)),i.callback(t,n)},e.callback=r),n=this.sendRequest(e),r||(n.statement=null)===n.err&&(n.statement=TinCan.Statement.fromJSON(n.xhr.responseText)),n},retrieveVoidedStatement:function(t,i){var e,n,r;return this.log("retrieveVoidedStatement"),i=i||{},e={url:"statements",method:"GET",params:{}},"0.9"===this.version||"0.95"===this.version?e.params.statementId=t:e.params.voidedStatementId=t,void 0!==i.callback&&(r=function(t,e){var n=e;null===t&&(n=TinCan.Statement.fromJSON(e.responseText)),i.callback(t,n)},e.callback=r),n=this.sendRequest(e),r||(n.statement=null)===n.err&&(n.statement=TinCan.Statement.fromJSON(n.xhr.responseText)),n},saveStatements:function(t,e){this.log("saveStatements");var n,i,r,o=[];if(e=e||{},0===t.length)return void 0!==e.callback?void e.callback(new Error("no statements"),null):{err:new Error("no statements"),xhr:null};for(r=0;r<t.length;r+=1){try{i=t[r].asVersion(this.version)}catch(t){return this.allowFail?(this.log("[warning] statement could not be serialized in version ("+this.version+"): "+t),void 0!==e.callback?void e.callback(null,null):{err:null,xhr:null}):(this.log("[error] statement could not be serialized in version ("+this.version+"): "+t),void 0!==e.callback?void e.callback(t,null):{err:t,xhr:null})}o.push(i)}return n={url:"statements",method:"POST",data:JSON.stringify(o),headers:{"Content-Type":"application/json"}},void 0!==e.callback&&(n.callback=e.callback),this.sendRequest(n)},queryStatements:function(i){var t,e,n;this.log("queryStatements"),(i=i||{}).params=i.params||{};try{t=this._queryStatementsRequestCfg(i)}catch(t){return this.log("[error] Query statements failed - "+t),void 0!==i.callback&&i.callback(t,{}),{err:t,statementsResult:null}}return void 0!==i.callback&&(n=function(t,e){var n=e;null===t&&(n=TinCan.StatementsResult.fromJSON(e.responseText)),i.callback(t,n)},t.callback=n),(e=this.sendRequest(t)).config=t,n||(e.statementsResult=null)===e.err&&(e.statementsResult=TinCan.StatementsResult.fromJSON(e.xhr.responseText)),e},_queryStatementsRequestCfg:function(t){this.log("_queryStatementsRequestCfg");var e,n,i={},r={url:"statements",method:"GET",params:i},o=["agent","actor","object","instructor"],a=["verb","activity"],s=["registration","context","since","until","limit","authoritative","sparse","ascending","related_activities","related_agents","format","attachments"],l={verb:!0,registration:!0,since:!0,until:!0,limit:!0,ascending:!0},c={.9:{supported:{actor:!0,instructor:!0,target:!0,object:!0,context:!0,authoritative:!0,sparse:!0}},"1.0.0":{supported:{agent:!0,activity:!0,related_activities:!0,related_agents:!0,format:!0,attachments:!0}}};for(n in c[.95]=c[.9],c["1.0.1"]=c["1.0.0"],c["1.0.2"]=c["1.0.0"],t.params.hasOwnProperty("target")&&(t.params.object=t.params.target),t.params)if(t.params.hasOwnProperty(n)&&void 0===l[n]&&void 0===c[this.version].supported[n])throw"Unrecognized query parameter configured: "+n;for(e=0;e<o.length;e+=1)void 0!==t.params[o[e]]&&(i[o[e]]=JSON.stringify(t.params[o[e]].asVersion(this.version)));for(e=0;e<a.length;e+=1)void 0!==t.params[a[e]]&&(i[a[e]]=t.params[a[e]].id);for(e=0;e<s.length;e+=1)void 0!==t.params[s[e]]&&null!==t.params[s[e]]&&(i[s[e]]=t.params[s[e]]);return r},moreStatements:function(i){var t,e,n,r,o;return this.log("moreStatements: "+i.url),i=i||{},r=TinCan.Utils.parseURL(i.url,{allowRelative:!0}),o=TinCan.Utils.getServerRoot(this.endpoint),0===r.path.indexOf("/statements")&&(r.path=this.endpoint.replace(o,"")+r.path,this.log("converting non-standard more URL to "+r.path)),0!==r.path.indexOf("/")&&(r.path="/"+r.path),t={method:"GET",url:o+r.path,params:r.params},void 0!==i.callback&&(n=function(t,e){var n=e;null===t&&(n=TinCan.StatementsResult.fromJSON(e.responseText)),i.callback(t,n)},t.callback=n),(e=this.sendRequest(t)).config=t,n||(e.statementsResult=null)===e.err&&(e.statementsResult=TinCan.StatementsResult.fromJSON(e.xhr.responseText)),e},retrieveState:function(i,r){this.log("retrieveState");var t,e,n,o={},a={},s=this;if(n=r.requestHeaders||{},o={stateId:i,activityId:r.activity.id},"0.9"===this.version?o.actor=JSON.stringify(r.agent.asVersion(this.version)):o.agent=JSON.stringify(r.agent.asVersion(this.version)),void 0!==r.registration&&null!==r.registration&&("0.9"===this.version?o.registrationId=r.registration:o.registration=r.registration),a={url:"activities/state",method:"GET",params:o,ignore404:!0,headers:n},void 0!==r.callback&&(e=function(t,e){var n=e;if(null===t)if(404===e.status)n=null;else if(n=new TinCan.State({id:i,contents:e.responseText}),void 0!==e.getResponseHeader&&null!==e.getResponseHeader("ETag")&&""!==e.getResponseHeader("ETag")?n.etag=e.getResponseHeader("ETag"):n.etag=TinCan.Utils.getSHA1String(e.responseText),void 0!==e.contentType?n.contentType=e.contentType:void 0!==e.getResponseHeader&&null!==e.getResponseHeader("Content-Type")&&""!==e.getResponseHeader("Content-Type")&&(n.contentType=e.getResponseHeader("Content-Type")),TinCan.Utils.isApplicationJSON(n.contentType))try{n.contents=JSON.parse(n.contents)}catch(t){s.log("retrieveState - failed to deserialize JSON: "+t)}r.callback(t,n)},a.callback=e),t=this.sendRequest(a),!e&&(t.state=null)===t.err&&404!==t.xhr.status&&(t.state=new TinCan.State({id:i,contents:t.xhr.responseText}),void 0!==t.xhr.getResponseHeader&&null!==t.xhr.getResponseHeader("ETag")&&""!==t.xhr.getResponseHeader("ETag")?t.state.etag=t.xhr.getResponseHeader("ETag"):t.state.etag=TinCan.Utils.getSHA1String(t.xhr.responseText),void 0!==t.xhr.contentType?t.state.contentType=t.xhr.contentType:void 0!==t.xhr.getResponseHeader&&null!==t.xhr.getResponseHeader("Content-Type")&&""!==t.xhr.getResponseHeader("Content-Type")&&(t.state.contentType=t.xhr.getResponseHeader("Content-Type")),TinCan.Utils.isApplicationJSON(t.state.contentType)))try{t.state.contents=JSON.parse(t.state.contents)}catch(t){this.log("retrieveState - failed to deserialize JSON: "+t)}return t},retrieveStateIds:function(i){this.log("retrieveStateIds");var t,e,n,r,o={};if(e=(i=i||{}).requestHeaders||{},o.activityId=i.activity.id,"0.9"===this.version?o.actor=JSON.stringify(i.agent.asVersion(this.version)):o.agent=JSON.stringify(i.agent.asVersion(this.version)),void 0!==i.registration&&null!==i.registration&&("0.9"===this.version?o.registrationId=i.registration:o.registration=i.registration),t={url:"activities/state",method:"GET",params:o,headers:e,ignore404:!0},void 0!==i.callback&&(r=function(e,t){var n=t;if(null===e){if(404===t.status)n=[];else try{n=JSON.parse(t.responseText)}catch(t){e="Response JSON parse error: "+t}i.callback(e,n)}else i.callback(e,n)},t.callback=r),void 0!==i.since&&(t.params.since=i.since),n=this.sendRequest(t),!r){if((n.profileIds=null)!==n.err)return n;if(404===n.xhr.status)n.profileIds=[];else try{n.profileIds=JSON.parse(n.xhr.responseText)}catch(t){n.err="retrieveStateIds - JSON parse error: "+t}}return n},saveState:function(t,e,n){var i,r,o;return this.log("saveState"),o=n.requestHeaders||{},void 0===n.contentType&&(n.contentType="application/octet-stream"),o["Content-Type"]=n.contentType,"object"==typeof e&&TinCan.Utils.isApplicationJSON(n.contentType)&&(e=JSON.stringify(e)),void 0!==n.method&&"POST"===n.method||(n.method="PUT"),i={stateId:t,activityId:n.activity.id},"0.9"===this.version?i.actor=JSON.stringify(n.agent.asVersion(this.version)):i.agent=JSON.stringify(n.agent.asVersion(this.version)),void 0!==n.registration&&null!==n.registration&&("0.9"===this.version?i.registrationId=n.registration:i.registration=n.registration),r={url:"activities/state",method:n.method,params:i,data:e,headers:o},void 0!==n.callback&&(r.callback=n.callback),void 0!==n.lastSHA1&&null!==n.lastSHA1&&(r.headers["If-Match"]=n.lastSHA1),this.sendRequest(r)},dropState:function(t,e){var n,i,r;return this.log("dropState"),r=e.requestHeaders||{},n={activityId:e.activity.id},"0.9"===this.version?n.actor=JSON.stringify(e.agent.asVersion(this.version)):n.agent=JSON.stringify(e.agent.asVersion(this.version)),null!==t&&(n.stateId=t),void 0!==e.registration&&null!==e.registration&&("0.9"===this.version?n.registrationId=e.registration:n.registration=e.registration),i={url:"activities/state",method:"DELETE",params:n,headers:r},void 0!==e.callback&&(i.callback=e.callback),this.sendRequest(i)},retrieveActivity:function(i,r){this.log("retrieveActivity");var t,e,n,o={};return n=r.requestHeaders||{},o={url:"activities",method:"GET",params:{activityId:i},ignore404:!0,headers:n},void 0!==r.callback&&(e=function(t,e){var n=e;null===t&&(n=404===e.status?new TinCan.Activity({id:i}):TinCan.Activity.fromJSON(e.responseText)),r.callback(t,n)},o.callback=e),t=this.sendRequest(o),e||(t.activity=null)===t.err&&(404===t.xhr.status?t.activity=new TinCan.Activity({id:i}):t.activity=TinCan.Activity.fromJSON(t.xhr.responseText)),t},retrieveActivityProfile:function(i,r){this.log("retrieveActivityProfile");var t,e,n,o={},a=this;if(n=r.requestHeaders||{},o={url:"activities/profile",method:"GET",params:{profileId:i,activityId:r.activity.id},ignore404:!0,headers:n},void 0!==r.callback&&(e=function(t,e){var n=e;if(null===t)if(404===e.status)n=null;else if(n=new TinCan.ActivityProfile({id:i,activity:r.activity,contents:e.responseText}),void 0!==e.getResponseHeader&&null!==e.getResponseHeader("ETag")&&""!==e.getResponseHeader("ETag")?n.etag=e.getResponseHeader("ETag"):n.etag=TinCan.Utils.getSHA1String(e.responseText),void 0!==e.contentType?n.contentType=e.contentType:void 0!==e.getResponseHeader&&null!==e.getResponseHeader("Content-Type")&&""!==e.getResponseHeader("Content-Type")&&(n.contentType=e.getResponseHeader("Content-Type")),TinCan.Utils.isApplicationJSON(n.contentType))try{n.contents=JSON.parse(n.contents)}catch(t){a.log("retrieveActivityProfile - failed to deserialize JSON: "+t)}r.callback(t,n)},o.callback=e),t=this.sendRequest(o),!e&&(t.profile=null)===t.err&&404!==t.xhr.status&&(t.profile=new TinCan.ActivityProfile({id:i,activity:r.activity,contents:t.xhr.responseText}),void 0!==t.xhr.getResponseHeader&&null!==t.xhr.getResponseHeader("ETag")&&""!==t.xhr.getResponseHeader("ETag")?t.profile.etag=t.xhr.getResponseHeader("ETag"):t.profile.etag=TinCan.Utils.getSHA1String(t.xhr.responseText),void 0!==t.xhr.contentType?t.profile.contentType=t.xhr.contentType:void 0!==t.xhr.getResponseHeader&&null!==t.xhr.getResponseHeader("Content-Type")&&""!==t.xhr.getResponseHeader("Content-Type")&&(t.profile.contentType=t.xhr.getResponseHeader("Content-Type")),TinCan.Utils.isApplicationJSON(t.profile.contentType)))try{t.profile.contents=JSON.parse(t.profile.contents)}catch(t){this.log("retrieveActivityProfile - failed to deserialize JSON: "+t)}return t},retrieveActivityProfileIds:function(i){var t,e,n,r;if(this.log("retrieveActivityProfileIds"),e=(i=i||{}).requestHeaders||{},t={url:"activities/profile",method:"GET",params:{activityId:i.activity.id},headers:e,ignore404:!0},void 0!==i.callback&&(r=function(e,t){var n=t;if(null===e){if(404===t.status)n=[];else try{n=JSON.parse(t.responseText)}catch(t){e="Response JSON parse error: "+t}i.callback(e,n)}else i.callback(e,n)},t.callback=r),void 0!==i.since&&(t.params.since=i.since),n=this.sendRequest(t),!r){if((n.profileIds=null)!==n.err)return n;if(404===n.xhr.status)n.profileIds=[];else try{n.profileIds=JSON.parse(n.xhr.responseText)}catch(t){n.err="retrieveActivityProfileIds - JSON parse error: "+t}}return n},saveActivityProfile:function(t,e,n){var i,r;return this.log("saveActivityProfile"),r=n.requestHeaders||{},void 0===n.contentType&&(n.contentType="application/octet-stream"),r["Content-Type"]=n.contentType,void 0!==n.method&&"POST"===n.method||(n.method="PUT"),"object"==typeof e&&TinCan.Utils.isApplicationJSON(n.contentType)&&(e=JSON.stringify(e)),i={url:"activities/profile",method:n.method,params:{profileId:t,activityId:n.activity.id},data:e,headers:r},void 0!==n.callback&&(i.callback=n.callback),void 0!==n.lastSHA1&&null!==n.lastSHA1?i.headers["If-Match"]=n.lastSHA1:i.headers["If-None-Match"]="*",this.sendRequest(i)},dropActivityProfile:function(t,e){var n,i;return this.log("dropActivityProfile"),i=e.requestHeaders||{},n={url:"activities/profile",method:"DELETE",params:{profileId:t,activityId:e.activity.id},headers:i},void 0!==e.callback&&(n.callback=e.callback),this.sendRequest(n)},retrieveAgentProfile:function(i,r){this.log("retrieveAgentProfile");var t,e,n,o={},a=this;if(n=r.requestHeaders||{},o={method:"GET",params:{profileId:i},ignore404:!0,headers:n},"0.9"===this.version?(o.url="actors/profile",o.params.actor=JSON.stringify(r.agent.asVersion(this.version))):(o.url="agents/profile",o.params.agent=JSON.stringify(r.agent.asVersion(this.version))),void 0!==r.callback&&(e=function(t,e){var n=e;if(null===t)if(404===e.status)n=null;else if(n=new TinCan.AgentProfile({id:i,agent:r.agent,contents:e.responseText}),void 0!==e.getResponseHeader&&null!==e.getResponseHeader("ETag")&&""!==e.getResponseHeader("ETag")?n.etag=e.getResponseHeader("ETag"):n.etag=TinCan.Utils.getSHA1String(e.responseText),void 0!==e.contentType?n.contentType=e.contentType:void 0!==e.getResponseHeader&&null!==e.getResponseHeader("Content-Type")&&""!==e.getResponseHeader("Content-Type")&&(n.contentType=e.getResponseHeader("Content-Type")),TinCan.Utils.isApplicationJSON(n.contentType))try{n.contents=JSON.parse(n.contents)}catch(t){a.log("retrieveAgentProfile - failed to deserialize JSON: "+t)}r.callback(t,n)},o.callback=e),t=this.sendRequest(o),!e&&(t.profile=null)===t.err&&404!==t.xhr.status&&(t.profile=new TinCan.AgentProfile({id:i,agent:r.agent,contents:t.xhr.responseText}),void 0!==t.xhr.getResponseHeader&&null!==t.xhr.getResponseHeader("ETag")&&""!==t.xhr.getResponseHeader("ETag")?t.profile.etag=t.xhr.getResponseHeader("ETag"):t.profile.etag=TinCan.Utils.getSHA1String(t.xhr.responseText),void 0!==t.xhr.contentType?t.profile.contentType=t.xhr.contentType:void 0!==t.xhr.getResponseHeader&&null!==t.xhr.getResponseHeader("Content-Type")&&""!==t.xhr.getResponseHeader("Content-Type")&&(t.profile.contentType=t.xhr.getResponseHeader("Content-Type")),TinCan.Utils.isApplicationJSON(t.profile.contentType)))try{t.profile.contents=JSON.parse(t.profile.contents)}catch(t){this.log("retrieveAgentProfile - failed to deserialize JSON: "+t)}return t},retrieveAgentProfileIds:function(i){this.log("retrieveAgentProfileIds");var t,e,n,r={};if(t={method:"GET",params:r,headers:(i=i||{}).requestHeaders||{},ignore404:!0},"0.9"===this.version?(t.url="actors/profile",r.actor=JSON.stringify(i.agent.asVersion(this.version))):(t.url="agents/profile",r.agent=JSON.stringify(i.agent.asVersion(this.version))),void 0!==i.callback&&(n=function(e,t){var n=t;if(null===e){if(404===t.status)n=[];else try{n=JSON.parse(t.responseText)}catch(t){e="Response JSON parse error: "+t}i.callback(e,n)}else i.callback(e,n)},t.callback=n),void 0!==i.since&&(t.params.since=i.since),e=this.sendRequest(t),!n){if((e.profileIds=null)!==e.err)return e;if(404===e.xhr.status)e.profileIds=[];else try{e.profileIds=JSON.parse(e.xhr.responseText)}catch(t){e.err="retrieveAgentProfileIds - JSON parse error: "+t}}return e},saveAgentProfile:function(t,e,n){var i,r;return this.log("saveAgentProfile"),r=n.requestHeaders||{},void 0===n.contentType&&(n.contentType="application/octet-stream"),r["Content-Type"]=n.contentType,void 0!==n.method&&"POST"===n.method||(n.method="PUT"),"object"==typeof e&&TinCan.Utils.isApplicationJSON(n.contentType)&&(e=JSON.stringify(e)),i={method:n.method,params:{profileId:t},data:e,headers:r},"0.9"===this.version?(i.url="actors/profile",i.params.actor=JSON.stringify(n.agent.asVersion(this.version))):(i.url="agents/profile",i.params.agent=JSON.stringify(n.agent.asVersion(this.version))),void 0!==n.callback&&(i.callback=n.callback),void 0!==n.lastSHA1&&null!==n.lastSHA1?i.headers["If-Match"]=n.lastSHA1:i.headers["If-None-Match"]="*",this.sendRequest(i)},dropAgentProfile:function(t,e){var n,i;return this.log("dropAgentProfile"),i={method:"DELETE",params:n={profileId:t},headers:e.requestHeaders||{}},"0.9"===this.version?(i.url="actors/profile",n.actor=JSON.stringify(e.agent.asVersion(this.version))):(i.url="agents/profile",n.agent=JSON.stringify(e.agent.asVersion(this.version))),void 0!==e.callback&&(i.callback=e.callback),this.sendRequest(i)}},t.syncEnabled=null}(),function(){"use strict";var n=TinCan.AgentAccount=function(t){this.log("constructor"),this.homePage=null,this.name=null,this.init(t)};n.prototype={LOG_SRC:"AgentAccount",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["name","homePage"];for(void 0!==(t=t||{}).accountServiceHomePage&&(t.homePage=t.accountServiceHomePage),void 0!==t.accountName&&(t.name=t.accountName),e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]])},toString:function(){this.log("toString");var t="";return null!==this.name||null!==this.homePage?(t+=null!==this.name?this.name:"-",t+=":",t+=null!==this.homePage?this.homePage:"-"):t="AgentAccount: unidentified",t},asVersion:function(t){this.log("asVersion: "+t);var e={};return"0.9"===(t=t||TinCan.versions()[0])?(e.accountName=this.name,e.accountServiceHomePage=this.homePage):(e.name=this.name,e.homePage=this.homePage),e}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.Agent=function(t){this.log("constructor"),this.name=null,this.mbox=null,this.mbox_sha1sum=null,this.openid=null,this.account=null,this.degraded=!1,this.init(t)};n.prototype={objectType:"Agent",LOG_SRC:"Agent",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n,i=["name","mbox","mbox_sha1sum","openid"];for(void 0!==(t=t||{}).lastName||void 0!==t.firstName?(t.name="",void 0!==t.firstName&&0<t.firstName.length&&(t.name=t.firstName[0],1<t.firstName.length&&(this.degraded=!0)),""!==t.name&&(t.name+=" "),void 0!==t.lastName&&0<t.lastName.length&&(t.name+=t.lastName[0],1<t.lastName.length&&(this.degraded=!0))):void 0===t.familyName&&void 0===t.givenName||(t.name="",void 0!==t.givenName&&0<t.givenName.length&&(t.name=t.givenName[0],1<t.givenName.length&&(this.degraded=!0)),""!==t.name&&(t.name+=" "),void 0!==t.familyName&&0<t.familyName.length&&(t.name+=t.familyName[0],1<t.familyName.length&&(this.degraded=!0))),"object"==typeof t.name&&null!==t.name&&(1<t.name.length&&(this.degraded=!0),t.name=t.name[0]),"object"==typeof t.mbox&&null!==t.mbox&&(1<t.mbox.length&&(this.degraded=!0),t.mbox=t.mbox[0]),"object"==typeof t.mbox_sha1sum&&null!==t.mbox_sha1sum&&(1<t.mbox_sha1sum.length&&(this.degraded=!0),t.mbox_sha1sum=t.mbox_sha1sum[0]),"object"==typeof t.openid&&null!==t.openid&&(1<t.openid.length&&(this.degraded=!0),t.openid=t.openid[0]),"object"==typeof t.account&&null!==t.account&&void 0===t.account.homePage&&void 0===t.account.name&&(0===t.account.length?delete t.account:(1<t.account.length&&(this.degraded=!0),t.account=t.account[0])),t.hasOwnProperty("account")&&(t.account instanceof TinCan.AgentAccount?this.account=t.account:this.account=new TinCan.AgentAccount(t.account)),e=0;e<i.length;e+=1)t.hasOwnProperty(i[e])&&null!==t[i[e]]&&(n=t[i[e]],"mbox"===i[e]&&-1===n.indexOf("mailto:")&&(n="mailto:"+n),this[i[e]]=n)},toString:function(){return this.log("toString"),null!==this.name?this.name:null!==this.mbox?this.mbox.replace("mailto:",""):null!==this.mbox_sha1sum?this.mbox_sha1sum:null!==this.openid?this.openid:null!==this.account?this.account.toString():this.objectType+": unidentified"},asVersion:function(t){this.log("asVersion: "+t);var e={objectType:this.objectType};return"0.9"===(t=t||TinCan.versions()[0])?(null!==this.mbox?e.mbox=[this.mbox]:null!==this.mbox_sha1sum?e.mbox_sha1sum=[this.mbox_sha1sum]:null!==this.openid?e.openid=[this.openid]:null!==this.account&&(e.account=[this.account.asVersion(t)]),null!==this.name&&(e.name=[this.name])):(null!==this.mbox?e.mbox=this.mbox:null!==this.mbox_sha1sum?e.mbox_sha1sum=this.mbox_sha1sum:null!==this.openid?e.openid=this.openid:null!==this.account&&(e.account=this.account.asVersion(t)),null!==this.name&&(e.name=this.name)),e}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.Group=function(t){this.log("constructor"),this.name=null,this.mbox=null,this.mbox_sha1sum=null,this.openid=null,this.account=null,this.member=[],this.init(t)};n.prototype={objectType:"Group",LOG_SRC:"Group",log:TinCan.prototype.log,init:function(t){var e;if(this.log("init"),t=t||{},TinCan.Agent.prototype.init.call(this,t),void 0!==t.member)for(e=0;e<t.member.length;e+=1)t.member[e]instanceof TinCan.Agent?this.member.push(t.member[e]):this.member.push(new TinCan.Agent(t.member[e]))},toString:function(t){this.log("toString");var e=TinCan.Agent.prototype.toString.call(this,t);return e!==this.objectType+": unidentified"&&(e=this.objectType+": "+e),e},asVersion:function(t){var e,n;if(this.log("asVersion: "+t),t=t||TinCan.versions()[0],e=TinCan.Agent.prototype.asVersion.call(this,t),0<this.member.length)for(e.member=[],n=0;n<this.member.length;n+=1)e.member.push(this.member[n].asVersion(t));return e}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var r={"http://adlnet.gov/expapi/verbs/experienced":"experienced","http://adlnet.gov/expapi/verbs/attended":"attended","http://adlnet.gov/expapi/verbs/attempted":"attempted","http://adlnet.gov/expapi/verbs/completed":"completed","http://adlnet.gov/expapi/verbs/passed":"passed","http://adlnet.gov/expapi/verbs/failed":"failed","http://adlnet.gov/expapi/verbs/answered":"answered","http://adlnet.gov/expapi/verbs/interacted":"interacted","http://adlnet.gov/expapi/verbs/imported":"imported","http://adlnet.gov/expapi/verbs/created":"created","http://adlnet.gov/expapi/verbs/shared":"shared","http://adlnet.gov/expapi/verbs/voided":"voided"},n=TinCan.Verb=function(t){this.log("constructor"),this.id=null,this.display=null,this.init(t)};n.prototype={LOG_SRC:"Verb",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n,i=["id","display"];if("string"==typeof t){for(n in this.id=t,this.display={und:this.id},r)if(r.hasOwnProperty(n)&&r[n]===t){this.id=n;break}}else{for(t=t||{},e=0;e<i.length;e+=1)t.hasOwnProperty(i[e])&&null!==t[i[e]]&&(this[i[e]]=t[i[e]]);null===this.display&&void 0!==r[this.id]&&(this.display={und:r[this.id]})}},toString:function(t){return this.log("toString"),null!==this.display?this.getLangDictionaryValue("display",t):this.id},asVersion:function(t){var e;return this.log("asVersion"),"0.9"===(t=t||TinCan.versions()[0])?e=r[this.id]:(e={id:this.id},null!==this.display&&(e.display=this.display)),e},getLangDictionaryValue:TinCan.Utils.getLangDictionaryValue},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.Result=function(t){this.log("constructor"),this.score=null,this.success=null,this.completion=null,this.duration=null,this.response=null,this.extensions=null,this.init(t)};n.prototype={LOG_SRC:"Result",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["completion","duration","extensions","response","success"];for((t=t||{}).hasOwnProperty("score")&&null!==t.score&&(t.score instanceof TinCan.Score?this.score=t.score:this.score=new TinCan.Score(t.score)),e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]]);"Completed"===this.completion&&(this.completion=!0)},asVersion:function(t){this.log("asVersion");var e,n={},i=["success","duration","response","extensions"],r=["score"];for(t=t||TinCan.versions()[0],e=0;e<i.length;e+=1)null!==this[i[e]]&&(n[i[e]]=this[i[e]]);for(e=0;e<r.length;e+=1)null!==this[r[e]]&&(n[r[e]]=this[r[e]].asVersion(t));return null!==this.completion&&("0.9"===t?this.completion&&(n.completion="Completed"):n.completion=this.completion),n}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.Score=function(t){this.log("constructor"),this.scaled=null,this.raw=null,this.min=null,this.max=null,this.init(t)};n.prototype={LOG_SRC:"Score",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["scaled","raw","min","max"];for(t=t||{},e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]])},asVersion:function(t){this.log("asVersion");var e,n={},i=["scaled","raw","min","max"];for(t=t||TinCan.versions()[0],e=0;e<i.length;e+=1)null!==this[i[e]]&&(n[i[e]]=this[i[e]]);return n}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.InteractionComponent=function(t){this.log("constructor"),this.id=null,this.description=null,this.init(t)};n.prototype={LOG_SRC:"InteractionComponent",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["id","description"];for(t=t||{},e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]])},asVersion:function(t){this.log("asVersion");var e,n,i={id:this.id},r=["description"];for(t=t||TinCan.versions()[0],e=0;e<r.length;e+=1)null!==this[n=r[e]]&&(i[n]=this[n]);return i},getLangDictionaryValue:TinCan.Utils.getLangDictionaryValue},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var s={"http://adlnet.gov/expapi/activities/course":"course","http://adlnet.gov/expapi/activities/module":"module","http://adlnet.gov/expapi/activities/meeting":"meeting","http://adlnet.gov/expapi/activities/media":"media","http://adlnet.gov/expapi/activities/performance":"performance","http://adlnet.gov/expapi/activities/simulation":"simulation","http://adlnet.gov/expapi/activities/assessment":"assessment","http://adlnet.gov/expapi/activities/interaction":"interaction","http://adlnet.gov/expapi/activities/cmi.interaction":"cmi.interaction","http://adlnet.gov/expapi/activities/question":"question","http://adlnet.gov/expapi/activities/objective":"objective","http://adlnet.gov/expapi/activities/link":"link"},n=TinCan.ActivityDefinition=function(t){this.log("constructor"),this.name=null,this.description=null,this.type=null,this.moreInfo=null,this.extensions=null,this.interactionType=null,this.correctResponsesPattern=null,this.choices=null,this.scale=null,this.source=null,this.target=null,this.steps=null,this.init(t)};n.prototype={LOG_SRC:"ActivityDefinition",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n,i,r=["name","description","moreInfo","extensions","correctResponsesPattern"],o=[];if((t=t||{}).hasOwnProperty("type")&&null!==t.type){for(i in s)s.hasOwnProperty(i)&&s[i]===t.type&&(t.type=s[i]);this.type=t.type}if(t.hasOwnProperty("interactionType")&&null!==t.interactionType&&(this.interactionType=t.interactionType,"choice"===t.interactionType||"sequencing"===t.interactionType?o.push("choices"):"likert"===t.interactionType?o.push("scale"):"matching"===t.interactionType?(o.push("source"),o.push("target")):"performance"===t.interactionType&&o.push("steps"),0<o.length))for(e=0;e<o.length;e+=1)if(i=o[e],t.hasOwnProperty(i)&&null!==t[i])for(this[i]=[],n=0;n<t[i].length;n+=1)t[i][n]instanceof TinCan.InteractionComponent?this[i].push(t[i][n]):this[i].push(new TinCan.InteractionComponent(t[i][n]));for(e=0;e<r.length;e+=1)t.hasOwnProperty(r[e])&&null!==t[r[e]]&&(this[r[e]]=t[r[e]])},toString:function(t){return this.log("toString"),null!==this.name?this.getLangDictionaryValue("name",t):null!==this.description?this.getLangDictionaryValue("description",t):""},asVersion:function(t){this.log("asVersion");var e,n,i,r={},o=["name","description","interactionType","correctResponsesPattern","extensions"],a=["choices","scale","source","target","steps"];for(t=t||TinCan.versions()[0],null!==this.type&&(r.type="0.9"===t?s[this.type]:this.type),e=0;e<o.length;e+=1)null!==this[i=o[e]]&&(r[i]=this[i]);for(e=0;e<a.length;e+=1)if(null!==this[i=a[e]])for(r[i]=[],n=0;n<this[i].length;n+=1)r[i].push(this[i][n].asVersion(t));return 0!==t.indexOf("0.9")&&null!==this.moreInfo&&(r.moreInfo=this.moreInfo),r},getLangDictionaryValue:TinCan.Utils.getLangDictionaryValue},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.Activity=function(t){this.log("constructor"),this.objectType="Activity",this.id=null,this.definition=null,this.init(t)};n.prototype={LOG_SRC:"Activity",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["id"];for((t=t||{}).hasOwnProperty("definition")&&(t.definition instanceof TinCan.ActivityDefinition?this.definition=t.definition:this.definition=new TinCan.ActivityDefinition(t.definition)),e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]])},toString:function(t){this.log("toString");var e="";return null!==this.definition&&""!==(e=this.definition.toString(t))?e:null!==this.id?this.id:"Activity: unidentified"},asVersion:function(t){this.log("asVersion");var e={id:this.id,objectType:this.objectType};return t=t||TinCan.versions()[0],null!==this.definition&&(e.definition=this.definition.asVersion(t)),e}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.ContextActivities=function(t){this.log("constructor"),this.category=null,this.parent=null,this.grouping=null,this.other=null,this.init(t)};n.prototype={LOG_SRC:"ContextActivities",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n,i,r,o=["category","parent","grouping","other"];for(t=t||{},e=0;e<o.length;e+=1)if(i=o[e],t.hasOwnProperty(i)&&null!==t[i])if("[object Array]"===Object.prototype.toString.call(t[i]))for(n=0;n<t[i].length;n+=1)this.add(i,t[i][n]);else r=t[i],this.add(i,r)},add:function(t,e){if("category"===t||"parent"===t||"grouping"===t||"other"===t)return null===this[t]&&(this[t]=[]),e instanceof TinCan.Activity||(e="string"==typeof e?{id:e}:e,e=new TinCan.Activity(e)),this[t].push(e),this[t].length-1},asVersion:function(t){this.log("asVersion");var e,n,i={},r=["parent","grouping","other"];for(t=t||TinCan.versions()[0],e=0;e<r.length;e+=1)if(null!==this[r[e]]&&0<this[r[e]].length)if("0.9"===t||"0.95"===t)1<this[r[e]].length&&this.log("[warning] version does not support multiple values in: "+r[e]),i[r[e]]=this[r[e]][0].asVersion(t);else for(i[r[e]]=[],n=0;n<this[r[e]].length;n+=1)i[r[e]].push(this[r[e]][n].asVersion(t));if(null!==this.category&&0<this.category.length){if("0.9"===t||"0.95"===t)throw this.log("[error] version does not support the 'category' property: "+t),new Error(t+" does not support the 'category' property");for(i.category=[],e=0;e<this.category.length;e+=1)i.category.push(this.category[e].asVersion(t))}return i}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.Context=function(t){this.log("constructor"),this.registration=null,this.instructor=null,this.team=null,this.contextActivities=null,this.revision=null,this.platform=null,this.language=null,this.statement=null,this.extensions=null,this.init(t)};n.prototype={LOG_SRC:"Context",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n,i,r=["registration","revision","platform","language","extensions"],o=["instructor","team"];for(t=t||{},e=0;e<r.length;e+=1)n=r[e],t.hasOwnProperty(n)&&null!==t[n]&&(this[n]=t[n]);for(e=0;e<o.length;e+=1)n=o[e],t.hasOwnProperty(n)&&null!==t[n]&&(void 0!==(i=t[n]).objectType&&"Person"!==i.objectType||(i.objectType="Agent"),"Agent"!==i.objectType||i instanceof TinCan.Agent?"Group"!==i.objectType||i instanceof TinCan.Group||(i=new TinCan.Group(i)):i=new TinCan.Agent(i),this[n]=i);t.hasOwnProperty("contextActivities")&&null!==t.contextActivities&&(t.contextActivities instanceof TinCan.ContextActivities?this.contextActivities=t.contextActivities:this.contextActivities=new TinCan.ContextActivities(t.contextActivities)),t.hasOwnProperty("statement")&&null!==t.statement&&(t.statement instanceof TinCan.StatementRef?this.statement=t.statement:t.statement instanceof TinCan.SubStatement?this.statement=t.statement:"StatementRef"===t.statement.objectType?this.statement=new TinCan.StatementRef(t.statement):"SubStatement"===t.statement.objectType?this.statement=new TinCan.SubStatement(t.statement):this.log("Unable to parse statement.context.statement property."))},asVersion:function(t){this.log("asVersion");var e,n={},i=["registration","revision","platform","language","extensions"],r=["instructor","team","contextActivities","statement"];if(t=t||TinCan.versions()[0],this.statement instanceof TinCan.SubStatement&&"0.9"!==t&&"0.95"!==t)throw this.log("[error] version does not support SubStatements in the 'statement' property: "+t),new Error(t+" does not support SubStatements in the 'statement' property");for(e=0;e<i.length;e+=1)null!==this[i[e]]&&(n[i[e]]=this[i[e]]);for(e=0;e<r.length;e+=1)null!==this[r[e]]&&(n[r[e]]=this[r[e]].asVersion(t));return n}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.StatementRef=function(t){this.log("constructor"),this.id=null,this.init(t)};n.prototype={objectType:"StatementRef",LOG_SRC:"StatementRef",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["id"];for(t=t||{},e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]])},toString:function(){return this.log("toString"),this.id},asVersion:function(t){this.log("asVersion");var e={objectType:this.objectType,id:this.id};return"0.9"===t&&(e.objectType="Statement"),e}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.SubStatement=function(t){this.log("constructor"),this.actor=null,this.verb=null,this.target=null,this.result=null,this.context=null,this.timestamp=null,this.init(t)};n.prototype={objectType:"SubStatement",LOG_SRC:"SubStatement",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["timestamp"];for((t=t||{}).hasOwnProperty("object")&&(t.target=t.object),t.hasOwnProperty("actor")&&(void 0!==t.actor.objectType&&"Person"!==t.actor.objectType||(t.actor.objectType="Agent"),"Agent"===t.actor.objectType?t.actor instanceof TinCan.Agent?this.actor=t.actor:this.actor=new TinCan.Agent(t.actor):"Group"===t.actor.objectType&&(t.actor instanceof TinCan.Group?this.actor=t.actor:this.actor=new TinCan.Group(t.actor))),t.hasOwnProperty("verb")&&(t.verb instanceof TinCan.Verb?this.verb=t.verb:this.verb=new TinCan.Verb(t.verb)),t.hasOwnProperty("target")&&(t.target instanceof TinCan.Activity||t.target instanceof TinCan.Agent||t.target instanceof TinCan.Group||t.target instanceof TinCan.SubStatement||t.target instanceof TinCan.StatementRef?this.target=t.target:(void 0===t.target.objectType&&(t.target.objectType="Activity"),"Activity"===t.target.objectType?this.target=new TinCan.Activity(t.target):"Agent"===t.target.objectType?this.target=new TinCan.Agent(t.target):"Group"===t.target.objectType?this.target=new TinCan.Group(t.target):"SubStatement"===t.target.objectType?this.target=new TinCan.SubStatement(t.target):"StatementRef"===t.target.objectType?this.target=new TinCan.StatementRef(t.target):this.log("Unrecognized target type: "+t.target.objectType))),t.hasOwnProperty("result")&&(t.result instanceof TinCan.Result?this.result=t.result:this.result=new TinCan.Result(t.result)),t.hasOwnProperty("context")&&(t.context instanceof TinCan.Context?this.context=t.context:this.context=new TinCan.Context(t.context)),e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]])},toString:function(t){return this.log("toString"),(null!==this.actor?this.actor.toString(t):"")+" "+(null!==this.verb?this.verb.toString(t):"")+" "+(null!==this.target?this.target.toString(t):"")},asVersion:function(t){this.log("asVersion");var e,n,i=["timestamp"],r=["actor","verb","result","context"];for(e={objectType:this.objectType},t=t||TinCan.versions()[0],n=0;n<i.length;n+=1)null!==this[i[n]]&&(e[i[n]]=this[i[n]]);for(n=0;n<r.length;n+=1)null!==this[r[n]]&&(e[r[n]]=this[r[n]].asVersion(t));return null!==this.target&&(e.object=this.target.asVersion(t)),"0.9"===t&&(e.objectType="Statement"),e}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.Statement=function(t,e){this.log("constructor"),void 0===(e="number"==typeof e?{storeOriginal:e}:e||{}).storeOriginal&&(e.storeOriginal=null),void 0===e.doStamp&&(e.doStamp=!0),this.id=null,this.actor=null,this.verb=null,this.target=null,this.result=null,this.context=null,this.timestamp=null,this.stored=null,this.authority=null,this.version=null,this.degraded=!1,this.voided=null,this.inProgress=null,this.originalJSON=null,this.init(t,e)};n.prototype={LOG_SRC:"Statement",log:TinCan.prototype.log,init:function(t,e){this.log("init");var n,i=["id","stored","timestamp","version","inProgress","voided"];for(t=t||{},e.storeOriginal&&(this.originalJSON=JSON.stringify(t,null,e.storeOriginal)),t.hasOwnProperty("object")&&(t.target=t.object),t.hasOwnProperty("actor")&&(void 0!==t.actor.objectType&&"Person"!==t.actor.objectType||(t.actor.objectType="Agent"),"Agent"===t.actor.objectType?t.actor instanceof TinCan.Agent?this.actor=t.actor:this.actor=new TinCan.Agent(t.actor):"Group"===t.actor.objectType&&(t.actor instanceof TinCan.Group?this.actor=t.actor:this.actor=new TinCan.Group(t.actor))),t.hasOwnProperty("authority")&&(void 0!==t.authority.objectType&&"Person"!==t.authority.objectType||(t.authority.objectType="Agent"),"Agent"===t.authority.objectType?t.authority instanceof TinCan.Agent?this.authority=t.authority:this.authority=new TinCan.Agent(t.authority):"Group"===t.authority.objectType&&(t.actor instanceof TinCan.Group?this.authority=t.authority:this.authority=new TinCan.Group(t.authority))),t.hasOwnProperty("verb")&&(t.verb instanceof TinCan.Verb?this.verb=t.verb:this.verb=new TinCan.Verb(t.verb)),t.hasOwnProperty("target")&&(t.target instanceof TinCan.Activity||t.target instanceof TinCan.Agent||t.target instanceof TinCan.Group||t.target instanceof TinCan.SubStatement||t.target instanceof TinCan.StatementRef?this.target=t.target:(void 0===t.target.objectType&&(t.target.objectType="Activity"),"Activity"===t.target.objectType?this.target=new TinCan.Activity(t.target):"Agent"===t.target.objectType?this.target=new TinCan.Agent(t.target):"Group"===t.target.objectType?this.target=new TinCan.Group(t.target):"SubStatement"===t.target.objectType?this.target=new TinCan.SubStatement(t.target):"StatementRef"===t.target.objectType?this.target=new TinCan.StatementRef(t.target):this.log("Unrecognized target type: "+t.target.objectType))),t.hasOwnProperty("result")&&(t.result instanceof TinCan.Result?this.result=t.result:this.result=new TinCan.Result(t.result)),t.hasOwnProperty("context")&&(t.context instanceof TinCan.Context?this.context=t.context:this.context=new TinCan.Context(t.context)),n=0;n<i.length;n+=1)t.hasOwnProperty(i[n])&&null!==t[i[n]]&&(this[i[n]]=t[i[n]]);e.doStamp&&this.stamp()},toString:function(t){return this.log("toString"),(null!==this.actor?this.actor.toString(t):"")+" "+(null!==this.verb?this.verb.toString(t):"")+" "+(null!==this.target?this.target.toString(t):"")},asVersion:function(t){this.log("asVersion");var e,n={},i=["id","timestamp"],r=["actor","verb","result","context","authority"];for(t=t||TinCan.versions()[0],e=0;e<i.length;e+=1)null!==this[i[e]]&&(n[i[e]]=this[i[e]]);for(e=0;e<r.length;e+=1)null!==this[r[e]]&&(n[r[e]]=this[r[e]].asVersion(t));return null!==this.target&&(n.object=this.target.asVersion(t)),"0.9"!==t&&"0.95"!==t||null!==this.voided&&(n.voided=this.voided),"0.9"===t&&null!==this.inProgress&&(n.inProgress=this.inProgress),n},stamp:function(){this.log("stamp"),null===this.id&&(this.id=TinCan.Utils.getUUID()),null===this.timestamp&&(this.timestamp=TinCan.Utils.getISODateString(new Date))}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var o=TinCan.StatementsResult=function(t){this.log("constructor"),this.statements=null,this.more=null,this.init(t)};o.prototype={LOG_SRC:"StatementsResult",log:TinCan.prototype.log,init:function(t){this.log("init"),(t=t||{}).hasOwnProperty("statements")&&(this.statements=t.statements),t.hasOwnProperty("more")&&(this.more=t.more)}},o.fromJSON=function(t){o.prototype.log("fromJSON");var e,n,i,r=[];try{e=JSON.parse(t)}catch(t){o.prototype.log("fromJSON - JSON.parse error: "+t)}if(e){for(i=0;i<e.statements.length;i+=1){try{n=new TinCan.Statement(e.statements[i],4)}catch(t){o.prototype.log("fromJSON - statement instantiation failed: "+t+" ("+JSON.stringify(e.statements[i])+")"),n=new TinCan.Statement({id:e.statements[i].id},4)}r.push(n)}e.statements=r}return new o(e)}}(),function(){"use strict";var n=TinCan.State=function(t){this.log("constructor"),this.id=null,this.updated=null,this.contents=null,this.etag=null,this.contentType=null,this.init(t)};n.prototype={LOG_SRC:"State",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["id","contents","etag","contentType"];for(t=t||{},e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]]);this.updated=!1}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.ActivityProfile=function(t){this.log("constructor"),this.id=null,this.activity=null,this.updated=null,this.contents=null,this.etag=null,this.contentType=null,this.init(t)};n.prototype={LOG_SRC:"ActivityProfile",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["id","contents","etag","contentType"];for((t=t||{}).hasOwnProperty("activity")&&(t.activity instanceof TinCan.Activity?this.activity=t.activity:this.activity=new TinCan.Activity(t.activity)),e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]]);this.updated=!1}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.AgentProfile=function(t){this.log("constructor"),this.id=null,this.agent=null,this.updated=null,this.contents=null,this.etag=null,this.contentType=null,this.init(t)};n.prototype={LOG_SRC:"AgentProfile",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["id","contents","etag","contentType"];for((t=t||{}).hasOwnProperty("agent")&&(t.agent instanceof TinCan.Agent?this.agent=t.agent:this.agent=new TinCan.Agent(t.agent)),e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]]);this.updated=!1}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var n=TinCan.About=function(t){this.log("constructor"),this.version=null,this.init(t)};n.prototype={LOG_SRC:"About",log:TinCan.prototype.log,init:function(t){this.log("init");var e,n=["version"];for(t=t||{},e=0;e<n.length;e+=1)t.hasOwnProperty(n[e])&&null!==t[n[e]]&&(this[n[e]]=t[n[e]])}},n.fromJSON=function(t){n.prototype.log("fromJSON");var e=JSON.parse(t);return new n(e)}}(),function(){"use strict";var LOG_SRC="Environment.Browser",nativeRequest,xdrRequest,requestComplete,__delay,__IEModeConversion,env={},log=TinCan.prototype.log;"undefined"!=typeof window?(window.JSON||(window.JSON={parse:function(sJSON){return eval("("+sJSON+")")},stringify:function(t){var e,n,i="";if(t instanceof Object){if(t.constructor===Array){for(e=0;e<t.length;e+=1)i+=this.stringify(t[e])+",";return"["+i.substr(0,i.length-1)+"]"}if(t.toString!==Object.prototype.toString)return'"'+t.toString().replace(/"/g,"\\$&")+'"';for(n in t)t.hasOwnProperty(n)&&(i+='"'+n.replace(/"/g,"\\$&")+'":'+this.stringify(t[n])+",");return"{"+i.substr(0,i.length-1)+"}"}return"string"==typeof t?'"'+t.replace(/"/g,"\\$&")+'"':String(t)}}),Date.now||(Date.now=function(){return+new Date}),env.hasCORS=!1,env.useXDR=!1,"undefined"!=typeof XMLHttpRequest&&void 0!==(new XMLHttpRequest).withCredentials?env.hasCORS=!0:"undefined"!=typeof XDomainRequest&&(env.hasCORS=!0,env.useXDR=!0),requestComplete=function(t,e,n){var i,r,o;return log("requestComplete: "+n.finished+", xhr.status: "+t.status,LOG_SRC),o=void 0===t.status?n.fakeStatus:1223===t.status?204:t.status,n.finished?i:(n.finished=!0,r=e.ignore404&&404===o,200<=o&&o<400||r?e.callback?void e.callback(null,t):i={err:null,xhr:t}:(i={err:o,xhr:t},log(0===o?"[warning] There was a problem communicating with the Learning Record Store. Aborted, offline, or invalid CORS endpoint ("+o+")":"[warning] There was a problem communicating with the Learning Record Store. ("+o+" | "+t.responseText+")",LOG_SRC),e.callback&&e.callback(o,t),i))},__IEModeConversion=function(t,e,n,i){var r;for(r in e)e.hasOwnProperty(r)&&n.push(r+"="+encodeURIComponent(e[r]));return void 0!==i.data&&n.push("content="+encodeURIComponent(i.data)),e["Content-Type"]="application/x-www-form-urlencoded",t+="?method="+i.method,i.method="POST",i.params={},0<n.length&&(i.data=n.join("&")),t},nativeRequest=function(t,e,n){log("sendRequest using XMLHttpRequest",LOG_SRC);var i,r,o,a,s=this,l=[],c={finished:!1,fakeStatus:null},u=void 0!==n.callback,h=t,d=2048;for(r in log("sendRequest using XMLHttpRequest - async: "+u,LOG_SRC),n.params)n.params.hasOwnProperty(r)&&l.push(r+"="+encodeURIComponent(n.params[r]));if(0<l.length&&(h+="?"+l.join("&")),h.length>=d){if(void 0!==e["Content-Type"]&&"application/json"!==e["Content-Type"])return a=new Error("Unsupported content type for IE Mode request"),void 0!==n.callback&&n.callback(a,null),{err:a,xhr:null};if(void 0===n.method)return a=new Error("method must not be undefined for an IE Mode Request conversion"),void 0!==n.callback&&n.callback(a,null),{err:a,xhr:null};t=__IEModeConversion(t,e,l,n)}else t=h;for(r in(i="undefined"!=typeof XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")).open(n.method,t,u),e)e.hasOwnProperty(r)&&i.setRequestHeader(r,e[r]);void 0!==n.data&&(n.data+=""),o=n.data,u&&(i.onreadystatechange=function(){log("xhr.onreadystatechange - xhr.readyState: "+i.readyState,LOG_SRC),4===i.readyState&&requestComplete.call(s,i,n,c)});try{i.send(o)}catch(t){log("sendRequest caught send exception: "+t,LOG_SRC)}return u?i:requestComplete.call(this,i,n,c)},xdrRequest=function(t,e,n){log("sendRequest using XDomainRequest",LOG_SRC);var i,r,o,a,s,l=this,c=[],u={finished:!1,fakeStatus:null};if(void 0!==e["Content-Type"]&&"application/json"!==e["Content-Type"])return s=new Error("Unsupported content type for IE Mode request"),n.callback?(n.callback(s,null),null):{err:s,xhr:null};for(o in t+="?method="+n.method,n.params)n.params.hasOwnProperty(o)&&c.push(o+"="+encodeURIComponent(n.params[o]));for(o in e)e.hasOwnProperty(o)&&c.push(o+"="+encodeURIComponent(e[o]));void 0!==n.data&&c.push("content="+encodeURIComponent(n.data)),r=c.join("&"),(i=new XDomainRequest).open("POST",t),n.callback?(i.onload=function(){u.fakeStatus=200,requestComplete.call(l,i,n,u)},i.onerror=function(){u.fakeStatus=400,requestComplete.call(l,i,n,u)},i.ontimeout=function(){u.fakeStatus=0,requestComplete.call(l,i,n,u)}):(i.onload=function(){u.fakeStatus=200},i.onerror=function(){u.fakeStatus=400},i.ontimeout=function(){u.fakeStatus=0}),i.onprogress=function(){},i.timeout=0;try{i.send(r)}catch(t){log("sendRequest caught send exception: "+t,LOG_SRC)}if(n.callback)return i;for(a=1e4+Date.now(),log("sendRequest - until: "+a+", finished: "+u.finished,LOG_SRC);Date.now()<a&&null===u.fakeStatus;)__delay();return requestComplete.call(l,i,n,u)},TinCan.LRS.prototype._initByEnvironment=function(t){var e,n,i;if(log("_initByEnvironment",LOG_SRC),t=t||{},this._makeRequest=nativeRequest,this._IEModeConversion=__IEModeConversion,null===(e=this.endpoint.toLowerCase().match(/([A-Za-z]+:)\/\/([^:\/]+):?(\d+)?(\/.*)?$/)))throw log("[error] LRS invalid: failed to divide URL parts",LOG_SRC),{code:4,mesg:"LRS invalid: failed to divide URL parts"};if(i=location.port,n=location.protocol.toLowerCase()===e[1],""===i&&(i="http:"===location.protocol.toLowerCase()?"80":"https:"===location.protocol.toLowerCase()?"443":""),!n||location.hostname.toLowerCase()!==e[2]||i!==(null!==e[3]&&void 0!==e[3]&&""!==e[3]?e[3]:"http:"===e[1]?"80":"https:"===e[1]?"443":""))if(env.hasCORS){if(env.useXDR&&n)this._makeRequest=xdrRequest;else if(env.useXDR&&!n){if(!t.allowFail)throw log("[error] LRS invalid: cross domain request for differing scheme in IE with XDR",LOG_SRC),{code:2,mesg:"LRS invalid: cross domain request for differing scheme in IE with XDR"};log("[warning] LRS invalid: cross domain request for differing scheme in IE with XDR (allowed to fail)",LOG_SRC)}}else{if(!t.allowFail)throw log("[error] LRS invalid: cross domain requests not supported in this browser",LOG_SRC),{code:1,mesg:"LRS invalid: cross domain requests not supported in this browser"};log("[warning] LRS invalid: cross domain requests not supported in this browser (allowed to fail)",LOG_SRC)}},__delay=function(){var t=new XMLHttpRequest,e=window.location+"?forcenocache="+TinCan.Utils.getUUID();t.open("GET",e,!1),t.send(null)},TinCan.LRS.syncEnabled=!0):log("'window' not defined",LOG_SRC)}(),
/**
 * State-based routing for AngularJS
 * @version v0.3.2
 * @link http://angular-ui.github.com/
 * @license MIT License, http://www.opensource.org/licenses/MIT
 */
"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(t,N,R){"use strict";var _,L=N.isDefined,m=N.isFunction,H=N.isString,j=N.isObject,F=N.isArray,z=N.forEach,B=N.extend,V=N.copy,v=N.toJson;function W(t,e){return B(new(B(function(){},{prototype:t})),e)}function w(n){return z(arguments,function(t){t!==n&&z(t,function(t,e){n.hasOwnProperty(e)||(n[e]=t)})}),n}function u(t,e){var n=[];for(var i in t.path){if(t.path[i]!==e.path[i])break;n.push(t.path[i])}return n}function q(t){if(Object.keys)return Object.keys(t);var n=[];return z(t,function(t,e){n.push(e)}),n}function S(t,e){if(Array.prototype.indexOf)return t.indexOf(e,Number(arguments[2])||0);var n=t.length>>>0,i=Number(arguments[2])||0;for((i=i<0?Math.ceil(i):Math.floor(i))<0&&(i+=n);i<n;i++)if(i in t&&t[i]===e)return i;return-1}function U(t,e,n,i){var r,o=u(n,i),a={},s=[];for(var l in o)if(o[l]&&o[l].params&&(r=q(o[l].params)).length)for(var c in r)0<=S(s,r[c])||(s.push(r[c]),a[r[c]]=t[r[c]]);return B({},a,e)}function p(t,e,n){if(!n)for(var i in n=[],t)n.push(i);for(var r=0;r<n.length;r++){var o=n[r];if(t[o]!=e[o])return!1}return!0}function J(t,e){var n={};return z(t,function(t){n[t]=e[t]}),n}function g(e){var n={},t=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return z(t,function(t){t in e&&(n[t]=e[t])}),n}function C(t){var e={},n=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var i in t)-1==S(n,i)&&(e[i]=t[i]);return e}function T(t,n){var i=F(t),r=i?[]:{};return z(t,function(t,e){n(t,e)&&(r[i?r.length:e]=t)}),r}function G(t,n){var i=F(t)?[]:{};return z(t,function(t,e){i[e]=n(t,e)}),i}function y(t){return t.then(R,function(){})&&t}function e(v,y){var s=1,l=2,t={},c=[],b=t,x=B(v.when(t),{$$promises:t,$$values:t});this.study=function(i){if(!j(i))throw new Error("'invocables' must be an object");var p=q(i||{}),g=[],r=[],o={};function a(t,e){if(o[e]!==l){if(r.push(e),o[e]===s)throw r.splice(0,S(r,e)),new Error("Cyclic dependency: "+r.join(" -> "));if(o[e]=s,H(t))g.push(e,[function(){return y.get(t)}],c);else{var n=y.annotate(t);z(n,function(t){t!==e&&i.hasOwnProperty(t)&&a(i[t],t)}),g.push(e,t,n)}r.pop(),o[e]=l}}function m(t){return j(t)&&t.then&&t.$$promises}return z(i,a),i=r=o=null,function(s,t,l){if(m(s)&&l===R&&(l=t,t=s,s=null),s){if(!j(s))throw new Error("'locals' must be an object")}else s=b;if(t){if(!m(t))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else t=x;var e=v.defer(),c=e.promise,u=c.$$promises={},h=B({},s),n=1+g.length/3,i=!1;function d(){--n||(i||w(h,t.$$values),c.$$values=h,c.$$promises=c.$$promises||!0,delete c.$$inheritedValues,e.resolve(h))}function f(t){c.$$failure=t,e.reject(t)}if(L(t.$$failure))return f(t.$$failure),c;t.$$inheritedValues&&w(h,C(t.$$inheritedValues,p)),B(u,t.$$promises),t.$$values?(i=w(h,C(t.$$values,p)),c.$$inheritedValues=C(t.$$values,p),d()):(t.$$inheritedValues&&(c.$$inheritedValues=C(t.$$inheritedValues,p)),t.then(d,f));for(var r=0,o=g.length;r<o;r+=3)s.hasOwnProperty(g[r])?d():a(g[r],g[r+1],g[r+2]);function a(e,t,n){var i=v.defer(),r=0;function o(t){i.reject(t),f(t)}function a(){if(!L(c.$$failure))try{i.resolve(y.invoke(t,l,h)),i.promise.then(function(t){h[e]=t,d()},o)}catch(t){o(t)}}z(n,function(e){u.hasOwnProperty(e)&&!s.hasOwnProperty(e)&&(r++,u[e].then(function(t){h[e]=t,--r||a()},o))}),r||a(),u[e]=i.promise}return c}},this.resolve=function(t,e,n,i){return this.study(t)(e,n,i)}}function n(n,i,r){this.fromConfig=function(t,e,n){return L(t.template)?this.fromString(t.template,e):L(t.templateUrl)?this.fromUrl(t.templateUrl,e):L(t.templateProvider)?this.fromProvider(t.templateProvider,e,n):null},this.fromString=function(t,e){return m(t)?t(e):t},this.fromUrl=function(t,e){return m(t)&&(t=t(e)),null==t?null:n.get(t,{cache:i,headers:{Accept:"text/html"}}).then(function(t){return t.data})},this.fromProvider=function(t,e,n){return r.invoke(t,null,n||{params:e})}}function h(s,l,t){l=B({params:{}},j(l)?l:{});var e,n,i,r,o=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,a=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,c="^",u=0,h=this.segments=[],d=t?t.params:{},f=this.params=t?t.params.$$new():new _.ParamSet,p=[];function g(t,e,n,i){if(p.push(t),d[t])return d[t];if(!/^\w+([-.]+\w+)*(?:\[\])?$/.test(t))throw new Error("Invalid parameter name '"+t+"' in pattern '"+s+"'");if(f[t])throw new Error("Duplicate parameter name '"+t+"' in pattern '"+s+"'");return f[t]=new _.Param(t,e,n,i),f[t]}function m(t,e,n,i){var r=["",""],o=t.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!e)return o;switch(n){case!1:r=["(",")"+(i?"?":"")];break;case!0:o=o.replace(/\/$/,""),r=["(?:/(",")|/)?"];break;default:r=["("+n+"|",")?"]}return o+r[0]+e+r[1]}function v(t,e){var n,i,r,o,a;return n=t[2]||t[3],a=l.params[n],r=s.substring(u,t.index),(i=e?t[4]:t[4]||("*"==t[1]?".*":null))&&(o=_.type(i)||W(_.type("string"),{pattern:new RegExp(i,l.caseInsensitive?"i":R)})),{id:n,regexp:i,segment:r,type:o,cfg:a}}for(this.source=s;(e=o.exec(s))&&!(0<=(n=v(e,!1)).segment.indexOf("?"));)i=g(n.id,n.type,n.cfg,"path"),c+=m(n.segment,i.type.pattern.source,i.squash,i.isOptional),h.push(n.segment),u=o.lastIndex;var y=(r=s.substring(u)).indexOf("?");if(0<=y){var b=this.sourceSearch=r.substring(y);if(r=r.substring(0,y),this.sourcePath=s.substring(0,u+y),0<b.length)for(u=0;e=a.exec(b);)i=g((n=v(e,!0)).id,n.type,n.cfg,"search"),u=o.lastIndex}else this.sourcePath=s,this.sourceSearch="";c+=m(r)+(!1===l.strict?"/?":"")+"$",h.push(r),this.regexp=new RegExp(c,l.caseInsensitive?"i":R),this.prefix=h[0],this.$$paramNames=p}function $(t){B(this,t)}function d(){_=this;var e=!1,n=!0,v=!1;function t(t){return null!=t?t.toString().replace(/(~|\/)/g,function(t){return{"~":"~~","/":"~2F"}[t]}):t}function i(t){return null!=t?t.toString().replace(/(~~|~2F)/g,function(t){return{"~~":"~","~2F":"/"}[t]}):t}var y,b={},r=!0,o=[],a={string:{encode:t,decode:i,is:function(t){return null==t||!L(t)||"string"==typeof t},pattern:/[^/]*/},int:{encode:t,decode:function(t){return parseInt(t,10)},is:function(t){return L(t)&&this.decode(t.toString())===t},pattern:/\d+/},bool:{encode:function(t){return t?1:0},decode:function(t){return 0!==parseInt(t,10)},is:function(t){return!0===t||!1===t},pattern:/0|1/},date:{encode:function(t){return this.is(t)?[t.getFullYear(),("0"+(t.getMonth()+1)).slice(-2),("0"+t.getDate()).slice(-2)].join("-"):R},decode:function(t){if(this.is(t))return t;var e=this.capture.exec(t);return e?new Date(e[1],e[2]-1,e[3]):R},is:function(t){return t instanceof Date&&!isNaN(t.valueOf())},equals:function(t,e){return this.is(t)&&this.is(e)&&t.toISOString()===e.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:N.toJson,decode:N.fromJson,is:N.isObject,equals:N.equals,pattern:/[^/]*/},any:{encode:N.identity,decode:N.identity,equals:N.equals,pattern:/.*/}};function s(){return{strict:n,caseInsensitive:e}}function x(t){return m(t)||F(t)&&m(t[t.length-1])}function l(){for(;o.length;){var t=o.shift();if(t.pattern)throw new Error("You cannot override a type's .pattern at runtime.");N.extend(b[t.name],y.invoke(t.def))}}function c(t){B(this,t||{})}d.$$getDefaultValue=function(t){if(!x(t.value))return t.value;if(!y)throw new Error("Injectable functions cannot be called at configuration time");return y.invoke(t.value)},this.caseInsensitive=function(t){return L(t)&&(e=t),e},this.strictMode=function(t){return L(t)&&(n=t),n},this.defaultSquashPolicy=function(t){if(!L(t))return v;if(!0!==t&&!1!==t&&!H(t))throw new Error("Invalid squash policy: "+t+". Valid policies: false, true, arbitrary-string");return v=t},this.compile=function(t,e){return new h(t,B(s(),e))},this.isMatcher=function(n){if(!j(n))return!1;var i=!0;return z(h.prototype,function(t,e){m(t)&&(i=i&&L(n[e])&&m(n[e]))}),i},this.type=function(t,e,n){if(!L(e))return b[t];if(b.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return b[t]=new $(B({name:t},e)),n&&(o.push({name:t,def:n}),r||l()),this},z(a,function(t,e){b[e]=new $(B({name:e},t))}),b=W(b,{}),this.$get=["$injector",function(t){return y=t,r=!1,l(),z(a,function(t,e){b[e]||(b[e]=new $(t))}),this}],this.Param=function(i,t,n,r){var o=this;n=c(n),t=u(n,t,r);var e=h();"string"!==(t=e?t.$asArray(e,"search"===r):t).name||e||"path"!==r||n.value!==R||(n.value="");var a=n.value!==R,s=d(n,a),l=f(n,e,a,s);function c(t){var e=j(t)?q(t):[];return-1===S(e,"value")&&-1===S(e,"type")&&-1===S(e,"squash")&&-1===S(e,"array")&&(t={value:t}),t.$$fn=x(t.value)?t.value:function(){return t.value},t}function u(t,e,n){if(t.type&&e)throw new Error("Param '"+i+"' has two type configurations.");return e||(t.type?N.isString(t.type)?b[t.type]:t.type instanceof $?t.type:new $(t.type):"config"===n?b.any:b.string)}function h(){var t={array:"search"===r&&"auto"},e=i.match(/\[\]$/)?{array:!0}:{};return B(t,e,n).array}function d(t,e){var n=t.squash;if(!e||!1===n)return!1;if(!L(n)||null==n)return v;if(!0===n||H(n))return n;throw new Error("Invalid squash policy: '"+n+"'. Valid policies: false, true, or arbitrary string")}function f(t,e,n,i){var r,o,a=[{from:"",to:n||e?R:""},{from:null,to:n||e?R:""}];return r=F(t.replace)?t.replace:[],H(i)&&r.push({from:i,to:R}),o=G(r,function(t){return t.from}),T(a,function(t){return-1===S(o,t.from)}).concat(r)}function p(){if(!y)throw new Error("Injectable functions cannot be called at configuration time");var t=y.invoke(n.$$fn);if(null!==t&&t!==R&&!o.type.is(t))throw new Error("Default value ("+t+") for parameter '"+o.id+"' is not an instance of Type ("+o.type.name+")");return t}function g(t){function n(e){return function(t){return t.from===e}}function e(t){var e=G(T(o.replace,n(t)),function(t){return t.to});return e.length?e[0]:t}return t=e(t),L(t)?o.type.$normalize(t):p()}function m(){return"{Param:"+i+" "+t+" squash: '"+s+"' optional: "+a+"}"}B(this,{id:i,type:t,location:r,array:e,squash:s,replace:l,isOptional:a,value:g,dynamic:R,config:n,toString:m})},c.prototype={$$new:function(){return W(this,B(new c,{$$parent:this}))},$$keys:function(){for(var e=[],t=[],n=this,i=q(c.prototype);n;)t.push(n),n=n.$$parent;return t.reverse(),z(t,function(t){z(q(t),function(t){-1===S(e,t)&&-1===S(i,t)&&e.push(t)})}),e},$$values:function(e){var n={},i=this;return z(i.$$keys(),function(t){n[t]=i[t].value(e&&e[t])}),n},$$equals:function(i,r){var o=!0,a=this;return z(a.$$keys(),function(t){var e=i&&i[t],n=r&&r[t];a[t].type.equals(e,n)||(o=!1)}),o},$$validates:function(t){var e,n,i,r,o,a=this.$$keys();for(e=0;e<a.length&&(n=this[a[e]],(i=t[a[e]])!==R&&null!==i||!n.isOptional);e++){if(r=n.type.$normalize(i),!n.type.is(r))return!1;if(o=n.type.encode(r),N.isString(o)&&!n.type.pattern.exec(o))return!1}return!0},$$parent:R},this.ParamSet=c}function i(h,s){var d,f=[],p=null,g=!1;function l(t){var e=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(t.source);return null!=e?e[1].replace(/\\(.)/g,"$1"):""}function c(t,n){return t.replace(/\$(\$|\d{1,2})/,function(t,e){return n["$"===e?0:Number(e)]})}function u(t,e,n){if(!n)return!1;var i=t.invoke(e,e,{$match:n});return!L(i)||i}function t(s,t,r,e,l){var o,i=e.baseHref(),n=s.url();function c(t,e,n){return"/"===i?t:e?i.slice(0,-1)+t:n?i.slice(1)+t:t}function a(t){if(!t||!t.defaultPrevented){o&&s.url();o=R;var e,n=f.length;for(e=0;e<n;e++)if(i(f[e]))return;p&&i(p)}function i(t){var e=t(r,s);return!!e&&(H(e)&&s.replace().url(e),!0)}}function u(){return d=d||t.$on("$locationChangeSuccess",a)}return g||u(),{sync:function(){a()},listen:function(){return u()},update:function(t){t?n=s.url():s.url()!==n&&(s.url(n),s.replace())},push:function(t,e,n){var i=t.format(e||{});null!==i&&e&&e["#"]&&(i+="#"+e["#"]),s.url(i),o=n&&n.$$avoidResync?s.url():R,n&&n.replace&&s.replace()},href:function(t,e,n){if(!t.validates(e))return null;var i=h.html5Mode();N.isObject(i)&&(i=i.enabled),i=i&&l.history;var r=t.format(e);if(n=n||{},i||null===r||(r="#"+h.hashPrefix()+r),null!==r&&e&&e["#"]&&(r+="#"+e["#"]),r=c(r,i,n.absolute),!n.absolute||!r)return r;var o=!i&&r?"/":"",a=s.port();return a=80===a||443===a?"":":"+a,[s.protocol(),"://",s.host(),a,o,r].join("")}}}this.rule=function(t){if(!m(t))throw new Error("'rule' must be a function");return f.push(t),this},this.otherwise=function(t){if(H(t)){var e=t;t=function(){return e}}else if(!m(t))throw new Error("'rule' must be a function");return p=t,this},this.when=function(t,e){var r,o=H(e);if(H(t)&&(t=s.compile(t)),!o&&!m(e)&&!F(e))throw new Error("invalid 'handler' in when()");var n={matcher:function(n,i){return o&&(r=s.compile(i),i=["$match",function(t){return r.format(t)}]),B(function(t,e){return u(t,i,n.exec(e.path(),e.search()))},{prefix:H(n.prefix)?n.prefix:""})},regex:function(n,i){if(n.global||n.sticky)throw new Error("when() RegExp must not be global or sticky");return o&&(r=i,i=["$match",function(t){return c(r,t)}]),B(function(t,e){return u(t,i,n.exec(e.path()))},{prefix:l(n)})}},i={matcher:s.isMatcher(t),regex:t instanceof RegExp};for(var a in i)if(i[a])return this.rule(n[a](t,e));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(t){t===R&&(t=!0),g=t},(this.$get=t).$inject=["$location","$rootScope","$injector","$browser","$sniffer"]}function r(r,i){var D,P,c={},n={},M="abstract",o={parent:function(t){if(L(t.parent)&&t.parent)return E(t.parent);var e=/^(.+)\.[^.]+$/.exec(t.name);return e?E(e[1]):D},data:function(t){return t.parent&&t.parent.data&&(t.data=t.self.data=W(t.parent.data,t.data)),t.data},url:function(t){var e=t.url,n={params:t.params||{}};if(H(e))return"^"==e.charAt(0)?i.compile(e.substring(1),n):(t.parent.navigable||D).url.concat(e,n);if(!e||i.isMatcher(e))return e;throw new Error("Invalid url '"+e+"' in state '"+t+"'")},navigable:function(t){return t.url?t:t.parent?t.parent.navigable:null},ownParams:function(t){var n=t.url&&t.url.params||new _.ParamSet;return z(t.params||{},function(t,e){n[e]||(n[e]=new _.Param(e,null,t,"config"))}),n},params:function(t){var e=g(t.ownParams,t.ownParams.$$keys());return t.parent&&t.parent.params?B(t.parent.params.$$new(),e):new _.ParamSet},views:function(n){var i={};return z(L(n.views)?n.views:{"":n},function(t,e){e.indexOf("@")<0&&(e+="@"+n.parent.name),t.resolveAs=t.resolveAs||n.resolveAs||"$resolve",i[e]=t}),i},path:function(t){return t.parent?t.parent.path.concat(t):[]},includes:function(t){var e=t.parent?B({},t.parent.includes):{};return e[t.name]=!0,e},$delegates:{}};function u(t){return 0===t.indexOf(".")||0===t.indexOf("^")}function E(t,e){if(!t)return R;var n=H(t),i=n?t:t.name;if(u(i)){if(!e)throw new Error("No reference point given for path '"+i+"'");e=E(e);for(var r=i.split("."),o=0,a=r.length,s=e;o<a;o++)if(""!==r[o]||0!==o){if("^"!==r[o])break;if(!s.parent)throw new Error("Path '"+i+"' not valid for state '"+e.name+"'");s=s.parent}else s=e;r=r.slice(o).join("."),i=s.name+(s.name&&r?".":"")+r}var l=c[i];return!l||!n&&(n||l!==t&&l.self!==t)?R:l}function a(t,e){n[t]||(n[t]=[]),n[t].push(e)}function s(t){for(var e=n[t]||[];e.length;)l(e.shift())}function l(n){var t=(n=W(n,{self:n,resolve:n.resolve||{},toString:function(){return this.name}})).name;if(!H(t)||0<=t.indexOf("@"))throw new Error("State must have a valid name");if(c.hasOwnProperty(t))throw new Error("State '"+t+"' is already defined");var e=-1!==t.indexOf(".")?t.substring(0,t.lastIndexOf(".")):H(n.parent)?n.parent:j(n.parent)&&H(n.parent.name)?n.parent.name:"";if(e&&!c[e])return a(e,n.self);for(var i in o)m(o[i])&&(n[i]=o[i](n,o.$delegates[i]));return!(c[t]=n)[M]&&n.url&&r.when(n.url,["$match","$stateParams",function(t,e){P.$current.navigable==n&&p(t,e)||P.transitionTo(n,t,{inherit:!0,location:!1})}]),s(t),n}function d(t){return-1<t.indexOf("*")}function f(t){for(var e=t.split("."),n=P.$current.name.split("."),i=0,r=e.length;i<r;i++)"*"===e[i]&&(n[i]="*");return"**"===e[0]&&(n=n.slice(S(n,e[1]))).unshift("**"),"**"===e[e.length-1]&&(n.splice(S(n,e[e.length-2])+1,Number.MAX_VALUE),n.push("**")),e.length==n.length&&n.join("")===e.join("")}function t(t,e){return H(t)&&!L(e)?o[t]:(m(e)&&H(t)&&(o[t]&&!o.$delegates[t]&&(o.$delegates[t]=o[t]),o[t]=e),this)}function e(t,e){return j(t)?e=t:e.name=t,l(e),this}function h(b,x,u,_,h,w,S,t,e){var C=new Error("transition superseded"),T=y(x.reject(C)),$=y(x.reject(new Error("transition prevented"))),a=y(x.reject(new Error("transition aborted"))),k=y(x.reject(new Error("transition failed")));function A(t,e,n,i){var r=b.$broadcast("$stateNotFound",t,e,n);if(r.defaultPrevented)return S.update(),a;if(!r.retry)return null;if(i.$retry)return S.update(),k;var o=P.transition=x.when(r.retry);return o.then(function(){return o!==P.transition?(b.$broadcast("$stateChangeCancel",t.to,t.toParams,e,n),T):(t.options.$retry=!0,P.transitionTo(t.to,t.toParams,t.options))},function(){return a}),S.update(),o}function O(o,t,e,n,a,s){var l=e?t:J(o.params.$$keys(),t),i={$stateParams:l};a.resolve=h.resolve(o.resolve,i,a.resolve,o);var r=[a.resolve.then(function(t){a.globals=t})];function c(){var t=[];return z(o.views,function(n,i){var r=n.resolve&&n.resolve!==o.resolve?n.resolve:{};r.$template=[function(){return u.load(i,{view:n,locals:a.globals,params:l,notify:s.notify})||""}],t.push(h.resolve(r,a.globals,a.resolve,o).then(function(t){if(m(n.controllerProvider)||F(n.controllerProvider)){var e=N.extend({},r,a.globals);t.$$controller=_.invoke(n.controllerProvider,null,e)}else t.$$controller=n.controller;t.$$state=o,t.$$controllerAs=n.controllerAs,t.$$resolveAs=n.resolveAs,a[i]=t}))}),x.all(t).then(function(){return a.globals})}return n&&r.push(n),x.all(r).then(c).then(function(t){return a})}return D.locals={resolve:null,globals:{$stateParams:{}}},P={params:{},current:D.self,$current:D,transition:null,reload:function(t){return P.transitionTo(P.current,w,{reload:t||!0,inherit:!1,notify:!0})},go:function(t,e,n){return P.transitionTo(t,e,B({inherit:!0,relative:P.$current},n))},transitionTo:function(i,r,o){r=r||{},o=B({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},o||{});var a=P.$current,s=P.params,l=a.path,t=E(i,o.relative),e=r["#"];if(!L(t)){var n={to:i,toParams:r,options:o},c=A(n,a.self,s,o);if(c)return c;if(i=n.to,r=n.toParams,o=n.options,t=E(i,o.relative),!L(t)){if(!o.relative)throw new Error("No such state '"+i+"'");throw new Error("Could not resolve '"+i+"' from state '"+o.relative+"'")}}if(t[M])throw new Error("Cannot transition to abstract state '"+i+"'");if(o.inherit&&(r=U(w,r||{},P.$current,t)),!t.params.$$validates(r))return k;r=t.params.$$values(r);var u=(i=t).path,h=0,d=u[h],f=D.locals,p=[];if(o.reload){if(H(o.reload)||j(o.reload)){if(j(o.reload)&&!o.reload.name)throw new Error("Invalid reload state object");var g=!0===o.reload?l[0]:E(o.reload);if(o.reload&&!g)throw new Error("No such reload state '"+(H(o.reload)?o.reload:o.reload.name)+"'");for(;d&&d===l[h]&&d!==g;)f=p[h]=d.locals,d=u[++h]}}else for(;d&&d===l[h]&&d.ownParams.$$equals(r,s);)f=p[h]=d.locals,d=u[++h];if(I(i,r,a,s,f,o))return e&&(r["#"]=e),P.params=r,V(P.params,w),V(J(i.params.$$keys(),w),i.locals.globals.$stateParams),o.location&&i.navigable&&i.navigable.url&&(S.push(i.navigable.url,r,{$$avoidResync:!0,replace:"replace"===o.location}),S.update(!0)),P.transition=null,x.when(P.current);if(r=J(i.params.$$keys(),r||{}),e&&(r["#"]=e),o.notify&&b.$broadcast("$stateChangeStart",i.self,r,a.self,s,o).defaultPrevented)return b.$broadcast("$stateChangeCancel",i.self,r,a.self,s),null==P.transition&&S.update(),$;for(var m=x.when(f),v=h;v<u.length;d=u[++v])f=p[v]=W(f),m=O(d,r,d===i,m,f,o);var y=P.transition=m.then(function(){var t,e,n;if(P.transition!==y)return b.$broadcast("$stateChangeCancel",i.self,r,a.self,s),T;for(t=l.length-1;h<=t;t--)(n=l[t]).self.onExit&&_.invoke(n.self.onExit,n.self,n.locals.globals),n.locals=null;for(t=h;t<u.length;t++)(e=u[t]).locals=p[t],e.self.onEnter&&_.invoke(e.self.onEnter,e.self,e.locals.globals);return P.transition!==y?(b.$broadcast("$stateChangeCancel",i.self,r,a.self,s),T):(P.$current=i,P.current=i.self,P.params=r,V(P.params,w),P.transition=null,o.location&&i.navigable&&S.push(i.navigable.url,i.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:"replace"===o.location}),o.notify&&b.$broadcast("$stateChangeSuccess",i.self,r,a.self,s),S.update(!0),P.current)}).then(null,function(t){return t===C?T:P.transition!==y?(b.$broadcast("$stateChangeCancel",i.self,r,a.self,s),T):(P.transition=null,b.$broadcast("$stateChangeError",i.self,r,a.self,s,t).defaultPrevented||S.update(),x.reject(t))});return y},is:function(t,e,n){var i=E(t,(n=B({relative:P.$current},n||{})).relative);return L(i)?P.$current===i&&(!e||p(i.params.$$values(e),w)):R},includes:function(t,e,n){if(n=B({relative:P.$current},n||{}),H(t)&&d(t)){if(!f(t))return!1;t=P.$current.name}var i=E(t,n.relative);if(!L(i))return R;if(!L(P.$current.includes[i.name]))return!1;if(!e)return!0;for(var r=q(e),o=0;o<r.length;o++){var a=r[o],s=i.params[a];if(s&&!s.type.equals(w[a],e[a]))return!1}return!0},href:function(t,e,n){var i=E(t,(n=B({lossy:!0,inherit:!0,absolute:!1,relative:P.$current},n||{})).relative);if(!L(i))return null;n.inherit&&(e=U(w,e||{},P.$current,i));var r=i&&n.lossy?i.navigable:i;return r&&r.url!==R&&null!==r.url?S.href(r.url,J(i.params.$$keys().concat("#"),e||{}),{absolute:n.absolute}):null},get:function(t,e){if(0===arguments.length)return G(q(c),function(t){return c[t].self});var n=E(t,e||P.$current);return n&&n.self?n.self:null}}}function I(t,e,n,i,r,o){function a(e,t,n){function i(t){return"search"!=e.params[t].location}var r=e.params.$$keys().filter(i),o=g.apply({},[e.params].concat(r));return new _.ParamSet(o).$$equals(t,n)}if(!o.reload&&t===n&&(r===n.locals||!1===t.self.reloadOnSearch&&a(n,i,e)))return!0}(D=l({name:"",url:"^",views:null,abstract:!0})).navigable=null,this.decorator=t,this.state=e,(this.$get=h).$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function o(){function t(t,i){return{load:function(t,e){var n;return(e=B({template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}},e)).view&&(n=i.fromConfig(e.view,e.params,e.locals)),n}}}(this.$get=t).$inject=["$rootScope","$templateFactory"]}function a(){var n=!1;this.useAnchorScroll=function(){n=!0},this.$get=["$anchorScroll","$timeout",function(t,e){return n?t:function(t){return e(function(){t[0].scrollIntoView()},0,!1)}}]}function s(m,e,v,y,b){function t(){return e.has?function(t){return e.has(t)?e.get(t):null}:function(t){try{return e.get(t)}catch(t){return null}}}var n=t(),r=n("$animator"),o=n("$animate");function i(t,e){var n=function(){return{enter:function(t,e,n){e.after(t),n()},leave:function(t,e){t.remove(),e()}}};if(o)return{enter:function(t,e,n){2<N.version.minor?o.enter(t,null,e).then(n):o.enter(t,null,e,n)},leave:function(t,e){2<N.version.minor?o.leave(t).then(e):o.leave(t,e)}};if(r){var i=r&&r(e,t);return{enter:function(t,e,n){i.enter(t,null,e),n()},leave:function(t,e){i.leave(t),e()}}}return n()}return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(t,e,g){return function(o,a,s){var e,l,c,u,h=s.onload||"",d=s.autoscroll,f=i(s,o);a.inheritedData("$uiView");function p(){if(e&&(e.remove(),e=null),c&&(c.$destroy(),c=null),l){var t=l.data("$uiViewAnim");f.leave(l,function(){t.$$animLeave.resolve(),e=null}),e=l,l=null}}function t(t){var e,n=x(o,s,a,y),i=n&&m.$current&&m.$current.locals[n];if(t||i!==u){e=o.$new(),u=m.$current.locals[n],e.$emit("$viewContentLoading",n);var r=g(e,function(t){var e=b.defer(),n=b.defer(),i={$animEnter:e.promise,$animLeave:n.promise,$$animLeave:n};t.data("$uiViewAnim",i),f.enter(t,a,function(){e.resolve(),c&&c.$emit("$viewContentAnimationEnded"),(N.isDefined(d)&&!d||o.$eval(d))&&v(t)}),p()});l=r,(c=e).$emit("$viewContentLoaded",n),c.$eval(h)}}o.$on("$stateChangeSuccess",function(){t(!1)}),t(!0)}}}}function l(u,h,d,f){return{restrict:"ECA",priority:-400,compile:function(t){var c=t.html();return function(t,e,n){var i=d.$current,r=x(t,n,e,f),o=i&&i.locals[r];if(o){e.data("$uiView",{name:r,state:o.$$state}),e.html(o.$template?o.$template:c);var a=N.extend({},o);t[o.$$resolveAs]=a;var s=u(e.contents());if(o.$$controller){o.$scope=t,o.$element=e;var l=h(o.$$controller,o);o.$$controllerAs&&(t[o.$$controllerAs]=l,t[o.$$controllerAs][o.$$resolveAs]=a),m(l.$onInit)&&l.$onInit(),e.data("$ngControllerController",l),e.children().data("$ngControllerController",l)}s(t)}}}}}function x(t,e,n,i){var r=i(e.uiView||e.name||"")(t),o=n.inheritedData("$uiView");return 0<=r.indexOf("@")?r:r+"@"+(o?o.state.name:"")}function b(t,e){var n,i=t.match(/^\s*({[^}]*})\s*$/);if(i&&(t=e+"("+i[1]+")"),!(n=t.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/))||4!==n.length)throw new Error("Invalid state ref '"+t+"'");return{state:n[1],paramExpr:n[3]||null}}function k(t){var e=t.parent().inheritedData("$uiView");if(e&&e.state&&e.state.name)return e.state}function f(t){var e="[object SVGAnimatedString]"===Object.prototype.toString.call(t.prop("href")),n="FORM"===t[0].nodeName;return{attr:n?"action":e?"xlink:href":"href",isAnchor:"A"===t.prop("tagName").toUpperCase(),clickable:!n}}function A(o,a,s,l,c){return function(t){var e=t.which||t.button,n=c();if(!(1<e||t.ctrlKey||t.metaKey||t.shiftKey||o.attr("target"))){var i=s(function(){a.go(n.state,n.params,n.options)});t.preventDefault();var r=l.isAnchor&&!n.href?1:0;t.preventDefault=function(){r--<=0&&s.cancel(i)}}}}function O(t,e){return{relative:k(t)||e.$current,inherit:!0}}function c(h,d){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(t,e,n,i){var r,o=b(n.uiSref,h.current.name),a={state:o.state,href:null,params:null},s=f(e),l=i[1]||i[0],c=null;a.options=B(O(e,h),n.uiSrefOpts?t.$eval(n.uiSrefOpts):{});var u=function(t){t&&(a.params=N.copy(t)),a.href=h.href(o.state,a.params,a.options),c&&c(),l&&(c=l.$$addStateInfo(o.state,a.params)),null!==a.href&&n.$set(s.attr,a.href)};o.paramExpr&&(t.$watch(o.paramExpr,function(t){t!==a.params&&u(t)},!0),a.params=N.copy(t.$eval(o.paramExpr))),u(),s.clickable&&(r=A(e,h,d,s,function(){return a}),e[e.on?"on":"bind"]("click",r),t.$on("$destroy",function(){e[e.off?"off":"unbind"]("click",r)}))}}}function D(h,d){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(t,e,n,i){var r,o=f(e),a=i[1]||i[0],s="["+[n.uiState,n.uiStateParams||null,n.uiStateOpts||null].map(function(t){return t||"null"}).join(", ")+"]",l={state:null,params:null,options:null,href:null},c=null;function u(t){l.state=t[0],l.params=t[1],l.options=t[2],l.href=h.href(l.state,l.params,l.options),c&&c(),a&&(c=a.$$addStateInfo(l.state,l.params)),l.href&&n.$set(o.attr,l.href)}t.$watch(s,u,!0),u(t.$eval(s)),o.clickable&&(r=A(e,h,d,o,function(){return l}),e[e.on?"on":"bind"]("click",r),t.$on("$destroy",function(){e[e.off?"off":"unbind"]("click",r)}))}}}function P(g,t,m){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(i,a,t,n){var e,r,s=[],l={};e=m(t.uiSrefActiveEq||"",!1)(i);try{r=i.$eval(t.uiSrefActive)}catch(t){}function o(t,e,n){var i=g.get(t,k(a)),r=c(t,e),o={state:i||{name:t},params:e,hash:r};return s.push(o),l[r]=n,function(){var t=s.indexOf(o);-1!==t&&s.splice(t,1)}}function c(t,e){if(!H(t))throw new Error("state should be a string");return j(e)?t+v(e):(e=i.$eval(e),j(e)?t+v(e):t)}function u(){for(var t=0;t<s.length;t++)f(s[t].state,s[t].params)?h(a,l[s[t].hash]):d(a,l[s[t].hash]),p(s[t].state,s[t].params)?h(a,e):d(a,e)}function h(t,e){n(function(){t.addClass(e)})}function d(t,e){t.removeClass(e)}function f(t,e){return g.includes(t.name,e)}function p(t,e){return g.is(t.name,e)}r=r||m(t.uiSrefActive||"",!1)(i),j(r)&&z(r,function(t,e){if(H(t)){var n=b(t,g.current.name);o(n.state,i.$eval(n.paramExpr),e)}}),this.$$addStateInfo=function(t,e){if(!(j(r)&&0<s.length)){var n=o(t,e,r);return u(),n}},i.$on("$stateChangeSuccess",u),u()}]}}function M(n){var t=function(t,e){return n.is(t,e)};return t.$stateful=!0,t}function E(i){var t=function(t,e,n){return i.includes(t,e,n)};return t.$stateful=!0,t}N.module("ui.router.util",["ng"]),N.module("ui.router.router",["ui.router.util"]),N.module("ui.router.state",["ui.router.router","ui.router.util"]),N.module("ui.router",["ui.router.state"]),N.module("ui.router.compat",["ui.router"]),e.$inject=["$q","$injector"],N.module("ui.router.util").service("$resolve",e),n.$inject=["$http","$templateCache","$injector"],N.module("ui.router.util").service("$templateFactory",n),h.prototype.concat=function(t,e){var n={caseInsensitive:_.caseInsensitive(),strict:_.strictMode(),squash:_.defaultSquashPolicy()};return new h(this.sourcePath+t+this.sourceSearch,B(n,e),this)},h.prototype.toString=function(){return this.source},h.prototype.exec=function(t,e){var n=this.regexp.exec(t);if(!n)return null;e=e||{};var i,r,o,a,s,l=this.parameters(),c=l.length,u=this.segments.length-1,h={};if(u!==n.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");function d(t){function e(t){return t.split("").reverse().join("")}function n(t){return t.replace(/\\-/g,"-")}return G(G(e(t).split(/-(?!\\)/),e),n).reverse()}for(i=0;i<u;i++){for(o=l[i],a=this.params[o],s=n[i+1],r=0;r<a.replace.length;r++)a.replace[r].from===s&&(s=a.replace[r].to);s&&!0===a.array&&(s=d(s)),L(s)&&(s=a.type.decode(s)),h[o]=a.value(s)}for(;i<c;i++){for(h[o=l[i]]=this.params[o].value(e[o]),a=this.params[o],s=e[o],r=0;r<a.replace.length;r++)a.replace[r].from===s&&(s=a.replace[r].to);L(s)&&(s=a.type.decode(s)),h[o]=a.value(s)}return h},h.prototype.parameters=function(t){return L(t)?this.params[t]||null:this.$$paramNames},h.prototype.validates=function(t){return this.params.$$validates(t)},h.prototype.format=function(t){t=t||{};var e=this.segments,n=this.parameters(),i=this.params;if(!this.validates(t))return null;var r,o=!1,a=e.length-1,s=n.length,l=e[0];function c(t){return encodeURIComponent(t).replace(/-/g,function(t){return"%5C%"+t.charCodeAt(0).toString(16).toUpperCase()})}for(r=0;r<s;r++){var u=r<a,h=n[r],d=i[h],f=d.value(t[h]),p=d.isOptional&&d.type.equals(d.value(),f),g=!!p&&d.squash,m=d.type.encode(f);if(u){var v=e[r+1],y=r+1===a;if(!1===g)null!=m&&(F(m)?l+=G(m,c).join("-"):l+=encodeURIComponent(m)),l+=v;else if(!0===g){var b=l.match(/\/$/)?/\/?(.*)/:/(.*)/;l+=v.match(b)[1]}else H(g)&&(l+=g+v);y&&!0===d.squash&&"/"===l.slice(-1)&&(l=l.slice(0,-1))}else{if(null==m||p&&!1!==g)continue;if(F(m)||(m=[m]),0===m.length)continue;l+=(o?"&":"?")+h+"="+(m=G(m,encodeURIComponent).join("&"+h+"=")),o=!0}}return l},$.prototype.is=function(t,e){return!0},$.prototype.encode=function(t,e){return t},$.prototype.decode=function(t,e){return t},$.prototype.equals=function(t,e){return t==e},$.prototype.$subPattern=function(){var t=this.pattern.toString();return t.substr(1,t.length-2)},$.prototype.pattern=/.*/,$.prototype.toString=function(){return"{Type:"+this.name+"}"},$.prototype.$normalize=function(t){return this.is(t)?t:this.decode(t)},$.prototype.$asArray=function(t,e){if(!t)return this;if("auto"===t&&!e)throw new Error("'auto' array mode is for query parameters only");function n(t,e){function n(t,e){return function(){return t[e].apply(t,arguments)}}function a(t){return F(t)?t:L(t)?[t]:[]}function r(t){switch(t.length){case 0:return R;case 1:return"auto"===e?t[0]:t;default:return t}}function o(t){return!t}function i(n,i){return function(t){if(F(t)&&0===t.length)return t;var e=G(t=a(t),n);return!0===i?0===T(e,o).length:r(e)}}function s(o){return function(t,e){var n=a(t),i=a(e);if(n.length!==i.length)return!1;for(var r=0;r<n.length;r++)if(!o(n[r],i[r]))return!1;return!0}}this.encode=i(n(t,"encode")),this.decode=i(n(t,"decode")),this.is=i(n(t,"is"),!0),this.equals=s(n(t,"equals")),this.pattern=t.pattern,this.$normalize=i(n(t,"$normalize")),this.name=t.name,this.$arrayMode=e}return new n(this,t)},N.module("ui.router.util").provider("$urlMatcherFactory",d),N.module("ui.router.util").run(["$urlMatcherFactory",function(t){}]),i.$inject=["$locationProvider","$urlMatcherFactoryProvider"],N.module("ui.router.router").provider("$urlRouter",i),r.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],N.module("ui.router.state").factory("$stateParams",function(){return{}}).constant("$state.runtime",{autoinject:!0}).provider("$state",r).run(["$injector",function(t){t.get("$state.runtime").autoinject&&t.get("$state")}]),o.$inject=[],N.module("ui.router.state").provider("$view",o),N.module("ui.router.state").provider("$uiViewScroll",a),s.$inject=["$state","$injector","$uiViewScroll","$interpolate","$q"],l.$inject=["$compile","$controller","$state","$interpolate"],N.module("ui.router.state").directive("uiView",s),N.module("ui.router.state").directive("uiView",l),c.$inject=["$state","$timeout"],D.$inject=["$state","$timeout"],P.$inject=["$state","$stateParams","$interpolate"],N.module("ui.router.state").directive("uiSref",c).directive("uiSrefActive",P).directive("uiSrefActiveEq",P).directive("uiState",D),M.$inject=["$state"],E.$inject=["$state"],N.module("ui.router.state").filter("isState",M).filter("includedByState",E)}(window,window.angular),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){"use strict";var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(),function(i){"use strict";function t(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}i.fn.emulateTransitionEnd=function(t){var e=!1,n=this;return i(this).one("bsTransitionEnd",function(){e=!0}),setTimeout(function(){e||i(n).trigger(i.support.transition.end)},t),this},i(function(){i.support.transition=t(),i.support.transition&&(i.event.special.bsTransitionEnd={bindType:i.support.transition.end,delegateType:i.support.transition.end,handle:function(t){if(i(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(o){"use strict";var e='[data-dismiss="alert"]',a=function(t){o(t).on("click",e,this.close)};function t(n){return this.each(function(){var t=o(this),e=t.data("bs.alert");e||t.data("bs.alert",e=new a(this)),"string"==typeof n&&e[n].call(t)})}a.VERSION="3.3.4",a.TRANSITION_DURATION=150,a.prototype.close=function(t){var e=o(this),n=e.attr("data-target");n||(n=(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]*$)/,""));var i=o(n);function r(){i.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),i.length||(i=e.closest(".alert")),i.trigger(t=o.Event("close.bs.alert")),t.isDefaultPrevented()||(i.removeClass("in"),o.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",r).emulateTransitionEnd(a.TRANSITION_DURATION):r())};var n=o.fn.alert;o.fn.alert=t,o.fn.alert.Constructor=a,o.fn.alert.noConflict=function(){return o.fn.alert=n,this},o(document).on("click.bs.alert.data-api",e,a.prototype.close)}(jQuery),function(o){"use strict";var r=function(t,e){this.$element=o(t),this.options=o.extend({},r.DEFAULTS,e),this.isLoading=!1};function n(i){return this.each(function(){var t=o(this),e=t.data("bs.button"),n="object"==typeof i&&i;e||t.data("bs.button",e=new r(this,n)),"toggle"==i?e.toggle():i&&e.setState(i)})}r.VERSION="3.3.4",r.DEFAULTS={loadingText:"loading..."},r.prototype.setState=function(t){var e="disabled",n=this.$element,i=n.is("input")?"val":"html",r=n.data();t+="Text",null==r.resetText&&n.data("resetText",n[i]()),setTimeout(o.proxy(function(){n[i](null==r[t]?this.options[t]:r[t]),"loadingText"==t?(this.isLoading=!0,n.addClass(e).attr(e,e)):this.isLoading&&(this.isLoading=!1,n.removeClass(e).removeAttr(e))},this),0)},r.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")&&(n.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&n.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));t&&this.$element.toggleClass("active")};var t=o.fn.button;o.fn.button=n,o.fn.button.Constructor=r,o.fn.button.noConflict=function(){return o.fn.button=t,this},o(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var e=o(t.target);e.hasClass("btn")||(e=e.closest(".btn")),n.call(e,"toggle"),t.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){o(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),function(h){"use strict";var d=function(t,e){this.$element=h(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=e,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",h.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",h.proxy(this.pause,this)).on("mouseleave.bs.carousel",h.proxy(this.cycle,this))};function a(r){return this.each(function(){var t=h(this),e=t.data("bs.carousel"),n=h.extend({},d.DEFAULTS,t.data(),"object"==typeof r&&r),i="string"==typeof r?r:n.slide;e||t.data("bs.carousel",e=new d(this,n)),"number"==typeof r?e.to(r):i?e[i]():n.interval&&e.pause().cycle()})}d.VERSION="3.3.4",d.TRANSITION_DURATION=600,d.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},d.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},d.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(h.proxy(this.next,this),this.options.interval)),this},d.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},d.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e);if(("prev"==t&&0===n||"next"==t&&n==this.$items.length-1)&&!this.options.wrap)return e;var i=(n+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(i)},d.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(n<t?"next":"prev",this.$items.eq(t))},d.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&h.support.transition&&(this.$element.trigger(h.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},d.prototype.next=function(){if(!this.sliding)return this.slide("next")},d.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},d.prototype.slide=function(t,e){var n=this.$element.find(".item.active"),i=e||this.getItemForDirection(t,n),r=this.interval,o="next"==t?"left":"right",a=this;if(i.hasClass("active"))return this.sliding=!1;var s=i[0],l=h.Event("slide.bs.carousel",{relatedTarget:s,direction:o});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,r&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var c=h(this.$indicators.children()[this.getItemIndex(i)]);c&&c.addClass("active")}var u=h.Event("slid.bs.carousel",{relatedTarget:s,direction:o});return h.support.transition&&this.$element.hasClass("slide")?(i.addClass(t),i[0].offsetWidth,n.addClass(o),i.addClass(o),n.one("bsTransitionEnd",function(){i.removeClass([t,o].join(" ")).addClass("active"),n.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger(u)},0)}).emulateTransitionEnd(d.TRANSITION_DURATION)):(n.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger(u)),r&&this.cycle(),this}};var t=h.fn.carousel;h.fn.carousel=a,h.fn.carousel.Constructor=d,h.fn.carousel.noConflict=function(){return h.fn.carousel=t,this};var e=function(t){var e,n=h(this),i=h(n.attr("data-target")||(e=n.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,""));if(i.hasClass("carousel")){var r=h.extend({},i.data(),n.data()),o=n.attr("data-slide-to");o&&(r.interval=!1),a.call(i,r),o&&i.data("bs.carousel").to(o),t.preventDefault()}};h(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),h(window).on("load",function(){h('[data-ride="carousel"]').each(function(){var t=h(this);a.call(t,t.data())})})}(jQuery),function(o){"use strict";var a=function(t,e){this.$element=o(t),this.options=o.extend({},a.DEFAULTS,e),this.$trigger=o('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function r(t){var e,n=t.attr("data-target")||(e=t.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"");return o(n)}function s(i){return this.each(function(){var t=o(this),e=t.data("bs.collapse"),n=o.extend({},a.DEFAULTS,t.data(),"object"==typeof i&&i);!e&&n.toggle&&/show|hide/.test(i)&&(n.toggle=!1),e||t.data("bs.collapse",e=new a(this,n)),"string"==typeof i&&e[i]()})}a.VERSION="3.3.4",a.TRANSITION_DURATION=350,a.DEFAULTS={toggle:!0},a.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},a.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(t=e.data("bs.collapse"))&&t.transitioning)){var n=o.Event("show.bs.collapse");if(this.$element.trigger(n),!n.isDefaultPrevented()){e&&e.length&&(s.call(e,"hide"),t||e.data("bs.collapse",null));var i=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[i](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var complete=function(){this.$element.removeClass("collapsing").addClass("collapse in")[i](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!o.support.transition)return complete.call(this);var r=o.camelCase(["scroll",i].join("-"));this.$element.one("bsTransitionEnd",o.proxy(complete,this)).emulateTransitionEnd(a.TRANSITION_DURATION)[i](this.$element[0][r])}}}},a.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=o.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.dimension();this.$element[e](this.$element[e]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var complete=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!o.support.transition)return complete.call(this);this.$element[e](0).one("bsTransitionEnd",o.proxy(complete,this)).emulateTransitionEnd(a.TRANSITION_DURATION)}}},a.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},a.prototype.getParent=function(){return o(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(o.proxy(function(t,e){var n=o(e);this.addAriaAndCollapsedClass(r(n),n)},this)).end()},a.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var t=o.fn.collapse;o.fn.collapse=s,o.fn.collapse.Constructor=a,o.fn.collapse.noConflict=function(){return o.fn.collapse=t,this},o(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var e=o(this);e.attr("data-target")||t.preventDefault();var n=r(e),i=n.data("bs.collapse")?"toggle":e.data();s.call(n,i)})}(jQuery),function(s){"use strict";var t=".dropdown-backdrop",l='[data-toggle="dropdown"]',i=function(t){s(t).on("click.bs.dropdown",this.toggle)};function o(i){i&&3===i.which||(s(t).remove(),s(l).each(function(){var t=s(this),e=c(t),n={relatedTarget:this};e.hasClass("open")&&(e.trigger(i=s.Event("hide.bs.dropdown",n)),i.isDefaultPrevented()||(t.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",n)))}))}function c(t){var e=t.attr("data-target");e||(e=(e=t.attr("href"))&&/#[A-Za-z]/.test(e)&&e.replace(/.*(?=#[^\s]*$)/,""));var n=e&&s(e);return n&&n.length?n:t.parent()}function e(n){return this.each(function(){var t=s(this),e=t.data("bs.dropdown");e||t.data("bs.dropdown",e=new i(this)),"string"==typeof n&&e[n].call(t)})}i.VERSION="3.3.4",i.prototype.toggle=function(t){var e=s(this);if(!e.is(".disabled, :disabled")){var n=c(e),i=n.hasClass("open");if(o(),!i){"ontouchstart"in document.documentElement&&!n.closest(".navbar-nav").length&&s('<div class="dropdown-backdrop"/>').insertAfter(s(this)).on("click",o);var r={relatedTarget:this};if(n.trigger(t=s.Event("show.bs.dropdown",r)),t.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),n.toggleClass("open").trigger("shown.bs.dropdown",r)}return!1}},i.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var e=s(this);if(t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled")){var n=c(e),i=n.hasClass("open");if(!i&&27!=t.which||i&&27==t.which)return 27==t.which&&n.find(l).trigger("focus"),e.trigger("click");var r=" li:not(.disabled):visible a",o=n.find('[role="menu"]'+r+', [role="listbox"]'+r);if(o.length){var a=o.index(t.target);38==t.which&&0<a&&a--,40==t.which&&a<o.length-1&&a++,~a||(a=0),o.eq(a).trigger("focus")}}}};var n=s.fn.dropdown;s.fn.dropdown=e,s.fn.dropdown.Constructor=i,s.fn.dropdown.noConflict=function(){return s.fn.dropdown=n,this},s(document).on("click.bs.dropdown.data-api",o).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",l,i.prototype.toggle).on("keydown.bs.dropdown.data-api",l,i.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',i.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',i.prototype.keydown)}(jQuery),function(o){"use strict";var a=function(t,e){this.options=e,this.$body=o(document.body),this.$element=o(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,o.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};function s(i,r){return this.each(function(){var t=o(this),e=t.data("bs.modal"),n=o.extend({},a.DEFAULTS,t.data(),"object"==typeof i&&i);e||t.data("bs.modal",e=new a(this,n)),"string"==typeof i?e[i](r):n.show&&e.show(r)})}a.VERSION="3.3.4",a.TRANSITION_DURATION=300,a.BACKDROP_TRANSITION_DURATION=150,a.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},a.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},a.prototype.show=function(n){var i=this,t=o.Event("show.bs.modal",{relatedTarget:n});this.$element.trigger(t),this.isShown||t.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',o.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){i.$element.one("mouseup.dismiss.bs.modal",function(t){o(t.target).is(i.$element)&&(i.ignoreBackdropClick=!0)})}),this.backdrop(function(){var t=o.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),t&&i.$element[0].offsetWidth,i.$element.addClass("in").attr("aria-hidden",!1),i.enforceFocus();var e=o.Event("shown.bs.modal",{relatedTarget:n});t?i.$dialog.one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(a.TRANSITION_DURATION):i.$element.trigger("focus").trigger(e)}))},a.prototype.hide=function(t){t&&t.preventDefault(),t=o.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),o(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),o.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",o.proxy(this.hideModal,this)).emulateTransitionEnd(a.TRANSITION_DURATION):this.hideModal())},a.prototype.enforceFocus=function(){o(document).off("focusin.bs.modal").on("focusin.bs.modal",o.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},a.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",o.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},a.prototype.resize=function(){this.isShown?o(window).on("resize.bs.modal",o.proxy(this.handleUpdate,this)):o(window).off("resize.bs.modal")},a.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},a.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},a.prototype.backdrop=function(t){var e=this,n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=o.support.transition&&n;if(this.$backdrop=o('<div class="modal-backdrop '+n+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",o.proxy(function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(a.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var r=function(){e.removeBackdrop(),t&&t()};o.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(a.BACKDROP_TRANSITION_DURATION):r()}else t&&t()},a.prototype.handleUpdate=function(){this.adjustDialog()},a.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},a.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},a.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},a.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},a.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},a.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var t=o.fn.modal;o.fn.modal=s,o.fn.modal.Constructor=a,o.fn.modal.noConflict=function(){return o.fn.modal=t,this},o(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e=o(this),n=e.attr("href"),i=o(e.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,"")),r=i.data("bs.modal")?"toggle":o.extend({remote:!/#/.test(n)&&n},i.data(),e.data());e.is("a")&&t.preventDefault(),i.one("show.bs.modal",function(t){t.isDefaultPrevented()||i.one("hidden.bs.modal",function(){e.is(":visible")&&e.trigger("focus")})}),s.call(i,r,this)})}(jQuery),function(g){"use strict";var m=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",t,e)};function t(i){return this.each(function(){var t=g(this),e=t.data("bs.tooltip"),n="object"==typeof i&&i;!e&&/destroy|hide/.test(i)||(e||t.data("bs.tooltip",e=new m(this,n)),"string"==typeof i&&e[i]())})}m.VERSION="3.3.4",m.TRANSITION_DURATION=150,m.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},m.prototype.init=function(t,e,n){if(this.enabled=!0,this.type=t,this.$element=g(e),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&g(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),r=i.length;r--;){var o=i[r];if("click"==o)this.$element.on("click."+this.type,this.options.selector,g.proxy(this.toggle,this));else if("manual"!=o){var a="hover"==o?"mouseenter":"focusin",s="hover"==o?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,g.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,g.proxy(this.leave,this))}}this.options.selector?this._options=g.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},m.prototype.getDefaults=function(){return m.DEFAULTS},m.prototype.getOptions=function(t){return(t=g.extend({},this.getDefaults(),this.$element.data(),t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},m.prototype.getDelegateOptions=function(){var n={},i=this.getDefaults();return this._options&&g.each(this._options,function(t,e){i[t]!=e&&(n[t]=e)}),n},m.prototype.enter=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e&&e.$tip&&e.$tip.is(":visible"))e.hoverState="in";else{if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)}},m.prototype.leave=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)},m.prototype.show=function(){var t=g.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=g.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var n=this,i=this.tip(),r=this.getUID(this.type);this.setContent(),i.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&i.addClass("fade");var o="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,s=a.test(o);s&&(o=o.replace(a,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(o).data("bs."+this.type,this),this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element);var l=this.getPosition(),c=i[0].offsetWidth,u=i[0].offsetHeight;if(s){var h=o,d=this.options.container?g(this.options.container):this.$element.parent(),f=this.getPosition(d);o="bottom"==o&&l.bottom+u>f.bottom?"top":"top"==o&&l.top-u<f.top?"bottom":"right"==o&&l.right+c>f.width?"left":"left"==o&&l.left-c<f.left?"right":o,i.removeClass(h).addClass(o)}var p=this.getCalculatedOffset(o,l,c,u);this.applyPlacement(p,o);var complete=function(){var t=n.hoverState;n.$element.trigger("shown.bs."+n.type),n.hoverState=null,"out"==t&&n.leave(n)};g.support.transition&&this.$tip.hasClass("fade")?i.one("bsTransitionEnd",complete).emulateTransitionEnd(m.TRANSITION_DURATION):complete()}},m.prototype.applyPlacement=function(t,e){var n=this.tip(),i=n[0].offsetWidth,r=n[0].offsetHeight,o=parseInt(n.css("margin-top"),10),a=parseInt(n.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(a)&&(a=0),t.top=t.top+o,t.left=t.left+a,g.offset.setOffset(n[0],g.extend({using:function(t){n.css({top:Math.round(t.top),left:Math.round(t.left)})}},t),0),n.addClass("in");var s=n[0].offsetWidth,l=n[0].offsetHeight;"top"==e&&l!=r&&(t.top=t.top+r-l);var c=this.getViewportAdjustedDelta(e,t,s,l);c.left?t.left+=c.left:t.top+=c.top;var u=/top|bottom/.test(e),h=u?2*c.left-i+s:2*c.top-r+l,d=u?"offsetWidth":"offsetHeight";n.offset(t),this.replaceArrow(h,n[0][d],u)},m.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},m.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},m.prototype.hide=function(t){var e=this,n=g(this.$tip),i=g.Event("hide.bs."+this.type);function complete(){"in"!=e.hoverState&&n.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),t&&t()}if(this.$element.trigger(i),!i.isDefaultPrevented())return n.removeClass("in"),g.support.transition&&n.hasClass("fade")?n.one("bsTransitionEnd",complete).emulateTransitionEnd(m.TRANSITION_DURATION):complete(),this.hoverState=null,this},m.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},m.prototype.hasContent=function(){return this.getTitle()},m.prototype.getPosition=function(t){var e=(t=t||this.$element)[0],n="BODY"==e.tagName,i=e.getBoundingClientRect();null==i.width&&(i=g.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var r=n?{top:0,left:0}:t.offset(),o={scroll:n?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},a=n?{width:g(window).width(),height:g(window).height()}:null;return g.extend({},i,o,a,r)},m.prototype.getCalculatedOffset=function(t,e,n,i){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-i,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-i/2,left:e.left-n}:{top:e.top+e.height/2-i/2,left:e.left+e.width}},m.prototype.getViewportAdjustedDelta=function(t,e,n,i){var r={top:0,left:0};if(!this.$viewport)return r;var o=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var s=e.top-o-a.scroll,l=e.top+o-a.scroll+i;s<a.top?r.top=a.top-s:l>a.top+a.height&&(r.top=a.top+a.height-l)}else{var c=e.left-o,u=e.left+o+n;c<a.left?r.left=a.left-c:u>a.width&&(r.left=a.left+a.width-u)}return r},m.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},m.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},m.prototype.tip=function(){return this.$tip=this.$tip||g(this.options.template)},m.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},m.prototype.enable=function(){this.enabled=!0},m.prototype.disable=function(){this.enabled=!1},m.prototype.toggleEnabled=function(){this.enabled=!this.enabled},m.prototype.toggle=function(t){var e=this;t&&((e=g(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e))),e.tip().hasClass("in")?e.leave(e):e.enter(e)},m.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type)})};var e=g.fn.tooltip;g.fn.tooltip=t,g.fn.tooltip.Constructor=m,g.fn.tooltip.noConflict=function(){return g.fn.tooltip=e,this}}(jQuery),function(r){"use strict";var o=function(t,e){this.init("popover",t,e)};if(!r.fn.tooltip)throw new Error("Popover requires tooltip.js");function t(i){return this.each(function(){var t=r(this),e=t.data("bs.popover"),n="object"==typeof i&&i;!e&&/destroy|hide/.test(i)||(e||t.data("bs.popover",e=new o(this,n)),"string"==typeof i&&e[i]())})}o.VERSION="3.3.4",o.DEFAULTS=r.extend({},r.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),o.prototype=r.extend({},r.fn.tooltip.Constructor.prototype),(o.prototype.constructor=o).prototype.getDefaults=function(){return o.DEFAULTS},o.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},o.prototype.hasContent=function(){return this.getTitle()||this.getContent()},o.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},o.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var e=r.fn.popover;r.fn.popover=t,r.fn.popover.Constructor=o,r.fn.popover.noConflict=function(){return r.fn.popover=e,this}}(jQuery),function(o){"use strict";function r(t,e){this.$body=o(document.body),this.$scrollElement=o(t).is(document.body)?o(window):o(t),this.options=o.extend({},r.DEFAULTS,e),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",o.proxy(this.process,this)),this.refresh(),this.process()}function e(i){return this.each(function(){var t=o(this),e=t.data("bs.scrollspy"),n="object"==typeof i&&i;e||t.data("bs.scrollspy",e=new r(this,n)),"string"==typeof i&&e[i]()})}r.VERSION="3.3.4",r.DEFAULTS={offset:10},r.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},r.prototype.refresh=function(){var t=this,i="offset",r=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),o.isWindow(this.$scrollElement[0])||(i="position",r=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=o(this),e=t.data("target")||t.attr("href"),n=/^#./.test(e)&&o(e);return n&&n.length&&n.is(":visible")&&[[n[i]().top+r,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},r.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),r=this.offsets,o=this.targets,a=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),i<=e)return a!=(t=o[o.length-1])&&this.activate(t);if(a&&e<r[0])return this.activeTarget=null,this.clear();for(t=r.length;t--;)a!=o[t]&&e>=r[t]&&(void 0===r[t+1]||e<r[t+1])&&this.activate(o[t])},r.prototype.activate=function(t){this.activeTarget=t,this.clear();var e=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=o(e).parents("li").addClass("active");n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate.bs.scrollspy")},r.prototype.clear=function(){o(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var t=o.fn.scrollspy;o.fn.scrollspy=e,o.fn.scrollspy.Constructor=r,o.fn.scrollspy.noConflict=function(){return o.fn.scrollspy=t,this},o(window).on("load.bs.scrollspy.data-api",function(){o('[data-spy="scroll"]').each(function(){var t=o(this);e.call(t,t.data())})})}(jQuery),function(s){"use strict";var a=function(t){this.element=s(t)};function e(n){return this.each(function(){var t=s(this),e=t.data("bs.tab");e||t.data("bs.tab",e=new a(this)),"string"==typeof n&&e[n]()})}a.VERSION="3.3.4",a.TRANSITION_DURATION=150,a.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),n=t.data("target");if(n||(n=(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var i=e.find(".active:last a"),r=s.Event("hide.bs.tab",{relatedTarget:t[0]}),o=s.Event("show.bs.tab",{relatedTarget:i[0]});if(i.trigger(r),t.trigger(o),!o.isDefaultPrevented()&&!r.isDefaultPrevented()){var a=s(n);this.activate(t.closest("li"),e),this.activate(a,a.parent(),function(){i.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:i[0]})})}}},a.prototype.activate=function(t,e,n){var i=e.find("> .active"),r=n&&s.support.transition&&(i.length&&i.hasClass("fade")||!!e.find("> .fade").length);function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}i.length&&r?i.one("bsTransitionEnd",o).emulateTransitionEnd(a.TRANSITION_DURATION):o(),i.removeClass("in")};var t=s.fn.tab;s.fn.tab=e,s.fn.tab.Constructor=a,s.fn.tab.noConflict=function(){return s.fn.tab=t,this};var n=function(t){t.preventDefault(),e.call(s(this),"show")};s(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery),function(l){"use strict";var c=function(t,e){this.options=l.extend({},c.DEFAULTS,e),this.$target=l(this.options.target).on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(i){return this.each(function(){var t=l(this),e=t.data("bs.affix"),n="object"==typeof i&&i;e||t.data("bs.affix",e=new c(this,n)),"string"==typeof i&&e[i]()})}c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(t,e,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),a=this.$target.height();if(null!=n&&"top"==this.affixed)return r<n&&"top";if("bottom"==this.affixed)return null!=n?!(r+this.unpin<=o.top)&&"bottom":!(r+a<=t-i)&&"bottom";var s=null==this.affixed,l=s?r:o.top;return null!=n&&r<=n?"top":null!=i&&t-i<=l+(s?a:e)&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},c.prototype.checkPositionWithEventLoop=function(){setTimeout(l.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),e=this.options.offset,n=e.top,i=e.bottom,r=l(document.body).height();"object"!=typeof e&&(i=n=e),"function"==typeof n&&(n=e.top(this.$element)),"function"==typeof i&&(i=e.bottom(this.$element));var o=this.getState(r,t,n,i);if(this.affixed!=o){null!=this.unpin&&this.$element.css("top","");var a="affix"+(o?"-"+o:""),s=l.Event(a+".bs.affix");if(this.$element.trigger(s),s.isDefaultPrevented())return;this.affixed=o,this.unpin="bottom"==o?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(a).trigger(a.replace("affix","affixed")+".bs.affix")}"bottom"==o&&this.$element.offset({top:r-t-i})}};var t=l.fn.affix;l.fn.affix=n,l.fn.affix.Constructor=c,l.fn.affix.noConflict=function(){return l.fn.affix=t,this},l(window).on("load",function(){l('[data-spy="affix"]').each(function(){var t=l(this),e=t.data();e.offset=e.offset||{},null!=e.offsetBottom&&(e.offset.bottom=e.offsetBottom),null!=e.offsetTop&&(e.offset.top=e.offsetTop),n.call(t,e)})})}(jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t:t(jQuery)}(function(d){var f,p,t=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],e="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],g=Array.prototype.slice;if(d.event.fixHooks)for(var n=t.length;n;)d.event.fixHooks[t[--n]]=d.event.mouseHooks;var m=d.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=e.length;t;)this.addEventListener(e[--t],i,!1);else this.onmousewheel=i;d.data(this,"mousewheel-line-height",m.getLineHeight(this)),d.data(this,"mousewheel-page-height",m.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=e.length;t;)this.removeEventListener(e[--t],i,!1);else this.onmousewheel=null;d.removeData(this,"mousewheel-line-height"),d.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var e=d(t),n=e["offsetParent"in d.fn?"offsetParent":"parent"]();return n.length||(n=d("body")),parseInt(n.css("fontSize"),10)||parseInt(e.css("fontSize"),10)||16},getPageHeight:function(t){return d(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function i(t){var e=t||window.event,n=g.call(arguments,1),i=0,r=0,o=0,a=0,s=0,l=0;if((t=d.event.fix(e)).type="mousewheel","detail"in e&&(o=-1*e.detail),"wheelDelta"in e&&(o=e.wheelDelta),"wheelDeltaY"in e&&(o=e.wheelDeltaY),"wheelDeltaX"in e&&(r=-1*e.wheelDeltaX),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(r=-1*o,o=0),i=0===o?r:o,"deltaY"in e&&(i=o=-1*e.deltaY),"deltaX"in e&&(r=e.deltaX,0===o&&(i=-1*r)),0!==o||0!==r){if(1===e.deltaMode){var c=d.data(this,"mousewheel-line-height");i*=c,o*=c,r*=c}else if(2===e.deltaMode){var u=d.data(this,"mousewheel-page-height");i*=u,o*=u,r*=u}if(a=Math.max(Math.abs(o),Math.abs(r)),(!p||a<p)&&y(e,p=a)&&(p/=40),y(e,a)&&(i/=40,r/=40,o/=40),i=Math[1<=i?"floor":"ceil"](i/p),r=Math[1<=r?"floor":"ceil"](r/p),o=Math[1<=o?"floor":"ceil"](o/p),m.settings.normalizeOffset&&this.getBoundingClientRect){var h=this.getBoundingClientRect();s=t.clientX-h.left,l=t.clientY-h.top}return t.deltaX=r,t.deltaY=o,t.deltaFactor=p,t.offsetX=s,t.offsetY=l,t.deltaMode=0,n.unshift(t,i,r,o),f&&clearTimeout(f),f=setTimeout(v,200),(d.event.dispatch||d.event.handle).apply(this,n)}}function v(){p=null}function y(t,e){return m.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120==0}d.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t:t(jQuery,window,document)}(function(at){var t,e,n,i,r;t=function(){var L,f="mCustomScrollbar",H="mCS",i=".mCustomScrollbar",r={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},s=0,o={},m=window.attachEvent&&!window.addEventListener?1:0,j=!1,_=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],p={init:function(a){a=at.extend(!0,{},r,a);var t=c.call(this);if(a.live){var e=a.liveSelector||this.selector||i,n=at(e);if("off"===a.live)return void u(e);o[e]=setTimeout(function(){n.mCustomScrollbar(a),"once"===a.live&&n.length&&u(e)},500)}else u(e);return a.setWidth=a.set_width?a.set_width:a.setWidth,a.setHeight=a.set_height?a.set_height:a.setHeight,a.axis=a.horizontalScroll?"x":h(a.axis),a.scrollInertia=0<a.scrollInertia&&a.scrollInertia<17?17:a.scrollInertia,"object"!=typeof a.mouseWheel&&1==a.mouseWheel&&(a.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),a.mouseWheel.scrollAmount=a.mouseWheelPixels?a.mouseWheelPixels:a.mouseWheel.scrollAmount,a.mouseWheel.normalizeDelta=a.advanced.normalizeMouseWheelDelta?a.advanced.normalizeMouseWheelDelta:a.mouseWheel.normalizeDelta,a.scrollButtons.scrollType=d(a.scrollButtons.scrollType),l(a),at(t).each(function(){var t=at(this);if(!t.data(H)){t.data(H,{idx:++s,opt:a,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:t.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var e=t.data(H),n=e.opt,i=t.data("mcs-axis"),r=t.data("mcs-scrollbar-position"),o=t.data("mcs-theme");i&&(n.axis=i),r&&(n.scrollbarPosition=r),o&&(n.theme=o,l(n)),g.call(this),e&&n.callbacks.onCreate&&"function"==typeof n.callbacks.onCreate&&n.callbacks.onCreate.call(this),at("#mCSB_"+e.idx+"_container img:not(."+_[2]+")").addClass(_[2]),p.update.call(null,t)}})},update:function(t,s){var e=t||c.call(this);return at(e).each(function(){var t=at(this);if(t.data(H)){var e=t.data(H),n=e.opt,i=at("#mCSB_"+e.idx+"_container"),r=at("#mCSB_"+e.idx),o=[at("#mCSB_"+e.idx+"_dragger_vertical"),at("#mCSB_"+e.idx+"_dragger_horizontal")];if(!i.length)return;e.tweenRunning&&X(t),s&&e&&n.callbacks.onBeforeUpdate&&"function"==typeof n.callbacks.onBeforeUpdate&&n.callbacks.onBeforeUpdate.call(this),t.hasClass(_[3])&&t.removeClass(_[3]),t.hasClass(_[4])&&t.removeClass(_[4]),r.css("max-height","none"),r.height()!==t.height()&&r.css("max-height",t.height()),y.call(this),"y"===n.axis||n.advanced.autoExpandHorizontalScroll||i.css("width",v(i)),e.overflowed=S.call(this),A.call(this),n.autoDraggerLength&&x.call(this),w.call(this),$.call(this);var a=[Math.abs(i[0].offsetTop),Math.abs(i[0].offsetLeft)];"x"!==n.axis&&(e.overflowed[0]?o[0].height()>o[0].parent().height()?C.call(this):(K(t,a[0].toString(),{dir:"y",dur:0,overwrite:"none"}),e.contentReset.y=null):(C.call(this),"y"===n.axis?k.call(this):"yx"===n.axis&&e.overflowed[1]&&K(t,a[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==n.axis&&(e.overflowed[1]?o[1].width()>o[1].parent().width()?C.call(this):(K(t,a[1].toString(),{dir:"x",dur:0,overwrite:"none"}),e.contentReset.x=null):(C.call(this),"x"===n.axis?k.call(this):"yx"===n.axis&&e.overflowed[0]&&K(t,a[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),s&&e&&(2===s&&n.callbacks.onImageLoad&&"function"==typeof n.callbacks.onImageLoad?n.callbacks.onImageLoad.call(this):3===s&&n.callbacks.onSelectorChange&&"function"==typeof n.callbacks.onSelectorChange?n.callbacks.onSelectorChange.call(this):n.callbacks.onUpdate&&"function"==typeof n.callbacks.onUpdate&&n.callbacks.onUpdate.call(this)),G.call(this)}})},scrollTo:function(s,l){if(void 0!==s&&null!=s){var t=c.call(this);return at(t).each(function(){var t=at(this);if(t.data(H)){var e=t.data(H),n=e.opt,i={trigger:"external",scrollInertia:n.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},r=at.extend(!0,{},i,l),o=U.call(this,s),a=0<r.scrollInertia&&r.scrollInertia<17?17:r.scrollInertia;o[0]=J.call(this,o[0],"y"),o[1]=J.call(this,o[1],"x"),r.moveDragger&&(o[0]*=e.scrollRatio.y,o[1]*=e.scrollRatio.x),r.dur=ot()?0:a,setTimeout(function(){null!==o[0]&&void 0!==o[0]&&"x"!==n.axis&&e.overflowed[0]&&(r.dir="y",r.overwrite="all",K(t,o[0].toString(),r)),null!==o[1]&&void 0!==o[1]&&"y"!==n.axis&&e.overflowed[1]&&(r.dir="x",r.overwrite="none",K(t,o[1].toString(),r))},r.timeout)}})}},stop:function(){var t=c.call(this);return at(t).each(function(){var t=at(this);t.data(H)&&X(t)})},disable:function(e){var t=c.call(this);return at(t).each(function(){var t=at(this);if(t.data(H)){t.data(H);G.call(this,"remove"),k.call(this),e&&C.call(this),A.call(this,!0),t.addClass(_[3])}})},destroy:function(){var a=c.call(this);return at(a).each(function(){var t=at(this);if(t.data(H)){var e=t.data(H),n=e.opt,i=at("#mCSB_"+e.idx),r=at("#mCSB_"+e.idx+"_container"),o=at(".mCSB_"+e.idx+"_scrollbar");n.live&&u(n.liveSelector||at(a).selector),G.call(this,"remove"),k.call(this),C.call(this),t.removeData(H),tt(this,"mcs"),o.remove(),r.find("img."+_[2]).removeClass(_[2]),i.replaceWith(r.contents()),t.removeClass(f+" _"+H+"_"+e.idx+" "+_[6]+" "+_[7]+" "+_[5]+" "+_[3]).addClass(_[4])}})}},c=function(){return"object"!=typeof at(this)||at(this).length<1?i:this},l=function(t){var e=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],n=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],i=["minimal","minimal-dark"],r=["minimal","minimal-dark"],o=["minimal","minimal-dark"];t.autoDraggerLength=!(-1<at.inArray(t.theme,e))&&t.autoDraggerLength,t.autoExpandScrollbar=!(-1<at.inArray(t.theme,n))&&t.autoExpandScrollbar,t.scrollButtons.enable=!(-1<at.inArray(t.theme,i))&&t.scrollButtons.enable,t.autoHideScrollbar=-1<at.inArray(t.theme,r)||t.autoHideScrollbar,t.scrollbarPosition=-1<at.inArray(t.theme,o)?"outside":t.scrollbarPosition},u=function(t){o[t]&&(clearTimeout(o[t]),tt(o,t))},h=function(t){return"yx"===t||"xy"===t||"auto"===t?"yx":"x"===t||"horizontal"===t?"x":"y"},d=function(t){return"stepped"===t||"pixels"===t||"step"===t||"click"===t?"stepped":"stepless"},g=function(){var t=at(this),e=t.data(H),n=e.opt,i=n.autoExpandScrollbar?" "+_[1]+"_expand":"",r=["<div id='mCSB_"+e.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+e.idx+"_scrollbar mCS-"+n.theme+" mCSB_scrollTools_vertical"+i+"'><div class='"+_[12]+"'><div id='mCSB_"+e.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+e.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+e.idx+"_scrollbar mCS-"+n.theme+" mCSB_scrollTools_horizontal"+i+"'><div class='"+_[12]+"'><div id='mCSB_"+e.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],o="yx"===n.axis?"mCSB_vertical_horizontal":"x"===n.axis?"mCSB_horizontal":"mCSB_vertical",a="yx"===n.axis?r[0]+r[1]:"x"===n.axis?r[1]:r[0],s="yx"===n.axis?"<div id='mCSB_"+e.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",l=n.autoHideScrollbar?" "+_[6]:"",c="x"!==n.axis&&"rtl"===e.langDir?" "+_[7]:"";n.setWidth&&t.css("width",n.setWidth),n.setHeight&&t.css("height",n.setHeight),n.setLeft="y"!==n.axis&&"rtl"===e.langDir?"989999px":n.setLeft,t.addClass(f+" _"+H+"_"+e.idx+l+c).wrapInner("<div id='mCSB_"+e.idx+"' class='mCustomScrollBox mCS-"+n.theme+" "+o+"'><div id='mCSB_"+e.idx+"_container' class='mCSB_container' style='position:relative; top:"+n.setTop+"; left:"+n.setLeft+";' dir='"+e.langDir+"' /></div>");var u=at("#mCSB_"+e.idx),h=at("#mCSB_"+e.idx+"_container");"y"===n.axis||n.advanced.autoExpandHorizontalScroll||h.css("width",v(h)),"outside"===n.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),u.addClass("mCSB_outside").after(a)):(u.addClass("mCSB_inside").append(a),h.wrap(s)),b.call(this);var d=[at("#mCSB_"+e.idx+"_dragger_vertical"),at("#mCSB_"+e.idx+"_dragger_horizontal")];d[0].css("min-height",d[0].height()),d[1].css("min-width",d[1].width())},v=function(t){var e=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return at(this).outerWidth(!0)}).get())],n=t.parent().width();return e[0]>n?e[0]:e[1]>n?e[1]:"100%"},y=function(){var t=at(this).data(H),e=t.opt,n=at("#mCSB_"+t.idx+"_container");if(e.advanced.autoExpandHorizontalScroll&&"y"!==e.axis){n.css({width:"auto","min-width":0,"overflow-x":"scroll"});var i=Math.ceil(n[0].scrollWidth);3===e.advanced.autoExpandHorizontalScroll||2!==e.advanced.autoExpandHorizontalScroll&&i>n.parent().width()?n.css({width:i,"min-width":"100%","overflow-x":"inherit"}):n.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(n[0].getBoundingClientRect().right+.4)-Math.floor(n[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},b=function(){var t=at(this).data(H),e=t.opt,n=at(".mCSB_"+t.idx+"_scrollbar:first"),i=it(e.scrollButtons.tabindex)?"tabindex='"+e.scrollButtons.tabindex+"'":"",r=["<a href='#' class='"+_[13]+"' "+i+" />","<a href='#' class='"+_[14]+"' "+i+" />","<a href='#' class='"+_[15]+"' "+i+" />","<a href='#' class='"+_[16]+"' "+i+" />"],o=["x"===e.axis?r[2]:r[0],"x"===e.axis?r[3]:r[1],r[2],r[3]];e.scrollButtons.enable&&n.prepend(o[0]).append(o[1]).next(".mCSB_scrollTools").prepend(o[2]).append(o[3])},x=function(){var t=at(this).data(H),e=at("#mCSB_"+t.idx),n=at("#mCSB_"+t.idx+"_container"),i=[at("#mCSB_"+t.idx+"_dragger_vertical"),at("#mCSB_"+t.idx+"_dragger_horizontal")],r=[e.height()/n.outerHeight(!1),e.width()/n.outerWidth(!1)],o=[parseInt(i[0].css("min-height")),Math.round(r[0]*i[0].parent().height()),parseInt(i[1].css("min-width")),Math.round(r[1]*i[1].parent().width())],a=m&&o[1]<o[0]?o[0]:o[1],s=m&&o[3]<o[2]?o[2]:o[3];i[0].css({height:a,"max-height":i[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":o[0]+"px"}),i[1].css({width:s,"max-width":i[1].parent().width()-10})},w=function(){var t=at(this).data(H),e=at("#mCSB_"+t.idx),n=at("#mCSB_"+t.idx+"_container"),i=[at("#mCSB_"+t.idx+"_dragger_vertical"),at("#mCSB_"+t.idx+"_dragger_horizontal")],r=[n.outerHeight(!1)-e.height(),n.outerWidth(!1)-e.width()],o=[r[0]/(i[0].parent().height()-i[0].height()),r[1]/(i[1].parent().width()-i[1].width())];t.scrollRatio={y:o[0],x:o[1]}},T=function(t,e,n){var i=n?_[0]+"_expanded":"",r=t.closest(".mCSB_scrollTools");"active"===e?(t.toggleClass(_[0]+" "+i),r.toggleClass(_[1]),t[0]._draggable=t[0]._draggable?0:1):t[0]._draggable||("hide"===e?(t.removeClass(_[0]),r.removeClass(_[1])):(t.addClass(_[0]),r.addClass(_[1])))},S=function(){var t=at(this).data(H),e=at("#mCSB_"+t.idx),n=at("#mCSB_"+t.idx+"_container"),i=null==t.overflowed?n.height():n.outerHeight(!1),r=null==t.overflowed?n.width():n.outerWidth(!1),o=n[0].scrollHeight,a=n[0].scrollWidth;return i<o&&(i=o),r<a&&(r=a),[i>e.height(),r>e.width()]},C=function(){var t=at(this),e=t.data(H),n=e.opt,i=at("#mCSB_"+e.idx),r=at("#mCSB_"+e.idx+"_container"),o=[at("#mCSB_"+e.idx+"_dragger_vertical"),at("#mCSB_"+e.idx+"_dragger_horizontal")];if(X(t),("x"!==n.axis&&!e.overflowed[0]||"y"===n.axis&&e.overflowed[0])&&(o[0].add(r).css("top",0),K(t,"_resetY")),"y"!==n.axis&&!e.overflowed[1]||"x"===n.axis&&e.overflowed[1]){var a=dx=0;"rtl"===e.langDir&&(a=i.width()-r.outerWidth(!1),dx=Math.abs(a/e.scrollRatio.x)),r.css("left",a),o[1].css("left",dx),K(t,"_resetX")}},$=function(){var t=at(this),e=t.data(H),n=e.opt;if(!e.bindEvents){if(a.call(this),n.contentTouchScroll&&O.call(this),D.call(this),n.mouseWheel.enable){function i(){r=setTimeout(function(){at.event.special.mousewheel?(clearTimeout(r),P.call(t[0])):i()},100)}var r;i()}N.call(this),B.call(this),n.advanced.autoScrollOnFocus&&R.call(this),n.scrollButtons.enable&&V.call(this),n.keyboard.enable&&W.call(this),e.bindEvents=!0}},k=function(){var t=at(this),e=t.data(H),n=e.opt,i=H+"_"+e.idx,r=".mCSB_"+e.idx+"_scrollbar",o=at("#mCSB_"+e.idx+",#mCSB_"+e.idx+"_container,#mCSB_"+e.idx+"_container_wrapper,"+r+" ."+_[12]+",#mCSB_"+e.idx+"_dragger_vertical,#mCSB_"+e.idx+"_dragger_horizontal,"+r+">a"),a=at("#mCSB_"+e.idx+"_container");n.advanced.releaseDraggableSelectors&&o.add(at(n.advanced.releaseDraggableSelectors)),n.advanced.extraDraggableSelectors&&o.add(at(n.advanced.extraDraggableSelectors)),e.bindEvents&&(at(document).add(at(!z()||top.document)).unbind("."+i),o.each(function(){at(this).unbind("."+i)}),clearTimeout(t[0]._focusTimeout),tt(t[0],"_focusTimeout"),clearTimeout(e.sequential.step),tt(e.sequential,"step"),clearTimeout(a[0].onCompleteTimeout),tt(a[0],"onCompleteTimeout"),e.bindEvents=!1)},A=function(t){var e=at(this),n=e.data(H),i=n.opt,r=at("#mCSB_"+n.idx+"_container_wrapper"),o=r.length?r:at("#mCSB_"+n.idx+"_container"),a=[at("#mCSB_"+n.idx+"_scrollbar_vertical"),at("#mCSB_"+n.idx+"_scrollbar_horizontal")],s=[a[0].find(".mCSB_dragger"),a[1].find(".mCSB_dragger")];"x"!==i.axis&&(n.overflowed[0]&&!t?(a[0].add(s[0]).add(a[0].children("a")).css("display","block"),o.removeClass(_[8]+" "+_[10])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&s[0].css("display","none"),o.removeClass(_[10])):(a[0].css("display","none"),o.addClass(_[10])),o.addClass(_[8]))),"y"!==i.axis&&(n.overflowed[1]&&!t?(a[1].add(s[1]).add(a[1].children("a")).css("display","block"),o.removeClass(_[9]+" "+_[11])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&s[1].css("display","none"),o.removeClass(_[11])):(a[1].css("display","none"),o.addClass(_[11])),o.addClass(_[9]))),n.overflowed[0]||n.overflowed[1]?e.removeClass(_[5]):e.addClass(_[5])},F=function(t){var e=t.type,n=t.target.ownerDocument!==document&&null!==frameElement?[at(frameElement).offset().top,at(frameElement).offset().left]:null,i=z()&&t.target.ownerDocument!==top.document&&null!==frameElement?[at(t.view.frameElement).offset().top,at(t.view.frameElement).offset().left]:[0,0];switch(e){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return n?[t.originalEvent.pageY-n[0]+i[0],t.originalEvent.pageX-n[1]+i[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var r=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],o=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[r.screenY,r.screenX,1<o]:[r.pageY,r.pageX,1<o];default:return n?[t.pageY-n[0]+i[0],t.pageX-n[1]+i[1],!1]:[t.pageY,t.pageX,!1]}},a=function(){var a,s,l,c=at(this),u=c.data(H),h=u.opt,t=H+"_"+u.idx,d=["mCSB_"+u.idx+"_dragger_vertical","mCSB_"+u.idx+"_dragger_horizontal"],f=at("#mCSB_"+u.idx+"_container"),e=at("#"+d[0]+",#"+d[1]),n=h.advanced.releaseDraggableSelectors?e.add(at(h.advanced.releaseDraggableSelectors)):e,i=h.advanced.extraDraggableSelectors?at(!z()||top.document).add(at(h.advanced.extraDraggableSelectors)):at(!z()||top.document);function r(t,e,n,i){if(f[0].idleTimer=h.scrollInertia<233?250:0,a.attr("id")===d[1])var r="x",o=(a[0].offsetLeft-e+i)*u.scrollRatio.x;else r="y",o=(a[0].offsetTop-t+n)*u.scrollRatio.y;K(c,o.toString(),{dir:r,drag:!0})}e.bind("contextmenu."+t,function(t){t.preventDefault()}).bind("mousedown."+t+" touchstart."+t+" pointerdown."+t+" MSPointerDown."+t,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),et(t)){j=!0,m&&(document.onselectstart=function(){return!1}),E.call(f,!1),X(c);var e=(a=at(this)).offset(),n=F(t)[0]-e.top,i=F(t)[1]-e.left,r=a.height()+e.top,o=a.width()+e.left;n<r&&0<n&&i<o&&0<i&&(s=n,l=i),T(a,"active",h.autoExpandScrollbar)}}).bind("touchmove."+t,function(t){t.stopImmediatePropagation(),t.preventDefault();var e=a.offset(),n=F(t)[0]-e.top,i=F(t)[1]-e.left;r(s,l,n,i)}),at(document).add(i).bind("mousemove."+t+" pointermove."+t+" MSPointerMove."+t,function(t){if(a){var e=a.offset(),n=F(t)[0]-e.top,i=F(t)[1]-e.left;if(s===n&&l===i)return;r(s,l,n,i)}}).add(n).bind("mouseup."+t+" touchend."+t+" pointerup."+t+" MSPointerUp."+t,function(t){a&&(T(a,"active",h.autoExpandScrollbar),a=null),j=!1,m&&(document.onselectstart=null),E.call(f,!0)})},O=function(){var u,c,h,d,f,p,g,m,v,y,b,x,_,w,S=at(this),C=S.data(H),T=C.opt,t=H+"_"+C.idx,$=at("#mCSB_"+C.idx),k=at("#mCSB_"+C.idx+"_container"),A=[at("#mCSB_"+C.idx+"_dragger_vertical"),at("#mCSB_"+C.idx+"_dragger_horizontal")],O=[],D=[],P=0,M="yx"===T.axis?"none":"all",E=[],e=k.find("iframe"),n=["touchstart."+t+" pointerdown."+t+" MSPointerDown."+t,"touchmove."+t+" pointermove."+t+" MSPointerMove."+t,"touchend."+t+" pointerup."+t+" MSPointerUp."+t],I=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;function i(t){if(!nt(t)||j||F(t)[2])L=0;else{w=_=0,u=L=1,S.removeClass("mCS_touch_action");var e=k.offset();c=F(t)[0]-e.top,h=F(t)[1]-e.left,E=[F(t)[0],F(t)[1]]}}function r(t){if(nt(t)&&!j&&!F(t)[2]&&(T.documentTouchScroll||t.preventDefault(),t.stopImmediatePropagation(),(!w||_)&&u)){g=Z();var e=$.offset(),n=F(t)[0]-e.top,i=F(t)[1]-e.left,r="mcsLinearOut";if(O.push(n),D.push(i),E[2]=Math.abs(F(t)[0]-E[0]),E[3]=Math.abs(F(t)[1]-E[1]),C.overflowed[0])var o=A[0].parent().height()-A[0].height(),a=0<c-n&&n-c>-o*C.scrollRatio.y&&(2*E[3]<E[2]||"yx"===T.axis);if(C.overflowed[1])var s=A[1].parent().width()-A[1].width(),l=0<h-i&&i-h>-s*C.scrollRatio.x&&(2*E[2]<E[3]||"yx"===T.axis);a||l?(I||t.preventDefault(),_=1):(w=1,S.addClass("mCS_touch_action")),I&&t.preventDefault(),b="yx"===T.axis?[c-n,h-i]:"x"===T.axis?[null,h-i]:[c-n,null],k[0].idleTimer=250,C.overflowed[0]&&R(b[0],P,r,"y","all",!0),C.overflowed[1]&&R(b[1],P,r,"x",M,!0)}}function o(t){if(!nt(t)||j||F(t)[2])L=0;else{L=1,t.stopImmediatePropagation(),X(S),p=Z();var e=$.offset();d=F(t)[0]-e.top,f=F(t)[1]-e.left,O=[],D=[]}}function a(t){if(nt(t)&&!j&&!F(t)[2]){u=0,t.stopImmediatePropagation(),w=_=0,m=Z();var e=$.offset(),n=F(t)[0]-e.top,i=F(t)[1]-e.left;if(!(30<m-g)){var r="mcsEaseOut",o=(y=1e3/(m-p))<2.5,a=o?[O[O.length-2],D[D.length-2]]:[0,0];v=o?[n-a[0],i-a[1]]:[n-d,i-f];var s=[Math.abs(v[0]),Math.abs(v[1])];y=o?[Math.abs(v[0]/4),Math.abs(v[1]/4)]:[y,y];var l=[Math.abs(k[0].offsetTop)-v[0]*N(s[0]/y[0],y[0]),Math.abs(k[0].offsetLeft)-v[1]*N(s[1]/y[1],y[1])];b="yx"===T.axis?[l[0],l[1]]:"x"===T.axis?[null,l[1]]:[l[0],null],x=[4*s[0]+T.scrollInertia,4*s[1]+T.scrollInertia];var c=parseInt(T.contentTouchScroll)||0;b[0]=s[0]>c?b[0]:0,b[1]=s[1]>c?b[1]:0,C.overflowed[0]&&R(b[0],x[0],r,"y",M,!1),C.overflowed[1]&&R(b[1],x[1],r,"x",M,!1)}}}function N(t,e){var n=[1.5*e,2*e,e/1.5,e/2];return 90<t?4<e?n[0]:n[3]:60<t?3<e?n[3]:n[2]:30<t?8<e?n[1]:6<e?n[0]:4<e?e:n[2]:8<e?e:n[3]}function R(t,e,n,i,r,o){t&&K(S,t.toString(),{dur:e,scrollEasing:n,dir:i,overwrite:r,drag:o})}k.bind(n[0],function(t){i(t)}).bind(n[1],function(t){r(t)}),$.bind(n[0],function(t){o(t)}).bind(n[2],function(t){a(t)}),e.length&&e.each(function(){at(this).bind("load",function(){z(this)&&at(this.contentDocument||this.contentWindow.document).bind(n[0],function(t){i(t),o(t)}).bind(n[1],function(t){r(t)}).bind(n[2],function(t){a(t)})})})},D=function(){var r,i=at(this),o=i.data(H),a=o.opt,s=o.sequential,t=H+"_"+o.idx,l=at("#mCSB_"+o.idx+"_container"),c=l.parent();function u(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function h(t,e,n){s.type=n&&r?"stepped":"stepless",s.scrollAmount=10,q(i,t,e,"mcsLinearOut",n?60:null)}l.bind("mousedown."+t,function(t){L||r||(r=1,j=!0)}).add(document).bind("mousemove."+t,function(t){if(!L&&r&&u()){var e=l.offset(),n=F(t)[0]-e.top+l[0].offsetTop,i=F(t)[1]-e.left+l[0].offsetLeft;0<n&&n<c.height()&&0<i&&i<c.width()?s.step&&h("off",null,"stepped"):("x"!==a.axis&&o.overflowed[0]&&(n<0?h("on",38):n>c.height()&&h("on",40)),"y"!==a.axis&&o.overflowed[1]&&(i<0?h("on",37):i>c.width()&&h("on",39)))}}).bind("mouseup."+t+" dragend."+t,function(t){L||(r&&(r=0,h("off",null)),j=!1)})},P=function(){if(at(this).data(H)){var h=at(this),d=h.data(H),f=d.opt,t=H+"_"+d.idx,p=at("#mCSB_"+d.idx),g=[at("#mCSB_"+d.idx+"_dragger_vertical"),at("#mCSB_"+d.idx+"_dragger_horizontal")],e=at("#mCSB_"+d.idx+"_container").find("iframe");e.length&&e.each(function(){at(this).bind("load",function(){z(this)&&at(this.contentDocument||this.contentWindow.document).bind("mousewheel."+t,function(t,e){n(t,e)})})}),p.bind("mousewheel."+t,function(t,e){n(t,e)})}function n(t,e){if(X(h),!I(h,t.target)){var n="auto"!==f.mouseWheel.deltaFactor?parseInt(f.mouseWheel.deltaFactor):m&&t.deltaFactor<100?100:t.deltaFactor||100,i=f.scrollInertia;if("x"===f.axis||"x"===f.mouseWheel.axis)var r="x",o=[Math.round(n*d.scrollRatio.x),parseInt(f.mouseWheel.scrollAmount)],a="auto"!==f.mouseWheel.scrollAmount?o[1]:o[0]>=p.width()?.9*p.width():o[0],s=Math.abs(at("#mCSB_"+d.idx+"_container")[0].offsetLeft),l=g[1][0].offsetLeft,c=g[1].parent().width()-g[1].width(),u="y"===f.mouseWheel.axis?t.deltaY||e:t.deltaX;else r="y",o=[Math.round(n*d.scrollRatio.y),parseInt(f.mouseWheel.scrollAmount)],a="auto"!==f.mouseWheel.scrollAmount?o[1]:o[0]>=p.height()?.9*p.height():o[0],s=Math.abs(at("#mCSB_"+d.idx+"_container")[0].offsetTop),l=g[0][0].offsetTop,c=g[0].parent().height()-g[0].height(),u=t.deltaY||e;"y"===r&&!d.overflowed[0]||"x"===r&&!d.overflowed[1]||((f.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(u=-u),f.mouseWheel.normalizeDelta&&(u=u<0?-1:1),(0<u&&0!==l||u<0&&l!==c||f.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!f.mouseWheel.normalizeDelta&&(a=t.deltaFactor,i=17),K(h,(s-u*a).toString(),{dir:r,dur:i}))}}},M=new Object,z=function(t){var e=!1,n=!1,i=null;if(void 0===t?n="#empty":void 0!==at(t).attr("id")&&(n=at(t).attr("id")),!1!==n&&void 0!==M[n])return M[n];if(t){try{i=(t.contentDocument||t.contentWindow.document).body.innerHTML}catch(t){}e=null!==i}else{try{i=top.document.body.innerHTML}catch(t){}e=null!==i}return!1!==n&&(M[n]=e),e},E=function(t){var e=this.find("iframe");if(e.length){var n=t?"auto":"none";e.css("pointer-events",n)}},I=function(t,e){var n=e.nodeName.toLowerCase(),i=t.data(H).opt.mouseWheel.disableOver,r=["select","textarea"];return-1<at.inArray(n,i)&&!(-1<at.inArray(n,r)&&!at(e).is(":focus"))},N=function(){var a,s=at(this),l=s.data(H),t=H+"_"+l.idx,c=at("#mCSB_"+l.idx+"_container"),u=c.parent();at(".mCSB_"+l.idx+"_scrollbar ."+_[12]).bind("mousedown."+t+" touchstart."+t+" pointerdown."+t+" MSPointerDown."+t,function(t){j=!0,at(t.target).hasClass("mCSB_dragger")||(a=1)}).bind("touchend."+t+" pointerup."+t+" MSPointerUp."+t,function(t){j=!1}).bind("click."+t,function(t){if(a&&(a=0,at(t.target).hasClass(_[12])||at(t.target).hasClass("mCSB_draggerRail"))){X(s);var e=at(this),n=e.find(".mCSB_dragger");if(0<e.parent(".mCSB_scrollTools_horizontal").length){if(!l.overflowed[1])return;var i="x",r=t.pageX>n.offset().left?-1:1,o=Math.abs(c[0].offsetLeft)-r*(.9*u.width())}else{if(!l.overflowed[0])return;i="y",r=t.pageY>n.offset().top?-1:1,o=Math.abs(c[0].offsetTop)-r*(.9*u.height())}K(s,o.toString(),{dir:i,scrollEasing:"mcsEaseInOut"})}})},R=function(){var a=at(this),t=a.data(H),s=t.opt,e=H+"_"+t.idx,l=at("#mCSB_"+t.idx+"_container"),c=l.parent();l.bind("focusin."+e,function(t){var r=at(document.activeElement),e=l.find(".mCustomScrollBox").length,o=0;r.is(s.advanced.autoScrollOnFocus)&&(X(a),clearTimeout(a[0]._focusTimeout),a[0]._focusTimer=e?(o+17)*e:0,a[0]._focusTimeout=setTimeout(function(){var t=[rt(r)[0],rt(r)[1]],e=[l[0].offsetTop,l[0].offsetLeft],n=[0<=e[0]+t[0]&&e[0]+t[0]<c.height()-r.outerHeight(!1),0<=e[1]+t[1]&&e[0]+t[1]<c.width()-r.outerWidth(!1)],i="yx"!==s.axis||n[0]||n[1]?"all":"none";"x"===s.axis||n[0]||K(a,t[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:i,dur:o}),"y"===s.axis||n[1]||K(a,t[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:i,dur:o})},a[0]._focusTimer))})},B=function(){var e=at(this).data(H),t=H+"_"+e.idx,n=at("#mCSB_"+e.idx+"_container").parent();n.bind("scroll."+t,function(t){0===n.scrollTop()&&0===n.scrollLeft()||at(".mCSB_"+e.idx+"_scrollbar").css("visibility","hidden")})},V=function(){var i=at(this),r=i.data(H),o=r.opt,a=r.sequential,t=H+"_"+r.idx,e=".mCSB_"+r.idx+"_scrollbar";at(e+">a").bind("contextmenu."+t,function(t){t.preventDefault()}).bind("mousedown."+t+" touchstart."+t+" pointerdown."+t+" MSPointerDown."+t+" mouseup."+t+" touchend."+t+" pointerup."+t+" MSPointerUp."+t+" mouseout."+t+" pointerout."+t+" MSPointerOut."+t+" click."+t,function(t){if(t.preventDefault(),et(t)){var e=at(this).attr("class");switch(a.type=o.scrollButtons.scrollType,t.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===a.type)return;j=!0,r.tweenRunning=!1,n("on",e);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===a.type)return;j=!1,a.dir&&n("off",e);break;case"click":if("stepped"!==a.type||r.tweenRunning)return;n("on",e)}}function n(t,e){a.scrollAmount=o.scrollButtons.scrollAmount,q(i,t,e)}})},W=function(){var s=at(this),l=s.data(H),c=l.opt,u=l.sequential,t=H+"_"+l.idx,e=at("#mCSB_"+l.idx),h=at("#mCSB_"+l.idx+"_container"),d=h.parent(),f="input,textarea,select,datalist,keygen,[contenteditable='true']",n=h.find("iframe"),i=["blur."+t+" keydown."+t+" keyup."+t];function r(t){switch(t.type){case"blur":l.tweenRunning&&u.dir&&a("off",null);break;case"keydown":case"keyup":var e=t.keyCode?t.keyCode:t.which,n="on";if("x"!==c.axis&&(38===e||40===e)||"y"!==c.axis&&(37===e||39===e)){if((38===e||40===e)&&!l.overflowed[0]||(37===e||39===e)&&!l.overflowed[1])return;"keyup"===t.type&&(n="off"),at(document.activeElement).is(f)||(t.preventDefault(),t.stopImmediatePropagation(),a(n,e))}else if(33===e||34===e){if((l.overflowed[0]||l.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){X(s);var i=34===e?-1:1;if("x"===c.axis||"yx"===c.axis&&l.overflowed[1]&&!l.overflowed[0])var r="x",o=Math.abs(h[0].offsetLeft)-i*(.9*d.width());else r="y",o=Math.abs(h[0].offsetTop)-i*(.9*d.height());K(s,o.toString(),{dir:r,scrollEasing:"mcsEaseInOut"})}}else if((35===e||36===e)&&!at(document.activeElement).is(f)&&((l.overflowed[0]||l.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===c.axis||"yx"===c.axis&&l.overflowed[1]&&!l.overflowed[0])r="x",o=35===e?Math.abs(d.width()-h.outerWidth(!1)):0;else r="y",o=35===e?Math.abs(d.height()-h.outerHeight(!1)):0;K(s,o.toString(),{dir:r,scrollEasing:"mcsEaseInOut"})}}function a(t,e){u.type=c.keyboard.scrollType,u.scrollAmount=c.keyboard.scrollAmount,"stepped"===u.type&&l.tweenRunning||q(s,t,e)}}n.length&&n.each(function(){at(this).bind("load",function(){z(this)&&at(this.contentDocument||this.contentWindow.document).bind(i[0],function(t){r(t)})})}),e.attr("tabindex","0").bind(i[0],function(t){r(t)})},q=function(h,t,e,d,f){var p=h.data(H),g=p.opt,m=p.sequential,v=at("#mCSB_"+p.idx+"_container"),n="stepped"===m.type,y=g.scrollInertia<26?26:g.scrollInertia,b=g.scrollInertia<1?17:g.scrollInertia;switch(t){case"on":if(m.dir=[e===_[16]||e===_[15]||39===e||37===e?"x":"y",e===_[13]||e===_[15]||38===e||37===e?-1:1],X(h),it(e)&&"stepped"===m.type)return;x(n);break;case"off":i(),(n||p.tweenRunning&&m.dir)&&x(!0)}function x(t){g.snapAmount&&(m.scrollAmount=g.snapAmount instanceof Array?"x"===m.dir[0]?g.snapAmount[1]:g.snapAmount[0]:g.snapAmount);var e="stepped"!==m.type,n=f||(t?e?y/1.5:b:1e3/60),i=t?e?7.5:40:2.5,r=[Math.abs(v[0].offsetTop),Math.abs(v[0].offsetLeft)],o=[10<p.scrollRatio.y?10:p.scrollRatio.y,10<p.scrollRatio.x?10:p.scrollRatio.x],a="x"===m.dir[0]?r[1]+m.dir[1]*(o[1]*i):r[0]+m.dir[1]*(o[0]*i),s="x"===m.dir[0]?r[1]+m.dir[1]*parseInt(m.scrollAmount):r[0]+m.dir[1]*parseInt(m.scrollAmount),l="auto"!==m.scrollAmount?s:a,c=d||(t?e?"mcsLinearOut":"mcsEaseInOut":"mcsLinear"),u=!!t;t&&n<17&&(l="x"===m.dir[0]?r[1]:r[0]),K(h,l.toString(),{dir:m.dir[0],scrollEasing:c,dur:n,onComplete:u}),t?m.dir=!1:(clearTimeout(m.step),m.step=setTimeout(function(){x()},n))}function i(){clearTimeout(m.step),tt(m,"step"),X(h)}},U=function(t){var e=at(this).data(H).opt,n=[];return"function"==typeof t&&(t=t()),t instanceof Array?n=1<t.length?[t[0],t[1]]:"x"===e.axis?[null,t[0]]:[t[0],null]:(n[0]=t.y?t.y:t.x||"x"===e.axis?null:t,n[1]=t.x?t.x:t.y||"y"===e.axis?null:t),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},J=function(t,e){if(null!=t&&void 0!==t){var n=at(this),i=n.data(H),r=i.opt,o=at("#mCSB_"+i.idx+"_container"),a=o.parent(),s=typeof t;e||(e="x"===r.axis?"x":"y");var l="x"===e?o.outerWidth(!1)-a.width():o.outerHeight(!1)-a.height(),c="x"===e?o[0].offsetLeft:o[0].offsetTop,u="x"===e?"left":"top";switch(s){case"function":return t();case"object":if(!(d=t.jquery?t:at(t)).length)return;return"x"===e?rt(d)[1]:rt(d)[0];case"string":case"number":if(it(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(l*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(c-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var h=c+parseInt(t.split("+=")[1]);return 0<=h?0:Math.abs(h)}if(-1!==t.indexOf("px")&&it(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(a.height()-o.outerHeight(!1));if("right"===t)return Math.abs(a.width()-o.outerWidth(!1));if("first"!==t&&"last"!==t)return at(t).length?"x"===e?rt(at(t))[1]:rt(at(t))[0]:(o.css(u,t),void p.update.call(null,n[0]));var d=o.find(":"+t);return"x"===e?rt(d)[1]:rt(d)[0]}}},G=function(t){var e=at(this),n=e.data(H),i=n.opt,r=at("#mCSB_"+n.idx+"_container");if(t)return clearTimeout(r[0].autoUpdate),void tt(r[0],"autoUpdate");function o(){clearTimeout(r[0].autoUpdate),0!==e.parents("html").length?r[0].autoUpdate=setTimeout(function(){return i.advanced.updateOnSelectorChange&&(n.poll.change.n=s(),n.poll.change.n!==n.poll.change.o)?(n.poll.change.o=n.poll.change.n,void l(3)):i.advanced.updateOnContentResize&&(n.poll.size.n=e[0].scrollHeight+e[0].scrollWidth+r[0].offsetHeight+e[0].offsetHeight+e[0].offsetWidth,n.poll.size.n!==n.poll.size.o)?(n.poll.size.o=n.poll.size.n,void l(1)):!i.advanced.updateOnImageLoad||"auto"===i.advanced.updateOnImageLoad&&"y"===i.axis||(n.poll.img.n=r.find("img").length,n.poll.img.n===n.poll.img.o)?void((i.advanced.updateOnSelectorChange||i.advanced.updateOnContentResize||i.advanced.updateOnImageLoad)&&o()):(n.poll.img.o=n.poll.img.n,void r.find("img").each(function(){a(this)}))},i.advanced.autoUpdateTimeout):e=null}function a(t){if(at(t).hasClass(_[2]))l();else{var e=new Image;e.onload=n(e,i),e.src=t.src}function n(t,e){return function(){return e.apply(t,arguments)}}function i(){this.onload=null,at(t).addClass(_[2]),l(2)}}function s(){!0===i.advanced.updateOnSelectorChange&&(i.advanced.updateOnSelectorChange="*");var t=0,e=r.find(i.advanced.updateOnSelectorChange);return i.advanced.updateOnSelectorChange&&0<e.length&&e.each(function(){t+=this.offsetHeight+this.offsetWidth}),t}function l(t){clearTimeout(r[0].autoUpdate),p.update.call(null,e[0],t)}o()},Y=function(t,e,n){return Math.round(t/e)*e-n},X=function(t){var e=t.data(H);at("#mCSB_"+e.idx+"_container,#mCSB_"+e.idx+"_container_wrapper,#mCSB_"+e.idx+"_dragger_vertical,#mCSB_"+e.idx+"_dragger_horizontal").each(function(){n.call(this)})},K=function(r,t,o){var e=r.data(H),n=e.opt,i={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:n.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},a=[(o=at.extend(i,o)).dur,o.drag?0:o.dur],s=at("#mCSB_"+e.idx),l=at("#mCSB_"+e.idx+"_container"),c=l.parent(),u=n.callbacks.onTotalScrollOffset?U.call(r,n.callbacks.onTotalScrollOffset):[0,0],h=n.callbacks.onTotalScrollBackOffset?U.call(r,n.callbacks.onTotalScrollBackOffset):[0,0];if(e.trigger=o.trigger,0===c.scrollTop()&&0===c.scrollLeft()||(at(".mCSB_"+e.idx+"_scrollbar").css("visibility","visible"),c.scrollTop(0).scrollLeft(0)),"_resetY"!==t||e.contentReset.y||(w("onOverflowYNone")&&n.callbacks.onOverflowYNone.call(r[0]),e.contentReset.y=1),"_resetX"!==t||e.contentReset.x||(w("onOverflowXNone")&&n.callbacks.onOverflowXNone.call(r[0]),e.contentReset.x=1),"_resetY"!==t&&"_resetX"!==t){if(!e.contentReset.y&&r[0].mcs||!e.overflowed[0]||(w("onOverflowY")&&n.callbacks.onOverflowY.call(r[0]),e.contentReset.x=null),!e.contentReset.x&&r[0].mcs||!e.overflowed[1]||(w("onOverflowX")&&n.callbacks.onOverflowX.call(r[0]),e.contentReset.x=null),n.snapAmount){var d=n.snapAmount instanceof Array?"x"===o.dir?n.snapAmount[1]:n.snapAmount[0]:n.snapAmount;t=Y(t,d,n.snapOffset)}switch(o.dir){case"x":var f=at("#mCSB_"+e.idx+"_dragger_horizontal"),p="left",g=l[0].offsetLeft,m=[s.width()-l.outerWidth(!1),f.parent().width()-f.width()],v=[t,0===t?0:t/e.scrollRatio.x],y=u[1],b=h[1],x=0<y?y/e.scrollRatio.x:0,_=0<b?b/e.scrollRatio.x:0;break;case"y":f=at("#mCSB_"+e.idx+"_dragger_vertical"),p="top",g=l[0].offsetTop,m=[s.height()-l.outerHeight(!1),f.parent().height()-f.height()],v=[t,0===t?0:t/e.scrollRatio.y],y=u[0],b=h[0],x=0<y?y/e.scrollRatio.y:0,_=0<b?b/e.scrollRatio.y:0}v[1]<0||0===v[0]&&0===v[1]?v=[0,0]:v[1]>=m[1]?v=[m[0],m[1]]:v[0]=-v[0],r[0].mcs||(C(),w("onInit")&&n.callbacks.onInit.call(r[0])),clearTimeout(l[0].onCompleteTimeout),Q(f[0],p,Math.round(v[1]),a[1],o.scrollEasing),!e.tweenRunning&&(0===g&&0<=v[0]||g===m[0]&&v[0]<=m[0])||Q(l[0],p,Math.round(v[0]),a[0],o.scrollEasing,o.overwrite,{onStart:function(){o.callbacks&&o.onStart&&!e.tweenRunning&&(w("onScrollStart")&&(C(),n.callbacks.onScrollStart.call(r[0])),e.tweenRunning=!0,T(f),e.cbOffsets=S())},onUpdate:function(){o.callbacks&&o.onUpdate&&w("whileScrolling")&&(C(),n.callbacks.whileScrolling.call(r[0]))},onComplete:function(){if(o.callbacks&&o.onComplete){"yx"===n.axis&&clearTimeout(l[0].onCompleteTimeout);var t=l[0].idleTimer||0;l[0].onCompleteTimeout=setTimeout(function(){w("onScroll")&&(C(),n.callbacks.onScroll.call(r[0])),w("onTotalScroll")&&v[1]>=m[1]-x&&e.cbOffsets[0]&&(C(),n.callbacks.onTotalScroll.call(r[0])),w("onTotalScrollBack")&&v[1]<=_&&e.cbOffsets[1]&&(C(),n.callbacks.onTotalScrollBack.call(r[0])),e.tweenRunning=!1,l[0].idleTimer=0,T(f,"hide")},t)}}})}function w(t){return e&&n.callbacks[t]&&"function"==typeof n.callbacks[t]}function S(){return[n.callbacks.alwaysTriggerOffsets||g>=m[0]+y,n.callbacks.alwaysTriggerOffsets||g<=-b]}function C(){var t=[l[0].offsetTop,l[0].offsetLeft],e=[f[0].offsetTop,f[0].offsetLeft],n=[l.outerHeight(!1),l.outerWidth(!1)],i=[s.height(),s.width()];r[0].mcs={content:l,top:t[0],left:t[1],draggerTop:e[0],draggerLeft:e[1],topPct:Math.round(100*Math.abs(t[0])/(Math.abs(n[0])-i[0])),leftPct:Math.round(100*Math.abs(t[1])/(Math.abs(n[1])-i[1])),direction:o.dir}}},Q=function(t,e,n,i,r,o,a){t._mTween||(t._mTween={top:{},left:{}});var s,l,c=(a=a||{}).onStart||function(){},u=a.onUpdate||function(){},h=a.onComplete||function(){},d=Z(),f=0,p=t.offsetTop,g=t.style,m=t._mTween[e];"left"===e&&(p=t.offsetLeft);var v=n-p;function y(){m.stop||(f||c.call(),f=Z()-d,b(),f>=m.time&&(m.time=f>m.time?f+s-(f-m.time):f+s-1,m.time<f+1&&(m.time=f+1)),m.time<i?m.id=l(y):h.call())}function b(){g[e]=0<i?(m.currVal=w(m.time,p,v,i,r),Math.round(m.currVal)+"px"):n+"px",u.call()}function x(){s=1e3/60,m.time=f+s,l=window.requestAnimationFrame?window.requestAnimationFrame:function(t){return b(),setTimeout(t,.01)},m.id=l(y)}function _(){null!=m.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(m.id):clearTimeout(m.id),m.id=null)}function w(t,e,n,i,r){switch(r){case"linear":case"mcsLinear":return n*t/i+e;case"mcsLinearOut":return t/=i,t--,n*Math.sqrt(1-t*t)+e;case"easeInOutSmooth":return(t/=i/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e;case"easeInOutStrong":return(t/=i/2)<1?n/2*Math.pow(2,10*(t-1))+e:(t--,n/2*(2-Math.pow(2,-10*t))+e);case"easeInOut":case"mcsEaseInOut":return(t/=i/2)<1?n/2*t*t*t+e:n/2*((t-=2)*t*t+2)+e;case"easeOutSmooth":return t/=i,-n*(--t*t*t*t-1)+e;case"easeOutStrong":return n*(1-Math.pow(2,-10*t/i))+e;case"easeOut":case"mcsEaseOut":default:var o=(t/=i)*t,a=o*t;return e+n*(.499999999999997*a*o+-2.5*o*o+5.5*a+-6.5*o+4*t)}}m.stop=0,"none"!==o&&_(),x()},Z=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},n=function(){var t=this;t._mTween||(t._mTween={top:{},left:{}});for(var e=["top","left"],n=0;n<e.length;n++){var i=e[n];t._mTween[i].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(t._mTween[i].id):clearTimeout(t._mTween[i].id),t._mTween[i].id=null,t._mTween[i].stop=1)}},tt=function(e,n){try{delete e[n]}catch(t){e[n]=null}},et=function(t){return!(t.which&&1!==t.which)},nt=function(t){var e=t.originalEvent.pointerType;return!(e&&"touch"!==e&&2!==e)},it=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},rt=function(t){var e=t.parents(".mCSB_container");return[t.offset().top-e.offset().top,t.offset().left-e.offset().left]},ot=function(){var t=e();return!!t&&document[t];function e(){var t=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var e=0;e<t.length;e++)if(t[e]+"Hidden"in document)return t[e]+"Hidden";return null}};at.fn[f]=function(t){return p[t]?p[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void at.error("Method "+t+" does not exist"):p.init.apply(this,arguments)},at[f]=function(t){return p[t]?p[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void at.error("Method "+t+" does not exist"):p.init.apply(this,arguments)},at[f].defaults=r,window[f]=!0,at(window).bind("load",function(){at(i)[f](),at.extend(at.expr[":"],{mcsInView:at.expr[":"].mcsInView||function(t){var e,n,i=at(t),r=i.parents(".mCSB_container");if(r.length)return e=r.parent(),0<=(n=[r[0].offsetTop,r[0].offsetLeft])[0]+rt(i)[0]&&n[0]+rt(i)[0]<e.height()-i.outerHeight(!1)&&0<=n[1]+rt(i)[1]&&n[1]+rt(i)[1]<e.width()-i.outerWidth(!1)},mcsInSight:at.expr[":"].mcsInSight||function(t,e,n){var i,r,o,a,s=at(t),l=s.parents(".mCSB_container"),c="exact"===n[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(l.length)return i=[s.outerHeight(!1),s.outerWidth(!1)],o=[l[0].offsetTop+rt(s)[0],l[0].offsetLeft+rt(s)[1]],r=[l.parent()[0].offsetHeight,l.parent()[0].offsetWidth],a=[i[0]<r[0]?c[0]:c[1],i[1]<r[1]?c[0]:c[1]],o[0]-r[0]*a[0][0]<0&&0<=o[0]+i[0]-r[0]*a[0][1]&&o[1]-r[1]*a[1][0]<0&&0<=o[1]+i[1]-r[1]*a[1][1]},mcsOverflow:at.expr[":"].mcsOverflow||function(t){var e=at(t).data(H);if(e)return e.overflowed[0]||e.overflowed[1]}})})},e="function"==typeof define&&define.amd,n="undefined"!=typeof module&&module.exports,i="https:"==document.location.protocol?"https:":"http:",r="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js",e||(n?require("jquery-mousewheel")(at):at.event.special.mousewheel||at("head").append(decodeURI("%3Cscript src="+i+"//"+r+"%3E%3C/script%3E"))),t()}),function(){"use strict";function t(){this.defaults={scrollButtons:{enable:!0},axis:"yx"},$.mCustomScrollbar.defaults.scrollButtons=this.defaults.scrollButtons,$.mCustomScrollbar.defaults.axis=this.defaults.axis,this.$get=function(){return{defaults:this.defaults}}}function a(t,e,n,i){n.mCustomScrollbar("destroy");var r={};for(var o in i.ngScrollbarsConfig&&(r=i.ngScrollbarsConfig),t)if(t.hasOwnProperty(o))switch(o){case"scrollButtons":r.hasOwnProperty(o)||(e.scrollButtons=t[o]);break;case"axis":r.hasOwnProperty(o)||(e.axis=t[o]);break;default:r.hasOwnProperty(o)||(r[o]=t[o])}n.mCustomScrollbar(r)}function e(e){return{scope:{ngScrollbarsConfig:"=?",ngScrollbarsUpdate:"=?",element:"=?"},link:function(n,i,t){n.elem=i;var r=e.defaults,o=$.mCustomScrollbar.defaults;n.ngScrollbarsUpdate=function(){i.mCustomScrollbar.apply(i,arguments)},n.$watch("ngScrollbarsConfig",function(t,e){void 0!==t&&a(r,o,i,n)}),a(r,o,i,n)}}}e.$inject=["a"],angular.module("ngScrollbars",[]).provider("ScrollBars",t).directive("ngScrollbars",e),t.$inject=[],e.$inject=["ScrollBars"]}(),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(function(){try{return require("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],function(t){return e(function(){try{return t("moment")}catch(t){}}())}):(t=t||self).Chart=e(t.moment)}(this,function(i){"use strict";function t(t,e){return t(e={exports:{}},e.exports),e.exports}function e(t){return t&&t.default||t}i=i&&i.hasOwnProperty("default")?i.default:i;var c={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},u=t(function(t){var a={};for(var e in c)c.hasOwnProperty(e)&&(a[c[e]]=e);var s=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var n in s)if(s.hasOwnProperty(n)){if(!("channels"in s[n]))throw new Error("missing channels property: "+n);if(!("labels"in s[n]))throw new Error("missing channel labels property: "+n);if(s[n].labels.length!==s[n].channels)throw new Error("channel and label counts mismatch: "+n);var i=s[n].channels,r=s[n].labels;delete s[n].channels,delete s[n].labels,Object.defineProperty(s[n],"channels",{value:i}),Object.defineProperty(s[n],"labels",{value:r})}function l(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}s.rgb.hsl=function(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a;return s===a?e=0:i===s?e=(r-o)/l:r===s?e=2+(o-i)/l:o===s&&(e=4+(i-r)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(a+s)/2,[e,100*(s===a?0:n<=.5?l/(s+a):l/(2-s-a)),100*n]},s.rgb.hsv=function(t){var e,n,i,r,o,a=t[0]/255,s=t[1]/255,l=t[2]/255,c=Math.max(a,s,l),u=c-Math.min(a,s,l),h=function(t){return(c-t)/6/u+.5};return 0===u?r=o=0:(o=u/c,e=h(a),n=h(s),i=h(l),a===c?r=i-n:s===c?r=1/3+e-i:l===c&&(r=2/3+n-e),r<0?r+=1:1<r&&(r-=1)),[360*r,100*o,100*c]},s.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2];return[s.rgb.hsl(t)[0],100*(1/255*Math.min(e,Math.min(n,i))),100*(i=1-1/255*Math.max(e,Math.max(n,i)))]},s.rgb.cmyk=function(t){var e,n=t[0]/255,i=t[1]/255,r=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-r)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-r-e)/(1-e)||0),100*e]},s.rgb.keyword=function(t){var e=a[t];if(e)return e;var n,i=1/0;for(var r in c)if(c.hasOwnProperty(r)){var o=l(t,c[r]);o<i&&(i=o,n=r)}return n},s.keyword.rgb=function(t){return c[t]},s.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*(.4124*(e=.04045<e?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=.04045<n?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=.04045<i?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]},s.rgb.lab=function(t){var e=s.rgb.xyz(t),n=e[0],i=e[1],r=e[2];return i/=100,r/=108.883,n=.008856<(n/=95.047)?Math.pow(n,1/3):7.787*n+16/116,[116*(i=.008856<i?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=.008856<r?Math.pow(r,1/3):7.787*r+16/116))]},s.hsl.rgb=function(t){var e,n,i,r,o,a=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[o=255*l,o,o];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),r=[0,0,0];for(var c=0;c<3;c++)(i=a+1/3*-(c-1))<0&&i++,1<i&&i--,o=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,r[c]=255*o;return r},s.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,r=n,o=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,r*=o<=1?o:2-o,[e,100*(0===i?2*r/(o+r):2*n/(i+n)),100*((i+n)/2)]},s.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,r=Math.floor(e)%6,o=e-Math.floor(e),a=255*i*(1-n),s=255*i*(1-n*o),l=255*i*(1-n*(1-o));switch(i*=255,r){case 0:return[i,l,a];case 1:return[s,i,a];case 2:return[a,i,l];case 3:return[a,s,i];case 4:return[l,a,i];case 5:return[i,a,s]}},s.hsv.hsl=function(t){var e,n,i,r=t[0],o=t[1]/100,a=t[2]/100,s=Math.max(a,.01);return i=(2-o)*a,n=o*s,[r,100*(n=(n/=(e=(2-o)*s)<=1?e:2-e)||0),100*(i/=2)]},s.hwb.rgb=function(t){var e,n,i,r,o,a,s,l=t[0]/360,c=t[1]/100,u=t[2]/100,h=c+u;switch(1<h&&(c/=h,u/=h),i=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(i=1-i),r=c+i*((n=1-u)-c),e){default:case 6:case 0:o=n,a=r,s=c;break;case 1:o=r,a=n,s=c;break;case 2:o=c,a=n,s=r;break;case 3:o=c,a=r,s=n;break;case 4:o=r,a=c,s=n;break;case 5:o=n,a=c,s=r}return[255*o,255*a,255*s]},s.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,r=t[3]/100;return[255*(1-Math.min(1,e*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r)),255*(1-Math.min(1,i*(1-r)+r))]},s.xyz.rgb=function(t){var e,n,i,r=t[0]/100,o=t[1]/100,a=t[2]/100;return n=-.9689*r+1.8758*o+.0415*a,i=.0557*r+-.204*o+1.057*a,e=.0031308<(e=3.2406*r+-1.5372*o+-.4986*a)?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=.0031308<n?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=.0031308<i?1.055*Math.pow(i,1/2.4)-.055:12.92*i,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]},s.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=.008856<(e/=95.047)?Math.pow(e,1/3):7.787*e+16/116,[116*(n=.008856<n?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=.008856<i?Math.pow(i,1/3):7.787*i+16/116))]},s.lab.xyz=function(t){var e,n,i,r=t[0];e=t[1]/500+(n=(r+16)/116),i=n-t[2]/200;var o=Math.pow(n,3),a=Math.pow(e,3),s=Math.pow(i,3);return n=.008856<o?o:(n-16/116)/7.787,e=.008856<a?a:(e-16/116)/7.787,i=.008856<s?s:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},s.lab.lch=function(t){var e,n=t[0],i=t[1],r=t[2];return(e=360*Math.atan2(r,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+r*r),e]},s.lch.lab=function(t){var e,n=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[n,i*Math.cos(e),i*Math.sin(e)]},s.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:s.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(o+=60),o},s.hsv.ansi16=function(t){return s.rgb.ansi16(s.hsv.rgb(t),t[2])},s.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];return e===n&&n===i?e<8?16:248<e?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},s.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return 50<t&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(50<t));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},s.ansi256.rgb=function(t){if(232<=t){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},s.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},s.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map(function(t){return t+t}).join(""));var i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},s.rgb.hcg=function(t){var e,n=t[0]/255,i=t[1]/255,r=t[2]/255,o=Math.max(Math.max(n,i),r),a=Math.min(Math.min(n,i),r),s=o-a;return e=s<=0?0:o===n?(i-r)/s%6:o===i?2+(r-n)/s:4+(n-i)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?a/(1-s):0)]},s.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,r=0;return(i=n<.5?2*e*n:2*e*(1-n))<1&&(r=(n-.5*i)/(1-i)),[t[0],100*i,100*r]},s.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,r=0;return i<1&&(r=(n-i)/(1-i)),[t[0],100*i,100*r]},s.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(0===n)return[255*i,255*i,255*i];var r=[0,0,0],o=e%1*6,a=o%1,s=1-a,l=0;switch(Math.floor(o)){case 0:r[0]=1,r[1]=a,r[2]=0;break;case 1:r[0]=s,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=a;break;case 3:r[0]=0,r[1]=s,r[2]=1;break;case 4:r[0]=a,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=s}return l=(1-n)*i,[255*(n*r[0]+l),255*(n*r[1]+l),255*(n*r[2]+l)]},s.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),i=0;return 0<n&&(i=e/n),[t[0],100*i,100*n]},s.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return 0<n&&n<.5?i=e/(2*n):.5<=n&&n<1&&(i=e/(2*(1-n))),[t[0],100*i,100*n]},s.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},s.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,i=n-e,r=0;return i<1&&(r=(n-i)/(1-i)),[t[0],100*i,100*r]},s.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},s.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},s.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},s.gray.hsl=s.gray.hsv=function(t){return[0,0,t[0]]},s.gray.hwb=function(t){return[0,100,t[0]]},s.gray.cmyk=function(t){return[0,0,0,t[0]]},s.gray.lab=function(t){return[t[0],0,0]},s.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},s.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});u.rgb,u.hsl,u.hsv,u.hwb,u.cmyk,u.xyz,u.lab,u.lch,u.hex,u.keyword,u.ansi16,u.ansi256,u.hcg,u.apple,u.gray;function h(){for(var t={},e=Object.keys(u),n=e.length,i=0;i<n;i++)t[e[i]]={distance:-1,parent:null};return t}function s(t){var e=h(),n=[t];for(e[t].distance=0;n.length;)for(var i=n.pop(),r=Object.keys(u[i]),o=r.length,a=0;a<o;a++){var s=r[a],l=e[s];-1===l.distance&&(l.distance=e[i].distance+1,l.parent=i,n.unshift(s))}return e}function o(e,n){return function(t){return n(e(t))}}function l(t,e){for(var n=[e[t].parent,t],i=u[e[t].parent][t],r=e[t].parent;e[r].parent;)n.unshift(e[r].parent),i=o(u[e[r].parent][r],i),r=e[r].parent;return i.conversion=n,i}var r=function(t){for(var e=s(t),n={},i=Object.keys(e),r=i.length,o=0;o<r;o++){var a=i[o];null!==e[a].parent&&(n[a]=l(a,e))}return n},a={};function d(e){var t=function(t){return null==t?t:(1<arguments.length&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}function f(r){var t=function(t){if(null==t)return t;1<arguments.length&&(t=Array.prototype.slice.call(arguments));var e=r(t);if("object"==typeof e)for(var n=e.length,i=0;i<n;i++)e[i]=Math.round(e[i]);return e};return"conversion"in r&&(t.conversion=r.conversion),t}Object.keys(u).forEach(function(n){a[n]={},Object.defineProperty(a[n],"channels",{value:u[n].channels}),Object.defineProperty(a[n],"labels",{value:u[n].labels});var i=r(n);Object.keys(i).forEach(function(t){var e=i[t];a[n][t]=f(e),a[n][t].raw=d(e)})});var p=a,g={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n={getRgba:m,getHsla:v,getRgb:b,getHsl:x,getHwb:y,getAlpha:_,hexString:w,rgbString:S,rgbaString:C,percentString:T,percentaString:$,hslString:k,hslaString:A,hwbString:O,keyword:D};function m(t){if(t){var e=/^#([a-fA-F0-9]{3,4})$/i,n=/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i,i=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,r=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,o=/(\w+)/,a=[0,0,0],s=1,l=t.match(e),c="";if(l){c=(l=l[1])[3];for(var u=0;u<a.length;u++)a[u]=parseInt(l[u]+l[u],16);c&&(s=Math.round(parseInt(c+c,16)/255*100)/100)}else if(l=t.match(n)){c=l[2],l=l[1];for(u=0;u<a.length;u++)a[u]=parseInt(l.slice(2*u,2*u+2),16);c&&(s=Math.round(parseInt(c,16)/255*100)/100)}else if(l=t.match(i)){for(u=0;u<a.length;u++)a[u]=parseInt(l[u+1]);s=parseFloat(l[4])}else if(l=t.match(r)){for(u=0;u<a.length;u++)a[u]=Math.round(2.55*parseFloat(l[u+1]));s=parseFloat(l[4])}else if(l=t.match(o)){if("transparent"==l[1])return[0,0,0,0];if(!(a=g[l[1]]))return}for(u=0;u<a.length;u++)a[u]=P(a[u],0,255);return s=s||0==s?P(s,0,1):1,a[3]=s,a}}function v(t){if(t){var e=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,n=t.match(e);if(n){var i=parseFloat(n[4]);return[P(parseInt(n[1]),0,360),P(parseFloat(n[2]),0,100),P(parseFloat(n[3]),0,100),P(isNaN(i)?1:i,0,1)]}}}function y(t){if(t){var e=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,n=t.match(e);if(n){var i=parseFloat(n[4]);return[P(parseInt(n[1]),0,360),P(parseFloat(n[2]),0,100),P(parseFloat(n[3]),0,100),P(isNaN(i)?1:i,0,1)]}}}function b(t){var e=m(t);return e&&e.slice(0,3)}function x(t){var e=v(t);return e&&e.slice(0,3)}function _(t){var e=m(t);return e?e[3]:(e=v(t))?e[3]:(e=y(t))?e[3]:void 0}function w(t,e){e=void 0!==e&&3===t.length?e:t[3];return"#"+M(t[0])+M(t[1])+M(t[2])+(0<=e&&e<1?M(Math.round(255*e)):"")}function S(t,e){return e<1||t[3]&&t[3]<1?C(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}function C(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function T(t,e){return e<1||t[3]&&t[3]<1?$(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"}function $(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function k(t,e){return e<1||t[3]&&t[3]<1?A(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}function A(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function O(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"}function D(t){return E[t.slice(0,3)]}function P(t,e,n){return Math.min(Math.max(e,t),n)}function M(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var E={};for(var I in g)E[g[I]]=I;var N=function(t){return t instanceof N?t:this instanceof N?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=n.getRgba(t))?this.setValues("rgb",e):(e=n.getHsla(t))?this.setValues("hsl",e):(e=n.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new N(t);var e};N.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return n.hexString(this.values.rgb)},rgbString:function(){return n.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return n.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return n.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return n.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return n.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return n.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return n.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var i=t[n]/255;e[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return n<e?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return 7.1<=e?"AAA":4.5<=e?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,i=t,r=void 0===e?.5:e,o=2*r-1,a=n.alpha()-i.alpha(),s=((o*a==-1?o:(o+a)/(1+o*a))+1)/2,l=1-s;return this.rgb(s*n.red()+l*i.red(),s*n.green()+l*i.green(),s*n.blue()+l*i.blue()).alpha(n.alpha()*r+i.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new N,i=this.values,r=n.values;for(var o in i)i.hasOwnProperty(o)&&(t=i[o],"[object Array]"===(e={}.toString.call(t))?r[o]=t.slice(0):"[object Number]"===e?r[o]=t:console.error("unexpected color value:",t));return n}},N.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},N.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},N.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i<t.length;i++)n[t.charAt(i)]=e[t][i];return 1!==e.alpha&&(n.a=e.alpha),n},N.prototype.setValues=function(t,e){var n,i,r=this.values,o=this.spaces,a=this.maxes,s=1;if(this.valid=!0,"alpha"===t)s=e;else if(e.length)r[t]=e.slice(0,t.length),s=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)r[t][n]=e[t.charAt(n)];s=e.a}else if(void 0!==e[o[t][0]]){var l=o[t];for(n=0;n<t.length;n++)r[t][n]=e[l[n]];s=e.alpha}if(r.alpha=Math.max(0,Math.min(1,void 0===s?r.alpha:s)),"alpha"===t)return!1;for(n=0;n<t.length;n++)i=Math.max(0,Math.min(a[t][n],r[t][n])),r[t][n]=Math.round(i);for(var c in o)c!==t&&(r[c]=p[t][c](r[t]));return!0},N.prototype.setSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},N.prototype.setChannel=function(t,e,n){var i=this.values[t];return void 0===n?i[e]:(n===i[e]||(i[e]=n,this.setValues(t,i)),this)},"undefined"!=typeof window&&(window.Color=N);var R=N;function L(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}var H,j={noop:function(){},uid:(H=0,function(){return H++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return j.valueOrDefault(j.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var r,o,a;if(j.isArray(t))if(o=t.length,i)for(r=o-1;0<=r;r--)e.call(n,t[r],r);else for(r=0;r<o;r++)e.call(n,t[r],r);else if(j.isObject(t))for(o=(a=Object.keys(t)).length,r=0;r<o;r++)e.call(n,t[a[r]],a[r])},arrayEquals:function(t,e){var n,i,r,o;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(r=t[n],o=e[n],r instanceof Array&&o instanceof Array){if(!j.arrayEquals(r,o))return!1}else if(r!==o)return!1;return!0},clone:function(t){if(j.isArray(t))return t.map(j.clone);if(j.isObject(t)){for(var e=Object.create(t),n=Object.keys(t),i=n.length,r=0;r<i;++r)e[n[r]]=j.clone(t[n[r]]);return e}return t},_merger:function(t,e,n,i){if(L(t)){var r=e[t],o=n[t];j.isObject(r)&&j.isObject(o)?j.merge(r,o,i):e[t]=j.clone(o)}},_mergerIf:function(t,e,n){if(L(t)){var i=e[t],r=n[t];j.isObject(i)&&j.isObject(r)?j.mergeIf(i,r):e.hasOwnProperty(t)||(e[t]=j.clone(r))}},merge:function(t,e,n){var i,r,o,a,s,l=j.isArray(e)?e:[e],c=l.length;if(!j.isObject(t))return t;for(i=(n=n||{}).merger||j._merger,r=0;r<c;++r)if(e=l[r],j.isObject(e))for(s=0,a=(o=Object.keys(e)).length;s<a;++s)i(o[s],t,e,n);return t},mergeIf:function(t,e){return j.merge(t,e,{merger:j._mergerIf})},extend:Object.assign||function(t){return j.merge(t,[].slice.call(arguments,1),{merger:function(t,e,n){e[t]=n[t]}})},inherits:function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=e.prototype,n.prototype=new i,n.extend=j.inherits,t&&j.extend(n.prototype,t),n.__super__=e.prototype,n},_deprecated:function(t,e,n,i){void 0!==e&&console.warn(t+': "'+n+'" is deprecated. Please use "'+i+'" instead')}},F=j;j.callCallback=j.callback,j.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},j.getValueOrDefault=j.valueOrDefault,j.getValueAtIndexOrDefault=j.valueAtIndexOrDefault;var z={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return 1<=t?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),e=i<1?(i=1,n/4):n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),e=i<1?(i=1,n/4):n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),e=i<1?(i=1,n/4):n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-z.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*z.easeInBounce(2*t):.5*z.easeOutBounce(2*t-1)+.5}},B={effects:z};F.easingEffects=z;var V=Math.PI,W=V/180,q=2*V,U=V/2,J=V/4,G=2*V/3,Y={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,r,o){if(o){var a=Math.min(o,r/2,i/2),s=e+a,l=n+a,c=e+i-a,u=n+r-a;t.moveTo(e,l),s<c&&l<u?(t.arc(s,l,a,-V,-U),t.arc(c,l,a,-U,0),t.arc(c,u,a,0,U),t.arc(s,u,a,U,V)):s<c?(t.moveTo(s,n),t.arc(c,l,a,-U,U),t.arc(s,l,a,U,V+U)):l<u?(t.arc(s,l,a,-V,0),t.arc(s,u,a,0,V)):t.arc(s,l,a,-V,V),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,r)},drawPoint:function(t,e,n,i,r,o){var a,s,l,c,u,h=(o||0)*W;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(a=e.toString())||"[object HTMLCanvasElement]"===a))return t.save(),t.translate(i,r),t.rotate(h),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(i,r,n,0,q),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(h)*n,r-Math.cos(h)*n),h+=G,t.lineTo(i+Math.sin(h)*n,r-Math.cos(h)*n),h+=G,t.lineTo(i+Math.sin(h)*n,r-Math.cos(h)*n),t.closePath();break;case"rectRounded":c=n-(u=.516*n),s=Math.cos(h+J)*c,l=Math.sin(h+J)*c,t.arc(i-s,r-l,u,h-V,h-U),t.arc(i+l,r-s,u,h-U,h),t.arc(i+s,r+l,u,h,h+U),t.arc(i-l,r+s,u,h+U,h+V),t.closePath();break;case"rect":if(!o){c=Math.SQRT1_2*n,t.rect(i-c,r-c,2*c,2*c);break}h+=J;case"rectRot":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,r-l),t.lineTo(i+l,r-s),t.lineTo(i+s,r+l),t.lineTo(i-l,r+s),t.closePath();break;case"crossRot":h+=J;case"cross":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l),t.moveTo(i+l,r-s),t.lineTo(i-l,r+s);break;case"star":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l),t.moveTo(i+l,r-s),t.lineTo(i-l,r+s),h+=J,s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l),t.moveTo(i+l,r-s),t.lineTo(i-l,r+s);break;case"line":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l);break;case"dash":t.moveTo(i,r),t.lineTo(i+Math.cos(h)*n,r+Math.sin(h)*n)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){var n=1e-6;return t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){var r=n.steppedLine;if(r){if("middle"===r){var o=(e.x+n.x)/2;t.lineTo(o,i?n.y:e.y),t.lineTo(o,i?e.y:n.y)}else"after"===r&&!i||"after"!==r&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}else n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},X=Y;F.clear=Y.clear,F.drawRoundedRectangle=function(t){t.beginPath(),Y.roundedRect.apply(Y,arguments)};var K={_set:function(t,e){return F.merge(this[t]||(this[t]={}),e)}};K._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var Q=K,Z=F.valueOrDefault;function tt(t){return!t||F.isNullOrUndef(t.size)||F.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}var et={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,i,r;return F.isObject(t)?(e=+t.top||0,n=+t.right||0,i=+t.bottom||0,r=+t.left||0):e=n=i=r=+t||0,{top:e,right:n,bottom:i,left:r,height:e+i,width:r+n}},_parseFont:function(t){var e=Q.global,n=Z(t.fontSize,e.defaultFontSize),i={family:Z(t.fontFamily,e.defaultFontFamily),lineHeight:F.options.toLineHeight(Z(t.lineHeight,e.defaultLineHeight),n),size:n,style:Z(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return i.string=tt(i),i},resolve:function(t,e,n,i){var r,o,a,s=!0;for(r=0,o=t.length;r<o;++r)if(void 0!==(a=t[r])&&(void 0!==e&&"function"==typeof a&&(a=a(e),s=!1),void 0!==n&&F.isArray(a)&&(a=a[n],s=!1),void 0!==a))return i&&!s&&(i.cacheable=!1),a}},nt={_factorize:function(t){var e,n=[],i=Math.sqrt(t);for(e=1;e<i;e++)t%e==0&&(n.push(e),n.push(t/e));return i===(0|i)&&n.push(i),n.sort(function(t,e){return t-e}).pop(),n},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e}},it=nt;F.log10=nt.log10;var rt=function(e,n){return{x:function(t){return e+e+n-t},setWidth:function(t){n=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}},ot=function(){return{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},at=F,st=B,lt=X,ct=et,ut=it,ht={getRtlAdapter:function(t,e,n){return t?rt(e,n):ot()},overrideTextDirection:function(t,e){var n,i;"ltr"!==e&&"rtl"!==e||(i=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};function dt(t,e,n,i){var r,o,a,s,l,c,u,h,d,f=Object.keys(n);for(r=0,o=f.length;r<o;++r)if(c=n[a=f[r]],e.hasOwnProperty(a)||(e[a]=c),(s=e[a])!==c&&"_"!==a[0]){if(t.hasOwnProperty(a)||(t[a]=s),(u=typeof c)===typeof(l=t[a]))if("string"===u){if((h=R(l)).valid&&(d=R(c)).valid){e[a]=d.mix(h,i).rgbString();continue}}else if(at.isFinite(l)&&at.isFinite(c)){e[a]=l+(c-l)*i;continue}e[a]=c}}at.easing=st,at.canvas=lt,at.options=ct,at.math=ut,at.rtl=ht;var ft=function(t){at.extend(this,t),this.initialize.apply(this,arguments)};at.extend(ft.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=at.extend({},t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,i=e._start,r=e._view;return n&&1!==t?(r||(r=e._view={}),i||(i=e._start={}),dt(i,r,n,t)):(e._view=at.extend({},n),e._start=null),e},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return at.isNumber(this._model.x)&&at.isNumber(this._model.y)}}),ft.extend=at.inherits;var pt=ft,gt=pt.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),mt=gt;Object.defineProperty(gt.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(gt.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),Q._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:at.noop,onComplete:at.noop}});var vt={animations:[],request:null,addAnimation:function(t,e,n,i){var r,o,a=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,i||(t.animating=!0),r=0,o=a.length;r<o;++r)if(a[r].chart===t)return void(a[r]=e);a.push(e),1===a.length&&this.requestAnimationFrame()},cancelAnimation:function(e){var t=at.findIndex(this.animations,function(t){return t.chart===e});-1!==t&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=at.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var t=this;t.advance(),0<t.animations.length&&t.requestAnimationFrame()},advance:function(){for(var t,e,n,i,r=this.animations,o=0;o<r.length;)e=(t=r[o]).chart,n=t.numSteps,i=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(i,n),at.callback(t.render,[e,t],e),at.callback(t.onAnimationProgress,[t],e),t.currentStep>=n?(at.callback(t.onAnimationComplete,[t],e),e.animating=!1,r.splice(o,1)):++o}},yt=at.options.resolve,bt=["push","pop","shift","splice","unshift"];function xt(r,t){r._chartjs?r._chartjs.listeners.push(t):(Object.defineProperty(r,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),bt.forEach(function(t){var n="onData"+t.charAt(0).toUpperCase()+t.slice(1),i=r[t];Object.defineProperty(r,t,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),t=i.apply(this,e);return at.each(r._chartjs.listeners,function(t){"function"==typeof t[n]&&t[n].apply(t,e)}),t}})}))}function _t(e,t){var n=e._chartjs;if(n){var i=n.listeners,r=i.indexOf(t);-1!==r&&i.splice(r,1),0<i.length||(bt.forEach(function(t){delete e[t]}),delete e._chartjs)}}var wt=function(t,e){this.initialize(t,e)};at.extend(wt.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.chart,i=n.scales,r=t.getDataset(),o=n.options.scales;null!==e.xAxisID&&e.xAxisID in i&&!r.xAxisID||(e.xAxisID=r.xAxisID||o.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in i&&!r.yAxisID||(e.yAxisID=r.yAxisID||o.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&_t(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,i=n.getMeta(),r=n.getDataset().data||[],o=i.data;for(t=0,e=r.length;t<e;++t)o[t]=o[t]||n.createMetaData(t);i.dataset=i.dataset||n.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t=this,e=t.getDataset(),n=e.data||(e.data=[]);t._data!==n&&(t._data&&_t(t._data,t),n&&Object.isExtensible(n)&&xt(n,t),t._data=n),t.resyncElements()},_configure:function(){var t=this;t._config=at.merge(Object.create(null),[t.chart.options.datasets[t._type],t.getDataset()],{merger:function(t,e,n){"_meta"!==t&&"data"!==t&&at._merger(t,e,n)}})},_update:function(t){var e=this;e._configure(),e._cachedDataOpts=null,e.update(t)},update:at.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],i=n.length,r=0;r<i;++r)n[r].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,i=0;for(t.dataset&&t.dataset.draw();i<n;++i)e[i].draw()},getStyle:function(t){var e,n=this,i=n.getMeta(),r=i.dataset;return n._configure(),!1!==(e=r&&void 0===t?n._resolveDatasetElementOptions(r||{}):(t=t||0,n._resolveDataElementOptions(i.data[t]||{},t))).fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var n,i,r,o,a=this,s=a.chart,l=a._config,c=t.custom||{},u=s.options.elements[a.datasetElementType.prototype._type]||{},h=a._datasetElementOptions,d={},f={chart:s,dataset:a.getDataset(),datasetIndex:a.index,hover:e};for(n=0,i=h.length;n<i;++n)r=h[n],o=e?"hover"+r.charAt(0).toUpperCase()+r.slice(1):r,d[r]=yt([c[o],l[o],u[o]],f);return d},_resolveDataElementOptions:function(t,e){var n=this,i=t&&t.custom,r=n._cachedDataOpts;if(r&&!i)return r;var o,a,s,l,c=n.chart,u=n._config,h=c.options.elements[n.dataElementType.prototype._type]||{},d=n._dataElementOptions,f={},p={chart:c,dataIndex:e,dataset:n.getDataset(),datasetIndex:n.index},g={cacheable:!i};if(i=i||{},at.isArray(d))for(a=0,s=d.length;a<s;++a)f[l=d[a]]=yt([i[l],u[l],h[l]],p,e,g);else for(a=0,s=(o=Object.keys(d)).length;a<s;++a)f[l=o[a]]=yt([i[l],u[d[l]],u[l],h[l]],p,e,g);return g.cacheable&&(n._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(t){at.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},r=t._model,o=at.getHoverColor;t.$previousStyle={backgroundColor:r.backgroundColor,borderColor:r.borderColor,borderWidth:r.borderWidth},r.backgroundColor=yt([i.hoverBackgroundColor,e.hoverBackgroundColor,o(r.backgroundColor)],void 0,n),r.borderColor=yt([i.hoverBorderColor,e.hoverBorderColor,o(r.borderColor)],void 0,n),r.borderWidth=yt([i.hoverBorderWidth,e.hoverBorderWidth,r.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,n,i,r,o,a=this.getMeta().dataset,s={};if(a){for(o=a._model,r=this._resolveDatasetElementOptions(a,!0),t=0,e=(i=Object.keys(r)).length;t<e;++t)s[n=i[t]]=o[n],o[n]=r[n];a.$previousStyle=s}},resyncElements:function(){var t=this,e=t.getMeta(),n=t.getDataset().data,i=e.data.length,r=n.length;r<i?e.data.splice(r,i-r):i<r&&t.insertElements(i,r-i)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),wt.extend=at.inherits;var St=wt,Ct=2*Math.PI;function Tt(t,e){var n=e.startAngle,i=e.endAngle,r=e.pixelMargin,o=r/e.outerRadius,a=e.x,s=e.y;t.beginPath(),t.arc(a,s,e.outerRadius,n-o,i+o),e.innerRadius>r?(o=r/e.innerRadius,t.arc(a,s,e.innerRadius-r,i+o,n-o,!0)):t.arc(a,s,r,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function $t(t,e,n,i){var r,o=n.endAngle;for(i&&(n.endAngle=n.startAngle+Ct,Tt(t,n),n.endAngle=o,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=Ct,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+Ct,n.startAngle,!0),r=0;r<n.fullCircles;++r)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+Ct),r=0;r<n.fullCircles;++r)t.stroke()}function kt(t,e,n){var i="inner"===e.borderAlign;t.lineJoin=i?(t.lineWidth=2*e.borderWidth,"round"):(t.lineWidth=e.borderWidth,"bevel"),n.fullCircles&&$t(t,e,n,i),i&&Tt(t,n),t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.endAngle),t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),t.closePath(),t.stroke()}Q._set("global",{elements:{arc:{backgroundColor:Q.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var At=pt.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var n=this._view;if(n){for(var i=at.getAngleFromPoint(n,{x:t,y:e}),r=i.angle,o=i.distance,a=n.startAngle,s=n.endAngle;s<a;)s+=Ct;for(;s<r;)r-=Ct;for(;r<a;)r+=Ct;var l=a<=r&&r<=s,c=o>=n.innerRadius&&o<=n.outerRadius;return l&&c}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,i="inner"===n.borderAlign?.33:0,r={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/Ct)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,r.fullCircles){for(r.endAngle=r.startAngle+Ct,e.beginPath(),e.arc(r.x,r.y,r.outerRadius,r.startAngle,r.endAngle),e.arc(r.x,r.y,r.innerRadius,r.endAngle,r.startAngle,!0),e.closePath(),t=0;t<r.fullCircles;++t)e.fill();r.endAngle=r.startAngle+n.circumference%Ct}e.beginPath(),e.arc(r.x,r.y,r.outerRadius,r.startAngle,r.endAngle),e.arc(r.x,r.y,r.innerRadius,r.endAngle,r.startAngle,!0),e.closePath(),e.fill(),n.borderWidth&&kt(e,n,r),e.restore()}}),Ot=at.valueOrDefault,Dt=Q.global.defaultColor;Q._set("global",{elements:{line:{tension:.4,backgroundColor:Dt,borderWidth:3,borderColor:Dt,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var Pt=pt.extend({_type:"line",draw:function(){var t,e,n,i=this,r=i._view,o=i._chart.ctx,a=r.spanGaps,s=i._children.slice(),l=Q.global,c=l.elements.line,u=-1,h=i._loop;if(s.length){if(i._loop){for(t=0;t<s.length;++t)if(e=at.previousItem(s,t),!s[t]._view.skip&&e._view.skip){s=s.slice(t).concat(s.slice(0,t)),h=a;break}h&&s.push(s[0])}for(o.save(),o.lineCap=r.borderCapStyle||c.borderCapStyle,o.setLineDash&&o.setLineDash(r.borderDash||c.borderDash),o.lineDashOffset=Ot(r.borderDashOffset,c.borderDashOffset),o.lineJoin=r.borderJoinStyle||c.borderJoinStyle,o.lineWidth=Ot(r.borderWidth,c.borderWidth),o.strokeStyle=r.borderColor||l.defaultColor,o.beginPath(),(n=s[0]._view).skip||(o.moveTo(n.x,n.y),u=0),t=1;t<s.length;++t)n=s[t]._view,e=-1===u?at.previousItem(s,t):s[u],n.skip||(u!==t-1&&!a||-1===u?o.moveTo(n.x,n.y):at.canvas.lineTo(o,e._view,n),u=t);h&&o.closePath(),o.stroke(),o.restore()}}}),Mt=at.valueOrDefault,Et=Q.global.defaultColor;function It(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}function Nt(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius}Q._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:Et,borderColor:Et,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var Rt=pt.extend({_type:"point",inRange:function(t,e){var n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:It,inXRange:It,inYRange:Nt,getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._chart.ctx,i=e.pointStyle,r=e.rotation,o=e.radius,a=e.x,s=e.y,l=Q.global,c=l.defaultColor;e.skip||(void 0===t||at.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||c,n.lineWidth=Mt(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||c,at.canvas.drawPoint(n,i,o,a,s,r))}}),Lt=Q.global.defaultColor;function Ht(t){return t&&void 0!==t.width}function jt(t){var e,n,i,r,o;return r=Ht(t)?(o=t.width/2,e=t.x-o,n=t.x+o,i=Math.min(t.y,t.base),Math.max(t.y,t.base)):(o=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),i=t.y-o,t.y+o),{left:e,top:i,right:n,bottom:r}}function Ft(t,e,n){return t===e?n:t===n?e:t}function zt(t){var e=t.borderSkipped,n={};return e&&(t.horizontal?t.base>t.x&&(e=Ft(e,"left","right")):t.base<t.y&&(e=Ft(e,"bottom","top")),n[e]=!0),n}function Bt(t,e,n){var i,r,o,a,s=t.borderWidth,l=zt(t);return at.isObject(s)?(i=+s.top||0,r=+s.right||0,o=+s.bottom||0,a=+s.left||0):i=r=o=a=+s||0,{t:l.top||i<0?0:n<i?n:i,r:l.right||r<0?0:e<r?e:r,b:l.bottom||o<0?0:n<o?n:o,l:l.left||a<0?0:e<a?e:a}}function Vt(t){var e=jt(t),n=e.right-e.left,i=e.bottom-e.top,r=Bt(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+r.l,y:e.top+r.t,w:n-r.l-r.r,h:i-r.t-r.b}}}function Wt(t,e,n){var i=null===e,r=null===n,o=!(!t||i&&r)&&jt(t);return o&&(i||e>=o.left&&e<=o.right)&&(r||n>=o.top&&n<=o.bottom)}Q._set("global",{elements:{rectangle:{backgroundColor:Lt,borderColor:Lt,borderSkipped:"bottom",borderWidth:0}}});var qt=pt.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=Vt(e),i=n.outer,r=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===r.w&&i.h===r.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(r.x,r.y,r.w,r.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return Wt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return Ht(n)?Wt(n,t,null):Wt(n,null,e)},inXRange:function(t){return Wt(this._view,t,null)},inYRange:function(t){return Wt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return e=Ht(n)?(t=n.x,(n.y+n.base)/2):(t=(n.x+n.base)/2,n.y),{x:t,y:e}},getArea:function(){var t=this._view;return Ht(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),Ut={},Jt=At,Gt=Pt,Yt=Rt,Xt=qt;Ut.Arc=Jt,Ut.Line=Gt,Ut.Point=Yt,Ut.Rectangle=Xt;var Kt=at._deprecated,Qt=at.valueOrDefault;function Zt(t,e){var n,i,r,o,a=t._length;for(r=1,o=e.length;r<o;++r)a=Math.min(a,Math.abs(e[r]-e[r-1]));for(r=0,o=t.getTicks().length;r<o;++r)i=t.getPixelForTick(r),a=0<r?Math.min(a,Math.abs(i-n)):a,n=i;return a}function te(t,e,n){var i,r,o=n.barThickness,a=e.stackCount,s=e.pixels[t],l=at.isNullOrUndef(o)?Zt(e.scale,e.pixels):-1;return r=at.isNullOrUndef(o)?(i=l*n.categoryPercentage,n.barPercentage):(i=o*a,1),{chunk:i/a,ratio:r,start:s-i/2}}function ee(t,e,n){var i,r=e.pixels,o=r[t],a=0<t?r[t-1]:null,s=t<r.length-1?r[t+1]:null,l=n.categoryPercentage;return null===a&&(a=o-(null===s?e.end-e.start:s-o)),null===s&&(s=o+o-a),i=o-(o-Math.min(a,s))/2*l,{chunk:Math.abs(s-a)/2*l/e.stackCount,ratio:n.barPercentage,start:i}}Q._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),Q._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var ne=St.extend({dataElementType:Ut.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;St.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,Kt("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Kt("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Kt("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Kt("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Kt("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,i=this,r=i.getMeta().data;for(i._ruler=i.getRuler(),e=0,n=r.length;e<n;++e)i.updateElement(r[e],e,t)},updateElement:function(t,e,n){var i=this,r=i.getMeta(),o=i.getDataset(),a=i._resolveDataElementOptions(t,e);t._xScale=i.getScaleForId(r.xAxisID),t._yScale=i.getScaleForId(r.yAxisID),t._datasetIndex=i.index,t._index=e,t._model={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderSkipped:a.borderSkipped,borderWidth:a.borderWidth,datasetLabel:o.label,label:i.chart.data.labels[e]},at.isArray(o.data[e])&&(t._model.borderSkipped=null),i._updateElementGeometry(t,e,n,a),t.pivot()},_updateElementGeometry:function(t,e,n,i){var r=this,o=t._model,a=r._getValueScale(),s=a.getBasePixel(),l=a.isHorizontal(),c=r._ruler||r.getRuler(),u=r.calculateBarValuePixels(r.index,e,i),h=r.calculateBarIndexPixels(r.index,e,c,i);o.horizontal=l,o.base=n?s:u.base,o.x=l?n?s:u.head:h.center,o.y=l?h.center:n?s:u.head,o.height=l?h.size:void 0,o.width=l?void 0:h.size},_getStacks:function(t){var e,n,i=this,r=i._getIndexScale(),o=r._getMatchingVisibleMetas(i._type),a=r.options.stacked,s=o.length,l=[];for(e=0;e<s&&(n=o[e],(!1===a||-1===l.indexOf(n.stack)||void 0===a&&void 0===n.stack)&&l.push(n.stack),n.index!==t);++e);return l},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),i=void 0!==e?n.indexOf(e):-1;return-1===i?n.length-1:i},getRuler:function(){var t,e,n=this,i=n._getIndexScale(),r=[];for(t=0,e=n.getMeta().data.length;t<e;++t)r.push(i.getPixelForValue(null,t,n.index));return{pixels:r,start:i._startPixel,end:i._endPixel,stackCount:n.getStackCount(),scale:i}},calculateBarValuePixels:function(t,e,n){var i,r,o,a,s,l,c,u=this,h=u.chart,d=u._getValueScale(),f=d.isHorizontal(),p=h.data.datasets,g=d._getMatchingVisibleMetas(u._type),m=d._parseValue(p[t].data[e]),v=n.minBarLength,y=d.options.stacked,b=u.getMeta().stack,x=void 0===m.start?0:0<=m.max&&0<=m.min?m.min:m.max,_=void 0===m.start?m.end:0<=m.max&&0<=m.min?m.max-m.min:m.min-m.max,w=g.length;if(y||void 0===y&&void 0!==b)for(i=0;i<w&&(r=g[i]).index!==t;++i)r.stack===b&&(o=void 0===(c=d._parseValue(p[r.index].data[e])).start?c.end:0<=c.min&&0<=c.max?c.max:c.min,(m.min<0&&o<0||0<=m.max&&0<o)&&(x+=o));return a=d.getPixelForValue(x),l=(s=d.getPixelForValue(x+_))-a,void 0!==v&&Math.abs(l)<v&&(l=v,s=0<=_&&!f||_<0&&f?a-v:a+v),{size:l,base:a,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,i){var r=this,o="flex"===i.barThickness?ee(e,n,i):te(e,n,i),a=r.getStackIndex(t,r.getMeta().stack),s=o.start+o.chunk*a+o.chunk/2,l=Math.min(Qt(i.maxBarThickness,1/0),o.chunk*o.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}},draw:function(){var t=this,e=t.chart,n=t._getValueScale(),i=t.getMeta().data,r=t.getDataset(),o=i.length,a=0;for(at.canvas.clipArea(e.ctx,e.chartArea);a<o;++a){var s=n._parseValue(r.data[a]);isNaN(s.min)||isNaN(s.max)||i[a].draw()}at.canvas.unclipArea(e.ctx)},_resolveDataElementOptions:function(){var t=this,e=at.extend({},St.prototype._resolveDataElementOptions.apply(t,arguments)),n=t._getIndexScale().options,i=t._getValueScale().options;return e.barPercentage=Qt(n.barPercentage,e.barPercentage),e.barThickness=Qt(n.barThickness,e.barThickness),e.categoryPercentage=Qt(n.categoryPercentage,e.categoryPercentage),e.maxBarThickness=Qt(n.maxBarThickness,e.maxBarThickness),e.minBarLength=Qt(i.minBarLength,e.minBarLength),e}}),ie=at.valueOrDefault,re=at.options.resolve;Q._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.datasets[t.datasetIndex].label||"",i=e.datasets[t.datasetIndex].data[t.index];return n+": ("+t.xLabel+", "+t.yLabel+", "+i.r+")"}}}});var oe=St.extend({dataElementType:Ut.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(n){var i=this,t=i.getMeta().data;at.each(t,function(t,e){i.updateElement(t,e,n)})},updateElement:function(t,e,n){var i=this,r=i.getMeta(),o=t.custom||{},a=i.getScaleForId(r.xAxisID),s=i.getScaleForId(r.yAxisID),l=i._resolveDataElementOptions(t,e),c=i.getDataset().data[e],u=i.index,h=n?a.getPixelForDecimal(.5):a.getPixelForValue("object"==typeof c?c:NaN,e,u),d=n?s.getBasePixel():s.getPixelForValue(c,e,u);t._xScale=a,t._yScale=s,t._options=l,t._datasetIndex=u,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:o.skip||isNaN(h)||isNaN(d),x:h,y:d},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,i=at.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=ie(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=ie(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=ie(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,i=n.chart,r=n.getDataset(),o=t.custom||{},a=r.data[e]||{},s=St.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:i,dataIndex:e,dataset:r,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=at.extend({},s)),s.radius=re([o.radius,a.r,n._config.radius,i.options.elements.point.radius],l,e),s}}),ae=at.valueOrDefault,se=Math.PI,le=2*se,ce=se/2;Q._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,n,i,r=document.createElement("ul"),o=t.data,a=o.datasets,s=o.labels;if(r.setAttribute("class",t.id+"-legend"),a.length)for(n=a[e=0].data.length;e<n;++e)(i=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return r.outerHTML},legend:{labels:{generateLabels:function(r){var o=r.data;return o.labels.length&&o.datasets.length?o.labels.map(function(t,e){var n=r.getDatasetMeta(0),i=n.controller.getStyle(e);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(o.datasets[0].data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var n,i,r,o=e.index,a=this.chart;for(n=0,i=(a.data.datasets||[]).length;n<i;++n)(r=a.getDatasetMeta(n)).data[o]&&(r.data[o].hidden=!r.data[o].hidden);a.update()}},cutoutPercentage:50,rotation:-ce,circumference:le,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],i=": "+e.datasets[t.datasetIndex].data[t.index];return at.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}});var ue=St.extend({dataElementType:Ut.Arc,linkScales:at.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e,n,i,r,o=this,a=o.chart,s=a.chartArea,l=a.options,c=1,u=1,h=0,d=0,f=o.getMeta(),p=f.data,g=l.cutoutPercentage/100||0,m=l.circumference,v=o._getRingWeight(o.index);if(m<le){var y=l.rotation%le,b=(y+=se<=y?-le:y<-se?le:0)+m,x=Math.cos(y),_=Math.sin(y),w=Math.cos(b),S=Math.sin(b),C=y<=0&&0<=b||le<=b,T=y<=ce&&ce<=b||le+ce<=b,$=y<=-ce&&-ce<=b||se+ce<=b,k=y===-se||se<=b?-1:Math.min(x,x*g,w,w*g),A=$?-1:Math.min(_,_*g,S,S*g),O=C?1:Math.max(x,x*g,w,w*g),D=T?1:Math.max(_,_*g,S,S*g);c=(O-k)/2,u=(D-A)/2,h=-(O+k)/2,d=-(D+A)/2}for(i=0,r=p.length;i<r;++i)p[i]._options=o._resolveDataElementOptions(p[i],i);for(a.borderWidth=o.getMaxBorderWidth(),e=(s.right-s.left-a.borderWidth)/c,n=(s.bottom-s.top-a.borderWidth)/u,a.outerRadius=Math.max(Math.min(e,n)/2,0),a.innerRadius=Math.max(a.outerRadius*g,0),a.radiusLength=(a.outerRadius-a.innerRadius)/(o._getVisibleDatasetWeightTotal()||1),a.offsetX=h*a.outerRadius,a.offsetY=d*a.outerRadius,f.total=o.calculateTotal(),o.outerRadius=a.outerRadius-a.radiusLength*o._getRingWeightOffset(o.index),o.innerRadius=Math.max(o.outerRadius-a.radiusLength*v,0),i=0,r=p.length;i<r;++i)o.updateElement(p[i],i,t)},updateElement:function(t,e,n){var i=this,r=i.chart,o=r.chartArea,a=r.options,s=a.animation,l=(o.left+o.right)/2,c=(o.top+o.bottom)/2,u=a.rotation,h=a.rotation,d=i.getDataset(),f=n&&s.animateRotate?0:t.hidden?0:i.calculateCircumference(d.data[e])*(a.circumference/le),p=n&&s.animateScale?0:i.innerRadius,g=n&&s.animateScale?0:i.outerRadius,m=t._options||{};at.extend(t,{_datasetIndex:i.index,_index:e,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:l+r.offsetX,y:c+r.offsetY,startAngle:u,endAngle:h,circumference:f,outerRadius:g,innerRadius:p,label:at.valueAtIndexOrDefault(d.label,e,r.data.labels[e])}});var v=t._model;n&&s.animateRotate||(v.startAngle=0===e?a.rotation:i.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var n,i=this.getDataset(),t=this.getMeta(),r=0;return at.each(t.data,function(t,e){n=i.data[e],isNaN(n)||t.hidden||(r+=Math.abs(n))}),r},calculateCircumference:function(t){var e=this.getMeta().total;return 0<e&&!isNaN(t)?le*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,r,o,a,s,l,c=this,u=0,h=c.chart;if(!t)for(e=0,n=h.data.datasets.length;e<n;++e)if(h.isDatasetVisible(e)){t=(i=h.getDatasetMeta(e)).data,e!==c.index&&(o=i.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)r=t[e],"inner"!==(a=o?(o._configure(),o._resolveDataElementOptions(r,e)):r._options).borderAlign&&(u=(u=u<(s=a.borderWidth)?s:u)<(l=a.hoverBorderWidth)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=at.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=ae(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=ae(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=ae(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max(ae(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});Q._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),Q._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var he=ne.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),de=at.valueOrDefault,fe=at.options.resolve,pe=at.canvas._isPointInArea;function ge(t,e){var n=t&&t.options.ticks||{},i=n.reverse,r=void 0===n.min?e:0,o=void 0===n.max?e:0;return{start:i?o:r,end:i?r:o}}function me(t,e,n){var i=n/2,r=ge(t,i),o=ge(e,i);return{top:o.end,right:r.end,bottom:o.start,left:r.start}}function ve(t){var e,n,i,r;return at.isObject(t)?(e=t.top,n=t.right,i=t.bottom,r=t.left):e=n=i=r=t,{top:e,right:n,bottom:i,left:r}}Q._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var ye=St.extend({datasetElementType:Ut.Line,dataElementType:Ut.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e,n,i=this,r=i.getMeta(),o=r.dataset,a=r.data||[],s=i.chart.options,l=i._config,c=i._showLine=de(l.showLine,s.showLines);for(i._xScale=i.getScaleForId(r.xAxisID),i._yScale=i.getScaleForId(r.yAxisID),c&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o._scale=i._yScale,o._datasetIndex=i.index,o._children=a,o._model=i._resolveDatasetElementOptions(o),o.pivot()),e=0,n=a.length;e<n;++e)i.updateElement(a[e],e,t);for(c&&0!==o._model.tension&&i.updateBezierControlPoints(),e=0,n=a.length;e<n;++e)a[e].pivot()},updateElement:function(t,e,n){var i,r,o=this,a=o.getMeta(),s=t.custom||{},l=o.getDataset(),c=o.index,u=l.data[e],h=o._xScale,d=o._yScale,f=a.dataset._model,p=o._resolveDataElementOptions(t,e);i=h.getPixelForValue("object"==typeof u?u:NaN,e,c),r=n?d.getBasePixel():o.calculatePointY(u,e,c),t._xScale=h,t._yScale=d,t._options=p,t._datasetIndex=c,t._index=e,t._model={x:i,y:r,skip:s.skip||isNaN(i)||isNaN(r),radius:p.radius,pointStyle:p.pointStyle,rotation:p.rotation,backgroundColor:p.backgroundColor,borderColor:p.borderColor,borderWidth:p.borderWidth,tension:de(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:p.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this,n=e._config,i=t.custom||{},r=e.chart.options,o=r.elements.line,a=St.prototype._resolveDatasetElementOptions.apply(e,arguments);return a.spanGaps=de(n.spanGaps,r.spanGaps),a.tension=de(n.lineTension,o.tension),a.steppedLine=fe([i.steppedLine,n.steppedLine,o.stepped]),a.clip=ve(de(n.clip,me(e._xScale,e._yScale,a.borderWidth))),a},calculatePointY:function(t,e,n){var i,r,o,a,s,l,c,u=this,h=u.chart,d=u._yScale,f=0,p=0;if(d.options.stacked){for(s=+d.getRightValue(t),c=(l=h._getSortedVisibleDatasetMetas()).length,i=0;i<c&&(o=l[i]).index!==n;++i)r=h.data.datasets[o.index],"line"===o.type&&o.yAxisID===d.id&&((a=+d.getRightValue(r.data[e]))<0?p+=a||0:f+=a||0);return s<0?d.getPixelForValue(p+s):d.getPixelForValue(f+s)}return d.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,i,r=this,o=r.chart,a=r.getMeta(),s=a.dataset._model,l=o.chartArea,c=a.data||[];function u(t,e,n){return Math.max(Math.min(t,n),e)}if(s.spanGaps&&(c=c.filter(function(t){return!t._model.skip})),"monotone"===s.cubicInterpolationMode)at.splineCurveMonotone(c);else for(t=0,e=c.length;t<e;++t)n=c[t]._model,i=at.splineCurve(at.previousItem(c,t)._model,n,at.nextItem(c,t)._model,s.tension),n.controlPointPreviousX=i.previous.x,n.controlPointPreviousY=i.previous.y,n.controlPointNextX=i.next.x,n.controlPointNextY=i.next.y;if(o.options.elements.line.capBezierPoints)for(t=0,e=c.length;t<e;++t)n=c[t]._model,pe(n,l)&&(0<t&&pe(c[t-1]._model,l)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,l.left,l.right),n.controlPointPreviousY=u(n.controlPointPreviousY,l.top,l.bottom)),t<c.length-1&&pe(c[t+1]._model,l)&&(n.controlPointNextX=u(n.controlPointNextX,l.left,l.right),n.controlPointNextY=u(n.controlPointNextY,l.top,l.bottom)))},draw:function(){var t,e=this,n=e.chart,i=e.getMeta(),r=i.data||[],o=n.chartArea,a=n.canvas,s=0,l=r.length;for(e._showLine&&(t=i.dataset._model.clip,at.canvas.clipArea(n.ctx,{left:!1===t.left?0:o.left-t.left,right:!1===t.right?a.width:o.right+t.right,top:!1===t.top?0:o.top-t.top,bottom:!1===t.bottom?a.height:o.bottom+t.bottom}),i.dataset.draw(),at.canvas.unclipArea(n.ctx));s<l;++s)r[s].draw(o)},setHoverStyle:function(t){var e=t._model,n=t._options,i=at.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=de(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=de(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=de(n.hoverBorderWidth,n.borderWidth),e.radius=de(n.hoverRadius,n.radius)}}),be=at.options.resolve;Q._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e,n,i,r=document.createElement("ul"),o=t.data,a=o.datasets,s=o.labels;if(r.setAttribute("class",t.id+"-legend"),a.length)for(n=a[e=0].data.length;e<n;++e)(i=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return r.outerHTML},legend:{labels:{generateLabels:function(r){var o=r.data;return o.labels.length&&o.datasets.length?o.labels.map(function(t,e){var n=r.getDatasetMeta(0),i=n.controller.getStyle(e);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(o.datasets[0].data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var n,i,r,o=e.index,a=this.chart;for(n=0,i=(a.data.datasets||[]).length;n<i;++n)(r=a.getDatasetMeta(n)).data[o].hidden=!r.data[o].hidden;a.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var xe=St.extend({dataElementType:Ut.Arc,linkScales:at.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i,r=this,o=r.getDataset(),a=r.getMeta(),s=r.chart.options.startAngle||0,l=r._starts=[],c=r._angles=[],u=a.data;for(r._updateRadius(),a.count=r.countVisibleElements(),e=0,n=o.data.length;e<n;e++)l[e]=s,i=r._computeAngle(e),s+=c[e]=i;for(e=0,n=u.length;e<n;++e)u[e]._options=r._resolveDataElementOptions(u[e],e),r.updateElement(u[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,i=e.options,r=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(r/2,0),e.innerRadius=Math.max(i.cutoutPercentage?e.outerRadius/100*i.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,n){var i=this,r=i.chart,o=i.getDataset(),a=r.options,s=a.animation,l=r.scale,c=r.data.labels,u=l.xCenter,h=l.yCenter,d=a.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(o.data[e]),p=i._starts[e],g=p+(t.hidden?0:i._angles[e]),m=s.animateScale?0:l.getDistanceFromCenterForValue(o.data[e]),v=t._options||{};at.extend(t,{_datasetIndex:i.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:u,y:h,innerRadius:0,outerRadius:n?m:f,startAngle:n&&s.animateRotate?d:p,endAngle:n&&s.animateRotate?d:g,label:at.valueAtIndexOrDefault(c,e,c[e])}}),t.pivot()},countVisibleElements:function(){var n=this.getDataset(),t=this.getMeta(),i=0;return at.each(t.data,function(t,e){isNaN(n.data[e])||t.hidden||i++}),i},setHoverStyle:function(t){var e=t._model,n=t._options,i=at.getHoverColor,r=at.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=r(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=r(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=r(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,i=e.getDataset(),r=e.getMeta();if(isNaN(i.data[t])||r.data[t].hidden)return 0;var o={chart:e.chart,dataIndex:t,dataset:i,datasetIndex:e.index};return be([e.chart.options.elements.arc.angle,2*Math.PI/n],o,t)}});Q._set("pie",at.clone(Q.doughnut)),Q._set("pie",{cutoutPercentage:0});var _e=ue,we=at.valueOrDefault;Q._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Se=St.extend({datasetElementType:Ut.Line,dataElementType:Ut.Point,linkScales:at.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i=this,r=i.getMeta(),o=r.dataset,a=r.data||[],s=i.chart.scale,l=i._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o._scale=s,o._datasetIndex=i.index,o._children=a,o._loop=!0,o._model=i._resolveDatasetElementOptions(o),o.pivot(),e=0,n=a.length;e<n;++e)i.updateElement(a[e],e,t);for(i.updateBezierControlPoints(),e=0,n=a.length;e<n;++e)a[e].pivot()},updateElement:function(t,e,n){var i=this,r=t.custom||{},o=i.getDataset(),a=i.chart.scale,s=a.getPointPositionForValue(e,o.data[e]),l=i._resolveDataElementOptions(t,e),c=i.getMeta().dataset._model,u=n?a.xCenter:s.x,h=n?a.yCenter:s.y;t._scale=a,t._options=l,t._datasetIndex=i.index,t._index=e,t._model={x:u,y:h,skip:r.skip||isNaN(u)||isNaN(h),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:we(r.tension,c?c.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this,e=t._config,n=t.chart.options,i=St.prototype._resolveDatasetElementOptions.apply(t,arguments);return i.spanGaps=we(e.spanGaps,n.spanGaps),i.tension=we(e.lineTension,n.elements.line.tension),i},updateBezierControlPoints:function(){var t,e,n,i,r=this,o=r.getMeta(),a=r.chart.chartArea,s=o.data||[];function l(t,e,n){return Math.max(Math.min(t,n),e)}for(o.dataset._model.spanGaps&&(s=s.filter(function(t){return!t._model.skip})),t=0,e=s.length;t<e;++t)n=s[t]._model,i=at.splineCurve(at.previousItem(s,t,!0)._model,n,at.nextItem(s,t,!0)._model,n.tension),n.controlPointPreviousX=l(i.previous.x,a.left,a.right),n.controlPointPreviousY=l(i.previous.y,a.top,a.bottom),n.controlPointNextX=l(i.next.x,a.left,a.right),n.controlPointNextY=l(i.next.y,a.top,a.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,i=at.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=we(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=we(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=we(n.hoverBorderWidth,n.borderWidth),e.radius=we(n.hoverRadius,n.radius)}});Q._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),Q._set("global",{datasets:{scatter:{showLine:!1}}});var Ce={bar:ne,bubble:oe,doughnut:ue,horizontalBar:he,line:ye,polarArea:xe,pie:_e,radar:Se,scatter:ye};function Te(t,e){return t.native?{x:t.x,y:t.y}:at.getRelativePosition(t,e)}function $e(t,e){var n,i,r,o,a,s,l=t._getSortedVisibleDatasetMetas();for(i=0,o=l.length;i<o;++i)for(r=0,a=(n=l[i].data).length;r<a;++r)(s=n[r])._view.skip||e(s)}function ke(t,e){var n=[];return $e(t,function(t){t.inRange(e.x,e.y)&&n.push(t)}),n}function Ae(t,i,r,o){var a=Number.POSITIVE_INFINITY,s=[];return $e(t,function(t){if(!r||t.inRange(i.x,i.y)){var e=t.getCenterPoint(),n=o(i,e);n<a?(s=[t],a=n):n===a&&s.push(t)}}),s}function Oe(t){var r=-1!==t.indexOf("x"),o=-1!==t.indexOf("y");return function(t,e){var n=r?Math.abs(t.x-e.x):0,i=o?Math.abs(t.y-e.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(i,2))}}function De(t,e,n){var i=Te(e,t);n.axis=n.axis||"x";var r=Oe(n.axis),o=n.intersect?ke(t,i):Ae(t,i,!1,r),a=[];return o.length?(t._getSortedVisibleDatasetMetas().forEach(function(t){var e=t.data[o[0]._index];e&&!e._view.skip&&a.push(e)}),a):[]}var Pe={modes:{single:function(t,e){var n=Te(e,t),i=[];return $e(t,function(t){if(t.inRange(n.x,n.y))return i.push(t),i}),i.slice(0,1)},label:De,index:De,dataset:function(t,e,n){var i=Te(e,t);n.axis=n.axis||"xy";var r=Oe(n.axis),o=n.intersect?ke(t,i):Ae(t,i,!1,r);return 0<o.length&&(o=t.getDatasetMeta(o[0]._datasetIndex).data),o},"x-axis":function(t,e){return De(t,e,{intersect:!1})},point:function(t,e){return ke(t,Te(e,t))},nearest:function(t,e,n){var i=Te(e,t);n.axis=n.axis||"xy";var r=Oe(n.axis);return Ae(t,i,n.intersect,r)},x:function(t,e,n){var i=Te(e,t),r=[],o=!1;return $e(t,function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(o=!0)}),n.intersect&&!o&&(r=[]),r},y:function(t,e,n){var i=Te(e,t),r=[],o=!1;return $e(t,function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(o=!0)}),n.intersect&&!o&&(r=[]),r}}},Me=at.extend;function Ee(t,e){return at.where(t,function(t){return t.pos===e})}function Ie(t,r){return t.sort(function(t,e){var n=r?e:t,i=r?t:e;return n.weight===i.weight?n.index-i.index:n.weight-i.weight})}function Ne(t){var e,n,i,r=[];for(e=0,n=(t||[]).length;e<n;++e)i=t[e],r.push({index:e,box:i,pos:i.position,horizontal:i.isHorizontal(),weight:i.weight});return r}function Re(t,e){var n,i,r;for(n=0,i=t.length;n<i;++n)(r=t[n]).width=r.horizontal?r.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,r.height=r.horizontal&&e.hBoxMaxHeight}function Le(t){var e=Ne(t),n=Ie(Ee(e,"left"),!0),i=Ie(Ee(e,"right")),r=Ie(Ee(e,"top"),!0),o=Ie(Ee(e,"bottom"));return{leftAndTop:n.concat(r),rightAndBottom:i.concat(o),chartArea:Ee(e,"chartArea"),vertical:n.concat(i),horizontal:r.concat(o)}}function He(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function je(t,e,n){var i,r,o=n.box,a=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?o.height:o.width,t[n.pos]+=n.size,o.getPadding){var s=o.getPadding();a.top=Math.max(a.top,s.top),a.left=Math.max(a.left,s.left),a.bottom=Math.max(a.bottom,s.bottom),a.right=Math.max(a.right,s.right)}if(i=e.outerWidth-He(a,t,"left","right"),r=e.outerHeight-He(a,t,"top","bottom"),i!==t.w||r!==t.h){t.w=i,t.h=r;var l=n.horizontal?[i,t.w]:[r,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function Fe(n){var i=n.maxPadding;function t(t){var e=Math.max(i[t]-n[t],0);return n[t]+=e,e}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}function ze(t,n){var i=n.maxPadding;function e(t){var e={left:0,top:0,right:0,bottom:0};return t.forEach(function(t){e[t]=Math.max(n[t],i[t])}),e}return e(t?["left","right"]:["top","bottom"])}function Be(t,e,n){var i,r,o,a,s,l,c=[];for(i=0,r=t.length;i<r;++i)(a=(o=t[i]).box).update(o.width||e.w,o.height||e.h,ze(o.horizontal,e)),je(e,n,o)&&(l=!0,c.length&&(s=!0)),a.fullWidth||c.push(o);return s&&Be(c,e,n)||l}function Ve(t,e,n){var i,r,o,a,s=n.padding,l=e.x,c=e.y;for(i=0,r=t.length;i<r;++i)a=(o=t[i]).box,o.horizontal?(a.left=a.fullWidth?s.left:e.left,a.right=a.fullWidth?n.outerWidth-s.right:e.left+e.w,a.top=c,a.bottom=c+a.height,a.width=a.right-a.left,c=a.bottom):(a.left=l,a.right=l+a.width,a.top=e.top,a.bottom=e.top+e.h,a.height=a.bottom-a.top,l=a.right);e.x=l,e.y=c}Q._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var We={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,r=["fullWidth","position","weight"],o=r.length,a=0;a<o;++a)i=r[a],n.hasOwnProperty(i)&&(e[i]=n[i])},update:function(n,t,e){if(n){var i=n.options.layout||{},r=at.options.toPadding(i.padding),o=t-r.width,a=e-r.height,s=Le(n.boxes),l=s.vertical,c=s.horizontal,u=Object.freeze({outerWidth:t,outerHeight:e,padding:r,availableWidth:o,vBoxMaxWidth:o/2/l.length,hBoxMaxHeight:a/2}),h=Me({maxPadding:Me({},r),w:o,h:a,x:r.left,y:r.top},r);Re(l.concat(c),u),Be(l,h,u),Be(c,h,u)&&Be(l,h,u),Fe(h),Ve(s.leftAndTop,h,u),h.x+=h.w,h.y+=h.h,Ve(s.rightAndBottom,h,u),n.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h},at.each(s.chartArea,function(t){var e=t.box;Me(e,n.chartArea),e.update(h.w,h.h)})}}},qe={acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},Ue="/*\n * DOM element rendering detection\n * https://davidwalsh.name/detect-node-insertion\n */\n@keyframes chartjs-render-animation {\n\tfrom { opacity: 0.99; }\n\tto { opacity: 1; }\n}\n\n.chartjs-render-monitor {\n\tanimation: chartjs-render-animation 0.001s;\n}\n\n/*\n * DOM element resizing detection\n * https://github.com/marcj/css-element-queries\n */\n.chartjs-size-monitor,\n.chartjs-size-monitor-expand,\n.chartjs-size-monitor-shrink {\n\tposition: absolute;\n\tdirection: ltr;\n\tleft: 0;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\toverflow: hidden;\n\tpointer-events: none;\n\tvisibility: hidden;\n\tz-index: -1;\n}\n\n.chartjs-size-monitor-expand > div {\n\tposition: absolute;\n\twidth: 1000000px;\n\theight: 1000000px;\n\tleft: 0;\n\ttop: 0;\n}\n\n.chartjs-size-monitor-shrink > div {\n\tposition: absolute;\n\twidth: 200%;\n\theight: 200%;\n\tleft: 0;\n\ttop: 0;\n}\n",Je=e(Object.freeze({__proto__:null,default:Ue})),Ge="$chartjs",Ye="chartjs-",Xe=Ye+"size-monitor",Ke=Ye+"render-monitor",Qe=Ye+"render-animation",Ze=["animationstart","webkitAnimationStart"],tn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function en(t,e){var n=at.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}function nn(t,e){var n=t.style,i=t.getAttribute("height"),r=t.getAttribute("width");if(t[Ge]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===r||""===r){var o=en(t,"width");void 0!==o&&(t.width=o)}if(null===i||""===i)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var a=en(t,"height");void 0!==o&&(t.height=a)}return t}var rn=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function on(t,e,n){t.addEventListener(e,n,rn)}function an(t,e,n){t.removeEventListener(e,n,rn)}function sn(t,e,n,i,r){return{type:t,chart:e,native:r||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function ln(t,e){var n=tn[t.type]||t.type,i=at.getRelativePosition(t,e);return sn(n,e,i.x,i.y,t)}function cn(t,e){var n=!1,i=[];return function(){i=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,at.requestAnimFrame.call(window,function(){n=!1,t.apply(e,i)}))}}function un(t){var e=document.createElement("div");return e.className=t||"",e}function hn(t){var e=1e6,n=un(Xe),i=un(Xe+"-expand"),r=un(Xe+"-shrink");i.appendChild(un()),r.appendChild(un()),n.appendChild(i),n.appendChild(r),n._reset=function(){i.scrollLeft=e,i.scrollTop=e,r.scrollLeft=e,r.scrollTop=e};var o=function(){n._reset(),t()};return on(i,"scroll",o.bind(i,"expand")),on(r,"scroll",o.bind(r,"shrink")),n}function dn(e,n){var t=e[Ge]||(e[Ge]={}),i=t.renderProxy=function(t){t.animationName===Qe&&n()};at.each(Ze,function(t){on(e,t,i)}),t.reflow=!!e.offsetParent,e.classList.add(Ke)}function fn(e){var t=e[Ge]||{},n=t.renderProxy;n&&(at.each(Ze,function(t){an(e,t,n)}),delete t.renderProxy),e.classList.remove(Ke)}function pn(n,i,r){var o=n[Ge]||(n[Ge]={}),e=o.resizer=hn(cn(function(){if(o.resizer){var t=r.options.maintainAspectRatio&&n.parentNode,e=t?t.clientWidth:0;i(sn("resize",r)),t&&t.clientWidth<e&&r.canvas&&i(sn("resize",r))}}));dn(n,function(){if(o.resizer){var t=n.parentNode;t&&t!==e.parentNode&&t.insertBefore(e,t.firstChild),e._reset()}})}function gn(t){var e=t[Ge]||{},n=e.resizer;delete e.resizer,fn(t),n&&n.parentNode&&n.parentNode.removeChild(n)}function mn(t,e){var n=t[Ge]||(t[Ge]={});if(!n.containsStyles){n.containsStyles=!0,e="/* Chart.js */\n"+e;var i=document.createElement("style");i.setAttribute("type","text/css"),i.appendChild(document.createTextNode(e)),t.appendChild(i)}}var vn={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;mn(e.host?e:document.head,Je)}},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(this._ensureLoaded(t),nn(t,e),n):null},releaseContext:function(t){var n=t.canvas;if(n[Ge]){var i=n[Ge].initial;["height","width"].forEach(function(t){var e=i[t];at.isNullOrUndef(e)?n.removeAttribute(t):n.setAttribute(t,e)}),at.each(i.style||{},function(t,e){n.style[e]=t}),n.width=n.width,delete n[Ge]}},addEventListener:function(e,t,n){var i=e.canvas;if("resize"!==t){var r=n[Ge]||(n[Ge]={});on(i,t,(r.proxies||(r.proxies={}))[e.id+"_"+t]=function(t){n(ln(t,e))})}else pn(i,n,e)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var r=((n[Ge]||{}).proxies||{})[t.id+"_"+e];r&&an(i,e,r)}else gn(i)}};at.addEvent=on,at.removeEvent=an;var yn=vn._enabled?vn:qe,bn=at.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},yn);Q._set("global",{plugins:{}});var xn={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var n=this._plugins;[].concat(t).forEach(function(t){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){var i,r,o,a,s,l=this.descriptors(t),c=l.length;for(i=0;i<c;++i)if("function"==typeof(s=(o=(r=l[i]).plugin)[e])&&((a=[t].concat(n||[])).push(r.options),!1===s.apply(o,a)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var i=[],r=[],n=t&&t.config||{},o=n.options&&n.options.plugins||{};return this._plugins.concat(n.plugins||[]).forEach(function(t){if(-1===i.indexOf(t)){var e=t.id,n=o[e];!1!==n&&(!0===n&&(n=at.clone(Q.global.plugins[e])),i.push(t),r.push({plugin:t,options:n||{}}))}}),e.descriptors=r,e.id=this._cacheId,r},_invalidate:function(t){delete t.$plugins}},_n={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=at.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?at.merge(Object.create(null),[Q.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){var n=this;n.defaults.hasOwnProperty(t)&&(n.defaults[t]=at.extend(n.defaults[t],e))},addScalesToLayout:function(e){at.each(e.scales,function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,We.addBox(e,t)})}},wn=at.valueOrDefault,Sn=at.rtl.getRtlAdapter;Q._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:at.noop,title:function(t,e){var n="",i=e.labels,r=i?i.length:0;if(0<t.length){var o=t[0];o.label?n=o.label:o.xLabel?n=o.xLabel:0<r&&o.index<r&&(n=i[o.index])}return n},afterTitle:at.noop,beforeBody:at.noop,beforeLabel:at.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),at.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:at.noop,afterBody:at.noop,beforeFooter:at.noop,footer:at.noop,afterFooter:at.noop}}});var Cn={average:function(t){if(!t.length)return!1;var e,n,i=0,r=0,o=0;for(e=0,n=t.length;e<n;++e){var a=t[e];if(a&&a.hasValue()){var s=a.tooltipPosition();i+=s.x,r+=s.y,++o}}return{x:i/o,y:r/o}},nearest:function(t,e){var n,i,r,o=e.x,a=e.y,s=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){var l=t[n];if(l&&l.hasValue()){var c=l.getCenterPoint(),u=at.distanceBetweenPoints(e,c);u<s&&(s=u,r=l)}}if(r){var h=r.tooltipPosition();o=h.x,a=h.y}return{x:o,y:a}}};function Tn(t,e){return e&&(at.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function $n(t){return("string"==typeof t||t instanceof String)&&-1<t.indexOf("\n")?t.split("\n"):t}function kn(t){var e=t._xScale,n=t._yScale||t._scale,i=t._index,r=t._datasetIndex,o=t._chart.getDatasetMeta(r).controller,a=o._getIndexScale(),s=o._getValueScale();return{xLabel:e?e.getLabelForIndex(i,r):"",yLabel:n?n.getLabelForIndex(i,r):"",label:a?""+a.getLabelForIndex(i,r):"",value:s?""+s.getLabelForIndex(i,r):"",index:i,datasetIndex:r,x:t._model.x,y:t._model.y}}function An(t){var e=Q.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:wn(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:wn(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:wn(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:wn(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:wn(t.titleFontStyle,e.defaultFontStyle),titleFontSize:wn(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:wn(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:wn(t.footerFontStyle,e.defaultFontStyle),footerFontSize:wn(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function On(t,e){var n=t._chart.ctx,i=2*e.yPadding,r=0,o=e.body,a=o.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);a+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,c=e.titleFontSize,u=e.bodyFontSize,h=e.footerFontSize;i+=s*c,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=a*u,i+=a?(a-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*h,i+=l?(l-1)*e.footerSpacing:0;var d=0,f=function(t){r=Math.max(r,n.measureText(t).width+d)};return n.font=at.fontString(c,e._titleFontStyle,e._titleFontFamily),at.each(e.title,f),n.font=at.fontString(u,e._bodyFontStyle,e._bodyFontFamily),at.each(e.beforeBody.concat(e.afterBody),f),d=e.displayColors?u+2:0,at.each(o,function(t){at.each(t.before,f),at.each(t.lines,f),at.each(t.after,f)}),d=0,n.font=at.fontString(h,e._footerFontStyle,e._footerFontFamily),at.each(e.footer,f),{width:r+=2*e.xPadding,height:i}}function Dn(t,e){var n,i,r,o,a,s=t._model,l=t._chart,c=t._chart.chartArea,u="center",h="center";s.y<e.height?h="top":s.y>l.height-e.height&&(h="bottom");var d=(c.left+c.right)/2,f=(c.top+c.bottom)/2;i="center"===h?(n=function(t){return t<=d},function(t){return d<t}):(n=function(t){return t<=e.width/2},function(t){return t>=l.width-e.width/2}),r=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},o=function(t){return t-e.width-s.caretSize-s.caretPadding<0},a=function(t){return t<=f?"top":"bottom"},n(s.x)?(u="left",r(s.x)&&(u="center",h=a(s.y))):i(s.x)&&(u="right",o(s.x)&&(u="center",h=a(s.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:u,yAlign:p.yAlign?p.yAlign:h}}function Pn(t,e,n,i){var r=t.x,o=t.y,a=t.caretSize,s=t.caretPadding,l=t.cornerRadius,c=n.xAlign,u=n.yAlign,h=a+s,d=l+s;return"right"===c?r-=e.width:"center"===c&&((r-=e.width/2)+e.width>i.width&&(r=i.width-e.width),r<0&&(r=0)),"top"===u?o+=h:o-="bottom"===u?e.height+h:e.height/2,"center"===u?"left"===c?r+=h:"right"===c&&(r-=h):"left"===c?r-=d:"right"===c&&(r+=d),{x:r,y:o}}function Mn(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function En(t){return Tn([],$n(t))}var In=pt.extend({initialize:function(){this._model=An(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options.callbacks,n=e.beforeTitle.apply(t,arguments),i=e.title.apply(t,arguments),r=e.afterTitle.apply(t,arguments),o=[];return o=Tn(o=Tn(o=Tn(o,$n(n)),$n(i)),$n(r))},getBeforeBody:function(){return En(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,n){var i=this,r=i._options.callbacks,o=[];return at.each(t,function(t){var e={before:[],lines:[],after:[]};Tn(e.before,$n(r.beforeLabel.call(i,t,n))),Tn(e.lines,r.label.call(i,t,n)),Tn(e.after,$n(r.afterLabel.call(i,t,n))),o.push(e)}),o},getAfterBody:function(){return En(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),i=e.footer.apply(t,arguments),r=e.afterFooter.apply(t,arguments),o=[];return o=Tn(o=Tn(o=Tn(o,$n(n)),$n(i)),$n(r))},update:function(t){var e,n,i=this,r=i._options,o=i._model,a=i._model=An(r),s=i._active,l=i._data,c={xAlign:o.xAlign,yAlign:o.yAlign},u={x:o.x,y:o.y},h={width:o.width,height:o.height},d={x:o.caretX,y:o.caretY};if(s.length){a.opacity=1;var f=[],p=[];d=Cn[r.position].call(i,s,i._eventPosition);var g=[];for(e=0,n=s.length;e<n;++e)g.push(kn(s[e]));r.filter&&(g=g.filter(function(t){return r.filter(t,l)})),r.itemSort&&(g=g.sort(function(t,e){return r.itemSort(t,e,l)})),at.each(g,function(t){f.push(r.callbacks.labelColor.call(i,t,i._chart)),p.push(r.callbacks.labelTextColor.call(i,t,i._chart))}),a.title=i.getTitle(g,l),a.beforeBody=i.getBeforeBody(g,l),a.body=i.getBody(g,l),a.afterBody=i.getAfterBody(g,l),a.footer=i.getFooter(g,l),a.x=d.x,a.y=d.y,a.caretPadding=r.caretPadding,a.labelColors=f,a.labelTextColors=p,a.dataPoints=g,u=Pn(a,h=On(this,a),c=Dn(this,h),i._chart)}else a.opacity=0;return a.xAlign=c.xAlign,a.yAlign=c.yAlign,a.x=u.x,a.y=u.y,a.width=h.width,a.height=h.height,a.caretX=d.x,a.caretY=d.y,i._model=a,t&&r.custom&&r.custom.call(i,a),i},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,r=this.getCaretPosition(t,e,i);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)},getCaretPosition:function(t,e,n){var i,r,o,a,s,l,c=n.caretSize,u=n.cornerRadius,h=n.xAlign,d=n.yAlign,f=t.x,p=t.y,g=e.width,m=e.height;if("center"===d)s=p+m/2,l="left"===h?(r=(i=f)-c,o=i,a=s+c,s-c):(r=(i=f+g)+c,o=i,a=s-c,s+c);else if(o=(i="left"===h?(r=f+u+c)-c:"right"===h?(r=f+g-u-c)-c:(r=n.caretX)-c,r+c),"top"===d)s=(a=p)-c,l=a;else{s=(a=p+m)+c,l=a;var v=o;o=i,i=v}return{x1:i,x2:r,x3:o,y1:a,y2:s,y3:l}},drawTitle:function(t,e,n){var i,r,o,a=e.title,s=a.length;if(s){var l=Sn(e.rtl,e.x,e.width);for(t.x=Mn(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",i=e.titleFontSize,r=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=at.fontString(i,e._titleFontStyle,e._titleFontFamily),o=0;o<s;++o)n.fillText(a[o],l.x(t.x),t.y+i/2),t.y+=i+r,o+1===s&&(t.y+=e.titleMarginBottom-r)}},drawBody:function(e,t,n){var i,r,o,a,s,l,c,u,h=t.bodyFontSize,d=t.bodySpacing,f=t._bodyAlign,p=t.body,g=t.displayColors,m=0,v=g?Mn(t,"left"):0,y=Sn(t.rtl,t.x,t.width),b=function(t){n.fillText(t,y.x(e.x+m),e.y+h/2),e.y+=h+d},x=y.textAlign(f);for(n.textAlign=f,n.textBaseline="middle",n.font=at.fontString(h,t._bodyFontStyle,t._bodyFontFamily),e.x=Mn(t,x),n.fillStyle=t.bodyFontColor,at.each(t.beforeBody,b),m=g&&"right"!==x?"center"===f?h/2+1:h+2:0,s=0,c=p.length;s<c;++s){for(i=p[s],r=t.labelTextColors[s],o=t.labelColors[s],n.fillStyle=r,at.each(i.before,b),l=0,u=(a=i.lines).length;l<u;++l){if(g){var _=y.x(v);n.fillStyle=t.legendColorBackground,n.fillRect(y.leftForLtr(_,h),e.y,h,h),n.lineWidth=1,n.strokeStyle=o.borderColor,n.strokeRect(y.leftForLtr(_,h),e.y,h,h),n.fillStyle=o.backgroundColor,n.fillRect(y.leftForLtr(y.xPlus(_,1),h-2),e.y+1,h-2,h-2),n.fillStyle=r}b(a[l])}at.each(i.after,b)}m=0,at.each(t.afterBody,b),e.y-=d},drawFooter:function(t,e,n){var i,r,o=e.footer,a=o.length;if(a){var s=Sn(e.rtl,e.x,e.width);for(t.x=Mn(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=s.textAlign(e._footerAlign),n.textBaseline="middle",i=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=at.fontString(i,e._footerFontStyle,e._footerFontFamily),r=0;r<a;++r)n.fillText(o[r],s.x(t.x),t.y+i/2),t.y+=i+e.footerSpacing}},drawBackground:function(t,e,n,i){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var r=e.xAlign,o=e.yAlign,a=t.x,s=t.y,l=i.width,c=i.height,u=e.cornerRadius;n.beginPath(),n.moveTo(a+u,s),"top"===o&&this.drawCaret(t,i),n.lineTo(a+l-u,s),n.quadraticCurveTo(a+l,s,a+l,s+u),"center"===o&&"right"===r&&this.drawCaret(t,i),n.lineTo(a+l,s+c-u),n.quadraticCurveTo(a+l,s+c,a+l-u,s+c),"bottom"===o&&this.drawCaret(t,i),n.lineTo(a+u,s+c),n.quadraticCurveTo(a,s+c,a,s+c-u),"center"===o&&"left"===r&&this.drawCaret(t,i),n.lineTo(a,s+u),n.quadraticCurveTo(a,s,a+u,s),n.closePath(),n.fill(),0<e.borderWidth&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},r=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(t.save(),t.globalAlpha=r,this.drawBackground(i,e,t,n),i.y+=e.yPadding,at.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),at.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e=this,n=e._options,i=!1;return e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:(e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),n.reverse&&e._active.reverse()),(i=!at.arrayEquals(e._active,e._lastActive))&&(e._lastActive=e._active,(n.enabled||n.custom)&&(e._eventPosition={x:t.x,y:t.y},e.update(!0),e.pivot())),i}}),Nn=Cn,Rn=In;Rn.positioners=Nn;var Ln=at.valueOrDefault;function Hn(){return at.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var r,o,a,s=n[t].length;for(e[t]||(e[t]=[]),r=0;r<s;++r)a=n[t][r],o=Ln(a.type,"xAxes"===t?"category":"linear"),r>=e[t].length&&e[t].push({}),!e[t][r].type||a.type&&a.type!==e[t][r].type?at.merge(e[t][r],[_n.getScaleDefaults(o),a]):at.merge(e[t][r],a)}else at._merger(t,e,n,i)}})}function jn(){return at.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){var r=e[t]||Object.create(null),o=n[t];"scales"===t?e[t]=Hn(r,o):"scale"===t?e[t]=at.merge(r,[_n.getScaleDefaults(o.type),o]):at._merger(t,e,n,i)}})}function Fn(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=jn(Q.global,Q[t.type],t.options||{}),t}function zn(e){var t=e.options;at.each(e.scales,function(t){We.removeBox(e,t)}),t=jn(Q.global,Q[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function Bn(t,e,n){for(var i,r=function(t){return t.id===i};i=e+n++,0<=at.findIndex(t,r););return i}function Vn(t){return"top"===t||"bottom"===t}function Wn(n,i){return function(t,e){return t[n]===e[n]?t[i]-e[i]:t[n]-e[n]}}Q._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var qn=function(t,e){return this.construct(t,e),this};at.extend(qn.prototype,{construct:function(t,e){var n=this;e=Fn(e);var i=bn.acquireContext(t,e),r=i&&i.canvas,o=r&&r.height,a=r&&r.width;n.id=at.uid(),n.ctx=i,n.canvas=r,n.config=e,n.width=a,n.height=o,n.aspectRatio=o?a/o:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],(n.chart=n).controller=n,qn.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&r?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return xn.notify(t,"beforeInit"),at.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),xn.notify(t,"afterInit"),t},clear:function(){return at.canvas.clear(this),this},stop:function(){return vt.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,r=n.maintainAspectRatio&&e.aspectRatio||null,o=Math.max(0,Math.floor(at.getMaximumWidth(i))),a=Math.max(0,Math.floor(r?o/r:at.getMaximumHeight(i)));if((e.width!==o||e.height!==a)&&(i.width=e.width=o,i.height=e.height=a,i.style.width=o+"px",i.style.height=a+"px",at.retinaScale(e,n.devicePixelRatio),!t)){var s={width:o,height:a};xn.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,n=t.scales||{},e=t.scale;at.each(n.xAxes,function(t,e){t.id||(t.id=Bn(n.xAxes,"x-axis-",e))}),at.each(n.yAxes,function(t,e){t.id||(t.id=Bn(n.yAxes,"y-axis-",e))}),e&&(e.id=e.id||"scale")},buildOrUpdateScales:function(){var a=this,t=a.options,s=a.scales||{},e=[],l=Object.keys(s).reduce(function(t,e){return t[e]=!1,t},{});t.scales&&(e=e.concat((t.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),t.scale&&e.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),at.each(e,function(t){var e=t.options,n=e.id,i=Ln(e.type,t.dtype);Vn(e.position)!==Vn(t.dposition)&&(e.position=t.dposition),l[n]=!0;var r=null;if(n in s&&s[n].type===i)(r=s[n]).options=e,r.ctx=a.ctx,r.chart=a;else{var o=_n.getScaleConstructor(i);if(!o)return;r=new o({id:n,type:i,options:e,ctx:a.ctx,chart:a}),s[r.id]=r}r.mergeTicksOptions(),t.isDefault&&(a.scale=r)}),at.each(l,function(t,e){t||delete s[e]}),a.scales=s,_n.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,i=[],r=n.data.datasets;for(t=0,e=r.length;t<e;t++){var o=r[t],a=n.getDatasetMeta(t),s=o.type||n.config.type;if(a.type&&a.type!==s&&(n.destroyDatasetMeta(t),a=n.getDatasetMeta(t)),a.type=s,a.order=o.order||0,a.index=t,a.controller)a.controller.updateIndex(t),a.controller.linkScales();else{var l=Ce[a.type];if(void 0===l)throw new Error('"'+a.type+'" is not a chart type.');a.controller=new l(n,t),i.push(a.controller)}}return i},resetElements:function(){var n=this;at.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.reset()},n)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,i=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),zn(i),xn._invalidate(i),!1!==xn.notify(i,"beforeUpdate")){i.tooltip._data=i.data;var r=i.buildOrUpdateControllers();for(e=0,n=i.data.datasets.length;e<n;e++)i.getDatasetMeta(e).controller.buildOrUpdateElements();i.updateLayout(),i.options.animation&&i.options.animation.duration&&at.each(r,function(t){t.reset()}),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],xn.notify(i,"afterUpdate"),i._layers.sort(Wn("z","_idx")),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t)}},updateLayout:function(){var e=this;!1!==xn.notify(e,"beforeLayout")&&(We.update(this,this.width,this.height),e._layers=[],at.each(e.boxes,function(t){t._configure&&t._configure(),e._layers.push.apply(e._layers,t._layers())},e),e._layers.forEach(function(t,e){t._idx=e}),xn.notify(e,"afterScaleUpdate"),xn.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==xn.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e<n;++e)t.updateDataset(e);xn.notify(t,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this,n=e.getDatasetMeta(t),i={meta:n,index:t};!1!==xn.notify(e,"beforeDatasetUpdate",[i])&&(n.controller._update(),xn.notify(e,"afterDatasetUpdate",[i]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var n=e.options.animation,i=Ln(t.duration,n&&n.duration),r=t.lazy;if(!1!==xn.notify(e,"beforeRender")){var o=function(t){xn.notify(e,"afterRender"),at.callback(n&&n.onComplete,[t],e)};if(n&&i){var a=new mt({numSteps:i/16.66,easing:t.easing||n.easing,render:function(t,e){var n=at.easing.effects[e.easing],i=e.currentStep,r=i/e.numSteps;t.draw(n(r),r,i)},onAnimationProgress:n.onProgress,onAnimationComplete:o});vt.addAnimation(e,a,i,r)}else e.draw(),o(new mt({numSteps:0,chart:e}));return e}},draw:function(t){var e,n,i=this;if(i.clear(),at.isNullOrUndef(t)&&(t=1),i.transition(t),!(i.width<=0||i.height<=0)&&!1!==xn.notify(i,"beforeDraw",[t])){for(n=i._layers,e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(i.chartArea);for(i.drawDatasets(t);e<n.length;++e)n[e].draw(i.chartArea);i._drawTooltip(t),xn.notify(i,"afterDraw",[t])}},transition:function(t){for(var e=this,n=0,i=(e.data.datasets||[]).length;n<i;++n)e.isDatasetVisible(n)&&e.getDatasetMeta(n).controller.transition(t);e.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,n,i=this,r=[];for(e=0,n=(i.data.datasets||[]).length;e<n;++e)t&&!i.isDatasetVisible(e)||r.push(i.getDatasetMeta(e));return r.sort(Wn("order","index")),r},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n,i=this;if(!1!==xn.notify(i,"beforeDatasetsDraw",[t])){for(n=(e=i._getSortedVisibleDatasetMetas()).length-1;0<=n;--n)i.drawDataset(e[n],t);xn.notify(i,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,i={meta:t,index:t.index,easingValue:e};!1!==xn.notify(n,"beforeDatasetDraw",[i])&&(t.controller.draw(e),xn.notify(n,"afterDatasetDraw",[i]))},_drawTooltip:function(t){var e=this,n=e.tooltip,i={tooltip:n,easingValue:t};!1!==xn.notify(e,"beforeTooltipDraw",[i])&&(n.draw(),xn.notify(e,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return Pe.modes.single(this,t)},getElementsAtEvent:function(t){return Pe.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return Pe.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=Pe.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return Pe.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var i=n._meta[e.id];return i||(i=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n.order||0,index:t}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],i=n._meta&&n._meta[e];i&&(i.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,i=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);i&&(n.unbindEvents(),at.canvas.clear(n),bn.releaseContext(n.ctx),n.canvas=null,n.ctx=null),xn.notify(n,"destroy"),delete qn.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Rn({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var e=this,n=e._listeners={},i=function(){e.eventHandler.apply(e,arguments)};at.each(e.options.events,function(t){bn.addEventListener(e,t,i),n[t]=i}),e.options.responsive&&(i=function(){e.resize()},bn.addEventListener(e,"resize",i),n.resize=i)},unbindEvents:function(){var n=this,t=n._listeners;t&&(delete n._listeners,at.each(t,function(t,e){bn.removeEventListener(n,e,t)}))},updateHoverStyle:function(t,e,n){var i,r,o,a=n?"set":"remove";for(r=0,o=t.length;r<o;++r)(i=t[r])&&this.getDatasetMeta(i._datasetIndex).controller[a+"HoverStyle"](i);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+a+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==xn.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var i=e.handleEvent(t);n&&(i=n._start?n.handleEvent(t):i|n.handleEvent(t)),xn.notify(e,"afterEvent",[t]);var r=e._bufferedRequest;return r?e.render(r):i&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e=this,n=e.options||{},i=n.hover,r=!1;return e.lastActive=e.lastActive||[],"mouseout"===t.type?e.active=[]:e.active=e.getElementsAtEventForMode(t,i.mode,i),at.callback(n.onHover||n.hover.onHover,[t.native,e.active],e),"mouseup"!==t.type&&"click"!==t.type||n.onClick&&n.onClick.call(e,t.native,e.active),e.lastActive.length&&e.updateHoverStyle(e.lastActive,i.mode,!1),e.active.length&&i.mode&&e.updateHoverStyle(e.active,i.mode,!0),r=!at.arrayEquals(e.active,e.lastActive),e.lastActive=e.active,r}}),qn.instances={};var Un=qn;(qn.Controller=qn).types={},at.configMerge=jn,at.scaleMerge=Hn;var Jn=function(){function u(t,e,n){var i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}function h(t){return null!=t&&"none"!==t}function e(t,e,n){var i=document.defaultView,r=at._getParentNode(t),o=i.getComputedStyle(t)[e],a=i.getComputedStyle(r)[e],s=h(o),l=h(a),c=Number.POSITIVE_INFINITY;return s||l?Math.min(s?u(o,t,n):c,l?u(a,r,n):c):"none"}at.where=function(t,e){if(at.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return at.each(t,function(t){e(t)&&n.push(t)}),n},at.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,r=t.length;i<r;++i)if(e.call(n,t[i],i,t))return i;return-1},at.findNextWhere=function(t,e,n){at.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<t.length;i++){var r=t[i];if(e(r))return r}},at.findPreviousWhere=function(t,e,n){at.isNullOrUndef(n)&&(n=t.length);for(var i=n-1;0<=i;i--){var r=t[i];if(e(r))return r}},at.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},at.almostEquals=function(t,e,n){return Math.abs(t-e)<n},at.almostWhole=function(t,e){var n=Math.round(t);return n-e<=t&&t<=n+e},at.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},at.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},at.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:0<t?1:-1},at.toRadians=function(t){return t*(Math.PI/180)},at.toDegrees=function(t){return t*(180/Math.PI)},at._decimalPlaces=function(t){if(at.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},at.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,r=Math.sqrt(n*n+i*i),o=Math.atan2(i,n);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:r}},at.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},at.aliasPixel=function(t){return t%2==0?0:.5},at._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,r=n/2;return Math.round((e-r)*i)/i+r},at.splineCurve=function(t,e,n,i){var r=t.skip?e:t,o=e,a=n.skip?e:n,s=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),l=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),c=s/(s+l),u=l/(s+l),h=i*(c=isNaN(c)?0:c),d=i*(u=isNaN(u)?0:u);return{previous:{x:o.x-h*(a.x-r.x),y:o.y-h*(a.y-r.y)},next:{x:o.x+d*(a.x-r.x),y:o.y+d*(a.y-r.y)}}},at.EPSILON=Number.EPSILON||1e-14,at.splineCurveMonotone=function(t){var e,n,i,r,o,a,s,l,c,u=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),h=u.length;for(e=0;e<h;++e)if(!(i=u[e]).model.skip){if(n=0<e?u[e-1]:null,(r=e<h-1?u[e+1]:null)&&!r.model.skip){var d=r.model.x-i.model.x;i.deltaK=0!==d?(r.model.y-i.model.y)/d:0}!n||n.model.skip?i.mK=i.deltaK:!r||r.model.skip?i.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?i.mK=0:i.mK=(n.deltaK+i.deltaK)/2}for(e=0;e<h-1;++e)i=u[e],r=u[e+1],i.model.skip||r.model.skip||(at.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=r.mK=0:(o=i.mK/i.deltaK,a=r.mK/i.deltaK,(l=Math.pow(o,2)+Math.pow(a,2))<=9||(s=3/Math.sqrt(l),i.mK=o*s*i.deltaK,r.mK=a*s*i.deltaK)));for(e=0;e<h;++e)(i=u[e]).model.skip||(n=0<e?u[e-1]:null,r=e<h-1?u[e+1]:null,n&&!n.model.skip&&(c=(i.model.x-n.model.x)/3,i.model.controlPointPreviousX=i.model.x-c,i.model.controlPointPreviousY=i.model.y-c*i.mK),r&&!r.model.skip&&(c=(r.model.x-i.model.x)/3,i.model.controlPointNextX=i.model.x+c,i.model.controlPointNextY=i.model.y+c*i.mK))},at.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},at.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},at.niceNum=function(t,e){var n=Math.floor(at.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},at.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},at.getRelativePosition=function(t,e){var n,i,r=t.originalEvent||t,o=t.target||t.srcElement,a=o.getBoundingClientRect(),s=r.touches;i=s&&0<s.length?(n=s[0].clientX,s[0].clientY):(n=r.clientX,r.clientY);var l=parseFloat(at.getStyle(o,"padding-left")),c=parseFloat(at.getStyle(o,"padding-top")),u=parseFloat(at.getStyle(o,"padding-right")),h=parseFloat(at.getStyle(o,"padding-bottom")),d=a.right-a.left-l-u,f=a.bottom-a.top-c-h;return{x:n=Math.round((n-a.left-l)/d*o.width/e.currentDevicePixelRatio),y:i=Math.round((i-a.top-c)/f*o.height/e.currentDevicePixelRatio)}},at.getConstraintWidth=function(t){return e(t,"max-width","clientWidth")},at.getConstraintHeight=function(t){return e(t,"max-height","clientHeight")},at._calculatePadding=function(t,e,n){return-1<(e=at.getStyle(t,e)).indexOf("%")?n*parseInt(e,10)/100:parseInt(e,10)},at._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},at.getMaximumWidth=function(t){var e=at._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-at._calculatePadding(e,"padding-left",n)-at._calculatePadding(e,"padding-right",n),r=at.getConstraintWidth(t);return isNaN(r)?i:Math.min(i,r)},at.getMaximumHeight=function(t){var e=at._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-at._calculatePadding(e,"padding-top",n)-at._calculatePadding(e,"padding-bottom",n),r=at.getConstraintHeight(t);return isNaN(r)?i:Math.min(i,r)},at.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},at.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,r=t.height,o=t.width;i.height=r*n,i.width=o*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=r+"px",i.style.width=o+"px")}},at.fontString=function(t,e,n){return e+" "+t+"px "+n},at.longestText=function(t,e,n,i){var r=(i=i||{}).data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(r=i.data={},o=i.garbageCollect=[],i.font=e),t.font=e;var a,s,l,c,u,h=0,d=n.length;for(a=0;a<d;a++)if(null!=(c=n[a])&&!0!==at.isArray(c))h=at.measureText(t,r,o,h,c);else if(at.isArray(c))for(s=0,l=c.length;s<l;s++)null==(u=c[s])||at.isArray(u)||(h=at.measureText(t,r,o,h,u));var f=o.length/2;if(f>n.length){for(a=0;a<f;a++)delete r[o[a]];o.splice(0,f)}return h},at.measureText=function(t,e,n,i,r){var o=e[r];return o||(o=e[r]=t.measureText(r).width,n.push(r)),i<o&&(i=o),i},at.numberOfLabelLines=function(t){var e=1;return at.each(t,function(t){at.isArray(t)&&t.length>e&&(e=t.length)}),e},at.color=R?function(t){return t instanceof CanvasGradient&&(t=Q.global.defaultColor),R(t)}:function(t){return console.error("Color.js not found!"),t},at.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:at.color(t).saturate(.5).darken(.1).rgbString()}};function Gn(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Yn(t){this.options=t||{}}at.extend(Yn.prototype,{formats:Gn,parse:Gn,format:Gn,add:Gn,diff:Gn,startOf:Gn,endOf:Gn,_create:function(t){return t}}),Yn.override=function(t){at.extend(Yn.prototype,t)};var Xn={_date:Yn},Kn={formatters:{values:function(t){return at.isArray(t)?t:""+t},linear:function(t,e,n){var i=3<n.length?n[2]-n[1]:n[1]-n[0];1<Math.abs(i)&&t!==Math.floor(t)&&(i=t-Math.floor(t));var r=at.log10(Math.abs(i)),o="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var a=at.log10(Math.abs(t)),s=Math.floor(a)-Math.floor(r);s=Math.max(Math.min(s,20),0),o=t.toExponential(s)}else{var l=-1*Math.floor(r);l=Math.max(Math.min(l,20),0),o=t.toFixed(l)}else o="0";return o},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(at.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():""}}},Qn=at.isArray,Zn=at.isNullOrUndef,ti=at.valueOrDefault,ei=at.valueAtIndexOrDefault;function ni(t,e){for(var n=[],i=t.length/e,r=0,o=t.length;r<o;r+=i)n.push(t[Math.floor(r)]);return n}function ii(t,e,n){var i,r=t.getTicks().length,o=Math.min(e,r-1),a=t.getPixelForTick(o),s=t._startPixel,l=t._endPixel,c=1e-6;if(!(n&&(i=1===r?Math.max(a-s,l-a):0===e?(t.getPixelForTick(1)-a)/2:(a-t.getPixelForTick(o-1))/2,(a+=o<e?i:-i)<s-c||l+c<a)))return a}function ri(t,r){at.each(t,function(t){var e,n=t.gc,i=n.length/2;if(r<i){for(e=0;e<i;++e)delete t.data[n[e]];n.splice(0,i)}})}function oi(t,e,n,i){var r,o,a,s,l,c,u,h,d,f,p,g,m,v=n.length,y=[],b=[],x=[],_=0,w=0;for(r=0;r<v;++r){if(s=n[r].label,l=n[r].major?e.major:e.minor,t.font=c=l.string,u=i[c]=i[c]||{data:{},gc:[]},h=l.lineHeight,d=f=0,Zn(s)||Qn(s)){if(Qn(s))for(o=0,a=s.length;o<a;++o)p=s[o],Zn(p)||Qn(p)||(d=at.measureText(t,u.data,u.gc,d,p),f+=h)}else d=at.measureText(t,u.data,u.gc,d,s),f=h;y.push(d),b.push(f),x.push(h/2),_=Math.max(d,_),w=Math.max(f,w)}function S(t){return{width:y[t]||0,height:b[t]||0,offset:x[t]||0}}return ri(i,v),g=y.indexOf(_),m=b.indexOf(w),{first:S(0),last:S(v-1),widest:S(g),highest:S(m)}}function ai(t){return t.drawTicks?t.tickMarkLength:0}function si(t){var e,n;return t.display?(e=at.options._parseFont(t),n=at.options.toPadding(t.padding),e.lineHeight+n.height):0}function li(t,e){return at.extend(at.options._parseFont({fontFamily:ti(e.fontFamily,t.fontFamily),fontSize:ti(e.fontSize,t.fontSize),fontStyle:ti(e.fontStyle,t.fontStyle),lineHeight:ti(e.lineHeight,t.lineHeight)}),{color:at.options.resolve([e.fontColor,t.fontColor,Q.global.defaultFontColor])})}function ci(t){var e=li(t,t.minor);return{minor:e,major:t.major.enabled?li(t,t.major):e}}function ui(t){var e,n,i,r=[];for(n=0,i=t.length;n<i;++n)void 0!==(e=t[n])._index&&r.push(e);return r}function hi(t){var e,n,i=t.length;if(i<2)return!1;for(n=t[0],e=1;e<i;++e)if(t[e]-t[e-1]!==n)return!1;return n}function di(t,e,n,i){var r,o,a,s,l=hi(t),c=(e.length-1)/i;if(!l)return Math.max(c,1);for(a=0,s=(r=at.math._factorize(l)).length-1;a<s;a++)if(c<(o=r[a]))return o;return Math.max(c,1)}function fi(t){var e,n,i=[];for(e=0,n=t.length;e<n;e++)t[e].major&&i.push(e);return i}function pi(t,e,n){var i,r,o=0,a=e[0];for(n=Math.ceil(n),i=0;i<t.length;i++)r=t[i],i===a?(r._index=i,a=e[++o*n]):delete r.label}function gi(t,e,n,i){var r,o,a,s,l=ti(n,0),c=Math.min(ti(i,t.length),t.length),u=0;for(e=Math.ceil(e),i&&(e=(r=i-n)/Math.floor(r/e)),s=l;s<0;)u++,s=Math.round(l+u*e);for(o=Math.max(l,0);o<c;o++)a=t[o],o===s?(a._index=o,u++,s=Math.round(l+u*e)):delete a.label}Q._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:Kn.formatters.values,minor:{},major:{}}});var mi=pt.extend({zeroLineIndex:0,getPadding:function(){var t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){at.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var i,r,o,a,s,l=this,c=l.options.ticks,u=c.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=at.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),a=l.buildTicks()||[],(!(a=l.afterBuildTicks(a)||a)||!a.length)&&l.ticks)for(a=[],i=0,r=l.ticks.length;i<r;++i)a.push({value:l.ticks[i],major:!1});return s=u<(l._ticks=a).length,o=l._convertTicksToLabels(s?ni(a,u):a),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=c.display&&(c.autoSkip||"auto"===c.source)?l._autoSkip(a):a,s&&(o=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=o,l.afterUpdate(),l.minSize},_configure:function(){var t,e,n=this,i=n.options.ticks.reverse;n.isHorizontal()?(t=n.left,e=n.right):(t=n.top,e=n.bottom,i=!i),n._startPixel=t,n._endPixel=e,n._reversePixels=i,n._length=e-t},afterUpdate:function(){at.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){at.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){at.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){at.callback(this.options.beforeDataLimits,[this])},determineDataLimits:at.noop,afterDataLimits:function(){at.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){at.callback(this.options.beforeBuildTicks,[this])},buildTicks:at.noop,afterBuildTicks:function(t){var e=this;return Qn(t)&&t.length?at.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=at.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){at.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this,e=t.options.ticks;t.ticks=t.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){at.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){at.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,n,i,r,o,a,s=this,l=s.options,c=l.ticks,u=s.getTicks().length,h=c.minRotation||0,d=c.maxRotation,f=h;!s._isVisible()||!c.display||d<=h||u<=1||!s.isHorizontal()?s.labelRotation=h:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,i=Math.min(s.maxWidth,s.chart.width-e),(r=l.offset?s.maxWidth/u:i/(u-1))<e+6&&(r=i/(u-(l.offset?.5:1)),o=s.maxHeight-ai(l.gridLines)-c.padding-si(l.scaleLabel),a=Math.sqrt(e*e+n*n),f=at.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/r,1)),Math.asin(Math.min(o/a,1))-Math.asin(n/a))),f=Math.max(h,Math.min(d,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){at.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){at.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,r=i.ticks,o=i.scaleLabel,a=i.gridLines,s=t._isVisible(),l="bottom"===i.position,c=t.isHorizontal();if(c?e.width=t.maxWidth:s&&(e.width=ai(a)+si(o)),c?s&&(e.height=ai(a)+si(o)):e.height=t.maxHeight,r.display&&s){var u=ci(r),h=t._getLabelSizes(),d=h.first,f=h.last,p=h.widest,g=h.highest,m=.4*u.minor.lineHeight,v=r.padding;if(c){var y=0!==t.labelRotation,b=at.toRadians(t.labelRotation),x=Math.cos(b),_=Math.sin(b),w=_*p.width+x*(g.height-(y?g.offset:0))+(y?0:m);e.height=Math.min(t.maxHeight,e.height+w+v);var S,C,T=t.getPixelForTick(0)-t.left,$=t.right-t.getPixelForTick(t.getTicks().length-1);C=y?(S=l?x*d.width+_*d.offset:_*(d.height-d.offset),l?_*(f.height-f.offset):x*f.width+_*f.offset):(S=d.width/2,f.width/2),t.paddingLeft=Math.max((S-T)*t.width/(t.width-T),0)+3,t.paddingRight=Math.max((C-$)*t.width/(t.width-$),0)+3}else{var k=r.mirror?0:p.width+v+m;e.width=Math.min(t.maxWidth,e.width+k),t.paddingTop=d.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),t.height=c?(t.width=t._length=n.width-t.margins.left-t.margins.right,e.height):(t.width=e.width,t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){at.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(Zn(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,i,r=this;for(r.ticks=t.map(function(t){return t.value}),r.beforeTickToLabelConversion(),e=r.convertTicksToLabels(t)||r.ticks,r.afterTickToLabelConversion(),n=0,i=t.length;n<i;++n)t[n].label=e[n];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=oi(t.ctx,ci(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,i,r;return r=Qn(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),i=Math.min(e,n),Math.max(e,n)):(e=void 0,i=n=t=+this.getRightValue(t)),{min:i,max:r,start:e,end:n}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:at.noop,getPixelForValue:at.noop,getValueForPixel:at.noop,getPixelForTick:function(t){var e=this,n=e.options.offset,i=e._ticks.length,r=1/Math.max(i-(n?0:1),1);return t<0||i-1<t?null:e.getPixelForDecimal(t*r+(n?r/2:0))},getPixelForDecimal:function(t){var e=this;return e._reversePixels&&(t=1-t),e._startPixel+t*e._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:0<e&&0<n?e:0},_autoSkip:function(t){var e,n,i,r,o=this,a=o.options.ticks,s=o._length,l=a.maxTicksLimit||s/o._tickSize()+1,c=a.major.enabled?fi(t):[],u=c.length,h=c[0],d=c[u-1];if(l<u)return pi(t,c,u/l),ui(t);if(i=di(c,t,s,l),0<u){for(e=0,n=u-1;e<n;e++)gi(t,i,c[e],c[e+1]);return r=1<u?(d-h)/(u-1):null,gi(t,i,at.isNullOrUndef(r)?0:h-r,h),gi(t,i,d,at.isNullOrUndef(r)?t.length:d+r),ui(t)}return gi(t,i),ui(t)},_tickSize:function(){var t=this,e=t.options.ticks,n=at.toRadians(t.labelRotation),i=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),o=t._getLabelSizes(),a=e.autoSkipPadding||0,s=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return t.isHorizontal()?s*r<l*i?s/i:l/r:l*r<s*i?l/i:s/r},_isVisible:function(){var t,e,n,i=this,r=i.chart,o=i.options.display;if("auto"!==o)return!!o;for(t=0,e=r.data.datasets.length;t<e;++t)if(r.isDatasetVisible(t)&&((n=r.getDatasetMeta(t)).xAxisID===i.id||n.yAxisID===i.id))return!0;return!1},_computeGridLineItems:function(t){var e,n,i,r,o,a,s,l,c,u,h,d,f,p,g,m,v,y=this,b=y.chart,x=y.options,_=x.gridLines,w=x.position,S=_.offsetGridLines,C=y.isHorizontal(),T=y._ticksToDraw,$=T.length+(S?1:0),k=ai(_),A=[],O=_.drawBorder?ei(_.lineWidth,0,0):0,D=O/2,P=at._alignPixel,M=function(t){return P(b,t,O)};for("top"===w?(e=M(y.bottom),s=y.bottom-k,c=e-D,h=M(t.top)+D,f=t.bottom):"bottom"===w?(e=M(y.top),h=t.top,f=M(t.bottom)-D,s=e+D,c=y.top+k):"left"===w?(e=M(y.right),a=y.right-k,l=e-D,u=M(t.left)+D,d=t.right):(e=M(y.left),u=t.left,d=M(t.right)-D,a=e+D,l=y.left+k),n=0;n<$;++n)i=T[n]||{},Zn(i.label)&&n<T.length||(v=n===y.zeroLineIndex&&x.offset===S?(p=_.zeroLineWidth,g=_.zeroLineColor,m=_.zeroLineBorderDash||[],_.zeroLineBorderDashOffset||0):(p=ei(_.lineWidth,n,1),g=ei(_.color,n,"rgba(0,0,0,0.1)"),m=_.borderDash||[],_.borderDashOffset||0),void 0!==(r=ii(y,i._index||n,S))&&(o=P(b,r,p),C?a=l=u=d=o:s=c=h=f=o,A.push({tx1:a,ty1:s,tx2:l,ty2:c,x1:u,y1:h,x2:d,y2:f,width:p,color:g,borderDash:m,borderDashOffset:v})));return A.ticksLength=$,A.borderValue=e,A},_computeLabelItems:function(){var t,e,n,i,r,o,a,s,l,c,u,h,d=this,f=d.options,p=f.ticks,g=f.position,m=p.mirror,v=d.isHorizontal(),y=d._ticksToDraw,b=ci(p),x=p.padding,_=ai(f.gridLines),w=-at.toRadians(d.labelRotation),S=[];for(a="top"===g?(o=d.bottom-_-x,w?"left":"center"):"bottom"===g?(o=d.top+_+x,w?"right":"center"):"left"===g?(r=d.right-(m?0:_)-x,m?"left":"right"):(r=d.left+(m?0:_)+x,m?"right":"left"),t=0,e=y.length;t<e;++t)i=(n=y[t]).label,Zn(i)||(s=d.getPixelForTick(n._index||t)+p.labelOffset,c=(l=n.major?b.major:b.minor).lineHeight,u=Qn(i)?i.length:1,h=v?(r=s,"top"===g?((w?1:.5)-u)*c:(w?0:.5)*c):(o=s,(1-u)*c/2),S.push({x:r,y:o,rotation:w,label:i,font:l,textOffset:h,textAlign:a}));return S},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){var i,r,o,a,s,l=e.ctx,c=e.chart,u=at._alignPixel,h=n.drawBorder?ei(n.lineWidth,0,0):0,d=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(o=0,a=d.length;o<a;++o)i=(s=d[o]).width,r=s.color,i&&r&&(l.save(),l.lineWidth=i,l.strokeStyle=r,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(h){var f,p,g,m,v=h,y=ei(n.lineWidth,d.ticksLength-1,1),b=d.borderValue;e.isHorizontal()?(f=u(c,e.left,v)-v/2,p=u(c,e.right,y)+y/2,g=m=b):(g=u(c,e.top,v)-v/2,m=u(c,e.bottom,y)+y/2,f=p=b),l.lineWidth=h,l.strokeStyle=ei(n.color,0),l.beginPath(),l.moveTo(f,g),l.lineTo(p,m),l.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,n,i,r,o,a,s,l,c=t.ctx,u=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,i=u.length;e<i;++e){if(a=(o=u[e]).font,c.save(),c.translate(o.x,o.y),c.rotate(o.rotation),c.font=a.string,c.fillStyle=a.color,c.textBaseline="middle",c.textAlign=o.textAlign,s=o.label,l=o.textOffset,Qn(s))for(n=0,r=s.length;n<r;++n)c.fillText(""+s[n],0,l),l+=a.lineHeight;else c.fillText(s,0,l);c.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,i=n.scaleLabel;if(i.display){var r,o,a=ti(i.fontColor,Q.global.defaultFontColor),s=at.options._parseFont(i),l=at.options.toPadding(i.padding),c=s.lineHeight/2,u=n.position,h=0;if(t.isHorizontal())r=t.left+t.width/2,o="bottom"===u?t.bottom-c-l.bottom:t.top+c+l.top;else{var d="left"===u;r=d?t.left+c+l.top:t.right-c-l.top,o=t.top+t.height/2,h=d?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(r,o),e.rotate(h),e.textAlign="center",e.textBaseline="middle",e.fillStyle=a,e.font=s.string,e.fillText(i.labelString,0,0),e.restore()}},draw:function(t){var e=this;e._isVisible()&&(e._drawGrid(t),e._drawTitle(),e._drawLabels())},_layers:function(){var t=this,e=t.options,n=e.ticks&&e.ticks.z||0,i=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&n!==i&&t.draw===t._draw?[{z:i,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:n,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:n,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(e){var n=this,i=n.isHorizontal();return n.chart._getSortedVisibleDatasetMetas().filter(function(t){return(!e||t.type===e)&&(i?t.xAxisID===n.id:t.yAxisID===n.id)})}});mi.prototype._draw=mi.prototype.draw;var vi=mi,yi=at.isNullOrUndef,bi={position:"bottom"},xi=vi.extend({determineDataLimits:function(){var t,e=this,n=e._getLabels(),i=e.options.ticks,r=i.min,o=i.max,a=0,s=n.length-1;void 0!==r&&0<=(t=n.indexOf(r))&&(a=t),void 0!==o&&0<=(t=n.indexOf(o))&&(s=t),e.minIndex=a,e.maxIndex=s,e.min=n[a],e.max=n[s]},buildTicks:function(){var t=this,e=t._getLabels(),n=t.minIndex,i=t.maxIndex;t.ticks=0===n&&i===e.length-1?e:e.slice(n,i+1)},getLabelForIndex:function(t,e){var n=this,i=n.chart;return i.getDatasetMeta(e).controller._getValueScaleId()===n.id?n.getRightValue(i.data.datasets[e].data[t]):n._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;vi.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var i,r,o,a=this;return yi(e)||yi(n)||(t=a.chart.data.datasets[n].data[e]),yi(t)||(i=a.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(r=a._getLabels(),t=at.valueOrDefault(i,t),e=-1!==(o=r.indexOf(t))?o:e,isNaN(e)&&(e=t)),a.getPixelForDecimal((e-a._startValue)/a._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=this,n=Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange);return Math.min(Math.max(n,0),e.ticks.length-1)},getBasePixel:function(){return this.bottom}}),_i=bi;xi._defaults=_i;var wi=at.noop,Si=at.isNullOrUndef;function Ci(t,e){var n,i,r,o,a=[],s=1e-14,l=t.stepSize,c=l||1,u=t.maxTicks-1,h=t.min,d=t.max,f=t.precision,p=e.min,g=e.max,m=at.niceNum((g-p)/u/c)*c;if(m<s&&Si(h)&&Si(d))return[p,g];u<(o=Math.ceil(g/m)-Math.floor(p/m))&&(m=at.niceNum(o*m/u/c)*c),l||Si(f)?n=Math.pow(10,at._decimalPlaces(m)):(n=Math.pow(10,f),m=Math.ceil(m*n)/n),i=Math.floor(p/m)*m,r=Math.ceil(g/m)*m,l&&(!Si(h)&&at.almostWhole(h/m,m/1e3)&&(i=h),!Si(d)&&at.almostWhole(d/m,m/1e3)&&(r=d)),o=(r-i)/m,o=at.almostEquals(o,Math.round(o),m/1e3)?Math.round(o):Math.ceil(o),i=Math.round(i*n)/n,r=Math.round(r*n)/n,a.push(Si(h)?i:h);for(var v=1;v<o;++v)a.push(Math.round((i+v*m)*n)/n);return a.push(Si(d)?r:d),a}var Ti=vi.extend({getRightValue:function(t){return"string"==typeof t?+t:vi.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=at.sign(t.min),i=at.sign(t.max);n<0&&i<0?t.max=0:0<n&&0<i&&(t.min=0)}var r=void 0!==e.min||void 0!==e.suggestedMin,o=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),r!==o&&t.min>=t.max&&(r?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this,n=e.options.ticks,i=n.stepSize,r=n.maxTicksLimit;return i?t=Math.ceil(e.max/i)-Math.floor(e.min/i)+1:(t=e._computeTickLimit(),r=r||11),r&&(t=Math.min(r,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:wi,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:at.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=Ci(i,t);t.handleDirectionalChanges(),t.max=at.max(r),t.min=at.min(r),e.reverse?(r.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),vi.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),i=e.min,r=e.max;vi.prototype._configure.call(e),e.options.offset&&n.length&&(i-=t=(r-i)/Math.max(n.length-1,1)/2,r+=t),e._startValue=i,e._endValue=r,e._valueRange=r-i}}),$i={position:"left",ticks:{callback:Kn.formatters.linear}},ki=0,Ai=1;function Oi(t,e,n){var i=[n.type,void 0===e&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===t[i]&&(t[i]={pos:[],neg:[]}),t[i]}function Di(t,e,n,i){var r,o,a=t.options,s=Oi(e,a.stacked,n),l=s.pos,c=s.neg,u=i.length;for(r=0;r<u;++r)o=t._parseValue(i[r]),isNaN(o.min)||isNaN(o.max)||n.data[r].hidden||(l[r]=l[r]||0,c[r]=c[r]||0,a.relativePoints?l[r]=100:o.min<0||o.max<0?c[r]+=o.min:l[r]+=o.max)}function Pi(t,e,n){var i,r,o=n.length;for(i=0;i<o;++i)r=t._parseValue(n[i]),isNaN(r.min)||isNaN(r.max)||e.data[i].hidden||(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}var Mi=Ti.extend({determineDataLimits:function(){var t,e,n,i,r=this,o=r.options,a=r.chart.data.datasets,s=r._getMatchingVisibleMetas(),l=o.stacked,c={},u=s.length;if(r.min=Number.POSITIVE_INFINITY,r.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<u;++t)l=void 0!==(e=s[t]).stack;for(t=0;t<u;++t)n=a[(e=s[t]).index].data,l?Di(r,c,e,n):Pi(r,e,n);at.each(c,function(t){i=t.pos.concat(t.neg),r.min=Math.min(r.min,at.min(i)),r.max=Math.max(r.max,at.max(i))}),r.min=at.isFinite(r.min)&&!isNaN(r.min)?r.min:ki,r.max=at.isFinite(r.max)&&!isNaN(r.max)?r.max:Ai,r.handleTickRangeOptions()},_computeTickLimit:function(){var t,e=this;return e.isHorizontal()?Math.ceil(e.width/40):(t=at.options._parseFont(e.options.ticks),Math.ceil(e.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this;return e.getPixelForDecimal((+e.getRightValue(t)-e._startValue)/e._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}}),Ei=$i;Mi._defaults=Ei;var Ii=at.valueOrDefault,Ni=at.math.log10;function Ri(t,e){var n,i,r=[],o=Ii(t.min,Math.pow(10,Math.floor(Ni(e.min)))),a=Math.floor(Ni(e.max)),s=Math.ceil(e.max/Math.pow(10,a));0===o?(n=Math.floor(Ni(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),r.push(o),o=i*Math.pow(10,n)):(n=Math.floor(Ni(o)),i=Math.floor(o/Math.pow(10,n)));for(var l=n<0?Math.pow(10,Math.abs(n)):1;r.push(o),10===++i&&(i=1,l=0<=++n?1:l),o=Math.round(i*Math.pow(10,n)*l)/l,n<a||n===a&&i<s;);var c=Ii(t.max,o);return r.push(c),r}var Li={position:"left",ticks:{callback:Kn.formatters.logarithmic}};function Hi(t,e){return at.isFinite(t)&&0<=t?t:e}var ji=vi.extend({determineDataLimits:function(){var t,e,n,i,r,o,a=this,s=a.options,l=a.chart,c=l.data.datasets,u=a.isHorizontal();function h(t){return u?t.xAxisID===a.id:t.yAxisID===a.id}a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,a.minNotZero=Number.POSITIVE_INFINITY;var d=s.stacked;if(void 0===d)for(t=0;t<c.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e)&&void 0!==e.stack){d=!0;break}if(s.stacked||d){var f={};for(t=0;t<c.length;t++){var p=[(e=l.getDatasetMeta(t)).type,void 0===s.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&h(e))for(void 0===f[p]&&(f[p]=[]),r=0,o=(i=c[t].data).length;r<o;r++){var g=f[p];n=a._parseValue(i[r]),isNaN(n.min)||isNaN(n.max)||e.data[r].hidden||n.min<0||n.max<0||(g[r]=g[r]||0,g[r]+=n.max)}}at.each(f,function(t){if(0<t.length){var e=at.min(t),n=at.max(t);a.min=Math.min(a.min,e),a.max=Math.max(a.max,n)}})}else for(t=0;t<c.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e))for(r=0,o=(i=c[t].data).length;r<o;r++)n=a._parseValue(i[r]),isNaN(n.min)||isNaN(n.max)||e.data[r].hidden||n.min<0||n.max<0||(a.min=Math.min(n.min,a.min),a.max=Math.max(n.max,a.max),0!==n.min&&(a.minNotZero=Math.min(n.min,a.minNotZero)));a.min=at.isFinite(a.min)?a.min:null,a.max=at.isFinite(a.max)?a.max:null,a.minNotZero=at.isFinite(a.minNotZero)?a.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks,n=1,i=10;t.min=Hi(e.min,t.min),t.max=Hi(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(Ni(t.min))-1),t.max=Math.pow(10,Math.floor(Ni(t.max))+1)):(t.min=n,t.max=i)),null===t.min&&(t.min=Math.pow(10,Math.floor(Ni(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(Ni(t.min))+1):i),null===t.minNotZero&&(0<t.min?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(Ni(t.max))):t.minNotZero=n)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:Hi(e.min),max:Hi(e.max)},r=t.ticks=Ri(i,t);t.max=at.max(r),t.min=at.min(r),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&r.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),vi.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(Ni(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;vi.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=Ii(t.options.ticks.fontSize,Q.global.defaultFontSize)/t._length),t._startValue=Ni(e),t._valueOffset=n,t._valueRange=(Ni(t.max)-Ni(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&0<t&&(n=(Ni(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),Fi=Li;ji._defaults=Fi;var zi=at.valueOrDefault,Bi=at.valueAtIndexOrDefault,Vi=at.options.resolve,Wi={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:Kn.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function qi(t){var e=t.ticks;return e.display&&t.display?zi(e.fontSize,Q.global.defaultFontSize)+2*e.backdropPaddingY:0}function Ui(t,e,n){return at.isArray(n)?{w:at.longestText(t,t.font,n),h:n.length*e}:{w:t.measureText(n).width,h:e}}function Ji(t,e,n,i,r){return t===i||t===r?{start:e-n/2,end:e+n/2}:t<i||r<t?{start:e-n,end:e}:{start:e,end:e+n}}function Gi(t){var e,n,i,r=at.options._parseFont(t.options.pointLabels),o={l:0,r:t.width,t:0,b:t.height-t.paddingTop},a={};t.ctx.font=r.string,t._pointLabelSizes=[];var s=t.chart.data.labels.length;for(e=0;e<s;e++){i=t.getPointPosition(e,t.drawingArea+5),n=Ui(t.ctx,r.lineHeight,t.pointLabels[e]),t._pointLabelSizes[e]=n;var l=t.getIndexAngle(e),c=at.toDegrees(l)%360,u=Ji(c,i.x,n.w,0,180),h=Ji(c,i.y,n.h,90,270);u.start<o.l&&(o.l=u.start,a.l=l),u.end>o.r&&(o.r=u.end,a.r=l),h.start<o.t&&(o.t=h.start,a.t=l),h.end>o.b&&(o.b=h.end,a.b=l)}t.setReductions(t.drawingArea,o,a)}function Yi(t){return 0===t||180===t?"center":t<180?"left":"right"}function Xi(t,e,n,i){var r,o,a=n.y+i/2;if(at.isArray(e))for(r=0,o=e.length;r<o;++r)t.fillText(e[r],n.x,a),a+=i;else t.fillText(e,n.x,a)}function Ki(t,e,n){90===t||270===t?n.y-=e.h/2:(270<t||t<90)&&(n.y-=e.h)}function Qi(t){var e=t.ctx,n=t.options,i=n.pointLabels,r=qi(n),o=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),a=at.options._parseFont(i);e.save(),e.font=a.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;0<=s;s--){var l=0===s?r/2:0,c=t.getPointPosition(s,o+l+5),u=Bi(i.fontColor,s,Q.global.defaultFontColor);e.fillStyle=u;var h=t.getIndexAngle(s),d=at.toDegrees(h);e.textAlign=Yi(d),Ki(d,t._pointLabelSizes[s],c),Xi(e,t.pointLabels[s],c,a.lineHeight)}e.restore()}function Zi(t,e,n,i){var r,o=t.ctx,a=e.circular,s=t.chart.data.labels.length,l=Bi(e.color,i-1),c=Bi(e.lineWidth,i-1);if((a||s)&&l&&c){if(o.save(),o.strokeStyle=l,o.lineWidth=c,o.setLineDash&&(o.setLineDash(e.borderDash||[]),o.lineDashOffset=e.borderDashOffset||0),o.beginPath(),a)o.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{r=t.getPointPosition(0,n),o.moveTo(r.x,r.y);for(var u=1;u<s;u++)r=t.getPointPosition(u,n),o.lineTo(r.x,r.y)}o.closePath(),o.stroke(),o.restore()}}function tr(t){return at.isNumber(t)?t:0}var er=Ti.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=qi(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var r=this,n=r.chart,o=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;at.each(n.data.datasets,function(t,e){if(n.isDatasetVisible(e)){var i=n.getDatasetMeta(e);at.each(t.data,function(t,e){var n=+r.getRightValue(t);isNaN(n)||i.data[e].hidden||(o=Math.min(n,o),a=Math.max(n,a))})}}),r.min=o===Number.POSITIVE_INFINITY?0:o,r.max=a===Number.NEGATIVE_INFINITY?0:a,r.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/qi(this.options))},convertTicksToLabels:function(){var e=this;Ti.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(function(){var t=at.callback(e.options.pointLabels.callback,arguments,e);return t||0===t?t:""})},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this,e=t.options;e.display&&e.pointLabels.display?Gi(t):t.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,r=e.l/Math.sin(n.l),o=Math.max(e.r-i.width,0)/Math.sin(n.r),a=-e.t/Math.cos(n.t),s=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(n.b);r=tr(r),o=tr(o),a=tr(a),s=tr(s),i.drawingArea=Math.min(Math.floor(t-(r+o)/2),Math.floor(t-(a+s)/2)),i.setCenterPoint(r,o,a,s)},setCenterPoint:function(t,e,n,i){var r=this,o=r.width-e-r.drawingArea,a=t+r.drawingArea,s=n+r.drawingArea,l=r.height-r.paddingTop-i-r.drawingArea;r.xCenter=Math.floor((a+o)/2+r.left),r.yCenter=Math.floor((s+l)/2+r.top+r.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(at.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,i=n.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(i)*e+n.xCenter,y:Math.sin(i)*e+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this,n=e.min,i=e.max;return e.getPointPositionForValue(t||0,e.beginAtZero?0:n<0&&i<0?i:0<n&&0<i?n:0)},_drawGrid:function(){var t,n,e,i=this,r=i.ctx,o=i.options,a=o.gridLines,s=o.angleLines,l=zi(s.lineWidth,a.lineWidth),c=zi(s.color,a.color);if(o.pointLabels.display&&Qi(i),a.display&&at.each(i.ticks,function(t,e){0!==e&&(n=i.getDistanceFromCenterForValue(i.ticksAsNumbers[e]),Zi(i,a,n,e))}),s.display&&l&&c){for(r.save(),r.lineWidth=l,r.strokeStyle=c,r.setLineDash&&(r.setLineDash(Vi([s.borderDash,a.borderDash,[]])),r.lineDashOffset=Vi([s.borderDashOffset,a.borderDashOffset,0])),t=i.chart.data.labels.length-1;0<=t;t--)n=i.getDistanceFromCenterForValue(o.ticks.reverse?i.min:i.max),e=i.getPointPosition(t,n),r.beginPath(),r.moveTo(i.xCenter,i.yCenter),r.lineTo(e.x,e.y),r.stroke();r.restore()}},_drawLabels:function(){var n=this,i=n.ctx,r=n.options.ticks;if(r.display){var o,a,t=n.getIndexAngle(0),s=at.options._parseFont(r),l=zi(r.fontColor,Q.global.defaultFontColor);i.save(),i.font=s.string,i.translate(n.xCenter,n.yCenter),i.rotate(t),i.textAlign="center",i.textBaseline="middle",at.each(n.ticks,function(t,e){(0!==e||r.reverse)&&(o=n.getDistanceFromCenterForValue(n.ticksAsNumbers[e]),r.showLabelBackdrop&&(a=i.measureText(t).width,i.fillStyle=r.backdropColor,i.fillRect(-a/2-r.backdropPaddingX,-o-s.size/2-r.backdropPaddingY,a+2*r.backdropPaddingX,s.size+2*r.backdropPaddingY)),i.fillStyle=l,i.fillText(t,0,-o))}),i.restore()}},_drawTitle:at.noop}),nr=Wi;er._defaults=nr;var ir=at._deprecated,rr=at.options.resolve,or=at.valueOrDefault,ar=Number.MIN_SAFE_INTEGER||-9007199254740991,sr=Number.MAX_SAFE_INTEGER||9007199254740991,lr={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},cr=Object.keys(lr);function ur(t,e){return t-e}function hr(t){var e,n,i,r={},o=[];for(e=0,n=t.length;e<n;++e)r[i=t[e]]||(r[i]=!0,o.push(i));return o}function dr(t){return at.valueOrDefault(t.time.min,t.ticks.min)}function fr(t){return at.valueOrDefault(t.time.max,t.ticks.max)}function pr(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var r,o,a,s,l,c=[],u=[e];for(r=0,o=t.length;r<o;++r)e<(s=t[r])&&s<n&&u.push(s);for(u.push(n),r=0,o=u.length;r<o;++r)l=u[r+1],a=u[r-1],s=u[r],void 0!==a&&void 0!==l&&Math.round((l+a)/2)===s||c.push({time:s,pos:r/(o-1)});return c}function gr(t,e,n){for(var i,r,o,a=0,s=t.length-1;0<=a&&a<=s;){if(r=t[(i=a+s>>1)-1]||null,o=t[i],!r)return{lo:null,hi:o};if(o[e]<n)a=i+1;else{if(!(r[e]>n))return{lo:r,hi:o};s=i-1}}return{lo:o,hi:null}}function mr(t,e,n,i){var r=gr(t,e,n),o=r.lo?r.hi?r.lo:t[t.length-2]:t[0],a=r.lo?r.hi?r.hi:t[t.length-1]:t[1],s=a[e]-o[e],l=s?(n-o[e])/s:0,c=(a[i]-o[i])*l;return o[i]+c}function vr(t,e){var n=t._adapter,i=t.options.time,r=i.parser,o=r||i.format,a=e;return"function"==typeof r&&(a=r(a)),at.isFinite(a)||(a="string"==typeof o?n.parse(a,o):n.parse(a)),null!==a?+a:(r||"function"!=typeof o||(a=o(e),at.isFinite(a)||(a=n.parse(a))),a)}function yr(t,e){if(at.isNullOrUndef(e))return null;var n=t.options.time,i=vr(t,t.getRightValue(e));return null===i||n.round&&(i=+t._adapter.startOf(i,n.round)),i}function br(t,e,n,i){var r,o,a,s=cr.length;for(r=cr.indexOf(t);r<s-1;++r)if(a=(o=lr[cr[r]]).steps?o.steps:sr,o.common&&Math.ceil((n-e)/(a*o.size))<=i)return cr[r];return cr[s-1]}function xr(t,e,n,i,r){var o,a;for(o=cr.length-1;o>=cr.indexOf(n);o--)if(a=cr[o],lr[a].common&&t._adapter.diff(r,i,a)>=e-1)return a;return cr[n?cr.indexOf(n):0]}function _r(t){for(var e=cr.indexOf(t)+1,n=cr.length;e<n;++e)if(lr[cr[e]].common)return cr[e]}function wr(t,e,n,i){var r,o=t._adapter,a=t.options,s=a.time,l=s.unit||br(s.minUnit,e,n,i),c=rr([s.stepSize,s.unitStepSize,1]),u="week"===l&&s.isoWeekday,h=e,d=[];if(u&&(h=+o.startOf(h,"isoWeek",u)),h=+o.startOf(h,u?"day":l),o.diff(n,e,l)>1e5*c)throw e+" and "+n+" are too far apart with stepSize of "+c+" "+l;for(r=h;r<n;r=+o.add(r,c,l))d.push(r);return r!==n&&"ticks"!==a.bounds||d.push(r),d}function Sr(t,e,n,i,r){var o,a,s=0,l=0;return r.offset&&e.length&&(o=mr(t,"time",e[0],"pos"),s=1===e.length?1-o:(mr(t,"time",e[1],"pos")-o)/2,a=mr(t,"time",e[e.length-1],"pos"),l=1===e.length?a:(a-mr(t,"time",e[e.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}function Cr(t,e,n,i){var r,o,a=t._adapter,s=+a.startOf(e[0].value,i),l=e[e.length-1].value;for(r=s;r<=l;r=+a.add(r,1,i))0<=(o=n[r])&&(e[o].major=!0);return e}function Tr(t,e,n){var i,r,o=[],a={},s=e.length;for(i=0;i<s;++i)a[r=e[i]]=i,o.push({value:r,major:!1});return 0!==s&&n?Cr(t,o,a,n):o}var $r={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}},kr=vi.extend({initialize:function(){this.mergeTicksOptions(),vi.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),i=t._adapter=new Xn._date(e.adapters.date);return ir("time scale",n.format,"time.format","time.parser"),ir("time scale",n.min,"time.min","ticks.min"),ir("time scale",n.max,"time.max","ticks.max"),at.mergeIf(n.displayFormats,i.formats()),vi.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),vi.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,i,r,o,a,s=this,l=s.chart,c=s._adapter,u=s.options,h=u.time.unit||"day",d=sr,f=ar,p=[],g=[],m=[],v=s._getLabels();for(t=0,n=v.length;t<n;++t)m.push(yr(s,v[t]));for(t=0,n=(l.data.datasets||[]).length;t<n;++t)if(l.isDatasetVisible(t))if(r=l.data.datasets[t].data,at.isObject(r[0]))for(g[t]=[],e=0,i=r.length;e<i;++e)o=yr(s,r[e]),p.push(o),g[t][e]=o;else g[t]=m.slice(0),a||(p=p.concat(m),a=!0);else g[t]=[];m.length&&(d=Math.min(d,m[0]),f=Math.max(f,m[m.length-1])),p.length&&(p=1<n?hr(p).sort(ur):p.sort(ur),d=Math.min(d,p[0]),f=Math.max(f,p[p.length-1])),d=yr(s,dr(u))||d,f=yr(s,fr(u))||f,d=d===sr?+c.startOf(Date.now(),h):d,f=f===ar?+c.endOf(Date.now(),h)+1:f,s.min=Math.min(d,f),s.max=Math.max(d+1,f),s._table=[],s._timestamps={data:p,datasets:g,labels:m}},buildTicks:function(){var t,e,n,i=this,r=i.min,o=i.max,a=i.options,s=a.ticks,l=a.time,c=i._timestamps,u=[],h=i.getLabelCapacity(r),d=s.source,f=a.distribution;for(c="data"===d||"auto"===d&&"series"===f?c.data:"labels"===d?c.labels:wr(i,r,o,h),"ticks"===a.bounds&&c.length&&(r=c[0],o=c[c.length-1]),r=yr(i,dr(a))||r,o=yr(i,fr(a))||o,t=0,e=c.length;t<e;++t)r<=(n=c[t])&&n<=o&&u.push(n);return i.min=r,i.max=o,i._unit=l.unit||(s.autoSkip?br(l.minUnit,i.min,i.max,h):xr(i,u.length,l.minUnit,i.min,i.max)),i._majorUnit=s.major.enabled&&"year"!==i._unit?_r(i._unit):void 0,i._table=pr(i._timestamps.data,r,o,f),i._offsets=Sr(i._table,u,r,o,a),s.reverse&&u.reverse(),Tr(i,u,i._majorUnit)},getLabelForIndex:function(t,e){var n=this,i=n._adapter,r=n.chart.data,o=n.options.time,a=r.labels&&t<r.labels.length?r.labels[t]:"",s=r.datasets[e].data[t];return at.isObject(s)&&(a=n.getRightValue(s)),o.tooltipFormat?i.format(vr(n,a),o.tooltipFormat):"string"==typeof a?a:i.format(vr(n,a),o.displayFormats.datetime)},tickFormatFunction:function(t,e,n,i){var r=this,o=r._adapter,a=r.options,s=a.time.displayFormats,l=s[r._unit],c=r._majorUnit,u=s[c],h=n[e],d=a.ticks,f=c&&u&&h&&h.major,p=o.format(t,i||(f?u:l)),g=f?d.major:d.minor,m=rr([g.callback,g.userCallback,d.callback,d.userCallback]);return m?m(p,e,n):p},convertTicksToLabels:function(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(this.tickFormatFunction(t[e].value,e,t));return i},getPixelForOffset:function(t){var e=this,n=e._offsets,i=mr(e._table,"time",t,"pos");return e.getPixelForDecimal((n.start+i)*n.factor)},getPixelForValue:function(t,e,n){var i=this,r=null;if(void 0!==e&&void 0!==n&&(r=i._timestamps.datasets[n][e]),null===r&&(r=yr(i,t)),null!==r)return i.getPixelForOffset(r)},getPixelForTick:function(t){var e=this.getTicks();return 0<=t&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this,n=e._offsets,i=e.getDecimalForPixel(t)/n.factor-n.end,r=mr(e._table,"pos",i,"time");return e._adapter._create(r)},_getLabelSize:function(t){var e=this,n=e.options.ticks,i=e.ctx.measureText(t).width,r=at.toRadians(e.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(r),a=Math.sin(r),s=or(n.fontSize,Q.global.defaultFontSize);return{w:i*o+s*a,h:i*a+s*o}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,n=e.options.time,i=n.displayFormats,r=i[n.unit]||i.millisecond,o=e.tickFormatFunction(t,0,Tr(e,[t],e._majorUnit),r),a=e._getLabelSize(o),s=Math.floor(e.isHorizontal()?e.width/a.w:e.height/a.h);return e.options.offset&&s--,0<s?s:1}}),Ar=$r;kr._defaults=Ar;var Or={category:xi,linear:Mi,logarithmic:ji,radialLinear:er,time:kr},Dr={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Xn._date.override("function"==typeof i?{_id:"moment",formats:function(){return Dr},parse:function(t,e){return"string"==typeof t&&"string"==typeof e?t=i(t,e):t instanceof i||(t=i(t)),t.isValid()?t.valueOf():null},format:function(t,e){return i(t).format(e)},add:function(t,e,n){return i(t).add(e,n).valueOf()},diff:function(t,e,n){return i(t).diff(i(e),n)},startOf:function(t,e,n){return t=i(t),"isoWeek"===e?t.isoWeekday(n).valueOf():t.startOf(e).valueOf()},endOf:function(t,e){return i(t).endOf(e).valueOf()},_create:function(t){return i(t)}}:{}),Q._set("global",{plugins:{filler:{propagate:!0}}});var Pr={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),r=i&&n.isDatasetVisible(e)&&i.dataset._children||[],o=r.length||0;return o?function(t,e){return e<o&&r[e]._view||null}:null},boundary:function(t){var n=t.boundary,e=n?n.x:null,i=n?n.y:null;return at.isArray(n)?function(t,e){return n[e]}:function(t){return{x:null===e?t.x:e,y:null===i?t.y:i}}}};function Mr(t,e,n){var i,r=t._model||{},o=r.fill;if(void 0===o&&(o=!!r.backgroundColor),!1===o||null===o)return!1;if(!0===o)return"origin";if(i=parseFloat(o,10),isFinite(i)&&Math.floor(i)===i)return"-"!==o[0]&&"+"!==o[0]||(i=e+i),!(i===e||i<0||n<=i)&&i;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function Er(t){var e,n=t.el._model||{},i=t.el._scale||{},r=t.fill,o=null;if(isFinite(r))return null;if("start"===r?o=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===r?o=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?o=n.scaleZero:i.getBasePixel&&(o=i.getBasePixel()),null!=o){if(void 0!==o.x&&void 0!==o.y)return o;if(at.isFinite(o))return{x:(e=i.isHorizontal())?o:null,y:e?null:o}}return null}function Ir(t){var e,n,i,r,o,a=t.el._scale,s=a.options,l=a.chart.data.labels.length,c=t.fill,u=[];if(!l)return null;for(e=s.ticks.reverse?a.max:a.min,n=s.ticks.reverse?a.min:a.max,i=a.getPointPositionForValue(0,e),r=0;r<l;++r)o="start"===c||"end"===c?a.getPointPositionForValue(r,"start"===c?e:n):a.getBasePosition(r),s.gridLines.circular&&(o.cx=i.x,o.cy=i.y,o.angle=a.getIndexAngle(r)-Math.PI/2),u.push(o);return u}function Nr(t){return(t.el._scale||{}).getPointPositionForValue?Ir(t):Er(t)}function Rr(t,e,n){var i,r=t[e].fill,o=[e];if(!n)return r;for(;!1!==r&&-1===o.indexOf(r);){if(!isFinite(r))return r;if(!(i=t[r]))return!1;if(i.visible)return r;o.push(r),r=i.fill}return!1}function Lr(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),Pr[n](t))}function Hr(t){return t&&!t.skip}function jr(t,e,n,i,r){var o,a,s,l;if(i&&r){for(t.moveTo(e[0].x,e[0].y),o=1;o<i;++o)at.canvas.lineTo(t,e[o-1],e[o]);if(void 0===n[0].angle)for(t.lineTo(n[r-1].x,n[r-1].y),o=r-1;0<o;--o)at.canvas.lineTo(t,n[o],n[o-1],!0);else for(a=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-a,2)+Math.pow(n[0].y-s,2)),o=r-1;0<o;--o)t.arc(a,s,l,n[o].angle,n[o-1].angle,!0)}}function Fr(t,e,n,i,r,o){var a,s,l,c,u,h,d,f,p=e.length,g=i.spanGaps,m=[],v=[],y=0,b=0;for(t.beginPath(),a=0,s=p;a<s;++a)u=n(c=e[l=a%p]._view,l,i),h=Hr(c),d=Hr(u),o&&void 0===f&&h&&(s=p+(f=a+1)),h&&d?(y=m.push(c),b=v.push(u)):y&&b&&(g?(h&&m.push(c),d&&v.push(u)):(jr(t,m,v,y,b),y=b=0,m=[],v=[]));jr(t,m,v,y,b),t.closePath(),t.fillStyle=r,t.fill()}var zr={id:"filler",afterDatasetsUpdate:function(t,e){var n,i,r,o,a=(t.data.datasets||[]).length,s=e.propagate,l=[];for(i=0;i<a;++i)o=null,(r=(n=t.getDatasetMeta(i)).dataset)&&r._model&&r instanceof Ut.Line&&(o={visible:t.isDatasetVisible(i),fill:Mr(r,i,a),chart:t,el:r}),n.$filler=o,l.push(o);for(i=0;i<a;++i)(o=l[i])&&(o.fill=Rr(l,i,s),o.boundary=Nr(o),o.mapper=Lr(o))},beforeDatasetsDraw:function(t){var e,n,i,r,o,a,s,l=t._getSortedVisibleDatasetMetas(),c=t.ctx;for(n=l.length-1;0<=n;--n)(e=l[n].$filler)&&e.visible&&(r=(i=e.el)._view,o=i._children||[],a=e.mapper,s=r.backgroundColor||Q.global.defaultColor,a&&s&&o.length&&(at.canvas.clipArea(c,t.chartArea),Fr(c,o,a,r,s,i._loop),at.canvas.unclipArea(c)))}},Br=at.rtl.getRtlAdapter,Vr=at.noop,Wr=at.valueOrDefault;function qr(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}Q._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,r=i.getDatasetMeta(n);r.hidden=null===r.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(n){var i=n.data.datasets,t=n.options.legend||{},r=t.labels&&t.labels.usePointStyle;return n._getSortedDatasetMetas().map(function(t){var e=t.controller.getStyle(r?0:void 0);return{text:i[t.index].label,fillStyle:e.backgroundColor,hidden:!n.isDatasetVisible(t.index),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,rotation:e.rotation,datasetIndex:t.index}},this)}}},legendCallback:function(t){var e,n,i,r=document.createElement("ul"),o=t.data.datasets;for(r.setAttribute("class",t.id+"-legend"),e=0,n=o.length;e<n;e++)(i=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[e].backgroundColor,o[e].label&&i.appendChild(document.createTextNode(o[e].label));return r.outerHTML}});var Ur=pt.extend({initialize:function(t){var e=this;at.extend(e,t),e.legendHitBoxes=[],e._hoveredItem=null,e.doughnutMode=!1},beforeUpdate:Vr,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Vr,beforeSetDimensions:Vr,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Vr,beforeBuildLabels:Vr,buildLabels:function(){var e=this,n=e.options.labels||{},t=at.callback(n.generateLabels,[e.chart],e)||[];n.filter&&(t=t.filter(function(t){return n.filter(t,e.chart.data)})),e.options.reverse&&t.reverse(),e.legendItems=t},afterBuildLabels:Vr,beforeFit:Vr,fit:function(){var t=this,e=t.options,i=e.labels,n=e.display,r=t.ctx,o=at.options._parseFont(i),a=o.size,s=t.legendHitBoxes=[],l=t.minSize,c=t.isHorizontal();if(l.height=c?(l.width=t.maxWidth,n?10:0):(l.width=n?10:0,t.maxHeight),n){if(r.font=o.string,c){var u=t.lineWidths=[0],h=0;r.textAlign="left",r.textBaseline="middle",at.each(t.legendItems,function(t,e){var n=qr(i,a)+a/2+r.measureText(t.text).width;(0===e||u[u.length-1]+n+2*i.padding>l.width)&&(h+=a+i.padding,u[u.length-(0<e?0:1)]=0),s[e]={left:0,top:0,width:n,height:a},u[u.length-1]+=n+i.padding}),l.height+=h}else{var d=i.padding,f=t.columnWidths=[],p=t.columnHeights=[],g=i.padding,m=0,v=0;at.each(t.legendItems,function(t,e){var n=qr(i,a)+a/2+r.measureText(t.text).width;0<e&&v+a+2*d>l.height&&(g+=m+i.padding,f.push(m),p.push(v),v=m=0),m=Math.max(m,n),v+=a+d,s[e]={left:0,top:0,width:n,height:a}}),g+=m,f.push(m),p.push(v),l.width+=g}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:Vr,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var s=this,n=s.options,l=n.labels,t=Q.global,c=t.defaultColor,u=t.elements.line,h=s.height,d=s.columnHeights,f=s.width,p=s.lineWidths;if(n.display){var g,m=Br(n.rtl,s.left,s.minSize.width),v=s.ctx,e=Wr(l.fontColor,t.defaultFontColor),i=at.options._parseFont(l),y=i.size;v.textAlign=m.textAlign("left"),v.textBaseline="middle",v.lineWidth=.5,v.strokeStyle=e,v.fillStyle=e,v.font=i.string;var b=qr(l,y),x=s.legendHitBoxes,_=function(t,e,n){if(!(isNaN(b)||b<=0)){v.save();var i=Wr(n.lineWidth,u.borderWidth);if(v.fillStyle=Wr(n.fillStyle,c),v.lineCap=Wr(n.lineCap,u.borderCapStyle),v.lineDashOffset=Wr(n.lineDashOffset,u.borderDashOffset),v.lineJoin=Wr(n.lineJoin,u.borderJoinStyle),v.lineWidth=i,v.strokeStyle=Wr(n.strokeStyle,c),v.setLineDash&&v.setLineDash(Wr(n.lineDash,u.borderDash)),l&&l.usePointStyle){var r=b*Math.SQRT2/2,o=m.xPlus(t,b/2),a=e+y/2;at.canvas.drawPoint(v,n.pointStyle,r,o,a,n.rotation)}else v.fillRect(m.leftForLtr(t,b),e,b,y),0!==i&&v.strokeRect(m.leftForLtr(t,b),e,b,y);v.restore()}},w=function(t,e,n,i){var r=y/2,o=m.xPlus(t,b+r),a=e+r;v.fillText(n.text,o,a),n.hidden&&(v.beginPath(),v.lineWidth=2,v.moveTo(o,a),v.lineTo(m.xPlus(o,i),a),v.stroke())},S=function(t,e){switch(n.align){case"start":return l.padding;case"end":return t-e;default:return(t-e+l.padding)/2}},C=s.isHorizontal();g=C?{x:s.left+S(f,p[0]),y:s.top+l.padding,line:0}:{x:s.left+l.padding,y:s.top+S(h,d[0]),line:0},at.rtl.overrideTextDirection(s.ctx,n.textDirection);var T=y+l.padding;at.each(s.legendItems,function(t,e){var n=v.measureText(t.text).width,i=b+y/2+n,r=g.x,o=g.y;m.setWidth(s.minSize.width),C?0<e&&r+i+l.padding>s.left+s.minSize.width&&(o=g.y+=T,g.line++,r=g.x=s.left+S(f,p[g.line])):0<e&&o+T>s.top+s.minSize.height&&(r=g.x=r+s.columnWidths[g.line]+l.padding,g.line++,o=g.y=s.top+S(h,d[g.line]));var a=m.x(r);_(a,o,t),x[e].left=m.leftForLtr(a,x[e].width),x[e].top=o,w(a,o,t,n),C?g.x+=i+l.padding:g.y+=T}),at.rtl.restoreTextDirection(s.ctx,n.textDirection)}},_getLegendItemAt:function(t,e){var n,i,r,o=this;if(t>=o.left&&t<=o.right&&e>=o.top&&e<=o.bottom)for(r=o.legendHitBoxes,n=0;n<r.length;++n)if(t>=(i=r[n]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return o.legendItems[n];return null},handleEvent:function(t){var e,n=this,i=n.options,r="mouseup"===t.type?"click":t.type;if("mousemove"===r){if(!i.onHover&&!i.onLeave)return}else{if("click"!==r)return;if(!i.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===r?e&&i.onClick&&i.onClick.call(n,t.native,e):(i.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),i.onHover&&e&&i.onHover.call(n,t.native,e))}});function Jr(t,e){var n=new Ur({ctx:t.ctx,options:e,chart:t});We.configure(t,n,e),We.addBox(t,n),t.legend=n}var Gr={id:"legend",_element:Ur,beforeInit:function(t){var e=t.options.legend;e&&Jr(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(at.mergeIf(e,Q.global.legend),n?(We.configure(t,n,e),n.options=e):Jr(t,e)):n&&(We.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Yr=at.noop;Q._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Xr=pt.extend({initialize:function(t){var e=this;at.extend(e,t),e.legendHitBoxes=[]},beforeUpdate:Yr,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Yr,beforeSetDimensions:Yr,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Yr,beforeBuildLabels:Yr,buildLabels:Yr,afterBuildLabels:Yr,beforeFit:Yr,fit:function(){var t,e=this,n=e.options,i=e.minSize={},r=e.isHorizontal();n.display?(t=(at.isArray(n.text)?n.text.length:1)*at.options._parseFont(n).lineHeight+2*n.padding,e.width=i.width=r?e.maxWidth:t,e.height=i.height=r?t:e.maxHeight):e.width=i.width=e.height=i.height=0},afterFit:Yr,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var i,r,o,a=at.options._parseFont(n),s=a.lineHeight,l=s/2+n.padding,c=0,u=t.top,h=t.left,d=t.bottom,f=t.right;e.fillStyle=at.valueOrDefault(n.fontColor,Q.global.defaultFontColor),e.font=a.string,t.isHorizontal()?(r=h+(f-h)/2,o=u+l,i=f-h):(r="left"===n.position?h+l:f-l,o=u+(d-u)/2,i=d-u,c=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(r,o),e.rotate(c),e.textAlign="center",e.textBaseline="middle";var p=n.text;if(at.isArray(p))for(var g=0,m=0;m<p.length;++m)e.fillText(p[m],0,g,i),g+=s;else e.fillText(p,0,0,i);e.restore()}}});function Kr(t,e){var n=new Xr({ctx:t.ctx,options:e,chart:t});We.configure(t,n,e),We.addBox(t,n),t.titleBlock=n}var Qr={},Zr=zr,to=Gr,eo={id:"title",_element:Xr,beforeInit:function(t){var e=t.options.title;e&&Kr(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(at.mergeIf(e,Q.global.title),n?(We.configure(t,n,e),n.options=e):Kr(t,e)):n&&(We.removeBox(t,n),delete t.titleBlock)}};for(var no in Qr.filler=Zr,Qr.legend=to,Qr.title=eo,Un.helpers=at,Jn(),Un._adapters=Xn,Un.Animation=mt,Un.animationService=vt,Un.controllers=Ce,Un.DatasetController=St,Un.defaults=Q,Un.Element=pt,Un.elements=Ut,Un.Interaction=Pe,Un.layouts=We,Un.platform=bn,Un.plugins=xn,Un.Scale=vi,Un.scaleService=_n,Un.Ticks=Kn,Un.Tooltip=Rn,Un.helpers.each(Or,function(t,e){Un.scaleService.registerScaleType(e,t,t._defaults)}),Qr)Qr.hasOwnProperty(no)&&Un.plugins.register(Qr[no]);Un.platform.initialize();var io=Un;return"undefined"!=typeof window&&(window.Chart=Un),(Un.Chart=Un).Legend=Qr.legend._element,Un.Title=Qr.title._element,Un.pluginService=Un.plugins,Un.PluginBase=Un.Element.extend({}),Un.canvasHelpers=Un.helpers.canvas,Un.layoutService=Un.layouts,Un.LinearScaleBase=Ti,Un.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(n){Un[n]=function(t,e){return new Un(t,Un.helpers.merge(e||{},{type:n.charAt(0).toLowerCase()+n.slice(1)}))}}),io}),
/**
 * @license AngularJS v1.4.14
 * (c) 2010-2015 Google, Inc. http://angularjs.org
 * License: MIT
 */
function(t,b,e){"use strict";var n=b.module("ngTouch",[]);function f(t){return b.lowercase(t.nodeName||t[0]&&t[0].nodeName)}function i(f,p,g){n.directive(f,["$parse","$swipe",function(l,c){var u=75,h=.3,d=30;return function(n,i,t){var r,o,a=l(t[f]);function s(t){if(!r)return!1;var e=Math.abs(t.y-r.y),n=(t.x-r.x)*p;return o&&e<u&&0<n&&d<n&&e/n<h}var e=["touch"];b.isDefined(t.ngSwipeDisableMouse)||e.push("mouse"),c.bind(i,{start:function(t,e){r=t,o=!0},cancel:function(t){o=!1},end:function(t,e){s(t)&&n.$apply(function(){i.triggerHandler(g),a(n,{$event:e})})}},e)}}])}n.factory("$swipe",[function(){var c=10,r={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"}};function u(t){var e=t.originalEvent||t,n=e.touches&&e.touches.length?e.touches:[e],i=e.changedTouches&&e.changedTouches[0]||n[0];return{x:i.clientX,y:i.clientY}}function h(t,n){var i=[];return b.forEach(t,function(t){var e=r[t][n];e&&i.push(e)}),i.join(" ")}return{bind:function(t,n,e){var i,r,o,a,s=!1;e=e||["mouse","touch"],t.on(h(e,"start"),function(t){o=u(t),s=!0,r=i=0,a=o,n.start&&n.start(o,t)});var l=h(e,"cancel");l&&t.on(l,function(t){s=!1,n.cancel&&n.cancel(t)}),t.on(h(e,"move"),function(t){if(s&&o){var e=u(t);if(i+=Math.abs(e.x-a.x),r+=Math.abs(e.y-a.y),a=e,!(i<c&&r<c))return i<r?(s=!1,void(n.cancel&&n.cancel(t))):(t.preventDefault(),void(n.move&&n.move(e,t)))}}),t.on(h(e,"end"),function(t){s&&(s=!1,n.end&&n.end(u(t),t))})}}}]),n.config(["$provide",function(t){t.decorator("ngClickDirective",["$delegate",function(t){return t.shift(),t}])}]),n.directive("ngClick",["$parse","$timeout","$rootElement",function(t,r,n){var o,a,s,g=750,m=12,l=2500,c=25,v="ng-click-active";function u(t,e,n,i){return Math.abs(t-n)<c&&Math.abs(e-i)<c}function h(t,e,n){for(var i=0;i<t.length;i+=2)if(u(t[i],t[i+1],e,n))return t.splice(i,i+2),!0;return!1}function i(t){if(!(Date.now()-o>l)){var e=t.touches&&t.touches.length?t.touches:[t],n=e[0].clientX,i=e[0].clientY;n<1&&i<1||s&&s[0]===n&&s[1]===i||(s&&(s=null),"label"===f(t.target)&&(s=[n,i]),h(a,n,i)||(t.stopPropagation(),t.preventDefault(),t.target&&t.target.blur&&t.target.blur()))}}function d(t){var e=t.touches&&t.touches.length?t.touches:[t],n=e[0].clientX,i=e[0].clientY;a.push(n,i),r(function(){for(var t=0;t<a.length;t+=2)if(a[t]==n&&a[t+1]==i)return void a.splice(t,t+2)},l,!1)}function y(t,e){a||(n[0].addEventListener("click",i,!0),n[0].addEventListener("touchstart",d,!0),a=[]),o=Date.now(),h(a,t,e)}return function(n,s,l){var c,u,h,d,i=t(l.ngClick),f=!1;function p(){f=!1,s.removeClass(v)}s.on("touchstart",function(t){f=!0,3==(c=t.target?t.target:t.srcElement).nodeType&&(c=c.parentNode),s.addClass(v),u=Date.now();var e=t.originalEvent||t,n=(e.touches&&e.touches.length?e.touches:[e])[0];h=n.clientX,d=n.clientY}),s.on("touchcancel",function(t){p()}),s.on("touchend",function(t){var e=Date.now()-u,n=t.originalEvent||t,i=(n.changedTouches&&n.changedTouches.length?n.changedTouches:n.touches&&n.touches.length?n.touches:[n])[0],r=i.clientX,o=i.clientY,a=Math.sqrt(Math.pow(r-h,2)+Math.pow(o-d,2));f&&e<g&&a<m&&(y(r,o),c&&c.blur(),b.isDefined(l.disabled)&&!1!==l.disabled||s.triggerHandler("click",[t])),p()}),s.onclick=function(t){},s.on("click",function(t,e){n.$apply(function(){i(n,{$event:e||t})})}),s.on("mousedown",function(t){s.addClass(v)}),s.on("mousemove mouseup",function(t){s.removeClass(v)})}}]),i("ngSwipeLeft",-1,"swipeleft"),i("ngSwipeRight",1,"swiperight")}(window,window.angular);