taiga-front-dist/dist/js/libs.js

38 lines
1.1 MiB
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length*chrsz))}function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length*chrsz))}function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length*chrsz))}function hex_hmac_sha1(key,data){return binb2hex(core_hmac_sha1(key,data))}function b64_hmac_sha1(key,data){return binb2b64(core_hmac_sha1(key,data))}function str_hmac_sha1(key,data){return binb2str(core_hmac_sha1(key,data))}function sha1_vm_test(){return"a9993e364706816aba3e25717850c26c9cd0d89d"==hex_sha1("abc")}function core_sha1(x,len){x[len>>5]|=128<<24-len%32,x[(len+64>>9<<4)+15]=len;for(var w=Array(80),a=1732584193,b=-271733879,c=-1732584194,d=271733878,e=-1009589776,i=0;i<x.length;i+=16){for(var olda=a,oldb=b,oldc=c,oldd=d,olde=e,j=0;80>j;j++){w[j]=16>j?x[i+j]:rol(w[j-3]^w[j-8]^w[j-14]^w[j-16],1);var t=safe_add(safe_add(rol(a,5),sha1_ft(j,b,c,d)),safe_add(safe_add(e,w[j]),sha1_kt(j)));e=d,d=c,c=rol(b,30),b=a,a=t}a=safe_add(a,olda),b=safe_add(b,oldb),c=safe_add(c,oldc),d=safe_add(d,oldd),e=safe_add(e,olde)}return Array(a,b,c,d,e)}function sha1_ft(t,b,c,d){return 20>t?b&c|~b&d:40>t?b^c^d:60>t?b&c|b&d|c&d:b^c^d}function sha1_kt(t){return 20>t?1518500249:40>t?1859775393:60>t?-1894007588:-899497514}function core_hmac_sha1(key,data){var bkey=str2binb(key);bkey.length>16&&(bkey=core_sha1(bkey,key.length*chrsz));for(var ipad=Array(16),opad=Array(16),i=0;16>i;i++)ipad[i]=909522486^bkey[i],opad[i]=1549556828^bkey[i];var hash=core_sha1(ipad.concat(str2binb(data)),512+data.length*chrsz);return core_sha1(opad.concat(hash),672)}function safe_add(x,y){var lsw=(65535&x)+(65535&y),msw=(x>>16)+(y>>16)+(lsw>>16);return msw<<16|65535&lsw}function rol(num,cnt){return num<<cnt|num>>>32-cnt}function str2binb(str){for(var bin=Array(),mask=(1<<chrsz)-1,i=0;i<str.length*chrsz;i+=chrsz)bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<32-chrsz-i%32;return bin}function binb2str(bin){for(var str="",mask=(1<<chrsz)-1,i=0;i<32*bin.length;i+=chrsz)str+=String.fromCharCode(bin[i>>5]>>>32-chrsz-i%32&mask);return str}function binb2hex(binarray){for(var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef",str="",i=0;i<4*binarray.length;i++)str+=hex_tab.charAt(binarray[i>>2]>>8*(3-i%4)+4&15)+hex_tab.charAt(binarray[i>>2]>>8*(3-i%4)&15);return str}function binb2b64(binarray){for(var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",str="",i=0;i<4*binarray.length;i+=3)for(var triplet=(binarray[i>>2]>>8*(3-i%4)&255)<<16|(binarray[i+1>>2]>>8*(3-(i+1)%4)&255)<<8|binarray[i+2>>2]>>8*(3-(i+2)%4)&255,j=0;4>j;j++)str+=8*i+6*j>32*binarray.length?b64pad:tab.charAt(triplet>>6*(3-j)&63);return str}!function(global,factory){"object"==typeof module&&"object"==typeof module.exports?module.exports=global.document?factory(global,!0):function(w){if(!w.document)throw new Error("jQuery requires a window with a document");return factory(w)}:factory(global)}("undefined"!=typeof window?window:this,function(window,noGlobal){function isArraylike(obj){var length=obj.length,type=jQuery.type(obj);return"function"===type||jQuery.isWindow(obj)?!1:1===obj.nodeType&&length?!0:"array"===type||0===length||"number"==typeof length&&length>0&&length-1 in obj}function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier))return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not});if(qualifier.nodeType)return jQuery.grep(elements,function(elem){return elem===qualifier!==not});if("string"==typeof qualifier){if(risSimple.test(qualifier))return jQuery.filter(qualifier,elements,not);qualifier=jQuery.filter(qualifier,elements)}return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>=0!==not})}function sibling(cur,dir){for(;(cur=cur[dir])&&1!==cur.nodeType;);return cur}function createOptions(options){var object=optionsCache[options]={};return jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=!0}),object}function completed(){document.removeEventListener("DOMContentLoaded",completed,!1),window.removeEventListener("load",completed,!1),jQuery.ready()}function Data(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=jQuery.expando+Data.uid++}function dataAttr(elem,key,data){var name;if(void 0===data&&1===elem.nodeType)if(name="data-"+key.replace(rmultiDash,"-$1").toLowerCase(),data=elem.getAttribute(name),"string"==typeof data){try{data="true"===data?!0:"false"===data?!1:"null"===data?null:+data+""===data?+data:rbrace.test(data)?jQuery.parseJSON(data):data}catch(e){}data_user.set(elem,key,data)}else data=void 0;return data}function returnTrue(){return!0}function returnFalse(){return!1}function safeActiveElement(){try{return document.activeElement}catch(err){}}function manipulationTarget(elem,content){return jQuery.nodeName(elem,"table")&&jQuery.nodeName(11!==content.nodeType?content:content.firstChild,"tr")?elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody")):elem}function disableScript(elem){return elem.type=(null!==elem.getAttribute("type"))+"/"+elem.type,elem}function restoreScript(elem){var match=rscriptTypeMasked.exec(elem.type);return match?elem.type=match[1]:elem.removeAttribute("type"),elem}function setGlobalEval(elems,refElements){for(var i=0,l=elems.length;l>i;i++)data_priv.set(elems[i],"globalEval",!refElements||data_priv.get(refElements[i],"globalEval"))}function cloneCopyEvent(src,dest){var i,l,type,pdataOld,pdataCur,udataOld,udataCur,events;if(1===dest.nodeType){if(data_priv.hasData(src)&&(pdataOld=data_priv.access(src),pdataCur=data_priv.set(dest,pdataOld),events=pdataOld.events)){delete pdataCur.handle,pdataCur.events={};for(type in events)for(i=0,l=events[type].length;l>i;i++)jQuery.event.add(dest,type,events[type][i])}data_user.hasData(src)&&(udataOld=data_user.access(src),udataCur=jQuery.extend({},udataOld),data_user.set(dest,udataCur))}}function getAll(context,tag){var ret=context.getElementsByTagName?context.getElementsByTagName(tag||"*"):context.querySelectorAll?context.querySelectorAll(tag||"*"):[];return void 0===tag||tag&&jQuery.nodeName(context,tag)?jQuery.merge([context],ret):ret}function fixInput(src,dest){var nodeName=dest.nodeName.toLowerCase();"input"===nodeName&&rcheckableType.test(src.type)?dest.checked=src.checked:("input"===nodeName||"textarea"===nodeName)&&(dest.defaultValue=src.defaultValue)}function actualDisplay(name,doc){var style,elem=jQuery(doc.createElement(name)).appendTo(doc.body),display=window.getDefaultComputedStyle&&(style=window.getDefaultComputedStyle(elem[0]))?style.display:jQuery.css(elem[0],"display");return elem.detach(),display}function defaultDisplay(nodeName){var doc=document,display=elemdisplay[nodeName];return display||(display=actualDisplay(nodeName,doc),"none"!==display&&display||(iframe=(iframe||jQuery("<iframe frameborder='0' width='0' height='0'/>")).appendTo(doc.documentElement),doc=iframe[0].contentDocument,doc.write(),doc.close(),display=actualDisplay(nodeName,doc),iframe.detach()),elemdisplay[nodeName]=display),display}function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;return computed=computed||getStyles(elem),computed&&(ret=computed.getPropertyValue(name)||computed[name]),computed&&(""!==ret||jQuery.contains(elem.ownerDocument,elem)||(ret=jQuery.style(elem,name)),rnumnonpx.test(ret)&&rmargin.test(name)&&(width=style.width,minWidth=style.minWidth,maxWidth=style.maxWidth,style.minWidth=style.maxWidth=style.width=ret,ret=computed.width,style.width=width,style.minWidth=minWidth,style.maxWidth=maxWidth)),void 0!==ret?ret+"":ret}function addGetHookIf(conditionFn,hookFn){return{get:function(){return conditionFn()?void delete this.get:(this.get=hookFn).apply(this,arguments)}}}function vendorPropName(style,name){if(name in style)return name;for(var capName=name[0].toUpperCase()+name.slice(1),origName=name,i=cssPrefixes.length;i--;)if(name=cssPrefixes[i]+capName,name in style)return name;return origName}function setPositiveNumber(elem,value,subtract){var matches=rnumsplit.exec(value);return matches?Math.max(0,matches[1]-(subtract||0))+(matches[2]||"px"):value}function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){for(var i=extra===(isBorderBox?"border":"content")?4:"width"===name?1:0,val=0;4>i;i+=2)"margin"===extra&&(val+=jQuery.css(elem,extra+cssExpand[i],!0,styles)),isBorderBox?("content"===extra&&(val-=jQuery.css(elem,"padding"+cssExpand[i],!0,styles)),"margin"!==extra&&(val-=jQuery.css(elem,"border"+cssExpand[i]+"Width",!0,styles))):(val+=jQuery.css(elem,"padding"+cssExpand[i],!0,styles),"padding"!==extra&&(val+=jQuery.css(elem,"border"+cssExpand[i]+"Width",!0,styles)));return val}function getWidthOrHeight(elem,name,extra){var valueIsBorderBox=!0,val="width"===name?elem.offsetWidth:elem.offsetHeight,styles=getStyles(elem),isBorderBox="border-box"===jQuery.css(elem,"boxSizing",!1,styles);if(0>=val||null==val){if(val=curCSS(elem,name,styles),(0>val||null==val)&&(val=elem.style[name]),rnumnonpx.test(val))return val;valueIsBorderBox=isBorderBox&&(support.boxSizingReliable()||val===elem.style[name]),val=parseFloat(val)||0}return val+augmentWidthOrHeight(elem,name,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles)+"px"}function showHide(elements,show){for(var display,elem,hidden,values=[],index=0,length=elements.length;length>index;index++)elem=elements[index],elem.style&&(values[index]=data_priv.get(elem,"olddisplay"),display=elem.style.display,show?(values[index]||"none"!==display||(elem.style.display=""),""===elem.style.display&&isHidden(elem)&&(values[index]=data_priv.access(elem,"olddisplay",defaultDisplay(elem.nodeName)))):(hidden=isHidden(elem),"none"===display&&hidden||data_priv.set(elem,"olddisplay",hidden?display:jQuery.css(elem,"display"))));for(index=0;length>index;index++)elem=elements[index],elem.style&&(show&&"none"!==elem.style.display&&""!==elem.style.display||(elem.style.display=show?values[index]||"":"none"));return elements}function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}function createFxNow(){return setTimeout(function(){fxNow=void 0}),fxNow=jQuery.now()}function genFx(type,includeWidth){var which,i=0,attrs={height:type};for(includeWidth=includeWidth?1:0;4>i;i+=2-includeWidth)which=cssExpand[i],attrs["margin"+which]=attrs["padding"+which]=type;return includeWidth&&(attrs.opacity=attrs.width=type),attrs}function createTween(value,prop,animation){for(var tween,collection=(tweeners[prop]||[]).concat(tweeners["*"]),index=0,length=collection.length;length>index;index++)if(tween=collection[index].call(animation,prop,value))return tween}function defaultPrefilter(elem,props,opts){var prop,value,toggle,tween,hooks,oldfire,display,checkDisplay,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHidden(elem),dataShow=data_priv.get(elem,"fxshow");opts.queue||(hooks=jQuery._queueHooks(elem,"fx"),null==hooks.unqueued&&(hooks.unqueued=0,oldfire=hooks.empty.fire,hooks.empty.fire=function(){hooks.unqueued||oldfire()}),hooks.unqueued++,anim.always(function(){anim.always(function(){hooks.unqueued--,jQuery.queue(elem,"fx").length||hooks.empty.fire()})})),1===elem.nodeType&&("height"in props||"width"in props)&&(opts.overflow=[style.overflow,style.overflowX,style.overflowY],display=jQuery.css(elem,"display"),checkDisplay="none"===display?data_priv.get(elem,"olddisplay")||defaultDisplay(elem.nodeName):display,"inline"===checkDisplay&&"none"===jQuery.css(elem,"float")&&(style.display="inline-block")),opts.overflow&&(style.overflow="hidden",anim.always(function(){style.overflow=opts.overflow[0],style.overflowX=opts.overflow[1],style.overflowY=opts.overflow[2]}));for(prop in props)if(value=props[prop],rfxtypes.exec(value)){if(delete props[prop],toggle=toggle||"toggle"===value,value===(hidden?"hide":"show")){if("show"!==value||!dataShow||void 0===dataShow[prop])continue;hidden=!0}orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop)}else display=void 0;if(jQuery.isEmptyObject(orig))"inline"===("none"===display?defaultDisplay(elem.nodeName):display)&&(style.display=display);else{dataShow?"hidden"in dataShow&&(hidden=dataShow.hidden):dataShow=data_priv.access(elem,"fxshow",{}),toggle&&(dataShow.hidden=!hidden),hidden?jQuery(elem).show():anim.done(function(){jQuery(elem).hide()}),anim.done(function(){var prop;data_priv.remove(elem,"fxshow");for(prop in orig)jQuery.style(elem,prop,orig[prop])});for(prop in orig)tween=createTween(hidden?dataShow[prop]:0,prop,anim),prop in dataShow||(dataShow[prop]=tween.start,hidden&&(tween.end=tween.start,tween.start="width"===prop||"height"===prop?1:0))}}function propFilter(props,specialEasing){var index,name,easing,value,hooks;for(index in props)if(name=jQuery.camelCase(index),easing=specialEasing[name],value=props[index],jQuery.isArray(value)&&(easing=value[1],value=props[index]=value[0]),index!==name&&(props[name]=value,delete props[index]),hooks=jQuery.cssHooks[name],hooks&&"expand"in hooks){value=hooks.expand(value),delete props[name];for(index in value)index in props||(props[index]=value[index],specialEasing[index]=easing)}else specialEasing[name]=easing}function Animation(elem,properties,options){var result,stopped,index=0,length=animationPrefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem}),tick=function(){if(stopped)return!1;for(var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;length>index;index++)animation.tweens[index].run(percent);return deferred.notifyWith(elem,[animation,percent,remaining]),1>percent&&length?remaining:(deferred.resolveWith(elem,[animation]),!1)},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(!0,{specialEasing:{}},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);return animation.tweens.push(tween),tween},stop:function(gotoEnd){var index=0,length=gotoEnd?animation.tweens.length:0;if(stopped)return this;for(stopped=!0;length>index;index++)animation.tweens[index].run(1);return gotoEnd?deferred.resolveWith(elem,[animation,gotoEnd]):deferred.rejectWith(elem,[animation,gotoEnd]),this}}),props=animation.props;for(propFilter(props,animation.opts.specialEasing);length>index;index++)if(result=animationPrefilters[index].call(animation,elem,props,animation.opts))return result;return jQuery.map(props,createTween,animation),jQuery.isFunction(animation.opts.start)&&animation.opts.start.call(elem,animation),jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue})),animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always)}function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){"string"!=typeof dataTypeExpression&&(func=dataTypeExpression,dataTypeExpression="*");var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnotwhite)||[];if(jQuery.isFunction(func))for(;dataType=dataTypes[i++];)"+"===dataType[0]?(dataType=dataType.slice(1)||"*",(structure[dataType]=structure[dataType]||[]).unshift(func)):(structure[dataType]=structure[dataType]||[]).push(func)}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){function inspect(dataType){var selected;return inspected[dataType]=!0,jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);return"string"!=typeof dataTypeOrTransport||seekingTransport||inspected[dataTypeOrTransport]?seekingTransport?!(selected=dataTypeOrTransport):void 0:(options.dataTypes.unshift(dataTypeOrTransport),inspect(dataTypeOrTransport),!1)}),selected}var inspected={},seekingTransport=structure===transports;return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*")}function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src)void 0!==src[key]&&((flatOptions[key]?target:deep||(deep={}))[key]=src[key]);return deep&&jQuery.extend(!0,target,deep),target}function ajaxHandleResponses(s,jqXHR,responses){for(var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;"*"===dataTypes[0];)dataTypes.shift(),void 0===ct&&(ct=s.mimeType||jqXHR.getResponseHeader("Content-Type"));if(ct)for(type in contents)if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break}if(dataTypes[0]in responses)finalDataType=dataTypes[0];else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break}firstDataType||(firstDataType=type)}finalDataType=finalDataType||firstDataType}return finalDataType?(finalDataType!==dataTypes[0]&&dataTypes.unshift(finalDataType),responses[finalDataType]):void 0}function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1])for(conv in s.converters)converters[conv.toLowerCase()]=s.converters[conv];for(current=dataTypes.shift();current;)if(s.responseFields[current]&&(jqXHR[s.responseFields[current]]=response),!prev&&isSuccess&&s.dataFilter&&(response=s.dataFilter(response,s.dataType)),prev=current,current=dataTypes.shift())if("*"===current)current=prev;else if("*"!==prev&&prev!==current){if(conv=converters[prev+" "+current]||converters["* "+current],!conv)for(conv2 in converters)if(tmp=conv2.split(" "),tmp[1]===current&&(conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]])){conv===!0?conv=converters[conv2]:converters[conv2]!==!0&&(current=tmp[0],dataTypes.unshift(tmp[1]));break}if(conv!==!0)if(conv&&s["throws"])response=conv(response);else try{response=conv(response)}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current}}}return{state:"success",data:response}}function buildParams(prefix,obj,traditional,add){var name;if(jQuery.isArray(obj))jQuery.each(obj,function(i,v){traditional||rbracket.test(prefix)?add(prefix,v):buildParams(prefix+"["+("object"==typeof v?i:"")+"]",v,traditional,add)});else if(traditional||"object"!==jQuery.type(obj))add(prefix,obj);else for(name in obj)buildParams(prefix+"["+name+"]",obj[name],traditional,add)}function getWindow(elem){return jQuery.isWindow(elem)?elem:9===elem.nodeType&&elem.defaultView}var arr=[],slice=arr.slice,concat=arr.concat,push=arr.push,indexOf=arr.indexOf,class2type={},toString=class2type.toString,hasOwn=class2type.hasOwnProperty,support={},document=window.document,version="2.1.3",jQuery=function(selector,context){return new jQuery.fn.init(selector,context)},rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rmsPrefix=/^-ms-/,rdashAlpha=/-([\da-z])/gi,fcamelCase=function(all,letter){return letter.toUpperCase()};jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,selector:"",length:0,toArray:function(){return slice.call(this)},get:function(num){return null!=num?0>num?this[num+this.length]:this[num]:slice.call(this)},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);return ret.prevObject=this,ret.context=this.context,ret},each:function(callback,args){return jQuery.each(this,callback,args)},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},slice:function(){return this.pushStack(slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(i){var len=this.length,j=+i+(0>i?len:0);return this.pushStack(j>=0&&len>j?[this[j]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:push,sort:arr.sort,splice:arr.splice},jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=!1;for("boolean"==typeof target&&(deep=target,target=arguments[i]||{},i++),"object"==typeof target||jQuery.isFunction(target)||(target={}),i===length&&(target=this,i--);length>i;i++)if(null!=(options=arguments[i]))for(name in options)src=target[name],copy=options[name],target!==copy&&(deep&&copy&&(jQuery.isPlainObject(copy)||(copyIsArray=jQuery.isArray(copy)))?(copyIsArray?(copyIsArray=!1,clone=src&&jQuery.isArray(src)?src:[]):clone=src&&jQuery.isPlainObject(src)?src:{},target[name]=jQuery.extend(deep,clone,copy)):void 0!==copy&&(target[name]=copy));return target},jQuery.extend({expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),isReady:!0,error:function(msg){throw new Error(msg)},noop:function(){},isFunction:function(obj){return"function"===jQuery.type(obj)},isArray:Array.isArray,isWindow:function(obj){return null!=obj&&obj===obj.window},isNumeric:function(obj){return!jQuery.isArray(obj)&&obj-parseFloat(obj)+1>=0},isPlainObject:function(obj){return"object"!==jQuery.type(obj)||obj.nodeType||jQuery.isWindow(obj)?!1:obj.constructor&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(obj){var name;for(name in obj)return!1;return!0},type:function(obj){return null==obj?obj+"":"object"==typeof obj||"function"==typeof obj?class2type[toString.call(obj)]||"object":typeof obj},globalEval:function(code){var script,indirect=eval;code=jQuery.trim(code),code&&(1===code.indexOf("use strict")?(script=document.createElement("script"),script.text=code,document.head.appendChild(script).parentNode.removeChild(script)):indirect(code))},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback,args){var value,i=0,length=obj.length,isArray=isArraylike(obj);if(args){if(isArray)for(;length>i&&(value=callback.apply(obj[i],args),value!==!1);i++);else for(i in obj)if(value=callback.apply(obj[i],args),value===!1)break}else if(isArray)for(;length>i&&(value=callback.call(obj[i],i,obj[i]),value!==!1);i++);else for(i in obj)if(value=callback.call(obj[i],i,obj[i]),value===!1)break;return obj},trim:function(text){return null==text?"":(text+"").replace(rtrim,"")},makeArray:function(arr,results){var ret=results||[];return null!=arr&&(isArraylike(Object(arr))?jQuery.merge(ret,"string"==typeof arr?[arr]:arr):push.call(ret,arr)),ret},inArray:function(elem,arr,i){return null==arr?-1:indexOf.call(arr,elem,i)},merge:function(first,second){for(var len=+second.length,j=0,i=first.length;len>j;j++)first[i++]=second[j];return first.length=i,first},grep:function(elems,callback,invert){for(var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;length>i;i++)callbackInverse=!callback(elems[i],i),callbackInverse!==callbackExpect&&matches.push(elems[i]);return matches},map:function(elems,callback,arg){var value,i=0,length=elems.length,isArray=isArraylike(elems),ret=[];if(isArray)for(;length>i;i++)value=callback(elems[i],i,arg),null!=value&&ret.push(value);else for(i in elems)value=callback(elems[i],i,arg),null!=value&&ret.push(value);return concat.apply([],ret)},guid:1,proxy:function(fn,context){var tmp,args,proxy;return"string"==typeof context&&(tmp=fn[context],context=fn,fn=tmp),jQuery.isFunction(fn)?(args=slice.call(arguments,2),proxy=function(){return fn.apply(context||this,args.concat(slice.call(arguments)))},proxy.guid=fn.guid=fn.guid||jQuery.guid++,proxy):void 0},now:Date.now,support:support}),jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase()});var Sizzle=function(window){function Sizzle(selector,context,results,seed){var match,elem,m,nodeType,i,groups,old,nid,newContext,newSelector;if((context?context.ownerDocument||context:preferredDoc)!==document&&setDocument(context),context=context||document,results=results||[],nodeType=context.nodeType,"string"!=typeof selector||!selector||1!==nodeType&&9!==nodeType&&11!==nodeType)return results;if(!seed&&documentIsHTML){if(11!==nodeType&&(match=rquickExpr.exec(selector)))if(m=match[1]){if(9===nodeType){if(elem=context.getElementById(m),!elem||!elem.parentNode)return results;if(elem.id===m)return results.push(elem),results}else if(context.ownerDocument&&(elem=context.ownerDocument.getElementById(m))&&contains(context,elem)&&elem.id===m)return results.push(elem),results}else{if(match[2])return push.apply(results,context.getElementsByTagName(selector)),results;if((m=match[3])&&support.getElementsByClassName)return push.apply(results,context.getElementsByClassName(m)),results}if(support.qsa&&(!rbuggyQSA||!rbuggyQSA.test(selector))){if(nid=old=expando,newContext=context,newSelector=1!==nodeType&&selector,1===nodeType&&"object"!==context.nodeName.toLowerCase()){for(groups=tokenize(selector),(old=context.getAttribute("id"))?nid=old.replace(rescape,"\\$&"):context.setAttribute("id",nid),nid="[id='"+nid+"'] ",i=groups.length;i--;)groups[i]=nid+toSelector(groups[i]);newContext=rsibling.test(selector)&&testContext(context.parentNode)||context,newSelector=groups.join(",")}if(newSelector)try{return push.apply(results,newContext.querySelectorAll(newSelector)),results}catch(qsaError){}finally{old||context.removeAttribute("id")}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}function createCache(){function cache(key,value){return keys.push(key+" ")>Expr.cacheLength&&delete cache[keys.shift()],cache[key+" "]=value}var keys=[];return cache}function markFunction(fn){return fn[expando]=!0,fn}function assert(fn){var div=document.createElement("div");try{return!!fn(div)}catch(e){return!1}finally{div.parentNode&&div.parentNode.removeChild(div),div=null}}function addHandle(attrs,handler){for(var arr=attrs.split("|"),i=attrs.length;i--;)Expr.attrHandle[arr[i]]=handler}function siblingCheck(a,b){var cur=b&&a,diff=cur&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||MAX_NEGATIVE)-(~a.sourceIndex||MAX_NEGATIVE);if(diff)return diff;if(cur)for(;cur=cur.nextSibling;)if(cur===b)return-1;return a?1:-1}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return"input"===name&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return("input"===name||"button"===name)&&elem.type===type}}function createPositionalPseudo(fn){return markFunction(function(argument){return argument=+argument,markFunction(function(seed,matches){for(var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;i--;)seed[j=matchIndexes[i]]&&(seed[j]=!(matches[j]=seed[j]))})})}function testContext(context){return context&&"undefined"!=typeof context.getElementsByTagName&&context}function setFilters(){}function toSelector(tokens){for(var i=0,len=tokens.length,selector="";len>i;i++)selector+=tokens[i].value;return selector}function addCombinator(matcher,combinator,base){var dir=combinator.dir,checkNonElements=base&&"parentNode"===dir,doneName=done++;return combinator.first?function(elem,context,xml){for(;elem=elem[dir];)if(1===elem.nodeType||checkNonElements)return matcher(elem,context,xml)}:function(elem,context,xml){var oldCache,outerCache,newCache=[dirruns,doneName];if(xml){for(;elem=elem[dir];)if((1===elem.nodeType||checkNonElements)&&matcher(elem,context,xml))return!0}else for(;elem=elem[dir];)if(1===elem.nodeType||checkNonElements){if(outerCache=elem[expando]||(elem[expando]={}),(oldCache=outerCache[dir])&&oldCache[0]===dirruns&&oldCache[1]===doneName)return newCache[2]=oldCache[2];if(outerCache[dir]=newCache,newCache[2]=matcher(elem,context,xml))return!0}}}function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){for(var i=matchers.length;i--;)if(!matchers[i](elem,context,xml))return!1;return!0}:matchers[0]}function multipleContexts(selector,contexts,results){for(var i=0,len=contexts.length;len>i;i++)Sizzle(selector,contexts[i],results);return results}function condense(unmatched,map,filter,context,xml){for(var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=null!=map;len>i;i++)(elem=unmatched[i])&&(!filter||filter(elem,context,xml))&&(newUnmatched.push(elem),mapped&&map.push(i));return newUnmatched}function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){return postFilter&&!postFilter[expando]&&(postFilter=setMatcher(postFilter)),postFinder&&!postFinder[expando]&&(postFinder=setMatcher(postFinder,postSelector)),markFunction(function(seed,results,context,xml){var temp,i,elem,preMap=[],postMap=[],preexisting=results.length,elems=seed||multipleContexts(selector||"*",context.nodeType?[context]:context,[]),matcherIn=!preFilter||!seed&&selector?elems:condense(elems,preMap,preFilter,context,xml),matcherOut=matcher?postFinder||(seed?preFilter:preexisting||postFilter)?[]:results:matcherIn;if(matcher&&matcher(matcherIn,matcherOut,context,xml),postFilter)for(temp=condense(matcherOut,postMap),postFilter(temp,[],context,xml),i=temp.length;i--;)(elem=temp[i])&&(matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem));if(seed){if(postFinder||preFilter){if(postFinder){for(temp=[],i=matcherOut.length;i--;)(elem=matcherOut[i])&&temp.push(matcherIn[i]=elem);postFinder(null,matcherOut=[],temp,xml)}for(i=matcherOut.length;i--;)(elem=matcherOut[i])&&(temp=postFinder?indexOf(seed,elem):preMap[i])>-1&&(seed[temp]=!(results[temp]=elem))}}else matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut),postFinder?postFinder(null,results,matcherOut,xml):push.apply(results,matcherOut)})}function matcherFromTokens(tokens){for(var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,!0),matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1},implicitRelative,!0),matchers=[function(elem,context,xml){var ret=!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));return checkContext=null,ret}];len>i;i++)if(matcher=Expr.relative[tokens[i].type])matchers=[addCombinator(elementMatcher(matchers),matcher)];else{if(matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches),matcher[expando]){for(j=++i;len>j&&!Expr.relative[tokens[j].type];j++);return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:" "===tokens[i-2].type?"*":""})).replace(rtrim,"$1"),matcher,j>i&&matcherFromTokens(tokens.slice(i,j)),len>j&&matcherFromTokens(tokens=tokens.slice(j)),len>j&&toSelector(tokens))}matchers.push(matcher)}return elementMatcher(matchers)}function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find.TAG("*",outermost),dirrunsUnique=dirruns+=null==contextBackup?1:Math.random()||.1,len=elems.length;for(outermost&&(outermostContext=context!==document&&context);i!==len&&null!=(elem=elems[i]);i++){if(byElement&&elem){for(j=0;matcher=elementMatchers[j++];)if(matcher(elem,context,xml)){results.push(elem);break}outermost&&(dirruns=dirrunsUnique)}bySet&&((elem=!matcher&&elem)&&matchedCount--,seed&&unmatched.push(elem))}if(matchedCount+=i,bySet&&i!==matchedCount){for(j=0;matcher=setMatchers[j++];)matcher(unmatched,setMatched,context,xml);if(seed){if(matchedCount>0)for(;i--;)unmatched[i]||setMatched[i]||(setMatched[i]=pop.call(results));setMatched=condense(setMatched)}push.apply(results,setMatched),outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1&&Sizzle.uniqueSort(results)
}return outermost&&(dirruns=dirrunsUnique,outermostContext=contextBackup),unmatched};return bySet?markFunction(superMatcher):superMatcher}var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+1*new Date,preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){return a===b&&(hasDuplicate=!0),0},MAX_NEGATIVE=1<<31,hasOwn={}.hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=function(list,elem){for(var i=0,len=list.length;len>i;i++)if(list[i]===elem)return i;return-1},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",whitespace="[\\x20\\t\\r\\n\\f]",characterEncoding="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",identifier=characterEncoding.replace("w","w#"),attributes="\\["+whitespace+"*("+characterEncoding+")(?:"+whitespace+"*([*^$|!~]?=)"+whitespace+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+whitespace+"*\\]",pseudos=":("+characterEncoding+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|.*)\\)|)",rwhitespace=new RegExp(whitespace+"+","g"),rtrim=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rcombinators=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+characterEncoding+")"),CLASS:new RegExp("^\\.("+characterEncoding+")"),TAG:new RegExp("^("+characterEncoding.replace("w","w*")+")"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,rescape=/'|\\/g,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-65536;return high!==high||escapedWhitespace?escaped:0>high?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,1023&high|56320)},unloadHandler=function(){setDocument()};try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes),arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els))}:function(target,els){for(var j=target.length,i=0;target[j++]=els[i++];);target.length=j-1}}}support=Sizzle.support={},isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?"HTML"!==documentElement.nodeName:!1},setDocument=Sizzle.setDocument=function(node){var hasCompare,parent,doc=node?node.ownerDocument||node:preferredDoc;return doc!==document&&9===doc.nodeType&&doc.documentElement?(document=doc,docElem=doc.documentElement,parent=doc.defaultView,parent&&parent!==parent.top&&(parent.addEventListener?parent.addEventListener("unload",unloadHandler,!1):parent.attachEvent&&parent.attachEvent("onunload",unloadHandler)),documentIsHTML=!isXML(doc),support.attributes=assert(function(div){return div.className="i",!div.getAttribute("className")}),support.getElementsByTagName=assert(function(div){return div.appendChild(doc.createComment("")),!div.getElementsByTagName("*").length}),support.getElementsByClassName=rnative.test(doc.getElementsByClassName),support.getById=assert(function(div){return docElem.appendChild(div).id=expando,!doc.getElementsByName||!doc.getElementsByName(expando).length}),support.getById?(Expr.find.ID=function(id,context){if("undefined"!=typeof context.getElementById&&documentIsHTML){var m=context.getElementById(id);return m&&m.parentNode?[m]:[]}},Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}}):(delete Expr.find.ID,Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node="undefined"!=typeof elem.getAttributeNode&&elem.getAttributeNode("id");return node&&node.value===attrId}}),Expr.find.TAG=support.getElementsByTagName?function(tag,context){return"undefined"!=typeof context.getElementsByTagName?context.getElementsByTagName(tag):support.qsa?context.querySelectorAll(tag):void 0}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if("*"===tag){for(;elem=results[i++];)1===elem.nodeType&&tmp.push(elem);return tmp}return results},Expr.find.CLASS=support.getElementsByClassName&&function(className,context){return documentIsHTML?context.getElementsByClassName(className):void 0},rbuggyMatches=[],rbuggyQSA=[],(support.qsa=rnative.test(doc.querySelectorAll))&&(assert(function(div){docElem.appendChild(div).innerHTML="<a id='"+expando+"'></a><select id='"+expando+"-\f]' msallowcapture=''><option selected=''></option></select>",div.querySelectorAll("[msallowcapture^='']").length&&rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")"),div.querySelectorAll("[selected]").length||rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")"),div.querySelectorAll("[id~="+expando+"-]").length||rbuggyQSA.push("~="),div.querySelectorAll(":checked").length||rbuggyQSA.push(":checked"),div.querySelectorAll("a#"+expando+"+*").length||rbuggyQSA.push(".#.+[+~]")}),assert(function(div){var input=doc.createElement("input");input.setAttribute("type","hidden"),div.appendChild(input).setAttribute("name","D"),div.querySelectorAll("[name=d]").length&&rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?="),div.querySelectorAll(":enabled").length||rbuggyQSA.push(":enabled",":disabled"),div.querySelectorAll("*,:x"),rbuggyQSA.push(",.*:")})),(support.matchesSelector=rnative.test(matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector))&&assert(function(div){support.disconnectedMatch=matches.call(div,"div"),matches.call(div,"[s!='']:x"),rbuggyMatches.push("!=",pseudos)}),rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|")),rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|")),hasCompare=rnative.test(docElem.compareDocumentPosition),contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=9===a.nodeType?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!(!bup||1!==bup.nodeType||!(adown.contains?adown.contains(bup):a.compareDocumentPosition&&16&a.compareDocumentPosition(bup)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},sortOrder=hasCompare?function(a,b){if(a===b)return hasDuplicate=!0,0;var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;return compare?compare:(compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&compare||!support.sortDetached&&b.compareDocumentPosition(a)===compare?a===doc||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)?-1:b===doc||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0:4&compare?-1:1)}:function(a,b){if(a===b)return hasDuplicate=!0,0;var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup)return a===doc?-1:b===doc?1:aup?-1:bup?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0;if(aup===bup)return siblingCheck(a,b);for(cur=a;cur=cur.parentNode;)ap.unshift(cur);for(cur=b;cur=cur.parentNode;)bp.unshift(cur);for(;ap[i]===bp[i];)i++;return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0},doc):document},Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)},Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document&&setDocument(elem),expr=expr.replace(rattributeQuotes,"='$1']"),!(!support.matchesSelector||!documentIsHTML||rbuggyMatches&&rbuggyMatches.test(expr)||rbuggyQSA&&rbuggyQSA.test(expr)))try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&11!==elem.document.nodeType)return ret}catch(e){}return Sizzle(expr,document,null,[elem]).length>0},Sizzle.contains=function(context,elem){return(context.ownerDocument||context)!==document&&setDocument(context),contains(context,elem)},Sizzle.attr=function(elem,name){(elem.ownerDocument||elem)!==document&&setDocument(elem);var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):void 0;return void 0!==val?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null},Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)},Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;if(hasDuplicate=!support.detectDuplicates,sortInput=!support.sortStable&&results.slice(0),results.sort(sortOrder),hasDuplicate){for(;elem=results[i++];)elem===results[i]&&(j=duplicates.push(i));for(;j--;)results.splice(duplicates[j],1)}return sortInput=null,results},getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(nodeType){if(1===nodeType||9===nodeType||11===nodeType){if("string"==typeof elem.textContent)return elem.textContent;for(elem=elem.firstChild;elem;elem=elem.nextSibling)ret+=getText(elem)}else if(3===nodeType||4===nodeType)return elem.nodeValue}else for(;node=elem[i++];)ret+=getText(node);return ret},Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){return match[1]=match[1].replace(runescape,funescape),match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape),"~="===match[2]&&(match[3]=" "+match[3]+" "),match.slice(0,4)},CHILD:function(match){return match[1]=match[1].toLowerCase(),"nth"===match[1].slice(0,3)?(match[3]||Sizzle.error(match[0]),match[4]=+(match[4]?match[5]+(match[6]||1):2*("even"===match[3]||"odd"===match[3])),match[5]=+(match[7]+match[8]||"odd"===match[3])):match[3]&&Sizzle.error(match[0]),match},PSEUDO:function(match){var excess,unquoted=!match[6]&&match[2];return matchExpr.CHILD.test(match[0])?null:(match[3]?match[2]=match[4]||match[5]||"":unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,!0))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)&&(match[0]=match[0].slice(0,excess),match[2]=unquoted.slice(0,excess)),match.slice(0,3))}},filter:{TAG:function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return"*"===nodeNameSelector?function(){return!0}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test("string"==typeof elem.className&&elem.className||"undefined"!=typeof elem.getAttribute&&elem.getAttribute("class")||"")})},ATTR:function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);return null==result?"!="===operator:operator?(result+="","="===operator?result===check:"!="===operator?result!==check:"^="===operator?check&&0===result.indexOf(check):"*="===operator?check&&result.indexOf(check)>-1:"$="===operator?check&&result.slice(-check.length)===check:"~="===operator?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:"|="===operator?result===check||result.slice(0,check.length+1)===check+"-":!1):!0}},CHILD:function(type,what,argument,first,last){var simple="nth"!==type.slice(0,3),forward="last"!==type.slice(-4),ofType="of-type"===what;return 1===first&&0===last?function(elem){return!!elem.parentNode}:function(elem,context,xml){var cache,outerCache,node,diff,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType;if(parent){if(simple){for(;dir;){for(node=elem;node=node[dir];)if(ofType?node.nodeName.toLowerCase()===name:1===node.nodeType)return!1;start=dir="only"===type&&!start&&"nextSibling"}return!0}if(start=[forward?parent.firstChild:parent.lastChild],forward&&useCache){for(outerCache=parent[expando]||(parent[expando]={}),cache=outerCache[type]||[],nodeIndex=cache[0]===dirruns&&cache[1],diff=cache[0]===dirruns&&cache[2],node=nodeIndex&&parent.childNodes[nodeIndex];node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop();)if(1===node.nodeType&&++diff&&node===elem){outerCache[type]=[dirruns,nodeIndex,diff];break}}else if(useCache&&(cache=(elem[expando]||(elem[expando]={}))[type])&&cache[0]===dirruns)diff=cache[1];else for(;(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())&&((ofType?node.nodeName.toLowerCase()!==name:1!==node.nodeType)||!++diff||(useCache&&((node[expando]||(node[expando]={}))[type]=[dirruns,diff]),node!==elem)););return diff-=last,diff===first||diff%first===0&&diff/first>=0}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);return fn[expando]?fn(argument):fn.length>1?(args=[pseudo,pseudo,"",argument],Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){for(var idx,matched=fn(seed,argument),i=matched.length;i--;)idx=indexOf(seed,matched[i]),seed[idx]=!(matches[idx]=matched[i])}):function(elem){return fn(elem,0,args)}):fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){for(var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;i--;)(elem=unmatched[i])&&(seed[i]=!(matches[i]=elem))}):function(elem,context,xml){return input[0]=elem,matcher(input,null,xml,results),input[0]=null,!results.pop()}}),has:markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),contains:markFunction(function(text){return text=text.replace(runescape,funescape),function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){return ridentifier.test(lang||"")||Sizzle.error("unsupported lang: "+lang),lang=lang.replace(runescape,funescape).toLowerCase(),function(elem){var elemLang;do if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang"))return elemLang=elemLang.toLowerCase(),elemLang===lang||0===elemLang.indexOf(lang+"-");while((elem=elem.parentNode)&&1===elem.nodeType);return!1}}),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===docElem},focus:function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:function(elem){return elem.disabled===!1},disabled:function(elem){return elem.disabled===!0},checked:function(elem){var nodeName=elem.nodeName.toLowerCase();return"input"===nodeName&&!!elem.checked||"option"===nodeName&&!!elem.selected},selected:function(elem){return elem.parentNode&&elem.parentNode.selectedIndex,elem.selected===!0},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling)if(elem.nodeType<6)return!1;return!0},parent:function(elem){return!Expr.pseudos.empty(elem)},header:function(elem){return rheader.test(elem.nodeName)},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){var name=elem.nodeName.toLowerCase();return"input"===name&&"button"===elem.type||"button"===name},text:function(elem){var attr;return"input"===elem.nodeName.toLowerCase()&&"text"===elem.type&&(null==(attr=elem.getAttribute("type"))||"text"===attr.toLowerCase())},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(matchIndexes,length,argument){return[0>argument?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){for(var i=0;length>i;i+=2)matchIndexes.push(i);return matchIndexes}),odd:createPositionalPseudo(function(matchIndexes,length){for(var i=1;length>i;i+=2)matchIndexes.push(i);return matchIndexes}),lt:createPositionalPseudo(function(matchIndexes,length,argument){for(var i=0>argument?argument+length:argument;--i>=0;)matchIndexes.push(i);return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){for(var i=0>argument?argument+length:argument;++i<length;)matchIndexes.push(i);return matchIndexes})}},Expr.pseudos.nth=Expr.pseudos.eq;for(i in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})Expr.pseudos[i]=createInputPseudo(i);for(i in{submit:!0,reset:!0})Expr.pseudos[i]=createButtonPseudo(i);return setFilters.prototype=Expr.filters=Expr.pseudos,Expr.setFilters=new setFilters,tokenize=Sizzle.tokenize=function(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[selector+" "];if(cached)return parseOnly?0:cached.slice(0);for(soFar=selector,groups=[],preFilters=Expr.preFilter;soFar;){(!matched||(match=rcomma.exec(soFar)))&&(match&&(soFar=soFar.slice(match[0].length)||soFar),groups.push(tokens=[])),matched=!1,(match=rcombinators.exec(soFar))&&(matched=match.shift(),tokens.push({value:matched,type:match[0].replace(rtrim," ")}),soFar=soFar.slice(matched.length));for(type in Expr.filter)!(match=matchExpr[type].exec(soFar))||preFilters[type]&&!(match=preFilters[type](match))||(matched=match.shift(),tokens.push({value:matched,type:type,matches:match}),soFar=soFar.slice(matched.length));if(!matched)break}return parseOnly?soFar.length:soFar?Sizzle.error(selector):tokenCache(selector,groups).slice(0)},compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){for(match||(match=tokenize(selector)),i=match.length;i--;)cached=matcherFromTokens(match[i]),cached[expando]?setMatchers.push(cached):elementMatchers.push(cached);cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers)),cached.selector=selector}return cached},select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled="function"==typeof selector&&selector,match=!seed&&tokenize(selector=compiled.selector||selector);if(results=results||[],1===match.length){if(tokens=match[0]=match[0].slice(0),tokens.length>2&&"ID"===(token=tokens[0]).type&&support.getById&&9===context.nodeType&&documentIsHTML&&Expr.relative[tokens[1].type]){if(context=(Expr.find.ID(token.matches[0].replace(runescape,funescape),context)||[])[0],!context)return results;compiled&&(context=context.parentNode),selector=selector.slice(tokens.shift().value.length)}for(i=matchExpr.needsContext.test(selector)?0:tokens.length;i--&&(token=tokens[i],!Expr.relative[type=token.type]);)if((find=Expr.find[type])&&(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context))){if(tokens.splice(i,1),selector=seed.length&&toSelector(tokens),!selector)return push.apply(results,seed),results;break}}return(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,rsibling.test(selector)&&testContext(context.parentNode)||context),results},support.sortStable=expando.split("").sort(sortOrder).join("")===expando,support.detectDuplicates=!!hasDuplicate,setDocument(),support.sortDetached=assert(function(div1){return 1&div1.compareDocumentPosition(document.createElement("div"))}),assert(function(div){return div.innerHTML="<a href='#'></a>","#"===div.firstChild.getAttribute("href")})||addHandle("type|href|height|width",function(elem,name,isXML){return isXML?void 0:elem.getAttribute(name,"type"===name.toLowerCase()?1:2)}),support.attributes&&assert(function(div){return div.innerHTML="<input/>",div.firstChild.setAttribute("value",""),""===div.firstChild.getAttribute("value")})||addHandle("value",function(elem,name,isXML){return isXML||"input"!==elem.nodeName.toLowerCase()?void 0:elem.defaultValue}),assert(function(div){return null==div.getAttribute("disabled")})||addHandle(booleans,function(elem,name,isXML){var val;return isXML?void 0:elem[name]===!0?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null}),Sizzle}(window);jQuery.find=Sizzle,jQuery.expr=Sizzle.selectors,jQuery.expr[":"]=jQuery.expr.pseudos,jQuery.unique=Sizzle.uniqueSort,jQuery.text=Sizzle.getText,jQuery.isXMLDoc=Sizzle.isXML,jQuery.contains=Sizzle.contains;var rneedsContext=jQuery.expr.match.needsContext,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,risSimple=/^.[^:#\[\.,]*$/;jQuery.filter=function(expr,elems,not){var elem=elems[0];return not&&(expr=":not("+expr+")"),1===elems.length&&1===elem.nodeType?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return 1===elem.nodeType}))},jQuery.fn.extend({find:function(selector){var i,len=this.length,ret=[],self=this;if("string"!=typeof selector)return this.pushStack(jQuery(selector).filter(function(){for(i=0;len>i;i++)if(jQuery.contains(self[i],this))return!0}));for(i=0;len>i;i++)jQuery.find(selector,self[i],ret);return ret=this.pushStack(len>1?jQuery.unique(ret):ret),ret.selector=this.selector?this.selector+" "+selector:selector,ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],!1))},not:function(selector){return this.pushStack(winnow(this,selector||[],!0))},is:function(selector){return!!winnow(this,"string"==typeof selector&&rneedsContext.test(selector)?jQuery(selector):selector||[],!1).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init=jQuery.fn.init=function(selector,context){var match,elem;if(!selector)return this;if("string"==typeof selector){if(match="<"===selector[0]&&">"===selector[selector.length-1]&&selector.length>=3?[null,selector,null]:rquickExpr.exec(selector),!match||!match[1]&&context)return!context||context.jquery?(context||rootjQuery).find(selector):this.constructor(context).find(selector);if(match[1]){if(context=context instanceof jQuery?context[0]:context,jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,!0)),rsingleTag.test(match[1])&&jQuery.isPlainObject(context))for(match in context)jQuery.isFunction(this[match])?this[match](context[match]):this.attr(match,context[match]);return this}return elem=document.getElementById(match[2]),elem&&elem.parentNode&&(this.length=1,this[0]=elem),this.context=document,this.selector=selector,this}return selector.nodeType?(this.context=this[0]=selector,this.length=1,this):jQuery.isFunction(selector)?"undefined"!=typeof rootjQuery.ready?rootjQuery.ready(selector):selector(jQuery):(void 0!==selector.selector&&(this.selector=selector.selector,this.context=selector.context),jQuery.makeArray(selector,this))};init.prototype=jQuery.fn,rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:!0,contents:!0,next:!0,prev:!0};jQuery.extend({dir:function(elem,dir,until){for(var matched=[],truncate=void 0!==until;(elem=elem[dir])&&9!==elem.nodeType;)if(1===elem.nodeType){if(truncate&&jQuery(elem).is(until))break;matched.push(elem)}return matched},sibling:function(n,elem){for(var matched=[];n;n=n.nextSibling)1===n.nodeType&&n!==elem&&matched.push(n);return matched}}),jQuery.fn.extend({has:function(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){for(var i=0;l>i;i++)if(jQuery.contains(this,targets[i]))return!0})},closest:function(selectors,context){for(var cur,i=0,l=this.length,matched=[],pos=rneedsContext.test(selectors)||"string"!=typeof selectors?jQuery(selectors,context||this.context):0;l>i;i++)for(cur=this[i];cur&&cur!==context;cur=cur.parentNode)if(cur.nodeType<11&&(pos?pos.index(cur)>-1:1===cur.nodeType&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}return this.pushStack(matched.length>1?jQuery.unique(matched):matched)},index:function(elem){return elem?"string"==typeof elem?indexOf.call(jQuery(elem),this[0]):indexOf.call(this,elem.jquery?elem[0]:elem):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(selector,context){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(null==selector?this.prevObject:this.prevObject.filter(selector))}}),jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&11!==parent.nodeType?parent:null},parents:function(elem){return jQuery.dir(elem,"parentNode")},parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until)},prevUntil:function(elem,i,until){return jQuery.dir(elem,"previousSibling",until)},siblings:function(elem){return jQuery.sibling((elem.parentNode||{}).firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return elem.contentDocument||jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);return"Until"!==name.slice(-5)&&(selector=until),selector&&"string"==typeof selector&&(matched=jQuery.filter(selector,matched)),this.length>1&&(guaranteedUnique[name]||jQuery.unique(matched),rparentsprev.test(name)&&matched.reverse()),this.pushStack(matched)}});var rnotwhite=/\S+/g,optionsCache={};jQuery.Callbacks=function(options){options="string"==typeof options?optionsCache[options]||createOptions(options):jQuery.extend({},options);var memory,fired,firing,firingStart,firingLength,firingIndex,list=[],stack=!options.once&&[],fire=function(data){for(memory=options.memory&&data,fired=!0,firingIndex=firingStart||0,firingStart=0,firingLength=list.length,firing=!0;list&&firingLength>firingIndex;firingIndex++)if(list[firingIndex].apply(data[0],data[1])===!1&&options.stopOnFalse){memory=!1;break}firing=!1,list&&(stack?stack.length&&fire(stack.shift()):memory?list=[]:self.disable())},self={add:function(){if(list){var start=list.length;!function add(args){jQuery.each(args,function(_,arg){var type=jQuery.type(arg);"function"===type?options.unique&&self.has(arg)||list.push(arg):arg&&arg.length&&"string"!==type&&add(arg)})}(arguments),firing?firingLength=list.length:memory&&(firingStart=start,fire(memory))}return this},remove:function(){return list&&jQuery.each(arguments,function(_,arg){for(var index;(index=jQuery.inArray(arg,list,index))>-1;)list.splice(index,1),firing&&(firingLength>=index&&firingLength--,firingIndex>=index&&firingIndex--)}),this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:!(!list||!list.length)},empty:function(){return list=[],firingLength=0,this},disable:function(){return list=stack=memory=void 0,this},disabled:function(){return!list},lock:function(){return stack=void 0,memory||self.disable(),this},locked:function(){return!stack},fireWith:function(context,args){return!list||fired&&!stack||(args=args||[],args=[context,args.slice?args.slice():args],firing?stack.push(args):fire(args)),this},fire:function(){return self.fireWith(this,arguments),this},fired:function(){return!!fired}};return self},jQuery.extend({Deferred:function(func){var tuples=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],state="pending",promise={state:function(){return state},always:function(){return deferred.done(arguments).fail(arguments),this},then:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=jQuery.isFunction(fns[i])&&fns[i];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);returned&&jQuery.isFunction(returned.promise)?returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify):newDefer[tuple[0]+"With"](this===promise?newDefer.promise():this,fn?[returned]:arguments)})}),fns=null}).promise()},promise:function(obj){return null!=obj?jQuery.extend(obj,promise):promise}},deferred={};return promise.pipe=promise.then,jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[3];promise[tuple[1]]=list.add,stateString&&list.add(function(){state=stateString},tuples[1^i][2].disable,tuples[2][2].lock),deferred[tuple[0]]=function(){return deferred[tuple[0]+"With"](this===deferred?promise:this,arguments),this},deferred[tuple[0]+"With"]=list.fireWith}),promise.promise(deferred),func&&func.call(deferred,deferred),deferred},when:function(subordinate){var progressValues,progressContexts,resolveContexts,i=0,resolveValues=slice.call(arguments),length=resolveValues.length,remaining=1!==length||subordinate&&jQuery.isFunction(subordinate.promise)?length:0,deferred=1===remaining?subordinate:jQuery.Deferred(),updateFunc=function(i,contexts,values){return function(value){contexts[i]=this,values[i]=arguments.length>1?slice.call(arguments):value,values===progressValues?deferred.notifyWith(contexts,values):--remaining||deferred.resolveWith(contexts,values)}};if(length>1)for(progressValues=new Array(length),progressContexts=new Array(length),resolveContexts=new Array(length);length>i;i++)resolveValues[i]&&jQuery.isFunction(resolveValues[i].promise)?resolveValues[i].promise().done(updateFunc(i,resolveContexts,resolveValues)).fail(deferred.reject).progress(updateFunc(i,progressContexts,progressValues)):--remaining;return remaining||deferred.resolveWith(resolveContexts,resolveValues),deferred.promise()}});var readyList;jQuery.fn.ready=function(fn){return jQuery.ready.promise().done(fn),this},jQuery.extend({isReady:!1,readyWait:1,holdReady:function(hold){hold?jQuery.readyWait++:jQuery.ready(!0)},ready:function(wait){(wait===!0?--jQuery.readyWait:jQuery.isReady)||(jQuery.isReady=!0,wait!==!0&&--jQuery.readyWait>0||(readyList.resolveWith(document,[jQuery]),jQuery.fn.triggerHandler&&(jQuery(document).triggerHandler("ready"),jQuery(document).off("ready"))))}}),jQuery.ready.promise=function(obj){return readyList||(readyList=jQuery.Deferred(),"complete"===document.readyState?setTimeout(jQuery.ready):(document.addEventListener("DOMContentLoaded",completed,!1),window.addEventListener("load",completed,!1))),readyList.promise(obj)},jQuery.ready.promise();var access=jQuery.access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=null==key;if("object"===jQuery.type(key)){chainable=!0;for(i in key)jQuery.access(elems,fn,i,key[i],!0,emptyGet,raw)}else if(void 0!==value&&(chainable=!0,jQuery.isFunction(value)||(raw=!0),bulk&&(raw?(fn.call(elems,value),fn=null):(bulk=fn,fn=function(elem,key,value){return bulk.call(jQuery(elem),value)})),fn))for(;len>i;i++)fn(elems[i],key,raw?value:value.call(elems[i],i,fn(elems[i],key)));return chainable?elems:bulk?fn.call(elems):len?fn(elems[0],key):emptyGet
};jQuery.acceptData=function(owner){return 1===owner.nodeType||9===owner.nodeType||!+owner.nodeType},Data.uid=1,Data.accepts=jQuery.acceptData,Data.prototype={key:function(owner){if(!Data.accepts(owner))return 0;var descriptor={},unlock=owner[this.expando];if(!unlock){unlock=Data.uid++;try{descriptor[this.expando]={value:unlock},Object.defineProperties(owner,descriptor)}catch(e){descriptor[this.expando]=unlock,jQuery.extend(owner,descriptor)}}return this.cache[unlock]||(this.cache[unlock]={}),unlock},set:function(owner,data,value){var prop,unlock=this.key(owner),cache=this.cache[unlock];if("string"==typeof data)cache[data]=value;else if(jQuery.isEmptyObject(cache))jQuery.extend(this.cache[unlock],data);else for(prop in data)cache[prop]=data[prop];return cache},get:function(owner,key){var cache=this.cache[this.key(owner)];return void 0===key?cache:cache[key]},access:function(owner,key,value){var stored;return void 0===key||key&&"string"==typeof key&&void 0===value?(stored=this.get(owner,key),void 0!==stored?stored:this.get(owner,jQuery.camelCase(key))):(this.set(owner,key,value),void 0!==value?value:key)},remove:function(owner,key){var i,name,camel,unlock=this.key(owner),cache=this.cache[unlock];if(void 0===key)this.cache[unlock]={};else{jQuery.isArray(key)?name=key.concat(key.map(jQuery.camelCase)):(camel=jQuery.camelCase(key),key in cache?name=[key,camel]:(name=camel,name=name in cache?[name]:name.match(rnotwhite)||[])),i=name.length;for(;i--;)delete cache[name[i]]}},hasData:function(owner){return!jQuery.isEmptyObject(this.cache[owner[this.expando]]||{})},discard:function(owner){owner[this.expando]&&delete this.cache[owner[this.expando]]}};var data_priv=new Data,data_user=new Data,rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/([A-Z])/g;jQuery.extend({hasData:function(elem){return data_user.hasData(elem)||data_priv.hasData(elem)},data:function(elem,name,data){return data_user.access(elem,name,data)},removeData:function(elem,name){data_user.remove(elem,name)},_data:function(elem,name,data){return data_priv.access(elem,name,data)},_removeData:function(elem,name){data_priv.remove(elem,name)}}),jQuery.fn.extend({data:function(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;if(void 0===key){if(this.length&&(data=data_user.get(elem),1===elem.nodeType&&!data_priv.get(elem,"hasDataAttrs"))){for(i=attrs.length;i--;)attrs[i]&&(name=attrs[i].name,0===name.indexOf("data-")&&(name=jQuery.camelCase(name.slice(5)),dataAttr(elem,name,data[name])));data_priv.set(elem,"hasDataAttrs",!0)}return data}return"object"==typeof key?this.each(function(){data_user.set(this,key)}):access(this,function(value){var data,camelKey=jQuery.camelCase(key);if(elem&&void 0===value){if(data=data_user.get(elem,key),void 0!==data)return data;if(data=data_user.get(elem,camelKey),void 0!==data)return data;if(data=dataAttr(elem,camelKey,void 0),void 0!==data)return data}else this.each(function(){var data=data_user.get(this,camelKey);data_user.set(this,camelKey,value),-1!==key.indexOf("-")&&void 0!==data&&data_user.set(this,key,value)})},null,value,arguments.length>1,null,!0)},removeData:function(key){return this.each(function(){data_user.remove(this,key)})}}),jQuery.extend({queue:function(elem,type,data){var queue;return elem?(type=(type||"fx")+"queue",queue=data_priv.get(elem,type),data&&(!queue||jQuery.isArray(data)?queue=data_priv.access(elem,type,jQuery.makeArray(data)):queue.push(data)),queue||[]):void 0},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};"inprogress"===fn&&(fn=queue.shift(),startLength--),fn&&("fx"===type&&queue.unshift("inprogress"),delete hooks.stop,fn.call(elem,next,hooks)),!startLength&&hooks&&hooks.empty.fire()},_queueHooks:function(elem,type){var key=type+"queueHooks";return data_priv.get(elem,key)||data_priv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){data_priv.remove(elem,[type+"queue",key])})})}}),jQuery.fn.extend({queue:function(type,data){var setter=2;return"string"!=typeof type&&(data=type,type="fx",setter--),arguments.length<setter?jQuery.queue(this[0],type):void 0===data?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type),"fx"===type&&"inprogress"!==queue[0]&&jQuery.dequeue(this,type)})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})},clearQueue:function(type){return this.queue(type||"fx",[])},promise:function(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function(){--count||defer.resolveWith(elements,[elements])};for("string"!=typeof type&&(obj=type,type=void 0),type=type||"fx";i--;)tmp=data_priv.get(elements[i],type+"queueHooks"),tmp&&tmp.empty&&(count++,tmp.empty.add(resolve));return resolve(),defer.promise(obj)}});var pnum=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,cssExpand=["Top","Right","Bottom","Left"],isHidden=function(elem,el){return elem=el||elem,"none"===jQuery.css(elem,"display")||!jQuery.contains(elem.ownerDocument,elem)},rcheckableType=/^(?:checkbox|radio)$/i;!function(){var fragment=document.createDocumentFragment(),div=fragment.appendChild(document.createElement("div")),input=document.createElement("input");input.setAttribute("type","radio"),input.setAttribute("checked","checked"),input.setAttribute("name","t"),div.appendChild(input),support.checkClone=div.cloneNode(!0).cloneNode(!0).lastChild.checked,div.innerHTML="<textarea>x</textarea>",support.noCloneChecked=!!div.cloneNode(!0).lastChild.defaultValue}();var strundefined="undefined";support.focusinBubbles="onfocusin"in window;var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;jQuery.event={global:{},add:function(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=data_priv.get(elem);if(elemData)for(handler.handler&&(handleObjIn=handler,handler=handleObjIn.handler,selector=handleObjIn.selector),handler.guid||(handler.guid=jQuery.guid++),(events=elemData.events)||(events=elemData.events={}),(eventHandle=elemData.handle)||(eventHandle=elemData.handle=function(e){return typeof jQuery!==strundefined&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):void 0}),types=(types||"").match(rnotwhite)||[""],t=types.length;t--;)tmp=rtypenamespace.exec(types[t])||[],type=origType=tmp[1],namespaces=(tmp[2]||"").split(".").sort(),type&&(special=jQuery.event.special[type]||{},type=(selector?special.delegateType:special.bindType)||type,special=jQuery.event.special[type]||{},handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn),(handlers=events[type])||(handlers=events[type]=[],handlers.delegateCount=0,special.setup&&special.setup.call(elem,data,namespaces,eventHandle)!==!1||elem.addEventListener&&elem.addEventListener(type,eventHandle,!1)),special.add&&(special.add.call(elem,handleObj),handleObj.handler.guid||(handleObj.handler.guid=handler.guid)),selector?handlers.splice(handlers.delegateCount++,0,handleObj):handlers.push(handleObj),jQuery.event.global[type]=!0)},remove:function(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=data_priv.hasData(elem)&&data_priv.get(elem);if(elemData&&(events=elemData.events)){for(types=(types||"").match(rnotwhite)||[""],t=types.length;t--;)if(tmp=rtypenamespace.exec(types[t])||[],type=origType=tmp[1],namespaces=(tmp[2]||"").split(".").sort(),type){for(special=jQuery.event.special[type]||{},type=(selector?special.delegateType:special.bindType)||type,handlers=events[type]||[],tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"),origCount=j=handlers.length;j--;)handleObj=handlers[j],!mappedTypes&&origType!==handleObj.origType||handler&&handler.guid!==handleObj.guid||tmp&&!tmp.test(handleObj.namespace)||selector&&selector!==handleObj.selector&&("**"!==selector||!handleObj.selector)||(handlers.splice(j,1),handleObj.selector&&handlers.delegateCount--,special.remove&&special.remove.call(elem,handleObj));origCount&&!handlers.length&&(special.teardown&&special.teardown.call(elem,namespaces,elemData.handle)!==!1||jQuery.removeEvent(elem,type,elemData.handle),delete events[type])}else for(type in events)jQuery.event.remove(elem,type+types[t],handler,selector,!0);jQuery.isEmptyObject(events)&&(delete elemData.handle,data_priv.remove(elem,"events"))}},trigger:function(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];if(cur=tmp=elem=elem||document,3!==elem.nodeType&&8!==elem.nodeType&&!rfocusMorph.test(type+jQuery.event.triggered)&&(type.indexOf(".")>=0&&(namespaces=type.split("."),type=namespaces.shift(),namespaces.sort()),ontype=type.indexOf(":")<0&&"on"+type,event=event[jQuery.expando]?event:new jQuery.Event(type,"object"==typeof event&&event),event.isTrigger=onlyHandlers?2:3,event.namespace=namespaces.join("."),event.namespace_re=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,event.result=void 0,event.target||(event.target=elem),data=null==data?[event]:jQuery.makeArray(data,[event]),special=jQuery.event.special[type]||{},onlyHandlers||!special.trigger||special.trigger.apply(elem,data)!==!1)){if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){for(bubbleType=special.delegateType||type,rfocusMorph.test(bubbleType+type)||(cur=cur.parentNode);cur;cur=cur.parentNode)eventPath.push(cur),tmp=cur;tmp===(elem.ownerDocument||document)&&eventPath.push(tmp.defaultView||tmp.parentWindow||window)}for(i=0;(cur=eventPath[i++])&&!event.isPropagationStopped();)event.type=i>1?bubbleType:special.bindType||type,handle=(data_priv.get(cur,"events")||{})[event.type]&&data_priv.get(cur,"handle"),handle&&handle.apply(cur,data),handle=ontype&&cur[ontype],handle&&handle.apply&&jQuery.acceptData(cur)&&(event.result=handle.apply(cur,data),event.result===!1&&event.preventDefault());return event.type=type,onlyHandlers||event.isDefaultPrevented()||special._default&&special._default.apply(eventPath.pop(),data)!==!1||!jQuery.acceptData(elem)||ontype&&jQuery.isFunction(elem[type])&&!jQuery.isWindow(elem)&&(tmp=elem[ontype],tmp&&(elem[ontype]=null),jQuery.event.triggered=type,elem[type](),jQuery.event.triggered=void 0,tmp&&(elem[ontype]=tmp)),event.result}},dispatch:function(event){event=jQuery.event.fix(event);var i,j,ret,matched,handleObj,handlerQueue=[],args=slice.call(arguments),handlers=(data_priv.get(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};if(args[0]=event,event.delegateTarget=this,!special.preDispatch||special.preDispatch.call(this,event)!==!1){for(handlerQueue=jQuery.event.handlers.call(this,event,handlers),i=0;(matched=handlerQueue[i++])&&!event.isPropagationStopped();)for(event.currentTarget=matched.elem,j=0;(handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped();)(!event.namespace_re||event.namespace_re.test(handleObj.namespace))&&(event.handleObj=handleObj,event.data=handleObj.data,ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args),void 0!==ret&&(event.result=ret)===!1&&(event.preventDefault(),event.stopPropagation()));return special.postDispatch&&special.postDispatch.call(this,event),event.result}},handlers:function(event,handlers){var i,matches,sel,handleObj,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&(!event.button||"click"!==event.type))for(;cur!==this;cur=cur.parentNode||this)if(cur.disabled!==!0||"click"!==event.type){for(matches=[],i=0;delegateCount>i;i++)handleObj=handlers[i],sel=handleObj.selector+" ",void 0===matches[sel]&&(matches[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>=0:jQuery.find(sel,this,null,[cur]).length),matches[sel]&&matches.push(handleObj);matches.length&&handlerQueue.push({elem:cur,handlers:matches})}return delegateCount<handlers.length&&handlerQueue.push({elem:this,handlers:handlers.slice(delegateCount)}),handlerQueue},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(event,original){return null==event.which&&(event.which=null!=original.charCode?original.charCode:original.keyCode),event}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(event,original){var eventDoc,doc,body,button=original.button;return null==event.pageX&&null!=original.clientX&&(eventDoc=event.target.ownerDocument||document,doc=eventDoc.documentElement,body=eventDoc.body,event.pageX=original.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0),event.pageY=original.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0)),event.which||void 0===button||(event.which=1&button?1:2&button?3:4&button?2:0),event}},fix:function(event){if(event[jQuery.expando])return event;var i,prop,copy,type=event.type,originalEvent=event,fixHook=this.fixHooks[type];for(fixHook||(this.fixHooks[type]=fixHook=rmouseEvent.test(type)?this.mouseHooks:rkeyEvent.test(type)?this.keyHooks:{}),copy=fixHook.props?this.props.concat(fixHook.props):this.props,event=new jQuery.Event(originalEvent),i=copy.length;i--;)prop=copy[i],event[prop]=originalEvent[prop];return event.target||(event.target=document),3===event.target.nodeType&&(event.target=event.target.parentNode),fixHook.filter?fixHook.filter(event,originalEvent):event},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==safeActiveElement()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===safeActiveElement()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&jQuery.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(event){return jQuery.nodeName(event.target,"a")}},beforeunload:{postDispatch:function(event){void 0!==event.result&&event.originalEvent&&(event.originalEvent.returnValue=event.result)}}},simulate:function(type,elem,event,bubble){var e=jQuery.extend(new jQuery.Event,event,{type:type,isSimulated:!0,originalEvent:{}});bubble?jQuery.event.trigger(e,null,elem):jQuery.event.dispatch.call(elem,e),e.isDefaultPrevented()&&event.preventDefault()}},jQuery.removeEvent=function(elem,type,handle){elem.removeEventListener&&elem.removeEventListener(type,handle,!1)},jQuery.Event=function(src,props){return this instanceof jQuery.Event?(src&&src.type?(this.originalEvent=src,this.type=src.type,this.isDefaultPrevented=src.defaultPrevented||void 0===src.defaultPrevented&&src.returnValue===!1?returnTrue:returnFalse):this.type=src,props&&jQuery.extend(this,props),this.timeStamp=src&&src.timeStamp||jQuery.now(),void(this[jQuery.expando]=!0)):new jQuery.Event(src,props)},jQuery.Event.prototype={isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=returnTrue,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;return(!related||related!==target&&!jQuery.contains(target,related))&&(event.type=handleObj.origType,ret=handleObj.handler.apply(this,arguments),event.type=fix),ret}}}),support.focusinBubbles||jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var handler=function(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event),!0)};jQuery.event.special[fix]={setup:function(){var doc=this.ownerDocument||this,attaches=data_priv.access(doc,fix);attaches||doc.addEventListener(orig,handler,!0),data_priv.access(doc,fix,(attaches||0)+1)},teardown:function(){var doc=this.ownerDocument||this,attaches=data_priv.access(doc,fix)-1;attaches?data_priv.access(doc,fix,attaches):(doc.removeEventListener(orig,handler,!0),data_priv.remove(doc,fix))}}}),jQuery.fn.extend({on:function(types,selector,data,fn,one){var origFn,type;if("object"==typeof types){"string"!=typeof selector&&(data=data||selector,selector=void 0);for(type in types)this.on(type,selector,data,types[type],one);return this}if(null==data&&null==fn?(fn=selector,data=selector=void 0):null==fn&&("string"==typeof selector?(fn=data,data=void 0):(fn=data,data=selector,selector=void 0)),fn===!1)fn=returnFalse;else if(!fn)return this;return 1===one&&(origFn=fn,fn=function(event){return jQuery().off(event),origFn.apply(this,arguments)},fn.guid=origFn.guid||(origFn.guid=jQuery.guid++)),this.each(function(){jQuery.event.add(this,types,fn,data,selector)})},one:function(types,selector,data,fn){return this.on(types,selector,data,fn,1)},off:function(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj)return handleObj=types.handleObj,jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler),this;if("object"==typeof types){for(type in types)this.off(type,selector,types[type]);return this}return(selector===!1||"function"==typeof selector)&&(fn=selector,selector=void 0),fn===!1&&(fn=returnFalse),this.each(function(){jQuery.event.remove(this,types,fn,selector)})},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){var elem=this[0];return elem?jQuery.event.trigger(type,data,elem,!0):void 0}});var rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,rtagName=/<([\w:]+)/,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style|link)/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/^$|\/(?:java|ecma)script/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,wrapMap={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,"",""]};wrapMap.optgroup=wrapMap.option,wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead,wrapMap.th=wrapMap.td,jQuery.extend({clone:function(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,clone=elem.cloneNode(!0),inPage=jQuery.contains(elem.ownerDocument,elem);if(!(support.noCloneChecked||1!==elem.nodeType&&11!==elem.nodeType||jQuery.isXMLDoc(elem)))for(destElements=getAll(clone),srcElements=getAll(elem),i=0,l=srcElements.length;l>i;i++)fixInput(srcElements[i],destElements[i]);if(dataAndEvents)if(deepDataAndEvents)for(srcElements=srcElements||getAll(elem),destElements=destElements||getAll(clone),i=0,l=srcElements.length;l>i;i++)cloneCopyEvent(srcElements[i],destElements[i]);else cloneCopyEvent(elem,clone);return destElements=getAll(clone,"script"),destElements.length>0&&setGlobalEval(destElements,!inPage&&getAll(elem,"script")),clone},buildFragment:function(elems,context,scripts,selection){for(var elem,tmp,tag,wrap,contains,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;l>i;i++)if(elem=elems[i],elem||0===elem)if("object"===jQuery.type(elem))jQuery.merge(nodes,elem.nodeType?[elem]:elem);else if(rhtml.test(elem)){for(tmp=tmp||fragment.appendChild(context.createElement("div")),tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,tmp.innerHTML=wrap[1]+elem.replace(rxhtmlTag,"<$1></$2>")+wrap[2],j=wrap[0];j--;)tmp=tmp.lastChild;jQuery.merge(nodes,tmp.childNodes),tmp=fragment.firstChild,tmp.textContent=""}else nodes.push(context.createTextNode(elem));for(fragment.textContent="",i=0;elem=nodes[i++];)if((!selection||-1===jQuery.inArray(elem,selection))&&(contains=jQuery.contains(elem.ownerDocument,elem),tmp=getAll(fragment.appendChild(elem),"script"),contains&&setGlobalEval(tmp),scripts))for(j=0;elem=tmp[j++];)rscriptType.test(elem.type||"")&&scripts.push(elem);return fragment},cleanData:function(elems){for(var data,elem,type,key,special=jQuery.event.special,i=0;void 0!==(elem=elems[i]);i++){if(jQuery.acceptData(elem)&&(key=elem[data_priv.expando],key&&(data=data_priv.cache[key]))){if(data.events)for(type in data.events)special[type]?jQuery.event.remove(elem,type):jQuery.removeEvent(elem,type,data.handle);data_priv.cache[key]&&delete data_priv.cache[key]}delete data_user.cache[elem[data_user.expando]]}}}),jQuery.fn.extend({text:function(value){return access(this,function(value){return void 0===value?jQuery.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=value)})},null,value,arguments.length)},append:function(){return this.domManip(arguments,function(elem){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var target=manipulationTarget(this,elem);target.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,function(elem){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}})},before:function(){return this.domManip(arguments,function(elem){this.parentNode&&this.parentNode.insertBefore(elem,this)})},after:function(){return this.domManip(arguments,function(elem){this.parentNode&&this.parentNode.insertBefore(elem,this.nextSibling)})},remove:function(selector,keepData){for(var elem,elems=selector?jQuery.filter(selector,this):this,i=0;null!=(elem=elems[i]);i++)keepData||1!==elem.nodeType||jQuery.cleanData(getAll(elem)),elem.parentNode&&(keepData&&jQuery.contains(elem.ownerDocument,elem)&&setGlobalEval(getAll(elem,"script")),elem.parentNode.removeChild(elem));return this},empty:function(){for(var elem,i=0;null!=(elem=this[i]);i++)1===elem.nodeType&&(jQuery.cleanData(getAll(elem,!1)),elem.textContent="");return this},clone:function(dataAndEvents,deepDataAndEvents){return dataAndEvents=null==dataAndEvents?!1:dataAndEvents,deepDataAndEvents=null==deepDataAndEvents?dataAndEvents:deepDataAndEvents,this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(void 0===value&&1===elem.nodeType)return elem.innerHTML;if("string"==typeof value&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,"<$1></$2>");try{for(;l>i;i++)elem=this[i]||{},1===elem.nodeType&&(jQuery.cleanData(getAll(elem,!1)),elem.innerHTML=value);elem=0}catch(e){}}elem&&this.empty().append(value)},null,value,arguments.length)},replaceWith:function(){var arg=arguments[0];return this.domManip(arguments,function(elem){arg=this.parentNode,jQuery.cleanData(getAll(this)),arg&&arg.replaceChild(elem,this)}),arg&&(arg.length||arg.nodeType)?this:this.remove()},detach:function(selector){return this.remove(selector,!0)},domManip:function(args,callback){args=concat.apply([],args);var fragment,first,scripts,hasScripts,node,doc,i=0,l=this.length,set=this,iNoClone=l-1,value=args[0],isFunction=jQuery.isFunction(value);if(isFunction||l>1&&"string"==typeof value&&!support.checkClone&&rchecked.test(value))return this.each(function(index){var self=set.eq(index);isFunction&&(args[0]=value.call(this,index,self.html())),self.domManip(args,callback)});if(l&&(fragment=jQuery.buildFragment(args,this[0].ownerDocument,!1,this),first=fragment.firstChild,1===fragment.childNodes.length&&(fragment=first),first)){for(scripts=jQuery.map(getAll(fragment,"script"),disableScript),hasScripts=scripts.length;l>i;i++)node=fragment,i!==iNoClone&&(node=jQuery.clone(node,!0,!0),hasScripts&&jQuery.merge(scripts,getAll(node,"script"))),callback.call(this[i],node,i);if(hasScripts)for(doc=scripts[scripts.length-1].ownerDocument,jQuery.map(scripts,restoreScript),i=0;hasScripts>i;i++)node=scripts[i],rscriptType.test(node.type||"")&&!data_priv.access(node,"globalEval")&&jQuery.contains(doc,node)&&(node.src?jQuery._evalUrl&&jQuery._evalUrl(node.src):jQuery.globalEval(node.textContent.replace(rcleanScript,"")))}return this}}),jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){for(var elems,ret=[],insert=jQuery(selector),last=insert.length-1,i=0;last>=i;i++)elems=i===last?this:this.clone(!0),jQuery(insert[i])[original](elems),push.apply(ret,elems.get());return this.pushStack(ret)}});var iframe,elemdisplay={},rmargin=/^margin/,rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i"),getStyles=function(elem){return elem.ownerDocument.defaultView.opener?elem.ownerDocument.defaultView.getComputedStyle(elem,null):window.getComputedStyle(elem,null)};!function(){function computePixelPositionAndBoxSizingReliable(){div.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",div.innerHTML="",docElem.appendChild(container);var divStyle=window.getComputedStyle(div,null);pixelPositionVal="1%"!==divStyle.top,boxSizingReliableVal="4px"===divStyle.width,docElem.removeChild(container)}var pixelPositionVal,boxSizingReliableVal,docElem=document.documentElement,container=document.createElement("div"),div=document.createElement("div");div.style&&(div.style.backgroundClip="content-box",div.cloneNode(!0).style.backgroundClip="",support.clearCloneStyle="content-box"===div.style.backgroundClip,container.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",container.appendChild(div),window.getComputedStyle&&jQuery.extend(support,{pixelPosition:function(){return computePixelPositionAndBoxSizingReliable(),pixelPositionVal},boxSizingReliable:function(){return null==boxSizingReliableVal&&computePixelPositionAndBoxSizingReliable(),boxSizingReliableVal},reliableMarginRight:function(){var ret,marginDiv=div.appendChild(document.createElement("div"));return marginDiv.style.cssText=div.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",marginDiv.style.marginRight=marginDiv.style.width="0",div.style.width="1px",docElem.appendChild(container),ret=!parseFloat(window.getComputedStyle(marginDiv,null).marginRight),docElem.removeChild(container),div.removeChild(marginDiv),ret}}))}(),jQuery.swap=function(elem,options,callback,args){var ret,name,old={};for(name in options)old[name]=elem.style[name],elem.style[name]=options[name];ret=callback.apply(elem,args||[]);for(name in options)elem.style[name]=old[name];return ret};var rdisplayswap=/^(none|table(?!-c[ea]).+)/,rnumsplit=new RegExp("^("+pnum+")(.*)$","i"),rrelNum=new RegExp("^([+-])=("+pnum+")","i"),cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"},cssPrefixes=["Webkit","O","Moz","ms"];jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return""===ret?"1":ret}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(elem,name,value,extra){if(elem&&3!==elem.nodeType&&8!==elem.nodeType&&elem.style){var ret,type,hooks,origName=jQuery.camelCase(name),style=elem.style;return name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(style,origName)),hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName],void 0===value?hooks&&"get"in hooks&&void 0!==(ret=hooks.get(elem,!1,extra))?ret:style[name]:(type=typeof value,"string"===type&&(ret=rrelNum.exec(value))&&(value=(ret[1]+1)*ret[2]+parseFloat(jQuery.css(elem,name)),type="number"),null!=value&&value===value&&("number"!==type||jQuery.cssNumber[origName]||(value+="px"),support.clearCloneStyle||""!==value||0!==name.indexOf("background")||(style[name]="inherit"),hooks&&"set"in hooks&&void 0===(value=hooks.set(elem,value,extra))||(style[name]=value)),void 0)}},css:function(elem,name,extra,styles){var val,num,hooks,origName=jQuery.camelCase(name);return name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(elem.style,origName)),hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName],hooks&&"get"in hooks&&(val=hooks.get(elem,!0,extra)),void 0===val&&(val=curCSS(elem,name,styles)),"normal"===val&&name in cssNormalTransform&&(val=cssNormalTransform[name]),""===extra||extra?(num=parseFloat(val),extra===!0||jQuery.isNumeric(num)?num||0:val):val}}),jQuery.each(["height","width"],function(i,name){jQuery.cssHooks[name]={get:function(elem,computed,extra){return computed?rdisplayswap.test(jQuery.css(elem,"display"))&&0===elem.offsetWidth?jQuery.swap(elem,cssShow,function(){return getWidthOrHeight(elem,name,extra)}):getWidthOrHeight(elem,name,extra):void 0},set:function(elem,value,extra){var styles=extra&&getStyles(elem);return setPositiveNumber(elem,value,extra?augmentWidthOrHeight(elem,name,extra,"border-box"===jQuery.css(elem,"boxSizing",!1,styles),styles):0)}}}),jQuery.cssHooks.marginRight=addGetHookIf(support.reliableMarginRight,function(elem,computed){return computed?jQuery.swap(elem,{display:"inline-block"},curCSS,[elem,"marginRight"]):void 0}),jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){for(var i=0,expanded={},parts="string"==typeof value?value.split(" "):[value];4>i;i++)expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];return expanded}},rmargin.test(prefix)||(jQuery.cssHooks[prefix+suffix].set=setPositiveNumber)}),jQuery.fn.extend({css:function(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(jQuery.isArray(name)){for(styles=getStyles(elem),len=name.length;len>i;i++)map[name[i]]=jQuery.css(elem,name[i],!1,styles);return map}return void 0!==value?jQuery.style(elem,name,value):jQuery.css(elem,name)},name,value,arguments.length>1)},show:function(){return showHide(this,!0)},hide:function(){return showHide(this)},toggle:function(state){return"boolean"==typeof state?state?this.show():this.hide():this.each(function(){isHidden(this)?jQuery(this).show():jQuery(this).hide()})}}),jQuery.Tween=Tween,Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem,this.prop=prop,this.easing=easing||"swing",this.options=options,this.start=this.now=this.cur(),this.end=end,this.unit=unit||(jQuery.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];return this.pos=eased=this.options.duration?jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration):percent,this.now=(this.end-this.start)*eased+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),hooks&&hooks.set?hooks.set(this):Tween.propHooks._default.set(this),this
}},Tween.prototype.init.prototype=Tween.prototype,Tween.propHooks={_default:{get:function(tween){var result;return null==tween.elem[tween.prop]||tween.elem.style&&null!=tween.elem.style[tween.prop]?(result=jQuery.css(tween.elem,tween.prop,""),result&&"auto"!==result?result:0):tween.elem[tween.prop]},set:function(tween){jQuery.fx.step[tween.prop]?jQuery.fx.step[tween.prop](tween):tween.elem.style&&(null!=tween.elem.style[jQuery.cssProps[tween.prop]]||jQuery.cssHooks[tween.prop])?jQuery.style(tween.elem,tween.prop,tween.now+tween.unit):tween.elem[tween.prop]=tween.now}}},Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){tween.elem.nodeType&&tween.elem.parentNode&&(tween.elem[tween.prop]=tween.now)}},jQuery.easing={linear:function(p){return p},swing:function(p){return.5-Math.cos(p*Math.PI)/2}},jQuery.fx=Tween.prototype.init,jQuery.fx.step={};var fxNow,timerId,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i"),rrun=/queueHooks$/,animationPrefilters=[defaultPrefilter],tweeners={"*":[function(prop,value){var tween=this.createTween(prop,value),target=tween.cur(),parts=rfxnum.exec(value),unit=parts&&parts[3]||(jQuery.cssNumber[prop]?"":"px"),start=(jQuery.cssNumber[prop]||"px"!==unit&&+target)&&rfxnum.exec(jQuery.css(tween.elem,prop)),scale=1,maxIterations=20;if(start&&start[3]!==unit){unit=unit||start[3],parts=parts||[],start=+target||1;do scale=scale||".5",start/=scale,jQuery.style(tween.elem,prop,start+unit);while(scale!==(scale=tween.cur()/target)&&1!==scale&&--maxIterations)}return parts&&(start=tween.start=+start||+target||0,tween.unit=unit,tween.end=parts[1]?start+(parts[1]+1)*parts[2]:+parts[2]),tween}]};jQuery.Animation=jQuery.extend(Animation,{tweener:function(props,callback){jQuery.isFunction(props)?(callback=props,props=["*"]):props=props.split(" ");for(var prop,index=0,length=props.length;length>index;index++)prop=props[index],tweeners[prop]=tweeners[prop]||[],tweeners[prop].unshift(callback)},prefilter:function(callback,prepend){prepend?animationPrefilters.unshift(callback):animationPrefilters.push(callback)}}),jQuery.speed=function(speed,easing,fn){var opt=speed&&"object"==typeof speed?jQuery.extend({},speed):{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};return opt.duration=jQuery.fx.off?0:"number"==typeof opt.duration?opt.duration:opt.duration in jQuery.fx.speeds?jQuery.fx.speeds[opt.duration]:jQuery.fx.speeds._default,(null==opt.queue||opt.queue===!0)&&(opt.queue="fx"),opt.old=opt.complete,opt.complete=function(){jQuery.isFunction(opt.old)&&opt.old.call(this),opt.queue&&jQuery.dequeue(this,opt.queue)},opt},jQuery.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHidden).css("opacity",0).show().end().animate({opacity:to},speed,easing,callback)},animate:function(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function(){var anim=Animation(this,jQuery.extend({},prop),optall);(empty||data_priv.get(this,"finish"))&&anim.stop(!0)};return doAnimation.finish=doAnimation,empty||optall.queue===!1?this.each(doAnimation):this.queue(optall.queue,doAnimation)},stop:function(type,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop,stop(gotoEnd)};return"string"!=typeof type&&(gotoEnd=clearQueue,clearQueue=type,type=void 0),clearQueue&&type!==!1&&this.queue(type||"fx",[]),this.each(function(){var dequeue=!0,index=null!=type&&type+"queueHooks",timers=jQuery.timers,data=data_priv.get(this);if(index)data[index]&&data[index].stop&&stopQueue(data[index]);else for(index in data)data[index]&&data[index].stop&&rrun.test(index)&&stopQueue(data[index]);for(index=timers.length;index--;)timers[index].elem!==this||null!=type&&timers[index].queue!==type||(timers[index].anim.stop(gotoEnd),dequeue=!1,timers.splice(index,1));(dequeue||!gotoEnd)&&jQuery.dequeue(this,type)})},finish:function(type){return type!==!1&&(type=type||"fx"),this.each(function(){var index,data=data_priv.get(this),queue=data[type+"queue"],hooks=data[type+"queueHooks"],timers=jQuery.timers,length=queue?queue.length:0;for(data.finish=!0,jQuery.queue(this,type,[]),hooks&&hooks.stop&&hooks.stop.call(this,!0),index=timers.length;index--;)timers[index].elem===this&&timers[index].queue===type&&(timers[index].anim.stop(!0),timers.splice(index,1));for(index=0;length>index;index++)queue[index]&&queue[index].finish&&queue[index].finish.call(this);delete data.finish})}}),jQuery.each(["toggle","show","hide"],function(i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return null==speed||"boolean"==typeof speed?cssFn.apply(this,arguments):this.animate(genFx(name,!0),speed,easing,callback)}}),jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback)}}),jQuery.timers=[],jQuery.fx.tick=function(){var timer,i=0,timers=jQuery.timers;for(fxNow=jQuery.now();i<timers.length;i++)timer=timers[i],timer()||timers[i]!==timer||timers.splice(i--,1);timers.length||jQuery.fx.stop(),fxNow=void 0},jQuery.fx.timer=function(timer){jQuery.timers.push(timer),timer()?jQuery.fx.start():jQuery.timers.pop()},jQuery.fx.interval=13,jQuery.fx.start=function(){timerId||(timerId=setInterval(jQuery.fx.tick,jQuery.fx.interval))},jQuery.fx.stop=function(){clearInterval(timerId),timerId=null},jQuery.fx.speeds={slow:600,fast:200,_default:400},jQuery.fn.delay=function(time,type){return time=jQuery.fx?jQuery.fx.speeds[time]||time:time,type=type||"fx",this.queue(type,function(next,hooks){var timeout=setTimeout(next,time);hooks.stop=function(){clearTimeout(timeout)}})},function(){var input=document.createElement("input"),select=document.createElement("select"),opt=select.appendChild(document.createElement("option"));input.type="checkbox",support.checkOn=""!==input.value,support.optSelected=opt.selected,select.disabled=!0,support.optDisabled=!opt.disabled,input=document.createElement("input"),input.value="t",input.type="radio",support.radioValue="t"===input.value}();var nodeHook,boolHook,attrHandle=jQuery.expr.attrHandle;jQuery.fn.extend({attr:function(name,value){return access(this,jQuery.attr,name,value,arguments.length>1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})}}),jQuery.extend({attr:function(elem,name,value){var hooks,ret,nType=elem.nodeType;if(elem&&3!==nType&&8!==nType&&2!==nType)return typeof elem.getAttribute===strundefined?jQuery.prop(elem,name,value):(1===nType&&jQuery.isXMLDoc(elem)||(name=name.toLowerCase(),hooks=jQuery.attrHooks[name]||(jQuery.expr.match.bool.test(name)?boolHook:nodeHook)),void 0===value?hooks&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:(ret=jQuery.find.attr(elem,name),null==ret?void 0:ret):null!==value?hooks&&"set"in hooks&&void 0!==(ret=hooks.set(elem,value,name))?ret:(elem.setAttribute(name,value+""),value):void jQuery.removeAttr(elem,name))},removeAttr:function(elem,value){var name,propName,i=0,attrNames=value&&value.match(rnotwhite);if(attrNames&&1===elem.nodeType)for(;name=attrNames[i++];)propName=jQuery.propFix[name]||name,jQuery.expr.match.bool.test(name)&&(elem[propName]=!1),elem.removeAttribute(name)},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&"radio"===value&&jQuery.nodeName(elem,"input")){var val=elem.value;return elem.setAttribute("type",value),val&&(elem.value=val),value}}}}}),boolHook={set:function(elem,value,name){return value===!1?jQuery.removeAttr(elem,name):elem.setAttribute(name,name),name}},jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle;return isXML||(handle=attrHandle[name],attrHandle[name]=ret,ret=null!=getter(elem,name,isXML)?name.toLowerCase():null,attrHandle[name]=handle),ret}});var rfocusable=/^(?:input|select|textarea|button)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return this.each(function(){delete this[jQuery.propFix[name]||name]})}}),jQuery.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(elem,name,value){var ret,hooks,notxml,nType=elem.nodeType;if(elem&&3!==nType&&8!==nType&&2!==nType)return notxml=1!==nType||!jQuery.isXMLDoc(elem),notxml&&(name=jQuery.propFix[name]||name,hooks=jQuery.propHooks[name]),void 0!==value?hooks&&"set"in hooks&&void 0!==(ret=hooks.set(elem,value,name))?ret:elem[name]=value:hooks&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:elem[name]},propHooks:{tabIndex:{get:function(elem){return elem.hasAttribute("tabindex")||rfocusable.test(elem.nodeName)||elem.href?elem.tabIndex:-1}}}}),support.optSelected||(jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;return parent&&parent.parentNode&&parent.parentNode.selectedIndex,null}}),jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this});var rclass=/[\t\r\n\f]/g;jQuery.fn.extend({addClass:function(value){var classes,elem,cur,clazz,j,finalValue,proceed="string"==typeof value&&value,i=0,len=this.length;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).addClass(value.call(this,j,this.className))});if(proceed)for(classes=(value||"").match(rnotwhite)||[];len>i;i++)if(elem=this[i],cur=1===elem.nodeType&&(elem.className?(" "+elem.className+" ").replace(rclass," "):" ")){for(j=0;clazz=classes[j++];)cur.indexOf(" "+clazz+" ")<0&&(cur+=clazz+" ");finalValue=jQuery.trim(cur),elem.className!==finalValue&&(elem.className=finalValue)}return this},removeClass:function(value){var classes,elem,cur,clazz,j,finalValue,proceed=0===arguments.length||"string"==typeof value&&value,i=0,len=this.length;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).removeClass(value.call(this,j,this.className))});if(proceed)for(classes=(value||"").match(rnotwhite)||[];len>i;i++)if(elem=this[i],cur=1===elem.nodeType&&(elem.className?(" "+elem.className+" ").replace(rclass," "):"")){for(j=0;clazz=classes[j++];)for(;cur.indexOf(" "+clazz+" ")>=0;)cur=cur.replace(" "+clazz+" "," ");finalValue=value?jQuery.trim(cur):"",elem.className!==finalValue&&(elem.className=finalValue)}return this},toggleClass:function(value,stateVal){var type=typeof value;return"boolean"==typeof stateVal&&"string"===type?stateVal?this.addClass(value):this.removeClass(value):this.each(jQuery.isFunction(value)?function(i){jQuery(this).toggleClass(value.call(this,i,this.className,stateVal),stateVal)}:function(){if("string"===type)for(var className,i=0,self=jQuery(this),classNames=value.match(rnotwhite)||[];className=classNames[i++];)self.hasClass(className)?self.removeClass(className):self.addClass(className);else(type===strundefined||"boolean"===type)&&(this.className&&data_priv.set(this,"__className__",this.className),this.className=this.className||value===!1?"":data_priv.get(this,"__className__")||"")})},hasClass:function(selector){for(var className=" "+selector+" ",i=0,l=this.length;l>i;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replace(rclass," ").indexOf(className)>=0)return!0;return!1}});var rreturn=/\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,isFunction,elem=this[0];{if(arguments.length)return isFunction=jQuery.isFunction(value),this.each(function(i){var val;1===this.nodeType&&(val=isFunction?value.call(this,i,jQuery(this).val()):value,null==val?val="":"number"==typeof val?val+="":jQuery.isArray(val)&&(val=jQuery.map(val,function(value){return null==value?"":value+""})),hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()],hooks&&"set"in hooks&&void 0!==hooks.set(this,val,"value")||(this.value=val))});if(elem)return hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()],hooks&&"get"in hooks&&void 0!==(ret=hooks.get(elem,"value"))?ret:(ret=elem.value,"string"==typeof ret?ret.replace(rreturn,""):null==ret?"":ret)}}}),jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return null!=val?val:jQuery.trim(jQuery.text(elem))}},select:{get:function(elem){for(var value,option,options=elem.options,index=elem.selectedIndex,one="select-one"===elem.type||0>index,values=one?null:[],max=one?index+1:options.length,i=0>index?max:one?index:0;max>i;i++)if(option=options[i],!(!option.selected&&i!==index||(support.optDisabled?option.disabled:null!==option.getAttribute("disabled"))||option.parentNode.disabled&&jQuery.nodeName(option.parentNode,"optgroup"))){if(value=jQuery(option).val(),one)return value;values.push(value)}return values},set:function(elem,value){for(var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;i--;)option=options[i],(option.selected=jQuery.inArray(option.value,values)>=0)&&(optionSet=!0);return optionSet||(elem.selectedIndex=-1),values}}}}),jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){return jQuery.isArray(value)?elem.checked=jQuery.inArray(jQuery(elem).val(),value)>=0:void 0}},support.checkOn||(jQuery.valHooks[this].get=function(elem){return null===elem.getAttribute("value")?"on":elem.value})}),jQuery.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(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name)}}),jQuery.fn.extend({hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver)},bind:function(types,data,fn){return this.on(types,null,data,fn)},unbind:function(types,fn){return this.off(types,null,fn)},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn)},undelegate:function(selector,types,fn){return 1===arguments.length?this.off(selector,"**"):this.off(types,selector||"**",fn)}});var nonce=jQuery.now(),rquery=/\?/;jQuery.parseJSON=function(data){return JSON.parse(data+"")},jQuery.parseXML=function(data){var xml,tmp;if(!data||"string"!=typeof data)return null;try{tmp=new DOMParser,xml=tmp.parseFromString(data,"text/xml")}catch(e){xml=void 0}return(!xml||xml.getElementsByTagName("parsererror").length)&&jQuery.error("Invalid XML: "+data),xml};var rhash=/#.*$/,rts=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/gm,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rurl=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,prefilters={},transports={},allTypes="*/".concat("*"),ajaxLocation=window.location.href,ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[];jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ajaxLocation,type:"GET",isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,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":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;2!==state&&(state=2,timeoutTimer&&clearTimeout(timeoutTimer),transport=void 0,responseHeadersString=headers||"",jqXHR.readyState=status>0?4:0,isSuccess=status>=200&&300>status||304===status,responses&&(response=ajaxHandleResponses(s,jqXHR,responses)),response=ajaxConvert(s,response,jqXHR,isSuccess),isSuccess?(s.ifModified&&(modified=jqXHR.getResponseHeader("Last-Modified"),modified&&(jQuery.lastModified[cacheURL]=modified),modified=jqXHR.getResponseHeader("etag"),modified&&(jQuery.etag[cacheURL]=modified)),204===status||"HEAD"===s.type?statusText="nocontent":304===status?statusText="notmodified":(statusText=response.state,success=response.data,error=response.error,isSuccess=!error)):(error=statusText,(status||!statusText)&&(statusText="error",0>status&&(status=0))),jqXHR.status=status,jqXHR.statusText=(nativeStatusText||statusText)+"",isSuccess?deferred.resolveWith(callbackContext,[success,statusText,jqXHR]):deferred.rejectWith(callbackContext,[jqXHR,statusText,error]),jqXHR.statusCode(statusCode),statusCode=void 0,fireGlobals&&globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error]),completeDeferred.fireWith(callbackContext,[jqXHR,statusText]),fireGlobals&&(globalEventContext.trigger("ajaxComplete",[jqXHR,s]),--jQuery.active||jQuery.event.trigger("ajaxStop")))}"object"==typeof url&&(options=url,url=void 0),options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,parts,fireGlobals,i,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},state=0,strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(2===state){if(!responseHeaders)for(responseHeaders={};match=rheaders.exec(responseHeadersString);)responseHeaders[match[1].toLowerCase()]=match[2];match=responseHeaders[key.toLowerCase()]}return null==match?null:match},getAllResponseHeaders:function(){return 2===state?responseHeadersString:null},setRequestHeader:function(name,value){var lname=name.toLowerCase();return state||(name=requestHeadersNames[lname]=requestHeadersNames[lname]||name,requestHeaders[name]=value),this},overrideMimeType:function(type){return state||(s.mimeType=type),this},statusCode:function(map){var code;if(map)if(2>state)for(code in map)statusCode[code]=[statusCode[code],map[code]];else jqXHR.always(map[jqXHR.status]);return this},abort:function(statusText){var finalText=statusText||strAbort;return transport&&transport.abort(finalText),done(0,finalText),this}};if(deferred.promise(jqXHR).complete=completeDeferred.add,jqXHR.success=jqXHR.done,jqXHR.error=jqXHR.fail,s.url=((url||s.url||ajaxLocation)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//"),s.type=options.method||options.type||s.method||s.type,s.dataTypes=jQuery.trim(s.dataType||"*").toLowerCase().match(rnotwhite)||[""],null==s.crossDomain&&(parts=rurl.exec(s.url.toLowerCase()),s.crossDomain=!(!parts||parts[1]===ajaxLocParts[1]&&parts[2]===ajaxLocParts[2]&&(parts[3]||("http:"===parts[1]?"80":"443"))===(ajaxLocParts[3]||("http:"===ajaxLocParts[1]?"80":"443")))),s.data&&s.processData&&"string"!=typeof s.data&&(s.data=jQuery.param(s.data,s.traditional)),inspectPrefiltersOrTransports(prefilters,s,options,jqXHR),2===state)return jqXHR;fireGlobals=jQuery.event&&s.global,fireGlobals&&0===jQuery.active++&&jQuery.event.trigger("ajaxStart"),s.type=s.type.toUpperCase(),s.hasContent=!rnoContent.test(s.type),cacheURL=s.url,s.hasContent||(s.data&&(cacheURL=s.url+=(rquery.test(cacheURL)?"&":"?")+s.data,delete s.data),s.cache===!1&&(s.url=rts.test(cacheURL)?cacheURL.replace(rts,"$1_="+nonce++):cacheURL+(rquery.test(cacheURL)?"&":"?")+"_="+nonce++)),s.ifModified&&(jQuery.lastModified[cacheURL]&&jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]),jQuery.etag[cacheURL]&&jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL])),(s.data&&s.hasContent&&s.contentType!==!1||options.contentType)&&jqXHR.setRequestHeader("Content-Type",s.contentType),jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+("*"!==s.dataTypes[0]?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers)jqXHR.setRequestHeader(i,s.headers[i]);if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===!1||2===state))return jqXHR.abort();strAbort="abort";for(i in{success:1,error:1,complete:1})jqXHR[i](s[i]);if(transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR)){jqXHR.readyState=1,fireGlobals&&globalEventContext.trigger("ajaxSend",[jqXHR,s]),s.async&&s.timeout>0&&(timeoutTimer=setTimeout(function(){jqXHR.abort("timeout")},s.timeout));try{state=1,transport.send(requestHeaders,done)}catch(e){if(!(2>state))throw e;done(-1,e)}}else done(-1,"No Transport");return jqXHR},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},getScript:function(url,callback){return jQuery.get(url,void 0,callback,"script")}}),jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){return jQuery.isFunction(data)&&(type=type||callback,callback=data,data=void 0),jQuery.ajax({url:url,type:method,dataType:type,data:data,success:callback})}}),jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},jQuery.fn.extend({wrapAll:function(html){var wrap;return jQuery.isFunction(html)?this.each(function(i){jQuery(this).wrapAll(html.call(this,i))}):(this[0]&&(wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&wrap.insertBefore(this[0]),wrap.map(function(){for(var elem=this;elem.firstElementChild;)elem=elem.firstElementChild;return elem}).append(this)),this)},wrapInner:function(html){return this.each(jQuery.isFunction(html)?function(i){jQuery(this).wrapInner(html.call(this,i))}:function(){var self=jQuery(this),contents=self.contents();contents.length?contents.wrapAll(html):self.append(html)})},wrap:function(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html)})},unwrap:function(){return this.parent().each(function(){jQuery.nodeName(this,"body")||jQuery(this).replaceWith(this.childNodes)}).end()}}),jQuery.expr.filters.hidden=function(elem){return elem.offsetWidth<=0&&elem.offsetHeight<=0},jQuery.expr.filters.visible=function(elem){return!jQuery.expr.filters.hidden(elem)};var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,value){value=jQuery.isFunction(value)?value():null==value?"":value,s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)};if(void 0===traditional&&(traditional=jQuery.ajaxSettings&&jQuery.ajaxSettings.traditional),jQuery.isArray(a)||a.jquery&&!jQuery.isPlainObject(a))jQuery.each(a,function(){add(this.name,this.value)});else for(prefix in a)buildParams(prefix,a[prefix],traditional,add);return s.join("&").replace(r20,"+")},jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type))}).map(function(i,elem){var val=jQuery(this).val();return null==val?null:jQuery.isArray(val)?jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")}}):{name:elem.name,value:val.replace(rCRLF,"\r\n")}}).get()}}),jQuery.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var xhrId=0,xhrCallbacks={},xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();window.attachEvent&&window.attachEvent("onunload",function(){for(var key in xhrCallbacks)xhrCallbacks[key]()}),support.cors=!!xhrSupported&&"withCredentials"in xhrSupported,support.ajax=xhrSupported=!!xhrSupported,jQuery.ajaxTransport(function(options){var callback;return support.cors||xhrSupported&&!options.crossDomain?{send:function(headers,complete){var i,xhr=options.xhr(),id=++xhrId;if(xhr.open(options.type,options.url,options.async,options.username,options.password),options.xhrFields)for(i in options.xhrFields)xhr[i]=options.xhrFields[i];options.mimeType&&xhr.overrideMimeType&&xhr.overrideMimeType(options.mimeType),options.crossDomain||headers["X-Requested-With"]||(headers["X-Requested-With"]="XMLHttpRequest");for(i in headers)xhr.setRequestHeader(i,headers[i]);callback=function(type){return function(){callback&&(delete xhrCallbacks[id],callback=xhr.onload=xhr.onerror=null,"abort"===type?xhr.abort():"error"===type?complete(xhr.status,xhr.statusText):complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,"string"==typeof xhr.responseText?{text:xhr.responseText}:void 0,xhr.getAllResponseHeaders()))}},xhr.onload=callback(),xhr.onerror=callback("error"),callback=xhrCallbacks[id]=callback("abort");try{xhr.send(options.hasContent&&options.data||null)}catch(e){if(callback)throw e}},abort:function(){callback&&callback()}}:void 0}),jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(text){return jQuery.globalEval(text),text}}}),jQuery.ajaxPrefilter("script",function(s){void 0===s.cache&&(s.cache=!1),s.crossDomain&&(s.type="GET")}),jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,callback;return{send:function(_,complete){script=jQuery("<script>").prop({async:!0,charset:s.scriptCharset,src:s.url}).on("load error",callback=function(evt){script.remove(),callback=null,evt&&complete("error"===evt.type?404:200,evt.type)}),document.head.appendChild(script[0])},abort:function(){callback&&callback()}}}});var oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var callback=oldCallbacks.pop()||jQuery.expando+"_"+nonce++;return this[callback]=!0,callback}}),jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==!1&&(rjsonp.test(s.url)?"url":"string"==typeof s.data&&!(s.contentType||"").indexOf("application/x-www-form-urlencoded")&&rjsonp.test(s.data)&&"data");return jsonProp||"jsonp"===s.dataTypes[0]?(callbackName=s.jsonpCallback=jQuery.isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback,jsonProp?s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName):s.jsonp!==!1&&(s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName),s.converters["script json"]=function(){return responseContainer||jQuery.error(callbackName+" was not called"),responseContainer[0]},s.dataTypes[0]="json",overwritten=window[callbackName],window[callbackName]=function(){responseContainer=arguments},jqXHR.always(function(){window[callbackName]=overwritten,s[callbackName]&&(s.jsonpCallback=originalSettings.jsonpCallback,oldCallbacks.push(callbackName)),responseContainer&&jQuery.isFunction(overwritten)&&overwritten(responseContainer[0]),responseContainer=overwritten=void 0}),"script"):void 0}),jQuery.parseHTML=function(data,context,keepScripts){if(!data||"string"!=typeof data)return null;"boolean"==typeof context&&(keepScripts=context,context=!1),context=context||document;var parsed=rsingleTag.exec(data),scripts=!keepScripts&&[];return parsed?[context.createElement(parsed[1])]:(parsed=jQuery.buildFragment([data],context,scripts),scripts&&scripts.length&&jQuery(scripts).remove(),jQuery.merge([],parsed.childNodes))};var _load=jQuery.fn.load;jQuery.fn.load=function(url,params,callback){if("string"!=typeof url&&_load)return _load.apply(this,arguments);var selector,type,response,self=this,off=url.indexOf(" ");return off>=0&&(selector=jQuery.trim(url.slice(off)),url=url.slice(0,off)),jQuery.isFunction(params)?(callback=params,params=void 0):params&&"object"==typeof params&&(type="POST"),self.length>0&&jQuery.ajax({url:url,type:type,dataType:"html",data:params}).done(function(responseText){response=arguments,self.html(selector?jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):responseText)}).complete(callback&&function(jqXHR,status){self.each(callback,response||[jqXHR.responseText,status,jqXHR])}),this},jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn)}}),jQuery.expr.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length};var docElem=window.document.documentElement;jQuery.offset={setOffset:function(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery.css(elem,"position"),curElem=jQuery(elem),props={};"static"===position&&(elem.style.position="relative"),curOffset=curElem.offset(),curCSSTop=jQuery.css(elem,"top"),curCSSLeft=jQuery.css(elem,"left"),calculatePosition=("absolute"===position||"fixed"===position)&&(curCSSTop+curCSSLeft).indexOf("auto")>-1,calculatePosition?(curPosition=curElem.position(),curTop=curPosition.top,curLeft=curPosition.left):(curTop=parseFloat(curCSSTop)||0,curLeft=parseFloat(curCSSLeft)||0),jQuery.isFunction(options)&&(options=options.call(elem,i,curOffset)),null!=options.top&&(props.top=options.top-curOffset.top+curTop),null!=options.left&&(props.left=options.left-curOffset.left+curLeft),"using"in options?options.using.call(elem,props):curElem.css(props)}},jQuery.fn.extend({offset:function(options){if(arguments.length)return void 0===options?this:this.each(function(i){jQuery.offset.setOffset(this,options,i)});var docElem,win,elem=this[0],box={top:0,left:0},doc=elem&&elem.ownerDocument;if(doc)return docElem=doc.documentElement,jQuery.contains(docElem,elem)?(typeof elem.getBoundingClientRect!==strundefined&&(box=elem.getBoundingClientRect()),win=getWindow(doc),{top:box.top+win.pageYOffset-docElem.clientTop,left:box.left+win.pageXOffset-docElem.clientLeft}):box},position:function(){if(this[0]){var offsetParent,offset,elem=this[0],parentOffset={top:0,left:0};return"fixed"===jQuery.css(elem,"position")?offset=elem.getBoundingClientRect():(offsetParent=this.offsetParent(),offset=this.offset(),jQuery.nodeName(offsetParent[0],"html")||(parentOffset=offsetParent.offset()),parentOffset.top+=jQuery.css(offsetParent[0],"borderTopWidth",!0),parentOffset.left+=jQuery.css(offsetParent[0],"borderLeftWidth",!0)),{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",!0),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var offsetParent=this.offsetParent||docElem;offsetParent&&!jQuery.nodeName(offsetParent,"html")&&"static"===jQuery.css(offsetParent,"position");)offsetParent=offsetParent.offsetParent;return offsetParent||docElem})}}),jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top="pageYOffset"===prop;jQuery.fn[method]=function(val){return access(this,function(elem,method,val){var win=getWindow(elem);return void 0===val?win?win[prop]:elem[method]:void(win?win.scrollTo(top?window.pageXOffset:val,top?val:window.pageYOffset):elem[method]=val)},method,val,arguments.length,null)}}),jQuery.each(["top","left"],function(i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){return computed?(computed=curCSS(elem,prop),rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed):void 0
})}),jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||"boolean"!=typeof margin),extra=defaultExtra||(margin===!0||value===!0?"margin":"border");return access(this,function(elem,type,value){var doc;return jQuery.isWindow(elem)?elem.document.documentElement["client"+name]:9===elem.nodeType?(doc=elem.documentElement,Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name])):void 0===value?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra)},type,chainable?margin:void 0,chainable,null)}})}),jQuery.fn.size=function(){return this.length},jQuery.fn.andSelf=jQuery.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return jQuery});var _jQuery=window.jQuery,_$=window.$;return jQuery.noConflict=function(deep){return window.$===jQuery&&(window.$=_$),deep&&window.jQuery===jQuery&&(window.jQuery=_jQuery),jQuery},typeof noGlobal===strundefined&&(window.jQuery=window.$=jQuery),jQuery}),function(){function baseIndexOf(array,value,fromIndex){for(var index=(fromIndex||0)-1,length=array?array.length:0;++index<length;)if(array[index]===value)return index;return-1}function cacheIndexOf(cache,value){var type=typeof value;if(cache=cache.cache,"boolean"==type||null==value)return cache[value]?0:-1;"number"!=type&&"string"!=type&&(type="object");var key="number"==type?value:keyPrefix+value;return cache=(cache=cache[type])&&cache[key],"object"==type?cache&&baseIndexOf(cache,value)>-1?0:-1:cache?0:-1}function cachePush(value){var cache=this.cache,type=typeof value;if("boolean"==type||null==value)cache[value]=!0;else{"number"!=type&&"string"!=type&&(type="object");var key="number"==type?value:keyPrefix+value,typeCache=cache[type]||(cache[type]={});"object"==type?(typeCache[key]||(typeCache[key]=[])).push(value):typeCache[key]=!0}}function charAtCallback(value){return value.charCodeAt(0)}function compareAscending(a,b){for(var ac=a.criteria,bc=b.criteria,index=-1,length=ac.length;++index<length;){var value=ac[index],other=bc[index];if(value!==other){if(value>other||"undefined"==typeof value)return 1;if(other>value||"undefined"==typeof other)return-1}}return a.index-b.index}function createCache(array){var index=-1,length=array.length,first=array[0],mid=array[length/2|0],last=array[length-1];if(first&&"object"==typeof first&&mid&&"object"==typeof mid&&last&&"object"==typeof last)return!1;var cache=getObject();cache["false"]=cache["null"]=cache["true"]=cache.undefined=!1;var result=getObject();for(result.array=array,result.cache=cache,result.push=cachePush;++index<length;)result.push(array[index]);return result}function escapeStringChar(match){return"\\"+stringEscapes[match]}function getArray(){return arrayPool.pop()||[]}function getObject(){return objectPool.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,value:null}}function releaseArray(array){array.length=0,arrayPool.length<maxPoolSize&&arrayPool.push(array)}function releaseObject(object){var cache=object.cache;cache&&releaseObject(cache),object.array=object.cache=object.criteria=object.object=object.number=object.string=object.value=null,objectPool.length<maxPoolSize&&objectPool.push(object)}function slice(array,start,end){start||(start=0),"undefined"==typeof end&&(end=array?array.length:0);for(var index=-1,length=end-start||0,result=Array(0>length?0:length);++index<length;)result[index]=array[start+index];return result}function runInContext(context){function lodash(value){return value&&"object"==typeof value&&!isArray(value)&&hasOwnProperty.call(value,"__wrapped__")?value:new lodashWrapper(value)}function lodashWrapper(value,chainAll){this.__chain__=!!chainAll,this.__wrapped__=value}function baseBind(bindData){function bound(){if(partialArgs){var args=slice(partialArgs);push.apply(args,arguments)}if(this instanceof bound){var thisBinding=baseCreate(func.prototype),result=func.apply(thisBinding,args||arguments);return isObject(result)?result:thisBinding}return func.apply(thisArg,args||arguments)}var func=bindData[0],partialArgs=bindData[2],thisArg=bindData[4];return setBindData(bound,bindData),bound}function baseClone(value,isDeep,callback,stackA,stackB){if(callback){var result=callback(value);if("undefined"!=typeof result)return result}var isObj=isObject(value);if(!isObj)return value;var className=toString.call(value);if(!cloneableClasses[className])return value;var ctor=ctorByClass[className];switch(className){case boolClass:case dateClass:return new ctor(+value);case numberClass:case stringClass:return new ctor(value);case regexpClass:return result=ctor(value.source,reFlags.exec(value)),result.lastIndex=value.lastIndex,result}var isArr=isArray(value);if(isDeep){var initedStack=!stackA;stackA||(stackA=getArray()),stackB||(stackB=getArray());for(var length=stackA.length;length--;)if(stackA[length]==value)return stackB[length];result=isArr?ctor(value.length):{}}else result=isArr?slice(value):assign({},value);return isArr&&(hasOwnProperty.call(value,"index")&&(result.index=value.index),hasOwnProperty.call(value,"input")&&(result.input=value.input)),isDeep?(stackA.push(value),stackB.push(result),(isArr?forEach:forOwn)(value,function(objValue,key){result[key]=baseClone(objValue,isDeep,callback,stackA,stackB)}),initedStack&&(releaseArray(stackA),releaseArray(stackB)),result):result}function baseCreate(prototype){return isObject(prototype)?nativeCreate(prototype):{}}function baseCreateCallback(func,thisArg,argCount){if("function"!=typeof func)return identity;if("undefined"==typeof thisArg||!("prototype"in func))return func;var bindData=func.__bindData__;if("undefined"==typeof bindData&&(support.funcNames&&(bindData=!func.name),bindData=bindData||!support.funcDecomp,!bindData)){var source=fnToString.call(func);support.funcNames||(bindData=!reFuncName.test(source)),bindData||(bindData=reThis.test(source),setBindData(func,bindData))}if(bindData===!1||bindData!==!0&&1&bindData[1])return func;switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 2:return function(a,b){return func.call(thisArg,a,b)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)}}return bind(func,thisArg)}function baseCreateWrapper(bindData){function bound(){var thisBinding=isBind?thisArg:this;if(partialArgs){var args=slice(partialArgs);push.apply(args,arguments)}if((partialRightArgs||isCurry)&&(args||(args=slice(arguments)),partialRightArgs&&push.apply(args,partialRightArgs),isCurry&&args.length<arity))return bitmask|=16,baseCreateWrapper([func,isCurryBound?bitmask:-4&bitmask,args,null,thisArg,arity]);if(args||(args=arguments),isBindKey&&(func=thisBinding[key]),this instanceof bound){thisBinding=baseCreate(func.prototype);var result=func.apply(thisBinding,args);return isObject(result)?result:thisBinding}return func.apply(thisBinding,args)}var func=bindData[0],bitmask=bindData[1],partialArgs=bindData[2],partialRightArgs=bindData[3],thisArg=bindData[4],arity=bindData[5],isBind=1&bitmask,isBindKey=2&bitmask,isCurry=4&bitmask,isCurryBound=8&bitmask,key=func;return setBindData(bound,bindData),bound}function baseDifference(array,values){var index=-1,indexOf=getIndexOf(),length=array?array.length:0,isLarge=length>=largeArraySize&&indexOf===baseIndexOf,result=[];if(isLarge){var cache=createCache(values);cache?(indexOf=cacheIndexOf,values=cache):isLarge=!1}for(;++index<length;){var value=array[index];indexOf(values,value)<0&&result.push(value)}return isLarge&&releaseObject(values),result}function baseFlatten(array,isShallow,isStrict,fromIndex){for(var index=(fromIndex||0)-1,length=array?array.length:0,result=[];++index<length;){var value=array[index];if(value&&"object"==typeof value&&"number"==typeof value.length&&(isArray(value)||isArguments(value))){isShallow||(value=baseFlatten(value,isShallow,isStrict));var valIndex=-1,valLength=value.length,resIndex=result.length;for(result.length+=valLength;++valIndex<valLength;)result[resIndex++]=value[valIndex]}else isStrict||result.push(value)}return result}function baseIsEqual(a,b,callback,isWhere,stackA,stackB){if(callback){var result=callback(a,b);if("undefined"!=typeof result)return!!result}if(a===b)return 0!==a||1/a==1/b;var type=typeof a,otherType=typeof b;if(!(a!==a||a&&objectTypes[type]||b&&objectTypes[otherType]))return!1;if(null==a||null==b)return a===b;var className=toString.call(a),otherClass=toString.call(b);if(className==argsClass&&(className=objectClass),otherClass==argsClass&&(otherClass=objectClass),className!=otherClass)return!1;switch(className){case boolClass:case dateClass:return+a==+b;case numberClass:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case regexpClass:case stringClass:return a==String(b)}var isArr=className==arrayClass;if(!isArr){var aWrapped=hasOwnProperty.call(a,"__wrapped__"),bWrapped=hasOwnProperty.call(b,"__wrapped__");if(aWrapped||bWrapped)return baseIsEqual(aWrapped?a.__wrapped__:a,bWrapped?b.__wrapped__:b,callback,isWhere,stackA,stackB);if(className!=objectClass)return!1;var ctorA=a.constructor,ctorB=b.constructor;if(ctorA!=ctorB&&!(isFunction(ctorA)&&ctorA instanceof ctorA&&isFunction(ctorB)&&ctorB instanceof ctorB)&&"constructor"in a&&"constructor"in b)return!1}var initedStack=!stackA;stackA||(stackA=getArray()),stackB||(stackB=getArray());for(var length=stackA.length;length--;)if(stackA[length]==a)return stackB[length]==b;var size=0;if(result=!0,stackA.push(a),stackB.push(b),isArr){if(length=a.length,size=b.length,result=size==length,result||isWhere)for(;size--;){var index=length,value=b[size];if(isWhere)for(;index--&&!(result=baseIsEqual(a[index],value,callback,isWhere,stackA,stackB)););else if(!(result=baseIsEqual(a[size],value,callback,isWhere,stackA,stackB)))break}}else forIn(b,function(value,key,b){return hasOwnProperty.call(b,key)?(size++,result=hasOwnProperty.call(a,key)&&baseIsEqual(a[key],value,callback,isWhere,stackA,stackB)):void 0}),result&&!isWhere&&forIn(a,function(value,key,a){return hasOwnProperty.call(a,key)?result=--size>-1:void 0});return stackA.pop(),stackB.pop(),initedStack&&(releaseArray(stackA),releaseArray(stackB)),result}function baseMerge(object,source,callback,stackA,stackB){(isArray(source)?forEach:forOwn)(source,function(source,key){var found,isArr,result=source,value=object[key];if(source&&((isArr=isArray(source))||isPlainObject(source))){for(var stackLength=stackA.length;stackLength--;)if(found=stackA[stackLength]==source){value=stackB[stackLength];break}if(!found){var isShallow;callback&&(result=callback(value,source),(isShallow="undefined"!=typeof result)&&(value=result)),isShallow||(value=isArr?isArray(value)?value:[]:isPlainObject(value)?value:{}),stackA.push(source),stackB.push(value),isShallow||baseMerge(value,source,callback,stackA,stackB)}}else callback&&(result=callback(value,source),"undefined"==typeof result&&(result=source)),"undefined"!=typeof result&&(value=result);object[key]=value})}function baseRandom(min,max){return min+floor(nativeRandom()*(max-min+1))}function baseUniq(array,isSorted,callback){var index=-1,indexOf=getIndexOf(),length=array?array.length:0,result=[],isLarge=!isSorted&&length>=largeArraySize&&indexOf===baseIndexOf,seen=callback||isLarge?getArray():result;if(isLarge){var cache=createCache(seen);indexOf=cacheIndexOf,seen=cache}for(;++index<length;){var value=array[index],computed=callback?callback(value,index,array):value;(isSorted?!index||seen[seen.length-1]!==computed:indexOf(seen,computed)<0)&&((callback||isLarge)&&seen.push(computed),result.push(value))}return isLarge?(releaseArray(seen.array),releaseObject(seen)):callback&&releaseArray(seen),result}function createAggregator(setter){return function(collection,callback,thisArg){var result={};callback=lodash.createCallback(callback,thisArg,3);var index=-1,length=collection?collection.length:0;if("number"==typeof length)for(;++index<length;){var value=collection[index];setter(result,value,callback(value,index,collection),collection)}else forOwn(collection,function(value,key,collection){setter(result,value,callback(value,key,collection),collection)});return result}}function createWrapper(func,bitmask,partialArgs,partialRightArgs,thisArg,arity){var isBind=1&bitmask,isBindKey=2&bitmask,isCurry=4&bitmask,isPartial=16&bitmask,isPartialRight=32&bitmask;if(!isBindKey&&!isFunction(func))throw new TypeError;isPartial&&!partialArgs.length&&(bitmask&=-17,isPartial=partialArgs=!1),isPartialRight&&!partialRightArgs.length&&(bitmask&=-33,isPartialRight=partialRightArgs=!1);var bindData=func&&func.__bindData__;if(bindData&&bindData!==!0)return bindData=slice(bindData),bindData[2]&&(bindData[2]=slice(bindData[2])),bindData[3]&&(bindData[3]=slice(bindData[3])),!isBind||1&bindData[1]||(bindData[4]=thisArg),!isBind&&1&bindData[1]&&(bitmask|=8),!isCurry||4&bindData[1]||(bindData[5]=arity),isPartial&&push.apply(bindData[2]||(bindData[2]=[]),partialArgs),isPartialRight&&unshift.apply(bindData[3]||(bindData[3]=[]),partialRightArgs),bindData[1]|=bitmask,createWrapper.apply(null,bindData);var creater=1==bitmask||17===bitmask?baseBind:baseCreateWrapper;return creater([func,bitmask,partialArgs,partialRightArgs,thisArg,arity])}function escapeHtmlChar(match){return htmlEscapes[match]}function getIndexOf(){var result=(result=lodash.indexOf)===indexOf?baseIndexOf:result;return result}function isNative(value){return"function"==typeof value&&reNative.test(value)}function shimIsPlainObject(value){var ctor,result;return value&&toString.call(value)==objectClass&&(ctor=value.constructor,!isFunction(ctor)||ctor instanceof ctor)?(forIn(value,function(value,key){result=key}),"undefined"==typeof result||hasOwnProperty.call(value,result)):!1}function unescapeHtmlChar(match){return htmlUnescapes[match]}function isArguments(value){return value&&"object"==typeof value&&"number"==typeof value.length&&toString.call(value)==argsClass||!1}function clone(value,isDeep,callback,thisArg){return"boolean"!=typeof isDeep&&null!=isDeep&&(thisArg=callback,callback=isDeep,isDeep=!1),baseClone(value,isDeep,"function"==typeof callback&&baseCreateCallback(callback,thisArg,1))}function cloneDeep(value,callback,thisArg){return baseClone(value,!0,"function"==typeof callback&&baseCreateCallback(callback,thisArg,1))}function create(prototype,properties){var result=baseCreate(prototype);return properties?assign(result,properties):result}function findKey(object,callback,thisArg){var result;return callback=lodash.createCallback(callback,thisArg,3),forOwn(object,function(value,key,object){return callback(value,key,object)?(result=key,!1):void 0}),result}function findLastKey(object,callback,thisArg){var result;return callback=lodash.createCallback(callback,thisArg,3),forOwnRight(object,function(value,key,object){return callback(value,key,object)?(result=key,!1):void 0}),result}function forInRight(object,callback,thisArg){var pairs=[];forIn(object,function(value,key){pairs.push(key,value)});var length=pairs.length;for(callback=baseCreateCallback(callback,thisArg,3);length--&&callback(pairs[length--],pairs[length],object)!==!1;);return object}function forOwnRight(object,callback,thisArg){var props=keys(object),length=props.length;for(callback=baseCreateCallback(callback,thisArg,3);length--;){var key=props[length];if(callback(object[key],key,object)===!1)break}return object}function functions(object){var result=[];return forIn(object,function(value,key){isFunction(value)&&result.push(key)}),result.sort()}function has(object,key){return object?hasOwnProperty.call(object,key):!1}function invert(object){for(var index=-1,props=keys(object),length=props.length,result={};++index<length;){var key=props[index];result[object[key]]=key}return result}function isBoolean(value){return value===!0||value===!1||value&&"object"==typeof value&&toString.call(value)==boolClass||!1}function isDate(value){return value&&"object"==typeof value&&toString.call(value)==dateClass||!1}function isElement(value){return value&&1===value.nodeType||!1}function isEmpty(value){var result=!0;if(!value)return result;var className=toString.call(value),length=value.length;return className==arrayClass||className==stringClass||className==argsClass||className==objectClass&&"number"==typeof length&&isFunction(value.splice)?!length:(forOwn(value,function(){return result=!1}),result)}function isEqual(a,b,callback,thisArg){return baseIsEqual(a,b,"function"==typeof callback&&baseCreateCallback(callback,thisArg,2))}function isFinite(value){return nativeIsFinite(value)&&!nativeIsNaN(parseFloat(value))}function isFunction(value){return"function"==typeof value}function isObject(value){return!(!value||!objectTypes[typeof value])}function isNaN(value){return isNumber(value)&&value!=+value}function isNull(value){return null===value}function isNumber(value){return"number"==typeof value||value&&"object"==typeof value&&toString.call(value)==numberClass||!1}function isRegExp(value){return value&&"object"==typeof value&&toString.call(value)==regexpClass||!1}function isString(value){return"string"==typeof value||value&&"object"==typeof value&&toString.call(value)==stringClass||!1}function isUndefined(value){return"undefined"==typeof value}function mapValues(object,callback,thisArg){var result={};return callback=lodash.createCallback(callback,thisArg,3),forOwn(object,function(value,key,object){result[key]=callback(value,key,object)}),result}function merge(object){var args=arguments,length=2;if(!isObject(object))return object;if("number"!=typeof args[2]&&(length=args.length),length>3&&"function"==typeof args[length-2])var callback=baseCreateCallback(args[--length-1],args[length--],2);else length>2&&"function"==typeof args[length-1]&&(callback=args[--length]);for(var sources=slice(arguments,1,length),index=-1,stackA=getArray(),stackB=getArray();++index<length;)baseMerge(object,sources[index],callback,stackA,stackB);return releaseArray(stackA),releaseArray(stackB),object}function omit(object,callback,thisArg){var result={};if("function"!=typeof callback){var props=[];forIn(object,function(value,key){props.push(key)}),props=baseDifference(props,baseFlatten(arguments,!0,!1,1));for(var index=-1,length=props.length;++index<length;){var key=props[index];result[key]=object[key]}}else callback=lodash.createCallback(callback,thisArg,3),forIn(object,function(value,key,object){callback(value,key,object)||(result[key]=value)});return result}function pairs(object){for(var index=-1,props=keys(object),length=props.length,result=Array(length);++index<length;){var key=props[index];result[index]=[key,object[key]]}return result}function pick(object,callback,thisArg){var result={};if("function"!=typeof callback)for(var index=-1,props=baseFlatten(arguments,!0,!1,1),length=isObject(object)?props.length:0;++index<length;){var key=props[index];key in object&&(result[key]=object[key])}else callback=lodash.createCallback(callback,thisArg,3),forIn(object,function(value,key,object){callback(value,key,object)&&(result[key]=value)});return result}function transform(object,callback,accumulator,thisArg){var isArr=isArray(object);if(null==accumulator)if(isArr)accumulator=[];else{var ctor=object&&object.constructor,proto=ctor&&ctor.prototype;accumulator=baseCreate(proto)}return callback&&(callback=lodash.createCallback(callback,thisArg,4),(isArr?forEach:forOwn)(object,function(value,index,object){return callback(accumulator,value,index,object)})),accumulator}function values(object){for(var index=-1,props=keys(object),length=props.length,result=Array(length);++index<length;)result[index]=object[props[index]];return result}function at(collection){for(var args=arguments,index=-1,props=baseFlatten(args,!0,!1,1),length=args[2]&&args[2][args[1]]===collection?1:props.length,result=Array(length);++index<length;)result[index]=collection[props[index]];return result}function contains(collection,target,fromIndex){var index=-1,indexOf=getIndexOf(),length=collection?collection.length:0,result=!1;return fromIndex=(0>fromIndex?nativeMax(0,length+fromIndex):fromIndex)||0,isArray(collection)?result=indexOf(collection,target,fromIndex)>-1:"number"==typeof length?result=(isString(collection)?collection.indexOf(target,fromIndex):indexOf(collection,target,fromIndex))>-1:forOwn(collection,function(value){return++index>=fromIndex?!(result=value===target):void 0}),result}function every(collection,callback,thisArg){var result=!0;callback=lodash.createCallback(callback,thisArg,3);var index=-1,length=collection?collection.length:0;if("number"==typeof length)for(;++index<length&&(result=!!callback(collection[index],index,collection)););else forOwn(collection,function(value,index,collection){return result=!!callback(value,index,collection)});return result}function filter(collection,callback,thisArg){var result=[];callback=lodash.createCallback(callback,thisArg,3);var index=-1,length=collection?collection.length:0;if("number"==typeof length)for(;++index<length;){var value=collection[index];callback(value,index,collection)&&result.push(value)}else forOwn(collection,function(value,index,collection){callback(value,index,collection)&&result.push(value)});return result}function find(collection,callback,thisArg){callback=lodash.createCallback(callback,thisArg,3);var index=-1,length=collection?collection.length:0;if("number"!=typeof length){var result;return forOwn(collection,function(value,index,collection){return callback(value,index,collection)?(result=value,!1):void 0}),result}for(;++index<length;){var value=collection[index];if(callback(value,index,collection))return value}}function findLast(collection,callback,thisArg){var result;return callback=lodash.createCallback(callback,thisArg,3),forEachRight(collection,function(value,index,collection){return callback(value,index,collection)?(result=value,!1):void 0}),result}function forEach(collection,callback,thisArg){var index=-1,length=collection?collection.length:0;if(callback=callback&&"undefined"==typeof thisArg?callback:baseCreateCallback(callback,thisArg,3),"number"==typeof length)for(;++index<length&&callback(collection[index],index,collection)!==!1;);else forOwn(collection,callback);return collection}function forEachRight(collection,callback,thisArg){var length=collection?collection.length:0;if(callback=callback&&"undefined"==typeof thisArg?callback:baseCreateCallback(callback,thisArg,3),"number"==typeof length)for(;length--&&callback(collection[length],length,collection)!==!1;);else{var props=keys(collection);length=props.length,forOwn(collection,function(value,key,collection){return key=props?props[--length]:--length,callback(collection[key],key,collection)})}return collection}function invoke(collection,methodName){var args=slice(arguments,2),index=-1,isFunc="function"==typeof methodName,length=collection?collection.length:0,result=Array("number"==typeof length?length:0);return forEach(collection,function(value){result[++index]=(isFunc?methodName:value[methodName]).apply(value,args)}),result}function map(collection,callback,thisArg){var index=-1,length=collection?collection.length:0;if(callback=lodash.createCallback(callback,thisArg,3),"number"==typeof length)for(var result=Array(length);++index<length;)result[index]=callback(collection[index],index,collection);else result=[],forOwn(collection,function(value,key,collection){result[++index]=callback(value,key,collection)});return result}function max(collection,callback,thisArg){var computed=-1/0,result=computed;if("function"!=typeof callback&&thisArg&&thisArg[callback]===collection&&(callback=null),null==callback&&isArray(collection))for(var index=-1,length=collection.length;++index<length;){var value=collection[index];value>result&&(result=value)}else callback=null==callback&&isString(collection)?charAtCallback:lodash.createCallback(callback,thisArg,3),forEach(collection,function(value,index,collection){var current=callback(value,index,collection);current>computed&&(computed=current,result=value)});return result}function min(collection,callback,thisArg){var computed=1/0,result=computed;if("function"!=typeof callback&&thisArg&&thisArg[callback]===collection&&(callback=null),null==callback&&isArray(collection))for(var index=-1,length=collection.length;++index<length;){var value=collection[index];result>value&&(result=value)}else callback=null==callback&&isString(collection)?charAtCallback:lodash.createCallback(callback,thisArg,3),forEach(collection,function(value,index,collection){var current=callback(value,index,collection);computed>current&&(computed=current,result=value)});return result}function reduce(collection,callback,accumulator,thisArg){if(!collection)return accumulator;var noaccum=arguments.length<3;callback=lodash.createCallback(callback,thisArg,4);var index=-1,length=collection.length;if("number"==typeof length)for(noaccum&&(accumulator=collection[++index]);++index<length;)accumulator=callback(accumulator,collection[index],index,collection);else forOwn(collection,function(value,index,collection){accumulator=noaccum?(noaccum=!1,value):callback(accumulator,value,index,collection)});return accumulator}function reduceRight(collection,callback,accumulator,thisArg){var noaccum=arguments.length<3;return callback=lodash.createCallback(callback,thisArg,4),forEachRight(collection,function(value,index,collection){accumulator=noaccum?(noaccum=!1,value):callback(accumulator,value,index,collection)}),accumulator}function reject(collection,callback,thisArg){return callback=lodash.createCallback(callback,thisArg,3),filter(collection,function(value,index,collection){return!callback(value,index,collection)})}function sample(collection,n,guard){if(collection&&"number"!=typeof collection.length&&(collection=values(collection)),null==n||guard)return collection?collection[baseRandom(0,collection.length-1)]:undefined;var result=shuffle(collection);return result.length=nativeMin(nativeMax(0,n),result.length),result}function shuffle(collection){var index=-1,length=collection?collection.length:0,result=Array("number"==typeof length?length:0);return forEach(collection,function(value){var rand=baseRandom(0,++index);result[index]=result[rand],result[rand]=value}),result}function size(collection){var length=collection?collection.length:0;return"number"==typeof length?length:keys(collection).length}function some(collection,callback,thisArg){var result;callback=lodash.createCallback(callback,thisArg,3);var index=-1,length=collection?collection.length:0;if("number"==typeof length)for(;++index<length&&!(result=callback(collection[index],index,collection)););else forOwn(collection,function(value,index,collection){return!(result=callback(value,index,collection))});return!!result}function sortBy(collection,callback,thisArg){var index=-1,isArr=isArray(callback),length=collection?collection.length:0,result=Array("number"==typeof length?length:0);for(isArr||(callback=lodash.createCallback(callback,thisArg,3)),forEach(collection,function(value,key,collection){var object=result[++index]=getObject();isArr?object.criteria=map(callback,function(key){return value[key]}):(object.criteria=getArray())[0]=callback(value,key,collection),object.index=index,object.value=value}),length=result.length,result.sort(compareAscending);length--;){var object=result[length];result[length]=object.value,isArr||releaseArray(object.criteria),releaseObject(object)}return result}function toArray(collection){return collection&&"number"==typeof collection.length?slice(collection):values(collection)}function compact(array){for(var index=-1,length=array?array.length:0,result=[];++index<length;){var value=array[index];value&&result.push(value)}return result}function difference(array){return baseDifference(array,baseFlatten(arguments,!0,!0,1))}function findIndex(array,callback,thisArg){var index=-1,length=array?array.length:0;for(callback=lodash.createCallback(callback,thisArg,3);++index<length;)if(callback(array[index],index,array))return index;return-1}function findLastIndex(array,callback,thisArg){var length=array?array.length:0;for(callback=lodash.createCallback(callback,thisArg,3);length--;)if(callback(array[length],length,array))return length;return-1}function first(array,callback,thisArg){var n=0,length=array?array.length:0;if("number"!=typeof callback&&null!=callback){var index=-1;for(callback=lodash.createCallback(callback,thisArg,3);++index<length&&callback(array[index],index,array);)n++}else if(n=callback,null==n||thisArg)return array?array[0]:undefined;return slice(array,0,nativeMin(nativeMax(0,n),length))}function flatten(array,isShallow,callback,thisArg){return"boolean"!=typeof isShallow&&null!=isShallow&&(thisArg=callback,callback="function"!=typeof isShallow&&thisArg&&thisArg[isShallow]===array?null:isShallow,isShallow=!1),null!=callback&&(array=map(array,callback,thisArg)),baseFlatten(array,isShallow)}function indexOf(array,value,fromIndex){if("number"==typeof fromIndex){var length=array?array.length:0;fromIndex=0>fromIndex?nativeMax(0,length+fromIndex):fromIndex||0}else if(fromIndex){var index=sortedIndex(array,value);return array[index]===value?index:-1}return baseIndexOf(array,value,fromIndex)}function initial(array,callback,thisArg){var n=0,length=array?array.length:0;if("number"!=typeof callback&&null!=callback){var index=length;for(callback=lodash.createCallback(callback,thisArg,3);index--&&callback(array[index],index,array);)n++}else n=null==callback||thisArg?1:callback||n;return slice(array,0,nativeMin(nativeMax(0,length-n),length))}function intersection(){for(var args=[],argsIndex=-1,argsLength=arguments.length,caches=getArray(),indexOf=getIndexOf(),trustIndexOf=indexOf===baseIndexOf,seen=getArray();++argsIndex<argsLength;){var value=arguments[argsIndex];(isArray(value)||isArguments(value))&&(args.push(value),caches.push(trustIndexOf&&value.length>=largeArraySize&&createCache(argsIndex?args[argsIndex]:seen)))}var array=args[0],index=-1,length=array?array.length:0,result=[];outer:for(;++index<length;){var cache=caches[0];if(value=array[index],(cache?cacheIndexOf(cache,value):indexOf(seen,value))<0){for(argsIndex=argsLength,(cache||seen).push(value);--argsIndex;)if(cache=caches[argsIndex],(cache?cacheIndexOf(cache,value):indexOf(args[argsIndex],value))<0)continue outer;result.push(value)}}for(;argsLength--;)cache=caches[argsLength],cache&&releaseObject(cache);return releaseArray(caches),releaseArray(seen),result}function last(array,callback,thisArg){var n=0,length=array?array.length:0;if("number"!=typeof callback&&null!=callback){var index=length;for(callback=lodash.createCallback(callback,thisArg,3);index--&&callback(array[index],index,array);)n++}else if(n=callback,null==n||thisArg)return array?array[length-1]:undefined;return slice(array,nativeMax(0,length-n))}function lastIndexOf(array,value,fromIndex){var index=array?array.length:0;for("number"==typeof fromIndex&&(index=(0>fromIndex?nativeMax(0,index+fromIndex):nativeMin(fromIndex,index-1))+1);index--;)if(array[index]===value)return index;return-1}function pull(array){for(var args=arguments,argsIndex=0,argsLength=args.length,length=array?array.length:0;++argsIndex<argsLength;)for(var index=-1,value=args[argsIndex];++index<length;)array[index]===value&&(splice.call(array,index--,1),length--);return array}function range(start,end,step){start=+start||0,step="number"==typeof step?step:+step||1,null==end&&(end=start,start=0);for(var index=-1,length=nativeMax(0,ceil((end-start)/(step||1))),result=Array(length);++index<length;)result[index]=start,start+=step;return result}function remove(array,callback,thisArg){var index=-1,length=array?array.length:0,result=[];for(callback=lodash.createCallback(callback,thisArg,3);++index<length;){var value=array[index];callback(value,index,array)&&(result.push(value),splice.call(array,index--,1),length--)
}return result}function rest(array,callback,thisArg){if("number"!=typeof callback&&null!=callback){var n=0,index=-1,length=array?array.length:0;for(callback=lodash.createCallback(callback,thisArg,3);++index<length&&callback(array[index],index,array);)n++}else n=null==callback||thisArg?1:nativeMax(0,callback);return slice(array,n)}function sortedIndex(array,value,callback,thisArg){var low=0,high=array?array.length:low;for(callback=callback?lodash.createCallback(callback,thisArg,1):identity,value=callback(value);high>low;){var mid=low+high>>>1;callback(array[mid])<value?low=mid+1:high=mid}return low}function union(){return baseUniq(baseFlatten(arguments,!0,!0))}function uniq(array,isSorted,callback,thisArg){return"boolean"!=typeof isSorted&&null!=isSorted&&(thisArg=callback,callback="function"!=typeof isSorted&&thisArg&&thisArg[isSorted]===array?null:isSorted,isSorted=!1),null!=callback&&(callback=lodash.createCallback(callback,thisArg,3)),baseUniq(array,isSorted,callback)}function without(array){return baseDifference(array,slice(arguments,1))}function xor(){for(var index=-1,length=arguments.length;++index<length;){var array=arguments[index];if(isArray(array)||isArguments(array))var result=result?baseUniq(baseDifference(result,array).concat(baseDifference(array,result))):array}return result||[]}function zip(){for(var array=arguments.length>1?arguments:arguments[0],index=-1,length=array?max(pluck(array,"length")):0,result=Array(0>length?0:length);++index<length;)result[index]=pluck(array,index);return result}function zipObject(keys,values){var index=-1,length=keys?keys.length:0,result={};for(values||!length||isArray(keys[0])||(values=[]);++index<length;){var key=keys[index];values?result[key]=values[index]:key&&(result[key[0]]=key[1])}return result}function after(n,func){if(!isFunction(func))throw new TypeError;return function(){return--n<1?func.apply(this,arguments):void 0}}function bind(func,thisArg){return arguments.length>2?createWrapper(func,17,slice(arguments,2),null,thisArg):createWrapper(func,1,null,null,thisArg)}function bindAll(object){for(var funcs=arguments.length>1?baseFlatten(arguments,!0,!1,1):functions(object),index=-1,length=funcs.length;++index<length;){var key=funcs[index];object[key]=createWrapper(object[key],1,null,null,object)}return object}function bindKey(object,key){return arguments.length>2?createWrapper(key,19,slice(arguments,2),null,object):createWrapper(key,3,null,null,object)}function compose(){for(var funcs=arguments,length=funcs.length;length--;)if(!isFunction(funcs[length]))throw new TypeError;return function(){for(var args=arguments,length=funcs.length;length--;)args=[funcs[length].apply(this,args)];return args[0]}}function curry(func,arity){return arity="number"==typeof arity?arity:+arity||func.length,createWrapper(func,4,null,null,null,arity)}function debounce(func,wait,options){var args,maxTimeoutId,result,stamp,thisArg,timeoutId,trailingCall,lastCalled=0,maxWait=!1,trailing=!0;if(!isFunction(func))throw new TypeError;if(wait=nativeMax(0,wait)||0,options===!0){var leading=!0;trailing=!1}else isObject(options)&&(leading=options.leading,maxWait="maxWait"in options&&(nativeMax(wait,options.maxWait)||0),trailing="trailing"in options?options.trailing:trailing);var delayed=function(){var remaining=wait-(now()-stamp);if(0>=remaining){maxTimeoutId&&clearTimeout(maxTimeoutId);var isCalled=trailingCall;maxTimeoutId=timeoutId=trailingCall=undefined,isCalled&&(lastCalled=now(),result=func.apply(thisArg,args),timeoutId||maxTimeoutId||(args=thisArg=null))}else timeoutId=setTimeout(delayed,remaining)},maxDelayed=function(){timeoutId&&clearTimeout(timeoutId),maxTimeoutId=timeoutId=trailingCall=undefined,(trailing||maxWait!==wait)&&(lastCalled=now(),result=func.apply(thisArg,args),timeoutId||maxTimeoutId||(args=thisArg=null))};return function(){if(args=arguments,stamp=now(),thisArg=this,trailingCall=trailing&&(timeoutId||!leading),maxWait===!1)var leadingCall=leading&&!timeoutId;else{maxTimeoutId||leading||(lastCalled=stamp);var remaining=maxWait-(stamp-lastCalled),isCalled=0>=remaining;isCalled?(maxTimeoutId&&(maxTimeoutId=clearTimeout(maxTimeoutId)),lastCalled=stamp,result=func.apply(thisArg,args)):maxTimeoutId||(maxTimeoutId=setTimeout(maxDelayed,remaining))}return isCalled&&timeoutId?timeoutId=clearTimeout(timeoutId):timeoutId||wait===maxWait||(timeoutId=setTimeout(delayed,wait)),leadingCall&&(isCalled=!0,result=func.apply(thisArg,args)),!isCalled||timeoutId||maxTimeoutId||(args=thisArg=null),result}}function defer(func){if(!isFunction(func))throw new TypeError;var args=slice(arguments,1);return setTimeout(function(){func.apply(undefined,args)},1)}function delay(func,wait){if(!isFunction(func))throw new TypeError;var args=slice(arguments,2);return setTimeout(function(){func.apply(undefined,args)},wait)}function memoize(func,resolver){if(!isFunction(func))throw new TypeError;var memoized=function(){var cache=memoized.cache,key=resolver?resolver.apply(this,arguments):keyPrefix+arguments[0];return hasOwnProperty.call(cache,key)?cache[key]:cache[key]=func.apply(this,arguments)};return memoized.cache={},memoized}function once(func){var ran,result;if(!isFunction(func))throw new TypeError;return function(){return ran?result:(ran=!0,result=func.apply(this,arguments),func=null,result)}}function partial(func){return createWrapper(func,16,slice(arguments,1))}function partialRight(func){return createWrapper(func,32,null,slice(arguments,1))}function throttle(func,wait,options){var leading=!0,trailing=!0;if(!isFunction(func))throw new TypeError;return options===!1?leading=!1:isObject(options)&&(leading="leading"in options?options.leading:leading,trailing="trailing"in options?options.trailing:trailing),debounceOptions.leading=leading,debounceOptions.maxWait=wait,debounceOptions.trailing=trailing,debounce(func,wait,debounceOptions)}function wrap(value,wrapper){return createWrapper(wrapper,16,[value])}function constant(value){return function(){return value}}function createCallback(func,thisArg,argCount){var type=typeof func;if(null==func||"function"==type)return baseCreateCallback(func,thisArg,argCount);if("object"!=type)return property(func);var props=keys(func),key=props[0],a=func[key];return 1!=props.length||a!==a||isObject(a)?function(object){for(var length=props.length,result=!1;length--&&(result=baseIsEqual(object[props[length]],func[props[length]],null,!0)););return result}:function(object){var b=object[key];return a===b&&(0!==a||1/a==1/b)}}function escape(string){return null==string?"":String(string).replace(reUnescapedHtml,escapeHtmlChar)}function identity(value){return value}function mixin(object,source,options){var chain=!0,methodNames=source&&functions(source);source&&(options||methodNames.length)||(null==options&&(options=source),ctor=lodashWrapper,source=object,object=lodash,methodNames=functions(source)),options===!1?chain=!1:isObject(options)&&"chain"in options&&(chain=options.chain);var ctor=object,isFunc=isFunction(ctor);forEach(methodNames,function(methodName){var func=object[methodName]=source[methodName];isFunc&&(ctor.prototype[methodName]=function(){var chainAll=this.__chain__,value=this.__wrapped__,args=[value];push.apply(args,arguments);var result=func.apply(object,args);if(chain||chainAll){if(value===result&&isObject(result))return this;result=new ctor(result),result.__chain__=chainAll}return result})})}function noConflict(){return context._=oldDash,this}function noop(){}function property(key){return function(object){return object[key]}}function random(min,max,floating){var noMin=null==min,noMax=null==max;if(null==floating&&("boolean"==typeof min&&noMax?(floating=min,min=1):noMax||"boolean"!=typeof max||(floating=max,noMax=!0)),noMin&&noMax&&(max=1),min=+min||0,noMax?(max=min,min=0):max=+max||0,floating||min%1||max%1){var rand=nativeRandom();return nativeMin(min+rand*(max-min+parseFloat("1e-"+((rand+"").length-1))),max)}return baseRandom(min,max)}function result(object,key){if(object){var value=object[key];return isFunction(value)?object[key]():value}}function template(text,data,options){var settings=lodash.templateSettings;text=String(text||""),options=defaults({},options,settings);var isEvaluating,imports=defaults({},options.imports,settings.imports),importsKeys=keys(imports),importsValues=values(imports),index=0,interpolate=options.interpolate||reNoMatch,source="__p += '",reDelimiters=RegExp((options.escape||reNoMatch).source+"|"+interpolate.source+"|"+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+"|"+(options.evaluate||reNoMatch).source+"|$","g");text.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){return interpolateValue||(interpolateValue=esTemplateValue),source+=text.slice(index,offset).replace(reUnescapedString,escapeStringChar),escapeValue&&(source+="' +\n__e("+escapeValue+") +\n'"),evaluateValue&&(isEvaluating=!0,source+="';\n"+evaluateValue+";\n__p += '"),interpolateValue&&(source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'"),index=offset+match.length,match}),source+="';\n";var variable=options.variable,hasVariable=variable;hasVariable||(variable="obj",source="with ("+variable+") {\n"+source+"\n}\n"),source=(isEvaluating?source.replace(reEmptyStringLeading,""):source).replace(reEmptyStringMiddle,"$1").replace(reEmptyStringTrailing,"$1;"),source="function("+variable+") {\n"+(hasVariable?"":variable+" || ("+variable+" = {});\n")+"var __t, __p = '', __e = _.escape"+(isEvaluating?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+source+"return __p\n}";var sourceURL="\n/*\n//# sourceURL="+(options.sourceURL||"/lodash/template/source["+templateCounter++ +"]")+"\n*/";try{var result=Function(importsKeys,"return "+source+sourceURL).apply(undefined,importsValues)}catch(e){throw e.source=source,e}return data?result(data):(result.source=source,result)}function times(n,callback,thisArg){n=(n=+n)>-1?n:0;var index=-1,result=Array(n);for(callback=baseCreateCallback(callback,thisArg,1);++index<n;)result[index]=callback(index);return result}function unescape(string){return null==string?"":String(string).replace(reEscapedHtml,unescapeHtmlChar)}function uniqueId(prefix){var id=++idCounter;return String(null==prefix?"":prefix)+id}function chain(value){return value=new lodashWrapper(value),value.__chain__=!0,value}function tap(value,interceptor){return interceptor(value),value}function wrapperChain(){return this.__chain__=!0,this}function wrapperToString(){return String(this.__wrapped__)}function wrapperValueOf(){return this.__wrapped__}context=context?_.defaults(root.Object(),context,_.pick(root,contextProps)):root;var Array=context.Array,Boolean=context.Boolean,Date=context.Date,Function=context.Function,Math=context.Math,Number=context.Number,Object=context.Object,RegExp=context.RegExp,String=context.String,TypeError=context.TypeError,arrayRef=[],objectProto=Object.prototype,oldDash=context._,toString=objectProto.toString,reNative=RegExp("^"+String(toString).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),ceil=Math.ceil,clearTimeout=context.clearTimeout,floor=Math.floor,fnToString=Function.prototype.toString,getPrototypeOf=isNative(getPrototypeOf=Object.getPrototypeOf)&&getPrototypeOf,hasOwnProperty=objectProto.hasOwnProperty,push=arrayRef.push,setTimeout=context.setTimeout,splice=arrayRef.splice,unshift=arrayRef.unshift,defineProperty=function(){try{var o={},func=isNative(func=Object.defineProperty)&&func,result=func(o,o,o)&&func}catch(e){}return result}(),nativeCreate=isNative(nativeCreate=Object.create)&&nativeCreate,nativeIsArray=isNative(nativeIsArray=Array.isArray)&&nativeIsArray,nativeIsFinite=context.isFinite,nativeIsNaN=context.isNaN,nativeKeys=isNative(nativeKeys=Object.keys)&&nativeKeys,nativeMax=Math.max,nativeMin=Math.min,nativeParseInt=context.parseInt,nativeRandom=Math.random,ctorByClass={};ctorByClass[arrayClass]=Array,ctorByClass[boolClass]=Boolean,ctorByClass[dateClass]=Date,ctorByClass[funcClass]=Function,ctorByClass[objectClass]=Object,ctorByClass[numberClass]=Number,ctorByClass[regexpClass]=RegExp,ctorByClass[stringClass]=String,lodashWrapper.prototype=lodash.prototype;var support=lodash.support={};support.funcDecomp=!isNative(context.WinRTError)&&reThis.test(runInContext),support.funcNames="string"==typeof Function.name,lodash.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:reInterpolate,variable:"",imports:{_:lodash}},nativeCreate||(baseCreate=function(){function Object(){}return function(prototype){if(isObject(prototype)){Object.prototype=prototype;var result=new Object;Object.prototype=null}return result||context.Object()}}());var setBindData=defineProperty?function(func,value){descriptor.value=value,defineProperty(func,"__bindData__",descriptor)}:noop,isArray=nativeIsArray||function(value){return value&&"object"==typeof value&&"number"==typeof value.length&&toString.call(value)==arrayClass||!1},shimKeys=function(object){var index,iterable=object,result=[];if(!iterable)return result;if(!objectTypes[typeof object])return result;for(index in iterable)hasOwnProperty.call(iterable,index)&&result.push(index);return result},keys=nativeKeys?function(object){return isObject(object)?nativeKeys(object):[]}:shimKeys,htmlEscapes={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},htmlUnescapes=invert(htmlEscapes),reEscapedHtml=RegExp("("+keys(htmlUnescapes).join("|")+")","g"),reUnescapedHtml=RegExp("["+keys(htmlEscapes).join("")+"]","g"),assign=function(object,source,guard){var index,iterable=object,result=iterable;if(!iterable)return result;var args=arguments,argsIndex=0,argsLength="number"==typeof guard?2:args.length;if(argsLength>3&&"function"==typeof args[argsLength-2])var callback=baseCreateCallback(args[--argsLength-1],args[argsLength--],2);else argsLength>2&&"function"==typeof args[argsLength-1]&&(callback=args[--argsLength]);for(;++argsIndex<argsLength;)if(iterable=args[argsIndex],iterable&&objectTypes[typeof iterable])for(var ownIndex=-1,ownProps=objectTypes[typeof iterable]&&keys(iterable),length=ownProps?ownProps.length:0;++ownIndex<length;)index=ownProps[ownIndex],result[index]=callback?callback(result[index],iterable[index]):iterable[index];return result},defaults=function(object,source,guard){var index,iterable=object,result=iterable;if(!iterable)return result;for(var args=arguments,argsIndex=0,argsLength="number"==typeof guard?2:args.length;++argsIndex<argsLength;)if(iterable=args[argsIndex],iterable&&objectTypes[typeof iterable])for(var ownIndex=-1,ownProps=objectTypes[typeof iterable]&&keys(iterable),length=ownProps?ownProps.length:0;++ownIndex<length;)index=ownProps[ownIndex],"undefined"==typeof result[index]&&(result[index]=iterable[index]);return result},forIn=function(collection,callback,thisArg){var index,iterable=collection,result=iterable;if(!iterable)return result;if(!objectTypes[typeof iterable])return result;callback=callback&&"undefined"==typeof thisArg?callback:baseCreateCallback(callback,thisArg,3);for(index in iterable)if(callback(iterable[index],index,collection)===!1)return result;return result},forOwn=function(collection,callback,thisArg){var index,iterable=collection,result=iterable;if(!iterable)return result;if(!objectTypes[typeof iterable])return result;callback=callback&&"undefined"==typeof thisArg?callback:baseCreateCallback(callback,thisArg,3);for(var ownIndex=-1,ownProps=objectTypes[typeof iterable]&&keys(iterable),length=ownProps?ownProps.length:0;++ownIndex<length;)if(index=ownProps[ownIndex],callback(iterable[index],index,collection)===!1)return result;return result},isPlainObject=getPrototypeOf?function(value){if(!value||toString.call(value)!=objectClass)return!1;var valueOf=value.valueOf,objProto=isNative(valueOf)&&(objProto=getPrototypeOf(valueOf))&&getPrototypeOf(objProto);return objProto?value==objProto||getPrototypeOf(value)==objProto:shimIsPlainObject(value)}:shimIsPlainObject,countBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?result[key]++:result[key]=1}),groupBy=createAggregator(function(result,value,key){(hasOwnProperty.call(result,key)?result[key]:result[key]=[]).push(value)}),indexBy=createAggregator(function(result,value,key){result[key]=value}),pluck=map,where=filter,now=isNative(now=Date.now)&&now||function(){return(new Date).getTime()},parseInt=8==nativeParseInt(whitespace+"08")?nativeParseInt:function(value,radix){return nativeParseInt(isString(value)?value.replace(reLeadingSpacesAndZeros,""):value,radix||0)};return lodash.after=after,lodash.assign=assign,lodash.at=at,lodash.bind=bind,lodash.bindAll=bindAll,lodash.bindKey=bindKey,lodash.chain=chain,lodash.compact=compact,lodash.compose=compose,lodash.constant=constant,lodash.countBy=countBy,lodash.create=create,lodash.createCallback=createCallback,lodash.curry=curry,lodash.debounce=debounce,lodash.defaults=defaults,lodash.defer=defer,lodash.delay=delay,lodash.difference=difference,lodash.filter=filter,lodash.flatten=flatten,lodash.forEach=forEach,lodash.forEachRight=forEachRight,lodash.forIn=forIn,lodash.forInRight=forInRight,lodash.forOwn=forOwn,lodash.forOwnRight=forOwnRight,lodash.functions=functions,lodash.groupBy=groupBy,lodash.indexBy=indexBy,lodash.initial=initial,lodash.intersection=intersection,lodash.invert=invert,lodash.invoke=invoke,lodash.keys=keys,lodash.map=map,lodash.mapValues=mapValues,lodash.max=max,lodash.memoize=memoize,lodash.merge=merge,lodash.min=min,lodash.omit=omit,lodash.once=once,lodash.pairs=pairs,lodash.partial=partial,lodash.partialRight=partialRight,lodash.pick=pick,lodash.pluck=pluck,lodash.property=property,lodash.pull=pull,lodash.range=range,lodash.reject=reject,lodash.remove=remove,lodash.rest=rest,lodash.shuffle=shuffle,lodash.sortBy=sortBy,lodash.tap=tap,lodash.throttle=throttle,lodash.times=times,lodash.toArray=toArray,lodash.transform=transform,lodash.union=union,lodash.uniq=uniq,lodash.values=values,lodash.where=where,lodash.without=without,lodash.wrap=wrap,lodash.xor=xor,lodash.zip=zip,lodash.zipObject=zipObject,lodash.collect=map,lodash.drop=rest,lodash.each=forEach,lodash.eachRight=forEachRight,lodash.extend=assign,lodash.methods=functions,lodash.object=zipObject,lodash.select=filter,lodash.tail=rest,lodash.unique=uniq,lodash.unzip=zip,mixin(lodash),lodash.clone=clone,lodash.cloneDeep=cloneDeep,lodash.contains=contains,lodash.escape=escape,lodash.every=every,lodash.find=find,lodash.findIndex=findIndex,lodash.findKey=findKey,lodash.findLast=findLast,lodash.findLastIndex=findLastIndex,lodash.findLastKey=findLastKey,lodash.has=has,lodash.identity=identity,lodash.indexOf=indexOf,lodash.isArguments=isArguments,lodash.isArray=isArray,lodash.isBoolean=isBoolean,lodash.isDate=isDate,lodash.isElement=isElement,lodash.isEmpty=isEmpty,lodash.isEqual=isEqual,lodash.isFinite=isFinite,lodash.isFunction=isFunction,lodash.isNaN=isNaN,lodash.isNull=isNull,lodash.isNumber=isNumber,lodash.isObject=isObject,lodash.isPlainObject=isPlainObject,lodash.isRegExp=isRegExp,lodash.isString=isString,lodash.isUndefined=isUndefined,lodash.lastIndexOf=lastIndexOf,lodash.mixin=mixin,lodash.noConflict=noConflict,lodash.noop=noop,lodash.now=now,lodash.parseInt=parseInt,lodash.random=random,lodash.reduce=reduce,lodash.reduceRight=reduceRight,lodash.result=result,lodash.runInContext=runInContext,lodash.size=size,lodash.some=some,lodash.sortedIndex=sortedIndex,lodash.template=template,lodash.unescape=unescape,lodash.uniqueId=uniqueId,lodash.all=every,lodash.any=some,lodash.detect=find,lodash.findWhere=find,lodash.foldl=reduce,lodash.foldr=reduceRight,lodash.include=contains,lodash.inject=reduce,mixin(function(){var source={};return forOwn(lodash,function(func,methodName){lodash.prototype[methodName]||(source[methodName]=func)}),source}(),!1),lodash.first=first,lodash.last=last,lodash.sample=sample,lodash.take=first,lodash.head=first,forOwn(lodash,function(func,methodName){var callbackable="sample"!==methodName;lodash.prototype[methodName]||(lodash.prototype[methodName]=function(n,guard){var chainAll=this.__chain__,result=func(this.__wrapped__,n,guard);return chainAll||null!=n&&(!guard||callbackable&&"function"==typeof n)?new lodashWrapper(result,chainAll):result})}),lodash.VERSION="2.4.1",lodash.prototype.chain=wrapperChain,lodash.prototype.toString=wrapperToString,lodash.prototype.value=wrapperValueOf,lodash.prototype.valueOf=wrapperValueOf,forEach(["join","pop","shift"],function(methodName){var func=arrayRef[methodName];lodash.prototype[methodName]=function(){var chainAll=this.__chain__,result=func.apply(this.__wrapped__,arguments);return chainAll?new lodashWrapper(result,chainAll):result}}),forEach(["push","reverse","sort","unshift"],function(methodName){var func=arrayRef[methodName];lodash.prototype[methodName]=function(){return func.apply(this.__wrapped__,arguments),this}}),forEach(["concat","slice","splice"],function(methodName){var func=arrayRef[methodName];lodash.prototype[methodName]=function(){return new lodashWrapper(func.apply(this.__wrapped__,arguments),this.__chain__)}}),lodash}var undefined,arrayPool=[],objectPool=[],idCounter=0,keyPrefix=+new Date+"",largeArraySize=75,maxPoolSize=40,whitespace=" \f \n\r\u2028\u2029  ",reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g,reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,reFlags=/\w*$/,reFuncName=/^\s*function[ \n\r\t]+\w/,reInterpolate=/<%=([\s\S]+?)%>/g,reLeadingSpacesAndZeros=RegExp("^["+whitespace+"]*0+(?=.$)"),reNoMatch=/($^)/,reThis=/\bthis\b/,reUnescapedString=/['\n\r\t\u2028\u2029\\]/g,contextProps=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],templateCounter=0,argsClass="[object Arguments]",arrayClass="[object Array]",boolClass="[object Boolean]",dateClass="[object Date]",funcClass="[object Function]",numberClass="[object Number]",objectClass="[object Object]",regexpClass="[object RegExp]",stringClass="[object String]",cloneableClasses={};cloneableClasses[funcClass]=!1,cloneableClasses[argsClass]=cloneableClasses[arrayClass]=cloneableClasses[boolClass]=cloneableClasses[dateClass]=cloneableClasses[numberClass]=cloneableClasses[objectClass]=cloneableClasses[regexpClass]=cloneableClasses[stringClass]=!0;var debounceOptions={leading:!1,maxWait:0,trailing:!1},descriptor={configurable:!1,enumerable:!1,value:null,writable:!1},objectTypes={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},root=objectTypes[typeof window]&&window||this,freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports,freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports&&freeExports,freeGlobal=objectTypes[typeof global]&&global;!freeGlobal||freeGlobal.global!==freeGlobal&&freeGlobal.window!==freeGlobal||(root=freeGlobal);var _=runInContext();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(root._=_,define(function(){return _})):freeExports&&freeModule?moduleExports?(freeModule.exports=_)._=_:freeExports._=_:root._=_}.call(this),function($,exports,window,name){function escape(string){return String(string).replace(/[&<>"'\/]/g,function(s){return entityMap[s]})}exports||(exports={},$?$[name]=exports:window[name]=exports);var emoticons,regexp,entityMap,codesMap={},primaryCodesMap={},metachars=/[[\]{}()*+?.\\|^$\-,&#\s]/g;entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},exports.define=function(data){var name,i,codes,code,patterns=[];for(name in data){codes=data[name].codes;for(i in codes)code=codes[i],codesMap[code]=name,codesMap[escape(code)]=name,0==i&&(primaryCodesMap[code]=name)}for(code in codesMap)patterns.push("("+code.replace(metachars,"\\$&")+")");regexp=new RegExp(patterns.join("|"),"g"),emoticons=data},exports.replace=function(text,fn){return text.replace(regexp,function(code){var name=codesMap[code];return(fn||exports.tpl)(name,code,emoticons[name].title)})},exports.toString=function(fn){var code,name,str="";for(code in primaryCodesMap)name=primaryCodesMap[code],str+=(fn||exports.tpl)(name,code,emoticons[name].title);return str},exports.tpl=function(name,code,title){return'<span class="emoticon emoticon-'+name+'" title="'+title+'">'+code+"</span>"}}("undefined"!=typeof jQuery?jQuery:null,"undefined"!=typeof exports?exports:null,window,"emoticons"),!function(root,String){"use strict";function boolMatch(s,matchers){var i,matcher,down=s.toLowerCase();for(matchers=[].concat(matchers),i=0;i<matchers.length;i+=1)if(matcher=matchers[i]){if(matcher.test&&matcher.test(s))return!0;if(matcher.toLowerCase()===down)return!0}}var nativeTrim=String.prototype.trim,nativeTrimRight=String.prototype.trimRight,nativeTrimLeft=String.prototype.trimLeft,parseNumber=function(source){return 1*source||0},strRepeat=function(str,qty){if(1>qty)return"";for(var result="";qty>0;)1&qty&&(result+=str),qty>>=1,str+=str;return result},slice=[].slice,defaultToWhiteSpace=function(characters){return null==characters?"\\s":characters.source?characters.source:"["+_s.escapeRegExp(characters)+"]"},escapeChars={lt:"<",gt:">",quot:'"',amp:"&",apos:"'"},reversedEscapeChars={};for(var key in escapeChars)reversedEscapeChars[escapeChars[key]]=key;reversedEscapeChars["'"]="#39";var sprintf=function(){function get_type(variable){return Object.prototype.toString.call(variable).slice(8,-1).toLowerCase()}var str_repeat=strRepeat,str_format=function(){return str_format.cache.hasOwnProperty(arguments[0])||(str_format.cache[arguments[0]]=str_format.parse(arguments[0])),str_format.format.call(null,str_format.cache[arguments[0]],arguments)};return str_format.format=function(parse_tree,argv){var arg,i,k,match,pad,pad_character,pad_length,cursor=1,tree_length=parse_tree.length,node_type="",output=[];for(i=0;tree_length>i;i++)if(node_type=get_type(parse_tree[i]),"string"===node_type)output.push(parse_tree[i]);else if("array"===node_type){if(match=parse_tree[i],match[2])for(arg=argv[cursor],k=0;k<match[2].length;k++){if(!arg.hasOwnProperty(match[2][k]))throw new Error(sprintf('[_.sprintf] property "%s" does not exist',match[2][k]));arg=arg[match[2][k]]}else arg=match[1]?argv[match[1]]:argv[cursor++];if(/[^s]/.test(match[8])&&"number"!=get_type(arg))throw new Error(sprintf("[_.sprintf] expecting number but found %s",get_type(arg)));switch(match[8]){case"b":arg=arg.toString(2);break;case"c":arg=String.fromCharCode(arg);break;case"d":arg=parseInt(arg,10);break;case"e":arg=match[7]?arg.toExponential(match[7]):arg.toExponential();break;case"f":arg=match[7]?parseFloat(arg).toFixed(match[7]):parseFloat(arg);break;case"o":arg=arg.toString(8);break;case"s":arg=(arg=String(arg))&&match[7]?arg.substring(0,match[7]):arg;break;case"u":arg=Math.abs(arg);break;case"x":arg=arg.toString(16);break;case"X":arg=arg.toString(16).toUpperCase()}arg=/[def]/.test(match[8])&&match[3]&&arg>=0?"+"+arg:arg,pad_character=match[4]?"0"==match[4]?"0":match[4].charAt(1):" ",pad_length=match[6]-String(arg).length,pad=match[6]?str_repeat(pad_character,pad_length):"",output.push(match[5]?arg+pad:pad+arg)}return output.join("")},str_format.cache={},str_format.parse=function(fmt){for(var _fmt=fmt,match=[],parse_tree=[],arg_names=0;_fmt;){if(null!==(match=/^[^\x25]+/.exec(_fmt)))parse_tree.push(match[0]);else if(null!==(match=/^\x25{2}/.exec(_fmt)))parse_tree.push("%");else{if(null===(match=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt)))throw new Error("[_.sprintf] huh?");if(match[2]){arg_names|=1;var field_list=[],replacement_field=match[2],field_match=[];if(null===(field_match=/^([a-z_][a-z_\d]*)/i.exec(replacement_field)))throw new Error("[_.sprintf] huh?");for(field_list.push(field_match[1]);""!==(replacement_field=replacement_field.substring(field_match[0].length));)if(null!==(field_match=/^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)))field_list.push(field_match[1]);else{if(null===(field_match=/^\[(\d+)\]/.exec(replacement_field)))throw new Error("[_.sprintf] huh?");field_list.push(field_match[1])}match[2]=field_list}else arg_names|=2;if(3===arg_names)throw new Error("[_.sprintf] mixing positional and named placeholders is not (yet) supported");parse_tree.push(match)}_fmt=_fmt.substring(match[0].length)}return parse_tree},str_format}(),_s={VERSION:"2.3.0",isBlank:function(str){return null==str&&(str=""),/^\s*$/.test(str)},stripTags:function(str){return null==str?"":String(str).replace(/<\/?[^>]+>/g,"")},capitalize:function(str){return str=null==str?"":String(str),str.charAt(0).toUpperCase()+str.slice(1)},chop:function(str,step){return null==str?[]:(str=String(str),step=~~step,step>0?str.match(new RegExp(".{1,"+step+"}","g")):[str])},clean:function(str){return _s.strip(str).replace(/\s+/g," ")},count:function(str,substr){if(null==str||null==substr)return 0;str=String(str),substr=String(substr);for(var count=0,pos=0,length=substr.length;;){if(pos=str.indexOf(substr,pos),-1===pos)break;count++,pos+=length}return count},chars:function(str){return null==str?[]:String(str).split("")},swapCase:function(str){return null==str?"":String(str).replace(/\S/g,function(c){return c===c.toUpperCase()?c.toLowerCase():c.toUpperCase()})},escapeHTML:function(str){return null==str?"":String(str).replace(/[&<>"']/g,function(m){return"&"+reversedEscapeChars[m]+";"})},unescapeHTML:function(str){return null==str?"":String(str).replace(/\&([^;]+);/g,function(entity,entityCode){var match;return entityCode in escapeChars?escapeChars[entityCode]:(match=entityCode.match(/^#x([\da-fA-F]+)$/))?String.fromCharCode(parseInt(match[1],16)):(match=entityCode.match(/^#(\d+)$/))?String.fromCharCode(~~match[1]):entity})},escapeRegExp:function(str){return null==str?"":String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},splice:function(str,i,howmany,substr){var arr=_s.chars(str);return arr.splice(~~i,~~howmany,substr),arr.join("")},insert:function(str,i,substr){return _s.splice(str,i,0,substr)},include:function(str,needle){return""===needle?!0:null==str?!1:-1!==String(str).indexOf(needle)},join:function(){var args=slice.call(arguments),separator=args.shift();return null==separator&&(separator=""),args.join(separator)},lines:function(str){return null==str?[]:String(str).split("\n")},reverse:function(str){return _s.chars(str).reverse().join("")},startsWith:function(str,starts){return""===starts?!0:null==str||null==starts?!1:(str=String(str),starts=String(starts),str.length>=starts.length&&str.slice(0,starts.length)===starts)},endsWith:function(str,ends){return""===ends?!0:null==str||null==ends?!1:(str=String(str),ends=String(ends),str.length>=ends.length&&str.slice(str.length-ends.length)===ends)},succ:function(str){return null==str?"":(str=String(str),str.slice(0,-1)+String.fromCharCode(str.charCodeAt(str.length-1)+1))},titleize:function(str){return null==str?"":(str=String(str).toLowerCase(),str.replace(/(?:^|\s|-)\S/g,function(c){return c.toUpperCase()}))},camelize:function(str){return _s.trim(str).replace(/[-_\s]+(.)?/g,function(match,c){return c?c.toUpperCase():""})},underscored:function(str){return _s.trim(str).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()},dasherize:function(str){return _s.trim(str).replace(/([A-Z])/g,"-$1").replace(/[-_\s]+/g,"-").toLowerCase()},classify:function(str){return _s.titleize(String(str).replace(/[\W_]/g," ")).replace(/\s/g,"")},humanize:function(str){return _s.capitalize(_s.underscored(str).replace(/_id$/,"").replace(/_/g," "))},trim:function(str,characters){return null==str?"":!characters&&nativeTrim?nativeTrim.call(str):(characters=defaultToWhiteSpace(characters),String(str).replace(new RegExp("^"+characters+"+|"+characters+"+$","g"),""))},ltrim:function(str,characters){return null==str?"":!characters&&nativeTrimLeft?nativeTrimLeft.call(str):(characters=defaultToWhiteSpace(characters),String(str).replace(new RegExp("^"+characters+"+"),""))
},rtrim:function(str,characters){return null==str?"":!characters&&nativeTrimRight?nativeTrimRight.call(str):(characters=defaultToWhiteSpace(characters),String(str).replace(new RegExp(characters+"+$"),""))},truncate:function(str,length,truncateStr){return null==str?"":(str=String(str),truncateStr=truncateStr||"...",length=~~length,str.length>length?str.slice(0,length)+truncateStr:str)},prune:function(str,length,pruneStr){if(null==str)return"";if(str=String(str),length=~~length,pruneStr=null!=pruneStr?String(pruneStr):"...",str.length<=length)return str;var tmpl=function(c){return c.toUpperCase()!==c.toLowerCase()?"A":" "},template=str.slice(0,length+1).replace(/.(?=\W*\w*$)/g,tmpl);return template=template.slice(template.length-2).match(/\w\w/)?template.replace(/\s*\S+$/,""):_s.rtrim(template.slice(0,template.length-1)),(template+pruneStr).length>str.length?str:str.slice(0,template.length)+pruneStr},words:function(str,delimiter){return _s.isBlank(str)?[]:_s.trim(str,delimiter).split(delimiter||/\s+/)},pad:function(str,length,padStr,type){str=null==str?"":String(str),length=~~length;var padlen=0;switch(padStr?padStr.length>1&&(padStr=padStr.charAt(0)):padStr=" ",type){case"right":return padlen=length-str.length,str+strRepeat(padStr,padlen);case"both":return padlen=length-str.length,strRepeat(padStr,Math.ceil(padlen/2))+str+strRepeat(padStr,Math.floor(padlen/2));default:return padlen=length-str.length,strRepeat(padStr,padlen)+str}},lpad:function(str,length,padStr){return _s.pad(str,length,padStr)},rpad:function(str,length,padStr){return _s.pad(str,length,padStr,"right")},lrpad:function(str,length,padStr){return _s.pad(str,length,padStr,"both")},sprintf:sprintf,vsprintf:function(fmt,argv){return argv.unshift(fmt),sprintf.apply(null,argv)},toNumber:function(str,decimals){return str?(str=_s.trim(str),str.match(/^-?\d+(?:\.\d+)?$/)?parseNumber(parseNumber(str).toFixed(~~decimals)):0/0):0},numberFormat:function(number,dec,dsep,tsep){if(isNaN(number)||null==number)return"";number=number.toFixed(~~dec),tsep="string"==typeof tsep?tsep:",";var parts=number.split("."),fnums=parts[0],decimals=parts[1]?(dsep||".")+parts[1]:"";return fnums.replace(/(\d)(?=(?:\d{3})+$)/g,"$1"+tsep)+decimals},strRight:function(str,sep){if(null==str)return"";str=String(str),sep=null!=sep?String(sep):sep;var pos=sep?str.indexOf(sep):-1;return~pos?str.slice(pos+sep.length,str.length):str},strRightBack:function(str,sep){if(null==str)return"";str=String(str),sep=null!=sep?String(sep):sep;var pos=sep?str.lastIndexOf(sep):-1;return~pos?str.slice(pos+sep.length,str.length):str},strLeft:function(str,sep){if(null==str)return"";str=String(str),sep=null!=sep?String(sep):sep;var pos=sep?str.indexOf(sep):-1;return~pos?str.slice(0,pos):str},strLeftBack:function(str,sep){if(null==str)return"";str+="",sep=null!=sep?""+sep:sep;var pos=str.lastIndexOf(sep);return~pos?str.slice(0,pos):str},toSentence:function(array,separator,lastSeparator,serial){separator=separator||", ",lastSeparator=lastSeparator||" and ";var a=array.slice(),lastMember=a.pop();return array.length>2&&serial&&(lastSeparator=_s.rtrim(separator)+lastSeparator),a.length?a.join(separator)+lastSeparator+lastMember:lastMember},toSentenceSerial:function(){var args=slice.call(arguments);return args[3]=!0,_s.toSentence.apply(_s,args)},slugify:function(str){if(null==str)return"";var from="ąàáäâãåæăćęèéëêìíïîłńòóöôõøśșțùúüûñçżź",to="aaaaaaaaaceeeeeiiiilnoooooosstuuuunczz",regex=new RegExp(defaultToWhiteSpace(from),"g");return str=String(str).toLowerCase().replace(regex,function(c){var index=from.indexOf(c);return to.charAt(index)||"-"}),_s.dasherize(str.replace(/[^\w\s-]/g,""))},surround:function(str,wrapper){return[wrapper,str,wrapper].join("")},quote:function(str,quoteChar){return _s.surround(str,quoteChar||'"')},unquote:function(str,quoteChar){return quoteChar=quoteChar||'"',str[0]===quoteChar&&str[str.length-1]===quoteChar?str.slice(1,str.length-1):str},exports:function(){var result={};for(var prop in this)this.hasOwnProperty(prop)&&!prop.match(/^(?:include|contains|reverse)$/)&&(result[prop]=this[prop]);return result},repeat:function(str,qty,separator){if(null==str)return"";if(qty=~~qty,null==separator)return strRepeat(String(str),qty);for(var repeat=[];qty>0;repeat[--qty]=str);return repeat.join(separator)},naturalCmp:function(str1,str2){if(str1==str2)return 0;if(!str1)return-1;if(!str2)return 1;for(var cmpRegex=/(\.\d+)|(\d+)|(\D+)/g,tokens1=String(str1).toLowerCase().match(cmpRegex),tokens2=String(str2).toLowerCase().match(cmpRegex),count=Math.min(tokens1.length,tokens2.length),i=0;count>i;i++){var a=tokens1[i],b=tokens2[i];if(a!==b){var num1=parseInt(a,10);if(!isNaN(num1)){var num2=parseInt(b,10);if(!isNaN(num2)&&num1-num2)return num1-num2}return b>a?-1:1}}return tokens1.length===tokens2.length?tokens1.length-tokens2.length:str2>str1?-1:1},levenshtein:function(str1,str2){if(null==str1&&null==str2)return 0;if(null==str1)return String(str2).length;if(null==str2)return String(str1).length;str1=String(str1),str2=String(str2);for(var prev,value,current=[],i=0;i<=str2.length;i++)for(var j=0;j<=str1.length;j++)value=i&&j?str1.charAt(j-1)===str2.charAt(i-1)?prev:Math.min(current[j],current[j-1],prev)+1:i+j,prev=current[j],current[j]=value;return current.pop()},toBoolean:function(str,trueValues,falseValues){return"number"==typeof str&&(str=""+str),"string"!=typeof str?!!str:(str=_s.trim(str),boolMatch(str,trueValues||["true","1"])?!0:boolMatch(str,falseValues||["false","0"])?!1:void 0)}};_s.strip=_s.trim,_s.lstrip=_s.ltrim,_s.rstrip=_s.rtrim,_s.center=_s.lrpad,_s.rjust=_s.lpad,_s.ljust=_s.rpad,_s.contains=_s.include,_s.q=_s.quote,_s.toBool=_s.toBoolean,"undefined"!=typeof exports&&("undefined"!=typeof module&&module.exports&&(module.exports=_s),exports._s=_s),"function"==typeof define&&define.amd&&define("underscore.string",[],function(){return _s}),root._=root._||{},root._.string=root._.str=_s}(this,String),function(window,document,undefined){"use strict";function minErr(module,ErrorConstructor){return ErrorConstructor=ErrorConstructor||Error,function(){var message,i,code=arguments[0],prefix="["+(module?module+":":"")+code+"] ",template=arguments[1],templateArgs=arguments;for(message=prefix+template.replace(/\{\d+\}/g,function(match){var index=+match.slice(1,-1);return index+2<templateArgs.length?toDebugString(templateArgs[index+2]):match}),message=message+"\nhttp://errors.angularjs.org/1.3.11/"+(module?module+"/":"")+code,i=2;i<arguments.length;i++)message=message+(2==i?"?":"&")+"p"+(i-2)+"="+encodeURIComponent(toDebugString(arguments[i]));return new ErrorConstructor(message)}}function isArrayLike(obj){if(null==obj||isWindow(obj))return!1;var length=obj.length;return obj.nodeType===NODE_TYPE_ELEMENT&&length?!0:isString(obj)||isArray(obj)||0===length||"number"==typeof length&&length>0&&length-1 in obj}function forEach(obj,iterator,context){var key,length;if(obj)if(isFunction(obj))for(key in obj)"prototype"==key||"length"==key||"name"==key||obj.hasOwnProperty&&!obj.hasOwnProperty(key)||iterator.call(context,obj[key],key,obj);else if(isArray(obj)||isArrayLike(obj)){var isPrimitive="object"!=typeof obj;for(key=0,length=obj.length;length>key;key++)(isPrimitive||key in obj)&&iterator.call(context,obj[key],key,obj)}else if(obj.forEach&&obj.forEach!==forEach)obj.forEach(iterator,context,obj);else for(key in obj)obj.hasOwnProperty(key)&&iterator.call(context,obj[key],key,obj);return obj}function sortedKeys(obj){return Object.keys(obj).sort()}function forEachSorted(obj,iterator,context){for(var keys=sortedKeys(obj),i=0;i<keys.length;i++)iterator.call(context,obj[keys[i]],keys[i]);return keys}function reverseParams(iteratorFn){return function(value,key){iteratorFn(key,value)}}function nextUid(){return++uid}function setHashKey(obj,h){h?obj.$$hashKey=h:delete obj.$$hashKey}function extend(dst){for(var h=dst.$$hashKey,i=1,ii=arguments.length;ii>i;i++){var obj=arguments[i];if(obj)for(var keys=Object.keys(obj),j=0,jj=keys.length;jj>j;j++){var key=keys[j];dst[key]=obj[key]}}return setHashKey(dst,h),dst}function int(str){return parseInt(str,10)}function inherit(parent,extra){return extend(Object.create(parent),extra)}function noop(){}function identity($){return $}function valueFn(value){return function(){return value}}function isUndefined(value){return"undefined"==typeof value}function isDefined(value){return"undefined"!=typeof value}function isObject(value){return null!==value&&"object"==typeof value}function isString(value){return"string"==typeof value}function isNumber(value){return"number"==typeof value}function isDate(value){return"[object Date]"===toString.call(value)}function isFunction(value){return"function"==typeof value}function isRegExp(value){return"[object RegExp]"===toString.call(value)}function isWindow(obj){return obj&&obj.window===obj}function isScope(obj){return obj&&obj.$evalAsync&&obj.$watch}function isFile(obj){return"[object File]"===toString.call(obj)}function isFormData(obj){return"[object FormData]"===toString.call(obj)}function isBlob(obj){return"[object Blob]"===toString.call(obj)}function isBoolean(value){return"boolean"==typeof value}function isPromiseLike(obj){return obj&&isFunction(obj.then)}function isElement(node){return!(!node||!(node.nodeName||node.prop&&node.attr&&node.find))}function makeMap(str){var i,obj={},items=str.split(",");for(i=0;i<items.length;i++)obj[items[i]]=!0;return obj}function nodeName_(element){return lowercase(element.nodeName||element[0]&&element[0].nodeName)}function arrayRemove(array,value){var index=array.indexOf(value);return index>=0&&array.splice(index,1),value}function copy(source,destination,stackSource,stackDest){if(isWindow(source)||isScope(source))throw ngMinErr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(destination){if(source===destination)throw ngMinErr("cpi","Can't copy! Source and destination are identical.");if(stackSource=stackSource||[],stackDest=stackDest||[],isObject(source)){var index=stackSource.indexOf(source);if(-1!==index)return stackDest[index];stackSource.push(source),stackDest.push(destination)}var result;if(isArray(source)){destination.length=0;for(var i=0;i<source.length;i++)result=copy(source[i],null,stackSource,stackDest),isObject(source[i])&&(stackSource.push(source[i]),stackDest.push(result)),destination.push(result)}else{var h=destination.$$hashKey;isArray(destination)?destination.length=0:forEach(destination,function(value,key){delete destination[key]});for(var key in source)source.hasOwnProperty(key)&&(result=copy(source[key],null,stackSource,stackDest),isObject(source[key])&&(stackSource.push(source[key]),stackDest.push(result)),destination[key]=result);setHashKey(destination,h)}}else if(destination=source,source)if(isArray(source))destination=copy(source,[],stackSource,stackDest);else if(isDate(source))destination=new Date(source.getTime());else if(isRegExp(source))destination=new RegExp(source.source,source.toString().match(/[^\/]*$/)[0]),destination.lastIndex=source.lastIndex;else if(isObject(source)){var emptyObject=Object.create(Object.getPrototypeOf(source));destination=copy(source,emptyObject,stackSource,stackDest)}return destination}function shallowCopy(src,dst){if(isArray(src)){dst=dst||[];for(var i=0,ii=src.length;ii>i;i++)dst[i]=src[i]}else if(isObject(src)){dst=dst||{};for(var key in src)("$"!==key.charAt(0)||"$"!==key.charAt(1))&&(dst[key]=src[key])}return dst||src}function equals(o1,o2){if(o1===o2)return!0;if(null===o1||null===o2)return!1;if(o1!==o1&&o2!==o2)return!0;var length,key,keySet,t1=typeof o1,t2=typeof o2;if(t1==t2&&"object"==t1){if(!isArray(o1)){if(isDate(o1))return isDate(o2)?equals(o1.getTime(),o2.getTime()):!1;if(isRegExp(o1)&&isRegExp(o2))return o1.toString()==o2.toString();if(isScope(o1)||isScope(o2)||isWindow(o1)||isWindow(o2)||isArray(o2))return!1;keySet={};for(key in o1)if("$"!==key.charAt(0)&&!isFunction(o1[key])){if(!equals(o1[key],o2[key]))return!1;keySet[key]=!0}for(key in o2)if(!keySet.hasOwnProperty(key)&&"$"!==key.charAt(0)&&o2[key]!==undefined&&!isFunction(o2[key]))return!1;return!0}if(!isArray(o2))return!1;if((length=o1.length)==o2.length){for(key=0;length>key;key++)if(!equals(o1[key],o2[key]))return!1;return!0}}return!1}function concat(array1,array2,index){return array1.concat(slice.call(array2,index))}function sliceArgs(args,startIndex){return slice.call(args,startIndex||0)}function bind(self,fn){var curryArgs=arguments.length>2?sliceArgs(arguments,2):[];return!isFunction(fn)||fn instanceof RegExp?fn:curryArgs.length?function(){return arguments.length?fn.apply(self,concat(curryArgs,arguments,0)):fn.apply(self,curryArgs)}:function(){return arguments.length?fn.apply(self,arguments):fn.call(self)}}function toJsonReplacer(key,value){var val=value;return"string"==typeof key&&"$"===key.charAt(0)&&"$"===key.charAt(1)?val=undefined:isWindow(value)?val="$WINDOW":value&&document===value?val="$DOCUMENT":isScope(value)&&(val="$SCOPE"),val}function toJson(obj,pretty){return"undefined"==typeof obj?undefined:(isNumber(pretty)||(pretty=pretty?2:null),JSON.stringify(obj,toJsonReplacer,pretty))}function fromJson(json){return isString(json)?JSON.parse(json):json}function startingTag(element){element=jqLite(element).clone();try{element.empty()}catch(e){}var elemHtml=jqLite("<div>").append(element).html();try{return element[0].nodeType===NODE_TYPE_TEXT?lowercase(elemHtml):elemHtml.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(match,nodeName){return"<"+lowercase(nodeName)})}catch(e){return lowercase(elemHtml)}}function tryDecodeURIComponent(value){try{return decodeURIComponent(value)}catch(e){}}function parseKeyValue(keyValue){var key_value,key,obj={};return forEach((keyValue||"").split("&"),function(keyValue){if(keyValue&&(key_value=keyValue.replace(/\+/g,"%20").split("="),key=tryDecodeURIComponent(key_value[0]),isDefined(key))){var val=isDefined(key_value[1])?tryDecodeURIComponent(key_value[1]):!0;hasOwnProperty.call(obj,key)?isArray(obj[key])?obj[key].push(val):obj[key]=[obj[key],val]:obj[key]=val}}),obj}function toKeyValue(obj){var parts=[];return forEach(obj,function(value,key){isArray(value)?forEach(value,function(arrayValue){parts.push(encodeUriQuery(key,!0)+(arrayValue===!0?"":"="+encodeUriQuery(arrayValue,!0)))}):parts.push(encodeUriQuery(key,!0)+(value===!0?"":"="+encodeUriQuery(value,!0)))}),parts.length?parts.join("&"):""}function encodeUriSegment(val){return encodeUriQuery(val,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function encodeUriQuery(val,pctEncodeSpaces){return encodeURIComponent(val).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,pctEncodeSpaces?"%20":"+")}function getNgAttribute(element,ngAttr){var attr,i,ii=ngAttrPrefixes.length;for(element=jqLite(element),i=0;ii>i;++i)if(attr=ngAttrPrefixes[i]+ngAttr,isString(attr=element.attr(attr)))return attr;return null}function angularInit(element,bootstrap){var appElement,module,config={};forEach(ngAttrPrefixes,function(prefix){var name=prefix+"app";!appElement&&element.hasAttribute&&element.hasAttribute(name)&&(appElement=element,module=element.getAttribute(name))}),forEach(ngAttrPrefixes,function(prefix){var candidate,name=prefix+"app";!appElement&&(candidate=element.querySelector("["+name.replace(":","\\:")+"]"))&&(appElement=candidate,module=candidate.getAttribute(name))}),appElement&&(config.strictDi=null!==getNgAttribute(appElement,"strict-di"),bootstrap(appElement,module?[module]:[],config))}function bootstrap(element,modules,config){isObject(config)||(config={});var defaultConfig={strictDi:!1};config=extend(defaultConfig,config);var doBootstrap=function(){if(element=jqLite(element),element.injector()){var tag=element[0]===document?"document":startingTag(element);throw ngMinErr("btstrpd","App Already Bootstrapped with this Element '{0}'",tag.replace(/</,"&lt;").replace(/>/,"&gt;"))}modules=modules||[],modules.unshift(["$provide",function($provide){$provide.value("$rootElement",element)}]),config.debugInfoEnabled&&modules.push(["$compileProvider",function($compileProvider){$compileProvider.debugInfoEnabled(!0)}]),modules.unshift("ng");var injector=createInjector(modules,config.strictDi);return injector.invoke(["$rootScope","$rootElement","$compile","$injector",function(scope,element,compile,injector){scope.$apply(function(){element.data("$injector",injector),compile(element)(scope)})}]),injector},NG_ENABLE_DEBUG_INFO=/^NG_ENABLE_DEBUG_INFO!/,NG_DEFER_BOOTSTRAP=/^NG_DEFER_BOOTSTRAP!/;return window&&NG_ENABLE_DEBUG_INFO.test(window.name)&&(config.debugInfoEnabled=!0,window.name=window.name.replace(NG_ENABLE_DEBUG_INFO,"")),window&&!NG_DEFER_BOOTSTRAP.test(window.name)?doBootstrap():(window.name=window.name.replace(NG_DEFER_BOOTSTRAP,""),void(angular.resumeBootstrap=function(extraModules){forEach(extraModules,function(module){modules.push(module)}),doBootstrap()}))}function reloadWithDebugInfo(){window.name="NG_ENABLE_DEBUG_INFO!"+window.name,window.location.reload()}function getTestability(rootElement){var injector=angular.element(rootElement).injector();if(!injector)throw ngMinErr("test","no injector found for element argument to getTestability");return injector.get("$$testability")}function snake_case(name,separator){return separator=separator||"_",name.replace(SNAKE_CASE_REGEXP,function(letter,pos){return(pos?separator:"")+letter.toLowerCase()})}function bindJQuery(){var originalCleanData;bindJQueryFired||(jQuery=window.jQuery,jQuery&&jQuery.fn.on?(jqLite=jQuery,extend(jQuery.fn,{scope:JQLitePrototype.scope,isolateScope:JQLitePrototype.isolateScope,controller:JQLitePrototype.controller,injector:JQLitePrototype.injector,inheritedData:JQLitePrototype.inheritedData}),originalCleanData=jQuery.cleanData,jQuery.cleanData=function(elems){var events;if(skipDestroyOnNextJQueryCleanData)skipDestroyOnNextJQueryCleanData=!1;else for(var elem,i=0;null!=(elem=elems[i]);i++)events=jQuery._data(elem,"events"),events&&events.$destroy&&jQuery(elem).triggerHandler("$destroy");originalCleanData(elems)}):jqLite=JQLite,angular.element=jqLite,bindJQueryFired=!0)}function assertArg(arg,name,reason){if(!arg)throw ngMinErr("areq","Argument '{0}' is {1}",name||"?",reason||"required");return arg}function assertArgFn(arg,name,acceptArrayAnnotation){return acceptArrayAnnotation&&isArray(arg)&&(arg=arg[arg.length-1]),assertArg(isFunction(arg),name,"not a function, got "+(arg&&"object"==typeof arg?arg.constructor.name||"Object":typeof arg)),arg}function assertNotHasOwnProperty(name,context){if("hasOwnProperty"===name)throw ngMinErr("badname","hasOwnProperty is not a valid {0} name",context)}function getter(obj,path,bindFnToScope){if(!path)return obj;for(var key,keys=path.split("."),lastInstance=obj,len=keys.length,i=0;len>i;i++)key=keys[i],obj&&(obj=(lastInstance=obj)[key]);return!bindFnToScope&&isFunction(obj)?bind(lastInstance,obj):obj}function getBlockNodes(nodes){var node=nodes[0],endNode=nodes[nodes.length-1],blockNodes=[node];do{if(node=node.nextSibling,!node)break;blockNodes.push(node)}while(node!==endNode);return jqLite(blockNodes)}function createMap(){return Object.create(null)}function setupModuleLoader(window){function ensure(obj,name,factory){return obj[name]||(obj[name]=factory())}var $injectorMinErr=minErr("$injector"),ngMinErr=minErr("ng"),angular=ensure(window,"angular",Object);return angular.$$minErr=angular.$$minErr||minErr,ensure(angular,"module",function(){var modules={};return function(name,requires,configFn){var assertNotHasOwnProperty=function(name,context){if("hasOwnProperty"===name)throw ngMinErr("badname","hasOwnProperty is not a valid {0} name",context)};return assertNotHasOwnProperty(name,"module"),requires&&modules.hasOwnProperty(name)&&(modules[name]=null),ensure(modules,name,function(){function invokeLater(provider,method,insertMethod,queue){return queue||(queue=invokeQueue),function(){return queue[insertMethod||"push"]([provider,method,arguments]),moduleInstance}}if(!requires)throw $injectorMinErr("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.",name);var invokeQueue=[],configBlocks=[],runBlocks=[],config=invokeLater("$injector","invoke","push",configBlocks),moduleInstance={_invokeQueue:invokeQueue,_configBlocks:configBlocks,_runBlocks:runBlocks,requires:requires,name:name,provider:invokeLater("$provide","provider"),factory:invokeLater("$provide","factory"),service:invokeLater("$provide","service"),value:invokeLater("$provide","value"),constant:invokeLater("$provide","constant","unshift"),animation:invokeLater("$animateProvider","register"),filter:invokeLater("$filterProvider","register"),controller:invokeLater("$controllerProvider","register"),directive:invokeLater("$compileProvider","directive"),config:config,run:function(block){return runBlocks.push(block),this}};return configFn&&config(configFn),moduleInstance})}})}function serializeObject(obj){var seen=[];return JSON.stringify(obj,function(key,val){if(val=toJsonReplacer(key,val),isObject(val)){if(seen.indexOf(val)>=0)return"<<already seen>>";seen.push(val)}return val})}function toDebugString(obj){return"function"==typeof obj?obj.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof obj?"undefined":"string"!=typeof obj?serializeObject(obj):obj}function publishExternalAPI(angular){extend(angular,{bootstrap:bootstrap,copy:copy,extend:extend,equals:equals,element:jqLite,forEach:forEach,injector:createInjector,noop:noop,bind:bind,toJson:toJson,fromJson:fromJson,identity:identity,isUndefined:isUndefined,isDefined:isDefined,isString:isString,isFunction:isFunction,isObject:isObject,isNumber:isNumber,isElement:isElement,isArray:isArray,version:version,isDate:isDate,lowercase:lowercase,uppercase:uppercase,callbacks:{counter:0},getTestability:getTestability,$$minErr:minErr,$$csp:csp,reloadWithDebugInfo:reloadWithDebugInfo}),angularModule=setupModuleLoader(window);try{angularModule("ngLocale")}catch(e){angularModule("ngLocale",[]).provider("$locale",$LocaleProvider)}angularModule("ng",["ngLocale"],["$provide",function($provide){$provide.provider({$$sanitizeUri:$$SanitizeUriProvider}),$provide.provider("$compile",$CompileProvider).directive({a:htmlAnchorDirective,input:inputDirective,textarea:inputDirective,form:formDirective,script:scriptDirective,select:selectDirective,style:styleDirective,option:optionDirective,ngBind:ngBindDirective,ngBindHtml:ngBindHtmlDirective,ngBindTemplate:ngBindTemplateDirective,ngClass:ngClassDirective,ngClassEven:ngClassEvenDirective,ngClassOdd:ngClassOddDirective,ngCloak:ngCloakDirective,ngController:ngControllerDirective,ngForm:ngFormDirective,ngHide:ngHideDirective,ngIf:ngIfDirective,ngInclude:ngIncludeDirective,ngInit:ngInitDirective,ngNonBindable:ngNonBindableDirective,ngPluralize:ngPluralizeDirective,ngRepeat:ngRepeatDirective,ngShow:ngShowDirective,ngStyle:ngStyleDirective,ngSwitch:ngSwitchDirective,ngSwitchWhen:ngSwitchWhenDirective,ngSwitchDefault:ngSwitchDefaultDirective,ngOptions:ngOptionsDirective,ngTransclude:ngTranscludeDirective,ngModel:ngModelDirective,ngList:ngListDirective,ngChange:ngChangeDirective,pattern:patternDirective,ngPattern:patternDirective,required:requiredDirective,ngRequired:requiredDirective,minlength:minlengthDirective,ngMinlength:minlengthDirective,maxlength:maxlengthDirective,ngMaxlength:maxlengthDirective,ngValue:ngValueDirective,ngModelOptions:ngModelOptionsDirective}).directive({ngInclude:ngIncludeFillContentDirective}).directive(ngAttributeAliasDirectives).directive(ngEventDirectives),$provide.provider({$anchorScroll:$AnchorScrollProvider,$animate:$AnimateProvider,$browser:$BrowserProvider,$cacheFactory:$CacheFactoryProvider,$controller:$ControllerProvider,$document:$DocumentProvider,$exceptionHandler:$ExceptionHandlerProvider,$filter:$FilterProvider,$interpolate:$InterpolateProvider,$interval:$IntervalProvider,$http:$HttpProvider,$httpBackend:$HttpBackendProvider,$location:$LocationProvider,$log:$LogProvider,$parse:$ParseProvider,$rootScope:$RootScopeProvider,$q:$QProvider,$$q:$$QProvider,$sce:$SceProvider,$sceDelegate:$SceDelegateProvider,$sniffer:$SnifferProvider,$templateCache:$TemplateCacheProvider,$templateRequest:$TemplateRequestProvider,$$testability:$$TestabilityProvider,$timeout:$TimeoutProvider,$window:$WindowProvider,$$rAF:$$RAFProvider,$$asyncCallback:$$AsyncCallbackProvider,$$jqLite:$$jqLiteProvider})}])}function jqNextId(){return++jqId}function camelCase(name){return name.replace(SPECIAL_CHARS_REGEXP,function(_,separator,letter,offset){return offset?letter.toUpperCase():letter}).replace(MOZ_HACK_REGEXP,"Moz$1")}function jqLiteIsTextNode(html){return!HTML_REGEXP.test(html)}function jqLiteAcceptsData(node){var nodeType=node.nodeType;return nodeType===NODE_TYPE_ELEMENT||!nodeType||nodeType===NODE_TYPE_DOCUMENT}function jqLiteBuildFragment(html,context){var tmp,tag,wrap,i,fragment=context.createDocumentFragment(),nodes=[];if(jqLiteIsTextNode(html))nodes.push(context.createTextNode(html));else{for(tmp=tmp||fragment.appendChild(context.createElement("div")),tag=(TAG_NAME_REGEXP.exec(html)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,tmp.innerHTML=wrap[1]+html.replace(XHTML_TAG_REGEXP,"<$1></$2>")+wrap[2],i=wrap[0];i--;)tmp=tmp.lastChild;nodes=concat(nodes,tmp.childNodes),tmp=fragment.firstChild,tmp.textContent=""}return fragment.textContent="",fragment.innerHTML="",forEach(nodes,function(node){fragment.appendChild(node)}),fragment}function jqLiteParseHTML(html,context){context=context||document;var parsed;return(parsed=SINGLE_TAG_REGEXP.exec(html))?[context.createElement(parsed[1])]:(parsed=jqLiteBuildFragment(html,context))?parsed.childNodes:[]}function JQLite(element){if(element instanceof JQLite)return element;var argIsString;if(isString(element)&&(element=trim(element),argIsString=!0),!(this instanceof JQLite)){if(argIsString&&"<"!=element.charAt(0))throw jqLiteMinErr("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new JQLite(element)}argIsString?jqLiteAddNodes(this,jqLiteParseHTML(element)):jqLiteAddNodes(this,element)}function jqLiteClone(element){return element.cloneNode(!0)}function jqLiteDealoc(element,onlyDescendants){if(onlyDescendants||jqLiteRemoveData(element),element.querySelectorAll)for(var descendants=element.querySelectorAll("*"),i=0,l=descendants.length;l>i;i++)jqLiteRemoveData(descendants[i])}function jqLiteOff(element,type,fn,unsupported){if(isDefined(unsupported))throw jqLiteMinErr("offargs","jqLite#off() does not support the `selector` argument");var expandoStore=jqLiteExpandoStore(element),events=expandoStore&&expandoStore.events,handle=expandoStore&&expandoStore.handle;if(handle)if(type)forEach(type.split(" "),function(type){if(isDefined(fn)){var listenerFns=events[type];if(arrayRemove(listenerFns||[],fn),listenerFns&&listenerFns.length>0)return}removeEventListenerFn(element,type,handle),delete events[type]});else for(type in events)"$destroy"!==type&&removeEventListenerFn(element,type,handle),delete events[type]}function jqLiteRemoveData(element,name){var expandoId=element.ng339,expandoStore=expandoId&&jqCache[expandoId];if(expandoStore){if(name)return void delete expandoStore.data[name];expandoStore.handle&&(expandoStore.events.$destroy&&expandoStore.handle({},"$destroy"),jqLiteOff(element)),delete jqCache[expandoId],element.ng339=undefined}}function jqLiteExpandoStore(element,createIfNecessary){var expandoId=element.ng339,expandoStore=expandoId&&jqCache[expandoId];return createIfNecessary&&!expandoStore&&(element.ng339=expandoId=jqNextId(),expandoStore=jqCache[expandoId]={events:{},data:{},handle:undefined}),expandoStore}function jqLiteData(element,key,value){if(jqLiteAcceptsData(element)){var isSimpleSetter=isDefined(value),isSimpleGetter=!isSimpleSetter&&key&&!isObject(key),massGetter=!key,expandoStore=jqLiteExpandoStore(element,!isSimpleGetter),data=expandoStore&&expandoStore.data;if(isSimpleSetter)data[key]=value;else{if(massGetter)return data;if(isSimpleGetter)return data&&data[key];extend(data,key)}}}function jqLiteHasClass(element,selector){return element.getAttribute?(" "+(element.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+selector+" ")>-1:!1}function jqLiteRemoveClass(element,cssClasses){cssClasses&&element.setAttribute&&forEach(cssClasses.split(" "),function(cssClass){element.setAttribute("class",trim((" "+(element.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+trim(cssClass)+" "," ")))})}function jqLiteAddClass(element,cssClasses){if(cssClasses&&element.setAttribute){var existingClasses=(" "+(element.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");forEach(cssClasses.split(" "),function(cssClass){cssClass=trim(cssClass),-1===existingClasses.indexOf(" "+cssClass+" ")&&(existingClasses+=cssClass+" ")}),element.setAttribute("class",trim(existingClasses))}}function jqLiteAddNodes(root,elements){if(elements)if(elements.nodeType)root[root.length++]=elements;else{var length=elements.length;if("number"==typeof length&&elements.window!==elements){if(length)for(var i=0;length>i;i++)root[root.length++]=elements[i]}else root[root.length++]=elements}}function jqLiteController(element,name){return jqLiteInheritedData(element,"$"+(name||"ngController")+"Controller")}function jqLiteInheritedData(element,name,value){element.nodeType==NODE_TYPE_DOCUMENT&&(element=element.documentElement);for(var names=isArray(name)?name:[name];element;){for(var i=0,ii=names.length;ii>i;i++)if((value=jqLite.data(element,names[i]))!==undefined)return value;element=element.parentNode||element.nodeType===NODE_TYPE_DOCUMENT_FRAGMENT&&element.host}}function jqLiteEmpty(element){for(jqLiteDealoc(element,!0);element.firstChild;)element.removeChild(element.firstChild)}function jqLiteRemove(element,keepData){keepData||jqLiteDealoc(element);var parent=element.parentNode;parent&&parent.removeChild(element)}function jqLiteDocumentLoaded(action,win){win=win||window,"complete"===win.document.readyState?win.setTimeout(action):jqLite(win).on("load",action)}function getBooleanAttrName(element,name){var booleanAttr=BOOLEAN_ATTR[name.toLowerCase()];return booleanAttr&&BOOLEAN_ELEMENTS[nodeName_(element)]&&booleanAttr}function getAliasedAttrName(element,name){var nodeName=element.nodeName;return("INPUT"===nodeName||"TEXTAREA"===nodeName)&&ALIASED_ATTR[name]}function createEventHandler(element,events){var eventHandler=function(event,type){event.isDefaultPrevented=function(){return event.defaultPrevented};var eventFns=events[type||event.type],eventFnsLength=eventFns?eventFns.length:0;if(eventFnsLength){if(isUndefined(event.immediatePropagationStopped)){var originalStopImmediatePropagation=event.stopImmediatePropagation;event.stopImmediatePropagation=function(){event.immediatePropagationStopped=!0,event.stopPropagation&&event.stopPropagation(),originalStopImmediatePropagation&&originalStopImmediatePropagation.call(event)}}event.isImmediatePropagationStopped=function(){return event.immediatePropagationStopped===!0},eventFnsLength>1&&(eventFns=shallowCopy(eventFns));for(var i=0;eventFnsLength>i;i++)event.isImmediatePropagationStopped()||eventFns[i].call(element,event)}};return eventHandler.elem=element,eventHandler}function $$jqLiteProvider(){this.$get=function(){return extend(JQLite,{hasClass:function(node,classes){return node.attr&&(node=node[0]),jqLiteHasClass(node,classes)},addClass:function(node,classes){return node.attr&&(node=node[0]),jqLiteAddClass(node,classes)},removeClass:function(node,classes){return node.attr&&(node=node[0]),jqLiteRemoveClass(node,classes)}})}}function hashKey(obj,nextUidFn){var key=obj&&obj.$$hashKey;if(key)return"function"==typeof key&&(key=obj.$$hashKey()),key;var objType=typeof obj;return key="function"==objType||"object"==objType&&null!==obj?obj.$$hashKey=objType+":"+(nextUidFn||nextUid)():objType+":"+obj}function HashMap(array,isolatedUid){if(isolatedUid){var uid=0;
this.nextUid=function(){return++uid}}forEach(array,this.put,this)}function anonFn(fn){var fnText=fn.toString().replace(STRIP_COMMENTS,""),args=fnText.match(FN_ARGS);return args?"function("+(args[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function annotate(fn,strictDi,name){var $inject,fnText,argDecl,last;if("function"==typeof fn){if(!($inject=fn.$inject)){if($inject=[],fn.length){if(strictDi)throw isString(name)&&name||(name=fn.name||anonFn(fn)),$injectorMinErr("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",name);fnText=fn.toString().replace(STRIP_COMMENTS,""),argDecl=fnText.match(FN_ARGS),forEach(argDecl[1].split(FN_ARG_SPLIT),function(arg){arg.replace(FN_ARG,function(all,underscore,name){$inject.push(name)})})}fn.$inject=$inject}}else isArray(fn)?(last=fn.length-1,assertArgFn(fn[last],"fn"),$inject=fn.slice(0,last)):assertArgFn(fn,"fn",!0);return $inject}function createInjector(modulesToLoad,strictDi){function supportObject(delegate){return function(key,value){return isObject(key)?void forEach(key,reverseParams(delegate)):delegate(key,value)}}function provider(name,provider_){if(assertNotHasOwnProperty(name,"service"),(isFunction(provider_)||isArray(provider_))&&(provider_=providerInjector.instantiate(provider_)),!provider_.$get)throw $injectorMinErr("pget","Provider '{0}' must define $get factory method.",name);return providerCache[name+providerSuffix]=provider_}function enforceReturnValue(name,factory){return function(){var result=instanceInjector.invoke(factory,this);if(isUndefined(result))throw $injectorMinErr("undef","Provider '{0}' must return a value from $get factory method.",name);return result}}function factory(name,factoryFn,enforce){return provider(name,{$get:enforce!==!1?enforceReturnValue(name,factoryFn):factoryFn})}function service(name,constructor){return factory(name,["$injector",function($injector){return $injector.instantiate(constructor)}])}function value(name,val){return factory(name,valueFn(val),!1)}function constant(name,value){assertNotHasOwnProperty(name,"constant"),providerCache[name]=value,instanceCache[name]=value}function decorator(serviceName,decorFn){var origProvider=providerInjector.get(serviceName+providerSuffix),orig$get=origProvider.$get;origProvider.$get=function(){var origInstance=instanceInjector.invoke(orig$get,origProvider);return instanceInjector.invoke(decorFn,null,{$delegate:origInstance})}}function loadModules(modulesToLoad){var moduleFn,runBlocks=[];return forEach(modulesToLoad,function(module){function runInvokeQueue(queue){var i,ii;for(i=0,ii=queue.length;ii>i;i++){var invokeArgs=queue[i],provider=providerInjector.get(invokeArgs[0]);provider[invokeArgs[1]].apply(provider,invokeArgs[2])}}if(!loadedModules.get(module)){loadedModules.put(module,!0);try{isString(module)?(moduleFn=angularModule(module),runBlocks=runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks),runInvokeQueue(moduleFn._invokeQueue),runInvokeQueue(moduleFn._configBlocks)):isFunction(module)?runBlocks.push(providerInjector.invoke(module)):isArray(module)?runBlocks.push(providerInjector.invoke(module)):assertArgFn(module,"module")}catch(e){throw isArray(module)&&(module=module[module.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),$injectorMinErr("modulerr","Failed to instantiate module {0} due to:\n{1}",module,e.stack||e.message||e)}}}),runBlocks}function createInternalInjector(cache,factory){function getService(serviceName,caller){if(cache.hasOwnProperty(serviceName)){if(cache[serviceName]===INSTANTIATING)throw $injectorMinErr("cdep","Circular dependency found: {0}",serviceName+" <- "+path.join(" <- "));return cache[serviceName]}try{return path.unshift(serviceName),cache[serviceName]=INSTANTIATING,cache[serviceName]=factory(serviceName,caller)}catch(err){throw cache[serviceName]===INSTANTIATING&&delete cache[serviceName],err}finally{path.shift()}}function invoke(fn,self,locals,serviceName){"string"==typeof locals&&(serviceName=locals,locals=null);var length,i,key,args=[],$inject=annotate(fn,strictDi,serviceName);for(i=0,length=$inject.length;length>i;i++){if(key=$inject[i],"string"!=typeof key)throw $injectorMinErr("itkn","Incorrect injection token! Expected service name as string, got {0}",key);args.push(locals&&locals.hasOwnProperty(key)?locals[key]:getService(key,serviceName))}return isArray(fn)&&(fn=fn[length]),fn.apply(self,args)}function instantiate(Type,locals,serviceName){var instance=Object.create((isArray(Type)?Type[Type.length-1]:Type).prototype||null),returnedValue=invoke(Type,instance,locals,serviceName);return isObject(returnedValue)||isFunction(returnedValue)?returnedValue:instance}return{invoke:invoke,instantiate:instantiate,get:getService,annotate:annotate,has:function(name){return providerCache.hasOwnProperty(name+providerSuffix)||cache.hasOwnProperty(name)}}}strictDi=strictDi===!0;var INSTANTIATING={},providerSuffix="Provider",path=[],loadedModules=new HashMap([],!0),providerCache={$provide:{provider:supportObject(provider),factory:supportObject(factory),service:supportObject(service),value:supportObject(value),constant:supportObject(constant),decorator:decorator}},providerInjector=providerCache.$injector=createInternalInjector(providerCache,function(serviceName,caller){throw angular.isString(caller)&&path.push(caller),$injectorMinErr("unpr","Unknown provider: {0}",path.join(" <- "))}),instanceCache={},instanceInjector=instanceCache.$injector=createInternalInjector(instanceCache,function(serviceName,caller){var provider=providerInjector.get(serviceName+providerSuffix,caller);return instanceInjector.invoke(provider.$get,provider,undefined,serviceName)});return forEach(loadModules(modulesToLoad),function(fn){instanceInjector.invoke(fn||noop)}),instanceInjector}function $AnchorScrollProvider(){var autoScrollingEnabled=!0;this.disableAutoScrolling=function(){autoScrollingEnabled=!1},this.$get=["$window","$location","$rootScope",function($window,$location,$rootScope){function getFirstAnchor(list){var result=null;return Array.prototype.some.call(list,function(element){return"a"===nodeName_(element)?(result=element,!0):void 0}),result}function getYOffset(){var offset=scroll.yOffset;if(isFunction(offset))offset=offset();else if(isElement(offset)){var elem=offset[0],style=$window.getComputedStyle(elem);offset="fixed"!==style.position?0:elem.getBoundingClientRect().bottom}else isNumber(offset)||(offset=0);return offset}function scrollTo(elem){if(elem){elem.scrollIntoView();var offset=getYOffset();if(offset){var elemTop=elem.getBoundingClientRect().top;$window.scrollBy(0,elemTop-offset)}}else $window.scrollTo(0,0)}function scroll(){var elm,hash=$location.hash();hash?(elm=document.getElementById(hash))?scrollTo(elm):(elm=getFirstAnchor(document.getElementsByName(hash)))?scrollTo(elm):"top"===hash&&scrollTo(null):scrollTo(null)}var document=$window.document;return autoScrollingEnabled&&$rootScope.$watch(function(){return $location.hash()},function(newVal,oldVal){(newVal!==oldVal||""!==newVal)&&jqLiteDocumentLoaded(function(){$rootScope.$evalAsync(scroll)})}),scroll}]}function $$AsyncCallbackProvider(){this.$get=["$$rAF","$timeout",function($$rAF,$timeout){return $$rAF.supported?function(fn){return $$rAF(fn)}:function(fn){return $timeout(fn,0,!1)}}]}function Browser(window,document,$log,$sniffer){function completeOutstandingRequest(fn){try{fn.apply(null,sliceArgs(arguments,1))}finally{if(outstandingRequestCount--,0===outstandingRequestCount)for(;outstandingRequestCallbacks.length;)try{outstandingRequestCallbacks.pop()()}catch(e){$log.error(e)}}}function getHash(url){var index=url.indexOf("#");return-1===index?"":url.substr(index+1)}function startPoller(interval,setTimeout){!function check(){forEach(pollFns,function(pollFn){pollFn()}),pollTimeout=setTimeout(check,interval)}()}function cacheStateAndFireUrlChange(){cacheState(),fireUrlChange()}function cacheState(){cachedState=window.history.state,cachedState=isUndefined(cachedState)?null:cachedState,equals(cachedState,lastCachedState)&&(cachedState=lastCachedState),lastCachedState=cachedState}function fireUrlChange(){(lastBrowserUrl!==self.url()||lastHistoryState!==cachedState)&&(lastBrowserUrl=self.url(),lastHistoryState=cachedState,forEach(urlChangeListeners,function(listener){listener(self.url(),cachedState)}))}function safeDecodeURIComponent(str){try{return decodeURIComponent(str)}catch(e){return str}}var self=this,rawDocument=document[0],location=window.location,history=window.history,setTimeout=window.setTimeout,clearTimeout=window.clearTimeout,pendingDeferIds={};self.isMock=!1;var outstandingRequestCount=0,outstandingRequestCallbacks=[];self.$$completeOutstandingRequest=completeOutstandingRequest,self.$$incOutstandingRequestCount=function(){outstandingRequestCount++},self.notifyWhenNoOutstandingRequests=function(callback){forEach(pollFns,function(pollFn){pollFn()}),0===outstandingRequestCount?callback():outstandingRequestCallbacks.push(callback)};var pollTimeout,pollFns=[];self.addPollFn=function(fn){return isUndefined(pollTimeout)&&startPoller(100,setTimeout),pollFns.push(fn),fn};var cachedState,lastHistoryState,lastBrowserUrl=location.href,baseElement=document.find("base"),reloadLocation=null;cacheState(),lastHistoryState=cachedState,self.url=function(url,replace,state){if(isUndefined(state)&&(state=null),location!==window.location&&(location=window.location),history!==window.history&&(history=window.history),url){var sameState=lastHistoryState===state;if(lastBrowserUrl===url&&(!$sniffer.history||sameState))return self;var sameBase=lastBrowserUrl&&stripHash(lastBrowserUrl)===stripHash(url);return lastBrowserUrl=url,lastHistoryState=state,!$sniffer.history||sameBase&&sameState?(sameBase||(reloadLocation=url),replace?location.replace(url):sameBase?location.hash=getHash(url):location.href=url):(history[replace?"replaceState":"pushState"](state,"",url),cacheState(),lastHistoryState=cachedState),self}return reloadLocation||location.href.replace(/%27/g,"'")},self.state=function(){return cachedState};var urlChangeListeners=[],urlChangeInit=!1,lastCachedState=null;self.onUrlChange=function(callback){return urlChangeInit||($sniffer.history&&jqLite(window).on("popstate",cacheStateAndFireUrlChange),jqLite(window).on("hashchange",cacheStateAndFireUrlChange),urlChangeInit=!0),urlChangeListeners.push(callback),callback},self.$$checkUrlChange=fireUrlChange,self.baseHref=function(){var href=baseElement.attr("href");return href?href.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var lastCookies={},lastCookieString="",cookiePath=self.baseHref();self.cookies=function(name,value){var cookieLength,cookieArray,cookie,i,index;if(!name){if(rawDocument.cookie!==lastCookieString)for(lastCookieString=rawDocument.cookie,cookieArray=lastCookieString.split("; "),lastCookies={},i=0;i<cookieArray.length;i++)cookie=cookieArray[i],index=cookie.indexOf("="),index>0&&(name=safeDecodeURIComponent(cookie.substring(0,index)),lastCookies[name]===undefined&&(lastCookies[name]=safeDecodeURIComponent(cookie.substring(index+1))));return lastCookies}value===undefined?rawDocument.cookie=encodeURIComponent(name)+"=;path="+cookiePath+";expires=Thu, 01 Jan 1970 00:00:00 GMT":isString(value)&&(cookieLength=(rawDocument.cookie=encodeURIComponent(name)+"="+encodeURIComponent(value)+";path="+cookiePath).length+1,cookieLength>4096&&$log.warn("Cookie '"+name+"' possibly not set or overflowed because it was too large ("+cookieLength+" > 4096 bytes)!"))},self.defer=function(fn,delay){var timeoutId;return outstandingRequestCount++,timeoutId=setTimeout(function(){delete pendingDeferIds[timeoutId],completeOutstandingRequest(fn)},delay||0),pendingDeferIds[timeoutId]=!0,timeoutId},self.defer.cancel=function(deferId){return pendingDeferIds[deferId]?(delete pendingDeferIds[deferId],clearTimeout(deferId),completeOutstandingRequest(noop),!0):!1}}function $BrowserProvider(){this.$get=["$window","$log","$sniffer","$document",function($window,$log,$sniffer,$document){return new Browser($window,$document,$log,$sniffer)}]}function $CacheFactoryProvider(){this.$get=function(){function cacheFactory(cacheId,options){function refresh(entry){entry!=freshEnd&&(staleEnd?staleEnd==entry&&(staleEnd=entry.n):staleEnd=entry,link(entry.n,entry.p),link(entry,freshEnd),freshEnd=entry,freshEnd.n=null)}function link(nextEntry,prevEntry){nextEntry!=prevEntry&&(nextEntry&&(nextEntry.p=prevEntry),prevEntry&&(prevEntry.n=nextEntry))}if(cacheId in caches)throw minErr("$cacheFactory")("iid","CacheId '{0}' is already taken!",cacheId);var size=0,stats=extend({},options,{id:cacheId}),data={},capacity=options&&options.capacity||Number.MAX_VALUE,lruHash={},freshEnd=null,staleEnd=null;return caches[cacheId]={put:function(key,value){if(capacity<Number.MAX_VALUE){var lruEntry=lruHash[key]||(lruHash[key]={key:key});refresh(lruEntry)}if(!isUndefined(value))return key in data||size++,data[key]=value,size>capacity&&this.remove(staleEnd.key),value},get:function(key){if(capacity<Number.MAX_VALUE){var lruEntry=lruHash[key];if(!lruEntry)return;refresh(lruEntry)}return data[key]},remove:function(key){if(capacity<Number.MAX_VALUE){var lruEntry=lruHash[key];if(!lruEntry)return;lruEntry==freshEnd&&(freshEnd=lruEntry.p),lruEntry==staleEnd&&(staleEnd=lruEntry.n),link(lruEntry.n,lruEntry.p),delete lruHash[key]}delete data[key],size--},removeAll:function(){data={},size=0,lruHash={},freshEnd=staleEnd=null},destroy:function(){data=null,stats=null,lruHash=null,delete caches[cacheId]},info:function(){return extend({},stats,{size:size})}}}var caches={};return cacheFactory.info=function(){var info={};return forEach(caches,function(cache,cacheId){info[cacheId]=cache.info()}),info},cacheFactory.get=function(cacheId){return caches[cacheId]},cacheFactory}}function $TemplateCacheProvider(){this.$get=["$cacheFactory",function($cacheFactory){return $cacheFactory("templates")}]}function $CompileProvider($provide,$$sanitizeUriProvider){function parseIsolateBindings(scope,directiveName){var LOCAL_REGEXP=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,bindings={};return forEach(scope,function(definition,scopeName){var match=definition.match(LOCAL_REGEXP);if(!match)throw $compileMinErr("iscp","Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}",directiveName,scopeName,definition);bindings[scopeName]={mode:match[1][0],collection:"*"===match[2],optional:"?"===match[3],attrName:match[4]||scopeName}}),bindings}var hasDirectives={},Suffix="Directive",COMMENT_DIRECTIVE_REGEXP=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,CLASS_DIRECTIVE_REGEXP=/(([\w\-]+)(?:\:([^;]+))?;?)/,ALL_OR_NOTHING_ATTRS=makeMap("ngSrc,ngSrcset,src,srcset"),REQUIRE_PREFIX_REGEXP=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,EVENT_HANDLER_ATTR_REGEXP=/^(on[a-z]+|formaction)$/;this.directive=function registerDirective(name,directiveFactory){return assertNotHasOwnProperty(name,"directive"),isString(name)?(assertArg(directiveFactory,"directiveFactory"),hasDirectives.hasOwnProperty(name)||(hasDirectives[name]=[],$provide.factory(name+Suffix,["$injector","$exceptionHandler",function($injector,$exceptionHandler){var directives=[];return forEach(hasDirectives[name],function(directiveFactory,index){try{var directive=$injector.invoke(directiveFactory);isFunction(directive)?directive={compile:valueFn(directive)}:!directive.compile&&directive.link&&(directive.compile=valueFn(directive.link)),directive.priority=directive.priority||0,directive.index=index,directive.name=directive.name||name,directive.require=directive.require||directive.controller&&directive.name,directive.restrict=directive.restrict||"EA",isObject(directive.scope)&&(directive.$$isolateBindings=parseIsolateBindings(directive.scope,directive.name)),directives.push(directive)}catch(e){$exceptionHandler(e)}}),directives}])),hasDirectives[name].push(directiveFactory)):forEach(name,reverseParams(registerDirective)),this},this.aHrefSanitizationWhitelist=function(regexp){return isDefined(regexp)?($$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp),this):$$sanitizeUriProvider.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(regexp){return isDefined(regexp)?($$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp),this):$$sanitizeUriProvider.imgSrcSanitizationWhitelist()};var debugInfoEnabled=!0;this.debugInfoEnabled=function(enabled){return isDefined(enabled)?(debugInfoEnabled=enabled,this):debugInfoEnabled},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function($injector,$interpolate,$exceptionHandler,$templateRequest,$parse,$controller,$rootScope,$document,$sce,$animate,$$sanitizeUri){function safeAddClass($element,className){try{$element.addClass(className)}catch(e){}}function compile($compileNodes,transcludeFn,maxPriority,ignoreDirective,previousCompileContext){$compileNodes instanceof jqLite||($compileNodes=jqLite($compileNodes)),forEach($compileNodes,function(node,index){node.nodeType==NODE_TYPE_TEXT&&node.nodeValue.match(/\S+/)&&($compileNodes[index]=jqLite(node).wrap("<span></span>").parent()[0])});var compositeLinkFn=compileNodes($compileNodes,transcludeFn,$compileNodes,maxPriority,ignoreDirective,previousCompileContext);compile.$$addScopeClass($compileNodes);var namespace=null;return function(scope,cloneConnectFn,options){assertArg(scope,"scope"),options=options||{};var parentBoundTranscludeFn=options.parentBoundTranscludeFn,transcludeControllers=options.transcludeControllers,futureParentElement=options.futureParentElement;parentBoundTranscludeFn&&parentBoundTranscludeFn.$$boundTransclude&&(parentBoundTranscludeFn=parentBoundTranscludeFn.$$boundTransclude),namespace||(namespace=detectNamespaceForChildElements(futureParentElement));var $linkNode;if($linkNode="html"!==namespace?jqLite(wrapTemplate(namespace,jqLite("<div>").append($compileNodes).html())):cloneConnectFn?JQLitePrototype.clone.call($compileNodes):$compileNodes,transcludeControllers)for(var controllerName in transcludeControllers)$linkNode.data("$"+controllerName+"Controller",transcludeControllers[controllerName].instance);return compile.$$addScopeInfo($linkNode,scope),cloneConnectFn&&cloneConnectFn($linkNode,scope),compositeLinkFn&&compositeLinkFn(scope,$linkNode,$linkNode,parentBoundTranscludeFn),$linkNode}}function detectNamespaceForChildElements(parentElement){var node=parentElement&&parentElement[0];return node&&"foreignobject"!==nodeName_(node)&&node.toString().match(/SVG/)?"svg":"html"}function compileNodes(nodeList,transcludeFn,$rootElement,maxPriority,ignoreDirective,previousCompileContext){function compositeLinkFn(scope,nodeList,$rootElement,parentBoundTranscludeFn){var nodeLinkFn,childLinkFn,node,childScope,i,ii,idx,childBoundTranscludeFn,stableNodeList;if(nodeLinkFnFound){var nodeListLength=nodeList.length;for(stableNodeList=new Array(nodeListLength),i=0;i<linkFns.length;i+=3)idx=linkFns[i],stableNodeList[idx]=nodeList[idx]}else stableNodeList=nodeList;for(i=0,ii=linkFns.length;ii>i;)node=stableNodeList[linkFns[i++]],nodeLinkFn=linkFns[i++],childLinkFn=linkFns[i++],nodeLinkFn?(nodeLinkFn.scope?(childScope=scope.$new(),compile.$$addScopeInfo(jqLite(node),childScope)):childScope=scope,childBoundTranscludeFn=nodeLinkFn.transcludeOnThisElement?createBoundTranscludeFn(scope,nodeLinkFn.transclude,parentBoundTranscludeFn,nodeLinkFn.elementTranscludeOnThisElement):!nodeLinkFn.templateOnThisElement&&parentBoundTranscludeFn?parentBoundTranscludeFn:!parentBoundTranscludeFn&&transcludeFn?createBoundTranscludeFn(scope,transcludeFn):null,nodeLinkFn(childLinkFn,childScope,node,$rootElement,childBoundTranscludeFn)):childLinkFn&&childLinkFn(scope,node.childNodes,undefined,parentBoundTranscludeFn)}for(var attrs,directives,nodeLinkFn,childNodes,childLinkFn,linkFnFound,nodeLinkFnFound,linkFns=[],i=0;i<nodeList.length;i++)attrs=new Attributes,directives=collectDirectives(nodeList[i],[],attrs,0===i?maxPriority:undefined,ignoreDirective),nodeLinkFn=directives.length?applyDirectivesToNode(directives,nodeList[i],attrs,transcludeFn,$rootElement,null,[],[],previousCompileContext):null,nodeLinkFn&&nodeLinkFn.scope&&compile.$$addScopeClass(attrs.$$element),childLinkFn=nodeLinkFn&&nodeLinkFn.terminal||!(childNodes=nodeList[i].childNodes)||!childNodes.length?null:compileNodes(childNodes,nodeLinkFn?(nodeLinkFn.transcludeOnThisElement||!nodeLinkFn.templateOnThisElement)&&nodeLinkFn.transclude:transcludeFn),(nodeLinkFn||childLinkFn)&&(linkFns.push(i,nodeLinkFn,childLinkFn),linkFnFound=!0,nodeLinkFnFound=nodeLinkFnFound||nodeLinkFn),previousCompileContext=null;return linkFnFound?compositeLinkFn:null}function createBoundTranscludeFn(scope,transcludeFn,previousBoundTranscludeFn){var boundTranscludeFn=function(transcludedScope,cloneFn,controllers,futureParentElement,containingScope){return transcludedScope||(transcludedScope=scope.$new(!1,containingScope),transcludedScope.$$transcluded=!0),transcludeFn(transcludedScope,cloneFn,{parentBoundTranscludeFn:previousBoundTranscludeFn,transcludeControllers:controllers,futureParentElement:futureParentElement})};return boundTranscludeFn}function collectDirectives(node,directives,attrs,maxPriority,ignoreDirective){var match,className,nodeType=node.nodeType,attrsMap=attrs.$attr;switch(nodeType){case NODE_TYPE_ELEMENT:addDirective(directives,directiveNormalize(nodeName_(node)),"E",maxPriority,ignoreDirective);for(var attr,name,nName,ngAttrName,value,isNgAttr,nAttrs=node.attributes,j=0,jj=nAttrs&&nAttrs.length;jj>j;j++){var attrStartName=!1,attrEndName=!1;attr=nAttrs[j],name=attr.name,value=trim(attr.value),ngAttrName=directiveNormalize(name),(isNgAttr=NG_ATTR_BINDING.test(ngAttrName))&&(name=name.replace(PREFIX_REGEXP,"").substr(8).replace(/_(.)/g,function(match,letter){return letter.toUpperCase()}));var directiveNName=ngAttrName.replace(/(Start|End)$/,"");directiveIsMultiElement(directiveNName)&&ngAttrName===directiveNName+"Start"&&(attrStartName=name,attrEndName=name.substr(0,name.length-5)+"end",name=name.substr(0,name.length-6)),nName=directiveNormalize(name.toLowerCase()),attrsMap[nName]=name,(isNgAttr||!attrs.hasOwnProperty(nName))&&(attrs[nName]=value,getBooleanAttrName(node,nName)&&(attrs[nName]=!0)),addAttrInterpolateDirective(node,directives,value,nName,isNgAttr),addDirective(directives,nName,"A",maxPriority,ignoreDirective,attrStartName,attrEndName)}if(className=node.className,isObject(className)&&(className=className.animVal),isString(className)&&""!==className)for(;match=CLASS_DIRECTIVE_REGEXP.exec(className);)nName=directiveNormalize(match[2]),addDirective(directives,nName,"C",maxPriority,ignoreDirective)&&(attrs[nName]=trim(match[3])),className=className.substr(match.index+match[0].length);break;case NODE_TYPE_TEXT:addTextInterpolateDirective(directives,node.nodeValue);break;case NODE_TYPE_COMMENT:try{match=COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue),match&&(nName=directiveNormalize(match[1]),addDirective(directives,nName,"M",maxPriority,ignoreDirective)&&(attrs[nName]=trim(match[2])))}catch(e){}}return directives.sort(byPriority),directives}function groupScan(node,attrStart,attrEnd){var nodes=[],depth=0;if(attrStart&&node.hasAttribute&&node.hasAttribute(attrStart)){do{if(!node)throw $compileMinErr("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",attrStart,attrEnd);node.nodeType==NODE_TYPE_ELEMENT&&(node.hasAttribute(attrStart)&&depth++,node.hasAttribute(attrEnd)&&depth--),nodes.push(node),node=node.nextSibling}while(depth>0)}else nodes.push(node);return jqLite(nodes)}function groupElementsLinkFnWrapper(linkFn,attrStart,attrEnd){return function(scope,element,attrs,controllers,transcludeFn){return element=groupScan(element[0],attrStart,attrEnd),linkFn(scope,element,attrs,controllers,transcludeFn)}}function applyDirectivesToNode(directives,compileNode,templateAttrs,transcludeFn,jqCollection,originalReplaceDirective,preLinkFns,postLinkFns,previousCompileContext){function addLinkFns(pre,post,attrStart,attrEnd){pre&&(attrStart&&(pre=groupElementsLinkFnWrapper(pre,attrStart,attrEnd)),pre.require=directive.require,pre.directiveName=directiveName,(newIsolateScopeDirective===directive||directive.$$isolateScope)&&(pre=cloneAndAnnotateFn(pre,{isolateScope:!0})),preLinkFns.push(pre)),post&&(attrStart&&(post=groupElementsLinkFnWrapper(post,attrStart,attrEnd)),post.require=directive.require,post.directiveName=directiveName,(newIsolateScopeDirective===directive||directive.$$isolateScope)&&(post=cloneAndAnnotateFn(post,{isolateScope:!0})),postLinkFns.push(post))}function getControllers(directiveName,require,$element,elementControllers){var value,match,retrievalMethod="data",optional=!1,$searchElement=$element;if(isString(require)){if(match=require.match(REQUIRE_PREFIX_REGEXP),require=require.substring(match[0].length),match[3]&&(match[1]?match[3]=null:match[1]=match[3]),"^"===match[1]?retrievalMethod="inheritedData":"^^"===match[1]&&(retrievalMethod="inheritedData",$searchElement=$element.parent()),"?"===match[2]&&(optional=!0),value=null,elementControllers&&"data"===retrievalMethod&&(value=elementControllers[require])&&(value=value.instance),value=value||$searchElement[retrievalMethod]("$"+require+"Controller"),!value&&!optional)throw $compileMinErr("ctreq","Controller '{0}', required by directive '{1}', can't be found!",require,directiveName);return value||null}return isArray(require)&&(value=[],forEach(require,function(require){value.push(getControllers(directiveName,require,$element,elementControllers))})),value}function nodeLinkFn(childLinkFn,scope,linkNode,$rootElement,boundTranscludeFn){function controllersBoundTransclude(scope,cloneAttachFn,futureParentElement){var transcludeControllers;return isScope(scope)||(futureParentElement=cloneAttachFn,cloneAttachFn=scope,scope=undefined),hasElementTranscludeDirective&&(transcludeControllers=elementControllers),futureParentElement||(futureParentElement=hasElementTranscludeDirective?$element.parent():$element),boundTranscludeFn(scope,cloneAttachFn,transcludeControllers,futureParentElement,scopeToChild)}var i,ii,linkFn,controller,isolateScope,elementControllers,transcludeFn,$element,attrs;if(compileNode===linkNode?(attrs=templateAttrs,$element=templateAttrs.$$element):($element=jqLite(linkNode),attrs=new Attributes($element,templateAttrs)),newIsolateScopeDirective&&(isolateScope=scope.$new(!0)),boundTranscludeFn&&(transcludeFn=controllersBoundTransclude,transcludeFn.$$boundTransclude=boundTranscludeFn),controllerDirectives&&(controllers={},elementControllers={},forEach(controllerDirectives,function(directive){var controllerInstance,locals={$scope:directive===newIsolateScopeDirective||directive.$$isolateScope?isolateScope:scope,$element:$element,$attrs:attrs,$transclude:transcludeFn};controller=directive.controller,"@"==controller&&(controller=attrs[directive.name]),controllerInstance=$controller(controller,locals,!0,directive.controllerAs),elementControllers[directive.name]=controllerInstance,hasElementTranscludeDirective||$element.data("$"+directive.name+"Controller",controllerInstance.instance),controllers[directive.name]=controllerInstance})),newIsolateScopeDirective){compile.$$addScopeInfo($element,isolateScope,!0,!(templateDirective&&(templateDirective===newIsolateScopeDirective||templateDirective===newIsolateScopeDirective.$$originalDirective))),compile.$$addScopeClass($element,!0);var isolateScopeController=controllers&&controllers[newIsolateScopeDirective.name],isolateBindingContext=isolateScope;isolateScopeController&&isolateScopeController.identifier&&newIsolateScopeDirective.bindToController===!0&&(isolateBindingContext=isolateScopeController.instance),forEach(isolateScope.$$isolateBindings=newIsolateScopeDirective.$$isolateBindings,function(definition,scopeName){var lastValue,parentGet,parentSet,compare,attrName=definition.attrName,optional=definition.optional,mode=definition.mode;switch(mode){case"@":attrs.$observe(attrName,function(value){isolateBindingContext[scopeName]=value}),attrs.$$observers[attrName].$$scope=scope,attrs[attrName]&&(isolateBindingContext[scopeName]=$interpolate(attrs[attrName])(scope));break;case"=":if(optional&&!attrs[attrName])return;parentGet=$parse(attrs[attrName]),compare=parentGet.literal?equals:function(a,b){return a===b||a!==a&&b!==b},parentSet=parentGet.assign||function(){throw lastValue=isolateBindingContext[scopeName]=parentGet(scope),$compileMinErr("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",attrs[attrName],newIsolateScopeDirective.name)},lastValue=isolateBindingContext[scopeName]=parentGet(scope);var parentValueWatch=function(parentValue){return compare(parentValue,isolateBindingContext[scopeName])||(compare(parentValue,lastValue)?parentSet(scope,parentValue=isolateBindingContext[scopeName]):isolateBindingContext[scopeName]=parentValue),lastValue=parentValue};parentValueWatch.$stateful=!0;var unwatch;unwatch=definition.collection?scope.$watchCollection(attrs[attrName],parentValueWatch):scope.$watch($parse(attrs[attrName],parentValueWatch),null,parentGet.literal),isolateScope.$on("$destroy",unwatch);break;case"&":parentGet=$parse(attrs[attrName]),isolateBindingContext[scopeName]=function(locals){return parentGet(scope,locals)}}})}for(controllers&&(forEach(controllers,function(controller){controller()}),controllers=null),i=0,ii=preLinkFns.length;ii>i;i++)linkFn=preLinkFns[i],invokeLinkFn(linkFn,linkFn.isolateScope?isolateScope:scope,$element,attrs,linkFn.require&&getControllers(linkFn.directiveName,linkFn.require,$element,elementControllers),transcludeFn);var scopeToChild=scope;for(newIsolateScopeDirective&&(newIsolateScopeDirective.template||null===newIsolateScopeDirective.templateUrl)&&(scopeToChild=isolateScope),childLinkFn&&childLinkFn(scopeToChild,linkNode.childNodes,undefined,boundTranscludeFn),i=postLinkFns.length-1;i>=0;i--)linkFn=postLinkFns[i],invokeLinkFn(linkFn,linkFn.isolateScope?isolateScope:scope,$element,attrs,linkFn.require&&getControllers(linkFn.directiveName,linkFn.require,$element,elementControllers),transcludeFn)}previousCompileContext=previousCompileContext||{};for(var newScopeDirective,controllers,directive,directiveName,$template,linkFn,directiveValue,terminalPriority=-Number.MAX_VALUE,controllerDirectives=previousCompileContext.controllerDirectives,newIsolateScopeDirective=previousCompileContext.newIsolateScopeDirective,templateDirective=previousCompileContext.templateDirective,nonTlbTranscludeDirective=previousCompileContext.nonTlbTranscludeDirective,hasTranscludeDirective=!1,hasTemplate=!1,hasElementTranscludeDirective=previousCompileContext.hasElementTranscludeDirective,$compileNode=templateAttrs.$$element=jqLite(compileNode),replaceDirective=originalReplaceDirective,childTranscludeFn=transcludeFn,i=0,ii=directives.length;ii>i;i++){directive=directives[i];var attrStart=directive.$$start,attrEnd=directive.$$end;if(attrStart&&($compileNode=groupScan(compileNode,attrStart,attrEnd)),$template=undefined,terminalPriority>directive.priority)break;if((directiveValue=directive.scope)&&(directive.templateUrl||(isObject(directiveValue)?(assertNoDuplicate("new/isolated scope",newIsolateScopeDirective||newScopeDirective,directive,$compileNode),newIsolateScopeDirective=directive):assertNoDuplicate("new/isolated scope",newIsolateScopeDirective,directive,$compileNode)),newScopeDirective=newScopeDirective||directive),directiveName=directive.name,!directive.templateUrl&&directive.controller&&(directiveValue=directive.controller,controllerDirectives=controllerDirectives||{},assertNoDuplicate("'"+directiveName+"' controller",controllerDirectives[directiveName],directive,$compileNode),controllerDirectives[directiveName]=directive),(directiveValue=directive.transclude)&&(hasTranscludeDirective=!0,directive.$$tlb||(assertNoDuplicate("transclusion",nonTlbTranscludeDirective,directive,$compileNode),nonTlbTranscludeDirective=directive),"element"==directiveValue?(hasElementTranscludeDirective=!0,terminalPriority=directive.priority,$template=$compileNode,$compileNode=templateAttrs.$$element=jqLite(document.createComment(" "+directiveName+": "+templateAttrs[directiveName]+" ")),compileNode=$compileNode[0],replaceWith(jqCollection,sliceArgs($template),compileNode),childTranscludeFn=compile($template,transcludeFn,terminalPriority,replaceDirective&&replaceDirective.name,{nonTlbTranscludeDirective:nonTlbTranscludeDirective})):($template=jqLite(jqLiteClone(compileNode)).contents(),$compileNode.empty(),childTranscludeFn=compile($template,transcludeFn))),directive.template)if(hasTemplate=!0,assertNoDuplicate("template",templateDirective,directive,$compileNode),templateDirective=directive,directiveValue=isFunction(directive.template)?directive.template($compileNode,templateAttrs):directive.template,directiveValue=denormalizeTemplate(directiveValue),directive.replace){if(replaceDirective=directive,$template=jqLiteIsTextNode(directiveValue)?[]:removeComments(wrapTemplate(directive.templateNamespace,trim(directiveValue))),compileNode=$template[0],1!=$template.length||compileNode.nodeType!==NODE_TYPE_ELEMENT)throw $compileMinErr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",directiveName,"");
replaceWith(jqCollection,$compileNode,compileNode);var newTemplateAttrs={$attr:{}},templateDirectives=collectDirectives(compileNode,[],newTemplateAttrs),unprocessedDirectives=directives.splice(i+1,directives.length-(i+1));newIsolateScopeDirective&&markDirectivesAsIsolate(templateDirectives),directives=directives.concat(templateDirectives).concat(unprocessedDirectives),mergeTemplateAttributes(templateAttrs,newTemplateAttrs),ii=directives.length}else $compileNode.html(directiveValue);if(directive.templateUrl)hasTemplate=!0,assertNoDuplicate("template",templateDirective,directive,$compileNode),templateDirective=directive,directive.replace&&(replaceDirective=directive),nodeLinkFn=compileTemplateUrl(directives.splice(i,directives.length-i),$compileNode,templateAttrs,jqCollection,hasTranscludeDirective&&childTranscludeFn,preLinkFns,postLinkFns,{controllerDirectives:controllerDirectives,newIsolateScopeDirective:newIsolateScopeDirective,templateDirective:templateDirective,nonTlbTranscludeDirective:nonTlbTranscludeDirective}),ii=directives.length;else if(directive.compile)try{linkFn=directive.compile($compileNode,templateAttrs,childTranscludeFn),isFunction(linkFn)?addLinkFns(null,linkFn,attrStart,attrEnd):linkFn&&addLinkFns(linkFn.pre,linkFn.post,attrStart,attrEnd)}catch(e){$exceptionHandler(e,startingTag($compileNode))}directive.terminal&&(nodeLinkFn.terminal=!0,terminalPriority=Math.max(terminalPriority,directive.priority))}return nodeLinkFn.scope=newScopeDirective&&newScopeDirective.scope===!0,nodeLinkFn.transcludeOnThisElement=hasTranscludeDirective,nodeLinkFn.elementTranscludeOnThisElement=hasElementTranscludeDirective,nodeLinkFn.templateOnThisElement=hasTemplate,nodeLinkFn.transclude=childTranscludeFn,previousCompileContext.hasElementTranscludeDirective=hasElementTranscludeDirective,nodeLinkFn}function markDirectivesAsIsolate(directives){for(var j=0,jj=directives.length;jj>j;j++)directives[j]=inherit(directives[j],{$$isolateScope:!0})}function addDirective(tDirectives,name,location,maxPriority,ignoreDirective,startAttrName,endAttrName){if(name===ignoreDirective)return null;var match=null;if(hasDirectives.hasOwnProperty(name))for(var directive,directives=$injector.get(name+Suffix),i=0,ii=directives.length;ii>i;i++)try{directive=directives[i],(maxPriority===undefined||maxPriority>directive.priority)&&-1!=directive.restrict.indexOf(location)&&(startAttrName&&(directive=inherit(directive,{$$start:startAttrName,$$end:endAttrName})),tDirectives.push(directive),match=directive)}catch(e){$exceptionHandler(e)}return match}function directiveIsMultiElement(name){if(hasDirectives.hasOwnProperty(name))for(var directive,directives=$injector.get(name+Suffix),i=0,ii=directives.length;ii>i;i++)if(directive=directives[i],directive.multiElement)return!0;return!1}function mergeTemplateAttributes(dst,src){var srcAttr=src.$attr,dstAttr=dst.$attr,$element=dst.$$element;forEach(dst,function(value,key){"$"!=key.charAt(0)&&(src[key]&&src[key]!==value&&(value+=("style"===key?";":" ")+src[key]),dst.$set(key,value,!0,srcAttr[key]))}),forEach(src,function(value,key){"class"==key?(safeAddClass($element,value),dst["class"]=(dst["class"]?dst["class"]+" ":"")+value):"style"==key?($element.attr("style",$element.attr("style")+";"+value),dst.style=(dst.style?dst.style+";":"")+value):"$"==key.charAt(0)||dst.hasOwnProperty(key)||(dst[key]=value,dstAttr[key]=srcAttr[key])})}function compileTemplateUrl(directives,$compileNode,tAttrs,$rootElement,childTranscludeFn,preLinkFns,postLinkFns,previousCompileContext){var afterTemplateNodeLinkFn,afterTemplateChildLinkFn,linkQueue=[],beforeTemplateCompileNode=$compileNode[0],origAsyncDirective=directives.shift(),derivedSyncDirective=extend({},origAsyncDirective,{templateUrl:null,transclude:null,replace:null,$$originalDirective:origAsyncDirective}),templateUrl=isFunction(origAsyncDirective.templateUrl)?origAsyncDirective.templateUrl($compileNode,tAttrs):origAsyncDirective.templateUrl,templateNamespace=origAsyncDirective.templateNamespace;return $compileNode.empty(),$templateRequest($sce.getTrustedResourceUrl(templateUrl)).then(function(content){var compileNode,tempTemplateAttrs,$template,childBoundTranscludeFn;if(content=denormalizeTemplate(content),origAsyncDirective.replace){if($template=jqLiteIsTextNode(content)?[]:removeComments(wrapTemplate(templateNamespace,trim(content))),compileNode=$template[0],1!=$template.length||compileNode.nodeType!==NODE_TYPE_ELEMENT)throw $compileMinErr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",origAsyncDirective.name,templateUrl);tempTemplateAttrs={$attr:{}},replaceWith($rootElement,$compileNode,compileNode);var templateDirectives=collectDirectives(compileNode,[],tempTemplateAttrs);isObject(origAsyncDirective.scope)&&markDirectivesAsIsolate(templateDirectives),directives=templateDirectives.concat(directives),mergeTemplateAttributes(tAttrs,tempTemplateAttrs)}else compileNode=beforeTemplateCompileNode,$compileNode.html(content);for(directives.unshift(derivedSyncDirective),afterTemplateNodeLinkFn=applyDirectivesToNode(directives,compileNode,tAttrs,childTranscludeFn,$compileNode,origAsyncDirective,preLinkFns,postLinkFns,previousCompileContext),forEach($rootElement,function(node,i){node==compileNode&&($rootElement[i]=$compileNode[0])}),afterTemplateChildLinkFn=compileNodes($compileNode[0].childNodes,childTranscludeFn);linkQueue.length;){var scope=linkQueue.shift(),beforeTemplateLinkNode=linkQueue.shift(),linkRootElement=linkQueue.shift(),boundTranscludeFn=linkQueue.shift(),linkNode=$compileNode[0];if(!scope.$$destroyed){if(beforeTemplateLinkNode!==beforeTemplateCompileNode){var oldClasses=beforeTemplateLinkNode.className;previousCompileContext.hasElementTranscludeDirective&&origAsyncDirective.replace||(linkNode=jqLiteClone(compileNode)),replaceWith(linkRootElement,jqLite(beforeTemplateLinkNode),linkNode),safeAddClass(jqLite(linkNode),oldClasses)}childBoundTranscludeFn=afterTemplateNodeLinkFn.transcludeOnThisElement?createBoundTranscludeFn(scope,afterTemplateNodeLinkFn.transclude,boundTranscludeFn):boundTranscludeFn,afterTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,linkNode,$rootElement,childBoundTranscludeFn)}}linkQueue=null}),function(ignoreChildLinkFn,scope,node,rootElement,boundTranscludeFn){var childBoundTranscludeFn=boundTranscludeFn;scope.$$destroyed||(linkQueue?linkQueue.push(scope,node,rootElement,childBoundTranscludeFn):(afterTemplateNodeLinkFn.transcludeOnThisElement&&(childBoundTranscludeFn=createBoundTranscludeFn(scope,afterTemplateNodeLinkFn.transclude,boundTranscludeFn)),afterTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,node,rootElement,childBoundTranscludeFn)))}}function byPriority(a,b){var diff=b.priority-a.priority;return 0!==diff?diff:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function assertNoDuplicate(what,previousDirective,directive,element){if(previousDirective)throw $compileMinErr("multidir","Multiple directives [{0}, {1}] asking for {2} on: {3}",previousDirective.name,directive.name,what,startingTag(element))}function addTextInterpolateDirective(directives,text){var interpolateFn=$interpolate(text,!0);interpolateFn&&directives.push({priority:0,compile:function(templateNode){var templateNodeParent=templateNode.parent(),hasCompileParent=!!templateNodeParent.length;return hasCompileParent&&compile.$$addBindingClass(templateNodeParent),function(scope,node){var parent=node.parent();hasCompileParent||compile.$$addBindingClass(parent),compile.$$addBindingInfo(parent,interpolateFn.expressions),scope.$watch(interpolateFn,function(value){node[0].nodeValue=value})}}})}function wrapTemplate(type,template){switch(type=lowercase(type||"html")){case"svg":case"math":var wrapper=document.createElement("div");return wrapper.innerHTML="<"+type+">"+template+"</"+type+">",wrapper.childNodes[0].childNodes;default:return template}}function getTrustedContext(node,attrNormalizedName){if("srcdoc"==attrNormalizedName)return $sce.HTML;var tag=nodeName_(node);return"xlinkHref"==attrNormalizedName||"form"==tag&&"action"==attrNormalizedName||"img"!=tag&&("src"==attrNormalizedName||"ngSrc"==attrNormalizedName)?$sce.RESOURCE_URL:void 0}function addAttrInterpolateDirective(node,directives,value,name,allOrNothing){var trustedContext=getTrustedContext(node,name);allOrNothing=ALL_OR_NOTHING_ATTRS[name]||allOrNothing;var interpolateFn=$interpolate(value,!0,trustedContext,allOrNothing);if(interpolateFn){if("multiple"===name&&"select"===nodeName_(node))throw $compileMinErr("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",startingTag(node));directives.push({priority:100,compile:function(){return{pre:function(scope,element,attr){var $$observers=attr.$$observers||(attr.$$observers={});if(EVENT_HANDLER_ATTR_REGEXP.test(name))throw $compileMinErr("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var newValue=attr[name];newValue!==value&&(interpolateFn=newValue&&$interpolate(newValue,!0,trustedContext,allOrNothing),value=newValue),interpolateFn&&(attr[name]=interpolateFn(scope),($$observers[name]||($$observers[name]=[])).$$inter=!0,(attr.$$observers&&attr.$$observers[name].$$scope||scope).$watch(interpolateFn,function(newValue,oldValue){"class"===name&&newValue!=oldValue?attr.$updateClass(newValue,oldValue):attr.$set(name,newValue)}))}}}})}}function replaceWith($rootElement,elementsToRemove,newNode){var i,ii,firstElementToRemove=elementsToRemove[0],removeCount=elementsToRemove.length,parent=firstElementToRemove.parentNode;if($rootElement)for(i=0,ii=$rootElement.length;ii>i;i++)if($rootElement[i]==firstElementToRemove){$rootElement[i++]=newNode;for(var j=i,j2=j+removeCount-1,jj=$rootElement.length;jj>j;j++,j2++)jj>j2?$rootElement[j]=$rootElement[j2]:delete $rootElement[j];$rootElement.length-=removeCount-1,$rootElement.context===firstElementToRemove&&($rootElement.context=newNode);break}parent&&parent.replaceChild(newNode,firstElementToRemove);var fragment=document.createDocumentFragment();fragment.appendChild(firstElementToRemove),jqLite(newNode).data(jqLite(firstElementToRemove).data()),jQuery?(skipDestroyOnNextJQueryCleanData=!0,jQuery.cleanData([firstElementToRemove])):delete jqLite.cache[firstElementToRemove[jqLite.expando]];for(var k=1,kk=elementsToRemove.length;kk>k;k++){var element=elementsToRemove[k];jqLite(element).remove(),fragment.appendChild(element),delete elementsToRemove[k]}elementsToRemove[0]=newNode,elementsToRemove.length=1}function cloneAndAnnotateFn(fn,annotation){return extend(function(){return fn.apply(null,arguments)},fn,annotation)}function invokeLinkFn(linkFn,scope,$element,attrs,controllers,transcludeFn){try{linkFn(scope,$element,attrs,controllers,transcludeFn)}catch(e){$exceptionHandler(e,startingTag($element))}}var Attributes=function(element,attributesToCopy){if(attributesToCopy){var i,l,key,keys=Object.keys(attributesToCopy);for(i=0,l=keys.length;l>i;i++)key=keys[i],this[key]=attributesToCopy[key]}else this.$attr={};this.$$element=element};Attributes.prototype={$normalize:directiveNormalize,$addClass:function(classVal){classVal&&classVal.length>0&&$animate.addClass(this.$$element,classVal)},$removeClass:function(classVal){classVal&&classVal.length>0&&$animate.removeClass(this.$$element,classVal)},$updateClass:function(newClasses,oldClasses){var toAdd=tokenDifference(newClasses,oldClasses);toAdd&&toAdd.length&&$animate.addClass(this.$$element,toAdd);var toRemove=tokenDifference(oldClasses,newClasses);toRemove&&toRemove.length&&$animate.removeClass(this.$$element,toRemove)},$set:function(key,value,writeAttr,attrName){var nodeName,node=this.$$element[0],booleanKey=getBooleanAttrName(node,key),aliasedKey=getAliasedAttrName(node,key),observer=key;if(booleanKey?(this.$$element.prop(key,value),attrName=booleanKey):aliasedKey&&(this[aliasedKey]=value,observer=aliasedKey),this[key]=value,attrName?this.$attr[key]=attrName:(attrName=this.$attr[key],attrName||(this.$attr[key]=attrName=snake_case(key,"-"))),nodeName=nodeName_(this.$$element),"a"===nodeName&&"href"===key||"img"===nodeName&&"src"===key)this[key]=value=$$sanitizeUri(value,"src"===key);else if("img"===nodeName&&"srcset"===key){for(var result="",trimmedSrcset=trim(value),srcPattern=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,pattern=/\s/.test(trimmedSrcset)?srcPattern:/(,)/,rawUris=trimmedSrcset.split(pattern),nbrUrisWith2parts=Math.floor(rawUris.length/2),i=0;nbrUrisWith2parts>i;i++){var innerIdx=2*i;result+=$$sanitizeUri(trim(rawUris[innerIdx]),!0),result+=" "+trim(rawUris[innerIdx+1])}var lastTuple=trim(rawUris[2*i]).split(/\s/);result+=$$sanitizeUri(trim(lastTuple[0]),!0),2===lastTuple.length&&(result+=" "+trim(lastTuple[1])),this[key]=value=result}writeAttr!==!1&&(null===value||value===undefined?this.$$element.removeAttr(attrName):this.$$element.attr(attrName,value));var $$observers=this.$$observers;$$observers&&forEach($$observers[observer],function(fn){try{fn(value)}catch(e){$exceptionHandler(e)}})},$observe:function(key,fn){var attrs=this,$$observers=attrs.$$observers||(attrs.$$observers=createMap()),listeners=$$observers[key]||($$observers[key]=[]);return listeners.push(fn),$rootScope.$evalAsync(function(){!listeners.$$inter&&attrs.hasOwnProperty(key)&&fn(attrs[key])}),function(){arrayRemove(listeners,fn)}}};var startSymbol=$interpolate.startSymbol(),endSymbol=$interpolate.endSymbol(),denormalizeTemplate="{{"==startSymbol||"}}"==endSymbol?identity:function(template){return template.replace(/\{\{/g,startSymbol).replace(/}}/g,endSymbol)},NG_ATTR_BINDING=/^ngAttr[A-Z]/;return compile.$$addBindingInfo=debugInfoEnabled?function($element,binding){var bindings=$element.data("$binding")||[];isArray(binding)?bindings=bindings.concat(binding):bindings.push(binding),$element.data("$binding",bindings)}:noop,compile.$$addBindingClass=debugInfoEnabled?function($element){safeAddClass($element,"ng-binding")}:noop,compile.$$addScopeInfo=debugInfoEnabled?function($element,scope,isolated,noTemplate){var dataName=isolated?noTemplate?"$isolateScopeNoTemplate":"$isolateScope":"$scope";$element.data(dataName,scope)}:noop,compile.$$addScopeClass=debugInfoEnabled?function($element,isolated){safeAddClass($element,isolated?"ng-isolate-scope":"ng-scope")}:noop,compile}]}function directiveNormalize(name){return camelCase(name.replace(PREFIX_REGEXP,""))}function tokenDifference(str1,str2){var values="",tokens1=str1.split(/\s+/),tokens2=str2.split(/\s+/);outer:for(var i=0;i<tokens1.length;i++){for(var token=tokens1[i],j=0;j<tokens2.length;j++)if(token==tokens2[j])continue outer;values+=(values.length>0?" ":"")+token}return values}function removeComments(jqNodes){jqNodes=jqLite(jqNodes);var i=jqNodes.length;if(1>=i)return jqNodes;for(;i--;){var node=jqNodes[i];node.nodeType===NODE_TYPE_COMMENT&&splice.call(jqNodes,i,1)}return jqNodes}function $ControllerProvider(){var controllers={},globals=!1,CNTRL_REG=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(name,constructor){assertNotHasOwnProperty(name,"controller"),isObject(name)?extend(controllers,name):controllers[name]=constructor},this.allowGlobals=function(){globals=!0},this.$get=["$injector","$window",function($injector,$window){function addIdentifier(locals,identifier,instance,name){if(!locals||!isObject(locals.$scope))throw minErr("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",name,identifier);locals.$scope[identifier]=instance}return function(expression,locals,later,ident){var instance,match,constructor,identifier;if(later=later===!0,ident&&isString(ident)&&(identifier=ident),isString(expression)&&(match=expression.match(CNTRL_REG),constructor=match[1],identifier=identifier||match[3],expression=controllers.hasOwnProperty(constructor)?controllers[constructor]:getter(locals.$scope,constructor,!0)||(globals?getter($window,constructor,!0):undefined),assertArgFn(expression,constructor,!0)),later){var controllerPrototype=(isArray(expression)?expression[expression.length-1]:expression).prototype;return instance=Object.create(controllerPrototype||null),identifier&&addIdentifier(locals,identifier,instance,constructor||expression.name),extend(function(){return $injector.invoke(expression,instance,locals,constructor),instance},{instance:instance,identifier:identifier})}return instance=$injector.instantiate(expression,locals,constructor),identifier&&addIdentifier(locals,identifier,instance,constructor||expression.name),instance}}]}function $DocumentProvider(){this.$get=["$window",function(window){return jqLite(window.document)}]}function $ExceptionHandlerProvider(){this.$get=["$log",function($log){return function(){$log.error.apply($log,arguments)}}]}function defaultHttpResponseTransform(data,headers){if(isString(data)){var tempData=data.replace(JSON_PROTECTION_PREFIX,"").trim();if(tempData){var contentType=headers("Content-Type");(contentType&&0===contentType.indexOf(APPLICATION_JSON)||isJsonLike(tempData))&&(data=fromJson(tempData))}}return data}function isJsonLike(str){var jsonStart=str.match(JSON_START);return jsonStart&&JSON_ENDS[jsonStart[0]].test(str)}function parseHeaders(headers){var key,val,i,parsed=createMap();return headers?(forEach(headers.split("\n"),function(line){i=line.indexOf(":"),key=lowercase(trim(line.substr(0,i))),val=trim(line.substr(i+1)),key&&(parsed[key]=parsed[key]?parsed[key]+", "+val:val)}),parsed):parsed}function headersGetter(headers){var headersObj=isObject(headers)?headers:undefined;return function(name){if(headersObj||(headersObj=parseHeaders(headers)),name){var value=headersObj[lowercase(name)];return void 0===value&&(value=null),value}return headersObj}}function transformData(data,headers,status,fns){return isFunction(fns)?fns(data,headers,status):(forEach(fns,function(fn){data=fn(data,headers,status)}),data)}function isSuccess(status){return status>=200&&300>status}function $HttpProvider(){var defaults=this.defaults={transformResponse:[defaultHttpResponseTransform],transformRequest:[function(d){return!isObject(d)||isFile(d)||isBlob(d)||isFormData(d)?d:toJson(d)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:shallowCopy(CONTENT_TYPE_APPLICATION_JSON),put:shallowCopy(CONTENT_TYPE_APPLICATION_JSON),patch:shallowCopy(CONTENT_TYPE_APPLICATION_JSON)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},useApplyAsync=!1;this.useApplyAsync=function(value){return isDefined(value)?(useApplyAsync=!!value,this):useApplyAsync};var interceptorFactories=this.interceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function($httpBackend,$browser,$cacheFactory,$rootScope,$q,$injector){function $http(requestConfig){function transformResponse(response){var resp=extend({},response);return resp.data=response.data?transformData(response.data,response.headers,response.status,config.transformResponse):response.data,isSuccess(response.status)?resp:$q.reject(resp)}function executeHeaderFns(headers){var headerContent,processedHeaders={};return forEach(headers,function(headerFn,header){isFunction(headerFn)?(headerContent=headerFn(),null!=headerContent&&(processedHeaders[header]=headerContent)):processedHeaders[header]=headerFn}),processedHeaders}function mergeHeaders(config){var defHeaderName,lowercaseDefHeaderName,reqHeaderName,defHeaders=defaults.headers,reqHeaders=extend({},config.headers);defHeaders=extend({},defHeaders.common,defHeaders[lowercase(config.method)]);defaultHeadersIteration:for(defHeaderName in defHeaders){lowercaseDefHeaderName=lowercase(defHeaderName);for(reqHeaderName in reqHeaders)if(lowercase(reqHeaderName)===lowercaseDefHeaderName)continue defaultHeadersIteration;reqHeaders[defHeaderName]=defHeaders[defHeaderName]}return executeHeaderFns(reqHeaders)}if(!angular.isObject(requestConfig))throw minErr("$http")("badreq","Http request configuration must be an object. Received: {0}",requestConfig);var config=extend({method:"get",transformRequest:defaults.transformRequest,transformResponse:defaults.transformResponse},requestConfig);config.headers=mergeHeaders(requestConfig),config.method=uppercase(config.method);var serverRequest=function(config){var headers=config.headers,reqData=transformData(config.data,headersGetter(headers),undefined,config.transformRequest);return isUndefined(reqData)&&forEach(headers,function(value,header){"content-type"===lowercase(header)&&delete headers[header]}),isUndefined(config.withCredentials)&&!isUndefined(defaults.withCredentials)&&(config.withCredentials=defaults.withCredentials),sendReq(config,reqData).then(transformResponse,transformResponse)},chain=[serverRequest,undefined],promise=$q.when(config);for(forEach(reversedInterceptors,function(interceptor){(interceptor.request||interceptor.requestError)&&chain.unshift(interceptor.request,interceptor.requestError),(interceptor.response||interceptor.responseError)&&chain.push(interceptor.response,interceptor.responseError)});chain.length;){var thenFn=chain.shift(),rejectFn=chain.shift();promise=promise.then(thenFn,rejectFn)}return promise.success=function(fn){return promise.then(function(response){fn(response.data,response.status,response.headers,config)}),promise},promise.error=function(fn){return promise.then(null,function(response){fn(response.data,response.status,response.headers,config)}),promise},promise}function createShortMethods(){forEach(arguments,function(name){$http[name]=function(url,config){return $http(extend(config||{},{method:name,url:url}))}})}function createShortMethodsWithData(){forEach(arguments,function(name){$http[name]=function(url,data,config){return $http(extend(config||{},{method:name,url:url,data:data}))}})}function sendReq(config,reqData){function done(status,response,headersString,statusText){function resolveHttpPromise(){resolvePromise(response,status,headersString,statusText)}cache&&(isSuccess(status)?cache.put(url,[status,response,parseHeaders(headersString),statusText]):cache.remove(url)),useApplyAsync?$rootScope.$applyAsync(resolveHttpPromise):(resolveHttpPromise(),$rootScope.$$phase||$rootScope.$apply())}function resolvePromise(response,status,headers,statusText){status=Math.max(status,0),(isSuccess(status)?deferred.resolve:deferred.reject)({data:response,status:status,headers:headersGetter(headers),config:config,statusText:statusText})}function resolvePromiseWithResult(result){resolvePromise(result.data,result.status,shallowCopy(result.headers()),result.statusText)}function removePendingReq(){var idx=$http.pendingRequests.indexOf(config);-1!==idx&&$http.pendingRequests.splice(idx,1)}var cache,cachedResp,deferred=$q.defer(),promise=deferred.promise,reqHeaders=config.headers,url=buildUrl(config.url,config.params);if($http.pendingRequests.push(config),promise.then(removePendingReq,removePendingReq),!config.cache&&!defaults.cache||config.cache===!1||"GET"!==config.method&&"JSONP"!==config.method||(cache=isObject(config.cache)?config.cache:isObject(defaults.cache)?defaults.cache:defaultCache),cache&&(cachedResp=cache.get(url),isDefined(cachedResp)?isPromiseLike(cachedResp)?cachedResp.then(resolvePromiseWithResult,resolvePromiseWithResult):isArray(cachedResp)?resolvePromise(cachedResp[1],cachedResp[0],shallowCopy(cachedResp[2]),cachedResp[3]):resolvePromise(cachedResp,200,{},"OK"):cache.put(url,promise)),isUndefined(cachedResp)){var xsrfValue=urlIsSameOrigin(config.url)?$browser.cookies()[config.xsrfCookieName||defaults.xsrfCookieName]:undefined;xsrfValue&&(reqHeaders[config.xsrfHeaderName||defaults.xsrfHeaderName]=xsrfValue),$httpBackend(config.method,url,reqData,done,reqHeaders,config.timeout,config.withCredentials,config.responseType)}return promise}function buildUrl(url,params){if(!params)return url;var parts=[];return forEachSorted(params,function(value,key){null===value||isUndefined(value)||(isArray(value)||(value=[value]),forEach(value,function(v){isObject(v)&&(v=isDate(v)?v.toISOString():toJson(v)),parts.push(encodeUriQuery(key)+"="+encodeUriQuery(v))}))}),parts.length>0&&(url+=(-1==url.indexOf("?")?"?":"&")+parts.join("&")),url}var defaultCache=$cacheFactory("$http"),reversedInterceptors=[];return forEach(interceptorFactories,function(interceptorFactory){reversedInterceptors.unshift(isString(interceptorFactory)?$injector.get(interceptorFactory):$injector.invoke(interceptorFactory))}),$http.pendingRequests=[],createShortMethods("get","delete","head","jsonp"),createShortMethodsWithData("post","put","patch"),$http.defaults=defaults,$http}]}function createXhr(){return new window.XMLHttpRequest}function $HttpBackendProvider(){this.$get=["$browser","$window","$document",function($browser,$window,$document){return createHttpBackend($browser,createXhr,$browser.defer,$window.angular.callbacks,$document[0])}]}function createHttpBackend($browser,createXhr,$browserDefer,callbacks,rawDocument){function jsonpReq(url,callbackId,done){var script=rawDocument.createElement("script"),callback=null;return script.type="text/javascript",script.src=url,script.async=!0,callback=function(event){removeEventListenerFn(script,"load",callback),removeEventListenerFn(script,"error",callback),rawDocument.body.removeChild(script),script=null;var status=-1,text="unknown";event&&("load"!==event.type||callbacks[callbackId].called||(event={type:"error"}),text=event.type,status="error"===event.type?404:200),done&&done(status,text)},addEventListenerFn(script,"load",callback),addEventListenerFn(script,"error",callback),rawDocument.body.appendChild(script),callback}return function(method,url,post,callback,headers,timeout,withCredentials,responseType){function timeoutRequest(){jsonpDone&&jsonpDone(),xhr&&xhr.abort()}function completeRequest(callback,status,response,headersString,statusText){timeoutId!==undefined&&$browserDefer.cancel(timeoutId),jsonpDone=xhr=null,callback(status,response,headersString,statusText),$browser.$$completeOutstandingRequest(noop)}if($browser.$$incOutstandingRequestCount(),url=url||$browser.url(),"jsonp"==lowercase(method)){var callbackId="_"+(callbacks.counter++).toString(36);callbacks[callbackId]=function(data){callbacks[callbackId].data=data,callbacks[callbackId].called=!0};var jsonpDone=jsonpReq(url.replace("JSON_CALLBACK","angular.callbacks."+callbackId),callbackId,function(status,text){completeRequest(callback,status,callbacks[callbackId].data,"",text),callbacks[callbackId]=noop})}else{var xhr=createXhr();xhr.open(method,url,!0),forEach(headers,function(value,key){isDefined(value)&&xhr.setRequestHeader(key,value)}),xhr.onload=function(){var statusText=xhr.statusText||"",response="response"in xhr?xhr.response:xhr.responseText,status=1223===xhr.status?204:xhr.status;0===status&&(status=response?200:"file"==urlResolve(url).protocol?404:0),completeRequest(callback,status,response,xhr.getAllResponseHeaders(),statusText)};var requestError=function(){completeRequest(callback,-1,null,null,"")};if(xhr.onerror=requestError,xhr.onabort=requestError,withCredentials&&(xhr.withCredentials=!0),responseType)try{xhr.responseType=responseType}catch(e){if("json"!==responseType)throw e}xhr.send(post||null)}if(timeout>0)var timeoutId=$browserDefer(timeoutRequest,timeout);else isPromiseLike(timeout)&&timeout.then(timeoutRequest)}}function $InterpolateProvider(){var startSymbol="{{",endSymbol="}}";this.startSymbol=function(value){return value?(startSymbol=value,this):startSymbol},this.endSymbol=function(value){return value?(endSymbol=value,this):endSymbol},this.$get=["$parse","$exceptionHandler","$sce",function($parse,$exceptionHandler,$sce){function escape(ch){return"\\\\\\"+ch}function $interpolate(text,mustHaveExpression,trustedContext,allOrNothing){function unescapeText(text){return text.replace(escapedStartRegexp,startSymbol).replace(escapedEndRegexp,endSymbol)}function parseStringifyInterceptor(value){try{return value=getValue(value),allOrNothing&&!isDefined(value)?value:stringify(value)}catch(err){var newErr=$interpolateMinErr("interr","Can't interpolate: {0}\n{1}",text,err.toString());$exceptionHandler(newErr)}}allOrNothing=!!allOrNothing;for(var startIndex,endIndex,exp,index=0,expressions=[],parseFns=[],textLength=text.length,concat=[],expressionPositions=[];textLength>index;){if(-1==(startIndex=text.indexOf(startSymbol,index))||-1==(endIndex=text.indexOf(endSymbol,startIndex+startSymbolLength))){index!==textLength&&concat.push(unescapeText(text.substring(index)));break}index!==startIndex&&concat.push(unescapeText(text.substring(index,startIndex))),exp=text.substring(startIndex+startSymbolLength,endIndex),expressions.push(exp),parseFns.push($parse(exp,parseStringifyInterceptor)),index=endIndex+endSymbolLength,expressionPositions.push(concat.length),concat.push("")}if(trustedContext&&concat.length>1)throw $interpolateMinErr("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",text);if(!mustHaveExpression||expressions.length){var compute=function(values){for(var i=0,ii=expressions.length;ii>i;i++){if(allOrNothing&&isUndefined(values[i]))return;concat[expressionPositions[i]]=values[i]}return concat.join("")},getValue=function(value){return trustedContext?$sce.getTrusted(trustedContext,value):$sce.valueOf(value)},stringify=function(value){if(null==value)return"";switch(typeof value){case"string":break;case"number":value=""+value;break;default:value=toJson(value)}return value};return extend(function(context){var i=0,ii=expressions.length,values=new Array(ii);try{for(;ii>i;i++)values[i]=parseFns[i](context);return compute(values)}catch(err){var newErr=$interpolateMinErr("interr","Can't interpolate: {0}\n{1}",text,err.toString());$exceptionHandler(newErr)}},{exp:text,expressions:expressions,$$watchDelegate:function(scope,listener,objectEquality){var lastValue;return scope.$watchGroup(parseFns,function(values,oldValues){var currValue=compute(values);isFunction(listener)&&listener.call(this,currValue,values!==oldValues?lastValue:currValue,scope),lastValue=currValue},objectEquality)}})}}var startSymbolLength=startSymbol.length,endSymbolLength=endSymbol.length,escapedStartRegexp=new RegExp(startSymbol.replace(/./g,escape),"g"),escapedEndRegexp=new RegExp(endSymbol.replace(/./g,escape),"g");return $interpolate.startSymbol=function(){return startSymbol},$interpolate.endSymbol=function(){return endSymbol},$interpolate}]}function $IntervalProvider(){this.$get=["$rootScope","$window","$q","$$q",function($rootScope,$window,$q,$$q){function interval(fn,delay,count,invokeApply){var setInterval=$window.setInterval,clearInterval=$window.clearInterval,iteration=0,skipApply=isDefined(invokeApply)&&!invokeApply,deferred=(skipApply?$$q:$q).defer(),promise=deferred.promise;return count=isDefined(count)?count:0,promise.then(null,null,fn),promise.$$intervalId=setInterval(function(){deferred.notify(iteration++),count>0&&iteration>=count&&(deferred.resolve(iteration),clearInterval(promise.$$intervalId),delete intervals[promise.$$intervalId]),skipApply||$rootScope.$apply()},delay),intervals[promise.$$intervalId]=deferred,promise}var intervals={};return interval.cancel=function(promise){return promise&&promise.$$intervalId in intervals?(intervals[promise.$$intervalId].reject("canceled"),$window.clearInterval(promise.$$intervalId),delete intervals[promise.$$intervalId],!0):!1},interval}]}function $LocaleProvider(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(num){return 1===num?"one":"other"
}}}}function encodePath(path){for(var segments=path.split("/"),i=segments.length;i--;)segments[i]=encodeUriSegment(segments[i]);return segments.join("/")}function parseAbsoluteUrl(absoluteUrl,locationObj){var parsedUrl=urlResolve(absoluteUrl);locationObj.$$protocol=parsedUrl.protocol,locationObj.$$host=parsedUrl.hostname,locationObj.$$port=int(parsedUrl.port)||DEFAULT_PORTS[parsedUrl.protocol]||null}function parseAppUrl(relativeUrl,locationObj){var prefixed="/"!==relativeUrl.charAt(0);prefixed&&(relativeUrl="/"+relativeUrl);var match=urlResolve(relativeUrl);locationObj.$$path=decodeURIComponent(prefixed&&"/"===match.pathname.charAt(0)?match.pathname.substring(1):match.pathname),locationObj.$$search=parseKeyValue(match.search),locationObj.$$hash=decodeURIComponent(match.hash),locationObj.$$path&&"/"!=locationObj.$$path.charAt(0)&&(locationObj.$$path="/"+locationObj.$$path)}function beginsWith(begin,whole){return 0===whole.indexOf(begin)?whole.substr(begin.length):void 0}function stripHash(url){var index=url.indexOf("#");return-1==index?url:url.substr(0,index)}function trimEmptyHash(url){return url.replace(/(#.+)|#$/,"$1")}function stripFile(url){return url.substr(0,stripHash(url).lastIndexOf("/")+1)}function serverBase(url){return url.substring(0,url.indexOf("/",url.indexOf("//")+2))}function LocationHtml5Url(appBase,basePrefix){this.$$html5=!0,basePrefix=basePrefix||"";var appBaseNoFile=stripFile(appBase);parseAbsoluteUrl(appBase,this),this.$$parse=function(url){var pathUrl=beginsWith(appBaseNoFile,url);if(!isString(pathUrl))throw $locationMinErr("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',url,appBaseNoFile);parseAppUrl(pathUrl,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?"#"+encodeUriSegment(this.$$hash):"";this.$$url=encodePath(this.$$path)+(search?"?"+search:"")+hash,this.$$absUrl=appBaseNoFile+this.$$url.substr(1)},this.$$parseLinkUrl=function(url,relHref){if(relHref&&"#"===relHref[0])return this.hash(relHref.slice(1)),!0;var appUrl,prevAppUrl,rewrittenUrl;return(appUrl=beginsWith(appBase,url))!==undefined?(prevAppUrl=appUrl,rewrittenUrl=(appUrl=beginsWith(basePrefix,appUrl))!==undefined?appBaseNoFile+(beginsWith("/",appUrl)||appUrl):appBase+prevAppUrl):(appUrl=beginsWith(appBaseNoFile,url))!==undefined?rewrittenUrl=appBaseNoFile+appUrl:appBaseNoFile==url+"/"&&(rewrittenUrl=appBaseNoFile),rewrittenUrl&&this.$$parse(rewrittenUrl),!!rewrittenUrl}}function LocationHashbangUrl(appBase,hashPrefix){var appBaseNoFile=stripFile(appBase);parseAbsoluteUrl(appBase,this),this.$$parse=function(url){function removeWindowsDriveName(path,url,base){var firstPathSegmentMatch,windowsFilePathExp=/^\/[A-Z]:(\/.*)/;return 0===url.indexOf(base)&&(url=url.replace(base,"")),windowsFilePathExp.exec(url)?path:(firstPathSegmentMatch=windowsFilePathExp.exec(path),firstPathSegmentMatch?firstPathSegmentMatch[1]:path)}var withoutHashUrl,withoutBaseUrl=beginsWith(appBase,url)||beginsWith(appBaseNoFile,url);"#"===withoutBaseUrl.charAt(0)?(withoutHashUrl=beginsWith(hashPrefix,withoutBaseUrl),isUndefined(withoutHashUrl)&&(withoutHashUrl=withoutBaseUrl)):withoutHashUrl=this.$$html5?withoutBaseUrl:"",parseAppUrl(withoutHashUrl,this),this.$$path=removeWindowsDriveName(this.$$path,withoutHashUrl,appBase),this.$$compose()},this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?"#"+encodeUriSegment(this.$$hash):"";this.$$url=encodePath(this.$$path)+(search?"?"+search:"")+hash,this.$$absUrl=appBase+(this.$$url?hashPrefix+this.$$url:"")},this.$$parseLinkUrl=function(url){return stripHash(appBase)==stripHash(url)?(this.$$parse(url),!0):!1}}function LocationHashbangInHtml5Url(appBase,hashPrefix){this.$$html5=!0,LocationHashbangUrl.apply(this,arguments);var appBaseNoFile=stripFile(appBase);this.$$parseLinkUrl=function(url,relHref){if(relHref&&"#"===relHref[0])return this.hash(relHref.slice(1)),!0;var rewrittenUrl,appUrl;return appBase==stripHash(url)?rewrittenUrl=url:(appUrl=beginsWith(appBaseNoFile,url))?rewrittenUrl=appBase+hashPrefix+appUrl:appBaseNoFile===url+"/"&&(rewrittenUrl=appBaseNoFile),rewrittenUrl&&this.$$parse(rewrittenUrl),!!rewrittenUrl},this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?"#"+encodeUriSegment(this.$$hash):"";this.$$url=encodePath(this.$$path)+(search?"?"+search:"")+hash,this.$$absUrl=appBase+hashPrefix+this.$$url}}function locationGetter(property){return function(){return this[property]}}function locationGetterSetter(property,preprocess){return function(value){return isUndefined(value)?this[property]:(this[property]=preprocess(value),this.$$compose(),this)}}function $LocationProvider(){var hashPrefix="",html5Mode={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(prefix){return isDefined(prefix)?(hashPrefix=prefix,this):hashPrefix},this.html5Mode=function(mode){return isBoolean(mode)?(html5Mode.enabled=mode,this):isObject(mode)?(isBoolean(mode.enabled)&&(html5Mode.enabled=mode.enabled),isBoolean(mode.requireBase)&&(html5Mode.requireBase=mode.requireBase),isBoolean(mode.rewriteLinks)&&(html5Mode.rewriteLinks=mode.rewriteLinks),this):html5Mode},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function($rootScope,$browser,$sniffer,$rootElement,$window){function setBrowserUrlWithFallback(url,replace,state){var oldUrl=$location.url(),oldState=$location.$$state;try{$browser.url(url,replace,state),$location.$$state=$browser.state()}catch(e){throw $location.url(oldUrl),$location.$$state=oldState,e}}function afterLocationChange(oldUrl,oldState){$rootScope.$broadcast("$locationChangeSuccess",$location.absUrl(),oldUrl,$location.$$state,oldState)}var $location,LocationMode,appBase,baseHref=$browser.baseHref(),initialUrl=$browser.url();if(html5Mode.enabled){if(!baseHref&&html5Mode.requireBase)throw $locationMinErr("nobase","$location in HTML5 mode requires a <base> tag to be present!");appBase=serverBase(initialUrl)+(baseHref||"/"),LocationMode=$sniffer.history?LocationHtml5Url:LocationHashbangInHtml5Url}else appBase=stripHash(initialUrl),LocationMode=LocationHashbangUrl;$location=new LocationMode(appBase,"#"+hashPrefix),$location.$$parseLinkUrl(initialUrl,initialUrl),$location.$$state=$browser.state();var IGNORE_URI_REGEXP=/^\s*(javascript|mailto):/i;$rootElement.on("click",function(event){if(html5Mode.rewriteLinks&&!event.ctrlKey&&!event.metaKey&&!event.shiftKey&&2!=event.which&&2!=event.button){for(var elm=jqLite(event.target);"a"!==nodeName_(elm[0]);)if(elm[0]===$rootElement[0]||!(elm=elm.parent())[0])return;var absHref=elm.prop("href"),relHref=elm.attr("href")||elm.attr("xlink:href");isObject(absHref)&&"[object SVGAnimatedString]"===absHref.toString()&&(absHref=urlResolve(absHref.animVal).href),IGNORE_URI_REGEXP.test(absHref)||!absHref||elm.attr("target")||event.isDefaultPrevented()||$location.$$parseLinkUrl(absHref,relHref)&&(event.preventDefault(),$location.absUrl()!=$browser.url()&&($rootScope.$apply(),$window.angular["ff-684208-preventDefault"]=!0))}}),$location.absUrl()!=initialUrl&&$browser.url($location.absUrl(),!0);var initializing=!0;return $browser.onUrlChange(function(newUrl,newState){$rootScope.$evalAsync(function(){var defaultPrevented,oldUrl=$location.absUrl(),oldState=$location.$$state;$location.$$parse(newUrl),$location.$$state=newState,defaultPrevented=$rootScope.$broadcast("$locationChangeStart",newUrl,oldUrl,newState,oldState).defaultPrevented,$location.absUrl()===newUrl&&(defaultPrevented?($location.$$parse(oldUrl),$location.$$state=oldState,setBrowserUrlWithFallback(oldUrl,!1,oldState)):(initializing=!1,afterLocationChange(oldUrl,oldState)))}),$rootScope.$$phase||$rootScope.$digest()}),$rootScope.$watch(function(){var oldUrl=trimEmptyHash($browser.url()),newUrl=trimEmptyHash($location.absUrl()),oldState=$browser.state(),currentReplace=$location.$$replace,urlOrStateChanged=oldUrl!==newUrl||$location.$$html5&&$sniffer.history&&oldState!==$location.$$state;(initializing||urlOrStateChanged)&&(initializing=!1,$rootScope.$evalAsync(function(){var newUrl=$location.absUrl(),defaultPrevented=$rootScope.$broadcast("$locationChangeStart",newUrl,oldUrl,$location.$$state,oldState).defaultPrevented;$location.absUrl()===newUrl&&(defaultPrevented?($location.$$parse(oldUrl),$location.$$state=oldState):(urlOrStateChanged&&setBrowserUrlWithFallback(newUrl,currentReplace,oldState===$location.$$state?null:$location.$$state),afterLocationChange(oldUrl,oldState)))})),$location.$$replace=!1}),$location}]}function $LogProvider(){var debug=!0,self=this;this.debugEnabled=function(flag){return isDefined(flag)?(debug=flag,this):debug},this.$get=["$window",function($window){function formatError(arg){return arg instanceof Error&&(arg.stack?arg=arg.message&&-1===arg.stack.indexOf(arg.message)?"Error: "+arg.message+"\n"+arg.stack:arg.stack:arg.sourceURL&&(arg=arg.message+"\n"+arg.sourceURL+":"+arg.line)),arg}function consoleLog(type){var console=$window.console||{},logFn=console[type]||console.log||noop,hasApply=!1;try{hasApply=!!logFn.apply}catch(e){}return hasApply?function(){var args=[];return forEach(arguments,function(arg){args.push(formatError(arg))}),logFn.apply(console,args)}:function(arg1,arg2){logFn(arg1,null==arg2?"":arg2)}}return{log:consoleLog("log"),info:consoleLog("info"),warn:consoleLog("warn"),error:consoleLog("error"),debug:function(){var fn=consoleLog("debug");return function(){debug&&fn.apply(self,arguments)}}()}}]}function ensureSafeMemberName(name,fullExpression){if("__defineGetter__"===name||"__defineSetter__"===name||"__lookupGetter__"===name||"__lookupSetter__"===name||"__proto__"===name)throw $parseMinErr("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",fullExpression);return name}function ensureSafeObject(obj,fullExpression){if(obj){if(obj.constructor===obj)throw $parseMinErr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",fullExpression);if(obj.window===obj)throw $parseMinErr("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",fullExpression);if(obj.children&&(obj.nodeName||obj.prop&&obj.attr&&obj.find))throw $parseMinErr("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",fullExpression);if(obj===Object)throw $parseMinErr("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",fullExpression)}return obj}function ensureSafeFunction(obj,fullExpression){if(obj){if(obj.constructor===obj)throw $parseMinErr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",fullExpression);if(obj===CALL||obj===APPLY||obj===BIND)throw $parseMinErr("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",fullExpression)}}function isConstant(exp){return exp.constant}function setter(obj,locals,path,setValue,fullExp){ensureSafeObject(obj,fullExp),ensureSafeObject(locals,fullExp);for(var key,element=path.split("."),i=0;element.length>1;i++){key=ensureSafeMemberName(element.shift(),fullExp);var propertyObj=0===i&&locals&&locals[key]||obj[key];propertyObj||(propertyObj={},obj[key]=propertyObj),obj=ensureSafeObject(propertyObj,fullExp)}return key=ensureSafeMemberName(element.shift(),fullExp),ensureSafeObject(obj[key],fullExp),obj[key]=setValue,setValue}function isPossiblyDangerousMemberName(name){return"constructor"==name}function cspSafeGetterFn(key0,key1,key2,key3,key4,fullExp,expensiveChecks){ensureSafeMemberName(key0,fullExp),ensureSafeMemberName(key1,fullExp),ensureSafeMemberName(key2,fullExp),ensureSafeMemberName(key3,fullExp),ensureSafeMemberName(key4,fullExp);var eso=function(o){return ensureSafeObject(o,fullExp)},eso0=expensiveChecks||isPossiblyDangerousMemberName(key0)?eso:identity,eso1=expensiveChecks||isPossiblyDangerousMemberName(key1)?eso:identity,eso2=expensiveChecks||isPossiblyDangerousMemberName(key2)?eso:identity,eso3=expensiveChecks||isPossiblyDangerousMemberName(key3)?eso:identity,eso4=expensiveChecks||isPossiblyDangerousMemberName(key4)?eso:identity;return function(scope,locals){var pathVal=locals&&locals.hasOwnProperty(key0)?locals:scope;return null==pathVal?pathVal:(pathVal=eso0(pathVal[key0]),key1?null==pathVal?undefined:(pathVal=eso1(pathVal[key1]),key2?null==pathVal?undefined:(pathVal=eso2(pathVal[key2]),key3?null==pathVal?undefined:(pathVal=eso3(pathVal[key3]),key4?null==pathVal?undefined:pathVal=eso4(pathVal[key4]):pathVal):pathVal):pathVal):pathVal)}}function getterFnWithEnsureSafeObject(fn,fullExpression){return function(s,l){return fn(s,l,ensureSafeObject,fullExpression)}}function getterFn(path,options,fullExp){var expensiveChecks=options.expensiveChecks,getterFnCache=expensiveChecks?getterFnCacheExpensive:getterFnCacheDefault,fn=getterFnCache[path];if(fn)return fn;var pathKeys=path.split("."),pathKeysLength=pathKeys.length;if(options.csp)fn=6>pathKeysLength?cspSafeGetterFn(pathKeys[0],pathKeys[1],pathKeys[2],pathKeys[3],pathKeys[4],fullExp,expensiveChecks):function(scope,locals){var val,i=0;do val=cspSafeGetterFn(pathKeys[i++],pathKeys[i++],pathKeys[i++],pathKeys[i++],pathKeys[i++],fullExp,expensiveChecks)(scope,locals),locals=undefined,scope=val;while(pathKeysLength>i);return val};else{var code="";expensiveChecks&&(code+="s = eso(s, fe);\nl = eso(l, fe);\n");var needsEnsureSafeObject=expensiveChecks;forEach(pathKeys,function(key,index){ensureSafeMemberName(key,fullExp);var lookupJs=(index?"s":'((l&&l.hasOwnProperty("'+key+'"))?l:s)')+"."+key;(expensiveChecks||isPossiblyDangerousMemberName(key))&&(lookupJs="eso("+lookupJs+", fe)",needsEnsureSafeObject=!0),code+="if(s == null) return undefined;\ns="+lookupJs+";\n"}),code+="return s;";var evaledFnGetter=new Function("s","l","eso","fe",code);evaledFnGetter.toString=valueFn(code),needsEnsureSafeObject&&(evaledFnGetter=getterFnWithEnsureSafeObject(evaledFnGetter,fullExp)),fn=evaledFnGetter}return fn.sharedGetter=!0,fn.assign=function(self,value,locals){return setter(self,locals,path,value,path)},getterFnCache[path]=fn,fn}function getValueOf(value){return isFunction(value.valueOf)?value.valueOf():objectValueOf.call(value)}function $ParseProvider(){var cacheDefault=createMap(),cacheExpensive=createMap();this.$get=["$filter","$sniffer",function($filter,$sniffer){function wrapSharedExpression(exp){var wrapped=exp;return exp.sharedGetter&&(wrapped=function(self,locals){return exp(self,locals)},wrapped.literal=exp.literal,wrapped.constant=exp.constant,wrapped.assign=exp.assign),wrapped}function collectExpressionInputs(inputs,list){for(var i=0,ii=inputs.length;ii>i;i++){var input=inputs[i];input.constant||(input.inputs?collectExpressionInputs(input.inputs,list):-1===list.indexOf(input)&&list.push(input))}return list}function expressionInputDirtyCheck(newValue,oldValueOfValue){return null==newValue||null==oldValueOfValue?newValue===oldValueOfValue:"object"==typeof newValue&&(newValue=getValueOf(newValue),"object"==typeof newValue)?!1:newValue===oldValueOfValue||newValue!==newValue&&oldValueOfValue!==oldValueOfValue}function inputsWatchDelegate(scope,listener,objectEquality,parsedExpression){var lastResult,inputExpressions=parsedExpression.$$inputs||(parsedExpression.$$inputs=collectExpressionInputs(parsedExpression.inputs,[]));if(1===inputExpressions.length){var oldInputValue=expressionInputDirtyCheck;return inputExpressions=inputExpressions[0],scope.$watch(function(scope){var newInputValue=inputExpressions(scope);return expressionInputDirtyCheck(newInputValue,oldInputValue)||(lastResult=parsedExpression(scope),oldInputValue=newInputValue&&getValueOf(newInputValue)),lastResult},listener,objectEquality)}for(var oldInputValueOfValues=[],i=0,ii=inputExpressions.length;ii>i;i++)oldInputValueOfValues[i]=expressionInputDirtyCheck;return scope.$watch(function(scope){for(var changed=!1,i=0,ii=inputExpressions.length;ii>i;i++){var newInputValue=inputExpressions[i](scope);(changed||(changed=!expressionInputDirtyCheck(newInputValue,oldInputValueOfValues[i])))&&(oldInputValueOfValues[i]=newInputValue&&getValueOf(newInputValue))}return changed&&(lastResult=parsedExpression(scope)),lastResult},listener,objectEquality)}function oneTimeWatchDelegate(scope,listener,objectEquality,parsedExpression){var unwatch,lastValue;return unwatch=scope.$watch(function(scope){return parsedExpression(scope)},function(value,old,scope){lastValue=value,isFunction(listener)&&listener.apply(this,arguments),isDefined(value)&&scope.$$postDigest(function(){isDefined(lastValue)&&unwatch()})},objectEquality)}function oneTimeLiteralWatchDelegate(scope,listener,objectEquality,parsedExpression){function isAllDefined(value){var allDefined=!0;return forEach(value,function(val){isDefined(val)||(allDefined=!1)}),allDefined}var unwatch,lastValue;return unwatch=scope.$watch(function(scope){return parsedExpression(scope)},function(value,old,scope){lastValue=value,isFunction(listener)&&listener.call(this,value,old,scope),isAllDefined(value)&&scope.$$postDigest(function(){isAllDefined(lastValue)&&unwatch()})},objectEquality)}function constantWatchDelegate(scope,listener,objectEquality,parsedExpression){var unwatch;return unwatch=scope.$watch(function(scope){return parsedExpression(scope)},function(){isFunction(listener)&&listener.apply(this,arguments),unwatch()},objectEquality)}function addInterceptor(parsedExpression,interceptorFn){if(!interceptorFn)return parsedExpression;var watchDelegate=parsedExpression.$$watchDelegate,regularWatch=watchDelegate!==oneTimeLiteralWatchDelegate&&watchDelegate!==oneTimeWatchDelegate,fn=regularWatch?function(scope,locals){var value=parsedExpression(scope,locals);return interceptorFn(value,scope,locals)}:function(scope,locals){var value=parsedExpression(scope,locals),result=interceptorFn(value,scope,locals);return isDefined(value)?result:value};return parsedExpression.$$watchDelegate&&parsedExpression.$$watchDelegate!==inputsWatchDelegate?fn.$$watchDelegate=parsedExpression.$$watchDelegate:interceptorFn.$stateful||(fn.$$watchDelegate=inputsWatchDelegate,fn.inputs=[parsedExpression]),fn}var $parseOptions={csp:$sniffer.csp,expensiveChecks:!1},$parseOptionsExpensive={csp:$sniffer.csp,expensiveChecks:!0};return function(exp,interceptorFn,expensiveChecks){var parsedExpression,oneTime,cacheKey;switch(typeof exp){case"string":cacheKey=exp=exp.trim();var cache=expensiveChecks?cacheExpensive:cacheDefault;if(parsedExpression=cache[cacheKey],!parsedExpression){":"===exp.charAt(0)&&":"===exp.charAt(1)&&(oneTime=!0,exp=exp.substring(2));var parseOptions=expensiveChecks?$parseOptionsExpensive:$parseOptions,lexer=new Lexer(parseOptions),parser=new Parser(lexer,$filter,parseOptions);parsedExpression=parser.parse(exp),parsedExpression.constant?parsedExpression.$$watchDelegate=constantWatchDelegate:oneTime?(parsedExpression=wrapSharedExpression(parsedExpression),parsedExpression.$$watchDelegate=parsedExpression.literal?oneTimeLiteralWatchDelegate:oneTimeWatchDelegate):parsedExpression.inputs&&(parsedExpression.$$watchDelegate=inputsWatchDelegate),cache[cacheKey]=parsedExpression}return addInterceptor(parsedExpression,interceptorFn);case"function":return addInterceptor(exp,interceptorFn);default:return addInterceptor(noop,interceptorFn)}}}]}function $QProvider(){this.$get=["$rootScope","$exceptionHandler",function($rootScope,$exceptionHandler){return qFactory(function(callback){$rootScope.$evalAsync(callback)},$exceptionHandler)}]}function $$QProvider(){this.$get=["$browser","$exceptionHandler",function($browser,$exceptionHandler){return qFactory(function(callback){$browser.defer(callback)},$exceptionHandler)}]}function qFactory(nextTick,exceptionHandler){function callOnce(self,resolveFn,rejectFn){function wrap(fn){return function(value){called||(called=!0,fn.call(self,value))}}var called=!1;return[wrap(resolveFn),wrap(rejectFn)]}function Promise(){this.$$state={status:0}}function simpleBind(context,fn){return function(value){fn.call(context,value)}}function processQueue(state){var fn,promise,pending;pending=state.pending,state.processScheduled=!1,state.pending=undefined;for(var i=0,ii=pending.length;ii>i;++i){promise=pending[i][0],fn=pending[i][state.status];try{isFunction(fn)?promise.resolve(fn(state.value)):1===state.status?promise.resolve(state.value):promise.reject(state.value)}catch(e){promise.reject(e),exceptionHandler(e)}}}function scheduleProcessQueue(state){!state.processScheduled&&state.pending&&(state.processScheduled=!0,nextTick(function(){processQueue(state)}))}function Deferred(){this.promise=new Promise,this.resolve=simpleBind(this,this.resolve),this.reject=simpleBind(this,this.reject),this.notify=simpleBind(this,this.notify)}function all(promises){var deferred=new Deferred,counter=0,results=isArray(promises)?[]:{};return forEach(promises,function(promise,key){counter++,when(promise).then(function(value){results.hasOwnProperty(key)||(results[key]=value,--counter||deferred.resolve(results))},function(reason){results.hasOwnProperty(key)||deferred.reject(reason)})}),0===counter&&deferred.resolve(results),deferred.promise}var $qMinErr=minErr("$q",TypeError),defer=function(){return new Deferred};Promise.prototype={then:function(onFulfilled,onRejected,progressBack){var result=new Deferred;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([result,onFulfilled,onRejected,progressBack]),this.$$state.status>0&&scheduleProcessQueue(this.$$state),result.promise},"catch":function(callback){return this.then(null,callback)},"finally":function(callback,progressBack){return this.then(function(value){return handleCallback(value,!0,callback)},function(error){return handleCallback(error,!1,callback)},progressBack)}},Deferred.prototype={resolve:function(val){this.promise.$$state.status||(val===this.promise?this.$$reject($qMinErr("qcycle","Expected promise to be resolved with value other than itself '{0}'",val)):this.$$resolve(val))},$$resolve:function(val){var then,fns;fns=callOnce(this,this.$$resolve,this.$$reject);try{(isObject(val)||isFunction(val))&&(then=val&&val.then),isFunction(then)?(this.promise.$$state.status=-1,then.call(val,fns[0],fns[1],this.notify)):(this.promise.$$state.value=val,this.promise.$$state.status=1,scheduleProcessQueue(this.promise.$$state))}catch(e){fns[1](e),exceptionHandler(e)}},reject:function(reason){this.promise.$$state.status||this.$$reject(reason)},$$reject:function(reason){this.promise.$$state.value=reason,this.promise.$$state.status=2,scheduleProcessQueue(this.promise.$$state)},notify:function(progress){var callbacks=this.promise.$$state.pending;this.promise.$$state.status<=0&&callbacks&&callbacks.length&&nextTick(function(){for(var callback,result,i=0,ii=callbacks.length;ii>i;i++){result=callbacks[i][0],callback=callbacks[i][3];try{result.notify(isFunction(callback)?callback(progress):progress)}catch(e){exceptionHandler(e)}}})}};var reject=function(reason){var result=new Deferred;return result.reject(reason),result.promise},makePromise=function(value,resolved){var result=new Deferred;return resolved?result.resolve(value):result.reject(value),result.promise},handleCallback=function(value,isResolved,callback){var callbackOutput=null;try{isFunction(callback)&&(callbackOutput=callback())}catch(e){return makePromise(e,!1)}return isPromiseLike(callbackOutput)?callbackOutput.then(function(){return makePromise(value,isResolved)},function(error){return makePromise(error,!1)}):makePromise(value,isResolved)},when=function(value,callback,errback,progressBack){var result=new Deferred;return result.resolve(value),result.promise.then(callback,errback,progressBack)},$Q=function Q(resolver){function resolveFn(value){deferred.resolve(value)}function rejectFn(reason){deferred.reject(reason)}if(!isFunction(resolver))throw $qMinErr("norslvr","Expected resolverFn, got '{0}'",resolver);if(!(this instanceof Q))return new Q(resolver);var deferred=new Deferred;return resolver(resolveFn,rejectFn),deferred.promise};return $Q.defer=defer,$Q.reject=reject,$Q.when=when,$Q.all=all,$Q}function $$RAFProvider(){this.$get=["$window","$timeout",function($window,$timeout){var requestAnimationFrame=$window.requestAnimationFrame||$window.webkitRequestAnimationFrame,cancelAnimationFrame=$window.cancelAnimationFrame||$window.webkitCancelAnimationFrame||$window.webkitCancelRequestAnimationFrame,rafSupported=!!requestAnimationFrame,raf=rafSupported?function(fn){var id=requestAnimationFrame(fn);return function(){cancelAnimationFrame(id)}}:function(fn){var timer=$timeout(fn,16.66,!1);return function(){$timeout.cancel(timer)}};return raf.supported=rafSupported,raf}]}function $RootScopeProvider(){var TTL=10,$rootScopeMinErr=minErr("$rootScope"),lastDirtyWatch=null,applyAsyncId=null;this.digestTtl=function(value){return arguments.length&&(TTL=value),TTL},this.$get=["$injector","$exceptionHandler","$parse","$browser",function($injector,$exceptionHandler,$parse,$browser){function Scope(){this.$id=nextUid(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$isolateBindings=null}function beginPhase(phase){if($rootScope.$$phase)throw $rootScopeMinErr("inprog","{0} already in progress",$rootScope.$$phase);$rootScope.$$phase=phase}function clearPhase(){$rootScope.$$phase=null}function decrementListenerCount(current,count,name){do current.$$listenerCount[name]-=count,0===current.$$listenerCount[name]&&delete current.$$listenerCount[name];while(current=current.$parent)}function initWatchVal(){}function flushApplyAsync(){for(;applyAsyncQueue.length;)try{applyAsyncQueue.shift()()}catch(e){$exceptionHandler(e)}applyAsyncId=null}function scheduleApplyAsync(){null===applyAsyncId&&(applyAsyncId=$browser.defer(function(){$rootScope.$apply(flushApplyAsync)}))}Scope.prototype={constructor:Scope,$new:function(isolate,parent){function destroyChild(){child.$$destroyed=!0}var child;return parent=parent||this,isolate?(child=new Scope,child.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=function(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$id=nextUid(),this.$$ChildScope=null},this.$$ChildScope.prototype=this),child=new this.$$ChildScope),child.$parent=parent,child.$$prevSibling=parent.$$childTail,parent.$$childHead?(parent.$$childTail.$$nextSibling=child,parent.$$childTail=child):parent.$$childHead=parent.$$childTail=child,(isolate||parent!=this)&&child.$on("$destroy",destroyChild),child},$watch:function(watchExp,listener,objectEquality){var get=$parse(watchExp);if(get.$$watchDelegate)return get.$$watchDelegate(this,listener,objectEquality,get);var scope=this,array=scope.$$watchers,watcher={fn:listener,last:initWatchVal,get:get,exp:watchExp,eq:!!objectEquality};return lastDirtyWatch=null,isFunction(listener)||(watcher.fn=noop),array||(array=scope.$$watchers=[]),array.unshift(watcher),function(){arrayRemove(array,watcher),lastDirtyWatch=null}},$watchGroup:function(watchExpressions,listener){function watchGroupAction(){changeReactionScheduled=!1,firstRun?(firstRun=!1,listener(newValues,newValues,self)):listener(newValues,oldValues,self)}var oldValues=new Array(watchExpressions.length),newValues=new Array(watchExpressions.length),deregisterFns=[],self=this,changeReactionScheduled=!1,firstRun=!0;if(!watchExpressions.length){var shouldCall=!0;return self.$evalAsync(function(){shouldCall&&listener(newValues,newValues,self)}),function(){shouldCall=!1}}return 1===watchExpressions.length?this.$watch(watchExpressions[0],function(value,oldValue,scope){newValues[0]=value,oldValues[0]=oldValue,listener(newValues,value===oldValue?newValues:oldValues,scope)}):(forEach(watchExpressions,function(expr,i){var unwatchFn=self.$watch(expr,function(value,oldValue){newValues[i]=value,oldValues[i]=oldValue,changeReactionScheduled||(changeReactionScheduled=!0,self.$evalAsync(watchGroupAction))});deregisterFns.push(unwatchFn)}),function(){for(;deregisterFns.length;)deregisterFns.shift()()})},$watchCollection:function(obj,listener){function $watchCollectionInterceptor(_value){newValue=_value;var newLength,key,bothNaN,newItem,oldItem;if(!isUndefined(newValue)){if(isObject(newValue))if(isArrayLike(newValue)){oldValue!==internalArray&&(oldValue=internalArray,oldLength=oldValue.length=0,changeDetected++),newLength=newValue.length,oldLength!==newLength&&(changeDetected++,oldValue.length=oldLength=newLength);for(var i=0;newLength>i;i++)oldItem=oldValue[i],newItem=newValue[i],bothNaN=oldItem!==oldItem&&newItem!==newItem,bothNaN||oldItem===newItem||(changeDetected++,oldValue[i]=newItem)}else{oldValue!==internalObject&&(oldValue=internalObject={},oldLength=0,changeDetected++),newLength=0;for(key in newValue)newValue.hasOwnProperty(key)&&(newLength++,newItem=newValue[key],oldItem=oldValue[key],key in oldValue?(bothNaN=oldItem!==oldItem&&newItem!==newItem,bothNaN||oldItem===newItem||(changeDetected++,oldValue[key]=newItem)):(oldLength++,oldValue[key]=newItem,changeDetected++));if(oldLength>newLength){changeDetected++;for(key in oldValue)newValue.hasOwnProperty(key)||(oldLength--,delete oldValue[key])}}else oldValue!==newValue&&(oldValue=newValue,changeDetected++);return changeDetected}}function $watchCollectionAction(){if(initRun?(initRun=!1,listener(newValue,newValue,self)):listener(newValue,veryOldValue,self),trackVeryOldValue)if(isObject(newValue))if(isArrayLike(newValue)){veryOldValue=new Array(newValue.length);for(var i=0;i<newValue.length;i++)veryOldValue[i]=newValue[i]}else{veryOldValue={};for(var key in newValue)hasOwnProperty.call(newValue,key)&&(veryOldValue[key]=newValue[key])}else veryOldValue=newValue}$watchCollectionInterceptor.$stateful=!0;var newValue,oldValue,veryOldValue,self=this,trackVeryOldValue=listener.length>1,changeDetected=0,changeDetector=$parse(obj,$watchCollectionInterceptor),internalArray=[],internalObject={},initRun=!0,oldLength=0;return this.$watch(changeDetector,$watchCollectionAction)},$digest:function(){var watch,value,last,watchers,length,dirty,next,current,logIdx,asyncTask,ttl=TTL,target=this,watchLog=[];beginPhase("$digest"),$browser.$$checkUrlChange(),this===$rootScope&&null!==applyAsyncId&&($browser.defer.cancel(applyAsyncId),flushApplyAsync()),lastDirtyWatch=null;do{for(dirty=!1,current=target;asyncQueue.length;){try{asyncTask=asyncQueue.shift(),asyncTask.scope.$eval(asyncTask.expression,asyncTask.locals)}catch(e){$exceptionHandler(e)}lastDirtyWatch=null}traverseScopesLoop:do{if(watchers=current.$$watchers)for(length=watchers.length;length--;)try{if(watch=watchers[length])if((value=watch.get(current))===(last=watch.last)||(watch.eq?equals(value,last):"number"==typeof value&&"number"==typeof last&&isNaN(value)&&isNaN(last))){if(watch===lastDirtyWatch){dirty=!1;break traverseScopesLoop}}else dirty=!0,lastDirtyWatch=watch,watch.last=watch.eq?copy(value,null):value,watch.fn(value,last===initWatchVal?value:last,current),5>ttl&&(logIdx=4-ttl,watchLog[logIdx]||(watchLog[logIdx]=[]),watchLog[logIdx].push({msg:isFunction(watch.exp)?"fn: "+(watch.exp.name||watch.exp.toString()):watch.exp,newVal:value,oldVal:last}))}catch(e){$exceptionHandler(e)}if(!(next=current.$$childHead||current!==target&&current.$$nextSibling))for(;current!==target&&!(next=current.$$nextSibling);)current=current.$parent}while(current=next);if((dirty||asyncQueue.length)&&!ttl--)throw clearPhase(),$rootScopeMinErr("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",TTL,watchLog)}while(dirty||asyncQueue.length);for(clearPhase();postDigestQueue.length;)try{postDigestQueue.shift()()}catch(e){$exceptionHandler(e)}},$destroy:function(){if(!this.$$destroyed){var parent=this.$parent;if(this.$broadcast("$destroy"),this.$$destroyed=!0,this!==$rootScope){for(var eventName in this.$$listenerCount)decrementListenerCount(this,this.$$listenerCount[eventName],eventName);parent.$$childHead==this&&(parent.$$childHead=this.$$nextSibling),parent.$$childTail==this&&(parent.$$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=noop,this.$on=this.$watch=this.$watchGroup=function(){return noop
},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(expr,locals){return $parse(expr)(this,locals)},$evalAsync:function(expr,locals){$rootScope.$$phase||asyncQueue.length||$browser.defer(function(){asyncQueue.length&&$rootScope.$digest()}),asyncQueue.push({scope:this,expression:expr,locals:locals})},$$postDigest:function(fn){postDigestQueue.push(fn)},$apply:function(expr){try{return beginPhase("$apply"),this.$eval(expr)}catch(e){$exceptionHandler(e)}finally{clearPhase();try{$rootScope.$digest()}catch(e){throw $exceptionHandler(e),e}}},$applyAsync:function(expr){function $applyAsyncExpression(){scope.$eval(expr)}var scope=this;expr&&applyAsyncQueue.push($applyAsyncExpression),scheduleApplyAsync()},$on:function(name,listener){var namedListeners=this.$$listeners[name];namedListeners||(this.$$listeners[name]=namedListeners=[]),namedListeners.push(listener);var current=this;do current.$$listenerCount[name]||(current.$$listenerCount[name]=0),current.$$listenerCount[name]++;while(current=current.$parent);var self=this;return function(){var indexOfListener=namedListeners.indexOf(listener);-1!==indexOfListener&&(namedListeners[indexOfListener]=null,decrementListenerCount(self,1,name))}},$emit:function(name){var namedListeners,i,length,empty=[],scope=this,stopPropagation=!1,event={name:name,targetScope:scope,stopPropagation:function(){stopPropagation=!0},preventDefault:function(){event.defaultPrevented=!0},defaultPrevented:!1},listenerArgs=concat([event],arguments,1);do{for(namedListeners=scope.$$listeners[name]||empty,event.currentScope=scope,i=0,length=namedListeners.length;length>i;i++)if(namedListeners[i])try{namedListeners[i].apply(null,listenerArgs)}catch(e){$exceptionHandler(e)}else namedListeners.splice(i,1),i--,length--;if(stopPropagation)return event.currentScope=null,event;scope=scope.$parent}while(scope);return event.currentScope=null,event},$broadcast:function(name){var target=this,current=target,next=target,event={name:name,targetScope:target,preventDefault:function(){event.defaultPrevented=!0},defaultPrevented:!1};if(!target.$$listenerCount[name])return event;for(var listeners,i,length,listenerArgs=concat([event],arguments,1);current=next;){for(event.currentScope=current,listeners=current.$$listeners[name]||[],i=0,length=listeners.length;length>i;i++)if(listeners[i])try{listeners[i].apply(null,listenerArgs)}catch(e){$exceptionHandler(e)}else listeners.splice(i,1),i--,length--;if(!(next=current.$$listenerCount[name]&&current.$$childHead||current!==target&&current.$$nextSibling))for(;current!==target&&!(next=current.$$nextSibling);)current=current.$parent}return event.currentScope=null,event}};var $rootScope=new Scope,asyncQueue=$rootScope.$$asyncQueue=[],postDigestQueue=$rootScope.$$postDigestQueue=[],applyAsyncQueue=$rootScope.$$applyAsyncQueue=[];return $rootScope}]}function $$SanitizeUriProvider(){var aHrefSanitizationWhitelist=/^\s*(https?|ftp|mailto|tel|file):/,imgSrcSanitizationWhitelist=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(regexp){return isDefined(regexp)?(aHrefSanitizationWhitelist=regexp,this):aHrefSanitizationWhitelist},this.imgSrcSanitizationWhitelist=function(regexp){return isDefined(regexp)?(imgSrcSanitizationWhitelist=regexp,this):imgSrcSanitizationWhitelist},this.$get=function(){return function(uri,isImage){var normalizedVal,regex=isImage?imgSrcSanitizationWhitelist:aHrefSanitizationWhitelist;return normalizedVal=urlResolve(uri).href,""===normalizedVal||normalizedVal.match(regex)?uri:"unsafe:"+normalizedVal}}}function adjustMatcher(matcher){if("self"===matcher)return matcher;if(isString(matcher)){if(matcher.indexOf("***")>-1)throw $sceMinErr("iwcard","Illegal sequence *** in string matcher. String: {0}",matcher);return matcher=escapeForRegexp(matcher).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+matcher+"$")}if(isRegExp(matcher))return new RegExp("^"+matcher.source+"$");throw $sceMinErr("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function adjustMatchers(matchers){var adjustedMatchers=[];return isDefined(matchers)&&forEach(matchers,function(matcher){adjustedMatchers.push(adjustMatcher(matcher))}),adjustedMatchers}function $SceDelegateProvider(){this.SCE_CONTEXTS=SCE_CONTEXTS;var resourceUrlWhitelist=["self"],resourceUrlBlacklist=[];this.resourceUrlWhitelist=function(value){return arguments.length&&(resourceUrlWhitelist=adjustMatchers(value)),resourceUrlWhitelist},this.resourceUrlBlacklist=function(value){return arguments.length&&(resourceUrlBlacklist=adjustMatchers(value)),resourceUrlBlacklist},this.$get=["$injector",function($injector){function matchUrl(matcher,parsedUrl){return"self"===matcher?urlIsSameOrigin(parsedUrl):!!matcher.exec(parsedUrl.href)}function isResourceUrlAllowedByPolicy(url){var i,n,parsedUrl=urlResolve(url.toString()),allowed=!1;for(i=0,n=resourceUrlWhitelist.length;n>i;i++)if(matchUrl(resourceUrlWhitelist[i],parsedUrl)){allowed=!0;break}if(allowed)for(i=0,n=resourceUrlBlacklist.length;n>i;i++)if(matchUrl(resourceUrlBlacklist[i],parsedUrl)){allowed=!1;break}return allowed}function generateHolderType(Base){var holderType=function(trustedValue){this.$$unwrapTrustedValue=function(){return trustedValue}};return Base&&(holderType.prototype=new Base),holderType.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},holderType.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},holderType}function trustAs(type,trustedValue){var Constructor=byType.hasOwnProperty(type)?byType[type]:null;if(!Constructor)throw $sceMinErr("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",type,trustedValue);if(null===trustedValue||trustedValue===undefined||""===trustedValue)return trustedValue;if("string"!=typeof trustedValue)throw $sceMinErr("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",type);return new Constructor(trustedValue)}function valueOf(maybeTrusted){return maybeTrusted instanceof trustedValueHolderBase?maybeTrusted.$$unwrapTrustedValue():maybeTrusted}function getTrusted(type,maybeTrusted){if(null===maybeTrusted||maybeTrusted===undefined||""===maybeTrusted)return maybeTrusted;var constructor=byType.hasOwnProperty(type)?byType[type]:null;if(constructor&&maybeTrusted instanceof constructor)return maybeTrusted.$$unwrapTrustedValue();if(type===SCE_CONTEXTS.RESOURCE_URL){if(isResourceUrlAllowedByPolicy(maybeTrusted))return maybeTrusted;throw $sceMinErr("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",maybeTrusted.toString())}if(type===SCE_CONTEXTS.HTML)return htmlSanitizer(maybeTrusted);throw $sceMinErr("unsafe","Attempting to use an unsafe value in a safe context.")}var htmlSanitizer=function(){throw $sceMinErr("unsafe","Attempting to use an unsafe value in a safe context.")};$injector.has("$sanitize")&&(htmlSanitizer=$injector.get("$sanitize"));var trustedValueHolderBase=generateHolderType(),byType={};return byType[SCE_CONTEXTS.HTML]=generateHolderType(trustedValueHolderBase),byType[SCE_CONTEXTS.CSS]=generateHolderType(trustedValueHolderBase),byType[SCE_CONTEXTS.URL]=generateHolderType(trustedValueHolderBase),byType[SCE_CONTEXTS.JS]=generateHolderType(trustedValueHolderBase),byType[SCE_CONTEXTS.RESOURCE_URL]=generateHolderType(byType[SCE_CONTEXTS.URL]),{trustAs:trustAs,getTrusted:getTrusted,valueOf:valueOf}}]}function $SceProvider(){var enabled=!0;this.enabled=function(value){return arguments.length&&(enabled=!!value),enabled},this.$get=["$parse","$sceDelegate",function($parse,$sceDelegate){if(enabled&&8>msie)throw $sceMinErr("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 sce=shallowCopy(SCE_CONTEXTS);sce.isEnabled=function(){return enabled},sce.trustAs=$sceDelegate.trustAs,sce.getTrusted=$sceDelegate.getTrusted,sce.valueOf=$sceDelegate.valueOf,enabled||(sce.trustAs=sce.getTrusted=function(type,value){return value},sce.valueOf=identity),sce.parseAs=function(type,expr){var parsed=$parse(expr);return parsed.literal&&parsed.constant?parsed:$parse(expr,function(value){return sce.getTrusted(type,value)})};var parse=sce.parseAs,getTrusted=sce.getTrusted,trustAs=sce.trustAs;return forEach(SCE_CONTEXTS,function(enumValue,name){var lName=lowercase(name);sce[camelCase("parse_as_"+lName)]=function(expr){return parse(enumValue,expr)},sce[camelCase("get_trusted_"+lName)]=function(value){return getTrusted(enumValue,value)},sce[camelCase("trust_as_"+lName)]=function(value){return trustAs(enumValue,value)}}),sce}]}function $SnifferProvider(){this.$get=["$window","$document",function($window,$document){var vendorPrefix,match,eventSupport={},android=int((/android (\d+)/.exec(lowercase(($window.navigator||{}).userAgent))||[])[1]),boxee=/Boxee/i.test(($window.navigator||{}).userAgent),document=$document[0]||{},vendorRegex=/^(Moz|webkit|ms)(?=[A-Z])/,bodyStyle=document.body&&document.body.style,transitions=!1,animations=!1;if(bodyStyle){for(var prop in bodyStyle)if(match=vendorRegex.exec(prop)){vendorPrefix=match[0],vendorPrefix=vendorPrefix.substr(0,1).toUpperCase()+vendorPrefix.substr(1);break}vendorPrefix||(vendorPrefix="WebkitOpacity"in bodyStyle&&"webkit"),transitions=!!("transition"in bodyStyle||vendorPrefix+"Transition"in bodyStyle),animations=!!("animation"in bodyStyle||vendorPrefix+"Animation"in bodyStyle),!android||transitions&&animations||(transitions=isString(document.body.style.webkitTransition),animations=isString(document.body.style.webkitAnimation))}return{history:!(!$window.history||!$window.history.pushState||4>android||boxee),hasEvent:function(event){if("input"===event&&11>=msie)return!1;if(isUndefined(eventSupport[event])){var divElm=document.createElement("div");eventSupport[event]="on"+event in divElm}return eventSupport[event]},csp:csp(),vendorPrefix:vendorPrefix,transitions:transitions,animations:animations,android:android}}]}function $TemplateRequestProvider(){this.$get=["$templateCache","$http","$q",function($templateCache,$http,$q){function handleRequestFn(tpl,ignoreRequestError){function handleError(resp){if(!ignoreRequestError)throw $compileMinErr("tpload","Failed to load template: {0}",tpl);return $q.reject(resp)}handleRequestFn.totalPendingRequests++;var transformResponse=$http.defaults&&$http.defaults.transformResponse;isArray(transformResponse)?transformResponse=transformResponse.filter(function(transformer){return transformer!==defaultHttpResponseTransform}):transformResponse===defaultHttpResponseTransform&&(transformResponse=null);var httpOptions={cache:$templateCache,transformResponse:transformResponse};return $http.get(tpl,httpOptions)["finally"](function(){handleRequestFn.totalPendingRequests--}).then(function(response){return response.data},handleError)}return handleRequestFn.totalPendingRequests=0,handleRequestFn}]}function $$TestabilityProvider(){this.$get=["$rootScope","$browser","$location",function($rootScope,$browser,$location){var testability={};return testability.findBindings=function(element,expression,opt_exactMatch){var bindings=element.getElementsByClassName("ng-binding"),matches=[];return forEach(bindings,function(binding){var dataBinding=angular.element(binding).data("$binding");dataBinding&&forEach(dataBinding,function(bindingName){if(opt_exactMatch){var matcher=new RegExp("(^|\\s)"+escapeForRegexp(expression)+"(\\s|\\||$)");matcher.test(bindingName)&&matches.push(binding)}else-1!=bindingName.indexOf(expression)&&matches.push(binding)})}),matches},testability.findModels=function(element,expression,opt_exactMatch){for(var prefixes=["ng-","data-ng-","ng\\:"],p=0;p<prefixes.length;++p){var attributeEquals=opt_exactMatch?"=":"*=",selector="["+prefixes[p]+"model"+attributeEquals+'"'+expression+'"]',elements=element.querySelectorAll(selector);if(elements.length)return elements}},testability.getLocation=function(){return $location.url()},testability.setLocation=function(url){url!==$location.url()&&($location.url(url),$rootScope.$digest())},testability.whenStable=function(callback){$browser.notifyWhenNoOutstandingRequests(callback)},testability}]}function $TimeoutProvider(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function($rootScope,$browser,$q,$$q,$exceptionHandler){function timeout(fn,delay,invokeApply){var timeoutId,skipApply=isDefined(invokeApply)&&!invokeApply,deferred=(skipApply?$$q:$q).defer(),promise=deferred.promise;return timeoutId=$browser.defer(function(){try{deferred.resolve(fn())}catch(e){deferred.reject(e),$exceptionHandler(e)}finally{delete deferreds[promise.$$timeoutId]}skipApply||$rootScope.$apply()},delay),promise.$$timeoutId=timeoutId,deferreds[timeoutId]=deferred,promise}var deferreds={};return timeout.cancel=function(promise){return promise&&promise.$$timeoutId in deferreds?(deferreds[promise.$$timeoutId].reject("canceled"),delete deferreds[promise.$$timeoutId],$browser.defer.cancel(promise.$$timeoutId)):!1},timeout}]}function urlResolve(url){var href=url;return msie&&(urlParsingNode.setAttribute("href",href),href=urlParsingNode.href),urlParsingNode.setAttribute("href",href),{href:urlParsingNode.href,protocol:urlParsingNode.protocol?urlParsingNode.protocol.replace(/:$/,""):"",host:urlParsingNode.host,search:urlParsingNode.search?urlParsingNode.search.replace(/^\?/,""):"",hash:urlParsingNode.hash?urlParsingNode.hash.replace(/^#/,""):"",hostname:urlParsingNode.hostname,port:urlParsingNode.port,pathname:"/"===urlParsingNode.pathname.charAt(0)?urlParsingNode.pathname:"/"+urlParsingNode.pathname}}function urlIsSameOrigin(requestUrl){var parsed=isString(requestUrl)?urlResolve(requestUrl):requestUrl;return parsed.protocol===originUrl.protocol&&parsed.host===originUrl.host}function $WindowProvider(){this.$get=valueFn(window)}function $FilterProvider($provide){function register(name,factory){if(isObject(name)){var filters={};return forEach(name,function(filter,key){filters[key]=register(key,filter)}),filters}return $provide.factory(name+suffix,factory)}var suffix="Filter";this.register=register,this.$get=["$injector",function($injector){return function(name){return $injector.get(name+suffix)}}],register("currency",currencyFilter),register("date",dateFilter),register("filter",filterFilter),register("json",jsonFilter),register("limitTo",limitToFilter),register("lowercase",lowercaseFilter),register("number",numberFilter),register("orderBy",orderByFilter),register("uppercase",uppercaseFilter)}function filterFilter(){return function(array,expression,comparator){if(!isArray(array))return array;var predicateFn,matchAgainstAnyProp;switch(typeof expression){case"function":predicateFn=expression;break;case"boolean":case"number":case"string":matchAgainstAnyProp=!0;case"object":predicateFn=createPredicateFn(expression,comparator,matchAgainstAnyProp);break;default:return array}return array.filter(predicateFn)}}function createPredicateFn(expression,comparator,matchAgainstAnyProp){var predicateFn,shouldMatchPrimitives=isObject(expression)&&"$"in expression;return comparator===!0?comparator=equals:isFunction(comparator)||(comparator=function(actual,expected){return isObject(actual)||isObject(expected)?!1:(actual=lowercase(""+actual),expected=lowercase(""+expected),-1!==actual.indexOf(expected))}),predicateFn=function(item){return shouldMatchPrimitives&&!isObject(item)?deepCompare(item,expression.$,comparator,!1):deepCompare(item,expression,comparator,matchAgainstAnyProp)}}function deepCompare(actual,expected,comparator,matchAgainstAnyProp,dontMatchWholeObject){var actualType=typeof actual,expectedType=typeof expected;if("string"===expectedType&&"!"===expected.charAt(0))return!deepCompare(actual,expected.substring(1),comparator,matchAgainstAnyProp);if(isArray(actual))return actual.some(function(item){return deepCompare(item,expected,comparator,matchAgainstAnyProp)});switch(actualType){case"object":var key;if(matchAgainstAnyProp){for(key in actual)if("$"!==key.charAt(0)&&deepCompare(actual[key],expected,comparator,!0))return!0;return dontMatchWholeObject?!1:deepCompare(actual,expected,comparator,!1)}if("object"===expectedType){for(key in expected){var expectedVal=expected[key];if(!isFunction(expectedVal)){var matchAnyProperty="$"===key,actualVal=matchAnyProperty?actual:actual[key];if(!deepCompare(actualVal,expectedVal,comparator,matchAnyProperty,matchAnyProperty))return!1}}return!0}return comparator(actual,expected);case"function":return!1;default:return comparator(actual,expected)}}function currencyFilter($locale){var formats=$locale.NUMBER_FORMATS;return function(amount,currencySymbol,fractionSize){return isUndefined(currencySymbol)&&(currencySymbol=formats.CURRENCY_SYM),isUndefined(fractionSize)&&(fractionSize=formats.PATTERNS[1].maxFrac),null==amount?amount:formatNumber(amount,formats.PATTERNS[1],formats.GROUP_SEP,formats.DECIMAL_SEP,fractionSize).replace(/\u00A4/g,currencySymbol)}}function numberFilter($locale){var formats=$locale.NUMBER_FORMATS;return function(number,fractionSize){return null==number?number:formatNumber(number,formats.PATTERNS[0],formats.GROUP_SEP,formats.DECIMAL_SEP,fractionSize)}}function formatNumber(number,pattern,groupSep,decimalSep,fractionSize){if(!isFinite(number)||isObject(number))return"";var isNegative=0>number;number=Math.abs(number);var numStr=number+"",formatedText="",parts=[],hasExponent=!1;if(-1!==numStr.indexOf("e")){var match=numStr.match(/([\d\.]+)e(-?)(\d+)/);match&&"-"==match[2]&&match[3]>fractionSize+1?number=0:(formatedText=numStr,hasExponent=!0)}if(hasExponent)fractionSize>0&&1>number&&(formatedText=number.toFixed(fractionSize),number=parseFloat(formatedText));else{var fractionLen=(numStr.split(DECIMAL_SEP)[1]||"").length;isUndefined(fractionSize)&&(fractionSize=Math.min(Math.max(pattern.minFrac,fractionLen),pattern.maxFrac)),number=+(Math.round(+(number.toString()+"e"+fractionSize)).toString()+"e"+-fractionSize);var fraction=(""+number).split(DECIMAL_SEP),whole=fraction[0];fraction=fraction[1]||"";var i,pos=0,lgroup=pattern.lgSize,group=pattern.gSize;if(whole.length>=lgroup+group)for(pos=whole.length-lgroup,i=0;pos>i;i++)(pos-i)%group===0&&0!==i&&(formatedText+=groupSep),formatedText+=whole.charAt(i);for(i=pos;i<whole.length;i++)(whole.length-i)%lgroup===0&&0!==i&&(formatedText+=groupSep),formatedText+=whole.charAt(i);for(;fraction.length<fractionSize;)fraction+="0";fractionSize&&"0"!==fractionSize&&(formatedText+=decimalSep+fraction.substr(0,fractionSize))}return 0===number&&(isNegative=!1),parts.push(isNegative?pattern.negPre:pattern.posPre,formatedText,isNegative?pattern.negSuf:pattern.posSuf),parts.join("")}function padNumber(num,digits,trim){var neg="";for(0>num&&(neg="-",num=-num),num=""+num;num.length<digits;)num="0"+num;return trim&&(num=num.substr(num.length-digits)),neg+num}function dateGetter(name,size,offset,trim){return offset=offset||0,function(date){var value=date["get"+name]();return(offset>0||value>-offset)&&(value+=offset),0===value&&-12==offset&&(value=12),padNumber(value,size,trim)}}function dateStrGetter(name,shortForm){return function(date,formats){var value=date["get"+name](),get=uppercase(shortForm?"SHORT"+name:name);return formats[get][value]}}function timeZoneGetter(date){var zone=-1*date.getTimezoneOffset(),paddedZone=zone>=0?"+":"";return paddedZone+=padNumber(Math[zone>0?"floor":"ceil"](zone/60),2)+padNumber(Math.abs(zone%60),2)}function getFirstThursdayOfYear(year){var dayOfWeekOnFirst=new Date(year,0,1).getDay();return new Date(year,0,(4>=dayOfWeekOnFirst?5:12)-dayOfWeekOnFirst)}function getThursdayThisWeek(datetime){return new Date(datetime.getFullYear(),datetime.getMonth(),datetime.getDate()+(4-datetime.getDay()))}function weekGetter(size){return function(date){var firstThurs=getFirstThursdayOfYear(date.getFullYear()),thisThurs=getThursdayThisWeek(date),diff=+thisThurs-+firstThurs,result=1+Math.round(diff/6048e5);return padNumber(result,size)}}function ampmGetter(date,formats){return date.getHours()<12?formats.AMPMS[0]:formats.AMPMS[1]}function dateFilter($locale){function jsonStringToDate(string){var match;if(match=string.match(R_ISO8601_STR)){var date=new Date(0),tzHour=0,tzMin=0,dateSetter=match[8]?date.setUTCFullYear:date.setFullYear,timeSetter=match[8]?date.setUTCHours:date.setHours;match[9]&&(tzHour=int(match[9]+match[10]),tzMin=int(match[9]+match[11])),dateSetter.call(date,int(match[1]),int(match[2])-1,int(match[3]));var h=int(match[4]||0)-tzHour,m=int(match[5]||0)-tzMin,s=int(match[6]||0),ms=Math.round(1e3*parseFloat("0."+(match[7]||0)));return timeSetter.call(date,h,m,s,ms),date}return string}var R_ISO8601_STR=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(date,format,timezone){var fn,match,text="",parts=[];if(format=format||"mediumDate",format=$locale.DATETIME_FORMATS[format]||format,isString(date)&&(date=NUMBER_STRING.test(date)?int(date):jsonStringToDate(date)),isNumber(date)&&(date=new Date(date)),!isDate(date))return date;for(;format;)match=DATE_FORMATS_SPLIT.exec(format),match?(parts=concat(parts,match,1),format=parts.pop()):(parts.push(format),format=null);return timezone&&"UTC"===timezone&&(date=new Date(date.getTime()),date.setMinutes(date.getMinutes()+date.getTimezoneOffset())),forEach(parts,function(value){fn=DATE_FORMATS[value],text+=fn?fn(date,$locale.DATETIME_FORMATS):value.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),text}}function jsonFilter(){return function(object,spacing){return isUndefined(spacing)&&(spacing=2),toJson(object,spacing)}}function limitToFilter(){return function(input,limit){return isNumber(input)&&(input=input.toString()),isArray(input)||isString(input)?(limit=1/0===Math.abs(Number(limit))?Number(limit):int(limit),limit?limit>0?input.slice(0,limit):input.slice(limit):isString(input)?"":[]):input}}function orderByFilter($parse){return function(array,sortPredicate,reverseOrder){function comparator(o1,o2){for(var i=0;i<sortPredicate.length;i++){var comp=sortPredicate[i](o1,o2);if(0!==comp)return comp}return 0}function reverseComparator(comp,descending){return descending?function(a,b){return comp(b,a)}:comp}function isPrimitive(value){switch(typeof value){case"number":case"boolean":case"string":return!0;default:return!1}}function objectToString(value){return null===value?"null":"function"==typeof value.valueOf&&(value=value.valueOf(),isPrimitive(value))?value:"function"==typeof value.toString&&(value=value.toString(),isPrimitive(value))?value:""}function compare(v1,v2){var t1=typeof v1,t2=typeof v2;return t1===t2&&"object"===t1&&(v1=objectToString(v1),v2=objectToString(v2)),t1===t2?("string"===t1&&(v1=v1.toLowerCase(),v2=v2.toLowerCase()),v1===v2?0:v2>v1?-1:1):t2>t1?-1:1}return isArrayLike(array)?(sortPredicate=isArray(sortPredicate)?sortPredicate:[sortPredicate],0===sortPredicate.length&&(sortPredicate=["+"]),sortPredicate=sortPredicate.map(function(predicate){var descending=!1,get=predicate||identity;if(isString(predicate)){if(("+"==predicate.charAt(0)||"-"==predicate.charAt(0))&&(descending="-"==predicate.charAt(0),predicate=predicate.substring(1)),""===predicate)return reverseComparator(compare,descending);if(get=$parse(predicate),get.constant){var key=get();return reverseComparator(function(a,b){return compare(a[key],b[key])},descending)}}return reverseComparator(function(a,b){return compare(get(a),get(b))},descending)}),slice.call(array).sort(reverseComparator(comparator,reverseOrder))):array}}function ngDirective(directive){return isFunction(directive)&&(directive={link:directive}),directive.restrict=directive.restrict||"AC",valueFn(directive)}function nullFormRenameControl(control,name){control.$name=name}function FormController(element,attrs,$scope,$animate,$interpolate){var form=this,controls=[],parentForm=form.$$parentForm=element.parent().controller("form")||nullFormCtrl;form.$error={},form.$$success={},form.$pending=undefined,form.$name=$interpolate(attrs.name||attrs.ngForm||"")($scope),form.$dirty=!1,form.$pristine=!0,form.$valid=!0,form.$invalid=!1,form.$submitted=!1,parentForm.$addControl(form),form.$rollbackViewValue=function(){forEach(controls,function(control){control.$rollbackViewValue()})},form.$commitViewValue=function(){forEach(controls,function(control){control.$commitViewValue()})},form.$addControl=function(control){assertNotHasOwnProperty(control.$name,"input"),controls.push(control),control.$name&&(form[control.$name]=control)},form.$$renameControl=function(control,newName){var oldName=control.$name;form[oldName]===control&&delete form[oldName],form[newName]=control,control.$name=newName},form.$removeControl=function(control){control.$name&&form[control.$name]===control&&delete form[control.$name],forEach(form.$pending,function(value,name){form.$setValidity(name,null,control)}),forEach(form.$error,function(value,name){form.$setValidity(name,null,control)}),forEach(form.$$success,function(value,name){form.$setValidity(name,null,control)}),arrayRemove(controls,control)},addSetValidityMethod({ctrl:this,$element:element,set:function(object,property,controller){var list=object[property];if(list){var index=list.indexOf(controller);-1===index&&list.push(controller)}else object[property]=[controller]},unset:function(object,property,controller){var list=object[property];list&&(arrayRemove(list,controller),0===list.length&&delete object[property])},parentForm:parentForm,$animate:$animate}),form.$setDirty=function(){$animate.removeClass(element,PRISTINE_CLASS),$animate.addClass(element,DIRTY_CLASS),form.$dirty=!0,form.$pristine=!1,parentForm.$setDirty()},form.$setPristine=function(){$animate.setClass(element,PRISTINE_CLASS,DIRTY_CLASS+" "+SUBMITTED_CLASS),form.$dirty=!1,form.$pristine=!0,form.$submitted=!1,forEach(controls,function(control){control.$setPristine()})},form.$setUntouched=function(){forEach(controls,function(control){control.$setUntouched()})},form.$setSubmitted=function(){$animate.addClass(element,SUBMITTED_CLASS),form.$submitted=!0,parentForm.$setSubmitted()}}function stringBasedInputType(ctrl){ctrl.$formatters.push(function(value){return ctrl.$isEmpty(value)?value:value.toString()})}function textInputType(scope,element,attr,ctrl,$sniffer,$browser){baseInputType(scope,element,attr,ctrl,$sniffer,$browser),stringBasedInputType(ctrl)}function baseInputType(scope,element,attr,ctrl,$sniffer,$browser){var type=lowercase(element[0].type);if(!$sniffer.android){var composing=!1;element.on("compositionstart",function(){composing=!0}),element.on("compositionend",function(){composing=!1,listener()})}var listener=function(ev){if(timeout&&($browser.defer.cancel(timeout),timeout=null),!composing){var value=element.val(),event=ev&&ev.type;"password"===type||attr.ngTrim&&"false"===attr.ngTrim||(value=trim(value)),(ctrl.$viewValue!==value||""===value&&ctrl.$$hasNativeValidators)&&ctrl.$setViewValue(value,event)}};if($sniffer.hasEvent("input"))element.on("input",listener);else{var timeout,deferListener=function(ev,input,origValue){timeout||(timeout=$browser.defer(function(){timeout=null,input&&input.value===origValue||listener(ev)}))};element.on("keydown",function(event){var key=event.keyCode;91===key||key>15&&19>key||key>=37&&40>=key||deferListener(event,this,this.value)}),$sniffer.hasEvent("paste")&&element.on("paste cut",deferListener)}element.on("change",listener),ctrl.$render=function(){element.val(ctrl.$isEmpty(ctrl.$viewValue)?"":ctrl.$viewValue)}}function weekParser(isoWeek,existingDate){if(isDate(isoWeek))return isoWeek;if(isString(isoWeek)){WEEK_REGEXP.lastIndex=0;var parts=WEEK_REGEXP.exec(isoWeek);if(parts){var year=+parts[1],week=+parts[2],hours=0,minutes=0,seconds=0,milliseconds=0,firstThurs=getFirstThursdayOfYear(year),addDays=7*(week-1);return existingDate&&(hours=existingDate.getHours(),minutes=existingDate.getMinutes(),seconds=existingDate.getSeconds(),milliseconds=existingDate.getMilliseconds()),new Date(year,0,firstThurs.getDate()+addDays,hours,minutes,seconds,milliseconds)}}return 0/0}function createDateParser(regexp,mapping){return function(iso,date){var parts,map;if(isDate(iso))return iso;if(isString(iso)){if('"'==iso.charAt(0)&&'"'==iso.charAt(iso.length-1)&&(iso=iso.substring(1,iso.length-1)),ISO_DATE_REGEXP.test(iso))return new Date(iso);if(regexp.lastIndex=0,parts=regexp.exec(iso))return parts.shift(),map=date?{yyyy:date.getFullYear(),MM:date.getMonth()+1,dd:date.getDate(),HH:date.getHours(),mm:date.getMinutes(),ss:date.getSeconds(),sss:date.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},forEach(parts,function(part,index){index<mapping.length&&(map[mapping[index]]=+part)}),new Date(map.yyyy,map.MM-1,map.dd,map.HH,map.mm,map.ss||0,1e3*map.sss||0)}return 0/0}}function createDateInputType(type,regexp,parseDate,format){return function(scope,element,attr,ctrl,$sniffer,$browser,$filter){function isValidDate(value){return value&&!(value.getTime&&value.getTime()!==value.getTime())}function parseObservedDateValue(val){return isDefined(val)?isDate(val)?val:parseDate(val):undefined}badInputChecker(scope,element,attr,ctrl),baseInputType(scope,element,attr,ctrl,$sniffer,$browser);var previousDate,timezone=ctrl&&ctrl.$options&&ctrl.$options.timezone;if(ctrl.$$parserName=type,ctrl.$parsers.push(function(value){if(ctrl.$isEmpty(value))return null;if(regexp.test(value)){var parsedDate=parseDate(value,previousDate);return"UTC"===timezone&&parsedDate.setMinutes(parsedDate.getMinutes()-parsedDate.getTimezoneOffset()),parsedDate}return undefined}),ctrl.$formatters.push(function(value){if(value&&!isDate(value))throw $ngModelMinErr("datefmt","Expected `{0}` to be a date",value);if(isValidDate(value)){if(previousDate=value,previousDate&&"UTC"===timezone){var timezoneOffset=6e4*previousDate.getTimezoneOffset();previousDate=new Date(previousDate.getTime()+timezoneOffset)}return $filter("date")(value,format,timezone)}return previousDate=null,""}),isDefined(attr.min)||attr.ngMin){var minVal;ctrl.$validators.min=function(value){return!isValidDate(value)||isUndefined(minVal)||parseDate(value)>=minVal},attr.$observe("min",function(val){minVal=parseObservedDateValue(val),ctrl.$validate()})}if(isDefined(attr.max)||attr.ngMax){var maxVal;ctrl.$validators.max=function(value){return!isValidDate(value)||isUndefined(maxVal)||parseDate(value)<=maxVal},attr.$observe("max",function(val){maxVal=parseObservedDateValue(val),ctrl.$validate()})}}}function badInputChecker(scope,element,attr,ctrl){var node=element[0],nativeValidation=ctrl.$$hasNativeValidators=isObject(node.validity);nativeValidation&&ctrl.$parsers.push(function(value){var validity=element.prop(VALIDITY_STATE_PROPERTY)||{};return validity.badInput&&!validity.typeMismatch?undefined:value})}function numberInputType(scope,element,attr,ctrl,$sniffer,$browser){if(badInputChecker(scope,element,attr,ctrl),baseInputType(scope,element,attr,ctrl,$sniffer,$browser),ctrl.$$parserName="number",ctrl.$parsers.push(function(value){return ctrl.$isEmpty(value)?null:NUMBER_REGEXP.test(value)?parseFloat(value):undefined}),ctrl.$formatters.push(function(value){if(!ctrl.$isEmpty(value)){if(!isNumber(value))throw $ngModelMinErr("numfmt","Expected `{0}` to be a number",value);value=value.toString()}return value}),attr.min||attr.ngMin){var minVal;ctrl.$validators.min=function(value){return ctrl.$isEmpty(value)||isUndefined(minVal)||value>=minVal},attr.$observe("min",function(val){isDefined(val)&&!isNumber(val)&&(val=parseFloat(val,10)),minVal=isNumber(val)&&!isNaN(val)?val:undefined,ctrl.$validate()})}if(attr.max||attr.ngMax){var maxVal;ctrl.$validators.max=function(value){return ctrl.$isEmpty(value)||isUndefined(maxVal)||maxVal>=value},attr.$observe("max",function(val){isDefined(val)&&!isNumber(val)&&(val=parseFloat(val,10)),maxVal=isNumber(val)&&!isNaN(val)?val:undefined,ctrl.$validate()})}}function urlInputType(scope,element,attr,ctrl,$sniffer,$browser){baseInputType(scope,element,attr,ctrl,$sniffer,$browser),stringBasedInputType(ctrl),ctrl.$$parserName="url",ctrl.$validators.url=function(modelValue,viewValue){var value=modelValue||viewValue;
return ctrl.$isEmpty(value)||URL_REGEXP.test(value)}}function emailInputType(scope,element,attr,ctrl,$sniffer,$browser){baseInputType(scope,element,attr,ctrl,$sniffer,$browser),stringBasedInputType(ctrl),ctrl.$$parserName="email",ctrl.$validators.email=function(modelValue,viewValue){var value=modelValue||viewValue;return ctrl.$isEmpty(value)||EMAIL_REGEXP.test(value)}}function radioInputType(scope,element,attr,ctrl){isUndefined(attr.name)&&element.attr("name",nextUid());var listener=function(ev){element[0].checked&&ctrl.$setViewValue(attr.value,ev&&ev.type)};element.on("click",listener),ctrl.$render=function(){var value=attr.value;element[0].checked=value==ctrl.$viewValue},attr.$observe("value",ctrl.$render)}function parseConstantExpr($parse,context,name,expression,fallback){var parseFn;if(isDefined(expression)){if(parseFn=$parse(expression),!parseFn.constant)throw minErr("ngModel")("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",name,expression);return parseFn(context)}return fallback}function checkboxInputType(scope,element,attr,ctrl,$sniffer,$browser,$filter,$parse){var trueValue=parseConstantExpr($parse,scope,"ngTrueValue",attr.ngTrueValue,!0),falseValue=parseConstantExpr($parse,scope,"ngFalseValue",attr.ngFalseValue,!1),listener=function(ev){ctrl.$setViewValue(element[0].checked,ev&&ev.type)};element.on("click",listener),ctrl.$render=function(){element[0].checked=ctrl.$viewValue},ctrl.$isEmpty=function(value){return value===!1},ctrl.$formatters.push(function(value){return equals(value,trueValue)}),ctrl.$parsers.push(function(value){return value?trueValue:falseValue})}function classDirective(name,selector){return name="ngClass"+name,["$animate",function($animate){function arrayDifference(tokens1,tokens2){var values=[];outer:for(var i=0;i<tokens1.length;i++){for(var token=tokens1[i],j=0;j<tokens2.length;j++)if(token==tokens2[j])continue outer;values.push(token)}return values}function arrayClasses(classVal){if(isArray(classVal))return classVal;if(isString(classVal))return classVal.split(" ");if(isObject(classVal)){var classes=[];return forEach(classVal,function(v,k){v&&(classes=classes.concat(k.split(" ")))}),classes}return classVal}return{restrict:"AC",link:function(scope,element,attr){function addClasses(classes){var newClasses=digestClassCounts(classes,1);attr.$addClass(newClasses)}function removeClasses(classes){var newClasses=digestClassCounts(classes,-1);attr.$removeClass(newClasses)}function digestClassCounts(classes,count){var classCounts=element.data("$classCounts")||{},classesToUpdate=[];return forEach(classes,function(className){(count>0||classCounts[className])&&(classCounts[className]=(classCounts[className]||0)+count,classCounts[className]===+(count>0)&&classesToUpdate.push(className))}),element.data("$classCounts",classCounts),classesToUpdate.join(" ")}function updateClasses(oldClasses,newClasses){var toAdd=arrayDifference(newClasses,oldClasses),toRemove=arrayDifference(oldClasses,newClasses);toAdd=digestClassCounts(toAdd,1),toRemove=digestClassCounts(toRemove,-1),toAdd&&toAdd.length&&$animate.addClass(element,toAdd),toRemove&&toRemove.length&&$animate.removeClass(element,toRemove)}function ngClassWatchAction(newVal){if(selector===!0||scope.$index%2===selector){var newClasses=arrayClasses(newVal||[]);if(oldVal){if(!equals(newVal,oldVal)){var oldClasses=arrayClasses(oldVal);updateClasses(oldClasses,newClasses)}}else addClasses(newClasses)}oldVal=shallowCopy(newVal)}var oldVal;scope.$watch(attr[name],ngClassWatchAction,!0),attr.$observe("class",function(){ngClassWatchAction(scope.$eval(attr[name]))}),"ngClass"!==name&&scope.$watch("$index",function($index,old$index){var mod=1&$index;if(mod!==(1&old$index)){var classes=arrayClasses(scope.$eval(attr[name]));mod===selector?addClasses(classes):removeClasses(classes)}})}}}]}function addSetValidityMethod(context){function setValidity(validationErrorKey,state,controller){state===undefined?createAndSet("$pending",validationErrorKey,controller):unsetAndCleanup("$pending",validationErrorKey,controller),isBoolean(state)?state?(unset(ctrl.$error,validationErrorKey,controller),set(ctrl.$$success,validationErrorKey,controller)):(set(ctrl.$error,validationErrorKey,controller),unset(ctrl.$$success,validationErrorKey,controller)):(unset(ctrl.$error,validationErrorKey,controller),unset(ctrl.$$success,validationErrorKey,controller)),ctrl.$pending?(cachedToggleClass(PENDING_CLASS,!0),ctrl.$valid=ctrl.$invalid=undefined,toggleValidationCss("",null)):(cachedToggleClass(PENDING_CLASS,!1),ctrl.$valid=isObjectEmpty(ctrl.$error),ctrl.$invalid=!ctrl.$valid,toggleValidationCss("",ctrl.$valid));var combinedState;combinedState=ctrl.$pending&&ctrl.$pending[validationErrorKey]?undefined:ctrl.$error[validationErrorKey]?!1:ctrl.$$success[validationErrorKey]?!0:null,toggleValidationCss(validationErrorKey,combinedState),parentForm.$setValidity(validationErrorKey,combinedState,ctrl)}function createAndSet(name,value,controller){ctrl[name]||(ctrl[name]={}),set(ctrl[name],value,controller)}function unsetAndCleanup(name,value,controller){ctrl[name]&&unset(ctrl[name],value,controller),isObjectEmpty(ctrl[name])&&(ctrl[name]=undefined)}function cachedToggleClass(className,switchValue){switchValue&&!classCache[className]?($animate.addClass($element,className),classCache[className]=!0):!switchValue&&classCache[className]&&($animate.removeClass($element,className),classCache[className]=!1)}function toggleValidationCss(validationErrorKey,isValid){validationErrorKey=validationErrorKey?"-"+snake_case(validationErrorKey,"-"):"",cachedToggleClass(VALID_CLASS+validationErrorKey,isValid===!0),cachedToggleClass(INVALID_CLASS+validationErrorKey,isValid===!1)}var ctrl=context.ctrl,$element=context.$element,classCache={},set=context.set,unset=context.unset,parentForm=context.parentForm,$animate=context.$animate;classCache[INVALID_CLASS]=!(classCache[VALID_CLASS]=$element.hasClass(VALID_CLASS)),ctrl.$setValidity=setValidity}function isObjectEmpty(obj){if(obj)for(var prop in obj)return!1;return!0}var REGEX_STRING_REGEXP=/^\/(.+)\/([a-z]*)$/,VALIDITY_STATE_PROPERTY="validity",lowercase=function(string){return isString(string)?string.toLowerCase():string},hasOwnProperty=Object.prototype.hasOwnProperty,uppercase=function(string){return isString(string)?string.toUpperCase():string},manualLowercase=function(s){return isString(s)?s.replace(/[A-Z]/g,function(ch){return String.fromCharCode(32|ch.charCodeAt(0))}):s},manualUppercase=function(s){return isString(s)?s.replace(/[a-z]/g,function(ch){return String.fromCharCode(-33&ch.charCodeAt(0))}):s};"i"!=="I".toLowerCase()&&(lowercase=manualLowercase,uppercase=manualUppercase);var msie,jqLite,jQuery,angularModule,slice=[].slice,splice=[].splice,push=[].push,toString=Object.prototype.toString,ngMinErr=minErr("ng"),angular=window.angular||(window.angular={}),uid=0;msie=document.documentMode,noop.$inject=[],identity.$inject=[];var skipDestroyOnNextJQueryCleanData,isArray=Array.isArray,trim=function(value){return isString(value)?value.trim():value},escapeForRegexp=function(s){return s.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},csp=function(){if(isDefined(csp.isActive_))return csp.isActive_;var active=!(!document.querySelector("[ng-csp]")&&!document.querySelector("[data-ng-csp]"));if(!active)try{new Function("")}catch(e){active=!0}return csp.isActive_=active},ngAttrPrefixes=["ng-","data-ng-","ng:","x-ng-"],SNAKE_CASE_REGEXP=/[A-Z]/g,bindJQueryFired=!1,NODE_TYPE_ELEMENT=1,NODE_TYPE_TEXT=3,NODE_TYPE_COMMENT=8,NODE_TYPE_DOCUMENT=9,NODE_TYPE_DOCUMENT_FRAGMENT=11,version={full:"1.3.11",major:1,minor:3,dot:11,codeName:"spiffy-manatee"};JQLite.expando="ng339";var jqCache=JQLite.cache={},jqId=1,addEventListenerFn=function(element,type,fn){element.addEventListener(type,fn,!1)},removeEventListenerFn=function(element,type,fn){element.removeEventListener(type,fn,!1)};JQLite._data=function(node){return this.cache[node[this.expando]]||{}};var SPECIAL_CHARS_REGEXP=/([\:\-\_]+(.))/g,MOZ_HACK_REGEXP=/^moz([A-Z])/,MOUSE_EVENT_MAP={mouseleave:"mouseout",mouseenter:"mouseover"},jqLiteMinErr=minErr("jqLite"),SINGLE_TAG_REGEXP=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,HTML_REGEXP=/<|&#?\w+;/,TAG_NAME_REGEXP=/<([\w:]+)/,XHTML_TAG_REGEXP=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,wrapMap={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,"",""]};wrapMap.optgroup=wrapMap.option,wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead,wrapMap.th=wrapMap.td;var JQLitePrototype=JQLite.prototype={ready:function(fn){function trigger(){fired||(fired=!0,fn())}var fired=!1;"complete"===document.readyState?setTimeout(trigger):(this.on("DOMContentLoaded",trigger),JQLite(window).on("load",trigger))},toString:function(){var value=[];return forEach(this,function(e){value.push(""+e)}),"["+value.join(", ")+"]"},eq:function(index){return jqLite(index>=0?this[index]:this[this.length+index])},length:0,push:push,sort:[].sort,splice:[].splice},BOOLEAN_ATTR={};forEach("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(value){BOOLEAN_ATTR[lowercase(value)]=value});var BOOLEAN_ELEMENTS={};forEach("input,select,option,textarea,button,form,details".split(","),function(value){BOOLEAN_ELEMENTS[value]=!0});var ALIASED_ATTR={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};forEach({data:jqLiteData,removeData:jqLiteRemoveData},function(fn,name){JQLite[name]=fn}),forEach({data:jqLiteData,inheritedData:jqLiteInheritedData,scope:function(element){return jqLite.data(element,"$scope")||jqLiteInheritedData(element.parentNode||element,["$isolateScope","$scope"])},isolateScope:function(element){return jqLite.data(element,"$isolateScope")||jqLite.data(element,"$isolateScopeNoTemplate")},controller:jqLiteController,injector:function(element){return jqLiteInheritedData(element,"$injector")},removeAttr:function(element,name){element.removeAttribute(name)},hasClass:jqLiteHasClass,css:function(element,name,value){return name=camelCase(name),isDefined(value)?void(element.style[name]=value):element.style[name]},attr:function(element,name,value){var lowercasedName=lowercase(name);if(BOOLEAN_ATTR[lowercasedName]){if(!isDefined(value))return element[name]||(element.attributes.getNamedItem(name)||noop).specified?lowercasedName:undefined;value?(element[name]=!0,element.setAttribute(name,lowercasedName)):(element[name]=!1,element.removeAttribute(lowercasedName))}else if(isDefined(value))element.setAttribute(name,value);else if(element.getAttribute){var ret=element.getAttribute(name,2);return null===ret?undefined:ret}},prop:function(element,name,value){return isDefined(value)?void(element[name]=value):element[name]},text:function(){function getText(element,value){if(isUndefined(value)){var nodeType=element.nodeType;return nodeType===NODE_TYPE_ELEMENT||nodeType===NODE_TYPE_TEXT?element.textContent:""}element.textContent=value}return getText.$dv="",getText}(),val:function(element,value){if(isUndefined(value)){if(element.multiple&&"select"===nodeName_(element)){var result=[];return forEach(element.options,function(option){option.selected&&result.push(option.value||option.text)}),0===result.length?null:result}return element.value}element.value=value},html:function(element,value){return isUndefined(value)?element.innerHTML:(jqLiteDealoc(element,!0),void(element.innerHTML=value))},empty:jqLiteEmpty},function(fn,name){JQLite.prototype[name]=function(arg1,arg2){var i,key,nodeCount=this.length;if(fn!==jqLiteEmpty&&(2==fn.length&&fn!==jqLiteHasClass&&fn!==jqLiteController?arg1:arg2)===undefined){if(isObject(arg1)){for(i=0;nodeCount>i;i++)if(fn===jqLiteData)fn(this[i],arg1);else for(key in arg1)fn(this[i],key,arg1[key]);return this}for(var value=fn.$dv,jj=value===undefined?Math.min(nodeCount,1):nodeCount,j=0;jj>j;j++){var nodeValue=fn(this[j],arg1,arg2);value=value?value+nodeValue:nodeValue}return value}for(i=0;nodeCount>i;i++)fn(this[i],arg1,arg2);return this}}),forEach({removeData:jqLiteRemoveData,on:function jqLiteOn(element,type,fn,unsupported){if(isDefined(unsupported))throw jqLiteMinErr("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(jqLiteAcceptsData(element)){var expandoStore=jqLiteExpandoStore(element,!0),events=expandoStore.events,handle=expandoStore.handle;handle||(handle=expandoStore.handle=createEventHandler(element,events));for(var types=type.indexOf(" ")>=0?type.split(" "):[type],i=types.length;i--;){type=types[i];var eventFns=events[type];eventFns||(events[type]=[],"mouseenter"===type||"mouseleave"===type?jqLiteOn(element,MOUSE_EVENT_MAP[type],function(event){var target=this,related=event.relatedTarget;(!related||related!==target&&!target.contains(related))&&handle(event,type)}):"$destroy"!==type&&addEventListenerFn(element,type,handle),eventFns=events[type]),eventFns.push(fn)}}},off:jqLiteOff,one:function(element,type,fn){element=jqLite(element),element.on(type,function onFn(){element.off(type,fn),element.off(type,onFn)}),element.on(type,fn)},replaceWith:function(element,replaceNode){var index,parent=element.parentNode;jqLiteDealoc(element),forEach(new JQLite(replaceNode),function(node){index?parent.insertBefore(node,index.nextSibling):parent.replaceChild(node,element),index=node})},children:function(element){var children=[];return forEach(element.childNodes,function(element){element.nodeType===NODE_TYPE_ELEMENT&&children.push(element)}),children},contents:function(element){return element.contentDocument||element.childNodes||[]},append:function(element,node){var nodeType=element.nodeType;if(nodeType===NODE_TYPE_ELEMENT||nodeType===NODE_TYPE_DOCUMENT_FRAGMENT){node=new JQLite(node);for(var i=0,ii=node.length;ii>i;i++){var child=node[i];element.appendChild(child)}}},prepend:function(element,node){if(element.nodeType===NODE_TYPE_ELEMENT){var index=element.firstChild;forEach(new JQLite(node),function(child){element.insertBefore(child,index)})}},wrap:function(element,wrapNode){wrapNode=jqLite(wrapNode).eq(0).clone()[0];var parent=element.parentNode;parent&&parent.replaceChild(wrapNode,element),wrapNode.appendChild(element)},remove:jqLiteRemove,detach:function(element){jqLiteRemove(element,!0)},after:function(element,newElement){var index=element,parent=element.parentNode;newElement=new JQLite(newElement);for(var i=0,ii=newElement.length;ii>i;i++){var node=newElement[i];parent.insertBefore(node,index.nextSibling),index=node}},addClass:jqLiteAddClass,removeClass:jqLiteRemoveClass,toggleClass:function(element,selector,condition){selector&&forEach(selector.split(" "),function(className){var classCondition=condition;isUndefined(classCondition)&&(classCondition=!jqLiteHasClass(element,className)),(classCondition?jqLiteAddClass:jqLiteRemoveClass)(element,className)})},parent:function(element){var parent=element.parentNode;return parent&&parent.nodeType!==NODE_TYPE_DOCUMENT_FRAGMENT?parent:null},next:function(element){return element.nextElementSibling},find:function(element,selector){return element.getElementsByTagName?element.getElementsByTagName(selector):[]},clone:jqLiteClone,triggerHandler:function(element,event,extraParameters){var dummyEvent,eventFnsCopy,handlerArgs,eventName=event.type||event,expandoStore=jqLiteExpandoStore(element),events=expandoStore&&expandoStore.events,eventFns=events&&events[eventName];eventFns&&(dummyEvent={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:noop,type:eventName,target:element},event.type&&(dummyEvent=extend(dummyEvent,event)),eventFnsCopy=shallowCopy(eventFns),handlerArgs=extraParameters?[dummyEvent].concat(extraParameters):[dummyEvent],forEach(eventFnsCopy,function(fn){dummyEvent.isImmediatePropagationStopped()||fn.apply(element,handlerArgs)}))}},function(fn,name){JQLite.prototype[name]=function(arg1,arg2,arg3){for(var value,i=0,ii=this.length;ii>i;i++)isUndefined(value)?(value=fn(this[i],arg1,arg2,arg3),isDefined(value)&&(value=jqLite(value))):jqLiteAddNodes(value,fn(this[i],arg1,arg2,arg3));return isDefined(value)?value:this},JQLite.prototype.bind=JQLite.prototype.on,JQLite.prototype.unbind=JQLite.prototype.off}),HashMap.prototype={put:function(key,value){this[hashKey(key,this.nextUid)]=value},get:function(key){return this[hashKey(key,this.nextUid)]},remove:function(key){var value=this[key=hashKey(key,this.nextUid)];return delete this[key],value}};var FN_ARGS=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,FN_ARG_SPLIT=/,/,FN_ARG=/^\s*(_?)(\S+?)\1\s*$/,STRIP_COMMENTS=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,$injectorMinErr=minErr("$injector");createInjector.$$annotate=annotate;var $animateMinErr=minErr("$animate"),$AnimateProvider=["$provide",function($provide){this.$$selectors={},this.register=function(name,factory){var key=name+"-animation";if(name&&"."!=name.charAt(0))throw $animateMinErr("notcsel","Expecting class selector starting with '.' got '{0}'.",name);this.$$selectors[name.substr(1)]=key,$provide.factory(key,factory)},this.classNameFilter=function(expression){return 1===arguments.length&&(this.$$classNameFilter=expression instanceof RegExp?expression:null),this.$$classNameFilter},this.$get=["$$q","$$asyncCallback","$rootScope",function($$q,$$asyncCallback,$rootScope){function runAnimationPostDigest(fn){var cancelFn,defer=$$q.defer();return defer.promise.$$cancelFn=function(){cancelFn&&cancelFn()},$rootScope.$$postDigest(function(){cancelFn=fn(function(){defer.resolve()})}),defer.promise}function resolveElementClasses(element,classes){var toAdd=[],toRemove=[],hasClasses=createMap();return forEach((element.attr("class")||"").split(/\s+/),function(className){hasClasses[className]=!0}),forEach(classes,function(status,className){var hasClass=hasClasses[className];status===!1&&hasClass?toRemove.push(className):status!==!0||hasClass||toAdd.push(className)}),toAdd.length+toRemove.length>0&&[toAdd.length?toAdd:null,toRemove.length?toRemove:null]}function cachedClassManipulation(cache,classes,op){for(var i=0,ii=classes.length;ii>i;++i){var className=classes[i];cache[className]=op}}function asyncPromise(){return currentDefer||(currentDefer=$$q.defer(),$$asyncCallback(function(){currentDefer.resolve(),currentDefer=null})),currentDefer.promise}function applyStyles(element,options){if(angular.isObject(options)){var styles=extend(options.from||{},options.to||{});element.css(styles)}}var currentDefer;return{animate:function(element,from,to){return applyStyles(element,{from:from,to:to}),asyncPromise()},enter:function(element,parent,after,options){return applyStyles(element,options),after?after.after(element):parent.prepend(element),asyncPromise()},leave:function(element){return element.remove(),asyncPromise()},move:function(element,parent,after,options){return this.enter(element,parent,after,options)},addClass:function(element,className,options){return this.setClass(element,className,[],options)},$$addClassImmediately:function(element,className,options){return element=jqLite(element),className=isString(className)?className:isArray(className)?className.join(" "):"",forEach(element,function(element){jqLiteAddClass(element,className)}),applyStyles(element,options),asyncPromise()},removeClass:function(element,className,options){return this.setClass(element,[],className,options)},$$removeClassImmediately:function(element,className,options){return element=jqLite(element),className=isString(className)?className:isArray(className)?className.join(" "):"",forEach(element,function(element){jqLiteRemoveClass(element,className)}),applyStyles(element,options),asyncPromise()},setClass:function(element,add,remove,options){var self=this,STORAGE_KEY="$$animateClasses",createdCache=!1;element=jqLite(element);var cache=element.data(STORAGE_KEY);cache?options&&cache.options&&(cache.options=angular.extend(cache.options||{},options)):(cache={classes:{},options:options},createdCache=!0);var classes=cache.classes;return add=isArray(add)?add:add.split(" "),remove=isArray(remove)?remove:remove.split(" "),cachedClassManipulation(classes,add,!0),cachedClassManipulation(classes,remove,!1),createdCache&&(cache.promise=runAnimationPostDigest(function(done){var cache=element.data(STORAGE_KEY);if(element.removeData(STORAGE_KEY),cache){var classes=resolveElementClasses(element,cache.classes);classes&&self.$$setClassImmediately(element,classes[0],classes[1],cache.options)}done()}),element.data(STORAGE_KEY,cache)),cache.promise},$$setClassImmediately:function(element,add,remove,options){return add&&this.$$addClassImmediately(element,add),remove&&this.$$removeClassImmediately(element,remove),applyStyles(element,options),asyncPromise()},enabled:noop,cancel:noop}}]}],$compileMinErr=minErr("$compile");$CompileProvider.$inject=["$provide","$$sanitizeUriProvider"];var PREFIX_REGEXP=/^((?:x|data)[\:\-_])/i,APPLICATION_JSON="application/json",CONTENT_TYPE_APPLICATION_JSON={"Content-Type":APPLICATION_JSON+";charset=utf-8"},JSON_START=/^\[|^\{(?!\{)/,JSON_ENDS={"[":/]$/,"{":/}$/},JSON_PROTECTION_PREFIX=/^\)\]\}',?\n/,$interpolateMinErr=minErr("$interpolate"),PATH_MATCH=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,DEFAULT_PORTS={http:80,https:443,ftp:21},$locationMinErr=minErr("$location"),locationPrototype={$$html5:!1,$$replace:!1,absUrl:locationGetter("$$absUrl"),url:function(url){if(isUndefined(url))return this.$$url;var match=PATH_MATCH.exec(url);return(match[1]||""===url)&&this.path(decodeURIComponent(match[1])),(match[2]||match[1]||""===url)&&this.search(match[3]||""),this.hash(match[5]||""),this},protocol:locationGetter("$$protocol"),host:locationGetter("$$host"),port:locationGetter("$$port"),path:locationGetterSetter("$$path",function(path){return path=null!==path?path.toString():"","/"==path.charAt(0)?path:"/"+path}),search:function(search,paramValue){switch(arguments.length){case 0:return this.$$search;case 1:if(isString(search)||isNumber(search))search=search.toString(),this.$$search=parseKeyValue(search);else{if(!isObject(search))throw $locationMinErr("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");search=copy(search,{}),forEach(search,function(value,key){null==value&&delete search[key]}),this.$$search=search}break;default:isUndefined(paramValue)||null===paramValue?delete this.$$search[search]:this.$$search[search]=paramValue}return this.$$compose(),this},hash:locationGetterSetter("$$hash",function(hash){return null!==hash?hash.toString():""}),replace:function(){return this.$$replace=!0,this}};forEach([LocationHashbangInHtml5Url,LocationHashbangUrl,LocationHtml5Url],function(Location){Location.prototype=Object.create(locationPrototype),Location.prototype.state=function(state){if(!arguments.length)return this.$$state;if(Location!==LocationHtml5Url||!this.$$html5)throw $locationMinErr("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=isUndefined(state)?null:state,this}});var $parseMinErr=minErr("$parse"),CALL=Function.prototype.call,APPLY=Function.prototype.apply,BIND=Function.prototype.bind,CONSTANTS=createMap();forEach({"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:function(){}},function(constantGetter,name){constantGetter.constant=constantGetter.literal=constantGetter.sharedGetter=!0,CONSTANTS[name]=constantGetter}),CONSTANTS["this"]=function(self){return self},CONSTANTS["this"].sharedGetter=!0;var OPERATORS=extend(createMap(),{"+":function(self,locals,a,b){return a=a(self,locals),b=b(self,locals),isDefined(a)?isDefined(b)?a+b:a:isDefined(b)?b:undefined},"-":function(self,locals,a,b){return a=a(self,locals),b=b(self,locals),(isDefined(a)?a:0)-(isDefined(b)?b:0)},"*":function(self,locals,a,b){return a(self,locals)*b(self,locals)},"/":function(self,locals,a,b){return a(self,locals)/b(self,locals)},"%":function(self,locals,a,b){return a(self,locals)%b(self,locals)},"===":function(self,locals,a,b){return a(self,locals)===b(self,locals)},"!==":function(self,locals,a,b){return a(self,locals)!==b(self,locals)},"==":function(self,locals,a,b){return a(self,locals)==b(self,locals)},"!=":function(self,locals,a,b){return a(self,locals)!=b(self,locals)},"<":function(self,locals,a,b){return a(self,locals)<b(self,locals)},">":function(self,locals,a,b){return a(self,locals)>b(self,locals)},"<=":function(self,locals,a,b){return a(self,locals)<=b(self,locals)},">=":function(self,locals,a,b){return a(self,locals)>=b(self,locals)},"&&":function(self,locals,a,b){return a(self,locals)&&b(self,locals)},"||":function(self,locals,a,b){return a(self,locals)||b(self,locals)},"!":function(self,locals,a){return!a(self,locals)},"=":!0,"|":!0}),ESCAPE={n:"\n",f:"\f",r:"\r",t:" ",v:" ","'":"'",'"':'"'},Lexer=function(options){this.options=options};Lexer.prototype={constructor:Lexer,lex:function(text){for(this.text=text,this.index=0,this.tokens=[];this.index<this.text.length;){var ch=this.text.charAt(this.index);if('"'===ch||"'"===ch)this.readString(ch);else if(this.isNumber(ch)||"."===ch&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(ch))this.readIdent();else if(this.is(ch,"(){}[].,;:?"))this.tokens.push({index:this.index,text:ch}),this.index++;else if(this.isWhitespace(ch))this.index++;else{var ch2=ch+this.peek(),ch3=ch2+this.peek(2),op1=OPERATORS[ch],op2=OPERATORS[ch2],op3=OPERATORS[ch3];if(op1||op2||op3){var token=op3?ch3:op2?ch2:ch;this.tokens.push({index:this.index,text:token,operator:!0}),this.index+=token.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(ch,chars){return-1!==chars.indexOf(ch)},peek:function(i){var num=i||1;return this.index+num<this.text.length?this.text.charAt(this.index+num):!1},isNumber:function(ch){return ch>="0"&&"9">=ch&&"string"==typeof ch},isWhitespace:function(ch){return" "===ch||"\r"===ch||" "===ch||"\n"===ch||" "===ch||" "===ch},isIdent:function(ch){return ch>="a"&&"z">=ch||ch>="A"&&"Z">=ch||"_"===ch||"$"===ch},isExpOperator:function(ch){return"-"===ch||"+"===ch||this.isNumber(ch)},throwError:function(error,start,end){end=end||this.index;var colStr=isDefined(start)?"s "+start+"-"+this.index+" ["+this.text.substring(start,end)+"]":" "+end;throw $parseMinErr("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",error,colStr,this.text)},readNumber:function(){for(var number="",start=this.index;this.index<this.text.length;){var ch=lowercase(this.text.charAt(this.index));if("."==ch||this.isNumber(ch))number+=ch;else{var peekCh=this.peek();if("e"==ch&&this.isExpOperator(peekCh))number+=ch;else if(this.isExpOperator(ch)&&peekCh&&this.isNumber(peekCh)&&"e"==number.charAt(number.length-1))number+=ch;else{if(!this.isExpOperator(ch)||peekCh&&this.isNumber(peekCh)||"e"!=number.charAt(number.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:start,text:number,constant:!0,value:Number(number)})},readIdent:function(){for(var start=this.index;this.index<this.text.length;){var ch=this.text.charAt(this.index);if(!this.isIdent(ch)&&!this.isNumber(ch))break;this.index++}this.tokens.push({index:start,text:this.text.slice(start,this.index),identifier:!0})},readString:function(quote){var start=this.index;this.index++;for(var string="",rawString=quote,escape=!1;this.index<this.text.length;){var ch=this.text.charAt(this.index);if(rawString+=ch,escape){if("u"===ch){var hex=this.text.substring(this.index+1,this.index+5);hex.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+hex+"]"),this.index+=4,string+=String.fromCharCode(parseInt(hex,16))}else{var rep=ESCAPE[ch];string+=rep||ch}escape=!1}else if("\\"===ch)escape=!0;else{if(ch===quote)return this.index++,void this.tokens.push({index:start,text:rawString,constant:!0,value:string});string+=ch}this.index++}this.throwError("Unterminated quote",start)}};var Parser=function(lexer,$filter,options){this.lexer=lexer,this.$filter=$filter,this.options=options};Parser.ZERO=extend(function(){return 0},{sharedGetter:!0,constant:!0}),Parser.prototype={constructor:Parser,parse:function(text){this.text=text,this.tokens=this.lexer.lex(text);var value=this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),value.literal=!!value.literal,value.constant=!!value.constant,value},primary:function(){var primary;this.expect("(")?(primary=this.filterChain(),this.consume(")")):this.expect("[")?primary=this.arrayDeclaration():this.expect("{")?primary=this.object():this.peek().identifier&&this.peek().text in CONSTANTS?primary=CONSTANTS[this.consume().text]:this.peek().identifier?primary=this.identifier():this.peek().constant?primary=this.constant():this.throwError("not a primary expression",this.peek());for(var next,context;next=this.expect("(","[",".");)"("===next.text?(primary=this.functionCall(primary,context),context=null):"["===next.text?(context=primary,primary=this.objectIndex(primary)):"."===next.text?(context=primary,primary=this.fieldAccess(primary)):this.throwError("IMPOSSIBLE");return primary},throwError:function(msg,token){throw $parseMinErr("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",token.text,msg,token.index+1,this.text,this.text.substring(token.index))},peekToken:function(){if(0===this.tokens.length)throw $parseMinErr("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e1,e2,e3,e4){return this.peekAhead(0,e1,e2,e3,e4)},peekAhead:function(i,e1,e2,e3,e4){if(this.tokens.length>i){var token=this.tokens[i],t=token.text;if(t===e1||t===e2||t===e3||t===e4||!e1&&!e2&&!e3&&!e4)return token}return!1},expect:function(e1,e2,e3,e4){var token=this.peek(e1,e2,e3,e4);return token?(this.tokens.shift(),token):!1},consume:function(e1){if(0===this.tokens.length)throw $parseMinErr("ueoe","Unexpected end of expression: {0}",this.text);var token=this.expect(e1);return token||this.throwError("is unexpected, expecting ["+e1+"]",this.peek()),token},unaryFn:function(op,right){var fn=OPERATORS[op];return extend(function(self,locals){return fn(self,locals,right)},{constant:right.constant,inputs:[right]})},binaryFn:function(left,op,right,isBranching){var fn=OPERATORS[op];return extend(function(self,locals){return fn(self,locals,left,right)},{constant:left.constant&&right.constant,inputs:!isBranching&&[left,right]})},identifier:function(){for(var id=this.consume().text;this.peek(".")&&this.peekAhead(1).identifier&&!this.peekAhead(2,"(");)id+=this.consume().text+this.consume().text;return getterFn(id,this.options,this.text)},constant:function(){var value=this.consume().value;return extend(function(){return value},{constant:!0,literal:!0})},statements:function(){for(var statements=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&statements.push(this.filterChain()),!this.expect(";"))return 1===statements.length?statements[0]:function(self,locals){for(var value,i=0,ii=statements.length;ii>i;i++)value=statements[i](self,locals);return value}},filterChain:function(){for(var token,left=this.expression();token=this.expect("|");)left=this.filter(left);return left},filter:function(inputFn){var argsFn,args,fn=this.$filter(this.consume().text);if(this.peek(":"))for(argsFn=[],args=[];this.expect(":");)argsFn.push(this.expression());var inputs=[inputFn].concat(argsFn||[]);return extend(function(self,locals){var input=inputFn(self,locals);if(args){args[0]=input;for(var i=argsFn.length;i--;)args[i+1]=argsFn[i](self,locals);return fn.apply(undefined,args)}return fn(input)},{constant:!fn.$stateful&&inputs.every(isConstant),inputs:!fn.$stateful&&inputs})},expression:function(){return this.assignment()
},assignment:function(){var right,token,left=this.ternary();return(token=this.expect("="))?(left.assign||this.throwError("implies assignment but ["+this.text.substring(0,token.index)+"] can not be assigned to",token),right=this.ternary(),extend(function(scope,locals){return left.assign(scope,right(scope,locals),locals)},{inputs:[left,right]})):left},ternary:function(){var middle,token,left=this.logicalOR();if((token=this.expect("?"))&&(middle=this.assignment(),this.consume(":"))){var right=this.assignment();return extend(function(self,locals){return left(self,locals)?middle(self,locals):right(self,locals)},{constant:left.constant&&middle.constant&&right.constant})}return left},logicalOR:function(){for(var token,left=this.logicalAND();token=this.expect("||");)left=this.binaryFn(left,token.text,this.logicalAND(),!0);return left},logicalAND:function(){for(var token,left=this.equality();token=this.expect("&&");)left=this.binaryFn(left,token.text,this.equality(),!0);return left},equality:function(){for(var token,left=this.relational();token=this.expect("==","!=","===","!==");)left=this.binaryFn(left,token.text,this.relational());return left},relational:function(){for(var token,left=this.additive();token=this.expect("<",">","<=",">=");)left=this.binaryFn(left,token.text,this.additive());return left},additive:function(){for(var token,left=this.multiplicative();token=this.expect("+","-");)left=this.binaryFn(left,token.text,this.multiplicative());return left},multiplicative:function(){for(var token,left=this.unary();token=this.expect("*","/","%");)left=this.binaryFn(left,token.text,this.unary());return left},unary:function(){var token;return this.expect("+")?this.primary():(token=this.expect("-"))?this.binaryFn(Parser.ZERO,token.text,this.unary()):(token=this.expect("!"))?this.unaryFn(token.text,this.unary()):this.primary()},fieldAccess:function(object){var getter=this.identifier();return extend(function(scope,locals,self){var o=self||object(scope,locals);return null==o?undefined:getter(o)},{assign:function(scope,value,locals){var o=object(scope,locals);return o||object.assign(scope,o={},locals),getter.assign(o,value)}})},objectIndex:function(obj){var expression=this.text,indexFn=this.expression();return this.consume("]"),extend(function(self,locals){var v,o=obj(self,locals),i=indexFn(self,locals);return ensureSafeMemberName(i,expression),o?v=ensureSafeObject(o[i],expression):undefined},{assign:function(self,value,locals){var key=ensureSafeMemberName(indexFn(self,locals),expression),o=ensureSafeObject(obj(self,locals),expression);return o||obj.assign(self,o={},locals),o[key]=value}})},functionCall:function(fnGetter,contextGetter){var argsFn=[];if(")"!==this.peekToken().text)do argsFn.push(this.expression());while(this.expect(","));this.consume(")");var expressionText=this.text,args=argsFn.length?[]:null;return function(scope,locals){var context=contextGetter?contextGetter(scope,locals):isDefined(contextGetter)?undefined:scope,fn=fnGetter(scope,locals,context)||noop;if(args)for(var i=argsFn.length;i--;)args[i]=ensureSafeObject(argsFn[i](scope,locals),expressionText);ensureSafeObject(context,expressionText),ensureSafeFunction(fn,expressionText);var v=fn.apply?fn.apply(context,args):fn(args[0],args[1],args[2],args[3],args[4]);return ensureSafeObject(v,expressionText)}},arrayDeclaration:function(){var elementFns=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;elementFns.push(this.expression())}while(this.expect(","));return this.consume("]"),extend(function(self,locals){for(var array=[],i=0,ii=elementFns.length;ii>i;i++)array.push(elementFns[i](self,locals));return array},{literal:!0,constant:elementFns.every(isConstant),inputs:elementFns})},object:function(){var keys=[],valueFns=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var token=this.consume();token.constant?keys.push(token.value):token.identifier?keys.push(token.text):this.throwError("invalid key",token),this.consume(":"),valueFns.push(this.expression())}while(this.expect(","));return this.consume("}"),extend(function(self,locals){for(var object={},i=0,ii=valueFns.length;ii>i;i++)object[keys[i]]=valueFns[i](self,locals);return object},{literal:!0,constant:valueFns.every(isConstant),inputs:valueFns})}};var getterFnCacheDefault=createMap(),getterFnCacheExpensive=createMap(),objectValueOf=Object.prototype.valueOf,$sceMinErr=minErr("$sce"),SCE_CONTEXTS={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},$compileMinErr=minErr("$compile"),urlParsingNode=document.createElement("a"),originUrl=urlResolve(window.location.href);$FilterProvider.$inject=["$provide"],currencyFilter.$inject=["$locale"],numberFilter.$inject=["$locale"];var DECIMAL_SEP=".",DATE_FORMATS={yyyy:dateGetter("FullYear",4),yy:dateGetter("FullYear",2,0,!0),y:dateGetter("FullYear",1),MMMM:dateStrGetter("Month"),MMM:dateStrGetter("Month",!0),MM:dateGetter("Month",2,1),M:dateGetter("Month",1,1),dd:dateGetter("Date",2),d:dateGetter("Date",1),HH:dateGetter("Hours",2),H:dateGetter("Hours",1),hh:dateGetter("Hours",2,-12),h:dateGetter("Hours",1,-12),mm:dateGetter("Minutes",2),m:dateGetter("Minutes",1),ss:dateGetter("Seconds",2),s:dateGetter("Seconds",1),sss:dateGetter("Milliseconds",3),EEEE:dateStrGetter("Day"),EEE:dateStrGetter("Day",!0),a:ampmGetter,Z:timeZoneGetter,ww:weekGetter(2),w:weekGetter(1)},DATE_FORMATS_SPLIT=/((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,NUMBER_STRING=/^\-?\d+$/;dateFilter.$inject=["$locale"];var lowercaseFilter=valueFn(lowercase),uppercaseFilter=valueFn(uppercase);orderByFilter.$inject=["$parse"];var htmlAnchorDirective=valueFn({restrict:"E",compile:function(element,attr){return attr.href||attr.xlinkHref||attr.name?void 0:function(scope,element){if("a"===element[0].nodeName.toLowerCase()){var href="[object SVGAnimatedString]"===toString.call(element.prop("href"))?"xlink:href":"href";element.on("click",function(event){element.attr(href)||event.preventDefault()})}}}}),ngAttributeAliasDirectives={};forEach(BOOLEAN_ATTR,function(propName,attrName){if("multiple"!=propName){var normalized=directiveNormalize("ng-"+attrName);ngAttributeAliasDirectives[normalized]=function(){return{restrict:"A",priority:100,link:function(scope,element,attr){scope.$watch(attr[normalized],function(value){attr.$set(attrName,!!value)})}}}}}),forEach(ALIASED_ATTR,function(htmlAttr,ngAttr){ngAttributeAliasDirectives[ngAttr]=function(){return{priority:100,link:function(scope,element,attr){if("ngPattern"===ngAttr&&"/"==attr.ngPattern.charAt(0)){var match=attr.ngPattern.match(REGEX_STRING_REGEXP);if(match)return void attr.$set("ngPattern",new RegExp(match[1],match[2]))}scope.$watch(attr[ngAttr],function(value){attr.$set(ngAttr,value)})}}}}),forEach(["src","srcset","href"],function(attrName){var normalized=directiveNormalize("ng-"+attrName);ngAttributeAliasDirectives[normalized]=function(){return{priority:99,link:function(scope,element,attr){var propName=attrName,name=attrName;"href"===attrName&&"[object SVGAnimatedString]"===toString.call(element.prop("href"))&&(name="xlinkHref",attr.$attr[name]="xlink:href",propName=null),attr.$observe(normalized,function(value){return value?(attr.$set(name,value),void(msie&&propName&&element.prop(propName,attr[name]))):void("href"===attrName&&attr.$set(name,null))})}}}});var nullFormCtrl={$addControl:noop,$$renameControl:nullFormRenameControl,$removeControl:noop,$setValidity:noop,$setDirty:noop,$setPristine:noop,$setSubmitted:noop},SUBMITTED_CLASS="ng-submitted";FormController.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var formDirectiveFactory=function(isNgForm){return["$timeout",function($timeout){var formDirective={name:"form",restrict:isNgForm?"EAC":"E",controller:FormController,compile:function(formElement){return formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS),{pre:function(scope,formElement,attr,controller){if(!("action"in attr)){var handleFormSubmission=function(event){scope.$apply(function(){controller.$commitViewValue(),controller.$setSubmitted()}),event.preventDefault()};addEventListenerFn(formElement[0],"submit",handleFormSubmission),formElement.on("$destroy",function(){$timeout(function(){removeEventListenerFn(formElement[0],"submit",handleFormSubmission)},0,!1)})}var parentFormCtrl=controller.$$parentForm,alias=controller.$name;alias&&(setter(scope,null,alias,controller,alias),attr.$observe(attr.name?"name":"ngForm",function(newValue){alias!==newValue&&(setter(scope,null,alias,undefined,alias),alias=newValue,setter(scope,null,alias,controller,alias),parentFormCtrl.$$renameControl(controller,alias))})),formElement.on("$destroy",function(){parentFormCtrl.$removeControl(controller),alias&&setter(scope,null,alias,undefined,alias),extend(controller,nullFormCtrl)})}}}};return formDirective}]},formDirective=formDirectiveFactory(),ngFormDirective=formDirectiveFactory(!0),ISO_DATE_REGEXP=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,URL_REGEXP=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,EMAIL_REGEXP=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,NUMBER_REGEXP=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,DATE_REGEXP=/^(\d{4})-(\d{2})-(\d{2})$/,DATETIMELOCAL_REGEXP=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,WEEK_REGEXP=/^(\d{4})-W(\d\d)$/,MONTH_REGEXP=/^(\d{4})-(\d\d)$/,TIME_REGEXP=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,inputType={text:textInputType,date:createDateInputType("date",DATE_REGEXP,createDateParser(DATE_REGEXP,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":createDateInputType("datetimelocal",DATETIMELOCAL_REGEXP,createDateParser(DATETIMELOCAL_REGEXP,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:createDateInputType("time",TIME_REGEXP,createDateParser(TIME_REGEXP,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:createDateInputType("week",WEEK_REGEXP,weekParser,"yyyy-Www"),month:createDateInputType("month",MONTH_REGEXP,createDateParser(MONTH_REGEXP,["yyyy","MM"]),"yyyy-MM"),number:numberInputType,url:urlInputType,email:emailInputType,radio:radioInputType,checkbox:checkboxInputType,hidden:noop,button:noop,submit:noop,reset:noop,file:noop},inputDirective=["$browser","$sniffer","$filter","$parse",function($browser,$sniffer,$filter,$parse){return{restrict:"E",require:["?ngModel"],link:{pre:function(scope,element,attr,ctrls){ctrls[0]&&(inputType[lowercase(attr.type)]||inputType.text)(scope,element,attr,ctrls[0],$sniffer,$browser,$filter,$parse)}}}}],CONSTANT_VALUE_REGEXP=/^(true|false|\d+)$/,ngValueDirective=function(){return{restrict:"A",priority:100,compile:function(tpl,tplAttr){return CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)?function(scope,elm,attr){attr.$set("value",scope.$eval(attr.ngValue))}:function(scope,elm,attr){scope.$watch(attr.ngValue,function(value){attr.$set("value",value)})}}}},ngBindDirective=["$compile",function($compile){return{restrict:"AC",compile:function(templateElement){return $compile.$$addBindingClass(templateElement),function(scope,element,attr){$compile.$$addBindingInfo(element,attr.ngBind),element=element[0],scope.$watch(attr.ngBind,function(value){element.textContent=value===undefined?"":value})}}}}],ngBindTemplateDirective=["$interpolate","$compile",function($interpolate,$compile){return{compile:function(templateElement){return $compile.$$addBindingClass(templateElement),function(scope,element,attr){var interpolateFn=$interpolate(element.attr(attr.$attr.ngBindTemplate));$compile.$$addBindingInfo(element,interpolateFn.expressions),element=element[0],attr.$observe("ngBindTemplate",function(value){element.textContent=value===undefined?"":value})}}}}],ngBindHtmlDirective=["$sce","$parse","$compile",function($sce,$parse,$compile){return{restrict:"A",compile:function(tElement,tAttrs){var ngBindHtmlGetter=$parse(tAttrs.ngBindHtml),ngBindHtmlWatch=$parse(tAttrs.ngBindHtml,function(value){return(value||"").toString()});return $compile.$$addBindingClass(tElement),function(scope,element,attr){$compile.$$addBindingInfo(element,attr.ngBindHtml),scope.$watch(ngBindHtmlWatch,function(){element.html($sce.getTrustedHtml(ngBindHtmlGetter(scope))||"")})}}}}],ngChangeDirective=valueFn({restrict:"A",require:"ngModel",link:function(scope,element,attr,ctrl){ctrl.$viewChangeListeners.push(function(){scope.$eval(attr.ngChange)})}}),ngClassDirective=classDirective("",!0),ngClassOddDirective=classDirective("Odd",0),ngClassEvenDirective=classDirective("Even",1),ngCloakDirective=ngDirective({compile:function(element,attr){attr.$set("ngCloak",undefined),element.removeClass("ng-cloak")}}),ngControllerDirective=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ngEventDirectives={},forceAsyncEvents={blur:!0,focus:!0};forEach("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(eventName){var directiveName=directiveNormalize("ng-"+eventName);ngEventDirectives[directiveName]=["$parse","$rootScope",function($parse,$rootScope){return{restrict:"A",compile:function($element,attr){var fn=$parse(attr[directiveName],null,!0);return function(scope,element){element.on(eventName,function(event){var callback=function(){fn(scope,{$event:event})};forceAsyncEvents[eventName]&&$rootScope.$$phase?scope.$evalAsync(callback):scope.$apply(callback)})}}}}]});var ngIfDirective=["$animate",function($animate){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function($scope,$element,$attr,ctrl,$transclude){var block,childScope,previousElements;$scope.$watch($attr.ngIf,function(value){value?childScope||$transclude(function(clone,newScope){childScope=newScope,clone[clone.length++]=document.createComment(" end ngIf: "+$attr.ngIf+" "),block={clone:clone},$animate.enter(clone,$element.parent(),$element)}):(previousElements&&(previousElements.remove(),previousElements=null),childScope&&(childScope.$destroy(),childScope=null),block&&(previousElements=getBlockNodes(block.clone),$animate.leave(previousElements).then(function(){previousElements=null}),block=null))})}}}],ngIncludeDirective=["$templateRequest","$anchorScroll","$animate","$sce",function($templateRequest,$anchorScroll,$animate,$sce){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:angular.noop,compile:function(element,attr){var srcExp=attr.ngInclude||attr.src,onloadExp=attr.onload||"",autoScrollExp=attr.autoscroll;return function(scope,$element,$attr,ctrl,$transclude){var currentScope,previousElement,currentElement,changeCounter=0,cleanupLastIncludeContent=function(){previousElement&&(previousElement.remove(),previousElement=null),currentScope&&(currentScope.$destroy(),currentScope=null),currentElement&&($animate.leave(currentElement).then(function(){previousElement=null}),previousElement=currentElement,currentElement=null)};scope.$watch($sce.parseAsResourceUrl(srcExp),function(src){var afterAnimation=function(){!isDefined(autoScrollExp)||autoScrollExp&&!scope.$eval(autoScrollExp)||$anchorScroll()},thisChangeId=++changeCounter;src?($templateRequest(src,!0).then(function(response){if(thisChangeId===changeCounter){var newScope=scope.$new();ctrl.template=response;var clone=$transclude(newScope,function(clone){cleanupLastIncludeContent(),$animate.enter(clone,null,$element).then(afterAnimation)});currentScope=newScope,currentElement=clone,currentScope.$emit("$includeContentLoaded",src),scope.$eval(onloadExp)}},function(){thisChangeId===changeCounter&&(cleanupLastIncludeContent(),scope.$emit("$includeContentError",src))}),scope.$emit("$includeContentRequested",src)):(cleanupLastIncludeContent(),ctrl.template=null)})}}}}],ngIncludeFillContentDirective=["$compile",function($compile){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(scope,$element,$attr,ctrl){return/SVG/.test($element[0].toString())?($element.empty(),void $compile(jqLiteBuildFragment(ctrl.template,document).childNodes)(scope,function(clone){$element.append(clone)},{futureParentElement:$element})):($element.html(ctrl.template),void $compile($element.contents())(scope))}}}],ngInitDirective=ngDirective({priority:450,compile:function(){return{pre:function(scope,element,attrs){scope.$eval(attrs.ngInit)}}}}),ngListDirective=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(scope,element,attr,ctrl){var ngList=element.attr(attr.$attr.ngList)||", ",trimValues="false"!==attr.ngTrim,separator=trimValues?trim(ngList):ngList,parse=function(viewValue){if(!isUndefined(viewValue)){var list=[];return viewValue&&forEach(viewValue.split(separator),function(value){value&&list.push(trimValues?trim(value):value)}),list}};ctrl.$parsers.push(parse),ctrl.$formatters.push(function(value){return isArray(value)?value.join(ngList):undefined}),ctrl.$isEmpty=function(value){return!value||!value.length}}}},VALID_CLASS="ng-valid",INVALID_CLASS="ng-invalid",PRISTINE_CLASS="ng-pristine",DIRTY_CLASS="ng-dirty",UNTOUCHED_CLASS="ng-untouched",TOUCHED_CLASS="ng-touched",PENDING_CLASS="ng-pending",$ngModelMinErr=new minErr("ngModel"),NgModelController=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function($scope,$exceptionHandler,$attr,$element,$parse,$animate,$timeout,$rootScope,$q,$interpolate){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=undefined,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=undefined,this.$name=$interpolate($attr.name||"",!1)($scope);var parsedNgModel=$parse($attr.ngModel),parsedNgModelAssign=parsedNgModel.assign,ngModelGet=parsedNgModel,ngModelSet=parsedNgModelAssign,pendingDebounce=null,ctrl=this;this.$$setOptions=function(options){if(ctrl.$options=options,options&&options.getterSetter){var invokeModelGetter=$parse($attr.ngModel+"()"),invokeModelSetter=$parse($attr.ngModel+"($$$p)");ngModelGet=function($scope){var modelValue=parsedNgModel($scope);return isFunction(modelValue)&&(modelValue=invokeModelGetter($scope)),modelValue},ngModelSet=function($scope){isFunction(parsedNgModel($scope))?invokeModelSetter($scope,{$$$p:ctrl.$modelValue}):parsedNgModelAssign($scope,ctrl.$modelValue)}}else if(!parsedNgModel.assign)throw $ngModelMinErr("nonassign","Expression '{0}' is non-assignable. Element: {1}",$attr.ngModel,startingTag($element))},this.$render=noop,this.$isEmpty=function(value){return isUndefined(value)||""===value||null===value||value!==value};var parentForm=$element.inheritedData("$formController")||nullFormCtrl,currentValidationRunId=0;addSetValidityMethod({ctrl:this,$element:$element,set:function(object,property){object[property]=!0},unset:function(object,property){delete object[property]},parentForm:parentForm,$animate:$animate}),this.$setPristine=function(){ctrl.$dirty=!1,ctrl.$pristine=!0,$animate.removeClass($element,DIRTY_CLASS),$animate.addClass($element,PRISTINE_CLASS)},this.$setDirty=function(){ctrl.$dirty=!0,ctrl.$pristine=!1,$animate.removeClass($element,PRISTINE_CLASS),$animate.addClass($element,DIRTY_CLASS),parentForm.$setDirty()},this.$setUntouched=function(){ctrl.$touched=!1,ctrl.$untouched=!0,$animate.setClass($element,UNTOUCHED_CLASS,TOUCHED_CLASS)},this.$setTouched=function(){ctrl.$touched=!0,ctrl.$untouched=!1,$animate.setClass($element,TOUCHED_CLASS,UNTOUCHED_CLASS)},this.$rollbackViewValue=function(){$timeout.cancel(pendingDebounce),ctrl.$viewValue=ctrl.$$lastCommittedViewValue,ctrl.$render()},this.$validate=function(){if(!isNumber(ctrl.$modelValue)||!isNaN(ctrl.$modelValue)){var viewValue=ctrl.$$lastCommittedViewValue,modelValue=ctrl.$$rawModelValue,parserName=ctrl.$$parserName||"parse",parserValid=ctrl.$error[parserName]?!1:undefined,prevValid=ctrl.$valid,prevModelValue=ctrl.$modelValue,allowInvalid=ctrl.$options&&ctrl.$options.allowInvalid;ctrl.$$runValidators(parserValid,modelValue,viewValue,function(allValid){allowInvalid||prevValid===allValid||(ctrl.$modelValue=allValid?modelValue:undefined,ctrl.$modelValue!==prevModelValue&&ctrl.$$writeModelToScope())})}},this.$$runValidators=function(parseValid,modelValue,viewValue,doneCallback){function processParseErrors(parseValid){var errorKey=ctrl.$$parserName||"parse";if(parseValid===undefined)setValidity(errorKey,null);else if(setValidity(errorKey,parseValid),!parseValid)return forEach(ctrl.$validators,function(v,name){setValidity(name,null)}),forEach(ctrl.$asyncValidators,function(v,name){setValidity(name,null)}),!1;return!0}function processSyncValidators(){var syncValidatorsValid=!0;return forEach(ctrl.$validators,function(validator,name){var result=validator(modelValue,viewValue);syncValidatorsValid=syncValidatorsValid&&result,setValidity(name,result)}),syncValidatorsValid?!0:(forEach(ctrl.$asyncValidators,function(v,name){setValidity(name,null)}),!1)}function processAsyncValidators(){var validatorPromises=[],allValid=!0;forEach(ctrl.$asyncValidators,function(validator,name){var promise=validator(modelValue,viewValue);if(!isPromiseLike(promise))throw $ngModelMinErr("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",promise);setValidity(name,undefined),validatorPromises.push(promise.then(function(){setValidity(name,!0)},function(){allValid=!1,setValidity(name,!1)}))}),validatorPromises.length?$q.all(validatorPromises).then(function(){validationDone(allValid)},noop):validationDone(!0)}function setValidity(name,isValid){localValidationRunId===currentValidationRunId&&ctrl.$setValidity(name,isValid)}function validationDone(allValid){localValidationRunId===currentValidationRunId&&doneCallback(allValid)}currentValidationRunId++;var localValidationRunId=currentValidationRunId;return processParseErrors(parseValid)&&processSyncValidators()?void processAsyncValidators():void validationDone(!1)},this.$commitViewValue=function(){var viewValue=ctrl.$viewValue;$timeout.cancel(pendingDebounce),(ctrl.$$lastCommittedViewValue!==viewValue||""===viewValue&&ctrl.$$hasNativeValidators)&&(ctrl.$$lastCommittedViewValue=viewValue,ctrl.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function writeToModelIfNeeded(){ctrl.$modelValue!==prevModelValue&&ctrl.$$writeModelToScope()}var viewValue=ctrl.$$lastCommittedViewValue,modelValue=viewValue,parserValid=isUndefined(modelValue)?undefined:!0;if(parserValid)for(var i=0;i<ctrl.$parsers.length;i++)if(modelValue=ctrl.$parsers[i](modelValue),isUndefined(modelValue)){parserValid=!1;break}isNumber(ctrl.$modelValue)&&isNaN(ctrl.$modelValue)&&(ctrl.$modelValue=ngModelGet($scope));var prevModelValue=ctrl.$modelValue,allowInvalid=ctrl.$options&&ctrl.$options.allowInvalid;ctrl.$$rawModelValue=modelValue,allowInvalid&&(ctrl.$modelValue=modelValue,writeToModelIfNeeded()),ctrl.$$runValidators(parserValid,modelValue,ctrl.$$lastCommittedViewValue,function(allValid){allowInvalid||(ctrl.$modelValue=allValid?modelValue:undefined,writeToModelIfNeeded())})},this.$$writeModelToScope=function(){ngModelSet($scope,ctrl.$modelValue),forEach(ctrl.$viewChangeListeners,function(listener){try{listener()}catch(e){$exceptionHandler(e)}})},this.$setViewValue=function(value,trigger){ctrl.$viewValue=value,(!ctrl.$options||ctrl.$options.updateOnDefault)&&ctrl.$$debounceViewValueCommit(trigger)},this.$$debounceViewValueCommit=function(trigger){var debounce,debounceDelay=0,options=ctrl.$options;options&&isDefined(options.debounce)&&(debounce=options.debounce,isNumber(debounce)?debounceDelay=debounce:isNumber(debounce[trigger])?debounceDelay=debounce[trigger]:isNumber(debounce["default"])&&(debounceDelay=debounce["default"])),$timeout.cancel(pendingDebounce),debounceDelay?pendingDebounce=$timeout(function(){ctrl.$commitViewValue()},debounceDelay):$rootScope.$$phase?ctrl.$commitViewValue():$scope.$apply(function(){ctrl.$commitViewValue()})},$scope.$watch(function(){var modelValue=ngModelGet($scope);if(modelValue!==ctrl.$modelValue){ctrl.$modelValue=ctrl.$$rawModelValue=modelValue;for(var formatters=ctrl.$formatters,idx=formatters.length,viewValue=modelValue;idx--;)viewValue=formatters[idx](viewValue);ctrl.$viewValue!==viewValue&&(ctrl.$viewValue=ctrl.$$lastCommittedViewValue=viewValue,ctrl.$render(),ctrl.$$runValidators(undefined,modelValue,viewValue,noop))}return modelValue})}],ngModelDirective=["$rootScope",function($rootScope){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:NgModelController,priority:1,compile:function(element){return element.addClass(PRISTINE_CLASS).addClass(UNTOUCHED_CLASS).addClass(VALID_CLASS),{pre:function(scope,element,attr,ctrls){var modelCtrl=ctrls[0],formCtrl=ctrls[1]||nullFormCtrl;modelCtrl.$$setOptions(ctrls[2]&&ctrls[2].$options),formCtrl.$addControl(modelCtrl),attr.$observe("name",function(newValue){modelCtrl.$name!==newValue&&formCtrl.$$renameControl(modelCtrl,newValue)}),scope.$on("$destroy",function(){formCtrl.$removeControl(modelCtrl)})},post:function(scope,element,attr,ctrls){var modelCtrl=ctrls[0];modelCtrl.$options&&modelCtrl.$options.updateOn&&element.on(modelCtrl.$options.updateOn,function(ev){modelCtrl.$$debounceViewValueCommit(ev&&ev.type)}),element.on("blur",function(){modelCtrl.$touched||($rootScope.$$phase?scope.$evalAsync(modelCtrl.$setTouched):scope.$apply(modelCtrl.$setTouched))})}}}}}],DEFAULT_REGEXP=/(\s+|^)default(\s+|$)/,ngModelOptionsDirective=function(){return{restrict:"A",controller:["$scope","$attrs",function($scope,$attrs){var that=this;this.$options=$scope.$eval($attrs.ngModelOptions),this.$options.updateOn!==undefined?(this.$options.updateOnDefault=!1,this.$options.updateOn=trim(this.$options.updateOn.replace(DEFAULT_REGEXP,function(){return that.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},ngNonBindableDirective=ngDirective({terminal:!0,priority:1e3}),ngPluralizeDirective=["$locale","$interpolate",function($locale,$interpolate){var BRACE=/{}/g,IS_WHEN=/^when(Minus)?(.+)$/;return{restrict:"EA",link:function(scope,element,attr){function updateElementText(newText){element.text(newText||"")}var lastCount,numberExp=attr.count,whenExp=attr.$attr.when&&element.attr(attr.$attr.when),offset=attr.offset||0,whens=scope.$eval(whenExp)||{},whensExpFns={},startSymbol=$interpolate.startSymbol(),endSymbol=$interpolate.endSymbol(),braceReplacement=startSymbol+numberExp+"-"+offset+endSymbol,watchRemover=angular.noop;forEach(attr,function(expression,attributeName){var tmpMatch=IS_WHEN.exec(attributeName);if(tmpMatch){var whenKey=(tmpMatch[1]?"-":"")+lowercase(tmpMatch[2]);whens[whenKey]=element.attr(attr.$attr[attributeName])}}),forEach(whens,function(expression,key){whensExpFns[key]=$interpolate(expression.replace(BRACE,braceReplacement))}),scope.$watch(numberExp,function(newVal){var count=parseFloat(newVal),countIsNaN=isNaN(count);countIsNaN||count in whens||(count=$locale.pluralCat(count-offset)),count===lastCount||countIsNaN&&isNaN(lastCount)||(watchRemover(),watchRemover=scope.$watch(whensExpFns[count],updateElementText),lastCount=count)})}}}],ngRepeatDirective=["$parse","$animate",function($parse,$animate){var NG_REMOVED="$$NG_REMOVED",ngRepeatMinErr=minErr("ngRepeat"),updateScope=function(scope,index,valueIdentifier,value,keyIdentifier,key,arrayLength){scope[valueIdentifier]=value,keyIdentifier&&(scope[keyIdentifier]=key),scope.$index=index,scope.$first=0===index,scope.$last=index===arrayLength-1,scope.$middle=!(scope.$first||scope.$last),scope.$odd=!(scope.$even=0===(1&index))},getBlockStart=function(block){return block.clone[0]},getBlockEnd=function(block){return block.clone[block.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function($element,$attr){var expression=$attr.ngRepeat,ngRepeatEndComment=document.createComment(" end ngRepeat: "+expression+" "),match=expression.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!match)throw ngRepeatMinErr("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",expression);var lhs=match[1],rhs=match[2],aliasAs=match[3],trackByExp=match[4];if(match=lhs.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!match)throw ngRepeatMinErr("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",lhs);var valueIdentifier=match[3]||match[1],keyIdentifier=match[2];if(aliasAs&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(aliasAs)))throw ngRepeatMinErr("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",aliasAs);var trackByExpGetter,trackByIdExpFn,trackByIdArrayFn,trackByIdObjFn,hashFnLocals={$id:hashKey};return trackByExp?trackByExpGetter=$parse(trackByExp):(trackByIdArrayFn=function(key,value){return hashKey(value)},trackByIdObjFn=function(key){return key}),function($scope,$element,$attr,ctrl,$transclude){trackByExpGetter&&(trackByIdExpFn=function(key,value,index){return keyIdentifier&&(hashFnLocals[keyIdentifier]=key),hashFnLocals[valueIdentifier]=value,hashFnLocals.$index=index,trackByExpGetter($scope,hashFnLocals)});var lastBlockMap=createMap();$scope.$watchCollection(rhs,function(collection){var index,length,nextNode,collectionLength,key,value,trackById,trackByIdFn,collectionKeys,block,nextBlockOrder,elementsToRemove,previousNode=$element[0],nextBlockMap=createMap();if(aliasAs&&($scope[aliasAs]=collection),isArrayLike(collection))collectionKeys=collection,trackByIdFn=trackByIdExpFn||trackByIdArrayFn;else{trackByIdFn=trackByIdExpFn||trackByIdObjFn,collectionKeys=[];for(var itemKey in collection)collection.hasOwnProperty(itemKey)&&"$"!=itemKey.charAt(0)&&collectionKeys.push(itemKey);collectionKeys.sort()}for(collectionLength=collectionKeys.length,nextBlockOrder=new Array(collectionLength),index=0;collectionLength>index;index++)if(key=collection===collectionKeys?index:collectionKeys[index],value=collection[key],trackById=trackByIdFn(key,value,index),lastBlockMap[trackById])block=lastBlockMap[trackById],delete lastBlockMap[trackById],nextBlockMap[trackById]=block,nextBlockOrder[index]=block;else{if(nextBlockMap[trackById])throw forEach(nextBlockOrder,function(block){block&&block.scope&&(lastBlockMap[block.id]=block)}),ngRepeatMinErr("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",expression,trackById,value);nextBlockOrder[index]={id:trackById,scope:undefined,clone:undefined},nextBlockMap[trackById]=!0}for(var blockKey in lastBlockMap){if(block=lastBlockMap[blockKey],elementsToRemove=getBlockNodes(block.clone),$animate.leave(elementsToRemove),elementsToRemove[0].parentNode)for(index=0,length=elementsToRemove.length;length>index;index++)elementsToRemove[index][NG_REMOVED]=!0;block.scope.$destroy()}for(index=0;collectionLength>index;index++)if(key=collection===collectionKeys?index:collectionKeys[index],value=collection[key],block=nextBlockOrder[index],block.scope){nextNode=previousNode;do nextNode=nextNode.nextSibling;while(nextNode&&nextNode[NG_REMOVED]);getBlockStart(block)!=nextNode&&$animate.move(getBlockNodes(block.clone),null,jqLite(previousNode)),previousNode=getBlockEnd(block),updateScope(block.scope,index,valueIdentifier,value,keyIdentifier,key,collectionLength)}else $transclude(function(clone,scope){block.scope=scope;var endNode=ngRepeatEndComment.cloneNode(!1);clone[clone.length++]=endNode,$animate.enter(clone,null,jqLite(previousNode)),previousNode=endNode,block.clone=clone,nextBlockMap[block.id]=block,updateScope(block.scope,index,valueIdentifier,value,keyIdentifier,key,collectionLength)
});lastBlockMap=nextBlockMap})}}}}],NG_HIDE_CLASS="ng-hide",NG_HIDE_IN_PROGRESS_CLASS="ng-hide-animate",ngShowDirective=["$animate",function($animate){return{restrict:"A",multiElement:!0,link:function(scope,element,attr){scope.$watch(attr.ngShow,function(value){$animate[value?"removeClass":"addClass"](element,NG_HIDE_CLASS,{tempClasses:NG_HIDE_IN_PROGRESS_CLASS})})}}}],ngHideDirective=["$animate",function($animate){return{restrict:"A",multiElement:!0,link:function(scope,element,attr){scope.$watch(attr.ngHide,function(value){$animate[value?"addClass":"removeClass"](element,NG_HIDE_CLASS,{tempClasses:NG_HIDE_IN_PROGRESS_CLASS})})}}}],ngStyleDirective=ngDirective(function(scope,element,attr){scope.$watchCollection(attr.ngStyle,function(newStyles,oldStyles){oldStyles&&newStyles!==oldStyles&&forEach(oldStyles,function(val,style){element.css(style,"")}),newStyles&&element.css(newStyles)})}),ngSwitchDirective=["$animate",function($animate){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(scope,element,attr,ngSwitchController){var watchExpr=attr.ngSwitch||attr.on,selectedTranscludes=[],selectedElements=[],previousLeaveAnimations=[],selectedScopes=[],spliceFactory=function(array,index){return function(){array.splice(index,1)}};scope.$watch(watchExpr,function(value){var i,ii;for(i=0,ii=previousLeaveAnimations.length;ii>i;++i)$animate.cancel(previousLeaveAnimations[i]);for(previousLeaveAnimations.length=0,i=0,ii=selectedScopes.length;ii>i;++i){var selected=getBlockNodes(selectedElements[i].clone);selectedScopes[i].$destroy();var promise=previousLeaveAnimations[i]=$animate.leave(selected);promise.then(spliceFactory(previousLeaveAnimations,i))}selectedElements.length=0,selectedScopes.length=0,(selectedTranscludes=ngSwitchController.cases["!"+value]||ngSwitchController.cases["?"])&&forEach(selectedTranscludes,function(selectedTransclude){selectedTransclude.transclude(function(caseElement,selectedScope){selectedScopes.push(selectedScope);var anchor=selectedTransclude.element;caseElement[caseElement.length++]=document.createComment(" end ngSwitchWhen: ");var block={clone:caseElement};selectedElements.push(block),$animate.enter(caseElement,anchor.parent(),anchor)})})})}}}],ngSwitchWhenDirective=ngDirective({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(scope,element,attrs,ctrl,$transclude){ctrl.cases["!"+attrs.ngSwitchWhen]=ctrl.cases["!"+attrs.ngSwitchWhen]||[],ctrl.cases["!"+attrs.ngSwitchWhen].push({transclude:$transclude,element:element})}}),ngSwitchDefaultDirective=ngDirective({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(scope,element,attr,ctrl,$transclude){ctrl.cases["?"]=ctrl.cases["?"]||[],ctrl.cases["?"].push({transclude:$transclude,element:element})}}),ngTranscludeDirective=ngDirective({restrict:"EAC",link:function($scope,$element,$attrs,controller,$transclude){if(!$transclude)throw minErr("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",startingTag($element));$transclude(function(clone){$element.empty(),$element.append(clone)})}}),scriptDirective=["$templateCache",function($templateCache){return{restrict:"E",terminal:!0,compile:function(element,attr){if("text/ng-template"==attr.type){var templateUrl=attr.id,text=element[0].text;$templateCache.put(templateUrl,text)}}}}],ngOptionsMinErr=minErr("ngOptions"),ngOptionsDirective=valueFn({restrict:"A",terminal:!0}),selectDirective=["$compile","$parse",function($compile,$parse){var NG_OPTIONS_REGEXP=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\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]+?))?$/,nullModelCtrl={$setViewValue:noop};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function($element,$scope,$attrs){var nullOption,unknownOption,self=this,optionsMap={},ngModelCtrl=nullModelCtrl;self.databound=$attrs.ngModel,self.init=function(ngModelCtrl_,nullOption_,unknownOption_){ngModelCtrl=ngModelCtrl_,nullOption=nullOption_,unknownOption=unknownOption_},self.addOption=function(value,element){assertNotHasOwnProperty(value,'"option value"'),optionsMap[value]=!0,ngModelCtrl.$viewValue==value&&($element.val(value),unknownOption.parent()&&unknownOption.remove()),element&&element[0].hasAttribute("selected")&&(element[0].selected=!0)},self.removeOption=function(value){this.hasOption(value)&&(delete optionsMap[value],ngModelCtrl.$viewValue===value&&this.renderUnknownOption(value))},self.renderUnknownOption=function(val){var unknownVal="? "+hashKey(val)+" ?";unknownOption.val(unknownVal),$element.prepend(unknownOption),$element.val(unknownVal),unknownOption.prop("selected",!0)},self.hasOption=function(value){return optionsMap.hasOwnProperty(value)},$scope.$on("$destroy",function(){self.renderUnknownOption=noop})}],link:function(scope,element,attr,ctrls){function setupAsSingle(scope,selectElement,ngModelCtrl,selectCtrl){ngModelCtrl.$render=function(){var viewValue=ngModelCtrl.$viewValue;selectCtrl.hasOption(viewValue)?(unknownOption.parent()&&unknownOption.remove(),selectElement.val(viewValue),""===viewValue&&emptyOption.prop("selected",!0)):isUndefined(viewValue)&&emptyOption?selectElement.val(""):selectCtrl.renderUnknownOption(viewValue)},selectElement.on("change",function(){scope.$apply(function(){unknownOption.parent()&&unknownOption.remove(),ngModelCtrl.$setViewValue(selectElement.val())})})}function setupAsMultiple(scope,selectElement,ctrl){var lastView;ctrl.$render=function(){var items=new HashMap(ctrl.$viewValue);forEach(selectElement.find("option"),function(option){option.selected=isDefined(items.get(option.value))})},scope.$watch(function(){equals(lastView,ctrl.$viewValue)||(lastView=shallowCopy(ctrl.$viewValue),ctrl.$render())}),selectElement.on("change",function(){scope.$apply(function(){var array=[];forEach(selectElement.find("option"),function(option){option.selected&&array.push(option.value)}),ctrl.$setViewValue(array)})})}function setupAsOptions(scope,selectElement,ctrl){function callExpression(exprFn,key,value){return locals[valueName]=value,keyName&&(locals[keyName]=key),exprFn(scope,locals)}function selectionChanged(){scope.$apply(function(){var viewValue,collection=valuesFn(scope)||[];if(multiple)viewValue=[],forEach(selectElement.val(),function(selectedKey){selectedKey=trackFn?trackKeysCache[selectedKey]:selectedKey,viewValue.push(getViewValue(selectedKey,collection[selectedKey]))});else{var selectedKey=trackFn?trackKeysCache[selectElement.val()]:selectElement.val();viewValue=getViewValue(selectedKey,collection[selectedKey])}ctrl.$setViewValue(viewValue),render()})}function getViewValue(key,value){if("?"===key)return undefined;if(""===key)return null;var viewValueFn=selectAsFn?selectAsFn:valueFn;return callExpression(viewValueFn,key,value)}function getLabels(){var toDisplay,values=valuesFn(scope);if(values&&isArray(values)){toDisplay=new Array(values.length);for(var i=0,ii=values.length;ii>i;i++)toDisplay[i]=callExpression(displayFn,i,values[i]);return toDisplay}if(values){toDisplay={};for(var prop in values)values.hasOwnProperty(prop)&&(toDisplay[prop]=callExpression(displayFn,prop,values[prop]))}return toDisplay}function createIsSelectedFn(viewValue){var selectedSet;if(multiple)if(trackFn&&isArray(viewValue)){selectedSet=new HashMap([]);for(var trackIndex=0;trackIndex<viewValue.length;trackIndex++)selectedSet.put(callExpression(trackFn,null,viewValue[trackIndex]),!0)}else selectedSet=new HashMap(viewValue);else trackFn&&(viewValue=callExpression(trackFn,null,viewValue));return function(key,value){var compareValueFn;return compareValueFn=trackFn?trackFn:selectAsFn?selectAsFn:valueFn,multiple?isDefined(selectedSet.remove(callExpression(compareValueFn,key,value))):viewValue===callExpression(compareValueFn,key,value)}}function scheduleRendering(){renderScheduled||(scope.$$postDigest(render),renderScheduled=!0)}function updateLabelMap(labelMap,label,added){labelMap[label]=labelMap[label]||0,labelMap[label]+=added?1:-1}function render(){renderScheduled=!1;var optionGroupName,optionGroup,option,existingParent,existingOptions,existingOption,key,value,groupLength,length,groupIndex,index,selected,lastElement,element,label,optionId,optionGroups={"":[]},optionGroupNames=[""],viewValue=ctrl.$viewValue,values=valuesFn(scope)||[],keys=keyName?sortedKeys(values):values,labelMap={},isSelected=createIsSelectedFn(viewValue),anySelected=!1;for(trackKeysCache={},index=0;length=keys.length,length>index;index++)key=index,keyName&&(key=keys[index],"$"===key.charAt(0))||(value=values[key],optionGroupName=callExpression(groupByFn,key,value)||"",(optionGroup=optionGroups[optionGroupName])||(optionGroup=optionGroups[optionGroupName]=[],optionGroupNames.push(optionGroupName)),selected=isSelected(key,value),anySelected=anySelected||selected,label=callExpression(displayFn,key,value),label=isDefined(label)?label:"",optionId=trackFn?trackFn(scope,locals):keyName?keys[index]:index,trackFn&&(trackKeysCache[optionId]=key),optionGroup.push({id:optionId,label:label,selected:selected}));for(multiple||(nullOption||null===viewValue?optionGroups[""].unshift({id:"",label:"",selected:!anySelected}):anySelected||optionGroups[""].unshift({id:"?",label:"",selected:!0})),groupIndex=0,groupLength=optionGroupNames.length;groupLength>groupIndex;groupIndex++){for(optionGroupName=optionGroupNames[groupIndex],optionGroup=optionGroups[optionGroupName],optionGroupsCache.length<=groupIndex?(existingParent={element:optGroupTemplate.clone().attr("label",optionGroupName),label:optionGroup.label},existingOptions=[existingParent],optionGroupsCache.push(existingOptions),selectElement.append(existingParent.element)):(existingOptions=optionGroupsCache[groupIndex],existingParent=existingOptions[0],existingParent.label!=optionGroupName&&existingParent.element.attr("label",existingParent.label=optionGroupName)),lastElement=null,index=0,length=optionGroup.length;length>index;index++)option=optionGroup[index],(existingOption=existingOptions[index+1])?(lastElement=existingOption.element,existingOption.label!==option.label&&(updateLabelMap(labelMap,existingOption.label,!1),updateLabelMap(labelMap,option.label,!0),lastElement.text(existingOption.label=option.label),lastElement.prop("label",existingOption.label)),existingOption.id!==option.id&&lastElement.val(existingOption.id=option.id),lastElement[0].selected!==option.selected&&(lastElement.prop("selected",existingOption.selected=option.selected),msie&&lastElement.prop("selected",existingOption.selected))):(""===option.id&&nullOption?element=nullOption:(element=optionTemplate.clone()).val(option.id).prop("selected",option.selected).attr("selected",option.selected).prop("label",option.label).text(option.label),existingOptions.push(existingOption={element:element,label:option.label,id:option.id,selected:option.selected}),updateLabelMap(labelMap,option.label,!0),lastElement?lastElement.after(element):existingParent.element.append(element),lastElement=element);for(index++;existingOptions.length>index;)option=existingOptions.pop(),updateLabelMap(labelMap,option.label,!1),option.element.remove()}for(;optionGroupsCache.length>groupIndex;){for(optionGroup=optionGroupsCache.pop(),index=1;index<optionGroup.length;++index)updateLabelMap(labelMap,optionGroup[index].label,!1);optionGroup[0].element.remove()}forEach(labelMap,function(count,label){count>0?selectCtrl.addOption(label):0>count&&selectCtrl.removeOption(label)})}var match;if(!(match=optionsExp.match(NG_OPTIONS_REGEXP)))throw ngOptionsMinErr("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",optionsExp,startingTag(selectElement));var displayFn=$parse(match[2]||match[1]),valueName=match[4]||match[6],selectAs=/ as /.test(match[0])&&match[1],selectAsFn=selectAs?$parse(selectAs):null,keyName=match[5],groupByFn=$parse(match[3]||""),valueFn=$parse(match[2]?match[1]:valueName),valuesFn=$parse(match[7]),track=match[8],trackFn=track?$parse(match[8]):null,trackKeysCache={},optionGroupsCache=[[{element:selectElement,label:""}]],locals={};nullOption&&($compile(nullOption)(scope),nullOption.removeClass("ng-scope"),nullOption.remove()),selectElement.empty(),selectElement.on("change",selectionChanged),ctrl.$render=render,scope.$watchCollection(valuesFn,scheduleRendering),scope.$watchCollection(getLabels,scheduleRendering),multiple&&scope.$watchCollection(function(){return ctrl.$modelValue},scheduleRendering)}if(ctrls[1]){for(var emptyOption,selectCtrl=ctrls[0],ngModelCtrl=ctrls[1],multiple=attr.multiple,optionsExp=attr.ngOptions,nullOption=!1,renderScheduled=!1,optionTemplate=jqLite(document.createElement("option")),optGroupTemplate=jqLite(document.createElement("optgroup")),unknownOption=optionTemplate.clone(),i=0,children=element.children(),ii=children.length;ii>i;i++)if(""===children[i].value){emptyOption=nullOption=children.eq(i);break}selectCtrl.init(ngModelCtrl,nullOption,unknownOption),multiple&&(ngModelCtrl.$isEmpty=function(value){return!value||0===value.length}),optionsExp?setupAsOptions(scope,element,ngModelCtrl):multiple?setupAsMultiple(scope,element,ngModelCtrl):setupAsSingle(scope,element,ngModelCtrl,selectCtrl)}}}}],optionDirective=["$interpolate",function($interpolate){var nullSelectCtrl={addOption:noop,removeOption:noop};return{restrict:"E",priority:100,compile:function(element,attr){if(isUndefined(attr.value)){var interpolateFn=$interpolate(element.text(),!0);interpolateFn||attr.$set("value",element.text())}return function(scope,element,attr){var selectCtrlName="$selectController",parent=element.parent(),selectCtrl=parent.data(selectCtrlName)||parent.parent().data(selectCtrlName);selectCtrl&&selectCtrl.databound||(selectCtrl=nullSelectCtrl),interpolateFn?scope.$watch(interpolateFn,function(newVal,oldVal){attr.$set("value",newVal),oldVal!==newVal&&selectCtrl.removeOption(oldVal),selectCtrl.addOption(newVal,element)}):selectCtrl.addOption(attr.value,element),element.on("$destroy",function(){selectCtrl.removeOption(attr.value)})}}}}],styleDirective=valueFn({restrict:"E",terminal:!1}),requiredDirective=function(){return{restrict:"A",require:"?ngModel",link:function(scope,elm,attr,ctrl){ctrl&&(attr.required=!0,ctrl.$validators.required=function(modelValue,viewValue){return!attr.required||!ctrl.$isEmpty(viewValue)},attr.$observe("required",function(){ctrl.$validate()}))}}},patternDirective=function(){return{restrict:"A",require:"?ngModel",link:function(scope,elm,attr,ctrl){if(ctrl){var regexp,patternExp=attr.ngPattern||attr.pattern;attr.$observe("pattern",function(regex){if(isString(regex)&&regex.length>0&&(regex=new RegExp("^"+regex+"$")),regex&&!regex.test)throw minErr("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",patternExp,regex,startingTag(elm));regexp=regex||undefined,ctrl.$validate()}),ctrl.$validators.pattern=function(value){return ctrl.$isEmpty(value)||isUndefined(regexp)||regexp.test(value)}}}}},maxlengthDirective=function(){return{restrict:"A",require:"?ngModel",link:function(scope,elm,attr,ctrl){if(ctrl){var maxlength=-1;attr.$observe("maxlength",function(value){var intVal=int(value);maxlength=isNaN(intVal)?-1:intVal,ctrl.$validate()}),ctrl.$validators.maxlength=function(modelValue,viewValue){return 0>maxlength||ctrl.$isEmpty(modelValue)||viewValue.length<=maxlength}}}}},minlengthDirective=function(){return{restrict:"A",require:"?ngModel",link:function(scope,elm,attr,ctrl){if(ctrl){var minlength=0;attr.$observe("minlength",function(value){minlength=int(value)||0,ctrl.$validate()}),ctrl.$validators.minlength=function(modelValue,viewValue){return ctrl.$isEmpty(viewValue)||viewValue.length>=minlength}}}}};return window.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(bindJQuery(),publishExternalAPI(angular),void jqLite(document).ready(function(){angularInit(document,bootstrap)}))}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("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;}</style>'),function(window,angular){"use strict";function $RouteProvider(){function inherit(parent,extra){return angular.extend(Object.create(parent),extra)}function pathRegExp(path,opts){var insensitive=opts.caseInsensitiveMatch,ret={originalPath:path,regexp:path},keys=ret.keys=[];return path=path.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(_,slash,key,option){var optional="?"===option?option:null,star="*"===option?option:null;return keys.push({name:key,optional:!!optional}),slash=slash||"",""+(optional?"":slash)+"(?:"+(optional?slash:"")+(star&&"(.+?)"||"([^/]+)")+(optional||"")+")"+(optional||"")}).replace(/([\/$\*])/g,"\\$1"),ret.regexp=new RegExp("^"+path+"$",insensitive?"i":""),ret}var routes={};this.when=function(path,route){var routeCopy=angular.copy(route);if(angular.isUndefined(routeCopy.reloadOnSearch)&&(routeCopy.reloadOnSearch=!0),angular.isUndefined(routeCopy.caseInsensitiveMatch)&&(routeCopy.caseInsensitiveMatch=this.caseInsensitiveMatch),routes[path]=angular.extend(routeCopy,path&&pathRegExp(path,routeCopy)),path){var redirectPath="/"==path[path.length-1]?path.substr(0,path.length-1):path+"/";routes[redirectPath]=angular.extend({redirectTo:path},pathRegExp(redirectPath,routeCopy))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(params){return"string"==typeof params&&(params={redirectTo:params}),this.when(null,params),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function($rootScope,$location,$routeParams,$q,$injector,$templateRequest,$sce){function switchRouteMatcher(on,route){var keys=route.keys,params={};if(!route.regexp)return null;var m=route.regexp.exec(on);if(!m)return null;for(var i=1,len=m.length;len>i;++i){var key=keys[i-1],val=m[i];key&&val&&(params[key.name]=val)}return params}function prepareRoute($locationEvent){var lastRoute=$route.current;preparedRoute=parseRoute(),preparedRouteIsUpdateOnly=preparedRoute&&lastRoute&&preparedRoute.$$route===lastRoute.$$route&&angular.equals(preparedRoute.pathParams,lastRoute.pathParams)&&!preparedRoute.reloadOnSearch&&!forceReload,preparedRouteIsUpdateOnly||!lastRoute&&!preparedRoute||$rootScope.$broadcast("$routeChangeStart",preparedRoute,lastRoute).defaultPrevented&&$locationEvent&&$locationEvent.preventDefault()}function commitRoute(){var lastRoute=$route.current,nextRoute=preparedRoute;preparedRouteIsUpdateOnly?(lastRoute.params=nextRoute.params,angular.copy(lastRoute.params,$routeParams),$rootScope.$broadcast("$routeUpdate",lastRoute)):(nextRoute||lastRoute)&&(forceReload=!1,$route.current=nextRoute,nextRoute&&nextRoute.redirectTo&&(angular.isString(nextRoute.redirectTo)?$location.path(interpolate(nextRoute.redirectTo,nextRoute.params)).search(nextRoute.params).replace():$location.url(nextRoute.redirectTo(nextRoute.pathParams,$location.path(),$location.search())).replace()),$q.when(nextRoute).then(function(){if(nextRoute){var template,templateUrl,locals=angular.extend({},nextRoute.resolve);return angular.forEach(locals,function(value,key){locals[key]=angular.isString(value)?$injector.get(value):$injector.invoke(value,null,null,key)}),angular.isDefined(template=nextRoute.template)?angular.isFunction(template)&&(template=template(nextRoute.params)):angular.isDefined(templateUrl=nextRoute.templateUrl)&&(angular.isFunction(templateUrl)&&(templateUrl=templateUrl(nextRoute.params)),templateUrl=$sce.getTrustedResourceUrl(templateUrl),angular.isDefined(templateUrl)&&(nextRoute.loadedTemplateUrl=templateUrl,template=$templateRequest(templateUrl))),angular.isDefined(template)&&(locals.$template=template),$q.all(locals)}}).then(function(locals){nextRoute==$route.current&&(nextRoute&&(nextRoute.locals=locals,angular.copy(nextRoute.params,$routeParams)),$rootScope.$broadcast("$routeChangeSuccess",nextRoute,lastRoute))},function(error){nextRoute==$route.current&&$rootScope.$broadcast("$routeChangeError",nextRoute,lastRoute,error)}))}function parseRoute(){var params,match;return angular.forEach(routes,function(route){!match&&(params=switchRouteMatcher($location.path(),route))&&(match=inherit(route,{params:angular.extend({},$location.search(),params),pathParams:params}),match.$$route=route)}),match||routes[null]&&inherit(routes[null],{params:{},pathParams:{}})}function interpolate(string,params){var result=[];return angular.forEach((string||"").split(":"),function(segment,i){if(0===i)result.push(segment);else{var segmentMatch=segment.match(/(\w+)(?:[?*])?(.*)/),key=segmentMatch[1];result.push(params[key]),result.push(segmentMatch[2]||""),delete params[key]}}),result.join("")}var preparedRoute,preparedRouteIsUpdateOnly,forceReload=!1,$route={routes:routes,reload:function(){forceReload=!0,$rootScope.$evalAsync(function(){prepareRoute(),commitRoute()})},updateParams:function(newParams){if(!this.current||!this.current.$$route)throw $routeMinErr("norout","Tried updating route when with no current route");var searchParams={},self=this;angular.forEach(Object.keys(newParams),function(key){self.current.pathParams[key]||(searchParams[key]=newParams[key])}),newParams=angular.extend({},this.current.params,newParams),$location.path(interpolate(this.current.$$route.originalPath,newParams)),$location.search(angular.extend({},$location.search(),searchParams))}};return $rootScope.$on("$locationChangeStart",prepareRoute),$rootScope.$on("$locationChangeSuccess",commitRoute),$route}]}function $RouteParamsProvider(){this.$get=function(){return{}}}function ngViewFactory($route,$anchorScroll,$animate){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(scope,$element,attr,ctrl,$transclude){function cleanupLastView(){previousLeaveAnimation&&($animate.cancel(previousLeaveAnimation),previousLeaveAnimation=null),currentScope&&(currentScope.$destroy(),currentScope=null),currentElement&&(previousLeaveAnimation=$animate.leave(currentElement),previousLeaveAnimation.then(function(){previousLeaveAnimation=null}),currentElement=null)}function update(){var locals=$route.current&&$route.current.locals,template=locals&&locals.$template;if(angular.isDefined(template)){var newScope=scope.$new(),current=$route.current,clone=$transclude(newScope,function(clone){$animate.enter(clone,null,currentElement||$element).then(function(){!angular.isDefined(autoScrollExp)||autoScrollExp&&!scope.$eval(autoScrollExp)||$anchorScroll()}),cleanupLastView()});currentElement=clone,currentScope=current.scope=newScope,currentScope.$emit("$viewContentLoaded"),currentScope.$eval(onloadExp)}else cleanupLastView()}var currentScope,currentElement,previousLeaveAnimation,autoScrollExp=attr.autoscroll,onloadExp=attr.onload||"";scope.$on("$routeChangeSuccess",update),update()}}}function ngViewFillContentFactory($compile,$controller,$route){return{restrict:"ECA",priority:-400,link:function(scope,$element){var current=$route.current,locals=current.locals;$element.html(locals.$template);var link=$compile($element.contents());if(current.controller){locals.$scope=scope;var controller=$controller(current.controller,locals);current.controllerAs&&(scope[current.controllerAs]=controller),$element.data("$ngControllerController",controller),$element.children().data("$ngControllerController",controller)}link(scope)}}}var ngRouteModule=angular.module("ngRoute",["ng"]).provider("$route",$RouteProvider),$routeMinErr=angular.$$minErr("ngRoute");ngRouteModule.provider("$routeParams",$RouteParamsProvider),ngRouteModule.directive("ngView",ngViewFactory),ngRouteModule.directive("ngView",ngViewFillContentFactory),ngViewFactory.$inject=["$route","$anchorScroll","$animate"],ngViewFillContentFactory.$inject=["$compile","$controller","$route"]}(window,window.angular),function(window,angular){"use strict";function $SanitizeProvider(){this.$get=["$$sanitizeUri",function($$sanitizeUri){return function(html){var buf=[];return htmlParser(html,htmlSanitizeWriter(buf,function(uri,isImage){return!/^unsafe/.test($$sanitizeUri(uri,isImage))})),buf.join("")}}]}function sanitizeText(chars){var buf=[],writer=htmlSanitizeWriter(buf,angular.noop);return writer.chars(chars),buf.join("")}function makeMap(str){var i,obj={},items=str.split(",");for(i=0;i<items.length;i++)obj[items[i]]=!0;return obj}function htmlParser(html,handler){function parseStartTag(tag,tagName,rest,unary){if(tagName=angular.lowercase(tagName),blockElements[tagName])for(;stack.last()&&inlineElements[stack.last()];)parseEndTag("",stack.last());optionalEndTagElements[tagName]&&stack.last()==tagName&&parseEndTag("",tagName),unary=voidElements[tagName]||!!unary,unary||stack.push(tagName);var attrs={};rest.replace(ATTR_REGEXP,function(match,name,doubleQuotedValue,singleQuotedValue,unquotedValue){var value=doubleQuotedValue||singleQuotedValue||unquotedValue||"";attrs[name]=decodeEntities(value)}),handler.start&&handler.start(tagName,attrs,unary)}function parseEndTag(tag,tagName){var i,pos=0;if(tagName=angular.lowercase(tagName))for(pos=stack.length-1;pos>=0&&stack[pos]!=tagName;pos--);if(pos>=0){for(i=stack.length-1;i>=pos;i--)handler.end&&handler.end(stack[i]);stack.length=pos}}"string"!=typeof html&&(html=null===html||"undefined"==typeof html?"":""+html);var index,chars,match,text,stack=[],last=html;for(stack.last=function(){return stack[stack.length-1]};html;){if(text="",chars=!0,stack.last()&&specialElements[stack.last()]?(html=html.replace(new RegExp("(.*)<\\s*\\/\\s*"+stack.last()+"[^>]*>","i"),function(all,text){return text=text.replace(COMMENT_REGEXP,"$1").replace(CDATA_REGEXP,"$1"),handler.chars&&handler.chars(decodeEntities(text)),""}),parseEndTag("",stack.last())):(0===html.indexOf("<!--")?(index=html.indexOf("--",4),index>=0&&html.lastIndexOf("-->",index)===index&&(handler.comment&&handler.comment(html.substring(4,index)),html=html.substring(index+3),chars=!1)):DOCTYPE_REGEXP.test(html)?(match=html.match(DOCTYPE_REGEXP),match&&(html=html.replace(match[0],""),chars=!1)):BEGING_END_TAGE_REGEXP.test(html)?(match=html.match(END_TAG_REGEXP),match&&(html=html.substring(match[0].length),match[0].replace(END_TAG_REGEXP,parseEndTag),chars=!1)):BEGIN_TAG_REGEXP.test(html)&&(match=html.match(START_TAG_REGEXP),match?(match[4]&&(html=html.substring(match[0].length),match[0].replace(START_TAG_REGEXP,parseStartTag)),chars=!1):(text+="<",html=html.substring(1))),chars&&(index=html.indexOf("<"),text+=0>index?html:html.substring(0,index),html=0>index?"":html.substring(index),handler.chars&&handler.chars(decodeEntities(text)))),html==last)throw $sanitizeMinErr("badparse","The sanitizer was unable to parse the following block of html: {0}",html);last=html}parseEndTag()}function decodeEntities(value){if(!value)return"";var parts=spaceRe.exec(value),spaceBefore=parts[1],spaceAfter=parts[3],content=parts[2];return content&&(hiddenPre.innerHTML=content.replace(/</g,"&lt;"),content="textContent"in hiddenPre?hiddenPre.textContent:hiddenPre.innerText),spaceBefore+content+spaceAfter}function encodeEntities(value){return value.replace(/&/g,"&amp;").replace(SURROGATE_PAIR_REGEXP,function(value){var hi=value.charCodeAt(0),low=value.charCodeAt(1);return"&#"+(1024*(hi-55296)+(low-56320)+65536)+";"}).replace(NON_ALPHANUMERIC_REGEXP,function(value){return"&#"+value.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function htmlSanitizeWriter(buf,uriValidator){var ignore=!1,out=angular.bind(buf,buf.push);return{start:function(tag,attrs,unary){tag=angular.lowercase(tag),!ignore&&specialElements[tag]&&(ignore=tag),ignore||validElements[tag]!==!0||(out("<"),out(tag),angular.forEach(attrs,function(value,key){var lkey=angular.lowercase(key),isImage="img"===tag&&"src"===lkey||"background"===lkey;validAttrs[lkey]!==!0||uriAttrs[lkey]===!0&&!uriValidator(value,isImage)||(out(" "),out(key),out('="'),out(encodeEntities(value)),out('"'))}),out(unary?"/>":">"))},end:function(tag){tag=angular.lowercase(tag),ignore||validElements[tag]!==!0||(out("</"),out(tag),out(">")),tag==ignore&&(ignore=!1)},chars:function(chars){ignore||out(encodeEntities(chars))}}}var $sanitizeMinErr=angular.$$minErr("$sanitize"),START_TAG_REGEXP=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,END_TAG_REGEXP=/^<\/\s*([\w:-]+)[^>]*>/,ATTR_REGEXP=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,BEGIN_TAG_REGEXP=/^</,BEGING_END_TAGE_REGEXP=/^<\//,COMMENT_REGEXP=/<!--(.*?)-->/g,DOCTYPE_REGEXP=/<!DOCTYPE([^>]*?)>/i,CDATA_REGEXP=/<!\[CDATA\[(.*?)]]>/g,SURROGATE_PAIR_REGEXP=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,NON_ALPHANUMERIC_REGEXP=/([^\#-~| |!])/g,voidElements=makeMap("area,br,col,hr,img,wbr"),optionalEndTagBlockElements=makeMap("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),optionalEndTagInlineElements=makeMap("rp,rt"),optionalEndTagElements=angular.extend({},optionalEndTagInlineElements,optionalEndTagBlockElements),blockElements=angular.extend({},optionalEndTagBlockElements,makeMap("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")),inlineElements=angular.extend({},optionalEndTagInlineElements,makeMap("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")),svgElements=makeMap("animate,animateColor,animateMotion,animateTransform,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,set,stop,svg,switch,text,title,tspan,use"),specialElements=makeMap("script,style"),validElements=angular.extend({},voidElements,blockElements,inlineElements,optionalEndTagElements,svgElements),uriAttrs=makeMap("background,cite,href,longdesc,src,usemap,xlink:href"),htmlAttrs=makeMap("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,target,title,type,valign,value,vspace,width"),svgAttrs=makeMap("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,attributeName,attributeType,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"),validAttrs=angular.extend({},uriAttrs,svgAttrs,htmlAttrs),hiddenPre=document.createElement("pre"),spaceRe=/^(\s*)([\s\S]*?)(\s*)$/;angular.module("ngSanitize",[]).provider("$sanitize",$SanitizeProvider),angular.module("ngSanitize").filter("linky",["$sanitize",function($sanitize){var LINKY_URL_REGEXP=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"”’]/,MAILTO_REGEXP=/^mailto:/;
return function(text,target){function addText(text){text&&html.push(sanitizeText(text))}function addLink(url,text){html.push("<a "),angular.isDefined(target)&&html.push('target="',target,'" '),html.push('href="',url.replace(/"/g,"&quot;"),'">'),addText(text),html.push("</a>")}if(!text)return text;for(var match,url,i,raw=text,html=[];match=raw.match(LINKY_URL_REGEXP);)url=match[0],match[2]||match[4]||(url=(match[3]?"http://":"mailto:")+url),i=match.index,addText(raw.substr(0,i)),addLink(url,match[0].replace(MAILTO_REGEXP,"")),raw=raw.substring(i+match[0].length);return addText(raw),$sanitize(html.join(""))}}])}(window,window.angular),function(window,angular,undefined){"use strict";angular.module("ngAnimate",["ng"]).directive("ngAnimateChildren",function(){var NG_ANIMATE_CHILDREN="$$ngAnimateChildren";return function(scope,element,attrs){var val=attrs.ngAnimateChildren;angular.isString(val)&&0===val.length?element.data(NG_ANIMATE_CHILDREN,!0):scope.$watch(val,function(value){element.data(NG_ANIMATE_CHILDREN,!!value)})}}).factory("$$animateReflow",["$$rAF","$document",function($$rAF,$document){var bod=$document[0].body;return function(fn){return $$rAF(function(){bod.offsetWidth+1;fn()})}}]).config(["$provide","$animateProvider",function($provide,$animateProvider){function extractElementNode(element){for(var i=0;i<element.length;i++){var elm=element[i];if(elm.nodeType==ELEMENT_NODE)return elm}}function prepareElement(element){return element&&angular.element(element)}function stripCommentsFromElement(element){return angular.element(extractElementNode(element))}function isMatchingElement(elm1,elm2){return extractElementNode(elm1)==extractElementNode(elm2)}var $$jqLite,noop=angular.noop,forEach=angular.forEach,selectors=$animateProvider.$$selectors,isArray=angular.isArray,isString=angular.isString,isObject=angular.isObject,ELEMENT_NODE=1,NG_ANIMATE_STATE="$$ngAnimateState",NG_ANIMATE_CHILDREN="$$ngAnimateChildren",NG_ANIMATE_CLASS_NAME="ng-animate",rootAnimateState={running:!0};$provide.decorator("$animate",["$delegate","$$q","$injector","$sniffer","$rootElement","$$asyncCallback","$rootScope","$document","$templateRequest","$$jqLite",function($delegate,$$q,$injector,$sniffer,$rootElement,$$asyncCallback,$rootScope,$document,$templateRequest,$$$jqLite){function classBasedAnimationsBlocked(element,setter){var data=element.data(NG_ANIMATE_STATE)||{};return setter&&(data.running=!0,data.structural=!0,element.data(NG_ANIMATE_STATE,data)),data.disabled||data.running&&data.structural}function runAnimationPostDigest(fn){var cancelFn,defer=$$q.defer();return defer.promise.$$cancelFn=function(){cancelFn&&cancelFn()},$rootScope.$$postDigest(function(){cancelFn=fn(function(){defer.resolve()})}),defer.promise}function parseAnimateOptions(options){return isObject(options)?(options.tempClasses&&isString(options.tempClasses)&&(options.tempClasses=options.tempClasses.split(/\s+/)),options):void 0}function resolveElementClasses(element,cache,runningAnimations){runningAnimations=runningAnimations||{};var lookup={};forEach(runningAnimations,function(data,selector){forEach(selector.split(" "),function(s){lookup[s]=data})});var hasClasses=Object.create(null);forEach((element.attr("class")||"").split(/\s+/),function(className){hasClasses[className]=!0});var toAdd=[],toRemove=[];return forEach(cache&&cache.classes||[],function(status,className){var hasClass=hasClasses[className],matchingAnimation=lookup[className]||{};status===!1?(hasClass||"addClass"==matchingAnimation.event)&&toRemove.push(className):status===!0&&(hasClass&&"removeClass"!=matchingAnimation.event||toAdd.push(className))}),toAdd.length+toRemove.length>0&&[toAdd.join(" "),toRemove.join(" ")]}function lookup(name){if(name){var matches=[],flagMap={},classes=name.substr(1).split(".");($sniffer.transitions||$sniffer.animations)&&matches.push($injector.get(selectors[""]));for(var i=0;i<classes.length;i++){var klass=classes[i],selectorFactoryName=selectors[klass];selectorFactoryName&&!flagMap[klass]&&(matches.push($injector.get(selectorFactoryName)),flagMap[klass]=!0)}return matches}}function animationRunner(element,animationEvent,className,options){function registerAnimation(animationFactory,event){var afterFn=animationFactory[event],beforeFn=animationFactory["before"+event.charAt(0).toUpperCase()+event.substr(1)];return afterFn||beforeFn?("leave"==event&&(beforeFn=afterFn,afterFn=null),after.push({event:event,fn:afterFn}),before.push({event:event,fn:beforeFn}),!0):void 0}function run(fns,cancellations,allCompleteFn){function afterAnimationComplete(index){if(cancellations){if((cancellations[index]||noop)(),++count<animations.length)return;cancellations=null}allCompleteFn()}var animations=[];forEach(fns,function(animation){animation.fn&&animations.push(animation)});var count=0;forEach(animations,function(animation,index){var progress=function(){afterAnimationComplete(index)};switch(animation.event){case"setClass":cancellations.push(animation.fn(element,classNameAdd,classNameRemove,progress,options));break;case"animate":cancellations.push(animation.fn(element,className,options.from,options.to,progress));break;case"addClass":cancellations.push(animation.fn(element,classNameAdd||className,progress,options));break;case"removeClass":cancellations.push(animation.fn(element,classNameRemove||className,progress,options));break;default:cancellations.push(animation.fn(element,progress,options))}}),cancellations&&0===cancellations.length&&allCompleteFn()}var node=element[0];if(node){options&&(options.to=options.to||{},options.from=options.from||{});var classNameAdd,classNameRemove;isArray(className)&&(classNameAdd=className[0],classNameRemove=className[1],classNameAdd?classNameRemove?className=classNameAdd+" "+classNameRemove:(className=classNameAdd,animationEvent="addClass"):(className=classNameRemove,animationEvent="removeClass"));var isSetClassOperation="setClass"==animationEvent,isClassBased=isSetClassOperation||"addClass"==animationEvent||"removeClass"==animationEvent||"animate"==animationEvent,currentClassName=element.attr("class"),classes=currentClassName+" "+className;if(isAnimatableClassName(classes)){var beforeComplete=noop,beforeCancel=[],before=[],afterComplete=noop,afterCancel=[],after=[],animationLookup=(" "+classes).replace(/\s+/g,".");return forEach(lookup(animationLookup),function(animationFactory){var created=registerAnimation(animationFactory,animationEvent);!created&&isSetClassOperation&&(registerAnimation(animationFactory,"addClass"),registerAnimation(animationFactory,"removeClass"))}),{node:node,event:animationEvent,className:className,isClassBased:isClassBased,isSetClassOperation:isSetClassOperation,applyStyles:function(){options&&element.css(angular.extend(options.from||{},options.to||{}))},before:function(allCompleteFn){beforeComplete=allCompleteFn,run(before,beforeCancel,function(){beforeComplete=noop,allCompleteFn()})},after:function(allCompleteFn){afterComplete=allCompleteFn,run(after,afterCancel,function(){afterComplete=noop,allCompleteFn()})},cancel:function(){beforeCancel&&(forEach(beforeCancel,function(cancelFn){(cancelFn||noop)(!0)}),beforeComplete(!0)),afterCancel&&(forEach(afterCancel,function(cancelFn){(cancelFn||noop)(!0)}),afterComplete(!0))}}}}}function performAnimation(animationEvent,className,element,parentElement,afterElement,domOperation,options,doneCallback){function fireDOMCallback(animationPhase){var eventName="$animate:"+animationPhase;elementEvents&&elementEvents[eventName]&&elementEvents[eventName].length>0&&$$asyncCallback(function(){element.triggerHandler(eventName,{event:animationEvent,className:className})})}function fireBeforeCallbackAsync(){fireDOMCallback("before")}function fireAfterCallbackAsync(){fireDOMCallback("after")}function fireDoneCallbackAsync(){fireDOMCallback("close"),doneCallback()}function fireDOMOperation(){fireDOMOperation.hasBeenRun||(fireDOMOperation.hasBeenRun=!0,domOperation())}function closeAnimation(){if(!closeAnimation.hasBeenRun){runner&&runner.applyStyles(),closeAnimation.hasBeenRun=!0,options&&options.tempClasses&&forEach(options.tempClasses,function(className){$$jqLite.removeClass(element,className)});var data=element.data(NG_ANIMATE_STATE);data&&(runner&&runner.isClassBased?cleanup(element,className):($$asyncCallback(function(){var data=element.data(NG_ANIMATE_STATE)||{};localAnimationCount==data.index&&cleanup(element,className,animationEvent)}),element.data(NG_ANIMATE_STATE,data))),fireDoneCallbackAsync()}}var noopCancel=noop,runner=animationRunner(element,animationEvent,className,options);if(!runner)return fireDOMOperation(),fireBeforeCallbackAsync(),fireAfterCallbackAsync(),closeAnimation(),noopCancel;animationEvent=runner.event,className=runner.className;var elementEvents=angular.element._data(runner.node);if(elementEvents=elementEvents&&elementEvents.events,parentElement||(parentElement=afterElement?afterElement.parent():element.parent()),animationsDisabled(element,parentElement))return fireDOMOperation(),fireBeforeCallbackAsync(),fireAfterCallbackAsync(),closeAnimation(),noopCancel;var ngAnimateState=element.data(NG_ANIMATE_STATE)||{},runningAnimations=ngAnimateState.active||{},totalActiveAnimations=ngAnimateState.totalActive||0,lastAnimation=ngAnimateState.last,skipAnimation=!1;if(totalActiveAnimations>0){var animationsToCancel=[];if(runner.isClassBased){if("setClass"==lastAnimation.event)animationsToCancel.push(lastAnimation),cleanup(element,className);else if(runningAnimations[className]){var current=runningAnimations[className];current.event==animationEvent?skipAnimation=!0:(animationsToCancel.push(current),cleanup(element,className))}}else if("leave"==animationEvent&&runningAnimations["ng-leave"])skipAnimation=!0;else{for(var klass in runningAnimations)animationsToCancel.push(runningAnimations[klass]);ngAnimateState={},cleanup(element,!0)}animationsToCancel.length>0&&forEach(animationsToCancel,function(operation){operation.cancel()})}if(!runner.isClassBased||runner.isSetClassOperation||"animate"==animationEvent||skipAnimation||(skipAnimation="addClass"==animationEvent==element.hasClass(className)),skipAnimation)return fireDOMOperation(),fireBeforeCallbackAsync(),fireAfterCallbackAsync(),fireDoneCallbackAsync(),noopCancel;runningAnimations=ngAnimateState.active||{},totalActiveAnimations=ngAnimateState.totalActive||0,"leave"==animationEvent&&element.one("$destroy",function(){var element=angular.element(this),state=element.data(NG_ANIMATE_STATE);if(state){var activeLeaveAnimation=state.active["ng-leave"];activeLeaveAnimation&&(activeLeaveAnimation.cancel(),cleanup(element,"ng-leave"))}}),$$jqLite.addClass(element,NG_ANIMATE_CLASS_NAME),options&&options.tempClasses&&forEach(options.tempClasses,function(className){$$jqLite.addClass(element,className)});var localAnimationCount=globalAnimationCounter++;return totalActiveAnimations++,runningAnimations[className]=runner,element.data(NG_ANIMATE_STATE,{last:runner,active:runningAnimations,index:localAnimationCount,totalActive:totalActiveAnimations}),fireBeforeCallbackAsync(),runner.before(function(cancelled){var data=element.data(NG_ANIMATE_STATE);cancelled=cancelled||!data||!data.active[className]||runner.isClassBased&&data.active[className].event!=animationEvent,fireDOMOperation(),cancelled===!0?closeAnimation():(fireAfterCallbackAsync(),runner.after(closeAnimation))}),runner.cancel}function cancelChildAnimations(element){var node=extractElementNode(element);if(node){var nodes=angular.isFunction(node.getElementsByClassName)?node.getElementsByClassName(NG_ANIMATE_CLASS_NAME):node.querySelectorAll("."+NG_ANIMATE_CLASS_NAME);forEach(nodes,function(element){element=angular.element(element);var data=element.data(NG_ANIMATE_STATE);data&&data.active&&forEach(data.active,function(runner){runner.cancel()})})}}function cleanup(element,className){if(isMatchingElement(element,$rootElement))rootAnimateState.disabled||(rootAnimateState.running=!1,rootAnimateState.structural=!1);else if(className){var data=element.data(NG_ANIMATE_STATE)||{},removeAnimations=className===!0;!removeAnimations&&data.active&&data.active[className]&&(data.totalActive--,delete data.active[className]),(removeAnimations||!data.totalActive)&&($$jqLite.removeClass(element,NG_ANIMATE_CLASS_NAME),element.removeData(NG_ANIMATE_STATE))}}function animationsDisabled(element,parentElement){if(rootAnimateState.disabled)return!0;if(isMatchingElement(element,$rootElement))return rootAnimateState.running;var allowChildAnimations,parentRunningAnimation,hasParent;do{if(0===parentElement.length)break;var isRoot=isMatchingElement(parentElement,$rootElement),state=isRoot?rootAnimateState:parentElement.data(NG_ANIMATE_STATE)||{};if(state.disabled)return!0;if(isRoot&&(hasParent=!0),allowChildAnimations!==!1){var animateChildrenFlag=parentElement.data(NG_ANIMATE_CHILDREN);angular.isDefined(animateChildrenFlag)&&(allowChildAnimations=animateChildrenFlag)}parentRunningAnimation=parentRunningAnimation||state.running||state.last&&!state.last.isClassBased}while(parentElement=parentElement.parent());return!hasParent||!allowChildAnimations&&parentRunningAnimation}$$jqLite=$$$jqLite,$rootElement.data(NG_ANIMATE_STATE,rootAnimateState);var deregisterWatch=$rootScope.$watch(function(){return $templateRequest.totalPendingRequests},function(val){0===val&&(deregisterWatch(),$rootScope.$$postDigest(function(){$rootScope.$$postDigest(function(){rootAnimateState.running=!1})}))}),globalAnimationCounter=0,classNameFilter=$animateProvider.classNameFilter(),isAnimatableClassName=classNameFilter?function(className){return classNameFilter.test(className)}:function(){return!0};return{animate:function(element,from,to,className,options){return className=className||"ng-inline-animate",options=parseAnimateOptions(options)||{},options.from=to?from:null,options.to=to?to:from,runAnimationPostDigest(function(done){return performAnimation("animate",className,stripCommentsFromElement(element),null,null,noop,options,done)})},enter:function(element,parentElement,afterElement,options){return options=parseAnimateOptions(options),element=angular.element(element),parentElement=prepareElement(parentElement),afterElement=prepareElement(afterElement),classBasedAnimationsBlocked(element,!0),$delegate.enter(element,parentElement,afterElement),runAnimationPostDigest(function(done){return performAnimation("enter","ng-enter",stripCommentsFromElement(element),parentElement,afterElement,noop,options,done)})},leave:function(element,options){return options=parseAnimateOptions(options),element=angular.element(element),cancelChildAnimations(element),classBasedAnimationsBlocked(element,!0),runAnimationPostDigest(function(done){return performAnimation("leave","ng-leave",stripCommentsFromElement(element),null,null,function(){$delegate.leave(element)},options,done)})},move:function(element,parentElement,afterElement,options){return options=parseAnimateOptions(options),element=angular.element(element),parentElement=prepareElement(parentElement),afterElement=prepareElement(afterElement),cancelChildAnimations(element),classBasedAnimationsBlocked(element,!0),$delegate.move(element,parentElement,afterElement),runAnimationPostDigest(function(done){return performAnimation("move","ng-move",stripCommentsFromElement(element),parentElement,afterElement,noop,options,done)})},addClass:function(element,className,options){return this.setClass(element,className,[],options)},removeClass:function(element,className,options){return this.setClass(element,[],className,options)},setClass:function(element,add,remove,options){options=parseAnimateOptions(options);var STORAGE_KEY="$$animateClasses";if(element=angular.element(element),element=stripCommentsFromElement(element),classBasedAnimationsBlocked(element))return $delegate.$$setClassImmediately(element,add,remove,options);var classes,cache=element.data(STORAGE_KEY),hasCache=!!cache;return cache||(cache={},cache.classes={}),classes=cache.classes,add=isArray(add)?add:add.split(" "),forEach(add,function(c){c&&c.length&&(classes[c]=!0)}),remove=isArray(remove)?remove:remove.split(" "),forEach(remove,function(c){c&&c.length&&(classes[c]=!1)}),hasCache?(options&&cache.options&&(cache.options=angular.extend(cache.options||{},options)),cache.promise):(element.data(STORAGE_KEY,cache={classes:classes,options:options}),cache.promise=runAnimationPostDigest(function(done){var parentElement=element.parent(),elementNode=extractElementNode(element),parentNode=elementNode.parentNode;if(!parentNode||parentNode.$$NG_REMOVED||elementNode.$$NG_REMOVED)return void done();var cache=element.data(STORAGE_KEY);element.removeData(STORAGE_KEY);var state=element.data(NG_ANIMATE_STATE)||{},classes=resolveElementClasses(element,cache,state.active);return classes?performAnimation("setClass",classes,element,parentElement,null,function(){classes[0]&&$delegate.$$addClassImmediately(element,classes[0]),classes[1]&&$delegate.$$removeClassImmediately(element,classes[1])},cache.options,done):done()}))},cancel:function(promise){promise.$$cancelFn()},enabled:function(value,element){switch(arguments.length){case 2:if(value)cleanup(element);else{var data=element.data(NG_ANIMATE_STATE)||{};data.disabled=!0,element.data(NG_ANIMATE_STATE,data)}break;case 1:rootAnimateState.disabled=!value;break;default:value=!rootAnimateState.disabled}return!!value}}}]),$animateProvider.register("",["$window","$sniffer","$timeout","$$animateReflow",function($window,$sniffer,$timeout,$$animateReflow){function clearCacheAfterReflow(){cancelAnimationReflow||(cancelAnimationReflow=$$animateReflow(function(){animationReflowQueue=[],cancelAnimationReflow=null,lookupCache={}}))}function afterReflow(element,callback){cancelAnimationReflow&&cancelAnimationReflow(),animationReflowQueue.push(callback),cancelAnimationReflow=$$animateReflow(function(){forEach(animationReflowQueue,function(fn){fn()}),animationReflowQueue=[],cancelAnimationReflow=null,lookupCache={}})}function animationCloseHandler(element,totalTime){var node=extractElementNode(element);element=angular.element(node),animationElementQueue.push(element);var futureTimestamp=Date.now()+totalTime;closingTimestamp>=futureTimestamp||($timeout.cancel(closingTimer),closingTimestamp=futureTimestamp,closingTimer=$timeout(function(){closeAllAnimations(animationElementQueue),animationElementQueue=[]},totalTime,!1))}function closeAllAnimations(elements){forEach(elements,function(element){var elementData=element.data(NG_ANIMATE_CSS_DATA_KEY);elementData&&forEach(elementData.closeAnimationFns,function(fn){fn()})})}function getElementAnimationDetails(element,cacheKey){var data=cacheKey?lookupCache[cacheKey]:null;if(!data){var transitionDuration=0,transitionDelay=0,animationDuration=0,animationDelay=0;forEach(element,function(element){if(element.nodeType==ELEMENT_NODE){var elementStyles=$window.getComputedStyle(element)||{},transitionDurationStyle=elementStyles[TRANSITION_PROP+DURATION_KEY];transitionDuration=Math.max(parseMaxTime(transitionDurationStyle),transitionDuration);var transitionDelayStyle=elementStyles[TRANSITION_PROP+DELAY_KEY];transitionDelay=Math.max(parseMaxTime(transitionDelayStyle),transitionDelay);{elementStyles[ANIMATION_PROP+DELAY_KEY]}animationDelay=Math.max(parseMaxTime(elementStyles[ANIMATION_PROP+DELAY_KEY]),animationDelay);var aDuration=parseMaxTime(elementStyles[ANIMATION_PROP+DURATION_KEY]);aDuration>0&&(aDuration*=parseInt(elementStyles[ANIMATION_PROP+ANIMATION_ITERATION_COUNT_KEY],10)||1),animationDuration=Math.max(aDuration,animationDuration)}}),data={total:0,transitionDelay:transitionDelay,transitionDuration:transitionDuration,animationDelay:animationDelay,animationDuration:animationDuration},cacheKey&&(lookupCache[cacheKey]=data)}return data}function parseMaxTime(str){var maxValue=0,values=isString(str)?str.split(/\s*,\s*/):[];return forEach(values,function(value){maxValue=Math.max(parseFloat(value)||0,maxValue)}),maxValue}function getCacheKey(element){var parentElement=element.parent(),parentID=parentElement.data(NG_ANIMATE_PARENT_KEY);return parentID||(parentElement.data(NG_ANIMATE_PARENT_KEY,++parentCounter),parentID=parentCounter),parentID+"-"+extractElementNode(element).getAttribute("class")}function animateSetup(animationEvent,element,className,styles){var structural=["ng-enter","ng-leave","ng-move"].indexOf(className)>=0,cacheKey=getCacheKey(element),eventCacheKey=cacheKey+" "+className,itemIndex=lookupCache[eventCacheKey]?++lookupCache[eventCacheKey].total:0,stagger={};if(itemIndex>0){var staggerClassName=className+"-stagger",staggerCacheKey=cacheKey+" "+staggerClassName,applyClasses=!lookupCache[staggerCacheKey];applyClasses&&$$jqLite.addClass(element,staggerClassName),stagger=getElementAnimationDetails(element,staggerCacheKey),applyClasses&&$$jqLite.removeClass(element,staggerClassName)}$$jqLite.addClass(element,className);var formerData=element.data(NG_ANIMATE_CSS_DATA_KEY)||{},timings=getElementAnimationDetails(element,eventCacheKey),transitionDuration=timings.transitionDuration,animationDuration=timings.animationDuration;if(structural&&0===transitionDuration&&0===animationDuration)return $$jqLite.removeClass(element,className),!1;var blockTransition=styles||structural&&transitionDuration>0,blockAnimation=animationDuration>0&&stagger.animationDelay>0&&0===stagger.animationDuration,closeAnimationFns=formerData.closeAnimationFns||[];element.data(NG_ANIMATE_CSS_DATA_KEY,{stagger:stagger,cacheKey:eventCacheKey,running:formerData.running||0,itemIndex:itemIndex,blockTransition:blockTransition,closeAnimationFns:closeAnimationFns});var node=extractElementNode(element);return blockTransition&&(blockTransitions(node,!0),styles&&element.css(styles)),blockAnimation&&blockAnimations(node,!0),!0}function animateRun(animationEvent,element,className,activeAnimationComplete,styles){function onEnd(){element.off(css3AnimationEvents,onAnimationProgress),$$jqLite.removeClass(element,activeClassName),$$jqLite.removeClass(element,pendingClassName),staggerTimeout&&$timeout.cancel(staggerTimeout),animateClose(element,className);var node=extractElementNode(element);for(var i in appliedStyles)node.style.removeProperty(appliedStyles[i])}function onAnimationProgress(event){event.stopPropagation();var ev=event.originalEvent||event,timeStamp=ev.$manualTimeStamp||ev.timeStamp||Date.now(),elapsedTime=parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES));Math.max(timeStamp-startTime,0)>=maxDelayTime&&elapsedTime>=maxDuration&&activeAnimationComplete()}var node=extractElementNode(element),elementData=element.data(NG_ANIMATE_CSS_DATA_KEY);if(-1==node.getAttribute("class").indexOf(className)||!elementData)return void activeAnimationComplete();var activeClassName="",pendingClassName="";forEach(className.split(" "),function(klass,i){var prefix=(i>0?" ":"")+klass;activeClassName+=prefix+"-active",pendingClassName+=prefix+"-pending"});var style="",appliedStyles=[],itemIndex=elementData.itemIndex,stagger=elementData.stagger,staggerTime=0;if(itemIndex>0){var transitionStaggerDelay=0;stagger.transitionDelay>0&&0===stagger.transitionDuration&&(transitionStaggerDelay=stagger.transitionDelay*itemIndex);var animationStaggerDelay=0;stagger.animationDelay>0&&0===stagger.animationDuration&&(animationStaggerDelay=stagger.animationDelay*itemIndex,appliedStyles.push(CSS_PREFIX+"animation-play-state")),staggerTime=Math.round(100*Math.max(transitionStaggerDelay,animationStaggerDelay))/100}staggerTime||($$jqLite.addClass(element,activeClassName),elementData.blockTransition&&blockTransitions(node,!1));var eventCacheKey=elementData.cacheKey+" "+activeClassName,timings=getElementAnimationDetails(element,eventCacheKey),maxDuration=Math.max(timings.transitionDuration,timings.animationDuration);if(0===maxDuration)return $$jqLite.removeClass(element,activeClassName),animateClose(element,className),void activeAnimationComplete();!staggerTime&&styles&&Object.keys(styles).length>0&&(timings.transitionDuration||(element.css("transition",timings.animationDuration+"s linear all"),appliedStyles.push("transition")),element.css(styles));var maxDelay=Math.max(timings.transitionDelay,timings.animationDelay),maxDelayTime=maxDelay*ONE_SECOND;if(appliedStyles.length>0){var oldStyle=node.getAttribute("style")||"";";"!==oldStyle.charAt(oldStyle.length-1)&&(oldStyle+=";"),node.setAttribute("style",oldStyle+" "+style)}var staggerTimeout,startTime=Date.now(),css3AnimationEvents=ANIMATIONEND_EVENT+" "+TRANSITIONEND_EVENT,animationTime=(maxDelay+maxDuration)*CLOSING_TIME_BUFFER,totalTime=(staggerTime+animationTime)*ONE_SECOND;return staggerTime>0&&($$jqLite.addClass(element,pendingClassName),staggerTimeout=$timeout(function(){staggerTimeout=null,timings.transitionDuration>0&&blockTransitions(node,!1),timings.animationDuration>0&&blockAnimations(node,!1),$$jqLite.addClass(element,activeClassName),$$jqLite.removeClass(element,pendingClassName),styles&&(0===timings.transitionDuration&&element.css("transition",timings.animationDuration+"s linear all"),element.css(styles),appliedStyles.push("transition"))},staggerTime*ONE_SECOND,!1)),element.on(css3AnimationEvents,onAnimationProgress),elementData.closeAnimationFns.push(function(){onEnd(),activeAnimationComplete()}),elementData.running++,animationCloseHandler(element,totalTime),onEnd}function blockTransitions(node,bool){node.style[TRANSITION_PROP+PROPERTY_KEY]=bool?"none":""}function blockAnimations(node,bool){node.style[ANIMATION_PROP+ANIMATION_PLAYSTATE_KEY]=bool?"paused":""}function animateBefore(animationEvent,element,className,styles){return animateSetup(animationEvent,element,className,styles)?function(cancelled){cancelled&&animateClose(element,className)}:void 0}function animateAfter(animationEvent,element,className,afterAnimationComplete,styles){return element.data(NG_ANIMATE_CSS_DATA_KEY)?animateRun(animationEvent,element,className,afterAnimationComplete,styles):(animateClose(element,className),void afterAnimationComplete())}function animate(animationEvent,element,className,animationComplete,options){var preReflowCancellation=animateBefore(animationEvent,element,className,options.from);if(!preReflowCancellation)return clearCacheAfterReflow(),void animationComplete();var cancel=preReflowCancellation;return afterReflow(element,function(){cancel=animateAfter(animationEvent,element,className,animationComplete,options.to)}),function(cancelled){(cancel||noop)(cancelled)}}function animateClose(element,className){$$jqLite.removeClass(element,className);var data=element.data(NG_ANIMATE_CSS_DATA_KEY);data&&(data.running&&data.running--,data.running&&0!==data.running||element.removeData(NG_ANIMATE_CSS_DATA_KEY))}function suffixClasses(classes,suffix){var className="";return classes=isArray(classes)?classes:classes.split(/\s+/),forEach(classes,function(klass,i){klass&&klass.length>0&&(className+=(i>0?" ":"")+klass+suffix)}),className}var TRANSITION_PROP,TRANSITIONEND_EVENT,ANIMATION_PROP,ANIMATIONEND_EVENT,CSS_PREFIX="";window.ontransitionend===undefined&&window.onwebkittransitionend!==undefined?(CSS_PREFIX="-webkit-",TRANSITION_PROP="WebkitTransition",TRANSITIONEND_EVENT="webkitTransitionEnd transitionend"):(TRANSITION_PROP="transition",TRANSITIONEND_EVENT="transitionend"),window.onanimationend===undefined&&window.onwebkitanimationend!==undefined?(CSS_PREFIX="-webkit-",ANIMATION_PROP="WebkitAnimation",ANIMATIONEND_EVENT="webkitAnimationEnd animationend"):(ANIMATION_PROP="animation",ANIMATIONEND_EVENT="animationend");var cancelAnimationReflow,DURATION_KEY="Duration",PROPERTY_KEY="Property",DELAY_KEY="Delay",ANIMATION_ITERATION_COUNT_KEY="IterationCount",ANIMATION_PLAYSTATE_KEY="PlayState",NG_ANIMATE_PARENT_KEY="$$ngAnimateKey",NG_ANIMATE_CSS_DATA_KEY="$$ngAnimateCSS3Data",ELAPSED_TIME_MAX_DECIMAL_PLACES=3,CLOSING_TIME_BUFFER=1.5,ONE_SECOND=1e3,lookupCache={},parentCounter=0,animationReflowQueue=[],closingTimer=null,closingTimestamp=0,animationElementQueue=[];return{animate:function(element,className,from,to,animationCompleted,options){return options=options||{},options.from=from,options.to=to,animate("animate",element,className,animationCompleted,options)},enter:function(element,animationCompleted,options){return options=options||{},animate("enter",element,"ng-enter",animationCompleted,options)},leave:function(element,animationCompleted,options){return options=options||{},animate("leave",element,"ng-leave",animationCompleted,options)},move:function(element,animationCompleted,options){return options=options||{},animate("move",element,"ng-move",animationCompleted,options)},beforeSetClass:function(element,add,remove,animationCompleted,options){options=options||{};var className=suffixClasses(remove,"-remove")+" "+suffixClasses(add,"-add"),cancellationMethod=animateBefore("setClass",element,className,options.from);return cancellationMethod?(afterReflow(element,animationCompleted),cancellationMethod):(clearCacheAfterReflow(),void animationCompleted())},beforeAddClass:function(element,className,animationCompleted,options){options=options||{};var cancellationMethod=animateBefore("addClass",element,suffixClasses(className,"-add"),options.from);return cancellationMethod?(afterReflow(element,animationCompleted),cancellationMethod):(clearCacheAfterReflow(),void animationCompleted())},beforeRemoveClass:function(element,className,animationCompleted,options){options=options||{};var cancellationMethod=animateBefore("removeClass",element,suffixClasses(className,"-remove"),options.from);return cancellationMethod?(afterReflow(element,animationCompleted),cancellationMethod):(clearCacheAfterReflow(),void animationCompleted())},setClass:function(element,add,remove,animationCompleted,options){options=options||{},remove=suffixClasses(remove,"-remove"),add=suffixClasses(add,"-add");var className=remove+" "+add;return animateAfter("setClass",element,className,animationCompleted,options.to)},addClass:function(element,className,animationCompleted,options){return options=options||{},animateAfter("addClass",element,suffixClasses(className,"-add"),animationCompleted,options.to)},removeClass:function(element,className,animationCompleted,options){return options=options||{},animateAfter("removeClass",element,suffixClasses(className,"-remove"),animationCompleted,options.to)}}}])}])}(window,window.angular),function(){function _extend(target,source){if(!source||"function"==typeof source)return target;for(var attr in source)target[attr]=source[attr];return target}function _deepExtend(target,source){for(var prop in source)prop in target?_deepExtend(target[prop],source[prop]):target[prop]=source[prop];return target}function _each(object,callback,args){var name,i=0,length=object.length,isObj=void 0===length||"[object Array]"!==Object.prototype.toString.apply(object)||"function"==typeof object;if(args)if(isObj){for(name in object)if(callback.apply(object[name],args)===!1)break}else for(;length>i&&callback.apply(object[i++],args)!==!1;);else if(isObj){for(name in object)if(callback.call(object[name],name,object[name])===!1)break}else for(;length>i&&callback.call(object[i],i,object[i++])!==!1;);return object}function _escape(data){return"string"==typeof data?data.replace(/[&<>"'\/]/g,function(s){return _entityMap[s]}):data}function _ajax(options){var getXhr=function(callback){if(window.XMLHttpRequest)return callback(null,new XMLHttpRequest);if(window.ActiveXObject)try{return callback(null,new ActiveXObject("Msxml2.XMLHTTP"))}catch(e){return callback(null,new ActiveXObject("Microsoft.XMLHTTP"))}return callback(new Error)},encodeUsingUrlEncoding=function(data){if("string"==typeof data)return data;var result=[];for(var dataItem in data)data.hasOwnProperty(dataItem)&&result.push(encodeURIComponent(dataItem)+"="+encodeURIComponent(data[dataItem]));return result.join("&")},utf8=function(text){text=text.replace(/\r\n/g,"\n");for(var result="",i=0;i<text.length;i++){var c=text.charCodeAt(i);128>c?result+=String.fromCharCode(c):c>127&&2048>c?(result+=String.fromCharCode(c>>6|192),result+=String.fromCharCode(63&c|128)):(result+=String.fromCharCode(c>>12|224),result+=String.fromCharCode(c>>6&63|128),result+=String.fromCharCode(63&c|128))
}return result},base64=function(text){var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";text=utf8(text);var chr1,chr2,chr3,enc1,enc2,enc3,enc4,result="",i=0;do chr1=text.charCodeAt(i++),chr2=text.charCodeAt(i++),chr3=text.charCodeAt(i++),enc1=chr1>>2,enc2=(3&chr1)<<4|chr2>>4,enc3=(15&chr2)<<2|chr3>>6,enc4=63&chr3,isNaN(chr2)?enc3=enc4=64:isNaN(chr3)&&(enc4=64),result+=keyStr.charAt(enc1)+keyStr.charAt(enc2)+keyStr.charAt(enc3)+keyStr.charAt(enc4),chr1=chr2=chr3="",enc1=enc2=enc3=enc4="";while(i<text.length);return result},mergeHeaders=function(){for(var result=arguments[0],i=1;i<arguments.length;i++){var currentHeaders=arguments[i];for(var header in currentHeaders)currentHeaders.hasOwnProperty(header)&&(result[header]=currentHeaders[header])}return result},ajax=function(method,url,options,callback){"function"==typeof options&&(callback=options,options={}),options.cache=options.cache||!1,options.data=options.data||{},options.headers=options.headers||{},options.jsonp=options.jsonp||!1,options.async=void 0===options.async?!0:options.async;var payload,headers=mergeHeaders({accept:"*/*","content-type":"application/x-www-form-urlencoded;charset=UTF-8"},ajax.headers,options.headers);if(payload="application/json"===headers["content-type"]?JSON.stringify(options.data):encodeUsingUrlEncoding(options.data),"GET"===method){var queryString=[];if(payload&&(queryString.push(payload),payload=null),options.cache||queryString.push("_="+(new Date).getTime()),options.jsonp&&(queryString.push("callback="+options.jsonp),queryString.push("jsonp="+options.jsonp)),queryString=queryString.join("&"),queryString.length>1&&(url+=url.indexOf("?")>-1?"&"+queryString:"?"+queryString),options.jsonp){var head=document.getElementsByTagName("head")[0],script=document.createElement("script");return script.type="text/javascript",script.src=url,void head.appendChild(script)}}getXhr(function(err,xhr){if(err)return callback(err);xhr.open(method,url,options.async);for(var header in headers)headers.hasOwnProperty(header)&&xhr.setRequestHeader(header,headers[header]);xhr.onreadystatechange=function(){if(4===xhr.readyState){var data=xhr.responseText||"";if(!callback)return;callback(xhr.status,{text:function(){return data},json:function(){try{return JSON.parse(data)}catch(e){return f.error("Can not parse JSON. URL: "+url),{}}}})}},xhr.send(payload)})},http={authBasic:function(username,password){ajax.headers.Authorization="Basic "+base64(username+":"+password)},connect:function(url,options,callback){return ajax("CONNECT",url,options,callback)},del:function(url,options,callback){return ajax("DELETE",url,options,callback)},get:function(url,options,callback){return ajax("GET",url,options,callback)},head:function(url,options,callback){return ajax("HEAD",url,options,callback)},headers:function(headers){ajax.headers=headers||{}},isAllowed:function(url,verb,callback){this.options(url,function(status,data){callback(-1!==data.text().indexOf(verb))})},options:function(url,options,callback){return ajax("OPTIONS",url,options,callback)},patch:function(url,options,callback){return ajax("PATCH",url,options,callback)},post:function(url,options,callback){return ajax("POST",url,options,callback)},put:function(url,options,callback){return ajax("PUT",url,options,callback)},trace:function(url,options,callback){return ajax("TRACE",url,options,callback)}},methode=options.type?options.type.toLowerCase():"get";http[methode](options.url,options,function(status,data){200===status||0===status&&data.text()?options.success(data.json(),status,null):options.error(data.text(),status,null)})}function init(options,cb){"function"==typeof options&&(cb=options,options={}),options=options||{},f.extend(o,options),delete o.fixLng,o.functions&&(delete o.functions,f.extend(f,options.functions)),"string"==typeof o.ns&&(o.ns={namespaces:[o.ns],defaultNs:o.ns}),"string"==typeof o.fallbackNS&&(o.fallbackNS=[o.fallbackNS]),("string"==typeof o.fallbackLng||"boolean"==typeof o.fallbackLng)&&(o.fallbackLng=[o.fallbackLng]),o.interpolationPrefixEscaped=f.regexEscape(o.interpolationPrefix),o.interpolationSuffixEscaped=f.regexEscape(o.interpolationSuffix),o.lng||(o.lng=f.detectLanguage()),languages=f.toLanguages(o.lng),currentLng=languages[0],f.log("currentLng set to: "+currentLng),o.useCookie&&f.cookie.read(o.cookieName)!==currentLng&&f.cookie.create(o.cookieName,currentLng,o.cookieExpirationTime,o.cookieDomain),o.detectLngFromLocalStorage&&"undefined"!=typeof document&&window.localStorage&&f.localStorage.setItem("i18next_lng",currentLng);var lngTranslate=translate;options.fixLng&&(lngTranslate=function(key,options){return options=options||{},options.lng=options.lng||lngTranslate.lng,translate(key,options)},lngTranslate.lng=currentLng),pluralExtensions.setCurrentLng(currentLng),$&&o.setJqueryExt&&addJqueryFunct();var deferred;if($&&$.Deferred&&(deferred=$.Deferred()),!o.resStore){var lngsToLoad=f.toLanguages(o.lng);"string"==typeof o.preload&&(o.preload=[o.preload]);for(var i=0,l=o.preload.length;l>i;i++)for(var pres=f.toLanguages(o.preload[i]),y=0,len=pres.length;len>y;y++)lngsToLoad.indexOf(pres[y])<0&&lngsToLoad.push(pres[y]);return i18n.sync.load(lngsToLoad,o,function(err,store){resStore=store,initialized=!0,cb&&cb(lngTranslate),deferred&&deferred.resolve(lngTranslate)}),deferred?deferred.promise():void 0}return resStore=o.resStore,initialized=!0,cb&&cb(lngTranslate),deferred&&deferred.resolve(lngTranslate),deferred?deferred.promise():void 0}function preload(lngs,cb){"string"==typeof lngs&&(lngs=[lngs]);for(var i=0,l=lngs.length;l>i;i++)o.preload.indexOf(lngs[i])<0&&o.preload.push(lngs[i]);return init(cb)}function addResourceBundle(lng,ns,resources,deep){"string"!=typeof ns?(resources=ns,ns=o.ns.defaultNs):o.ns.namespaces.indexOf(ns)<0&&o.ns.namespaces.push(ns),resStore[lng]=resStore[lng]||{},resStore[lng][ns]=resStore[lng][ns]||{},deep?f.deepExtend(resStore[lng][ns],resources):f.extend(resStore[lng][ns],resources)}function hasResourceBundle(lng,ns){"string"!=typeof ns&&(ns=o.ns.defaultNs),resStore[lng]=resStore[lng]||{};var res=resStore[lng][ns]||{},hasValues=!1;for(var prop in res)res.hasOwnProperty(prop)&&(hasValues=!0);return hasValues}function removeResourceBundle(lng,ns){"string"!=typeof ns&&(ns=o.ns.defaultNs),resStore[lng]=resStore[lng]||{},resStore[lng][ns]={}}function addResource(lng,ns,key,value){"string"!=typeof ns?(resource=ns,ns=o.ns.defaultNs):o.ns.namespaces.indexOf(ns)<0&&o.ns.namespaces.push(ns),resStore[lng]=resStore[lng]||{},resStore[lng][ns]=resStore[lng][ns]||{};for(var keys=key.split(o.keyseparator),x=0,node=resStore[lng][ns];keys[x];)x==keys.length-1?node[keys[x]]=value:(null==node[keys[x]]&&(node[keys[x]]={}),node=node[keys[x]]),x++}function addResources(lng,ns,resources){"string"!=typeof ns?(resource=ns,ns=o.ns.defaultNs):o.ns.namespaces.indexOf(ns)<0&&o.ns.namespaces.push(ns);for(var m in resources)"string"==typeof resources[m]&&addResource(lng,ns,m,resources[m])}function setDefaultNamespace(ns){o.ns.defaultNs=ns}function loadNamespace(namespace,cb){loadNamespaces([namespace],cb)}function loadNamespaces(namespaces,cb){var opts={dynamicLoad:o.dynamicLoad,resGetPath:o.resGetPath,getAsync:o.getAsync,customLoad:o.customLoad,ns:{namespaces:namespaces,defaultNs:""}},lngsToLoad=f.toLanguages(o.lng);"string"==typeof o.preload&&(o.preload=[o.preload]);for(var i=0,l=o.preload.length;l>i;i++)for(var pres=f.toLanguages(o.preload[i]),y=0,len=pres.length;len>y;y++)lngsToLoad.indexOf(pres[y])<0&&lngsToLoad.push(pres[y]);for(var lngNeedLoad=[],a=0,lenA=lngsToLoad.length;lenA>a;a++){var needLoad=!1,resSet=resStore[lngsToLoad[a]];if(resSet)for(var b=0,lenB=namespaces.length;lenB>b;b++)resSet[namespaces[b]]||(needLoad=!0);else needLoad=!0;needLoad&&lngNeedLoad.push(lngsToLoad[a])}lngNeedLoad.length?i18n.sync._fetch(lngNeedLoad,opts,function(err,store){var todo=namespaces.length*lngNeedLoad.length;f.each(namespaces,function(nsIndex,nsValue){o.ns.namespaces.indexOf(nsValue)<0&&o.ns.namespaces.push(nsValue),f.each(lngNeedLoad,function(lngIndex,lngValue){resStore[lngValue]=resStore[lngValue]||{},resStore[lngValue][nsValue]=store[lngValue][nsValue],todo--,0===todo&&cb&&(o.useLocalStorage&&i18n.sync._storeLocal(resStore),cb())})})}):cb&&cb()}function setLng(lng,options,cb){return"function"==typeof options?(cb=options,options={}):options||(options={}),options.lng=lng,init(options,cb)}function lng(){return currentLng}function reload(cb){resStore={},setLng(currentLng,cb)}function addJqueryFunct(){function parse(ele,key,options){if(0!==key.length){var attr="text";if(0===key.indexOf("[")){var parts=key.split("]");key=parts[1],attr=parts[0].substr(1,parts[0].length-1)}key.indexOf(";")===key.length-1&&(key=key.substr(0,key.length-2));var optionsToUse;if("html"===attr)optionsToUse=o.defaultValueFromContent?$.extend({defaultValue:ele.html()},options):options,ele.html($.t(key,optionsToUse));else if("text"===attr)optionsToUse=o.defaultValueFromContent?$.extend({defaultValue:ele.text()},options):options,ele.text($.t(key,optionsToUse));else if("prepend"===attr)optionsToUse=o.defaultValueFromContent?$.extend({defaultValue:ele.html()},options):options,ele.prepend($.t(key,optionsToUse));else if("append"===attr)optionsToUse=o.defaultValueFromContent?$.extend({defaultValue:ele.html()},options):options,ele.append($.t(key,optionsToUse));else if(0===attr.indexOf("data-")){var dataAttr=attr.substr("data-".length);optionsToUse=o.defaultValueFromContent?$.extend({defaultValue:ele.data(dataAttr)},options):options;var translated=$.t(key,optionsToUse);ele.data(dataAttr,translated),ele.attr(attr,translated)}else optionsToUse=o.defaultValueFromContent?$.extend({defaultValue:ele.attr(attr)},options):options,ele.attr(attr,$.t(key,optionsToUse))}}function localize(ele,options){var key=ele.attr(o.selectorAttr);if(key||"undefined"==typeof key||key===!1||(key=ele.text()||ele.val()),key){var target=ele,targetSelector=ele.data("i18n-target");if(targetSelector&&(target=ele.find(targetSelector)||ele),options||o.useDataAttrOptions!==!0||(options=ele.data("i18n-options")),options=options||{},key.indexOf(";")>=0){var keys=key.split(";");$.each(keys,function(m,k){""!==k&&parse(target,k,options)})}else parse(target,key,options);o.useDataAttrOptions===!0&&ele.data("i18n-options",options)}}$.t=$.t||translate,$.fn.i18n=function(options){return this.each(function(){localize($(this),options);var elements=$(this).find("["+o.selectorAttr+"]");elements.each(function(){localize($(this),options)})})}}function applyReplacement(str,replacementHash,nestedKey,options){if(!str)return str;if(options=options||replacementHash,str.indexOf(options.interpolationPrefix||o.interpolationPrefix)<0)return str;var prefix=options.interpolationPrefix?f.regexEscape(options.interpolationPrefix):o.interpolationPrefixEscaped,suffix=options.interpolationSuffix?f.regexEscape(options.interpolationSuffix):o.interpolationSuffixEscaped,unEscapingSuffix="HTML"+suffix,hash=replacementHash.replace&&"object"==typeof replacementHash.replace?replacementHash.replace:replacementHash;return f.each(hash,function(key,value){var nextKey=nestedKey?nestedKey+o.keyseparator+key:key;"object"==typeof value&&null!==value?str=applyReplacement(str,value,nextKey,options):options.escapeInterpolation||o.escapeInterpolation?(str=str.replace(new RegExp([prefix,nextKey,unEscapingSuffix].join(""),"g"),f.regexReplacementEscape(value)),str=str.replace(new RegExp([prefix,nextKey,suffix].join(""),"g"),f.regexReplacementEscape(f.escape(value)))):str=str.replace(new RegExp([prefix,nextKey,suffix].join(""),"g"),f.regexReplacementEscape(value))}),str}function applyReuse(translated,options){var comma=",",options_open="{",options_close="}",opts=f.extend({},options);for(delete opts.postProcess;-1!=translated.indexOf(o.reusePrefix)&&(replacementCounter++,!(replacementCounter>o.maxRecursion));){var index_of_opening=translated.lastIndexOf(o.reusePrefix),index_of_end_of_closing=translated.indexOf(o.reuseSuffix,index_of_opening)+o.reuseSuffix.length,token=translated.substring(index_of_opening,index_of_end_of_closing),token_without_symbols=token.replace(o.reusePrefix,"").replace(o.reuseSuffix,"");if(index_of_opening>=index_of_end_of_closing)return f.error("there is an missing closing in following translation value",translated),"";if(-1!=token_without_symbols.indexOf(comma)){var index_of_token_end_of_closing=token_without_symbols.indexOf(comma);if(-1!=token_without_symbols.indexOf(options_open,index_of_token_end_of_closing)&&-1!=token_without_symbols.indexOf(options_close,index_of_token_end_of_closing)){var index_of_opts_opening=token_without_symbols.indexOf(options_open,index_of_token_end_of_closing),index_of_opts_end_of_closing=token_without_symbols.indexOf(options_close,index_of_opts_opening)+options_close.length;try{opts=f.extend(opts,JSON.parse(token_without_symbols.substring(index_of_opts_opening,index_of_opts_end_of_closing))),token_without_symbols=token_without_symbols.substring(0,index_of_token_end_of_closing)}catch(e){}}}var translated_token=_translate(token_without_symbols,opts);translated=translated.replace(token,f.regexReplacementEscape(translated_token))}return translated}function hasContext(options){return options.context&&("string"==typeof options.context||"number"==typeof options.context)}function needsPlural(options){return void 0!==options.count&&"string"!=typeof options.count}function needsIndefiniteArticle(options){return void 0!==options.indefinite_article&&"string"!=typeof options.indefinite_article&&options.indefinite_article}function exists(key,options){options=options||{};var notFound=_getDefaultValue(key,options),found=_find(key,options);return void 0!==found||found===notFound}function translate(key,options){return options=options||{},initialized?(replacementCounter=0,_translate.apply(null,arguments)):(f.log("i18next not finished initialization. you might have called t function before loading resources finished."),options.defaultValue||"")}function _getDefaultValue(key,options){return void 0!==options.defaultValue?options.defaultValue:key}function _injectSprintfProcessor(){for(var values=[],i=1;i<arguments.length;i++)values.push(arguments[i]);return{postProcess:"sprintf",sprintf:values}}function _translate(potentialKeys,options){if(options&&"object"!=typeof options?"sprintf"===o.shortcutFunction?options=_injectSprintfProcessor.apply(null,arguments):"defaultValue"===o.shortcutFunction&&(options={defaultValue:options}):options=options||{},"object"==typeof o.defaultVariables&&(options=f.extend({},o.defaultVariables,options)),void 0===potentialKeys||null===potentialKeys||""===potentialKeys)return"";"string"==typeof potentialKeys&&(potentialKeys=[potentialKeys]);var key=potentialKeys[0];if(potentialKeys.length>1)for(var i=0;i<potentialKeys.length&&(key=potentialKeys[i],!exists(key,options));i++);var parts,notFound=_getDefaultValue(key,options),found=_find(key,options),lngs=options.lng?f.toLanguages(options.lng,options.fallbackLng):languages,ns=options.ns||o.ns.defaultNs;key.indexOf(o.nsseparator)>-1&&(parts=key.split(o.nsseparator),ns=parts[0],key=parts[1]),void 0===found&&o.sendMissing&&"function"==typeof o.missingKeyHandler&&(options.lng?o.missingKeyHandler(lngs[0],ns,key,notFound,lngs):o.missingKeyHandler(o.lng,ns,key,notFound,lngs));var postProcessor=options.postProcess||o.postProcess;void 0!==found&&postProcessor&&postProcessors[postProcessor]&&(found=postProcessors[postProcessor](found,key,options));var splitNotFound=notFound;if(notFound.indexOf(o.nsseparator)>-1&&(parts=notFound.split(o.nsseparator),splitNotFound=parts[1]),splitNotFound===key&&o.parseMissingKey&&(notFound=o.parseMissingKey(notFound)),void 0===found&&(notFound=applyReplacement(notFound,options),notFound=applyReuse(notFound,options),postProcessor&&postProcessors[postProcessor])){var val=_getDefaultValue(key,options);found=postProcessors[postProcessor](val,key,options)}return void 0!==found?found:notFound}function _find(key,options){options=options||{};var optionWithoutCount,translated,notFound=_getDefaultValue(key,options),lngs=languages;if(!resStore)return notFound;if("cimode"===lngs[0].toLowerCase())return notFound;if(options.lngs&&(lngs=options.lngs),options.lng&&(lngs=f.toLanguages(options.lng,options.fallbackLng),!resStore[lngs[0]])){var oldAsync=o.getAsync;o.getAsync=!1,i18n.sync.load(lngs,o,function(err,store){f.extend(resStore,store),o.getAsync=oldAsync})}var ns=options.ns||o.ns.defaultNs;if(key.indexOf(o.nsseparator)>-1){var parts=key.split(o.nsseparator);ns=parts[0],key=parts[1]}if(hasContext(options)){optionWithoutCount=f.extend({},options),delete optionWithoutCount.context,optionWithoutCount.defaultValue=o.contextNotFound;var contextKey=ns+o.nsseparator+key+"_"+options.context;if(translated=translate(contextKey,optionWithoutCount),translated!=o.contextNotFound)return applyReplacement(translated,{context:options.context})}if(needsPlural(options,lngs[0])){optionWithoutCount=f.extend({lngs:[lngs[0]]},options),delete optionWithoutCount.count,delete optionWithoutCount.lng,optionWithoutCount.defaultValue=o.pluralNotFound;var pluralKey;if(pluralExtensions.needsPlural(lngs[0],options.count)){pluralKey=ns+o.nsseparator+key+o.pluralSuffix;var pluralExtension=pluralExtensions.get(lngs[0],options.count);pluralExtension>=0?pluralKey=pluralKey+"_"+pluralExtension:1===pluralExtension&&(pluralKey=ns+o.nsseparator+key)}else pluralKey=ns+o.nsseparator+key;if(translated=translate(pluralKey,optionWithoutCount),translated!=o.pluralNotFound)return applyReplacement(translated,{count:options.count,interpolationPrefix:options.interpolationPrefix,interpolationSuffix:options.interpolationSuffix});if(!(lngs.length>1))return translated;var clone=lngs.slice();if(clone.shift(),options=f.extend(options,{lngs:clone}),delete options.lng,translated=translate(ns+o.nsseparator+key,options),translated!=o.pluralNotFound)return translated}if(needsIndefiniteArticle(options)){var optionsWithoutIndef=f.extend({},options);delete optionsWithoutIndef.indefinite_article,optionsWithoutIndef.defaultValue=o.indefiniteNotFound;var indefiniteKey=ns+o.nsseparator+key+(options.count&&!needsPlural(options,lngs[0])||!options.count?o.indefiniteSuffix:"");if(translated=translate(indefiniteKey,optionsWithoutIndef),translated!=o.indefiniteNotFound)return translated}for(var found,keys=key.split(o.keyseparator),i=0,len=lngs.length;len>i&&void 0===found;i++){for(var l=lngs[i],x=0,value=resStore[l]&&resStore[l][ns];keys[x];)value=value&&value[keys[x]],x++;if(void 0!==value){var valueType=Object.prototype.toString.apply(value);if("string"==typeof value)value=applyReplacement(value,options),value=applyReuse(value,options);else if("[object Array]"!==valueType||o.returnObjectTrees||options.returnObjectTrees){if(null===value&&o.fallbackOnNull===!0)value=void 0;else if(null!==value)if(o.returnObjectTrees||options.returnObjectTrees){if("[object Number]"!==valueType&&"[object Function]"!==valueType&&"[object RegExp]"!==valueType){var copy="[object Array]"===valueType?[]:{};f.each(value,function(m){copy[m]=_translate(ns+o.nsseparator+key+o.keyseparator+m,options)}),value=copy}}else o.objectTreeKeyHandler&&"function"==typeof o.objectTreeKeyHandler?value=o.objectTreeKeyHandler(key,value,l,ns,options):(value="key '"+ns+":"+key+" ("+l+")' returned an object instead of string.",f.log(value))}else value=value.join("\n"),value=applyReplacement(value,options),value=applyReuse(value,options);"string"==typeof value&&""===value.trim()&&o.fallbackOnEmpty===!0&&(value=void 0),found=value}}if(void 0===found&&!options.isFallbackLookup&&(o.fallbackToDefaultNS===!0||o.fallbackNS&&o.fallbackNS.length>0)){if(options.isFallbackLookup=!0,o.fallbackNS.length){for(var y=0,lenY=o.fallbackNS.length;lenY>y;y++)if(found=_find(o.fallbackNS[y]+o.nsseparator+key,options),found||""===found&&o.fallbackOnEmpty===!1){var foundValue=found.indexOf(o.nsseparator)>-1?found.split(o.nsseparator)[1]:found,notFoundValue=notFound.indexOf(o.nsseparator)>-1?notFound.split(o.nsseparator)[1]:notFound;if(foundValue!==notFoundValue)break}}else found=_find(key,options);options.isFallbackLookup=!1}return found}function detectLanguage(){var detectedLng,whitelist=o.lngWhitelist||[],userLngChoices=[];if("undefined"!=typeof window&&!function(){for(var query=window.location.search.substring(1),params=query.split("&"),i=0;i<params.length;i++){var pos=params[i].indexOf("=");if(pos>0){var key=params[i].substring(0,pos);key==o.detectLngQS&&userLngChoices.push(params[i].substring(pos+1))}}}(),o.useCookie&&"undefined"!=typeof document){var c=f.cookie.read(o.cookieName);c&&userLngChoices.push(c)}if(o.detectLngFromLocalStorage&&"undefined"!=typeof window&&window.localStorage&&userLngChoices.push(window.localStorage.getItem("i18next_lng")),"undefined"!=typeof navigator){if(navigator.languages)for(var i=0;i<navigator.languages.length;i++)userLngChoices.push(navigator.languages[i]);navigator.userLanguage&&userLngChoices.push(navigator.userLanguage),navigator.language&&userLngChoices.push(navigator.language)}return function(){for(var i=0;i<userLngChoices.length;i++){var lng=userLngChoices[i];if(lng.indexOf("-")>-1){var parts=lng.split("-");lng=o.lowerCaseLng?parts[0].toLowerCase()+"-"+parts[1].toLowerCase():parts[0].toLowerCase()+"-"+parts[1].toUpperCase()}if(0===whitelist.length||whitelist.indexOf(lng)>-1){detectedLng=lng;break}}}(),detectedLng||(detectedLng=o.fallbackLng[0]),detectedLng}Array.prototype.indexOf||(Array.prototype.indexOf=function(searchElement){"use strict";if(null==this)throw new TypeError;var t=Object(this),len=t.length>>>0;if(0===len)return-1;var n=0;if(arguments.length>0&&(n=Number(arguments[1]),n!=n?n=0:0!=n&&1/0!=n&&n!=-1/0&&(n=(n>0||-1)*Math.floor(Math.abs(n)))),n>=len)return-1;for(var k=n>=0?n:Math.max(len-Math.abs(n),0);len>k;k++)if(k in t&&t[k]===searchElement)return k;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(searchElement){"use strict";if(null==this)throw new TypeError;var t=Object(this),len=t.length>>>0;if(0===len)return-1;var n=len;arguments.length>1&&(n=Number(arguments[1]),n!=n?n=0:0!=n&&n!=1/0&&n!=-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))));for(var k=n>=0?Math.min(n,len-1):len-Math.abs(n);k>=0;k--)if(k in t&&t[k]===searchElement)return k;return-1}),"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});var currentLng,root=this,$=root.jQuery||root.Zepto,i18n={},resStore={},replacementCounter=0,languages=[],initialized=!1,sync={};if("undefined"!=typeof module&&module.exports){if(!$)try{$=require("jquery")}catch(e){}$&&($.i18n=$.i18n||i18n),module.exports=i18n}else $&&($.i18n=$.i18n||i18n),root.i18n=root.i18n||i18n;sync={load:function(lngs,options,cb){options.useLocalStorage?sync._loadLocal(lngs,options,function(err,store){for(var missingLngs=[],i=0,len=lngs.length;len>i;i++)store[lngs[i]]||missingLngs.push(lngs[i]);missingLngs.length>0?sync._fetch(missingLngs,options,function(err,fetched){f.extend(store,fetched),sync._storeLocal(fetched),cb(null,store)}):cb(null,store)}):sync._fetch(lngs,options,function(err,store){cb(null,store)})},_loadLocal:function(lngs,options,cb){var store={},nowMS=(new Date).getTime();if(window.localStorage){var todo=lngs.length;f.each(lngs,function(key,lng){var local=window.localStorage.getItem("res_"+lng);local&&(local=JSON.parse(local),local.i18nStamp&&local.i18nStamp+options.localStorageExpirationTime>nowMS&&(store[lng]=local)),todo--,0===todo&&cb(null,store)})}},_storeLocal:function(store){if(window.localStorage)for(var m in store)store[m].i18nStamp=(new Date).getTime(),f.localStorage.setItem("res_"+m,JSON.stringify(store[m]))},_fetch:function(lngs,options,cb){var ns=options.ns,store={};if(options.dynamicLoad){var loadComplete=function(err,data){cb(null,data)};if("function"==typeof options.customLoad)options.customLoad(lngs,ns.namespaces,options,loadComplete);else{var url=applyReplacement(options.resGetPath,{lng:lngs.join("+"),ns:ns.namespaces.join("+")});f.ajax({url:url,success:function(data){f.log("loaded: "+url),loadComplete(null,data)},error:function(xhr,status,error){f.log("failed loading: "+url),loadComplete("failed loading resource.json error: "+error)},dataType:"json",async:options.getAsync})}}else{var errors,todo=ns.namespaces.length*lngs.length;f.each(ns.namespaces,function(nsIndex,nsValue){f.each(lngs,function(lngIndex,lngValue){var loadComplete=function(err,data){err&&(errors=errors||[],errors.push(err)),store[lngValue]=store[lngValue]||{},store[lngValue][nsValue]=data,todo--,0===todo&&cb(errors,store)};"function"==typeof options.customLoad?options.customLoad(lngValue,nsValue,options,loadComplete):sync._fetchOne(lngValue,nsValue,options,loadComplete)})})}},_fetchOne:function(lng,ns,options,done){var url=applyReplacement(options.resGetPath,{lng:lng,ns:ns});f.ajax({url:url,success:function(data){f.log("loaded: "+url),done(null,data)},error:function(xhr,status,error){if(status&&200==status||xhr&&xhr.status&&200==xhr.status)f.error("There is a typo in: "+url);else if(status&&404==status||xhr&&xhr.status&&404==xhr.status)f.log("Does not exist: "+url);else{var theStatus=status?status:xhr&&xhr.status?xhr.status:null;f.log(theStatus+" when loading "+url)}done(error,{})},dataType:"json",async:options.getAsync})},postMissing:function(lng,ns,key,defaultValue,lngs){var payload={};payload[key]=defaultValue;var urls=[];if("fallback"===o.sendMissingTo&&o.fallbackLng[0]!==!1)for(var i=0;i<o.fallbackLng.length;i++)urls.push({lng:o.fallbackLng[i],url:applyReplacement(o.resPostPath,{lng:o.fallbackLng[i],ns:ns})});else if("current"===o.sendMissingTo||"fallback"===o.sendMissingTo&&o.fallbackLng[0]===!1)urls.push({lng:lng,url:applyReplacement(o.resPostPath,{lng:lng,ns:ns})});else if("all"===o.sendMissingTo)for(var i=0,l=lngs.length;l>i;i++)urls.push({lng:lngs[i],url:applyReplacement(o.resPostPath,{lng:lngs[i],ns:ns})});for(var y=0,len=urls.length;len>y;y++){var item=urls[y];f.ajax({url:item.url,type:o.sendType,data:payload,success:function(){f.log("posted missing key '"+key+"' to: "+item.url);for(var keys=key.split("."),x=0,value=resStore[item.lng][ns];keys[x];)value=value[keys[x]]=x===keys.length-1?defaultValue:value[keys[x]]||{},x++},error:function(){f.log("failed posting missing key '"+key+"' to: "+item.url)},dataType:"json",async:o.postAsync})}},reload:reload};var o={lng:void 0,load:"all",preload:[],lowerCaseLng:!1,returnObjectTrees:!1,fallbackLng:["dev"],fallbackNS:[],detectLngQS:"setLng",detectLngFromLocalStorage:!1,ns:"translation",fallbackOnNull:!0,fallbackOnEmpty:!1,fallbackToDefaultNS:!1,nsseparator:":",keyseparator:".",selectorAttr:"data-i18n",debug:!1,resGetPath:"locales/__lng__/__ns__.json",resPostPath:"locales/add/__lng__/__ns__",getAsync:!0,postAsync:!0,resStore:void 0,useLocalStorage:!1,localStorageExpirationTime:6048e5,dynamicLoad:!1,sendMissing:!1,sendMissingTo:"fallback",sendType:"POST",interpolationPrefix:"__",interpolationSuffix:"__",defaultVariables:!1,reusePrefix:"$t(",reuseSuffix:")",pluralSuffix:"_plural",pluralNotFound:["plural_not_found",Math.random()].join(""),contextNotFound:["context_not_found",Math.random()].join(""),escapeInterpolation:!1,indefiniteSuffix:"_indefinite",indefiniteNotFound:["indefinite_not_found",Math.random()].join(""),setJqueryExt:!0,defaultValueFromContent:!0,useDataAttrOptions:!1,cookieExpirationTime:void 0,useCookie:!0,cookieName:"i18next",cookieDomain:void 0,objectTreeKeyHandler:void 0,postProcess:void 0,parseMissingKey:void 0,missingKeyHandler:sync.postMissing,shortcutFunction:"sprintf"},_entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},_cookie={create:function(name,value,minutes,domain){var expires;if(minutes){var date=new Date;date.setTime(date.getTime()+60*minutes*1e3),expires="; expires="+date.toGMTString()}else expires="";domain=domain?"domain="+domain+";":"",document.cookie=name+"="+value+expires+";"+domain+"path=/"},read:function(name){for(var nameEQ=name+"=",ca=document.cookie.split(";"),i=0;i<ca.length;i++){for(var c=ca[i];" "==c.charAt(0);)c=c.substring(1,c.length);if(0===c.indexOf(nameEQ))return c.substring(nameEQ.length,c.length)}return null},remove:function(name){this.create(name,"",-1)}},cookie_noop={create:function(){},read:function(){return null},remove:function(){}},f={extend:$?$.extend:_extend,deepExtend:_deepExtend,each:$?$.each:_each,ajax:$?$.ajax:"undefined"!=typeof document?_ajax:function(){},cookie:"undefined"!=typeof document?_cookie:cookie_noop,detectLanguage:detectLanguage,escape:_escape,log:function(str){o.debug&&"undefined"!=typeof console&&console.log(str)},error:function(str){"undefined"!=typeof console&&console.error(str)},getCountyIndexOfLng:function(lng){var lng_index=0;return("nb-NO"===lng||"nn-NO"===lng||"nb-no"===lng||"nn-no"===lng)&&(lng_index=1),lng_index},toLanguages:function(lng){function applyCase(l){var ret=l;if("string"==typeof l&&l.indexOf("-")>-1){var parts=l.split("-");ret=o.lowerCaseLng?parts[0].toLowerCase()+"-"+parts[1].toLowerCase():parts[0].toLowerCase()+"-"+parts[1].toUpperCase()}else ret=o.lowerCaseLng?l.toLowerCase():l;return ret}var log=this.log,languages=[],whitelist=o.lngWhitelist||!1,addLanguage=function(language){!whitelist||whitelist.indexOf(language)>-1?languages.push(language):log("rejecting non-whitelisted language: "+language)};if("string"==typeof lng&&lng.indexOf("-")>-1){var parts=lng.split("-");"unspecific"!==o.load&&addLanguage(applyCase(lng)),"current"!==o.load&&addLanguage(applyCase(parts[this.getCountyIndexOfLng(lng)]))}else addLanguage(applyCase(lng));for(var i=0;i<o.fallbackLng.length;i++)-1===languages.indexOf(o.fallbackLng[i])&&o.fallbackLng[i]&&languages.push(applyCase(o.fallbackLng[i]));return languages},regexEscape:function(str){return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},regexReplacementEscape:function(strOrFn){return"string"==typeof strOrFn?strOrFn.replace(/\$/g,"$$$$"):strOrFn},localStorage:{setItem:function(key,value){if(window.localStorage)try{window.localStorage.setItem(key,value)}catch(e){f.log('failed to set value for key "'+key+'" to localStorage.')}}}};f.applyReplacement=applyReplacement;var _rules=[["ach","Acholi",[1,2],1],["af","Afrikaans",[1,2],2],["ak","Akan",[1,2],1],["am","Amharic",[1,2],1],["an","Aragonese",[1,2],2],["ar","Arabic",[0,1,2,3,11,100],5],["arn","Mapudungun",[1,2],1],["ast","Asturian",[1,2],2],["ay","Aymará",[1],3],["az","Azerbaijani",[1,2],2],["be","Belarusian",[1,2,5],4],["bg","Bulgarian",[1,2],2],["bn","Bengali",[1,2],2],["bo","Tibetan",[1],3],["br","Breton",[1,2],1],["bs","Bosnian",[1,2,5],4],["ca","Catalan",[1,2],2],["cgg","Chiga",[1],3],["cs","Czech",[1,2,5],6],["csb","Kashubian",[1,2,5],7],["cy","Welsh",[1,2,3,8],8],["da","Danish",[1,2],2],["de","German",[1,2],2],["dev","Development Fallback",[1,2],2],["dz","Dzongkha",[1],3],["el","Greek",[1,2],2],["en","English",[1,2],2],["eo","Esperanto",[1,2],2],["es","Spanish",[1,2],2],["es_ar","Argentinean Spanish",[1,2],2],["et","Estonian",[1,2],2],["eu","Basque",[1,2],2],["fa","Persian",[1],3],["fi","Finnish",[1,2],2],["fil","Filipino",[1,2],1],["fo","Faroese",[1,2],2],["fr","French",[1,2],9],["fur","Friulian",[1,2],2],["fy","Frisian",[1,2],2],["ga","Irish",[1,2,3,7,11],10],["gd","Scottish Gaelic",[1,2,3,20],11],["gl","Galician",[1,2],2],["gu","Gujarati",[1,2],2],["gun","Gun",[1,2],1],["ha","Hausa",[1,2],2],["he","Hebrew",[1,2],2],["hi","Hindi",[1,2],2],["hr","Croatian",[1,2,5],4],["hu","Hungarian",[1,2],2],["hy","Armenian",[1,2],2],["ia","Interlingua",[1,2],2],["id","Indonesian",[1],3],["is","Icelandic",[1,2],12],["it","Italian",[1,2],2],["ja","Japanese",[1],3],["jbo","Lojban",[1],3],["jv","Javanese",[0,1],13],["ka","Georgian",[1],3],["kk","Kazakh",[1],3],["km","Khmer",[1],3],["kn","Kannada",[1,2],2],["ko","Korean",[1],3],["ku","Kurdish",[1,2],2],["kw","Cornish",[1,2,3,4],14],["ky","Kyrgyz",[1],3],["lb","Letzeburgesch",[1,2],2],["ln","Lingala",[1,2],1],["lo","Lao",[1],3],["lt","Lithuanian",[1,2,10],15],["lv","Latvian",[1,2,0],16],["mai","Maithili",[1,2],2],["mfe","Mauritian Creole",[1,2],1],["mg","Malagasy",[1,2],1],["mi","Maori",[1,2],1],["mk","Macedonian",[1,2],17],["ml","Malayalam",[1,2],2],["mn","Mongolian",[1,2],2],["mnk","Mandinka",[0,1,2],18],["mr","Marathi",[1,2],2],["ms","Malay",[1],3],["mt","Maltese",[1,2,11,20],19],["nah","Nahuatl",[1,2],2],["nap","Neapolitan",[1,2],2],["nb","Norwegian Bokmal",[1,2],2],["ne","Nepali",[1,2],2],["nl","Dutch",[1,2],2],["nn","Norwegian Nynorsk",[1,2],2],["no","Norwegian",[1,2],2],["nso","Northern Sotho",[1,2],2],["oc","Occitan",[1,2],1],["or","Oriya",[2,1],2],["pa","Punjabi",[1,2],2],["pap","Papiamento",[1,2],2],["pl","Polish",[1,2,5],7],["pms","Piemontese",[1,2],2],["ps","Pashto",[1,2],2],["pt","Portuguese",[1,2],2],["pt_br","Brazilian Portuguese",[1,2],2],["rm","Romansh",[1,2],2],["ro","Romanian",[1,2,20],20],["ru","Russian",[1,2,5],4],["sah","Yakut",[1],3],["sco","Scots",[1,2],2],["se","Northern Sami",[1,2],2],["si","Sinhala",[1,2],2],["sk","Slovak",[1,2,5],6],["sl","Slovenian",[5,1,2,3],21],["so","Somali",[1,2],2],["son","Songhay",[1,2],2],["sq","Albanian",[1,2],2],["sr","Serbian",[1,2,5],4],["su","Sundanese",[1],3],["sv","Swedish",[1,2],2],["sw","Swahili",[1,2],2],["ta","Tamil",[1,2],2],["te","Telugu",[1,2],2],["tg","Tajik",[1,2],1],["th","Thai",[1],3],["ti","Tigrinya",[1,2],1],["tk","Turkmen",[1,2],2],["tr","Turkish",[1,2],1],["tt","Tatar",[1],3],["ug","Uyghur",[1],3],["uk","Ukrainian",[1,2,5],4],["ur","Urdu",[1,2],2],["uz","Uzbek",[1,2],1],["vi","Vietnamese",[1],3],["wa","Walloon",[1,2],1],["wo","Wolof",[1],3],["yo","Yoruba",[1,2],2],["zh","Chinese",[1],3]],_rulesPluralsTypes={1:function(n){return Number(n>1)
},2:function(n){return Number(1!=n)},3:function(){return 0},4:function(n){return Number(n%10==1&&n%100!=11?0:n%10>=2&&4>=n%10&&(10>n%100||n%100>=20)?1:2)},5:function(n){return Number(0===n?0:1==n?1:2==n?2:n%100>=3&&10>=n%100?3:n%100>=11?4:5)},6:function(n){return Number(1==n?0:n>=2&&4>=n?1:2)},7:function(n){return Number(1==n?0:n%10>=2&&4>=n%10&&(10>n%100||n%100>=20)?1:2)},8:function(n){return Number(1==n?0:2==n?1:8!=n&&11!=n?2:3)},9:function(n){return Number(n>=2)},10:function(n){return Number(1==n?0:2==n?1:7>n?2:11>n?3:4)},11:function(n){return Number(1==n||11==n?0:2==n||12==n?1:n>2&&20>n?2:3)},12:function(n){return Number(n%10!=1||n%100==11)},13:function(n){return Number(0!==n)},14:function(n){return Number(1==n?0:2==n?1:3==n?2:3)},15:function(n){return Number(n%10==1&&n%100!=11?0:n%10>=2&&(10>n%100||n%100>=20)?1:2)},16:function(n){return Number(n%10==1&&n%100!=11?0:0!==n?1:2)},17:function(n){return Number(1==n||n%10==1?0:1)},18:function(n){return Number(1==n?1:2)},19:function(n){return Number(1==n?0:0===n||n%100>1&&11>n%100?1:n%100>10&&20>n%100?2:3)},20:function(n){return Number(1==n?0:0===n||n%100>0&&20>n%100?1:2)},21:function(n){return Number(n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0)}},pluralExtensions={rules:function(){var l,rules={};for(l=_rules.length;l--;)rules[_rules[l][0]]={name:_rules[l][1],numbers:_rules[l][2],plurals:_rulesPluralsTypes[_rules[l][3]]};return rules}(),addRule:function(lng,obj){pluralExtensions.rules[lng]=obj},setCurrentLng:function(lng){if(!pluralExtensions.currentRule||pluralExtensions.currentRule.lng!==lng){var parts=lng.split("-");pluralExtensions.currentRule={lng:lng,rule:pluralExtensions.rules[parts[0]]}}},needsPlural:function(lng,count){var ext,parts=lng.split("-");return ext=pluralExtensions.currentRule&&pluralExtensions.currentRule.lng===lng?pluralExtensions.currentRule.rule:pluralExtensions.rules[parts[f.getCountyIndexOfLng(lng)]],ext&&ext.numbers.length<=1?!1:1!==this.get(lng,count)},get:function(lng,count){function getResult(l,c){var ext;if(ext=pluralExtensions.currentRule&&pluralExtensions.currentRule.lng===lng?pluralExtensions.currentRule.rule:pluralExtensions.rules[l]){var i;i=ext.plurals(ext.noAbs?c:Math.abs(c));var number=ext.numbers[i];return 2===ext.numbers.length&&1===ext.numbers[0]&&(2===number?number=-1:1===number&&(number=1)),number}return 1===c?"1":"-1"}var parts=lng.split("-");return getResult(parts[f.getCountyIndexOfLng(lng)],count)}},postProcessors={},addPostProcessor=function(name,fc){postProcessors[name]=fc},sprintf=function(){function get_type(variable){return Object.prototype.toString.call(variable).slice(8,-1).toLowerCase()}function str_repeat(input,multiplier){for(var output=[];multiplier>0;output[--multiplier]=input);return output.join("")}var str_format=function(){return str_format.cache.hasOwnProperty(arguments[0])||(str_format.cache[arguments[0]]=str_format.parse(arguments[0])),str_format.format.call(null,str_format.cache[arguments[0]],arguments)};return str_format.format=function(parse_tree,argv){var arg,i,k,match,pad,pad_character,pad_length,cursor=1,tree_length=parse_tree.length,node_type="",output=[];for(i=0;tree_length>i;i++)if(node_type=get_type(parse_tree[i]),"string"===node_type)output.push(parse_tree[i]);else if("array"===node_type){if(match=parse_tree[i],match[2])for(arg=argv[cursor],k=0;k<match[2].length;k++){if(!arg.hasOwnProperty(match[2][k]))throw sprintf('[sprintf] property "%s" does not exist',match[2][k]);arg=arg[match[2][k]]}else arg=match[1]?argv[match[1]]:argv[cursor++];if(/[^s]/.test(match[8])&&"number"!=get_type(arg))throw sprintf("[sprintf] expecting number but found %s",get_type(arg));switch(match[8]){case"b":arg=arg.toString(2);break;case"c":arg=String.fromCharCode(arg);break;case"d":arg=parseInt(arg,10);break;case"e":arg=match[7]?arg.toExponential(match[7]):arg.toExponential();break;case"f":arg=match[7]?parseFloat(arg).toFixed(match[7]):parseFloat(arg);break;case"o":arg=arg.toString(8);break;case"s":arg=(arg=String(arg))&&match[7]?arg.substring(0,match[7]):arg;break;case"u":arg=Math.abs(arg);break;case"x":arg=arg.toString(16);break;case"X":arg=arg.toString(16).toUpperCase()}arg=/[def]/.test(match[8])&&match[3]&&arg>=0?"+"+arg:arg,pad_character=match[4]?"0"==match[4]?"0":match[4].charAt(1):" ",pad_length=match[6]-String(arg).length,pad=match[6]?str_repeat(pad_character,pad_length):"",output.push(match[5]?arg+pad:pad+arg)}return output.join("")},str_format.cache={},str_format.parse=function(fmt){for(var _fmt=fmt,match=[],parse_tree=[],arg_names=0;_fmt;){if(null!==(match=/^[^\x25]+/.exec(_fmt)))parse_tree.push(match[0]);else if(null!==(match=/^\x25{2}/.exec(_fmt)))parse_tree.push("%");else{if(null===(match=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt)))throw"[sprintf] huh?";if(match[2]){arg_names|=1;var field_list=[],replacement_field=match[2],field_match=[];if(null===(field_match=/^([a-z_][a-z_\d]*)/i.exec(replacement_field)))throw"[sprintf] huh?";for(field_list.push(field_match[1]);""!==(replacement_field=replacement_field.substring(field_match[0].length));)if(null!==(field_match=/^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)))field_list.push(field_match[1]);else{if(null===(field_match=/^\[(\d+)\]/.exec(replacement_field)))throw"[sprintf] huh?";field_list.push(field_match[1])}match[2]=field_list}else arg_names|=2;if(3===arg_names)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";parse_tree.push(match)}_fmt=_fmt.substring(match[0].length)}return parse_tree},str_format}(),vsprintf=function(fmt,argv){return argv.unshift(fmt),sprintf.apply(null,argv)};addPostProcessor("sprintf",function(val,key,opts){return opts.sprintf?"[object Array]"===Object.prototype.toString.apply(opts.sprintf)?vsprintf(val,opts.sprintf):"object"==typeof opts.sprintf?sprintf(val,opts.sprintf):val:val}),i18n.init=init,i18n.setLng=setLng,i18n.preload=preload,i18n.addResourceBundle=addResourceBundle,i18n.hasResourceBundle=hasResourceBundle,i18n.addResource=addResource,i18n.addResources=addResources,i18n.removeResourceBundle=removeResourceBundle,i18n.loadNamespace=loadNamespace,i18n.loadNamespaces=loadNamespaces,i18n.setDefaultNamespace=setDefaultNamespace,i18n.t=translate,i18n.translate=translate,i18n.exists=exists,i18n.detectLanguage=f.detectLanguage,i18n.pluralExtensions=pluralExtensions,i18n.sync=sync,i18n.functions=f,i18n.lng=lng,i18n.addPostProcessor=addPostProcessor,i18n.options=o}(),function(undefined){function defaultParsingFlags(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function deprecate(msg,fn){function printMsg(){moment.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+msg)}var firstTime=!0;return extend(function(){return firstTime&&(printMsg(),firstTime=!1),fn.apply(this,arguments)},fn)}function padToken(func,count){return function(a){return leftZeroFill(func.call(this,a),count)}}function ordinalizeToken(func,period){return function(a){return this.lang().ordinal(func.call(this,a),period)}}function Language(){}function Moment(config){checkOverflow(config),extend(this,config)}function Duration(duration){var normalizedInput=normalizeObjectUnits(duration),years=normalizedInput.year||0,quarters=normalizedInput.quarter||0,months=normalizedInput.month||0,weeks=normalizedInput.week||0,days=normalizedInput.day||0,hours=normalizedInput.hour||0,minutes=normalizedInput.minute||0,seconds=normalizedInput.second||0,milliseconds=normalizedInput.millisecond||0;this._milliseconds=+milliseconds+1e3*seconds+6e4*minutes+36e5*hours,this._days=+days+7*weeks,this._months=+months+3*quarters+12*years,this._data={},this._bubble()}function extend(a,b){for(var i in b)b.hasOwnProperty(i)&&(a[i]=b[i]);return b.hasOwnProperty("toString")&&(a.toString=b.toString),b.hasOwnProperty("valueOf")&&(a.valueOf=b.valueOf),a}function cloneMoment(m){var i,result={};for(i in m)m.hasOwnProperty(i)&&momentProperties.hasOwnProperty(i)&&(result[i]=m[i]);return result}function absRound(number){return 0>number?Math.ceil(number):Math.floor(number)}function leftZeroFill(number,targetLength,forceSign){for(var output=""+Math.abs(number),sign=number>=0;output.length<targetLength;)output="0"+output;return(sign?forceSign?"+":"":"-")+output}function addOrSubtractDurationFromMoment(mom,duration,isAdding,updateOffset){var milliseconds=duration._milliseconds,days=duration._days,months=duration._months;updateOffset=null==updateOffset?!0:updateOffset,milliseconds&&mom._d.setTime(+mom._d+milliseconds*isAdding),days&&rawSetter(mom,"Date",rawGetter(mom,"Date")+days*isAdding),months&&rawMonthSetter(mom,rawGetter(mom,"Month")+months*isAdding),updateOffset&&moment.updateOffset(mom,days||months)}function isArray(input){return"[object Array]"===Object.prototype.toString.call(input)}function isDate(input){return"[object Date]"===Object.prototype.toString.call(input)||input instanceof Date}function compareArrays(array1,array2,dontConvert){var i,len=Math.min(array1.length,array2.length),lengthDiff=Math.abs(array1.length-array2.length),diffs=0;for(i=0;len>i;i++)(dontConvert&&array1[i]!==array2[i]||!dontConvert&&toInt(array1[i])!==toInt(array2[i]))&&diffs++;return diffs+lengthDiff}function normalizeUnits(units){if(units){var lowered=units.toLowerCase().replace(/(.)s$/,"$1");units=unitAliases[units]||camelFunctions[lowered]||lowered}return units}function normalizeObjectUnits(inputObject){var normalizedProp,prop,normalizedInput={};for(prop in inputObject)inputObject.hasOwnProperty(prop)&&(normalizedProp=normalizeUnits(prop),normalizedProp&&(normalizedInput[normalizedProp]=inputObject[prop]));return normalizedInput}function makeList(field){var count,setter;if(0===field.indexOf("week"))count=7,setter="day";else{if(0!==field.indexOf("month"))return;count=12,setter="month"}moment[field]=function(format,index){var i,getter,method=moment.fn._lang[field],results=[];if("number"==typeof format&&(index=format,format=undefined),getter=function(i){var m=moment().utc().set(setter,i);return method.call(moment.fn._lang,m,format||"")},null!=index)return getter(index);for(i=0;count>i;i++)results.push(getter(i));return results}}function toInt(argumentForCoercion){var coercedNumber=+argumentForCoercion,value=0;return 0!==coercedNumber&&isFinite(coercedNumber)&&(value=coercedNumber>=0?Math.floor(coercedNumber):Math.ceil(coercedNumber)),value}function daysInMonth(year,month){return new Date(Date.UTC(year,month+1,0)).getUTCDate()}function weeksInYear(year,dow,doy){return weekOfYear(moment([year,11,31+dow-doy]),dow,doy).week}function daysInYear(year){return isLeapYear(year)?366:365}function isLeapYear(year){return year%4===0&&year%100!==0||year%400===0}function checkOverflow(m){var overflow;m._a&&-2===m._pf.overflow&&(overflow=m._a[MONTH]<0||m._a[MONTH]>11?MONTH:m._a[DATE]<1||m._a[DATE]>daysInMonth(m._a[YEAR],m._a[MONTH])?DATE:m._a[HOUR]<0||m._a[HOUR]>23?HOUR:m._a[MINUTE]<0||m._a[MINUTE]>59?MINUTE:m._a[SECOND]<0||m._a[SECOND]>59?SECOND:m._a[MILLISECOND]<0||m._a[MILLISECOND]>999?MILLISECOND:-1,m._pf._overflowDayOfYear&&(YEAR>overflow||overflow>DATE)&&(overflow=DATE),m._pf.overflow=overflow)}function isValid(m){return null==m._isValid&&(m._isValid=!isNaN(m._d.getTime())&&m._pf.overflow<0&&!m._pf.empty&&!m._pf.invalidMonth&&!m._pf.nullInput&&!m._pf.invalidFormat&&!m._pf.userInvalidated,m._strict&&(m._isValid=m._isValid&&0===m._pf.charsLeftOver&&0===m._pf.unusedTokens.length)),m._isValid}function normalizeLanguage(key){return key?key.toLowerCase().replace("_","-"):key}function makeAs(input,model){return model._isUTC?moment(input).zone(model._offset||0):moment(input).local()}function loadLang(key,values){return values.abbr=key,languages[key]||(languages[key]=new Language),languages[key].set(values),languages[key]}function unloadLang(key){delete languages[key]}function getLangDefinition(key){var j,lang,next,split,i=0,get=function(k){if(!languages[k]&&hasModule)try{require("./lang/"+k)}catch(e){}return languages[k]};if(!key)return moment.fn._lang;if(!isArray(key)){if(lang=get(key))return lang;key=[key]}for(;i<key.length;){for(split=normalizeLanguage(key[i]).split("-"),j=split.length,next=normalizeLanguage(key[i+1]),next=next?next.split("-"):null;j>0;){if(lang=get(split.slice(0,j).join("-")))return lang;if(next&&next.length>=j&&compareArrays(split,next,!0)>=j-1)break;j--}i++}return moment.fn._lang}function removeFormattingTokens(input){return input.match(/\[[\s\S]/)?input.replace(/^\[|\]$/g,""):input.replace(/\\/g,"")}function makeFormatFunction(format){var i,length,array=format.match(formattingTokens);for(i=0,length=array.length;length>i;i++)array[i]=formatTokenFunctions[array[i]]?formatTokenFunctions[array[i]]:removeFormattingTokens(array[i]);return function(mom){var output="";for(i=0;length>i;i++)output+=array[i]instanceof Function?array[i].call(mom,format):array[i];return output}}function formatMoment(m,format){return m.isValid()?(format=expandFormat(format,m.lang()),formatFunctions[format]||(formatFunctions[format]=makeFormatFunction(format)),formatFunctions[format](m)):m.lang().invalidDate()}function expandFormat(format,lang){function replaceLongDateFormatTokens(input){return lang.longDateFormat(input)||input}var i=5;for(localFormattingTokens.lastIndex=0;i>=0&&localFormattingTokens.test(format);)format=format.replace(localFormattingTokens,replaceLongDateFormatTokens),localFormattingTokens.lastIndex=0,i-=1;return format}function getParseRegexForToken(token,config){var a,strict=config._strict;switch(token){case"Q":return parseTokenOneDigit;case"DDDD":return parseTokenThreeDigits;case"YYYY":case"GGGG":case"gggg":return strict?parseTokenFourDigits:parseTokenOneToFourDigits;case"Y":case"G":case"g":return parseTokenSignedNumber;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return strict?parseTokenSixDigits:parseTokenOneToSixDigits;case"S":if(strict)return parseTokenOneDigit;case"SS":if(strict)return parseTokenTwoDigits;case"SSS":if(strict)return parseTokenThreeDigits;case"DDD":return parseTokenOneToThreeDigits;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return parseTokenWord;case"a":case"A":return getLangDefinition(config._l)._meridiemParse;case"X":return parseTokenTimestampMs;case"Z":case"ZZ":return parseTokenTimezone;case"T":return parseTokenT;case"SSSS":return parseTokenDigits;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return strict?parseTokenTwoDigits:parseTokenOneOrTwoDigits;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return parseTokenOneOrTwoDigits;case"Do":return parseTokenOrdinal;default:return a=new RegExp(regexpEscape(unescapeFormat(token.replace("\\","")),"i"))}}function timezoneMinutesFromString(string){string=string||"";var possibleTzMatches=string.match(parseTokenTimezone)||[],tzChunk=possibleTzMatches[possibleTzMatches.length-1]||[],parts=(tzChunk+"").match(parseTimezoneChunker)||["-",0,0],minutes=+(60*parts[1])+toInt(parts[2]);return"+"===parts[0]?-minutes:minutes}function addTimeToArrayFromToken(token,input,config){var a,datePartArray=config._a;switch(token){case"Q":null!=input&&(datePartArray[MONTH]=3*(toInt(input)-1));break;case"M":case"MM":null!=input&&(datePartArray[MONTH]=toInt(input)-1);break;case"MMM":case"MMMM":a=getLangDefinition(config._l).monthsParse(input),null!=a?datePartArray[MONTH]=a:config._pf.invalidMonth=input;break;case"D":case"DD":null!=input&&(datePartArray[DATE]=toInt(input));break;case"Do":null!=input&&(datePartArray[DATE]=toInt(parseInt(input,10)));break;case"DDD":case"DDDD":null!=input&&(config._dayOfYear=toInt(input));break;case"YY":datePartArray[YEAR]=moment.parseTwoDigitYear(input);break;case"YYYY":case"YYYYY":case"YYYYYY":datePartArray[YEAR]=toInt(input);break;case"a":case"A":config._isPm=getLangDefinition(config._l).isPM(input);break;case"H":case"HH":case"h":case"hh":datePartArray[HOUR]=toInt(input);break;case"m":case"mm":datePartArray[MINUTE]=toInt(input);break;case"s":case"ss":datePartArray[SECOND]=toInt(input);break;case"S":case"SS":case"SSS":case"SSSS":datePartArray[MILLISECOND]=toInt(1e3*("0."+input));break;case"X":config._d=new Date(1e3*parseFloat(input));break;case"Z":case"ZZ":config._useUTC=!0,config._tzm=timezoneMinutesFromString(input);break;case"w":case"ww":case"W":case"WW":case"d":case"dd":case"ddd":case"dddd":case"e":case"E":token=token.substr(0,1);case"gg":case"gggg":case"GG":case"GGGG":case"GGGGG":token=token.substr(0,2),input&&(config._w=config._w||{},config._w[token]=input)}}function dateFromConfig(config){var i,date,currentDate,yearToUse,fixYear,w,temp,lang,weekday,week,input=[];if(!config._d){for(currentDate=currentDateArray(config),config._w&&null==config._a[DATE]&&null==config._a[MONTH]&&(fixYear=function(val){var intVal=parseInt(val,10);return val?val.length<3?intVal>68?1900+intVal:2e3+intVal:intVal:null==config._a[YEAR]?moment().weekYear():config._a[YEAR]},w=config._w,null!=w.GG||null!=w.W||null!=w.E?temp=dayOfYearFromWeeks(fixYear(w.GG),w.W||1,w.E,4,1):(lang=getLangDefinition(config._l),weekday=null!=w.d?parseWeekday(w.d,lang):null!=w.e?parseInt(w.e,10)+lang._week.dow:0,week=parseInt(w.w,10)||1,null!=w.d&&weekday<lang._week.dow&&week++,temp=dayOfYearFromWeeks(fixYear(w.gg),week,weekday,lang._week.doy,lang._week.dow)),config._a[YEAR]=temp.year,config._dayOfYear=temp.dayOfYear),config._dayOfYear&&(yearToUse=null==config._a[YEAR]?currentDate[YEAR]:config._a[YEAR],config._dayOfYear>daysInYear(yearToUse)&&(config._pf._overflowDayOfYear=!0),date=makeUTCDate(yearToUse,0,config._dayOfYear),config._a[MONTH]=date.getUTCMonth(),config._a[DATE]=date.getUTCDate()),i=0;3>i&&null==config._a[i];++i)config._a[i]=input[i]=currentDate[i];for(;7>i;i++)config._a[i]=input[i]=null==config._a[i]?2===i?1:0:config._a[i];input[HOUR]+=toInt((config._tzm||0)/60),input[MINUTE]+=toInt((config._tzm||0)%60),config._d=(config._useUTC?makeUTCDate:makeDate).apply(null,input)}}function dateFromObject(config){var normalizedInput;config._d||(normalizedInput=normalizeObjectUnits(config._i),config._a=[normalizedInput.year,normalizedInput.month,normalizedInput.day,normalizedInput.hour,normalizedInput.minute,normalizedInput.second,normalizedInput.millisecond],dateFromConfig(config))}function currentDateArray(config){var now=new Date;return config._useUTC?[now.getUTCFullYear(),now.getUTCMonth(),now.getUTCDate()]:[now.getFullYear(),now.getMonth(),now.getDate()]}function makeDateFromStringAndFormat(config){config._a=[],config._pf.empty=!0;var i,parsedInput,tokens,token,skipped,lang=getLangDefinition(config._l),string=""+config._i,stringLength=string.length,totalParsedInputLength=0;for(tokens=expandFormat(config._f,lang).match(formattingTokens)||[],i=0;i<tokens.length;i++)token=tokens[i],parsedInput=(string.match(getParseRegexForToken(token,config))||[])[0],parsedInput&&(skipped=string.substr(0,string.indexOf(parsedInput)),skipped.length>0&&config._pf.unusedInput.push(skipped),string=string.slice(string.indexOf(parsedInput)+parsedInput.length),totalParsedInputLength+=parsedInput.length),formatTokenFunctions[token]?(parsedInput?config._pf.empty=!1:config._pf.unusedTokens.push(token),addTimeToArrayFromToken(token,parsedInput,config)):config._strict&&!parsedInput&&config._pf.unusedTokens.push(token);config._pf.charsLeftOver=stringLength-totalParsedInputLength,string.length>0&&config._pf.unusedInput.push(string),config._isPm&&config._a[HOUR]<12&&(config._a[HOUR]+=12),config._isPm===!1&&12===config._a[HOUR]&&(config._a[HOUR]=0),dateFromConfig(config),checkOverflow(config)}function unescapeFormat(s){return s.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(matched,p1,p2,p3,p4){return p1||p2||p3||p4})}function regexpEscape(s){return s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function makeDateFromStringAndArray(config){var tempConfig,bestMoment,scoreToBeat,i,currentScore;if(0===config._f.length)return config._pf.invalidFormat=!0,void(config._d=new Date(0/0));for(i=0;i<config._f.length;i++)currentScore=0,tempConfig=extend({},config),tempConfig._pf=defaultParsingFlags(),tempConfig._f=config._f[i],makeDateFromStringAndFormat(tempConfig),isValid(tempConfig)&&(currentScore+=tempConfig._pf.charsLeftOver,currentScore+=10*tempConfig._pf.unusedTokens.length,tempConfig._pf.score=currentScore,(null==scoreToBeat||scoreToBeat>currentScore)&&(scoreToBeat=currentScore,bestMoment=tempConfig));extend(config,bestMoment||tempConfig)}function makeDateFromString(config){var i,l,string=config._i,match=isoRegex.exec(string);if(match){for(config._pf.iso=!0,i=0,l=isoDates.length;l>i;i++)if(isoDates[i][1].exec(string)){config._f=isoDates[i][0]+(match[6]||" ");break}for(i=0,l=isoTimes.length;l>i;i++)if(isoTimes[i][1].exec(string)){config._f+=isoTimes[i][0];break}string.match(parseTokenTimezone)&&(config._f+="Z"),makeDateFromStringAndFormat(config)}else moment.createFromInputFallback(config)}function makeDateFromInput(config){var input=config._i,matched=aspNetJsonRegex.exec(input);input===undefined?config._d=new Date:matched?config._d=new Date(+matched[1]):"string"==typeof input?makeDateFromString(config):isArray(input)?(config._a=input.slice(0),dateFromConfig(config)):isDate(input)?config._d=new Date(+input):"object"==typeof input?dateFromObject(config):"number"==typeof input?config._d=new Date(input):moment.createFromInputFallback(config)}function makeDate(y,m,d,h,M,s,ms){var date=new Date(y,m,d,h,M,s,ms);return 1970>y&&date.setFullYear(y),date}function makeUTCDate(y){var date=new Date(Date.UTC.apply(null,arguments));return 1970>y&&date.setUTCFullYear(y),date}function parseWeekday(input,language){if("string"==typeof input)if(isNaN(input)){if(input=language.weekdaysParse(input),"number"!=typeof input)return null}else input=parseInt(input,10);return input}function substituteTimeAgo(string,number,withoutSuffix,isFuture,lang){return lang.relativeTime(number||1,!!withoutSuffix,string,isFuture)}function relativeTime(milliseconds,withoutSuffix,lang){var seconds=round(Math.abs(milliseconds)/1e3),minutes=round(seconds/60),hours=round(minutes/60),days=round(hours/24),years=round(days/365),args=45>seconds&&["s",seconds]||1===minutes&&["m"]||45>minutes&&["mm",minutes]||1===hours&&["h"]||22>hours&&["hh",hours]||1===days&&["d"]||25>=days&&["dd",days]||45>=days&&["M"]||345>days&&["MM",round(days/30)]||1===years&&["y"]||["yy",years];return args[2]=withoutSuffix,args[3]=milliseconds>0,args[4]=lang,substituteTimeAgo.apply({},args)}function weekOfYear(mom,firstDayOfWeek,firstDayOfWeekOfYear){var adjustedMoment,end=firstDayOfWeekOfYear-firstDayOfWeek,daysToDayOfWeek=firstDayOfWeekOfYear-mom.day();return daysToDayOfWeek>end&&(daysToDayOfWeek-=7),end-7>daysToDayOfWeek&&(daysToDayOfWeek+=7),adjustedMoment=moment(mom).add("d",daysToDayOfWeek),{week:Math.ceil(adjustedMoment.dayOfYear()/7),year:adjustedMoment.year()}}function dayOfYearFromWeeks(year,week,weekday,firstDayOfWeekOfYear,firstDayOfWeek){var daysToAdd,dayOfYear,d=makeUTCDate(year,0,1).getUTCDay();return weekday=null!=weekday?weekday:firstDayOfWeek,daysToAdd=firstDayOfWeek-d+(d>firstDayOfWeekOfYear?7:0)-(firstDayOfWeek>d?7:0),dayOfYear=7*(week-1)+(weekday-firstDayOfWeek)+daysToAdd+1,{year:dayOfYear>0?year:year-1,dayOfYear:dayOfYear>0?dayOfYear:daysInYear(year-1)+dayOfYear}}function makeMoment(config){var input=config._i,format=config._f;return null===input||format===undefined&&""===input?moment.invalid({nullInput:!0}):("string"==typeof input&&(config._i=input=getLangDefinition().preparse(input)),moment.isMoment(input)?(config=cloneMoment(input),config._d=new Date(+input._d)):format?isArray(format)?makeDateFromStringAndArray(config):makeDateFromStringAndFormat(config):makeDateFromInput(config),new Moment(config))}function rawMonthSetter(mom,value){var dayOfMonth;return"string"==typeof value&&(value=mom.lang().monthsParse(value),"number"!=typeof value)?mom:(dayOfMonth=Math.min(mom.date(),daysInMonth(mom.year(),value)),mom._d["set"+(mom._isUTC?"UTC":"")+"Month"](value,dayOfMonth),mom)}function rawGetter(mom,unit){return mom._d["get"+(mom._isUTC?"UTC":"")+unit]()}function rawSetter(mom,unit,value){return"Month"===unit?rawMonthSetter(mom,value):mom._d["set"+(mom._isUTC?"UTC":"")+unit](value)}function makeAccessor(unit,keepTime){return function(value){return null!=value?(rawSetter(this,unit,value),moment.updateOffset(this,keepTime),this):rawGetter(this,unit)}}function makeDurationGetter(name){moment.duration.fn[name]=function(){return this._data[name]}}function makeDurationAsGetter(name,factor){moment.duration.fn["as"+name]=function(){return+this/factor}}function makeGlobal(shouldDeprecate){"undefined"==typeof ender&&(oldGlobalMoment=globalScope.moment,globalScope.moment=shouldDeprecate?deprecate("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",moment):moment)}for(var moment,oldGlobalMoment,i,VERSION="2.6.0",globalScope="undefined"!=typeof global?global:this,round=Math.round,YEAR=0,MONTH=1,DATE=2,HOUR=3,MINUTE=4,SECOND=5,MILLISECOND=6,languages={},momentProperties={_isAMomentObject:null,_i:null,_f:null,_l:null,_strict:null,_isUTC:null,_offset:null,_pf:null,_lang:null},hasModule="undefined"!=typeof module&&module.exports,aspNetJsonRegex=/^\/?Date\((\-?\d+)/i,aspNetTimeSpanJsonRegex=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,isoDurationRegex=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,formattingTokens=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,localFormattingTokens=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,parseTokenOneOrTwoDigits=/\d\d?/,parseTokenOneToThreeDigits=/\d{1,3}/,parseTokenOneToFourDigits=/\d{1,4}/,parseTokenOneToSixDigits=/[+\-]?\d{1,6}/,parseTokenDigits=/\d+/,parseTokenWord=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,parseTokenTimezone=/Z|[\+\-]\d\d:?\d\d/gi,parseTokenT=/T/i,parseTokenTimestampMs=/[\+\-]?\d+(\.\d{1,3})?/,parseTokenOrdinal=/\d{1,2}/,parseTokenOneDigit=/\d/,parseTokenTwoDigits=/\d\d/,parseTokenThreeDigits=/\d{3}/,parseTokenFourDigits=/\d{4}/,parseTokenSixDigits=/[+-]?\d{6}/,parseTokenSignedNumber=/[+-]?\d+/,isoRegex=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,isoFormat="YYYY-MM-DDTHH:mm:ssZ",isoDates=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],isoTimes=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],parseTimezoneChunker=/([\+\-]|\d\d)/gi,unitMillisecondFactors=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),unitAliases={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},camelFunctions={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},formatFunctions={},ordinalizeTokens="DDD w W M D d".split(" "),paddedTokens="M D H h m s w W".split(" "),formatTokenFunctions={M:function(){return this.month()+1},MMM:function(format){return this.lang().monthsShort(this,format)},MMMM:function(format){return this.lang().months(this,format)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(format){return this.lang().weekdaysMin(this,format)},ddd:function(format){return this.lang().weekdaysShort(this,format)},dddd:function(format){return this.lang().weekdays(this,format)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return leftZeroFill(this.year()%100,2)},YYYY:function(){return leftZeroFill(this.year(),4)},YYYYY:function(){return leftZeroFill(this.year(),5)},YYYYYY:function(){var y=this.year(),sign=y>=0?"+":"-";return sign+leftZeroFill(Math.abs(y),6)},gg:function(){return leftZeroFill(this.weekYear()%100,2)},gggg:function(){return leftZeroFill(this.weekYear(),4)},ggggg:function(){return leftZeroFill(this.weekYear(),5)},GG:function(){return leftZeroFill(this.isoWeekYear()%100,2)},GGGG:function(){return leftZeroFill(this.isoWeekYear(),4)},GGGGG:function(){return leftZeroFill(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return toInt(this.milliseconds()/100)},SS:function(){return leftZeroFill(toInt(this.milliseconds()/10),2)},SSS:function(){return leftZeroFill(this.milliseconds(),3)},SSSS:function(){return leftZeroFill(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+leftZeroFill(toInt(a/60),2)+":"+leftZeroFill(toInt(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+leftZeroFill(toInt(a/60),2)+leftZeroFill(toInt(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},lists=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];ordinalizeTokens.length;)i=ordinalizeTokens.pop(),formatTokenFunctions[i+"o"]=ordinalizeToken(formatTokenFunctions[i],i);for(;paddedTokens.length;)i=paddedTokens.pop(),formatTokenFunctions[i+i]=padToken(formatTokenFunctions[i],2);for(formatTokenFunctions.DDDD=padToken(formatTokenFunctions.DDD,3),extend(Language.prototype,{set:function(config){var prop,i;for(i in config)prop=config[i],"function"==typeof prop?this[i]=prop:this["_"+i]=prop},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(m){return this._months[m.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(m){return this._monthsShort[m.month()]},monthsParse:function(monthName){var i,mom,regex;for(this._monthsParse||(this._monthsParse=[]),i=0;12>i;i++)if(this._monthsParse[i]||(mom=moment.utc([2e3,i]),regex="^"+this.months(mom,"")+"|^"+this.monthsShort(mom,""),this._monthsParse[i]=new RegExp(regex.replace(".",""),"i")),this._monthsParse[i].test(monthName))return i},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(m){return this._weekdays[m.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(m){return this._weekdaysShort[m.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(m){return this._weekdaysMin[m.day()]},weekdaysParse:function(weekdayName){var i,mom,regex;for(this._weekdaysParse||(this._weekdaysParse=[]),i=0;7>i;i++)if(this._weekdaysParse[i]||(mom=moment([2e3,1]).day(i),regex="^"+this.weekdays(mom,"")+"|^"+this.weekdaysShort(mom,"")+"|^"+this.weekdaysMin(mom,""),this._weekdaysParse[i]=new RegExp(regex.replace(".",""),"i")),this._weekdaysParse[i].test(weekdayName))return i},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(key){var output=this._longDateFormat[key];return!output&&this._longDateFormat[key.toUpperCase()]&&(output=this._longDateFormat[key.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(val){return val.slice(1)}),this._longDateFormat[key]=output),output},isPM:function(input){return"p"===(input+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(hours,minutes,isLower){return hours>11?isLower?"pm":"PM":isLower?"am":"AM"
},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(key,mom){var output=this._calendar[key];return"function"==typeof output?output.apply(mom):output},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(number,withoutSuffix,string,isFuture){var output=this._relativeTime[string];return"function"==typeof output?output(number,withoutSuffix,string,isFuture):output.replace(/%d/i,number)},pastFuture:function(diff,output){var format=this._relativeTime[diff>0?"future":"past"];return"function"==typeof format?format(output):format.replace(/%s/i,output)},ordinal:function(number){return this._ordinal.replace("%d",number)},_ordinal:"%d",preparse:function(string){return string},postformat:function(string){return string},week:function(mom){return weekOfYear(mom,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),moment=function(input,format,lang,strict){var c;return"boolean"==typeof lang&&(strict=lang,lang=undefined),c={},c._isAMomentObject=!0,c._i=input,c._f=format,c._l=lang,c._strict=strict,c._isUTC=!1,c._pf=defaultParsingFlags(),makeMoment(c)},moment.suppressDeprecationWarnings=!1,moment.createFromInputFallback=deprecate("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(config){config._d=new Date(config._i)}),moment.utc=function(input,format,lang,strict){var c;return"boolean"==typeof lang&&(strict=lang,lang=undefined),c={},c._isAMomentObject=!0,c._useUTC=!0,c._isUTC=!0,c._l=lang,c._i=input,c._f=format,c._strict=strict,c._pf=defaultParsingFlags(),makeMoment(c).utc()},moment.unix=function(input){return moment(1e3*input)},moment.duration=function(input,key){var sign,ret,parseIso,duration=input,match=null;return moment.isDuration(input)?duration={ms:input._milliseconds,d:input._days,M:input._months}:"number"==typeof input?(duration={},key?duration[key]=input:duration.milliseconds=input):(match=aspNetTimeSpanJsonRegex.exec(input))?(sign="-"===match[1]?-1:1,duration={y:0,d:toInt(match[DATE])*sign,h:toInt(match[HOUR])*sign,m:toInt(match[MINUTE])*sign,s:toInt(match[SECOND])*sign,ms:toInt(match[MILLISECOND])*sign}):(match=isoDurationRegex.exec(input))&&(sign="-"===match[1]?-1:1,parseIso=function(inp){var res=inp&&parseFloat(inp.replace(",","."));return(isNaN(res)?0:res)*sign},duration={y:parseIso(match[2]),M:parseIso(match[3]),d:parseIso(match[4]),h:parseIso(match[5]),m:parseIso(match[6]),s:parseIso(match[7]),w:parseIso(match[8])}),ret=new Duration(duration),moment.isDuration(input)&&input.hasOwnProperty("_lang")&&(ret._lang=input._lang),ret},moment.version=VERSION,moment.defaultFormat=isoFormat,moment.momentProperties=momentProperties,moment.updateOffset=function(){},moment.lang=function(key,values){var r;return key?(values?loadLang(normalizeLanguage(key),values):null===values?(unloadLang(key),key="en"):languages[key]||getLangDefinition(key),r=moment.duration.fn._lang=moment.fn._lang=getLangDefinition(key),r._abbr):moment.fn._lang._abbr},moment.langData=function(key){return key&&key._lang&&key._lang._abbr&&(key=key._lang._abbr),getLangDefinition(key)},moment.isMoment=function(obj){return obj instanceof Moment||null!=obj&&obj.hasOwnProperty("_isAMomentObject")},moment.isDuration=function(obj){return obj instanceof Duration},i=lists.length-1;i>=0;--i)makeList(lists[i]);moment.normalizeUnits=function(units){return normalizeUnits(units)},moment.invalid=function(flags){var m=moment.utc(0/0);return null!=flags?extend(m._pf,flags):m._pf.userInvalidated=!0,m},moment.parseZone=function(){return moment.apply(null,arguments).parseZone()},moment.parseTwoDigitYear=function(input){return toInt(input)+(toInt(input)>68?1900:2e3)},extend(moment.fn=Moment.prototype,{clone:function(){return moment(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().lang("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var m=moment(this).utc();return 0<m.year()&&m.year()<=9999?formatMoment(m,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):formatMoment(m,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var m=this;return[m.year(),m.month(),m.date(),m.hours(),m.minutes(),m.seconds(),m.milliseconds()]},isValid:function(){return isValid(this)},isDSTShifted:function(){return this._a?this.isValid()&&compareArrays(this._a,(this._isUTC?moment.utc(this._a):moment(this._a)).toArray())>0:!1},parsingFlags:function(){return extend({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(inputString){var output=formatMoment(this,inputString||moment.defaultFormat);return this.lang().postformat(output)},add:function(input,val){var dur;return dur="string"==typeof input?moment.duration(+val,input):moment.duration(input,val),addOrSubtractDurationFromMoment(this,dur,1),this},subtract:function(input,val){var dur;return dur="string"==typeof input?moment.duration(+val,input):moment.duration(input,val),addOrSubtractDurationFromMoment(this,dur,-1),this},diff:function(input,units,asFloat){var diff,output,that=makeAs(input,this),zoneDiff=6e4*(this.zone()-that.zone());return units=normalizeUnits(units),"year"===units||"month"===units?(diff=432e5*(this.daysInMonth()+that.daysInMonth()),output=12*(this.year()-that.year())+(this.month()-that.month()),output+=(this-moment(this).startOf("month")-(that-moment(that).startOf("month")))/diff,output-=6e4*(this.zone()-moment(this).startOf("month").zone()-(that.zone()-moment(that).startOf("month").zone()))/diff,"year"===units&&(output/=12)):(diff=this-that,output="second"===units?diff/1e3:"minute"===units?diff/6e4:"hour"===units?diff/36e5:"day"===units?(diff-zoneDiff)/864e5:"week"===units?(diff-zoneDiff)/6048e5:diff),asFloat?output:absRound(output)},from:function(time,withoutSuffix){return moment.duration(this.diff(time)).lang(this.lang()._abbr).humanize(!withoutSuffix)},fromNow:function(withoutSuffix){return this.from(moment(),withoutSuffix)},calendar:function(){var sod=makeAs(moment(),this).startOf("day"),diff=this.diff(sod,"days",!0),format=-6>diff?"sameElse":-1>diff?"lastWeek":0>diff?"lastDay":1>diff?"sameDay":2>diff?"nextDay":7>diff?"nextWeek":"sameElse";return this.format(this.lang().calendar(format,this))},isLeapYear:function(){return isLeapYear(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(input){var day=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=input?(input=parseWeekday(input,this.lang()),this.add({d:input-day})):day},month:makeAccessor("Month",!0),startOf:function(units){switch(units=normalizeUnits(units)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===units?this.weekday(0):"isoWeek"===units&&this.isoWeekday(1),"quarter"===units&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(units){return units=normalizeUnits(units),this.startOf(units).add("isoWeek"===units?"week":units,1).subtract("ms",1)},isAfter:function(input,units){return units="undefined"!=typeof units?units:"millisecond",+this.clone().startOf(units)>+moment(input).startOf(units)},isBefore:function(input,units){return units="undefined"!=typeof units?units:"millisecond",+this.clone().startOf(units)<+moment(input).startOf(units)},isSame:function(input,units){return units=units||"ms",+this.clone().startOf(units)===+makeAs(input,this).startOf(units)},min:function(other){return other=moment.apply(null,arguments),this>other?this:other},max:function(other){return other=moment.apply(null,arguments),other>this?this:other},zone:function(input,keepTime){var offset=this._offset||0;return null==input?this._isUTC?offset:this._d.getTimezoneOffset():("string"==typeof input&&(input=timezoneMinutesFromString(input)),Math.abs(input)<16&&(input=60*input),this._offset=input,this._isUTC=!0,offset!==input&&(!keepTime||this._changeInProgress?addOrSubtractDurationFromMoment(this,moment.duration(offset-input,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,moment.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(input){return input=input?moment(input).zone():0,(this.zone()-input)%60===0},daysInMonth:function(){return daysInMonth(this.year(),this.month())},dayOfYear:function(input){var dayOfYear=round((moment(this).startOf("day")-moment(this).startOf("year"))/864e5)+1;return null==input?dayOfYear:this.add("d",input-dayOfYear)},quarter:function(input){return null==input?Math.ceil((this.month()+1)/3):this.month(3*(input-1)+this.month()%3)},weekYear:function(input){var year=weekOfYear(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==input?year:this.add("y",input-year)},isoWeekYear:function(input){var year=weekOfYear(this,1,4).year;return null==input?year:this.add("y",input-year)},week:function(input){var week=this.lang().week(this);return null==input?week:this.add("d",7*(input-week))},isoWeek:function(input){var week=weekOfYear(this,1,4).week;return null==input?week:this.add("d",7*(input-week))},weekday:function(input){var weekday=(this.day()+7-this.lang()._week.dow)%7;return null==input?weekday:this.add("d",input-weekday)},isoWeekday:function(input){return null==input?this.day()||7:this.day(this.day()%7?input:input-7)},isoWeeksInYear:function(){return weeksInYear(this.year(),1,4)},weeksInYear:function(){var weekInfo=this._lang._week;return weeksInYear(this.year(),weekInfo.dow,weekInfo.doy)},get:function(units){return units=normalizeUnits(units),this[units]()},set:function(units,value){return units=normalizeUnits(units),"function"==typeof this[units]&&this[units](value),this},lang:function(key){return key===undefined?this._lang:(this._lang=getLangDefinition(key),this)}}),moment.fn.millisecond=moment.fn.milliseconds=makeAccessor("Milliseconds",!1),moment.fn.second=moment.fn.seconds=makeAccessor("Seconds",!1),moment.fn.minute=moment.fn.minutes=makeAccessor("Minutes",!1),moment.fn.hour=moment.fn.hours=makeAccessor("Hours",!0),moment.fn.date=makeAccessor("Date",!0),moment.fn.dates=deprecate("dates accessor is deprecated. Use date instead.",makeAccessor("Date",!0)),moment.fn.year=makeAccessor("FullYear",!0),moment.fn.years=deprecate("years accessor is deprecated. Use year instead.",makeAccessor("FullYear",!0)),moment.fn.days=moment.fn.day,moment.fn.months=moment.fn.month,moment.fn.weeks=moment.fn.week,moment.fn.isoWeeks=moment.fn.isoWeek,moment.fn.quarters=moment.fn.quarter,moment.fn.toJSON=moment.fn.toISOString,extend(moment.duration.fn=Duration.prototype,{_bubble:function(){var seconds,minutes,hours,years,milliseconds=this._milliseconds,days=this._days,months=this._months,data=this._data;data.milliseconds=milliseconds%1e3,seconds=absRound(milliseconds/1e3),data.seconds=seconds%60,minutes=absRound(seconds/60),data.minutes=minutes%60,hours=absRound(minutes/60),data.hours=hours%24,days+=absRound(hours/24),data.days=days%30,months+=absRound(days/30),data.months=months%12,years=absRound(months/12),data.years=years},weeks:function(){return absRound(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*toInt(this._months/12)},humanize:function(withSuffix){var difference=+this,output=relativeTime(difference,!withSuffix,this.lang());return withSuffix&&(output=this.lang().pastFuture(difference,output)),this.lang().postformat(output)},add:function(input,val){var dur=moment.duration(input,val);return this._milliseconds+=dur._milliseconds,this._days+=dur._days,this._months+=dur._months,this._bubble(),this},subtract:function(input,val){var dur=moment.duration(input,val);return this._milliseconds-=dur._milliseconds,this._days-=dur._days,this._months-=dur._months,this._bubble(),this},get:function(units){return units=normalizeUnits(units),this[units.toLowerCase()+"s"]()},as:function(units){return units=normalizeUnits(units),this["as"+units.charAt(0).toUpperCase()+units.slice(1)+"s"]()},lang:moment.fn.lang,toIsoString:function(){var years=Math.abs(this.years()),months=Math.abs(this.months()),days=Math.abs(this.days()),hours=Math.abs(this.hours()),minutes=Math.abs(this.minutes()),seconds=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(years?years+"Y":"")+(months?months+"M":"")+(days?days+"D":"")+(hours||minutes||seconds?"T":"")+(hours?hours+"H":"")+(minutes?minutes+"M":"")+(seconds?seconds+"S":""):"P0D"}});for(i in unitMillisecondFactors)unitMillisecondFactors.hasOwnProperty(i)&&(makeDurationAsGetter(i,unitMillisecondFactors[i]),makeDurationGetter(i.toLowerCase()));makeDurationAsGetter("Weeks",6048e5),moment.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()},moment.lang("en",{ordinal:function(number){var b=number%10,output=1===toInt(number%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return number+output}}),function(factory){factory(moment)}(function(moment){return moment.lang("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}})}),function(factory){factory(moment)}(function(moment){return moment.lang("ar",{months:"يناير/ كانون الثاني_فبراير/ شباط_مارس/ آذار_أبريل/ نيسان_مايو/ أيار_يونيو/ حزيران_يوليو/ تموز_أغسطس/ آب_سبتمبر/ أيلول_أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول".split("_"),monthsShort:"يناير/ كانون الثاني_فبراير/ شباط_مارس/ آذار_أبريل/ نيسان_مايو/ أيار_يونيو/ حزيران_يوليو/ تموز_أغسطس/ آب_سبتمبر/ أيلول_أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}})}),function(factory){factory(moment)}(function(moment){return moment.lang("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янрев_мар_апрай_юни_юли_авг_сеп_окт_ноеек".split("_"),weekdays:"неделя_понеделник_вторник_срядаетвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},ordinal:function(number){var lastDigit=number%10,last2Digits=number%100;return 0===number?number+"-ев":0===last2Digits?number+"-ен":last2Digits>10&&20>last2Digits?number+"-ти":1===lastDigit?number+"-ви":2===lastDigit?number+"-ри":7===lastDigit||8===lastDigit?number+"-ми":number+"-ти"},week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){function relativeTimeWithMutation(number,withoutSuffix,key){var format={mm:"munutenn",MM:"miz",dd:"devezh"};return number+" "+mutation(format[key],number)}function specialMutationForYears(number){switch(lastNumber(number)){case 1:case 3:case 4:case 5:case 9:return number+" bloaz";default:return number+" vloaz"}}function lastNumber(number){return number>9?lastNumber(number%10):number}function mutation(text,number){return 2===number?softMutation(text):text}function softMutation(text){var mutationTable={m:"v",b:"v",d:"z"};return mutationTable[text.charAt(0)]===undefined?text:mutationTable[text.charAt(0)]+text.substring(1)}return moment.lang("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),longDateFormat:{LT:"h[e]mm A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY LT",LLLL:"dddd, D [a viz] MMMM YYYY LT"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",m:"ur vunutenn",mm:relativeTimeWithMutation,h:"un eur",hh:"%d eur",d:"un devezh",dd:relativeTimeWithMutation,M:"ur miz",MM:relativeTimeWithMutation,y:"ur bloaz",yy:specialMutationForYears},ordinal:function(number){var output=1===number?"añ":"vet";return number+output},week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){function translate(number,withoutSuffix,key){var result=number+" ";switch(key){case"m":return withoutSuffix?"jedna minuta":"jedne minute";case"mm":return result+=1===number?"minuta":2===number||3===number||4===number?"minute":"minuta";case"h":return withoutSuffix?"jedan sat":"jednog sata";case"hh":return result+=1===number?"sat":2===number||3===number||4===number?"sata":"sati";case"dd":return result+=1===number?"dan":"dana";case"MM":return result+=1===number?"mjesec":2===number||3===number||4===number?"mjeseca":"mjeseci";case"yy":return result+=1===number?"godina":2===number||3===number||4===number?"godine":"godina"}}return moment.lang("bs",{months:"januar_februar_mart_april_maj_juni_juli_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:translate,mm:translate,h:translate,hh:translate,d:"dan",dd:translate,M:"mjesec",MM:translate,y:"godinu",yy:translate},ordinal:"%d.",week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){return moment.lang("ca",{months:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),monthsShort:"gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.".split("_"),weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:"%dº",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){function plural(n){return n>1&&5>n&&1!==~~(n/10)}function translate(number,withoutSuffix,key,isFuture){var result=number+" ";switch(key){case"s":return withoutSuffix||isFuture?"pár sekund":"pár sekundami";case"m":return withoutSuffix?"minuta":isFuture?"minutu":"minutou";case"mm":return withoutSuffix||isFuture?result+(plural(number)?"minuty":"minut"):result+"minutami";case"h":return withoutSuffix?"hodina":isFuture?"hodinu":"hodinou";case"hh":return withoutSuffix||isFuture?result+(plural(number)?"hodiny":"hodin"):result+"hodinami";case"d":return withoutSuffix||isFuture?"den":"dnem";case"dd":return withoutSuffix||isFuture?result+(plural(number)?"dny":"dní"):result+"dny";case"M":return withoutSuffix||isFuture?"měsíc":"měsícem";case"MM":return withoutSuffix||isFuture?result+(plural(number)?"měsíce":"měsíců"):result+"měsíci";case"y":return withoutSuffix||isFuture?"rok":"rokem";case"yy":return withoutSuffix||isFuture?result+(plural(number)?"roky":"let"):result+"lety"}}var months="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),monthsShort="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_");return moment.lang("cs",{months:months,monthsShort:monthsShort,monthsParse:function(months,monthsShort){var i,_monthsParse=[];for(i=0;12>i;i++)_monthsParse[i]=new RegExp("^"+months[i]+"$|^"+monthsShort[i]+"$","i");return _monthsParse}(months,monthsShort),weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H.mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd D. MMMM YYYY LT"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:translate,m:translate,mm:translate,h:translate,hh:translate,d:translate,dd:translate,M:translate,MM:translate,y:translate,yy:translate},ordinal:"%d.",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("cv",{months:"кăрлач_нарăс_пуш_акаай_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав".split("_"),monthsShort:"кăрар_пуш_акаай_çĕр_утă_çур_ав_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун".split("_"),weekdaysShort:"вырун_ытл_юн_кĕç_эрн_шăм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кç_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ]",LLL:"YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT",LLLL:"dddd, YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ĕнер] LT [сехетре]",nextWeek:"[Çитес] dddd LT [сехетре]",lastWeek:"[Иртнĕ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(output){var affix=/сехет$/i.exec(output)?"рен":/çул$/i.exec(output)?"тан":"ран";return output+affix},past:"%s каялла",s:"пĕр-ик çеккунт",m:"пĕр минут",mm:"%d минут",h:"пĕр сехет",hh:"%d сехет",d:"пĕр кун",dd:"%d кун",M:"пĕр уйăх",MM:"%d уйăх",y:"пĕр çул",yy:"%d çул"},ordinal:"%d-мĕш",week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){return moment.lang("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn àl",s:"ychydig eiliadau",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},ordinal:function(number){var b=number,output="",lookup=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"];return b>20?output=40===b||50===b||60===b||80===b||100===b?"fed":"ain":b>0&&(output=lookup[b]),number+output},week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D. MMMM, YYYY LT"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I går kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){function processRelativeTime(number,withoutSuffix,key){var format={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[number+" Tage",number+" Tagen"],M:["ein Monat","einem Monat"],MM:[number+" Monate",number+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[number+" Jahre",number+" Jahren"]};return withoutSuffix?format[key][0]:format[key][1]}return moment.lang("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm [Uhr]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:processRelativeTime,mm:"%d Minuten",h:processRelativeTime,hh:"%d Stunden",d:processRelativeTime,dd:processRelativeTime,M:processRelativeTime,MM:processRelativeTime,y:processRelativeTime,yy:processRelativeTime},ordinal:"%d.",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(momentToFormat,format){return/D/.test(format.substring(0,format.indexOf("MMMM")))?this._monthsGenitiveEl[momentToFormat.month()]:this._monthsNominativeEl[momentToFormat.month()]},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παραβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Παα".split("_"),meridiem:function(hours,minutes,isLower){return hours>11?isLower?"μμ":"ΜΜ":isLower?"πμ":"ΠΜ"},longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:"[την προηγούμενη] dddd [{}] LT",sameElse:"L"},calendar:function(key,mom){var output=this._calendarEl[key],hours=mom&&mom.hours();return output.replace("{}",hours%12===1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},ordinal:function(number){return number+"η"},week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(number){var b=number%10,output=1===~~(number%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return number+output},week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"YYYY-MM-DD",LL:"D MMMM, YYYY",LLL:"D MMMM, YYYY LT",LLLL:"dddd, D MMMM, YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(number){var b=number%10,output=1===~~(number%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";
return number+output}})}),function(factory){factory(moment)}(function(moment){return moment.lang("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(number){var b=number%10,output=1===~~(number%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return number+output},week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato".split("_"),weekdaysShort:"Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Ĵa_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D[-an de] MMMM, YYYY",LLL:"D[-an de] MMMM, YYYY LT",LLLL:"dddd, [la] D[-an de] MMMM, YYYY LT"},meridiem:function(hours,minutes,isLower){return hours>11?isLower?"p.t.m.":"P.T.M.":isLower?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"je %s",past:"antaŭ %s",s:"sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},ordinal:"%da",week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){var monthsShortDot="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),monthsShort="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_");return moment.lang("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(m,format){return/-MMM-/.test(format)?monthsShort[m.month()]:monthsShortDot[m.month()]},weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D [de] MMMM [del] YYYY",LLL:"D [de] MMMM [del] YYYY LT",LLLL:"dddd, D [de] MMMM [del] YYYY LT"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:"%dº",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){function processRelativeTime(number,withoutSuffix,key,isFuture){var format={s:["mõne sekundi","mõni sekund","paar sekundit"],m:["ühe minuti","üks minut"],mm:[number+" minuti",number+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[number+" tunni",number+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[number+" kuu",number+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[number+" aasta",number+" aastat"]};return withoutSuffix?format[key][2]?format[key][2]:format[key][1]:isFuture?format[key][0]:format[key][1]}return moment.lang("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:processRelativeTime,m:processRelativeTime,mm:processRelativeTime,h:processRelativeTime,hh:processRelativeTime,d:processRelativeTime,dd:"%d päeva",M:processRelativeTime,MM:processRelativeTime,y:processRelativeTime,yy:processRelativeTime},ordinal:"%d.",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] LT",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] LT",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] LT",llll:"ddd, YYYY[ko] MMM D[a] LT"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinal:"%d.",week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){var symbolMap={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},numberMap={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};return moment.lang("fa",{months:"ژانویه_فوریهارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریهارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یکشنبه_دوشنبههشنبههارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysShort:"یکشنبه_دوشنبههشنبههارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},meridiem:function(hour){return 12>hour?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چندین ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(string){return string.replace(/[۰-۹]/g,function(match){return numberMap[match]}).replace(/،/g,",")},postformat:function(string){return string.replace(/\d/g,function(match){return symbolMap[match]}).replace(/,/g,"،")},ordinal:"%dم",week:{dow:6,doy:12}})}),function(factory){factory(moment)}(function(moment){function translate(number,withoutSuffix,key,isFuture){var result="";switch(key){case"s":return isFuture?"muutaman sekunnin":"muutama sekunti";case"m":return isFuture?"minuutin":"minuutti";case"mm":result=isFuture?"minuutin":"minuuttia";break;case"h":return isFuture?"tunnin":"tunti";case"hh":result=isFuture?"tunnin":"tuntia";break;case"d":return isFuture?"päivän":"päivä";case"dd":result=isFuture?"päivän":"päivää";break;case"M":return isFuture?"kuukauden":"kuukausi";case"MM":result=isFuture?"kuukauden":"kuukautta";break;case"y":return isFuture?"vuoden":"vuosi";case"yy":result=isFuture?"vuoden":"vuotta"}return result=verbalNumber(number,isFuture)+" "+result}function verbalNumber(number,isFuture){return 10>number?isFuture?numbersFuture[number]:numbersPast[number]:number}var numbersPast="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),numbersFuture=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",numbersPast[7],numbersPast[8],numbersPast[9]];return moment.lang("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] LT",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] LT",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] LT",llll:"ddd, Do MMM YYYY, [klo] LT"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:translate,m:translate,mm:translate,h:translate,hh:translate,d:translate,dd:translate,M:translate,MM:translate,y:translate,yy:translate},ordinal:"%d.",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D. MMMM, YYYY LT"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",m:"ein minutt",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaði",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(number){return number+(1===number?"er":"")}})}),function(factory){factory(moment)}(function(moment){return moment.lang("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(number){return number+(1===number?"er":"")},week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("gl",{months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Outubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(str){return"uns segundos"===str?"nuns segundos":"en "+str},past:"hai %s",s:"uns segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinal:"%dº",week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){return moment.lang("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יוליוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יוליוג׳_ספט׳וק׳וב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישיישי_שבת".split("_"),weekdaysShort:"א׳׳׳׳׳_ו׳׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY LT",LLLL:"dddd, D [ב]MMMM YYYY LT",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY LT",llll:"ddd, D MMM YYYY LT"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(number){return 2===number?"שעתיים":number+" שעות"},d:"יום",dd:function(number){return 2===number?"יומיים":number+" ימים"},M:"חודש",MM:function(number){return 2===number?"חודשיים":number+" חודשים"},y:"שנה",yy:function(number){return 2===number?"שנתיים":number+" שנים"}}})}),function(factory){factory(moment)}(function(moment){var symbolMap={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:""},numberMap={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","":"0"};return moment.lang("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(string){return string.replace(/[१२३४५६७८९०]/g,function(match){return numberMap[match]})},postformat:function(string){return string.replace(/\d/g,function(match){return symbolMap[match]})},meridiem:function(hour){return 4>hour?"रात":10>hour?"सुबह":17>hour?"दोपहर":20>hour?"शाम":"रात"},week:{dow:0,doy:6}})}),function(factory){factory(moment)}(function(moment){function translate(number,withoutSuffix,key){var result=number+" ";switch(key){case"m":return withoutSuffix?"jedna minuta":"jedne minute";case"mm":return result+=1===number?"minuta":2===number||3===number||4===number?"minute":"minuta";case"h":return withoutSuffix?"jedan sat":"jednog sata";case"hh":return result+=1===number?"sat":2===number||3===number||4===number?"sata":"sati";case"dd":return result+=1===number?"dan":"dana";case"MM":return result+=1===number?"mjesec":2===number||3===number||4===number?"mjeseca":"mjeseci";case"yy":return result+=1===number?"godina":2===number||3===number||4===number?"godine":"godina"}}return moment.lang("hr",{months:"sječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),monthsShort:"sje._vel._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:translate,mm:translate,h:translate,hh:translate,d:"dan",dd:translate,M:"mjesec",MM:translate,y:"godinu",yy:translate},ordinal:"%d.",week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){function translate(number,withoutSuffix,key,isFuture){var num=number;switch(key){case"s":return isFuture||withoutSuffix?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(isFuture||withoutSuffix?" perc":" perce");case"mm":return num+(isFuture||withoutSuffix?" perc":" perce");case"h":return"egy"+(isFuture||withoutSuffix?" óra":" órája");case"hh":return num+(isFuture||withoutSuffix?" óra":" órája");case"d":return"egy"+(isFuture||withoutSuffix?" nap":" napja");case"dd":return num+(isFuture||withoutSuffix?" nap":" napja");case"M":return"egy"+(isFuture||withoutSuffix?" hónap":" hónapja");case"MM":return num+(isFuture||withoutSuffix?" hónap":" hónapja");case"y":return"egy"+(isFuture||withoutSuffix?" év":" éve");case"yy":return num+(isFuture||withoutSuffix?" év":" éve")}return""}function week(isFuture){return(isFuture?"":"[múlt] ")+"["+weekEndings[this.day()]+"] LT[-kor]"}var weekEndings="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");return moment.lang("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D., LT",LLLL:"YYYY. MMMM D., dddd LT"},meridiem:function(hours,minutes,isLower){return 12>hours?isLower===!0?"de":"DE":isLower===!0?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return week.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return week.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:translate,m:translate,mm:translate,h:translate,hh:translate,d:translate,dd:translate,M:translate,MM:translate,y:translate,yy:translate},ordinal:"%d.",week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){function monthsCaseReplace(m,format){var months={nominative:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_"),accusative:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_")},nounCase=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(format)?"accusative":"nominative";return months[nounCase][m.month()]}function monthsShortCaseReplace(m){var monthsShort="հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_");return monthsShort[m.month()]}function weekdaysCaseReplace(m){var weekdays="կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_");return weekdays[m.day()]}return moment.lang("hy-am",{months:monthsCaseReplace,monthsShort:monthsShortCaseReplace,weekdays:weekdaysCaseReplace,weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., LT",LLLL:"dddd, D MMMM YYYY թ., LT"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiem:function(hour){return 4>hour?"գիշերվա":12>hour?"առավոտվա":17>hour?"ցերեկվա":"երեկոյան"},ordinal:function(number,period){switch(period){case"DDD":case"w":case"W":case"DDDo":return 1===number?number+"-ին":number+"-րդ";default:return number}},week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){return moment.lang("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] LT",LLLL:"dddd, D MMMM YYYY [pukul] LT"},meridiem:function(hours){return 11>hours?"pagi":15>hours?"siang":19>hours?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){function plural(n){return n%100===11?!0:n%10===1?!1:!0}function translate(number,withoutSuffix,key,isFuture){var result=number+" ";switch(key){case"s":return withoutSuffix||isFuture?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return withoutSuffix?"mínúta":"mínútu";case"mm":return plural(number)?result+(withoutSuffix||isFuture?"mínútur":"mínútum"):withoutSuffix?result+"mínúta":result+"mínútu";case"hh":return plural(number)?result+(withoutSuffix||isFuture?"klukkustundir":"klukkustundum"):result+"klukkustund";case"d":return withoutSuffix?"dagur":isFuture?"dag":"degi";case"dd":return plural(number)?withoutSuffix?result+"dagar":result+(isFuture?"daga":"dögum"):withoutSuffix?result+"dagur":result+(isFuture?"dag":"degi");case"M":return withoutSuffix?"mánuður":isFuture?"mánuð":"mánuði";case"MM":return plural(number)?withoutSuffix?result+"mánuðir":result+(isFuture?"mánuði":"mánuðum"):withoutSuffix?result+"mánuður":result+(isFuture?"mánuð":"mánuði");case"y":return withoutSuffix||isFuture?"ár":"ári";case"yy":return plural(number)?result+(withoutSuffix||isFuture?"ár":"árum"):result+(withoutSuffix||isFuture?"ár":"ári")}}return moment.lang("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] LT",LLLL:"dddd, D. MMMM YYYY [kl.] LT"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:translate,m:translate,mm:translate,h:"klukkustund",hh:translate,d:translate,dd:translate,M:translate,MM:translate,y:translate,yy:translate},ordinal:"%d.",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("it",{months:"Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settembre_Ottobre_Novembre_Dicembre".split("_"),monthsShort:"Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),weekdays:"Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"D_L_Ma_Me_G_V_S".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:"[lo scorso] dddd [alle] LT",sameElse:"L"},relativeTime:{future:function(s){return(/^[0-9].+$/.test(s)?"tra":"in")+" "+s},past:"%s fa",s:"alcuni secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:"%dº",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("ja",{months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah時m分",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日LT",LLLL:"YYYY年M月D日LT dddd"},meridiem:function(hour){return 12>hour?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})}),function(factory){factory(moment)}(function(moment){function monthsCaseReplace(m,format){var months={nominative:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),accusative:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},nounCase=/D[oD] *MMMM?/.test(format)?"accusative":"nominative";return months[nounCase][m.month()]}function weekdaysCaseReplace(m,format){var weekdays={nominative:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),accusative:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_")},nounCase=/(წინა|შემდეგ)/.test(format)?"accusative":"nominative";return weekdays[nounCase][m.day()]}return moment.lang("ka",{months:monthsCaseReplace,monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:weekdaysCaseReplace,weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(s){return/(წამი|წუთი|საათი|წელი)/.test(s)?s.replace(/ი$/,"ში"):s+"ში"},past:function(s){return/(წამი|წუთი|საათი|დღე|თვე)/.test(s)?s.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(s)?s.replace(/წელი$/,"წლის წინ"):void 0},s:"რამდენიმე წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},ordinal:function(number){return 0===number?number:1===number?number+"-ლი":20>number||100>=number&&number%20===0||number%100===0?"მე-"+number:number+"-ე"},week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){return moment.lang("km",{months:"មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysMin:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[ថ្ងៃនៈ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 mm분",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},meridiem:function(hour){return 12>hour?"오전":"오후"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:"%d일",meridiemParse:/(오전|오후)/,isPM:function(token){return"오후"===token}})}),function(factory){factory(moment)}(function(moment){function processRelativeTime(number,withoutSuffix,key){var format={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],dd:[number+" Deeg",number+" Deeg"],M:["ee Mount","engem Mount"],MM:[number+" Méint",number+" Méint"],y:["ee Joer","engem Joer"],yy:[number+" Joer",number+" Joer"]};return withoutSuffix?format[key][0]:format[key][1]}function processFutureTime(string){var number=string.substr(0,string.indexOf(" "));return eifelerRegelAppliesToNumber(number)?"a "+string:"an "+string}function processPastTime(string){var number=string.substr(0,string.indexOf(" "));return eifelerRegelAppliesToNumber(number)?"viru "+string:"virun "+string}function processLastWeek(){var weekday=this.format("d");return eifelerRegelAppliesToWeekday(weekday)?"[Leschte] dddd [um] LT":"[Leschten] dddd [um] LT"}function eifelerRegelAppliesToWeekday(weekday){switch(weekday=parseInt(weekday,10)){case 0:case 1:case 3:case 5:case 6:return!0;default:return!1}}function eifelerRegelAppliesToNumber(number){if(number=parseInt(number,10),isNaN(number))return!1;if(0>number)return!0;if(10>number)return number>=4&&7>=number?!0:!1;if(100>number){var lastDigit=number%10,firstDigit=number/10;return eifelerRegelAppliesToNumber(0===lastDigit?firstDigit:lastDigit)}if(1e4>number){for(;number>=10;)number/=10;return eifelerRegelAppliesToNumber(number)
}return number/=1e3,eifelerRegelAppliesToNumber(number)}return moment.lang("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),longDateFormat:{LT:"H:mm [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:processLastWeek},relativeTime:{future:processFutureTime,past:processPastTime,s:"e puer Sekonnen",m:processRelativeTime,mm:"%d Minutten",h:processRelativeTime,hh:"%d Stonnen",d:processRelativeTime,dd:processRelativeTime,M:processRelativeTime,MM:processRelativeTime,y:processRelativeTime,yy:processRelativeTime},ordinal:"%d.",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){function translateSeconds(number,withoutSuffix,key,isFuture){return withoutSuffix?"kelios sekundės":isFuture?"kelių sekundžių":"kelias sekundes"}function translateSingular(number,withoutSuffix,key,isFuture){return withoutSuffix?forms(key)[0]:isFuture?forms(key)[1]:forms(key)[2]}function special(number){return number%10===0||number>10&&20>number}function forms(key){return units[key].split("_")}function translate(number,withoutSuffix,key,isFuture){var result=number+" ";return 1===number?result+translateSingular(number,withoutSuffix,key[0],isFuture):withoutSuffix?result+(special(number)?forms(key)[1]:forms(key)[0]):isFuture?result+forms(key)[1]:result+(special(number)?forms(key)[1]:forms(key)[2])}function relativeWeekDay(moment,format){var nominative=-1===format.indexOf("dddd HH:mm"),weekDay=weekDays[moment.weekday()];return nominative?weekDay:weekDay.substring(0,weekDay.length-2)+"į"}var units={m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"},weekDays="pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis_sekmadienis".split("_");return moment.lang("lt",{months:"sausio_vasario_kovo_balandžio_gegužės_biržėlio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:relativeWeekDay,weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], LT [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, LT [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], LT [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, LT [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:translateSeconds,m:translateSingular,mm:translate,h:translateSingular,hh:translate,d:translateSingular,dd:translate,M:translateSingular,MM:translate,y:translateSingular,yy:translate},ordinal:function(number){return number+"-oji"},week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){function format(word,number,withoutSuffix){var forms=word.split("_");return withoutSuffix?number%10===1&&11!==number?forms[2]:forms[3]:number%10===1&&11!==number?forms[0]:forms[1]}function relativeTimeWithPlural(number,withoutSuffix,key){return number+" "+format(units[key],number,withoutSuffix)}var units={mm:"minūti_minūtes_minūte_minūtes",hh:"stundu_stundas_stunda_stundas",dd:"dienu_dienas_diena_dienas",MM:"mēnesi_mēnešus_mēnesis_mēneši",yy:"gadu_gadus_gads_gadi"};return moment.lang("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, LT",LLLL:"YYYY. [gada] D. MMMM, dddd, LT"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"%s vēlāk",past:"%s agrāk",s:"dažas sekundes",m:"minūti",mm:relativeTimeWithPlural,h:"stundu",hh:relativeTimeWithPlural,d:"dienu",dd:relativeTimeWithPlural,M:"mēnesi",MM:relativeTimeWithPlural,y:"gadu",yy:relativeTimeWithPlural},ordinal:"%d.",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апрај_јун_јул_авг_сеп_окт_ноеек".split("_"),weekdays:"недела_понеделник_вторник_средаетврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_среет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_сре_пе_сa".split("_"),longDateFormat:{LT:"H:mm",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Во изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Во изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},ordinal:function(number){var lastDigit=number%10,last2Digits=number%100;return 0===number?number+"-ев":0===last2Digits?number+"-ен":last2Digits>10&&20>last2Digits?number+"-ти":1===lastDigit?number+"-ви":2===lastDigit?number+"-ри":7===lastDigit||8===lastDigit?number+"-ми":number+"-ти"},week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){return moment.lang("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റബർ_ഒക്ടോബർ_നവബർ_ഡിസബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവ._ഡിസ.".split("_"),weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴ_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiem:function(hour){return 4>hour?"രാത്രി":12>hour?"രാവിലെ":17>hour?"ഉച്ച കഴിഞ്ഞ്":20>hour?"വൈകുന്നേരം":"രാത്രി"}})}),function(factory){factory(moment)}(function(moment){var symbolMap={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:""},numberMap={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","":"0"};return moment.lang("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%s नंतर",past:"%s पूर्वी",s:"सेकंद",m:"एक मिनिट",mm:"%d मिनिटे",h:"एक तास",hh:"%d तास",d:"एक दिवस",dd:"%d दिवस",M:"एक महिना",MM:"%d महिने",y:"एक वर्ष",yy:"%d वर्षे"},preparse:function(string){return string.replace(/[१२३४५६७८९०]/g,function(match){return numberMap[match]})},postformat:function(string){return string.replace(/\d/g,function(match){return symbolMap[match]})},meridiem:function(hour){return 4>hour?"रात्री":10>hour?"सकाळी":17>hour?"दुपारी":20>hour?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})}),function(factory){factory(moment)}(function(moment){return moment.lang("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] LT",LLLL:"dddd, D MMMM YYYY [pukul] LT"},meridiem:function(hours){return 11>hours?"pagi":15>hours?"tengahari":19>hours?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){return moment.lang("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"H.mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] LT",LLLL:"dddd D. MMMM YYYY [kl.] LT"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){var symbolMap={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:""},numberMap={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","":"0"};return moment.lang("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आइ._सो._मङ्_बु._बि._शु._श.".split("_"),longDateFormat:{LT:"Aको h:mm बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},preparse:function(string){return string.replace(/[१२३४५६७८९०]/g,function(match){return numberMap[match]})},postformat:function(string){return string.replace(/\d/g,function(match){return symbolMap[match]})},meridiem:function(hour){return 3>hour?"राती":10>hour?"बिहान":15>hour?"दिउँसो":18>hour?"बेलुका":20>hour?"साँझ":"राती"},calendar:{sameDay:"[आज] LT",nextDay:"[भोली] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडी",s:"केही समय",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){var monthsShortWithDots="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsShortWithoutDots="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_");return moment.lang("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(m,format){return/-MMM-/.test(format)?monthsShortWithoutDots[m.month()]:monthsShortWithDots[m.month()]},weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinal:function(number){return number+(1===number||8===number||number>=20?"ste":"de")},week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s sidan",s:"nokre sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){function plural(n){return 5>n%10&&n%10>1&&~~(n/10)%10!==1}function translate(number,withoutSuffix,key){var result=number+" ";switch(key){case"m":return withoutSuffix?"minuta":"minutę";case"mm":return result+(plural(number)?"minuty":"minut");case"h":return withoutSuffix?"godzina":"godzinę";case"hh":return result+(plural(number)?"godziny":"godzin");case"MM":return result+(plural(number)?"miesiące":"miesięcy");case"yy":return result+(plural(number)?"lata":"lat")}}var monthsNominative="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),monthsSubjective="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");return moment.lang("pl",{months:function(momentToFormat,format){return/D MMMM/.test(format)?monthsSubjective[momentToFormat.month()]:monthsNominative[momentToFormat.month()]},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),weekdaysMin:"N_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:translate,mm:translate,h:translate,hh:translate,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:translate,y:"rok",yy:translate},ordinal:"%d.",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"dom_2ª_3ª_4ª_5ª_6ª_sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] LT",LLLL:"dddd, D [de] MMMM [de] YYYY [às] LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:"%dº"})}),function(factory){factory(moment)}(function(moment){return moment.lang("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"dom_2ª_3ª_4ª_5ª_6ª_sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY LT",LLLL:"dddd, D [de] MMMM [de] YYYY LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:"%dº",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){function relativeTimeWithPlural(number,withoutSuffix,key){var format={mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"},separator=" ";return(number%100>=20||number>=100&&number%100===0)&&(separator=" de "),number+separator+format[key]}return moment.lang("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",m:"un minut",mm:relativeTimeWithPlural,h:"o oră",hh:relativeTimeWithPlural,d:"o zi",dd:relativeTimeWithPlural,M:"o lună",MM:relativeTimeWithPlural,y:"un an",yy:relativeTimeWithPlural},week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){function plural(word,num){var forms=word.split("_");return num%10===1&&num%100!==11?forms[0]:num%10>=2&&4>=num%10&&(10>num%100||num%100>=20)?forms[1]:forms[2]}function relativeTimeWithPlural(number,withoutSuffix,key){var format={mm:withoutSuffix?"минута_минуты_минут":"минуту_минуты_минут",hh:"часасаасов",dd:"день_дня_дней",MM:"месяц_месяцаесяцев",yy:"год_годает"};return"m"===key?withoutSuffix?"минута":"минуту":number+" "+plural(format[key],+number)}function monthsCaseReplace(m,format){var months={nominative:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),accusative:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_")},nounCase=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(format)?"accusative":"nominative";return months[nounCase][m.month()]}function monthsShortCaseReplace(m,format){var monthsShort={nominative:"янв_фев_мар_апрай_июнь_июль_авг_сен_окт_ноя_дек".split("_"),accusative:"янв_фев_мар_апрая_июня_июля_авг_сен_окт_ноя_дек".split("_")},nounCase=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(format)?"accusative":"nominative";return monthsShort[nounCase][m.month()]}function weekdaysCaseReplace(m,format){var weekdays={nominative:"воскресенье_понедельник_вторник_средаетверг_пятница_суббота".split("_"),accusative:"воскресенье_понедельник_вторник_средуетверг_пятницу_субботу".split("_")},nounCase=/\[ ?[Вв] ?(?:прошлую|следующую)? ?\] ?dddd/.test(format)?"accusative":"nominative";return weekdays[nounCase][m.day()]}return moment.lang("ru",{months:monthsCaseReplace,monthsShort:monthsShortCaseReplace,weekdays:weekdaysCaseReplace,weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[й|я]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., LT",LLLL:"dddd, D MMMM YYYY г., LT"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(){switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:relativeTimeWithPlural,mm:relativeTimeWithPlural,h:"час",hh:relativeTimeWithPlural,d:"день",dd:relativeTimeWithPlural,M:"месяц",MM:relativeTimeWithPlural,y:"год",yy:relativeTimeWithPlural},meridiem:function(hour){return 4>hour?"ночи":12>hour?"утра":17>hour?"дня":"вечера"},ordinal:function(number,period){switch(period){case"M":case"d":case"DDD":return number+"-й";case"D":return number+"-го";case"w":case"W":return number+"-я";default:return number}},week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){function plural(n){return n>1&&5>n}function translate(number,withoutSuffix,key,isFuture){var result=number+" ";switch(key){case"s":return withoutSuffix||isFuture?"pár sekúnd":"pár sekundami";case"m":return withoutSuffix?"minúta":isFuture?"minútu":"minútou";case"mm":return withoutSuffix||isFuture?result+(plural(number)?"minúty":"minút"):result+"minútami";case"h":return withoutSuffix?"hodina":isFuture?"hodinu":"hodinou";case"hh":return withoutSuffix||isFuture?result+(plural(number)?"hodiny":"hodín"):result+"hodinami";case"d":return withoutSuffix||isFuture?"deň":"dňom";case"dd":return withoutSuffix||isFuture?result+(plural(number)?"dni":"dní"):result+"dňami";case"M":return withoutSuffix||isFuture?"mesiac":"mesiacom";case"MM":return withoutSuffix||isFuture?result+(plural(number)?"mesiace":"mesiacov"):result+"mesiacmi";case"y":return withoutSuffix||isFuture?"rok":"rokom";case"yy":return withoutSuffix||isFuture?result+(plural(number)?"roky":"rokov"):result+"rokmi"}}var months="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),monthsShort="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");return moment.lang("sk",{months:months,monthsShort:monthsShort,monthsParse:function(months,monthsShort){var i,_monthsParse=[];for(i=0;12>i;i++)_monthsParse[i]=new RegExp("^"+months[i]+"$|^"+monthsShort[i]+"$","i");return _monthsParse}(months,monthsShort),weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd D. MMMM YYYY LT"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:translate,m:translate,mm:translate,h:translate,hh:translate,d:translate,dd:translate,M:translate,MM:translate,y:translate,yy:translate},ordinal:"%d.",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){function translate(number,withoutSuffix,key){var result=number+" ";switch(key){case"m":return withoutSuffix?"ena minuta":"eno minuto";case"mm":return result+=1===number?"minuta":2===number?"minuti":3===number||4===number?"minute":"minut";case"h":return withoutSuffix?"ena ura":"eno uro";case"hh":return result+=1===number?"ura":2===number?"uri":3===number||4===number?"ure":"ur";case"dd":return result+=1===number?"dan":"dni";case"MM":return result+=1===number?"mesec":2===number?"meseca":3===number||4===number?"mesece":"mesecev";case"yy":return result+=1===number?"leto":2===number?"leti":3===number||4===number?"leta":"let"}}return moment.lang("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[prejšnja] dddd [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"%s nazaj",s:"nekaj sekund",m:translate,mm:translate,h:translate,hh:translate,d:"en dan",dd:translate,M:"en mesec",MM:translate,y:"eno leto",yy:translate},ordinal:"%d.",week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){return moment.lang("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),meridiem:function(hours){return 12>hours?"PD":"MD"},longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){var translator={words:{m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(number,wordKey){return 1===number?wordKey[0]:number>=2&&4>=number?wordKey[1]:wordKey[2]},translate:function(number,withoutSuffix,key){var wordKey=translator.words[key];return 1===key.length?withoutSuffix?wordKey[0]:wordKey[1]:number+" "+translator.correctGrammaticalCase(number,wordKey)}};return moment.lang("sr-cyr",{months:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"],monthsShort:["јан.","феб.","мар.","апр.","мај","јун","јул","авг.","сеп.","окт.","нов.","дец."],weekdays:["недеља","понедељак","уторак","среда","четвртак","петак","субота"],weekdaysShort:["нед.","пон.","уто.","сре.","чет.","пет.","суб."],weekdaysMin:["не","по","ут","ср","че","пе","су"],longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){var lastWeekDays=["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"];return lastWeekDays[this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",m:translator.translate,mm:translator.translate,h:translator.translate,hh:translator.translate,d:"дан",dd:translator.translate,M:"месец",MM:translator.translate,y:"годину",yy:translator.translate},ordinal:"%d.",week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){var translator={words:{m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(number,wordKey){return 1===number?wordKey[0]:number>=2&&4>=number?wordKey[1]:wordKey[2]},translate:function(number,withoutSuffix,key){var wordKey=translator.words[key];return 1===key.length?withoutSuffix?wordKey[0]:wordKey[1]:number+" "+translator.correctGrammaticalCase(number,wordKey)}};return moment.lang("sr",{months:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"],monthsShort:["jan.","feb.","mar.","apr.","maj","jun","jul","avg.","sep.","okt.","nov.","dec."],weekdays:["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],weekdaysShort:["ned.","pon.","uto.","sre.","čet.","pet.","sub."],weekdaysMin:["ne","po","ut","sr","če","pe","su"],longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var lastWeekDays=["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return lastWeekDays[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",m:translator.translate,mm:translator.translate,h:translator.translate,hh:translator.translate,d:"dan",dd:translator.translate,M:"mesec",MM:translator.translate,y:"godinu",yy:translator.translate},ordinal:"%d.",week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){return moment.lang("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"dddd LT",lastWeek:"[Förra] dddd[en] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinal:function(number){var b=number%10,output=1===~~(number%100/10)?"e":1===b?"a":2===b?"a":"e";
return number+output},week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},ordinal:function(number){return number+"வது"},meridiem:function(hour){return hour>=6&&10>=hour?" காலை":hour>=10&&14>=hour?" நண்பகல்":hour>=14&&18>=hour?" எற்பாடு":hour>=18&&20>=hour?" மாலை":hour>=20&&24>=hour?" இரவு":hour>=0&&6>=hour?" வைகறை":void 0},week:{dow:0,doy:6}})}),function(factory){factory(moment)}(function(moment){return moment.lang("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"มกรา_กุมภา_มีนา_เมษา_พฤษภา_มิถุนา_กรกฎา_สิงหา_กันยา_ตุลา_พฤศจิกา_ธันวา".split("_"),weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),longDateFormat:{LT:"H นาฬิกา m นาที",L:"YYYY/MM/DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา LT",LLLL:"วันddddที่ D MMMM YYYY เวลา LT"},meridiem:function(hour){return 12>hour?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})}),function(factory){factory(moment)}(function(moment){return moment.lang("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM DD, YYYY LT"},calendar:{sameDay:"[Ngayon sa] LT",nextDay:"[Bukas sa] LT",nextWeek:"dddd [sa] LT",lastDay:"[Kahapon sa] LT",lastWeek:"dddd [huling linggo] LT",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},ordinal:function(number){return number},week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){var suffixes={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};return moment.lang("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(number){if(0===number)return number+"'ıncı";var a=number%10,b=number%100-a,c=number>=100?100:null;return number+(suffixes[a]||suffixes[b]||suffixes[c])},week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){return moment.lang("tzm-la",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}),function(factory){factory(moment)}(function(moment){return moment.lang("tzm",{months:"ⵉⴰⵢ_ⴱⴰⵢ_ⵎⴰⵚ_ⵉⴱ_ⵎⴰⵢⵢⵓ_ⵢⵓⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⴱⵉ_ⴽⵟⵓⴱ_ⵓⵡⴰⴱⵉ_ⴷⵓⵊⴱⵉ".split("_"),monthsShort:"ⵉⴰⵢ_ⴱⴰⵢ_ⵎⴰⵚ_ⵉⴱ_ⵎⴰⵢⵢⵓ_ⵢⵓⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⴱⵉ_ⴽⵟⵓⴱ_ⵓⵡⴰⴱⵉ_ⴷⵓⵊⴱⵉ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⴰⵙ_ⴰⵙⵉⴰⵙ_ⴰⴽⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⴰⵙ_ⴰⵙⵉⴰⵙ_ⴰⴽⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⴰⵙ_ⴰⵙⵉⴰⵙ_ⴰⴽⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰ",M:"ⴰⵢoⵓ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})}),function(factory){factory(moment)}(function(moment){function plural(word,num){var forms=word.split("_");return num%10===1&&num%100!==11?forms[0]:num%10>=2&&4>=num%10&&(10>num%100||num%100>=20)?forms[1]:forms[2]}function relativeTimeWithPlural(number,withoutSuffix,key){var format={mm:"хвилина_хвилини_хвилин",hh:"година_години_годин",dd:"день_дні_днів",MM:"місяць_місяціісяців",yy:"рік_роки_років"};return"m"===key?withoutSuffix?"хвилина":"хвилину":"h"===key?withoutSuffix?"година":"годину":number+" "+plural(format[key],+number)}function monthsCaseReplace(m,format){var months={nominative:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_"),accusative:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_")},nounCase=/D[oD]? *MMMM?/.test(format)?"accusative":"nominative";return months[nounCase][m.month()]}function weekdaysCaseReplace(m,format){var weekdays={nominative:"неділя_понеділок_вівторок_середаетвер_пятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середуетвер_пятницю_суботу".split("_"),genitive:"неділі_понеділкаівторка_середи_четверга_пятниці_суботи".split("_")},nounCase=/(\[[ВвУу]\]) ?dddd/.test(format)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(format)?"genitive":"nominative";return weekdays[nounCase][m.day()]}function processHoursFunction(str){return function(){return str+"о"+(11===this.hours()?"б":"")+"] LT"}}return moment.lang("uk",{months:monthsCaseReplace,monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_веровт_лист_груд".split("_"),weekdays:weekdaysCaseReplace,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., LT",LLLL:"dddd, D MMMM YYYY р., LT"},calendar:{sameDay:processHoursFunction("[Сьогодні "),nextDay:processHoursFunction("[Завтра "),lastDay:processHoursFunction("[Вчора "),nextWeek:processHoursFunction("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return processHoursFunction("[Минулої] dddd [").call(this);case 1:case 2:case 4:return processHoursFunction("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:relativeTimeWithPlural,mm:relativeTimeWithPlural,h:"годину",hh:relativeTimeWithPlural,d:"день",dd:relativeTimeWithPlural,M:"місяць",MM:relativeTimeWithPlural,y:"рік",yy:relativeTimeWithPlural},meridiem:function(hour){return 4>hour?"ночі":12>hour?"ранку":17>hour?"дня":"вечора"},ordinal:function(number,period){switch(period){case"M":case"d":case"DDD":case"w":case"W":return number+"-й";case"D":return number+"-го";default:return number}},week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){return moment.lang("uz",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_мар_апрай_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанбаушанба_Сешанбаоршанбаайшанбаумаанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чорай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Сеоауа".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"D MMMM YYYY, dddd LT"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})}),function(factory){factory(moment)}(function(moment){return moment.lang("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY LT",LLLL:"dddd, D MMMM [năm] YYYY LT",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY LT",llll:"ddd, D MMM YYYY LT"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},ordinal:function(number){return number},week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm",L:"YYYY-MM-DD",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT",l:"YYYY-MM-DD",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日LT",llll:"YYYY年MMMD日ddddLT"},meridiem:function(hour,minute){var hm=100*hour+minute;return 600>hm?"凌晨":900>hm?"早上":1130>hm?"上午":1230>hm?"中午":1800>hm?"下午":"晚上"},calendar:{sameDay:function(){return 0===this.minutes()?"[今天]Ah[点整]":"[今天]LT"},nextDay:function(){return 0===this.minutes()?"[明天]Ah[点整]":"[明天]LT"},lastDay:function(){return 0===this.minutes()?"[昨天]Ah[点整]":"[昨天]LT"},nextWeek:function(){var startOfWeek,prefix;return startOfWeek=moment().startOf("week"),prefix=this.unix()-startOfWeek.unix()>=604800?"[下]":"[本]",0===this.minutes()?prefix+"dddAh点整":prefix+"dddAh点mm"},lastWeek:function(){var startOfWeek,prefix;return startOfWeek=moment().startOf("week"),prefix=this.unix()<startOfWeek.unix()?"[上]":"[本]",0===this.minutes()?prefix+"dddAh点整":prefix+"dddAh点mm"},sameElse:"LL"},ordinal:function(number,period){switch(period){case"d":case"D":case"DDD":return number+"日";case"M":return number+"月";case"w":case"W":return number+"周";default:return number}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1分钟",mm:"%d分钟",h:"1小时",hh:"%d小时",d:"1天",dd:"%d天",M:"1个月",MM:"%d个月",y:"1年",yy:"%d年"},week:{dow:1,doy:4}})}),function(factory){factory(moment)}(function(moment){return moment.lang("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah點mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日LT",llll:"YYYY年MMMD日ddddLT"},meridiem:function(hour,minute){var hm=100*hour+minute;return 900>hm?"早上":1130>hm?"上午":1230>hm?"中午":1800>hm?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},ordinal:function(number,period){switch(period){case"d":case"D":case"DDD":return number+"日";case"M":return number+"月";case"w":case"W":return number+"週";default:return number}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"一分鐘",mm:"%d分鐘",h:"一小時",hh:"%d小時",d:"一天",dd:"%d天",M:"一個月",MM:"%d個月",y:"一年",yy:"%d年"}})}),moment.lang("en"),hasModule?module.exports=moment:"function"==typeof define&&define.amd?(define("moment",function(require,exports,module){return module.config&&module.config()&&module.config().noGlobal===!0&&(globalScope.moment=oldGlobalMoment),moment}),makeGlobal(!0)):makeGlobal()}.call(this),function(){var Checksley,ComposedField,Field,FieldMultiple,Form,checksley,defaults,formatMessage,messages,toInt,validators,_checksley,__hasProp={}.hasOwnProperty,__extends=function(child,parent){function ctor(){this.constructor=child}for(var key in parent)__hasProp.call(parent,key)&&(child[key]=parent[key]);return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child};defaults={inputs:"input, textarea, select",excluded:"input[type=hidden], input[type=file], :disabled",focus:"first",validationMinlength:3,validateIfUnchanged:!1,interceptSubmit:!0,messages:{},validators:{},showErrors:!0,errorClass:"checksley-error",successClass:"checksley-ok",validatedClass:"checksley-validated",onlyOneErrorElement:!1,containerClass:"checksley-error-list",containerGlobalSearch:!1,containerPreferenceSelector:".errors-box",containerErrorsSelector:"li",errors:{classHandler:function(element){return element},container:function(element){return element.parent()},errorsWrapper:"<ul />",errorElem:"<li />"},listeners:{onFieldValidate:function(){return!1},onFormSubmit:function(){},onFieldError:function(){},onFieldSuccess:function(){}}},validators={notnull:function(val){return val.length>0},notblank:function(val){return _.isString(val)&&""!==val.replace(/^\s+/g,"").replace(/\s+$/g,"")},required:function(val){var element,_i,_len;if(_.isArray(val)){for(_i=0,_len=val.length;_len>_i;_i++)if(element=val[_i],validators.required(val[i]))return!0;return!1}return validators.notnull(val)&&validators.notblank(val)},type:function(val,type){var regExp;switch(regExp=null,type){case"number":regExp=/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/;break;case"digits":regExp=/^\d+$/;break;case"alphanum":regExp=/^\w+$/;break;case"email":regExp=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i;break;case"url":/(https?|s?ftp|git)/i.test(val)||(val="http://"+val),regExp=/^(https?|s?ftp|git):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;break;case"urlstrict":regExp=/^(https?|s?ftp|git):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;break;case"dateIso":regExp=/^(\d{4})\D?(0[1-9]|1[0-2])\D?([12]\d|0[1-9]|3[01])$/;break;case"phone":regExp=/^((\+\d{1,3}(-| )?\(?\d\)?(-| )?\d{1,5})|(\(?\d{2,6}\)?))(-| )?(\d{3,4})(-| )?(\d{4})(( x| ext)\d{1,5}){0,1}$/}return regExp?regExp.test(val):!1},regexp:function(val,regExp,self){return new RegExp(regExp,self.options.regexpFlag||"").test(val)},minlength:function(val,min){return val.length>=min},maxlength:function(val,max){return val.length<=max},rangelength:function(val,arrayRange){return val.length>=arrayRange[0]&&val.length<=arrayRange[1]},min:function(val,min){return Number(val)>=min},max:function(val,max){return Number(val)<=max},range:function(val,arrayRange){return val>=arrayRange[0]&&val<=arrayRange[1]},equalto:function(val,elem,self){return self.options.validateIfUnchanged=!0,val===$(elem).val()},mincheck:function(obj,val){return validators.minlength(obj,val)},maxcheck:function(obj,val){return validators.maxlength(obj,val)},rangecheck:function(obj,arrayRange){return validators.rangelength(obj,arrayRange)}},messages={defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",urlstrict:"This value should be a valid url.",number:"This value should be a valid number.",digits:"This value should be digits.",dateIso:"This value should be a valid date (YYYY-MM-DD).",alphanum:"This value should be alphanumeric.",phone:"This value should be a valid phone number."},notnull:"This value should not be null.",notblank:"This value should not be blank.",required:"This value is required.",regexp:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or less.",rangelength:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or less.",rangecheck:"You must select between %s and %s choices.",equalto:"This value should be the same."},formatMessage=function(message,args){return _.isArray(args)||(args=[args]),message.indexOf("%s")>=0?message.replace(/%s/g,function(){return String(args.shift())}):message.indexOf("%e")>=0?message.replace(/%e/g,function(){return String($(args.shift()).val())}):message},toInt=function(num){return parseInt(num,10)},_checksley=function(options){var element,instance,_options;if(element=$(this),!element.is("form, input, select, textarea"))throw"element is not a valid element for checksley";if(instance=element.data("checksley"),(void 0===instance||null===instance)&&(_options={},_.isPlainObject(options)&&(_options=options),instance=element.is("input[type=radio], input[type=checkbox]")?new FieldMultiple(element,options):element.is("input, select, textarea")?new Field(element,options):new Form(element,options)),!_.isString(options))return instance;switch(options){case"validate":return instance.validate();case"destroy":return instance.destroy();case"reset":return instance.reset()}},Checksley=function(){function Checksley(jq){this.jq=void 0===jq?window.jQuery||window.Zepto:jq,this.messages={"default":{defaultMessage:"Invalid"}},this.lang=this.detectLang()}return Checksley.prototype.updateDefaults=function(options){return _.merge(defaults,options)},Checksley.prototype.updateValidators=function(_validators){return _.extend(validators,_validators)},Checksley.prototype.updateMessages=function(lang,messages,overwrite){return null==overwrite&&(overwrite=!1),void 0===this.messages[lang]&&(this.messages[lang]={}),overwrite?this.messages[lang]=messages:_.merge(this.messages[lang],messages)},Checksley.prototype.injectPlugin=function(){return this.jq.fn.checksley=_checksley},Checksley.prototype.setLang=function(lang){return this.lang=lang},Checksley.prototype.detectLang=function(){return this.jq("html").attr("lang")||"default"},Checksley.prototype.getMessage=function(key,lang){var message;return void 0===lang&&(lang=this.lang),messages=this.messages[lang],void 0===messages&&(messages={}),message=messages[key],void 0===message?"default"===lang?this.getMessage("defaultMessage",lang):this.getMessage(key,"default"):message},Checksley}(),Field=function(){function Field(elm,options){null==options&&(options={}),this.id=_.uniqueId("field-"),this.element=$(elm),this.validatedOnce=!1,this.options=_.merge({},defaults,options),this.isRadioOrCheckbox=!1,this.validators=validators,this.resetConstraints(),this.bindEvents(),this.bindData()}return Field.prototype.bindData=function(){return this.element.data("checksley-field",this)},Field.prototype.unbindData=function(){return this.element.data("checksley-field",null)},Field.prototype.focus=function(){return this.element.focus()},Field.prototype.eventValidate=function(event){var trigger,value;return trigger=this.element.data("trigger"),value=this.getValue(),("keyup"!==event.type||/keyup/i.test(trigger)||this.validatedOnce)&&("change"!==event.type||/change/i.test(trigger)||this.validatedOnce)?value.length<this.options.validationMinlength&&!this.validatedOnce?!0:this.validate():!0},Field.prototype.unbindEvents=function(){return this.element.off("."+this.id)},Field.prototype.bindEvents=function(){var trigger;return this.unbindEvents(),trigger=this.element.data("trigger"),_.isString(trigger)&&this.element.on(""+trigger+"."+this.id,_.bind(this.eventValidate,this)),this.element.is("select")&&"change"!==trigger&&this.element.on("change."+this.id,_.bind(this.eventValidate,this)),"keyup"!==trigger?this.element.on("keyup."+this.id,_.bind(this.eventValidate,this)):void 0},Field.prototype.errorClassTarget=function(){return this.element},Field.prototype.resetHtml5Constraints=function(){var max,min,type,typeRx;if(this.element.prop("required")&&(this.required=!0),typeRx=new RegExp(this.element.attr("type"),"i"),typeRx.test("email url number range"))switch(type=this.element.attr("type")){case"range":if(min=this.element.attr("min"),max=this.element.attr("max"),min&&max)return this.constraints[type]={valid:!0,params:[toInt(min),toInt(max)],fn:this.validators[type]}}},Field.prototype.resetConstraints=function(){var constraint,fn,_ref,_results;this.constraints={},this.valid=!0,this.required=!1,this.resetHtml5Constraints(),this.element.addClass("checksley-validated"),_ref=this.validators,_results=[];for(constraint in _ref)fn=_ref[constraint],void 0!==this.element.data(constraint)&&(this.constraints[constraint]={valid:!0,params:this.element.data(constraint),fn:fn},_results.push("required"===constraint?this.required=!0:void 0));return _results},Field.prototype.hasConstraints=function(){return!_.isEmpty(this.constraints)},Field.prototype.validate=function(showErrors){return this.validatedOnce=!0,this.hasConstraints()?this.options.listeners.onFieldValidate(this.element,this)?(this.reset(),null):this.required||""!==this.getValue()?this.applyValidators(showErrors):(this.reset(),null):null},Field.prototype.applyValidators=function(showErrors){var data,listeners,name,val,valid,_ref;(void 0===showErrors||null===showErrors)&&(showErrors=this.options.showErrors),val=this.getValue(),valid=!0,listeners=this.options.listeners,showErrors&&this.removeErrors(),_ref=this.constraints;for(name in _ref)data=_ref[name],data.valid=data.fn(this.getValue(),data.params,this),data.valid===!1?(valid=!1,showErrors&&this.manageError(name,data),listeners.onFieldError(this.element,data,this)):listeners.onFieldSuccess(this.element,data,this);return this.handleClasses(valid),valid},Field.prototype.handleClasses=function(valid){var classHandlerElement,errorClass,successClass;switch(classHandlerElement=this.options.errors.classHandler(this.element,!1),errorClass=this.options.errorClass,successClass=this.options.successClass,valid){case null:return classHandlerElement.removeClass(errorClass),classHandlerElement.removeClass(successClass);case!1:return classHandlerElement.removeClass(successClass),classHandlerElement.addClass(errorClass);case!0:return classHandlerElement.removeClass(errorClass),classHandlerElement.addClass(successClass)}},Field.prototype.manageError=function(name,constraint){var data,message;return data=this.element.data(),message=void 0!==data.errorMessage?data.errorMessage:"type"===name?checksley.getMessage("type")[constraint.params]:checksley.getMessage(name),void 0===message&&(message=checksley.getMessage("default")),constraint.params&&(message=formatMessage(message,_.clone(constraint.params,!0))),this.addError(this.makeErrorElement(name,message))},Field.prototype.setErrors=function(messages){var message,_i,_len,_results;for(this.removeErrors(),_.isArray(messages)||(messages=[messages]),_results=[],_i=0,_len=messages.length;_len>_i;_i++)message=messages[_i],_results.push(this.addError(this.makeErrorElement("custom",message)));return _results},Field.prototype.makeErrorElement=function(constraintName,message){var element;return element=$("<li />",{"class":"checksley-"+constraintName}),element.html(message),element.addClass(constraintName),element},Field.prototype.addError=function(errorElement){var container,selector;return container=this.getErrorContainer(),selector=this.options.containerErrorsSelector,this.options.onlyOneErrorElement&&container.find(selector).length?void 0:container.append(errorElement)},Field.prototype.reset=function(){return this.handleClasses(null),this.resetConstraints(),this.removeErrors()},Field.prototype.removeErrors=function(){return $("#"+this.errorContainerId()).remove()},Field.prototype.getValue=function(){return this.element.val()},Field.prototype.errorContainerId=function(){return"checksley-error-"+this.id},Field.prototype.errorContainerClass=function(){return"checksley-error-list"},Field.prototype.getErrorContainer=function(){var container,definedContainer,errorContainerEl,params,preferenceSelector;return errorContainerEl=$("#"+this.errorContainerId()),1===errorContainerEl.length?errorContainerEl:(params={"class":this.errorContainerClass(),id:this.errorContainerId()},errorContainerEl=$("<ul />",params),definedContainer=this.element.data("error-container"),void 0===definedContainer?(errorContainerEl.insertAfter(this.isRadioOrCheckbox?this.element.parent():this.element),errorContainerEl):(container=this.options.errors.containerGlobalSearch?$(definedContainer):this.element.closest(definedContainer),preferenceSelector=this.options.errors.containerPreferenceSelector,1===container.find(preferenceSelector).length&&(container=container.find(preferenceSelector)),container.append(errorContainerEl),errorContainerEl))},Field.prototype.destroy=function(){return this.unbindEvents(),this.removeErrors(),this.unbindData()},Field.prototype.setForm=function(form){return this.form=form},Field}(),FieldMultiple=function(_super){function FieldMultiple(elm,options){FieldMultiple.__super__.constructor.call(this,elm,options),this.isRadioOrCheckbox=!0,this.isRadio=this.element.is("input[type=radio]"),this.isCheckbox=this.element.is("input[type=checkbox]")}return __extends(FieldMultiple,_super),FieldMultiple.prototype.getSiblings=function(){var group;return group=this.element.data("group"),void 0===group?"input[name="+this.element.attr("name")+"]":'[data-group="'+group+'"]'},FieldMultiple.prototype.getValue=function(){var element,values,_i,_len,_ref;if(this.isRadio)return $(""+this.getSiblings()+":checked").val()||"";if(this.isCheckbox){for(values=[],_ref=$(""+this.getSiblings()+":checked"),_i=0,_len=_ref.length;_len>_i;_i++)element=_ref[_i],values.push($(element).val());return values}},FieldMultiple.prototype.unbindEvents=function(){var element,_i,_len,_ref,_results;for(_ref=$(this.getSiblings()),_results=[],_i=0,_len=_ref.length;_len>_i;_i++)element=_ref[_i],_results.push($(element).off("."+this.id));return _results},FieldMultiple.prototype.bindEvents=function(){var element,trigger,_i,_len,_ref,_results;for(this.unbindEvents(),trigger=this.element.data("trigger"),_ref=$(this.getSiblings()),_results=[],_i=0,_len=_ref.length;_len>_i;_i++)element=_ref[_i],element=$(element),_.isString(trigger)&&element.on(""+trigger+"."+this.id,_.bind(this.eventValidate,this)),_results.push("change"!==trigger?element.on("change."+this.id,_.bind(this.eventValidate,this)):void 0);return _results},FieldMultiple}(Field),ComposedField=function(_super){function ComposedField(elm,options){ComposedField.__super__.constructor.call(this,elm,options)
}return __extends(ComposedField,_super),ComposedField.prototype.getComponents=function(){var components,field,fields,_i,_len;for(components=[],fields=this.element.data("composed").split(","),_i=0,_len=fields.length;_len>_i;_i++)field=fields[_i],components.push(this.element.find("[name="+field+"]"));return components},ComposedField.prototype.getValue=function(){var value;return value=_.map(this.getComponents(),function(x){return x.val()}).join(this.element.data("composed-joiner")),this.element.val(value),value},ComposedField.prototype.unbindEvents=function(){var component,_i,_len,_ref,_results;for(_ref=$(this.getComponents()),_results=[],_i=0,_len=_ref.length;_len>_i;_i++)component=_ref[_i],_results.push(component.off("."+this.id));return _results},ComposedField.prototype.bindEvents=function(){var component,trigger,_i,_len,_ref,_results;for(this.unbindEvents(),trigger=this.element.data("trigger"),_ref=$(this.getComponents()),_results=[],_i=0,_len=_ref.length;_len>_i;_i++)component=_ref[_i],_.isString(trigger)&&component.on(""+trigger+"."+this.id,_.bind(this.eventValidate,this)),_results.push("change"!==trigger?component.on("change."+this.id,_.bind(this.eventValidate,this)):void 0);return _results},ComposedField}(Field),Form=function(){function Form(elm,options){null==options&&(options={}),this.id=_.uniqueId("checksleyform-"),this.element=$(elm),this.options=_.extend({},defaults,options),this.initialize()}return Form.prototype.initialize=function(){return this.initializeFields(),this.bindEvents(),this.bindData()},Form.prototype.bindData=function(){return this.element.data("checksley",this)},Form.prototype.unbindData=function(){return this.element.data("checksley",null)},Form.prototype.initializeFields=function(){var composedField,element,field,fieldElm,_i,_j,_len,_len1,_ref,_ref1,_results;for(this.fields=[],this.fieldsByName={},_ref=this.element.find(this.options.inputs),_i=0,_len=_ref.length;_len>_i;_i++)fieldElm=_ref[_i],element=$(fieldElm),element.is(this.options.excluded)||(field=element.is("input[type=radio], input[type=checkbox]")?new checksley.FieldMultiple(fieldElm,this.options):new checksley.Field(fieldElm,this.options),field.setForm(this),this.fields.push(field),this.fieldsByName[element.attr("name")]=field);for(_ref1=this.element.find("[data-composed]"),_results=[],_j=0,_len1=_ref1.length;_len1>_j;_j++)composedField=_ref1[_j],field=new checksley.ComposedField(composedField,this.options),field.setForm(this),_results.push(this.fields.push(field));return _results},Form.prototype.setErrors=function(errors){var error,field,name,_results;_results=[];for(name in errors)error=errors[name],field=this.fieldsByName[name],_results.push(field?field.setErrors(error):void 0);return _results},Form.prototype.validate=function(){var field,invalidFields,valid,_i,_len,_ref;for(valid=!0,invalidFields=[],_ref=this.fields,_i=0,_len=_ref.length;_len>_i;_i++)field=_ref[_i],field.validate()===!1&&(valid=!1,invalidFields.push(field));if(!valid)switch(this.options.focus){case"first":invalidFields[0].focus();break;case"last":invalidFields[invalidFields.length].focus()}return valid},Form.prototype.bindEvents=function(){var self;return self=this,this.unbindEvents(),this.element.on("submit."+this.id,function(event){var ok;return ok=self.validate(),self.options.listeners.onFormSubmit(ok,event,self),self.options.interceptSubmit&&!ok?event.preventDefault():void 0})},Form.prototype.unbindEvents=function(){return this.element.off("."+this.id)},Form.prototype.removeErrors=function(){var field,_i,_len,_ref,_results;for(_ref=this.fields,_results=[],_i=0,_len=_ref.length;_len>_i;_i++)field=_ref[_i],_results.push(field.reset());return _results},Form.prototype.destroy=function(){var field,_i,_len,_ref;for(this.unbindEvents(),this.unbindData(),_ref=this.fields,_i=0,_len=_ref.length;_len>_i;_i++)field=_ref[_i],field.destroy();return this.field=[]},Form.prototype.reset=function(){var field,_i,_len,_ref,_results;for(_ref=this.fields,_results=[],_i=0,_len=_ref.length;_len>_i;_i++)field=_ref[_i],_results.push(field.reset());return _results},Form}(),checksley=new Checksley,checksley.updateMessages("default",messages),checksley.injectPlugin(),checksley.Checksley=Checksley,checksley.Form=Form,checksley.Field=Field,checksley.FieldMultiple=FieldMultiple,checksley.ComposedField=ComposedField,this.checksley=checksley}.call(this),function(root,factory){"use strict";var moment;if("object"==typeof exports){try{moment=require("moment")}catch(e){}module.exports=factory(moment)}else"function"==typeof define&&define.amd?define(function(req){var id="moment";return moment=req.defined&&req.defined(id)?req(id):void 0,factory(moment)}):root.Pikaday=factory(root.moment)}(this,function(moment){"use strict";var hasMoment="function"==typeof moment,hasEventListeners=!!window.addEventListener,document=window.document,sto=window.setTimeout,addEvent=function(el,e,callback,capture){hasEventListeners?el.addEventListener(e,callback,!!capture):el.attachEvent("on"+e,callback)},removeEvent=function(el,e,callback,capture){hasEventListeners?el.removeEventListener(e,callback,!!capture):el.detachEvent("on"+e,callback)},fireEvent=function(el,eventName,data){var ev;document.createEvent?(ev=document.createEvent("HTMLEvents"),ev.initEvent(eventName,!0,!1),ev=extend(ev,data),el.dispatchEvent(ev)):document.createEventObject&&(ev=document.createEventObject(),ev=extend(ev,data),el.fireEvent("on"+eventName,ev))},trim=function(str){return str.trim?str.trim():str.replace(/^\s+|\s+$/g,"")},hasClass=function(el,cn){return-1!==(" "+el.className+" ").indexOf(" "+cn+" ")},addClass=function(el,cn){hasClass(el,cn)||(el.className=""===el.className?cn:el.className+" "+cn)},removeClass=function(el,cn){el.className=trim((" "+el.className+" ").replace(" "+cn+" "," "))},isArray=function(obj){return/Array/.test(Object.prototype.toString.call(obj))},isDate=function(obj){return/Date/.test(Object.prototype.toString.call(obj))&&!isNaN(obj.getTime())},isLeapYear=function(year){return year%4===0&&year%100!==0||year%400===0},getDaysInMonth=function(year,month){return[31,isLeapYear(year)?29:28,31,30,31,30,31,31,30,31,30,31][month]},setToStartOfDay=function(date){isDate(date)&&date.setHours(0,0,0,0)},compareDates=function(a,b){return a.getTime()===b.getTime()},extend=function(to,from,overwrite){var prop,hasProp;for(prop in from)hasProp=void 0!==to[prop],hasProp&&"object"==typeof from[prop]&&void 0===from[prop].nodeName?isDate(from[prop])?overwrite&&(to[prop]=new Date(from[prop].getTime())):isArray(from[prop])?overwrite&&(to[prop]=from[prop].slice(0)):to[prop]=extend({},from[prop],overwrite):(overwrite||!hasProp)&&(to[prop]=from[prop]);return to},defaults={field:null,bound:void 0,position:"bottom left",format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,minDate:null,maxDate:null,yearRange:10,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,numberOfMonths:1,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},onSelect:null,onOpen:null,onClose:null,onDraw:null},renderDayName=function(opts,day,abbr){for(day+=opts.firstDay;day>=7;)day-=7;return abbr?opts.i18n.weekdaysShort[day]:opts.i18n.weekdays[day]},renderDay=function(i,isSelected,isToday,isDisabled,isEmpty){if(isEmpty)return'<td class="is-empty"></td>';var arr=[];return isDisabled&&arr.push("is-disabled"),isToday&&arr.push("is-today"),isSelected&&arr.push("is-selected"),'<td data-day="'+i+'" class="'+arr.join(" ")+'"><button class="pika-button" type="button">'+i+"</button></td>"},renderRow=function(days,isRTL){return"<tr>"+(isRTL?days.reverse():days).join("")+"</tr>"},renderBody=function(rows){return"<tbody>"+rows.join("")+"</tbody>"},renderHead=function(opts){var i,arr=[];for(i=0;7>i;i++)arr.push('<th scope="col"><abbr title="'+renderDayName(opts,i)+'">'+renderDayName(opts,i,!0)+"</abbr></th>");return"<thead>"+(opts.isRTL?arr.reverse():arr).join("")+"</thead>"},renderTitle=function(instance){var i,j,arr,monthHtml,yearHtml,opts=instance._o,month=instance._m,year=instance._y,isMinYear=year===opts.minYear,isMaxYear=year===opts.maxYear,html='<div class="pika-title">',prev=!0,next=!0;for(arr=[],i=0;12>i;i++)arr.push('<option value="'+i+'"'+(i===month?" selected":"")+(isMinYear&&i<opts.minMonth||isMaxYear&&i>opts.maxMonth?"disabled":"")+">"+opts.i18n.months[i]+"</option>");for(monthHtml='<div class="pika-label">'+opts.i18n.months[month]+'<select class="pika-select pika-select-month">'+arr.join("")+"</select></div>",isArray(opts.yearRange)?(i=opts.yearRange[0],j=opts.yearRange[1]+1):(i=year-opts.yearRange,j=1+year+opts.yearRange),arr=[];j>i&&i<=opts.maxYear;i++)i>=opts.minYear&&arr.push('<option value="'+i+'"'+(i===year?" selected":"")+">"+i+"</option>");return yearHtml='<div class="pika-label">'+year+opts.yearSuffix+'<select class="pika-select pika-select-year">'+arr.join("")+"</select></div>",html+=opts.showMonthAfterYear?yearHtml+monthHtml:monthHtml+yearHtml,isMinYear&&(0===month||opts.minMonth>=month)&&(prev=!1),isMaxYear&&(11===month||opts.maxMonth<=month)&&(next=!1),html+='<button class="pika-prev'+(prev?"":" is-disabled")+'" type="button">'+opts.i18n.previousMonth+"</button>",html+='<button class="pika-next'+(next?"":" is-disabled")+'" type="button">'+opts.i18n.nextMonth+"</button>",html+="</div>"},renderTable=function(opts,data){return'<table cellpadding="0" cellspacing="0" class="pika-table">'+renderHead(opts)+renderBody(data)+"</table>"},Pikaday=function(options){var self=this,opts=self.config(options);self._onMouseDown=function(e){if(self._v){e=e||window.event;var target=e.target||e.srcElement;if(target){if(!hasClass(target,"is-disabled")){if(hasClass(target,"pika-button")&&!hasClass(target,"is-empty"))return self.setDate(new Date(self._y,self._m,parseInt(target.innerHTML,10))),void(opts.bound&&sto(function(){self.hide()},100));hasClass(target,"pika-prev")?self.prevMonth():hasClass(target,"pika-next")&&self.nextMonth()}if(hasClass(target,"pika-select"))self._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}}},self._onChange=function(e){e=e||window.event;var target=e.target||e.srcElement;target&&(hasClass(target,"pika-select-month")?self.gotoMonth(target.value):hasClass(target,"pika-select-year")&&self.gotoYear(target.value))},self._onInputChange=function(e){var date;e.firedBy!==self&&(hasMoment?(date=moment(opts.field.value,opts.format),date=date&&date.isValid()?date.toDate():null):date=new Date(Date.parse(opts.field.value)),self.setDate(isDate(date)?date:null),self._v||self.show())},self._onInputFocus=function(){self.show()},self._onInputClick=function(){self.show()},self._onInputBlur=function(){self._c||(self._b=sto(function(){self.hide()},50)),self._c=!1},self._onClick=function(e){e=e||window.event;var target=e.target||e.srcElement,pEl=target;if(target){!hasEventListeners&&hasClass(target,"pika-select")&&(target.onchange||(target.setAttribute("onchange","return;"),addEvent(target,"change",self._onChange)));do if(hasClass(pEl,"pika-single"))return;while(pEl=pEl.parentNode);self._v&&target!==opts.trigger&&self.hide()}},self.el=document.createElement("div"),self.el.className="pika-single"+(opts.isRTL?" is-rtl":""),addEvent(self.el,"mousedown",self._onMouseDown,!0),addEvent(self.el,"change",self._onChange),opts.field&&(opts.bound?document.body.appendChild(self.el):opts.field.parentNode.insertBefore(self.el,opts.field.nextSibling),addEvent(opts.field,"change",self._onInputChange),opts.defaultDate||(opts.defaultDate=hasMoment&&opts.field.value?moment(opts.field.value,opts.format).toDate():new Date(Date.parse(opts.field.value)),opts.setDefaultDate=!0));var defDate=opts.defaultDate;isDate(defDate)?opts.setDefaultDate?self.setDate(defDate,!0):self.gotoDate(defDate):self.gotoDate(new Date),opts.bound?(this.hide(),self.el.className+=" is-bound",addEvent(opts.trigger,"click",self._onInputClick),addEvent(opts.trigger,"focus",self._onInputFocus),addEvent(opts.trigger,"blur",self._onInputBlur)):this.show()};return Pikaday.prototype={config:function(options){this._o||(this._o=extend({},defaults,!0));var opts=extend(this._o,options,!0);opts.isRTL=!!opts.isRTL,opts.field=opts.field&&opts.field.nodeName?opts.field:null,opts.bound=!!(void 0!==opts.bound?opts.field&&opts.bound:opts.field),opts.trigger=opts.trigger&&opts.trigger.nodeName?opts.trigger:opts.field;var nom=parseInt(opts.numberOfMonths,10)||1;if(opts.numberOfMonths=nom>4?4:nom,isDate(opts.minDate)||(opts.minDate=!1),isDate(opts.maxDate)||(opts.maxDate=!1),opts.minDate&&opts.maxDate&&opts.maxDate<opts.minDate&&(opts.maxDate=opts.minDate=!1),opts.minDate&&(setToStartOfDay(opts.minDate),opts.minYear=opts.minDate.getFullYear(),opts.minMonth=opts.minDate.getMonth()),opts.maxDate&&(setToStartOfDay(opts.maxDate),opts.maxYear=opts.maxDate.getFullYear(),opts.maxMonth=opts.maxDate.getMonth()),isArray(opts.yearRange)){var fallback=(new Date).getFullYear()-10;opts.yearRange[0]=parseInt(opts.yearRange[0],10)||fallback,opts.yearRange[1]=parseInt(opts.yearRange[1],10)||fallback}else opts.yearRange=Math.abs(parseInt(opts.yearRange,10))||defaults.yearRange,opts.yearRange>100&&(opts.yearRange=100);return opts},toString:function(format){return isDate(this._d)?hasMoment?moment(this._d).format(format||this._o.format):this._d.toDateString():""},getMoment:function(){return hasMoment?moment(this._d):null},setMoment:function(date,preventOnSelect){hasMoment&&moment.isMoment(date)&&this.setDate(date.toDate(),preventOnSelect)},getDate:function(){return isDate(this._d)?new Date(this._d.getTime()):null},setDate:function(date,preventOnSelect){if(!date)return this._d=null,this.draw();if("string"==typeof date&&(date=new Date(Date.parse(date))),isDate(date)){var min=this._o.minDate,max=this._o.maxDate;isDate(min)&&min>date?date=min:isDate(max)&&date>max&&(date=max),this._d=new Date(date.getTime()),setToStartOfDay(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),fireEvent(this._o.field,"change",{firedBy:this})),preventOnSelect||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(date){isDate(date)&&(this._y=date.getFullYear(),this._m=date.getMonth(),this.draw())},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(month){isNaN(month=parseInt(month,10))||(this._m=0>month?0:month>11?11:month,this.draw())},nextMonth:function(){++this._m>11&&(this._m=0,this._y++),this.draw()},prevMonth:function(){--this._m<0&&(this._m=11,this._y--),this.draw()},gotoYear:function(year){isNaN(year)||(this._y=parseInt(year,10),this.draw())},setMinDate:function(value){this._o.minDate=value},setMaxDate:function(value){this._o.maxDate=value},draw:function(force){if(this._v||force){var opts=this._o,minYear=opts.minYear,maxYear=opts.maxYear,minMonth=opts.minMonth,maxMonth=opts.maxMonth;if(this._y<=minYear&&(this._y=minYear,!isNaN(minMonth)&&this._m<minMonth&&(this._m=minMonth)),this._y>=maxYear&&(this._y=maxYear,!isNaN(maxMonth)&&this._m>maxMonth&&(this._m=maxMonth)),this.el.innerHTML=renderTitle(this)+this.render(this._y,this._m),opts.bound&&(this.adjustPosition(),"hidden"!==opts.field.type&&sto(function(){opts.trigger.focus()},1)),"function"==typeof this._o.onDraw){var self=this;sto(function(){self._o.onDraw.call(self)},0)}}},adjustPosition:function(){var left,top,clientRect,field=this._o.trigger,pEl=field,width=this.el.offsetWidth,height=this.el.offsetHeight,viewportWidth=window.innerWidth||document.documentElement.clientWidth,viewportHeight=window.innerHeight||document.documentElement.clientHeight,scrollTop=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop;if("function"==typeof field.getBoundingClientRect)clientRect=field.getBoundingClientRect(),left=clientRect.left+window.pageXOffset,top=clientRect.bottom+window.pageYOffset;else for(left=pEl.offsetLeft,top=pEl.offsetTop+pEl.offsetHeight;pEl=pEl.offsetParent;)left+=pEl.offsetLeft,top+=pEl.offsetTop;(left+width>viewportWidth||this._o.position.indexOf("right")>-1&&left-width+field.offsetWidth>0)&&(left=left-width+field.offsetWidth),(top+height>viewportHeight+scrollTop||this._o.position.indexOf("top")>-1&&top-height-field.offsetHeight>0)&&(top=top-height-field.offsetHeight),this.el.style.cssText=["position: absolute","left: "+left+"px","top: "+top+"px"].join(";")},render:function(year,month){var opts=this._o,now=new Date,days=getDaysInMonth(year,month),before=new Date(year,month,1).getDay(),data=[],row=[];setToStartOfDay(now),opts.firstDay>0&&(before-=opts.firstDay,0>before&&(before+=7));for(var cells=days+before,after=cells;after>7;)after-=7;cells+=7-after;for(var i=0,r=0;cells>i;i++){var day=new Date(year,month,1+(i-before)),isDisabled=opts.minDate&&day<opts.minDate||opts.maxDate&&day>opts.maxDate,isSelected=isDate(this._d)?compareDates(day,this._d):!1,isToday=compareDates(day,now),isEmpty=before>i||i>=days+before;row.push(renderDay(1+(i-before),isSelected,isToday,isDisabled,isEmpty)),7===++r&&(data.push(renderRow(row,opts.isRTL)),row=[],r=0)}return renderTable(opts,data)},isVisible:function(){return this._v},show:function(){this._v||(this._o.bound&&addEvent(document,"click",this._onClick),removeClass(this.el,"is-hidden"),this._v=!0,this.draw(),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var v=this._v;v!==!1&&(this._o.bound&&removeEvent(document,"click",this._onClick),this.el.style.cssText="",addClass(this.el,"is-hidden"),this._v=!1,void 0!==v&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),removeEvent(this.el,"mousedown",this._onMouseDown,!0),removeEvent(this.el,"change",this._onChange),this._o.field&&(removeEvent(this._o.field,"change",this._onInputChange),this._o.bound&&(removeEvent(this._o.trigger,"click",this._onInputClick),removeEvent(this._o.trigger,"focus",this._onInputFocus),removeEvent(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},Pikaday}),function($){$.color={},$.color.make=function(r,g,b,a){var o={};return o.r=r||0,o.g=g||0,o.b=b||0,o.a=null!=a?a:1,o.add=function(c,d){for(var i=0;i<c.length;++i)o[c.charAt(i)]+=d;return o.normalize()},o.scale=function(c,f){for(var i=0;i<c.length;++i)o[c.charAt(i)]*=f;return o.normalize()},o.toString=function(){return o.a>=1?"rgb("+[o.r,o.g,o.b].join(",")+")":"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"},o.normalize=function(){function clamp(min,value,max){return min>value?min:value>max?max:value}return o.r=clamp(0,parseInt(o.r),255),o.g=clamp(0,parseInt(o.g),255),o.b=clamp(0,parseInt(o.b),255),o.a=clamp(0,o.a,1),o},o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)},o.normalize()},$.color.extract=function(elem,css){var c;do{if(c=elem.css(css).toLowerCase(),""!=c&&"transparent"!=c)break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),"body"));return"rgba(0, 0, 0, 0)"==c&&(c="transparent"),$.color.parse(c)},$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))return m(2.55*parseFloat(res[1]),2.55*parseFloat(res[2]),2.55*parseFloat(res[3]));if(res=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(2.55*parseFloat(res[1]),2.55*parseFloat(res[2]),2.55*parseFloat(res[3]),parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();return"transparent"==name?m(255,255,255,0):(res=lookupColors[name]||[0,0,0],m(res[0],res[1],res[2]))};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],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],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}}(jQuery),function($){function Canvas(cls,container){var element=container.children("."+cls)[0];if(null==element&&(element=document.createElement("canvas"),element.className=cls,$(element).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(container),!element.getContext)){if(!window.G_vmlCanvasManager)throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");element=window.G_vmlCanvasManager.initElement(element)}this.element=element;var context=this.context=element.getContext("2d"),devicePixelRatio=window.devicePixelRatio||1,backingStoreRatio=context.webkitBackingStorePixelRatio||context.mozBackingStorePixelRatio||context.msBackingStorePixelRatio||context.oBackingStorePixelRatio||context.backingStorePixelRatio||1;this.pixelRatio=devicePixelRatio/backingStoreRatio,this.resize(container.width(),container.height()),this.textContainer=null,this.text={},this._textCache={}}function Plot(placeholder,data_,options_,plugins){function executeHooks(hook,args){args=[plot].concat(args);for(var i=0;i<hook.length;++i)hook[i].apply(this,args)}function initPlugins(){for(var classes={Canvas:Canvas},i=0;i<plugins.length;++i){var p=plugins[i];p.init(plot,classes),p.options&&$.extend(!0,options,p.options)}}function parseOptions(opts){$.extend(!0,options,opts),opts&&opts.colors&&(options.colors=opts.colors),null==options.xaxis.color&&(options.xaxis.color=$.color.parse(options.grid.color).scale("a",.22).toString()),null==options.yaxis.color&&(options.yaxis.color=$.color.parse(options.grid.color).scale("a",.22).toString()),null==options.xaxis.tickColor&&(options.xaxis.tickColor=options.grid.tickColor||options.xaxis.color),null==options.yaxis.tickColor&&(options.yaxis.tickColor=options.grid.tickColor||options.yaxis.color),null==options.grid.borderColor&&(options.grid.borderColor=options.grid.color),null==options.grid.tickColor&&(options.grid.tickColor=$.color.parse(options.grid.color).scale("a",.22).toString());var i,axisOptions,axisCount,fontSize=placeholder.css("font-size"),fontSizeDefault=fontSize?+fontSize.replace("px",""):13,fontDefaults={style:placeholder.css("font-style"),size:Math.round(.8*fontSizeDefault),variant:placeholder.css("font-variant"),weight:placeholder.css("font-weight"),family:placeholder.css("font-family")};for(axisCount=options.xaxes.length||1,i=0;axisCount>i;++i)axisOptions=options.xaxes[i],axisOptions&&!axisOptions.tickColor&&(axisOptions.tickColor=axisOptions.color),axisOptions=$.extend(!0,{},options.xaxis,axisOptions),options.xaxes[i]=axisOptions,axisOptions.font&&(axisOptions.font=$.extend({},fontDefaults,axisOptions.font),axisOptions.font.color||(axisOptions.font.color=axisOptions.color),axisOptions.font.lineHeight||(axisOptions.font.lineHeight=Math.round(1.15*axisOptions.font.size)));for(axisCount=options.yaxes.length||1,i=0;axisCount>i;++i)axisOptions=options.yaxes[i],axisOptions&&!axisOptions.tickColor&&(axisOptions.tickColor=axisOptions.color),axisOptions=$.extend(!0,{},options.yaxis,axisOptions),options.yaxes[i]=axisOptions,axisOptions.font&&(axisOptions.font=$.extend({},fontDefaults,axisOptions.font),axisOptions.font.color||(axisOptions.font.color=axisOptions.color),axisOptions.font.lineHeight||(axisOptions.font.lineHeight=Math.round(1.15*axisOptions.font.size)));for(options.xaxis.noTicks&&null==options.xaxis.ticks&&(options.xaxis.ticks=options.xaxis.noTicks),options.yaxis.noTicks&&null==options.yaxis.ticks&&(options.yaxis.ticks=options.yaxis.noTicks),options.x2axis&&(options.xaxes[1]=$.extend(!0,{},options.xaxis,options.x2axis),options.xaxes[1].position="top",null==options.x2axis.min&&(options.xaxes[1].min=null),null==options.x2axis.max&&(options.xaxes[1].max=null)),options.y2axis&&(options.yaxes[1]=$.extend(!0,{},options.yaxis,options.y2axis),options.yaxes[1].position="right",null==options.y2axis.min&&(options.yaxes[1].min=null),null==options.y2axis.max&&(options.yaxes[1].max=null)),options.grid.coloredAreas&&(options.grid.markings=options.grid.coloredAreas),options.grid.coloredAreasColor&&(options.grid.markingsColor=options.grid.coloredAreasColor),options.lines&&$.extend(!0,options.series.lines,options.lines),options.points&&$.extend(!0,options.series.points,options.points),options.bars&&$.extend(!0,options.series.bars,options.bars),null!=options.shadowSize&&(options.series.shadowSize=options.shadowSize),null!=options.highlightColor&&(options.series.highlightColor=options.highlightColor),i=0;i<options.xaxes.length;++i)getOrCreateAxis(xaxes,i+1).options=options.xaxes[i];for(i=0;i<options.yaxes.length;++i)getOrCreateAxis(yaxes,i+1).options=options.yaxes[i];for(var n in hooks)options.hooks[n]&&options.hooks[n].length&&(hooks[n]=hooks[n].concat(options.hooks[n]));executeHooks(hooks.processOptions,[options])}function setData(d){series=parseData(d),fillInSeriesOptions(),processData()}function parseData(d){for(var res=[],i=0;i<d.length;++i){var s=$.extend(!0,{},options.series);null!=d[i].data?(s.data=d[i].data,delete d[i].data,$.extend(!0,s,d[i]),d[i].data=s.data):s.data=d[i],res.push(s)}return res}function axisNumber(obj,coord){var a=obj[coord+"axis"];return"object"==typeof a&&(a=a.n),"number"!=typeof a&&(a=1),a}function allAxes(){return $.grep(xaxes.concat(yaxes),function(a){return a})}function canvasToAxisCoords(pos){var i,axis,res={};for(i=0;i<xaxes.length;++i)axis=xaxes[i],axis&&axis.used&&(res["x"+axis.n]=axis.c2p(pos.left));for(i=0;i<yaxes.length;++i)axis=yaxes[i],axis&&axis.used&&(res["y"+axis.n]=axis.c2p(pos.top));return void 0!==res.x1&&(res.x=res.x1),void 0!==res.y1&&(res.y=res.y1),res}function axisToCanvasCoords(pos){var i,axis,key,res={};for(i=0;i<xaxes.length;++i)if(axis=xaxes[i],axis&&axis.used&&(key="x"+axis.n,null==pos[key]&&1==axis.n&&(key="x"),null!=pos[key])){res.left=axis.p2c(pos[key]);break}for(i=0;i<yaxes.length;++i)if(axis=yaxes[i],axis&&axis.used&&(key="y"+axis.n,null==pos[key]&&1==axis.n&&(key="y"),null!=pos[key])){res.top=axis.p2c(pos[key]);break}return res}function getOrCreateAxis(axes,number){return axes[number-1]||(axes[number-1]={n:number,direction:axes==xaxes?"x":"y",options:$.extend(!0,{},axes==xaxes?options.xaxis:options.yaxis)}),axes[number-1]}function fillInSeriesOptions(){var i,neededColors=series.length,maxIndex=-1;for(i=0;i<series.length;++i){var sc=series[i].color;null!=sc&&(neededColors--,"number"==typeof sc&&sc>maxIndex&&(maxIndex=sc))}maxIndex>=neededColors&&(neededColors=maxIndex+1);var c,colors=[],colorPool=options.colors,colorPoolSize=colorPool.length,variation=0;for(i=0;neededColors>i;i++)c=$.color.parse(colorPool[i%colorPoolSize]||"#666"),i%colorPoolSize==0&&i&&(variation=variation>=0?.5>variation?-variation-.2:0:-variation),colors[i]=c.scale("rgb",1+variation);var s,colori=0;for(i=0;i<series.length;++i){if(s=series[i],null==s.color?(s.color=colors[colori].toString(),++colori):"number"==typeof s.color&&(s.color=colors[s.color].toString()),null==s.lines.show){var v,show=!0;for(v in s)if(s[v]&&s[v].show){show=!1;break}show&&(s.lines.show=!0)}null==s.lines.zero&&(s.lines.zero=!!s.lines.fill),s.xaxis=getOrCreateAxis(xaxes,axisNumber(s,"x")),s.yaxis=getOrCreateAxis(yaxes,axisNumber(s,"y"))}}function processData(){function updateAxis(axis,min,max){min<axis.datamin&&min!=-fakeInfinity&&(axis.datamin=min),max>axis.datamax&&max!=fakeInfinity&&(axis.datamax=max)}var i,j,k,m,s,points,ps,val,f,p,data,format,topSentry=Number.POSITIVE_INFINITY,bottomSentry=Number.NEGATIVE_INFINITY,fakeInfinity=Number.MAX_VALUE;for($.each(allAxes(),function(_,axis){axis.datamin=topSentry,axis.datamax=bottomSentry,axis.used=!1}),i=0;i<series.length;++i)s=series[i],s.datapoints={points:[]},executeHooks(hooks.processRawData,[s,s.data,s.datapoints]);for(i=0;i<series.length;++i){if(s=series[i],data=s.data,format=s.datapoints.format,!format){if(format=[],format.push({x:!0,number:!0,required:!0}),format.push({y:!0,number:!0,required:!0}),s.bars.show||s.lines.show&&s.lines.fill){var autoscale=!!(s.bars.show&&s.bars.zero||s.lines.show&&s.lines.zero);format.push({y:!0,number:!0,required:!1,defaultValue:0,autoscale:autoscale}),s.bars.horizontal&&(delete format[format.length-1].y,format[format.length-1].x=!0)}s.datapoints.format=format}if(null==s.datapoints.pointsize){s.datapoints.pointsize=format.length,ps=s.datapoints.pointsize,points=s.datapoints.points;var insertSteps=s.lines.show&&s.lines.steps;for(s.xaxis.used=s.yaxis.used=!0,j=k=0;j<data.length;++j,k+=ps){p=data[j];var nullify=null==p;if(!nullify)for(m=0;ps>m;++m)val=p[m],f=format[m],f&&(f.number&&null!=val&&(val=+val,isNaN(val)?val=null:1/0==val?val=fakeInfinity:val==-1/0&&(val=-fakeInfinity)),null==val&&(f.required&&(nullify=!0),null!=f.defaultValue&&(val=f.defaultValue))),points[k+m]=val;if(nullify)for(m=0;ps>m;++m)val=points[k+m],null!=val&&(f=format[m],f.autoscale!==!1&&(f.x&&updateAxis(s.xaxis,val,val),f.y&&updateAxis(s.yaxis,val,val))),points[k+m]=null;else if(insertSteps&&k>0&&null!=points[k-ps]&&points[k-ps]!=points[k]&&points[k-ps+1]!=points[k+1]){for(m=0;ps>m;++m)points[k+ps+m]=points[k+m];points[k+1]=points[k-ps+1],k+=ps}}}}for(i=0;i<series.length;++i)s=series[i],executeHooks(hooks.processDatapoints,[s,s.datapoints]);for(i=0;i<series.length;++i){s=series[i],points=s.datapoints.points,ps=s.datapoints.pointsize,format=s.datapoints.format;var xmin=topSentry,ymin=topSentry,xmax=bottomSentry,ymax=bottomSentry;for(j=0;j<points.length;j+=ps)if(null!=points[j])for(m=0;ps>m;++m)val=points[j+m],f=format[m],f&&f.autoscale!==!1&&val!=fakeInfinity&&val!=-fakeInfinity&&(f.x&&(xmin>val&&(xmin=val),val>xmax&&(xmax=val)),f.y&&(ymin>val&&(ymin=val),val>ymax&&(ymax=val)));if(s.bars.show){var delta;switch(s.bars.align){case"left":delta=0;break;case"right":delta=-s.bars.barWidth;break;default:delta=-s.bars.barWidth/2}s.bars.horizontal?(ymin+=delta,ymax+=delta+s.bars.barWidth):(xmin+=delta,xmax+=delta+s.bars.barWidth)}updateAxis(s.xaxis,xmin,xmax),updateAxis(s.yaxis,ymin,ymax)}$.each(allAxes(),function(_,axis){axis.datamin==topSentry&&(axis.datamin=null),axis.datamax==bottomSentry&&(axis.datamax=null)})}function setupCanvases(){placeholder.css("padding",0).children().filter(function(){return!$(this).hasClass("flot-overlay")&&!$(this).hasClass("flot-base")}).remove(),"static"==placeholder.css("position")&&placeholder.css("position","relative"),surface=new Canvas("flot-base",placeholder),overlay=new Canvas("flot-overlay",placeholder),ctx=surface.context,octx=overlay.context,eventHolder=$(overlay.element).unbind();var existing=placeholder.data("plot");existing&&(existing.shutdown(),overlay.clear()),placeholder.data("plot",plot)}function bindEvents(){options.grid.hoverable&&(eventHolder.mousemove(onMouseMove),eventHolder.bind("mouseleave",onMouseLeave)),options.grid.clickable&&eventHolder.click(onClick),executeHooks(hooks.bindEvents,[eventHolder])
}function shutdown(){redrawTimeout&&clearTimeout(redrawTimeout),eventHolder.unbind("mousemove",onMouseMove),eventHolder.unbind("mouseleave",onMouseLeave),eventHolder.unbind("click",onClick),executeHooks(hooks.shutdown,[eventHolder])}function setTransformationHelpers(axis){function identity(x){return x}var s,m,t=axis.options.transform||identity,it=axis.options.inverseTransform;"x"==axis.direction?(s=axis.scale=plotWidth/Math.abs(t(axis.max)-t(axis.min)),m=Math.min(t(axis.max),t(axis.min))):(s=axis.scale=plotHeight/Math.abs(t(axis.max)-t(axis.min)),s=-s,m=Math.max(t(axis.max),t(axis.min))),axis.p2c=t==identity?function(p){return(p-m)*s}:function(p){return(t(p)-m)*s},axis.c2p=it?function(c){return it(m+c/s)}:function(c){return m+c/s}}function measureTickLabels(axis){for(var opts=axis.options,ticks=axis.ticks||[],labelWidth=opts.labelWidth||0,labelHeight=opts.labelHeight||0,maxWidth=labelWidth||("x"==axis.direction?Math.floor(surface.width/(ticks.length||1)):null),legacyStyles=axis.direction+"Axis "+axis.direction+axis.n+"Axis",layer="flot-"+axis.direction+"-axis flot-"+axis.direction+axis.n+"-axis "+legacyStyles,font=opts.font||"flot-tick-label tickLabel",i=0;i<ticks.length;++i){var t=ticks[i];if(t.label){var info=surface.getTextInfo(layer,t.label,font,null,maxWidth);labelWidth=Math.max(labelWidth,info.width),labelHeight=Math.max(labelHeight,info.height)}}axis.labelWidth=opts.labelWidth||labelWidth,axis.labelHeight=opts.labelHeight||labelHeight}function allocateAxisBoxFirstPhase(axis){var lw=axis.labelWidth,lh=axis.labelHeight,pos=axis.options.position,isXAxis="x"===axis.direction,tickLength=axis.options.tickLength,axisMargin=options.grid.axisMargin,padding=options.grid.labelMargin,innermost=!0,outermost=!0,first=!0,found=!1;$.each(isXAxis?xaxes:yaxes,function(i,a){a&&(a.show||a.reserveSpace)&&(a===axis?found=!0:a.options.position===pos&&(found?outermost=!1:innermost=!1),found||(first=!1))}),outermost&&(axisMargin=0),null==tickLength&&(tickLength=first?"full":5),isNaN(+tickLength)||(padding+=+tickLength),isXAxis?(lh+=padding,"bottom"==pos?(plotOffset.bottom+=lh+axisMargin,axis.box={top:surface.height-plotOffset.bottom,height:lh}):(axis.box={top:plotOffset.top+axisMargin,height:lh},plotOffset.top+=lh+axisMargin)):(lw+=padding,"left"==pos?(axis.box={left:plotOffset.left+axisMargin,width:lw},plotOffset.left+=lw+axisMargin):(plotOffset.right+=lw+axisMargin,axis.box={left:surface.width-plotOffset.right,width:lw})),axis.position=pos,axis.tickLength=tickLength,axis.box.padding=padding,axis.innermost=innermost}function allocateAxisBoxSecondPhase(axis){"x"==axis.direction?(axis.box.left=plotOffset.left-axis.labelWidth/2,axis.box.width=surface.width-plotOffset.left-plotOffset.right+axis.labelWidth):(axis.box.top=plotOffset.top-axis.labelHeight/2,axis.box.height=surface.height-plotOffset.bottom-plotOffset.top+axis.labelHeight)}function adjustLayoutForThingsStickingOut(){var i,minMargin=options.grid.minBorderMargin;if(null==minMargin)for(minMargin=0,i=0;i<series.length;++i)minMargin=Math.max(minMargin,2*(series[i].points.radius+series[i].points.lineWidth/2));var margins={left:minMargin,right:minMargin,top:minMargin,bottom:minMargin};$.each(allAxes(),function(_,axis){axis.reserveSpace&&axis.ticks&&axis.ticks.length&&("x"===axis.direction?(margins.left=Math.max(margins.left,axis.labelWidth/2),margins.right=Math.max(margins.right,axis.labelWidth/2)):(margins.bottom=Math.max(margins.bottom,axis.labelHeight/2),margins.top=Math.max(margins.top,axis.labelHeight/2)))}),plotOffset.left=Math.ceil(Math.max(margins.left,plotOffset.left)),plotOffset.right=Math.ceil(Math.max(margins.right,plotOffset.right)),plotOffset.top=Math.ceil(Math.max(margins.top,plotOffset.top)),plotOffset.bottom=Math.ceil(Math.max(margins.bottom,plotOffset.bottom))}function setupGrid(){var i,axes=allAxes(),showGrid=options.grid.show;for(var a in plotOffset){var margin=options.grid.margin||0;plotOffset[a]="number"==typeof margin?margin:margin[a]||0}executeHooks(hooks.processOffset,[plotOffset]);for(var a in plotOffset)plotOffset[a]+="object"==typeof options.grid.borderWidth?showGrid?options.grid.borderWidth[a]:0:showGrid?options.grid.borderWidth:0;if($.each(axes,function(_,axis){var axisOpts=axis.options;axis.show=null==axisOpts.show?axis.used:axisOpts.show,axis.reserveSpace=null==axisOpts.reserveSpace?axis.show:axisOpts.reserveSpace,setRange(axis)}),showGrid){var allocatedAxes=$.grep(axes,function(axis){return axis.show||axis.reserveSpace});for($.each(allocatedAxes,function(_,axis){setupTickGeneration(axis),setTicks(axis),snapRangeToTicks(axis,axis.ticks),measureTickLabels(axis)}),i=allocatedAxes.length-1;i>=0;--i)allocateAxisBoxFirstPhase(allocatedAxes[i]);adjustLayoutForThingsStickingOut(),$.each(allocatedAxes,function(_,axis){allocateAxisBoxSecondPhase(axis)})}plotWidth=surface.width-plotOffset.left-plotOffset.right,plotHeight=surface.height-plotOffset.bottom-plotOffset.top,$.each(axes,function(_,axis){setTransformationHelpers(axis)}),showGrid&&drawAxisLabels(),insertLegend()}function setRange(axis){var opts=axis.options,min=+(null!=opts.min?opts.min:axis.datamin),max=+(null!=opts.max?opts.max:axis.datamax),delta=max-min;if(0==delta){var widen=0==max?1:.01;null==opts.min&&(min-=widen),(null==opts.max||null!=opts.min)&&(max+=widen)}else{var margin=opts.autoscaleMargin;null!=margin&&(null==opts.min&&(min-=delta*margin,0>min&&null!=axis.datamin&&axis.datamin>=0&&(min=0)),null==opts.max&&(max+=delta*margin,max>0&&null!=axis.datamax&&axis.datamax<=0&&(max=0)))}axis.min=min,axis.max=max}function setupTickGeneration(axis){var noTicks,opts=axis.options;noTicks="number"==typeof opts.ticks&&opts.ticks>0?opts.ticks:.3*Math.sqrt("x"==axis.direction?surface.width:surface.height);var delta=(axis.max-axis.min)/noTicks,dec=-Math.floor(Math.log(delta)/Math.LN10),maxDec=opts.tickDecimals;null!=maxDec&&dec>maxDec&&(dec=maxDec);var size,magn=Math.pow(10,-dec),norm=delta/magn;if(1.5>norm?size=1:3>norm?(size=2,norm>2.25&&(null==maxDec||maxDec>=dec+1)&&(size=2.5,++dec)):size=7.5>norm?5:10,size*=magn,null!=opts.minTickSize&&size<opts.minTickSize&&(size=opts.minTickSize),axis.delta=delta,axis.tickDecimals=Math.max(0,null!=maxDec?maxDec:dec),axis.tickSize=opts.tickSize||size,"time"==opts.mode&&!axis.tickGenerator)throw new Error("Time mode requires the flot.time plugin.");if(axis.tickGenerator||(axis.tickGenerator=function(axis){var prev,ticks=[],start=floorInBase(axis.min,axis.tickSize),i=0,v=Number.NaN;do prev=v,v=start+i*axis.tickSize,ticks.push(v),++i;while(v<axis.max&&v!=prev);return ticks},axis.tickFormatter=function(value,axis){var factor=axis.tickDecimals?Math.pow(10,axis.tickDecimals):1,formatted=""+Math.round(value*factor)/factor;if(null!=axis.tickDecimals){var decimal=formatted.indexOf("."),precision=-1==decimal?0:formatted.length-decimal-1;if(precision<axis.tickDecimals)return(precision?formatted:formatted+".")+(""+factor).substr(1,axis.tickDecimals-precision)}return formatted}),$.isFunction(opts.tickFormatter)&&(axis.tickFormatter=function(v,axis){return""+opts.tickFormatter(v,axis)}),null!=opts.alignTicksWithAxis){var otherAxis=("x"==axis.direction?xaxes:yaxes)[opts.alignTicksWithAxis-1];if(otherAxis&&otherAxis.used&&otherAxis!=axis){var niceTicks=axis.tickGenerator(axis);if(niceTicks.length>0&&(null==opts.min&&(axis.min=Math.min(axis.min,niceTicks[0])),null==opts.max&&niceTicks.length>1&&(axis.max=Math.max(axis.max,niceTicks[niceTicks.length-1]))),axis.tickGenerator=function(axis){var v,i,ticks=[];for(i=0;i<otherAxis.ticks.length;++i)v=(otherAxis.ticks[i].v-otherAxis.min)/(otherAxis.max-otherAxis.min),v=axis.min+v*(axis.max-axis.min),ticks.push(v);return ticks},!axis.mode&&null==opts.tickDecimals){var extraDec=Math.max(0,-Math.floor(Math.log(axis.delta)/Math.LN10)+1),ts=axis.tickGenerator(axis);ts.length>1&&/\..*0$/.test((ts[1]-ts[0]).toFixed(extraDec))||(axis.tickDecimals=extraDec)}}}}function setTicks(axis){var oticks=axis.options.ticks,ticks=[];null==oticks||"number"==typeof oticks&&oticks>0?ticks=axis.tickGenerator(axis):oticks&&(ticks=$.isFunction(oticks)?oticks(axis):oticks);var i,v;for(axis.ticks=[],i=0;i<ticks.length;++i){var label=null,t=ticks[i];"object"==typeof t?(v=+t[0],t.length>1&&(label=t[1])):v=+t,null==label&&(label=axis.tickFormatter(v,axis)),isNaN(v)||axis.ticks.push({v:v,label:label})}}function snapRangeToTicks(axis,ticks){axis.options.autoscaleMargin&&ticks.length>0&&(null==axis.options.min&&(axis.min=Math.min(axis.min,ticks[0].v)),null==axis.options.max&&ticks.length>1&&(axis.max=Math.max(axis.max,ticks[ticks.length-1].v)))}function draw(){surface.clear(),executeHooks(hooks.drawBackground,[ctx]);var grid=options.grid;grid.show&&grid.backgroundColor&&drawBackground(),grid.show&&!grid.aboveData&&drawGrid();for(var i=0;i<series.length;++i)executeHooks(hooks.drawSeries,[ctx,series[i]]),drawSeries(series[i]);executeHooks(hooks.draw,[ctx]),grid.show&&grid.aboveData&&drawGrid(),surface.render(),triggerRedrawOverlay()}function extractRange(ranges,coord){for(var axis,from,to,key,axes=allAxes(),i=0;i<axes.length;++i)if(axis=axes[i],axis.direction==coord&&(key=coord+axis.n+"axis",ranges[key]||1!=axis.n||(key=coord+"axis"),ranges[key])){from=ranges[key].from,to=ranges[key].to;break}if(ranges[key]||(axis="x"==coord?xaxes[0]:yaxes[0],from=ranges[coord+"1"],to=ranges[coord+"2"]),null!=from&&null!=to&&from>to){var tmp=from;from=to,to=tmp}return{from:from,to:to,axis:axis}}function drawBackground(){ctx.save(),ctx.translate(plotOffset.left,plotOffset.top),ctx.fillStyle=getColorOrGradient(options.grid.backgroundColor,plotHeight,0,"rgba(255, 255, 255, 0)"),ctx.fillRect(0,0,plotWidth,plotHeight),ctx.restore()}function drawGrid(){var i,axes,bw,bc;ctx.save(),ctx.translate(plotOffset.left,plotOffset.top);var markings=options.grid.markings;if(markings)for($.isFunction(markings)&&(axes=plot.getAxes(),axes.xmin=axes.xaxis.min,axes.xmax=axes.xaxis.max,axes.ymin=axes.yaxis.min,axes.ymax=axes.yaxis.max,markings=markings(axes)),i=0;i<markings.length;++i){var m=markings[i],xrange=extractRange(m,"x"),yrange=extractRange(m,"y");if(null==xrange.from&&(xrange.from=xrange.axis.min),null==xrange.to&&(xrange.to=xrange.axis.max),null==yrange.from&&(yrange.from=yrange.axis.min),null==yrange.to&&(yrange.to=yrange.axis.max),!(xrange.to<xrange.axis.min||xrange.from>xrange.axis.max||yrange.to<yrange.axis.min||yrange.from>yrange.axis.max)){xrange.from=Math.max(xrange.from,xrange.axis.min),xrange.to=Math.min(xrange.to,xrange.axis.max),yrange.from=Math.max(yrange.from,yrange.axis.min),yrange.to=Math.min(yrange.to,yrange.axis.max);var xequal=xrange.from===xrange.to,yequal=yrange.from===yrange.to;if(!xequal||!yequal)if(xrange.from=Math.floor(xrange.axis.p2c(xrange.from)),xrange.to=Math.floor(xrange.axis.p2c(xrange.to)),yrange.from=Math.floor(yrange.axis.p2c(yrange.from)),yrange.to=Math.floor(yrange.axis.p2c(yrange.to)),xequal||yequal){var lineWidth=m.lineWidth||options.grid.markingsLineWidth,subPixel=lineWidth%2?.5:0;ctx.beginPath(),ctx.strokeStyle=m.color||options.grid.markingsColor,ctx.lineWidth=lineWidth,xequal?(ctx.moveTo(xrange.to+subPixel,yrange.from),ctx.lineTo(xrange.to+subPixel,yrange.to)):(ctx.moveTo(xrange.from,yrange.to+subPixel),ctx.lineTo(xrange.to,yrange.to+subPixel)),ctx.stroke()}else ctx.fillStyle=m.color||options.grid.markingsColor,ctx.fillRect(xrange.from,yrange.to,xrange.to-xrange.from,yrange.from-yrange.to)}}axes=allAxes(),bw=options.grid.borderWidth;for(var j=0;j<axes.length;++j){var x,y,xoff,yoff,axis=axes[j],box=axis.box,t=axis.tickLength;if(axis.show&&0!=axis.ticks.length){for(ctx.lineWidth=1,"x"==axis.direction?(x=0,y="full"==t?"top"==axis.position?0:plotHeight:box.top-plotOffset.top+("top"==axis.position?box.height:0)):(y=0,x="full"==t?"left"==axis.position?0:plotWidth:box.left-plotOffset.left+("left"==axis.position?box.width:0)),axis.innermost||(ctx.strokeStyle=axis.options.color,ctx.beginPath(),xoff=yoff=0,"x"==axis.direction?xoff=plotWidth+1:yoff=plotHeight+1,1==ctx.lineWidth&&("x"==axis.direction?y=Math.floor(y)+.5:x=Math.floor(x)+.5),ctx.moveTo(x,y),ctx.lineTo(x+xoff,y+yoff),ctx.stroke()),ctx.strokeStyle=axis.options.tickColor,ctx.beginPath(),i=0;i<axis.ticks.length;++i){var v=axis.ticks[i].v;xoff=yoff=0,isNaN(v)||v<axis.min||v>axis.max||"full"==t&&("object"==typeof bw&&bw[axis.position]>0||bw>0)&&(v==axis.min||v==axis.max)||("x"==axis.direction?(x=axis.p2c(v),yoff="full"==t?-plotHeight:t,"top"==axis.position&&(yoff=-yoff)):(y=axis.p2c(v),xoff="full"==t?-plotWidth:t,"left"==axis.position&&(xoff=-xoff)),1==ctx.lineWidth&&("x"==axis.direction?x=Math.floor(x)+.5:y=Math.floor(y)+.5),ctx.moveTo(x,y),ctx.lineTo(x+xoff,y+yoff))}ctx.stroke()}}bw&&(bc=options.grid.borderColor,"object"==typeof bw||"object"==typeof bc?("object"!=typeof bw&&(bw={top:bw,right:bw,bottom:bw,left:bw}),"object"!=typeof bc&&(bc={top:bc,right:bc,bottom:bc,left:bc}),bw.top>0&&(ctx.strokeStyle=bc.top,ctx.lineWidth=bw.top,ctx.beginPath(),ctx.moveTo(0-bw.left,0-bw.top/2),ctx.lineTo(plotWidth,0-bw.top/2),ctx.stroke()),bw.right>0&&(ctx.strokeStyle=bc.right,ctx.lineWidth=bw.right,ctx.beginPath(),ctx.moveTo(plotWidth+bw.right/2,0-bw.top),ctx.lineTo(plotWidth+bw.right/2,plotHeight),ctx.stroke()),bw.bottom>0&&(ctx.strokeStyle=bc.bottom,ctx.lineWidth=bw.bottom,ctx.beginPath(),ctx.moveTo(plotWidth+bw.right,plotHeight+bw.bottom/2),ctx.lineTo(0,plotHeight+bw.bottom/2),ctx.stroke()),bw.left>0&&(ctx.strokeStyle=bc.left,ctx.lineWidth=bw.left,ctx.beginPath(),ctx.moveTo(0-bw.left/2,plotHeight+bw.bottom),ctx.lineTo(0-bw.left/2,0),ctx.stroke())):(ctx.lineWidth=bw,ctx.strokeStyle=options.grid.borderColor,ctx.strokeRect(-bw/2,-bw/2,plotWidth+bw,plotHeight+bw))),ctx.restore()}function drawAxisLabels(){$.each(allAxes(),function(_,axis){var tick,x,y,halign,valign,box=axis.box,legacyStyles=axis.direction+"Axis "+axis.direction+axis.n+"Axis",layer="flot-"+axis.direction+"-axis flot-"+axis.direction+axis.n+"-axis "+legacyStyles,font=axis.options.font||"flot-tick-label tickLabel";if(surface.removeText(layer),axis.show&&0!=axis.ticks.length)for(var i=0;i<axis.ticks.length;++i)tick=axis.ticks[i],!tick.label||tick.v<axis.min||tick.v>axis.max||("x"==axis.direction?(halign="center",x=plotOffset.left+axis.p2c(tick.v),"bottom"==axis.position?y=box.top+box.padding:(y=box.top+box.height-box.padding,valign="bottom")):(valign="middle",y=plotOffset.top+axis.p2c(tick.v),"left"==axis.position?(x=box.left+box.width-box.padding,halign="right"):x=box.left+box.padding),surface.addText(layer,x,y,tick.label,font,null,null,halign,valign))})}function drawSeries(series){series.lines.show&&drawSeriesLines(series),series.bars.show&&drawSeriesBars(series),series.points.show&&drawSeriesPoints(series)}function drawSeriesLines(series){function plotLine(datapoints,xoffset,yoffset,axisx,axisy){var points=datapoints.points,ps=datapoints.pointsize,prevx=null,prevy=null;ctx.beginPath();for(var i=ps;i<points.length;i+=ps){var x1=points[i-ps],y1=points[i-ps+1],x2=points[i],y2=points[i+1];if(null!=x1&&null!=x2){if(y2>=y1&&y1<axisy.min){if(y2<axisy.min)continue;x1=(axisy.min-y1)/(y2-y1)*(x2-x1)+x1,y1=axisy.min}else if(y1>=y2&&y2<axisy.min){if(y1<axisy.min)continue;x2=(axisy.min-y1)/(y2-y1)*(x2-x1)+x1,y2=axisy.min}if(y1>=y2&&y1>axisy.max){if(y2>axisy.max)continue;x1=(axisy.max-y1)/(y2-y1)*(x2-x1)+x1,y1=axisy.max}else if(y2>=y1&&y2>axisy.max){if(y1>axisy.max)continue;x2=(axisy.max-y1)/(y2-y1)*(x2-x1)+x1,y2=axisy.max}if(x2>=x1&&x1<axisx.min){if(x2<axisx.min)continue;y1=(axisx.min-x1)/(x2-x1)*(y2-y1)+y1,x1=axisx.min}else if(x1>=x2&&x2<axisx.min){if(x1<axisx.min)continue;y2=(axisx.min-x1)/(x2-x1)*(y2-y1)+y1,x2=axisx.min}if(x1>=x2&&x1>axisx.max){if(x2>axisx.max)continue;y1=(axisx.max-x1)/(x2-x1)*(y2-y1)+y1,x1=axisx.max}else if(x2>=x1&&x2>axisx.max){if(x1>axisx.max)continue;y2=(axisx.max-x1)/(x2-x1)*(y2-y1)+y1,x2=axisx.max}(x1!=prevx||y1!=prevy)&&ctx.moveTo(axisx.p2c(x1)+xoffset,axisy.p2c(y1)+yoffset),prevx=x2,prevy=y2,ctx.lineTo(axisx.p2c(x2)+xoffset,axisy.p2c(y2)+yoffset)}}ctx.stroke()}function plotLineArea(datapoints,axisx,axisy){for(var points=datapoints.points,ps=datapoints.pointsize,bottom=Math.min(Math.max(0,axisy.min),axisy.max),i=0,areaOpen=!1,ypos=1,segmentStart=0,segmentEnd=0;;){if(ps>0&&i>points.length+ps)break;i+=ps;var x1=points[i-ps],y1=points[i-ps+ypos],x2=points[i],y2=points[i+ypos];if(areaOpen){if(ps>0&&null!=x1&&null==x2){segmentEnd=i,ps=-ps,ypos=2;continue}if(0>ps&&i==segmentStart+ps){ctx.fill(),areaOpen=!1,ps=-ps,ypos=1,i=segmentStart=segmentEnd+ps;continue}}if(null!=x1&&null!=x2){if(x2>=x1&&x1<axisx.min){if(x2<axisx.min)continue;y1=(axisx.min-x1)/(x2-x1)*(y2-y1)+y1,x1=axisx.min}else if(x1>=x2&&x2<axisx.min){if(x1<axisx.min)continue;y2=(axisx.min-x1)/(x2-x1)*(y2-y1)+y1,x2=axisx.min}if(x1>=x2&&x1>axisx.max){if(x2>axisx.max)continue;y1=(axisx.max-x1)/(x2-x1)*(y2-y1)+y1,x1=axisx.max}else if(x2>=x1&&x2>axisx.max){if(x1>axisx.max)continue;y2=(axisx.max-x1)/(x2-x1)*(y2-y1)+y1,x2=axisx.max}if(areaOpen||(ctx.beginPath(),ctx.moveTo(axisx.p2c(x1),axisy.p2c(bottom)),areaOpen=!0),y1>=axisy.max&&y2>=axisy.max)ctx.lineTo(axisx.p2c(x1),axisy.p2c(axisy.max)),ctx.lineTo(axisx.p2c(x2),axisy.p2c(axisy.max));else if(y1<=axisy.min&&y2<=axisy.min)ctx.lineTo(axisx.p2c(x1),axisy.p2c(axisy.min)),ctx.lineTo(axisx.p2c(x2),axisy.p2c(axisy.min));else{var x1old=x1,x2old=x2;y2>=y1&&y1<axisy.min&&y2>=axisy.min?(x1=(axisy.min-y1)/(y2-y1)*(x2-x1)+x1,y1=axisy.min):y1>=y2&&y2<axisy.min&&y1>=axisy.min&&(x2=(axisy.min-y1)/(y2-y1)*(x2-x1)+x1,y2=axisy.min),y1>=y2&&y1>axisy.max&&y2<=axisy.max?(x1=(axisy.max-y1)/(y2-y1)*(x2-x1)+x1,y1=axisy.max):y2>=y1&&y2>axisy.max&&y1<=axisy.max&&(x2=(axisy.max-y1)/(y2-y1)*(x2-x1)+x1,y2=axisy.max),x1!=x1old&&ctx.lineTo(axisx.p2c(x1old),axisy.p2c(y1)),ctx.lineTo(axisx.p2c(x1),axisy.p2c(y1)),ctx.lineTo(axisx.p2c(x2),axisy.p2c(y2)),x2!=x2old&&(ctx.lineTo(axisx.p2c(x2),axisy.p2c(y2)),ctx.lineTo(axisx.p2c(x2old),axisy.p2c(y2)))}}}}ctx.save(),ctx.translate(plotOffset.left,plotOffset.top),ctx.lineJoin="round";var lw=series.lines.lineWidth,sw=series.shadowSize;if(lw>0&&sw>0){ctx.lineWidth=sw,ctx.strokeStyle="rgba(0,0,0,0.1)";var angle=Math.PI/18;plotLine(series.datapoints,Math.sin(angle)*(lw/2+sw/2),Math.cos(angle)*(lw/2+sw/2),series.xaxis,series.yaxis),ctx.lineWidth=sw/2,plotLine(series.datapoints,Math.sin(angle)*(lw/2+sw/4),Math.cos(angle)*(lw/2+sw/4),series.xaxis,series.yaxis)}ctx.lineWidth=lw,ctx.strokeStyle=series.color;var fillStyle=getFillStyle(series.lines,series.color,0,plotHeight);fillStyle&&(ctx.fillStyle=fillStyle,plotLineArea(series.datapoints,series.xaxis,series.yaxis)),lw>0&&plotLine(series.datapoints,0,0,series.xaxis,series.yaxis),ctx.restore()}function drawSeriesPoints(series){function plotPoints(datapoints,radius,fillStyle,offset,shadow,axisx,axisy,symbol){for(var points=datapoints.points,ps=datapoints.pointsize,i=0;i<points.length;i+=ps){var x=points[i],y=points[i+1];null==x||x<axisx.min||x>axisx.max||y<axisy.min||y>axisy.max||(ctx.beginPath(),x=axisx.p2c(x),y=axisy.p2c(y)+offset,"circle"==symbol?ctx.arc(x,y,radius,0,shadow?Math.PI:2*Math.PI,!1):symbol(ctx,x,y,radius,shadow),ctx.closePath(),fillStyle&&(ctx.fillStyle=fillStyle,ctx.fill()),ctx.stroke())}}ctx.save(),ctx.translate(plotOffset.left,plotOffset.top);var lw=series.points.lineWidth,sw=series.shadowSize,radius=series.points.radius,symbol=series.points.symbol;if(0==lw&&(lw=1e-4),lw>0&&sw>0){var w=sw/2;ctx.lineWidth=w,ctx.strokeStyle="rgba(0,0,0,0.1)",plotPoints(series.datapoints,radius,null,w+w/2,!0,series.xaxis,series.yaxis,symbol),ctx.strokeStyle="rgba(0,0,0,0.2)",plotPoints(series.datapoints,radius,null,w/2,!0,series.xaxis,series.yaxis,symbol)}ctx.lineWidth=lw,ctx.strokeStyle=series.color,plotPoints(series.datapoints,radius,getFillStyle(series.points,series.color),0,!1,series.xaxis,series.yaxis,symbol),ctx.restore()}function drawBar(x,y,b,barLeft,barRight,fillStyleCallback,axisx,axisy,c,horizontal,lineWidth){var left,right,bottom,top,drawLeft,drawRight,drawTop,drawBottom,tmp;horizontal?(drawBottom=drawRight=drawTop=!0,drawLeft=!1,left=b,right=x,top=y+barLeft,bottom=y+barRight,left>right&&(tmp=right,right=left,left=tmp,drawLeft=!0,drawRight=!1)):(drawLeft=drawRight=drawTop=!0,drawBottom=!1,left=x+barLeft,right=x+barRight,bottom=b,top=y,bottom>top&&(tmp=top,top=bottom,bottom=tmp,drawBottom=!0,drawTop=!1)),right<axisx.min||left>axisx.max||top<axisy.min||bottom>axisy.max||(left<axisx.min&&(left=axisx.min,drawLeft=!1),right>axisx.max&&(right=axisx.max,drawRight=!1),bottom<axisy.min&&(bottom=axisy.min,drawBottom=!1),top>axisy.max&&(top=axisy.max,drawTop=!1),left=axisx.p2c(left),bottom=axisy.p2c(bottom),right=axisx.p2c(right),top=axisy.p2c(top),fillStyleCallback&&(c.fillStyle=fillStyleCallback(bottom,top),c.fillRect(left,top,right-left,bottom-top)),lineWidth>0&&(drawLeft||drawRight||drawTop||drawBottom)&&(c.beginPath(),c.moveTo(left,bottom),drawLeft?c.lineTo(left,top):c.moveTo(left,top),drawTop?c.lineTo(right,top):c.moveTo(right,top),drawRight?c.lineTo(right,bottom):c.moveTo(right,bottom),drawBottom?c.lineTo(left,bottom):c.moveTo(left,bottom),c.stroke()))}function drawSeriesBars(series){function plotBars(datapoints,barLeft,barRight,fillStyleCallback,axisx,axisy){for(var points=datapoints.points,ps=datapoints.pointsize,i=0;i<points.length;i+=ps)null!=points[i]&&drawBar(points[i],points[i+1],points[i+2],barLeft,barRight,fillStyleCallback,axisx,axisy,ctx,series.bars.horizontal,series.bars.lineWidth)}ctx.save(),ctx.translate(plotOffset.left,plotOffset.top),ctx.lineWidth=series.bars.lineWidth,ctx.strokeStyle=series.color;var barLeft;switch(series.bars.align){case"left":barLeft=0;break;case"right":barLeft=-series.bars.barWidth;break;default:barLeft=-series.bars.barWidth/2}var fillStyleCallback=series.bars.fill?function(bottom,top){return getFillStyle(series.bars,series.color,bottom,top)}:null;plotBars(series.datapoints,barLeft,barLeft+series.bars.barWidth,fillStyleCallback,series.xaxis,series.yaxis),ctx.restore()}function getFillStyle(filloptions,seriesColor,bottom,top){var fill=filloptions.fill;if(!fill)return null;if(filloptions.fillColor)return getColorOrGradient(filloptions.fillColor,bottom,top,seriesColor);var c=$.color.parse(seriesColor);return c.a="number"==typeof fill?fill:.4,c.normalize(),c.toString()}function insertLegend(){if(null!=options.legend.container?$(options.legend.container).html(""):placeholder.find(".legend").remove(),options.legend.show){for(var s,label,fragments=[],entries=[],rowStarted=!1,lf=options.legend.labelFormatter,i=0;i<series.length;++i)s=series[i],s.label&&(label=lf?lf(s.label,s):s.label,label&&entries.push({label:label,color:s.color}));if(options.legend.sorted)if($.isFunction(options.legend.sorted))entries.sort(options.legend.sorted);else if("reverse"==options.legend.sorted)entries.reverse();else{var ascending="descending"!=options.legend.sorted;entries.sort(function(a,b){return a.label==b.label?0:a.label<b.label!=ascending?1:-1})}for(var i=0;i<entries.length;++i){var entry=entries[i];i%options.legend.noColumns==0&&(rowStarted&&fragments.push("</tr>"),fragments.push("<tr>"),rowStarted=!0),fragments.push('<td class="legendColorBox"><div style="border:1px solid '+options.legend.labelBoxBorderColor+';padding:1px"><div style="width:4px;height:0;border:5px solid '+entry.color+';overflow:hidden"></div></div></td><td class="legendLabel">'+entry.label+"</td>")}if(rowStarted&&fragments.push("</tr>"),0!=fragments.length){var table='<table style="font-size:smaller;color:'+options.grid.color+'">'+fragments.join("")+"</table>";if(null!=options.legend.container)$(options.legend.container).html(table);else{var pos="",p=options.legend.position,m=options.legend.margin;null==m[0]&&(m=[m,m]),"n"==p.charAt(0)?pos+="top:"+(m[1]+plotOffset.top)+"px;":"s"==p.charAt(0)&&(pos+="bottom:"+(m[1]+plotOffset.bottom)+"px;"),"e"==p.charAt(1)?pos+="right:"+(m[0]+plotOffset.right)+"px;":"w"==p.charAt(1)&&(pos+="left:"+(m[0]+plotOffset.left)+"px;");var legend=$('<div class="legend">'+table.replace('style="','style="position:absolute;'+pos+";")+"</div>").appendTo(placeholder);if(0!=options.legend.backgroundOpacity){var c=options.legend.backgroundColor;null==c&&(c=options.grid.backgroundColor,c=c&&"string"==typeof c?$.color.parse(c):$.color.extract(legend,"background-color"),c.a=1,c=c.toString());var div=legend.children();$('<div style="position:absolute;width:'+div.width()+"px;height:"+div.height()+"px;"+pos+"background-color:"+c+';"> </div>').prependTo(legend).css("opacity",options.legend.backgroundOpacity)}}}}}function findNearbyItem(mouseX,mouseY,seriesFilter){var i,j,ps,maxDistance=options.grid.mouseActiveRadius,smallestDistance=maxDistance*maxDistance+1,item=null;for(i=series.length-1;i>=0;--i)if(seriesFilter(series[i])){var s=series[i],axisx=s.xaxis,axisy=s.yaxis,points=s.datapoints.points,mx=axisx.c2p(mouseX),my=axisy.c2p(mouseY),maxx=maxDistance/axisx.scale,maxy=maxDistance/axisy.scale;if(ps=s.datapoints.pointsize,axisx.options.inverseTransform&&(maxx=Number.MAX_VALUE),axisy.options.inverseTransform&&(maxy=Number.MAX_VALUE),s.lines.show||s.points.show)for(j=0;j<points.length;j+=ps){var x=points[j],y=points[j+1];if(null!=x&&!(x-mx>maxx||-maxx>x-mx||y-my>maxy||-maxy>y-my)){var dx=Math.abs(axisx.p2c(x)-mouseX),dy=Math.abs(axisy.p2c(y)-mouseY),dist=dx*dx+dy*dy;smallestDistance>dist&&(smallestDistance=dist,item=[i,j/ps])}}if(s.bars.show&&!item){var barLeft,barRight;switch(s.bars.align){case"left":barLeft=0;break;case"right":barLeft=-s.bars.barWidth;break;default:barLeft=-s.bars.barWidth/2}for(barRight=barLeft+s.bars.barWidth,j=0;j<points.length;j+=ps){var x=points[j],y=points[j+1],b=points[j+2];null!=x&&(series[i].bars.horizontal?mx<=Math.max(b,x)&&mx>=Math.min(b,x)&&my>=y+barLeft&&y+barRight>=my:mx>=x+barLeft&&x+barRight>=mx&&my>=Math.min(b,y)&&my<=Math.max(b,y))&&(item=[i,j/ps])}}}return item?(i=item[0],j=item[1],ps=series[i].datapoints.pointsize,{datapoint:series[i].datapoints.points.slice(j*ps,(j+1)*ps),dataIndex:j,series:series[i],seriesIndex:i}):null}function onMouseMove(e){options.grid.hoverable&&triggerClickHoverEvent("plothover",e,function(s){return 0!=s.hoverable})}function onMouseLeave(e){options.grid.hoverable&&triggerClickHoverEvent("plothover",e,function(){return!1})}function onClick(e){triggerClickHoverEvent("plotclick",e,function(s){return 0!=s.clickable})}function triggerClickHoverEvent(eventname,event,seriesFilter){var offset=eventHolder.offset(),canvasX=event.pageX-offset.left-plotOffset.left,canvasY=event.pageY-offset.top-plotOffset.top,pos=canvasToAxisCoords({left:canvasX,top:canvasY});pos.pageX=event.pageX,pos.pageY=event.pageY;var item=findNearbyItem(canvasX,canvasY,seriesFilter);if(item&&(item.pageX=parseInt(item.series.xaxis.p2c(item.datapoint[0])+offset.left+plotOffset.left,10),item.pageY=parseInt(item.series.yaxis.p2c(item.datapoint[1])+offset.top+plotOffset.top,10)),options.grid.autoHighlight){for(var i=0;i<highlights.length;++i){var h=highlights[i];h.auto!=eventname||item&&h.series==item.series&&h.point[0]==item.datapoint[0]&&h.point[1]==item.datapoint[1]||unhighlight(h.series,h.point)}item&&highlight(item.series,item.datapoint,eventname)}placeholder.trigger(eventname,[pos,item])}function triggerRedrawOverlay(){var t=options.interaction.redrawOverlayInterval;return-1==t?void drawOverlay():void(redrawTimeout||(redrawTimeout=setTimeout(drawOverlay,t)))}function drawOverlay(){redrawTimeout=null,octx.save(),overlay.clear(),octx.translate(plotOffset.left,plotOffset.top);var i,hi;for(i=0;i<highlights.length;++i)hi=highlights[i],hi.series.bars.show?drawBarHighlight(hi.series,hi.point):drawPointHighlight(hi.series,hi.point);octx.restore(),executeHooks(hooks.drawOverlay,[octx])}function highlight(s,point,auto){if("number"==typeof s&&(s=series[s]),"number"==typeof point){var ps=s.datapoints.pointsize;point=s.datapoints.points.slice(ps*point,ps*(point+1))}var i=indexOfHighlight(s,point);-1==i?(highlights.push({series:s,point:point,auto:auto}),triggerRedrawOverlay()):auto||(highlights[i].auto=!1)}function unhighlight(s,point){if(null==s&&null==point)return highlights=[],void triggerRedrawOverlay();if("number"==typeof s&&(s=series[s]),"number"==typeof point){var ps=s.datapoints.pointsize;point=s.datapoints.points.slice(ps*point,ps*(point+1))}var i=indexOfHighlight(s,point);-1!=i&&(highlights.splice(i,1),triggerRedrawOverlay())}function indexOfHighlight(s,p){for(var i=0;i<highlights.length;++i){var h=highlights[i];if(h.series==s&&h.point[0]==p[0]&&h.point[1]==p[1])return i}return-1}function drawPointHighlight(series,point){var x=point[0],y=point[1],axisx=series.xaxis,axisy=series.yaxis,highlightColor="string"==typeof series.highlightColor?series.highlightColor:$.color.parse(series.color).scale("a",.5).toString();if(!(x<axisx.min||x>axisx.max||y<axisy.min||y>axisy.max)){var pointRadius=series.points.radius+series.points.lineWidth/2;octx.lineWidth=pointRadius,octx.strokeStyle=highlightColor;var radius=1.5*pointRadius;x=axisx.p2c(x),y=axisy.p2c(y),octx.beginPath(),"circle"==series.points.symbol?octx.arc(x,y,radius,0,2*Math.PI,!1):series.points.symbol(octx,x,y,radius,!1),octx.closePath(),octx.stroke()}}function drawBarHighlight(series,point){var barLeft,highlightColor="string"==typeof series.highlightColor?series.highlightColor:$.color.parse(series.color).scale("a",.5).toString(),fillStyle=highlightColor;switch(series.bars.align){case"left":barLeft=0;break;case"right":barLeft=-series.bars.barWidth;break;default:barLeft=-series.bars.barWidth/2}octx.lineWidth=series.bars.lineWidth,octx.strokeStyle=highlightColor,drawBar(point[0],point[1],point[2]||0,barLeft,barLeft+series.bars.barWidth,function(){return fillStyle},series.xaxis,series.yaxis,octx,series.bars.horizontal,series.bars.lineWidth)}function getColorOrGradient(spec,bottom,top,defaultColor){if("string"==typeof spec)return spec;for(var gradient=ctx.createLinearGradient(0,top,0,bottom),i=0,l=spec.colors.length;l>i;++i){var c=spec.colors[i];if("string"!=typeof c){var co=$.color.parse(defaultColor);null!=c.brightness&&(co=co.scale("rgb",c.brightness)),null!=c.opacity&&(co.a*=c.opacity),c=co.toString()}gradient.addColorStop(i/(l-1),c)}return gradient}var series=[],options={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:!0,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:.85,sorted:null},xaxis:{show:null,position:"bottom",mode:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null},yaxis:{autoscaleMargin:.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,barWidth:1,fill:!0,fillColor:null,align:"left",horizontal:!1,zero:!0},shadowSize:3,highlightColor:null},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,margin:0,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,hoverable:!1,autoHighlight:!0,mouseActiveRadius:10},interaction:{redrawOverlayInterval:1e3/60},hooks:{}},surface=null,overlay=null,eventHolder=null,ctx=null,octx=null,xaxes=[],yaxes=[],plotOffset={left:0,right:0,top:0,bottom:0},plotWidth=0,plotHeight=0,hooks={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],drawBackground:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},plot=this;plot.setData=setData,plot.setupGrid=setupGrid,plot.draw=draw,plot.getPlaceholder=function(){return placeholder},plot.getCanvas=function(){return surface.element},plot.getPlotOffset=function(){return plotOffset},plot.width=function(){return plotWidth},plot.height=function(){return plotHeight},plot.offset=function(){var o=eventHolder.offset();return o.left+=plotOffset.left,o.top+=plotOffset.top,o},plot.getData=function(){return series
},plot.getAxes=function(){var res={};return $.each(xaxes.concat(yaxes),function(_,axis){axis&&(res[axis.direction+(1!=axis.n?axis.n:"")+"axis"]=axis)}),res},plot.getXAxes=function(){return xaxes},plot.getYAxes=function(){return yaxes},plot.c2p=canvasToAxisCoords,plot.p2c=axisToCanvasCoords,plot.getOptions=function(){return options},plot.highlight=highlight,plot.unhighlight=unhighlight,plot.triggerRedrawOverlay=triggerRedrawOverlay,plot.pointOffset=function(point){return{left:parseInt(xaxes[axisNumber(point,"x")-1].p2c(+point.x)+plotOffset.left,10),top:parseInt(yaxes[axisNumber(point,"y")-1].p2c(+point.y)+plotOffset.top,10)}},plot.shutdown=shutdown,plot.destroy=function(){shutdown(),placeholder.removeData("plot").empty(),series=[],options=null,surface=null,overlay=null,eventHolder=null,ctx=null,octx=null,xaxes=[],yaxes=[],hooks=null,highlights=[],plot=null},plot.resize=function(){var width=placeholder.width(),height=placeholder.height();surface.resize(width,height),overlay.resize(width,height)},plot.hooks=hooks,initPlugins(plot),parseOptions(options_),setupCanvases(),setData(data_),setupGrid(),draw(),bindEvents();var highlights=[],redrawTimeout=null}function floorInBase(n,base){return base*Math.floor(n/base)}var hasOwnProperty=Object.prototype.hasOwnProperty;$.fn.detach||($.fn.detach=function(){return this.each(function(){this.parentNode&&this.parentNode.removeChild(this)})}),Canvas.prototype.resize=function(width,height){if(0>=width||0>=height)throw new Error("Invalid dimensions for plot, width = "+width+", height = "+height);var element=this.element,context=this.context,pixelRatio=this.pixelRatio;this.width!=width&&(element.width=width*pixelRatio,element.style.width=width+"px",this.width=width),this.height!=height&&(element.height=height*pixelRatio,element.style.height=height+"px",this.height=height),context.restore(),context.save(),context.scale(pixelRatio,pixelRatio)},Canvas.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},Canvas.prototype.render=function(){var cache=this._textCache;for(var layerKey in cache)if(hasOwnProperty.call(cache,layerKey)){var layer=this.getTextLayer(layerKey),layerCache=cache[layerKey];layer.hide();for(var styleKey in layerCache)if(hasOwnProperty.call(layerCache,styleKey)){var styleCache=layerCache[styleKey];for(var key in styleCache)if(hasOwnProperty.call(styleCache,key)){for(var position,positions=styleCache[key].positions,i=0;position=positions[i];i++)position.active?position.rendered||(layer.append(position.element),position.rendered=!0):(positions.splice(i--,1),position.rendered&&position.element.detach());0==positions.length&&delete styleCache[key]}}layer.show()}},Canvas.prototype.getTextLayer=function(classes){var layer=this.text[classes];return null==layer&&(null==this.textContainer&&(this.textContainer=$("<div class='flot-text'></div>").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),layer=this.text[classes]=$("<div></div>").addClass(classes).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),layer},Canvas.prototype.getTextInfo=function(layer,text,font,angle,width){var textStyle,layerCache,styleCache,info;if(text=""+text,textStyle="object"==typeof font?font.style+" "+font.variant+" "+font.weight+" "+font.size+"px/"+font.lineHeight+"px "+font.family:font,layerCache=this._textCache[layer],null==layerCache&&(layerCache=this._textCache[layer]={}),styleCache=layerCache[textStyle],null==styleCache&&(styleCache=layerCache[textStyle]={}),info=styleCache[text],null==info){var element=$("<div></div>").html(text).css({position:"absolute","max-width":width,top:-9999}).appendTo(this.getTextLayer(layer));"object"==typeof font?element.css({font:textStyle,color:font.color}):"string"==typeof font&&element.addClass(font),info=styleCache[text]={width:element.outerWidth(!0),height:element.outerHeight(!0),element:element,positions:[]},element.detach()}return info},Canvas.prototype.addText=function(layer,x,y,text,font,angle,width,halign,valign){var info=this.getTextInfo(layer,text,font,angle,width),positions=info.positions;"center"==halign?x-=info.width/2:"right"==halign&&(x-=info.width),"middle"==valign?y-=info.height/2:"bottom"==valign&&(y-=info.height);for(var position,i=0;position=positions[i];i++)if(position.x==x&&position.y==y)return void(position.active=!0);position={active:!0,rendered:!1,element:positions.length?info.element.clone():info.element,x:x,y:y},positions.push(position),position.element.css({top:Math.round(y),left:Math.round(x),"text-align":halign})},Canvas.prototype.removeText=function(layer,x,y,text,font,angle){if(null==text){var layerCache=this._textCache[layer];if(null!=layerCache)for(var styleKey in layerCache)if(hasOwnProperty.call(layerCache,styleKey)){var styleCache=layerCache[styleKey];for(var key in styleCache)if(hasOwnProperty.call(styleCache,key))for(var position,positions=styleCache[key].positions,i=0;position=positions[i];i++)position.active=!1}}else for(var position,positions=this.getTextInfo(layer,text,font,angle).positions,i=0;position=positions[i];i++)position.x==x&&position.y==y&&(position.active=!1)},$.plot=function(placeholder,data,options){var plot=new Plot($(placeholder),data,options,$.plot.plugins);return plot},$.plot.version="0.8.3",$.plot.plugins=[],$.fn.plot=function(data,options){return this.each(function(){$.plot(this,data,options)})}}(jQuery),function($){function init(plot){function processDatapoints(plot){processed||(processed=!0,canvas=plot.getCanvas(),target=$(canvas).parent(),options=plot.getOptions(),plot.setData(combine(plot.getData())))}function combine(data){for(var total=0,combined=0,numCombined=0,color=options.series.pie.combine.color,newdata=[],i=0;i<data.length;++i){var value=data[i].data;$.isArray(value)&&1==value.length&&(value=value[0]),$.isArray(value)?value[1]=!isNaN(parseFloat(value[1]))&&isFinite(value[1])?+value[1]:0:value=!isNaN(parseFloat(value))&&isFinite(value)?[1,+value]:[1,0],data[i].data=[value]}for(var i=0;i<data.length;++i)total+=data[i].data[0][1];for(var i=0;i<data.length;++i){var value=data[i].data[0][1];value/total<=options.series.pie.combine.threshold&&(combined+=value,numCombined++,color||(color=data[i].color))}for(var i=0;i<data.length;++i){var value=data[i].data[0][1];(2>numCombined||value/total>options.series.pie.combine.threshold)&&newdata.push($.extend(data[i],{data:[[1,value]],color:data[i].color,label:data[i].label,angle:value*Math.PI*2/total,percent:value/(total/100)}))}return numCombined>1&&newdata.push({data:[[1,combined]],color:color,label:options.series.pie.combine.label,angle:combined*Math.PI*2/total,percent:combined/(total/100)}),newdata}function draw(plot,newCtx){function clear(){ctx.clearRect(0,0,canvasWidth,canvasHeight),target.children().filter(".pieLabel, .pieLabelBackground").remove()}function drawShadow(){var shadowLeft=options.series.pie.shadow.left,shadowTop=options.series.pie.shadow.top,edge=10,alpha=options.series.pie.shadow.alpha,radius=options.series.pie.radius>1?options.series.pie.radius:maxRadius*options.series.pie.radius;if(!(radius>=canvasWidth/2-shadowLeft||radius*options.series.pie.tilt>=canvasHeight/2-shadowTop||edge>=radius)){ctx.save(),ctx.translate(shadowLeft,shadowTop),ctx.globalAlpha=alpha,ctx.fillStyle="#000",ctx.translate(centerLeft,centerTop),ctx.scale(1,options.series.pie.tilt);for(var i=1;edge>=i;i++)ctx.beginPath(),ctx.arc(0,0,radius,0,2*Math.PI,!1),ctx.fill(),radius-=i;ctx.restore()}}function drawPie(){function drawSlice(angle,color,fill){0>=angle||isNaN(angle)||(fill?ctx.fillStyle=color:(ctx.strokeStyle=color,ctx.lineJoin="round"),ctx.beginPath(),Math.abs(angle-2*Math.PI)>1e-9&&ctx.moveTo(0,0),ctx.arc(0,0,radius,currentAngle,currentAngle+angle/2,!1),ctx.arc(0,0,radius,currentAngle+angle/2,currentAngle+angle,!1),ctx.closePath(),currentAngle+=angle,fill?ctx.fill():ctx.stroke())}function drawLabels(){function drawLabel(slice,startAngle,index){if(0==slice.data[0][1])return!0;var text,lf=options.legend.labelFormatter,plf=options.series.pie.label.formatter;text=lf?lf(slice.label,slice):slice.label,plf&&(text=plf(text,slice));var halfAngle=(startAngle+slice.angle+startAngle)/2,x=centerLeft+Math.round(Math.cos(halfAngle)*radius),y=centerTop+Math.round(Math.sin(halfAngle)*radius)*options.series.pie.tilt,html="<span class='pieLabel' id='pieLabel"+index+"' style='position:absolute;top:"+y+"px;left:"+x+"px;'>"+text+"</span>";target.append(html);var label=target.children("#pieLabel"+index),labelTop=y-label.height()/2,labelLeft=x-label.width()/2;if(label.css("top",labelTop),label.css("left",labelLeft),0-labelTop>0||0-labelLeft>0||canvasHeight-(labelTop+label.height())<0||canvasWidth-(labelLeft+label.width())<0)return!1;if(0!=options.series.pie.label.background.opacity){var c=options.series.pie.label.background.color;null==c&&(c=slice.color);var pos="top:"+labelTop+"px;left:"+labelLeft+"px;";$("<div class='pieLabelBackground' style='position:absolute;width:"+label.width()+"px;height:"+label.height()+"px;"+pos+"background-color:"+c+";'></div>").css("opacity",options.series.pie.label.background.opacity).insertBefore(label)}return!0}for(var currentAngle=startAngle,radius=options.series.pie.label.radius>1?options.series.pie.label.radius:maxRadius*options.series.pie.label.radius,i=0;i<slices.length;++i){if(slices[i].percent>=100*options.series.pie.label.threshold&&!drawLabel(slices[i],currentAngle,i))return!1;currentAngle+=slices[i].angle}return!0}var startAngle=Math.PI*options.series.pie.startAngle,radius=options.series.pie.radius>1?options.series.pie.radius:maxRadius*options.series.pie.radius;ctx.save(),ctx.translate(centerLeft,centerTop),ctx.scale(1,options.series.pie.tilt),ctx.save();for(var currentAngle=startAngle,i=0;i<slices.length;++i)slices[i].startAngle=currentAngle,drawSlice(slices[i].angle,slices[i].color,!0);if(ctx.restore(),options.series.pie.stroke.width>0){ctx.save(),ctx.lineWidth=options.series.pie.stroke.width,currentAngle=startAngle;for(var i=0;i<slices.length;++i)drawSlice(slices[i].angle,options.series.pie.stroke.color,!1);ctx.restore()}return drawDonutHole(ctx),ctx.restore(),options.series.pie.label.show?drawLabels():!0}if(target){var canvasWidth=plot.getPlaceholder().width(),canvasHeight=plot.getPlaceholder().height(),legendWidth=target.children().filter(".legend").children().width()||0;ctx=newCtx,processed=!1,maxRadius=Math.min(canvasWidth,canvasHeight/options.series.pie.tilt)/2,centerTop=canvasHeight/2+options.series.pie.offset.top,centerLeft=canvasWidth/2,"auto"==options.series.pie.offset.left?(options.legend.position.match("w")?centerLeft+=legendWidth/2:centerLeft-=legendWidth/2,maxRadius>centerLeft?centerLeft=maxRadius:centerLeft>canvasWidth-maxRadius&&(centerLeft=canvasWidth-maxRadius)):centerLeft+=options.series.pie.offset.left;var slices=plot.getData(),attempts=0;do attempts>0&&(maxRadius*=REDRAW_SHRINK),attempts+=1,clear(),options.series.pie.tilt<=.8&&drawShadow();while(!drawPie()&&REDRAW_ATTEMPTS>attempts);attempts>=REDRAW_ATTEMPTS&&(clear(),target.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>")),plot.setSeries&&plot.insertLegend&&(plot.setSeries(slices),plot.insertLegend())}}function drawDonutHole(layer){if(options.series.pie.innerRadius>0){layer.save();var innerRadius=options.series.pie.innerRadius>1?options.series.pie.innerRadius:maxRadius*options.series.pie.innerRadius;layer.globalCompositeOperation="destination-out",layer.beginPath(),layer.fillStyle=options.series.pie.stroke.color,layer.arc(0,0,innerRadius,0,2*Math.PI,!1),layer.fill(),layer.closePath(),layer.restore(),layer.save(),layer.beginPath(),layer.strokeStyle=options.series.pie.stroke.color,layer.arc(0,0,innerRadius,0,2*Math.PI,!1),layer.stroke(),layer.closePath(),layer.restore()}}function isPointInPoly(poly,pt){for(var c=!1,i=-1,l=poly.length,j=l-1;++i<l;j=i)(poly[i][1]<=pt[1]&&pt[1]<poly[j][1]||poly[j][1]<=pt[1]&&pt[1]<poly[i][1])&&pt[0]<(poly[j][0]-poly[i][0])*(pt[1]-poly[i][1])/(poly[j][1]-poly[i][1])+poly[i][0]&&(c=!c);return c}function findNearbySlice(mouseX,mouseY){for(var x,y,slices=plot.getData(),options=plot.getOptions(),radius=options.series.pie.radius>1?options.series.pie.radius:maxRadius*options.series.pie.radius,i=0;i<slices.length;++i){var s=slices[i];if(s.pie.show){if(ctx.save(),ctx.beginPath(),ctx.moveTo(0,0),ctx.arc(0,0,radius,s.startAngle,s.startAngle+s.angle/2,!1),ctx.arc(0,0,radius,s.startAngle+s.angle/2,s.startAngle+s.angle,!1),ctx.closePath(),x=mouseX-centerLeft,y=mouseY-centerTop,ctx.isPointInPath){if(ctx.isPointInPath(mouseX-centerLeft,mouseY-centerTop))return ctx.restore(),{datapoint:[s.percent,s.data],dataIndex:0,series:s,seriesIndex:i}}else{var p1X=radius*Math.cos(s.startAngle),p1Y=radius*Math.sin(s.startAngle),p2X=radius*Math.cos(s.startAngle+s.angle/4),p2Y=radius*Math.sin(s.startAngle+s.angle/4),p3X=radius*Math.cos(s.startAngle+s.angle/2),p3Y=radius*Math.sin(s.startAngle+s.angle/2),p4X=radius*Math.cos(s.startAngle+s.angle/1.5),p4Y=radius*Math.sin(s.startAngle+s.angle/1.5),p5X=radius*Math.cos(s.startAngle+s.angle),p5Y=radius*Math.sin(s.startAngle+s.angle),arrPoly=[[0,0],[p1X,p1Y],[p2X,p2Y],[p3X,p3Y],[p4X,p4Y],[p5X,p5Y]],arrPoint=[x,y];if(isPointInPoly(arrPoly,arrPoint))return ctx.restore(),{datapoint:[s.percent,s.data],dataIndex:0,series:s,seriesIndex:i}}ctx.restore()}}return null}function onMouseMove(e){triggerClickHoverEvent("plothover",e)}function onClick(e){triggerClickHoverEvent("plotclick",e)}function triggerClickHoverEvent(eventname,e){var offset=plot.offset(),canvasX=parseInt(e.pageX-offset.left),canvasY=parseInt(e.pageY-offset.top),item=findNearbySlice(canvasX,canvasY);if(options.grid.autoHighlight)for(var i=0;i<highlights.length;++i){var h=highlights[i];h.auto!=eventname||item&&h.series==item.series||unhighlight(h.series)}item&&highlight(item.series,eventname);var pos={pageX:e.pageX,pageY:e.pageY};target.trigger(eventname,[pos,item])}function highlight(s,auto){var i=indexOfHighlight(s);-1==i?(highlights.push({series:s,auto:auto}),plot.triggerRedrawOverlay()):auto||(highlights[i].auto=!1)}function unhighlight(s){null==s&&(highlights=[],plot.triggerRedrawOverlay());var i=indexOfHighlight(s);-1!=i&&(highlights.splice(i,1),plot.triggerRedrawOverlay())}function indexOfHighlight(s){for(var i=0;i<highlights.length;++i){var h=highlights[i];if(h.series==s)return i}return-1}function drawOverlay(plot,octx){function drawHighlight(series){series.angle<=0||isNaN(series.angle)||(octx.fillStyle="rgba(255, 255, 255, "+options.series.pie.highlight.opacity+")",octx.beginPath(),Math.abs(series.angle-2*Math.PI)>1e-9&&octx.moveTo(0,0),octx.arc(0,0,radius,series.startAngle,series.startAngle+series.angle/2,!1),octx.arc(0,0,radius,series.startAngle+series.angle/2,series.startAngle+series.angle,!1),octx.closePath(),octx.fill())}var options=plot.getOptions(),radius=options.series.pie.radius>1?options.series.pie.radius:maxRadius*options.series.pie.radius;octx.save(),octx.translate(centerLeft,centerTop),octx.scale(1,options.series.pie.tilt);for(var i=0;i<highlights.length;++i)drawHighlight(highlights[i].series);drawDonutHole(octx),octx.restore()}var canvas=null,target=null,options=null,maxRadius=null,centerLeft=null,centerTop=null,processed=!1,ctx=null,highlights=[];plot.hooks.processOptions.push(function(plot,options){options.series.pie.show&&(options.grid.show=!1,"auto"==options.series.pie.label.show&&(options.series.pie.label.show=options.legend.show?!1:!0),"auto"==options.series.pie.radius&&(options.series.pie.radius=options.series.pie.label.show?.75:1),options.series.pie.tilt>1?options.series.pie.tilt=1:options.series.pie.tilt<0&&(options.series.pie.tilt=0))}),plot.hooks.bindEvents.push(function(plot,eventHolder){var options=plot.getOptions();options.series.pie.show&&(options.grid.hoverable&&eventHolder.unbind("mousemove").mousemove(onMouseMove),options.grid.clickable&&eventHolder.unbind("click").click(onClick))}),plot.hooks.processDatapoints.push(function(plot,series,data,datapoints){var options=plot.getOptions();options.series.pie.show&&processDatapoints(plot,series,data,datapoints)}),plot.hooks.drawOverlay.push(function(plot,octx){var options=plot.getOptions();options.series.pie.show&&drawOverlay(plot,octx)}),plot.hooks.draw.push(function(plot,newCtx){var options=plot.getOptions();options.series.pie.show&&draw(plot,newCtx)})}var REDRAW_ATTEMPTS=10,REDRAW_SHRINK=.95,options={series:{pie:{show:!1,radius:"auto",innerRadius:0,startAngle:1.5,tilt:1,shadow:{left:5,top:15,alpha:.02},offset:{top:0,left:"auto"},stroke:{color:"#fff",width:1},label:{show:"auto",formatter:function(label,slice){return"<div style='font-size:x-small;text-align:center;padding:2px;color:"+slice.color+";'>"+label+"<br/>"+Math.round(slice.percent)+"%</div>"},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:.5}}}};$.plot.plugins.push({init:init,options:options,name:"pie",version:"1.1"})}(jQuery),function($){function floorInBase(n,base){return base*Math.floor(n/base)}function formatDate(d,fmt,monthNames,dayNames){if("function"==typeof d.strftime)return d.strftime(fmt);var leftPad=function(n,pad){return n=""+n,pad=""+(null==pad?"0":pad),1==n.length?pad+n:n},r=[],escape=!1,hours=d.getHours(),isAM=12>hours;null==monthNames&&(monthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),null==dayNames&&(dayNames=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]);var hours12;hours12=hours>12?hours-12:0==hours?12:hours;for(var i=0;i<fmt.length;++i){var c=fmt.charAt(i);if(escape){switch(c){case"a":c=""+dayNames[d.getDay()];break;case"b":c=""+monthNames[d.getMonth()];break;case"d":c=leftPad(d.getDate());break;case"e":c=leftPad(d.getDate()," ");break;case"h":case"H":c=leftPad(hours);break;case"I":c=leftPad(hours12);break;case"l":c=leftPad(hours12," ");break;case"m":c=leftPad(d.getMonth()+1);break;case"M":c=leftPad(d.getMinutes());break;case"q":c=""+(Math.floor(d.getMonth()/3)+1);break;case"S":c=leftPad(d.getSeconds());break;case"y":c=leftPad(d.getFullYear()%100);break;case"Y":c=""+d.getFullYear();break;case"p":c=isAM?"am":"pm";break;case"P":c=isAM?"AM":"PM";break;case"w":c=""+d.getDay()}r.push(c),escape=!1}else"%"==c?escape=!0:r.push(c)}return r.join("")}function makeUtcWrapper(d){function addProxyMethod(sourceObj,sourceMethod,targetObj,targetMethod){sourceObj[sourceMethod]=function(){return targetObj[targetMethod].apply(targetObj,arguments)}}var utc={date:d};void 0!=d.strftime&&addProxyMethod(utc,"strftime",d,"strftime"),addProxyMethod(utc,"getTime",d,"getTime"),addProxyMethod(utc,"setTime",d,"setTime");for(var props=["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds"],p=0;p<props.length;p++)addProxyMethod(utc,"get"+props[p],d,"getUTC"+props[p]),addProxyMethod(utc,"set"+props[p],d,"setUTC"+props[p]);return utc}function dateGenerator(ts,opts){if("browser"==opts.timezone)return new Date(ts);if(opts.timezone&&"utc"!=opts.timezone){if("undefined"!=typeof timezoneJS&&"undefined"!=typeof timezoneJS.Date){var d=new timezoneJS.Date;return d.setTimezone(opts.timezone),d.setTime(ts),d}return makeUtcWrapper(new Date(ts))}return makeUtcWrapper(new Date(ts))}function init(plot){plot.hooks.processOptions.push(function(plot){$.each(plot.getAxes(),function(axisName,axis){var opts=axis.options;"time"==opts.mode&&(axis.tickGenerator=function(axis){var ticks=[],d=dateGenerator(axis.min,opts),minSize=0,spec=opts.tickSize&&"quarter"===opts.tickSize[1]||opts.minTickSize&&"quarter"===opts.minTickSize[1]?specQuarters:specMonths;null!=opts.minTickSize&&(minSize="number"==typeof opts.tickSize?opts.tickSize:opts.minTickSize[0]*timeUnitSize[opts.minTickSize[1]]);for(var i=0;i<spec.length-1&&!(axis.delta<(spec[i][0]*timeUnitSize[spec[i][1]]+spec[i+1][0]*timeUnitSize[spec[i+1][1]])/2&&spec[i][0]*timeUnitSize[spec[i][1]]>=minSize);++i);var size=spec[i][0],unit=spec[i][1];if("year"==unit){if(null!=opts.minTickSize&&"year"==opts.minTickSize[1])size=Math.floor(opts.minTickSize[0]);else{var magn=Math.pow(10,Math.floor(Math.log(axis.delta/timeUnitSize.year)/Math.LN10)),norm=axis.delta/timeUnitSize.year/magn;size=1.5>norm?1:3>norm?2:7.5>norm?5:10,size*=magn}1>size&&(size=1)}axis.tickSize=opts.tickSize||[size,unit];var tickSize=axis.tickSize[0];unit=axis.tickSize[1];var step=tickSize*timeUnitSize[unit];"second"==unit?d.setSeconds(floorInBase(d.getSeconds(),tickSize)):"minute"==unit?d.setMinutes(floorInBase(d.getMinutes(),tickSize)):"hour"==unit?d.setHours(floorInBase(d.getHours(),tickSize)):"month"==unit?d.setMonth(floorInBase(d.getMonth(),tickSize)):"quarter"==unit?d.setMonth(3*floorInBase(d.getMonth()/3,tickSize)):"year"==unit&&d.setFullYear(floorInBase(d.getFullYear(),tickSize)),d.setMilliseconds(0),step>=timeUnitSize.minute&&d.setSeconds(0),step>=timeUnitSize.hour&&d.setMinutes(0),step>=timeUnitSize.day&&d.setHours(0),step>=4*timeUnitSize.day&&d.setDate(1),step>=2*timeUnitSize.month&&d.setMonth(floorInBase(d.getMonth(),3)),step>=2*timeUnitSize.quarter&&d.setMonth(floorInBase(d.getMonth(),6)),step>=timeUnitSize.year&&d.setMonth(0);var prev,carry=0,v=Number.NaN;do if(prev=v,v=d.getTime(),ticks.push(v),"month"==unit||"quarter"==unit)if(1>tickSize){d.setDate(1);var start=d.getTime();d.setMonth(d.getMonth()+("quarter"==unit?3:1));var end=d.getTime();d.setTime(v+carry*timeUnitSize.hour+(end-start)*tickSize),carry=d.getHours(),d.setHours(0)}else d.setMonth(d.getMonth()+tickSize*("quarter"==unit?3:1));else"year"==unit?d.setFullYear(d.getFullYear()+tickSize):d.setTime(v+step);while(v<axis.max&&v!=prev);return ticks},axis.tickFormatter=function(v,axis){var d=dateGenerator(v,axis.options);if(null!=opts.timeformat)return formatDate(d,opts.timeformat,opts.monthNames,opts.dayNames);var fmt,useQuarters=axis.options.tickSize&&"quarter"==axis.options.tickSize[1]||axis.options.minTickSize&&"quarter"==axis.options.minTickSize[1],t=axis.tickSize[0]*timeUnitSize[axis.tickSize[1]],span=axis.max-axis.min,suffix=opts.twelveHourClock?" %p":"",hourCode=opts.twelveHourClock?"%I":"%H";fmt=t<timeUnitSize.minute?hourCode+":%M:%S"+suffix:t<timeUnitSize.day?span<2*timeUnitSize.day?hourCode+":%M"+suffix:"%b %d "+hourCode+":%M"+suffix:t<timeUnitSize.month?"%b %d":useQuarters&&t<timeUnitSize.quarter||!useQuarters&&t<timeUnitSize.year?span<timeUnitSize.year?"%b":"%b %Y":useQuarters&&t<timeUnitSize.year?span<timeUnitSize.year?"Q%q":"Q%q %Y":"%Y";var rt=formatDate(d,fmt,opts.monthNames,opts.dayNames);return rt})})})}var options={xaxis:{timezone:null,timeformat:null,twelveHourClock:!1,monthNames:null}},timeUnitSize={second:1e3,minute:6e4,hour:36e5,day:864e5,month:2592e6,quarter:7776e6,year:525949.2*60*1e3},baseSpec=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[.25,"month"],[.5,"month"],[1,"month"],[2,"month"]],specMonths=baseSpec.concat([[3,"month"],[6,"month"],[1,"year"]]),specQuarters=baseSpec.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);$.plot.plugins.push({init:init,options:options,name:"time",version:"1.0"}),$.plot.formatDate=formatDate,$.plot.dateGenerator=dateGenerator}(jQuery),function($){function canvasSupported(){return!!document.createElement("canvas").getContext}function canvasTextSupported(){if(!canvasSupported())return!1;var dummy_canvas=document.createElement("canvas"),context=dummy_canvas.getContext("2d");return"function"==typeof context.fillText}function css3TransitionSupported(){var div=document.createElement("div");return"undefined"!=typeof div.style.MozTransition||"undefined"!=typeof div.style.OTransition||"undefined"!=typeof div.style.webkitTransition||"undefined"!=typeof div.style.transition}function AxisLabel(axisName,position,padding,plot,opts){this.axisName=axisName,this.position=position,this.padding=padding,this.plot=plot,this.opts=opts,this.width=0,this.height=0}function CanvasAxisLabel(axisName,position,padding,plot,opts){AxisLabel.prototype.constructor.call(this,axisName,position,padding,plot,opts)}function HtmlAxisLabel(axisName,position,padding,plot,opts){AxisLabel.prototype.constructor.call(this,axisName,position,padding,plot,opts),this.elem=null}function CssTransformAxisLabel(axisName,position,padding,plot,opts){HtmlAxisLabel.prototype.constructor.call(this,axisName,position,padding,plot,opts)}function IeTransformAxisLabel(axisName,position,padding,plot,opts){CssTransformAxisLabel.prototype.constructor.call(this,axisName,position,padding,plot,opts),this.requiresResize=!1}function init(plot){plot.hooks.processOptions.push(function(plot,options){if(options.axisLabels.show){var secondPass=!1,axisLabels={},defaultPadding=2;plot.hooks.draw.push(function(plot){var hasAxisLabels=!1;secondPass?(secondPass=!1,$.each(plot.getAxes(),function(axisName,axis){var opts=axis.options||plot.getOptions()[axisName];opts&&opts.axisLabel&&axis.show&&axisLabels[axisName].draw(axis.box)})):($.each(plot.getAxes(),function(axisName,axis){var opts=axis.options||plot.getOptions()[axisName];if(axisName in axisLabels&&(axis.labelHeight=axis.labelHeight-axisLabels[axisName].height,axis.labelWidth=axis.labelWidth-axisLabels[axisName].width,opts.labelHeight=axis.labelHeight,opts.labelWidth=axis.labelWidth,axisLabels[axisName].cleanup(),delete axisLabels[axisName]),opts&&opts.axisLabel&&axis.show){hasAxisLabels=!0;var renderer=null;if(opts.axisLabelUseHtml||"Microsoft Internet Explorer"!=navigator.appName)renderer=opts.axisLabelUseHtml||!css3TransitionSupported()&&!canvasTextSupported()&&!opts.axisLabelUseCanvas?HtmlAxisLabel:opts.axisLabelUseCanvas||!css3TransitionSupported()?CanvasAxisLabel:CssTransformAxisLabel;else{var ua=navigator.userAgent,re=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=re.exec(ua)&&(rv=parseFloat(RegExp.$1)),renderer=rv>=9&&!opts.axisLabelUseCanvas&&!opts.axisLabelUseHtml?CssTransformAxisLabel:opts.axisLabelUseCanvas||opts.axisLabelUseHtml?opts.axisLabelUseCanvas?CanvasAxisLabel:HtmlAxisLabel:IeTransformAxisLabel}var padding=void 0===opts.axisLabelPadding?defaultPadding:opts.axisLabelPadding;axisLabels[axisName]=new renderer(axisName,axis.position,padding,plot,opts),axisLabels[axisName].calculateSize(),opts.labelHeight=axis.labelHeight+axisLabels[axisName].height,opts.labelWidth=axis.labelWidth+axisLabels[axisName].width}}),hasAxisLabels&&(secondPass=!0,plot.setupGrid(),plot.draw()))})}})}var options={axisLabels:{show:!0}};AxisLabel.prototype.cleanup=function(){},CanvasAxisLabel.prototype=new AxisLabel,CanvasAxisLabel.prototype.constructor=CanvasAxisLabel,CanvasAxisLabel.prototype.calculateSize=function(){this.opts.axisLabelFontSizePixels||(this.opts.axisLabelFontSizePixels=14),this.opts.axisLabelFontFamily||(this.opts.axisLabelFontFamily="sans-serif");this.opts.axisLabelFontSizePixels+this.padding,this.opts.axisLabelFontSizePixels+this.padding;"left"==this.position||"right"==this.position?(this.width=this.opts.axisLabelFontSizePixels+this.padding,this.height=0):(this.width=0,this.height=this.opts.axisLabelFontSizePixels+this.padding)},CanvasAxisLabel.prototype.draw=function(box){this.opts.axisLabelColour||(this.opts.axisLabelColour="black");var ctx=this.plot.getCanvas().getContext("2d");ctx.save(),ctx.font=this.opts.axisLabelFontSizePixels+"px "+this.opts.axisLabelFontFamily,ctx.fillStyle=this.opts.axisLabelColour;var x,y,width=ctx.measureText(this.opts.axisLabel).width,height=this.opts.axisLabelFontSizePixels,angle=0;"top"==this.position?(x=box.left+box.width/2-width/2,y=box.top+.72*height):"bottom"==this.position?(x=box.left+box.width/2-width/2,y=box.top+box.height-.72*height):"left"==this.position?(x=box.left+.72*height,y=box.height/2+box.top+width/2,angle=-Math.PI/2):"right"==this.position&&(x=box.left+box.width-.72*height,y=box.height/2+box.top-width/2,angle=Math.PI/2),ctx.translate(x,y),ctx.rotate(angle),ctx.fillText(this.opts.axisLabel,0,0),ctx.restore()},HtmlAxisLabel.prototype=new AxisLabel,HtmlAxisLabel.prototype.constructor=HtmlAxisLabel,HtmlAxisLabel.prototype.calculateSize=function(){var elem=$('<div class="axisLabels" style="position:absolute;">'+this.opts.axisLabel+"</div>");this.plot.getPlaceholder().append(elem),this.labelWidth=elem.outerWidth(!0),this.labelHeight=elem.outerHeight(!0),elem.remove(),this.width=this.height=0,"left"==this.position||"right"==this.position?this.width=this.labelWidth+this.padding:this.height=this.labelHeight+this.padding},HtmlAxisLabel.prototype.cleanup=function(){this.elem&&this.elem.remove()},HtmlAxisLabel.prototype.draw=function(box){this.plot.getPlaceholder().find("#"+this.axisName+"Label").remove(),this.elem=$('<div id="'+this.axisName+'Label" " class="axisLabels" style="position:absolute;">'+this.opts.axisLabel+"</div>"),this.plot.getPlaceholder().append(this.elem),"top"==this.position?(this.elem.css("left",box.left+box.width/2-this.labelWidth/2+"px"),this.elem.css("top",box.top+"px")):"bottom"==this.position?(this.elem.css("left",box.left+box.width/2-this.labelWidth/2+"px"),this.elem.css("top",box.top+box.height-this.labelHeight+"px")):"left"==this.position?(this.elem.css("top",box.top+box.height/2-this.labelHeight/2+"px"),this.elem.css("left",box.left+"px")):"right"==this.position&&(this.elem.css("top",box.top+box.height/2-this.labelHeight/2+"px"),this.elem.css("left",box.left+box.width-this.labelWidth+"px"))},CssTransformAxisLabel.prototype=new HtmlAxisLabel,CssTransformAxisLabel.prototype.constructor=CssTransformAxisLabel,CssTransformAxisLabel.prototype.calculateSize=function(){HtmlAxisLabel.prototype.calculateSize.call(this),this.width=this.height=0,"left"==this.position||"right"==this.position?this.width=this.labelHeight+this.padding:this.height=this.labelHeight+this.padding},CssTransformAxisLabel.prototype.transforms=function(degrees,x,y){var stransforms={"-moz-transform":"","-webkit-transform":"","-o-transform":"","-ms-transform":""};if(0!=x||0!=y){var stdTranslate=" translate("+x+"px, "+y+"px)";stransforms["-moz-transform"]+=stdTranslate,stransforms["-webkit-transform"]+=stdTranslate,stransforms["-o-transform"]+=stdTranslate,stransforms["-ms-transform"]+=stdTranslate}if(0!=degrees){var stdRotate=" rotate("+degrees+"deg)";stransforms["-moz-transform"]+=stdRotate,stransforms["-webkit-transform"]+=stdRotate,stransforms["-o-transform"]+=stdRotate,stransforms["-ms-transform"]+=stdRotate}var s="top: 0; left: 0; ";for(var prop in stransforms)stransforms[prop]&&(s+=prop+":"+stransforms[prop]+";");return s+=";"},CssTransformAxisLabel.prototype.calculateOffsets=function(box){var offsets={x:0,y:0,degrees:0};return"bottom"==this.position?(offsets.x=box.left+box.width/2-this.labelWidth/2,offsets.y=box.top+box.height-this.labelHeight):"top"==this.position?(offsets.x=box.left+box.width/2-this.labelWidth/2,offsets.y=box.top):"left"==this.position?(offsets.degrees=-90,offsets.x=box.left-this.labelWidth/2+this.labelHeight/2,offsets.y=box.height/2+box.top):"right"==this.position&&(offsets.degrees=90,offsets.x=box.left+box.width-this.labelWidth/2-this.labelHeight/2,offsets.y=box.height/2+box.top),offsets.x=Math.round(offsets.x),offsets.y=Math.round(offsets.y),offsets},CssTransformAxisLabel.prototype.draw=function(box){this.plot.getPlaceholder().find("."+this.axisName+"Label").remove();var offsets=this.calculateOffsets(box);this.elem=$('<div class="axisLabels '+this.axisName+'Label" style="position:absolute; '+this.transforms(offsets.degrees,offsets.x,offsets.y)+'">'+this.opts.axisLabel+"</div>"),this.plot.getPlaceholder().append(this.elem)},IeTransformAxisLabel.prototype=new CssTransformAxisLabel,IeTransformAxisLabel.prototype.constructor=IeTransformAxisLabel,IeTransformAxisLabel.prototype.transforms=function(degrees,x,y){var s="";if(0!=degrees){for(var rotation=degrees/90;0>rotation;)rotation+=4;s+=" filter: progid:DXImageTransform.Microsoft.BasicImage(rotation="+rotation+"); ",this.requiresResize="right"==this.position}return 0!=x&&(s+="left: "+x+"px; "),0!=y&&(s+="top: "+y+"px; "),s},IeTransformAxisLabel.prototype.calculateOffsets=function(box){var offsets=CssTransformAxisLabel.prototype.calculateOffsets.call(this,box);
return"top"==this.position?offsets.y=box.top+1:"left"==this.position?(offsets.x=box.left,offsets.y=box.height/2+box.top-this.labelWidth/2):"right"==this.position&&(offsets.x=box.left+box.width-this.labelHeight,offsets.y=box.height/2+box.top-this.labelWidth/2),offsets},IeTransformAxisLabel.prototype.draw=function(box){CssTransformAxisLabel.prototype.draw.call(this,box),this.requiresResize&&(this.elem=this.plot.getPlaceholder().find("."+this.axisName+"Label"),this.elem.css("width",this.labelWidth),this.elem.css("height",this.labelHeight))},$.plot.plugins.push({init:init,options:options,name:"axisLabels",version:"2.0"})}(jQuery),function($){var defaultOptions={tooltip:!1,tooltipOpts:{id:"flotTip",content:"%s | X: %x | Y: %y",xDateFormat:null,yDateFormat:null,monthNames:null,dayNames:null,shifts:{x:10,y:20},defaultTheme:!0,lines:{track:!1,threshold:.05},onHover:function(){},$compat:!1}},FlotTooltip=function(plot){this.tipPosition={x:0,y:0},this.init(plot)};FlotTooltip.prototype.init=function(plot){function mouseMove(e){var pos={};pos.x=e.pageX,pos.y=e.pageY,plot.setTooltipPosition(pos)}function plothover(event,pos,item){var lineDistance=function(p1x,p1y,p2x,p2y){return Math.sqrt((p2x-p1x)*(p2x-p1x)+(p2y-p1y)*(p2y-p1y))},dotLineLength=function(x,y,x0,y0,x1,y1,o){if(!o||(o=function(x,y,x0,y0,x1,y1){if("undefined"!=typeof x0)return{x:x0,y:y};if("undefined"!=typeof y0)return{x:x,y:y0};var left,tg=-1/((y1-y0)/(x1-x0));return{x:left=(x1*(x*tg-y+y0)+x0*(x*-tg+y-y1))/(tg*(x1-x0)+y0-y1),y:tg*left-tg*x+y}}(x,y,x0,y0,x1,y1),o.x>=Math.min(x0,x1)&&o.x<=Math.max(x0,x1)&&o.y>=Math.min(y0,y1)&&o.y<=Math.max(y0,y1))){var a=y0-y1,b=x1-x0,c=x0*y1-y0*x1;return Math.abs(a*x+b*y+c)/Math.sqrt(a*a+b*b)}var l1=lineDistance(x,y,x0,y0),l2=lineDistance(x,y,x1,y1);return l1>l2?l2:l1};if(item)plot.showTooltip(item,pos);else if(that.plotOptions.series.lines.show&&that.tooltipOptions.lines.track===!0){var closestTrace={distance:-1};$.each(plot.getData(),function(i,series){for(var xBeforeIndex=0,xAfterIndex=-1,j=1;j<series.data.length;j++)series.data[j-1][0]<=pos.x&&series.data[j][0]>=pos.x&&(xBeforeIndex=j-1,xAfterIndex=j);if(-1===xAfterIndex)return void plot.hideTooltip();var pointPrev={x:series.data[xBeforeIndex][0],y:series.data[xBeforeIndex][1]},pointNext={x:series.data[xAfterIndex][0],y:series.data[xAfterIndex][1]},distToLine=dotLineLength(pos.x,pos.y,pointPrev.x,pointPrev.y,pointNext.x,pointNext.y,!1);if(distToLine<that.tooltipOptions.lines.threshold){var closestIndex=lineDistance(pointPrev.x,pointPrev.y,pos.x,pos.y)<lineDistance(pos.x,pos.y,pointNext.x,pointNext.y)?xBeforeIndex:xAfterIndex,pointOnLine=(series.datapoints.pointsize,[pos.x,pointPrev.y+(pointNext.y-pointPrev.y)*((pos.x-pointPrev.x)/(pointNext.x-pointPrev.x))]),item={datapoint:pointOnLine,dataIndex:closestIndex,series:series,seriesIndex:i};(-1===closestTrace.distance||distToLine<closestTrace.distance)&&(closestTrace={distance:distToLine,item:item})}}),-1!==closestTrace.distance?plot.showTooltip(closestTrace.item,pos):plot.hideTooltip()}else plot.hideTooltip()}var that=this,plotPluginsLength=$.plot.plugins.length;if(this.plotPlugins=[],plotPluginsLength)for(var p=0;plotPluginsLength>p;p++)this.plotPlugins.push($.plot.plugins[p].name);plot.hooks.bindEvents.push(function(plot,eventHolder){if(that.plotOptions=plot.getOptions(),that.plotOptions.tooltip!==!1&&"undefined"!=typeof that.plotOptions.tooltip){that.tooltipOptions=that.plotOptions.tooltipOpts,that.tooltipOptions.$compat?(that.wfunc="width",that.hfunc="height"):(that.wfunc="innerWidth",that.hfunc="innerHeight");{that.getDomElement()}$(plot.getPlaceholder()).bind("plothover",plothover),$(eventHolder).bind("mousemove",mouseMove)}}),plot.hooks.shutdown.push(function(plot,eventHolder){$(plot.getPlaceholder()).unbind("plothover",plothover),$(eventHolder).unbind("mousemove",mouseMove)}),plot.setTooltipPosition=function(pos){var $tip=that.getDomElement(),totalTipWidth=$tip.outerWidth()+that.tooltipOptions.shifts.x,totalTipHeight=$tip.outerHeight()+that.tooltipOptions.shifts.y;pos.x-$(window).scrollLeft()>$(window)[that.wfunc]()-totalTipWidth&&(pos.x-=totalTipWidth),pos.y-$(window).scrollTop()>$(window)[that.hfunc]()-totalTipHeight&&(pos.y-=totalTipHeight),that.tipPosition.x=pos.x,that.tipPosition.y=pos.y},plot.showTooltip=function(target,position){var $tip=that.getDomElement(),tipText=that.stringFormat(that.tooltipOptions.content,target);$tip.html(tipText),plot.setTooltipPosition({x:position.pageX,y:position.pageY}),$tip.css({left:that.tipPosition.x+that.tooltipOptions.shifts.x,top:that.tipPosition.y+that.tooltipOptions.shifts.y}).show(),"function"==typeof that.tooltipOptions.onHover&&that.tooltipOptions.onHover(target,$tip)},plot.hideTooltip=function(){that.getDomElement().hide().html("")}},FlotTooltip.prototype.getDomElement=function(){var $tip=$("#"+this.tooltipOptions.id);return 0===$tip.length&&($tip=$("<div />").attr("id",this.tooltipOptions.id),$tip.appendTo("body").hide().css({position:"absolute"}),this.tooltipOptions.defaultTheme&&$tip.css({background:"#fff","z-index":"1040",padding:"0.4em 0.6em","border-radius":"0.5em","font-size":"0.8em",border:"1px solid #111",display:"none","white-space":"nowrap"})),$tip},FlotTooltip.prototype.stringFormat=function(content,item){var x,y,customText,p,percentPattern=/%p\.{0,1}(\d{0,})/,seriesPattern=/%s/,xLabelPattern=/%lx/,yLabelPattern=/%ly/,xPattern=/%x\.{0,1}(\d{0,})/,yPattern=/%y\.{0,1}(\d{0,})/,xPatternWithoutPrecision="%x",yPatternWithoutPrecision="%y",customTextPattern="%ct";if("undefined"!=typeof item.series.threshold?(x=item.datapoint[0],y=item.datapoint[1],customText=item.datapoint[2]):"undefined"!=typeof item.series.lines&&item.series.lines.steps?(x=item.series.datapoints.points[2*item.dataIndex],y=item.series.datapoints.points[2*item.dataIndex+1],customText=""):(x=item.series.data[item.dataIndex][0],y=item.series.data[item.dataIndex][1],customText=item.series.data[item.dataIndex][2]),null===item.series.label&&item.series.originSeries&&(item.series.label=item.series.originSeries.label),"function"==typeof content&&(content=content(item.series.label,x,y,item)),"undefined"!=typeof item.series.percent?p=item.series.percent:"undefined"!=typeof item.series.percents&&(p=item.series.percents[item.dataIndex]),"number"==typeof p&&(content=this.adjustValPrecision(percentPattern,content,p)),content="undefined"!=typeof item.series.label?content.replace(seriesPattern,item.series.label):content.replace(seriesPattern,""),content=this.hasAxisLabel("xaxis",item)?content.replace(xLabelPattern,item.series.xaxis.options.axisLabel):content.replace(xLabelPattern,""),content=this.hasAxisLabel("yaxis",item)?content.replace(yLabelPattern,item.series.yaxis.options.axisLabel):content.replace(yLabelPattern,""),this.isTimeMode("xaxis",item)&&this.isXDateFormat(item)&&(content=content.replace(xPattern,this.timestampToDate(x,this.tooltipOptions.xDateFormat,item.series.xaxis.options))),this.isTimeMode("yaxis",item)&&this.isYDateFormat(item)&&(content=content.replace(yPattern,this.timestampToDate(y,this.tooltipOptions.yDateFormat,item.series.yaxis.options))),"number"==typeof x&&(content=this.adjustValPrecision(xPattern,content,x)),"number"==typeof y&&(content=this.adjustValPrecision(yPattern,content,y)),"undefined"!=typeof item.series.xaxis.ticks){var ticks;ticks=this.hasRotatedXAxisTicks(item)?"rotatedTicks":"ticks";var tickIndex=item.dataIndex+item.seriesIndex;if(item.series.xaxis[ticks].length>tickIndex&&!this.isTimeMode("xaxis",item)){var valueX=this.isCategoriesMode("xaxis",item)?item.series.xaxis[ticks][tickIndex].label:item.series.xaxis[ticks][tickIndex].v;valueX===x&&(content=content.replace(xPattern,item.series.xaxis[ticks][tickIndex].label))}}if("undefined"!=typeof item.series.yaxis.ticks)for(var index in item.series.yaxis.ticks)if(item.series.yaxis.ticks.hasOwnProperty(index)){var valueY=this.isCategoriesMode("yaxis",item)?item.series.yaxis.ticks[index].label:item.series.yaxis.ticks[index].v;valueY===y&&(content=content.replace(yPattern,item.series.yaxis.ticks[index].label))}return"undefined"!=typeof item.series.xaxis.tickFormatter&&(content=content.replace(xPatternWithoutPrecision,item.series.xaxis.tickFormatter(x,item.series.xaxis).replace(/\$/g,"$$"))),"undefined"!=typeof item.series.yaxis.tickFormatter&&(content=content.replace(yPatternWithoutPrecision,item.series.yaxis.tickFormatter(y,item.series.yaxis).replace(/\$/g,"$$"))),customText&&(content=content.replace(customTextPattern,customText)),content},FlotTooltip.prototype.isTimeMode=function(axisName,item){return"undefined"!=typeof item.series[axisName].options.mode&&"time"===item.series[axisName].options.mode},FlotTooltip.prototype.isXDateFormat=function(){return"undefined"!=typeof this.tooltipOptions.xDateFormat&&null!==this.tooltipOptions.xDateFormat},FlotTooltip.prototype.isYDateFormat=function(){return"undefined"!=typeof this.tooltipOptions.yDateFormat&&null!==this.tooltipOptions.yDateFormat},FlotTooltip.prototype.isCategoriesMode=function(axisName,item){return"undefined"!=typeof item.series[axisName].options.mode&&"categories"===item.series[axisName].options.mode},FlotTooltip.prototype.timestampToDate=function(tmst,dateFormat,options){var theDate=$.plot.dateGenerator(tmst,options);return $.plot.formatDate(theDate,dateFormat,this.tooltipOptions.monthNames,this.tooltipOptions.dayNames)},FlotTooltip.prototype.adjustValPrecision=function(pattern,content,value){var precision,matchResult=content.match(pattern);return null!==matchResult&&""!==RegExp.$1&&(precision=RegExp.$1,value=value.toFixed(precision),content=content.replace(pattern,value)),content},FlotTooltip.prototype.hasAxisLabel=function(axisName,item){return-1!==$.inArray(this.plotPlugins,"axisLabels")&&"undefined"!=typeof item.series[axisName].options.axisLabel&&item.series[axisName].options.axisLabel.length>0},FlotTooltip.prototype.hasRotatedXAxisTicks=function(item){return-1!==$.inArray(this.plotPlugins,"tickRotor")&&"undefined"!=typeof item.series.xaxis.rotatedTicks};var init=function(plot){new FlotTooltip(plot)};$.plot.plugins.push({init:init,options:defaultOptions,name:"tooltip",version:"0.8.4"})}(jQuery),function($){"use strict";var lock=function(func){var free,locked,queuedArgsToReplay;return free=function(){locked=!1},function(){var args=toArray(arguments);if(locked)return void(queuedArgsToReplay=args);locked=!0;var that=this;args.unshift(function replayOrFree(){if(queuedArgsToReplay){var replayArgs=queuedArgsToReplay;queuedArgsToReplay=void 0,replayArgs.unshift(replayOrFree),func.apply(that,replayArgs)}else locked=!1}),func.apply(this,args)}},toArray=function(args){var result;return result=Array.prototype.slice.call(args)},getStyles=function(){var color;return color=$("<div></div>").css(["color"]).color,"undefined"!=typeof color?function($el,properties){return $el.css(properties)}:function($el,properties){var styles;return styles={},$.each(properties,function(i,property){styles[property]=$el.css(property)}),styles}}(),identity=function(obj){return obj},memoize=function(func){var memo={};return function(term,callback){memo[term]?callback(memo[term]):func.call(this,term,function(data){memo[term]=(memo[term]||[]).concat(data),callback.apply(null,arguments)})}},include=function(array,value){var i,l;if(array.indexOf)return-1!=array.indexOf(value);for(i=0,l=array.length;l>i;i++)if(array[i]===value)return!0;return!1},Completer=function(){function Completer($el){var focus;this.el=$el.get(0),focus=this.el===document.activeElement,this.$el=wrapElement($el),this.id="textComplete"+_id++,this.strategies=[],focus?(this.initialize(),this.$el.focus()):this.$el.one("focus.textComplete",$.proxy(this.initialize,this))}var html,css,$baseWrapper,$baseList,_id;html={wrapper:'<div class="textcomplete-wrapper"></div>',list:'<ul class="dropdown-menu"></ul>'},css={wrapper:{position:"relative"},list:{position:"absolute",left:0,zIndex:"100",display:"none"}},$baseWrapper=$(html.wrapper).css(css.wrapper),$baseList=$(html.list).css(css.list),_id=0,$.extend(Completer.prototype,{initialize:function(){var $list,globalEvents;$list=$baseList.clone(),this.listView=new ListView($list,this),this.$el.before($list).on({"keyup.textComplete":$.proxy(this.onKeyup,this),"keydown.textComplete":$.proxy(this.listView.onKeydown,this.listView)}),globalEvents={},globalEvents["click."+this.id]=$.proxy(this.onClickDocument,this),globalEvents["keyup."+this.id]=$.proxy(this.onKeyupDocument,this),$(document).on(globalEvents)},register:function(strategies){this.strategies=this.strategies.concat(strategies)},renderList:function(data){this.clearAtNext&&(this.listView.clear(),this.clearAtNext=!1),data.length&&(this.listView.shown||(this.listView.setPosition(this.getCaretPosition()).clear().activate(),this.listView.strategy=this.strategy),data=data.slice(0,this.strategy.maxCount),this.listView.render(data)),!this.listView.data.length&&this.listView.shown&&this.listView.deactivate()},searchCallbackFactory:function(free){var self=this;return function(data,keep){self.renderList(data),keep||(free(),self.clearAtNext=!0)}},onKeyup:function(e){var searchQuery,term;if(!this.skipSearch(e))if(searchQuery=this.extractSearchQuery(this.getTextFromHeadToCaret()),searchQuery.length){if(term=searchQuery[1],this.term===term)return;this.term=term,this.search(searchQuery)}else this.term=null,this.listView.deactivate()},skipSearch:function(e){if(this.skipNextKeyup)return this.skipNextKeyup=!1,!0;switch(e.keyCode){case 40:case 38:return!0}if(e.ctrlKey)switch(e.keyCode){case 78:case 80:return!0}},onSelect:function(value){var pre,post,newSubStr;pre=this.getTextFromHeadToCaret(),post=this.el.value.substring(this.el.selectionEnd),newSubStr=this.strategy.replace(value),$.isArray(newSubStr)&&(post=newSubStr[1]+post,newSubStr=newSubStr[0]),pre=pre.replace(this.strategy.match,newSubStr),this.$el.val(pre+post).trigger("change").trigger("textComplete:select",value),this.el.focus(),this.el.selectionStart=this.el.selectionEnd=pre.length,this.skipNextKeyup=!0},onClickDocument:function(e){e.originalEvent&&!e.originalEvent.keepTextCompleteDropdown&&this.listView.deactivate()},onKeyupDocument:function(e){this.listView.shown&&27===e.keyCode&&(this.listView.deactivate(),this.$el.focus())},destroy:function(){var $wrapper;this.$el.off(".textComplete"),$(document).off("."+this.id),this.listView&&this.listView.destroy(),$wrapper=this.$el.parent(),$wrapper.after(this.$el).remove(),this.$el.data("textComplete",void 0),this.$el=null},getCaretPosition:function(){var properties,css,$div,$span,position,dir,scrollbar;if(dir=this.$el.attr("dir")||this.$el.css("direction"),properties=["border-width","font-family","font-size","font-style","font-variant","font-weight","height","letter-spacing","word-spacing","line-height","text-decoration","text-align","width","padding-top","padding-right","padding-bottom","padding-left","margin-top","margin-right","margin-bottom","margin-left"],scrollbar=this.$el[0].scrollHeight>this.$el[0].offsetHeight,css=$.extend({position:"absolute",overflow:scrollbar?"scroll":"auto","white-space":"pre-wrap",top:0,left:-9999,direction:dir},getStyles(this.$el,properties)),$div=$("<div></div>").css(css).text(this.getTextFromHeadToCaret()),$span=$("<span></span>").text(".").appendTo($div),this.$el.before($div),position=$span.position(),position.top+=$span.height()-this.$el.scrollTop(),"rtl"===dir&&(position.left-=this.listView.$el.width()),"top"===this.strategy.placement){var fontSize=parseInt(this.$el.css("font-size"));position={bottom:$div.height(),left:position.left-fontSize}}return $div.remove(),position},getTextFromHeadToCaret:function(){var text,selectionEnd,range;return selectionEnd=this.el.selectionEnd,"number"==typeof selectionEnd?text=this.el.value.substring(0,selectionEnd):document.selection&&(range=this.el.createTextRange(),range.moveStart("character",0),range.moveEnd("textedit"),text=range.text),text},extractSearchQuery:function(text){var i,l,strategy,match;for(i=0,l=this.strategies.length;l>i;i++)if(strategy=this.strategies[i],match=text.match(strategy.match))return[strategy,match[strategy.index]];return[]},search:lock(function(free,searchQuery){var term;this.strategy=searchQuery[0],term=searchQuery[1],this.strategy.search(term,this.searchCallbackFactory(free))})});var wrapElement=function($el){return $el.wrap($baseWrapper.clone().css("display",$el.css("display")))};return Completer}(),ListView=function(){function ListView($el,completer){this.data=[],this.$el=$el,this.index=0,this.completer=completer,this.$el.on("click.textComplete","li.textcomplete-item",$.proxy(this.onClick,this))}return $.extend(ListView.prototype,{shown:!1,render:function(data){var html,i,l,index,val;for(html="",i=0,l=data.length;l>i&&(val=data[i],include(this.data,val)||(index=this.data.length,this.data.push(val),html+='<li class="textcomplete-item" data-index="'+index+'"><a>',html+=this.strategy.template(val),html+="</a></li>",this.data.length!==this.strategy.maxCount));i++);this.$el.append(html),this.data.length?this.activateIndexedItem():this.deactivate()},clear:function(){return this.data=[],this.$el.html(""),this.index=0,this},activateIndexedItem:function(){this.$el.find(".active").removeClass("active"),this.getActiveItem().addClass("active")},getActiveItem:function(){return $(this.$el.children().get(this.index))},activate:function(){return this.shown||(this.$el.show(),this.completer.$el.trigger("textComplete:show"),this.shown=!0),this},deactivate:function(){return this.shown&&(this.$el.hide(),this.completer.$el.trigger("textComplete:hide"),this.shown=!1,this.data=[],this.index=null),this},setPosition:function(position){return this.$el.css(position),this},select:function(index){var self=this;this.completer.onSelect(this.data[index]),setTimeout(function(){self.deactivate()},0)},onKeydown:function(e){this.shown&&(38===e.keyCode||e.ctrlKey&&80===e.keyCode?(e.preventDefault(),0===this.index?this.index=this.data.length-1:this.index-=1,this.activateIndexedItem()):40===e.keyCode||e.ctrlKey&&78===e.keyCode?(e.preventDefault(),this.index===this.data.length-1?this.index=0:this.index+=1,this.activateIndexedItem()):(13===e.keyCode||9===e.keyCode)&&(e.preventDefault(),this.select(parseInt(this.getActiveItem().data("index"),10))))},onClick:function(e){var $e=$(e.target);e.originalEvent.keepTextCompleteDropdown=!0,$e.hasClass("textcomplete-item")||($e=$e.parents("li.textcomplete-item")),this.select(parseInt($e.data("index"),10))},destroy:function(){this.deactivate(),this.$el.off("click.textComplete").remove(),this.$el=null}}),ListView}();$.fn.textcomplete=function(strategies){var i,l,strategy,dataKey;if(dataKey="textComplete","destroy"===strategies)return this.each(function(){var completer=$(this).data(dataKey);completer&&completer.destroy()});for(i=0,l=strategies.length;l>i;i++)strategy=strategies[i],strategy.template||(strategy.template=identity),null==strategy.index&&(strategy.index=2),strategy.cache&&(strategy.search=memoize(strategy.search)),strategy.maxCount||(strategy.maxCount=10);return this.each(function(){var $this,completer;$this=$(this),completer=$this.data(dataKey),completer||(completer=new Completer($this),$this.data(dataKey,completer)),completer.register(strategies)})}}(window.jQuery||window.Zepto),function($){$.fn.markItUp=function(settings,extraSettings){var method,params,options,ctrlKey,shiftKey,altKey;ctrlKey=shiftKey=altKey=!1,"string"==typeof settings&&(method=settings,params=extraSettings),options={id:"",nameSpace:"",root:"",previewHandler:!1,previewInWindow:"",previewInElement:"",previewAutoRefresh:!0,previewPosition:"after",previewTemplatePath:"~/templates/preview.html",previewParser:!1,previewParserPath:"",previewParserVar:"data",resizeHandle:!0,beforeInsert:"",afterInsert:"",onEnter:{},onShiftEnter:{},onCtrlEnter:{},onTab:{},markupSet:[{}]},$.extend(options,settings,extraSettings),options.root||$("script").each(function(a,tag){miuScript=$(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/),null!==miuScript&&(options.root=miuScript[1])});var uaMatch=function(ua){ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"}},matched=uaMatch(navigator.userAgent),browser={};return matched.browser&&(browser[matched.browser]=!0,browser.version=matched.version),browser.chrome?browser.webkit=!0:browser.webkit&&(browser.safari=!0),this.each(function(){function localize(data,inText){return inText?data.replace(/("|')~\//g,"$1"+options.root):data.replace(/^~\//,options.root)}function init(){id="",nameSpace="",options.id?id='id="'+options.id+'"':$$.attr("id")&&(id='id="markItUp'+$$.attr("id").substr(0,1).toUpperCase()+$$.attr("id").substr(1)+'"'),options.nameSpace&&(nameSpace='class="'+options.nameSpace+'"'),$$.wrap("<div "+nameSpace+"></div>"),$$.wrap("<div "+id+' class="markItUp"></div>'),$$.wrap('<div class="markItUpContainer"></div>'),$$.addClass("markItUpEditor"),header=$('<div class="markItUpHeader"></div>').insertBefore($$),$(dropMenus(options.markupSet)).appendTo(header),footer=$('<div class="markItUpFooter"></div>').insertAfter($$),options.resizeHandle===!0&&browser.safari!==!0&&(resizeHandle=$('<div class="markItUpResizeHandle"></div>').insertAfter($$).bind("mousedown.markItUp",function(e){var mouseMove,mouseUp,h=$$.height(),y=e.clientY;mouseMove=function(e){return $$.css("height",Math.max(20,e.clientY+h-y)+"px"),!1},mouseUp=function(){return $("html").unbind("mousemove.markItUp",mouseMove).unbind("mouseup.markItUp",mouseUp),!1},$("html").bind("mousemove.markItUp",mouseMove).bind("mouseup.markItUp",mouseUp)}),footer.append(resizeHandle)),$$.bind("keydown.markItUp",keyPressed).bind("keyup",keyPressed),$$.bind("insertion.markItUp",function(e,settings){settings.target!==!1&&get(),textarea===$.markItUp.focused&&markup(settings)}),$$.bind("focus.markItUp",function(){$.markItUp.focused=this}),options.previewInElement&&refreshPreview()}function dropMenus(markupSet){var ul=$("<ul></ul>"),i=0;return $("li:hover > ul",ul).css("display","block"),$.each(markupSet,function(){var button=this,t="",title,li,j;if(title=button.key?(button.name||"")+" [Ctrl+"+button.key+"]":button.name||"",key=button.key?'accesskey="'+button.key+'"':"",button.separator)li=$('<li class="markItUpSeparator">'+(button.separator||"")+"</li>").appendTo(ul);else{for(i++,j=levels.length-1;j>=0;j--)t+=levels[j]+"-";li=$('<li class="markItUpButton markItUpButton'+t+i+" "+(button.className||"")+'"><a href="" '+key+' title="'+title+'">'+(button.name||"")+"</a></li>").bind("contextmenu.markItUp",function(){return!1}).bind("click.markItUp",function(e){e.preventDefault()}).bind("focusin.markItUp",function(){$$.focus()}).bind("mouseup",function(){return button.call&&eval(button.call)(),setTimeout(function(){markup(button)},1),!1}).bind("mouseenter.markItUp",function(){$("> ul",this).show(),$(document).one("click",function(){$("ul ul",header).hide()})}).bind("mouseleave.markItUp",function(){$("> ul",this).hide()}).appendTo(ul),button.dropMenu&&(levels.push(i),$(li).addClass("markItUpDropMenu").append(dropMenus(button.dropMenu)))}}),levels.pop(),ul}function magicMarkups(string){return string?(string=string.toString(),string=string.replace(/\(\!\(([\s\S]*?)\)\!\)/g,function(x,a){var b=a.split("|!|");return altKey===!0?void 0!==b[1]?b[1]:b[0]:void 0===b[1]?"":b[0]}),string=string.replace(/\[\!\[([\s\S]*?)\]\!\]/g,function(x,a){var b=a.split(":!:");return abort===!0?!1:(value=prompt(b[0],b[1]?b[1]:""),null===value&&(abort=!0),value)})):""}function prepare(action){return $.isFunction(action)&&(action=action(hash)),magicMarkups(action)}function build(string){var openWith=prepare(clicked.openWith),placeHolder=prepare(clicked.placeHolder),replaceWith=prepare(clicked.replaceWith),closeWith=prepare(clicked.closeWith),openBlockWith=prepare(clicked.openBlockWith),closeBlockWith=prepare(clicked.closeBlockWith),multiline=clicked.multiline;if(""!==replaceWith)block=openWith+replaceWith+closeWith;else if(""===selection&&""!==placeHolder)block=openWith+placeHolder+closeWith;else{string=string||selection;var lines=[string],blocks=[];multiline===!0&&(lines=string.split(/\r?\n/));for(var l=0;l<lines.length;l++){line=lines[l];var trailingSpaces;blocks.push((trailingSpaces=line.match(/ *$/))?openWith+line.replace(/ *$/g,"")+closeWith+trailingSpaces:openWith+line+closeWith)}block=blocks.join("\n")}return block=openBlockWith+block+closeBlockWith,{block:block,openBlockWith:openBlockWith,openWith:openWith,replaceWith:replaceWith,placeHolder:placeHolder,closeWith:closeWith,closeBlockWith:closeBlockWith}}function markup(button){var len,j,n,i;if(hash=clicked=button,get(),$.extend(hash,{line:"",root:options.root,textarea:textarea,selection:selection||"",caretPosition:caretPosition,ctrlKey:ctrlKey,shiftKey:shiftKey,altKey:altKey}),prepare(options.beforeInsert),prepare(clicked.beforeInsert),(ctrlKey===!0&&shiftKey===!0||button.multiline===!0)&&prepare(clicked.beforeMultiInsert),$.extend(hash,{line:1}),ctrlKey===!0&&shiftKey===!0){for(lines=selection.split(/\r?\n/),j=0,n=lines.length,i=0;n>i;i++)""!==$.trim(lines[i])?($.extend(hash,{line:++j,selection:lines[i]}),lines[i]=build(lines[i]).block):lines[i]="";string={block:lines.join("\n")},start=caretPosition,len=string.block.length+(browser.opera?n-1:0)}else ctrlKey===!0?(string=build(selection),start=caretPosition+string.openWith.length,len=string.block.length-string.openWith.length-string.closeWith.length,len-=string.block.match(/ $/)?1:0,len-=fixIeBug(string.block)):shiftKey===!0?(string=build(selection),start=caretPosition,len=string.block.length,len-=fixIeBug(string.block)):(string=build(selection),start=caretPosition+string.block.length,len=0,start-=fixIeBug(string.block));""===selection&&""===string.replaceWith&&(caretOffset+=fixOperaBug(string.block),start=caretPosition+string.openBlockWith.length+string.openWith.length,len=string.block.length-string.openBlockWith.length-string.openWith.length-string.closeWith.length-string.closeBlockWith.length,caretOffset=$$.val().substring(caretPosition,$$.val().length).length,caretOffset-=fixOperaBug($$.val().substring(0,caretPosition))),$.extend(hash,{caretPosition:caretPosition,scrollPosition:scrollPosition}),string.block!==selection&&abort===!1?(insert(string.block),set(start,len)):caretOffset=-1,get(),$.extend(hash,{line:"",selection:selection}),(ctrlKey===!0&&shiftKey===!0||button.multiline===!0)&&prepare(clicked.afterMultiInsert),prepare(clicked.afterInsert),prepare(options.afterInsert),previewWindow&&options.previewAutoRefresh&&refreshPreview(),shiftKey=altKey=ctrlKey=abort=!1}function fixOperaBug(string){return browser.opera?string.length-string.replace(/\n*/g,"").length:0}function fixIeBug(string){return browser.msie?string.length-string.replace(/\r*/g,"").length:0}function insert(block){if(document.selection){var newSelection=document.selection.createRange();newSelection.text=block}else textarea.value=textarea.value.substring(0,caretPosition)+block+textarea.value.substring(caretPosition+selection.length,textarea.value.length)}function set(start,len){if(textarea.createTextRange){if(browser.opera&&browser.version>=9.5&&0==len)return!1;range=textarea.createTextRange(),range.collapse(!0),range.moveStart("character",start),range.moveEnd("character",len),range.select()}else textarea.setSelectionRange&&textarea.setSelectionRange(start,start+len);textarea.scrollTop=scrollPosition,textarea.focus()}function get(){if(textarea.focus(),scrollPosition=textarea.scrollTop,document.selection)if(selection=document.selection.createRange().text,browser.msie){var range=document.selection.createRange(),rangeCopy=range.duplicate();for(rangeCopy.moveToElementText(textarea),caretPosition=-1;rangeCopy.inRange(range);)rangeCopy.moveStart("character"),caretPosition++}else caretPosition=textarea.selectionStart;else caretPosition=textarea.selectionStart,selection=textarea.value.substring(caretPosition,textarea.selectionEnd);return selection}function preview(){"function"==typeof options.previewHandler?previewWindow=!0:options.previewInElement?previewWindow=$(options.previewInElement):!previewWindow||previewWindow.closed?options.previewInWindow?(previewWindow=window.open("","preview",options.previewInWindow),$(window).unload(function(){previewWindow.close()})):(iFrame=$('<iframe class="markItUpPreviewFrame"></iframe>'),"after"==options.previewPosition?iFrame.insertAfter(footer):iFrame.insertBefore(header),previewWindow=iFrame[iFrame.length-1].contentWindow||frame[iFrame.length-1]):altKey===!0&&(iFrame?iFrame.remove():previewWindow.close(),previewWindow=iFrame=!1),options.previewAutoRefresh||refreshPreview(),options.previewInWindow&&previewWindow.focus()}function refreshPreview(){renderPreview()}function renderPreview(){if(options.previewHandler&&"function"==typeof options.previewHandler)options.previewHandler($$.val());else if(options.previewParser&&"function"==typeof options.previewParser){var data=options.previewParser($$.val());writeInPreview(localize(data,1))}else""!==options.previewParserPath?$.ajax({type:"POST",dataType:"text",global:!1,url:options.previewParserPath,data:options.previewParserVar+"="+encodeURIComponent($$.val()),success:function(data){writeInPreview(localize(data,1))}}):template||$.ajax({url:options.previewTemplatePath,dataType:"text",global:!1,success:function(data){writeInPreview(localize(data,1).replace(/<!-- content -->/g,$$.val()))}});return!1}function writeInPreview(data){if(options.previewInElement)$(options.previewInElement).html(data);else if(previewWindow&&previewWindow.document){try{sp=previewWindow.document.documentElement.scrollTop}catch(e){sp=0}previewWindow.document.open(),previewWindow.document.write(data),previewWindow.document.close(),previewWindow.document.documentElement.scrollTop=sp}}function keyPressed(e){if(shiftKey=e.shiftKey,altKey=e.altKey,ctrlKey=e.altKey&&e.ctrlKey?!1:e.ctrlKey||e.metaKey,"keydown"===e.type){if(ctrlKey===!0&&(li=$('a[accesskey="'+(13==e.keyCode?"\\n":String.fromCharCode(e.keyCode))+'"]',header).parent("li"),0!==li.length))return ctrlKey=!1,setTimeout(function(){li.triggerHandler("mouseup")},1),!1;if(13===e.keyCode||10===e.keyCode)return ctrlKey===!0?(ctrlKey=!1,markup(options.onCtrlEnter),options.onCtrlEnter.keepDefault):shiftKey===!0?(shiftKey=!1,markup(options.onShiftEnter),options.onShiftEnter.keepDefault):(markup(options.onEnter),options.onEnter.keepDefault);if(9===e.keyCode)return 1==shiftKey||1==ctrlKey||1==altKey?!1:-1!==caretOffset?(get(),caretOffset=$$.val().length-caretOffset,set(caretOffset,0),caretOffset=-1,!1):(markup(options.onTab),options.onTab.keepDefault)}}function remove(){$$.unbind(".markItUp").removeClass("markItUpEditor"),$$.parent("div").parent("div.markItUp").parent("div").replaceWith($$),$$.data("markItUp",null)}var $$,textarea,levels,scrollPosition,caretPosition,caretOffset,clicked,hash,header,footer,previewWindow,template,iFrame,abort;if($$=$(this),textarea=this,levels=[],abort=!1,scrollPosition=caretPosition=0,caretOffset=-1,options.previewParserPath=localize(options.previewParserPath),options.previewTemplatePath=localize(options.previewTemplatePath),method)switch(method){case"remove":remove();break;case"insert":markup(params);break;default:$.error("Method "+method+" does not exist on jQuery.markItUp")}else init()})},$.fn.markItUpRemove=function(){return this.each(function(){$(this).markItUp("remove")})},$.markItUp=function(settings){var options={target:!1};return $.extend(options,settings),options.target?$(options.target).each(function(){$(this).focus(),$(this).trigger("insertion",[options])}):void $("textarea").trigger("insertion",[options])}}(jQuery),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");
j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),!function(e,t,a){!function(t){var o="function"==typeof define&&define.amd,n="https:"==a.location.protocol?"https:":"http:",i="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.12/jquery.mousewheel.min.js";o||e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+n+"//"+i+"%3E%3C/script%3E")),t()}(function(){var o,n="mCustomScrollbar",i="mCS",r=".mCustomScrollbar",l={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,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:!0},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},s=0,c={},d=t.attachEvent&&!t.addEventListener?1:0,u=!1,f=["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"],h={init:function(t){var t=e.extend(!0,{},l,t),a=m.call(this);if(t.live){var o=t.liveSelector||this.selector||r,n=e(o);if("off"===t.live)return void g(o);c[o]=setTimeout(function(){n.mCustomScrollbar(t),"once"===t.live&&n.length&&g(o)},500)}else g(o);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":v(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=x(t.scrollButtons.scrollType),p(t),e(a).each(function(){var a=e(this);if(!a.data(i)){a.data(i,{idx:++s,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:a.css("direction"),cbOffsets:null,trigger:null});var o=a.data(i),n=o.opt,r=a.data("mcs-axis"),l=a.data("mcs-scrollbar-position"),c=a.data("mcs-theme");r&&(n.axis=r),l&&(n.scrollbarPosition=l),c&&(n.theme=c,p(n)),_.call(this),e("#mCSB_"+o.idx+"_container img:not(."+f[2]+")").addClass(f[2]),h.update.call(null,a)}})},update:function(t,a){var o=t||m.call(this);return e(o).each(function(){var t=e(this);if(t.data(i)){var o=t.data(i),n=o.opt,r=e("#mCSB_"+o.idx+"_container"),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(!r.length)return;o.tweenRunning&&Q(t),t.hasClass(f[3])&&t.removeClass(f[3]),t.hasClass(f[4])&&t.removeClass(f[4]),C.call(this),w.call(this),"y"===n.axis||n.advanced.autoExpandHorizontalScroll||r.css("width",S(r.children())),o.overflowed=k.call(this),R.call(this),n.autoDraggerLength&&y.call(this),B.call(this),O.call(this);var s=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];"x"!==n.axis&&(o.overflowed[0]?l[0].height()>l[0].parent().height()?M.call(this):(G(t,s[0].toString(),{dir:"y",dur:0,overwrite:"none"}),o.contentReset.y=null):(M.call(this),"y"===n.axis?I.call(this):"yx"===n.axis&&o.overflowed[1]&&G(t,s[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==n.axis&&(o.overflowed[1]?l[1].width()>l[1].parent().width()?M.call(this):(G(t,s[1].toString(),{dir:"x",dur:0,overwrite:"none"}),o.contentReset.x=null):(M.call(this),"x"===n.axis?I.call(this):"yx"===n.axis&&o.overflowed[0]&&G(t,s[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),a&&o&&(2===a&&n.callbacks.onImageLoad&&"function"==typeof n.callbacks.onImageLoad?n.callbacks.onImageLoad.call(this):3===a&&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)),N.call(this)}})},scrollTo:function(t,a){if("undefined"!=typeof t&&null!=t){var o=m.call(this);return e(o).each(function(){var o=e(this);if(o.data(i)){var n=o.data(i),r=n.opt,l={trigger:"external",scrollInertia:r.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},l,a),c=Y.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=X.call(this,c[0],"y"),c[1]=X.call(this,c[1],"x"),s.moveDragger&&(c[0]*=n.scrollRatio.y,c[1]*=n.scrollRatio.x),s.dur=d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==r.axis&&n.overflowed[0]&&(s.dir="y",s.overwrite="all",G(o,c[0].toString(),s)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==r.axis&&n.overflowed[1]&&(s.dir="x",s.overwrite="none",G(o,c[1].toString(),s))},s.timeout)}})}},stop:function(){var t=m.call(this);return e(t).each(function(){var t=e(this);t.data(i)&&Q(t)})},disable:function(t){var a=m.call(this);return e(a).each(function(){var a=e(this);a.data(i)&&(a.data(i),N.call(this,"remove"),I.call(this),t&&M.call(this),R.call(this,!0),a.addClass(f[3]))})},destroy:function(){var t=m.call(this);return e(t).each(function(){var a=e(this);if(a.data(i)){var o=a.data(i),r=o.opt,l=e("#mCSB_"+o.idx),s=e("#mCSB_"+o.idx+"_container"),c=e(".mCSB_"+o.idx+"_scrollbar");r.live&&g(r.liveSelector||e(t).selector),N.call(this,"remove"),I.call(this),M.call(this),a.removeData(i),$(this,"mcs"),c.remove(),s.find("img."+f[2]).removeClass(f[2]),l.replaceWith(s.contents()),a.removeClass(n+" _"+i+"_"+o.idx+" "+f[6]+" "+f[7]+" "+f[5]+" "+f[3]).addClass(f[4])}})}},m=function(){return"object"!=typeof e(this)||e(this).length<1?r:this},p=function(t){var a=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],o=["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"],n=["minimal","minimal-dark"],i=["minimal","minimal-dark"],r=["minimal","minimal-dark"];t.autoDraggerLength=e.inArray(t.theme,a)>-1?!1:t.autoDraggerLength,t.autoExpandScrollbar=e.inArray(t.theme,o)>-1?!1:t.autoExpandScrollbar,t.scrollButtons.enable=e.inArray(t.theme,n)>-1?!1:t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,i)>-1?!0:t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,r)>-1?"outside":t.scrollbarPosition},g=function(e){c[e]&&(clearTimeout(c[e]),$(c,e))},v=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},x=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},_=function(){var t=e(this),a=t.data(i),o=a.opt,r=o.autoExpandScrollbar?" "+f[1]+"_expand":"",l=["<div id='mCSB_"+a.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+a.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_vertical"+r+"'><div class='"+f[12]+"'><div id='mCSB_"+a.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+a.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+a.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_horizontal"+r+"'><div class='"+f[12]+"'><div id='mCSB_"+a.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],s="yx"===o.axis?"mCSB_vertical_horizontal":"x"===o.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===o.axis?l[0]+l[1]:"x"===o.axis?l[1]:l[0],d="yx"===o.axis?"<div id='mCSB_"+a.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",u=o.autoHideScrollbar?" "+f[6]:"",h="x"!==o.axis&&"rtl"===a.langDir?" "+f[7]:"";o.setWidth&&t.css("width",o.setWidth),o.setHeight&&t.css("height",o.setHeight),o.setLeft="y"!==o.axis&&"rtl"===a.langDir?"989999px":o.setLeft,t.addClass(n+" _"+i+"_"+a.idx+u+h).wrapInner("<div id='mCSB_"+a.idx+"' class='mCustomScrollBox mCS-"+o.theme+" "+s+"'><div id='mCSB_"+a.idx+"_container' class='mCSB_container' style='position:relative; top:"+o.setTop+"; left:"+o.setLeft+";' dir="+a.langDir+" /></div>");var m=e("#mCSB_"+a.idx),p=e("#mCSB_"+a.idx+"_container");"y"===o.axis||o.advanced.autoExpandHorizontalScroll||p.css("width",S(p.children())),"outside"===o.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addClass("mCSB_outside").after(c)):(m.addClass("mCSB_inside").append(c),p.wrap(d)),b.call(this);var g=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},S=function(t){return Math.max.apply(Math,t.map(function(){return e(this).outerWidth(!0)}).get())},w=function(){var t=e(this),a=t.data(i),o=a.opt,n=e("#mCSB_"+a.idx+"_container");o.advanced.autoExpandHorizontalScroll&&"y"!==o.axis&&n.css({position:"absolute",width:"auto"}).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),position:"relative"}).unwrap()},b=function(){var t=e(this),a=t.data(i),o=a.opt,n=e(".mCSB_"+a.idx+"_scrollbar:first"),r=at(o.scrollButtons.tabindex)?"tabindex='"+o.scrollButtons.tabindex+"'":"",l=["<a href='#' class='"+f[13]+"' oncontextmenu='return false;' "+r+" />","<a href='#' class='"+f[14]+"' oncontextmenu='return false;' "+r+" />","<a href='#' class='"+f[15]+"' oncontextmenu='return false;' "+r+" />","<a href='#' class='"+f[16]+"' oncontextmenu='return false;' "+r+" />"],s=["x"===o.axis?l[2]:l[0],"x"===o.axis?l[3]:l[1],l[2],l[3]];o.scrollButtons.enable&&n.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3])},C=function(){var t=e(this),a=t.data(i),o=e("#mCSB_"+a.idx),n=t.css("max-height")||"none",r=-1!==n.indexOf("%"),l=t.css("box-sizing");if("none"!==n){var s=r?t.parent().height()*parseInt(n)/100:parseInt(n);"border-box"===l&&(s-=t.innerHeight()-t.height()+(t.outerHeight()-t.innerHeight())),o.css("max-height",Math.round(s))}},y=function(){var t=e(this),a=t.data(i),o=e("#mCSB_"+a.idx),n=e("#mCSB_"+a.idx+"_container"),r=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")],l=[o.height()/n.outerHeight(!1),o.width()/n.outerWidth(!1)],s=[parseInt(r[0].css("min-height")),Math.round(l[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(l[1]*r[1].parent().width())],c=d&&s[1]<s[0]?s[0]:s[1],u=d&&s[3]<s[2]?s[2]:s[3];r[0].css({height:c,"max-height":r[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":s[0]+"px"}),r[1].css({width:u,"max-width":r[1].parent().width()-10})},B=function(){var t=e(this),a=t.data(i),o=e("#mCSB_"+a.idx),n=e("#mCSB_"+a.idx+"_container"),r=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")],l=[n.outerHeight(!1)-o.height(),n.outerWidth(!1)-o.width()],s=[l[0]/(r[0].parent().height()-r[0].height()),l[1]/(r[1].parent().width()-r[1].width())];a.scrollRatio={y:s[0],x:s[1]}},T=function(e,t,a){var o=a?f[0]+"_expanded":"",n=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(f[0]+" "+o),n.toggleClass(f[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(f[0]),n.removeClass(f[1])):(e.addClass(f[0]),n.addClass(f[1])))},k=function(){var t=e(this),a=t.data(i),o=e("#mCSB_"+a.idx),n=e("#mCSB_"+a.idx+"_container"),r=null==a.overflowed?n.height():n.outerHeight(!1),l=null==a.overflowed?n.width():n.outerWidth(!1);return[r>o.height(),l>o.width()]},M=function(){var t=e(this),a=t.data(i),o=a.opt,n=e("#mCSB_"+a.idx),r=e("#mCSB_"+a.idx+"_container"),l=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")];if(Q(t),("x"!==o.axis&&!a.overflowed[0]||"y"===o.axis&&a.overflowed[0])&&(l[0].add(r).css("top",0),G(t,"_resetY")),"y"!==o.axis&&!a.overflowed[1]||"x"===o.axis&&a.overflowed[1]){var s=dx=0;"rtl"===a.langDir&&(s=n.width()-r.outerWidth(!1),dx=Math.abs(s/a.scrollRatio.x)),r.css("left",s),l[1].css("left",dx),G(t,"_resetX")}},O=function(){function t(){r=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(r),A.call(a[0])):t()},100)}var a=e(this),o=a.data(i),n=o.opt;if(!o.bindEvents){if(D.call(this),n.contentTouchScroll&&L.call(this),W.call(this),n.mouseWheel.enable){var r;t()}z.call(this),U.call(this),n.advanced.autoScrollOnFocus&&H.call(this),n.scrollButtons.enable&&F.call(this),n.keyboard.enable&&q.call(this),o.bindEvents=!0}},I=function(){var t=e(this),o=t.data(i),n=o.opt,r=i+"_"+o.idx,l=".mCSB_"+o.idx+"_scrollbar",s=e("#mCSB_"+o.idx+",#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,"+l+" ."+f[12]+",#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal,"+l+">a"),c=e("#mCSB_"+o.idx+"_container");n.advanced.releaseDraggableSelectors&&s.add(e(n.advanced.releaseDraggableSelectors)),o.bindEvents&&(e(a).unbind("."+r),s.each(function(){e(this).unbind("."+r)}),clearTimeout(t[0]._focusTimeout),$(t[0],"_focusTimeout"),clearTimeout(o.sequential.step),$(o.sequential,"step"),clearTimeout(c[0].onCompleteTimeout),$(c[0],"onCompleteTimeout"),o.bindEvents=!1)},R=function(t){var a=e(this),o=a.data(i),n=o.opt,r=e("#mCSB_"+o.idx+"_container_wrapper"),l=r.length?r:e("#mCSB_"+o.idx+"_container"),s=[e("#mCSB_"+o.idx+"_scrollbar_vertical"),e("#mCSB_"+o.idx+"_scrollbar_horizontal")],c=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==n.axis&&(o.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children("a")).css("display","block"),l.removeClass(f[8]+" "+f[10])):(n.alwaysShowScrollbar?(2!==n.alwaysShowScrollbar&&c[0].css("display","none"),l.removeClass(f[10])):(s[0].css("display","none"),l.addClass(f[10])),l.addClass(f[8]))),"y"!==n.axis&&(o.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children("a")).css("display","block"),l.removeClass(f[9]+" "+f[11])):(n.alwaysShowScrollbar?(2!==n.alwaysShowScrollbar&&c[1].css("display","none"),l.removeClass(f[11])):(s[1].css("display","none"),l.addClass(f[11])),l.addClass(f[9]))),o.overflowed[0]||o.overflowed[1]?a.removeClass(f[5]):a.addClass(f[5])},E=function(e){var t=e.type;switch(t){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return[e.originalEvent.pageY,e.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var a=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],o=e.originalEvent.touches.length||e.originalEvent.changedTouches.length;return[a.pageY,a.pageX,o>1];default:return[e.pageY,e.pageX,!1]}},D=function(){function t(e){var t=p.find("iframe");if(t.length){var a=e?"auto":"none";t.css("pointer-events",a)}}function o(e,t,a,o){if(p[0].idleTimer=f.scrollInertia<233?250:0,n.attr("id")===m[1])var i="x",r=(n[0].offsetLeft-t+o)*c.scrollRatio.x;else var i="y",r=(n[0].offsetTop-e+a)*c.scrollRatio.y;G(s,r.toString(),{dir:i,drag:!0})}var n,r,l,s=e(this),c=s.data(i),f=c.opt,h=i+"_"+c.idx,m=["mCSB_"+c.idx+"_dragger_vertical","mCSB_"+c.idx+"_dragger_horizontal"],p=e("#mCSB_"+c.idx+"_container"),g=e("#"+m[0]+",#"+m[1]),v=f.advanced.releaseDraggableSelectors?g.add(e(f.advanced.releaseDraggableSelectors)):g;g.bind("mousedown."+h+" touchstart."+h+" pointerdown."+h+" MSPointerDown."+h,function(o){if(o.stopImmediatePropagation(),o.preventDefault(),et(o)){u=!0,d&&(a.onselectstart=function(){return!1}),t(!1),Q(s),n=e(this);var i=n.offset(),c=E(o)[0]-i.top,h=E(o)[1]-i.left,m=n.height()+i.top,p=n.width()+i.left;m>c&&c>0&&p>h&&h>0&&(r=c,l=h),T(n,"active",f.autoExpandScrollbar)}}).bind("touchmove."+h,function(e){e.stopImmediatePropagation(),e.preventDefault();var t=n.offset(),a=E(e)[0]-t.top,i=E(e)[1]-t.left;o(r,l,a,i)}),e(a).bind("mousemove."+h+" pointermove."+h+" MSPointerMove."+h,function(e){if(n){var t=n.offset(),a=E(e)[0]-t.top,i=E(e)[1]-t.left;if(r===a)return;o(r,l,a,i)}}).add(v).bind("mouseup."+h+" touchend."+h+" pointerup."+h+" MSPointerUp."+h,function(){n&&(T(n,"active",f.autoExpandScrollbar),n=null),u=!1,d&&(a.onselectstart=null),t(!0)})},L=function(){function t(e,t){var a=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?a[0]:a[3]:e>60?t>3?a[3]:a[2]:e>30?t>8?a[1]:t>6?a[0]:t>4?t:a[2]:t>8?t:a[3]}function a(e,t,a,o,n,i){e&&G(_,e.toString(),{dur:t,scrollEasing:a,dir:o,overwrite:n,drag:i})}var n,r,l,s,c,d,f,h,m,p,g,v,x,_=e(this),S=_.data(i),w=S.opt,b=i+"_"+S.idx,C=e("#mCSB_"+S.idx),y=e("#mCSB_"+S.idx+"_container"),B=[e("#mCSB_"+S.idx+"_dragger_vertical"),e("#mCSB_"+S.idx+"_dragger_horizontal")],T=[],k=[],M=0,O="yx"===w.axis?"none":"all",I=[];y.bind("touchstart."+b+" pointerdown."+b+" MSPointerDown."+b,function(e){if(!tt(e)||u||E(e)[2])return void(o=0);o=1,v=0,x=0;var t=y.offset();n=E(e)[0]-t.top,r=E(e)[1]-t.left,I=[E(e)[0],E(e)[1]]}).bind("touchmove."+b+" pointermove."+b+" MSPointerMove."+b,function(e){if(tt(e)&&!u&&!E(e)[2]&&(e.stopImmediatePropagation(),!x||v)){d=K();var t=C.offset(),o=E(e)[0]-t.top,i=E(e)[1]-t.left,l="mcsLinearOut";if(T.push(o),k.push(i),I[2]=Math.abs(E(e)[0]-I[0]),I[3]=Math.abs(E(e)[1]-I[1]),S.overflowed[0])var s=B[0].parent().height()-B[0].height(),c=n-o>0&&o-n>-(s*S.scrollRatio.y)&&(2*I[3]<I[2]||"yx"===w.axis);if(S.overflowed[1])var f=B[1].parent().width()-B[1].width(),h=r-i>0&&i-r>-(f*S.scrollRatio.x)&&(2*I[2]<I[3]||"yx"===w.axis);c||h?(e.preventDefault(),v=1):x=1,p="yx"===w.axis?[n-o,r-i]:"x"===w.axis?[null,r-i]:[n-o,null],y[0].idleTimer=250,S.overflowed[0]&&a(p[0],M,l,"y","all",!0),S.overflowed[1]&&a(p[1],M,l,"x",O,!0)}}),C.bind("touchstart."+b+" pointerdown."+b+" MSPointerDown."+b,function(e){if(!tt(e)||u||E(e)[2])return void(o=0);o=1,e.stopImmediatePropagation(),Q(_),c=K();var t=C.offset();l=E(e)[0]-t.top,s=E(e)[1]-t.left,T=[],k=[]}).bind("touchend."+b+" pointerup."+b+" MSPointerUp."+b,function(e){if(tt(e)&&!u&&!E(e)[2]){e.stopImmediatePropagation(),v=0,x=0,f=K();var o=C.offset(),n=E(e)[0]-o.top,i=E(e)[1]-o.left;if(!(f-d>30)){m=1e3/(f-c);var r="mcsEaseOut",_=2.5>m,b=_?[T[T.length-2],k[k.length-2]]:[0,0];h=_?[n-b[0],i-b[1]]:[n-l,i-s];var B=[Math.abs(h[0]),Math.abs(h[1])];m=_?[Math.abs(h[0]/4),Math.abs(h[1]/4)]:[m,m];var M=[Math.abs(y[0].offsetTop)-h[0]*t(B[0]/m[0],m[0]),Math.abs(y[0].offsetLeft)-h[1]*t(B[1]/m[1],m[1])];p="yx"===w.axis?[M[0],M[1]]:"x"===w.axis?[null,M[1]]:[M[0],null],g=[4*B[0]+w.scrollInertia,4*B[1]+w.scrollInertia];var I=parseInt(w.contentTouchScroll)||0;p[0]=B[0]>I?p[0]:0,p[1]=B[1]>I?p[1]:0,S.overflowed[0]&&a(p[0],g[0],r,"y",O,!1),S.overflowed[1]&&a(p[1],g[1],r,"x",O,!1)}}})},W=function(){function n(){return t.getSelection?t.getSelection().toString():a.selection&&"Control"!=a.selection.type?a.selection.createRange().text:0}function r(e,t,a){f.type=a&&l?"stepped":"stepless",f.scrollAmount=10,j(s,e,t,"mcsLinearOut",a?60:null)}var l,s=e(this),c=s.data(i),d=c.opt,f=c.sequential,h=i+"_"+c.idx,m=e("#mCSB_"+c.idx+"_container"),p=m.parent();m.bind("mousedown."+h,function(){o||l||(l=1,u=!0)}).add(a).bind("mousemove."+h,function(e){if(!o&&l&&n()){var t=m.offset(),a=E(e)[0]-t.top+m[0].offsetTop,i=E(e)[1]-t.left+m[0].offsetLeft;a>0&&a<p.height()&&i>0&&i<p.width()?f.step&&r("off",null,"stepped"):("x"!==d.axis&&c.overflowed[0]&&(0>a?r("on",38):a>p.height()&&r("on",40)),"y"!==d.axis&&c.overflowed[1]&&(0>i?r("on",37):i>p.width()&&r("on",39)))}}).bind("mouseup."+h,function(){o||(l&&(l=0,r("off",null)),u=!1)})},A=function(){function t(e){var t=null;try{var a=e.contentDocument||e.contentWindow.document;t=a.body.innerHTML}catch(o){}return null!==t}var a=e(this),o=a.data(i);if(o){var n=o.opt,r=i+"_"+o.idx,l=e("#mCSB_"+o.idx),s=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],c=e("#mCSB_"+o.idx+"_container").find("iframe"),u=l;c.length&&c.each(function(){var a=this;t(a)&&(u=u.add(e(a).contents().find("body")))}),u.bind("mousewheel."+r,function(t,i){if(Q(a),!P(a,t.target)){var r="auto"!==n.mouseWheel.deltaFactor?parseInt(n.mouseWheel.deltaFactor):d&&t.deltaFactor<100?100:t.deltaFactor||100;if("x"===n.axis||"x"===n.mouseWheel.axis)var c="x",u=[Math.round(r*o.scrollRatio.x),parseInt(n.mouseWheel.scrollAmount)],f="auto"!==n.mouseWheel.scrollAmount?u[1]:u[0]>=l.width()?.9*l.width():u[0],h=Math.abs(e("#mCSB_"+o.idx+"_container")[0].offsetLeft),m=s[1][0].offsetLeft,p=s[1].parent().width()-s[1].width(),g=t.deltaX||t.deltaY||i;else var c="y",u=[Math.round(r*o.scrollRatio.y),parseInt(n.mouseWheel.scrollAmount)],f="auto"!==n.mouseWheel.scrollAmount?u[1]:u[0]>=l.height()?.9*l.height():u[0],h=Math.abs(e("#mCSB_"+o.idx+"_container")[0].offsetTop),m=s[0][0].offsetTop,p=s[0].parent().height()-s[0].height(),g=t.deltaY||i;"y"===c&&!o.overflowed[0]||"x"===c&&!o.overflowed[1]||(n.mouseWheel.invert&&(g=-g),n.mouseWheel.normalizeDelta&&(g=0>g?-1:1),(g>0&&0!==m||0>g&&m!==p||n.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),G(a,(h-g*f).toString(),{dir:c}))}})}},P=function(t,a){var o=a.nodeName.toLowerCase(),n=t.data(i).opt.mouseWheel.disableOver,r=["select","textarea"];return e.inArray(o,n)>-1&&!(e.inArray(o,r)>-1&&!e(a).is(":focus"))},z=function(){var t=e(this),a=t.data(i),o=i+"_"+a.idx,n=e("#mCSB_"+a.idx+"_container"),r=n.parent(),l=e(".mCSB_"+a.idx+"_scrollbar ."+f[12]);l.bind("touchstart."+o+" pointerdown."+o+" MSPointerDown."+o,function(){u=!0}).bind("touchend."+o+" pointerup."+o+" MSPointerUp."+o,function(){u=!1}).bind("click."+o,function(o){if(e(o.target).hasClass(f[12])||e(o.target).hasClass("mCSB_draggerRail")){Q(t);var i=e(this),l=i.find(".mCSB_dragger");if(i.parent(".mCSB_scrollTools_horizontal").length>0){if(!a.overflowed[1])return;var s="x",c=o.pageX>l.offset().left?-1:1,d=Math.abs(n[0].offsetLeft)-.9*c*r.width()}else{if(!a.overflowed[0])return;var s="y",c=o.pageY>l.offset().top?-1:1,d=Math.abs(n[0].offsetTop)-.9*c*r.height()}G(t,d.toString(),{dir:s,scrollEasing:"mcsEaseInOut"})}})},H=function(){var t=e(this),o=t.data(i),n=o.opt,r=i+"_"+o.idx,l=e("#mCSB_"+o.idx+"_container"),s=l.parent();l.bind("focusin."+r,function(){var o=e(a.activeElement),i=l.find(".mCustomScrollBox").length,r=0;o.is(n.advanced.autoScrollOnFocus)&&(Q(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=i?(r+17)*i:0,t[0]._focusTimeout=setTimeout(function(){var e=[ot(o)[0],ot(o)[1]],a=[l[0].offsetTop,l[0].offsetLeft],i=[a[0]+e[0]>=0&&a[0]+e[0]<s.height()-o.outerHeight(!1),a[1]+e[1]>=0&&a[0]+e[1]<s.width()-o.outerWidth(!1)],c="yx"!==n.axis||i[0]||i[1]?"all":"none";"x"===n.axis||i[0]||G(t,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:c,dur:r}),"y"===n.axis||i[1]||G(t,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:c,dur:r})},t[0]._focusTimer))})},U=function(){var t=e(this),a=t.data(i),o=i+"_"+a.idx,n=e("#mCSB_"+a.idx+"_container").parent();n.bind("scroll."+o,function(){(0!==n.scrollTop()||0!==n.scrollLeft())&&e(".mCSB_"+a.idx+"_scrollbar").css("visibility","hidden")})},F=function(){var t=e(this),a=t.data(i),o=a.opt,n=a.sequential,r=i+"_"+a.idx,l=".mCSB_"+a.idx+"_scrollbar",s=e(l+">a");s.bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+" MSPointerOut."+r+" click."+r,function(i){function r(e,a){n.scrollAmount=o.snapAmount||o.scrollButtons.scrollAmount,j(t,e,a)}if(i.preventDefault(),et(i)){var l=e(this).attr("class");switch(n.type=o.scrollButtons.scrollType,i.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===n.type)return;u=!0,a.tweenRunning=!1,r("on",l);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===n.type)return;u=!1,n.dir&&r("off",l);break;case"click":if("stepped"!==n.type||a.tweenRunning)return;r("on",l)}}})},q=function(){var t=e(this),o=t.data(i),n=o.opt,r=o.sequential,l=i+"_"+o.idx,s=e("#mCSB_"+o.idx),c=e("#mCSB_"+o.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']";s.attr("tabindex","0").bind("blur."+l+" keydown."+l+" keyup."+l,function(i){function l(e,a){r.type=n.keyboard.scrollType,r.scrollAmount=n.snapAmount||n.keyboard.scrollAmount,"stepped"===r.type&&o.tweenRunning||j(t,e,a)}switch(i.type){case"blur":o.tweenRunning&&r.dir&&l("off",null);break;case"keydown":case"keyup":var s=i.keyCode?i.keyCode:i.which,f="on";if("x"!==n.axis&&(38===s||40===s)||"y"!==n.axis&&(37===s||39===s)){if((38===s||40===s)&&!o.overflowed[0]||(37===s||39===s)&&!o.overflowed[1])return;"keyup"===i.type&&(f="off"),e(a.activeElement).is(u)||(i.preventDefault(),i.stopImmediatePropagation(),l(f,s))}else if(33===s||34===s){if((o.overflowed[0]||o.overflowed[1])&&(i.preventDefault(),i.stopImmediatePropagation()),"keyup"===i.type){Q(t);var h=34===s?-1:1;if("x"===n.axis||"yx"===n.axis&&o.overflowed[1]&&!o.overflowed[0])var m="x",p=Math.abs(c[0].offsetLeft)-.9*h*d.width();else var m="y",p=Math.abs(c[0].offsetTop)-.9*h*d.height();G(t,p.toString(),{dir:m,scrollEasing:"mcsEaseInOut"})}}else if((35===s||36===s)&&!e(a.activeElement).is(u)&&((o.overflowed[0]||o.overflowed[1])&&(i.preventDefault(),i.stopImmediatePropagation()),"keyup"===i.type)){if("x"===n.axis||"yx"===n.axis&&o.overflowed[1]&&!o.overflowed[0])var m="x",p=35===s?Math.abs(d.width()-c.outerWidth(!1)):0;else var m="y",p=35===s?Math.abs(d.height()-c.outerHeight(!1)):0;G(t,p.toString(),{dir:m,scrollEasing:"mcsEaseInOut"})}}})},j=function(t,a,o,n,r){function l(e){var a="stepped"!==u.type,o=r?r:e?a?p/1.5:g:1e3/60,i=e?a?7.5:40:2.5,s=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)],d=[c.scrollRatio.y>10?10:c.scrollRatio.y,c.scrollRatio.x>10?10:c.scrollRatio.x],f="x"===u.dir[0]?s[1]+u.dir[1]*d[1]*i:s[0]+u.dir[1]*d[0]*i,m="x"===u.dir[0]?s[1]+u.dir[1]*parseInt(u.scrollAmount):s[0]+u.dir[1]*parseInt(u.scrollAmount),v="auto"!==u.scrollAmount?m:f,x=n?n:e?a?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",_=e?!0:!1;return e&&17>o&&(v="x"===u.dir[0]?s[1]:s[0]),G(t,v.toString(),{dir:u.dir[0],scrollEasing:x,dur:o,onComplete:_}),e?void(u.dir=!1):(clearTimeout(u.step),void(u.step=setTimeout(function(){l()},o)))}function s(){clearTimeout(u.step),$(u,"step"),Q(t)}var c=t.data(i),d=c.opt,u=c.sequential,h=e("#mCSB_"+c.idx+"_container"),m="stepped"===u.type?!0:!1,p=d.scrollInertia<26?26:d.scrollInertia,g=d.scrollInertia<1?17:d.scrollInertia;switch(a){case"on":if(u.dir=[o===f[16]||o===f[15]||39===o||37===o?"x":"y",o===f[13]||o===f[15]||38===o||37===o?-1:1],Q(t),at(o)&&"stepped"===u.type)return;l(m);break;case"off":s(),(m||c.tweenRunning&&u.dir)&&l(!0)}},Y=function(t){var a=e(this).data(i).opt,o=[];return"function"==typeof t&&(t=t()),t instanceof Array?o=t.length>1?[t[0],t[1]]:"x"===a.axis?[null,t[0]]:[t[0],null]:(o[0]=t.y?t.y:t.x||"x"===a.axis?null:t,o[1]=t.x?t.x:t.y||"y"===a.axis?null:t),"function"==typeof o[0]&&(o[0]=o[0]()),"function"==typeof o[1]&&(o[1]=o[1]()),o},X=function(t,a){if(null!=t&&"undefined"!=typeof t){var o=e(this),n=o.data(i),r=n.opt,l=e("#mCSB_"+n.idx+"_container"),s=l.parent(),c=typeof t;a||(a="x"===r.axis?"x":"y");var d="x"===a?l.outerWidth(!1):l.outerHeight(!1),u="x"===a?l[0].offsetLeft:l[0].offsetTop,f="x"===a?"left":"top";switch(c){case"function":return t();case"object":var m=t.jquery?t:e(t);if(!m.length)return;return"x"===a?ot(m)[1]:ot(m)[0];case"string":case"number":if(at(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(u-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var p=u+parseInt(t.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==t.indexOf("px")&&at(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(s.height()-l.outerHeight(!1));if("right"===t)return Math.abs(s.width()-l.outerWidth(!1));if("first"===t||"last"===t){var m=l.find(":"+t);return"x"===a?ot(m)[1]:ot(m)[0]}return e(t).length?"x"===a?ot(e(t))[1]:ot(e(t))[0]:(l.css(f,t),void h.update.call(null,o[0]))}}},N=function(t){function a(){clearTimeout(u[0].autoUpdate),u[0].autoUpdate=setTimeout(function(){return d.advanced.updateOnSelectorChange&&(m=r(),m!==S)?(l(3),void(S=m)):(d.advanced.updateOnContentResize&&(p=[u.outerHeight(!1),u.outerWidth(!1),v.height(),v.width(),_()[0],_()[1]],(p[0]!==w[0]||p[1]!==w[1]||p[2]!==w[2]||p[3]!==w[3]||p[4]!==w[4]||p[5]!==w[5])&&(l(p[0]!==w[0]||p[1]!==w[1]),w=p)),d.advanced.updateOnImageLoad&&(g=o(),g!==b&&(u.find("img").each(function(){n(this)}),b=g)),void((d.advanced.updateOnSelectorChange||d.advanced.updateOnContentResize||d.advanced.updateOnImageLoad)&&a()))},60)}function o(){var e=0;return d.advanced.updateOnImageLoad&&(e=u.find("img").length),e}function n(t){function a(e,t){return function(){return t.apply(e,arguments)}}function o(){this.onload=null,e(t).addClass(f[2]),l(2)}if(e(t).hasClass(f[2]))return void l();var n=new Image;n.onload=a(n,o),n.src=t.src}function r(){d.advanced.updateOnSelectorChange===!0&&(d.advanced.updateOnSelectorChange="*");var t=0,a=u.find(d.advanced.updateOnSelectorChange);return d.advanced.updateOnSelectorChange&&a.length>0&&a.each(function(){t+=e(this).height()+e(this).width()}),t}function l(e){clearTimeout(u[0].autoUpdate),h.update.call(null,s[0],e)}var s=e(this),c=s.data(i),d=c.opt,u=e("#mCSB_"+c.idx+"_container");if(t)return clearTimeout(u[0].autoUpdate),void $(u[0],"autoUpdate");var m,p,g,v=u.parent(),x=[e("#mCSB_"+c.idx+"_scrollbar_vertical"),e("#mCSB_"+c.idx+"_scrollbar_horizontal")],_=function(){return[x[0].is(":visible")?x[0].outerHeight(!0):0,x[1].is(":visible")?x[1].outerWidth(!0):0]},S=r(),w=[u.outerHeight(!1),u.outerWidth(!1),v.height(),v.width(),_()[0],_()[1]],b=o();a()},V=function(e,t,a){return Math.round(e/t)*t-a},Q=function(t){var a=t.data(i),o=e("#mCSB_"+a.idx+"_container,#mCSB_"+a.idx+"_container_wrapper,#mCSB_"+a.idx+"_dragger_vertical,#mCSB_"+a.idx+"_dragger_horizontal");
o.each(function(){Z.call(this)})},G=function(t,a,o){function n(e){return s&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function r(){return[c.callbacks.alwaysTriggerOffsets||_>=S[0]+b,c.callbacks.alwaysTriggerOffsets||-C>=_]}function l(){var e=[h[0].offsetTop,h[0].offsetLeft],a=[v[0].offsetTop,v[0].offsetLeft],n=[h.outerHeight(!1),h.outerWidth(!1)],i=[f.height(),f.width()];t[0].mcs={content:h,top:e[0],left:e[1],draggerTop:a[0],draggerLeft:a[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(n[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(n[1])-i[1])),direction:o.dir}}var s=t.data(i),c=s.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},o=e.extend(d,o),u=[o.dur,o.drag?0:o.dur],f=e("#mCSB_"+s.idx),h=e("#mCSB_"+s.idx+"_container"),m=h.parent(),p=c.callbacks.onTotalScrollOffset?Y.call(t,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?Y.call(t,c.callbacks.onTotalScrollBackOffset):[0,0];if(s.trigger=o.trigger,(0!==m.scrollTop()||0!==m.scrollLeft())&&(e(".mCSB_"+s.idx+"_scrollbar").css("visibility","visible"),m.scrollTop(0).scrollLeft(0)),"_resetY"!==a||s.contentReset.y||(n("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(t[0]),s.contentReset.y=1),"_resetX"!==a||s.contentReset.x||(n("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(t[0]),s.contentReset.x=1),"_resetY"!==a&&"_resetX"!==a){switch(!s.contentReset.y&&t[0].mcs||!s.overflowed[0]||(n("onOverflowY")&&c.callbacks.onOverflowY.call(t[0]),s.contentReset.x=null),!s.contentReset.x&&t[0].mcs||!s.overflowed[1]||(n("onOverflowX")&&c.callbacks.onOverflowX.call(t[0]),s.contentReset.x=null),c.snapAmount&&(a=V(a,c.snapAmount,c.snapOffset)),o.dir){case"x":var v=e("#mCSB_"+s.idx+"_dragger_horizontal"),x="left",_=h[0].offsetLeft,S=[f.width()-h.outerWidth(!1),v.parent().width()-v.width()],w=[a,0===a?0:a/s.scrollRatio.x],b=p[1],C=g[1],y=b>0?b/s.scrollRatio.x:0,B=C>0?C/s.scrollRatio.x:0;break;case"y":var v=e("#mCSB_"+s.idx+"_dragger_vertical"),x="top",_=h[0].offsetTop,S=[f.height()-h.outerHeight(!1),v.parent().height()-v.height()],w=[a,0===a?0:a/s.scrollRatio.y],b=p[0],C=g[0],y=b>0?b/s.scrollRatio.y:0,B=C>0?C/s.scrollRatio.y:0}w[1]<0||0===w[0]&&0===w[1]?w=[0,0]:w[1]>=S[1]?w=[S[0],S[1]]:w[0]=-w[0],t[0].mcs||(l(),n("onInit")&&c.callbacks.onInit.call(t[0])),clearTimeout(h[0].onCompleteTimeout),(s.tweenRunning||!(0===_&&w[0]>=0||_===S[0]&&w[0]<=S[0]))&&(J(v[0],x,Math.round(w[1]),u[1],o.scrollEasing),J(h[0],x,Math.round(w[0]),u[0],o.scrollEasing,o.overwrite,{onStart:function(){o.callbacks&&o.onStart&&!s.tweenRunning&&(n("onScrollStart")&&(l(),c.callbacks.onScrollStart.call(t[0])),s.tweenRunning=!0,T(v),s.cbOffsets=r())},onUpdate:function(){o.callbacks&&o.onUpdate&&n("whileScrolling")&&(l(),c.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(o.callbacks&&o.onComplete){"yx"===c.axis&&clearTimeout(h[0].onCompleteTimeout);var e=h[0].idleTimer||0;h[0].onCompleteTimeout=setTimeout(function(){n("onScroll")&&(l(),c.callbacks.onScroll.call(t[0])),n("onTotalScroll")&&w[1]>=S[1]-y&&s.cbOffsets[0]&&(l(),c.callbacks.onTotalScroll.call(t[0])),n("onTotalScrollBack")&&w[1]<=B&&s.cbOffsets[1]&&(l(),c.callbacks.onTotalScrollBack.call(t[0])),s.tweenRunning=!1,h[0].idleTimer=0,T(v,"hide")},e)}}}))}},J=function(e,a,o,n,i,r,l){function s(){b.stop||(_||p.call(),_=K()-x,c(),_>=b.time&&(b.time=_>b.time?_+h-(_-b.time):_+h-1,b.time<_+1&&(b.time=_+1)),b.time<n?b.id=m(s):v.call())}function c(){n>0?(b.currVal=f(b.time,S,C,n,i),w[a]=Math.round(b.currVal)+"px"):w[a]=o+"px",g.call()}function d(){h=1e3/60,b.time=_+h,m=t.requestAnimationFrame?t.requestAnimationFrame:function(e){return c(),setTimeout(e,.01)},b.id=m(s)}function u(){null!=b.id&&(t.requestAnimationFrame?t.cancelAnimationFrame(b.id):clearTimeout(b.id),b.id=null)}function f(e,t,a,o,n){switch(n){case"linear":case"mcsLinear":return a*e/o+t;case"mcsLinearOut":return e/=o,e--,a*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return e/=o/2,1>e?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t);case"easeInOutStrong":return e/=o/2,1>e?a/2*Math.pow(2,10*(e-1))+t:(e--,a/2*(-Math.pow(2,-10*e)+2)+t);case"easeInOut":case"mcsEaseInOut":return e/=o/2,1>e?a/2*e*e*e+t:(e-=2,a/2*(e*e*e+2)+t);case"easeOutSmooth":return e/=o,e--,-a*(e*e*e*e-1)+t;case"easeOutStrong":return a*(-Math.pow(2,-10*e/o)+1)+t;case"easeOut":case"mcsEaseOut":default:var i=(e/=o)*e,r=i*e;return t+a*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}e._mTween||(e._mTween={top:{},left:{}});var h,m,l=l||{},p=l.onStart||function(){},g=l.onUpdate||function(){},v=l.onComplete||function(){},x=K(),_=0,S=e.offsetTop,w=e.style,b=e._mTween[a];"left"===a&&(S=e.offsetLeft);var C=o-S;b.stop=0,"none"!==r&&u(),d()},K=function(){return t.performance&&t.performance.now?t.performance.now():t.performance&&t.performance.webkitNow?t.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Z=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var a=["top","left"],o=0;o<a.length;o++){var n=a[o];e._mTween[n].id&&(t.requestAnimationFrame?t.cancelAnimationFrame(e._mTween[n].id):clearTimeout(e._mTween[n].id),e._mTween[n].id=null,e._mTween[n].stop=1)}},$=function(e,t){try{delete e[t]}catch(a){e[t]=null}},et=function(e){return!(e.which&&1!==e.which)},tt=function(e){var t=e.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},at=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ot=function(e){var t=e.parents(".mCSB_container");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]};e.fn[n]=function(t){return h[t]?h[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):h.init.apply(this,arguments)},e[n]=function(t){return h[t]?h[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):h.init.apply(this,arguments)},e[n].defaults=l,t[n]=!0,e(t).load(function(){e(r)[n](),e.extend(e.expr[":"],{mcsInView:e.expr[":"].mcsInView||function(t){var a,o,n=e(t),i=n.parents(".mCSB_container");return i.length?(a=i.parent(),o=[i[0].offsetTop,i[0].offsetLeft],o[0]+ot(n)[0]>=0&&o[0]+ot(n)[0]<a.height()-n.outerHeight(!1)&&o[1]+ot(n)[1]>=0&&o[1]+ot(n)[1]<a.width()-n.outerWidth(!1)):void 0},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var a=e(t).data(i);return a?a.overflowed[0]||a.overflowed[1]:void 0}})})})}(jQuery,window,document),function(window,undefined){"use strict";function triggerEvent(eventType,options){var event,key;options=options||{},eventType="raven"+eventType.substr(0,1).toUpperCase()+eventType.substr(1),document.createEvent?(event=document.createEvent("HTMLEvents"),event.initEvent(eventType,!0,!0)):(event=document.createEventObject(),event.eventType=eventType);for(key in options)hasKey(options,key)&&(event[key]=options[key]);if(document.createEvent)document.dispatchEvent(event);else try{document.fireEvent("on"+event.eventType.toLowerCase(),event)}catch(e){}}function RavenConfigError(message){this.name="RavenConfigError",this.message=message}function parseDSN(str){var m=dsnPattern.exec(str),dsn={},i=7;try{for(;i--;)dsn[dsnKeys[i]]=m[i]||""}catch(e){throw new RavenConfigError("Invalid DSN: "+str)}if(dsn.pass)throw new RavenConfigError("Do not specify your private key in the DSN!");return dsn}function isUndefined(what){return"undefined"==typeof what}function isFunction(what){return"function"==typeof what}function isString(what){return"string"==typeof what}function isEmptyObject(what){for(var k in what)return!1;return!0}function hasKey(object,key){return Object.prototype.hasOwnProperty.call(object,key)}function each(obj,callback){var i,j;if(isUndefined(obj.length))for(i in obj)hasKey(obj,i)&&callback.call(null,i,obj[i]);else if(j=obj.length)for(i=0;j>i;i++)callback.call(null,i,obj[i])}function setAuthQueryString(){authQueryString="?sentry_version=4&sentry_client=raven-js/"+Raven.VERSION+"&sentry_key="+globalKey}function handleStackInfo(stackInfo,options){var frames=[];stackInfo.stack&&stackInfo.stack.length&&each(stackInfo.stack,function(i,stack){var frame=normalizeFrame(stack);frame&&frames.push(frame)}),triggerEvent("handle",{stackInfo:stackInfo,options:options}),processException(stackInfo.name,stackInfo.message,stackInfo.url,stackInfo.lineno,frames,options)}function normalizeFrame(frame){if(frame.url){var i,normalized={filename:frame.url,lineno:frame.line,colno:frame.column,"function":frame.func||"?"},context=extractContextFromFrame(frame);if(context){var keys=["pre_context","context_line","post_context"];for(i=3;i--;)normalized[keys[i]]=context[i]}return normalized.in_app=!(!globalOptions.includePaths.test(normalized.filename)||/(Raven|TraceKit)\./.test(normalized["function"])||/raven\.(min\.)?js$/.test(normalized.filename)),normalized}}function extractContextFromFrame(frame){if(frame.context&&globalOptions.fetchContext){for(var context=frame.context,pivot=~~(context.length/2),i=context.length,isMinified=!1;i--;)if(context[i].length>300){isMinified=!0;break}if(isMinified){if(isUndefined(frame.column))return;return[[],context[pivot].substr(frame.column,50),[]]}return[context.slice(0,pivot),context[pivot],context.slice(pivot+1)]}}function processException(type,message,fileurl,lineno,frames,options){var stacktrace,label;message+="",("Error"!==type||message)&&(globalOptions.ignoreErrors.test(message)||(frames&&frames.length?(fileurl=frames[0].filename||fileurl,frames.reverse(),stacktrace={frames:frames}):fileurl&&(stacktrace={frames:[{filename:fileurl,lineno:lineno,in_app:!0}]}),message=truncate(message,100),globalOptions.ignoreUrls&&globalOptions.ignoreUrls.test(fileurl)||(!globalOptions.whitelistUrls||globalOptions.whitelistUrls.test(fileurl))&&(label=lineno?message+" at "+lineno:message,send(objectMerge({exception:{type:type,value:message},stacktrace:stacktrace,culprit:fileurl,message:label},options)))))}function objectMerge(obj1,obj2){return obj2?(each(obj2,function(key,value){obj1[key]=value}),obj1):obj1}function truncate(str,max){return str.length<=max?str:str.substr(0,max)+"…"}function getHttpData(){var http={url:document.location.href,headers:{"User-Agent":navigator.userAgent}};return document.referrer&&(http.headers.Referer=document.referrer),http}function send(data){isSetup()&&(data=objectMerge({project:globalProject,logger:globalOptions.logger,site:globalOptions.site,platform:"javascript",request:getHttpData()},data),data.tags=objectMerge(globalOptions.tags,data.tags),data.extra=objectMerge(globalOptions.extra,data.extra),isEmptyObject(data.tags)&&delete data.tags,isEmptyObject(data.extra)&&delete data.extra,globalUser&&(data.user=globalUser),isFunction(globalOptions.dataCallback)&&(data=globalOptions.dataCallback(data)),(!isFunction(globalOptions.shouldSendCallback)||globalOptions.shouldSendCallback(data))&&(lastEventId=data.event_id||(data.event_id=uuid4()),makeRequest(data)))}function makeRequest(data){var img=new Image,src=globalServer+authQueryString+"&sentry_data="+encodeURIComponent(JSON.stringify(data));img.onload=function(){triggerEvent("success",{data:data,src:src})},img.onerror=img.onabort=function(){triggerEvent("failure",{data:data,src:src})},img.src=src}function isSetup(){return hasJSON?globalServer?!0:(logDebug("error","Error: Raven has not been configured."),!1):!1}function joinRegExp(patterns){for(var pattern,sources=[],i=0,len=patterns.length;len>i;i++)pattern=patterns[i],isString(pattern)?sources.push(pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):pattern&&pattern.source&&sources.push(pattern.source);return new RegExp(sources.join("|"),"i")}function uuid4(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(c){var r=16*Math.random()|0,v="x"==c?r:3&r|8;return v.toString(16)})}function logDebug(level,message){window.console&&console[level]&&Raven.debug&&console[level](message)}function afterLoad(){var RavenConfig=window.RavenConfig;RavenConfig&&Raven.config(RavenConfig.dsn,RavenConfig.config).install()}var TraceKit={remoteFetching:!1,collectWindowErrors:!0,linesOfContext:7},_slice=[].slice,UNKNOWN_FUNCTION="?";TraceKit.wrap=function(func){function wrapped(){try{return func.apply(this,arguments)}catch(e){throw TraceKit.report(e),e}}return wrapped},TraceKit.report=function(){function subscribe(handler){installGlobalHandler(),handlers.push(handler)}function unsubscribe(handler){for(var i=handlers.length-1;i>=0;--i)handlers[i]===handler&&handlers.splice(i,1)}function unsubscribeAll(){uninstallGlobalHandler(),handlers=[]}function notifyHandlers(stack,isWindowError){var exception=null;if(!isWindowError||TraceKit.collectWindowErrors){for(var i in handlers)if(hasKey(handlers,i))try{handlers[i].apply(null,[stack].concat(_slice.call(arguments,2)))}catch(inner){exception=inner}if(exception)throw exception}}function traceKitWindowOnError(message,url,lineNo,colNo,ex){var stack=null;if(lastExceptionStack)TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(lastExceptionStack,url,lineNo,message),processLastException();else if(ex)stack=TraceKit.computeStackTrace(ex),notifyHandlers(stack,!0);else{var location={url:url,line:lineNo,column:colNo};location.func=TraceKit.computeStackTrace.guessFunctionName(location.url,location.line),location.context=TraceKit.computeStackTrace.gatherContext(location.url,location.line),stack={message:message,url:document.location.href,stack:[location]},notifyHandlers(stack,!0)}return _oldOnerrorHandler?_oldOnerrorHandler.apply(this,arguments):!1}function installGlobalHandler(){_onErrorHandlerInstalled||(_oldOnerrorHandler=window.onerror,window.onerror=traceKitWindowOnError,_onErrorHandlerInstalled=!0)}function uninstallGlobalHandler(){_onErrorHandlerInstalled&&(window.onerror=_oldOnerrorHandler,_onErrorHandlerInstalled=!1,_oldOnerrorHandler=undefined)}function processLastException(){var _lastExceptionStack=lastExceptionStack,_lastArgs=lastArgs;lastArgs=null,lastExceptionStack=null,lastException=null,notifyHandlers.apply(null,[_lastExceptionStack,!1].concat(_lastArgs))}function report(ex,rethrow){var args=_slice.call(arguments,1);if(lastExceptionStack){if(lastException===ex)return;processLastException()}var stack=TraceKit.computeStackTrace(ex);if(lastExceptionStack=stack,lastException=ex,lastArgs=args,window.setTimeout(function(){lastException===ex&&processLastException()},stack.incomplete?2e3:0),rethrow!==!1)throw ex}var _oldOnerrorHandler,_onErrorHandlerInstalled,handlers=[],lastArgs=null,lastException=null,lastExceptionStack=null;return report.subscribe=subscribe,report.unsubscribe=unsubscribe,report.uninstall=unsubscribeAll,report}(),TraceKit.computeStackTrace=function(){function loadSource(url){if(!TraceKit.remoteFetching)return"";try{var getXHR=function(){try{return new window.XMLHttpRequest}catch(e){return new window.ActiveXObject("Microsoft.XMLHTTP")}},request=getXHR();return request.open("GET",url,!1),request.send(""),request.responseText}catch(e){return""}}function getSource(url){if(!isString(url))return[];if(!hasKey(sourceCache,url)){var source="";-1!==url.indexOf(document.domain)&&(source=loadSource(url)),sourceCache[url]=source?source.split("\n"):[]}return sourceCache[url]}function guessFunctionName(url,lineNo){var m,reFunctionArgNames=/function ([^(]*)\(([^)]*)\)/,reGuessFunction=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,line="",maxLines=10,source=getSource(url);if(!source.length)return UNKNOWN_FUNCTION;for(var i=0;maxLines>i;++i)if(line=source[lineNo-i]+line,!isUndefined(line)){if(m=reGuessFunction.exec(line))return m[1];if(m=reFunctionArgNames.exec(line))return m[1]}return UNKNOWN_FUNCTION}function gatherContext(url,line){var source=getSource(url);if(!source.length)return null;var context=[],linesBefore=Math.floor(TraceKit.linesOfContext/2),linesAfter=linesBefore+TraceKit.linesOfContext%2,start=Math.max(0,line-linesBefore-1),end=Math.min(source.length,line+linesAfter-1);line-=1;for(var i=start;end>i;++i)isUndefined(source[i])||context.push(source[i]);return context.length>0?context:null}function escapeRegExp(text){return text.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function escapeCodeAsRegExpForMatchingInsideHTML(body){return escapeRegExp(body).replace("<","(?:<|&lt;)").replace(">","(?:>|&gt;)").replace("&","(?:&|&amp;)").replace('"','(?:"|&quot;)').replace(/\s+/g,"\\s+")}function findSourceInUrls(re,urls){for(var source,m,i=0,j=urls.length;j>i;++i)if((source=getSource(urls[i])).length&&(source=source.join("\n"),m=re.exec(source)))return{url:urls[i],line:source.substring(0,m.index).split("\n").length,column:m.index-source.lastIndexOf("\n",m.index)-1};return null}function findSourceInLine(fragment,url,line){var m,source=getSource(url),re=new RegExp("\\b"+escapeRegExp(fragment)+"\\b");return line-=1,source&&source.length>line&&(m=re.exec(source[line]))?m.index:null}function findSourceByFunctionBody(func){for(var body,re,parts,result,urls=[window.location.href],scripts=document.getElementsByTagName("script"),code=""+func,codeRE=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,eventRE=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,i=0;i<scripts.length;++i){var script=scripts[i];script.src&&urls.push(script.src)}if(parts=codeRE.exec(code)){var name=parts[1]?"\\s+"+parts[1]:"",args=parts[2].split(",").join("\\s*,\\s*");body=escapeRegExp(parts[3]).replace(/;$/,";?"),re=new RegExp("function"+name+"\\s*\\(\\s*"+args+"\\s*\\)\\s*{\\s*"+body+"\\s*}")}else re=new RegExp(escapeRegExp(code).replace(/\s+/g,"\\s+"));if(result=findSourceInUrls(re,urls))return result;if(parts=eventRE.exec(code)){var event=parts[1];if(body=escapeCodeAsRegExpForMatchingInsideHTML(parts[2]),re=new RegExp("on"+event+"=[\\'\"]\\s*"+body+"\\s*[\\'\"]","i"),result=findSourceInUrls(re,urls[0]))return result;if(re=new RegExp(body),result=findSourceInUrls(re,urls))return result}return null}function computeStackTraceFromStackProp(ex){if(!ex.stack)return null;for(var parts,element,chrome=/^\s*at (?:((?:\[object object\])?\S+(?: \[as \S+\])?) )?\(?((?:file|https?|chrome-extension):.*?):(\d+)(?::(\d+))?\)?\s*$/i,gecko=/^\s*(\S*)(?:\((.*?)\))?@((?:file|https?|chrome).*?):(\d+)(?::(\d+))?\s*$/i,lines=ex.stack.split("\n"),stack=[],reference=/^(.*) is undefined$/.exec(ex.message),i=0,j=lines.length;j>i;++i){if(parts=gecko.exec(lines[i]))element={url:parts[3],func:parts[1]||UNKNOWN_FUNCTION,args:parts[2]?parts[2].split(","):"",line:+parts[4],column:parts[5]?+parts[5]:null};else{if(!(parts=chrome.exec(lines[i])))continue;element={url:parts[2],func:parts[1]||UNKNOWN_FUNCTION,line:+parts[3],column:parts[4]?+parts[4]:null}}!element.func&&element.line&&(element.func=guessFunctionName(element.url,element.line)),element.line&&(element.context=gatherContext(element.url,element.line)),stack.push(element)}return stack.length?(stack[0].line&&!stack[0].column&&reference?stack[0].column=findSourceInLine(reference[1],stack[0].url,stack[0].line):stack[0].column||isUndefined(ex.columnNumber)||(stack[0].column=ex.columnNumber+1),{name:ex.name,message:ex.message,url:document.location.href,stack:stack}):null}function computeStackTraceFromStacktraceProp(ex){for(var parts,stacktrace=ex.stacktrace,testRE=/ line (\d+), column (\d+) in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\) in (.*):\s*$/i,lines=stacktrace.split("\n"),stack=[],i=0,j=lines.length;j>i;i+=2)if(parts=testRE.exec(lines[i])){var element={line:+parts[1],column:+parts[2],func:parts[3]||parts[4],args:parts[5]?parts[5].split(","):[],url:parts[6]};if(!element.func&&element.line&&(element.func=guessFunctionName(element.url,element.line)),element.line)try{element.context=gatherContext(element.url,element.line)}catch(exc){}element.context||(element.context=[lines[i+1]]),stack.push(element)}return stack.length?{name:ex.name,message:ex.message,url:document.location.href,stack:stack}:null}function computeStackTraceFromOperaMultiLineMessage(ex){var lines=ex.message.split("\n");if(lines.length<4)return null;var parts,i,len,source,lineRE1=/^\s*Line (\d+) of linked script ((?:file|https?)\S+)(?:: in function (\S+))?\s*$/i,lineRE2=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?)\S+)(?:: in function (\S+))?\s*$/i,lineRE3=/^\s*Line (\d+) of function script\s*$/i,stack=[],scripts=document.getElementsByTagName("script"),inlineScriptBlocks=[];for(i in scripts)hasKey(scripts,i)&&!scripts[i].src&&inlineScriptBlocks.push(scripts[i]);for(i=2,len=lines.length;len>i;i+=2){var item=null;if(parts=lineRE1.exec(lines[i]))item={url:parts[2],func:parts[3],line:+parts[1]};else if(parts=lineRE2.exec(lines[i])){item={url:parts[3],func:parts[4]};var relativeLine=+parts[1],script=inlineScriptBlocks[parts[2]-1];if(script&&(source=getSource(item.url))){source=source.join("\n");var pos=source.indexOf(script.innerText);pos>=0&&(item.line=relativeLine+source.substring(0,pos).split("\n").length)}}else if(parts=lineRE3.exec(lines[i])){var url=window.location.href.replace(/#.*$/,""),line=parts[1],re=new RegExp(escapeCodeAsRegExpForMatchingInsideHTML(lines[i+1]));source=findSourceInUrls(re,[url]),item={url:url,line:source?source.line:line,func:""}}if(item){item.func||(item.func=guessFunctionName(item.url,item.line));var context=gatherContext(item.url,item.line),midline=context?context[Math.floor(context.length/2)]:null;item.context=context&&midline.replace(/^\s*/,"")===lines[i+1].replace(/^\s*/,"")?context:[lines[i+1]],stack.push(item)}}return stack.length?{name:ex.name,message:lines[0],url:document.location.href,stack:stack}:null}function augmentStackTraceWithInitialElement(stackInfo,url,lineNo,message){var initial={url:url,line:lineNo};if(initial.url&&initial.line){stackInfo.incomplete=!1,initial.func||(initial.func=guessFunctionName(initial.url,initial.line)),initial.context||(initial.context=gatherContext(initial.url,initial.line));var reference=/ '([^']+)' /.exec(message);if(reference&&(initial.column=findSourceInLine(reference[1],initial.url,initial.line)),stackInfo.stack.length>0&&stackInfo.stack[0].url===initial.url){if(stackInfo.stack[0].line===initial.line)return!1;if(!stackInfo.stack[0].line&&stackInfo.stack[0].func===initial.func)return stackInfo.stack[0].line=initial.line,stackInfo.stack[0].context=initial.context,!1}return stackInfo.stack.unshift(initial),stackInfo.partial=!0,!0}return stackInfo.incomplete=!0,!1}function computeStackTraceByWalkingCallerChain(ex,depth){for(var parts,item,source,functionName=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,stack=[],funcs={},recursion=!1,curr=computeStackTraceByWalkingCallerChain.caller;curr&&!recursion;curr=curr.caller)if(curr!==computeStackTrace&&curr!==TraceKit.report){if(item={url:null,func:UNKNOWN_FUNCTION,line:null,column:null},curr.name?item.func=curr.name:(parts=functionName.exec(curr.toString()))&&(item.func=parts[1]),source=findSourceByFunctionBody(curr)){item.url=source.url,item.line=source.line,item.func===UNKNOWN_FUNCTION&&(item.func=guessFunctionName(item.url,item.line));var reference=/ '([^']+)' /.exec(ex.message||ex.description);reference&&(item.column=findSourceInLine(reference[1],source.url,source.line))}funcs[""+curr]?recursion=!0:funcs[""+curr]=!0,stack.push(item)}depth&&stack.splice(0,depth);var result={name:ex.name,message:ex.message,url:document.location.href,stack:stack};return augmentStackTraceWithInitialElement(result,ex.sourceURL||ex.fileName,ex.line||ex.lineNumber,ex.message||ex.description),result}function computeStackTrace(ex,depth){var stack=null;depth=null==depth?0:+depth;try{if(stack=computeStackTraceFromStacktraceProp(ex))return stack}catch(e){if(debug)throw e}try{if(stack=computeStackTraceFromStackProp(ex))return stack}catch(e){if(debug)throw e}try{if(stack=computeStackTraceFromOperaMultiLineMessage(ex))return stack}catch(e){if(debug)throw e}try{if(stack=computeStackTraceByWalkingCallerChain(ex,depth+1))return stack}catch(e){if(debug)throw e}return{}}function computeStackTraceOfCaller(depth){depth=(null==depth?0:+depth)+1;try{throw new Error}catch(ex){return computeStackTrace(ex,depth+1)}}var debug=!1,sourceCache={};return computeStackTrace.augmentStackTraceWithInitialElement=augmentStackTraceWithInitialElement,computeStackTrace.guessFunctionName=guessFunctionName,computeStackTrace.gatherContext=gatherContext,computeStackTrace.ofCaller=computeStackTraceOfCaller,computeStackTrace}();var lastCapturedException,lastEventId,globalServer,globalUser,globalKey,globalProject,authQueryString,_Raven=window.Raven,hasJSON=!(!window.JSON||!window.JSON.stringify),globalOptions={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],collectWindowErrors:!0,tags:{},extra:{}},isRavenInstalled=!1,Raven={VERSION:"1.1.16",debug:!0,noConflict:function(){return window.Raven=_Raven,Raven},config:function(dsn,options){if(globalServer)return logDebug("error","Error: Raven has already been configured"),Raven;if(!dsn)return Raven;var uri=parseDSN(dsn),lastSlash=uri.path.lastIndexOf("/"),path=uri.path.substr(1,lastSlash);return options&&each(options,function(key,value){globalOptions[key]=value}),globalOptions.ignoreErrors.push("Script error."),globalOptions.ignoreErrors.push("Script error"),globalOptions.ignoreErrors.push("Javascript error: Script error on line 0"),globalOptions.ignoreErrors.push("Javascript error: Script error. on line 0"),globalOptions.ignoreErrors=joinRegExp(globalOptions.ignoreErrors),globalOptions.ignoreUrls=globalOptions.ignoreUrls.length?joinRegExp(globalOptions.ignoreUrls):!1,globalOptions.whitelistUrls=globalOptions.whitelistUrls.length?joinRegExp(globalOptions.whitelistUrls):!1,globalOptions.includePaths=joinRegExp(globalOptions.includePaths),globalKey=uri.user,globalProject=uri.path.substr(lastSlash+1),globalServer="//"+uri.host+(uri.port?":"+uri.port:"")+"/"+path+"api/"+globalProject+"/store/",uri.protocol&&(globalServer=uri.protocol+":"+globalServer),globalOptions.fetchContext&&(TraceKit.remoteFetching=!0),globalOptions.linesOfContext&&(TraceKit.linesOfContext=globalOptions.linesOfContext),TraceKit.collectWindowErrors=!!globalOptions.collectWindowErrors,setAuthQueryString(),Raven},install:function(){return isSetup()&&!isRavenInstalled&&(TraceKit.report.subscribe(handleStackInfo),isRavenInstalled=!0),Raven},context:function(options,func,args){return isFunction(options)&&(args=func||[],func=options,options=undefined),Raven.wrap(options,func).apply(this,args)},wrap:function(options,func){function wrapped(){for(var args=[],i=arguments.length,deep=!options||options&&options.deep!==!1;i--;)args[i]=deep?Raven.wrap(options,arguments[i]):arguments[i];try{return func.apply(this,args)}catch(e){throw Raven.captureException(e,options),e}}if(isUndefined(func)&&!isFunction(options))return options;if(isFunction(options)&&(func=options,options=undefined),!isFunction(func))return func;if(func.__raven__)return func;for(var property in func)hasKey(func,property)&&(wrapped[property]=func[property]);return wrapped.__raven__=!0,wrapped.__inner__=func,wrapped},uninstall:function(){return TraceKit.report.uninstall(),isRavenInstalled=!1,Raven},captureException:function(ex,options){if(!(ex instanceof Error))return Raven.captureMessage(ex,options);lastCapturedException=ex;try{TraceKit.report(ex,options)}catch(ex1){if(ex!==ex1)throw ex1}return Raven},captureMessage:function(msg,options){return send(objectMerge({message:msg+""},options)),Raven},setUserContext:function(user){return globalUser=user,Raven},setExtraContext:function(extra){return globalOptions.extra=extra||{},Raven},setTagsContext:function(tags){return globalOptions.tags=tags||{},Raven},lastException:function(){return lastCapturedException},lastEventId:function(){return lastEventId}};Raven.setUser=Raven.setUserContext;var dsnKeys="source protocol user pass host port path".split(" "),dsnPattern=/^(?:(\w+):)?\/\/(\w+)(:\w+)?@([\w\.-]+)(?::(\d+))?(\/.*)/;RavenConfigError.prototype=new Error,RavenConfigError.prototype.constructor=RavenConfigError,afterLoad(),window.Raven=Raven,"function"==typeof define&&define.amd&&define("raven",[],function(){return Raven})}(this),function(window,undefined){var gEval=function(js){(window.execScript||function(js){window.eval.call(window,js)})(js)},isA=function(a,b){return a instanceof(b||Array)},D=document,getElementsByTagName="getElementsByTagName",length="length",readyState="readyState",onreadystatechange="onreadystatechange",scripts=D[getElementsByTagName]("script"),scriptTag=scripts[scripts[length]-1],script=scriptTag.innerHTML.replace(/^\s+|\s+$/g,"");if(!window.ljs){var checkLoaded=scriptTag.src.match(/checkLoaded/)?1:0,header=D[getElementsByTagName]("head")[0]||D.documentElement,urlParse=function(url){var parts={};return parts.u=url.replace(/#(=)?([^#]*)?/g,function(m,a,b){return parts[a?"f":"i"]=b,""}),parts},appendElmt=function(type,attrs,cb){var i,e=D.createElement(type);cb&&(e[readyState]?e[onreadystatechange]=function(){("loaded"===e[readyState]||"complete"===e[readyState])&&(e[onreadystatechange]=null,cb())}:e.onload=cb);for(i in attrs)attrs[i]&&(e[i]=attrs[i]);header.appendChild(e)},load=function(url,cb){if(this.aliases&&this.aliases[url]){var args=this.aliases[url].slice(0);return isA(args)||(args=[args]),cb&&args.push(cb),this.load.apply(this,args)}if(isA(url)){for(var l=url[length];l--;)this.load(url[l]);return cb&&url.push(cb),this.load.apply(this,url)}return url.match(/\.css\b/)?this.loadcss(url,cb):this.loadjs(url,cb)},loaded={},loader={aliases:{},loadjs:function(url,cb){var parts=urlParse(url);return url=parts.u,loaded[url]===!0?(cb&&cb(),this):loaded[url]!==undefined?(cb&&(loaded[url]=function(ocb,cb){return function(){ocb&&ocb(),cb&&cb()}}(loaded[url],cb)),this):(loaded[url]=function(cb){return function(){loaded[url]=!0,cb&&cb()}}(cb),cb=function(){loaded[url]()},appendElmt("script",{type:"text/javascript",src:url,id:parts.i,onerror:function(error){if(parts.f){var c=error.currentTarget;c.parentNode.removeChild(c),appendElmt("script",{type:"text/javascript",src:parts.f,id:parts.i},cb)}}},cb),this)},loadcss:function(url,cb){var parts=urlParse(url);return url=parts.u,loaded[url]||appendElmt("link",{type:"text/css",rel:"stylesheet",href:url,id:parts.i}),loaded[url]=!0,cb&&cb(),this},load:function(){var argv=arguments,argc=argv[length];return 1===argc&&isA(argv[0],Function)?(argv[0](),this):(load.call(this,argv[0],1>=argc?undefined:function(){loader.load.apply(loader,[].slice.call(argv,1))}),this)},addAliases:function(aliases){for(var i in aliases)this.aliases[i]=isA(aliases[i])?aliases[i].slice(0):aliases[i];return this}};if(checkLoaded){var i,l,links,url;for(i=0,l=scripts[length];l>i;i++)(url=scripts[i].getAttribute("src"))&&(loaded[url.replace(/#.*$/,"")]=!0);for(links=D[getElementsByTagName]("link"),i=0,l=links[length];l>i;i++)("stylesheet"===links[i].rel||"text/css"===links[i].type)&&(loaded[links[i].getAttribute("href").replace(/#.*$/,"")]=!0)}window.ljs=loader}script&&gEval(script)}(window),function(factory){"function"==typeof define&&define.amd?define(["jquery"],factory):factory(jQuery)}(function($){function focusable(element,isTabIndexNotNaN){var map,mapName,img,nodeName=element.nodeName.toLowerCase();return"area"===nodeName?(map=element.parentNode,mapName=map.name,element.href&&mapName&&"map"===map.nodeName.toLowerCase()?(img=$("img[usemap=#"+mapName+"]")[0],!!img&&visible(img)):!1):(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:"a"===nodeName?element.href||isTabIndexNotNaN:isTabIndexNotNaN)&&visible(element)}function visible(element){return $.expr.filters.visible(element)&&!$(element).parents().addBack().filter(function(){return"hidden"===$.css(this,"visibility")}).length}$.ui=$.ui||{},$.extend($.ui,{version:"@VERSION",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}}),$.fn.extend({scrollParent:function(){var position=this.css("position"),excludeStaticParent="absolute"===position,scrollParent=this.parents().filter(function(){var parent=$(this);return excludeStaticParent&&"static"===parent.css("position")?!1:/(auto|scroll)/.test(parent.css("overflow")+parent.css("overflow-y")+parent.css("overflow-x"))
}).eq(0);return"fixed"!==position&&scrollParent.length?scrollParent:$(this[0].ownerDocument||document)},uniqueId:function(){var uuid=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++uuid)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&$(this).removeAttr("id")})}}),$.extend($.expr[":"],{data:$.expr.createPseudo?$.expr.createPseudo(function(dataName){return function(elem){return!!$.data(elem,dataName)}}):function(elem,i,match){return!!$.data(elem,match[3])},focusable:function(element){return focusable(element,!isNaN($.attr(element,"tabindex")))},tabbable:function(element){var tabIndex=$.attr(element,"tabindex"),isTabIndexNaN=isNaN(tabIndex);return(isTabIndexNaN||tabIndex>=0)&&focusable(element,!isTabIndexNaN)}}),$("<a>").outerWidth(1).jquery||$.each(["Width","Height"],function(i,name){function reduce(elem,size,border,margin){return $.each(side,function(){size-=parseFloat($.css(elem,"padding"+this))||0,border&&(size-=parseFloat($.css(elem,"border"+this+"Width"))||0),margin&&(size-=parseFloat($.css(elem,"margin"+this))||0)}),size}var side="Width"===name?["Left","Right"]:["Top","Bottom"],type=name.toLowerCase(),orig={innerWidth:$.fn.innerWidth,innerHeight:$.fn.innerHeight,outerWidth:$.fn.outerWidth,outerHeight:$.fn.outerHeight};$.fn["inner"+name]=function(size){return void 0===size?orig["inner"+name].call(this):this.each(function(){$(this).css(type,reduce(this,size)+"px")})},$.fn["outer"+name]=function(size,margin){return"number"!=typeof size?orig["outer"+name].call(this,size):this.each(function(){$(this).css(type,reduce(this,size,!0,margin)+"px")})}}),$.fn.addBack||($.fn.addBack=function(selector){return this.add(null==selector?this.prevObject:this.prevObject.filter(selector))}),$("<a>").data("a-b","a").removeData("a-b").data("a-b")&&($.fn.removeData=function(removeData){return function(key){return arguments.length?removeData.call(this,$.camelCase(key)):removeData.call(this)}}($.fn.removeData)),$.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),$.fn.extend({focus:function(orig){return function(delay,fn){return"number"==typeof delay?this.each(function(){var elem=this;setTimeout(function(){$(elem).focus(),fn&&fn.call(elem)},delay)}):orig.apply(this,arguments)}}($.fn.focus),disableSelection:function(){var eventType="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(eventType+".ui-disableSelection",function(event){event.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(zIndex){if(void 0!==zIndex)return this.css("zIndex",zIndex);if(this.length)for(var position,value,elem=$(this[0]);elem.length&&elem[0]!==document;){if(position=elem.css("position"),("absolute"===position||"relative"===position||"fixed"===position)&&(value=parseInt(elem.css("zIndex"),10),!isNaN(value)&&0!==value))return value;elem=elem.parent()}return 0}}),$.ui.plugin={add:function(module,option,set){var i,proto=$.ui[module].prototype;for(i in set)proto.plugins[i]=proto.plugins[i]||[],proto.plugins[i].push([option,set[i]])},call:function(instance,name,args,allowDisconnected){var i,set=instance.plugins[name];if(set&&(allowDisconnected||instance.element[0].parentNode&&11!==instance.element[0].parentNode.nodeType))for(i=0;i<set.length;i++)instance.options[set[i][0]]&&set[i][1].apply(instance.element,args)}}}),function(factory){"function"==typeof define&&define.amd?define(["jquery"],factory):factory(jQuery)}(function($){var widget_uuid=0,widget_slice=Array.prototype.slice;return $.cleanData=function(orig){return function(elems){var events,elem,i;for(i=0;null!=(elem=elems[i]);i++)try{events=$._data(elem,"events"),events&&events.remove&&$(elem).triggerHandler("remove")}catch(e){}orig(elems)}}($.cleanData),$.widget=function(name,base,prototype){var fullName,existingConstructor,constructor,basePrototype,proxiedPrototype={},namespace=name.split(".")[0];return name=name.split(".")[1],fullName=namespace+"-"+name,prototype||(prototype=base,base=$.Widget),$.expr[":"][fullName.toLowerCase()]=function(elem){return!!$.data(elem,fullName)},$[namespace]=$[namespace]||{},existingConstructor=$[namespace][name],constructor=$[namespace][name]=function(options,element){return this._createWidget?void(arguments.length&&this._createWidget(options,element)):new constructor(options,element)},$.extend(constructor,existingConstructor,{version:prototype.version,_proto:$.extend({},prototype),_childConstructors:[]}),basePrototype=new base,basePrototype.options=$.widget.extend({},basePrototype.options),$.each(prototype,function(prop,value){return $.isFunction(value)?void(proxiedPrototype[prop]=function(){var _super=function(){return base.prototype[prop].apply(this,arguments)},_superApply=function(args){return base.prototype[prop].apply(this,args)};return function(){var returnValue,__super=this._super,__superApply=this._superApply;return this._super=_super,this._superApply=_superApply,returnValue=value.apply(this,arguments),this._super=__super,this._superApply=__superApply,returnValue}}()):void(proxiedPrototype[prop]=value)}),constructor.prototype=$.widget.extend(basePrototype,{widgetEventPrefix:existingConstructor?basePrototype.widgetEventPrefix||name:name},proxiedPrototype,{constructor:constructor,namespace:namespace,widgetName:name,widgetFullName:fullName}),existingConstructor?($.each(existingConstructor._childConstructors,function(i,child){var childPrototype=child.prototype;$.widget(childPrototype.namespace+"."+childPrototype.widgetName,constructor,child._proto)}),delete existingConstructor._childConstructors):base._childConstructors.push(constructor),$.widget.bridge(name,constructor),constructor},$.widget.extend=function(target){for(var key,value,input=widget_slice.call(arguments,1),inputIndex=0,inputLength=input.length;inputLength>inputIndex;inputIndex++)for(key in input[inputIndex])value=input[inputIndex][key],input[inputIndex].hasOwnProperty(key)&&void 0!==value&&(target[key]=$.isPlainObject(value)?$.isPlainObject(target[key])?$.widget.extend({},target[key],value):$.widget.extend({},value):value);return target},$.widget.bridge=function(name,object){var fullName=object.prototype.widgetFullName||name;$.fn[name]=function(options){var isMethodCall="string"==typeof options,args=widget_slice.call(arguments,1),returnValue=this;return options=!isMethodCall&&args.length?$.widget.extend.apply(null,[options].concat(args)):options,this.each(isMethodCall?function(){var methodValue,instance=$.data(this,fullName);return"instance"===options?(returnValue=instance,!1):instance?$.isFunction(instance[options])&&"_"!==options.charAt(0)?(methodValue=instance[options].apply(instance,args),methodValue!==instance&&void 0!==methodValue?(returnValue=methodValue&&methodValue.jquery?returnValue.pushStack(methodValue.get()):methodValue,!1):void 0):$.error("no such method '"+options+"' for "+name+" widget instance"):$.error("cannot call methods on "+name+" prior to initialization; attempted to call method '"+options+"'")}:function(){var instance=$.data(this,fullName);instance?(instance.option(options||{}),instance._init&&instance._init()):$.data(this,fullName,new object(options,this))}),returnValue}},$.Widget=function(){},$.Widget._childConstructors=[],$.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(options,element){element=$(element||this.defaultElement||this)[0],this.element=$(element),this.uuid=widget_uuid++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=$.widget.extend({},this.options,this._getCreateOptions(),options),this.bindings=$(),this.hoverable=$(),this.focusable=$(),element!==this&&($.data(element,this.widgetFullName,this),this._on(!0,this.element,{remove:function(event){event.target===element&&this.destroy()}}),this.document=$(element.style?element.ownerDocument:element.document||element),this.window=$(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:$.noop,_getCreateEventData:$.noop,_create:$.noop,_init:$.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData($.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:$.noop,widget:function(){return this.element},option:function(key,value){var parts,curOption,i,options=key;if(0===arguments.length)return $.widget.extend({},this.options);if("string"==typeof key)if(options={},parts=key.split("."),key=parts.shift(),parts.length){for(curOption=options[key]=$.widget.extend({},this.options[key]),i=0;i<parts.length-1;i++)curOption[parts[i]]=curOption[parts[i]]||{},curOption=curOption[parts[i]];if(key=parts.pop(),1===arguments.length)return void 0===curOption[key]?null:curOption[key];curOption[key]=value}else{if(1===arguments.length)return void 0===this.options[key]?null:this.options[key];options[key]=value}return this._setOptions(options),this},_setOptions:function(options){var key;for(key in options)this._setOption(key,options[key]);return this},_setOption:function(key,value){return this.options[key]=value,"disabled"===key&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!value),value&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(suppressDisabledCheck,element,handlers){var delegateElement,instance=this;"boolean"!=typeof suppressDisabledCheck&&(handlers=element,element=suppressDisabledCheck,suppressDisabledCheck=!1),handlers?(element=delegateElement=$(element),this.bindings=this.bindings.add(element)):(handlers=element,element=this.element,delegateElement=this.widget()),$.each(handlers,function(event,handler){function handlerProxy(){return suppressDisabledCheck||instance.options.disabled!==!0&&!$(this).hasClass("ui-state-disabled")?("string"==typeof handler?instance[handler]:handler).apply(instance,arguments):void 0}"string"!=typeof handler&&(handlerProxy.guid=handler.guid=handler.guid||handlerProxy.guid||$.guid++);var match=event.match(/^([\w:-]*)\s*(.*)$/),eventName=match[1]+instance.eventNamespace,selector=match[2];selector?delegateElement.delegate(selector,eventName,handlerProxy):element.bind(eventName,handlerProxy)})},_off:function(element,eventName){eventName=(eventName||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,element.unbind(eventName).undelegate(eventName)},_delay:function(handler,delay){function handlerProxy(){return("string"==typeof handler?instance[handler]:handler).apply(instance,arguments)}var instance=this;return setTimeout(handlerProxy,delay||0)},_hoverable:function(element){this.hoverable=this.hoverable.add(element),this._on(element,{mouseenter:function(event){$(event.currentTarget).addClass("ui-state-hover")},mouseleave:function(event){$(event.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(element){this.focusable=this.focusable.add(element),this._on(element,{focusin:function(event){$(event.currentTarget).addClass("ui-state-focus")},focusout:function(event){$(event.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(type,event,data){var prop,orig,callback=this.options[type];if(data=data||{},event=$.Event(event),event.type=(type===this.widgetEventPrefix?type:this.widgetEventPrefix+type).toLowerCase(),event.target=this.element[0],orig=event.originalEvent)for(prop in orig)prop in event||(event[prop]=orig[prop]);return this.element.trigger(event,data),!($.isFunction(callback)&&callback.apply(this.element[0],[event].concat(data))===!1||event.isDefaultPrevented())}},$.each({show:"fadeIn",hide:"fadeOut"},function(method,defaultEffect){$.Widget.prototype["_"+method]=function(element,options,callback){"string"==typeof options&&(options={effect:options});var hasOptions,effectName=options?options===!0||"number"==typeof options?defaultEffect:options.effect||defaultEffect:method;options=options||{},"number"==typeof options&&(options={duration:options}),hasOptions=!$.isEmptyObject(options),options.complete=callback,options.delay&&element.delay(options.delay),hasOptions&&$.effects&&$.effects.effect[effectName]?element[method](options):effectName!==method&&element[effectName]?element[effectName](options.duration,options.easing,callback):element.queue(function(next){$(this)[method](),callback&&callback.call(element[0]),next()})}}),$.widget}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./widget"],factory):factory(jQuery)}(function($){var mouseHandled=!1;return $(document).mouseup(function(){mouseHandled=!1}),$.widget("ui.mouse",{version:"@VERSION",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var that=this;this.element.bind("mousedown."+this.widgetName,function(event){return that._mouseDown(event)}).bind("click."+this.widgetName,function(event){return!0===$.data(event.target,that.widgetName+".preventClickEvent")?($.removeData(event.target,that.widgetName+".preventClickEvent"),event.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(event){if(!mouseHandled){this._mouseStarted&&this._mouseUp(event),this._mouseDownEvent=event;var that=this,btnIsLeft=1===event.which,elIsCancel="string"==typeof this.options.cancel&&event.target.nodeName?$(event.target).closest(this.options.cancel).length:!1;return btnIsLeft&&!elIsCancel&&this._mouseCapture(event)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){that.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(event)&&this._mouseDelayMet(event)&&(this._mouseStarted=this._mouseStart(event)!==!1,!this._mouseStarted)?(event.preventDefault(),!0):(!0===$.data(event.target,this.widgetName+".preventClickEvent")&&$.removeData(event.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(event){return that._mouseMove(event)},this._mouseUpDelegate=function(event){return that._mouseUp(event)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),event.preventDefault(),mouseHandled=!0,!0)):!0}},_mouseMove:function(event){return $.ui.ie&&(!document.documentMode||document.documentMode<9)&&!event.button?this._mouseUp(event):event.which?this._mouseStarted?(this._mouseDrag(event),event.preventDefault()):(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,event)!==!1,this._mouseStarted?this._mouseDrag(event):this._mouseUp(event)),!this._mouseStarted):this._mouseUp(event)},_mouseUp:function(event){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,event.target===this._mouseDownEvent.target&&$.data(event.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(event)),mouseHandled=!1,!1},_mouseDistanceMet:function(event){return Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],factory):factory(jQuery)}(function($){return $.widget("ui.draggable",$.ui.mouse,{version:"@VERSION",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||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(key,value){this._super(key,value),"handle"===key&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(event){var document=this.document[0],o=this.options;try{document.activeElement&&"body"!==document.activeElement.nodeName.toLowerCase()&&$(document.activeElement).blur()}catch(error){}return this.helper||o.disabled||$(event.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(event),this.handle?($(o.iframeFix===!0?"iframe":o.iframeFix).each(function(){$("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css($(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(event){var o=this.options;return this.helper=this._createHelper(event),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),$.ui.ddmanager&&($.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(event,!1),this.originalPageX=event.pageX,this.originalPageY=event.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this._setContainment(),this._trigger("start",event)===!1?(this._clear(),!1):(this._cacheHelperProportions(),$.ui.ddmanager&&!o.dropBehaviour&&$.ui.ddmanager.prepareOffsets(this,event),this._mouseDrag(event,!0),$.ui.ddmanager&&$.ui.ddmanager.dragStart(this,event),!0)},_mouseDrag:function(event,noPropagation){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(event,!0),this.positionAbs=this._convertPositionTo("absolute"),!noPropagation){var ui=this._uiHash();if(this._trigger("drag",event,ui)===!1)return this._mouseUp({}),!1;this.position=ui.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,event),!1},_mouseStop:function(event){var that=this,dropped=!1;return $.ui.ddmanager&&!this.options.dropBehaviour&&(dropped=$.ui.ddmanager.drop(this,event)),this.dropped&&(dropped=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!dropped||"valid"===this.options.revert&&dropped||this.options.revert===!0||$.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped)?$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){that._trigger("stop",event)!==!1&&that._clear()}):this._trigger("stop",event)!==!1&&this._clear(),!1},_mouseUp:function(event){return $("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),$.ui.ddmanager&&$.ui.ddmanager.dragStop(this,event),this.element.focus(),$.ui.mouse.prototype._mouseUp.call(this,event)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(event){return this.options.handle?!!$(event.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(event){var o=this.options,helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event])):"clone"===o.helper?this.element.clone().removeAttr("id"):this.element;return helper.parents("body").length||helper.appendTo("parent"===o.appendTo?this.element[0].parentNode:o.appendTo),helper[0]===this.element[0]||/(fixed|absolute)/.test(helper.css("position"))||helper.css("position","absolute"),helper},_adjustOffsetFromHelper:function(obj){"string"==typeof obj&&(obj=obj.split(" ")),$.isArray(obj)&&(obj={left:+obj[0],top:+obj[1]||0}),"left"in obj&&(this.offset.click.left=obj.left+this.margins.left),"right"in obj&&(this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left),"top"in obj&&(this.offset.click.top=obj.top+this.margins.top),"bottom"in obj&&(this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top)},_isRootNode:function(element){return/(html|body)/i.test(element.tagName)||element===this.document[0]},_getParentOffset:function(){var po=this.offsetParent.offset(),document=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&$.contains(this.scrollParent[0],this.offsetParent[0])&&(po.left+=this.scrollParent.scrollLeft(),po.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(po={top:0,left:0}),{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var p=this.element.position(),scrollIsRootNode=this._isRootNode(this.scrollParent[0]);return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+(scrollIsRootNode?0:this.scrollParent.scrollTop()),left:p.left-(parseInt(this.helper.css("left"),10)||0)+(scrollIsRootNode?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 over,c,ce,o=this.options,document=this.document[0];return this.relative_container=null,o.containment?"window"===o.containment?void(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()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===o.containment?void(this.containment=[0,0,$(document).width()-this.helperProportions.width-this.margins.left,($(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):o.containment.constructor===Array?void(this.containment=o.containment):("parent"===o.containment&&(o.containment=this.helper[0].parentNode),c=$(o.containment),ce=c[0],void(ce&&(over="hidden"!==c.css("overflow"),this.containment=[(parseInt(c.css("borderLeftWidth"),10)||0)+(parseInt(c.css("paddingLeft"),10)||0),(parseInt(c.css("borderTopWidth"),10)||0)+(parseInt(c.css("paddingTop"),10)||0),(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt(c.css("borderRightWidth"),10)||0)-(parseInt(c.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt(c.css("borderBottomWidth"),10)||0)-(parseInt(c.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=c))):void(this.containment=null)},_convertPositionTo:function(d,pos){pos||(pos=this.position);var mod="absolute"===d?1:-1,scrollIsRootNode=this._isRootNode(this.scrollParent[0]);return{top:pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-("fixed"===this.cssPosition?-this.offset.scroll.top:scrollIsRootNode?0:this.offset.scroll.top)*mod,left:pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-("fixed"===this.cssPosition?-this.offset.scroll.left:scrollIsRootNode?0:this.offset.scroll.left)*mod}},_generatePosition:function(event,constrainPosition){var containment,co,top,left,o=this.options,scrollIsRootNode=this._isRootNode(this.scrollParent[0]),pageX=event.pageX,pageY=event.pageY;return scrollIsRootNode&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),constrainPosition&&(this.containment&&(this.relative_container?(co=this.relative_container.offset(),containment=[this.containment[0]+co.left,this.containment[1]+co.top,this.containment[2]+co.left,this.containment[3]+co.top]):containment=this.containment,event.pageX-this.offset.click.left<containment[0]&&(pageX=containment[0]+this.offset.click.left),event.pageY-this.offset.click.top<containment[1]&&(pageY=containment[1]+this.offset.click.top),event.pageX-this.offset.click.left>containment[2]&&(pageX=containment[2]+this.offset.click.left),event.pageY-this.offset.click.top>containment[3]&&(pageY=containment[3]+this.offset.click.top)),o.grid&&(top=o.grid[1]?this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,pageY=containment?top-this.offset.click.top>=containment[1]||top-this.offset.click.top>containment[3]?top:top-this.offset.click.top>=containment[1]?top-o.grid[1]:top+o.grid[1]:top,left=o.grid[0]?this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,pageX=containment?left-this.offset.click.left>=containment[0]||left-this.offset.click.left>containment[2]?left:left-this.offset.click.left>=containment[0]?left-o.grid[0]:left+o.grid[0]:left),"y"===o.axis&&(pageX=this.originalPageX),"x"===o.axis&&(pageY=this.originalPageY)),{top:pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:scrollIsRootNode?0:this.offset.scroll.top),left:pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:scrollIsRootNode?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("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(type,event,ui){return ui=ui||this._uiHash(),$.ui.plugin.call(this,type,[event,ui,this],!0),"drag"===type&&(this.positionAbs=this._convertPositionTo("absolute")),$.Widget.prototype._trigger.call(this,type,event,ui)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),$.ui.plugin.add("draggable","connectToSortable",{start:function(event,ui,inst){var o=inst.options,uiSortable=$.extend({},ui,{item:inst.element});inst.sortables=[],$(o.connectToSortable).each(function(){var sortable=$(this).sortable("instance");sortable&&!sortable.options.disabled&&(inst.sortables.push({instance:sortable,shouldRevert:sortable.options.revert}),sortable.refreshPositions(),sortable._trigger("activate",event,uiSortable))})},stop:function(event,ui,inst){var uiSortable=$.extend({},ui,{item:inst.element});$.each(inst.sortables,function(){this.instance.isOver?(this.instance.isOver=0,inst.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(event),this.instance.options.helper=this.instance.options._helper,"original"===inst.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",event,uiSortable))})},drag:function(event,ui,inst){var that=this;$.each(inst.sortables,function(){var innermostIntersecting=!1,thisSortable=this;this.instance.positionAbs=inst.positionAbs,this.instance.helperProportions=inst.helperProportions,this.instance.offset.click=inst.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(innermostIntersecting=!0,$.each(inst.sortables,function(){return this.instance.positionAbs=inst.positionAbs,this.instance.helperProportions=inst.helperProportions,this.instance.offset.click=inst.offset.click,this!==thisSortable&&this.instance._intersectsWith(this.instance.containerCache)&&$.contains(thisSortable.instance.element[0],this.instance.element[0])&&(innermostIntersecting=!1),innermostIntersecting})),innermostIntersecting?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=$(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return ui.helper[0]},event.target=this.instance.currentItem[0],this.instance._mouseCapture(event,!0),this.instance._mouseStart(event,!0,!0),this.instance.offset.click.top=inst.offset.click.top,this.instance.offset.click.left=inst.offset.click.left,this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top,inst._trigger("toSortable",event),inst.dropped=this.instance.element,inst.currentItem=inst.element,this.instance.fromOutside=inst),this.instance.currentItem&&this.instance._mouseDrag(event)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",event,this.instance._uiHash(this.instance)),this.instance._mouseStop(event,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),inst._trigger("fromSortable",event),inst.dropped=!1)})}}),$.ui.plugin.add("draggable","cursor",{start:function(event,ui,instance){var t=$("body"),o=instance.options;t.css("cursor")&&(o._cursor=t.css("cursor")),t.css("cursor",o.cursor)},stop:function(event,ui,instance){var o=instance.options;o._cursor&&$("body").css("cursor",o._cursor)}}),$.ui.plugin.add("draggable","opacity",{start:function(event,ui,instance){var t=$(ui.helper),o=instance.options;t.css("opacity")&&(o._opacity=t.css("opacity")),t.css("opacity",o.opacity)},stop:function(event,ui,instance){var o=instance.options;o._opacity&&$(ui.helper).css("opacity",o._opacity)}}),$.ui.plugin.add("draggable","scroll",{start:function(event,ui,i){i.scrollParent[0]!==i.document[0]&&"HTML"!==i.scrollParent[0].tagName&&(i.overflowOffset=i.scrollParent.offset())},drag:function(event,ui,i){var o=i.options,scrolled=!1,document=i.document[0];i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(o.axis&&"x"===o.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-event.pageY<o.scrollSensitivity?i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop+o.scrollSpeed:event.pageY-i.overflowOffset.top<o.scrollSensitivity&&(i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop-o.scrollSpeed)),o.axis&&"y"===o.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-event.pageX<o.scrollSensitivity?i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft+o.scrollSpeed:event.pageX-i.overflowOffset.left<o.scrollSensitivity&&(i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft-o.scrollSpeed))):(o.axis&&"x"===o.axis||(event.pageY-$(document).scrollTop()<o.scrollSensitivity?scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed):$(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity&&(scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed))),o.axis&&"y"===o.axis||(event.pageX-$(document).scrollLeft()<o.scrollSensitivity?scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed):$(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity&&(scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed)))),scrolled!==!1&&$.ui.ddmanager&&!o.dropBehaviour&&$.ui.ddmanager.prepareOffsets(i,event)
}}),$.ui.plugin.add("draggable","snap",{start:function(event,ui,i){var o=i.options;i.snapElements=[],$(o.snap.constructor!==String?o.snap.items||":data(ui-draggable)":o.snap).each(function(){var $t=$(this),$o=$t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left})})},drag:function(event,ui,inst){var ts,bs,ls,rs,l,r,t,b,i,first,o=inst.options,d=o.snapTolerance,x1=ui.offset.left,x2=x1+inst.helperProportions.width,y1=ui.offset.top,y2=y1+inst.helperProportions.height;for(i=inst.snapElements.length-1;i>=0;i--)l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top,b=t+inst.snapElements[i].height,l-d>x2||x1>r+d||t-d>y2||y1>b+d||!$.contains(inst.snapElements[i].item.ownerDocument,inst.snapElements[i].item)?(inst.snapElements[i].snapping&&inst.options.snap.release&&inst.options.snap.release.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})),inst.snapElements[i].snapping=!1):("inner"!==o.snapMode&&(ts=Math.abs(t-y2)<=d,bs=Math.abs(b-y1)<=d,ls=Math.abs(l-x2)<=d,rs=Math.abs(r-x1)<=d,ts&&(ui.position.top=inst._convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top-inst.margins.top),bs&&(ui.position.top=inst._convertPositionTo("relative",{top:b,left:0}).top-inst.margins.top),ls&&(ui.position.left=inst._convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left-inst.margins.left),rs&&(ui.position.left=inst._convertPositionTo("relative",{top:0,left:r}).left-inst.margins.left)),first=ts||bs||ls||rs,"outer"!==o.snapMode&&(ts=Math.abs(t-y1)<=d,bs=Math.abs(b-y2)<=d,ls=Math.abs(l-x1)<=d,rs=Math.abs(r-x2)<=d,ts&&(ui.position.top=inst._convertPositionTo("relative",{top:t,left:0}).top-inst.margins.top),bs&&(ui.position.top=inst._convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top-inst.margins.top),ls&&(ui.position.left=inst._convertPositionTo("relative",{top:0,left:l}).left-inst.margins.left),rs&&(ui.position.left=inst._convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left-inst.margins.left)),!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first)&&inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})),inst.snapElements[i].snapping=ts||bs||ls||rs||first)}}),$.ui.plugin.add("draggable","stack",{start:function(event,ui,instance){var min,o=instance.options,group=$.makeArray($(o.stack)).sort(function(a,b){return(parseInt($(a).css("zIndex"),10)||0)-(parseInt($(b).css("zIndex"),10)||0)});group.length&&(min=parseInt($(group[0]).css("zIndex"),10)||0,$(group).each(function(i){$(this).css("zIndex",min+i)}),this.css("zIndex",min+group.length))}}),$.ui.plugin.add("draggable","zIndex",{start:function(event,ui,instance){var t=$(ui.helper),o=instance.options;t.css("zIndex")&&(o._zIndex=t.css("zIndex")),t.css("zIndex",o.zIndex)},stop:function(event,ui,instance){var o=instance.options;o._zIndex&&$(ui.helper).css("zIndex",o._zIndex)}}),$.ui.draggable}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./mouse","./draggable"],factory):factory(jQuery)}(function($){return $.widget("ui.droppable",{version:"@VERSION",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var proportions,o=this.options,accept=o.accept;this.isover=!1,this.isout=!0,this.accept=$.isFunction(accept)?accept:function(d){return d.is(accept)},this.proportions=function(){return arguments.length?void(proportions=arguments[0]):proportions?proportions:proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(o.scope),o.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(scope){$.ui.ddmanager.droppables[scope]=$.ui.ddmanager.droppables[scope]||[],$.ui.ddmanager.droppables[scope].push(this)},_splice:function(drop){for(var i=0;i<drop.length;i++)drop[i]===this&&drop.splice(i,1)},_destroy:function(){var drop=$.ui.ddmanager.droppables[this.options.scope];this._splice(drop),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(key,value){if("accept"===key)this.accept=$.isFunction(value)?value:function(d){return d.is(value)};else if("scope"===key){var drop=$.ui.ddmanager.droppables[this.options.scope];this._splice(drop),this._addToManager(value)}this._super(key,value)},_activate:function(event){var draggable=$.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),draggable&&this._trigger("activate",event,this.ui(draggable))},_deactivate:function(event){var draggable=$.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),draggable&&this._trigger("deactivate",event,this.ui(draggable))},_over:function(event){var draggable=$.ui.ddmanager.current;draggable&&(draggable.currentItem||draggable.element)[0]!==this.element[0]&&this.accept.call(this.element[0],draggable.currentItem||draggable.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",event,this.ui(draggable)))},_out:function(event){var draggable=$.ui.ddmanager.current;draggable&&(draggable.currentItem||draggable.element)[0]!==this.element[0]&&this.accept.call(this.element[0],draggable.currentItem||draggable.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",event,this.ui(draggable)))},_drop:function(event,custom){var draggable=custom||$.ui.ddmanager.current,childrenIntersection=!1;return draggable&&(draggable.currentItem||draggable.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var inst=$(this).droppable("instance");return inst.options.greedy&&!inst.options.disabled&&inst.options.scope===draggable.options.scope&&inst.accept.call(inst.element[0],draggable.currentItem||draggable.element)&&$.ui.intersect(draggable,$.extend(inst,{offset:inst.element.offset()}),inst.options.tolerance)?(childrenIntersection=!0,!1):void 0}),childrenIntersection?!1:this.accept.call(this.element[0],draggable.currentItem||draggable.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",event,this.ui(draggable)),this.element):!1):!1},ui:function(c){return{draggable:c.currentItem||c.element,helper:c.helper,position:c.position,offset:c.positionAbs}}}),$.ui.intersect=function(){function isOverAxis(x,reference,size){return x>=reference&&reference+size>x}return function(draggable,droppable,toleranceMode){if(!droppable.offset)return!1;var draggableLeft,draggableTop,x1=(draggable.positionAbs||draggable.position.absolute).left,y1=(draggable.positionAbs||draggable.position.absolute).top,x2=x1+draggable.helperProportions.width,y2=y1+draggable.helperProportions.height,l=droppable.offset.left,t=droppable.offset.top,r=l+droppable.proportions().width,b=t+droppable.proportions().height;switch(toleranceMode){case"fit":return x1>=l&&r>=x2&&y1>=t&&b>=y2;case"intersect":return l<x1+draggable.helperProportions.width/2&&x2-draggable.helperProportions.width/2<r&&t<y1+draggable.helperProportions.height/2&&y2-draggable.helperProportions.height/2<b;case"pointer":return draggableLeft=(draggable.positionAbs||draggable.position.absolute).left+(draggable.clickOffset||draggable.offset.click).left,draggableTop=(draggable.positionAbs||draggable.position.absolute).top+(draggable.clickOffset||draggable.offset.click).top,isOverAxis(draggableTop,t,droppable.proportions().height)&&isOverAxis(draggableLeft,l,droppable.proportions().width);case"touch":return(y1>=t&&b>=y1||y2>=t&&b>=y2||t>y1&&y2>b)&&(x1>=l&&r>=x1||x2>=l&&r>=x2||l>x1&&x2>r);default:return!1}}}(),$.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,event){var i,j,m=$.ui.ddmanager.droppables[t.options.scope]||[],type=event?event.type:null,list=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();droppablesLoop:for(i=0;i<m.length;i++)if(!(m[i].options.disabled||t&&!m[i].accept.call(m[i].element[0],t.currentItem||t.element))){for(j=0;j<list.length;j++)if(list[j]===m[i].element[0]){m[i].proportions().height=0;continue droppablesLoop}m[i].visible="none"!==m[i].element.css("display"),m[i].visible&&("mousedown"===type&&m[i]._activate.call(m[i],event),m[i].offset=m[i].element.offset(),m[i].proportions({width:m[i].element[0].offsetWidth,height:m[i].element[0].offsetHeight}))}},drop:function(draggable,event){var dropped=!1;return $.each(($.ui.ddmanager.droppables[draggable.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&$.ui.intersect(draggable,this,this.options.tolerance)&&(dropped=this._drop.call(this,event)||dropped),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],draggable.currentItem||draggable.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,event)))}),dropped},dragStart:function(draggable,event){draggable.element.parentsUntil("body").bind("scroll.droppable",function(){draggable.options.refreshPositions||$.ui.ddmanager.prepareOffsets(draggable,event)})},drag:function(draggable,event){draggable.options.refreshPositions&&$.ui.ddmanager.prepareOffsets(draggable,event),$.each($.ui.ddmanager.droppables[draggable.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible&&!$(this).data("dragMultipleActive")){var parentInstance,scope,parent,intersects=$.ui.intersect(draggable,this,this.options.tolerance),c=!intersects&&this.isover?"isout":intersects&&!this.isover?"isover":null;c&&(this.options.greedy&&(scope=this.options.scope,parent=this.element.parents(":data(ui-droppable)").filter(function(){return $(this).droppable("instance").options.scope===scope}),parent.length&&(parentInstance=$(parent[0]).droppable("instance"),parentInstance.greedyChild="isover"===c)),parentInstance&&"isover"===c&&(parentInstance.isover=!1,parentInstance.isout=!0,parentInstance._out.call(parentInstance,event)),this[c]=!0,this["isout"===c?"isover":"isout"]=!1,this["isover"===c?"_over":"_out"].call(this,event),parentInstance&&"isout"===c&&(parentInstance.isout=!1,parentInstance.isover=!0,parentInstance._over.call(parentInstance,event)))}})},dragStop:function(draggable,event){draggable.element.parentsUntil("body").unbind("scroll.droppable"),draggable.options.refreshPositions||$.ui.ddmanager.prepareOffsets(draggable,event)}},$.ui.droppable}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],factory):factory(jQuery)}(function($){return $.widget("ui.resizable",$.ui.mouse,{version:"@VERSION",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,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(value){return parseInt(value,10)||0},_isNumber:function(value){return!isNaN(parseInt(value,10))},_hasScroll:function(el,a){if("hidden"===$(el).css("overflow"))return!1;var scroll=a&&"left"===a?"scrollLeft":"scrollTop",has=!1;return el[scroll]>0?!0:(el[scroll]=1,has=el[scroll]>0,el[scroll]=0,has)},_create:function(){var n,i,handle,axis,hname,that=this,o=this.options;if(this.element.addClass("ui-resizable"),$.extend(this,{_aspectRatio:!!o.aspectRatio,aspectRatio:o.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.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,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom: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({margin:this.originalElement.css("margin")}),this._proportionallyResize()),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.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),n=this.handles.split(","),this.handles={},i=0;i<n.length;i++)handle=$.trim(n[i]),hname="ui-resizable-"+handle,axis=$("<div class='ui-resizable-handle "+hname+"'></div>"),axis.css({zIndex:o.zIndex}),"se"===handle&&axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[handle]=".ui-resizable-"+handle,this.element.append(axis);this._renderAxis=function(target){var i,axis,padPos,padWrapper;target=target||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=this.element.children(this.handles[i]).first().show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(axis=$(this.handles[i],this.element),padWrapper=/sw|ne|nw|se|n|s/.test(i)?axis.outerHeight():axis.outerWidth(),padPos=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),target.css(padPos,padWrapper),this._proportionallyResize()),$(this.handles[i]).length},this._renderAxis(this.element),this._handles=$(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){that.resizing||(this.className&&(axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),that.axis=axis&&axis[1]?axis[1]:"se")}),o.autoHide&&(this._handles.hide(),$(this.element).addClass("ui-resizable-autohide").mouseenter(function(){o.disabled||($(this).removeClass("ui-resizable-autohide"),that._handles.show())}).mouseleave(function(){o.disabled||that.resizing||($(this).addClass("ui-resizable-autohide"),that._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var wrapper,_destroy=function(exp){$(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(_destroy(this.element),wrapper=this.element,this.originalElement.css({position:wrapper.css("position"),width:wrapper.outerWidth(),height:wrapper.outerHeight(),top:wrapper.css("top"),left:wrapper.css("left")}).insertAfter(wrapper),wrapper.remove()),this.originalElement.css("resize",this.originalResizeStyle),_destroy(this.originalElement),this},_mouseCapture:function(event){var i,handle,capture=!1;for(i in this.handles)handle=$(this.handles[i])[0],(handle===event.target||$.contains(handle,event.target))&&(capture=!0);return!this.options.disabled&&capture},_mouseStart:function(event){var curleft,curtop,cursor,o=this.options,el=this.element;return this.resizing=!0,this._renderProxy(),curleft=this._num(this.helper.css("left")),curtop=this._num(this.helper.css("top")),o.containment&&(curleft+=$(o.containment).scrollLeft()||0,curtop+=$(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:curleft,top:curtop},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:el.width(),height:el.height()},this.originalSize=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()},this.originalPosition={left:curleft,top:curtop},this.sizeDiff={width:el.outerWidth()-el.width(),height:el.outerHeight()-el.height()},this.originalMousePosition={left:event.pageX,top:event.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,cursor=$(".ui-resizable-"+this.axis).css("cursor"),$("body").css("cursor","auto"===cursor?this.axis+"-resize":cursor),el.addClass("ui-resizable-resizing"),this._propagate("start",event),!0},_mouseDrag:function(event){var data,props,smp=this.originalMousePosition,a=this.axis,dx=event.pageX-smp.left||0,dy=event.pageY-smp.top||0,trigger=this._change[a];return this._updatePrevProperties(),trigger?(data=trigger.apply(this,[event,dx,dy]),this._updateVirtualBoundaries(event.shiftKey),(this._aspectRatio||event.shiftKey)&&(data=this._updateRatio(data,event)),data=this._respectSize(data,event),this._updateCache(data),this._propagate("resize",event),props=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),$.isEmptyObject(props)||(this._updatePrevProperties(),this._trigger("resize",event,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(event){this.resizing=!1;var pr,ista,soffseth,soffsetw,s,left,top,o=this.options,that=this;return this._helper&&(pr=this._proportionallyResizeElements,ista=pr.length&&/textarea/i.test(pr[0].nodeName),soffseth=ista&&this._hasScroll(pr[0],"left")?0:that.sizeDiff.height,soffsetw=ista?0:that.sizeDiff.width,s={width:that.helper.width()-soffsetw,height:that.helper.height()-soffseth},left=parseInt(that.element.css("left"),10)+(that.position.left-that.originalPosition.left)||null,top=parseInt(that.element.css("top"),10)+(that.position.top-that.originalPosition.top)||null,o.animate||this.element.css($.extend(s,{top:top,left:left})),that.helper.height(that.size.height),that.helper.width(that.size.width),this._helper&&!o.animate&&this._proportionallyResize()),$("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",event),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 props={};return this.position.top!==this.prevPosition.top&&(props.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(props.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(props.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(props.height=this.size.height+"px"),this.helper.css(props),props},_updateVirtualBoundaries:function(forceAspectRatio){var pMinWidth,pMaxWidth,pMinHeight,pMaxHeight,b,o=this.options;b={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||forceAspectRatio)&&(pMinWidth=b.minHeight*this.aspectRatio,pMinHeight=b.minWidth/this.aspectRatio,pMaxWidth=b.maxHeight*this.aspectRatio,pMaxHeight=b.maxWidth/this.aspectRatio,pMinWidth>b.minWidth&&(b.minWidth=pMinWidth),pMinHeight>b.minHeight&&(b.minHeight=pMinHeight),pMaxWidth<b.maxWidth&&(b.maxWidth=pMaxWidth),pMaxHeight<b.maxHeight&&(b.maxHeight=pMaxHeight)),this._vBoundaries=b},_updateCache:function(data){this.offset=this.helper.offset(),this._isNumber(data.left)&&(this.position.left=data.left),this._isNumber(data.top)&&(this.position.top=data.top),this._isNumber(data.height)&&(this.size.height=data.height),this._isNumber(data.width)&&(this.size.width=data.width)},_updateRatio:function(data){var cpos=this.position,csize=this.size,a=this.axis;return this._isNumber(data.height)?data.width=data.height*this.aspectRatio:this._isNumber(data.width)&&(data.height=data.width/this.aspectRatio),"sw"===a&&(data.left=cpos.left+(csize.width-data.width),data.top=null),"nw"===a&&(data.top=cpos.top+(csize.height-data.height),data.left=cpos.left+(csize.width-data.width)),data},_respectSize:function(data){var o=this._vBoundaries,a=this.axis,ismaxw=this._isNumber(data.width)&&o.maxWidth&&o.maxWidth<data.width,ismaxh=this._isNumber(data.height)&&o.maxHeight&&o.maxHeight<data.height,isminw=this._isNumber(data.width)&&o.minWidth&&o.minWidth>data.width,isminh=this._isNumber(data.height)&&o.minHeight&&o.minHeight>data.height,dw=this.originalPosition.left+this.originalSize.width,dh=this.position.top+this.size.height,cw=/sw|nw|w/.test(a),ch=/nw|ne|n/.test(a);return isminw&&(data.width=o.minWidth),isminh&&(data.height=o.minHeight),ismaxw&&(data.width=o.maxWidth),ismaxh&&(data.height=o.maxHeight),isminw&&cw&&(data.left=dw-o.minWidth),ismaxw&&cw&&(data.left=dw-o.maxWidth),isminh&&ch&&(data.top=dh-o.minHeight),ismaxh&&ch&&(data.top=dh-o.maxHeight),data.width||data.height||data.left||!data.top?data.width||data.height||data.top||!data.left||(data.left=null):data.top=null,data},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var i,j,borders,paddings,prel,element=this.helper||this.element;for(i=0;i<this._proportionallyResizeElements.length;i++){if(prel=this._proportionallyResizeElements[i],!this.borderDif)for(this.borderDif=[],borders=[prel.css("borderTopWidth"),prel.css("borderRightWidth"),prel.css("borderBottomWidth"),prel.css("borderLeftWidth")],paddings=[prel.css("paddingTop"),prel.css("paddingRight"),prel.css("paddingBottom"),prel.css("paddingLeft")],j=0;j<borders.length;j++)this.borderDif[j]=(parseInt(borders[j],10)||0)+(parseInt(paddings[j],10)||0);prel.css({height:element.height()-this.borderDif[0]-this.borderDif[2]||0,width:element.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var el=this.element,o=this.options;this.elementOffset=el.offset(),this._helper?(this.helper=this.helper||$("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++o.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(event,dx){return{width:this.originalSize.width+dx}},w:function(event,dx){var cs=this.originalSize,sp=this.originalPosition;return{left:sp.left+dx,width:cs.width-dx}},n:function(event,dx,dy){var cs=this.originalSize,sp=this.originalPosition;return{top:sp.top+dy,height:cs.height-dy}},s:function(event,dx,dy){return{height:this.originalSize.height+dy}},se:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},sw:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))},ne:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},nw:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))}},_propagate:function(n,event){$.ui.plugin.call(this,n,[event,this.ui()]),"resize"!==n&&this._trigger(n,event,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(event){var that=$(this).resizable("instance"),o=that.options,pr=that._proportionallyResizeElements,ista=pr.length&&/textarea/i.test(pr[0].nodeName),soffseth=ista&&that._hasScroll(pr[0],"left")?0:that.sizeDiff.height,soffsetw=ista?0:that.sizeDiff.width,style={width:that.size.width-soffsetw,height:that.size.height-soffseth},left=parseInt(that.element.css("left"),10)+(that.position.left-that.originalPosition.left)||null,top=parseInt(that.element.css("top"),10)+(that.position.top-that.originalPosition.top)||null;that.element.animate($.extend(style,top&&left?{top:top,left:left}:{}),{duration:o.animateDuration,easing:o.animateEasing,step:function(){var data={width:parseInt(that.element.css("width"),10),height:parseInt(that.element.css("height"),10),top:parseInt(that.element.css("top"),10),left:parseInt(that.element.css("left"),10)};pr&&pr.length&&$(pr[0]).css({width:data.width,height:data.height}),that._updateCache(data),that._propagate("resize",event)}})}}),$.ui.plugin.add("resizable","containment",{start:function(){var element,p,co,ch,cw,width,height,that=$(this).resizable("instance"),o=that.options,el=that.element,oc=o.containment,ce=oc instanceof $?oc.get(0):/parent/.test(oc)?el.parent().get(0):oc;ce&&(that.containerElement=$(ce),/document/.test(oc)||oc===document?(that.containerOffset={left:0,top:0},that.containerPosition={left:0,top:0},that.parentData={element:$(document),left:0,top:0,width:$(document).width(),height:$(document).height()||document.body.parentNode.scrollHeight}):(element=$(ce),p=[],$(["Top","Right","Left","Bottom"]).each(function(i,name){p[i]=that._num(element.css("padding"+name))}),that.containerOffset=element.offset(),that.containerPosition=element.position(),that.containerSize={height:element.innerHeight()-p[3],width:element.innerWidth()-p[1]},co=that.containerOffset,ch=that.containerSize.height,cw=that.containerSize.width,width=that._hasScroll(ce,"left")?ce.scrollWidth:cw,height=that._hasScroll(ce)?ce.scrollHeight:ch,that.parentData={element:ce,left:co.left,top:co.top,width:width,height:height}))},resize:function(event){var woset,hoset,isParent,isOffsetRelative,that=$(this).resizable("instance"),o=that.options,co=that.containerOffset,cp=that.position,pRatio=that._aspectRatio||event.shiftKey,cop={top:0,left:0},ce=that.containerElement,continueResize=!0;ce[0]!==document&&/static/.test(ce.css("position"))&&(cop=co),cp.left<(that._helper?co.left:0)&&(that.size.width=that.size.width+(that._helper?that.position.left-co.left:that.position.left-cop.left),pRatio&&(that.size.height=that.size.width/that.aspectRatio,continueResize=!1),that.position.left=o.helper?co.left:0),cp.top<(that._helper?co.top:0)&&(that.size.height=that.size.height+(that._helper?that.position.top-co.top:that.position.top),pRatio&&(that.size.width=that.size.height*that.aspectRatio,continueResize=!1),that.position.top=that._helper?co.top:0),that.offset.left=that.parentData.left+that.position.left,that.offset.top=that.parentData.top+that.position.top,woset=Math.abs((that._helper?that.offset.left-cop.left:that.offset.left-co.left)+that.sizeDiff.width),hoset=Math.abs((that._helper?that.offset.top-cop.top:that.offset.top-co.top)+that.sizeDiff.height),isParent=that.containerElement.get(0)===that.element.parent().get(0),isOffsetRelative=/relative|absolute/.test(that.containerElement.css("position")),isParent&&isOffsetRelative&&(woset-=Math.abs(that.parentData.left)),woset+that.size.width>=that.parentData.width&&(that.size.width=that.parentData.width-woset,pRatio&&(that.size.height=that.size.width/that.aspectRatio,continueResize=!1)),hoset+that.size.height>=that.parentData.height&&(that.size.height=that.parentData.height-hoset,pRatio&&(that.size.width=that.size.height*that.aspectRatio,continueResize=!1)),continueResize||(that.position.left=that.prevPosition.left,that.position.top=that.prevPosition.top,that.size.width=that.prevSize.width,that.size.height=that.prevSize.height)},stop:function(){var that=$(this).resizable("instance"),o=that.options,co=that.containerOffset,cop=that.containerPosition,ce=that.containerElement,helper=$(that.helper),ho=helper.offset(),w=helper.outerWidth()-that.sizeDiff.width,h=helper.outerHeight()-that.sizeDiff.height;that._helper&&!o.animate&&/relative/.test(ce.css("position"))&&$(this).css({left:ho.left-cop.left-co.left,width:w,height:h}),that._helper&&!o.animate&&/static/.test(ce.css("position"))&&$(this).css({left:ho.left-cop.left-co.left,width:w,height:h})}}),$.ui.plugin.add("resizable","alsoResize",{start:function(){var that=$(this).resizable("instance"),o=that.options,_store=function(exp){$(exp).each(function(){var el=$(this);el.data("ui-resizable-alsoresize",{width:parseInt(el.width(),10),height:parseInt(el.height(),10),left:parseInt(el.css("left"),10),top:parseInt(el.css("top"),10)})})};"object"!=typeof o.alsoResize||o.alsoResize.parentNode?_store(o.alsoResize):o.alsoResize.length?(o.alsoResize=o.alsoResize[0],_store(o.alsoResize)):$.each(o.alsoResize,function(exp){_store(exp)})},resize:function(event,ui){var that=$(this).resizable("instance"),o=that.options,os=that.originalSize,op=that.originalPosition,delta={height:that.size.height-os.height||0,width:that.size.width-os.width||0,top:that.position.top-op.top||0,left:that.position.left-op.left||0},_alsoResize=function(exp,c){$(exp).each(function(){var el=$(this),start=$(this).data("ui-resizable-alsoresize"),style={},css=c&&c.length?c:el.parents(ui.originalElement[0]).length?["width","height"]:["width","height","top","left"];$.each(css,function(i,prop){var sum=(start[prop]||0)+(delta[prop]||0);sum&&sum>=0&&(style[prop]=sum||null)}),el.css(style)})};"object"!=typeof o.alsoResize||o.alsoResize.nodeType?_alsoResize(o.alsoResize):$.each(o.alsoResize,function(exp,c){_alsoResize(exp,c)})},stop:function(){$(this).removeData("resizable-alsoresize")}}),$.ui.plugin.add("resizable","ghost",{start:function(){var that=$(this).resizable("instance"),o=that.options,cs=that.size;that.ghost=that.originalElement.clone(),that.ghost.css({opacity:.25,display:"block",position:"relative",height:cs.height,width:cs.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof o.ghost?o.ghost:""),that.ghost.appendTo(that.helper)},resize:function(){var that=$(this).resizable("instance");that.ghost&&that.ghost.css({position:"relative",height:that.size.height,width:that.size.width})},stop:function(){var that=$(this).resizable("instance");that.ghost&&that.helper&&that.helper.get(0).removeChild(that.ghost.get(0))}}),$.ui.plugin.add("resizable","grid",{resize:function(){var that=$(this).resizable("instance"),o=that.options,cs=that.size,os=that.originalSize,op=that.originalPosition,a=that.axis,grid="number"==typeof o.grid?[o.grid,o.grid]:o.grid,gridX=grid[0]||1,gridY=grid[1]||1,ox=Math.round((cs.width-os.width)/gridX)*gridX,oy=Math.round((cs.height-os.height)/gridY)*gridY,newWidth=os.width+ox,newHeight=os.height+oy,isMaxWidth=o.maxWidth&&o.maxWidth<newWidth,isMaxHeight=o.maxHeight&&o.maxHeight<newHeight,isMinWidth=o.minWidth&&o.minWidth>newWidth,isMinHeight=o.minHeight&&o.minHeight>newHeight;o.grid=grid,isMinWidth&&(newWidth+=gridX),isMinHeight&&(newHeight+=gridY),isMaxWidth&&(newWidth-=gridX),isMaxHeight&&(newHeight-=gridY),/^(se|s|e)$/.test(a)?(that.size.width=newWidth,that.size.height=newHeight):/^(ne)$/.test(a)?(that.size.width=newWidth,that.size.height=newHeight,that.position.top=op.top-oy):/^(sw)$/.test(a)?(that.size.width=newWidth,that.size.height=newHeight,that.position.left=op.left-ox):(newHeight-gridY>0?(that.size.height=newHeight,that.position.top=op.top-oy):(that.size.height=gridY,that.position.top=op.top+os.height-gridY),newWidth-gridX>0?(that.size.width=newWidth,that.position.left=op.left-ox):(that.size.width=gridX,that.position.left=op.left+os.width-gridX))}}),$.ui.resizable}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],factory):factory(jQuery)}(function($){return $.widget("ui.selectable",$.ui.mouse,{version:"@VERSION",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 selectees,that=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){selectees=$(that.options.filter,that.element[0]),selectees.addClass("ui-selectee"),selectees.each(function(){var $this=$(this),pos=$this.offset();
$.data(this,"selectable-item",{element:this,$element:$this,left:pos.left,top:pos.top,right:pos.left+$this.outerWidth(),bottom:pos.top+$this.outerHeight(),startselected:!1,selected:$this.hasClass("ui-selected"),selecting:$this.hasClass("ui-selecting"),unselecting:$this.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=selectees.addClass("ui-selectee"),this._mouseInit(),this.helper=$("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(event){var that=this,options=this.options;this.opos=[event.pageX,event.pageY],this.options.disabled||(this.selectees=$(options.filter,this.element[0]),this._trigger("start",event),$(options.appendTo).append(this.helper),this.helper.css({left:event.pageX,top:event.pageY,width:0,height:0}),options.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var selectee=$.data(this,"selectable-item");selectee.startselected=!0,event.metaKey||event.ctrlKey||(selectee.$element.removeClass("ui-selected"),selectee.selected=!1,selectee.$element.addClass("ui-unselecting"),selectee.unselecting=!0,that._trigger("unselecting",event,{unselecting:selectee.element}))}),$(event.target).parents().addBack().each(function(){var doSelect,selectee=$.data(this,"selectable-item");return selectee?(doSelect=!event.metaKey&&!event.ctrlKey||!selectee.$element.hasClass("ui-selected"),selectee.$element.removeClass(doSelect?"ui-unselecting":"ui-selected").addClass(doSelect?"ui-selecting":"ui-unselecting"),selectee.unselecting=!doSelect,selectee.selecting=doSelect,selectee.selected=doSelect,doSelect?that._trigger("selecting",event,{selecting:selectee.element}):that._trigger("unselecting",event,{unselecting:selectee.element}),!1):void 0}))},_mouseDrag:function(event){if(this.dragged=!0,!this.options.disabled){var tmp,that=this,options=this.options,x1=this.opos[0],y1=this.opos[1],x2=event.pageX,y2=event.pageY;return x1>x2&&(tmp=x2,x2=x1,x1=tmp),y1>y2&&(tmp=y2,y2=y1,y1=tmp),this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1}),this.selectees.each(function(){var selectee=$.data(this,"selectable-item"),hit=!1;selectee&&selectee.element!==that.element[0]&&("touch"===options.tolerance?hit=!(selectee.left>x2||selectee.right<x1||selectee.top>y2||selectee.bottom<y1):"fit"===options.tolerance&&(hit=selectee.left>x1&&selectee.right<x2&&selectee.top>y1&&selectee.bottom<y2),hit?(selectee.selected&&(selectee.$element.removeClass("ui-selected"),selectee.selected=!1),selectee.unselecting&&(selectee.$element.removeClass("ui-unselecting"),selectee.unselecting=!1),selectee.selecting||(selectee.$element.addClass("ui-selecting"),selectee.selecting=!0,that._trigger("selecting",event,{selecting:selectee.element}))):(selectee.selecting&&((event.metaKey||event.ctrlKey)&&selectee.startselected?(selectee.$element.removeClass("ui-selecting"),selectee.selecting=!1,selectee.$element.addClass("ui-selected"),selectee.selected=!0):(selectee.$element.removeClass("ui-selecting"),selectee.selecting=!1,selectee.startselected&&(selectee.$element.addClass("ui-unselecting"),selectee.unselecting=!0),that._trigger("unselecting",event,{unselecting:selectee.element}))),selectee.selected&&(event.metaKey||event.ctrlKey||selectee.startselected||(selectee.$element.removeClass("ui-selected"),selectee.selected=!1,selectee.$element.addClass("ui-unselecting"),selectee.unselecting=!0,that._trigger("unselecting",event,{unselecting:selectee.element})))))}),!1}},_mouseStop:function(event){var that=this;return this.dragged=!1,$(".ui-unselecting",this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");selectee.$element.removeClass("ui-unselecting"),selectee.unselecting=!1,selectee.startselected=!1,that._trigger("unselected",event,{unselected:selectee.element})}),$(".ui-selecting",this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");selectee.$element.removeClass("ui-selecting").addClass("ui-selected"),selectee.selecting=!1,selectee.selected=!0,selectee.startselected=!0,that._trigger("selected",event,{selected:selectee.element})}),this._trigger("stop",event),this.helper.remove(),!1}})}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],factory):factory(jQuery)}(function($){return $.widget("ui.sortable",$.ui.mouse,{version:"@VERSION",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(x,reference,size){return x>=reference&&reference+size>x},_isFloating:function(item){return/left|right/.test(item.css("float"))||/inline|table-cell/.test(item.css("display"))},_create:function(){var o=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===o.axis||this._isFloating(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(key,value){this._super(key,value),"handle"===key&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),$.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var i=this.items.length-1;i>=0;i--)this.items[i].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(event,overrideHandle){var currentItem=null,validHandle=!1,that=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(event),$(event.target).parents().each(function(){return $.data(this,that.widgetName+"-item")===that?(currentItem=$(this),!1):void 0}),$.data(event.target,that.widgetName+"-item")===that&&(currentItem=$(event.target)),currentItem&&(!this.options.handle||overrideHandle||($(this.options.handle,currentItem).find("*").addBack().each(function(){this===event.target&&(validHandle=!0)}),validHandle))?(this.currentItem=currentItem,this._removeCurrentsFromItems(),!0):!1)},_mouseStart:function(event,overrideHandle,noActivation){var i,body,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(event),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:event.pageX-this.offset.left,top:event.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(event),this.originalPageX=event.pageX,this.originalPageY=event.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&&(body=this.document.find("body"),this.storedCursor=body.css("cursor"),body.css("cursor",o.cursor),this.storedStylesheet=$("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(body)),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]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",event,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!noActivation)for(i=this.containers.length-1;i>=0;i--)this.containers[i]._trigger("activate",event,this._uiHash(this));return $.ui.ddmanager&&($.ui.ddmanager.current=this),$.ui.ddmanager&&!o.dropBehaviour&&$.ui.ddmanager.prepareOffsets(this,event),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(event),!0},_mouseDrag:function(event){var i,item,itemElement,intersection,o=this.options,scrolled=!1;for(this.position=this._generatePosition(event),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-event.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop+o.scrollSpeed:event.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-event.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft+o.scrollSpeed:event.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(event.pageY-$(document).scrollTop()<o.scrollSensitivity?scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed):$(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity&&(scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed)),event.pageX-$(document).scrollLeft()<o.scrollSensitivity?scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed):$(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity&&(scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed))),scrolled!==!1&&$.ui.ddmanager&&!o.dropBehaviour&&$.ui.ddmanager.prepareOffsets(this,event)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.positionAbs.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.positionAbs.top+"px"),i=this.items.length-1;i>=0;i--)if(item=this.items[i],itemElement=item.item[0],intersection=this._intersectsWithPointer(item),!item.item.data("dragMultipleActive")&&intersection&&item.instance===this.currentContainer&&itemElement!==this.currentItem[0]&&this.placeholder[1===intersection?"next":"prev"]()[0]!==itemElement&&!$.contains(this.placeholder[0],itemElement)&&("semi-dynamic"===this.options.type?!$.contains(this.element[0],itemElement):!0)){if(this.direction=1===intersection?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(item))break;this._rearrange(event,item),this._trigger("change",event,this._uiHash());break}return this._contactContainers(event),$.ui.ddmanager&&$.ui.ddmanager.drag(this,event),this._trigger("sort",event,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(event,noPropagation){if(event){if($.ui.ddmanager&&!this.options.dropBehaviour&&$.ui.ddmanager.drop(this,event),this.options.revert){var that=this,cur=this.placeholder.offset(),axis=this.options.axis,animation={};axis&&"x"!==axis||(animation.left=cur.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),axis&&"y"!==axis||(animation.top=cur.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,$(this.helper).animate(animation,parseInt(this.options.revert,10)||500,function(){that._clear(event)})}else this._clear(event,noPropagation);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var i=this.containers.length-1;i>=0;i--)this.containers[i]._trigger("deactivate",null,this._uiHash(this)),this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",null,this._uiHash(this)),this.containers[i].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(o){var items=this._getItemsAsjQuery(o&&o.connected),str=[];return o=o||{},$(items).each(function(){var res=($(o.item||this).attr(o.attribute||"id")||"").match(o.expression||/(.+)[\-=_](.+)/);res&&str.push((o.key||res[1]+"[]")+"="+(o.key&&o.expression?res[1]:res[2]))}),!str.length&&o.key&&str.push(o.key+"="),str.join("&")},toArray:function(o){var items=this._getItemsAsjQuery(o&&o.connected),ret=[];return o=o||{},items.each(function(){ret.push($(o.item||this).attr(o.attribute||"id")||"")}),ret},_intersectsWith:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height,l=item.left,r=l+item.width,t=item.top,b=t+item.height,dyClick=this.offset.click.top,dxClick=this.offset.click.left,isOverElementHeight="x"===this.options.axis||y1+dyClick>t&&b>y1+dyClick,isOverElementWidth="y"===this.options.axis||x1+dxClick>l&&r>x1+dxClick,isOverElement=isOverElementHeight&&isOverElementWidth;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>item[this.floating?"width":"height"]?isOverElement:l<x1+this.helperProportions.width/2&&x2-this.helperProportions.width/2<r&&t<y1+this.helperProportions.height/2&&y2-this.helperProportions.height/2<b},_intersectsWithPointer:function(item){var isOverElementHeight="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,item.top,item.height),isOverElementWidth="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,item.left,item.width),isOverElement=isOverElementHeight&&isOverElementWidth,verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();return isOverElement?this.floating?horizontalDirection&&"right"===horizontalDirection||"down"===verticalDirection?2:1:verticalDirection&&("down"===verticalDirection?2:1):!1},_intersectsWithSides:function(item){var isOverBottomHalf=this._isOverAxis(this.positionAbs.top+this.offset.click.top,item.top+item.height/2,item.height),isOverRightHalf=this._isOverAxis(this.positionAbs.left+this.offset.click.left,item.left+item.width/2,item.width),verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();return this.floating&&horizontalDirection?"right"===horizontalDirection&&isOverRightHalf||"left"===horizontalDirection&&!isOverRightHalf:verticalDirection&&("down"===verticalDirection&&isOverBottomHalf||"up"===verticalDirection&&!isOverBottomHalf)},_getDragVerticalDirection:function(){var delta=this.positionAbs.top-this.lastPositionAbs.top;return 0!==delta&&(delta>0?"down":"up")},_getDragHorizontalDirection:function(){var delta=this.positionAbs.left-this.lastPositionAbs.left;return 0!==delta&&(delta>0?"right":"left")},refresh:function(event){return this._refreshItems(event),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var options=this.options;return options.connectWith.constructor===String?[options.connectWith]:options.connectWith},_getItemsAsjQuery:function(connected){function addItems(){items.push(this)}var i,j,cur,inst,items=[],queries=[],connectWith=this._connectWith();if(connectWith&&connected)for(i=connectWith.length-1;i>=0;i--)for(cur=$(connectWith[i]),j=cur.length-1;j>=0;j--)inst=$.data(cur[j],this.widgetFullName),inst&&inst!==this&&!inst.options.disabled&&queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element):$(inst.options.items,inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),inst]);for(queries.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]),i=queries.length-1;i>=0;i--)queries[i][0].each(addItems);return $(items)},_removeCurrentsFromItems:function(){var list=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=$.grep(this.items,function(item){for(var j=0;j<list.length;j++)if(list[j]===item.item[0])return!1;return!0})},_refreshItems:function(event){this.items=[],this.containers=[this];var i,j,cur,inst,targetData,_queries,item,queriesLength,items=this.items,queries=[[$.isFunction(this.options.items)?this.options.items.call(this.element[0],event,{item:this.currentItem}):$(this.options.items,this.element),this]],connectWith=this._connectWith();if(connectWith&&this.ready)for(i=connectWith.length-1;i>=0;i--)for(cur=$(connectWith[i]),j=cur.length-1;j>=0;j--)inst=$.data(cur[j],this.widgetFullName),inst&&inst!==this&&!inst.options.disabled&&(queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element[0],event,{item:this.currentItem}):$(inst.options.items,inst.element),inst]),this.containers.push(inst));for(i=queries.length-1;i>=0;i--)for(targetData=queries[i][1],_queries=queries[i][0],j=0,queriesLength=_queries.length;queriesLength>j;j++)item=$(_queries[j]),item.data(this.widgetName+"-item",targetData),items.push({item:item,instance:targetData,width:0,height:0,left:0,top:0})},refreshPositions:function(fast){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,item,t,p;for(i=this.items.length-1;i>=0;i--)item=this.items[i],$(item.item).data("dragMultipleActive")||item.instance!==this.currentContainer&&this.currentContainer&&item.item[0]!==this.currentItem[0]||(t=this.options.toleranceElement?$(this.options.toleranceElement,item.item):item.item,fast||(item.width=t.outerWidth(),item.height=t.outerHeight()),p=t.offset(),item.left=p.left,item.top=p.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)p=this.containers[i].element.offset(),this.containers[i].containerCache.left=p.left,this.containers[i].containerCache.top=p.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(that){that=that||this;var className,o=that.options;o.placeholder&&o.placeholder.constructor!==String||(className=o.placeholder,o.placeholder={element:function(){var nodeName=that.currentItem[0].nodeName.toLowerCase(),element=$("<"+nodeName+">",that.document[0]).addClass(className||that.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===nodeName?that.currentItem.children().each(function(){$("<td>&#160;</td>",that.document[0]).attr("colspan",$(this).attr("colspan")||1).appendTo(element)}):"img"===nodeName&&element.attr("src",that.currentItem.attr("src")),className||element.css("visibility","hidden"),element},update:function(container,p){(!className||o.forcePlaceholderSize)&&(p.height()||p.height(that.currentItem.innerHeight()-parseInt(that.currentItem.css("paddingTop")||0,10)-parseInt(that.currentItem.css("paddingBottom")||0,10)),p.width()||p.width(that.currentItem.innerWidth()-parseInt(that.currentItem.css("paddingLeft")||0,10)-parseInt(that.currentItem.css("paddingRight")||0,10)))}}),that.placeholder=$(o.placeholder.element.call(that.element,that.currentItem)),that.currentItem.after(that.placeholder),o.placeholder.update(that,that.placeholder)},_contactContainers:function(event){var i,j,dist,itemWithLeastDistance,posProperty,sizeProperty,cur,nearBottom,floating,axis,innermostContainer=null,innermostIndex=null;for(i=this.containers.length-1;i>=0;i--)if(!$.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(innermostContainer&&$.contains(this.containers[i].element[0],innermostContainer.element[0]))continue;innermostContainer=this.containers[i],innermostIndex=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",event,this._uiHash(this)),this.containers[i].containerCache.over=0);if(innermostContainer)if(1===this.containers.length)this.containers[innermostIndex].containerCache.over||(this.containers[innermostIndex]._trigger("over",event,this._uiHash(this)),this.containers[innermostIndex].containerCache.over=1);else{for(dist=1e4,itemWithLeastDistance=null,floating=innermostContainer.floating||this._isFloating(this.currentItem),posProperty=floating?"left":"top",sizeProperty=floating?"width":"height",axis=floating?"clientX":"clientY",j=this.items.length-1;j>=0;j--)$.contains(this.containers[innermostIndex].element[0],this.items[j].item[0])&&this.items[j].item[0]!==this.currentItem[0]&&(cur=this.items[j].item.offset()[posProperty],nearBottom=!1,event[axis]-cur>this.items[j][sizeProperty]/2&&(nearBottom=!0),Math.abs(event[axis]-cur)<dist&&(dist=Math.abs(event[axis]-cur),itemWithLeastDistance=this.items[j],this.direction=nearBottom?"up":"down"));if(!itemWithLeastDistance&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[innermostIndex])return;itemWithLeastDistance?this._rearrange(event,itemWithLeastDistance,null,!0):this._rearrange(event,null,this.containers[innermostIndex].element,!0),this._trigger("change",event,this._uiHash()),this.containers[innermostIndex]._trigger("change",event,this._uiHash(this)),this.currentContainer=this.containers[innermostIndex],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[innermostIndex]._trigger("over",event,this._uiHash(this)),this.containers[innermostIndex].containerCache.over=1}},_createHelper:function(event){var o=this.options,helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event,this.currentItem])):"clone"===o.helper?this.currentItem.clone():this.currentItem;return helper.parents("body").length||$("parent"!==o.appendTo?o.appendTo:this.currentItem[0].parentNode)[0].appendChild(helper[0]),helper[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")}),(!helper[0].style.width||o.forceHelperSize)&&helper.width(this.currentItem.width()),(!helper[0].style.height||o.forceHelperSize)&&helper.height(this.currentItem.height()),helper},_adjustOffsetFromHelper:function(obj){"string"==typeof obj&&(obj=obj.split(" ")),$.isArray(obj)&&(obj={left:+obj[0],top:+obj[1]||0}),"left"in obj&&(this.offset.click.left=obj.left+this.margins.left),"right"in obj&&(this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left),"top"in obj&&(this.offset.click.top=obj.top+this.margins.top),"bottom"in obj&&(this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&$.contains(this.scrollParent[0],this.offsetParent[0])&&(po.left+=this.scrollParent.scrollLeft(),po.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&$.ui.ie)&&(po={top:0,left:0}),{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var p=this.currentItem.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_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 ce,co,over,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),("document"===o.containment||"window"===o.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$("document"===o.containment?document:window).width()-this.helperProportions.width-this.margins.left,($("document"===o.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(ce=$(o.containment)[0],co=$(o.containment).offset(),over="hidden"!==$(ce).css("overflow"),this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(d,pos){pos||(pos=this.position);var mod="absolute"===d?1:-1,scroll="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&$.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,scrollIsRootNode=/(html|body)/i.test(scroll[0].tagName);return{top:pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():scrollIsRootNode?0:scroll.scrollTop())*mod,left:pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod}},_generatePosition:function(event){var top,left,o=this.options,pageX=event.pageX,pageY=event.pageY,scroll="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&$.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,scrollIsRootNode=/(html|body)/i.test(scroll[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(event.pageX-this.offset.click.left<this.containment[0]&&(pageX=this.containment[0]+this.offset.click.left),event.pageY-this.offset.click.top<this.containment[1]&&(pageY=this.containment[1]+this.offset.click.top),event.pageX-this.offset.click.left>this.containment[2]&&(pageX=this.containment[2]+this.offset.click.left),event.pageY-this.offset.click.top>this.containment[3]&&(pageY=this.containment[3]+this.offset.click.top)),o.grid&&(top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1],pageY=this.containment?top-this.offset.click.top>=this.containment[1]&&top-this.offset.click.top<=this.containment[3]?top:top-this.offset.click.top>=this.containment[1]?top-o.grid[1]:top+o.grid[1]:top,left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0],pageX=this.containment?left-this.offset.click.left>=this.containment[0]&&left-this.offset.click.left<=this.containment[2]?left:left-this.offset.click.left>=this.containment[0]?left-o.grid[0]:left+o.grid[0]:left)),{top:pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():scrollIsRootNode?0:scroll.scrollTop()),left:pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())}},_rearrange:function(event,i,a,hardRefresh){a?a[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?i.item[0]:i.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var counter=this.counter;this._delay(function(){counter===this.counter&&this.refreshPositions(!hardRefresh)})},_clear:function(event,noPropagation){function delayEvent(type,instance,container){return function(event){container._trigger(type,event,instance._uiHash(instance))}}this.reverting=!1;var i,delayedTriggers=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!noPropagation&&delayedTriggers.push(function(event){this._trigger("receive",event,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||noPropagation||delayedTriggers.push(function(event){this._trigger("update",event,this._uiHash())}),this!==this.currentContainer&&(noPropagation||(delayedTriggers.push(function(event){this._trigger("remove",event,this._uiHash())}),delayedTriggers.push(function(c){return function(event){c._trigger("receive",event,this._uiHash(this))}}.call(this,this.currentContainer)),delayedTriggers.push(function(c){return function(event){c._trigger("update",event,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)noPropagation||delayedTriggers.push(delayEvent("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(delayedTriggers.push(delayEvent("out",this,this.containers[i])),this.containers[i].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,this.cancelHelperRemoval){if(!noPropagation){for(this._trigger("beforeStop",event,this._uiHash()),i=0;i<delayedTriggers.length;i++)delayedTriggers[i].call(this,event);this._trigger("stop",event,this._uiHash())}return this.fromOutside=!1,!1}if(noPropagation||this._trigger("beforeStop",event,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!noPropagation){for(i=0;i<delayedTriggers.length;i++)delayedTriggers[i].call(this,event);this._trigger("stop",event,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){$.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(_inst){var inst=_inst||this;
return{helper:inst.helper,placeholder:inst.placeholder||$([]),position:inst.position,originalPosition:inst.originalPosition,offset:inst.positionAbs,item:inst.currentItem,sender:_inst?_inst.element:null}}})}),function(factory){"function"==typeof define&&define.amd?define(["jquery"],factory):factory(jQuery)}(function($){var dataSpace="ui-effects-",jQuery=$;return $.effects={effect:{}},function(jQuery,undefined){function clamp(value,prop,allowEmpty){var type=propTypes[prop.type]||{};return null==value?allowEmpty||!prop.def?null:prop.def:(value=type.floor?~~value:parseFloat(value),isNaN(value)?prop.def:type.mod?(value+type.mod)%type.mod:0>value?0:type.max<value?type.max:value)}function stringParse(string){var inst=color(),rgba=inst._rgba=[];return string=string.toLowerCase(),each(stringParsers,function(i,parser){var parsed,match=parser.re.exec(string),values=match&&parser.parse(match),spaceName=parser.space||"rgba";return values?(parsed=inst[spaceName](values),inst[spaces[spaceName].cache]=parsed[spaces[spaceName].cache],rgba=inst._rgba=parsed._rgba,!1):void 0}),rgba.length?("0,0,0,0"===rgba.join()&&jQuery.extend(rgba,colors.transparent),inst):colors[string]}function hue2rgb(p,q,h){return h=(h+1)%1,1>6*h?p+(q-p)*h*6:1>2*h?q:2>3*h?p+(q-p)*(2/3-h)*6:p}var colors,stepHooks="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",rplusequals=/^([\-+])=\s*(\d+\.?\d*)/,stringParsers=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[execResult[1],execResult[2],execResult[3],execResult[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[2.55*execResult[1],2.55*execResult[2],2.55*execResult[3],execResult[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(execResult){return[parseInt(execResult[1],16),parseInt(execResult[2],16),parseInt(execResult[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(execResult){return[parseInt(execResult[1]+execResult[1],16),parseInt(execResult[2]+execResult[2],16),parseInt(execResult[3]+execResult[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(execResult){return[execResult[1],execResult[2]/100,execResult[3]/100,execResult[4]]}}],color=jQuery.Color=function(color,green,blue,alpha){return new jQuery.Color.fn.parse(color,green,blue,alpha)},spaces={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"}}}},propTypes={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},support=color.support={},supportElem=jQuery("<p>")[0],each=jQuery.each;supportElem.style.cssText="background-color:rgba(1,1,1,.5)",support.rgba=supportElem.style.backgroundColor.indexOf("rgba")>-1,each(spaces,function(spaceName,space){space.cache="_"+spaceName,space.props.alpha={idx:3,type:"percent",def:1}}),color.fn=jQuery.extend(color.prototype,{parse:function(red,green,blue,alpha){if(red===undefined)return this._rgba=[null,null,null,null],this;(red.jquery||red.nodeType)&&(red=jQuery(red).css(green),green=undefined);var inst=this,type=jQuery.type(red),rgba=this._rgba=[];return green!==undefined&&(red=[red,green,blue,alpha],type="array"),"string"===type?this.parse(stringParse(red)||colors._default):"array"===type?(each(spaces.rgba.props,function(key,prop){rgba[prop.idx]=clamp(red[prop.idx],prop)}),this):"object"===type?(red instanceof color?each(spaces,function(spaceName,space){red[space.cache]&&(inst[space.cache]=red[space.cache].slice())}):each(spaces,function(spaceName,space){var cache=space.cache;each(space.props,function(key,prop){if(!inst[cache]&&space.to){if("alpha"===key||null==red[key])return;inst[cache]=space.to(inst._rgba)}inst[cache][prop.idx]=clamp(red[key],prop,!0)}),inst[cache]&&jQuery.inArray(null,inst[cache].slice(0,3))<0&&(inst[cache][3]=1,space.from&&(inst._rgba=space.from(inst[cache])))}),this):void 0},is:function(compare){var is=color(compare),same=!0,inst=this;return each(spaces,function(_,space){var localCache,isCache=is[space.cache];return isCache&&(localCache=inst[space.cache]||space.to&&space.to(inst._rgba)||[],each(space.props,function(_,prop){return null!=isCache[prop.idx]?same=isCache[prop.idx]===localCache[prop.idx]:void 0})),same}),same},_space:function(){var used=[],inst=this;return each(spaces,function(spaceName,space){inst[space.cache]&&used.push(spaceName)}),used.pop()},transition:function(other,distance){var end=color(other),spaceName=end._space(),space=spaces[spaceName],startColor=0===this.alpha()?color("transparent"):this,start=startColor[space.cache]||space.to(startColor._rgba),result=start.slice();return end=end[space.cache],each(space.props,function(key,prop){var index=prop.idx,startValue=start[index],endValue=end[index],type=propTypes[prop.type]||{};null!==endValue&&(null===startValue?result[index]=endValue:(type.mod&&(endValue-startValue>type.mod/2?startValue+=type.mod:startValue-endValue>type.mod/2&&(startValue-=type.mod)),result[index]=clamp((endValue-startValue)*distance+startValue,prop)))}),this[spaceName](result)},blend:function(opaque){if(1===this._rgba[3])return this;var rgb=this._rgba.slice(),a=rgb.pop(),blend=color(opaque)._rgba;return color(jQuery.map(rgb,function(v,i){return(1-a)*blend[i]+a*v}))},toRgbaString:function(){var prefix="rgba(",rgba=jQuery.map(this._rgba,function(v,i){return null==v?i>2?1:0:v});return 1===rgba[3]&&(rgba.pop(),prefix="rgb("),prefix+rgba.join()+")"},toHslaString:function(){var prefix="hsla(",hsla=jQuery.map(this.hsla(),function(v,i){return null==v&&(v=i>2?1:0),i&&3>i&&(v=Math.round(100*v)+"%"),v});return 1===hsla[3]&&(hsla.pop(),prefix="hsl("),prefix+hsla.join()+")"},toHexString:function(includeAlpha){var rgba=this._rgba.slice(),alpha=rgba.pop();return includeAlpha&&rgba.push(~~(255*alpha)),"#"+jQuery.map(rgba,function(v){return v=(v||0).toString(16),1===v.length?"0"+v:v}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),color.fn.parse.prototype=color.fn,spaces.hsla.to=function(rgba){if(null==rgba[0]||null==rgba[1]||null==rgba[2])return[null,null,null,rgba[3]];var h,s,r=rgba[0]/255,g=rgba[1]/255,b=rgba[2]/255,a=rgba[3],max=Math.max(r,g,b),min=Math.min(r,g,b),diff=max-min,add=max+min,l=.5*add;return h=min===max?0:r===max?60*(g-b)/diff+360:g===max?60*(b-r)/diff+120:60*(r-g)/diff+240,s=0===diff?0:.5>=l?diff/add:diff/(2-add),[Math.round(h)%360,s,l,null==a?1:a]},spaces.hsla.from=function(hsla){if(null==hsla[0]||null==hsla[1]||null==hsla[2])return[null,null,null,hsla[3]];var h=hsla[0]/360,s=hsla[1],l=hsla[2],a=hsla[3],q=.5>=l?l*(1+s):l+s-l*s,p=2*l-q;return[Math.round(255*hue2rgb(p,q,h+1/3)),Math.round(255*hue2rgb(p,q,h)),Math.round(255*hue2rgb(p,q,h-1/3)),a]},each(spaces,function(spaceName,space){var props=space.props,cache=space.cache,to=space.to,from=space.from;color.fn[spaceName]=function(value){if(to&&!this[cache]&&(this[cache]=to(this._rgba)),value===undefined)return this[cache].slice();var ret,type=jQuery.type(value),arr="array"===type||"object"===type?value:arguments,local=this[cache].slice();return each(props,function(key,prop){var val=arr["object"===type?key:prop.idx];null==val&&(val=local[prop.idx]),local[prop.idx]=clamp(val,prop)}),from?(ret=color(from(local)),ret[cache]=local,ret):color(local)},each(props,function(key,prop){color.fn[key]||(color.fn[key]=function(value){var match,vtype=jQuery.type(value),fn="alpha"===key?this._hsla?"hsla":"rgba":spaceName,local=this[fn](),cur=local[prop.idx];return"undefined"===vtype?cur:("function"===vtype&&(value=value.call(this,cur),vtype=jQuery.type(value)),null==value&&prop.empty?this:("string"===vtype&&(match=rplusequals.exec(value),match&&(value=cur+parseFloat(match[2])*("+"===match[1]?1:-1))),local[prop.idx]=value,this[fn](local)))})})}),color.hook=function(hook){var hooks=hook.split(" ");each(hooks,function(i,hook){jQuery.cssHooks[hook]={set:function(elem,value){var parsed,curElem,backgroundColor="";if("transparent"!==value&&("string"!==jQuery.type(value)||(parsed=stringParse(value)))){if(value=color(parsed||value),!support.rgba&&1!==value._rgba[3]){for(curElem="backgroundColor"===hook?elem.parentNode:elem;(""===backgroundColor||"transparent"===backgroundColor)&&curElem&&curElem.style;)try{backgroundColor=jQuery.css(curElem,"backgroundColor"),curElem=curElem.parentNode}catch(e){}value=value.blend(backgroundColor&&"transparent"!==backgroundColor?backgroundColor:"_default")}value=value.toRgbaString()}try{elem.style[hook]=value}catch(e){}}},jQuery.fx.step[hook]=function(fx){fx.colorInit||(fx.start=color(fx.elem,hook),fx.end=color(fx.end),fx.colorInit=!0),jQuery.cssHooks[hook].set(fx.elem,fx.start.transition(fx.end,fx.pos))}})},color.hook(stepHooks),jQuery.cssHooks.borderColor={expand:function(value){var expanded={};return each(["Top","Right","Bottom","Left"],function(i,part){expanded["border"+part+"Color"]=value}),expanded}},colors=jQuery.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"}}(jQuery),function(){function getElementStyles(elem){var key,len,style=elem.ownerDocument.defaultView?elem.ownerDocument.defaultView.getComputedStyle(elem,null):elem.currentStyle,styles={};if(style&&style.length&&style[0]&&style[style[0]])for(len=style.length;len--;)key=style[len],"string"==typeof style[key]&&(styles[$.camelCase(key)]=style[key]);else for(key in style)"string"==typeof style[key]&&(styles[key]=style[key]);return styles}function styleDifference(oldStyle,newStyle){var name,value,diff={};for(name in newStyle)value=newStyle[name],oldStyle[name]!==value&&(shorthandStyles[name]||($.fx.step[name]||!isNaN(parseFloat(value)))&&(diff[name]=value));return diff}var classAnimationActions=["add","remove","toggle"],shorthandStyles={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};$.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(_,prop){$.fx.step[prop]=function(fx){("none"!==fx.end&&!fx.setAttr||1===fx.pos&&!fx.setAttr)&&(jQuery.style(fx.elem,prop,fx.end),fx.setAttr=!0)}}),$.fn.addBack||($.fn.addBack=function(selector){return this.add(null==selector?this.prevObject:this.prevObject.filter(selector))}),$.effects.animateClass=function(value,duration,easing,callback){var o=$.speed(duration,easing,callback);return this.queue(function(){var applyClassChange,animated=$(this),baseClass=animated.attr("class")||"",allAnimations=o.children?animated.find("*").addBack():animated;allAnimations=allAnimations.map(function(){var el=$(this);return{el:el,start:getElementStyles(this)}}),applyClassChange=function(){$.each(classAnimationActions,function(i,action){value[action]&&animated[action+"Class"](value[action])})},applyClassChange(),allAnimations=allAnimations.map(function(){return this.end=getElementStyles(this.el[0]),this.diff=styleDifference(this.start,this.end),this}),animated.attr("class",baseClass),allAnimations=allAnimations.map(function(){var styleInfo=this,dfd=$.Deferred(),opts=$.extend({},o,{queue:!1,complete:function(){dfd.resolve(styleInfo)}});return this.el.animate(this.diff,opts),dfd.promise()}),$.when.apply($,allAnimations.get()).done(function(){applyClassChange(),$.each(arguments,function(){var el=this.el;$.each(this.diff,function(key){el.css(key,"")})}),o.complete.call(animated[0])})})},$.fn.extend({addClass:function(orig){return function(classNames,speed,easing,callback){return speed?$.effects.animateClass.call(this,{add:classNames},speed,easing,callback):orig.apply(this,arguments)}}($.fn.addClass),removeClass:function(orig){return function(classNames,speed,easing,callback){return arguments.length>1?$.effects.animateClass.call(this,{remove:classNames},speed,easing,callback):orig.apply(this,arguments)}}($.fn.removeClass),toggleClass:function(orig){return function(classNames,force,speed,easing,callback){return"boolean"==typeof force||void 0===force?speed?$.effects.animateClass.call(this,force?{add:classNames}:{remove:classNames},speed,easing,callback):orig.apply(this,arguments):$.effects.animateClass.call(this,{toggle:classNames},force,speed,easing)}}($.fn.toggleClass),switchClass:function(remove,add,speed,easing,callback){return $.effects.animateClass.call(this,{add:add,remove:remove},speed,easing,callback)}})}(),function(){function _normalizeArguments(effect,options,speed,callback){return $.isPlainObject(effect)&&(options=effect,effect=effect.effect),effect={effect:effect},null==options&&(options={}),$.isFunction(options)&&(callback=options,speed=null,options={}),("number"==typeof options||$.fx.speeds[options])&&(callback=speed,speed=options,options={}),$.isFunction(speed)&&(callback=speed,speed=null),options&&$.extend(effect,options),speed=speed||options.duration,effect.duration=$.fx.off?0:"number"==typeof speed?speed:speed in $.fx.speeds?$.fx.speeds[speed]:$.fx.speeds._default,effect.complete=callback||options.complete,effect}function standardAnimationOption(option){return!option||"number"==typeof option||$.fx.speeds[option]?!0:"string"!=typeof option||$.effects.effect[option]?$.isFunction(option)?!0:"object"!=typeof option||option.effect?!1:!0:!0}$.extend($.effects,{version:"@VERSION",save:function(element,set){for(var i=0;i<set.length;i++)null!==set[i]&&element.data(dataSpace+set[i],element[0].style[set[i]])},restore:function(element,set){var val,i;for(i=0;i<set.length;i++)null!==set[i]&&(val=element.data(dataSpace+set[i]),void 0===val&&(val=""),element.css(set[i],val))},setMode:function(el,mode){return"toggle"===mode&&(mode=el.is(":hidden")?"show":"hide"),mode},getBaseline:function(origin,original){var y,x;switch(origin[0]){case"top":y=0;break;case"middle":y=.5;break;case"bottom":y=1;break;default:y=origin[0]/original.height}switch(origin[1]){case"left":x=0;break;case"center":x=.5;break;case"right":x=1;break;default:x=origin[1]/original.width}return{x:x,y:y}},createWrapper:function(element){if(element.parent().is(".ui-effects-wrapper"))return element.parent();var props={width:element.outerWidth(!0),height:element.outerHeight(!0),"float":element.css("float")},wrapper=$("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),size={width:element.width(),height:element.height()},active=document.activeElement;try{active.id}catch(e){active=document.body}return element.wrap(wrapper),(element[0]===active||$.contains(element[0],active))&&$(active).focus(),wrapper=element.parent(),"static"===element.css("position")?(wrapper.css({position:"relative"}),element.css({position:"relative"})):($.extend(props,{position:element.css("position"),zIndex:element.css("z-index")}),$.each(["top","left","bottom","right"],function(i,pos){props[pos]=element.css(pos),isNaN(parseInt(props[pos],10))&&(props[pos]="auto")}),element.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),element.css(size),wrapper.css(props).show()},removeWrapper:function(element){var active=document.activeElement;return element.parent().is(".ui-effects-wrapper")&&(element.parent().replaceWith(element),(element[0]===active||$.contains(element[0],active))&&$(active).focus()),element},setTransition:function(element,list,factor,value){return value=value||{},$.each(list,function(i,x){var unit=element.cssUnit(x);unit[0]>0&&(value[x]=unit[0]*factor+unit[1])}),value}}),$.fn.extend({effect:function(){function run(next){function done(){$.isFunction(complete)&&complete.call(elem[0]),$.isFunction(next)&&next()}var elem=$(this),complete=args.complete,mode=args.mode;(elem.is(":hidden")?"hide"===mode:"show"===mode)?(elem[mode](),done()):effectMethod.call(elem[0],args,done)}var args=_normalizeArguments.apply(this,arguments),mode=args.mode,queue=args.queue,effectMethod=$.effects.effect[args.effect];return $.fx.off||!effectMethod?mode?this[mode](args.duration,args.complete):this.each(function(){args.complete&&args.complete.call(this)}):queue===!1?this.each(run):this.queue(queue||"fx",run)},show:function(orig){return function(option){if(standardAnimationOption(option))return orig.apply(this,arguments);var args=_normalizeArguments.apply(this,arguments);return args.mode="show",this.effect.call(this,args)}}($.fn.show),hide:function(orig){return function(option){if(standardAnimationOption(option))return orig.apply(this,arguments);var args=_normalizeArguments.apply(this,arguments);return args.mode="hide",this.effect.call(this,args)}}($.fn.hide),toggle:function(orig){return function(option){if(standardAnimationOption(option)||"boolean"==typeof option)return orig.apply(this,arguments);var args=_normalizeArguments.apply(this,arguments);return args.mode="toggle",this.effect.call(this,args)}}($.fn.toggle),cssUnit:function(key){var style=this.css(key),val=[];return $.each(["em","px","%","pt"],function(i,unit){style.indexOf(unit)>0&&(val=[parseFloat(style),unit])}),val}})}(),function(){var baseEasings={};$.each(["Quad","Cubic","Quart","Quint","Expo"],function(i,name){baseEasings[name]=function(p){return Math.pow(p,i+2)}}),$.extend(baseEasings,{Sine:function(p){return 1-Math.cos(p*Math.PI/2)},Circ:function(p){return 1-Math.sqrt(1-p*p)},Elastic:function(p){return 0===p||1===p?p:-Math.pow(2,8*(p-1))*Math.sin((80*(p-1)-7.5)*Math.PI/15)},Back:function(p){return p*p*(3*p-2)},Bounce:function(p){for(var pow2,bounce=4;p<((pow2=Math.pow(2,--bounce))-1)/11;);return 1/Math.pow(4,3-bounce)-7.5625*Math.pow((3*pow2-2)/22-p,2)}}),$.each(baseEasings,function(name,easeIn){$.easing["easeIn"+name]=easeIn,$.easing["easeOut"+name]=function(p){return 1-easeIn(1-p)},$.easing["easeInOut"+name]=function(p){return.5>p?easeIn(2*p)/2:1-easeIn(-2*p+2)/2}})}(),$.effects}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],factory):factory(jQuery)}(function($){return $.widget("ui.accordion",{version:"@VERSION",options:{active:0,animate:{},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 options=this.options;this.prevShow=this.prevHide=$(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),options.collapsible||options.active!==!1&&null!=options.active||(options.active=0),this._processPanels(),options.active<0&&(options.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():$()}},_createIcons:function(){var icons=this.options.icons;icons&&($("<span>").addClass("ui-accordion-header-icon ui-icon "+icons.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(icons.header).addClass(icons.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var contents;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),contents=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&contents.css("height","")},_setOption:function(key,value){return"active"===key?void this._activate(value):("event"===key&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(value)),this._super(key,value),"collapsible"!==key||value||this.options.active!==!1||this._activate(0),"icons"===key&&(this._destroyIcons(),value&&this._createIcons()),void("disabled"===key&&(this.element.toggleClass("ui-state-disabled",!!value).attr("aria-disabled",value),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!value))))},_keydown:function(event){if(!event.altKey&&!event.ctrlKey){var keyCode=$.ui.keyCode,length=this.headers.length,currentIndex=this.headers.index(event.target),toFocus=!1;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:this._eventHandler(event);break;case keyCode.HOME:toFocus=this.headers[0];break;case keyCode.END:toFocus=this.headers[length-1]}toFocus&&($(event.target).attr("tabIndex",-1),$(toFocus).attr("tabIndex",0),toFocus.focus(),event.preventDefault())}},_panelKeyDown:function(event){event.keyCode===$.ui.keyCode.UP&&event.ctrlKey&&$(event.currentTarget).prev().focus()},refresh:function(){var options=this.options;this._processPanels(),options.active===!1&&options.collapsible===!0||!this.headers.length?(options.active=!1,this.active=$()):options.active===!1?this._activate(0):this.active.length&&!$.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(options.active=!1,this.active=$()):this._activate(Math.max(0,options.active-1)):options.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var maxHeight,options=this.options,heightStyle=options.heightStyle,parent=this.element.parent();this.active=this._findActive(options.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var header=$(this),headerId=header.uniqueId().attr("id"),panel=header.next(),panelId=panel.uniqueId().attr("id");header.attr("aria-controls",panelId),panel.attr("aria-labelledby",headerId)}).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(options.event),"fill"===heightStyle?(maxHeight=parent.height(),this.element.siblings(":visible").each(function(){var elem=$(this),position=elem.css("position");"absolute"!==position&&"fixed"!==position&&(maxHeight-=elem.outerHeight(!0))}),this.headers.each(function(){maxHeight-=$(this).outerHeight(!0)}),this.headers.next().each(function(){$(this).height(Math.max(0,maxHeight-$(this).innerHeight()+$(this).height()))}).css("overflow","auto")):"auto"===heightStyle&&(maxHeight=0,this.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).css("height","").height())}).height(maxHeight))},_activate:function(index){var active=this._findActive(index)[0];active!==this.active[0]&&(active=active||this.active[0],this._eventHandler({target:active,currentTarget:active,preventDefault:$.noop}))},_findActive:function(selector){return"number"==typeof selector?this.headers.eq(selector):$()},_setupEvents:function(event){var events={keydown:"_keydown"};event&&$.each(event.split(" "),function(index,eventName){events[eventName]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,events),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(event){var options=this.options,active=this.active,clicked=$(event.currentTarget),clickedIsActive=clicked[0]===active[0],collapsing=clickedIsActive&&options.collapsible,toShow=collapsing?$():clicked.next(),toHide=active.next(),eventData={oldHeader:active,oldPanel:toHide,newHeader:collapsing?$():clicked,newPanel:toShow};event.preventDefault(),clickedIsActive&&!options.collapsible||this._trigger("beforeActivate",event,eventData)===!1||(options.active=collapsing?!1:this.headers.index(clicked),this.active=clickedIsActive?$():clicked,this._toggle(eventData),active.removeClass("ui-accordion-header-active ui-state-active"),options.icons&&active.children(".ui-accordion-header-icon").removeClass(options.icons.activeHeader).addClass(options.icons.header),clickedIsActive||(clicked.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),options.icons&&clicked.children(".ui-accordion-header-icon").removeClass(options.icons.header).addClass(options.icons.activeHeader),clicked.next().addClass("ui-accordion-content-active")))},_toggle:function(data){var toShow=data.newPanel,toHide=this.prevShow.length?this.prevShow:data.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=toShow,this.prevHide=toHide,this.options.animate?this._animate(toShow,toHide,data):(toHide.hide(),toShow.show(),this._toggleComplete(data)),toHide.attr({"aria-hidden":"true"}),toHide.prev().attr("aria-selected","false"),toShow.length&&toHide.length?toHide.prev().attr({tabIndex:-1,"aria-expanded":"false"}):toShow.length&&this.headers.filter(function(){return 0===$(this).attr("tabIndex")}).attr("tabIndex",-1),toShow.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(toShow,toHide,data){var total,easing,duration,that=this,adjust=0,down=toShow.length&&(!toHide.length||toShow.index()<toHide.index()),animate=this.options.animate||{},options=down&&animate.down||animate,complete=function(){that._toggleComplete(data)};return"number"==typeof options&&(duration=options),"string"==typeof options&&(easing=options),easing=easing||options.easing||animate.easing,duration=duration||options.duration||animate.duration,toHide.length?toShow.length?(total=toShow.show().outerHeight(),toHide.animate(this.hideProps,{duration:duration,easing:easing,step:function(now,fx){fx.now=Math.round(now)}}),void toShow.hide().animate(this.showProps,{duration:duration,easing:easing,complete:complete,step:function(now,fx){fx.now=Math.round(now),"height"!==fx.prop?adjust+=fx.now:"content"!==that.options.heightStyle&&(fx.now=Math.round(total-toHide.outerHeight()-adjust),adjust=0)}})):toHide.animate(this.hideProps,duration,easing,complete):toShow.animate(this.showProps,duration,easing,complete)},_toggleComplete:function(data){var toHide=data.oldPanel;toHide.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),toHide.length&&(toHide.parent()[0].className=toHide.parent()[0].className),this._trigger("activate",null,data)}})}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position","./menu"],factory):factory(jQuery)}(function($){return $.widget("ui.autocomplete",{version:"@VERSION",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 suppressKeyPress,suppressKeyPressRepeat,suppressInput,nodeName=this.element[0].nodeName.toLowerCase(),isTextarea="textarea"===nodeName,isInput="input"===nodeName;this.isMultiLine=isTextarea?!0:isInput?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[isTextarea||isInput?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(event){if(this.element.prop("readOnly"))return suppressKeyPress=!0,suppressInput=!0,void(suppressKeyPressRepeat=!0);suppressKeyPress=!1,suppressInput=!1,suppressKeyPressRepeat=!1;var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:suppressKeyPress=!0,this._move("previousPage",event);break;case keyCode.PAGE_DOWN:suppressKeyPress=!0,this._move("nextPage",event);break;case keyCode.UP:suppressKeyPress=!0,this._keyEvent("previous",event);break;case keyCode.DOWN:suppressKeyPress=!0,this._keyEvent("next",event);break;case keyCode.ENTER:this.menu.active&&(suppressKeyPress=!0,event.preventDefault(),this.menu.select(event));break;case keyCode.TAB:this.menu.active&&this.menu.select(event);break;case keyCode.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(event),event.preventDefault());break;default:suppressKeyPressRepeat=!0,this._searchTimeout(event)}},keypress:function(event){if(suppressKeyPress)return suppressKeyPress=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&event.preventDefault());if(!suppressKeyPressRepeat){var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:this._move("previousPage",event);break;case keyCode.PAGE_DOWN:this._move("nextPage",event);break;case keyCode.UP:this._keyEvent("previous",event);break;case keyCode.DOWN:this._keyEvent("next",event)}}},input:function(event){return suppressInput?(suppressInput=!1,void event.preventDefault()):void this._searchTimeout(event)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(event){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(event),void this._change(event))}}),this._initSource(),this.menu=$("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(event){event.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var menuElement=this.menu.element[0];$(event.target).closest(".ui-menu-item").length||this._delay(function(){var that=this;this.document.one("mousedown",function(event){event.target===that.element[0]||event.target===menuElement||$.contains(menuElement,event.target)||that.close()})})},menufocus:function(event,ui){var label,item;return this.isNewMenu&&(this.isNewMenu=!1,event.originalEvent&&/^mouse/.test(event.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){$(event.target).trigger(event.originalEvent)})):(item=ui.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",event,{item:item})&&event.originalEvent&&/^key/.test(event.originalEvent.type)&&this._value(item.value),label=ui.item.attr("aria-label")||item.value,void(label&&jQuery.trim(label).length&&(this.liveRegion.children().hide(),$("<div>").text(label).appendTo(this.liveRegion))))},menuselect:function(event,ui){var item=ui.item.data("ui-autocomplete-item"),previous=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=previous,this._delay(function(){this.previous=previous,this.selectedItem=item})),!1!==this._trigger("select",event,{item:item})&&this._value(item.value),this.term=this._value(),this.close(event),this.selectedItem=item
}}),this.liveRegion=$("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(key,value){this._super(key,value),"source"===key&&this._initSource(),"appendTo"===key&&this.menu.element.appendTo(this._appendTo()),"disabled"===key&&value&&this.xhr&&this.xhr.abort()},_appendTo:function(){var element=this.options.appendTo;return element&&(element=element.jquery||element.nodeType?$(element):this.document.find(element).eq(0)),element&&element[0]||(element=this.element.closest(".ui-front")),element.length||(element=this.document[0].body),element},_initSource:function(){var array,url,that=this;$.isArray(this.options.source)?(array=this.options.source,this.source=function(request,response){response($.ui.autocomplete.filter(array,request.term))}):"string"==typeof this.options.source?(url=this.options.source,this.source=function(request,response){that.xhr&&that.xhr.abort(),that.xhr=$.ajax({url:url,data:request,dataType:"json",success:function(data){response(data)},error:function(){response([])}})}):this.source=this.options.source},_searchTimeout:function(event){clearTimeout(this.searching),this.searching=this._delay(function(){var equalValues=this.term===this._value(),menuVisible=this.menu.element.is(":visible"),modifierKey=event.altKey||event.ctrlKey||event.metaKey||event.shiftKey;(!equalValues||equalValues&&!menuVisible&&!modifierKey)&&(this.selectedItem=null,this.search(null,event))},this.options.delay)},search:function(value,event){return value=null!=value?value:this._value(),this.term=this._value(),value.length<this.options.minLength?this.close(event):this._trigger("search",event)!==!1?this._search(value):void 0},_search:function(value){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:value},this._response())},_response:function(){var index=++this.requestIndex;return $.proxy(function(content){index===this.requestIndex&&this.__response(content),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(content){content&&(content=this._normalize(content)),this._trigger("response",null,{content:content}),!this.options.disabled&&content&&content.length&&!this.cancelSearch?(this._suggest(content),this._trigger("open")):this._close()},close:function(event){this.cancelSearch=!0,this._close(event)},_close:function(event){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",event))},_change:function(event){this.previous!==this._value()&&this._trigger("change",event,{item:this.selectedItem})},_normalize:function(items){return items.length&&items[0].label&&items[0].value?items:$.map(items,function(item){return"string"==typeof item?{label:item,value:item}:$.extend({},item,{label:item.label||item.value,value:item.value||item.label})})},_suggest:function(items){var ul=this.menu.element.empty();this._renderMenu(ul,items),this.isNewMenu=!0,this.menu.refresh(),ul.show(),this._resizeMenu(),ul.position($.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var ul=this.menu.element;ul.outerWidth(Math.max(ul.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(ul,items){var that=this;$.each(items,function(index,item){that._renderItemData(ul,item)})},_renderItemData:function(ul,item){return this._renderItem(ul,item).data("ui-autocomplete-item",item)},_renderItem:function(ul,item){return $("<li>").text(item.label).appendTo(ul)},_move:function(direction,event){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(direction)||this.menu.isLastItem()&&/^next/.test(direction)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[direction](event):void this.search(null,event)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(keyEvent,event){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(keyEvent,event),event.preventDefault())}}),$.extend($.ui.autocomplete,{escapeRegex:function(value){return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(array,term){var matcher=new RegExp($.ui.autocomplete.escapeRegex(term),"i");return $.grep(array,function(value){return matcher.test(value.label||value.value||value)})}}),$.widget("ui.autocomplete",$.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(amount){return amount+(amount>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(content){var message;this._superApply(arguments),this.options.disabled||this.cancelSearch||(message=content&&content.length?this.options.messages.results(content.length):this.options.messages.noResults,this.liveRegion.children().hide(),$("<div>").text(message).appendTo(this.liveRegion))}}),$.ui.autocomplete}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],factory):factory(jQuery)}(function($){var lastActive,baseClasses="ui-button ui-widget ui-state-default ui-corner-all",typeClasses="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",formResetHandler=function(){var form=$(this);setTimeout(function(){form.find(":ui-button").button("refresh")},1)},radioGroup=function(radio){var name=radio.name,form=radio.form,radios=$([]);return name&&(name=name.replace(/'/g,"\\'"),radios=form?$(form).find("[name='"+name+"'][type=radio]"):$("[name='"+name+"'][type=radio]",radio.ownerDocument).filter(function(){return!this.form})),radios};return $.widget("ui.button",{version:"@VERSION",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,formResetHandler),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var that=this,options=this.options,toggleButton="checkbox"===this.type||"radio"===this.type,activeClass=toggleButton?"":"ui-state-active";null===options.label&&(options.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(baseClasses).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){options.disabled||this===lastActive&&$(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){options.disabled||$(this).removeClass(activeClass)}).bind("click"+this.eventNamespace,function(event){options.disabled&&(event.preventDefault(),event.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),toggleButton&&this.element.bind("change"+this.eventNamespace,function(){that.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return options.disabled?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(options.disabled)return!1;$(this).addClass("ui-state-active"),that.buttonElement.attr("aria-pressed","true");var radio=that.element[0];radioGroup(radio).not(radio).map(function(){return $(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return options.disabled?!1:($(this).addClass("ui-state-active"),lastActive=this,void that.document.one("mouseup",function(){lastActive=null}))}).bind("mouseup"+this.eventNamespace,function(){return options.disabled?!1:void $(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(event){return options.disabled?!1:void((event.keyCode===$.ui.keyCode.SPACE||event.keyCode===$.ui.keyCode.ENTER)&&$(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){$(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(event){event.keyCode===$.ui.keyCode.SPACE&&$(this).click()})),this._setOption("disabled",options.disabled),this._resetButton()},_determineButtonType:function(){var ancestor,labelSelector,checked;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(ancestor=this.element.parents().last(),labelSelector="label[for='"+this.element.attr("id")+"']",this.buttonElement=ancestor.find(labelSelector),this.buttonElement.length||(ancestor=ancestor.length?ancestor.siblings():this.element.siblings(),this.buttonElement=ancestor.filter(labelSelector),this.buttonElement.length||(this.buttonElement=ancestor.find(labelSelector))),this.element.addClass("ui-helper-hidden-accessible"),checked=this.element.is(":checked"),checked&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",checked)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(baseClasses+" ui-state-active "+typeClasses).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(key,value){return this._super(key,value),"disabled"===key?(this.widget().toggleClass("ui-state-disabled",!!value),this.element.prop("disabled",!!value),void(value&&this.buttonElement.removeClass("checkbox"===this.type||"radio"===this.type?"ui-state-focus":"ui-state-focus ui-state-active"))):void this._resetButton()},refresh:function(){var isDisabled=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");isDisabled!==this.options.disabled&&this._setOption("disabled",isDisabled),"radio"===this.type?radioGroup(this.element[0]).each(function(){$(this).is(":checked")?$(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):$(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var buttonElement=this.buttonElement.removeClass(typeClasses),buttonText=$("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(buttonElement.empty()).text(),icons=this.options.icons,multipleIcons=icons.primary&&icons.secondary,buttonClasses=[];icons.primary||icons.secondary?(this.options.text&&buttonClasses.push("ui-button-text-icon"+(multipleIcons?"s":icons.primary?"-primary":"-secondary")),icons.primary&&buttonElement.prepend("<span class='ui-button-icon-primary ui-icon "+icons.primary+"'></span>"),icons.secondary&&buttonElement.append("<span class='ui-button-icon-secondary ui-icon "+icons.secondary+"'></span>"),this.options.text||(buttonClasses.push(multipleIcons?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||buttonElement.attr("title",$.trim(buttonText)))):buttonClasses.push("ui-button-text-only"),buttonElement.addClass(buttonClasses.join(" "))}}),$.widget("ui.buttonset",{version:"@VERSION",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(key,value){"disabled"===key&&this.buttons.button("option",key,value),this._super(key,value)},refresh:function(){var rtl="rtl"===this.element.css("direction"),allButtons=this.element.find(this.options.items),existingButtons=allButtons.filter(":ui-button");allButtons.not(":ui-button").button(),existingButtons.button("refresh"),this.buttons=allButtons.map(function(){return $(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(rtl?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(rtl?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return $(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),$.ui.button}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./core"],factory):factory(jQuery)}(function($){function datepicker_getZindex(elem){for(var position,value;elem.length&&elem[0]!==document;){if(position=elem.css("position"),("absolute"===position||"relative"===position||"fixed"===position)&&(value=parseInt(elem.css("zIndex"),10),!isNaN(value)&&0!==value))return value;elem=elem.parent()}return 0}function Datepicker(){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=datepicker_bindHover($("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function datepicker_bindHover(dpDiv){var selector="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return dpDiv.delegate(selector,"mouseout",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")}).delegate(selector,"mouseover",datepicker_handleMouseover)}function datepicker_handleMouseover(){$.datepicker._isDisabledDatepicker(datepicker_instActive.inline?datepicker_instActive.dpDiv.parent()[0]:datepicker_instActive.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 datepicker_extendRemove(target,props){$.extend(target,props);for(var name in props)null==props[name]&&(target[name]=props[name]);return target}$.extend($.ui,{datepicker:{version:"@VERSION"}});var datepicker_instActive;return $.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(settings){return datepicker_extendRemove(this._defaults,settings||{}),this},_attachDatepicker:function(target,settings){var nodeName,inline,inst;nodeName=target.nodeName.toLowerCase(),inline="div"===nodeName||"span"===nodeName,target.id||(this.uuid+=1,target.id="dp"+this.uuid),inst=this._newInst($(target),inline),inst.settings=$.extend({},settings||{}),"input"===nodeName?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(target,inline){var id=target[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:inline?datepicker_bindHover($("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]),inst.trigger=$([]),input.hasClass(this.markerClassName)||(this._attachments(input,inst),input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(inst),$.data(target,"datepicker",inst),inst.settings.disabled&&this._disableDatepicker(target))},_attachments:function(input,inst){var showOn,buttonText,buttonImage,appendText=this._get(inst,"appendText"),isRTL=this._get(inst,"isRTL");inst.append&&inst.append.remove(),appendText&&(inst.append=$("<span class='"+this._appendClass+"'>"+appendText+"</span>"),input[isRTL?"before":"after"](inst.append)),input.unbind("focus",this._showDatepicker),inst.trigger&&inst.trigger.remove(),showOn=this._get(inst,"showOn"),("focus"===showOn||"both"===showOn)&&input.focus(this._showDatepicker),("button"===showOn||"both"===showOn)&&(buttonText=this._get(inst,"buttonText"),buttonImage=this._get(inst,"buttonImage"),inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$("<button type='button'></button>").addClass(this._triggerClass).html(buttonImage?$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText}):buttonText)),input[isRTL?"before":"after"](inst.trigger),inst.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput===input[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!==input[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(input[0])):$.datepicker._showDatepicker(input[0]),!1}))},_autoSize:function(inst){if(this._get(inst,"autoSize")&&!inst.inline){var findMax,max,maxI,i,date=new Date(2009,11,20),dateFormat=this._get(inst,"dateFormat");dateFormat.match(/[DM]/)&&(findMax=function(names){for(max=0,maxI=0,i=0;i<names.length;i++)names[i].length>max&&(max=names[i].length,maxI=i);return maxI},date.setMonth(findMax(this._get(inst,dateFormat.match(/MM/)?"monthNames":"monthNamesShort"))),date.setDate(findMax(this._get(inst,dateFormat.match(/DD/)?"dayNames":"dayNamesShort"))+20-date.getDay())),inst.input.attr("size",this._formatDate(inst,date).length)}},_inlineDatepicker:function(target,inst){var divSpan=$(target);divSpan.hasClass(this.markerClassName)||(divSpan.addClass(this.markerClassName).append(inst.dpDiv),$.data(target,"datepicker",inst),this._setDate(inst,this._getDefaultDate(inst),!0),this._updateDatepicker(inst),this._updateAlternate(inst),inst.settings.disabled&&this._disableDatepicker(target),inst.dpDiv.css("display","block"))},_dialogDatepicker:function(input,date,onSelect,settings,pos){var id,browserWidth,browserHeight,scrollX,scrollY,inst=this._dialogInst;return inst||(this.uuid+=1,id="dp"+this.uuid,this._dialogInput=$("<input type='text' id='"+id+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),inst=this._dialogInst=this._newInst(this._dialogInput,!1),inst.settings={},$.data(this._dialogInput[0],"datepicker",inst)),datepicker_extendRemove(inst.settings,settings||{}),date=date&&date.constructor===Date?this._formatDate(inst,date):date,this._dialogInput.val(date),this._pos=pos?pos.length?pos:[pos.pageX,pos.pageY]:null,this._pos||(browserWidth=document.documentElement.clientWidth,browserHeight=document.documentElement.clientHeight,scrollX=document.documentElement.scrollLeft||document.body.scrollLeft,scrollY=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[browserWidth/2-100+scrollX,browserHeight/2-150+scrollY]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),inst.settings.onSelect=onSelect,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],"datepicker",inst),this},_destroyDatepicker:function(target){var nodeName,$target=$(target),inst=$.data(target,"datepicker");$target.hasClass(this.markerClassName)&&(nodeName=target.nodeName.toLowerCase(),$.removeData(target,"datepicker"),"input"===nodeName?(inst.append.remove(),inst.trigger.remove(),$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===nodeName||"span"===nodeName)&&$target.removeClass(this.markerClassName).empty())},_enableDatepicker:function(target){var nodeName,inline,$target=$(target),inst=$.data(target,"datepicker");$target.hasClass(this.markerClassName)&&(nodeName=target.nodeName.toLowerCase(),"input"===nodeName?(target.disabled=!1,inst.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===nodeName||"span"===nodeName)&&(inline=$target.children("."+this._inlineClass),inline.children().removeClass("ui-state-disabled"),inline.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=$.map(this._disabledInputs,function(value){return value===target?null:value}))},_disableDatepicker:function(target){var nodeName,inline,$target=$(target),inst=$.data(target,"datepicker");$target.hasClass(this.markerClassName)&&(nodeName=target.nodeName.toLowerCase(),"input"===nodeName?(target.disabled=!0,inst.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===nodeName||"span"===nodeName)&&(inline=$target.children("."+this._inlineClass),inline.children().addClass("ui-state-disabled"),inline.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=$.map(this._disabledInputs,function(value){return value===target?null:value}),this._disabledInputs[this._disabledInputs.length]=target)},_isDisabledDatepicker:function(target){if(!target)return!1;for(var i=0;i<this._disabledInputs.length;i++)if(this._disabledInputs[i]===target)return!0;return!1},_getInst:function(target){try{return $.data(target,"datepicker")}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var settings,date,minDate,maxDate,inst=this._getInst(target);return 2===arguments.length&&"string"==typeof name?"defaults"===name?$.extend({},$.datepicker._defaults):inst?"all"===name?$.extend({},inst.settings):this._get(inst,name):null:(settings=name||{},"string"==typeof name&&(settings={},settings[name]=value),void(inst&&(this._curInst===inst&&this._hideDatepicker(),date=this._getDateDatepicker(target,!0),minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),datepicker_extendRemove(inst.settings,settings),null!==minDate&&void 0!==settings.dateFormat&&void 0===settings.minDate&&(inst.settings.minDate=this._formatDate(inst,minDate)),null!==maxDate&&void 0!==settings.dateFormat&&void 0===settings.maxDate&&(inst.settings.maxDate=this._formatDate(inst,maxDate)),"disabled"in settings&&(settings.disabled?this._disableDatepicker(target):this._enableDatepicker(target)),this._attachments($(target),inst),this._autoSize(inst),this._setDate(inst,date),this._updateAlternate(inst),this._updateDatepicker(inst))))},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);inst&&this._updateDatepicker(inst)},_setDateDatepicker:function(target,date){var inst=this._getInst(target);inst&&(this._setDate(inst,date),this._updateDatepicker(inst),this._updateAlternate(inst))},_getDateDatepicker:function(target,noDefault){var inst=this._getInst(target);return inst&&!inst.inline&&this._setDateFromField(inst,noDefault),inst?this._getDate(inst):null},_doKeyDown:function(event){var onSelect,dateStr,sel,inst=$.datepicker._getInst(event.target),handled=!0,isRTL=inst.dpDiv.is(".ui-datepicker-rtl");if(inst._keyEvent=!0,$.datepicker._datepickerShowing)switch(event.keyCode){case 9:$.datepicker._hideDatepicker(),handled=!1;break;case 13:return sel=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",inst.dpDiv),sel[0]&&$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0]),onSelect=$.datepicker._get(inst,"onSelect"),onSelect?(dateStr=$.datepicker._formatDate(inst),onSelect.apply(inst.input?inst.input[0]:null,[dateStr,inst])):$.datepicker._hideDatepicker(),!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(event.target,event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(event.target,event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths"),"M");break;case 35:(event.ctrlKey||event.metaKey)&&$.datepicker._clearDate(event.target),handled=event.ctrlKey||event.metaKey;break;case 36:(event.ctrlKey||event.metaKey)&&$.datepicker._gotoToday(event.target),handled=event.ctrlKey||event.metaKey;break;case 37:(event.ctrlKey||event.metaKey)&&$.datepicker._adjustDate(event.target,isRTL?1:-1,"D"),handled=event.ctrlKey||event.metaKey,event.originalEvent.altKey&&$.datepicker._adjustDate(event.target,event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths"),"M");break;case 38:(event.ctrlKey||event.metaKey)&&$.datepicker._adjustDate(event.target,-7,"D"),handled=event.ctrlKey||event.metaKey;break;case 39:(event.ctrlKey||event.metaKey)&&$.datepicker._adjustDate(event.target,isRTL?-1:1,"D"),handled=event.ctrlKey||event.metaKey,event.originalEvent.altKey&&$.datepicker._adjustDate(event.target,event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths"),"M");break;case 40:(event.ctrlKey||event.metaKey)&&$.datepicker._adjustDate(event.target,7,"D"),handled=event.ctrlKey||event.metaKey;break;default:handled=!1}else 36===event.keyCode&&event.ctrlKey?$.datepicker._showDatepicker(this):handled=!1;handled&&(event.preventDefault(),event.stopPropagation())},_doKeyPress:function(event){var chars,chr,inst=$.datepicker._getInst(event.target);return $.datepicker._get(inst,"constrainInput")?(chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat")),chr=String.fromCharCode(null==event.charCode?event.keyCode:event.charCode),event.ctrlKey||event.metaKey||" ">chr||!chars||chars.indexOf(chr)>-1):void 0},_doKeyUp:function(event){var date,inst=$.datepicker._getInst(event.target);if(inst.input.val()!==inst.lastVal)try{date=$.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),inst.input?inst.input.val():null,$.datepicker._getFormatConfig(inst)),date&&($.datepicker._setDateFromField(inst),$.datepicker._updateAlternate(inst),$.datepicker._updateDatepicker(inst))}catch(err){}return!0},_showDatepicker:function(input){if(input=input.target||input,"input"!==input.nodeName.toLowerCase()&&(input=$("input",input.parentNode)[0]),!$.datepicker._isDisabledDatepicker(input)&&$.datepicker._lastInput!==input){var inst,beforeShow,beforeShowSettings,isFixed,offset,showAnim,duration;inst=$.datepicker._getInst(input),$.datepicker._curInst&&$.datepicker._curInst!==inst&&($.datepicker._curInst.dpDiv.stop(!0,!0),inst&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0])),beforeShow=$.datepicker._get(inst,"beforeShow"),beforeShowSettings=beforeShow?beforeShow.apply(input,[input,inst]):{},beforeShowSettings!==!1&&(datepicker_extendRemove(inst.settings,beforeShowSettings),inst.lastVal=null,$.datepicker._lastInput=input,$.datepicker._setDateFromField(inst),$.datepicker._inDialog&&(input.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(input),$.datepicker._pos[1]+=input.offsetHeight),isFixed=!1,$(input).parents().each(function(){return isFixed|="fixed"===$(this).css("position"),!isFixed}),offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]},$.datepicker._pos=null,inst.dpDiv.empty(),inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(inst),offset=$.datepicker._checkOffset(inst,offset,isFixed),inst.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":isFixed?"fixed":"absolute",display:"none",left:offset.left+"px",top:offset.top+"px"}),inst.inline||(showAnim=$.datepicker._get(inst,"showAnim"),duration=$.datepicker._get(inst,"duration"),inst.dpDiv.css("z-index",datepicker_getZindex($(input))+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects.effect[showAnim]?inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration):inst.dpDiv[showAnim||"show"](showAnim?duration:null),$.datepicker._shouldFocusInput(inst)&&inst.input.focus(),$.datepicker._curInst=inst))}},_updateDatepicker:function(inst){this.maxRows=4,datepicker_instActive=inst,inst.dpDiv.empty().append(this._generateHTML(inst)),this._attachHandlers(inst);var origyearshtml,numMonths=this._getNumberOfMonths(inst),cols=numMonths[1],width=17,activeCell=inst.dpDiv.find("."+this._dayOverClass+" a");activeCell.length>0&&datepicker_handleMouseover.apply(activeCell.get(0)),inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),cols>1&&inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",width*cols+"em"),inst.dpDiv[(1!==numMonths[0]||1!==numMonths[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),inst===$.datepicker._curInst&&$.datepicker._datepickerShowing&&$.datepicker._shouldFocusInput(inst)&&inst.input.focus(),inst.yearshtml&&(origyearshtml=inst.yearshtml,setTimeout(function(){origyearshtml===inst.yearshtml&&inst.yearshtml&&inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml),origyearshtml=inst.yearshtml=null},0))},_shouldFocusInput:function(inst){return inst.input&&inst.input.is(":visible")&&!inst.input.is(":disabled")&&!inst.input.is(":focus")},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth(),dpHeight=inst.dpDiv.outerHeight(),inputWidth=inst.input?inst.input.outerWidth():0,inputHeight=inst.input?inst.input.outerHeight():0,viewWidth=document.documentElement.clientWidth+(isFixed?0:$(document).scrollLeft()),viewHeight=document.documentElement.clientHeight+(isFixed?0:$(document).scrollTop());
return offset.left-=this._get(inst,"isRTL")?dpWidth-inputWidth:0,offset.left-=isFixed&&offset.left===inst.input.offset().left?$(document).scrollLeft():0,offset.top-=isFixed&&offset.top===inst.input.offset().top+inputHeight?$(document).scrollTop():0,offset.left-=Math.min(offset.left,offset.left+dpWidth>viewWidth&&viewWidth>dpWidth?Math.abs(offset.left+dpWidth-viewWidth):0),offset.top-=Math.min(offset.top,offset.top+dpHeight>viewHeight&&viewHeight>dpHeight?Math.abs(dpHeight+inputHeight):0),offset},_findPos:function(obj){for(var position,inst=this._getInst(obj),isRTL=this._get(inst,"isRTL");obj&&("hidden"===obj.type||1!==obj.nodeType||$.expr.filters.hidden(obj));)obj=obj[isRTL?"previousSibling":"nextSibling"];return position=$(obj).offset(),[position.left,position.top]},_hideDatepicker:function(input){var showAnim,duration,postProcess,onClose,inst=this._curInst;!inst||input&&inst!==$.data(input,"datepicker")||this._datepickerShowing&&(showAnim=this._get(inst,"showAnim"),duration=this._get(inst,"duration"),postProcess=function(){$.datepicker._tidyDialog(inst)},$.effects&&($.effects.effect[showAnim]||$.effects[showAnim])?inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess):inst.dpDiv["slideDown"===showAnim?"slideUp":"fadeIn"===showAnim?"fadeOut":"hide"](showAnim?duration:null,postProcess),showAnim||postProcess(),this._datepickerShowing=!1,onClose=this._get(inst,"onClose"),onClose&&onClose.apply(inst.input?inst.input[0]:null,[inst.input?inst.input.val():"",inst]),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(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if($.datepicker._curInst){var $target=$(event.target),inst=$.datepicker._getInst($target[0]);($target[0].id!==$.datepicker._mainDivId&&0===$target.parents("#"+$.datepicker._mainDivId).length&&!$target.hasClass($.datepicker.markerClassName)&&!$target.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||$target.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!==inst)&&$.datepicker._hideDatepicker()}},_adjustDate:function(id,offset,period){var target=$(id),inst=this._getInst(target[0]);this._isDisabledDatepicker(target[0])||(this._adjustInstDate(inst,offset+("M"===period?this._get(inst,"showCurrentAtPos"):0),period),this._updateDatepicker(inst))},_gotoToday:function(id){var date,target=$(id),inst=this._getInst(target[0]);this._get(inst,"gotoCurrent")&&inst.currentDay?(inst.selectedDay=inst.currentDay,inst.drawMonth=inst.selectedMonth=inst.currentMonth,inst.drawYear=inst.selectedYear=inst.currentYear):(date=new Date,inst.selectedDay=date.getDate(),inst.drawMonth=inst.selectedMonth=date.getMonth(),inst.drawYear=inst.selectedYear=date.getFullYear()),this._notifyChange(inst),this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id),inst=this._getInst(target[0]);inst["selected"+("M"===period?"Month":"Year")]=inst["draw"+("M"===period?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10),this._notifyChange(inst),this._adjustDate(target)},_selectDay:function(id,month,year,td){var inst,target=$(id);$(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])||(inst=this._getInst(target[0]),inst.selectedDay=inst.currentDay=$("a",td).html(),inst.selectedMonth=inst.currentMonth=month,inst.selectedYear=inst.currentYear=year,this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear)))},_clearDate:function(id){var target=$(id);this._selectDate(target,"")},_selectDate:function(id,dateStr){var onSelect,target=$(id),inst=this._getInst(target[0]);dateStr=null!=dateStr?dateStr:this._formatDate(inst),inst.input&&inst.input.val(dateStr),this._updateAlternate(inst),onSelect=this._get(inst,"onSelect"),onSelect?onSelect.apply(inst.input?inst.input[0]:null,[dateStr,inst]):inst.input&&inst.input.trigger("change"),inst.inline?this._updateDatepicker(inst):(this._hideDatepicker(),this._lastInput=inst.input[0],"object"!=typeof inst.input[0]&&inst.input.focus(),this._lastInput=null)},_updateAlternate:function(inst){var altFormat,date,dateStr,altField=this._get(inst,"altField");altField&&(altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat"),date=this._getDate(inst),dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst)),$(altField).each(function(){$(this).val(dateStr)}))},noWeekends:function(date){var day=date.getDay();return[day>0&&6>day,""]},iso8601Week:function(date){var time,checkDate=new Date(date.getTime());return checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7)),time=checkDate.getTime(),checkDate.setMonth(0),checkDate.setDate(1),Math.floor(Math.round((time-checkDate)/864e5)/7)+1},parseDate:function(format,value,settings){if(null==format||null==value)throw"Invalid arguments";if(value="object"==typeof value?value.toString():value+"",""===value)return null;var iFormat,dim,extra,date,iValue=0,shortYearCutoffTemp=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff,shortYearCutoff="string"!=typeof shortYearCutoffTemp?shortYearCutoffTemp:(new Date).getFullYear()%100+parseInt(shortYearCutoffTemp,10),dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,year=-1,month=-1,day=-1,doy=-1,literal=!1,lookAhead=function(match){var matches=iFormat+1<format.length&&format.charAt(iFormat+1)===match;return matches&&iFormat++,matches},getNumber=function(match){var isDoubled=lookAhead(match),size="@"===match?14:"!"===match?20:"y"===match&&isDoubled?4:"o"===match?3:2,minSize="y"===match?size:1,digits=new RegExp("^\\d{"+minSize+","+size+"}"),num=value.substring(iValue).match(digits);if(!num)throw"Missing number at position "+iValue;return iValue+=num[0].length,parseInt(num[0],10)},getName=function(match,shortNames,longNames){var index=-1,names=$.map(lookAhead(match)?longNames:shortNames,function(v,k){return[[k,v]]}).sort(function(a,b){return-(a[1].length-b[1].length)});if($.each(names,function(i,pair){var name=pair[1];return value.substr(iValue,name.length).toLowerCase()===name.toLowerCase()?(index=pair[0],iValue+=name.length,!1):void 0}),-1!==index)return index+1;throw"Unknown name at position "+iValue},checkLiteral=function(){if(value.charAt(iValue)!==format.charAt(iFormat))throw"Unexpected literal at position "+iValue;iValue++};for(iFormat=0;iFormat<format.length;iFormat++)if(literal)"'"!==format.charAt(iFormat)||lookAhead("'")?checkLiteral():literal=!1;else switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":date=new Date(getNumber("@")),year=date.getFullYear(),month=date.getMonth()+1,day=date.getDate();break;case"!":date=new Date((getNumber("!")-this._ticksTo1970)/1e4),year=date.getFullYear(),month=date.getMonth()+1,day=date.getDate();break;case"'":lookAhead("'")?checkLiteral():literal=!0;break;default:checkLiteral()}if(iValue<value.length&&(extra=value.substr(iValue),!/^\s+/.test(extra)))throw"Extra/unparsed characters found in date: "+extra;if(-1===year?year=(new Date).getFullYear():100>year&&(year+=(new Date).getFullYear()-(new Date).getFullYear()%100+(shortYearCutoff>=year?0:-100)),doy>-1)for(month=1,day=doy;;){if(dim=this._getDaysInMonth(year,month-1),dim>=day)break;month++,day-=dim}if(date=this._daylightSavingAdjust(new Date(year,month-1,day)),date.getFullYear()!==year||date.getMonth()+1!==month||date.getDate()!==day)throw"Invalid date";return date},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(format,date,settings){if(!date)return"";var iFormat,dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,lookAhead=function(match){var matches=iFormat+1<format.length&&format.charAt(iFormat+1)===match;return matches&&iFormat++,matches},formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match))for(;num.length<len;)num="0"+num;return num},formatName=function(match,value,shortNames,longNames){return lookAhead(match)?longNames[value]:shortNames[value]},output="",literal=!1;if(date)for(iFormat=0;iFormat<format.length;iFormat++)if(literal)"'"!==format.charAt(iFormat)||lookAhead("'")?output+=format.charAt(iFormat):literal=!1;else switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":output+=formatNumber("o",Math.round((new Date(date.getFullYear(),date.getMonth(),date.getDate()).getTime()-new Date(date.getFullYear(),0,0).getTime())/864e5),3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100;break;case"@":output+=date.getTime();break;case"!":output+=1e4*date.getTime()+this._ticksTo1970;break;case"'":lookAhead("'")?output+="'":literal=!0;break;default:output+=format.charAt(iFormat)}return output},_possibleChars:function(format){var iFormat,chars="",literal=!1,lookAhead=function(match){var matches=iFormat+1<format.length&&format.charAt(iFormat+1)===match;return matches&&iFormat++,matches};for(iFormat=0;iFormat<format.length;iFormat++)if(literal)"'"!==format.charAt(iFormat)||lookAhead("'")?chars+=format.charAt(iFormat):literal=!1;else switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":lookAhead("'")?chars+="'":literal=!0;break;default:chars+=format.charAt(iFormat)}return chars},_get:function(inst,name){return void 0!==inst.settings[name]?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst,noDefault){if(inst.input.val()!==inst.lastVal){var dateFormat=this._get(inst,"dateFormat"),dates=inst.lastVal=inst.input?inst.input.val():null,defaultDate=this._getDefaultDate(inst),date=defaultDate,settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){dates=noDefault?"":dates}inst.selectedDay=date.getDate(),inst.drawMonth=inst.selectedMonth=date.getMonth(),inst.drawYear=inst.selectedYear=date.getFullYear(),inst.currentDay=dates?date.getDate():0,inst.currentMonth=dates?date.getMonth():0,inst.currentYear=dates?date.getFullYear():0,this._adjustInstDate(inst)}},_getDefaultDate:function(inst){return this._restrictMinMax(inst,this._determineDate(inst,this._get(inst,"defaultDate"),new Date))},_determineDate:function(inst,date,defaultDate){var offsetNumeric=function(offset){var date=new Date;return date.setDate(date.getDate()+offset),date},offsetString=function(offset){try{return $.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),offset,$.datepicker._getFormatConfig(inst))}catch(e){}for(var date=(offset.toLowerCase().match(/^c/)?$.datepicker._getDate(inst):null)||new Date,year=date.getFullYear(),month=date.getMonth(),day=date.getDate(),pattern=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,matches=pattern.exec(offset);matches;){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=7*parseInt(matches[1],10);break;case"m":case"M":month+=parseInt(matches[1],10),day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10),day=Math.min(day,$.datepicker._getDaysInMonth(year,month))}matches=pattern.exec(offset)}return new Date(year,month,day)},newDate=null==date||""===date?defaultDate:"string"==typeof date?offsetString(date):"number"==typeof date?isNaN(date)?defaultDate:offsetNumeric(date):new Date(date.getTime());return newDate=newDate&&"Invalid Date"===newDate.toString()?defaultDate:newDate,newDate&&(newDate.setHours(0),newDate.setMinutes(0),newDate.setSeconds(0),newDate.setMilliseconds(0)),this._daylightSavingAdjust(newDate)},_daylightSavingAdjust:function(date){return date?(date.setHours(date.getHours()>12?date.getHours()+2:0),date):null},_setDate:function(inst,date,noChange){var clear=!date,origMonth=inst.selectedMonth,origYear=inst.selectedYear,newDate=this._restrictMinMax(inst,this._determineDate(inst,date,new Date));inst.selectedDay=inst.currentDay=newDate.getDate(),inst.drawMonth=inst.selectedMonth=inst.currentMonth=newDate.getMonth(),inst.drawYear=inst.selectedYear=inst.currentYear=newDate.getFullYear(),origMonth===inst.selectedMonth&&origYear===inst.selectedYear||noChange||this._notifyChange(inst),this._adjustInstDate(inst),inst.input&&inst.input.val(clear?"":this._formatDate(inst))},_getDate:function(inst){var startDate=!inst.currentYear||inst.input&&""===inst.input.val()?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));return startDate},_attachHandlers:function(inst){var stepMonths=this._get(inst,"stepMonths"),id="#"+inst.id.replace(/\\\\/g,"\\");inst.dpDiv.find("[data-handler]").map(function(){var handler={prev:function(){$.datepicker._adjustDate(id,-stepMonths,"M")},next:function(){$.datepicker._adjustDate(id,+stepMonths,"M")},hide:function(){$.datepicker._hideDatepicker()},today:function(){$.datepicker._gotoToday(id)},selectDay:function(){return $.datepicker._selectDay(id,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return $.datepicker._selectMonthYear(id,this,"M"),!1},selectYear:function(){return $.datepicker._selectMonthYear(id,this,"Y"),!1}};$(this).bind(this.getAttribute("data-event"),handler[this.getAttribute("data-handler")])})},_generateHTML:function(inst){var maxDraw,prevText,prev,nextText,next,currentText,gotoDate,controls,buttonPanel,firstDay,showWeek,dayNames,dayNamesMin,monthNames,monthNamesShort,beforeShowDay,showOtherMonths,selectOtherMonths,defaultDate,html,dow,row,group,col,selectedDate,cornerClass,calender,thead,day,daysInMonth,leadDays,curRows,numRows,printDate,dRow,tbody,daySettings,otherMonth,unselectable,tempDate=new Date,today=this._daylightSavingAdjust(new Date(tempDate.getFullYear(),tempDate.getMonth(),tempDate.getDate())),isRTL=this._get(inst,"isRTL"),showButtonPanel=this._get(inst,"showButtonPanel"),hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext"),navigationAsDateFormat=this._get(inst,"navigationAsDateFormat"),numMonths=this._getNumberOfMonths(inst),showCurrentAtPos=this._get(inst,"showCurrentAtPos"),stepMonths=this._get(inst,"stepMonths"),isMultiMonth=1!==numMonths[0]||1!==numMonths[1],currentDate=this._daylightSavingAdjust(inst.currentDay?new Date(inst.currentYear,inst.currentMonth,inst.currentDay):new Date(9999,9,9)),minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),drawMonth=inst.drawMonth-showCurrentAtPos,drawYear=inst.drawYear;if(0>drawMonth&&(drawMonth+=12,drawYear--),maxDate)for(maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[0]*numMonths[1]+1,maxDate.getDate())),maxDraw=minDate&&minDate>maxDraw?minDate:maxDraw;this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw;)drawMonth--,0>drawMonth&&(drawMonth=11,drawYear--);for(inst.drawMonth=drawMonth,inst.drawYear=drawYear,prevText=this._get(inst,"prevText"),prevText=navigationAsDateFormat?this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)):prevText,prev=this._canAdjustMonth(inst,-1,drawYear,drawMonth)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+prevText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"e":"w")+"'>"+prevText+"</span></a>":hideIfNoPrevNext?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+prevText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"e":"w")+"'>"+prevText+"</span></a>",nextText=this._get(inst,"nextText"),nextText=navigationAsDateFormat?this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)):nextText,next=this._canAdjustMonth(inst,1,drawYear,drawMonth)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+nextText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"w":"e")+"'>"+nextText+"</span></a>":hideIfNoPrevNext?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+nextText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"w":"e")+"'>"+nextText+"</span></a>",currentText=this._get(inst,"currentText"),gotoDate=this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today,currentText=navigationAsDateFormat?this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)):currentText,controls=inst.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(inst,"closeText")+"</button>",buttonPanel=showButtonPanel?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"",firstDay=parseInt(this._get(inst,"firstDay"),10),firstDay=isNaN(firstDay)?0:firstDay,showWeek=this._get(inst,"showWeek"),dayNames=this._get(inst,"dayNames"),dayNamesMin=this._get(inst,"dayNamesMin"),monthNames=this._get(inst,"monthNames"),monthNamesShort=this._get(inst,"monthNamesShort"),beforeShowDay=this._get(inst,"beforeShowDay"),showOtherMonths=this._get(inst,"showOtherMonths"),selectOtherMonths=this._get(inst,"selectOtherMonths"),defaultDate=this._getDefaultDate(inst),html="",row=0;row<numMonths[0];row++){for(group="",this.maxRows=4,col=0;col<numMonths[1];col++){if(selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay)),cornerClass=" ui-corner-all",calender="",isMultiMonth){if(calender+="<div class='ui-datepicker-group",numMonths[1]>1)switch(col){case 0:calender+=" ui-datepicker-group-first",cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+=" ui-datepicker-group-last",cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+=" ui-datepicker-group-middle",cornerClass=""}calender+="'>"}for(calender+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+cornerClass+"'>"+(/all|left/.test(cornerClass)&&0===row?isRTL?next:prev:"")+(/all|right/.test(cornerClass)&&0===row?isRTL?prev:next:"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+"</div><table class='ui-datepicker-calendar'><thead><tr>",thead=showWeek?"<th class='ui-datepicker-week-col'>"+this._get(inst,"weekHeader")+"</th>":"",dow=0;7>dow;dow++)day=(dow+firstDay)%7,thead+="<th scope='col'"+((dow+firstDay+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+dayNames[day]+"'>"+dayNamesMin[day]+"</span></th>";for(calender+=thead+"</tr></thead><tbody>",daysInMonth=this._getDaysInMonth(drawYear,drawMonth),drawYear===inst.selectedYear&&drawMonth===inst.selectedMonth&&(inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)),leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7,curRows=Math.ceil((leadDays+daysInMonth)/7),numRows=isMultiMonth&&this.maxRows>curRows?this.maxRows:curRows,this.maxRows=numRows,printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays)),dRow=0;numRows>dRow;dRow++){for(calender+="<tr>",tbody=showWeek?"<td class='ui-datepicker-week-col'>"+this._get(inst,"calculateWeek")(printDate)+"</td>":"",dow=0;7>dow;dow++)daySettings=beforeShowDay?beforeShowDay.apply(inst.input?inst.input[0]:null,[printDate]):[!0,""],otherMonth=printDate.getMonth()!==drawMonth,unselectable=otherMonth&&!selectOtherMonths||!daySettings[0]||minDate&&minDate>printDate||maxDate&&printDate>maxDate,tbody+="<td class='"+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+(printDate.getTime()===selectedDate.getTime()&&drawMonth===inst.selectedMonth&&inst._keyEvent||defaultDate.getTime()===printDate.getTime()&&defaultDate.getTime()===selectedDate.getTime()?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()===currentDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()===today.getTime()?" ui-datepicker-today":""))+"'"+(otherMonth&&!showOtherMonths||!daySettings[2]?"":" title='"+daySettings[2].replace(/'/g,"&#39;")+"'")+(unselectable?"":" data-handler='selectDay' data-event='click' data-month='"+printDate.getMonth()+"' data-year='"+printDate.getFullYear()+"'")+">"+(otherMonth&&!showOtherMonths?"&#xa0;":unselectable?"<span class='ui-state-default'>"+printDate.getDate()+"</span>":"<a class='ui-state-default"+(printDate.getTime()===today.getTime()?" ui-state-highlight":"")+(printDate.getTime()===currentDate.getTime()?" ui-state-active":"")+(otherMonth?" ui-priority-secondary":"")+"' href='#'>"+printDate.getDate()+"</a>")+"</td>",printDate.setDate(printDate.getDate()+1),printDate=this._daylightSavingAdjust(printDate);calender+=tbody+"</tr>"}drawMonth++,drawMonth>11&&(drawMonth=0,drawYear++),calender+="</tbody></table>"+(isMultiMonth?"</div>"+(numMonths[0]>0&&col===numMonths[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),group+=calender}html+=group}return html+=buttonPanel,inst._keyEvent=!1,html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,secondary,monthNames,monthNamesShort){var inMinYear,inMaxYear,month,years,thisYear,determineYear,year,endYear,changeMonth=this._get(inst,"changeMonth"),changeYear=this._get(inst,"changeYear"),showMonthAfterYear=this._get(inst,"showMonthAfterYear"),html="<div class='ui-datepicker-title'>",monthHtml="";if(secondary||!changeMonth)monthHtml+="<span class='ui-datepicker-month'>"+monthNames[drawMonth]+"</span>";else{for(inMinYear=minDate&&minDate.getFullYear()===drawYear,inMaxYear=maxDate&&maxDate.getFullYear()===drawYear,monthHtml+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",month=0;12>month;month++)(!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())&&(monthHtml+="<option value='"+month+"'"+(month===drawMonth?" selected='selected'":"")+">"+monthNamesShort[month]+"</option>");monthHtml+="</select>"}if(showMonthAfterYear||(html+=monthHtml+(!secondary&&changeMonth&&changeYear?"":"&#xa0;")),!inst.yearshtml)if(inst.yearshtml="",secondary||!changeYear)html+="<span class='ui-datepicker-year'>"+drawYear+"</span>";else{for(years=this._get(inst,"yearRange").split(":"),thisYear=(new Date).getFullYear(),determineYear=function(value){var year=value.match(/c[+\-].*/)?drawYear+parseInt(value.substring(1),10):value.match(/[+\-].*/)?thisYear+parseInt(value,10):parseInt(value,10);return isNaN(year)?thisYear:year},year=determineYear(years[0]),endYear=Math.max(year,determineYear(years[1]||"")),year=minDate?Math.max(year,minDate.getFullYear()):year,endYear=maxDate?Math.min(endYear,maxDate.getFullYear()):endYear,inst.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";endYear>=year;year++)inst.yearshtml+="<option value='"+year+"'"+(year===drawYear?" selected='selected'":"")+">"+year+"</option>";inst.yearshtml+="</select>",html+=inst.yearshtml,inst.yearshtml=null}return html+=this._get(inst,"yearSuffix"),showMonthAfterYear&&(html+=(!secondary&&changeMonth&&changeYear?"":"&#xa0;")+monthHtml),html+="</div>"},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+("Y"===period?offset:0),month=inst.drawMonth+("M"===period?offset:0),day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+("D"===period?offset:0),date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));inst.selectedDay=date.getDate(),inst.drawMonth=inst.selectedMonth=date.getMonth(),inst.drawYear=inst.selectedYear=date.getFullYear(),("M"===period||"Y"===period)&&this._notifyChange(inst)},_restrictMinMax:function(inst,date){var minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),newDate=minDate&&minDate>date?minDate:date;return maxDate&&newDate>maxDate?maxDate:newDate},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");onChange&&onChange.apply(inst.input?inst.input[0]:null,[inst.selectedYear,inst.selectedMonth+1,inst])},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return null==numMonths?[1,1]:"number"==typeof numMonths?[1,numMonths]:numMonths},_getMinMaxDate:function(inst,minMax){return this._determineDate(inst,this._get(inst,minMax+"Date"),null)},_getDaysInMonth:function(year,month){return 32-this._daylightSavingAdjust(new Date(year,month,32)).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst),date=this._daylightSavingAdjust(new Date(curYear,curMonth+(0>offset?offset:numMonths[0]*numMonths[1]),1));return 0>offset&&date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth())),this._isInRange(inst,date)},_isInRange:function(inst,date){var yearSplit,currentYear,minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),minYear=null,maxYear=null,years=this._get(inst,"yearRange");return years&&(yearSplit=years.split(":"),currentYear=(new Date).getFullYear(),minYear=parseInt(yearSplit[0],10),maxYear=parseInt(yearSplit[1],10),yearSplit[0].match(/[+\-].*/)&&(minYear+=currentYear),yearSplit[1].match(/[+\-].*/)&&(maxYear+=currentYear)),(!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime())&&(!minYear||date.getFullYear()>=minYear)&&(!maxYear||date.getFullYear()<=maxYear)},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");return shortYearCutoff="string"!=typeof shortYearCutoff?shortYearCutoff:(new Date).getFullYear()%100+parseInt(shortYearCutoff,10),{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){day||(inst.currentDay=inst.selectedDay,inst.currentMonth=inst.selectedMonth,inst.currentYear=inst.selectedYear);var date=day?"object"==typeof day?day:this._daylightSavingAdjust(new Date(year,month,day)):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}}),$.fn.datepicker=function(options){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick),$.datepicker.initialized=!0),0===$("#"+$.datepicker._mainDivId).length&&$("body").append($.datepicker.dpDiv);var otherArgs=Array.prototype.slice.call(arguments,1);return"string"!=typeof options||"isDisabled"!==options&&"getDate"!==options&&"widget"!==options?"option"===options&&2===arguments.length&&"string"==typeof arguments[1]?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs)):this.each(function(){"string"==typeof options?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)}):$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="@VERSION",$.datepicker}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./button","./draggable","./mouse","./position","./resizable"],factory):factory(jQuery)}(function($){return $.widget("ui.dialog",{version:"@VERSION",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"Close",dialogClass:"",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(pos){var topOffset=$(this).css(pos).offset().top;0>topOffset&&$(this).css("top",pos.top-topOffset)}},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"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),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 element=this.options.appendTo;return element&&(element.jquery||element.nodeType)?$(element):this.document.find(element||"body").eq(0)},_destroy:function(){var next,originalPosition=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),next=originalPosition.parent.children().eq(originalPosition.index),next.length&&next[0]!==this.element[0]?next.before(this.element):originalPosition.parent.append(this.element)},widget:function(){return this.uiDialog},disable:$.noop,enable:$.noop,close:function(event){var activeElement,that=this;if(this._isOpen&&this._trigger("beforeClose",event)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{activeElement=this.document[0].activeElement,activeElement&&"body"!==activeElement.nodeName.toLowerCase()&&$(activeElement).blur()}catch(error){}this._hide(this.uiDialog,this.options.hide,function(){that._trigger("close",event)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(event,silent){var moved=!1,zIndicies=this.uiDialog.siblings(".ui-front:visible").map(function(){return+$(this).css("z-index")}).get(),zIndexMax=Math.max.apply(null,zIndicies);return zIndexMax>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",zIndexMax+1),moved=!0),moved&&!silent&&this._trigger("focus",event),moved
},open:function(){var that=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=$(this.document[0].activeElement),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(){that._focusTabbable(),that._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var hasFocus=this._focusedElement;hasFocus||(hasFocus=this.element.find("[autofocus]")),hasFocus.length||(hasFocus=this.element.find(":tabbable")),hasFocus.length||(hasFocus=this.uiDialogButtonPane.find(":tabbable")),hasFocus.length||(hasFocus=this.uiDialogTitlebarClose.filter(":tabbable")),hasFocus.length||(hasFocus=this.uiDialog),hasFocus.eq(0).focus()},_keepFocus:function(event){function checkFocus(){var activeElement=this.document[0].activeElement,isActive=this.uiDialog[0]===activeElement||$.contains(this.uiDialog[0],activeElement);isActive||this._focusTabbable()}event.preventDefault(),checkFocus.call(this),this._delay(checkFocus)},_createWrapper:function(){this.uiDialog=$("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(event){if(this.options.closeOnEscape&&!event.isDefaultPrevented()&&event.keyCode&&event.keyCode===$.ui.keyCode.ESCAPE)return event.preventDefault(),void this.close(event);if(event.keyCode===$.ui.keyCode.TAB&&!event.isDefaultPrevented()){var tabbables=this.uiDialog.find(":tabbable"),first=tabbables.filter(":first"),last=tabbables.filter(":last");event.target!==last[0]&&event.target!==this.uiDialog[0]||event.shiftKey?event.target!==first[0]&&event.target!==this.uiDialog[0]||!event.shiftKey||(this._delay(function(){last.focus()}),event.preventDefault()):(this._delay(function(){first.focus()}),event.preventDefault())}},mousedown:function(event){this._moveToTop(event)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var uiDialogTitle;this.uiDialogTitlebar=$("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(event){$(event.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=$("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(event){event.preventDefault(),this.close(event)}}),uiDialogTitle=$("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(uiDialogTitle),this.uiDialog.attr({"aria-labelledby":uiDialogTitle.attr("id")})},_title:function(title){this.options.title||title.html("&#160;"),title.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=$("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=$("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var that=this,buttons=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),$.isEmptyObject(buttons)||$.isArray(buttons)&&!buttons.length?void this.uiDialog.removeClass("ui-dialog-buttons"):($.each(buttons,function(name,props){var click,buttonOptions;props=$.isFunction(props)?{click:props,text:name}:props,props=$.extend({type:"button"},props),click=props.click,props.click=function(){click.apply(that.element[0],arguments)},buttonOptions={icons:props.icons,text:props.showText},delete props.icons,delete props.showText,$("<button></button>",props).button(buttonOptions).appendTo(that.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function filteredUi(ui){return{position:ui.position,offset:ui.offset}}var that=this,options=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(event,ui){$(this).addClass("ui-dialog-dragging"),that._blockFrames(),that._trigger("dragStart",event,filteredUi(ui))},drag:function(event,ui){that._trigger("drag",event,filteredUi(ui))},stop:function(event,ui){var left=ui.offset.left-that.document.scrollLeft(),top=ui.offset.top-that.document.scrollTop();options.position={my:"left top",at:"left"+(left>=0?"+":"")+left+" top"+(top>=0?"+":"")+top,of:that.window},$(this).removeClass("ui-dialog-dragging"),that._unblockFrames(),that._trigger("dragStop",event,filteredUi(ui))}})},_makeResizable:function(){function filteredUi(ui){return{originalPosition:ui.originalPosition,originalSize:ui.originalSize,position:ui.position,size:ui.size}}var that=this,options=this.options,handles=options.resizable,position=this.uiDialog.css("position"),resizeHandles="string"==typeof handles?handles:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:this._minHeight(),handles:resizeHandles,start:function(event,ui){$(this).addClass("ui-dialog-resizing"),that._blockFrames(),that._trigger("resizeStart",event,filteredUi(ui))},resize:function(event,ui){that._trigger("resize",event,filteredUi(ui))},stop:function(event,ui){var offset=that.uiDialog.offset(),left=offset.left-that.document.scrollLeft(),top=offset.top-that.document.scrollTop();options.height=that.uiDialog.height(),options.width=that.uiDialog.width(),options.position={my:"left top",at:"left"+(left>=0?"+":"")+left+" top"+(top>=0?"+":"")+top,of:that.window},$(this).removeClass("ui-dialog-resizing"),that._unblockFrames(),that._trigger("resizeStop",event,filteredUi(ui))}}).css("position",position)},_trackFocus:function(){this._on(this.widget(),{focusin:function(event){this._makeFocusTarget(),this._focusedElement=$(event.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var instances=this._trackingInstances(),exists=$.inArray(this,instances);-1!==exists&&instances.splice(exists,1)},_trackingInstances:function(){var instances=this.document.data("ui-dialog-instances");return instances||(instances=[],this.document.data("ui-dialog-instances",instances)),instances},_minHeight:function(){var options=this.options;return"auto"===options.height?options.minHeight:Math.min(options.minHeight,options.height)},_position:function(){var isVisible=this.uiDialog.is(":visible");isVisible||this.uiDialog.show(),this.uiDialog.position(this.options.position),isVisible||this.uiDialog.hide()},_setOptions:function(options){var that=this,resize=!1,resizableOptions={};$.each(options,function(key,value){that._setOption(key,value),key in that.sizeRelatedOptions&&(resize=!0),key in that.resizableRelatedOptions&&(resizableOptions[key]=value)}),resize&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",resizableOptions)},_setOption:function(key,value){var isDraggable,isResizable,uiDialog=this.uiDialog;"dialogClass"===key&&uiDialog.removeClass(this.options.dialogClass).addClass(value),"disabled"!==key&&(this._super(key,value),"appendTo"===key&&this.uiDialog.appendTo(this._appendTo()),"buttons"===key&&this._createButtons(),"closeText"===key&&this.uiDialogTitlebarClose.button({label:""+value}),"draggable"===key&&(isDraggable=uiDialog.is(":data(ui-draggable)"),isDraggable&&!value&&uiDialog.draggable("destroy"),!isDraggable&&value&&this._makeDraggable()),"position"===key&&this._position(),"resizable"===key&&(isResizable=uiDialog.is(":data(ui-resizable)"),isResizable&&!value&&uiDialog.resizable("destroy"),isResizable&&"string"==typeof value&&uiDialog.resizable("option","handles",value),isResizable||value===!1||this._makeResizable()),"title"===key&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var nonContentHeight,minContentHeight,maxContentHeight,options=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),options.minWidth>options.width&&(options.width=options.minWidth),nonContentHeight=this.uiDialog.css({height:"auto",width:options.width}).outerHeight(),minContentHeight=Math.max(0,options.minHeight-nonContentHeight),maxContentHeight="number"==typeof options.maxHeight?Math.max(0,options.maxHeight-nonContentHeight):"none","auto"===options.height?this.element.css({minHeight:minContentHeight,maxHeight:maxContentHeight,height:"auto"}):this.element.height(Math.max(0,options.height-nonContentHeight)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var iframe=$(this);return $("<div>").css({position:"absolute",width:iframe.outerWidth(),height:iframe.outerHeight()}).appendTo(iframe.parent()).offset(iframe.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(event){return $(event.target).closest(".ui-dialog").length?!0:!!$(event.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var isOpening=!0;this._delay(function(){isOpening=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(event){isOpening||this._allowInteraction(event)||(event.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=$("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),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 overlays=this.document.data("ui-dialog-overlays")-1;overlays?this.document.data("ui-dialog-overlays",overlays):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}})}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./effect"],factory):factory(jQuery)}(function($){return $.effects.effect.blind=function(o,done){var wrapper,distance,margin,el=$(this),rvertical=/up|down|vertical/,rpositivemotion=/up|left|vertical|horizontal/,props=["position","top","bottom","left","right","height","width"],mode=$.effects.setMode(el,o.mode||"hide"),direction=o.direction||"up",vertical=rvertical.test(direction),ref=vertical?"height":"width",ref2=vertical?"top":"left",motion=rpositivemotion.test(direction),animation={},show="show"===mode;el.parent().is(".ui-effects-wrapper")?$.effects.save(el.parent(),props):$.effects.save(el,props),el.show(),wrapper=$.effects.createWrapper(el).css({overflow:"hidden"}),distance=wrapper[ref](),margin=parseFloat(wrapper.css(ref2))||0,animation[ref]=show?distance:0,motion||(el.css(vertical?"bottom":"right",0).css(vertical?"top":"left","auto").css({position:"absolute"}),animation[ref2]=show?margin:distance+margin),show&&(wrapper.css(ref,0),motion||wrapper.css(ref2,margin+distance)),wrapper.animate(animation,{duration:o.duration,easing:o.easing,queue:!1,complete:function(){"hide"===mode&&el.hide(),$.effects.restore(el,props),$.effects.removeWrapper(el),done()}})}}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./effect"],factory):factory(jQuery)}(function($){return $.effects.effect.bounce=function(o,done){var i,upAnim,downAnim,el=$(this),props=["position","top","bottom","left","right","height","width"],mode=$.effects.setMode(el,o.mode||"effect"),hide="hide"===mode,show="show"===mode,direction=o.direction||"up",distance=o.distance,times=o.times||5,anims=2*times+(show||hide?1:0),speed=o.duration/anims,easing=o.easing,ref="up"===direction||"down"===direction?"top":"left",motion="up"===direction||"left"===direction,queue=el.queue(),queuelen=queue.length;for((show||hide)&&props.push("opacity"),$.effects.save(el,props),el.show(),$.effects.createWrapper(el),distance||(distance=el["top"===ref?"outerHeight":"outerWidth"]()/3),show&&(downAnim={opacity:1},downAnim[ref]=0,el.css("opacity",0).css(ref,motion?2*-distance:2*distance).animate(downAnim,speed,easing)),hide&&(distance/=Math.pow(2,times-1)),downAnim={},downAnim[ref]=0,i=0;times>i;i++)upAnim={},upAnim[ref]=(motion?"-=":"+=")+distance,el.animate(upAnim,speed,easing).animate(downAnim,speed,easing),distance=hide?2*distance:distance/2;hide&&(upAnim={opacity:0},upAnim[ref]=(motion?"-=":"+=")+distance,el.animate(upAnim,speed,easing)),el.queue(function(){hide&&el.hide(),$.effects.restore(el,props),$.effects.removeWrapper(el),done()}),queuelen>1&&queue.splice.apply(queue,[1,0].concat(queue.splice(queuelen,anims+1))),el.dequeue()}}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./effect"],factory):factory(jQuery)}(function($){return $.effects.effect.clip=function(o,done){var wrapper,animate,distance,el=$(this),props=["position","top","bottom","left","right","height","width"],mode=$.effects.setMode(el,o.mode||"hide"),show="show"===mode,direction=o.direction||"vertical",vert="vertical"===direction,size=vert?"height":"width",position=vert?"top":"left",animation={};$.effects.save(el,props),el.show(),wrapper=$.effects.createWrapper(el).css({overflow:"hidden"}),animate="IMG"===el[0].tagName?wrapper:el,distance=animate[size](),show&&(animate.css(size,0),animate.css(position,distance/2)),animation[size]=show?distance:0,animation[position]=show?0:distance/2,animate.animate(animation,{queue:!1,duration:o.duration,easing:o.easing,complete:function(){show||el.hide(),$.effects.restore(el,props),$.effects.removeWrapper(el),done()}})}}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./effect"],factory):factory(jQuery)}(function($){return $.effects.effect.drop=function(o,done){var distance,el=$(this),props=["position","top","bottom","left","right","opacity","height","width"],mode=$.effects.setMode(el,o.mode||"hide"),show="show"===mode,direction=o.direction||"left",ref="up"===direction||"down"===direction?"top":"left",motion="up"===direction||"left"===direction?"pos":"neg",animation={opacity:show?1:0};$.effects.save(el,props),el.show(),$.effects.createWrapper(el),distance=o.distance||el["top"===ref?"outerHeight":"outerWidth"](!0)/2,show&&el.css("opacity",0).css(ref,"pos"===motion?-distance:distance),animation[ref]=(show?"pos"===motion?"+=":"-=":"pos"===motion?"-=":"+=")+distance,el.animate(animation,{queue:!1,duration:o.duration,easing:o.easing,complete:function(){"hide"===mode&&el.hide(),$.effects.restore(el,props),$.effects.removeWrapper(el),done()}})}}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./effect"],factory):factory(jQuery)}(function($){return $.effects.effect.explode=function(o,done){function childComplete(){pieces.push(this),pieces.length===rows*cells&&animComplete()}function animComplete(){el.css({visibility:"visible"}),$(pieces).remove(),show||el.hide(),done()}var i,j,left,top,mx,my,rows=o.pieces?Math.round(Math.sqrt(o.pieces)):3,cells=rows,el=$(this),mode=$.effects.setMode(el,o.mode||"hide"),show="show"===mode,offset=el.show().css("visibility","hidden").offset(),width=Math.ceil(el.outerWidth()/cells),height=Math.ceil(el.outerHeight()/rows),pieces=[];for(i=0;rows>i;i++)for(top=offset.top+i*height,my=i-(rows-1)/2,j=0;cells>j;j++)left=offset.left+j*width,mx=j-(cells-1)/2,el.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*width,top:-i*height}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:width,height:height,left:left+(show?mx*width:0),top:top+(show?my*height:0),opacity:show?0:1}).animate({left:left+(show?0:mx*width),top:top+(show?0:my*height),opacity:show?1:0},o.duration||500,o.easing,childComplete)}}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./effect"],factory):factory(jQuery)}(function($){return $.effects.effect.fade=function(o,done){var el=$(this),mode=$.effects.setMode(el,o.mode||"toggle");el.animate({opacity:mode},{queue:!1,duration:o.duration,easing:o.easing,complete:done})}}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./effect"],factory):factory(jQuery)}(function($){return $.effects.effect.fold=function(o,done){var wrapper,distance,el=$(this),props=["position","top","bottom","left","right","height","width"],mode=$.effects.setMode(el,o.mode||"hide"),show="show"===mode,hide="hide"===mode,size=o.size||15,percent=/([0-9]+)%/.exec(size),horizFirst=!!o.horizFirst,widthFirst=show!==horizFirst,ref=widthFirst?["width","height"]:["height","width"],duration=o.duration/2,animation1={},animation2={};$.effects.save(el,props),el.show(),wrapper=$.effects.createWrapper(el).css({overflow:"hidden"}),distance=widthFirst?[wrapper.width(),wrapper.height()]:[wrapper.height(),wrapper.width()],percent&&(size=parseInt(percent[1],10)/100*distance[hide?0:1]),show&&wrapper.css(horizFirst?{height:0,width:size}:{height:size,width:0}),animation1[ref[0]]=show?distance[0]:size,animation2[ref[1]]=show?distance[1]:0,wrapper.animate(animation1,duration,o.easing).animate(animation2,duration,o.easing,function(){hide&&el.hide(),$.effects.restore(el,props),$.effects.removeWrapper(el),done()})}}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./effect"],factory):factory(jQuery)}(function($){return $.effects.effect.highlight=function(o,done){var elem=$(this),props=["backgroundImage","backgroundColor","opacity"],mode=$.effects.setMode(elem,o.mode||"show"),animation={backgroundColor:elem.css("backgroundColor")};"hide"===mode&&(animation.opacity=0),$.effects.save(elem,props),elem.show().css({backgroundImage:"none",backgroundColor:o.color||"#ffff99"}).animate(animation,{queue:!1,duration:o.duration,easing:o.easing,complete:function(){"hide"===mode&&elem.hide(),$.effects.restore(elem,props),done()}})}}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./effect","./effect-scale"],factory):factory(jQuery)}(function($){return $.effects.effect.puff=function(o,done){var elem=$(this),mode=$.effects.setMode(elem,o.mode||"hide"),hide="hide"===mode,percent=parseInt(o.percent,10)||150,factor=percent/100,original={height:elem.height(),width:elem.width(),outerHeight:elem.outerHeight(),outerWidth:elem.outerWidth()};$.extend(o,{effect:"scale",queue:!1,fade:!0,mode:mode,complete:done,percent:hide?percent:100,from:hide?original:{height:original.height*factor,width:original.width*factor,outerHeight:original.outerHeight*factor,outerWidth:original.outerWidth*factor}}),elem.effect(o)}}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./effect"],factory):factory(jQuery)}(function($){return $.effects.effect.pulsate=function(o,done){var i,elem=$(this),mode=$.effects.setMode(elem,o.mode||"show"),show="show"===mode,hide="hide"===mode,showhide=show||"hide"===mode,anims=2*(o.times||5)+(showhide?1:0),duration=o.duration/anims,animateTo=0,queue=elem.queue(),queuelen=queue.length;for((show||!elem.is(":visible"))&&(elem.css("opacity",0).show(),animateTo=1),i=1;anims>i;i++)elem.animate({opacity:animateTo},duration,o.easing),animateTo=1-animateTo;elem.animate({opacity:animateTo},duration,o.easing),elem.queue(function(){hide&&elem.hide(),done()}),queuelen>1&&queue.splice.apply(queue,[1,0].concat(queue.splice(queuelen,anims+1))),elem.dequeue()}}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./effect","./effect-size"],factory):factory(jQuery)}(function($){return $.effects.effect.scale=function(o,done){var el=$(this),options=$.extend(!0,{},o),mode=$.effects.setMode(el,o.mode||"effect"),percent=parseInt(o.percent,10)||(0===parseInt(o.percent,10)?0:"hide"===mode?0:100),direction=o.direction||"both",origin=o.origin,original={height:el.height(),width:el.width(),outerHeight:el.outerHeight(),outerWidth:el.outerWidth()},factor={y:"horizontal"!==direction?percent/100:1,x:"vertical"!==direction?percent/100:1};options.effect="size",options.queue=!1,options.complete=done,"effect"!==mode&&(options.origin=origin||["middle","center"],options.restore=!0),options.from=o.from||("show"===mode?{height:0,width:0,outerHeight:0,outerWidth:0}:original),options.to={height:original.height*factor.y,width:original.width*factor.x,outerHeight:original.outerHeight*factor.y,outerWidth:original.outerWidth*factor.x},options.fade&&("show"===mode&&(options.from.opacity=0,options.to.opacity=1),"hide"===mode&&(options.from.opacity=1,options.to.opacity=0)),el.effect(options)}}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./effect"],factory):factory(jQuery)}(function($){return $.effects.effect.shake=function(o,done){var i,el=$(this),props=["position","top","bottom","left","right","height","width"],mode=$.effects.setMode(el,o.mode||"effect"),direction=o.direction||"left",distance=o.distance||20,times=o.times||3,anims=2*times+1,speed=Math.round(o.duration/anims),ref="up"===direction||"down"===direction?"top":"left",positiveMotion="up"===direction||"left"===direction,animation={},animation1={},animation2={},queue=el.queue(),queuelen=queue.length;for($.effects.save(el,props),el.show(),$.effects.createWrapper(el),animation[ref]=(positiveMotion?"-=":"+=")+distance,animation1[ref]=(positiveMotion?"+=":"-=")+2*distance,animation2[ref]=(positiveMotion?"-=":"+=")+2*distance,el.animate(animation,speed,o.easing),i=1;times>i;i++)el.animate(animation1,speed,o.easing).animate(animation2,speed,o.easing);el.animate(animation1,speed,o.easing).animate(animation,speed/2,o.easing).queue(function(){"hide"===mode&&el.hide(),$.effects.restore(el,props),$.effects.removeWrapper(el),done()}),queuelen>1&&queue.splice.apply(queue,[1,0].concat(queue.splice(queuelen,anims+1))),el.dequeue()}}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./effect"],factory):factory(jQuery)}(function($){return $.effects.effect.size=function(o,done){var original,baseline,factor,el=$(this),props0=["position","top","bottom","left","right","width","height","overflow","opacity"],props1=["position","top","bottom","left","right","overflow","opacity"],props2=["width","height","overflow"],cProps=["fontSize"],vProps=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],hProps=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],mode=$.effects.setMode(el,o.mode||"effect"),restore=o.restore||"effect"!==mode,scale=o.scale||"both",origin=o.origin||["middle","center"],position=el.css("position"),props=restore?props0:props1,zero={height:0,width:0,outerHeight:0,outerWidth:0};"show"===mode&&el.show(),original={height:el.height(),width:el.width(),outerHeight:el.outerHeight(),outerWidth:el.outerWidth()},"toggle"===o.mode&&"show"===mode?(el.from=o.to||zero,el.to=o.from||original):(el.from=o.from||("show"===mode?zero:original),el.to=o.to||("hide"===mode?zero:original)),factor={from:{y:el.from.height/original.height,x:el.from.width/original.width},to:{y:el.to.height/original.height,x:el.to.width/original.width}},("box"===scale||"both"===scale)&&(factor.from.y!==factor.to.y&&(props=props.concat(vProps),el.from=$.effects.setTransition(el,vProps,factor.from.y,el.from),el.to=$.effects.setTransition(el,vProps,factor.to.y,el.to)),factor.from.x!==factor.to.x&&(props=props.concat(hProps),el.from=$.effects.setTransition(el,hProps,factor.from.x,el.from),el.to=$.effects.setTransition(el,hProps,factor.to.x,el.to))),("content"===scale||"both"===scale)&&factor.from.y!==factor.to.y&&(props=props.concat(cProps).concat(props2),el.from=$.effects.setTransition(el,cProps,factor.from.y,el.from),el.to=$.effects.setTransition(el,cProps,factor.to.y,el.to)),$.effects.save(el,props),el.show(),$.effects.createWrapper(el),el.css("overflow","hidden").css(el.from),origin&&(baseline=$.effects.getBaseline(origin,original),el.from.top=(original.outerHeight-el.outerHeight())*baseline.y,el.from.left=(original.outerWidth-el.outerWidth())*baseline.x,el.to.top=(original.outerHeight-el.to.outerHeight)*baseline.y,el.to.left=(original.outerWidth-el.to.outerWidth)*baseline.x),el.css(el.from),("content"===scale||"both"===scale)&&(vProps=vProps.concat(["marginTop","marginBottom"]).concat(cProps),hProps=hProps.concat(["marginLeft","marginRight"]),props2=props0.concat(vProps).concat(hProps),el.find("*[width]").each(function(){var child=$(this),c_original={height:child.height(),width:child.width(),outerHeight:child.outerHeight(),outerWidth:child.outerWidth()};restore&&$.effects.save(child,props2),child.from={height:c_original.height*factor.from.y,width:c_original.width*factor.from.x,outerHeight:c_original.outerHeight*factor.from.y,outerWidth:c_original.outerWidth*factor.from.x},child.to={height:c_original.height*factor.to.y,width:c_original.width*factor.to.x,outerHeight:c_original.height*factor.to.y,outerWidth:c_original.width*factor.to.x},factor.from.y!==factor.to.y&&(child.from=$.effects.setTransition(child,vProps,factor.from.y,child.from),child.to=$.effects.setTransition(child,vProps,factor.to.y,child.to)),factor.from.x!==factor.to.x&&(child.from=$.effects.setTransition(child,hProps,factor.from.x,child.from),child.to=$.effects.setTransition(child,hProps,factor.to.x,child.to)),child.css(child.from),child.animate(child.to,o.duration,o.easing,function(){restore&&$.effects.restore(child,props2)})})),el.animate(el.to,{queue:!1,duration:o.duration,easing:o.easing,complete:function(){0===el.to.opacity&&el.css("opacity",el.from.opacity),"hide"===mode&&el.hide(),$.effects.restore(el,props),restore||("static"===position?el.css({position:"relative",top:el.to.top,left:el.to.left}):$.each(["top","left"],function(idx,pos){el.css(pos,function(_,str){var val=parseInt(str,10),toRef=idx?el.to.left:el.to.top;return"auto"===str?toRef+"px":val+toRef+"px"})})),$.effects.removeWrapper(el),done()}})}}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./effect"],factory):factory(jQuery)}(function($){return $.effects.effect.slide=function(o,done){var distance,el=$(this),props=["position","top","bottom","left","right","width","height"],mode=$.effects.setMode(el,o.mode||"show"),show="show"===mode,direction=o.direction||"left",ref="up"===direction||"down"===direction?"top":"left",positiveMotion="up"===direction||"left"===direction,animation={};$.effects.save(el,props),el.show(),distance=o.distance||el["top"===ref?"outerHeight":"outerWidth"](!0),$.effects.createWrapper(el).css({overflow:"hidden"}),show&&el.css(ref,positiveMotion?isNaN(distance)?"-"+distance:-distance:distance),animation[ref]=(show?positiveMotion?"+=":"-=":positiveMotion?"-=":"+=")+distance,el.animate(animation,{queue:!1,duration:o.duration,easing:o.easing,complete:function(){"hide"===mode&&el.hide(),$.effects.restore(el,props),$.effects.removeWrapper(el),done()}})}}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./effect"],factory):factory(jQuery)}(function($){return $.effects.effect.transfer=function(o,done){var elem=$(this),target=$(o.to),targetFixed="fixed"===target.css("position"),body=$("body"),fixTop=targetFixed?body.scrollTop():0,fixLeft=targetFixed?body.scrollLeft():0,endPosition=target.offset(),animation={top:endPosition.top-fixTop,left:endPosition.left-fixLeft,height:target.innerHeight(),width:target.innerWidth()},startPosition=elem.offset(),transfer=$("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(o.className).css({top:startPosition.top-fixTop,left:startPosition.left-fixLeft,height:elem.innerHeight(),width:elem.innerWidth(),position:targetFixed?"fixed":"absolute"}).animate(animation,o.duration,o.easing,function(){transfer.remove(),done()})}}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position"],factory):factory(jQuery)}(function($){return $.widget("ui.menu",{version:"@VERSION",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(event){event.preventDefault()},"click .ui-menu-item":function(event){var target=$(event.target);!this.mouseHandled&&target.not(".ui-state-disabled").length&&(this.select(event),event.isPropagationStopped()||(this.mouseHandled=!0),target.has(".ui-menu").length?this.expand(event):!this.element.is(":focus")&&$(this.document[0].activeElement).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(event){var target=$(event.currentTarget);target.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(event,target)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(event,keepActiveItem){var item=this.active||this.element.find(this.options.items).eq(0);keepActiveItem||this.focus(event,item)},blur:function(event){this._delay(function(){$.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(event)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(event){this._closeOnDocumentClick(event)&&this.collapseAll(event),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var elem=$(this);elem.data("ui-menu-submenu-carat")&&elem.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(event){function escape(value){return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var match,prev,character,skip,regex,preventDefault=!0;switch(event.keyCode){case $.ui.keyCode.PAGE_UP:this.previousPage(event);break;case $.ui.keyCode.PAGE_DOWN:this.nextPage(event);break;case $.ui.keyCode.HOME:this._move("first","first",event);break;case $.ui.keyCode.END:this._move("last","last",event);break;case $.ui.keyCode.UP:this.previous(event);break;case $.ui.keyCode.DOWN:this.next(event);break;case $.ui.keyCode.LEFT:this.collapse(event);break;case $.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(event);break;case $.ui.keyCode.ENTER:case $.ui.keyCode.SPACE:this._activate(event);break;case $.ui.keyCode.ESCAPE:this.collapse(event);break;default:preventDefault=!1,prev=this.previousFilter||"",character=String.fromCharCode(event.keyCode),skip=!1,clearTimeout(this.filterTimer),character===prev?skip=!0:character=prev+character,regex=new RegExp("^"+escape(character),"i"),match=this.activeMenu.find(this.options.items).filter(function(){return regex.test($(this).text())}),match=skip&&-1!==match.index(this.active.next())?this.active.nextAll(".ui-menu-item"):match,match.length||(character=String.fromCharCode(event.keyCode),regex=new RegExp("^"+escape(character),"i"),match=this.activeMenu.find(this.options.items).filter(function(){return regex.test($(this).text())
})),match.length?(this.focus(event,match),match.length>1?(this.previousFilter=character,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}preventDefault&&event.preventDefault()},_activate:function(event){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(event):this.select(event))},refresh:function(){var menus,items,that=this,icon=this.options.icons.submenu,submenus=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),submenus.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var menu=$(this),item=menu.parent(),submenuCarat=$("<span>").addClass("ui-menu-icon ui-icon "+icon).data("ui-menu-submenu-carat",!0);item.attr("aria-haspopup","true").prepend(submenuCarat),menu.attr("aria-labelledby",item.attr("id"))}),menus=submenus.add(this.element),items=menus.find(this.options.items),items.not(".ui-menu-item").each(function(){var item=$(this);that._isDivider(item)&&item.addClass("ui-widget-content ui-menu-divider")}),items.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),items.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(key,value){"icons"===key&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(value.submenu),"disabled"===key&&this.element.toggleClass("ui-state-disabled",!!value).attr("aria-disabled",value),this._super(key,value)},focus:function(event,item){var nested,focused;this.blur(event,event&&"focus"===event.type),this._scrollIntoView(item),this.active=item.first(),focused=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",focused.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),event&&"keydown"===event.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),nested=item.children(".ui-menu"),nested.length&&event&&/^mouse/.test(event.type)&&this._startOpening(nested),this.activeMenu=item.parent(),this._trigger("focus",event,{item:item})},_scrollIntoView:function(item){var borderTop,paddingTop,offset,scroll,elementHeight,itemHeight;this._hasScroll()&&(borderTop=parseFloat($.css(this.activeMenu[0],"borderTopWidth"))||0,paddingTop=parseFloat($.css(this.activeMenu[0],"paddingTop"))||0,offset=item.offset().top-this.activeMenu.offset().top-borderTop-paddingTop,scroll=this.activeMenu.scrollTop(),elementHeight=this.activeMenu.height(),itemHeight=item.outerHeight(),0>offset?this.activeMenu.scrollTop(scroll+offset):offset+itemHeight>elementHeight&&this.activeMenu.scrollTop(scroll+offset-elementHeight+itemHeight))},blur:function(event,fromFocus){fromFocus||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",event,{item:this.active}))},_startOpening:function(submenu){clearTimeout(this.timer),"true"===submenu.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(submenu)},this.delay))},_open:function(submenu){var position=$.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(submenu.parents(".ui-menu")).hide().attr("aria-hidden","true"),submenu.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(position)},collapseAll:function(event,all){clearTimeout(this.timer),this.timer=this._delay(function(){var currentMenu=all?this.element:$(event&&event.target).closest(this.element.find(".ui-menu"));currentMenu.length||(currentMenu=this.element),this._close(currentMenu),this.blur(event),this.activeMenu=currentMenu},this.delay)},_close:function(startMenu){startMenu||(startMenu=this.active?this.active.parent():this.element),startMenu.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(event){return!$(event.target).closest(".ui-menu").length},_isDivider:function(item){return!/[^\-\u2014\u2013\s]/.test(item.text())},collapse:function(event){var newItem=this.active&&this.active.parent().closest(".ui-menu-item",this.element);newItem&&newItem.length&&(this._close(),this.focus(event,newItem))},expand:function(event){var newItem=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();newItem&&newItem.length&&(this._open(newItem.parent()),this._delay(function(){this.focus(event,newItem)}))},next:function(event){this._move("next","first",event)},previous:function(event){this._move("prev","last",event)},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(direction,filter,event){var next;this.active&&(next="first"===direction||"last"===direction?this.active["first"===direction?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[direction+"All"](".ui-menu-item").eq(0)),next&&next.length&&this.active||(next=this.activeMenu.find(this.options.items)[filter]()),this.focus(event,next)},nextPage:function(event){var item,base,height;return this.active?void(this.isLastItem()||(this._hasScroll()?(base=this.active.offset().top,height=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return item=$(this),item.offset().top-base-height<0}),this.focus(event,item)):this.focus(event,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(event)},previousPage:function(event){var item,base,height;return this.active?void(this.isFirstItem()||(this._hasScroll()?(base=this.active.offset().top,height=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return item=$(this),item.offset().top-base+height>0}),this.focus(event,item)):this.focus(event,this.activeMenu.find(this.options.items).first()))):void this.next(event)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(event){this.active=this.active||$(event.target).closest(".ui-menu-item");var ui={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(event,!0),this._trigger("select",event,ui)}})}),function(factory){"function"==typeof define&&define.amd?define(["jquery"],factory):factory(jQuery)}(function($){return function(){function getOffsets(offsets,width,height){return[parseFloat(offsets[0])*(rpercent.test(offsets[0])?width/100:1),parseFloat(offsets[1])*(rpercent.test(offsets[1])?height/100:1)]}function parseCss(element,property){return parseInt($.css(element,property),10)||0}function getDimensions(elem){var raw=elem[0];return 9===raw.nodeType?{width:elem.width(),height:elem.height(),offset:{top:0,left:0}}:$.isWindow(raw)?{width:elem.width(),height:elem.height(),offset:{top:elem.scrollTop(),left:elem.scrollLeft()}}:raw.preventDefault?{width:0,height:0,offset:{top:raw.pageY,left:raw.pageX}}:{width:elem.outerWidth(),height:elem.outerHeight(),offset:elem.offset()}}$.ui=$.ui||{};var cachedScrollbarWidth,supportsOffsetFractions,max=Math.max,abs=Math.abs,round=Math.round,rhorizontal=/left|center|right/,rvertical=/top|center|bottom/,roffset=/[\+\-]\d+(\.[\d]+)?%?/,rposition=/^\w+/,rpercent=/%$/,_position=$.fn.position;$.position={scrollbarWidth:function(){if(void 0!==cachedScrollbarWidth)return cachedScrollbarWidth;var w1,w2,div=$("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),innerDiv=div.children()[0];return $("body").append(div),w1=innerDiv.offsetWidth,div.css("overflow","scroll"),w2=innerDiv.offsetWidth,w1===w2&&(w2=div[0].clientWidth),div.remove(),cachedScrollbarWidth=w1-w2},getScrollInfo:function(within){var overflowX=within.isWindow||within.isDocument?"":within.element.css("overflow-x"),overflowY=within.isWindow||within.isDocument?"":within.element.css("overflow-y"),hasOverflowX="scroll"===overflowX||"auto"===overflowX&&within.width<within.element[0].scrollWidth,hasOverflowY="scroll"===overflowY||"auto"===overflowY&&within.height<within.element[0].scrollHeight;return{width:hasOverflowY?$.position.scrollbarWidth():0,height:hasOverflowX?$.position.scrollbarWidth():0}},getWithinInfo:function(element){var withinElement=$(element||window),isWindow=$.isWindow(withinElement[0]),isDocument=!!withinElement[0]&&9===withinElement[0].nodeType;return{element:withinElement,isWindow:isWindow,isDocument:isDocument,offset:withinElement.offset()||{left:0,top:0},scrollLeft:withinElement.scrollLeft(),scrollTop:withinElement.scrollTop(),width:isWindow||isDocument?withinElement.width():withinElement.outerWidth(),height:isWindow||isDocument?withinElement.height():withinElement.outerHeight()}}},$.fn.position=function(options){if(!options||!options.of)return _position.apply(this,arguments);options=$.extend({},options);var atOffset,targetWidth,targetHeight,targetOffset,basePosition,dimensions,target=$(options.of),within=$.position.getWithinInfo(options.within),scrollInfo=$.position.getScrollInfo(within),collision=(options.collision||"flip").split(" "),offsets={};return dimensions=getDimensions(target),target[0].preventDefault&&(options.at="left top"),targetWidth=dimensions.width,targetHeight=dimensions.height,targetOffset=dimensions.offset,basePosition=$.extend({},targetOffset),$.each(["my","at"],function(){var horizontalOffset,verticalOffset,pos=(options[this]||"").split(" ");1===pos.length&&(pos=rhorizontal.test(pos[0])?pos.concat(["center"]):rvertical.test(pos[0])?["center"].concat(pos):["center","center"]),pos[0]=rhorizontal.test(pos[0])?pos[0]:"center",pos[1]=rvertical.test(pos[1])?pos[1]:"center",horizontalOffset=roffset.exec(pos[0]),verticalOffset=roffset.exec(pos[1]),offsets[this]=[horizontalOffset?horizontalOffset[0]:0,verticalOffset?verticalOffset[0]:0],options[this]=[rposition.exec(pos[0])[0],rposition.exec(pos[1])[0]]}),1===collision.length&&(collision[1]=collision[0]),"right"===options.at[0]?basePosition.left+=targetWidth:"center"===options.at[0]&&(basePosition.left+=targetWidth/2),"bottom"===options.at[1]?basePosition.top+=targetHeight:"center"===options.at[1]&&(basePosition.top+=targetHeight/2),atOffset=getOffsets(offsets.at,targetWidth,targetHeight),basePosition.left+=atOffset[0],basePosition.top+=atOffset[1],this.each(function(){var collisionPosition,using,elem=$(this),elemWidth=elem.outerWidth(),elemHeight=elem.outerHeight(),marginLeft=parseCss(this,"marginLeft"),marginTop=parseCss(this,"marginTop"),collisionWidth=elemWidth+marginLeft+parseCss(this,"marginRight")+scrollInfo.width,collisionHeight=elemHeight+marginTop+parseCss(this,"marginBottom")+scrollInfo.height,position=$.extend({},basePosition),myOffset=getOffsets(offsets.my,elem.outerWidth(),elem.outerHeight());"right"===options.my[0]?position.left-=elemWidth:"center"===options.my[0]&&(position.left-=elemWidth/2),"bottom"===options.my[1]?position.top-=elemHeight:"center"===options.my[1]&&(position.top-=elemHeight/2),position.left+=myOffset[0],position.top+=myOffset[1],supportsOffsetFractions||(position.left=round(position.left),position.top=round(position.top)),collisionPosition={marginLeft:marginLeft,marginTop:marginTop},$.each(["left","top"],function(i,dir){$.ui.position[collision[i]]&&$.ui.position[collision[i]][dir](position,{targetWidth:targetWidth,targetHeight:targetHeight,elemWidth:elemWidth,elemHeight:elemHeight,collisionPosition:collisionPosition,collisionWidth:collisionWidth,collisionHeight:collisionHeight,offset:[atOffset[0]+myOffset[0],atOffset[1]+myOffset[1]],my:options.my,at:options.at,within:within,elem:elem})}),options.using&&(using=function(props){var left=targetOffset.left-position.left,right=left+targetWidth-elemWidth,top=targetOffset.top-position.top,bottom=top+targetHeight-elemHeight,feedback={target:{element:target,left:targetOffset.left,top:targetOffset.top,width:targetWidth,height:targetHeight},element:{element:elem,left:position.left,top:position.top,width:elemWidth,height:elemHeight},horizontal:0>right?"left":left>0?"right":"center",vertical:0>bottom?"top":top>0?"bottom":"middle"};elemWidth>targetWidth&&abs(left+right)<targetWidth&&(feedback.horizontal="center"),elemHeight>targetHeight&&abs(top+bottom)<targetHeight&&(feedback.vertical="middle"),feedback.important=max(abs(left),abs(right))>max(abs(top),abs(bottom))?"horizontal":"vertical",options.using.call(this,props,feedback)}),elem.offset($.extend(position,{using:using}))})},$.ui.position={fit:{left:function(position,data){var newOverRight,within=data.within,withinOffset=within.isWindow?within.scrollLeft:within.offset.left,outerWidth=within.width,collisionPosLeft=position.left-data.collisionPosition.marginLeft,overLeft=withinOffset-collisionPosLeft,overRight=collisionPosLeft+data.collisionWidth-outerWidth-withinOffset;data.collisionWidth>outerWidth?overLeft>0&&0>=overRight?(newOverRight=position.left+overLeft+data.collisionWidth-outerWidth-withinOffset,position.left+=overLeft-newOverRight):position.left=overRight>0&&0>=overLeft?withinOffset:overLeft>overRight?withinOffset+outerWidth-data.collisionWidth:withinOffset:overLeft>0?position.left+=overLeft:overRight>0?position.left-=overRight:position.left=max(position.left-collisionPosLeft,position.left)},top:function(position,data){var newOverBottom,within=data.within,withinOffset=within.isWindow?within.scrollTop:within.offset.top,outerHeight=data.within.height,collisionPosTop=position.top-data.collisionPosition.marginTop,overTop=withinOffset-collisionPosTop,overBottom=collisionPosTop+data.collisionHeight-outerHeight-withinOffset;data.collisionHeight>outerHeight?overTop>0&&0>=overBottom?(newOverBottom=position.top+overTop+data.collisionHeight-outerHeight-withinOffset,position.top+=overTop-newOverBottom):position.top=overBottom>0&&0>=overTop?withinOffset:overTop>overBottom?withinOffset+outerHeight-data.collisionHeight:withinOffset:overTop>0?position.top+=overTop:overBottom>0?position.top-=overBottom:position.top=max(position.top-collisionPosTop,position.top)}},flip:{left:function(position,data){var newOverRight,newOverLeft,within=data.within,withinOffset=within.offset.left+within.scrollLeft,outerWidth=within.width,offsetLeft=within.isWindow?within.scrollLeft:within.offset.left,collisionPosLeft=position.left-data.collisionPosition.marginLeft,overLeft=collisionPosLeft-offsetLeft,overRight=collisionPosLeft+data.collisionWidth-outerWidth-offsetLeft,myOffset="left"===data.my[0]?-data.elemWidth:"right"===data.my[0]?data.elemWidth:0,atOffset="left"===data.at[0]?data.targetWidth:"right"===data.at[0]?-data.targetWidth:0,offset=-2*data.offset[0];0>overLeft?(newOverRight=position.left+myOffset+atOffset+offset+data.collisionWidth-outerWidth-withinOffset,(0>newOverRight||newOverRight<abs(overLeft))&&(position.left+=myOffset+atOffset+offset)):overRight>0&&(newOverLeft=position.left-data.collisionPosition.marginLeft+myOffset+atOffset+offset-offsetLeft,(newOverLeft>0||abs(newOverLeft)<overRight)&&(position.left+=myOffset+atOffset+offset))},top:function(position,data){var newOverTop,newOverBottom,within=data.within,withinOffset=within.offset.top+within.scrollTop,outerHeight=within.height,offsetTop=within.isWindow?within.scrollTop:within.offset.top,collisionPosTop=position.top-data.collisionPosition.marginTop,overTop=collisionPosTop-offsetTop,overBottom=collisionPosTop+data.collisionHeight-outerHeight-offsetTop,top="top"===data.my[1],myOffset=top?-data.elemHeight:"bottom"===data.my[1]?data.elemHeight:0,atOffset="top"===data.at[1]?data.targetHeight:"bottom"===data.at[1]?-data.targetHeight:0,offset=-2*data.offset[1];0>overTop?(newOverBottom=position.top+myOffset+atOffset+offset+data.collisionHeight-outerHeight-withinOffset,position.top+myOffset+atOffset+offset>overTop&&(0>newOverBottom||newOverBottom<abs(overTop))&&(position.top+=myOffset+atOffset+offset)):overBottom>0&&(newOverTop=position.top-data.collisionPosition.marginTop+myOffset+atOffset+offset-offsetTop,position.top+myOffset+atOffset+offset>overBottom&&(newOverTop>0||abs(newOverTop)<overBottom)&&(position.top+=myOffset+atOffset+offset))}},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)}}},function(){var testElement,testElementParent,testElementStyle,offsetLeft,i,body=document.getElementsByTagName("body")[0],div=document.createElement("div");testElement=document.createElement(body?"div":"body"),testElementStyle={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},body&&$.extend(testElementStyle,{position:"absolute",left:"-1000px",top:"-1000px"});for(i in testElementStyle)testElement.style[i]=testElementStyle[i];testElement.appendChild(div),testElementParent=body||document.documentElement,testElementParent.insertBefore(testElement,testElementParent.firstChild),div.style.cssText="position: absolute; left: 10.7432222px;",offsetLeft=$(div).offset().left,supportsOffsetFractions=offsetLeft>10&&11>offsetLeft,testElement.innerHTML="",testElementParent.removeChild(testElement)}()}(),$.ui.position}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],factory):factory(jQuery)}(function($){return $.widget("ui.progressbar",{version:"@VERSION",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=$("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(newValue){return void 0===newValue?this.options.value:(this.options.value=this._constrainedValue(newValue),void this._refreshValue())},_constrainedValue:function(newValue){return void 0===newValue&&(newValue=this.options.value),this.indeterminate=newValue===!1,"number"!=typeof newValue&&(newValue=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,newValue))},_setOptions:function(options){var value=options.value;delete options.value,this._super(options),this.options.value=this._constrainedValue(value),this._refreshValue()},_setOption:function(key,value){"max"===key&&(value=Math.max(this.min,value)),"disabled"===key&&this.element.toggleClass("ui-state-disabled",!!value).attr("aria-disabled",value),this._super(key,value)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var value=this.options.value,percentage=this._percentage();this.valueDiv.toggle(this.indeterminate||value>this.min).toggleClass("ui-corner-right",value===this.options.max).width(percentage.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=$("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":value}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==value&&(this.oldValue=value,this._trigger("change")),value===this.options.max&&this._trigger("complete")}})}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position","./menu"],factory):factory(jQuery)}(function($){return $.widget("ui.selectmenu",{version:"@VERSION",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var selectmenuId=this.element.uniqueId().attr("id");this.ids={element:selectmenuId,button:selectmenuId+"-button",menu:selectmenuId+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var that=this,tabindex=this.element.attr("tabindex");this.label=$("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(event){this.button.focus(),event.preventDefault()}}),this.element.hide(),this.button=$("<span>",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex: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"}).insertAfter(this.element),$("<span>",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=$("<span>",{"class":"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._setOption("width",this.options.width),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){that.menuItems||that._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var that=this;this.menu=$("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=$("<div>",{"class":"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(event,ui){event.preventDefault(),that._select(ui.item.data("ui-selectmenu-item"),event)},focus:function(event,ui){var item=ui.item.data("ui-selectmenu-item");null!=that.focusIndex&&item.index!==that.focusIndex&&(that._trigger("focus",event,{item:item}),that.isOpen||that._select(item,event)),that.focusIndex=item.index,that.button.attr("aria-activedescendant",that.menuItems.eq(item.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this._setOption("width",this.options.width)},_refreshMenu:function(){this.menu.empty();var item,options=this.element.find("option");options.length&&(this._parseOptions(options),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),item=this._getSelectedItem(),this.menuInstance.focus(null,item),this._setAria(item.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(event){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",event))},_position:function(){this.menuWrap.position($.extend({of:this.button},this.options.position))},close:function(event){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this._off(this.document),this._trigger("close",event))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(ul,items){var that=this,currentOptgroup="";$.each(items,function(index,item){item.optgroup!==currentOptgroup&&($("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(item.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:item.optgroup}).appendTo(ul),currentOptgroup=item.optgroup),that._renderItemData(ul,item)})},_renderItemData:function(ul,item){return this._renderItem(ul,item).data("ui-selectmenu-item",item)},_renderItem:function(ul,item){var li=$("<li>");return item.disabled&&li.addClass("ui-state-disabled"),this._setText(li,item.label),li.appendTo(ul)},_setText:function(element,value){value?element.text(value):element.html("&#160;")},_move:function(direction,event){var item,next,filter=".ui-menu-item";this.isOpen?item=this.menuItems.eq(this.focusIndex):(item=this.menuItems.eq(this.element[0].selectedIndex),filter+=":not(.ui-state-disabled)"),next="first"===direction||"last"===direction?item["first"===direction?"prevAll":"nextAll"](filter).eq(-1):item[direction+"All"](filter).eq(0),next.length&&this.menuInstance.focus(event,next)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(event){this[this.isOpen?"close":"open"](event)},_documentClick:{mousedown:function(event){this.isOpen&&($(event.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(event))}},_buttonEvents:{click:"_toggle",keydown:function(event){var preventDefault=!0;switch(event.keyCode){case $.ui.keyCode.TAB:case $.ui.keyCode.ESCAPE:this.close(event),preventDefault=!1;break;case $.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(event);break;case $.ui.keyCode.UP:event.altKey?this._toggle(event):this._move("prev",event);break;case $.ui.keyCode.DOWN:event.altKey?this._toggle(event):this._move("next",event);break;case $.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(event):this._toggle(event);break;case $.ui.keyCode.LEFT:this._move("prev",event);break;case $.ui.keyCode.RIGHT:this._move("next",event);break;case $.ui.keyCode.HOME:case $.ui.keyCode.PAGE_UP:this._move("first",event);break;case $.ui.keyCode.END:case $.ui.keyCode.PAGE_DOWN:this._move("last",event);break;default:this.menu.trigger(event),preventDefault=!1}preventDefault&&event.preventDefault()}},_selectFocusedItem:function(event){var item=this.menuItems.eq(this.focusIndex);item.hasClass("ui-state-disabled")||this._select(item.data("ui-selectmenu-item"),event)},_select:function(item,event){var oldIndex=this.element[0].selectedIndex;this.element[0].selectedIndex=item.index,this._setText(this.buttonText,item.label),this._setAria(item),this._trigger("select",event,{item:item}),item.index!==oldIndex&&this._trigger("change",event,{item:item}),this.close(event)},_setAria:function(item){var id=this.menuItems.eq(item.index).attr("id");this.button.attr({"aria-labelledby":id,"aria-activedescendant":id}),this.menu.attr("aria-activedescendant",id)},_setOption:function(key,value){"icons"===key&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(value.button),this._super(key,value),"appendTo"===key&&this.menuWrap.appendTo(this._appendTo()),"disabled"===key&&(this.menuInstance.option("disabled",value),this.button.toggleClass("ui-state-disabled",value).attr("aria-disabled",value),this.element.prop("disabled",value),value?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===key&&(value||(value=this.element.outerWidth()),this.button.outerWidth(value))},_appendTo:function(){var element=this.options.appendTo;return element&&(element=element.jquery||element.nodeType?$(element):this.document.find(element).eq(0)),element&&element[0]||(element=this.element.closest(".ui-front")),element.length||(element=this.document[0].body),element},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(options){var data=[];options.each(function(index,item){var option=$(item),optgroup=option.parent("optgroup");data.push({element:option,index:index,value:option.attr("value"),label:option.text(),optgroup:optgroup.attr("label")||"",disabled:optgroup.prop("disabled")||option.prop("disabled")})}),this.items=data},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}})}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],factory):factory(jQuery)}(function($){return $.widget("ui.slider",$.ui.mouse,{version:"@VERSION",widgetEventPrefix:"slide",options:{animate:!1,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.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var i,handleCount,options=this.options,existingHandles=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),handle="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",handles=[];for(handleCount=options.values&&options.values.length||1,existingHandles.length>handleCount&&(existingHandles.slice(handleCount).remove(),existingHandles=existingHandles.slice(0,handleCount)),i=existingHandles.length;handleCount>i;i++)handles.push(handle);this.handles=existingHandles.add($(handles.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(i){$(this).data("ui-slider-handle-index",i)})},_createRange:function(){var options=this.options,classes="";options.range?(options.range===!0&&(options.values?options.values.length&&2!==options.values.length?options.values=[options.values[0],options.values[0]]:$.isArray(options.values)&&(options.values=options.values.slice(0)):options.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=$("<div></div>").appendTo(this.element),classes="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(classes+("min"===options.range||"max"===options.range?" ui-slider-range-"+options.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.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(event){var position,normValue,distance,closestHandle,index,allowed,offset,mouseOverHandle,that=this,o=this.options;return o.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),position={x:event.pageX,y:event.pageY},normValue=this._normValueFromMouse(position),distance=this._valueMax()-this._valueMin()+1,this.handles.each(function(i){var thisDistance=Math.abs(normValue-that.values(i));(distance>thisDistance||distance===thisDistance&&(i===that._lastChangedValue||that.values(i)===o.min))&&(distance=thisDistance,closestHandle=$(this),index=i)}),allowed=this._start(event,index),allowed===!1?!1:(this._mouseSliding=!0,this._handleIndex=index,closestHandle.addClass("ui-state-active").focus(),offset=closestHandle.offset(),mouseOverHandle=!$(event.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-closestHandle.width()/2,top:event.pageY-offset.top-closestHandle.height()/2-(parseInt(closestHandle.css("borderTopWidth"),10)||0)-(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+(parseInt(closestHandle.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(event,index,normValue),this._animateOff=!0,!0))
},_mouseStart:function(){return!0},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY},normValue=this._normValueFromMouse(position);return this._slide(event,this._handleIndex,normValue),!1},_mouseStop:function(event){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(event,this._handleIndex),this._change(event,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(position){var pixelTotal,pixelMouse,percentMouse,valueTotal,valueMouse;return"horizontal"===this.orientation?(pixelTotal=this.elementSize.width,pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(pixelTotal=this.elementSize.height,pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),percentMouse=pixelMouse/pixelTotal,percentMouse>1&&(percentMouse=1),0>percentMouse&&(percentMouse=0),"vertical"===this.orientation&&(percentMouse=1-percentMouse),valueTotal=this._valueMax()-this._valueMin(),valueMouse=this._valueMin()+percentMouse*valueTotal,this._trimAlignValue(valueMouse)},_start:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};return this.options.values&&this.options.values.length&&(uiHash.value=this.values(index),uiHash.values=this.values()),this._trigger("start",event,uiHash)},_slide:function(event,index,newVal){var otherVal,newValues,allowed;this.options.values&&this.options.values.length?(otherVal=this.values(index?0:1),2===this.options.values.length&&this.options.range===!0&&(0===index&&newVal>otherVal||1===index&&otherVal>newVal)&&(newVal=otherVal),newVal!==this.values(index)&&(newValues=this.values(),newValues[index]=newVal,allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal,values:newValues}),otherVal=this.values(index?0:1),allowed!==!1&&this.values(index,newVal))):newVal!==this.value()&&(allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal}),allowed!==!1&&this.value(newVal))},_stop:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};this.options.values&&this.options.values.length&&(uiHash.value=this.values(index),uiHash.values=this.values()),this._trigger("stop",event,uiHash)},_change:function(event,index){if(!this._keySliding&&!this._mouseSliding){var uiHash={handle:this.handles[index],value:this.value()};this.options.values&&this.options.values.length&&(uiHash.value=this.values(index),uiHash.values=this.values()),this._lastChangedValue=index,this._trigger("change",event,uiHash)}},value:function(newValue){return arguments.length?(this.options.value=this._trimAlignValue(newValue),this._refreshValue(),void this._change(null,0)):this._value()},values:function(index,newValue){var vals,newValues,i;if(arguments.length>1)return this.options.values[index]=this._trimAlignValue(newValue),this._refreshValue(),void this._change(null,index);if(!arguments.length)return this._values();if(!$.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(index):this.value();for(vals=this.options.values,newValues=arguments[0],i=0;i<vals.length;i+=1)vals[i]=this._trimAlignValue(newValues[i]),this._change(null,i);this._refreshValue()},_setOption:function(key,value){var i,valsLength=0;switch("range"===key&&this.options.range===!0&&("min"===value?(this.options.value=this._values(0),this.options.values=null):"max"===value&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),$.isArray(this.options.values)&&(valsLength=this.options.values.length),"disabled"===key&&this.element.toggleClass("ui-state-disabled",!!value),this._super(key,value),key){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===value?"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(),i=0;valsLength>i;i+=1)this._change(null,i);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var val=this.options.value;return val=this._trimAlignValue(val)},_values:function(index){var val,vals,i;if(arguments.length)return val=this.options.values[index],val=this._trimAlignValue(val);if(this.options.values&&this.options.values.length){for(vals=this.options.values.slice(),i=0;i<vals.length;i+=1)vals[i]=this._trimAlignValue(vals[i]);return vals}return[]},_trimAlignValue:function(val){if(val<=this._valueMin())return this._valueMin();if(val>=this._valueMax())return this._valueMax();var step=this.options.step>0?this.options.step:1,valModStep=(val-this._valueMin())%step,alignValue=val-valModStep;return 2*Math.abs(valModStep)>=step&&(alignValue+=valModStep>0?step:-step),parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var lastValPercent,valPercent,value,valueMin,valueMax,oRange=this.options.range,o=this.options,that=this,animate=this._animateOff?!1:o.animate,_set={};this.options.values&&this.options.values.length?this.handles.each(function(i){valPercent=(that.values(i)-that._valueMin())/(that._valueMax()-that._valueMin())*100,_set["horizontal"===that.orientation?"left":"bottom"]=valPercent+"%",$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate),that.options.range===!0&&("horizontal"===that.orientation?(0===i&&that.range.stop(1,1)[animate?"animate":"css"]({left:valPercent+"%"},o.animate),1===i&&that.range[animate?"animate":"css"]({width:valPercent-lastValPercent+"%"},{queue:!1,duration:o.animate})):(0===i&&that.range.stop(1,1)[animate?"animate":"css"]({bottom:valPercent+"%"},o.animate),1===i&&that.range[animate?"animate":"css"]({height:valPercent-lastValPercent+"%"},{queue:!1,duration:o.animate}))),lastValPercent=valPercent}):(value=this.value(),valueMin=this._valueMin(),valueMax=this._valueMax(),valPercent=valueMax!==valueMin?(value-valueMin)/(valueMax-valueMin)*100:0,_set["horizontal"===this.orientation?"left":"bottom"]=valPercent+"%",this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate),"min"===oRange&&"horizontal"===this.orientation&&this.range.stop(1,1)[animate?"animate":"css"]({width:valPercent+"%"},o.animate),"max"===oRange&&"horizontal"===this.orientation&&this.range[animate?"animate":"css"]({width:100-valPercent+"%"},{queue:!1,duration:o.animate}),"min"===oRange&&"vertical"===this.orientation&&this.range.stop(1,1)[animate?"animate":"css"]({height:valPercent+"%"},o.animate),"max"===oRange&&"vertical"===this.orientation&&this.range[animate?"animate":"css"]({height:100-valPercent+"%"},{queue:!1,duration:o.animate}))},_handleEvents:{keydown:function(event){var allowed,curVal,newVal,step,index=$(event.target).data("ui-slider-handle-index");switch(event.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(event.preventDefault(),!this._keySliding&&(this._keySliding=!0,$(event.target).addClass("ui-state-active"),allowed=this._start(event,index),allowed===!1))return}switch(step=this.options.step,curVal=newVal=this.options.values&&this.options.values.length?this.values(index):this.value(),event.keyCode){case $.ui.keyCode.HOME:newVal=this._valueMin();break;case $.ui.keyCode.END:newVal=this._valueMax();break;case $.ui.keyCode.PAGE_UP:newVal=this._trimAlignValue(curVal+(this._valueMax()-this._valueMin())/this.numPages);break;case $.ui.keyCode.PAGE_DOWN:newVal=this._trimAlignValue(curVal-(this._valueMax()-this._valueMin())/this.numPages);break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal===this._valueMax())return;newVal=this._trimAlignValue(curVal+step);break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal===this._valueMin())return;newVal=this._trimAlignValue(curVal-step)}this._slide(event,index,newVal)},keyup:function(event){var index=$(event.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(event,index),this._change(event,index),$(event.target).removeClass("ui-state-active"))}}})}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./button"],factory):factory(jQuery)}(function($){function spinner_modifier(fn){return function(){var previous=this.element.val();fn.apply(this,arguments),this._refresh(),previous!==this.element.val()&&this._trigger("change")}}return $.widget("ui.spinner",{version:"@VERSION",defaultElement:"<input>",widgetEventPrefix:"spin",options:{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 options={},element=this.element;return $.each(["min","max","step"],function(i,option){var value=element.attr(option);void 0!==value&&value.length&&(options[option]=value)}),options},_events:{keydown:function(event){this._start(event)&&this._keydown(event)&&event.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(event){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",event)))},mousewheel:function(event,delta){if(delta){if(!this.spinning&&!this._start(event))return!1;this._spin((delta>0?1:-1)*this.options.step,event),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(event)},100),event.preventDefault()}},"mousedown .ui-spinner-button":function(event){function checkFocus(){var isActive=this.element[0]===this.document[0].activeElement;isActive||(this.element.focus(),this.previous=previous,this._delay(function(){this.previous=previous}))}var previous;previous=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),event.preventDefault(),checkFocus.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,checkFocus.call(this)}),this._start(event)!==!1&&this._repeat(null,$(event.currentTarget).hasClass("ui-spinner-up")?1:-1,event)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(event){return $(event.currentTarget).hasClass("ui-state-active")?this._start(event)===!1?!1:void this._repeat(null,$(event.currentTarget).hasClass("ui-spinner-up")?1:-1,event):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var uiSpinner=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=uiSpinner.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*uiSpinner.height())&&uiSpinner.height()>0&&uiSpinner.height(uiSpinner.height()),this.options.disabled&&this.disable()},_keydown:function(event){var options=this.options,keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.UP:return this._repeat(null,1,event),!0;case keyCode.DOWN:return this._repeat(null,-1,event),!0;case keyCode.PAGE_UP:return this._repeat(null,options.page,event),!0;case keyCode.PAGE_DOWN:return this._repeat(null,-options.page,event),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(event){return this.spinning||this._trigger("start",event)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(i,steps,event){i=i||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,steps,event)},i),this._spin(steps*this.options.step,event)},_spin:function(step,event){var value=this.value()||0;this.counter||(this.counter=1),value=this._adjustValue(value+step*this._increment(this.counter)),this.spinning&&this._trigger("spin",event,{value:value})===!1||(this._value(value),this.counter++)},_increment:function(i){var incremental=this.options.incremental;return incremental?$.isFunction(incremental)?incremental(i):Math.floor(i*i*i/5e4-i*i/500+17*i/200+1):1},_precision:function(){var precision=this._precisionOf(this.options.step);return null!==this.options.min&&(precision=Math.max(precision,this._precisionOf(this.options.min))),precision},_precisionOf:function(num){var str=num.toString(),decimal=str.indexOf(".");return-1===decimal?0:str.length-decimal-1},_adjustValue:function(value){var base,aboveMin,options=this.options;return base=null!==options.min?options.min:0,aboveMin=value-base,aboveMin=Math.round(aboveMin/options.step)*options.step,value=base+aboveMin,value=parseFloat(value.toFixed(this._precision())),null!==options.max&&value>options.max?options.max:null!==options.min&&value<options.min?options.min:value},_stop:function(event){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",event))},_setOption:function(key,value){if("culture"===key||"numberFormat"===key){var prevValue=this._parse(this.element.val());return this.options[key]=value,void this.element.val(this._format(prevValue))}("max"===key||"min"===key||"step"===key)&&"string"==typeof value&&(value=this._parse(value)),"icons"===key&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(value.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(value.down)),this._super(key,value),"disabled"===key&&(this.widget().toggleClass("ui-state-disabled",!!value),this.element.prop("disabled",!!value),this.buttons.button(value?"disable":"enable"))},_setOptions:spinner_modifier(function(options){this._super(options)}),_parse:function(val){return"string"==typeof val&&""!==val&&(val=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(val,10,this.options.culture):+val),""===val||isNaN(val)?null:val},_format:function(value){return""===value?"":window.Globalize&&this.options.numberFormat?Globalize.format(value,this.options.numberFormat,this.options.culture):value},_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 value=this.value();return null===value?!1:value===this._adjustValue(value)},_value:function(value,allowAny){var parsed;""!==value&&(parsed=this._parse(value),null!==parsed&&(allowAny||(parsed=this._adjustValue(parsed)),value=this._format(parsed))),this.element.val(value),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:spinner_modifier(function(steps){this._stepUp(steps)}),_stepUp:function(steps){this._start()&&(this._spin((steps||1)*this.options.step),this._stop())},stepDown:spinner_modifier(function(steps){this._stepDown(steps)}),_stepDown:function(steps){this._start()&&(this._spin((steps||1)*-this.options.step),this._stop())},pageUp:spinner_modifier(function(pages){this._stepUp((pages||1)*this.options.page)}),pageDown:spinner_modifier(function(pages){this._stepDown((pages||1)*this.options.page)}),value:function(newVal){return arguments.length?void spinner_modifier(this._value).call(this,newVal):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],factory):factory(jQuery)}(function($){return $.widget("ui.tabs",{version:"@VERSION",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var rhash=/#.*$/;return function(anchor){var anchorUrl,locationUrl;anchor=anchor.cloneNode(!1),anchorUrl=anchor.href.replace(rhash,""),locationUrl=location.href.replace(rhash,"");try{anchorUrl=decodeURIComponent(anchorUrl)}catch(error){}try{locationUrl=decodeURIComponent(locationUrl)}catch(error){}return anchor.hash.length>1&&anchorUrl===locationUrl}}(),_create:function(){var that=this,options=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",options.collapsible),this._processTabs(),options.active=this._initialActive(),$.isArray(options.disabled)&&(options.disabled=$.unique(options.disabled.concat($.map(this.tabs.filter(".ui-state-disabled"),function(li){return that.tabs.index(li)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(options.active):$(),this._refresh(),this.active.length&&this.load(options.active)},_initialActive:function(){var active=this.options.active,collapsible=this.options.collapsible,locationHash=location.hash.substring(1);return null===active&&(locationHash&&this.tabs.each(function(i,tab){return $(tab).attr("aria-controls")===locationHash?(active=i,!1):void 0}),null===active&&(active=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===active||-1===active)&&(active=this.tabs.length?0:!1)),active!==!1&&(active=this.tabs.index(this.tabs.eq(active)),-1===active&&(active=collapsible?!1:0)),!collapsible&&active===!1&&this.anchors.length&&(active=0),active},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):$()}},_tabKeydown:function(event){var focusedTab=$(this.document[0].activeElement).closest("li"),selectedIndex=this.tabs.index(focusedTab),goingForward=!0;if(!this._handlePageNav(event)){switch(event.keyCode){case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:selectedIndex++;break;case $.ui.keyCode.UP:case $.ui.keyCode.LEFT:goingForward=!1,selectedIndex--;break;case $.ui.keyCode.END:selectedIndex=this.anchors.length-1;break;case $.ui.keyCode.HOME:selectedIndex=0;break;case $.ui.keyCode.SPACE:return event.preventDefault(),clearTimeout(this.activating),void this._activate(selectedIndex);case $.ui.keyCode.ENTER:return event.preventDefault(),clearTimeout(this.activating),void this._activate(selectedIndex===this.options.active?!1:selectedIndex);default:return}event.preventDefault(),clearTimeout(this.activating),selectedIndex=this._focusNextTab(selectedIndex,goingForward),event.ctrlKey||(focusedTab.attr("aria-selected","false"),this.tabs.eq(selectedIndex).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",selectedIndex)},this.delay))}},_panelKeydown:function(event){this._handlePageNav(event)||event.ctrlKey&&event.keyCode===$.ui.keyCode.UP&&(event.preventDefault(),this.active.focus())},_handlePageNav:function(event){return event.altKey&&event.keyCode===$.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):event.altKey&&event.keyCode===$.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(index,goingForward){function constrain(){return index>lastTabIndex&&(index=0),0>index&&(index=lastTabIndex),index}for(var lastTabIndex=this.tabs.length-1;-1!==$.inArray(constrain(),this.options.disabled);)index=goingForward?index+1:index-1;return index},_focusNextTab:function(index,goingForward){return index=this._findNextTab(index,goingForward),this.tabs.eq(index).focus(),index},_setOption:function(key,value){return"active"===key?void this._activate(value):"disabled"===key?void this._setupDisabled(value):(this._super(key,value),"collapsible"===key&&(this.element.toggleClass("ui-tabs-collapsible",value),value||this.options.active!==!1||this._activate(0)),"event"===key&&this._setupEvents(value),void("heightStyle"===key&&this._setupHeightStyle(value)))},_sanitizeSelector:function(hash){return hash?hash.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var options=this.options,lis=this.tablist.children(":has(a[href])");options.disabled=$.map(lis.filter(".ui-state-disabled"),function(tab){return lis.index(tab)}),this._processTabs(),options.active!==!1&&this.anchors.length?this.active.length&&!$.contains(this.tablist[0],this.active[0])?this.tabs.length===options.disabled.length?(options.active=!1,this.active=$()):this._activate(this._findNextTab(Math.max(0,options.active-1),!1)):options.active=this.tabs.index(this.active):(options.active=!1,this.active=$()),this._refresh()},_refresh:function(){this._setupDisabled(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.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var that=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(event){$(this).is(".ui-state-disabled")&&event.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){$(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return $("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=$(),this.anchors.each(function(i,anchor){var selector,panel,panelId,anchorId=$(anchor).uniqueId().attr("id"),tab=$(anchor).closest("li"),originalAriaControls=tab.attr("aria-controls");that._isLocal(anchor)?(selector=anchor.hash,panelId=selector.substring(1),panel=that.element.find(that._sanitizeSelector(selector))):(panelId=tab.attr("aria-controls")||$({}).uniqueId()[0].id,selector="#"+panelId,panel=that.element.find(selector),panel.length||(panel=that._createPanel(panelId),panel.insertAfter(that.panels[i-1]||that.tablist)),panel.attr("aria-live","polite")),panel.length&&(that.panels=that.panels.add(panel)),originalAriaControls&&tab.data("ui-tabs-aria-controls",originalAriaControls),tab.attr({"aria-controls":panelId,"aria-labelledby":anchorId}),panel.attr("aria-labelledby",anchorId)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(id){return $("<div>").attr("id",id).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(disabled){$.isArray(disabled)&&(disabled.length?disabled.length===this.anchors.length&&(disabled=!0):disabled=!1);for(var li,i=0;li=this.tabs[i];i++)disabled===!0||-1!==$.inArray(i,disabled)?$(li).addClass("ui-state-disabled").attr("aria-disabled","true"):$(li).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=disabled},_setupEvents:function(event){var events={};event&&$.each(event.split(" "),function(index,eventName){events[eventName]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(event){event.preventDefault()}}),this._on(this.anchors,events),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(heightStyle){var maxHeight,parent=this.element.parent();"fill"===heightStyle?(maxHeight=parent.height(),maxHeight-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var elem=$(this),position=elem.css("position");"absolute"!==position&&"fixed"!==position&&(maxHeight-=elem.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){maxHeight-=$(this).outerHeight(!0)}),this.panels.each(function(){$(this).height(Math.max(0,maxHeight-$(this).innerHeight()+$(this).height()))}).css("overflow","auto")):"auto"===heightStyle&&(maxHeight=0,this.panels.each(function(){maxHeight=Math.max(maxHeight,$(this).height("").height())}).height(maxHeight))},_eventHandler:function(event){var options=this.options,active=this.active,anchor=$(event.currentTarget),tab=anchor.closest("li"),clickedIsActive=tab[0]===active[0],collapsing=clickedIsActive&&options.collapsible,toShow=collapsing?$():this._getPanelForTab(tab),toHide=active.length?this._getPanelForTab(active):$(),eventData={oldTab:active,oldPanel:toHide,newTab:collapsing?$():tab,newPanel:toShow};event.preventDefault(),tab.hasClass("ui-state-disabled")||tab.hasClass("ui-tabs-loading")||this.running||clickedIsActive&&!options.collapsible||this._trigger("beforeActivate",event,eventData)===!1||(options.active=collapsing?!1:this.tabs.index(tab),this.active=clickedIsActive?$():tab,this.xhr&&this.xhr.abort(),toHide.length||toShow.length||$.error("jQuery UI Tabs: Mismatching fragment identifier."),toShow.length&&this.load(this.tabs.index(tab),event),this._toggle(event,eventData))},_toggle:function(event,eventData){function complete(){that.running=!1,that._trigger("activate",event,eventData)}function show(){eventData.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),toShow.length&&that.options.show?that._show(toShow,that.options.show,complete):(toShow.show(),complete())}var that=this,toShow=eventData.newPanel,toHide=eventData.oldPanel;this.running=!0,toHide.length&&this.options.hide?this._hide(toHide,this.options.hide,function(){eventData.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),show()}):(eventData.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),toHide.hide(),show()),toHide.attr("aria-hidden","true"),eventData.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),toShow.length&&toHide.length?eventData.oldTab.attr("tabIndex",-1):toShow.length&&this.tabs.filter(function(){return 0===$(this).attr("tabIndex")}).attr("tabIndex",-1),toShow.attr("aria-hidden","false"),eventData.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(index){var anchor,active=this._findActive(index);active[0]!==this.active[0]&&(active.length||(active=this.active),anchor=active.find(".ui-tabs-anchor")[0],this._eventHandler({target:anchor,currentTarget:anchor,preventDefault:$.noop}))},_findActive:function(index){return index===!1?$():this.tabs.eq(index)},_getIndex:function(index){return"string"==typeof index&&(index=this.anchors.index(this.anchors.filter("[href$='"+index+"']"))),index},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){$.data(this,"ui-tabs-destroy")?$(this).remove():$(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var li=$(this),prev=li.data("ui-tabs-aria-controls");prev?li.attr("aria-controls",prev).removeData("ui-tabs-aria-controls"):li.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(index){var disabled=this.options.disabled;disabled!==!1&&(void 0===index?disabled=!1:(index=this._getIndex(index),disabled=$.isArray(disabled)?$.map(disabled,function(num){return num!==index?num:null}):$.map(this.tabs,function(li,num){return num!==index?num:null})),this._setupDisabled(disabled))},disable:function(index){var disabled=this.options.disabled;if(disabled!==!0){if(void 0===index)disabled=!0;else{if(index=this._getIndex(index),-1!==$.inArray(index,disabled))return;disabled=$.isArray(disabled)?$.merge([index],disabled).sort():[index]}this._setupDisabled(disabled)}},load:function(index,event){index=this._getIndex(index);var that=this,tab=this.tabs.eq(index),anchor=tab.find(".ui-tabs-anchor"),panel=this._getPanelForTab(tab),eventData={tab:tab,panel:panel};this._isLocal(anchor[0])||(this.xhr=$.ajax(this._ajaxSettings(anchor,event,eventData)),this.xhr&&"canceled"!==this.xhr.statusText&&(tab.addClass("ui-tabs-loading"),panel.attr("aria-busy","true"),this.xhr.success(function(response){setTimeout(function(){panel.html(response),that._trigger("load",event,eventData)},1)}).complete(function(jqXHR,status){setTimeout(function(){"abort"===status&&that.panels.stop(!1,!0),tab.removeClass("ui-tabs-loading"),panel.removeAttr("aria-busy"),jqXHR===that.xhr&&delete that.xhr},1)})))},_ajaxSettings:function(anchor,event,eventData){var that=this;return{url:anchor.attr("href"),beforeSend:function(jqXHR,settings){return that._trigger("beforeLoad",event,$.extend({jqXHR:jqXHR,ajaxSettings:settings},eventData))}}},_getPanelForTab:function(tab){var id=$(tab).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+id))}})}),function(factory){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position"],factory):factory(jQuery)}(function($){return $.widget("ui.tooltip",{version:"@VERSION",options:{content:function(){var title=$(this).attr("title")||"";return $("<a>").text(title).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(elem,id){var describedby=(elem.attr("aria-describedby")||"").split(/\s+/);describedby.push(id),elem.data("ui-tooltip-id",id).attr("aria-describedby",$.trim(describedby.join(" ")))},_removeDescribedBy:function(elem){var id=elem.data("ui-tooltip-id"),describedby=(elem.attr("aria-describedby")||"").split(/\s+/),index=$.inArray(id,describedby);-1!==index&&describedby.splice(index,1),elem.removeData("ui-tooltip-id"),describedby=$.trim(describedby.join(" ")),describedby?elem.attr("aria-describedby",describedby):elem.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=$("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(key,value){var that=this;return"disabled"===key?(this[value?"_disable":"_enable"](),void(this.options[key]=value)):(this._super(key,value),void("content"===key&&$.each(this.tooltips,function(id,element){that._updateContent(element)
})))},_disable:function(){var that=this;$.each(this.tooltips,function(id,element){var event=$.Event("blur");event.target=event.currentTarget=element[0],that.close(event,!0)}),this.element.find(this.options.items).addBack().each(function(){var element=$(this);element.is("[title]")&&element.data("ui-tooltip-title",element.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var element=$(this);element.data("ui-tooltip-title")&&element.attr("title",element.data("ui-tooltip-title"))})},open:function(event){var that=this,target=$(event?event.target:this.element).closest(this.options.items);target.length&&!target.data("ui-tooltip-id")&&(target.attr("title")&&target.data("ui-tooltip-title",target.attr("title")),target.data("ui-tooltip-open",!0),event&&"mouseover"===event.type&&target.parents().each(function(){var blurEvent,parent=$(this);parent.data("ui-tooltip-open")&&(blurEvent=$.Event("blur"),blurEvent.target=blurEvent.currentTarget=this,that.close(blurEvent,!0)),parent.attr("title")&&(parent.uniqueId(),that.parents[this.id]={element:this,title:parent.attr("title")},parent.attr("title",""))}),this._updateContent(target,event))},_updateContent:function(target,event){var content,contentOption=this.options.content,that=this,eventType=event?event.type:null;return"string"==typeof contentOption?this._open(event,target,contentOption):(content=contentOption.call(target[0],function(response){target.data("ui-tooltip-open")&&that._delay(function(){event&&(event.type=eventType),this._open(event,target,response)})}),void(content&&this._open(event,target,content)))},_open:function(event,target,content){function position(event){positionOption.of=event,tooltip.is(":hidden")||tooltip.position(positionOption)}var tooltip,events,delayedShow,a11yContent,positionOption=$.extend({},this.options.position);if(content){if(tooltip=this._find(target),tooltip.length)return void tooltip.find(".ui-tooltip-content").html(content);target.is("[title]")&&(event&&"mouseover"===event.type?target.attr("title",""):target.removeAttr("title")),tooltip=this._tooltip(target),this._addDescribedBy(target,tooltip.attr("id")),tooltip.find(".ui-tooltip-content").html(content),this.liveRegion.children().hide(),content.clone?(a11yContent=content.clone(),a11yContent.removeAttr("id").find("[id]").removeAttr("id")):a11yContent=content,$("<div>").html(a11yContent).appendTo(this.liveRegion),this.options.track&&event&&/^mouse/.test(event.type)?(this._on(this.document,{mousemove:position}),position(event)):tooltip.position($.extend({of:target},this.options.position)),tooltip.hide(),this._show(tooltip,this.options.show),this.options.show&&this.options.show.delay&&(delayedShow=this.delayedShow=setInterval(function(){tooltip.is(":visible")&&(position(positionOption.of),clearInterval(delayedShow))},$.fx.interval)),this._trigger("open",event,{tooltip:tooltip}),events={keyup:function(event){if(event.keyCode===$.ui.keyCode.ESCAPE){var fakeEvent=$.Event(event);fakeEvent.currentTarget=target[0],this.close(fakeEvent,!0)}}},target[0]!==this.element[0]&&(events.remove=function(){this._removeTooltip(tooltip)}),event&&"mouseover"!==event.type||(events.mouseleave="close"),event&&"focusin"!==event.type||(events.focusout="close"),this._on(!0,target,events)}},close:function(event){var that=this,target=$(event?event.currentTarget:this.element),tooltip=this._find(target);this.closing||(clearInterval(this.delayedShow),target.data("ui-tooltip-title")&&!target.attr("title")&&target.attr("title",target.data("ui-tooltip-title")),this._removeDescribedBy(target),tooltip.stop(!0),this._hide(tooltip,this.options.hide,function(){that._removeTooltip($(this))}),target.removeData("ui-tooltip-open"),this._off(target,"mouseleave focusout keyup"),target[0]!==this.element[0]&&this._off(target,"remove"),this._off(this.document,"mousemove"),event&&"mouseleave"===event.type&&$.each(this.parents,function(id,parent){$(parent.element).attr("title",parent.title),delete that.parents[id]}),this.closing=!0,this._trigger("close",event,{tooltip:tooltip}),this.closing=!1)},_tooltip:function(element){var tooltip=$("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),id=tooltip.uniqueId().attr("id");return $("<div>").addClass("ui-tooltip-content").appendTo(tooltip),tooltip.appendTo(this.document[0].body),this.tooltips[id]=element,tooltip},_find:function(target){var id=target.data("ui-tooltip-id");return id?$("#"+id):$()},_removeTooltip:function(tooltip){tooltip.remove(),delete this.tooltips[tooltip.attr("id")]},_destroy:function(){var that=this;$.each(this.tooltips,function(id,element){var event=$.Event("blur");event.target=event.currentTarget=element[0],that.close(event,!0),$("#"+id).remove(),element.data("ui-tooltip-title")&&(element.attr("title")||element.attr("title",element.data("ui-tooltip-title")),element.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})}),function($){var multipleSortableClass="ui-multisortable-multiple",dragStarted=!1,multiSort={};multiSort.isBelow=function(elm,compare){var elmOriginalPosition=elm.data("dragmultiple:originalPosition"),compareOriginalPosition=compare.data("dragmultiple:originalPosition");return elmOriginalPosition.top>compareOriginalPosition.top},multiSort.reset=function(elm){$(elm).removeClass("ui-sortable-helper").removeAttr("style").data("dragMultipleActive",!1)},multiSort.sort=function(current,positions){positions.after.reverse(),$.each(positions.after,function(){multiSort.reset(this),current.after(this)}),$.each(positions.before,function(){multiSort.reset(this),current.before(this)})},multiSort.sortPositions=function(elm,current){var insertAfter=[],insertBefore=[];return $(elm).find("."+multipleSortableClass).each(function(){var elm=$(this);elm[0]!==current[0]&&current.hasClass(multipleSortableClass)&&(multiSort.isBelow(elm,current)?insertAfter.push(elm):insertBefore.push(elm))}),{after:insertAfter,before:insertBefore}},$.widget("ui.sortable",$.ui.sortable,{_mouseStart:function(){dragStarted=!1,this._superApply(arguments)},_createHelper:function(){var helper=this._superApply(arguments);return $(helper).hasClass(multipleSortableClass)&&$(this.element).find("."+multipleSortableClass).each(function(){$(this).data("dragmultiple:originalPosition",$(this).position()).data("dragMultipleActive",!0)}),helper},_mouseStop:function(){var current=this.helper,elms=[];current.hasClass(multipleSortableClass)&&(elms=$(this.element).find("."+multipleSortableClass)),elms.length||(elms=[current]);var positions=multiSort.sortPositions(this.element,current);this._superApply(arguments),this.element!==this.currentContainer.element?(multiSort.sort(current,positions),$(this.currentContainer.element).trigger("multiplesortreceive",{item:current,items:elms,source:this.element})):current.hasClass(multipleSortableClass)&&multiSort.sort(current,positions),$(this.element).trigger("multiplesortstop",{item:current,items:elms})},_mouseDrag:function(key,value){this._super(key,value);var current=this.helper;if(current.hasClass(multipleSortableClass)){var currentLeft=current.position().left,currentTop=current.position().top,currentZIndex=current.css("z-index"),currentPosition=current.css("position"),positions=multiSort.sortPositions(this.element,current);positions.before.reverse(),[{positions:positions.after,type:"after"},{positions:positions.before,type:"before"}].forEach(function(item){$.each(item.positions,function(index,elm){var top;top="after"===item.type?currentTop+(index+1)*current.outerHeight():currentTop-(index+1)*current.outerHeight(),elm.addClass("ui-sortable-helper").css({width:elm.outerWidth(),height:elm.outerHeight(),position:currentPosition,zIndex:currentZIndex,top:top,left:currentLeft})})}),dragStarted||(dragStarted=!0,this.refreshPositions())}}})}(jQuery);var hexcase=0,b64pad="",chrsz=8;
//# sourceMappingURL=libs.js.map