var requirejs,require,define;!function(global){function isFunction(it){return"[object Function]"===ostring.call(it)}function isArray(it){return"[object Array]"===ostring.call(it)}function each(ary,func){if(ary){var i;for(i=0;i<ary.length&&(!ary[i]||!func(ary[i],i,ary));i+=1);}}function eachReverse(ary,func){if(ary){var i;for(i=ary.length-1;i>-1&&(!ary[i]||!func(ary[i],i,ary));i-=1);}}function hasProp(obj,prop){return hasOwn.call(obj,prop)}function getOwn(obj,prop){return hasProp(obj,prop)&&obj[prop]}function eachProp(obj,func){var prop;for(prop in obj)if(hasProp(obj,prop)&&func(obj[prop],prop))break}function mixin(target,source,force,deepStringMixin){return source&&eachProp(source,function(value,prop){(force||!hasProp(target,prop))&&(deepStringMixin&&"string"!=typeof value?(target[prop]||(target[prop]={}),mixin(target[prop],value,force,deepStringMixin)):target[prop]=value)}),target}function bind(obj,fn){return function(){return fn.apply(obj,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(err){throw err}function getGlobal(value){if(!value)return value;var g=global;return each(value.split("."),function(part){g=g[part]}),g}function makeError(id,msg,err,requireModules){var e=new Error(msg+"\nhttp://requirejs.org/docs/errors.html#"+id);return e.requireType=id,e.requireModules=requireModules,err&&(e.originalError=err),e}function newContext(contextName){function trimDots(ary){var i,part;for(i=0;ary[i];i+=1)if(part=ary[i],"."===part)ary.splice(i,1),i-=1;else if(".."===part){if(1===i&&(".."===ary[2]||".."===ary[0]))break;i>0&&(ary.splice(i-1,2),i-=2)}}function normalize(name,baseName,applyMap){var pkgName,pkgConfig,mapValue,nameParts,i,j,nameSegment,foundMap,foundI,foundStarMap,starI,baseParts=baseName&&baseName.split("/"),normalizedBaseParts=baseParts,map=config.map,starMap=map&&map["*"];if(name&&"."===name.charAt(0)&&(baseName?(normalizedBaseParts=getOwn(config.pkgs,baseName)?baseParts=[baseName]:baseParts.slice(0,baseParts.length-1),name=normalizedBaseParts.concat(name.split("/")),trimDots(name),pkgConfig=getOwn(config.pkgs,pkgName=name[0]),name=name.join("/"),pkgConfig&&name===pkgName+"/"+pkgConfig.main&&(name=pkgName)):0===name.indexOf("./")&&(name=name.substring(2))),applyMap&&map&&(baseParts||starMap)){for(nameParts=name.split("/"),i=nameParts.length;i>0;i-=1){if(nameSegment=nameParts.slice(0,i).join("/"),baseParts)for(j=baseParts.length;j>0;j-=1)if(mapValue=getOwn(map,baseParts.slice(0,j).join("/")),mapValue&&(mapValue=getOwn(mapValue,nameSegment))){foundMap=mapValue,foundI=i;break}if(foundMap)break;!foundStarMap&&starMap&&getOwn(starMap,nameSegment)&&(foundStarMap=getOwn(starMap,nameSegment),starI=i)}!foundMap&&foundStarMap&&(foundMap=foundStarMap,foundI=starI),foundMap&&(nameParts.splice(0,foundI,foundMap),name=nameParts.join("/"))}return name}function removeScript(name){isBrowser&&each(scripts(),function(scriptNode){return scriptNode.getAttribute("data-requiremodule")===name&&scriptNode.getAttribute("data-requirecontext")===context.contextName?(scriptNode.parentNode.removeChild(scriptNode),!0):void 0})}function hasPathFallback(id){var pathConfig=getOwn(config.paths,id);return pathConfig&&isArray(pathConfig)&&pathConfig.length>1?(pathConfig.shift(),context.require.undef(id),context.require([id]),!0):void 0}function splitPrefix(name){var prefix,index=name?name.indexOf("!"):-1;return index>-1&&(prefix=name.substring(0,index),name=name.substring(index+1,name.length)),[prefix,name]}function makeModuleMap(name,parentModuleMap,isNormalized,applyMap){var url,pluginModule,suffix,nameParts,prefix=null,parentName=parentModuleMap?parentModuleMap.name:null,originalName=name,isDefine=!0,normalizedName="";return name||(isDefine=!1,name="_@r"+(requireCounter+=1)),nameParts=splitPrefix(name),prefix=nameParts[0],name=nameParts[1],prefix&&(prefix=normalize(prefix,parentName,applyMap),pluginModule=getOwn(defined,prefix)),name&&(prefix?normalizedName=pluginModule&&pluginModule.normalize?pluginModule.normalize(name,function(name){return normalize(name,parentName,applyMap)}):normalize(name,parentName,applyMap):(normalizedName=normalize(name,parentName,applyMap),nameParts=splitPrefix(normalizedName),prefix=nameParts[0],normalizedName=nameParts[1],isNormalized=!0,url=context.nameToUrl(normalizedName))),suffix=!prefix||pluginModule||isNormalized?"":"_unnormalized"+(unnormalizedCounter+=1),{prefix:prefix,name:normalizedName,parentMap:parentModuleMap,unnormalized:!!suffix,url:url,originalName:originalName,isDefine:isDefine,id:(prefix?prefix+"!"+normalizedName:normalizedName)+suffix}}function getModule(depMap){var id=depMap.id,mod=getOwn(registry,id);return mod||(mod=registry[id]=new context.Module(depMap)),mod}function on(depMap,name,fn){var id=depMap.id,mod=getOwn(registry,id);!hasProp(defined,id)||mod&&!mod.defineEmitComplete?(mod=getModule(depMap),mod.error&&"error"===name?fn(mod.error):mod.on(name,fn)):"defined"===name&&fn(defined[id])}function onError(err,errback){var ids=err.requireModules,notified=!1;errback?errback(err):(each(ids,function(id){var mod=getOwn(registry,id);mod&&(mod.error=err,mod.events.error&&(notified=!0,mod.emit("error",err)))}),notified||req.onError(err))}function takeGlobalQueue(){globalDefQueue.length&&(apsp.apply(defQueue,[defQueue.length-1,0].concat(globalDefQueue)),globalDefQueue=[])}function cleanRegistry(id){delete registry[id],delete enabledRegistry[id]}function breakCycle(mod,traced,processed){var id=mod.map.id;mod.error?mod.emit("error",mod.error):(traced[id]=!0,each(mod.depMaps,function(depMap,i){var depId=depMap.id,dep=getOwn(registry,depId);!dep||mod.depMatched[i]||processed[depId]||(getOwn(traced,depId)?(mod.defineDep(i,defined[depId]),mod.check()):breakCycle(dep,traced,processed))}),processed[id]=!0)}function checkLoaded(){var map,modId,err,usingPathFallback,waitInterval=1e3*config.waitSeconds,expired=waitInterval&&context.startTime+waitInterval<(new Date).getTime(),noLoads=[],reqCalls=[],stillLoading=!1,needCycleCheck=!0;if(!inCheckLoaded){if(inCheckLoaded=!0,eachProp(enabledRegistry,function(mod){if(map=mod.map,modId=map.id,mod.enabled&&(map.isDefine||reqCalls.push(mod),!mod.error))if(!mod.inited&&expired)hasPathFallback(modId)?(usingPathFallback=!0,stillLoading=!0):(noLoads.push(modId),removeScript(modId));else if(!mod.inited&&mod.fetched&&map.isDefine&&(stillLoading=!0,!map.prefix))return needCycleCheck=!1}),expired&&noLoads.length)return err=makeError("timeout","Load timeout for modules: "+noLoads,null,noLoads),err.contextName=context.contextName,onError(err);needCycleCheck&&each(reqCalls,function(mod){breakCycle(mod,{},{})}),expired&&!usingPathFallback||!stillLoading||!isBrowser&&!isWebWorker||checkLoadedTimeoutId||(checkLoadedTimeoutId=setTimeout(function(){checkLoadedTimeoutId=0,checkLoaded()},50)),inCheckLoaded=!1}}function callGetModule(args){hasProp(defined,args[0])||getModule(makeModuleMap(args[0],null,!0)).init(args[1],args[2])}function removeListener(node,func,name,ieName){node.detachEvent&&!isOpera?ieName&&node.detachEvent(ieName,func):node.removeEventListener(name,func,!1)}function getScriptData(evt){var node=evt.currentTarget||evt.srcElement;return removeListener(node,context.onScriptLoad,"load","onreadystatechange"),removeListener(node,context.onScriptError,"error"),{node:node,id:node&&node.getAttribute("data-requiremodule")}}function intakeDefines(){var args;for(takeGlobalQueue();defQueue.length;){if(args=defQueue.shift(),null===args[0])return onError(makeError("mismatch","Mismatched anonymous define() module: "+args[args.length-1]));callGetModule(args)}}var inCheckLoaded,Module,context,handlers,checkLoadedTimeoutId,config={waitSeconds:7,baseUrl:"./",paths:{},pkgs:{},shim:{},config:{}},registry={},enabledRegistry={},undefEvents={},defQueue=[],defined={},urlFetched={},requireCounter=1,unnormalizedCounter=1;return handlers={require:function(mod){return mod.require?mod.require:mod.require=context.makeRequire(mod.map)},exports:function(mod){return mod.usingExports=!0,mod.map.isDefine?mod.exports?mod.exports:mod.exports=defined[mod.map.id]={}:void 0},module:function(mod){return mod.module?mod.module:mod.module={id:mod.map.id,uri:mod.map.url,config:function(){var c,pkg=getOwn(config.pkgs,mod.map.id);return c=pkg?getOwn(config.config,mod.map.id+"/"+pkg.main):getOwn(config.config,mod.map.id),c||{}},exports:defined[mod.map.id]}}},Module=function(map){this.events=getOwn(undefEvents,map.id)||{},this.map=map,this.shim=getOwn(config.shim,map.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},Module.prototype={init:function(depMaps,factory,errback,options){options=options||{},this.inited||(this.factory=factory,errback?this.on("error",errback):this.events.error&&(errback=bind(this,function(err){this.emit("error",err)})),this.depMaps=depMaps&&depMaps.slice(0),this.errback=errback,this.inited=!0,this.ignore=options.ignore,options.enabled||this.enabled?this.enable():this.check())},defineDep:function(i,depExports){this.depMatched[i]||(this.depMatched[i]=!0,this.depCount-=1,this.depExports[i]=depExports)},fetch:function(){if(!this.fetched){this.fetched=!0,context.startTime=(new Date).getTime();var map=this.map;return this.shim?(context.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return map.prefix?this.callPlugin():this.load()})),void 0):map.prefix?this.callPlugin():this.load()}},load:function(){var url=this.map.url;urlFetched[url]||(urlFetched[url]=!0,context.load(this.map.id,url))},check:function(){if(this.enabled&&!this.enabling){var err,cjsModule,id=this.map.id,depExports=this.depExports,exports=this.exports,factory=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(factory)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{exports=context.execCb(id,factory,depExports,exports)}catch(e){err=e}else exports=context.execCb(id,factory,depExports,exports);if(this.map.isDefine&&(cjsModule=this.module,cjsModule&&void 0!==cjsModule.exports&&cjsModule.exports!==this.exports?exports=cjsModule.exports:void 0===exports&&this.usingExports&&(exports=this.exports)),err)return err.requireMap=this.map,err.requireModules=this.map.isDefine?[this.map.id]:null,err.requireType=this.map.isDefine?"define":"require",onError(this.error=err)}else exports=factory;this.exports=exports,this.map.isDefine&&!this.ignore&&(defined[id]=exports,req.onResourceLoad&&req.onResourceLoad(context,this.map,this.depMaps)),cleanRegistry(id),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var map=this.map,id=map.id,pluginMap=makeModuleMap(map.prefix);this.depMaps.push(pluginMap),on(pluginMap,"defined",bind(this,function(plugin){var load,normalizedMap,normalizedMod,name=this.map.name,parentName=this.map.parentMap?this.map.parentMap.name:null,localRequire=context.makeRequire(map.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(plugin.normalize&&(name=plugin.normalize(name,function(name){return normalize(name,parentName,!0)})||""),normalizedMap=makeModuleMap(map.prefix+"!"+name,this.map.parentMap),on(normalizedMap,"defined",bind(this,function(value){this.init([],function(){return value},null,{enabled:!0,ignore:!0})})),normalizedMod=getOwn(registry,normalizedMap.id),normalizedMod&&(this.depMaps.push(normalizedMap),this.events.error&&normalizedMod.on("error",bind(this,function(err){this.emit("error",err)})),normalizedMod.enable()),void 0):(load=bind(this,function(value){this.init([],function(){return value},null,{enabled:!0})}),load.error=bind(this,function(err){this.inited=!0,this.error=err,err.requireModules=[id],eachProp(registry,function(mod){0===mod.map.id.indexOf(id+"_unnormalized")&&cleanRegistry(mod.map.id)}),onError(err)}),load.fromText=bind(this,function(text,textAlt){var moduleName=map.name,moduleMap=makeModuleMap(moduleName),hasInteractive=useInteractive;textAlt&&(text=textAlt),hasInteractive&&(useInteractive=!1),getModule(moduleMap),hasProp(config.config,id)&&(config.config[moduleName]=config.config[id]);try{req.exec(text)}catch(e){return onError(makeError("fromtexteval","fromText eval for "+id+" failed: "+e,e,[id]))}hasInteractive&&(useInteractive=!0),this.depMaps.push(moduleMap),context.completeLoad(moduleName),localRequire([moduleName],load)}),plugin.load(map.name,localRequire,load,config),void 0)})),context.enable(pluginMap,this),this.pluginMaps[pluginMap.id]=pluginMap},enable:function(){enabledRegistry[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(depMap,i){var id,mod,handler;if("string"==typeof depMap){if(depMap=makeModuleMap(depMap,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[i]=depMap,handler=getOwn(handlers,depMap.id))return this.depExports[i]=handler(this),void 0;this.depCount+=1,on(depMap,"defined",bind(this,function(depExports){this.defineDep(i,depExports),this.check()})),this.errback&&on(depMap,"error",bind(this,this.errback))}id=depMap.id,mod=registry[id],hasProp(handlers,id)||!mod||mod.enabled||context.enable(depMap,this)})),eachProp(this.pluginMaps,bind(this,function(pluginMap){var mod=getOwn(registry,pluginMap.id);mod&&!mod.enabled&&context.enable(pluginMap,this)})),this.enabling=!1,this.check()},on:function(name,cb){var cbs=this.events[name];cbs||(cbs=this.events[name]=[]),cbs.push(cb)},emit:function(name,evt){each(this.events[name],function(cb){cb(evt)}),"error"===name&&delete this.events[name]}},context={config:config,contextName:contextName,registry:registry,defined:defined,urlFetched:urlFetched,defQueue:defQueue,Module:Module,makeModuleMap:makeModuleMap,nextTick:req.nextTick,onError:onError,configure:function(cfg){cfg.baseUrl&&"/"!==cfg.baseUrl.charAt(cfg.baseUrl.length-1)&&(cfg.baseUrl+="/");var pkgs=config.pkgs,shim=config.shim,objs={paths:!0,config:!0,map:!0};eachProp(cfg,function(value,prop){objs[prop]?"map"===prop?(config.map||(config.map={}),mixin(config[prop],value,!0,!0)):mixin(config[prop],value,!0):config[prop]=value}),cfg.shim&&(eachProp(cfg.shim,function(value,id){isArray(value)&&(value={deps:value}),!value.exports&&!value.init||value.exportsFn||(value.exportsFn=context.makeShimExports(value)),shim[id]=value}),config.shim=shim),cfg.packages&&(each(cfg.packages,function(pkgObj){var location;pkgObj="string"==typeof pkgObj?{name:pkgObj}:pkgObj,location=pkgObj.location,pkgs[pkgObj.name]={name:pkgObj.name,location:location||pkgObj.name,main:(pkgObj.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}}),config.pkgs=pkgs),eachProp(registry,function(mod,id){mod.inited||mod.map.unnormalized||(mod.map=makeModuleMap(id))}),(cfg.deps||cfg.callback)&&context.require(cfg.deps||[],cfg.callback)},makeShimExports:function(value){function fn(){var ret;return value.init&&(ret=value.init.apply(global,arguments)),ret||value.exports&&getGlobal(value.exports)}return fn},makeRequire:function(relMap,options){function localRequire(deps,callback,errback){var id,map,requireMod;return options.enableBuildCallback&&callback&&isFunction(callback)&&(callback.__requireJsBuild=!0),"string"==typeof deps?isFunction(callback)?onError(makeError("requireargs","Invalid require call"),errback):relMap&&hasProp(handlers,deps)?handlers[deps](registry[relMap.id]):req.get?req.get(context,deps,relMap,localRequire):(map=makeModuleMap(deps,relMap,!1,!0),id=map.id,hasProp(defined,id)?defined[id]:onError(makeError("notloaded",'Module name "'+id+'" has not been loaded yet for context: '+contextName+(relMap?"":". Use require([])")))):(intakeDefines(),context.nextTick(function(){intakeDefines(),requireMod=getModule(makeModuleMap(null,relMap)),requireMod.skipMap=options.skipMap,requireMod.init(deps,callback,errback,{enabled:!0}),checkLoaded()}),localRequire)}return options=options||{},mixin(localRequire,{isBrowser:isBrowser,toUrl:function(moduleNamePlusExt){var ext,index=moduleNamePlusExt.lastIndexOf("."),segment=moduleNamePlusExt.split("/")[0],isRelative="."===segment||".."===segment;return-1!==index&&(!isRelative||index>1)&&(ext=moduleNamePlusExt.substring(index,moduleNamePlusExt.length),moduleNamePlusExt=moduleNamePlusExt.substring(0,index)),context.nameToUrl(normalize(moduleNamePlusExt,relMap&&relMap.id,!0),ext,!0)},defined:function(id){return hasProp(defined,makeModuleMap(id,relMap,!1,!0).id)},specified:function(id){return id=makeModuleMap(id,relMap,!1,!0).id,hasProp(defined,id)||hasProp(registry,id)}}),relMap||(localRequire.undef=function(id){takeGlobalQueue();var map=makeModuleMap(id,relMap,!0),mod=getOwn(registry,id);removeScript(id),delete defined[id],delete urlFetched[map.url],delete undefEvents[id],mod&&(mod.events.defined&&(undefEvents[id]=mod.events),cleanRegistry(id))}),localRequire},enable:function(depMap){var mod=getOwn(registry,depMap.id);mod&&getModule(depMap).enable()},completeLoad:function(moduleName){var found,args,mod,shim=getOwn(config.shim,moduleName)||{},shExports=shim.exports;for(takeGlobalQueue();defQueue.length;){if(args=defQueue.shift(),null===args[0]){if(args[0]=moduleName,found)break;found=!0}else args[0]===moduleName&&(found=!0);callGetModule(args)}if(mod=getOwn(registry,moduleName),!found&&!hasProp(defined,moduleName)&&mod&&!mod.inited){if(!(!config.enforceDefine||shExports&&getGlobal(shExports)))return hasPathFallback(moduleName)?void 0:onError(makeError("nodefine","No define call for "+moduleName,null,[moduleName]));callGetModule([moduleName,shim.deps||[],shim.exportsFn])}checkLoaded()},nameToUrl:function(moduleName,ext,skipExt){var paths,pkgs,pkg,pkgPath,syms,i,parentModule,url,parentPath;if(req.jsExtRegExp.test(moduleName))url=moduleName+(ext||"");else{for(paths=config.paths,pkgs=config.pkgs,syms=moduleName.split("/"),i=syms.length;i>0;i-=1){if(parentModule=syms.slice(0,i).join("/"),pkg=getOwn(pkgs,parentModule),parentPath=getOwn(paths,parentModule)){isArray(parentPath)&&(parentPath=parentPath[0]),syms.splice(0,i,parentPath);break}if(pkg){pkgPath=moduleName===pkg.name?pkg.location+"/"+pkg.main:pkg.location,syms.splice(0,i,pkgPath);break}}url=syms.join("/"),url+=ext||(/^data\:|\?/.test(url)||skipExt?"":".js"),url=("/"===url.charAt(0)||url.match(/^[\w\+\.\-]+:/)?"":config.baseUrl)+url}return config.urlArgs?url+((-1===url.indexOf("?")?"?":"&")+config.urlArgs):url},load:function(id,url){req.load(context,id,url)},execCb:function(name,callback,args,exports){return callback.apply(exports,args)},onScriptLoad:function(evt){if("load"===evt.type||readyRegExp.test((evt.currentTarget||evt.srcElement).readyState)){interactiveScript=null;var data=getScriptData(evt);context.completeLoad(data.id)}},onScriptError:function(evt){var data=getScriptData(evt);return hasPathFallback(data.id)?void 0:onError(makeError("scripterror","Script error for: "+data.id,evt,[data.id]))}},context.require=context.makeRequire(),context}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(script){return"interactive"===script.readyState?interactiveScript=script:void 0}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.9",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,apsp=ap.splice,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if("undefined"==typeof define){if("undefined"!=typeof requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}"undefined"==typeof require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(deps,callback,errback,optional){var context,config,contextName=defContextName;return isArray(deps)||"string"==typeof deps||(config=deps,isArray(callback)?(deps=callback,callback=errback,errback=optional):deps=[]),config&&config.context&&(contextName=config.context),context=getOwn(contexts,contextName),context||(context=contexts[contextName]=req.s.newContext(contextName)),config&&context.configure(config),context.require(deps,callback,errback)},req.config=function(config){return req(config)},req.nextTick="undefined"!=typeof setTimeout?function(fn){setTimeout(fn,4)}:function(fn){fn()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(prop){req[prop]=function(){var ctx=contexts[defContextName];return ctx.require[prop].apply(ctx,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(config){var node=config.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return node.type=config.scriptType||"text/javascript",node.charset="utf-8",node.async=!0,node},req.load=function(context,moduleName,url){var node,config=context&&context.config||{};if(isBrowser)return node=req.createNode(config,moduleName,url),node.setAttribute("data-requirecontext",context.contextName),node.setAttribute("data-requiremodule",moduleName),!node.attachEvent||node.attachEvent.toString&&node.attachEvent.toString().indexOf("[native code")<0||isOpera?(node.addEventListener("load",context.onScriptLoad,!1),node.addEventListener("error",context.onScriptError,!1)):(useInteractive=!0,node.attachEvent("onreadystatechange",context.onScriptLoad)),node.src=url,currentlyAddingScript=node,baseElement?head.insertBefore(node,baseElement):head.appendChild(node),currentlyAddingScript=null,node;if(isWebWorker)try{importScripts(url),context.completeLoad(moduleName)}catch(e){context.onError(makeError("importscripts","importScripts failed for "+moduleName+" at "+url,e,[moduleName]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(script){return head||(head=script.parentNode),dataMain=script.getAttribute("data-main"),dataMain?(mainScript=dataMain,cfg.baseUrl||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0):void 0}),define=function(name,deps,callback){var node,context;"string"!=typeof name&&(callback=deps,deps=name,name=null),isArray(deps)||(callback=deps,deps=null),!deps&&isFunction(callback)&&(deps=[],callback.length&&(callback.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(match,dep){deps.push(dep)}),deps=(1===callback.length?["require"]:["require","exports","module"]).concat(deps))),useInteractive&&(node=currentlyAddingScript||getInteractiveScript(),node&&(name||(name=node.getAttribute("data-requiremodule")),context=contexts[node.getAttribute("data-requirecontext")])),(context?context.defQueue:globalDefQueue).push([name,deps,callback])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this),function(e,undefined){function j(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function A(e){var t=D[e]={};return x.each(e.match(w)||[],function(e,n){t[n]=!0}),t}function F(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=x.expando+Math.random()}function P(e,t,n){var r;if(n===undefined&&1===e.nodeType)if(r="data-"+t.replace(O,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:H.test(n)?JSON.parse(n):n}catch(i){}L.set(e,t,n)}else n=undefined;return n}function U(){return!0}function Y(){return!1}function V(){try{return o.activeElement}catch(e){}}function Z(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function et(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(G.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return g.call(t,e)>=0!==n})}function pt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ft(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ht(e){var t=ut.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function dt(e,t){for(var n=e.length,r=0;n>r;r++)q.set(e[r],"globalEval",!t||q.get(t[r],"globalEval"))}function gt(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(q.hasData(e)&&(o=q.access(e),s=q.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)x.event.add(t,i,l[i][n])}L.hasData(e)&&(a=L.access(e),u=x.extend({},a),L.set(t,u))}}function mt(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&x.nodeName(e,t)?x.merge([e],n):n}function yt(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ot.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function At(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Dt.length;i--;)if(t=Dt[i]+n,t in e)return t;return r}function Lt(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function qt(t){return e.getComputedStyle(t,null)}function Ht(e,t){for(var n,r,i,o=[],s=0,a=e.length;a>s;s++)r=e[s],r.style&&(o[s]=q.get(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&Lt(r)&&(o[s]=q.access(r,"olddisplay",Rt(r.nodeName)))):o[s]||(i=Lt(r),(n&&"none"!==n||!i)&&q.set(r,"olddisplay",i?n:x.css(r,"display"))));for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}function Ot(e,t,n){var r=Tt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function Ft(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;4>o;o+=2)"margin"===n&&(s+=x.css(e,n+jt[o],!0,i)),r?("content"===n&&(s-=x.css(e,"padding"+jt[o],!0,i)),"margin"!==n&&(s-=x.css(e,"border"+jt[o]+"Width",!0,i))):(s+=x.css(e,"padding"+jt[o],!0,i),"padding"!==n&&(s+=x.css(e,"border"+jt[o]+"Width",!0,i)));return s}function Pt(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=qt(e),s=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=vt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Ct.test(i))return i;r=s&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+Ft(e,t,n||(s?"border":"content"),r,o)+"px"}function Rt(e){var t=o,n=Nt[e];return n||(n=Mt(e,t),"none"!==n&&n||(xt=(xt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(xt[0].contentWindow||xt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=Mt(e,t),xt.detach()),Nt[e]=n),n}function Mt(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}function _t(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||$t.test(e)?r(e,i):_t(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)_t(e+"["+i+"]",t[i],n,r)}function un(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(x.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function ln(e,t,n,r){function s(a){var u;return i[a]=!0,x.each(e[a]||[],function(e,a){var l=a(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):undefined:(t.dataTypes.unshift(l),s(l),!1)}),u}var i={},o=e===on;return s(t.dataTypes[0])||!i["*"]&&s("*")}function cn(e,t){var n,r,i=x.ajaxSettings.flatOptions||{};for(n in t)t[n]!==undefined&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&x.extend(!0,e,r),e}function pn(e,t,n){for(var r,i,o,s,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),r===undefined&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}return o?(o!==u[0]&&u.unshift(o),n[o]):undefined}function fn(e,t,n,r){var i,o,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(s=l[u+" "+o]||l["* "+o],!s)for(i in l)if(a=i.split(" "),a[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){s===!0?s=l[i]:l[i]!==!0&&(o=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(p){return{state:"parsererror",error:s?p:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}function En(){return setTimeout(function(){xn=undefined}),xn=x.now()}function Sn(e,t,n){for(var r,i=(Nn[t]||[]).concat(Nn["*"]),o=0,s=i.length;s>o;o++)if(r=i[o].call(n,t,e))return r}function jn(e,t,n){var r,i,o=0,s=kn.length,a=x.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=xn||En(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,s=0,u=l.tweens.length;u>s;s++)l.tweens[s].run(o);return a.notifyWith(e,[l,o,n]),1>o&&u?n:(a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:xn||En(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?a.resolveWith(e,[l,t]):a.rejectWith(e,[l,t]),this}}),c=l.props;for(Dn(c,l.opts.specialEasing);s>o;o++)if(r=kn[o].call(l,e,c,l.opts))return r;return x.map(c,Sn,l),x.isFunction(l.opts.start)&&l.opts.start.call(e,l),x.fx.timer(x.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function Dn(e,t){var n,r,i,o,s;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),s=x.cssHooks[r],s&&"expand"in s){o=s.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function An(e,t,n){var r,i,o,s,a,u,l=this,c={},p=e.style,f=e.nodeType&&Lt(e),h=q.get(e,"fxshow");n.queue||(a=x._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,u=a.empty.fire,a.empty.fire=function(){a.unqueued||u()}),a.unqueued++,l.always(function(){l.always(function(){a.unqueued--,x.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(p.display="inline-block")),n.overflow&&(p.overflow="hidden",l.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],wn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show")){if("show"!==i||!h||h[r]===undefined)continue;f=!0}c[r]=h&&h[r]||x.style(e,r)}if(!x.isEmptyObject(c)){h?"hidden"in h&&(f=h.hidden):h=q.access(e,"fxshow",{}),o&&(h.hidden=!f),f?x(e).show():l.done(function(){x(e).hide()
}),l.done(function(){var t;q.remove(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)s=Sn(f?h[r]:0,r,l),r in h||(h[r]=s.start,f&&(s.end=s.start,s.start="width"===r||"height"===r?1:0))}}function Ln(e,t,n,r,i){return new Ln.prototype.init(e,t,n,r,i)}function qn(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=jt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function Hn(e){return x.isWindow(e)?e:9===e.nodeType&&e.defaultView}var t,n,r=typeof undefined,i=e.location,o=e.document,s=o.documentElement,a=e.jQuery,u=e.$,l={},c=[],p="2.0.3",f=c.concat,h=c.push,d=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,x=function(e,n){return new x.fn.init(e,n,t)},b=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^-ms-/,N=/-([\da-z])/gi,E=function(e,t){return t.toUpperCase()},S=function(){o.removeEventListener("DOMContentLoaded",S,!1),e.removeEventListener("load",S,!1),x.ready()};x.fn=x.prototype={jquery:p,constructor:x,init:function(e,t,n){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:T.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),C.test(r[1])&&x.isPlainObject(t))for(r in t)x.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=o.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?n.ready(e):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return d.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},a=2),"object"==typeof s||x.isFunction(s)||(s={}),u===a&&(s=this,--a);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(x.isPlainObject(r)||(i=x.isArray(r)))?(i?(i=!1,o=n&&x.isArray(n)?n:[]):o=n&&x.isPlainObject(n)?n:{},s[t]=x.extend(l,o,r)):r!==undefined&&(s[t]=r));return s},x.extend({expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=a),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){(e===!0?--x.readyWait:x.isReady)||(x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(o,[x]),x.fn.trigger&&x(o).trigger("ready").off("ready")))},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if("object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:JSON.parse,parseXML:function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&x.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){var t,n=eval;e=x.trim(e),e&&(1===e.indexOf("use strict")?(t=o.createElement("script"),t.text=e,o.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(k,"ms-").replace(N,E)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,s=j(e);if(n){if(s)for(;o>i&&(r=t.apply(e[i],n),r!==!1);i++);else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(s)for(;o>i&&(r=t.call(e[i],i,e[i]),r!==!1);i++);else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:function(e){return null==e?"":v.call(e)},makeArray:function(e,t){var n=t||[];return null!=e&&(j(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:g.call(t,e,n)},merge:function(e,t){var n=t.length,r=e.length,i=0;if("number"==typeof n)for(;n>i;i++)e[r++]=t[i];else for(;t[i]!==undefined;)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){var r,i=[],o=0,s=e.length;for(n=!!n;s>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,s=j(e),a=[];if(s)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(a[a.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(a[a.length]=r);return f.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),x.isFunction(e)?(r=d.call(arguments,2),i=function(){return e.apply(t||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):undefined},access:function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===x.type(n)){i=!0;for(a in n)x.access(e,t,a,n[a],!0,o,s)}else if(r!==undefined&&(i=!0,x.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(x(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},now:Date.now,swap:function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i}}),x.ready.promise=function(t){return n||(n=x.Deferred(),"complete"===o.readyState?setTimeout(x.ready):(o.addEventListener("DOMContentLoaded",S,!1),e.addEventListener("load",S,!1))),n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()}),t=x(o),function(e,undefined){function ot(e,t,r,i){var o,s,a,u,l,f,g,m,x,w;if((t?t.ownerDocument||t:b)!==p&&c(t),t=t||p,r=r||[],!e||"string"!=typeof e)return r;if(1!==(u=t.nodeType)&&9!==u)return[];if(h&&!i){if(o=K.exec(e))if(a=o[1]){if(9===u){if(s=t.getElementById(a),!s||!s.parentNode)return r;if(s.id===a)return r.push(s),r}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(a))&&y(t,s)&&s.id===a)return r.push(s),r}else{if(o[2])return O.apply(r,t.getElementsByTagName(e)),r;if((a=o[3])&&n.getElementsByClassName&&t.getElementsByClassName)return O.apply(r,t.getElementsByClassName(a)),r}if(n.qsa&&(!d||!d.test(e))){if(m=g=v,x=t,w=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(f=gt(e),(g=t.getAttribute("id"))?m=g.replace(tt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",l=f.length;l--;)f[l]=m+mt(f[l]);x=U.test(e)&&t.parentNode||t,w=f.join(",")}if(w)try{return O.apply(r,x.querySelectorAll(w)),r}catch(T){}finally{g||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,r,i)}function st(){function t(n,r){return e.push(n+=" ")>i.cacheLength&&delete t[e.shift()],t[n]=r}var e=[];return t}function at(e){return e[v]=!0,e}function ut(e){var t=p.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function lt(e,t){for(var n=e.split("|"),r=e.length;r--;)i.attrHandle[n[r]]=t}function ct(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return at(function(t){return t=+t,at(function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function dt(){}function gt(e,t){var n,r,o,s,a,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);for(a=e,u=[],l=i.preFilter;a;){(!n||(r=_.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=X.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(z," ")}),a=a.slice(n.length));for(s in i.filter)!(r=J[s].exec(a))||l[s]&&!(r=l[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ot.error(e):k(e,u).slice(0)}function mt(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function yt(e,t,n){var i=t.dir,o=n&&"parentNode"===i,s=T++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,a){var u,l,c,p=w+" "+s;if(a){for(;t=t[i];)if((1===t.nodeType||o)&&e(t,n,a))return!0}else for(;t=t[i];)if(1===t.nodeType||o)if(c=t[v]||(t[v]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,a)||r,l[1]===!0)return!0}}function vt(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){for(var o,s=[],a=0,u=e.length,l=null!=t;u>a;a++)(o=e[a])&&(!n||n(o,r,i))&&(s.push(o),l&&t.push(a));return s}function bt(e,t,n,r,i,o){return r&&!r[v]&&(r=bt(r)),i&&!i[v]&&(i=bt(i,o)),at(function(o,s,a,u){var l,c,p,f=[],h=[],d=s.length,g=o||Ct(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:xt(g,f,e,a,u),y=n?i||(o?e:d||r)?[]:s:m;if(n&&n(m,y,a,u),r)for(l=xt(y,h),r(l,[],a,u),c=l.length;c--;)(p=l[c])&&(y[h[c]]=!(m[h[c]]=p));if(o){if(i||e){if(i){for(l=[],c=y.length;c--;)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}for(c=y.length;c--;)(p=y[c])&&(l=i?P.call(o,p):f[c])>-1&&(o[l]=!(s[l]=p))}}else y=xt(y===s?y.splice(d,y.length):y),i?i(null,s,y,u):O.apply(s,y)})}function wt(e){for(var t,n,r,o=e.length,s=i.relative[e[0].type],a=s||i.relative[" "],l=s?1:0,c=yt(function(e){return e===t},a,!0),p=yt(function(e){return P.call(t,e)>-1},a,!0),f=[function(e,n,r){return!s&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];o>l;l++)if(n=i.relative[e[l].type])f=[yt(vt(f),n)];else{if(n=i.filter[e[l].type].apply(null,e[l].matches),n[v]){for(r=++l;o>r&&!i.relative[e[r].type];r++);return bt(l>1&&vt(f),l>1&&mt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&wt(e.slice(l,r)),o>r&&wt(e=e.slice(r)),o>r&&mt(e))}f.push(n)}return vt(f)}function Tt(e,t){var n=0,o=t.length>0,s=e.length>0,a=function(a,l,c,f,h){var d,g,m,y=[],v=0,x="0",b=a&&[],T=null!=h,C=u,k=a||s&&i.find.TAG("*",h&&l.parentNode||l),N=w+=null==C?1:Math.random()||.1;for(T&&(u=l!==p&&l,r=n);null!=(d=k[x]);x++){if(s&&d){for(g=0;m=e[g++];)if(m(d,l,c)){f.push(d);break}T&&(w=N,r=++n)}o&&((d=!m&&d)&&v--,a&&b.push(d))}if(v+=x,o&&x!==v){for(g=0;m=t[g++];)m(b,y,l,c);if(a){if(v>0)for(;x--;)b[x]||y[x]||(y[x]=q.call(f));y=xt(y)}O.apply(f,y),T&&!a&&y.length>0&&v+t.length>1&&ot.uniqueSort(f)}return T&&(w=N,u=C),b};return o?at(a):a}function Ct(e,t,n){for(var r=0,i=t.length;i>r;r++)ot(e,t[r],n);return n}function kt(e,t,r,o){var s,u,l,c,p,f=gt(e);if(!o&&1===f.length){if(u=f[0]=f[0].slice(0),u.length>2&&"ID"===(l=u[0]).type&&n.getById&&9===t.nodeType&&h&&i.relative[u[1].type]){if(t=(i.find.ID(l.matches[0].replace(nt,rt),t)||[])[0],!t)return r;e=e.slice(u.shift().value.length)}for(s=J.needsContext.test(e)?0:u.length;s--&&(l=u[s],!i.relative[c=l.type]);)if((p=i.find[c])&&(o=p(l.matches[0].replace(nt,rt),U.test(u[0].type)&&t.parentNode||t))){if(u.splice(s,1),e=o.length&&mt(u),!e)return O.apply(r,o),r;break}}return a(e,f)(o,t,!h,r,U.test(e)),r}var t,n,r,i,o,s,a,u,l,c,p,f,h,d,g,m,y,v="sizzle"+-new Date,b=e.document,w=0,T=0,C=st(),k=st(),N=st(),E=!1,S=function(e,t){return e===t?(E=!0,0):0},j=typeof undefined,D=1<<31,A={}.hasOwnProperty,L=[],q=L.pop,H=L.push,O=L.push,F=L.slice,P=L.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",$=W.replace("w","w#"),B="\\["+M+"*("+W+")"+M+"*(?:([*^$|!~]?=)"+M+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+$+")|)|)"+M+"*\\]",I=":("+W+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+B.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=RegExp("^"+M+"*,"+M+"*"),X=RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=RegExp(M+"*[+~]"),Y=RegExp("="+M+"*([^\\]'\"]*)"+M+"*\\]","g"),V=RegExp(I),G=RegExp("^"+$+"$"),J={ID:RegExp("^#("+W+")"),CLASS:RegExp("^\\.("+W+")"),TAG:RegExp("^("+W.replace("w","w*")+")"),ATTR:RegExp("^"+B),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:RegExp("^(?:"+R+")$","i"),needsContext:RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Q=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/^(?:input|select|textarea|button)$/i,et=/^h\d$/i,tt=/'|\\/g,nt=RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),rt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{O.apply(L=F.call(b.childNodes),b.childNodes),L[b.childNodes.length].nodeType}catch(it){O={apply:L.length?function(e,t){H.apply(e,F.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}s=ot.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},n=ot.support={},c=ot.setDocument=function(e){var t=e?e.ownerDocument||e:b,r=t.defaultView;return t!==p&&9===t.nodeType&&t.documentElement?(p=t,f=t.documentElement,h=!s(t),r&&r.attachEvent&&r!==r.top&&r.attachEvent("onbeforeunload",function(){c()}),n.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ut(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),n.getById=ut(function(e){return f.appendChild(e).id=v,!t.getElementsByName||!t.getElementsByName(v).length}),n.getById?(i.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){return e.getAttribute("id")===t}}):(delete i.find.ID,i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=n.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==j?t.getElementsByTagName(e):undefined}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},i.find.CLASS=n.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==j&&h?t.getElementsByClassName(e):undefined},g=[],d=[],(n.qsa=Q.test(t.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll(":checked").length||d.push(":checked")}),ut(function(e){var n=t.createElement("input");n.setAttribute("type","hidden"),e.appendChild(n).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&d.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||d.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),d.push(",.*:")})),(n.matchesSelector=Q.test(m=f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ut(function(e){n.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",I)}),d=d.length&&RegExp(d.join("|")),g=g.length&&RegExp(g.join("|")),y=Q.test(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},S=f.compareDocumentPosition?function(e,r){if(e===r)return E=!0,0;var i=r.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(r);return i?1&i||!n.sortDetached&&r.compareDocumentPosition(e)===i?e===t||y(b,e)?-1:r===t||y(b,r)?1:l?P.call(l,e)-P.call(l,r):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,n){var r,i=0,o=e.parentNode,s=n.parentNode,a=[e],u=[n];if(e===n)return E=!0,0;if(!o||!s)return e===t?-1:n===t?1:o?-1:s?1:l?P.call(l,e)-P.call(l,n):0;if(o===s)return ct(e,n);for(r=e;r=r.parentNode;)a.unshift(r);for(r=n;r=r.parentNode;)u.unshift(r);for(;a[i]===u[i];)i++;return i?ct(a[i],u[i]):a[i]===b?-1:u[i]===b?1:0},t):p},ot.matches=function(e,t){return ot(e,null,null,t)},ot.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Y,"='$1']"),!(!n.matchesSelector||!h||g&&g.test(t)||d&&d.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return ot(t,p,null,[e]).length>0},ot.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},ot.attr=function(e,t){(e.ownerDocument||e)!==p&&c(e);var r=i.attrHandle[t.toLowerCase()],o=r&&A.call(i.attrHandle,t.toLowerCase())?r(e,t,!h):undefined;return o===undefined?n.attributes||!h?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null:o},ot.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},ot.uniqueSort=function(e){var t,r=[],i=0,o=0;if(E=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(S),E){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return e},o=ot.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=ot.selectors={cacheLength:50,createPseudo:at,match:J,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(nt,rt),e[3]=(e[4]||e[5]||"").replace(nt,rt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ot.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ot.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return J.CHILD.test(e[0])?null:(e[3]&&e[4]!==undefined?e[2]=e[4]:n&&V.test(n)&&(t=gt(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(nt,rt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&C(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ot.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,h,d,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,y=a&&t.nodeName.toLowerCase(),x=!u&&!a;if(m){if(o){for(;g;){for(p=t;p=p[g];)if(a?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[s?m.firstChild:m.lastChild],s&&x){for(c=m[v]||(m[v]={}),l=c[e]||[],h=l[0]===w&&l[1],f=l[0]===w&&l[2],p=h&&m.childNodes[h];p=++h&&p&&p[g]||(f=h=0)||d.pop();)if(1===p.nodeType&&++f&&p===t){c[e]=[w,h,f];break}}else if(x&&(l=(t[v]||(t[v]={}))[e])&&l[0]===w)f=l[1];else for(;(p=++h&&p&&p[g]||(f=h=0)||d.pop())&&((a?p.nodeName.toLowerCase()!==y:1!==p.nodeType)||!++f||(x&&((p[v]||(p[v]={}))[e]=[w,f]),p!==t)););return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||ot.error("unsupported pseudo: "+e);return r[v]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?at(function(e,n){for(var i,o=r(e,t),s=o.length;s--;)i=P.call(e,o[s]),e[i]=!(n[i]=o[s])}):function(e){return r(e,0,n)}):r}},pseudos:{not:at(function(e){var t=[],n=[],r=a(e.replace(z,"$1"));return r[v]?at(function(e,t,n,i){for(var o,s=r(e,null,i,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:at(function(e){return function(t){return ot(e,t).length>0}}),contains:at(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:at(function(e){return G.test(e||"")||ot.error("unsupported lang: "+e),e=e.replace(nt,rt).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return et.test(e.nodeName)},input:function(e){return Z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){for(var r=0>n?n+t:n;t>++r;)e.push(r);return e})}},i.pseudos.nth=i.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=pt(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=ft(t);dt.prototype=i.filters=i.pseudos,i.setFilters=new dt,a=ot.compile=function(e,t){var n,r=[],i=[],o=N[e+" "];if(!o){for(t||(t=gt(e)),n=t.length;n--;)o=wt(t[n]),o[v]?r.push(o):i.push(o);o=N(e,Tt(i,r))}return o},n.sortStable=v.split("").sort(S).join("")===v,n.detectDuplicates=E,c(),n.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(p.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||lt("type|href|height|width",function(e,t,n){return n?undefined:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||lt("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?undefined:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||lt(R,function(e,t,n){var r;return n?undefined:(r=e.getAttributeNode(t))&&r.specified?r.value:e[t]===!0?t.toLowerCase():null}),x.find=ot,x.expr=ot.selectors,x.expr[":"]=x.expr.pseudos,x.unique=ot.uniqueSort,x.text=ot.getText,x.isXMLDoc=ot.isXML,x.contains=ot.contains}(e);var D={};x.Callbacks=function(e){e="string"==typeof e?D[e]||A(e):x.extend({},e);var t,n,r,i,o,s,a=[],u=!e.once&&[],l=function(p){for(t=e.memory&&p,n=!0,s=i||0,i=0,o=a.length,r=!0;a&&o>s;s++)if(a[s].apply(p[0],p[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,a&&(u?u.length&&l(u.shift()):t?a=[]:c.disable())},c={add:function(){if(a){var n=a.length;!function s(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&s(n)})}(arguments),r?o=a.length:t&&(i=n,l(t))}return this},remove:function(){return a&&x.each(arguments,function(e,t){for(var n;(n=x.inArray(t,a,n))>-1;)a.splice(n,1),r&&(o>=n&&o--,s>=n&&s--)}),this},has:function(e){return e?x.inArray(e,a)>-1:!(!a||!a.length)},empty:function(){return a=[],o=0,this},disable:function(){return a=u=t=undefined,this},disabled:function(){return!a},lock:function(){return u=undefined,t||c.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!a||n&&!u||(t=t||[],t=[e,t.slice?t.slice():t],r?u.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var s=o[0],a=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var a,u,l,t=0,n=d.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),s=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===a?o.notifyWith(t,n):--i||o.resolveWith(t,n)}};if(r>1)for(a=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(s(t,l,n)).fail(o.reject).progress(s(t,u,a)):--i;return i||o.resolveWith(l,n),o.promise()}}),x.support=function(t){var n=o.createElement("input"),r=o.createDocumentFragment(),i=o.createElement("div"),s=o.createElement("select"),a=s.appendChild(o.createElement("option"));return n.type?(n.type="checkbox",t.checkOn=""!==n.value,t.optSelected=a.selected,t.reliableMarginRight=!0,t.boxSizingReliable=!0,t.pixelPosition=!1,n.checked=!0,t.noCloneChecked=n.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!a.disabled,n=o.createElement("input"),n.value="t",n.type="radio",t.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),r.appendChild(n),t.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,t.focusinBubbles="onfocusin"in e,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===i.style.backgroundClip,x(function(){var n,r,s="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",a=o.getElementsByTagName("body")[0];a&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(i),i.innerHTML="",i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",x.swap(a,null!=a.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===i.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(i,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(i,null)||{width:"4px"}).width,r=i.appendChild(o.createElement("div")),r.style.cssText=i.style.cssText=s,r.style.marginRight=r.style.width="0",i.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),a.removeChild(n))}),t):t}({});var L,q,H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,O=/([A-Z])/g;F.uid=1,F.accepts=function(e){return e.nodeType?1===e.nodeType||9===e.nodeType:!0},F.prototype={key:function(e){if(!F.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=F.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,x.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),o=this.cache[i];if("string"==typeof t)o[t]=n;else if(x.isEmptyObject(o))x.extend(this.cache[i],t);else for(r in t)o[r]=t[r];return o},get:function(e,t){var n=this.cache[this.key(e)];return t===undefined?n:n[t]},access:function(e,t,n){var r;return t===undefined||t&&"string"==typeof t&&n===undefined?(r=this.get(e,t),r!==undefined?r:this.get(e,x.camelCase(t))):(this.set(e,t,n),n!==undefined?n:t)},remove:function(e,t){var n,r,i,o=this.key(e),s=this.cache[o];if(t===undefined)this.cache[o]={};else{x.isArray(t)?r=t.concat(t.map(x.camelCase)):(i=x.camelCase(t),t in s?r=[t,i]:(r=i,r=r in s?[r]:r.match(w)||[])),n=r.length;for(;n--;)delete s[r[n]]}},hasData:function(e){return!x.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}},L=new F,q=new F,x.extend({acceptData:F.accepts,hasData:function(e){return L.hasData(e)||q.hasData(e)},data:function(e,t,n){return L.access(e,t,n)},removeData:function(e,t){L.remove(e,t)},_data:function(e,t,n){return q.access(e,t,n)},_removeData:function(e,t){q.remove(e,t)}}),x.fn.extend({data:function(e,t){var n,r,i=this[0],o=0,s=null;if(e===undefined){if(this.length&&(s=L.get(i),1===i.nodeType&&!q.get(i,"hasDataAttrs"))){for(n=i.attributes;n.length>o;o++)r=n[o].name,0===r.indexOf("data-")&&(r=x.camelCase(r.slice(5)),P(i,r,s[r]));q.set(i,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each(function(){L.set(this,e)}):x.access(this,function(t){var n,r=x.camelCase(e);if(i&&t===undefined){if(n=L.get(i,e),n!==undefined)return n;if(n=L.get(i,r),n!==undefined)return n;if(n=P(i,r,undefined),n!==undefined)return n}else this.each(function(){var n=L.get(this,r);L.set(this,r,t),-1!==e.indexOf("-")&&n!==undefined&&L.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){L.remove(this,e)})}}),x.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=q.get(e,t),n&&(!r||x.isArray(n)?r=q.access(e,t,x.makeArray(n)):r.push(n)),r||[]):undefined},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),s=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return q.get(e,n)||q.access(e,n,{empty:x.Callbacks("once memory").add(function(){q.remove(e,[t+"queue",n])
})})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),n>arguments.length?x.queue(this[0],e):t===undefined?this:this.each(function(){var n=x.queue(this,e,t);x._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=x.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=undefined),e=e||"fx";s--;)n=q.get(o[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var R,M,W=/[\t\r\n\f]/g,$=/\r/g,B=/^(?:input|select|textarea|button)$/i;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[x.propFix[e]||e]})},addClass:function(e){var t,n,r,i,o,s=0,a=this.length,u="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):" ")){for(o=0;i=t[o++];)0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,s=0,a=this.length,u=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):"")){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,i=0,o=x(this),s=e.match(w)||[];t=s[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else(n===r||"boolean"===n)&&(this.className&&q.set(this,"__className__",this.className),this.className=this.className||e===!1?"":q.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(W," ").indexOf(t)>=0)return!0;return!1},val:function(e){var t,n,r,i=this[0];return arguments.length?(r=x.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,x(this).val()):e,null==i?i="":"number"==typeof i?i+="":x.isArray(i)&&(i=x.map(i,function(e){return null==e?"":e+""})),t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&t.set(this,i,"value")!==undefined||(this.value=i))})):i?(t=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,"string"==typeof n?n.replace($,""):null==n?"":n)):void 0}}),x.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;a>u;u++)if(n=r[u],!(!n.selected&&u!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=x.makeArray(t),s=i.length;s--;)r=i[s],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,t,n){var i,o,s=e.nodeType;return e&&3!==s&&8!==s&&2!==s?typeof e.getAttribute===r?x.prop(e,t,n):(1===s&&x.isXMLDoc(e)||(t=t.toLowerCase(),i=x.attrHooks[t]||(x.expr.match.bool.test(t)?M:R)),n===undefined?i&&"get"in i&&null!==(o=i.get(e,t))?o:(o=x.find.attr(e,t),null==o?undefined:o):null!==n?i&&"set"in i&&(o=i.set(e,n,t))!==undefined?o:(e.setAttribute(t,n+""),n):(x.removeAttr(e,t),undefined)):void 0},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)for(;n=o[i++];)r=x.propFix[n]||n,x.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,s=e.nodeType;return e&&3!==s&&8!==s&&2!==s?(o=1!==s||!x.isXMLDoc(e),o&&(t=x.propFix[t]||t,i=x.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]):void 0},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||B.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),M={set:function(e,t,n){return t===!1?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,t){var n=x.expr.attrHandle[t]||x.find.attr;x.expr.attrHandle[t]=function(e,t,r){var i=x.expr.attrHandle[t],o=r?undefined:(x.expr.attrHandle[t]=undefined)!=n(e,t,r)?t.toLowerCase():null;return x.expr.attrHandle[t]=i,o}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,t){return x.isArray(t)?e.checked=x.inArray(x(e).val(),t)>=0:undefined}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var I=/^key/,z=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,X=/^([^.]*)(?:\.(.+)|)$/;x.event={global:{},add:function(e,t,n,i,o){var s,a,u,l,c,p,f,h,d,g,m,y=q.get(e);if(y){for(n.handler&&(s=n,n=s.handler,o=s.selector),n.guid||(n.guid=x.guid++),(l=y.events)||(l=y.events={}),(a=y.handle)||(a=y.handle=function(e){return typeof x===r||e&&x.event.triggered===e.type?undefined:x.event.dispatch.apply(a.elem,arguments)},a.elem=e),t=(t||"").match(w)||[""],c=t.length;c--;)u=X.exec(t[c])||[],d=m=u[1],g=(u[2]||"").split(".").sort(),d&&(f=x.event.special[d]||{},d=(o?f.delegateType:f.bindType)||d,f=x.event.special[d]||{},p=x.extend({type:d,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&x.expr.match.needsContext.test(o),namespace:g.join(".")},s),(h=l[d])||(h=l[d]=[],h.delegateCount=0,f.setup&&f.setup.call(e,i,g,a)!==!1||e.addEventListener&&e.addEventListener(d,a,!1)),f.add&&(f.add.call(e,p),p.handler.guid||(p.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,p):h.push(p),x.event.global[d]=!0);e=null}},remove:function(e,t,n,r,i){var o,s,a,u,l,c,p,f,h,d,g,m=q.hasData(e)&&q.get(e);if(m&&(u=m.events)){for(t=(t||"").match(w)||[""],l=t.length;l--;)if(a=X.exec(t[l])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h){for(p=x.event.special[h]||{},h=(r?p.delegateType:p.bindType)||h,f=u[h]||[],a=a[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=f.length;o--;)c=f[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,p.remove&&p.remove.call(e,c));s&&!f.length&&(p.teardown&&p.teardown.call(e,d,m.handle)!==!1||x.removeEvent(e,h,m.handle),delete u[h])}else for(h in u)x.event.remove(e,h+t[l],n,r,!0);x.isEmptyObject(u)&&(delete m.handle,q.remove(e,"events"))}},trigger:function(t,n,r,i){var s,a,u,l,c,p,f,h=[r||o],d=y.call(t,"type")?t.type:t,g=y.call(t,"namespace")?t.namespace.split("."):[];if(a=u=r=r||o,3!==r.nodeType&&8!==r.nodeType&&!_.test(d+x.event.triggered)&&(d.indexOf(".")>=0&&(g=d.split("."),d=g.shift(),g.sort()),c=0>d.indexOf(":")&&"on"+d,t=t[x.expando]?t:new x.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=g.join("."),t.namespace_re=t.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=r),n=null==n?[t]:x.makeArray(n,[t]),f=x.event.special[d]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!x.isWindow(r)){for(l=f.delegateType||d,_.test(l+d)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(r.ownerDocument||o)&&h.push(u.defaultView||u.parentWindow||e)}for(s=0;(a=h[s++])&&!t.isPropagationStopped();)t.type=s>1?l:f.bindType||d,p=(q.get(a,"events")||{})[t.type]&&q.get(a,"handle"),p&&p.apply(a,n),p=c&&a[c],p&&x.acceptData(a)&&p.apply&&p.apply(a,n)===!1&&t.preventDefault();return t.type=d,i||t.isDefaultPrevented()||f._default&&f._default.apply(h.pop(),n)!==!1||!x.acceptData(r)||c&&x.isFunction(r[d])&&!x.isWindow(r)&&(u=r[c],u&&(r[c]=null),x.event.triggered=d,r[d](),x.event.triggered=undefined,u&&(r[c]=u)),t.result}},dispatch:function(e){e=x.event.fix(e);var t,n,r,i,o,s=[],a=d.call(arguments),u=(q.get(this,"events")||{})[e.type]||[],l=x.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(s=x.event.handlers.call(this,e,u),t=0;(i=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((x.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a),r!==undefined&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)o=t[n],i=o.selector+" ",r[i]===undefined&&(r[i]=o.needsContext?x(i,this).index(u)>=0:x.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return t.length>a&&s.push({elem:this,handlers:t.slice(a)}),s},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(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||o,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||s===undefined||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,s=e,a=this.fixHooks[i];for(a||(this.fixHooks[i]=a=z.test(i)?this.mouseHooks:I.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new x.Event(s),t=r.length;t--;)n=r[t],e[n]=s[n];return e.target||(e.target=o),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,s):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==V()&&this.focus?(this.focus(),!1):undefined},delegateType:"focusin"},blur:{trigger:function(){return this===V()&&this.blur?(this.blur(),!1):undefined},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&x.nodeName(this,"input")?(this.click(),!1):undefined},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},x.Event=function(e,t){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.getPreventDefault&&e.getPreventDefault()?U:Y):this.type=e,t&&x.extend(this,t),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,undefined):new x.Event(e,t)},x.Event.prototype={isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=U,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=U,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=U,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,t,n,r,i){var o,s;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=undefined);for(s in e)this.on(s,t,n,e[s],i);return this}if(null==n&&null==r?(r=t,n=t=undefined):null==r&&("string"==typeof t?(r=n,n=undefined):(r=n,n=t,t=undefined)),r===!1)r=Y;else if(!r)return this;return 1===i&&(o=r,r=function(e){return x().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=x.guid++)),this.each(function(){x.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,x(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=undefined),n===!1&&(n=Y),this.each(function(){x.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?x.event.trigger(e,t,n,!0):undefined}});var G=/^.[^:#\[\.,]*$/,J=/^(?:parents|prev(?:Until|All))/,Q=x.expr.match.needsContext,K={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t=x(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(x.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(et(this,e||[],!0))},filter:function(e){return this.pushStack(et(this,e||[],!1))},is:function(e){return!!et(this,"string"==typeof e&&Q.test(e)?x(e):e||[],!1).length},closest:function(e,t){for(var n,r=0,i=this.length,o=[],s=Q.test(e)||"string"!=typeof e?x(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(s?s.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?g.call(x(e),this[0]):g.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return Z(e,"nextSibling")},prev:function(e){return Z(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return e.contentDocument||x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(K[e]||x.unique(i),J.test(e)&&i.reverse()),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,t,n){for(var r=[],i=n!==undefined;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&x(e).is(n))break;r.push(e)}return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,nt=/<([\w:]+)/,rt=/<|&#?\w+;/,it=/<(?:script|style|link)/i,ot=/^(?:checkbox|radio)$/i,st=/checked\s*(?:[^=]|=\s*.checked.)/i,at=/^$|\/(?:java|ecma)script/i,ut=/^true\/(.*)/,lt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ct={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,"",""]};ct.optgroup=ct.option,ct.tbody=ct.tfoot=ct.colgroup=ct.caption=ct.thead,ct.th=ct.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===undefined?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=e?x.filter(e,this):this,i=0;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(mt(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&dt(mt(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(mt(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!it.test(e)&&!ct[(nt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(tt,"<$1></$2>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(x.cleanData(mt(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=f.apply([],e);var r,i,o,s,a,u,l=0,c=this.length,p=this,h=c-1,d=e[0],g=x.isFunction(d);if(g||!(1>=c||"string"!=typeof d||x.support.checkClone)&&st.test(d))return this.each(function(r){var i=p.eq(r);g&&(e[0]=d.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(r=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),i=r.firstChild,1===r.childNodes.length&&(r=i),i)){for(o=x.map(mt(r,"script"),ft),s=o.length;c>l;l++)a=r,l!==h&&(a=x.clone(a,!0,!0),s&&x.merge(o,mt(a,"script"))),t.call(this[l],a,l);if(s)for(u=o[o.length-1].ownerDocument,x.map(o,ht),l=0;s>l;l++)a=o[l],at.test(a.type||"")&&!q.access(a,"globalEval")&&x.contains(u,a)&&(a.src?x._evalUrl(a.src):x.globalEval(a.textContent.replace(lt,"")))}return this}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){for(var n,r=[],i=x(e),o=i.length-1,s=0;o>=s;s++)n=s===o?this:this.clone(!0),x(i[s])[t](n),h.apply(r,n.get());return this.pushStack(r)}}),x.extend({clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=x.contains(e.ownerDocument,e);if(!(x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(s=mt(a),o=mt(e),r=0,i=o.length;i>r;r++)yt(o[r],s[r]);if(t)if(n)for(o=o||mt(e),s=s||mt(a),r=0,i=o.length;i>r;r++)gt(o[r],s[r]);else gt(e,a);return s=mt(a,"script"),s.length>0&&dt(s,!u&&mt(e,"script")),a},buildFragment:function(e,t,n,r){for(var i,o,s,a,u,l,c=0,p=e.length,f=t.createDocumentFragment(),h=[];p>c;c++)if(i=e[c],i||0===i)if("object"===x.type(i))x.merge(h,i.nodeType?[i]:i);else if(rt.test(i)){for(o=o||f.appendChild(t.createElement("div")),s=(nt.exec(i)||["",""])[1].toLowerCase(),a=ct[s]||ct._default,o.innerHTML=a[1]+i.replace(tt,"<$1></$2>")+a[2],l=a[0];l--;)o=o.lastChild;x.merge(h,o.childNodes),o=f.firstChild,o.textContent=""}else h.push(t.createTextNode(i));for(f.textContent="",c=0;i=h[c++];)if((!r||-1===x.inArray(i,r))&&(u=x.contains(i.ownerDocument,i),o=mt(f.appendChild(i),"script"),u&&dt(o),n))for(l=0;i=o[l++];)at.test(i.type||"")&&n.push(i);return f},cleanData:function(e){for(var t,n,r,i,o,s,a=x.event.special,u=0;(n=e[u])!==undefined;u++){if(F.accepts(n)&&(o=n[q.expando],o&&(t=q.cache[o]))){if(r=Object.keys(t.events||{}),r.length)for(s=0;(i=r[s])!==undefined;s++)a[i]?x.event.remove(n,i):x.removeEvent(n,i,t.handle);q.cache[o]&&delete q.cache[o]}delete L.cache[n[L.expando]]}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){var t;return x.isFunction(e)?this.each(function(t){x(this).wrapAll(e.call(this,t))}):(this[0]&&(t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var vt,xt,bt=/^(none|table(?!-c[ea]).+)/,wt=/^margin/,Tt=RegExp("^("+b+")(.*)$","i"),Ct=RegExp("^("+b+")(?!px)[a-z%]+$","i"),kt=RegExp("^([+-])=("+b+")","i"),Nt={BODY:"block"},Et={position:"absolute",visibility:"hidden",display:"block"},St={letterSpacing:0,fontWeight:400},jt=["Top","Right","Bottom","Left"],Dt=["Webkit","O","Moz","ms"];x.fn.extend({css:function(e,t){return x.access(this,function(e,t,n){var r,i,o={},s=0;if(x.isArray(t)){for(r=qt(e),i=t.length;i>s;s++)o[t[s]]=x.css(e,t[s],!1,r);return o}return n!==undefined?x.style(e,t,n):x.css(e,t)},e,t,arguments.length>1)},show:function(){return Ht(this,!0)},hide:function(){return Ht(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Lt(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=vt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=x.camelCase(t),u=e.style;return t=x.cssProps[a]||(x.cssProps[a]=At(u,a)),s=x.cssHooks[t]||x.cssHooks[a],n===undefined?s&&"get"in s&&(i=s.get(e,!1,r))!==undefined?i:u[t]:(o=typeof n,"string"===o&&(i=kt.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(x.css(e,t)),o="number"),null==n||"number"===o&&isNaN(n)||("number"!==o||x.cssNumber[a]||(n+="px"),x.support.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&(n=s.set(e,n,r))===undefined||(u[t]=n)),undefined)}},css:function(e,t,n,r){var i,o,s,a=x.camelCase(t);return t=x.cssProps[a]||(x.cssProps[a]=At(e.style,a)),s=x.cssHooks[t]||x.cssHooks[a],s&&"get"in s&&(i=s.get(e,!0,n)),i===undefined&&(i=vt(e,t,r)),"normal"===i&&t in St&&(i=St[t]),""===n||n?(o=parseFloat(i),n===!0||x.isNumeric(o)?o||0:i):i}}),vt=function(e,t,n){var r,i,o,s=n||qt(e),a=s?s.getPropertyValue(t)||s[t]:undefined,u=e.style;return s&&(""!==a||x.contains(e.ownerDocument,e)||(a=x.style(e,t)),Ct.test(a)&&wt.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=s.width,u.width=r,u.minWidth=i,u.maxWidth=o)),a},x.each(["height","width"],function(e,t){x.cssHooks[t]={get:function(e,n,r){return n?0===e.offsetWidth&&bt.test(x.css(e,"display"))?x.swap(e,Et,function(){return Pt(e,t,r)}):Pt(e,t,r):undefined},set:function(e,n,r){var i=r&&qt(e);return Ot(e,n,r?Ft(e,t,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,t){return t?x.swap(e,{display:"inline-block"},vt,[e,"marginRight"]):undefined}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,t){x.cssHooks[t]={get:function(e,n){return n?(n=vt(e,t),Ct.test(n)?x(e).position()[t]+"px":n):undefined}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+jt[r]+t]=o[r]||o[r-2]||o[0];return i}},wt.test(e)||(x.cssHooks[e+t].set=Ot)});var Wt=/%20/g,$t=/\[\]$/,Bt=/\r?\n/g,It=/^(?:submit|button|image|reset|file)$/i,zt=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&zt.test(this.nodeName)&&!It.test(e)&&(this.checked||!ot.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(Bt,"\r\n")}}):{name:t.name,value:n.replace(Bt,"\r\n")}}).get()}}),x.param=function(e,t){var n,r=[],i=function(e,t){t=x.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(t===undefined&&(t=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){i(this.name,this.value)});else for(n in e)_t(n,e[n],t,i);return r.join("&").replace(Wt,"+")},x.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(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var Xt,Ut,Yt=x.now(),Vt=/\?/,Gt=/#.*$/,Jt=/([?&])_=[^&]*/,Qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Kt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Zt=/^(?:GET|HEAD)$/,en=/^\/\//,tn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,nn=x.fn.load,rn={},on={},sn="*/".concat("*");try{Ut=i.href}catch(an){Ut=o.createElement("a"),Ut.href="",Ut=Ut.href}Xt=tn.exec(Ut.toLowerCase())||[],x.fn.load=function(e,t,n){if("string"!=typeof e&&nn)return nn.apply(this,arguments);var r,i,o,s=this,a=e.indexOf(" ");return a>=0&&(r=e.slice(a),e=e.slice(0,a)),x.isFunction(t)?(n=t,t=undefined):t&&"object"==typeof t&&(i="POST"),s.length>0&&x.ajax({url:e,type:i,dataType:"html",data:t}).done(function(e){o=arguments,s.html(r?x("<div>").append(x.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){s.each(n,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ut,type:"GET",isLocal:Kt.test(Xt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":sn,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":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?cn(cn(e,x.ajaxSettings),t):cn(x.ajaxSettings,e)},ajaxPrefilter:un(rn),ajaxTransport:un(on),ajax:function(e,t){function k(e,t,o,a){var l,m,y,b,w,C=t;2!==v&&(v=2,s&&clearTimeout(s),n=undefined,i=a||"",T.readyState=e>0?4:0,l=e>=200&&300>e||304===e,o&&(b=pn(c,T,o)),b=fn(c,b,T,l),l?(c.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(x.lastModified[r]=w),w=T.getResponseHeader("etag"),w&&(x.etag[r]=w)),204===e||"HEAD"===c.type?C="nocontent":304===e?C="notmodified":(C=b.state,m=b.data,y=b.error,l=!y)):(y=C,(e||!C)&&(C="error",0>e&&(e=0))),T.status=e,T.statusText=(t||C)+"",l?h.resolveWith(p,[m,C,T]):h.rejectWith(p,[T,C,y]),T.statusCode(g),g=undefined,u&&f.trigger(l?"ajaxSuccess":"ajaxError",[T,c,l?m:y]),d.fireWith(p,[T,C]),u&&(f.trigger("ajaxComplete",[T,c]),--x.active||x.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=undefined),t=t||{};var n,r,i,o,s,a,u,l,c=x.ajaxSetup({},t),p=c.context||c,f=c.context&&(p.nodeType||p.jquery)?x(p):x.event,h=x.Deferred(),d=x.Callbacks("once memory"),g=c.statusCode||{},m={},y={},v=0,b="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===v){if(!o)for(o={};t=Qt.exec(i);)o[t[1].toLowerCase()]=t[2];t=o[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===v?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return v||(e=y[n]=y[n]||e,m[e]=t),this},overrideMimeType:function(e){return v||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>v)for(t in e)g[t]=[g[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||b;return n&&n.abort(t),k(0,t),this}};if(h.promise(T).complete=d.add,T.success=T.done,T.error=T.fail,c.url=((e||c.url||Ut)+"").replace(Gt,"").replace(en,Xt[1]+"//"),c.type=t.method||t.type||c.method||c.type,c.dataTypes=x.trim(c.dataType||"*").toLowerCase().match(w)||[""],null==c.crossDomain&&(a=tn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===Xt[1]&&a[2]===Xt[2]&&(a[3]||("http:"===a[1]?"80":"443"))===(Xt[3]||("http:"===Xt[1]?"80":"443")))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=x.param(c.data,c.traditional)),ln(rn,c,t,T),2===v)return T;u=c.global,u&&0===x.active++&&x.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!Zt.test(c.type),r=c.url,c.hasContent||(c.data&&(r=c.url+=(Vt.test(r)?"&":"?")+c.data,delete c.data),c.cache===!1&&(c.url=Jt.test(r)?r.replace(Jt,"$1_="+Yt++):r+(Vt.test(r)?"&":"?")+"_="+Yt++)),c.ifModified&&(x.lastModified[r]&&T.setRequestHeader("If-Modified-Since",x.lastModified[r]),x.etag[r]&&T.setRequestHeader("If-None-Match",x.etag[r])),(c.data&&c.hasContent&&c.contentType!==!1||t.contentType)&&T.setRequestHeader("Content-Type",c.contentType),T.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+sn+"; q=0.01":""):c.accepts["*"]);
for(l in c.headers)T.setRequestHeader(l,c.headers[l]);if(c.beforeSend&&(c.beforeSend.call(p,T,c)===!1||2===v))return T.abort();b="abort";for(l in{success:1,error:1,complete:1})T[l](c[l]);if(n=ln(on,c,t,T)){T.readyState=1,u&&f.trigger("ajaxSend",[T,c]),c.async&&c.timeout>0&&(s=setTimeout(function(){T.abort("timeout")},c.timeout));try{v=1,n.send(m,k)}catch(C){if(!(2>v))throw C;k(-1,C)}}else k(-1,"No Transport");return T},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,t){return x.get(e,undefined,t,"script")}}),x.each(["get","post"],function(e,t){x[t]=function(e,n,r,i){return x.isFunction(n)&&(i=i||r,r=n,n=undefined),x.ajax({url:e,type:t,dataType:i,data:n,success:r})}}),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),x.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=x("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),o.head.appendChild(t[0])},abort:function(){n&&n()}}}});var hn=[],dn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=hn.pop()||x.expando+"_"+Yt++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,s,a=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");return a||"jsonp"===t.dataTypes[0]?(i=t.jsonpCallback=x.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(Vt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||x.error(i+" was not called"),s[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){s=arguments},r.always(function(){e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,hn.push(i)),s&&x.isFunction(o)&&o(s[0]),s=o=undefined}),"script"):undefined}),x.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var gn=x.ajaxSettings.xhr(),mn={0:200,1223:204},yn=0,vn={};e.ActiveXObject&&x(e).on("unload",function(){for(var e in vn)vn[e]();vn=undefined}),x.support.cors=!!gn&&"withCredentials"in gn,x.support.ajax=gn=!!gn,x.ajaxTransport(function(e){var t;return x.support.cors||gn&&!e.crossDomain?{send:function(n,r){var i,o,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)s[i]=e.xhrFields[i];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)s.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete vn[o],t=s.onload=s.onerror=null,"abort"===e?s.abort():"error"===e?r(s.status||404,s.statusText):r(mn[s.status]||s.status,s.statusText,"string"==typeof s.responseText?{text:s.responseText}:undefined,s.getAllResponseHeaders()))}},s.onload=t(),s.onerror=t("error"),t=vn[o=yn++]=t("abort"),s.send(e.hasContent&&e.data||null)},abort:function(){t&&t()}}:undefined});var xn,bn,wn=/^(?:toggle|show|hide)$/,Tn=RegExp("^(?:([+-])=|)("+b+")([a-z%]*)$","i"),Cn=/queueHooks$/,kn=[An],Nn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Tn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),s=(x.cssNumber[e]||"px"!==o&&+r)&&Tn.exec(x.css(n.elem,e)),a=1,u=20;if(s&&s[3]!==o){o=o||s[3],i=i||[],s=+r||1;do a=a||".5",s/=a,x.style(n.elem,e,s+o);while(a!==(a=n.cur()/r)&&1!==a&&--u)}return i&&(s=n.start=+s||+r||0,n.unit=o,n.end=i[1]?s+(i[1]+1)*i[2]:+i[2]),n}]};x.Animation=x.extend(jn,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],Nn[n]=Nn[n]||[],Nn[n].unshift(t)},prefilter:function(e,t){t?kn.unshift(e):kn.push(e)}}),x.Tween=Ln,Ln.prototype={constructor:Ln,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=Ln.propHooks[this.prop];return e&&e.get?e.get(this):Ln.propHooks._default.get(this)},run:function(e){var t,n=Ln.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ln.propHooks._default.set(this),this}},Ln.prototype.init.prototype=Ln.prototype,Ln.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Ln.propHooks.scrollTop=Ln.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(qn(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Lt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),s=function(){var t=jn(this,x.extend({},e),o);(i||q.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=undefined),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=x.timers,s=q.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&Cn.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=q.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,s=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;s>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),x.each({slideDown:qn("show"),slideUp:qn("hide"),slideToggle:qn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=Ln.prototype.init,x.fx.tick=function(){var e,t=x.timers,n=0;for(xn=x.now();t.length>n;n++)e=t[n],e()||t[n]!==e||t.splice(n--,1);t.length||x.fx.stop(),xn=undefined},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){bn||(bn=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(bn),bn=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===undefined?this:this.each(function(t){x.offset.setOffset(this,e,t)});var t,n,i=this[0],o={top:0,left:0},s=i&&i.ownerDocument;return s?(t=s.documentElement,x.contains(t,i)?(typeof i.getBoundingClientRect!==r&&(o=i.getBoundingClientRect()),n=Hn(s),{top:o.top+n.pageYOffset-t.clientTop,left:o.left+n.pageXOffset-t.clientLeft}):o):void 0},x.offset={setOffset:function(e,t,n){var r,i,o,s,a,u,l,c=x.css(e,"position"),p=x(e),f={};"static"===c&&(e.style.position="relative"),a=p.offset(),o=x.css(e,"top"),u=x.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(r=p.position(),s=r.top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(u)||0),x.isFunction(t)&&(t=t.call(e,n,a)),null!=t.top&&(f.top=t.top-a.top+s),null!=t.left&&(f.left=t.left-a.left+i),"using"in t?t.using.call(e,f):p.css(f)}},x.fn.extend({position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===x.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(r=e.offset()),r.top+=x.css(e[0],"borderTopWidth",!0),r.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-x.css(n,"marginTop",!0),left:t.left-r.left-x.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||s;e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position");)e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var r="pageYOffset"===n;x.fn[t]=function(i){return x.access(this,function(t,i,o){var s=Hn(t);return o===undefined?s?s[n]:t[i]:(s?s.scrollTo(r?e.pageXOffset:o,r?o:e.pageYOffset):t[i]=o,undefined)},t,i,arguments.length,null)}}),x.each({Height:"height",Width:"width"},function(e,t){x.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){x.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),s=n||(r===!0||i===!0?"margin":"border");return x.access(this,function(t,n,r){var i;return x.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):r===undefined?x.css(t,n,s):x.style(t,n,r,s)},t,o?r:undefined,o,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}),"object"==typeof e&&"object"==typeof e.document&&(e.jQuery=e.$=x)}(window),function(window,document,undefined){"use strict";function noConflict(){var a=window.angular;return window.angular=_angular,a}function isArrayLike(obj){return obj&&"number"==typeof obj.length?"function"!=typeof obj.hasOwnProperty&&"function"!=typeof obj.constructor?!0:obj instanceof JQLite||jQuery&&obj instanceof jQuery||"[object Object]"!==toString.call(obj)||"function"==typeof obj.callee:!1}function forEach(obj,iterator,context){var key;if(obj)if(isFunction(obj))for(key in obj)"prototype"!=key&&"length"!=key&&"name"!=key&&obj.hasOwnProperty(key)&&iterator.call(context,obj[key],key);else if(obj.forEach&&obj.forEach!==forEach)obj.forEach(iterator,context);else if(isArrayLike(obj))for(key=0;key<obj.length;key++)iterator.call(context,obj[key],key);else for(key in obj)obj.hasOwnProperty(key)&&iterator.call(context,obj[key],key);return obj}function sortedKeys(obj){var keys=[];for(var key in obj)obj.hasOwnProperty(key)&&keys.push(key);return keys.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(){for(var digit,index=uid.length;index;){if(index--,digit=uid[index].charCodeAt(0),57==digit)return uid[index]="A",uid.join("");if(90!=digit)return uid[index]=String.fromCharCode(digit+1),uid.join("");uid[index]="0"}return uid.unshift("0"),uid.join("")}function setHashKey(obj,h){h?obj.$$hashKey=h:delete obj.$$hashKey}function extend(dst){var h=dst.$$hashKey;return forEach(arguments,function(obj){obj!==dst&&forEach(obj,function(value,key){dst[key]=value})}),setHashKey(dst,h),dst}function int(str){return parseInt(str,10)}function inherit(parent,extra){return extend(new(extend(function(){},{prototype: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.apply(value)}function isArray(value){return"[object Array]"==toString.apply(value)}function isFunction(value){return"function"==typeof value}function isWindow(obj){return obj&&obj.document&&obj.location&&obj.alert&&obj.setInterval}function isScope(obj){return obj&&obj.$evalAsync&&obj.$watch}function isFile(obj){return"[object File]"===toString.apply(obj)}function trim(value){return isString(value)?value.replace(/^\s*/,"").replace(/\s*$/,""):value}function isElement(node){return node&&(node.nodeName||node.bind&&node.find)}function map(obj,iterator,context){var results=[];return forEach(obj,function(value,index,list){results.push(iterator.call(context,value,index,list))}),results}function includes(array,obj){return-1!=indexOf(array,obj)}function indexOf(array,obj){if(array.indexOf)return array.indexOf(obj);for(var i=0;i<array.length;i++)if(obj===array[i])return i;return-1}function arrayRemove(array,value){var index=indexOf(array,value);return index>=0&&array.splice(index,1),value}function copy(source,destination){if(isWindow(source)||isScope(source))throw Error("Can't copy Window or Scope");if(destination){if(source===destination)throw Error("Can't copy equivalent objects or arrays");if(isArray(source)){destination.length=0;for(var i=0;i<source.length;i++)destination.push(copy(source[i]))}else{var h=destination.$$hashKey;forEach(destination,function(value,key){delete destination[key]});for(var key in source)destination[key]=copy(source[key]);setHashKey(destination,h)}}else destination=source,source&&(isArray(source)?destination=copy(source,[]):isDate(source)?destination=new Date(source.getTime()):isObject(source)&&(destination=copy(source,{})));return destination}function shallowCopy(src,dst){dst=dst||{};for(var key in src)src.hasOwnProperty(key)&&"$$"!==key.substr(0,2)&&(dst[key]=src[key]);return dst}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)&&o1.getTime()==o2.getTime();if(isScope(o1)||isScope(o2)||isWindow(o1)||isWindow(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[key]&&"$"!==key.charAt(0)&&o2[key]!==undefined&&!isFunction(o2[key]))return!1;return!0}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,curryArgs.concat(slice.call(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/^\$+/.test(key)?val=undefined:isWindow(value)?val="$WINDOW":value&&document===value?val="$DOCUMENT":isScope(value)&&(val="$SCOPE"),val}function toJson(obj,pretty){return JSON.stringify(obj,toJsonReplacer,pretty?"  ":null)}function fromJson(json){return isString(json)?JSON.parse(json):json}function toBoolean(value){if(value&&0!==value.length){var v=lowercase(""+value);value=!("f"==v||"0"==v||"false"==v||"no"==v||"n"==v||"[]"==v)}else value=!1;return value}function startingTag(element){element=jqLite(element).clone();try{element.html("")}catch(e){}var TEXT_NODE=3,elemHtml=jqLite("<div>").append(element).html();try{return element[0].nodeType===TEXT_NODE?lowercase(elemHtml):elemHtml.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(match,nodeName){return"<"+lowercase(nodeName)})}catch(e){return lowercase(elemHtml)}}function parseKeyValue(keyValue){var key_value,key,obj={};return forEach((keyValue||"").split("&"),function(keyValue){keyValue&&(key_value=keyValue.split("="),key=decodeURIComponent(key_value[0]),obj[key]=isDefined(key_value[1])?decodeURIComponent(key_value[1]):!0)}),obj}function toKeyValue(obj){var parts=[];return forEach(obj,function(value,key){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(/%20/g,pctEncodeSpaces?"%20":"+")}function angularInit(element,bootstrap){function append(element){element&&elements.push(element)}var appElement,module,elements=[element],names=["ng:app","ng-app","x-ng-app","data-ng-app"],NG_APP_CLASS_REGEXP=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;forEach(names,function(name){names[name]=!0,append(document.getElementById(name)),name=name.replace(":","\\:"),element.querySelectorAll&&(forEach(element.querySelectorAll("."+name),append),forEach(element.querySelectorAll("."+name+"\\:"),append),forEach(element.querySelectorAll("["+name+"]"),append))}),forEach(elements,function(element){if(!appElement){var className=" "+element.className+" ",match=NG_APP_CLASS_REGEXP.exec(className);match?(appElement=element,module=(match[2]||"").replace(/\s+/g,",")):forEach(element.attributes,function(attr){!appElement&&names[attr.name]&&(appElement=element,module=attr.value)})}}),appElement&&bootstrap(appElement,module?[module]:[])}function bootstrap(element,modules){var resumeBootstrapInternal=function(){element=jqLite(element),modules=modules||[],modules.unshift(["$provide",function($provide){$provide.value("$rootElement",element)}]),modules.unshift("ng");var injector=createInjector(modules);return injector.invoke(["$rootScope","$rootElement","$compile","$injector","$animator",function(scope,element,compile,injector,animator){scope.$apply(function(){element.data("$injector",injector),compile(element)(scope)}),animator.enabled(!0)}]),injector},NG_DEFER_BOOTSTRAP=/^NG_DEFER_BOOTSTRAP!/;return window&&!NG_DEFER_BOOTSTRAP.test(window.name)?resumeBootstrapInternal():(window.name=window.name.replace(NG_DEFER_BOOTSTRAP,""),angular.resumeBootstrap=function(extraModules){forEach(extraModules,function(module){modules.push(module)}),resumeBootstrapInternal()},void 0)}function snake_case(name,separator){return separator=separator||"_",name.replace(SNAKE_CASE_REGEXP,function(letter,pos){return(pos?separator:"")+letter.toLowerCase()})}function bindJQuery(){jQuery=window.jQuery,jQuery?(jqLite=jQuery,extend(jQuery.fn,{scope:JQLitePrototype.scope,controller:JQLitePrototype.controller,injector:JQLitePrototype.injector,inheritedData:JQLitePrototype.inheritedData}),JQLitePatchJQueryRemove("remove",!0),JQLitePatchJQueryRemove("empty"),JQLitePatchJQueryRemove("html")):jqLite=JQLite,angular.element=jqLite}function assertArg(arg,name,reason){if(!arg)throw new Error("Argument '"+(name||"?")+"' is "+(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 setupModuleLoader(window){function ensure(obj,name,factory){return obj[name]||(obj[name]=factory())}return ensure(ensure(window,"angular",Object),"module",function(){var modules={};return function(name,requires,configFn){return requires&&modules.hasOwnProperty(name)&&(modules[name]=null),ensure(modules,name,function(){function invokeLater(provider,method,insertMethod){return function(){return invokeQueue[insertMethod||"push"]([provider,method,arguments]),moduleInstance}}if(!requires)throw Error("No module: "+name);var invokeQueue=[],runBlocks=[],config=invokeLater("$injector","invoke"),moduleInstance={_invokeQueue:invokeQueue,_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("$animationProvider","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 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},noConflict:noConflict}),angularModule=setupModuleLoader(window);try{angularModule("ngLocale")}catch(e){angularModule("ngLocale",[]).provider("$locale",$LocaleProvider)}angularModule("ng",["ngLocale"],["$provide",function($provide){$provide.provider("$compile",$CompileProvider).directive({a:htmlAnchorDirective,input:inputDirective,textarea:inputDirective,form:formDirective,script:scriptDirective,select:selectDirective,style:styleDirective,option:optionDirective,ngBind:ngBindDirective,ngBindHtmlUnsafe:ngBindHtmlUnsafeDirective,ngBindTemplate:ngBindTemplateDirective,ngClass:ngClassDirective,ngClassEven:ngClassEvenDirective,ngClassOdd:ngClassOddDirective,ngCsp:ngCspDirective,ngCloak:ngCloakDirective,ngController:ngControllerDirective,ngForm:ngFormDirective,ngHide:ngHideDirective,ngIf:ngIfDirective,ngInclude:ngIncludeDirective,ngInit:ngInitDirective,ngNonBindable:ngNonBindableDirective,ngPluralize:ngPluralizeDirective,ngRepeat:ngRepeatDirective,ngShow:ngShowDirective,ngSubmit:ngSubmitDirective,ngStyle:ngStyleDirective,ngSwitch:ngSwitchDirective,ngSwitchWhen:ngSwitchWhenDirective,ngSwitchDefault:ngSwitchDefaultDirective,ngOptions:ngOptionsDirective,ngView:ngViewDirective,ngTransclude:ngTranscludeDirective,ngModel:ngModelDirective,ngList:ngListDirective,ngChange:ngChangeDirective,required:requiredDirective,ngRequired:requiredDirective,ngValue:ngValueDirective}).directive(ngAttributeAliasDirectives).directive(ngEventDirectives),$provide.provider({$anchorScroll:$AnchorScrollProvider,$animation:$AnimationProvider,$animator:$AnimatorProvider,$browser:$BrowserProvider,$cacheFactory:$CacheFactoryProvider,$controller:$ControllerProvider,$document:$DocumentProvider,$exceptionHandler:$ExceptionHandlerProvider,$filter:$FilterProvider,$interpolate:$InterpolateProvider,$http:$HttpProvider,$httpBackend:$HttpBackendProvider,$location:$LocationProvider,$log:$LogProvider,$parse:$ParseProvider,$route:$RouteProvider,$routeParams:$RouteParamsProvider,$rootScope:$RootScopeProvider,$q:$QProvider,$sniffer:$SnifferProvider,$templateCache:$TemplateCacheProvider,$timeout:$TimeoutProvider,$window:$WindowProvider})}])}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 JQLitePatchJQueryRemove(name,dispatchThis){function removePatch(){for(var set,setIndex,setLength,element,childIndex,childLength,children,list=[this],fireEvent=dispatchThis;list.length;)for(set=list.shift(),setIndex=0,setLength=set.length;setLength>setIndex;setIndex++)for(element=jqLite(set[setIndex]),fireEvent?element.triggerHandler("$destroy"):fireEvent=!fireEvent,childIndex=0,childLength=(children=element.children()).length;childLength>childIndex;childIndex++)list.push(jQuery(children[childIndex]));return originalJqFn.apply(this,arguments)}var originalJqFn=jQuery.fn[name];originalJqFn=originalJqFn.$original||originalJqFn,removePatch.$original=originalJqFn,jQuery.fn[name]=removePatch}function JQLite(element){if(element instanceof JQLite)return element;if(!(this instanceof JQLite)){if(isString(element)&&"<"!=element.charAt(0))throw Error("selectors not implemented");return new JQLite(element)}if(isString(element)){var div=document.createElement("div");div.innerHTML="<div>&#160;</div>"+element,div.removeChild(div.firstChild),JQLiteAddNodes(this,div.childNodes),this.remove()}else JQLiteAddNodes(this,element)}function JQLiteClone(element){return element.cloneNode(!0)}function JQLiteDealoc(element){JQLiteRemoveData(element);for(var i=0,children=element.childNodes||[];i<children.length;i++)JQLiteDealoc(children[i])}function JQLiteUnbind(element,type,fn){var events=JQLiteExpandoStore(element,"events"),handle=JQLiteExpandoStore(element,"handle");handle&&(isUndefined(type)?forEach(events,function(eventHandler,type){removeEventListenerFn(element,type,eventHandler),delete events[type]}):isUndefined(fn)?(removeEventListenerFn(element,type,events[type]),delete events[type]):arrayRemove(events[type],fn))}function JQLiteRemoveData(element){var expandoId=element[jqName],expandoStore=jqCache[expandoId];expandoStore&&(expandoStore.handle&&(expandoStore.events.$destroy&&expandoStore.handle({},"$destroy"),JQLiteUnbind(element)),delete jqCache[expandoId],element[jqName]=undefined)}function JQLiteExpandoStore(element,key,value){var expandoId=element[jqName],expandoStore=jqCache[expandoId||-1];return isDefined(value)?(expandoStore||(element[jqName]=expandoId=jqNextId(),expandoStore=jqCache[expandoId]={}),expandoStore[key]=value,void 0):expandoStore&&expandoStore[key]}function JQLiteData(element,key,value){var data=JQLiteExpandoStore(element,"data"),isSetter=isDefined(value),keyDefined=!isSetter&&isDefined(key),isSimpleGetter=keyDefined&&!isObject(key);if(data||isSimpleGetter||JQLiteExpandoStore(element,"data",data={}),isSetter)data[key]=value;else{if(!keyDefined)return data;if(isSimpleGetter)return data&&data[key];extend(data,key)}}function JQLiteHasClass(element,selector){return(" "+element.className+" ").replace(/[\n\t]/g," ").indexOf(" "+selector+" ")>-1}function JQLiteRemoveClass(element,cssClasses){cssClasses&&forEach(cssClasses.split(" "),function(cssClass){element.className=trim((" "+element.className+" ").replace(/[\n\t]/g," ").replace(" "+trim(cssClass)+" "," "))})}function JQLiteAddClass(element,cssClasses){cssClasses&&forEach(cssClasses.split(" "),function(cssClass){JQLiteHasClass(element,cssClass)||(element.className=trim(element.className+" "+trim(cssClass)))})}function JQLiteAddNodes(root,elements){if(elements){elements=elements.nodeName||!isDefined(elements.length)||isWindow(elements)?[elements]:elements;for(var i=0;i<elements.length;i++)root.push(elements[i])}}function JQLiteController(element,name){return JQLiteInheritedData(element,"$"+(name||"ngController")+"Controller")}function JQLiteInheritedData(element,name,value){for(element=jqLite(element),9==element[0].nodeType&&(element=element.find("html"));element.length;){if(value=element.data(name))return value;element=element.parent()}}function getBooleanAttrName(element,name){var booleanAttr=BOOLEAN_ATTR[name.toLowerCase()];return booleanAttr&&BOOLEAN_ELEMENTS[element.nodeName]&&booleanAttr}function createEventHandler(element,events){var eventHandler=function(event,type){if(event.preventDefault||(event.preventDefault=function(){event.returnValue=!1}),event.stopPropagation||(event.stopPropagation=function(){event.cancelBubble=!0}),event.target||(event.target=event.srcElement||document),isUndefined(event.defaultPrevented)){var prevent=event.preventDefault;event.preventDefault=function(){event.defaultPrevented=!0,prevent.call(event)},event.defaultPrevented=!1}event.isDefaultPrevented=function(){return event.defaultPrevented||0==event.returnValue},forEach(events[type||event.type],function(fn){fn.call(element,event)}),8>=msie?(event.preventDefault=null,event.stopPropagation=null,event.isDefaultPrevented=null):(delete event.preventDefault,delete event.stopPropagation,delete event.isDefaultPrevented)};return eventHandler.elem=element,eventHandler}function hashKey(obj){var key,objType=typeof obj;return"object"==objType&&null!==obj?"function"==typeof(key=obj.$$hashKey)?key=obj.$$hashKey():key===undefined&&(key=obj.$$hashKey=nextUid()):key=obj,objType+":"+key}function HashMap(array){forEach(array,this.put,this)}function annotate(fn){var $inject,fnText,argDecl,last;return"function"==typeof fn?($inject=fn.$inject)||($inject=[],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):isArray(fn)?(last=fn.length-1,assertArgFn(fn[last],"fn"),$inject=fn.slice(0,last)):assertArgFn(fn,"fn",!0),$inject}function createInjector(modulesToLoad){function supportObject(delegate){return function(key,value){return isObject(key)?(forEach(key,reverseParams(delegate)),void 0):delegate(key,value)}}function provider(name,provider_){if((isFunction(provider_)||isArray(provider_))&&(provider_=providerInjector.instantiate(provider_)),!provider_.$get)throw Error("Provider "+name+" must define $get factory method.");return providerCache[name+providerSuffix]=provider_}function factory(name,factoryFn){return provider(name,{$get:factoryFn})}function service(name,constructor){return factory(name,["$injector",function($injector){return $injector.instantiate(constructor)}])}function value(name,value){return factory(name,valueFn(value))}function constant(name,value){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 runBlocks=[];return forEach(modulesToLoad,function(module){if(!loadedModules.get(module))if(loadedModules.put(module,!0),isString(module)){var moduleFn=angularModule(module);runBlocks=runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);try{for(var invokeQueue=moduleFn._invokeQueue,i=0,ii=invokeQueue.length;ii>i;i++){var invokeArgs=invokeQueue[i],provider=providerInjector.get(invokeArgs[0]);provider[invokeArgs[1]].apply(provider,invokeArgs[2])}}catch(e){throw e.message&&(e.message+=" from "+module),e}}else if(isFunction(module))try{runBlocks.push(providerInjector.invoke(module))}catch(e){throw e.message&&(e.message+=" from "+module),e}else if(isArray(module))try{runBlocks.push(providerInjector.invoke(module))}catch(e){throw e.message&&(e.message+=" from "+String(module[module.length-1])),e}else assertArgFn(module,"module")}),runBlocks}function createInternalInjector(cache,factory){function getService(serviceName){if("string"!=typeof serviceName)throw Error("Service name expected");if(cache.hasOwnProperty(serviceName)){if(cache[serviceName]===INSTANTIATING)throw Error("Circular dependency: "+path.join(" <- "));return cache[serviceName]}try{return path.unshift(serviceName),cache[serviceName]=INSTANTIATING,cache[serviceName]=factory(serviceName)
}finally{path.shift()}}function invoke(fn,self,locals){var length,i,key,args=[],$inject=annotate(fn);for(i=0,length=$inject.length;length>i;i++)key=$inject[i],args.push(locals&&locals.hasOwnProperty(key)?locals[key]:getService(key));switch(fn.$inject||(fn=fn[length]),self?-1:args.length){case 0:return fn();case 1:return fn(args[0]);case 2:return fn(args[0],args[1]);case 3:return fn(args[0],args[1],args[2]);case 4:return fn(args[0],args[1],args[2],args[3]);case 5:return fn(args[0],args[1],args[2],args[3],args[4]);case 6:return fn(args[0],args[1],args[2],args[3],args[4],args[5]);case 7:return fn(args[0],args[1],args[2],args[3],args[4],args[5],args[6]);case 8:return fn(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7]);case 9:return fn(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8]);case 10:return fn(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9]);default:return fn.apply(self,args)}}function instantiate(Type,locals){var instance,returnedValue,Constructor=function(){};return Constructor.prototype=(isArray(Type)?Type[Type.length-1]:Type).prototype,instance=new Constructor,returnedValue=invoke(Type,instance,locals),isObject(returnedValue)?returnedValue:instance}return{invoke:invoke,instantiate:instantiate,get:getService,annotate:annotate,has:function(name){return providerCache.hasOwnProperty(name+providerSuffix)||cache.hasOwnProperty(name)}}}var INSTANTIATING={},providerSuffix="Provider",path=[],loadedModules=new HashMap,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(){throw Error("Unknown provider: "+path.join(" <- "))}),instanceCache={},instanceInjector=instanceCache.$injector=createInternalInjector(instanceCache,function(servicename){var provider=providerInjector.get(servicename+providerSuffix);return instanceInjector.invoke(provider.$get,provider)});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 forEach(list,function(element){result||"a"!==lowercase(element.nodeName)||(result=element)}),result}function scroll(){var elm,hash=$location.hash();hash?(elm=document.getElementById(hash))?elm.scrollIntoView():(elm=getFirstAnchor(document.getElementsByName(hash)))?elm.scrollIntoView():"top"===hash&&$window.scrollTo(0,0):$window.scrollTo(0,0)}var document=$window.document;return autoScrollingEnabled&&$rootScope.$watch(function(){return $location.hash()},function(){$rootScope.$evalAsync(scroll)}),scroll}]}function $AnimationProvider($provide){var suffix="Animation";this.register=function(name,factory){$provide.factory(camelCase(name)+suffix,factory)},this.$get=["$injector",function($injector){return function(name){if(name){var animationName=camelCase(name)+suffix;if($injector.has(animationName))return $injector.get(animationName)}}}]}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 startPoller(interval,setTimeout){!function check(){forEach(pollFns,function(pollFn){pollFn()}),pollTimeout=setTimeout(check,interval)}()}function fireUrlChange(){lastBrowserUrl!=self.url()&&(lastBrowserUrl=self.url(),forEach(urlChangeListeners,function(listener){listener(self.url())}))}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 lastBrowserUrl=location.href,baseElement=document.find("base");self.url=function(url,replace){if(url){if(lastBrowserUrl==url)return;return lastBrowserUrl=url,$sniffer.history?replace?history.replaceState(null,"",url):(history.pushState(null,"",url),baseElement.attr("href",baseElement.attr("href"))):replace?location.replace(url):location.href=url,self}return location.href.replace(/%27/g,"'")};var urlChangeListeners=[],urlChangeInit=!1;self.onUrlChange=function(callback){return urlChangeInit||($sniffer.history&&jqLite(window).bind("popstate",fireUrlChange),$sniffer.hashchange?jqLite(window).bind("hashchange",fireUrlChange):self.addPollFn(fireUrlChange),urlChangeInit=!0),urlChangeListeners.push(callback),callback},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++)if(cookie=cookieArray[i],index=cookie.indexOf("="),index>0){var name=unescape(cookie.substring(0,index));lastCookies[name]===undefined&&(lastCookies[name]=unescape(cookie.substring(index+1)))}return lastCookies}value===undefined?rawDocument.cookie=escape(name)+"=;path="+cookiePath+";expires=Thu, 01 Jan 1970 00:00:00 GMT":isString(value)&&(cookieLength=(rawDocument.cookie=escape(name)+"="+escape(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 Error("cacheId "+cacheId+" taken");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){var lruEntry=lruHash[key]||(lruHash[key]={key:key});return refresh(lruEntry),isUndefined(value)?void 0:(key in data||size++,data[key]=value,size>capacity&&this.remove(staleEnd.key),value)},get:function(key){var lruEntry=lruHash[key];if(lruEntry)return refresh(lruEntry),data[key]},remove:function(key){var lruEntry=lruHash[key];lruEntry&&(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){var hasDirectives={},Suffix="Directive",COMMENT_DIRECTIVE_REGEXP=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,CLASS_DIRECTIVE_REGEXP=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,MULTI_ROOT_TEMPLATE_ERROR="Template must have exactly one root element. was: ",urlSanitizationWhitelist=/^\s*(https?|ftp|mailto|file):/;this.directive=function registerDirective(name,directiveFactory){return isString(name)?(assertArg(directiveFactory,"directive"),hasDirectives.hasOwnProperty(name)||(hasDirectives[name]=[],$provide.factory(name+Suffix,["$injector","$exceptionHandler",function($injector,$exceptionHandler){var directives=[];return forEach(hasDirectives[name],function(directiveFactory){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.name=directive.name||name,directive.require=directive.require||directive.controller&&directive.name,directive.restrict=directive.restrict||"A",directives.push(directive)}catch(e){$exceptionHandler(e)}}),directives}])),hasDirectives[name].push(directiveFactory)):forEach(name,reverseParams(registerDirective)),this},this.urlSanitizationWhitelist=function(regexp){return isDefined(regexp)?(urlSanitizationWhitelist=regexp,this):urlSanitizationWhitelist},this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document",function($injector,$interpolate,$exceptionHandler,$http,$templateCache,$parse,$controller,$rootScope,$document){function compile($compileNodes,transcludeFn,maxPriority){$compileNodes instanceof jqLite||($compileNodes=jqLite($compileNodes)),forEach($compileNodes,function(node,index){3==node.nodeType&&node.nodeValue.match(/\S+/)&&($compileNodes[index]=jqLite(node).wrap("<span></span>").parent()[0])});var compositeLinkFn=compileNodes($compileNodes,transcludeFn,$compileNodes,maxPriority);return function(scope,cloneConnectFn){assertArg(scope,"scope");for(var $linkNode=cloneConnectFn?JQLitePrototype.clone.call($compileNodes):$compileNodes,i=0,ii=$linkNode.length;ii>i;i++){var node=$linkNode[i];(1==node.nodeType||9==node.nodeType)&&$linkNode.eq(i).data("$scope",scope)}return safeAddClass($linkNode,"ng-scope"),cloneConnectFn&&cloneConnectFn($linkNode,scope),compositeLinkFn&&compositeLinkFn(scope,$linkNode,$linkNode),$linkNode}}function safeAddClass($element,className){try{$element.addClass(className)}catch(e){}}function compileNodes(nodeList,transcludeFn,$rootElement,maxPriority){function compositeLinkFn(scope,nodeList,$rootElement,boundTranscludeFn){var nodeLinkFn,childLinkFn,node,childScope,childTranscludeFn,i,ii,n,stableNodeList=[];for(i=0,ii=nodeList.length;ii>i;i++)stableNodeList.push(nodeList[i]);for(i=0,n=0,ii=linkFns.length;ii>i;n++)node=stableNodeList[n],nodeLinkFn=linkFns[i++],childLinkFn=linkFns[i++],nodeLinkFn?(nodeLinkFn.scope?(childScope=scope.$new(isObject(nodeLinkFn.scope)),jqLite(node).data("$scope",childScope)):childScope=scope,childTranscludeFn=nodeLinkFn.transclude,childTranscludeFn||!boundTranscludeFn&&transcludeFn?nodeLinkFn(childLinkFn,childScope,node,$rootElement,function(transcludeFn){return function(cloneFn){var transcludeScope=scope.$new();return transcludeScope.$$transcluded=!0,transcludeFn(transcludeScope,cloneFn).bind("$destroy",bind(transcludeScope,transcludeScope.$destroy))}}(childTranscludeFn||transcludeFn)):nodeLinkFn(childLinkFn,childScope,node,undefined,boundTranscludeFn)):childLinkFn&&childLinkFn(scope,node.childNodes,undefined,boundTranscludeFn)}for(var nodeLinkFn,childLinkFn,directives,attrs,linkFnFound,linkFns=[],i=0;i<nodeList.length;i++)attrs=new Attributes,directives=collectDirectives(nodeList[i],[],attrs,maxPriority),nodeLinkFn=directives.length?applyDirectivesToNode(directives,nodeList[i],attrs,transcludeFn,$rootElement):null,childLinkFn=nodeLinkFn&&nodeLinkFn.terminal||!nodeList[i].childNodes||!nodeList[i].childNodes.length?null:compileNodes(nodeList[i].childNodes,nodeLinkFn?nodeLinkFn.transclude:transcludeFn),linkFns.push(nodeLinkFn),linkFns.push(childLinkFn),linkFnFound=linkFnFound||nodeLinkFn||childLinkFn;return linkFnFound?compositeLinkFn:null}function collectDirectives(node,directives,attrs,maxPriority){var match,className,nodeType=node.nodeType,attrsMap=attrs.$attr;switch(nodeType){case 1:addDirective(directives,directiveNormalize(nodeName_(node).toLowerCase()),"E",maxPriority);for(var attr,name,nName,ngAttrName,value,nAttrs=node.attributes,j=0,jj=nAttrs&&nAttrs.length;jj>j;j++)attr=nAttrs[j],attr.specified&&(name=attr.name,ngAttrName=directiveNormalize(name),NG_ATTR_BINDING.test(ngAttrName)&&(name=ngAttrName.substr(6).toLowerCase()),nName=directiveNormalize(name.toLowerCase()),attrsMap[nName]=name,attrs[nName]=value=trim(msie&&"href"==name?decodeURIComponent(node.getAttribute(name,2)):attr.value),getBooleanAttrName(node,nName)&&(attrs[nName]=!0),addAttrInterpolateDirective(node,directives,value,nName),addDirective(directives,nName,"A",maxPriority));if(className=node.className,isString(className)&&""!==className)for(;match=CLASS_DIRECTIVE_REGEXP.exec(className);)nName=directiveNormalize(match[2]),addDirective(directives,nName,"C",maxPriority)&&(attrs[nName]=trim(match[3])),className=className.substr(match.index+match[0].length);break;case 3:addTextInterpolateDirective(directives,node.nodeValue);break;case 8:try{match=COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue),match&&(nName=directiveNormalize(match[1]),addDirective(directives,nName,"M",maxPriority)&&(attrs[nName]=trim(match[2])))}catch(e){}}return directives.sort(byPriority),directives}function applyDirectivesToNode(directives,compileNode,templateAttrs,transcludeFn,jqCollection){function addLinkFns(pre,post){pre&&(pre.require=directive.require,preLinkFns.push(pre)),post&&(post.require=directive.require,postLinkFns.push(post))}function getControllers(require,$element){var value,retrievalMethod="data",optional=!1;if(isString(require)){for(;"^"==(value=require.charAt(0))||"?"==value;)require=require.substr(1),"^"==value&&(retrievalMethod="inheritedData"),optional=optional||"?"==value;if(value=$element[retrievalMethod]("$"+require+"Controller"),!value&&!optional)throw Error("No controller: "+require);return value}return isArray(require)&&(value=[],forEach(require,function(require){value.push(getControllers(require,$element))})),value}function nodeLinkFn(childLinkFn,scope,linkNode,$rootElement,boundTranscludeFn){var attrs,$element,i,ii,linkFn,controller;if(attrs=compileNode===linkNode?templateAttrs:shallowCopy(templateAttrs,new Attributes(jqLite(linkNode),templateAttrs.$attr)),$element=attrs.$$element,newIsolateScopeDirective){var LOCAL_REGEXP=/^\s*([@=&])(\??)\s*(\w*)\s*$/,parentScope=scope.$parent||scope;forEach(newIsolateScopeDirective.scope,function(definiton,scopeName){var lastValue,parentGet,parentSet,match=definiton.match(LOCAL_REGEXP)||[],attrName=match[3]||scopeName,optional="?"==match[2],mode=match[1];switch(scope.$$isolateBindings[scopeName]=mode+attrName,mode){case"@":attrs.$observe(attrName,function(value){scope[scopeName]=value}),attrs.$$observers[attrName].$$scope=parentScope,attrs[attrName]&&(scope[scopeName]=$interpolate(attrs[attrName])(parentScope));break;case"=":if(optional&&!attrs[attrName])return;parentGet=$parse(attrs[attrName]),parentSet=parentGet.assign||function(){throw lastValue=scope[scopeName]=parentGet(parentScope),Error(NON_ASSIGNABLE_MODEL_EXPRESSION+attrs[attrName]+" (directive: "+newIsolateScopeDirective.name+")")},lastValue=scope[scopeName]=parentGet(parentScope),scope.$watch(function(){var parentValue=parentGet(parentScope);return parentValue!==scope[scopeName]&&(parentValue!==lastValue?lastValue=scope[scopeName]=parentValue:parentSet(parentScope,parentValue=lastValue=scope[scopeName])),parentValue});break;case"&":parentGet=$parse(attrs[attrName]),scope[scopeName]=function(locals){return parentGet(parentScope,locals)};break;default:throw Error("Invalid isolate scope definition for directive "+newIsolateScopeDirective.name+": "+definiton)}})}for(controllerDirectives&&forEach(controllerDirectives,function(directive){var locals={$scope:scope,$element:$element,$attrs:attrs,$transclude:boundTranscludeFn};controller=directive.controller,"@"==controller&&(controller=attrs[directive.name]),$element.data("$"+directive.name+"Controller",$controller(controller,locals))}),i=0,ii=preLinkFns.length;ii>i;i++)try{linkFn=preLinkFns[i],linkFn(scope,$element,attrs,linkFn.require&&getControllers(linkFn.require,$element))}catch(e){$exceptionHandler(e,startingTag($element))}for(childLinkFn&&childLinkFn(scope,linkNode.childNodes,undefined,boundTranscludeFn),i=0,ii=postLinkFns.length;ii>i;i++)try{linkFn=postLinkFns[i],linkFn(scope,$element,attrs,linkFn.require&&getControllers(linkFn.require,$element))}catch(e){$exceptionHandler(e,startingTag($element))}}for(var directive,directiveName,$template,transcludeDirective,controllerDirectives,linkFn,directiveValue,terminalPriority=-Number.MAX_VALUE,preLinkFns=[],postLinkFns=[],newScopeDirective=null,newIsolateScopeDirective=null,templateDirective=null,$compileNode=templateAttrs.$$element=jqLite(compileNode),childTranscludeFn=transcludeFn,i=0,ii=directives.length;ii>i&&(directive=directives[i],$template=undefined,!(terminalPriority>directive.priority));i++){if((directiveValue=directive.scope)&&(assertNoDuplicate("isolated scope",newIsolateScopeDirective,directive,$compileNode),isObject(directiveValue)&&(safeAddClass($compileNode,"ng-isolate-scope"),newIsolateScopeDirective=directive),safeAddClass($compileNode,"ng-scope"),newScopeDirective=newScopeDirective||directive),directiveName=directive.name,(directiveValue=directive.controller)&&(controllerDirectives=controllerDirectives||{},assertNoDuplicate("'"+directiveName+"' controller",controllerDirectives[directiveName],directive,$compileNode),controllerDirectives[directiveName]=directive),(directiveValue=directive.transclude)&&(assertNoDuplicate("transclusion",transcludeDirective,directive,$compileNode),transcludeDirective=directive,terminalPriority=directive.priority,"element"==directiveValue?($template=jqLite(compileNode),$compileNode=templateAttrs.$$element=jqLite(document.createComment(" "+directiveName+": "+templateAttrs[directiveName]+" ")),compileNode=$compileNode[0],replaceWith(jqCollection,jqLite($template[0]),compileNode),childTranscludeFn=compile($template,transcludeFn,terminalPriority)):($template=jqLite(JQLiteClone(compileNode)).contents(),$compileNode.html(""),childTranscludeFn=compile($template,transcludeFn))),directive.template)if(assertNoDuplicate("template",templateDirective,directive,$compileNode),templateDirective=directive,directiveValue=isFunction(directive.template)?directive.template($compileNode,templateAttrs):directive.template,directiveValue=denormalizeTemplate(directiveValue),directive.replace){if($template=jqLite("<div>"+trim(directiveValue)+"</div>").contents(),compileNode=$template[0],1!=$template.length||1!==compileNode.nodeType)throw new Error(MULTI_ROOT_TEMPLATE_ERROR+directiveValue);replaceWith(jqCollection,$compileNode,compileNode);var newTemplateAttrs={$attr:{}};directives=directives.concat(collectDirectives(compileNode,directives.splice(i+1,directives.length-(i+1)),newTemplateAttrs)),mergeTemplateAttributes(templateAttrs,newTemplateAttrs),ii=directives.length}else $compileNode.html(directiveValue);if(directive.templateUrl)assertNoDuplicate("template",templateDirective,directive,$compileNode),templateDirective=directive,nodeLinkFn=compileTemplateUrl(directives.splice(i,directives.length-i),nodeLinkFn,$compileNode,templateAttrs,jqCollection,directive.replace,childTranscludeFn),ii=directives.length;else if(directive.compile)try{linkFn=directive.compile($compileNode,templateAttrs,childTranscludeFn),isFunction(linkFn)?addLinkFns(null,linkFn):linkFn&&addLinkFns(linkFn.pre,linkFn.post)}catch(e){$exceptionHandler(e,startingTag($compileNode))}directive.terminal&&(nodeLinkFn.terminal=!0,terminalPriority=Math.max(terminalPriority,directive.priority))}return nodeLinkFn.scope=newScopeDirective&&newScopeDirective.scope,nodeLinkFn.transclude=transcludeDirective&&childTranscludeFn,nodeLinkFn}function addDirective(tDirectives,name,location,maxPriority){var match=!1;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)&&(tDirectives.push(directive),match=!0)}catch(e){$exceptionHandler(e)}return match}function mergeTemplateAttributes(dst,src){var srcAttr=src.$attr,dstAttr=dst.$attr,$element=dst.$$element;forEach(dst,function(value,key){"$"!=key.charAt(0)&&(src[key]&&(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):"$"==key.charAt(0)||dst.hasOwnProperty(key)||(dst[key]=value,dstAttr[key]=srcAttr[key])})}function compileTemplateUrl(directives,beforeTemplateNodeLinkFn,$compileNode,tAttrs,$rootElement,replace,childTranscludeFn){var afterTemplateNodeLinkFn,afterTemplateChildLinkFn,linkQueue=[],beforeTemplateCompileNode=$compileNode[0],origAsyncDirective=directives.shift(),derivedSyncDirective=extend({},origAsyncDirective,{controller:null,templateUrl:null,transclude:null,scope:null}),templateUrl=isFunction(origAsyncDirective.templateUrl)?origAsyncDirective.templateUrl($compileNode,tAttrs):origAsyncDirective.templateUrl;return $compileNode.html(""),$http.get(templateUrl,{cache:$templateCache}).success(function(content){var compileNode,tempTemplateAttrs,$template;if(content=denormalizeTemplate(content),replace){if($template=jqLite("<div>"+trim(content)+"</div>").contents(),compileNode=$template[0],1!=$template.length||1!==compileNode.nodeType)throw new Error(MULTI_ROOT_TEMPLATE_ERROR+content);tempTemplateAttrs={$attr:{}},replaceWith($rootElement,$compileNode,compileNode),collectDirectives(compileNode,directives,tempTemplateAttrs),mergeTemplateAttributes(tAttrs,tempTemplateAttrs)}else compileNode=beforeTemplateCompileNode,$compileNode.html(content);for(directives.unshift(derivedSyncDirective),afterTemplateNodeLinkFn=applyDirectivesToNode(directives,compileNode,tAttrs,childTranscludeFn),afterTemplateChildLinkFn=compileNodes($compileNode[0].childNodes,childTranscludeFn);linkQueue.length;){var scope=linkQueue.shift(),beforeTemplateLinkNode=linkQueue.shift(),linkRootElement=linkQueue.shift(),controller=linkQueue.shift(),linkNode=compileNode;beforeTemplateLinkNode!==beforeTemplateCompileNode&&(linkNode=JQLiteClone(compileNode),replaceWith(linkRootElement,jqLite(beforeTemplateLinkNode),linkNode)),afterTemplateNodeLinkFn(function(){beforeTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,linkNode,$rootElement,controller)},scope,linkNode,$rootElement,controller)}linkQueue=null}).error(function(response,code,headers,config){throw Error("Failed to load template: "+config.url)}),function(ignoreChildLinkFn,scope,node,rootElement,controller){linkQueue?(linkQueue.push(scope),linkQueue.push(node),linkQueue.push(rootElement),linkQueue.push(controller)):afterTemplateNodeLinkFn(function(){beforeTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,node,rootElement,controller)},scope,node,rootElement,controller)}}function byPriority(a,b){return b.priority-a.priority}function assertNoDuplicate(what,previousDirective,directive,element){if(previousDirective)throw Error("Multiple directives ["+previousDirective.name+", "+directive.name+"] asking for "+what+" on: "+startingTag(element))}function addTextInterpolateDirective(directives,text){var interpolateFn=$interpolate(text,!0);interpolateFn&&directives.push({priority:0,compile:valueFn(function(scope,node){var parent=node.parent(),bindings=parent.data("$binding")||[];bindings.push(interpolateFn),safeAddClass(parent.data("$binding",bindings),"ng-binding"),scope.$watch(interpolateFn,function(value){node[0].nodeValue=value})})})}function addAttrInterpolateDirective(node,directives,value,name){var interpolateFn=$interpolate(value,!0);interpolateFn&&directives.push({priority:100,compile:valueFn(function(scope,element,attr){var $$observers=attr.$$observers||(attr.$$observers={});interpolateFn=$interpolate(attr[name],!0),interpolateFn&&(attr[name]=interpolateFn(scope),($$observers[name]||($$observers[name]=[])).$$inter=!0,(attr.$$observers&&attr.$$observers[name].$$scope||scope).$watch(interpolateFn,function(value){attr.$set(name,value)}))})})}function replaceWith($rootElement,$element,newNode){var i,ii,oldNode=$element[0],parent=oldNode.parentNode;if($rootElement)for(i=0,ii=$rootElement.length;ii>i;i++)if($rootElement[i]==oldNode){$rootElement[i]=newNode;break}parent&&parent.replaceChild(newNode,oldNode),newNode[jqLite.expando]=oldNode[jqLite.expando],$element[0]=newNode}var Attributes=function(element,attr){this.$$element=element,this.$attr=attr||{}};Attributes.prototype={$normalize:directiveNormalize,$set:function(key,value,writeAttr,attrName){var normalizedVal,booleanKey=getBooleanAttrName(this.$$element[0],key),$$observers=this.$$observers;booleanKey&&(this.$$element.prop(key,value),attrName=booleanKey),this[key]=value,attrName?this.$attr[key]=attrName:(attrName=this.$attr[key],attrName||(this.$attr[key]=attrName=snake_case(key,"-"))),"A"===nodeName_(this.$$element[0])&&"href"===key&&(urlSanitizationNode.setAttribute("href",value),normalizedVal=urlSanitizationNode.href,normalizedVal.match(urlSanitizationWhitelist)||(this[key]=value="unsafe:"+normalizedVal)),writeAttr!==!1&&(null===value||value===undefined?this.$$element.removeAttr(attrName):this.$$element.attr(attrName,value)),$$observers&&forEach($$observers[key],function(fn){try{fn(value)}catch(e){$exceptionHandler(e)}})},$observe:function(key,fn){var attrs=this,$$observers=attrs.$$observers||(attrs.$$observers={}),listeners=$$observers[key]||($$observers[key]=[]);return listeners.push(fn),$rootScope.$evalAsync(function(){listeners.$$inter||fn(attrs[key])}),fn}};var urlSanitizationNode=$document[0].createElement("a"),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}]}function directiveNormalize(name){return camelCase(name.replace(PREFIX_REGEXP,""))}function $ControllerProvider(){var controllers={},CNTRL_REG=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(name,constructor){isObject(name)?extend(controllers,name):controllers[name]=constructor},this.$get=["$injector","$window",function($injector,$window){return function(expression,locals){var instance,match,constructor,identifier;if(isString(expression)&&(match=expression.match(CNTRL_REG),constructor=match[1],identifier=match[3],expression=controllers.hasOwnProperty(constructor)?controllers[constructor]:getter(locals.$scope,constructor,!0)||getter($window,constructor,!0),assertArgFn(expression,constructor,!0)),instance=$injector.instantiate(expression,locals),identifier){if("object"!=typeof locals.$scope)throw new Error('Can not export controller as "'+identifier+'". No scope object provided!');locals.$scope[identifier]=instance}return 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 $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",function($parse,$exceptionHandler){function $interpolate(text,mustHaveExpression){for(var startIndex,endIndex,fn,exp,index=0,parts=[],length=text.length,hasInterpolation=!1,concat=[];length>index;)-1!=(startIndex=text.indexOf(startSymbol,index))&&-1!=(endIndex=text.indexOf(endSymbol,startIndex+startSymbolLength))?(index!=startIndex&&parts.push(text.substring(index,startIndex)),parts.push(fn=$parse(exp=text.substring(startIndex+startSymbolLength,endIndex))),fn.exp=exp,index=endIndex+endSymbolLength,hasInterpolation=!0):(index!=length&&parts.push(text.substring(index)),index=length);return(length=parts.length)||(parts.push(""),length=1),!mustHaveExpression||hasInterpolation?(concat.length=length,fn=function(context){try{for(var part,i=0,ii=length;ii>i;i++)"function"==typeof(part=parts[i])&&(part=part(context),null==part||part==undefined?part="":"string"!=typeof part&&(part=toJson(part))),concat[i]=part;return concat.join("")}catch(err){var newErr=new Error("Error while interpolating: "+text+"\n"+err.toString());$exceptionHandler(newErr)}},fn.exp=text,fn.parts=parts,fn):void 0}var startSymbolLength=startSymbol.length,endSymbolLength=endSymbol.length;return $interpolate.startSymbol=function(){return startSymbol},$interpolate.endSymbol=function(){return endSymbol},$interpolate}]}function encodePath(path){for(var segments=path.split("/"),i=segments.length;i--;)segments[i]=encodeUriSegment(segments[i]);return segments.join("/")}function matchUrl(url,obj){var match=SERVER_MATCH.exec(url);obj.$$protocol=match[1],obj.$$host=match[3],obj.$$port=int(match[5])||DEFAULT_PORTS[match[1]]||null}function matchAppUrl(url,obj){var match=PATH_MATCH.exec(url);obj.$$path=decodeURIComponent(match[1]),obj.$$search=parseKeyValue(match[3]),obj.$$hash=decodeURIComponent(match[5]||""),obj.$$path&&"/"!=obj.$$path.charAt(0)&&(obj.$$path="/"+obj.$$path)}function beginsWith(begin,whole,otherwise){return 0==whole.indexOf(begin)?whole.substr(begin.length):otherwise}function stripHash(url){var index=url.indexOf("#");return-1==index?url:url.substr(0,index)}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){basePrefix=basePrefix||"";var appBaseNoFile=stripFile(appBase);this.$$parse=function(url){var parsed={};matchUrl(url,parsed);var pathUrl=beginsWith(appBaseNoFile,url);if(!isString(pathUrl))throw Error('Invalid url "'+url+'", missing path prefix "'+appBaseNoFile+'".');matchAppUrl(pathUrl,parsed),extend(this,parsed),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.$$rewrite=function(url){var appUrl,prevAppUrl;return(appUrl=beginsWith(appBase,url))!==undefined?(prevAppUrl=appUrl,(appUrl=beginsWith(basePrefix,appUrl))!==undefined?appBaseNoFile+(beginsWith("/",appUrl)||appUrl):appBase+prevAppUrl):(appUrl=beginsWith(appBaseNoFile,url))!==undefined?appBaseNoFile+appUrl:appBaseNoFile==url+"/"?appBaseNoFile:void 0}}function LocationHashbangUrl(appBase,hashPrefix){var appBaseNoFile=stripFile(appBase);this.$$parse=function(url){matchUrl(url,this);var withoutBaseUrl=beginsWith(appBase,url)||beginsWith(appBaseNoFile,url);
if(!isString(withoutBaseUrl))throw new Error('Invalid url "'+url+'", does not start with "'+appBase+'".');var withoutHashUrl="#"==withoutBaseUrl.charAt(0)?beginsWith(hashPrefix,withoutBaseUrl):withoutBaseUrl;if(!isString(withoutHashUrl))throw new Error('Invalid url "'+url+'", missing hash prefix "'+hashPrefix+'".');matchAppUrl(withoutHashUrl,this),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.$$rewrite=function(url){return stripHash(appBase)==stripHash(url)?url:void 0}}function LocationHashbangInHtml5Url(appBase,hashPrefix){LocationHashbangUrl.apply(this,arguments);var appBaseNoFile=stripFile(appBase);this.$$rewrite=function(url){var appUrl;return appBase==stripHash(url)?url:(appUrl=beginsWith(appBaseNoFile,url))?appBase+hashPrefix+appUrl:appBaseNoFile===url+"/"?appBaseNoFile:void 0}}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=!1;this.hashPrefix=function(prefix){return isDefined(prefix)?(hashPrefix=prefix,this):hashPrefix},this.html5Mode=function(mode){return isDefined(mode)?(html5Mode=mode,this):html5Mode},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function($rootScope,$browser,$sniffer,$rootElement){function afterLocationChange(oldUrl){$rootScope.$broadcast("$locationChangeSuccess",$location.absUrl(),oldUrl)}var $location,LocationMode,appBase,baseHref=$browser.baseHref(),initialUrl=$browser.url();html5Mode?(appBase=baseHref?serverBase(initialUrl)+baseHref:initialUrl,LocationMode=$sniffer.history?LocationHtml5Url:LocationHashbangInHtml5Url):(appBase=stripHash(initialUrl),LocationMode=LocationHashbangUrl),$location=new LocationMode(appBase,"#"+hashPrefix),$location.$$parse($location.$$rewrite(initialUrl)),$rootElement.bind("click",function(event){if(!event.ctrlKey&&!event.metaKey&&2!=event.which){for(var elm=jqLite(event.target);"a"!==lowercase(elm[0].nodeName);)if(elm[0]===$rootElement[0]||!(elm=elm.parent())[0])return;var absHref=elm.prop("href"),rewrittenUrl=$location.$$rewrite(absHref);absHref&&!elm.attr("target")&&rewrittenUrl&&!event.isDefaultPrevented()&&(event.preventDefault(),rewrittenUrl!=$browser.url()&&($location.$$parse(rewrittenUrl),$rootScope.$apply(),window.angular["ff-684208-preventDefault"]=!0))}}),$location.absUrl()!=initialUrl&&$browser.url($location.absUrl(),!0),$browser.onUrlChange(function(newUrl){if($location.absUrl()!=newUrl){if($rootScope.$broadcast("$locationChangeStart",newUrl,$location.absUrl()).defaultPrevented)return $browser.url($location.absUrl()),void 0;$rootScope.$evalAsync(function(){var oldUrl=$location.absUrl();$location.$$parse(newUrl),afterLocationChange(oldUrl)}),$rootScope.$$phase||$rootScope.$digest()}});var changeCounter=0;return $rootScope.$watch(function(){var oldUrl=$browser.url(),currentReplace=$location.$$replace;return changeCounter&&oldUrl==$location.absUrl()||(changeCounter++,$rootScope.$evalAsync(function(){$rootScope.$broadcast("$locationChangeStart",$location.absUrl(),oldUrl).defaultPrevented?$location.$$parse(oldUrl):($browser.url($location.absUrl(),currentReplace),afterLocationChange(oldUrl))})),$location.$$replace=!1,changeCounter}),$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;return logFn.apply?function(){var args=[];return forEach(arguments,function(arg){args.push(formatError(arg))}),logFn.apply(console,args)}:function(arg1,arg2){logFn(arg1,arg2)}}return{log:consoleLog("log"),warn:consoleLog("warn"),info:consoleLog("info"),error:consoleLog("error"),debug:function(){var fn=consoleLog("debug");return function(){debug&&fn.apply(self,arguments)}}()}}]}function lex(text,csp){function is(chars){return-1!=chars.indexOf(ch)}function was(chars){return-1!=chars.indexOf(lastCh)}function peek(i){var num=i||1;return index+num<text.length?text.charAt(index+num):!1}function isNumber(ch){return ch>="0"&&"9">=ch}function isWhitespace(ch){return" "==ch||"\r"==ch||"	"==ch||"\n"==ch||""==ch||" "==ch}function isIdent(ch){return ch>="a"&&"z">=ch||ch>="A"&&"Z">=ch||"_"==ch||"$"==ch}function isExpOperator(ch){return"-"==ch||"+"==ch||isNumber(ch)}function throwError(error,start,end){throw end=end||index,Error("Lexer Error: "+error+" at column"+(isDefined(start)?"s "+start+"-"+index+" ["+text.substring(start,end)+"]":" "+end)+" in expression ["+text+"].")}function readNumber(){for(var number="",start=index;index<text.length;){var ch=lowercase(text.charAt(index));if("."==ch||isNumber(ch))number+=ch;else{var peekCh=peek();if("e"==ch&&isExpOperator(peekCh))number+=ch;else if(isExpOperator(ch)&&peekCh&&isNumber(peekCh)&&"e"==number.charAt(number.length-1))number+=ch;else{if(!isExpOperator(ch)||peekCh&&isNumber(peekCh)||"e"!=number.charAt(number.length-1))break;throwError("Invalid exponent")}}index++}number=1*number,tokens.push({index:start,text:number,json:!0,fn:function(){return number}})}function readIdent(){for(var lastDot,peekIndex,methodName,ch,ident="",start=index;index<text.length&&(ch=text.charAt(index),"."==ch||isIdent(ch)||isNumber(ch));)"."==ch&&(lastDot=index),ident+=ch,index++;if(lastDot)for(peekIndex=index;peekIndex<text.length;){if(ch=text.charAt(peekIndex),"("==ch){methodName=ident.substr(lastDot-start+1),ident=ident.substr(0,lastDot-start),index=peekIndex;break}if(!isWhitespace(ch))break;peekIndex++}var token={index:start,text:ident};if(OPERATORS.hasOwnProperty(ident))token.fn=token.json=OPERATORS[ident];else{var getter=getterFn(ident,csp);token.fn=extend(function(self,locals){return getter(self,locals)},{assign:function(self,value){return setter(self,ident,value)}})}tokens.push(token),methodName&&(tokens.push({index:lastDot,text:".",json:!1}),tokens.push({index:lastDot+1,text:methodName,json:!1}))}function readString(quote){var start=index;index++;for(var string="",rawString=quote,escape=!1;index<text.length;){var ch=text.charAt(index);if(rawString+=ch,escape){if("u"==ch){var hex=text.substring(index+1,index+5);hex.match(/[\da-f]{4}/i)||throwError("Invalid unicode escape [\\u"+hex+"]"),index+=4,string+=String.fromCharCode(parseInt(hex,16))}else{var rep=ESCAPE[ch];string+=rep?rep:ch}escape=!1}else if("\\"==ch)escape=!0;else{if(ch==quote)return index++,tokens.push({index:start,text:rawString,string:string,json:!0,fn:function(){return string}}),void 0;string+=ch}index++}throwError("Unterminated quote",start)}for(var token,ch,tokens=[],index=0,json=[],lastCh=":";index<text.length;){if(ch=text.charAt(index),is("\"'"))readString(ch);else if(isNumber(ch)||is(".")&&isNumber(peek()))readNumber();else if(isIdent(ch))readIdent(),was("{,")&&"{"==json[0]&&(token=tokens[tokens.length-1])&&(token.json=-1==token.text.indexOf("."));else if(is("(){}[].,;:?"))tokens.push({index:index,text:ch,json:was(":[,")&&is("{[")||is("}]:,")}),is("{[")&&json.unshift(ch),is("}]")&&json.shift(),index++;else{if(isWhitespace(ch)){index++;continue}var ch2=ch+peek(),ch3=ch2+peek(2),fn=OPERATORS[ch],fn2=OPERATORS[ch2],fn3=OPERATORS[ch3];fn3?(tokens.push({index:index,text:ch3,fn:fn3}),index+=3):fn2?(tokens.push({index:index,text:ch2,fn:fn2}),index+=2):fn?(tokens.push({index:index,text:ch,fn:fn,json:was("[,:")&&is("+-")}),index+=1):throwError("Unexpected next character ",index,index+1)}lastCh=ch}return tokens}function parser(text,json,$filter,csp){function throwError(msg,token){throw Error("Syntax Error: Token '"+token.text+"' "+msg+" at column "+(token.index+1)+" of the expression ["+text+"] starting at ["+text.substring(token.index)+"].")}function peekToken(){if(0===tokens.length)throw Error("Unexpected end of expression: "+text);return tokens[0]}function peek(e1,e2,e3,e4){if(tokens.length>0){var token=tokens[0],t=token.text;if(t==e1||t==e2||t==e3||t==e4||!e1&&!e2&&!e3&&!e4)return token}return!1}function expect(e1,e2,e3,e4){var token=peek(e1,e2,e3,e4);return token?(json&&!token.json&&throwError("is not valid json",token),tokens.shift(),token):!1}function consume(e1){expect(e1)||throwError("is unexpected, expecting ["+e1+"]",peek())}function unaryFn(fn,right){return extend(function(self,locals){return fn(self,locals,right)},{constant:right.constant})}function ternaryFn(left,middle,right){return extend(function(self,locals){return left(self,locals)?middle(self,locals):right(self,locals)},{constant:left.constant&&middle.constant&&right.constant})}function binaryFn(left,fn,right){return extend(function(self,locals){return fn(self,locals,left,right)},{constant:left.constant&&right.constant})}function statements(){for(var statements=[];;)if(tokens.length>0&&!peek("}",")",";","]")&&statements.push(filterChain()),!expect(";"))return 1==statements.length?statements[0]:function(self,locals){for(var value,i=0;i<statements.length;i++){var statement=statements[i];statement&&(value=statement(self,locals))}return value}}function _filterChain(){for(var token,left=expression();;){if(!(token=expect("|")))return left;left=binaryFn(left,token.fn,filter())}}function filter(){for(var token=expect(),fn=$filter(token.text),argsFn=[];;){if(!(token=expect(":"))){var fnInvoke=function(self,locals,input){for(var args=[input],i=0;i<argsFn.length;i++)args.push(argsFn[i](self,locals));return fn.apply(self,args)};return function(){return fnInvoke}}argsFn.push(expression())}}function expression(){return assignment()}function _assignment(){var right,token,left=ternary();return(token=expect("="))?(left.assign||throwError("implies assignment but ["+text.substring(0,token.index)+"] can not be assigned to",token),right=ternary(),function(scope,locals){return left.assign(scope,right(scope,locals),locals)}):left}function ternary(){var middle,token,left=logicalOR();return(token=expect("?"))?(middle=ternary(),(token=expect(":"))?ternaryFn(left,middle,ternary()):(throwError("expected :",token),void 0)):left}function logicalOR(){for(var token,left=logicalAND();;){if(!(token=expect("||")))return left;left=binaryFn(left,token.fn,logicalAND())}}function logicalAND(){var token,left=equality();return(token=expect("&&"))&&(left=binaryFn(left,token.fn,logicalAND())),left}function equality(){var token,left=relational();return(token=expect("==","!=","===","!=="))&&(left=binaryFn(left,token.fn,equality())),left}function relational(){var token,left=additive();return(token=expect("<",">","<=",">="))&&(left=binaryFn(left,token.fn,relational())),left}function additive(){for(var token,left=multiplicative();token=expect("+","-");)left=binaryFn(left,token.fn,multiplicative());return left}function multiplicative(){for(var token,left=unary();token=expect("*","/","%");)left=binaryFn(left,token.fn,unary());return left}function unary(){var token;return expect("+")?primary():(token=expect("-"))?binaryFn(ZERO,token.fn,unary()):(token=expect("!"))?unaryFn(token.fn,unary()):primary()}function primary(){var primary;if(expect("("))primary=filterChain(),consume(")");else if(expect("["))primary=arrayDeclaration();else if(expect("{"))primary=object();else{var token=expect();primary=token.fn,primary||throwError("not a primary expression",token),token.json&&(primary.constant=primary.literal=!0)}for(var next,context;next=expect("(","[",".");)"("===next.text?(primary=functionCall(primary,context),context=null):"["===next.text?(context=primary,primary=objectIndex(primary)):"."===next.text?(context=primary,primary=fieldAccess(primary)):throwError("IMPOSSIBLE");return primary}function _fieldAccess(object){var field=expect().text,getter=getterFn(field,csp);return extend(function(scope,locals,self){return getter(self||object(scope,locals),locals)},{assign:function(scope,value,locals){return setter(object(scope,locals),field,value)}})}function _objectIndex(obj){var indexFn=expression();return consume("]"),extend(function(self,locals){var v,p,o=obj(self,locals),i=indexFn(self,locals);return o?(v=o[i],v&&v.then&&(p=v,"$$v"in v||(p.$$v=undefined,p.then(function(val){p.$$v=val})),v=v.$$v),v):undefined},{assign:function(self,value,locals){return obj(self,locals)[indexFn(self,locals)]=value}})}function _functionCall(fn,contextGetter){var argsFn=[];if(")"!=peekToken().text)do argsFn.push(expression());while(expect(","));return consume(")"),function(scope,locals){for(var args=[],context=contextGetter?contextGetter(scope,locals):scope,i=0;i<argsFn.length;i++)args.push(argsFn[i](scope,locals));var fnPtr=fn(scope,locals,context)||noop;return fnPtr.apply?fnPtr.apply(context,args):fnPtr(args[0],args[1],args[2],args[3],args[4])}}function arrayDeclaration(){var elementFns=[],allConstant=!0;if("]"!=peekToken().text)do{var elementFn=expression();elementFns.push(elementFn),elementFn.constant||(allConstant=!1)}while(expect(","));return consume("]"),extend(function(self,locals){for(var array=[],i=0;i<elementFns.length;i++)array.push(elementFns[i](self,locals));return array},{literal:!0,constant:allConstant})}function object(){var keyValues=[],allConstant=!0;if("}"!=peekToken().text)do{var token=expect(),key=token.string||token.text;consume(":");var value=expression();keyValues.push({key:key,value:value}),value.constant||(allConstant=!1)}while(expect(","));return consume("}"),extend(function(self,locals){for(var object={},i=0;i<keyValues.length;i++){var keyValue=keyValues[i];object[keyValue.key]=keyValue.value(self,locals)}return object},{literal:!0,constant:allConstant})}var value,ZERO=valueFn(0),tokens=lex(text,csp),assignment=_assignment,functionCall=_functionCall,fieldAccess=_fieldAccess,objectIndex=_objectIndex,filterChain=_filterChain;return json?(assignment=logicalOR,functionCall=fieldAccess=objectIndex=filterChain=function(){throwError("is not valid json",{text:text,index:0})},value=primary()):value=statements(),0!==tokens.length&&throwError("is an unexpected token",tokens[0]),value.literal=!!value.literal,value.constant=!!value.constant,value}function setter(obj,path,setValue){for(var element=path.split("."),i=0;element.length>1;i++){var key=element.shift(),propertyObj=obj[key];propertyObj||(propertyObj={},obj[key]=propertyObj),obj=propertyObj}return obj[element.shift()]=setValue,setValue}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 cspSafeGetterFn(key0,key1,key2,key3,key4){return function(scope,locals){var promise,pathVal=locals&&locals.hasOwnProperty(key0)?locals:scope;return null===pathVal||pathVal===undefined?pathVal:(pathVal=pathVal[key0],pathVal&&pathVal.then&&("$$v"in pathVal||(promise=pathVal,promise.$$v=undefined,promise.then(function(val){promise.$$v=val})),pathVal=pathVal.$$v),key1&&null!==pathVal&&pathVal!==undefined?(pathVal=pathVal[key1],pathVal&&pathVal.then&&("$$v"in pathVal||(promise=pathVal,promise.$$v=undefined,promise.then(function(val){promise.$$v=val})),pathVal=pathVal.$$v),key2&&null!==pathVal&&pathVal!==undefined?(pathVal=pathVal[key2],pathVal&&pathVal.then&&("$$v"in pathVal||(promise=pathVal,promise.$$v=undefined,promise.then(function(val){promise.$$v=val})),pathVal=pathVal.$$v),key3&&null!==pathVal&&pathVal!==undefined?(pathVal=pathVal[key3],pathVal&&pathVal.then&&("$$v"in pathVal||(promise=pathVal,promise.$$v=undefined,promise.then(function(val){promise.$$v=val})),pathVal=pathVal.$$v),key4&&null!==pathVal&&pathVal!==undefined?(pathVal=pathVal[key4],pathVal&&pathVal.then&&("$$v"in pathVal||(promise=pathVal,promise.$$v=undefined,promise.then(function(val){promise.$$v=val})),pathVal=pathVal.$$v),pathVal):pathVal):pathVal):pathVal):pathVal)}}function getterFn(path,csp){if(getterFnCache.hasOwnProperty(path))return getterFnCache[path];var fn,pathKeys=path.split("."),pathKeysLength=pathKeys.length;if(csp)fn=6>pathKeysLength?cspSafeGetterFn(pathKeys[0],pathKeys[1],pathKeys[2],pathKeys[3],pathKeys[4]):function(scope,locals){var val,i=0;do val=cspSafeGetterFn(pathKeys[i++],pathKeys[i++],pathKeys[i++],pathKeys[i++],pathKeys[i++])(scope,locals),locals=undefined,scope=val;while(pathKeysLength>i);return val};else{var code="var l, fn, p;\n";forEach(pathKeys,function(key,index){code+="if(s === null || s === undefined) return s;\nl=s;\ns="+(index?"s":'((k&&k.hasOwnProperty("'+key+'"))?k:s)')+'["'+key+'"];\nif (s && s.then) {\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n'}),code+="return s;",fn=Function("s","k",code),fn.toString=function(){return code}}return getterFnCache[path]=fn}function $ParseProvider(){var cache={};this.$get=["$filter","$sniffer",function($filter,$sniffer){return function(exp){switch(typeof exp){case"string":return cache.hasOwnProperty(exp)?cache[exp]:cache[exp]=parser(exp,!1,$filter,$sniffer.csp);case"function":return exp;default:return noop}}}]}function $QProvider(){this.$get=["$rootScope","$exceptionHandler",function($rootScope,$exceptionHandler){return qFactory(function(callback){$rootScope.$evalAsync(callback)},$exceptionHandler)}]}function qFactory(nextTick,exceptionHandler){function defaultCallback(value){return value}function defaultErrback(reason){return reject(reason)}function all(promises){var deferred=defer(),counter=0,results=isArray(promises)?[]:{};return forEach(promises,function(promise,key){counter++,ref(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 defer=function(){var value,deferred,pending=[];return deferred={resolve:function(val){if(pending){var callbacks=pending;pending=undefined,value=ref(val),callbacks.length&&nextTick(function(){for(var callback,i=0,ii=callbacks.length;ii>i;i++)callback=callbacks[i],value.then(callback[0],callback[1])})}},reject:function(reason){deferred.resolve(reject(reason))},promise:{then:function(callback,errback){var result=defer(),wrappedCallback=function(value){try{result.resolve((callback||defaultCallback)(value))}catch(e){exceptionHandler(e),result.reject(e)}},wrappedErrback=function(reason){try{result.resolve((errback||defaultErrback)(reason))}catch(e){exceptionHandler(e),result.reject(e)}};return pending?pending.push([wrappedCallback,wrappedErrback]):value.then(wrappedCallback,wrappedErrback),result.promise},always:function(callback){function makePromise(value,resolved){var result=defer();return resolved?result.resolve(value):result.reject(value),result.promise}function handleCallback(value,isResolved){var callbackOutput=null;try{callbackOutput=(callback||defaultCallback)()}catch(e){return makePromise(e,!1)}return callbackOutput&&callbackOutput.then?callbackOutput.then(function(){return makePromise(value,isResolved)},function(error){return makePromise(error,!1)}):makePromise(value,isResolved)}return this.then(function(value){return handleCallback(value,!0)},function(error){return handleCallback(error,!1)})}}}},ref=function(value){return value&&value.then?value:{then:function(callback){var result=defer();return nextTick(function(){result.resolve(callback(value))}),result.promise}}},reject=function(reason){return{then:function(callback,errback){var result=defer();return nextTick(function(){result.resolve((errback||defaultErrback)(reason))}),result.promise}}},when=function(value,callback,errback){var done,result=defer(),wrappedCallback=function(value){try{return(callback||defaultCallback)(value)}catch(e){return exceptionHandler(e),reject(e)}},wrappedErrback=function(reason){try{return(errback||defaultErrback)(reason)}catch(e){return exceptionHandler(e),reject(e)}};return nextTick(function(){ref(value).then(function(value){done||(done=!0,result.resolve(ref(value).then(wrappedCallback,wrappedErrback)))},function(reason){done||(done=!0,result.resolve(wrappedErrback(reason)))})}),result.promise};return{defer:defer,reject:reject,when:when,all:all}}function $RouteProvider(){var routes={};this.when=function(path,route){if(routes[path]=extend({reloadOnSearch:!0,caseInsensitiveMatch:!1},route),path){var redirectPath="/"==path[path.length-1]?path.substr(0,path.length-1):path+"/";routes[redirectPath]={redirectTo:path}}return this},this.otherwise=function(params){return this.when(null,params),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache",function($rootScope,$location,$routeParams,$q,$injector,$http,$templateCache){function switchRouteMatcher(on,when,whenProperties){when="^"+when.replace(/[-\/\\^$:*+?.()|[\]{}]/g,"\\$&")+"$";for(var paramMatch,regex="",params=[],dst={},re=/\\([:*])(\w+)/g,lastMatchedIndex=0;null!==(paramMatch=re.exec(when));){switch(regex+=when.slice(lastMatchedIndex,paramMatch.index),paramMatch[1]){case":":regex+="([^\\/]*)";break;case"*":regex+="(.*)"}params.push(paramMatch[2]),lastMatchedIndex=re.lastIndex}regex+=when.substr(lastMatchedIndex);var match=on.match(new RegExp(regex,whenProperties.caseInsensitiveMatch?"i":""));return match&&forEach(params,function(name,index){dst[name]=match[index+1]}),match?dst:null}function updateRoute(){var next=parseRoute(),last=$route.current;next&&last&&next.$$route===last.$$route&&equals(next.pathParams,last.pathParams)&&!next.reloadOnSearch&&!forceReload?(last.params=next.params,copy(last.params,$routeParams),$rootScope.$broadcast("$routeUpdate",last)):(next||last)&&(forceReload=!1,$rootScope.$broadcast("$routeChangeStart",next,last),$route.current=next,next&&next.redirectTo&&(isString(next.redirectTo)?$location.path(interpolate(next.redirectTo,next.params)).search(next.params).replace():$location.url(next.redirectTo(next.pathParams,$location.path(),$location.search())).replace()),$q.when(next).then(function(){if(next){var template,locals=extend({},next.resolve);return forEach(locals,function(value,key){locals[key]=isString(value)?$injector.get(value):$injector.invoke(value)}),isDefined(template=next.template)?isFunction(template)&&(template=template(next.params)):isDefined(template=next.templateUrl)&&(isFunction(template)&&(template=template(next.params)),isDefined(template)&&(next.loadedTemplateUrl=template,template=$http.get(template,{cache:$templateCache}).then(function(response){return response.data}))),isDefined(template)&&(locals.$template=template),$q.all(locals)}}).then(function(locals){next==$route.current&&(next&&(next.locals=locals,copy(next.params,$routeParams)),$rootScope.$broadcast("$routeChangeSuccess",next,last))},function(error){next==$route.current&&$rootScope.$broadcast("$routeChangeError",next,last,error)}))}function parseRoute(){var params,match;return forEach(routes,function(route,path){!match&&(params=switchRouteMatcher($location.path(),path,route))&&(match=inherit(route,{params:extend({},$location.search(),params),pathParams:params}),match.$$route=route)}),match||routes[null]&&inherit(routes[null],{params:{},pathParams:{}})}function interpolate(string,params){var result=[];return 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 forceReload=!1,$route={routes:routes,reload:function(){forceReload=!0,$rootScope.$evalAsync(updateRoute)}};return $rootScope.$on("$locationChangeSuccess",updateRoute),$route}]}function $RouteParamsProvider(){this.$get=valueFn({})}function $RootScopeProvider(){var TTL=10;this.digestTtl=function(value){return arguments.length&&(TTL=value),TTL},this.$get=["$injector","$exceptionHandler","$parse",function($injector,$exceptionHandler,$parse){function Scope(){this.$id=nextUid(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this["this"]=this.$root=this,this.$$destroyed=!1,this.$$asyncQueue=[],this.$$listeners={},this.$$isolateBindings={}}function beginPhase(phase){if($rootScope.$$phase)throw Error($rootScope.$$phase+" already in progress");$rootScope.$$phase=phase}function clearPhase(){$rootScope.$$phase=null}function compileToFn(exp,name){var fn=$parse(exp);return assertArgFn(fn,name),fn}function initWatchVal(){}Scope.prototype={$new:function(isolate){var Child,child;if(isFunction(isolate))throw Error("API-CHANGE: Use $controller to instantiate controllers.");return isolate?(child=new Scope,child.$root=this.$root):(Child=function(){},Child.prototype=this,child=new Child,child.$id=nextUid()),child["this"]=child,child.$$listeners={},child.$parent=this,child.$$watchers=child.$$nextSibling=child.$$childHead=child.$$childTail=null,child.$$prevSibling=this.$$childTail,this.$$childHead?(this.$$childTail.$$nextSibling=child,this.$$childTail=child):this.$$childHead=this.$$childTail=child,child},$watch:function(watchExp,listener,objectEquality){var scope=this,get=compileToFn(watchExp,"watch"),array=scope.$$watchers,watcher={fn:listener,last:initWatchVal,get:get,exp:watchExp,eq:!!objectEquality};if(!isFunction(listener)){var listenFn=compileToFn(listener||noop,"listener");watcher.fn=function(newVal,oldVal,scope){listenFn(scope)}}if("string"==typeof watchExp&&get.constant){var originalFn=watcher.fn;watcher.fn=function(newVal,oldVal,scope){originalFn.call(this,newVal,oldVal,scope),arrayRemove(array,watcher)}}return array||(array=scope.$$watchers=[]),array.unshift(watcher),function(){arrayRemove(array,watcher)}},$watchCollection:function(obj,listener){function $watchCollectionWatch(){newValue=objGetter(self);var newLength,key;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++)oldValue[i]!==newValue[i]&&(changeDetected++,oldValue[i]=newValue[i])}else{oldValue!==internalObject&&(oldValue=internalObject={},oldLength=0,changeDetected++),newLength=0;for(key in newValue)newValue.hasOwnProperty(key)&&(newLength++,oldValue.hasOwnProperty(key)?oldValue[key]!==newValue[key]&&(changeDetected++,oldValue[key]=newValue[key]):(oldLength++,oldValue[key]=newValue[key],changeDetected++));if(oldLength>newLength){changeDetected++;for(key in oldValue)oldValue.hasOwnProperty(key)&&!newValue.hasOwnProperty(key)&&(oldLength--,delete oldValue[key])}}else oldValue!==newValue&&(oldValue=newValue,changeDetected++);return changeDetected}function $watchCollectionAction(){listener(newValue,oldValue,self)}var oldValue,newValue,self=this,changeDetected=0,objGetter=$parse(obj),internalArray=[],internalObject={},oldLength=0;return this.$watch($watchCollectionWatch,$watchCollectionAction)},$digest:function(){var watch,value,last,watchers,length,dirty,next,current,logIdx,logMsg,asyncQueue=this.$$asyncQueue,ttl=TTL,target=this,watchLog=[];beginPhase("$digest");do{for(dirty=!1,current=target;asyncQueue.length;)try{current.$eval(asyncQueue.shift())}catch(e){$exceptionHandler(e)}do{if(watchers=current.$$watchers)for(length=watchers.length;length--;)try{watch=watchers[length],(value=watch.get(current))===(last=watch.last)||(watch.eq?equals(value,last):"number"==typeof value&&"number"==typeof last&&isNaN(value)&&isNaN(last))||(dirty=!0,watch.last=watch.eq?copy(value):value,watch.fn(value,last===initWatchVal?value:last,current),5>ttl&&(logIdx=4-ttl,watchLog[logIdx]||(watchLog[logIdx]=[]),logMsg=isFunction(watch.exp)?"fn: "+(watch.exp.name||watch.exp.toString()):watch.exp,logMsg+="; newVal: "+toJson(value)+"; oldVal: "+toJson(last),watchLog[logIdx].push(logMsg)))}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&&!ttl--)throw clearPhase(),Error(TTL+" $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: "+toJson(watchLog))}while(dirty||asyncQueue.length);clearPhase()},$destroy:function(){if($rootScope!=this&&!this.$$destroyed){var parent=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,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.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null}},$eval:function(expr,locals){return $parse(expr)(this,locals)},$evalAsync:function(expr){this.$$asyncQueue.push(expr)},$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}}},$on:function(name,listener){var namedListeners=this.$$listeners[name];return namedListeners||(this.$$listeners[name]=namedListeners=[]),namedListeners.push(listener),function(){namedListeners[indexOf(namedListeners,listener)]=null}},$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{if(namedListeners[i].apply(null,listenerArgs),stopPropagation)return event}catch(e){$exceptionHandler(e)}else namedListeners.splice(i,1),i--,length--;scope=scope.$parent}while(scope);return event},$broadcast:function(name){var listeners,i,length,target=this,current=target,next=target,event={name:name,targetScope:target,preventDefault:function(){event.defaultPrevented=!0},defaultPrevented:!1},listenerArgs=concat([event],arguments,1);do{for(current=next,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.$$childHead||current!==target&&current.$$nextSibling))for(;current!==target&&!(next=current.$$nextSibling);)current=current.$parent}while(current=next);return event}};var $rootScope=new Scope;return $rootScope}]}function $SnifferProvider(){this.$get=["$window","$document",function($window,$document){var vendorPrefix,match,eventSupport={},android=int((/android (\d+)/.exec(lowercase(($window.navigator||{}).userAgent))||[])[1]),document=$document[0]||{},vendorRegex=/^(Moz|webkit|O|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}transitions=!!("transition"in bodyStyle||vendorPrefix+"Transition"in bodyStyle),animations=!!("animation"in bodyStyle||vendorPrefix+"Animation"in bodyStyle)}return{history:!(!$window.history||!$window.history.pushState||4>android),hashchange:"onhashchange"in $window&&(!document.documentMode||document.documentMode>7),hasEvent:function(event){if("input"==event&&9==msie)return!1;if(isUndefined(eventSupport[event])){var divElm=document.createElement("div");eventSupport[event]="on"+event in divElm
}return eventSupport[event]},csp:document.securityPolicy?document.securityPolicy.isActive:!1,vendorPrefix:vendorPrefix,transitions:transitions,animations:animations}}]}function $WindowProvider(){this.$get=valueFn(window)}function parseHeaders(headers){var key,val,i,parsed={};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]+=", "+val:parsed[key]=val)}),parsed):parsed}function isSameDomain(requestUrl,locationUrl){var match=IS_SAME_DOMAIN_URL_MATCH.exec(requestUrl);if(null==match)return!0;var domain1={protocol:match[2],host:match[4],port:int(match[6])||DEFAULT_PORTS[match[2]]||null,relativeProtocol:match[2]===undefined||""===match[2]};match=SERVER_MATCH.exec(locationUrl);var domain2={protocol:match[1],host:match[3],port:int(match[5])||DEFAULT_PORTS[match[1]]||null};return(domain1.protocol==domain2.protocol||domain1.relativeProtocol)&&domain1.host==domain2.host&&(domain1.port==domain2.port||domain1.relativeProtocol&&domain2.port==DEFAULT_PORTS[domain2.protocol])}function headersGetter(headers){var headersObj=isObject(headers)?headers:undefined;return function(name){return headersObj||(headersObj=parseHeaders(headers)),name?headersObj[lowercase(name)]||null:headersObj}}function transformData(data,headers,fns){return isFunction(fns)?fns(data,headers):(forEach(fns,function(fn){data=fn(data,headers)}),data)}function isSuccess(status){return status>=200&&300>status}function $HttpProvider(){var JSON_START=/^\s*(\[|\{[^\{])/,JSON_END=/[\}\]]\s*$/,PROTECTION_PREFIX=/^\)\]\}',?\n/,CONTENT_TYPE_APPLICATION_JSON={"Content-Type":"application/json;charset=utf-8"},defaults=this.defaults={transformResponse:[function(data){return isString(data)&&(data=data.replace(PROTECTION_PREFIX,""),JSON_START.test(data)&&JSON_END.test(data)&&(data=fromJson(data,!0))),data}],transformRequest:[function(d){return isObject(d)&&!isFile(d)?toJson(d):d}],headers:{common:{Accept:"application/json, text/plain, */*"},post:CONTENT_TYPE_APPLICATION_JSON,put:CONTENT_TYPE_APPLICATION_JSON,patch:CONTENT_TYPE_APPLICATION_JSON},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},interceptorFactories=this.interceptors=[],responseInterceptorFactories=this.responseInterceptors=[];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,{data:transformData(response.data,response.headers,config.transformResponse)});return isSuccess(response.status)?resp:$q.reject(resp)}var config={transformRequest:defaults.transformRequest,transformResponse:defaults.transformResponse},headers={};extend(config,requestConfig),config.headers=headers,config.method=uppercase(config.method),extend(headers,defaults.headers.common,defaults.headers[lowercase(config.method)],requestConfig.headers);var xsrfValue=isSameDomain(config.url,$browser.url())?$browser.cookies()[config.xsrfCookieName||defaults.xsrfCookieName]:undefined;xsrfValue&&(headers[config.xsrfHeaderName||defaults.xsrfHeaderName]=xsrfValue);var serverRequest=function(config){var reqData=transformData(config.data,headersGetter(headers),config.transformRequest);return isUndefined(config.data)&&delete headers["Content-Type"],isUndefined(config.withCredentials)&&!isUndefined(defaults.withCredentials)&&(config.withCredentials=defaults.withCredentials),sendReq(config,reqData,headers).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,reqHeaders){function done(status,response,headersString){cache&&(isSuccess(status)?cache.put(url,[status,response,parseHeaders(headersString)]):cache.remove(url)),resolvePromise(response,status,headersString),$rootScope.$$phase||$rootScope.$apply()}function resolvePromise(response,status,headers){status=Math.max(status,0),(isSuccess(status)?deferred.resolve:deferred.reject)({data:response,status:status,headers:headersGetter(headers),config:config})}function removePendingReq(){var idx=indexOf($http.pendingRequests,config);-1!==idx&&$http.pendingRequests.splice(idx,1)}var cache,cachedResp,deferred=$q.defer(),promise=deferred.promise,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&&(cache=isObject(config.cache)?config.cache:isObject(defaults.cache)?defaults.cache:defaultCache),cache)if(cachedResp=cache.get(url)){if(cachedResp.then)return cachedResp.then(removePendingReq,removePendingReq),cachedResp;isArray(cachedResp)?resolvePromise(cachedResp[1],cachedResp[0],copy(cachedResp[2])):resolvePromise(cachedResp,200,{})}else cache.put(url,promise);return cachedResp||$httpBackend(config.method,url,reqData,done,reqHeaders,config.timeout,config.withCredentials,config.responseType),promise}function buildUrl(url,params){if(!params)return url;var parts=[];return forEachSorted(params,function(value,key){null!=value&&value!=undefined&&(isArray(value)||(value=[value]),forEach(value,function(v){isObject(v)&&(v=toJson(v)),parts.push(encodeUriQuery(key)+"="+encodeUriQuery(v))}))}),url+(-1==url.indexOf("?")?"?":"&")+parts.join("&")}var defaultCache=$cacheFactory("$http"),reversedInterceptors=[];return forEach(interceptorFactories,function(interceptorFactory){reversedInterceptors.unshift(isString(interceptorFactory)?$injector.get(interceptorFactory):$injector.invoke(interceptorFactory))}),forEach(responseInterceptorFactories,function(interceptorFactory,index){var responseFn=isString(interceptorFactory)?$injector.get(interceptorFactory):$injector.invoke(interceptorFactory);reversedInterceptors.splice(index,0,{response:function(response){return responseFn($q.when(response))},responseError:function(response){return responseFn($q.reject(response))}})}),$http.pendingRequests=[],createShortMethods("get","delete","head","jsonp"),createShortMethodsWithData("post","put"),$http.defaults=defaults,$http}]}function $HttpBackendProvider(){this.$get=["$browser","$window","$document",function($browser,$window,$document){return createHttpBackend($browser,XHR,$browser.defer,$window.angular.callbacks,$document[0],$window.location.protocol.replace(":",""))}]}function createHttpBackend($browser,XHR,$browserDefer,callbacks,rawDocument,locationProtocol){function jsonpReq(url,done){var script=rawDocument.createElement("script"),doneWrapper=function(){rawDocument.body.removeChild(script),done&&done()};return script.type="text/javascript",script.src=url,msie?script.onreadystatechange=function(){/loaded|complete/.test(script.readyState)&&doneWrapper()}:script.onload=script.onerror=doneWrapper,rawDocument.body.appendChild(script),doneWrapper}return function(method,url,post,callback,headers,timeout,withCredentials,responseType){function timeoutRequest(){status=-1,jsonpDone&&jsonpDone(),xhr&&xhr.abort()}function completeRequest(callback,status,response,headersString){var protocol=(url.match(SERVER_MATCH)||["",locationProtocol])[1];timeoutId&&$browserDefer.cancel(timeoutId),jsonpDone=xhr=null,status="file"==protocol?response?200:404:status,status=1223==status?204:status,callback(status,response,headersString),$browser.$$completeOutstandingRequest(noop)}var status;if($browser.$$incOutstandingRequestCount(),url=url||$browser.url(),"jsonp"==lowercase(method)){var callbackId="_"+(callbacks.counter++).toString(36);callbacks[callbackId]=function(data){callbacks[callbackId].data=data};var jsonpDone=jsonpReq(url.replace("JSON_CALLBACK","angular.callbacks."+callbackId),function(){callbacks[callbackId].data?completeRequest(callback,200,callbacks[callbackId].data):completeRequest(callback,status||-2),delete callbacks[callbackId]})}else{var xhr=new XHR;xhr.open(method,url,!0),forEach(headers,function(value,key){value&&xhr.setRequestHeader(key,value)}),xhr.onreadystatechange=function(){if(4==xhr.readyState){var responseHeaders=xhr.getAllResponseHeaders(),simpleHeaders=["Cache-Control","Content-Language","Content-Type","Expires","Last-Modified","Pragma"];responseHeaders||(responseHeaders="",forEach(simpleHeaders,function(header){var value=xhr.getResponseHeader(header);value&&(responseHeaders+=header+": "+value+"\n")})),completeRequest(callback,status||xhr.status,xhr.responseType?xhr.response:xhr.responseText,responseHeaders)}},withCredentials&&(xhr.withCredentials=!0),responseType&&(xhr.responseType=responseType),xhr.send(post||"")}if(timeout>0)var timeoutId=$browserDefer(timeoutRequest,timeout);else timeout&&timeout.then&&timeout.then(timeoutRequest)}}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 $TimeoutProvider(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function($rootScope,$browser,$q,$exceptionHandler){function timeout(fn,delay,invokeApply){var timeoutId,cleanup,deferred=$q.defer(),promise=deferred.promise,skipApply=isDefined(invokeApply)&&!invokeApply;return timeoutId=$browser.defer(function(){try{deferred.resolve(fn())}catch(e){deferred.reject(e),$exceptionHandler(e)}skipApply||$rootScope.$apply()},delay),cleanup=function(){delete deferreds[promise.$$timeoutId]},promise.$$timeoutId=timeoutId,deferreds[timeoutId]=deferred,promise.then(cleanup,cleanup),promise}var deferreds={};return timeout.cancel=function(promise){return promise&&promise.$$timeoutId in deferreds?(deferreds[promise.$$timeoutId].reject("canceled"),$browser.defer.cancel(promise.$$timeoutId)):!1},timeout}]}function $FilterProvider($provide){function register(name,factory){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,comperator){if(!isArray(array))return array;var predicates=[];switch(predicates.check=function(value){for(var j=0;j<predicates.length;j++)if(!predicates[j](value))return!1;return!0},typeof comperator){case"function":break;case"boolean":if(1==comperator){comperator=function(obj,text){return angular.equals(obj,text)};break}default:comperator=function(obj,text){return text=(""+text).toLowerCase(),(""+obj).toLowerCase().indexOf(text)>-1}}var search=function(obj,text){if("string"==typeof text&&"!"===text.charAt(0))return!search(obj,text.substr(1));switch(typeof obj){case"boolean":case"number":case"string":return comperator(obj,text);case"object":switch(typeof text){case"object":return comperator(obj,text);default:for(var objKey in obj)if("$"!==objKey.charAt(0)&&search(obj[objKey],text))return!0}return!1;case"array":for(var i=0;i<obj.length;i++)if(search(obj[i],text))return!0;return!1;default:return!1}};switch(typeof expression){case"boolean":case"number":case"string":expression={$:expression};case"object":for(var key in expression)"$"==key?!function(){if(expression[key]){var path=key;predicates.push(function(value){return search(value,expression[path])})}}():!function(){if(expression[key]){var path=key;predicates.push(function(value){return search(getter(value,path),expression[path])})}}();break;case"function":predicates.push(expression);break;default:return array}for(var filtered=[],j=0;j<array.length;j++){var value=array[j];predicates.check(value)&&filtered.push(value)}return filtered}}function currencyFilter($locale){var formats=$locale.NUMBER_FORMATS;return function(amount,currencySymbol){return isUndefined(currencySymbol)&&(currencySymbol=formats.CURRENCY_SYM),formatNumber(amount,formats.PATTERNS[1],formats.GROUP_SEP,formats.DECIMAL_SEP,2).replace(/\u00A4/g,currencySymbol)}}function numberFilter($locale){var formats=$locale.NUMBER_FORMATS;return function(number,fractionSize){return formatNumber(number,formats.PATTERNS[0],formats.GROUP_SEP,formats.DECIMAL_SEP,fractionSize)}}function formatNumber(number,pattern,groupSep,decimalSep,fractionSize){if(isNaN(number)||!isFinite(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?numStr="0":(formatedText=numStr,hasExponent=!0)}if(!hasExponent){var fractionLen=(numStr.split(DECIMAL_SEP)[1]||"").length;isUndefined(fractionSize)&&(fractionSize=Math.min(Math.max(pattern.minFrac,fractionLen),pattern.maxFrac));var pow=Math.pow(10,fractionSize);number=Math.round(number*pow)/pow;var fraction=(""+number).split(DECIMAL_SEP),whole=fraction[0];fraction=fraction[1]||"";var pos=0,lgroup=pattern.lgSize,group=pattern.gSize;if(whole.length>=lgroup+group){pos=whole.length-lgroup;for(var i=0;pos>i;i++)0===(pos-i)%group&&0!==i&&(formatedText+=groupSep),formatedText+=whole.charAt(i)}for(i=pos;i<whole.length;i++)0===(whole.length-i)%lgroup&&0!==i&&(formatedText+=groupSep),formatedText+=whole.charAt(i);for(;fraction.length<fractionSize;)fraction+="0";fractionSize&&"0"!==fractionSize&&(formatedText+=decimalSep+fraction.substr(0,fractionSize))}return parts.push(isNegative?pattern.negPre:pattern.posPre),parts.push(formatedText),parts.push(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 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){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 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){return toJson(object,!0)}}function limitToFilter(){return function(input,limit){if(!isArray(input)&&!isString(input))return input;if(limit=int(limit),isString(input))return limit?limit>=0?input.slice(0,limit):input.slice(limit,input.length):"";var i,n,out=[];for(limit>input.length?limit=input.length:limit<-input.length&&(limit=-input.length),limit>0?(i=0,n=limit):(i=input.length+limit,n=input.length);n>i;i++)out.push(input[i]);return out}}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 toBoolean(descending)?function(a,b){return comp(b,a)}:comp}function compare(v1,v2){var t1=typeof v1,t2=typeof v2;return t1==t2?("string"==t1&&(v1=v1.toLowerCase()),"string"==t1&&(v2=v2.toLowerCase()),v1===v2?0:v2>v1?-1:1):t2>t1?-1:1}if(!isArray(array))return array;if(!sortPredicate)return array;sortPredicate=isArray(sortPredicate)?sortPredicate:[sortPredicate],sortPredicate=map(sortPredicate,function(predicate){var descending=!1,get=predicate||identity;return isString(predicate)&&(("+"==predicate.charAt(0)||"-"==predicate.charAt(0))&&(descending="-"==predicate.charAt(0),predicate=predicate.substring(1)),get=$parse(predicate)),reverseComparator(function(a,b){return compare(get(a),get(b))},descending)});for(var arrayCopy=[],i=0;i<array.length;i++)arrayCopy.push(array[i]);return arrayCopy.sort(reverseComparator(comparator,reverseOrder))}}function ngDirective(directive){return isFunction(directive)&&(directive={link:directive}),directive.restrict=directive.restrict||"AC",valueFn(directive)}function FormController(element,attrs){function toggleValidCss(isValid,validationErrorKey){validationErrorKey=validationErrorKey?"-"+snake_case(validationErrorKey,"-"):"",element.removeClass((isValid?INVALID_CLASS:VALID_CLASS)+validationErrorKey).addClass((isValid?VALID_CLASS:INVALID_CLASS)+validationErrorKey)}var form=this,parentForm=element.parent().controller("form")||nullFormCtrl,invalidCount=0,errors=form.$error={},controls=[];form.$name=attrs.name,form.$dirty=!1,form.$pristine=!0,form.$valid=!0,form.$invalid=!1,parentForm.$addControl(form),element.addClass(PRISTINE_CLASS),toggleValidCss(!0),form.$addControl=function(control){controls.push(control),control.$name&&!form.hasOwnProperty(control.$name)&&(form[control.$name]=control)},form.$removeControl=function(control){control.$name&&form[control.$name]===control&&delete form[control.$name],forEach(errors,function(queue,validationToken){form.$setValidity(validationToken,!0,control)}),arrayRemove(controls,control)},form.$setValidity=function(validationToken,isValid,control){var queue=errors[validationToken];if(isValid)queue&&(arrayRemove(queue,control),queue.length||(invalidCount--,invalidCount||(toggleValidCss(isValid),form.$valid=!0,form.$invalid=!1),errors[validationToken]=!1,toggleValidCss(!0,validationToken),parentForm.$setValidity(validationToken,!0,form)));else{if(invalidCount||toggleValidCss(isValid),queue){if(includes(queue,control))return}else errors[validationToken]=queue=[],invalidCount++,toggleValidCss(!1,validationToken),parentForm.$setValidity(validationToken,!1,form);queue.push(control),form.$valid=!1,form.$invalid=!0}},form.$setDirty=function(){element.removeClass(PRISTINE_CLASS).addClass(DIRTY_CLASS),form.$dirty=!0,form.$pristine=!1,parentForm.$setDirty()},form.$setPristine=function(){element.removeClass(DIRTY_CLASS).addClass(PRISTINE_CLASS),form.$dirty=!1,form.$pristine=!0,forEach(controls,function(control){control.$setPristine()})}}function isEmpty(value){return isUndefined(value)||""===value||null===value||value!==value}function textInputType(scope,element,attr,ctrl,$sniffer,$browser){var listener=function(){var value=element.val();toBoolean(attr.ngTrim||"T")&&(value=trim(value)),ctrl.$viewValue!==value&&scope.$apply(function(){ctrl.$setViewValue(value)})};if($sniffer.hasEvent("input"))element.bind("input",listener);else{var timeout,deferListener=function(){timeout||(timeout=$browser.defer(function(){listener(),timeout=null}))};element.bind("keydown",function(event){var key=event.keyCode;91===key||key>15&&19>key||key>=37&&40>=key||deferListener()}),element.bind("change",listener),$sniffer.hasEvent("paste")&&element.bind("paste cut",deferListener)}ctrl.$render=function(){element.val(isEmpty(ctrl.$viewValue)?"":ctrl.$viewValue)};var patternValidator,match,pattern=attr.ngPattern,validate=function(regexp,value){return isEmpty(value)||regexp.test(value)?(ctrl.$setValidity("pattern",!0),value):(ctrl.$setValidity("pattern",!1),undefined)};if(pattern&&(match=pattern.match(/^\/(.*)\/([gim]*)$/),match?(pattern=new RegExp(match[1],match[2]),patternValidator=function(value){return validate(pattern,value)}):patternValidator=function(value){var patternObj=scope.$eval(pattern);if(!patternObj||!patternObj.test)throw new Error("Expected "+pattern+" to be a RegExp but was "+patternObj);return validate(patternObj,value)},ctrl.$formatters.push(patternValidator),ctrl.$parsers.push(patternValidator)),attr.ngMinlength){var minlength=int(attr.ngMinlength),minLengthValidator=function(value){return!isEmpty(value)&&value.length<minlength?(ctrl.$setValidity("minlength",!1),undefined):(ctrl.$setValidity("minlength",!0),value)};ctrl.$parsers.push(minLengthValidator),ctrl.$formatters.push(minLengthValidator)}if(attr.ngMaxlength){var maxlength=int(attr.ngMaxlength),maxLengthValidator=function(value){return!isEmpty(value)&&value.length>maxlength?(ctrl.$setValidity("maxlength",!1),undefined):(ctrl.$setValidity("maxlength",!0),value)};ctrl.$parsers.push(maxLengthValidator),ctrl.$formatters.push(maxLengthValidator)}}function numberInputType(scope,element,attr,ctrl,$sniffer,$browser){if(textInputType(scope,element,attr,ctrl,$sniffer,$browser),ctrl.$parsers.push(function(value){var empty=isEmpty(value);return empty||NUMBER_REGEXP.test(value)?(ctrl.$setValidity("number",!0),""===value?null:empty?value:parseFloat(value)):(ctrl.$setValidity("number",!1),undefined)}),ctrl.$formatters.push(function(value){return isEmpty(value)?"":""+value}),attr.min){var min=parseFloat(attr.min),minValidator=function(value){return!isEmpty(value)&&min>value?(ctrl.$setValidity("min",!1),undefined):(ctrl.$setValidity("min",!0),value)};ctrl.$parsers.push(minValidator),ctrl.$formatters.push(minValidator)}if(attr.max){var max=parseFloat(attr.max),maxValidator=function(value){return!isEmpty(value)&&value>max?(ctrl.$setValidity("max",!1),undefined):(ctrl.$setValidity("max",!0),value)};ctrl.$parsers.push(maxValidator),ctrl.$formatters.push(maxValidator)}ctrl.$formatters.push(function(value){return isEmpty(value)||isNumber(value)?(ctrl.$setValidity("number",!0),value):(ctrl.$setValidity("number",!1),undefined)})}function urlInputType(scope,element,attr,ctrl,$sniffer,$browser){textInputType(scope,element,attr,ctrl,$sniffer,$browser);var urlValidator=function(value){return isEmpty(value)||URL_REGEXP.test(value)?(ctrl.$setValidity("url",!0),value):(ctrl.$setValidity("url",!1),undefined)};ctrl.$formatters.push(urlValidator),ctrl.$parsers.push(urlValidator)}function emailInputType(scope,element,attr,ctrl,$sniffer,$browser){textInputType(scope,element,attr,ctrl,$sniffer,$browser);var emailValidator=function(value){return isEmpty(value)||EMAIL_REGEXP.test(value)?(ctrl.$setValidity("email",!0),value):(ctrl.$setValidity("email",!1),undefined)};ctrl.$formatters.push(emailValidator),ctrl.$parsers.push(emailValidator)}function radioInputType(scope,element,attr,ctrl){isUndefined(attr.name)&&element.attr("name",nextUid()),element.bind("click",function(){element[0].checked&&scope.$apply(function(){ctrl.$setViewValue(attr.value)})}),ctrl.$render=function(){var value=attr.value;element[0].checked=value==ctrl.$viewValue},attr.$observe("value",ctrl.$render)}function checkboxInputType(scope,element,attr,ctrl){var trueValue=attr.ngTrueValue,falseValue=attr.ngFalseValue;isString(trueValue)||(trueValue=!0),isString(falseValue)||(falseValue=!1),element.bind("click",function(){scope.$apply(function(){ctrl.$setViewValue(element[0].checked)})}),ctrl.$render=function(){element[0].checked=ctrl.$viewValue},ctrl.$formatters.push(function(value){return value===trueValue}),ctrl.$parsers.push(function(value){return value?trueValue:falseValue})}function classDirective(name,selector){return name="ngClass"+name,ngDirective(function(scope,element,attr){function ngClassWatchAction(newVal){(selector===!0||scope.$index%2===selector)&&(oldVal&&!equals(newVal,oldVal)&&removeClass(oldVal),addClass(newVal)),oldVal=copy(newVal)}function removeClass(classVal){isObject(classVal)&&!isArray(classVal)&&(classVal=map(classVal,function(v,k){return v?k:void 0})),element.removeClass(isArray(classVal)?classVal.join(" "):classVal)}function addClass(classVal){isObject(classVal)&&!isArray(classVal)&&(classVal=map(classVal,function(v,k){return v?k:void 0})),classVal&&element.addClass(isArray(classVal)?classVal.join(" "):classVal)}var oldVal=undefined;scope.$watch(attr[name],ngClassWatchAction,!0),attr.$observe("class",function(){var ngClass=scope.$eval(attr[name]);ngClassWatchAction(ngClass,ngClass)}),"ngClass"!==name&&scope.$watch("$index",function($index,old$index){var mod=1&$index;1&mod!==old$index&&(mod===selector?addClass(scope.$eval(attr[name])):removeClass(scope.$eval(attr[name])))})})}var lowercase=function(string){return isString(string)?string.toLowerCase():string},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 jqLite,jQuery,angularModule,nodeName_,msie=int((/msie (\d+)/.exec(lowercase(navigator.userAgent))||[])[1]),slice=[].slice,push=[].push,toString=Object.prototype.toString,_angular=window.angular,angular=window.angular||(window.angular={}),uid=["0","0","0"];noop.$inject=[],identity.$inject=[],nodeName_=9>msie?function(element){return element=element.nodeName?element:element[0],element.scopeName&&"HTML"!=element.scopeName?uppercase(element.scopeName+":"+element.nodeName):element.nodeName}:function(element){return element.nodeName?element.nodeName:element[0].nodeName};var SNAKE_CASE_REGEXP=/[A-Z]/g,version={full:"1.1.5",major:1,minor:1,dot:5,codeName:"triangle-squarification"},jqCache=JQLite.cache={},jqName=JQLite.expando="ng-"+(new Date).getTime(),jqId=1,addEventListenerFn=window.document.addEventListener?function(element,type,fn){element.addEventListener(type,fn,!1)}:function(element,type,fn){element.attachEvent("on"+type,fn)},removeEventListenerFn=window.document.removeEventListener?function(element,type,fn){element.removeEventListener(type,fn,!1)}:function(element,type,fn){element.detachEvent("on"+type,fn)},SPECIAL_CHARS_REGEXP=/([\:\-\_]+(.))/g,MOZ_HACK_REGEXP=/^moz([A-Z])/,JQLitePrototype=JQLite.prototype={ready:function(fn){function trigger(){fired||(fired=!0,fn())}var fired=!1;"complete"===document.readyState?setTimeout(trigger):(this.bind("DOMContentLoaded",trigger),JQLite(window).bind("load",trigger))},toString:function(){var value=[];return forEach(this,function(e){value.push(""+e)}),"["+value.join(", ")+"]"},eq:function(index){return index>=0?jqLite(this[index]):jqLite(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[uppercase(value)]=!0}),forEach({data:JQLiteData,inheritedData:JQLiteInheritedData,scope:function(element){return JQLiteInheritedData(element,"$scope")},controller:JQLiteController,injector:function(element){return JQLiteInheritedData(element,"$injector")},removeAttr:function(element,name){element.removeAttribute(name)},hasClass:JQLiteHasClass,css:function(element,name,value){if(name=camelCase(name),!isDefined(value)){var val;return 8>=msie&&(val=element.currentStyle&&element.currentStyle[name],""===val&&(val="auto")),val=val||element.style[name],8>=msie&&(val=""===val?undefined:val),val}element.style[name]=value},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)?(element[name]=value,void 0):element[name]},text:extend(9>msie?function(element,value){if(1==element.nodeType){if(isUndefined(value))return element.innerText;element.innerText=value}else{if(isUndefined(value))return element.nodeValue;element.nodeValue=value}}:function(element,value){return isUndefined(value)?element.textContent:(element.textContent=value,void 0)},{$dv:""}),val:function(element,value){return isUndefined(value)?element.value:(element.value=value,void 0)},html:function(element,value){if(isUndefined(value))return element.innerHTML;for(var i=0,childNodes=element.childNodes;i<childNodes.length;i++)JQLiteDealoc(childNodes[i]);element.innerHTML=value}},function(fn,name){JQLite.prototype[name]=function(arg1,arg2){var i,key;if((2==fn.length&&fn!==JQLiteHasClass&&fn!==JQLiteController?arg1:arg2)!==undefined){for(i=0;i<this.length;i++)fn(this[i],arg1,arg2);return this}if(isObject(arg1)){for(i=0;i<this.length;i++)if(fn===JQLiteData)fn(this[i],arg1);else for(key in arg1)fn(this[i],key,arg1[key]);return this}return this.length?fn(this[0],arg1,arg2):fn.$dv}}),forEach({removeData:JQLiteRemoveData,dealoc:JQLiteDealoc,bind:function bindFn(element,type,fn){var events=JQLiteExpandoStore(element,"events"),handle=JQLiteExpandoStore(element,"handle");events||JQLiteExpandoStore(element,"events",events={}),handle||JQLiteExpandoStore(element,"handle",handle=createEventHandler(element,events)),forEach(type.split(" "),function(type){var eventFns=events[type];
if(!eventFns){if("mouseenter"==type||"mouseleave"==type){var contains=document.body.contains||document.body.compareDocumentPosition?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};events[type]=[];var eventmap={mouseleave:"mouseout",mouseenter:"mouseover"};bindFn(element,eventmap[type],function(event){var target=this,related=event.relatedTarget;(!related||related!==target&&!contains(target,related))&&handle(event,type)})}else addEventListenerFn(element,type,handle),events[type]=[];eventFns=events[type]}eventFns.push(fn)})},unbind:JQLiteUnbind,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){1===element.nodeType&&children.push(element)}),children},contents:function(element){return element.childNodes||[]},append:function(element,node){forEach(new JQLite(node),function(child){(1===element.nodeType||11===element.nodeType)&&element.appendChild(child)})},prepend:function(element,node){if(1===element.nodeType){var index=element.firstChild;forEach(new JQLite(node),function(child){index?element.insertBefore(child,index):(element.appendChild(child),index=child)})}},wrap:function(element,wrapNode){wrapNode=jqLite(wrapNode)[0];var parent=element.parentNode;parent&&parent.replaceChild(wrapNode,element),wrapNode.appendChild(element)},remove:function(element){JQLiteDealoc(element);var parent=element.parentNode;parent&&parent.removeChild(element)},after:function(element,newElement){var index=element,parent=element.parentNode;forEach(new JQLite(newElement),function(node){parent.insertBefore(node,index.nextSibling),index=node})},addClass:JQLiteAddClass,removeClass:JQLiteRemoveClass,toggleClass:function(element,selector,condition){isUndefined(condition)&&(condition=!JQLiteHasClass(element,selector)),(condition?JQLiteAddClass:JQLiteRemoveClass)(element,selector)},parent:function(element){var parent=element.parentNode;return parent&&11!==parent.nodeType?parent:null},next:function(element){if(element.nextElementSibling)return element.nextElementSibling;for(var elm=element.nextSibling;null!=elm&&1!==elm.nodeType;)elm=elm.nextSibling;return elm},find:function(element,selector){return element.getElementsByTagName(selector)},clone:JQLiteClone,triggerHandler:function(element,eventName){var eventFns=(JQLiteExpandoStore(element,"events")||{})[eventName];forEach(eventFns,function(fn){fn.call(element,{preventDefault:noop})})}},function(fn,name){JQLite.prototype[name]=function(arg1,arg2){for(var value,i=0;i<this.length;i++)value==undefined?(value=fn(this[i],arg1,arg2),value!==undefined&&(value=jqLite(value))):JQLiteAddNodes(value,fn(this[i],arg1,arg2));return value==undefined?this:value}}),HashMap.prototype={put:function(key,value){this[hashKey(key)]=value},get:function(key){return this[hashKey(key)]},remove:function(key){var value=this[key=hashKey(key)];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;$AnimationProvider.$inject=["$provide"];var $AnimatorProvider=function(){var NG_ANIMATE_CONTROLLER="$ngAnimateController",rootAnimateController={running:!0};this.$get=["$animation","$window","$sniffer","$rootElement","$rootScope",function($animation,$window,$sniffer,$rootElement){$rootElement.data(NG_ANIMATE_CONTROLLER,rootAnimateController);var AnimatorService=function(scope,attrs){function animateActionFactory(type,beforeFn,afterFn){return function(element,parent,after){function parseMaxTime(str){var total=0,values=isString(str)?str.split(/\s*,\s*/):[];return forEach(values,function(value){total=Math.max(parseFloat(value)||0,total)}),total}function beginAnimation(){if(element.addClass(activeClassName),polyfillStart)polyfillStart(element,done,memento);else if(isFunction($window.getComputedStyle)){var w3cAnimationProp="animation",w3cTransitionProp="transition",vendorAnimationProp=$sniffer.vendorPrefix+"Animation",vendorTransitionProp=$sniffer.vendorPrefix+"Transition",durationKey="Duration",delayKey="Delay",animationIterationCountKey="IterationCount",duration=0,ELEMENT_NODE=1;forEach(element,function(element){if(element.nodeType==ELEMENT_NODE){var w3cProp=w3cTransitionProp,vendorProp=vendorTransitionProp,iterations=1,elementStyles=$window.getComputedStyle(element)||{};(parseFloat(elementStyles[w3cAnimationProp+durationKey])>0||parseFloat(elementStyles[vendorAnimationProp+durationKey])>0)&&(w3cProp=w3cAnimationProp,vendorProp=vendorAnimationProp,iterations=Math.max(parseInt(elementStyles[w3cProp+animationIterationCountKey])||0,parseInt(elementStyles[vendorProp+animationIterationCountKey])||0,iterations));var parsedDelay=Math.max(parseMaxTime(elementStyles[w3cProp+delayKey]),parseMaxTime(elementStyles[vendorProp+delayKey])),parsedDuration=Math.max(parseMaxTime(elementStyles[w3cProp+durationKey]),parseMaxTime(elementStyles[vendorProp+durationKey]));duration=Math.max(parsedDelay+iterations*parsedDuration,duration)}}),$window.setTimeout(done,1e3*duration)}else done()}function done(){done.run||(done.run=!0,afterFn(element,parent,after),element.removeClass(className),element.removeClass(activeClassName),element.removeData(NG_ANIMATE_CONTROLLER))}var ngAnimateValue=scope.$eval(attrs.ngAnimate),className=ngAnimateValue?isObject(ngAnimateValue)?ngAnimateValue[type]:ngAnimateValue+"-"+type:"",animationPolyfill=$animation(className),polyfillSetup=animationPolyfill&&animationPolyfill.setup,polyfillStart=animationPolyfill&&animationPolyfill.start,polyfillCancel=animationPolyfill&&animationPolyfill.cancel;if(className){var activeClassName=className+"-active";if(parent||(parent=after?after.parent():element.parent()),!$sniffer.transitions&&!polyfillSetup&&!polyfillStart||(parent.inheritedData(NG_ANIMATE_CONTROLLER)||noop).running)return beforeFn(element,parent,after),afterFn(element,parent,after),void 0;var animationData=element.data(NG_ANIMATE_CONTROLLER)||{};if(animationData.running&&((polyfillCancel||noop)(element),animationData.done()),element.data(NG_ANIMATE_CONTROLLER,{running:!0,done:done}),element.addClass(className),beforeFn(element,parent,after),0==element.length)return done();var memento=(polyfillSetup||noop)(element);$window.setTimeout(beginAnimation,1)}else beforeFn(element,parent,after),afterFn(element,parent,after)}}function show(element){element.css("display","")}function hide(element){element.css("display","none")}function insert(element,parent,after){after?after.after(element):parent.append(element)}function remove(element){element.remove()}function move(element,parent,after){insert(element,parent,after)}var animator={};return animator.enter=animateActionFactory("enter",insert,noop),animator.leave=animateActionFactory("leave",noop,remove),animator.move=animateActionFactory("move",move,noop),animator.show=animateActionFactory("show",show,noop),animator.hide=animateActionFactory("hide",noop,hide),animator.animate=function(event,element){animateActionFactory(event,noop,noop)(element)},animator};return AnimatorService.enabled=function(value){return arguments.length&&(rootAnimateController.running=!value),!rootAnimateController.running},AnimatorService}]},NON_ASSIGNABLE_MODEL_EXPRESSION="Non-assignable model expression: ";$CompileProvider.$inject=["$provide"];var PREFIX_REGEXP=/^(x[\:\-_]|data[\:\-_])/i,SERVER_MATCH=/^([^:]+):\/\/(\w+:{0,1}\w*@)?(\{?[\w\.-]*\}?)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,PATH_MATCH=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,DEFAULT_PORTS={http:80,https:443,ftp:21};LocationHashbangInHtml5Url.prototype=LocationHashbangUrl.prototype=LocationHtml5Url.prototype={$$replace:!1,absUrl:locationGetter("$$absUrl"),url:function(url,replace){if(isUndefined(url))return this.$$url;var match=PATH_MATCH.exec(url);return match[1]&&this.path(decodeURIComponent(match[1])),(match[2]||match[1])&&this.search(match[3]||""),this.hash(match[5]||"",replace),this},protocol:locationGetter("$$protocol"),host:locationGetter("$$host"),port:locationGetter("$$port"),path:locationGetterSetter("$$path",function(path){return"/"==path.charAt(0)?path:"/"+path}),search:function(search,paramValue){return isUndefined(search)?this.$$search:(isDefined(paramValue)?null===paramValue?delete this.$$search[search]:this.$$search[search]=paramValue:this.$$search=isString(search)?parseKeyValue(search):search,this.$$compose(),this)},hash:locationGetterSetter("$$hash",identity),replace:function(){return this.$$replace=!0,this}};var OPERATORS={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:noop,"+":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)},"=":noop,"===":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 b(self,locals)(self,locals,a(self,locals))},"!":function(self,locals,a){return!a(self,locals)}},ESCAPE={n:"\n",f:"\f",r:"\r",t:"	",v:"","'":"'",'"':'"'},getterFnCache={},IS_SAME_DOMAIN_URL_MATCH=/^(([^:]+):)?\/\/(\w+:{0,1}\w*@)?([\w\.-]*)?(:([0-9]+))?(.*)$/,XHR=window.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e1){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e2){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e3){}throw new Error("This browser does not support XMLHttpRequest.")};$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},DATE_FORMATS_SPLIT=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,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 8>=msie&&(attr.href||attr.name||attr.$set("href",""),element.append(document.createComment("IE fix"))),function(scope,element){element.bind("click",function(event){element.attr("href")||event.preventDefault()})}}}),ngAttributeAliasDirectives={};forEach(BOOLEAN_ATTR,function(propName,attrName){var normalized=directiveNormalize("ng-"+attrName);ngAttributeAliasDirectives[normalized]=function(){return{priority:100,compile:function(){return function(scope,element,attr){scope.$watch(attr[normalized],function(value){attr.$set(attrName,!!value)})}}}}}),forEach(["src","srcset","href"],function(attrName){var normalized=directiveNormalize("ng-"+attrName);ngAttributeAliasDirectives[normalized]=function(){return{priority:99,link:function(scope,element,attr){attr.$observe(normalized,function(value){value&&(attr.$set(attrName,value),msie&&element.prop(attrName,attr[attrName]))})}}}});var nullFormCtrl={$addControl:noop,$removeControl:noop,$setValidity:noop,$setDirty:noop,$setPristine:noop};FormController.$inject=["$element","$attrs","$scope"];var formDirectiveFactory=function(isNgForm){return["$timeout",function($timeout){var formDirective={name:"form",restrict:"E",controller:FormController,compile:function(){return{pre:function(scope,formElement,attr,controller){if(!attr.action){var preventDefaultListener=function(event){event.preventDefault?event.preventDefault():event.returnValue=!1};addEventListenerFn(formElement[0],"submit",preventDefaultListener),formElement.bind("$destroy",function(){$timeout(function(){removeEventListenerFn(formElement[0],"submit",preventDefaultListener)},0,!1)})}var parentFormCtrl=formElement.parent().controller("form"),alias=attr.name||attr.ngForm;alias&&(scope[alias]=controller),parentFormCtrl&&formElement.bind("$destroy",function(){parentFormCtrl.$removeControl(controller),alias&&(scope[alias]=undefined),extend(controller,nullFormCtrl)})}}}};return isNgForm?extend(copy(formDirective),{restrict:"EAC"}):formDirective}]},formDirective=formDirectiveFactory(),ngFormDirective=formDirectiveFactory(!0),URL_REGEXP=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,EMAIL_REGEXP=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/,NUMBER_REGEXP=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,inputType={text:textInputType,number:numberInputType,url:urlInputType,email:emailInputType,radio:radioInputType,checkbox:checkboxInputType,hidden:noop,button:noop,submit:noop,reset:noop},inputDirective=["$browser","$sniffer",function($browser,$sniffer){return{restrict:"E",require:"?ngModel",link:function(scope,element,attr,ctrl){ctrl&&(inputType[lowercase(attr.type)]||inputType.text)(scope,element,attr,ctrl,$sniffer,$browser)}}}],VALID_CLASS="ng-valid",INVALID_CLASS="ng-invalid",PRISTINE_CLASS="ng-pristine",DIRTY_CLASS="ng-dirty",NgModelController=["$scope","$exceptionHandler","$attrs","$element","$parse",function($scope,$exceptionHandler,$attr,$element,$parse){function toggleValidCss(isValid,validationErrorKey){validationErrorKey=validationErrorKey?"-"+snake_case(validationErrorKey,"-"):"",$element.removeClass((isValid?INVALID_CLASS:VALID_CLASS)+validationErrorKey).addClass((isValid?VALID_CLASS:INVALID_CLASS)+validationErrorKey)}this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$name=$attr.name;var ngModelGet=$parse($attr.ngModel),ngModelSet=ngModelGet.assign;if(!ngModelSet)throw Error(NON_ASSIGNABLE_MODEL_EXPRESSION+$attr.ngModel+" ("+startingTag($element)+")");this.$render=noop;var parentForm=$element.inheritedData("$formController")||nullFormCtrl,invalidCount=0,$error=this.$error={};$element.addClass(PRISTINE_CLASS),toggleValidCss(!0),this.$setValidity=function(validationErrorKey,isValid){$error[validationErrorKey]!==!isValid&&(isValid?($error[validationErrorKey]&&invalidCount--,invalidCount||(toggleValidCss(!0),this.$valid=!0,this.$invalid=!1)):(toggleValidCss(!1),this.$invalid=!0,this.$valid=!1,invalidCount++),$error[validationErrorKey]=!isValid,toggleValidCss(isValid,validationErrorKey),parentForm.$setValidity(validationErrorKey,isValid,this))},this.$setPristine=function(){this.$dirty=!1,this.$pristine=!0,$element.removeClass(DIRTY_CLASS).addClass(PRISTINE_CLASS)},this.$setViewValue=function(value){this.$viewValue=value,this.$pristine&&(this.$dirty=!0,this.$pristine=!1,$element.removeClass(PRISTINE_CLASS).addClass(DIRTY_CLASS),parentForm.$setDirty()),forEach(this.$parsers,function(fn){value=fn(value)}),this.$modelValue!==value&&(this.$modelValue=value,ngModelSet($scope,value),forEach(this.$viewChangeListeners,function(listener){try{listener()}catch(e){$exceptionHandler(e)}}))};var ctrl=this;$scope.$watch(function(){var value=ngModelGet($scope);if(ctrl.$modelValue!==value){var formatters=ctrl.$formatters,idx=formatters.length;for(ctrl.$modelValue=value;idx--;)value=formatters[idx](value);ctrl.$viewValue!==value&&(ctrl.$viewValue=value,ctrl.$render())}})}],ngModelDirective=function(){return{require:["ngModel","^?form"],controller:NgModelController,link:function(scope,element,attr,ctrls){var modelCtrl=ctrls[0],formCtrl=ctrls[1]||nullFormCtrl;formCtrl.$addControl(modelCtrl),element.bind("$destroy",function(){formCtrl.$removeControl(modelCtrl)})}}},ngChangeDirective=valueFn({require:"ngModel",link:function(scope,element,attr,ctrl){ctrl.$viewChangeListeners.push(function(){scope.$eval(attr.ngChange)})}}),requiredDirective=function(){return{require:"?ngModel",link:function(scope,elm,attr,ctrl){if(ctrl){attr.required=!0;var validator=function(value){return attr.required&&(isEmpty(value)||value===!1)?(ctrl.$setValidity("required",!1),void 0):(ctrl.$setValidity("required",!0),value)};ctrl.$formatters.push(validator),ctrl.$parsers.unshift(validator),attr.$observe("required",function(){validator(ctrl.$viewValue)})}}}},ngListDirective=function(){return{require:"ngModel",link:function(scope,element,attr,ctrl){var match=/\/(.*)\//.exec(attr.ngList),separator=match&&new RegExp(match[1])||attr.ngList||",",parse=function(viewValue){var list=[];return viewValue&&forEach(viewValue.split(separator),function(value){value&&list.push(trim(value))}),list};ctrl.$parsers.push(parse),ctrl.$formatters.push(function(value){return isArray(value)?value.join(", "):undefined})}}},CONSTANT_VALUE_REGEXP=/^(true|false|\d+)$/,ngValueDirective=function(){return{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,!1)})}}}},ngBindDirective=ngDirective(function(scope,element,attr){element.addClass("ng-binding").data("$binding",attr.ngBind),scope.$watch(attr.ngBind,function(value){element.text(value==undefined?"":value)})}),ngBindTemplateDirective=["$interpolate",function($interpolate){return function(scope,element,attr){var interpolateFn=$interpolate(element.attr(attr.$attr.ngBindTemplate));element.addClass("ng-binding").data("$binding",interpolateFn),attr.$observe("ngBindTemplate",function(value){element.text(value)})}}],ngBindHtmlUnsafeDirective=[function(){return function(scope,element,attr){element.addClass("ng-binding").data("$binding",attr.ngBindHtmlUnsafe),scope.$watch(attr.ngBindHtmlUnsafe,function(value){element.html(value||"")})}}],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{scope:!0,controller:"@"}}],ngCspDirective=["$sniffer",function($sniffer){return{priority:1e3,compile:function(){$sniffer.csp=!0}}}],ngEventDirectives={};forEach("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress".split(" "),function(name){var directiveName=directiveNormalize("ng-"+name);ngEventDirectives[directiveName]=["$parse",function($parse){return function(scope,element,attr){var fn=$parse(attr[directiveName]);element.bind(lowercase(name),function(event){scope.$apply(function(){fn(scope,{$event:event})})})}}]});var ngSubmitDirective=ngDirective(function(scope,element,attrs){element.bind("submit",function(){scope.$apply(attrs.ngSubmit)})}),ngIfDirective=["$animator",function($animator){return{transclude:"element",priority:1e3,terminal:!0,restrict:"A",compile:function(element,attr,transclude){return function($scope,$element,$attr){var childElement,childScope,animate=$animator($scope,$attr);$scope.$watch($attr.ngIf,function(value){childElement&&(animate.leave(childElement),childElement=undefined),childScope&&(childScope.$destroy(),childScope=undefined),toBoolean(value)&&(childScope=$scope.$new(),transclude(childScope,function(clone){childElement=clone,animate.enter(clone,$element.parent(),$element)}))})}}}}],ngIncludeDirective=["$http","$templateCache","$anchorScroll","$compile","$animator",function($http,$templateCache,$anchorScroll,$compile,$animator){return{restrict:"ECA",terminal:!0,compile:function(element,attr){var srcExp=attr.ngInclude||attr.src,onloadExp=attr.onload||"",autoScrollExp=attr.autoscroll;return function(scope,element,attr){var childScope,animate=$animator(scope,attr),changeCounter=0,clearContent=function(){childScope&&(childScope.$destroy(),childScope=null),animate.leave(element.contents(),element)};scope.$watch(srcExp,function(src){var thisChangeId=++changeCounter;src?($http.get(src,{cache:$templateCache}).success(function(response){if(thisChangeId===changeCounter){childScope&&childScope.$destroy(),childScope=scope.$new(),animate.leave(element.contents(),element);var contents=jqLite("<div/>").html(response).contents();animate.enter(contents,element),$compile(contents)(childScope),!isDefined(autoScrollExp)||autoScrollExp&&!scope.$eval(autoScrollExp)||$anchorScroll(),childScope.$emit("$includeContentLoaded"),scope.$eval(onloadExp)}}).error(function(){thisChangeId===changeCounter&&clearContent()}),scope.$emit("$includeContentRequested")):clearContent()})}}}}],ngInitDirective=ngDirective({compile:function(){return{pre:function(scope,element,attrs){scope.$eval(attrs.ngInit)}}}}),ngNonBindableDirective=ngDirective({terminal:!0,priority:1e3}),ngPluralizeDirective=["$locale","$interpolate",function($locale,$interpolate){var BRACE=/{}/g;return{restrict:"EA",link:function(scope,element,attr){var numberExp=attr.count,whenExp=element.attr(attr.$attr.when),offset=attr.offset||0,whens=scope.$eval(whenExp),whensExpFns={},startSymbol=$interpolate.startSymbol(),endSymbol=$interpolate.endSymbol();forEach(whens,function(expression,key){whensExpFns[key]=$interpolate(expression.replace(BRACE,startSymbol+numberExp+"-"+offset+endSymbol))}),scope.$watch(function(){var value=parseFloat(scope.$eval(numberExp));return isNaN(value)?"":(value in whens||(value=$locale.pluralCat(value-offset)),whensExpFns[value](scope,element,!0))},function(newVal){element.text(newVal)})}}}],ngRepeatDirective=["$parse","$animator",function($parse,$animator){var NG_REMOVED="$$NG_REMOVED";return{transclude:"element",priority:1e3,terminal:!0,compile:function(element,attr,linker){return function($scope,$element,$attr){var trackByExp,trackByExpGetter,trackByIdFn,lhs,rhs,valueIdentifier,keyIdentifier,animate=$animator($scope,$attr),expression=$attr.ngRepeat,match=expression.match(/^\s*(.+)\s+in\s+(.*?)\s*(\s+track\s+by\s+(.+)\s*)?$/),hashFnLocals={$id:hashKey};if(!match)throw Error("Expected ngRepeat in form of '_item_ in _collection_[ track by _id_]' but got '"+expression+"'.");if(lhs=match[1],rhs=match[2],trackByExp=match[4],trackByExp?(trackByExpGetter=$parse(trackByExp),trackByIdFn=function(key,value,index){return keyIdentifier&&(hashFnLocals[keyIdentifier]=key),hashFnLocals[valueIdentifier]=value,hashFnLocals.$index=index,trackByExpGetter($scope,hashFnLocals)}):trackByIdFn=function(key,value){return hashKey(value)},match=lhs.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/),!match)throw Error("'item' in 'item in collection' should be identifier or (key, value) but got '"+lhs+"'.");valueIdentifier=match[3]||match[1],keyIdentifier=match[2];var lastBlockMap={};$scope.$watchCollection(rhs,function(collection){var index,length,nextCursor,arrayLength,childScope,key,value,trackById,collectionKeys,block,cursor=$element,nextBlockMap={},nextBlockOrder=[];if(isArrayLike(collection))collectionKeys=collection;else{collectionKeys=[];for(key in collection)collection.hasOwnProperty(key)&&"$"!=key.charAt(0)&&collectionKeys.push(key);collectionKeys.sort()}for(arrayLength=collectionKeys.length,length=nextBlockOrder.length=collectionKeys.length,index=0;length>index;index++)if(key=collection===collectionKeys?index:collectionKeys[index],value=collection[key],trackById=trackByIdFn(key,value,index),lastBlockMap.hasOwnProperty(trackById))block=lastBlockMap[trackById],delete lastBlockMap[trackById],nextBlockMap[trackById]=block,nextBlockOrder[index]=block;else{if(nextBlockMap.hasOwnProperty(trackById))throw forEach(nextBlockOrder,function(block){block&&block.element&&(lastBlockMap[block.id]=block)}),new Error("Duplicates in a repeater are not allowed. Repeater: "+expression+" key: "+trackById);nextBlockOrder[index]={id:trackById},nextBlockMap[trackById]=!1}for(key in lastBlockMap)lastBlockMap.hasOwnProperty(key)&&(block=lastBlockMap[key],animate.leave(block.element),block.element[0][NG_REMOVED]=!0,block.scope.$destroy());for(index=0,length=collectionKeys.length;length>index;index++){if(key=collection===collectionKeys?index:collectionKeys[index],value=collection[key],block=nextBlockOrder[index],block.element){childScope=block.scope,nextCursor=cursor[0];do nextCursor=nextCursor.nextSibling;while(nextCursor&&nextCursor[NG_REMOVED]);block.element[0]==nextCursor?cursor=block.element:(animate.move(block.element,null,cursor),cursor=block.element)}else childScope=$scope.$new();childScope[valueIdentifier]=value,keyIdentifier&&(childScope[keyIdentifier]=key),childScope.$index=index,childScope.$first=0===index,childScope.$last=index===arrayLength-1,childScope.$middle=!(childScope.$first||childScope.$last),block.element||linker(childScope,function(clone){animate.enter(clone,null,cursor),cursor=clone,block.scope=childScope,block.element=clone,nextBlockMap[block.id]=block})}lastBlockMap=nextBlockMap})}}}}],ngShowDirective=["$animator",function($animator){return function(scope,element,attr){var animate=$animator(scope,attr);scope.$watch(attr.ngShow,function(value){animate[toBoolean(value)?"show":"hide"](element)})}}],ngHideDirective=["$animator",function($animator){return function(scope,element,attr){var animate=$animator(scope,attr);scope.$watch(attr.ngHide,function(value){animate[toBoolean(value)?"hide":"show"](element)})}}],ngStyleDirective=ngDirective(function(scope,element,attr){scope.$watch(attr.ngStyle,function(newStyles,oldStyles){oldStyles&&newStyles!==oldStyles&&forEach(oldStyles,function(val,style){element.css(style,"")}),newStyles&&element.css(newStyles)},!0)}),ngSwitchDirective=["$animator",function($animator){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(scope,element,attr,ngSwitchController){var selectedTranscludes,selectedElements,animate=$animator(scope,attr),watchExpr=attr.ngSwitch||attr.on,selectedScopes=[];scope.$watch(watchExpr,function(value){for(var i=0,ii=selectedScopes.length;ii>i;i++)selectedScopes[i].$destroy(),animate.leave(selectedElements[i]);selectedElements=[],selectedScopes=[],(selectedTranscludes=ngSwitchController.cases["!"+value]||ngSwitchController.cases["?"])&&(scope.$eval(attr.change),forEach(selectedTranscludes,function(selectedTransclude){var selectedScope=scope.$new();selectedScopes.push(selectedScope),selectedTransclude.transclude(selectedScope,function(caseElement){var anchor=selectedTransclude.element;selectedElements.push(caseElement),animate.enter(caseElement,anchor.parent(),anchor)})}))})}}}],ngSwitchWhenDirective=ngDirective({transclude:"element",priority:500,require:"^ngSwitch",compile:function(element,attrs,transclude){return function(scope,element,attr,ctrl){ctrl.cases["!"+attrs.ngSwitchWhen]=ctrl.cases["!"+attrs.ngSwitchWhen]||[],ctrl.cases["!"+attrs.ngSwitchWhen].push({transclude:transclude,element:element})}}}),ngSwitchDefaultDirective=ngDirective({transclude:"element",priority:500,require:"^ngSwitch",compile:function(element,attrs,transclude){return function(scope,element,attr,ctrl){ctrl.cases["?"]=ctrl.cases["?"]||[],ctrl.cases["?"].push({transclude:transclude,element:element})}}}),ngTranscludeDirective=ngDirective({controller:["$transclude","$element",function($transclude,$element){$transclude(function(clone){$element.append(clone)})}]}),ngViewDirective=["$http","$templateCache","$route","$anchorScroll","$compile","$controller","$animator",function($http,$templateCache,$route,$anchorScroll,$compile,$controller,$animator){return{restrict:"ECA",terminal:!0,link:function(scope,element,attr){function destroyLastScope(){lastScope&&(lastScope.$destroy(),lastScope=null)}function clearContent(){animate.leave(element.contents(),element),destroyLastScope()}function update(){var locals=$route.current&&$route.current.locals,template=locals&&locals.$template;if(template){clearContent();var enterElements=jqLite("<div></div>").html(template).contents();animate.enter(enterElements,element);var controller,link=$compile(enterElements),current=$route.current;lastScope=current.scope=scope.$new(),current.controller&&(locals.$scope=lastScope,controller=$controller(current.controller,locals),current.controllerAs&&(lastScope[current.controllerAs]=controller),element.children().data("$ngControllerController",controller)),link(lastScope),lastScope.$emit("$viewContentLoaded"),lastScope.$eval(onloadExp),$anchorScroll()}else clearContent()}var lastScope,onloadExp=attr.onload||"",animate=$animator(scope,attr);scope.$on("$routeChangeSuccess",update),update()}}}],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)}}}}],ngOptionsDirective=valueFn({terminal:!0}),selectDirective=["$compile","$parse",function($compile,$parse){var NG_OPTIONS_REGEXP=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\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){optionsMap[value]=!0,ngModelCtrl.$viewValue==value&&($element.val(value),unknownOption.parent()&&unknownOption.remove())},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 Single(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.bind("change",function(){scope.$apply(function(){unknownOption.parent()&&unknownOption.remove(),ngModelCtrl.$setViewValue(selectElement.val())
})})}function Multiple(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=copy(ctrl.$viewValue),ctrl.$render())}),selectElement.bind("change",function(){scope.$apply(function(){var array=[];forEach(selectElement.find("option"),function(option){option.selected&&array.push(option.value)}),ctrl.$setViewValue(array)})})}function Options(scope,selectElement,ctrl){function render(){var optionGroupName,optionGroup,option,existingParent,existingOptions,existingOption,groupLength,length,groupIndex,index,selected,lastElement,element,label,optionGroups={"":[]},optionGroupNames=[""],modelValue=ctrl.$modelValue,values=valuesFn(scope)||[],keys=keyName?sortedKeys(values):values,locals={},selectedSet=!1;if(multiple)if(trackFn&&isArray(modelValue)){selectedSet=new HashMap([]);for(var trackIndex=0;trackIndex<modelValue.length;trackIndex++)locals[valueName]=modelValue[trackIndex],selectedSet.put(trackFn(scope,locals),modelValue[trackIndex])}else selectedSet=new HashMap(modelValue);for(index=0;length=keys.length,length>index;index++){if(locals[valueName]=values[keyName?locals[keyName]=keys[index]:index],optionGroupName=groupByFn(scope,locals)||"",(optionGroup=optionGroups[optionGroupName])||(optionGroup=optionGroups[optionGroupName]=[],optionGroupNames.push(optionGroupName)),multiple)selected=selectedSet.remove(trackFn?trackFn(scope,locals):valueFn(scope,locals))!=undefined;else{if(trackFn){var modelCast={};modelCast[valueName]=modelValue,selected=trackFn(scope,modelCast)===trackFn(scope,locals)}else selected=modelValue===valueFn(scope,locals);selectedSet=selectedSet||selected}label=displayFn(scope,locals),label=label===undefined?"":label,optionGroup.push({id:trackFn?trackFn(scope,locals):keyName?keys[index]:index,label:label,selected:selected})}for(multiple||(nullOption||null===modelValue?optionGroups[""].unshift({id:"",label:"",selected:!selectedSet}):selectedSet||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&&lastElement.text(existingOption.label=option.label),existingOption.id!==option.id&&lastElement.val(existingOption.id=option.id),lastElement[0].selected!==option.selected&&lastElement.prop("selected",existingOption.selected=option.selected)):(""===option.id&&nullOption?element=nullOption:(element=optionTemplate.clone()).val(option.id).attr("selected",option.selected).text(option.label),existingOptions.push(existingOption={element:element,label:option.label,id:option.id,selected:option.selected}),lastElement?lastElement.after(element):existingParent.element.append(element),lastElement=element);for(index++;existingOptions.length>index;)existingOptions.pop().element.remove()}for(;optionGroupsCache.length>groupIndex;)optionGroupsCache.pop()[0].element.remove()}var match;if(!(match=optionsExp.match(NG_OPTIONS_REGEXP)))throw Error("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_ (track by _expr_)?' but got '"+optionsExp+"'.");var displayFn=$parse(match[2]||match[1]),valueName=match[4]||match[6],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,optionGroupsCache=[[{element:selectElement,label:""}]];nullOption&&($compile(nullOption)(scope),nullOption.removeClass("ng-scope"),nullOption.remove()),selectElement.html(""),selectElement.bind("change",function(){scope.$apply(function(){var optionGroup,key,value,optionElement,index,groupIndex,length,groupLength,collection=valuesFn(scope)||[],locals={};if(multiple){for(value=[],groupIndex=0,groupLength=optionGroupsCache.length;groupLength>groupIndex;groupIndex++)for(optionGroup=optionGroupsCache[groupIndex],index=1,length=optionGroup.length;length>index;index++)if((optionElement=optionGroup[index].element)[0].selected){if(key=optionElement.val(),keyName&&(locals[keyName]=key),trackFn)for(var trackIndex=0;trackIndex<collection.length&&(locals[valueName]=collection[trackIndex],trackFn(scope,locals)!=key);trackIndex++);else locals[valueName]=collection[key];value.push(valueFn(scope,locals))}}else if(key=selectElement.val(),"?"==key)value=undefined;else if(""==key)value=null;else if(trackFn){for(var trackIndex=0;trackIndex<collection.length;trackIndex++)if(locals[valueName]=collection[trackIndex],trackFn(scope,locals)==key){value=valueFn(scope,locals);break}}else locals[valueName]=collection[key],keyName&&(locals[keyName]=key),value=valueFn(scope,locals);ctrl.$setViewValue(value)})}),ctrl.$render=render,scope.$watch(render)}if(ctrls[1]){for(var emptyOption,selectCtrl=ctrls[0],ngModelCtrl=ctrls[1],multiple=attr.multiple,optionsExp=attr.ngOptions,nullOption=!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}if(selectCtrl.init(ngModelCtrl,nullOption,unknownOption),multiple&&(attr.required||attr.ngRequired)){var requiredValidator=function(value){return ngModelCtrl.$setValidity("required",!attr.required||value&&value.length),value};ngModelCtrl.$parsers.push(requiredValidator),ngModelCtrl.$formatters.unshift(requiredValidator),attr.$observe("required",function(){requiredValidator(ngModelCtrl.$viewValue)})}optionsExp?Options(scope,element,ngModelCtrl):multiple?Multiple(scope,element,ngModelCtrl):Single(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?element.prop("selected",!1):selectCtrl=nullSelectCtrl,interpolateFn?scope.$watch(interpolateFn,function(newVal,oldVal){attr.$set("value",newVal),newVal!==oldVal&&selectCtrl.removeOption(oldVal),selectCtrl.addOption(newVal)}):selectCtrl.addOption(attr.value),element.bind("$destroy",function(){selectCtrl.removeOption(attr.value)})}}}}],styleDirective=valueFn({restrict:"E",terminal:!0});bindJQuery(),publishExternalAPI(angular),jqLite(document).ready(function(){angularInit(document,bootstrap)})}(window,document),angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}</style>'),function(window,angular){"use strict";function makeSwipeDirective(directiveName,direction){ngMobile.directive(directiveName,["$parse","$swipe",function($parse,$swipe){var MAX_VERTICAL_DISTANCE=75,MAX_VERTICAL_RATIO=.3,MIN_HORIZONTAL_DISTANCE=30;return function(scope,element,attr){function validSwipe(coords){if(!startCoords)return!1;var deltaY=Math.abs(coords.y-startCoords.y),deltaX=(coords.x-startCoords.x)*direction;return valid&&MAX_VERTICAL_DISTANCE>deltaY&&deltaX>0&&deltaX>MIN_HORIZONTAL_DISTANCE&&MAX_VERTICAL_RATIO>deltaY/deltaX}var startCoords,valid,swipeHandler=$parse(attr[directiveName]);$swipe.bind(element,{start:function(coords){startCoords=coords,valid=!0},cancel:function(){valid=!1},end:function(coords){validSwipe(coords)&&scope.$apply(function(){swipeHandler(scope)})}})}}])}var ngMobile=angular.module("ngMobile",[]);ngMobile.factory("$swipe",[function(){function getCoordinates(event){var touches=event.touches&&event.touches.length?event.touches:[event],e=event.changedTouches&&event.changedTouches[0]||event.originalEvent&&event.originalEvent.changedTouches&&event.originalEvent.changedTouches[0]||touches[0].originalEvent||touches[0];return{x:e.clientX,y:e.clientY}}var totalX,totalY,startCoords,lastPos,MOVE_BUFFER_RADIUS=10,active=!1;return{bind:function(element,events){element.bind("touchstart mousedown",function(event){startCoords=getCoordinates(event),active=!0,totalX=0,totalY=0,lastPos=startCoords,events.start&&events.start(startCoords)}),element.bind("touchcancel",function(){active=!1,events.cancel&&events.cancel()}),element.bind("touchmove mousemove",function(event){if(active&&startCoords){var coords=getCoordinates(event);if(totalX+=Math.abs(coords.x-lastPos.x),totalY+=Math.abs(coords.y-lastPos.y),lastPos=coords,!(MOVE_BUFFER_RADIUS>totalX&&MOVE_BUFFER_RADIUS>totalY))return totalY>totalX?(active=!1,void 0):(event.preventDefault(),events.move&&events.move(coords),void 0)}}),element.bind("touchend mouseup",function(event){active&&(active=!1,events.end&&events.end(getCoordinates(event)))})}}}]),ngMobile.config(["$provide",function($provide){$provide.decorator("ngClickDirective",["$delegate",function($delegate){return $delegate.shift(),$delegate}])}]),ngMobile.directive("ngClick",["$parse","$timeout","$rootElement",function($parse,$timeout,$rootElement){function hit(x1,y1,x2,y2){return Math.abs(x1-x2)<CLICKBUSTER_THRESHOLD&&Math.abs(y1-y2)<CLICKBUSTER_THRESHOLD}function checkAllowableRegions(touchCoordinates,x,y){for(var i=0;i<touchCoordinates.length;i+=2)if(hit(touchCoordinates[i],touchCoordinates[i+1],x,y))return touchCoordinates.splice(i,i+2),!0;return!1}function onClick(event){if(!(Date.now()-lastPreventedTime>PREVENT_DURATION)){var touches=event.touches&&event.touches.length?event.touches:[event],x=touches[0].clientX,y=touches[0].clientY;1>x&&1>y||checkAllowableRegions(touchCoordinates,x,y)||(event.stopPropagation(),event.preventDefault())}}function onTouchStart(event){var touches=event.touches&&event.touches.length?event.touches:[event],x=touches[0].clientX,y=touches[0].clientY;touchCoordinates.push(x,y),$timeout(function(){for(var i=0;i<touchCoordinates.length;i+=2)if(touchCoordinates[i]==x&&touchCoordinates[i+1]==y)return touchCoordinates.splice(i,i+2),void 0},PREVENT_DURATION,!1)}function preventGhostClick(x,y){touchCoordinates||($rootElement[0].addEventListener("click",onClick,!0),$rootElement[0].addEventListener("touchstart",onTouchStart,!0),touchCoordinates=[]),lastPreventedTime=Date.now(),checkAllowableRegions(touchCoordinates,x,y)}var lastPreventedTime,touchCoordinates,TAP_DURATION=750,MOVE_TOLERANCE=12,PREVENT_DURATION=2500,CLICKBUSTER_THRESHOLD=25;return function(scope,element,attr){function resetState(){tapping=!1}var tapElement,startTime,touchStartX,touchStartY,clickHandler=$parse(attr.ngClick),tapping=!1;element.bind("touchstart",function(event){tapping=!0,tapElement=event.target?event.target:event.srcElement,3==tapElement.nodeType&&(tapElement=tapElement.parentNode),startTime=Date.now();var touches=event.touches&&event.touches.length?event.touches:[event],e=touches[0].originalEvent||touches[0];touchStartX=e.clientX,touchStartY=e.clientY}),element.bind("touchmove",function(){resetState()}),element.bind("touchcancel",function(){resetState()}),element.bind("touchend",function(event){var diff=Date.now()-startTime,touches=event.changedTouches&&event.changedTouches.length?event.changedTouches:event.touches&&event.touches.length?event.touches:[event],e=touches[0].originalEvent||touches[0],x=e.clientX,y=e.clientY,dist=Math.sqrt(Math.pow(x-touchStartX,2)+Math.pow(y-touchStartY,2));tapping&&TAP_DURATION>diff&&MOVE_TOLERANCE>dist&&(preventGhostClick(x,y),tapElement&&tapElement.blur(),scope.$apply(function(){clickHandler(scope,{$event:event})})),tapping=!1}),element.onclick=function(){},element.bind("click",function(event){scope.$apply(function(){clickHandler(scope,{$event:event})})})}}]),makeSwipeDirective("ngSwipeLeft",-1),makeSwipeDirective("ngSwipeRight",1)}(window,window.angular),angular.module("angular-carousel",["ngMobile"]),angular.module("angular-carousel").directive("rnCarouselIndicators",[function(){return{restrict:"A",replace:!0,scope:{items:"=",index:"="},template:'<div class="rn-carousel-indicator"><span ng-repeat="item in items" ng-class="{active: $index==$parent.index}">●</span></div>'}}]),angular.module("angular-carousel").directive("rnCarouselInfinite",["$parse","$compile",function($parse){return{restrict:"EA",transclude:!0,replace:!0,scope:!0,template:"<ul rn-carousel rn-carousel-buffered><li ng-transclude></li></ul>",compile:function(tElement,tAttrs){var repeatExpr=tAttrs.rnCarouselCurrent+" in items";return tElement.children("li").attr("ng-repeat",repeatExpr),function(scope,iElement,iAttrs){scope.items=[$parse(iAttrs.rnCarouselCurrent)(scope)],scope.$watchCollection("carouselCollection.position",function(newValue){$parse(iAttrs.rnCarouselCurrent).assign(scope.$parent,scope.items[newValue])})}}}}]),angular.module("angular-carousel").directive("rnCarousel",["$compile","$parse","$swipe","$document","$window","CollectionManager",function($compile,$parse,$swipe,$document,$window,CollectionManager){var carousels=0;return{restrict:"A",scope:!0,compile:function(tElement,tAttrs){tElement.addClass("rn-carousel-slides");var originalCollection,fakeArray,liAttributes=tElement.children("li")[0].attributes,repeatAttribute=liAttributes["ng-repeat"],isBuffered=!1;if(repeatAttribute||(repeatAttribute=liAttributes["data-ng-repeat"]),repeatAttribute||(repeatAttribute=liAttributes["x-ng-repeat"]),repeatAttribute){var exprMatch=repeatAttribute.value.match(/^\s*(.+)\s+in\s+(.*?)\s*(\s+track\s+by\s+(.+)\s*)?$/),originalItem=exprMatch[1],trackProperty=exprMatch[3]||"";originalCollection=exprMatch[2],isBuffered=angular.isDefined(tAttrs.rnCarouselBuffered),repeatAttribute.value=originalItem+" in carouselCollection.cards "+trackProperty}else{var liChilds=tElement.children("li");if(liChilds.length<2)throw new Error("carousel: cannot find the ngRepeat attribute OR no childNodes detected");originalCollection="fakeArray",fakeArray=Array.prototype.slice.apply(liChilds)}return function(scope,iElement,iAttrs){function getTransformCoordinates(el){var results=angular.element(el).css("transform").match(/translate3d\((-?\d+(?:px)?),\s*(-?\d+(?:px)?),\s*(-?\d+(?:px)?)\)/);return results?results.slice(1,3):[0,0,0]}function transitionEndCallback(event){!event.target||event.target!==carousel[0]||"transform"!==event.propertyName&&"-webkit-transform"!==event.propertyName&&"-moz-transform"!==event.propertyName||(scope.$apply(function(){checkEdges(),scope.carouselCollection.adjustBuffer(),updateSlidePosition(!0)}),carousel.css(translateSlideProperty(getTransformCoordinates(carousel[0]),!0)))}function updateSlides(method,items){function cb(){skipAnimation=!0,scope.carouselCollection[method](items,!0)}scope.$$phase?cb():scope.$apply(cb)}function addSlides(position,items){var method="after"===position?"push":"unshift";items&&(angular.isObject(items.promise)?items.promise.then(function(items){items&&updateSlides(method,items)}):angular.isFunction(items.then)?items.then(function(items){items&&updateSlides(method,items)}):updateSlides(method,items))}function checkEdges(){var position=scope.carouselCollection.position,lastIndex=scope.carouselCollection.getLastIndex(),slides=null;0===position&&angular.isDefined(iAttrs.rnCarouselPrev)&&(slides=$parse(iAttrs.rnCarouselPrev)(scope,{item:scope.carouselCollection.cards[0]}),addSlides("before",slides)),position===lastIndex&&angular.isDefined(iAttrs.rnCarouselNext)&&(slides=$parse(iAttrs.rnCarouselNext)(scope,{item:scope.carouselCollection.cards[scope.carouselCollection.cards.length-1]}),addSlides("after",slides))}function genCSSProperties(property,value){var css={};return css[property]=value,angular.forEach(vendorPrefixes,function(prefix){css["-"+prefix.toLowerCase()+"-"+property]=value}),css}function translateSlideProperty(offset,is3d){return is3d?genCSSProperties("transform","translate3d("+offset+"px,0,0)"):genCSSProperties("transform","translate("+offset+"px,0)")}function resize(){updateContainerWidth(),updateSlidePosition()}function updateContainerWidth(){container.css("width","auto"),skipAnimation=!0;var slides=carousel.children("li");return containerWidth=0===slides.length?carousel[0].getBoundingClientRect().width:slides[0].getBoundingClientRect().width,container.css("width",containerWidth+"px"),containerWidth}function updateSlidePosition(forceSkipAnimation){skipAnimation=!!forceSkipAnimation||skipAnimation,0===containerWidth&&updateContainerWidth(),offset=Math.round(scope.carouselCollection.getRelativeIndex()*-containerWidth),skipAnimation===!0?carousel.removeClass("rn-carousel-animate").addClass("rn-carousel-noanimate").css(translateSlideProperty(offset,!1)):carousel.removeClass("rn-carousel-noanimate").addClass("rn-carousel-animate").css(translateSlideProperty(offset,!0)),skipAnimation=!1}function swipeEnd(coords){if($document.unbind("mouseup",documentMouseUpEvent),0===containerWidth&&updateContainerWidth(),swiping>1){var lastIndex=scope.carouselCollection.getLastIndex(),position=scope.carouselCollection.position,slideOffset=startOffset>offset?1:-1,tmpSlideIndex=Math.min(Math.max(0,position+slideOffset),lastIndex),delta=coords.x-startX;Math.abs(delta)<=containerWidth*minSwipePercentage&&(tmpSlideIndex=position);var changed=position!==tmpSlideIndex;changed?scope.$apply(function(){angular.isDefined(iAttrs.rnCarouselCycle)&&(scope.carouselCollection.position=tmpSlideIndex,updateSlidePosition()),scope.carouselCollection.goTo(tmpSlideIndex,!0)}):scope.$apply(function(){updateSlidePosition()})}swiping=0}function isInsideCarousel(coords){var containerRect=container[0].getBoundingClientRect(),isInside=coords.x>containerRect.left&&coords.x<containerRect.left+containerWidth&&coords.y>containerRect.top&&coords.y<containerRect.top+containerRect.height;return isInside}function documentMouseUpEvent(event){swipeEnd({x:event.clientX,y:event.clientY})}carousels++;var carouselId="rn-carousel-"+carousels,swiping=0,startX=0,startOffset=0,offset=0,minSwipePercentage=.1,containerWidth=0,skipAnimation=!1,carousel=iElement.wrap("<div id='"+carouselId+"' class='rn-carousel-container'></div>"),container=carousel.parent();fakeArray&&(scope.fakeArray=fakeArray);var collectionModel=$parse(originalCollection),collectionParams={},initialIndex=0;if(iAttrs.rnCarouselIndex){var indexModel=$parse(iAttrs.rnCarouselIndex);angular.isFunction(indexModel.assign)?(scope.$watch("carouselCollection.index",function(newValue){indexModel.assign(scope.$parent,newValue)}),initialIndex=indexModel(scope),scope.$parent.$watch(indexModel,function(newValue){void 0!==newValue&&scope.carouselCollection.goToIndex(newValue,!0)})):isNaN(iAttrs.rnCarouselIndex)||(initialIndex=parseInt(iAttrs.rnCarouselIndex,10))}angular.isDefined(iAttrs.rnCarouselCycle)&&(collectionParams.cycle=!0),collectionParams.index=initialIndex,isBuffered&&(collectionParams.bufferSize=3,collectionParams.buffered=!0),scope.carouselCollection=CollectionManager.create(collectionParams),scope.$watch("carouselCollection.updated",function(newValue){newValue&&updateSlidePosition()});var collectionReady=!1;scope.$watch(collectionModel,function(newValue){scope.carouselCollection.setItems(newValue,collectionReady),collectionReady=!0,0===containerWidth&&updateContainerWidth(),updateSlidePosition()}),angular.isDefined(iAttrs.rnCarouselWatch)&&scope.$watch(originalCollection,function(newValue){scope.carouselCollection.setItems(newValue,!1),collectionReady=!0,0===containerWidth&&updateContainerWidth(),updateSlidePosition()},!0);var vendorPrefixes=["webkit","moz"];if(carousel[0].addEventListener("webkitTransitionEnd",transitionEndCallback,!1),carousel[0].addEventListener("transitionend",transitionEndCallback,!1),window.addEventListener("orientationchange",resize),window.addEventListener("resize",resize),angular.isDefined(iAttrs.rnCarouselIndicator)){var indicator=$compile("<div id='"+carouselId+"-indicator' index='carouselCollection.index' items='carouselCollection.items' data-rn-carousel-indicators class='rn-carousel-indicator'></div>")(scope);container.append(indicator)}var lastMove=null,moveDelay=$window.jasmine||"iPad"==$window.navigator.platform?0:50;$swipe.bind(carousel,{start:function(coords){0===swiping&&(swiping=1,startX=coords.x),$document.bind("mouseup",documentMouseUpEvent)},move:function(coords){if(!isInsideCarousel(coords))return swipeEnd(coords),void 0;if(0!==swiping){var deltaX=coords.x-startX;if(1===swiping&&0!==deltaX)swiping=2,startOffset=offset;else if(2===swiping){var now=(new Date).getTime();if(lastMove&&moveDelay>now-lastMove)return;lastMove=now;var lastIndex=scope.carouselCollection.getLastIndex(),position=scope.carouselCollection.position,ratio=1;(0===position&&coords.x>startX||position===lastIndex&&coords.x<startX)&&(ratio=3),offset=startOffset+deltaX/ratio,carousel.css(translateSlideProperty(offset,!0)).removeClass("rn-carousel-animate").addClass("rn-carousel-noanimate")}}},end:function(coords){swipeEnd(coords)}})}}}}]),angular.module("angular-carousel").service("CollectionManager",[function(){function CollectionManager(options){var i,initial={bufferSize:0,bufferStart:0,buffered:!1,cycle:!1,cycleOffset:0,index:0,position:0,items:[],cards:[],updated:null,debug:!1};if(options)for(i in options)initial[i]=options[i];for(i in initial)this[i]=initial[i];angular.extend(this,initial,options),this.init()}return CollectionManager.prototype.log=function(){this.debug&&console.log.apply(console,arguments)},CollectionManager.prototype.getPositionFromIndex=function(index){return(index+this.cycleOffset)%this.length()},CollectionManager.prototype.goToIndex=function(index,delayedUpdate){if(index=Math.max(0,Math.min(index,this.getLastIndex())),this.updated&&index===this.index)return this.log("skip position change(same)"),!1;var position=this.getPositionFromIndex(index);return this.goTo(position,delayedUpdate)},CollectionManager.prototype.goTo=function(position,delayedUpdate){if(this.log("goto start",position,delayedUpdate),0===this.length())return this.log("empty, skip gotoIndex"),void 0;position=Math.max(0,Math.min(position,this.getLastIndex()));var cycled=!1;this.cycle&&(0===position?(this.log("cycleAtBeginning",position),this.cycleAtBeginning(),position=1,this.cycleOffset++,cycled=!0):position===this.getLastIndex()&&(this.log("cycleAtEnd",position),this.cycleAtEnd(),position--,this.cycleOffset--,cycled=!0),this.cycleOffset%=this.length()),this.position=Math.max(0,Math.min(position,this.getLastIndex()));var realIndex=(this.position-this.cycleOffset+this.length())%this.length();this.index=Math.max(0,Math.min(realIndex,this.getLastIndex())),delayedUpdate||this.adjustBuffer(),cycled||(this.updated=new Date)},CollectionManager.prototype.next=function(){this.cycle?this.goTo((this.position+1)%this.length()):this.goTo(Math.min(this.position+1,this.getLastIndex()))},CollectionManager.prototype.prev=function(){if(this.cycle)this.goTo((this.position-1+this.length())%this.length());else{var prevIndex=this.length()>0?Math.max(0,(this.position-1)%this.length()):0;this.goTo(prevIndex)}},CollectionManager.prototype.setBufferSize=function(length){this.log("setBufferSize",length),this.bufferSize=length,this.adjustBuffer()},CollectionManager.prototype.isBuffered=function(){return this.buffered},CollectionManager.prototype.getRelativeIndex=function(){var relativeIndex=Math.max(0,Math.min(this.getLastIndex(),this.position-this.bufferStart));return relativeIndex},CollectionManager.prototype.adjustBuffer=function(){var maxBufferStart=(this.getLastIndex()+1-this.bufferSize)%this.length();this.log("maxBufferStart",maxBufferStart),this.bufferStart=Math.max(0,Math.min(maxBufferStart,this.position-1)),this.cards=this.items.slice(this.bufferStart,this.bufferStart+this.bufferSize),this.log("adjustBuffer from",this.bufferStart,"to",this.bufferStart+this.bufferSize)},CollectionManager.prototype.length=function(){return this.items.length},CollectionManager.prototype.getLastIndex=function(){var lastIndex=Math.max(0,this.length()-1);return lastIndex},CollectionManager.prototype.init=function(){this.setBufferSize(this.isBuffered()?this.bufferSize:this.length()),this.length()>0&&this.goToIndex(this.index)},CollectionManager.prototype.setItems=function(items,reset){this.log("setItems",items,reset),reset&&(this.index=0,this.position=0),this.items=items||[],this.init()},CollectionManager.prototype.cycleAtEnd=function(){this.push(this.items.shift())},CollectionManager.prototype.push=function(slide,updateIndex){this.log("push item(s)",slide,updateIndex),this.items.push(slide),updateIndex&&(this.adjustBuffer(),this.updated=new Date),this.buffered||this.bufferSize++},CollectionManager.prototype.unshift=function(slide,updateIndex){this.log("unshift item(s)",slide,updateIndex),this.items.unshift(slide),this.buffered||this.bufferSize++,updateIndex&&(this.position++,this.adjustBuffer(),this.updated=new Date)},CollectionManager.prototype.cycleAtBeginning=function(){this.unshift(this.items.pop())},{create:function(options){return new CollectionManager(options)}}}]),!function($){"use strict";$(function(){$.support.transition=function(){var transitionEnd=function(){var name,el=document.createElement("bootstrap"),transEndEventNames={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(name in transEndEventNames)if(void 0!==el.style[name])return transEndEventNames[name]}();return transitionEnd&&{end:transitionEnd}}()})}(window.jQuery),!function($){"use strict";var Modal=function(element,options){this.options=options,this.$element=$(element).delegate('[data-dismiss="modal"]',"click.dismiss.modal",$.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};Modal.prototype={constructor:Modal,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var that=this,e=$.Event("show");this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass("fade");that.$element.parent().length||that.$element.appendTo(document.body),that.$element.show(),transition&&that.$element[0].offsetWidth,that.$element.addClass("in").attr("aria-hidden",!1),that.enforceFocus(),transition?that.$element.one($.support.transition.end,function(){that.$element.focus().trigger("shown")}):that.$element.focus().trigger("shown")}))},hide:function(e){e&&e.preventDefault(),e=$.Event("hide"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),$(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),$.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var that=this;$(document).on("focusin.modal",function(e){that.$element[0]===e.target||that.$element.has(e.target).length||that.$element.focus()})},escape:function(){var that=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(e){27==e.which&&that.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var that=this,timeout=setTimeout(function(){that.$element.off($.support.transition.end),that.hideModal()},500);this.$element.one($.support.transition.end,function(){clearTimeout(timeout),that.hideModal()})},hideModal:function(){var that=this;this.$element.hide(),this.backdrop(function(){that.removeBackdrop(),that.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(callback){var animate=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate;if(this.$backdrop=$('<div class="modal-backdrop '+animate+'" />').appendTo(document.body),this.$backdrop.click("static"==this.options.backdrop?$.proxy(this.$element[0].focus,this.$element[0]):$.proxy(this.hide,this)),doAnimate&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!callback)return;doAnimate?this.$backdrop.one($.support.transition.end,callback):callback()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),$.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one($.support.transition.end,callback):callback()):callback&&callback()}};var old=$.fn.modal;$.fn.modal=function(option){return this.each(function(){var $this=$(this),data=$this.data("modal"),options=$.extend({},$.fn.modal.defaults,$this.data(),"object"==typeof option&&option);data||$this.data("modal",data=new Modal(this,options)),"string"==typeof option?data[option]():options.show&&data.show()})},$.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},$.fn.modal.Constructor=Modal,$.fn.modal.noConflict=function(){return $.fn.modal=old,this},$(document).on("click.modal.data-api",'[data-toggle="modal"]',function(e){var $this=$(this),href=$this.attr("href"),$target=$($this.attr("data-target")||href&&href.replace(/.*(?=#[^\s]+$)/,"")),option=$target.data("modal")?"toggle":$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data());e.preventDefault(),$target.modal(option).one("hide",function(){$this.focus()})})}(window.jQuery),!function($){"use strict";var Tooltip=function(element,options){this.init("tooltip",element,options)};Tooltip.prototype={constructor:Tooltip,init:function(type,element,options){var eventIn,eventOut,triggers,trigger,i;for(this.type=type,this.$element=$(element),this.options=this.getOptions(options),this.enabled=!0,triggers=this.options.trigger.split(" "),i=triggers.length;i--;)trigger=triggers[i],"click"==trigger?this.$element.on("click."+this.type,this.options.selector,$.proxy(this.toggle,this)):"manual"!=trigger&&(eventIn="hover"==trigger?"mouseenter":"focus",eventOut="hover"==trigger?"mouseleave":"blur",this.$element.on(eventIn+"."+this.type,this.options.selector,$.proxy(this.enter,this)),this.$element.on(eventOut+"."+this.type,this.options.selector,$.proxy(this.leave,this)));this.options.selector?this._options=$.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(options){return options=$.extend({},$.fn[this.type].defaults,this.$element.data(),options),options.delay&&"number"==typeof options.delay&&(options.delay={show:options.delay,hide:options.delay}),options},enter:function(e){var self,defaults=$.fn[this.type].defaults,options={};return this._options&&$.each(this._options,function(key,value){defaults[key]!=value&&(options[key]=value)},this),self=$(e.currentTarget)[this.type](options).data(this.type),self.options.delay&&self.options.delay.show?(clearTimeout(this.timeout),self.hoverState="in",this.timeout=setTimeout(function(){"in"==self.hoverState&&self.show()},self.options.delay.show),void 0):self.show()},leave:function(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),self.options.delay&&self.options.delay.hide?(self.hoverState="out",this.timeout=setTimeout(function(){"out"==self.hoverState&&self.hide()},self.options.delay.hide),void 0):self.hide()},show:function(){var $tip,pos,actualWidth,actualHeight,placement,tp,e=$.Event("show");
if(this.hasContent()&&this.enabled){if(this.$element.trigger(e),e.isDefaultPrevented())return;switch($tip=this.tip(),this.setContent(),this.options.animation&&$tip.addClass("fade"),placement="function"==typeof this.options.placement?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement,$tip.detach().css({top:0,left:0,display:"block"}),this.options.container?$tip.appendTo(this.options.container):$tip.insertAfter(this.$element),pos=this.getPosition(),actualWidth=$tip[0].offsetWidth,actualHeight=$tip[0].offsetHeight,placement){case"bottom":tp={top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2};break;case"top":tp={top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2};break;case"left":tp={top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth};break;case"right":tp={top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}}this.applyPlacement(tp,placement),this.$element.trigger("shown")}},applyPlacement:function(offset,placement){var actualWidth,actualHeight,delta,replace,$tip=this.tip(),width=$tip[0].offsetWidth,height=$tip[0].offsetHeight;$tip.offset(offset).addClass(placement).addClass("in"),actualWidth=$tip[0].offsetWidth,actualHeight=$tip[0].offsetHeight,"top"==placement&&actualHeight!=height&&(offset.top=offset.top+height-actualHeight,replace=!0),"bottom"==placement||"top"==placement?(delta=0,offset.left<0&&(delta=-2*offset.left,offset.left=0,$tip.offset(offset),actualWidth=$tip[0].offsetWidth,actualHeight=$tip[0].offsetHeight),this.replaceArrow(delta-width+actualWidth,actualWidth,"left")):this.replaceArrow(actualHeight-height,actualHeight,"top"),replace&&$tip.offset(offset)},replaceArrow:function(delta,dimension,position){this.arrow().css(position,delta?50*(1-delta/dimension)+"%":"")},setContent:function(){var $tip=this.tip(),title=this.getTitle();$tip.find(".tooltip-inner")[this.options.html?"html":"text"](title),$tip.removeClass("fade in top bottom left right")},hide:function(){function removeWithAnimation(){var timeout=setTimeout(function(){$tip.off($.support.transition.end).detach()},500);$tip.one($.support.transition.end,function(){clearTimeout(timeout),$tip.detach()})}var $tip=this.tip(),e=$.Event("hide");return this.$element.trigger(e),e.isDefaultPrevented()?void 0:($tip.removeClass("in"),$.support.transition&&this.$tip.hasClass("fade")?removeWithAnimation():$tip.detach(),this.$element.trigger("hidden"),this)},fixTitle:function(){var $e=this.$element;($e.attr("title")||"string"!=typeof $e.attr("data-original-title"))&&$e.attr("data-original-title",$e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var el=this.$element[0];return $.extend({},"function"==typeof el.getBoundingClientRect?el.getBoundingClientRect():{width:el.offsetWidth,height:el.offsetHeight},this.$element.offset())},getTitle:function(){var title,$e=this.$element,o=this.options;return title=$e.attr("data-original-title")||("function"==typeof o.title?o.title.call($e[0]):o.title)},tip:function(){return this.$tip=this.$tip||$(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(e){var self=e?$(e.currentTarget)[this.type](this._options).data(this.type):this;self.tip().hasClass("in")?self.hide():self.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var old=$.fn.tooltip;$.fn.tooltip=function(option){return this.each(function(){var $this=$(this),data=$this.data("tooltip"),options="object"==typeof option&&option;data||$this.data("tooltip",data=new Tooltip(this,options)),"string"==typeof option&&data[option]()})},$.fn.tooltip.Constructor=Tooltip,$.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},$.fn.tooltip.noConflict=function(){return $.fn.tooltip=old,this}}(window.jQuery),!function($){"use strict";var Popover=function(element,options){this.init("popover",element,options)};Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype,{constructor:Popover,setContent:function(){var $tip=this.tip(),title=this.getTitle(),content=this.getContent();$tip.find(".popover-title")[this.options.html?"html":"text"](title),$tip.find(".popover-content")[this.options.html?"html":"text"](content),$tip.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var content,$e=this.$element,o=this.options;return content=("function"==typeof o.content?o.content.call($e[0]):o.content)||$e.attr("data-content")},tip:function(){return this.$tip||(this.$tip=$(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var old=$.fn.popover;$.fn.popover=function(option){return this.each(function(){var $this=$(this),data=$this.data("popover"),options="object"==typeof option&&option;data||$this.data("popover",data=new Popover(this,options)),"string"==typeof option&&data[option]()})},$.fn.popover.Constructor=Popover,$.fn.popover.defaults=$.extend({},$.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),$.fn.popover.noConflict=function(){return $.fn.popover=old,this}}(window.jQuery),!function($){"use strict";var Affix=function(element,options){this.options=$.extend({},$.fn.affix.defaults,options),this.$window=$(window).on("scroll.affix.data-api",$.proxy(this.checkPosition,this)).on("click.affix.data-api",$.proxy(function(){setTimeout($.proxy(this.checkPosition,this),1)},this)),this.$element=$(element),this.checkPosition()};Affix.prototype.checkPosition=function(){if(this.$element.is(":visible")){var affix,scrollHeight=$(document).height(),scrollTop=this.$window.scrollTop(),position=this.$element.offset(),offset=this.options.offset,offsetBottom=offset.bottom,offsetTop=offset.top,reset="affix affix-top affix-bottom";"object"!=typeof offset&&(offsetBottom=offsetTop=offset),"function"==typeof offsetTop&&(offsetTop=offset.top()),"function"==typeof offsetBottom&&(offsetBottom=offset.bottom()),affix=null!=this.unpin&&scrollTop+this.unpin<=position.top?!1:null!=offsetBottom&&position.top+this.$element.height()>=scrollHeight-offsetBottom?"bottom":null!=offsetTop&&offsetTop>=scrollTop?"top":!1,this.affixed!==affix&&(this.affixed=affix,this.unpin="bottom"==affix?position.top-scrollTop:null,this.$element.removeClass(reset).addClass("affix"+(affix?"-"+affix:"")))}};var old=$.fn.affix;$.fn.affix=function(option){return this.each(function(){var $this=$(this),data=$this.data("affix"),options="object"==typeof option&&option;data||$this.data("affix",data=new Affix(this,options)),"string"==typeof option&&data[option]()})},$.fn.affix.Constructor=Affix,$.fn.affix.defaults={offset:0},$.fn.affix.noConflict=function(){return $.fn.affix=old,this},$(window).on("load",function(){$('[data-spy="affix"]').each(function(){var $spy=$(this),data=$spy.data();data.offset=data.offset||{},data.offsetBottom&&(data.offset.bottom=data.offsetBottom),data.offsetTop&&(data.offset.top=data.offsetTop),$spy.affix(data)})})}(window.jQuery),!function($){"use strict";var dismiss='[data-dismiss="alert"]',Alert=function(el){$(el).on("click",dismiss,this.close)};Alert.prototype.close=function(e){function removeElement(){$parent.trigger("closed").remove()}var $parent,$this=$(this),selector=$this.attr("data-target");selector||(selector=$this.attr("href"),selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,"")),$parent=$(selector),e&&e.preventDefault(),$parent.length||($parent=$this.hasClass("alert")?$this:$this.parent()),$parent.trigger(e=$.Event("close")),e.isDefaultPrevented()||($parent.removeClass("in"),$.support.transition&&$parent.hasClass("fade")?$parent.on($.support.transition.end,removeElement):removeElement())};var old=$.fn.alert;$.fn.alert=function(option){return this.each(function(){var $this=$(this),data=$this.data("alert");data||$this.data("alert",data=new Alert(this)),"string"==typeof option&&data[option].call($this)})},$.fn.alert.Constructor=Alert,$.fn.alert.noConflict=function(){return $.fn.alert=old,this},$(document).on("click.alert.data-api",dismiss,Alert.prototype.close)}(window.jQuery),!function($){"use strict";var Button=function(element,options){this.$element=$(element),this.options=$.extend({},$.fn.button.defaults,options)};Button.prototype.setState=function(state){var d="disabled",$el=this.$element,data=$el.data(),val=$el.is("input")?"val":"html";state+="Text",data.resetText||$el.data("resetText",$el[val]()),$el[val](data[state]||this.options[state]),setTimeout(function(){"loadingText"==state?$el.addClass(d).attr(d,d):$el.removeClass(d).removeAttr(d)},0)},Button.prototype.toggle=function(){var $parent=this.$element.closest('[data-toggle="buttons-radio"]');$parent&&$parent.find(".active").removeClass("active"),this.$element.toggleClass("active")};var old=$.fn.button;$.fn.button=function(option){return this.each(function(){var $this=$(this),data=$this.data("button"),options="object"==typeof option&&option;data||$this.data("button",data=new Button(this,options)),"toggle"==option?data.toggle():option&&data.setState(option)})},$.fn.button.defaults={loadingText:"loading..."},$.fn.button.Constructor=Button,$.fn.button.noConflict=function(){return $.fn.button=old,this},$(document).on("click.button.data-api","[data-toggle^=button]",function(e){var $btn=$(e.target);$btn.hasClass("btn")||($btn=$btn.closest(".btn")),$btn.button("toggle")})}(window.jQuery),!function($){"use strict";var Collapse=function(element,options){this.$element=$(element),this.options=$.extend({},$.fn.collapse.defaults,options),this.options.parent&&(this.$parent=$(this.options.parent)),this.options.toggle&&this.toggle()};Collapse.prototype={constructor:Collapse,dimension:function(){var hasWidth=this.$element.hasClass("width");return hasWidth?"width":"height"},show:function(){var dimension,scroll,actives,hasData;if(!this.transitioning&&!this.$element.hasClass("in")){if(dimension=this.dimension(),scroll=$.camelCase(["scroll",dimension].join("-")),actives=this.$parent&&this.$parent.find("> .accordion-group > .in"),actives&&actives.length){if(hasData=actives.data("collapse"),hasData&&hasData.transitioning)return;actives.collapse("hide"),hasData||actives.data("collapse",null)}this.$element[dimension](0),this.transition("addClass",$.Event("show"),"shown"),$.support.transition&&this.$element[dimension](this.$element[0][scroll])}},hide:function(){var dimension;!this.transitioning&&this.$element.hasClass("in")&&(dimension=this.dimension(),this.reset(this.$element[dimension]()),this.transition("removeClass",$.Event("hide"),"hidden"),this.$element[dimension](0))},reset:function(size){var dimension=this.dimension();return this.$element.removeClass("collapse")[dimension](size||"auto")[0].offsetWidth,this.$element[null!==size?"addClass":"removeClass"]("collapse"),this},transition:function(method,startEvent,completeEvent){var that=this,complete=function(){"show"==startEvent.type&&that.reset(),that.transitioning=0,that.$element.trigger(completeEvent)};this.$element.trigger(startEvent),startEvent.isDefaultPrevented()||(this.transitioning=1,this.$element[method]("in"),$.support.transition&&this.$element.hasClass("collapse")?this.$element.one($.support.transition.end,complete):complete())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var old=$.fn.collapse;$.fn.collapse=function(option){return this.each(function(){var $this=$(this),data=$this.data("collapse"),options=$.extend({},$.fn.collapse.defaults,$this.data(),"object"==typeof option&&option);data||$this.data("collapse",data=new Collapse(this,options)),"string"==typeof option&&data[option]()})},$.fn.collapse.defaults={toggle:!0},$.fn.collapse.Constructor=Collapse,$.fn.collapse.noConflict=function(){return $.fn.collapse=old,this},$(document).on("click.collapse.data-api","[data-toggle=collapse]",function(e){var href,$this=$(this),target=$this.attr("data-target")||e.preventDefault()||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,""),option=$(target).data("collapse")?"toggle":$this.data();$this[$(target).hasClass("in")?"addClass":"removeClass"]("collapsed"),$(target).collapse(option)})}(window.jQuery),function(window,document,undefined){"use strict";angular.module("$strap.config",[]).value("$strapConfig",{}),angular.module("$strap.filters",["$strap.config"]),angular.module("$strap.directives",["$strap.config"]),angular.module("$strap",["$strap.filters","$strap.directives","$strap.config"]),angular.module("$strap.directives").directive("bsAlert",["$parse","$timeout","$compile",function($parse,$timeout,$compile){return{restrict:"A",link:function(scope,element,attrs){var getter=$parse(attrs.bsAlert),value=(getter.assign,getter(scope)),closeAlert=function(delay){$timeout(function(){element.alert("close")},1*delay)};attrs.bsAlert?scope.$watch(attrs.bsAlert,function(newValue,oldValue){value=newValue,element.html((newValue.title?"<strong>"+newValue.title+"</strong>&nbsp;":"")+newValue.content||""),newValue.closed&&element.hide(),$compile(element.contents())(scope),(newValue.type||oldValue.type)&&(oldValue.type&&element.removeClass("alert-"+oldValue.type),newValue.type&&element.addClass("alert-"+newValue.type)),angular.isDefined(newValue.closeAfter)?closeAlert(newValue.closeAfter):attrs.closeAfter&&closeAlert(attrs.closeAfter),(angular.isUndefined(attrs.closeButton)||"0"!==attrs.closeButton&&"false"!==attrs.closeButton)&&element.prepend('<button type="button" class="close" data-dismiss="alert">&times;</button>')},!0):((angular.isUndefined(attrs.closeButton)||"0"!==attrs.closeButton&&"false"!==attrs.closeButton)&&element.prepend('<button type="button" class="close" data-dismiss="alert">&times;</button>'),attrs.closeAfter&&closeAlert(attrs.closeAfter)),element.addClass("alert").alert(),element.hasClass("fade")&&(element.removeClass("in"),setTimeout(function(){element.addClass("in")}));var parentArray=attrs.ngRepeat&&attrs.ngRepeat.split(" in ").pop();element.on("close",function(ev){var removeElement;parentArray?(ev.preventDefault(),element.removeClass("in"),removeElement=function(){element.trigger("closed"),scope.$parent&&scope.$parent.$apply(function(){for(var path=parentArray.split("."),curr=scope.$parent,i=0;i<path.length;++i)curr&&(curr=curr[path[i]]);curr&&curr.splice(scope.$index,1)})},$.support.transition&&element.hasClass("fade")?element.on($.support.transition.end,removeElement):removeElement()):value&&(ev.preventDefault(),element.removeClass("in"),removeElement=function(){element.trigger("closed"),scope.$apply(function(){value.closed=!0})},$.support.transition&&element.hasClass("fade")?element.on($.support.transition.end,removeElement):removeElement())})}}}]),angular.module("$strap.directives").directive("bsButton",["$parse","$timeout",function($parse){return{restrict:"A",require:"?ngModel",link:function(scope,element,attrs,controller){if(controller){element.parent('[data-toggle="buttons-checkbox"], [data-toggle="buttons-radio"]').length||element.attr("data-toggle","button");var startValue=!!scope.$eval(attrs.ngModel);startValue&&element.addClass("active"),scope.$watch(attrs.ngModel,function(newValue,oldValue){var bNew=!!newValue,bOld=!!oldValue;bNew!==bOld?$.fn.button.Constructor.prototype.toggle.call(button):bNew&&!startValue&&element.addClass("active")})}element.hasClass("btn")||element.on("click.button.data-api",function(){element.button("toggle")}),element.button();var button=element.data("button");button.toggle=function(){if(!controller)return $.fn.button.Constructor.prototype.toggle.call(this);var $parent=element.parent('[data-toggle="buttons-radio"]');$parent.length?(element.siblings("[ng-model]").each(function(k,v){$parse($(v).attr("ng-model")).assign(scope,!1)}),scope.$digest(),controller.$modelValue||(controller.$setViewValue(!controller.$modelValue),scope.$digest())):scope.$apply(function(){controller.$setViewValue(!controller.$modelValue)})}}}}]).directive("bsButtonsCheckbox",["$parse",function(){return{restrict:"A",require:"?ngModel",compile:function(tElement){tElement.attr("data-toggle","buttons-checkbox").find("a, button").each(function(k,v){$(v).attr("bs-button","")})}}}]).directive("bsButtonsRadio",["$timeout",function($timeout){return{restrict:"A",require:"?ngModel",compile:function(tElement,tAttrs){return tElement.attr("data-toggle","buttons-radio"),tAttrs.ngModel||tElement.find("a, button").each(function(k,v){$(v).attr("bs-button","")}),function(scope,iElement,iAttrs,controller){controller&&($timeout(function(){iElement.find("[value]").button().filter('[value="'+controller.$viewValue+'"]').addClass("active")}),iElement.on("click.button.data-api",function(ev){scope.$apply(function(){controller.$setViewValue($(ev.target).closest("button").attr("value"))})}),scope.$watch(iAttrs.ngModel,function(newValue,oldValue){if(newValue!==oldValue){var $btn=iElement.find('[value="'+scope.$eval(iAttrs.ngModel)+'"]');$btn.length&&$btn.button("toggle")}}))}}}}]),angular.module("$strap.directives").directive("bsButtonSelect",["$parse","$timeout",function($parse){return{restrict:"A",require:"?ngModel",link:function(scope,element,attrs,ctrl){var getter=$parse(attrs.bsButtonSelect);getter.assign,ctrl&&(element.text(scope.$eval(attrs.ngModel)),scope.$watch(attrs.ngModel,function(newValue){element.text(newValue)}));var values,value,index,newValue;element.bind("click",function(){values=getter(scope),value=ctrl?scope.$eval(attrs.ngModel):element.text(),index=values.indexOf(value),newValue=index>values.length-2?values[0]:values[index+1],scope.$apply(function(){element.text(newValue),ctrl&&ctrl.$setViewValue(newValue)})})}}}]),angular.module("$strap.directives").directive("bsDatepicker",["$timeout","$strapConfig",function($timeout,$strapConfig){var isAppleTouch=/(iP(a|o)d|iPhone)/g.test(navigator.userAgent),regexpMap=function(language){return $.fn.datepicker.dates[language]&&language||(language="en"),{"/":"[\\/]","-":"[-]",".":"[.]"," ":"[\\s]",dd:"(?:(?:[0-2]?[0-9]{1})|(?:[3][01]{1}))",d:"(?:(?:[0-2]?[0-9]{1})|(?:[3][01]{1}))",mm:"(?:[0]?[1-9]|[1][012])",m:"(?:[0]?[1-9]|[1][012])",DD:"(?:"+$.fn.datepicker.dates[language].days.join("|")+")",D:"(?:"+$.fn.datepicker.dates[language].daysShort.join("|")+")",MM:"(?:"+$.fn.datepicker.dates[language].months.join("|")+")",M:"(?:"+$.fn.datepicker.dates[language].monthsShort.join("|")+")",yyyy:"(?:(?:[1]{1}[0-9]{1}[0-9]{1}[0-9]{1})|(?:[2]{1}[0-9]{3}))(?![[0-9]])",yy:"(?:(?:[0-9]{1}[0-9]{1}))(?![[0-9]])"}},regexpForDateFormat=function(format,language){var i,re=format,map=regexpMap(language);return i=0,angular.forEach(map,function(v,k){re=re.split(k).join("${"+i+"}"),i++}),i=0,angular.forEach(map,function(v){re=re.split("${"+i+"}").join(v),i++}),new RegExp("^"+re+"$",["i"])},ISODateRegexp=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/;return{restrict:"A",require:"?ngModel",link:function(scope,element,attrs,controller){var options=angular.extend({autoclose:!0},$strapConfig.datepicker||{}),type=attrs.dateType||options.type||"date",getFormattedModelValue=function(modelValue,format,language){return modelValue&&"iso"===type&&ISODateRegexp.test(modelValue)?$.fn.datepicker.DPGlobal.parseDate(new Date(modelValue),$.fn.datepicker.DPGlobal.parseFormat(format),language):modelValue&&"date"===type&&angular.isString(modelValue)?$.fn.datepicker.DPGlobal.parseDate(modelValue,$.fn.datepicker.DPGlobal.parseFormat(format),language):modelValue},init=function(){options=angular.extend({autoclose:!0},$strapConfig.datepicker||{}),type=attrs.dateType||options.type||"date",angular.forEach(["format","weekStart","calendarWeeks","startDate","endDate","daysOfWeekDisabled","autoclose","startView","minViewMode","todayBtn","todayHighlight","keyboardNavigation","language","forceParse"],function(key){angular.isDefined(attrs[key])&&(options[key]=attrs[key])});var language=options.language||"en",readFormat=attrs.dateFormat||options.format||$.fn.datepicker.dates[language]&&$.fn.datepicker.dates[language].format||"mm/dd/yyyy",format=isAppleTouch?"yyyy-mm-dd":readFormat,dateFormatRegexp=regexpForDateFormat(format,language);controller&&(controller.$formatters.unshift(function(modelValue){return getFormattedModelValue(modelValue,readFormat,language)}),controller.$parsers.unshift(function(viewValue){return viewValue?"date"!==type&&"iso"!==type||!angular.isDate(viewValue)?angular.isString(viewValue)&&dateFormatRegexp.test(viewValue)?(controller.$setValidity("date",!0),isAppleTouch?new Date(viewValue):"string"===type?viewValue:$.fn.datepicker.DPGlobal.parseDate(viewValue,$.fn.datepicker.DPGlobal.parseFormat(format),language)):(controller.$setValidity("date",!1),undefined):(controller.$setValidity("date",!0),viewValue):(controller.$setValidity("date",!0),null)}),controller.$render=function(){if(isAppleTouch){var date=controller.$viewValue?$.fn.datepicker.DPGlobal.formatDate(controller.$viewValue,$.fn.datepicker.DPGlobal.parseFormat(format),language):"";return element.val(date),date}return controller.$viewValue||element.val(""),element.datepicker("update",controller.$viewValue)}),isAppleTouch?element.prop("type","date").css("-webkit-appearance","textfield"):(controller&&element.on("changeDate",function(ev){scope.$apply(function(){controller.$setViewValue("string"===type?element.val():ev.date)})}),element.datepicker(angular.extend(options,{format:format,language:language})),scope.$on("$destroy",function(){var datepicker=element.data("datepicker");datepicker&&(datepicker.picker.remove(),element.data("datepicker",null))}),attrs.$observe("startDate",function(value){element.datepicker("setStartDate",value)}),attrs.$observe("endDate",function(value){element.datepicker("setEndDate",value)}));var component=element.siblings('[data-toggle="datepicker"]');component.length&&component.on("click",function(){element.prop("disabled")||element.trigger("focus")})};init(),scope.$watch(function(){return attrs.language},function(newValue,oldValue){if(newValue!==oldValue){var oldLanguage=$.fn.datepicker.dates[oldValue]?oldValue:"en",oldFormat=attrs.dateFormat||options.format||$.fn.datepicker.dates[oldLanguage]&&$.fn.datepicker.dates[oldLanguage].format||"mm/dd/yyyy",oldDate=$.fn.datepicker.DPGlobal.parseDate(element.val(),$.fn.datepicker.DPGlobal.parseFormat(oldFormat),oldLanguage),newLanguage=$.fn.datepicker.dates[newValue]?newValue:"en",newFormat=$.fn.datepicker.dates[newLanguage]&&$.fn.datepicker.dates[newLanguage].format||"mm/dd/yyyy",newDateString=$.fn.datepicker.DPGlobal.formatDate(oldDate,$.fn.datepicker.DPGlobal.parseFormat(newFormat),newLanguage);element.datepicker("remove"),element.val(""),init();var mValue=getFormattedModelValue(newDateString,newFormat,newLanguage);controller.$modelValue=mValue,controller.$viewValue=newDateString}})}}}]),angular.module("$strap.directives").directive("bsDropdown",["$parse","$compile","$timeout",function($parse,$compile,$timeout){var buildTemplate=function(items,ul){return ul||(ul=['<ul class="dropdown-menu" role="menu" aria-labelledby="drop1">',"</ul>"]),angular.forEach(items,function(item,index){if(item.divider)return ul.splice(index+1,0,'<li class="divider"></li>');var li="<li"+(item.submenu&&item.submenu.length?' class="dropdown-submenu"':"")+'><a tabindex="-1" ng-href="'+(item.href||"")+'"'+(item.click?'" ng-click="'+item.click+'"':"")+(item.target?'" target="'+item.target+'"':"")+(item.method?'" data-method="'+item.method+'"':"")+">"+(item.icon&&'<i class="'+item.icon+'"></i>&nbsp;'||"")+(item.text||"")+"</a>";item.submenu&&item.submenu.length&&(li+=buildTemplate(item.submenu).join("\n")),li+="</li>",ul.splice(index+1,0,li)}),ul};return{restrict:"EA",scope:!0,link:function(scope,iElement,iAttrs){var getter=$parse(iAttrs.bsDropdown),items=getter(scope);$timeout(function(){!angular.isArray(items);var dropdown=angular.element(buildTemplate(items).join(""));dropdown.insertAfter(iElement),$compile(iElement.next("ul.dropdown-menu"))(scope)}),iElement.addClass("dropdown-toggle").attr("data-toggle","dropdown")}}}]),angular.module("$strap.directives").factory("$modal",["$rootScope","$compile","$http","$timeout","$q","$templateCache","$strapConfig",function($rootScope,$compile,$http,$timeout,$q,$templateCache,$strapConfig){var ModalFactory=function(config){function Modal(config){var options=angular.extend({show:!0},$strapConfig.modal,config),scope=options.scope?options.scope:$rootScope.$new(),templateUrl=options.template;return $q.when($templateCache.get(templateUrl)||$http.get(templateUrl,{cache:!0}).then(function(res){return res.data})).then(function(template){var id=templateUrl.replace(".html","").replace(/[\/|\.|:]/g,"-")+"-"+scope.$id,$modal=$('<div class="modal hide" tabindex="-1"></div>').attr("id",id).addClass("fade").html(template);return options.modalClass&&$modal.addClass(options.modalClass),$("body").append($modal),$timeout(function(){$compile($modal)(scope)}),scope.$modal=function(name){$modal.modal(name)},angular.forEach(["show","hide"],function(name){scope[name]=function(){$modal.modal(name)}}),scope.dismiss=scope.hide,angular.forEach(["show","shown","hide","hidden"],function(name){$modal.on(name,function(ev){scope.$emit("modal-"+name,ev)})}),$modal.on("shown",function(){$("input[autofocus], textarea[autofocus]",$modal).first().trigger("focus")}),$modal.on("hidden",function(){options.persist||scope.$destroy()}),scope.$on("$destroy",function(){$modal.remove()}),$modal.modal(options),$modal})}return new Modal(config)};return ModalFactory}]).directive("bsModal",["$q","$modal",function($q,$modal){return{restrict:"A",scope:!0,link:function(scope,iElement,iAttrs){var options={template:scope.$eval(iAttrs.bsModal),persist:!0,show:!1,scope:scope};angular.forEach(["modalClass","backdrop","keyboard"],function(key){angular.isDefined(iAttrs[key])&&(options[key]=iAttrs[key])}),$q.when($modal(options)).then(function(modal){iElement.attr("data-target","#"+modal.attr("id")).attr("data-toggle","modal")})}}}]),angular.module("$strap.directives").directive("bsNavbar",["$location",function($location){return{restrict:"A",link:function(scope,element){scope.$watch(function(){return $location.path()},function(newValue){$("li[data-match-route]",element).each(function(k,li){var $li=angular.element(li),pattern=$li.attr("data-match-route"),regexp=new RegExp("^"+pattern+"$",["i"]);if(regexp.test(newValue)){$li.addClass("active");var $collapse=$li.find(".collapse.in");$collapse.length&&$collapse.collapse("hide")}else $li.removeClass("active")})})}}}]),angular.module("$strap.directives").directive("bsPopover",["$parse","$compile","$http","$timeout","$q","$templateCache",function($parse,$compile,$http,$timeout,$q,$templateCache){return $("body").on("keyup",function(ev){27===ev.keyCode&&$(".popover.in").popover("hide")}),{restrict:"A",scope:!0,link:function(scope,element,attr){var getter=$parse(attr.bsPopover),value=(getter.assign,getter(scope)),options={};angular.isObject(value)&&(options=value),$q.when(options.content||$templateCache.get(value)||$http.get(value,{cache:!0})).then(function(template){angular.isObject(template)&&(template=template.data),angular.forEach(["placement","trigger"],function(name){attr[name]&&(options[name]=attr[name])}),attr.unique&&element.on("show",function(){$(".popover.in").not(element).popover("hide")}),attr.hide&&scope.$watch(attr.hide,function(newValue,oldValue){newValue?popover.hide():newValue!==oldValue&&$timeout(function(){popover.show()})}),attr.show&&scope.$watch(attr.show,function(newValue,oldValue){newValue?$timeout(function(){popover.show()}):newValue!==oldValue&&popover.hide()}),element.popover(angular.extend({},options,{content:template,html:!0}));var popover=element.data("popover");popover.hasContent=function(){return this.getTitle()||template},popover.getPosition=function(){var r=$.fn.popover.Constructor.prototype.getPosition.apply(this,arguments);return $compile(this.$tip)(scope),scope.$digest(),this.$tip.data("popover",this),r},scope.$popover=function(name){popover(name)},angular.forEach(["show","hide"],function(name){scope[name]=function(){popover[name]()}}),scope.dismiss=scope.hide,angular.forEach(["show","shown","hide","hidden"],function(name){element.on(name,function(ev){scope.$emit("popover-"+name,ev)})})})}}}]),angular.module("$strap.directives").directive("bsSelect",["$timeout",function($timeout){var NG_OPTIONS_REGEXP=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/;return{restrict:"A",require:"?ngModel",link:function(scope,element,attrs,controller){var options=scope.$eval(attrs.bsSelect)||{};if($timeout(function(){element.selectpicker(options),element.next().removeClass("ng-scope")}),controller){var refresh=function(newValue,oldValue){angular.equals(newValue,oldValue)||element.selectpicker("refresh")};if(scope.$watch(attrs.ngModel,function(newValue,oldValue){refresh(newValue,oldValue)}),attrs.ngOptions){var match=attrs.ngOptions.match(NG_OPTIONS_REGEXP);match&&scope[match[7]]&&scope.$watch(function(){return scope[match[7]]},function(newValue,oldValue){angular.equals(newValue,oldValue)||refresh(newValue,oldValue)},!0)}}}}}]),angular.module("$strap.directives").directive("bsTabs",["$parse","$compile","$timeout",function($parse,$compile,$timeout){var template='<div class="tabs"><ul class="nav nav-tabs"><li ng-repeat="pane in panes" ng-class="{active:pane.active}"><a data-target="#{{pane.id}}" data-index="{{$index}}" data-toggle="tab">{{pane.title}}</a></li></ul><div class="tab-content" ng-transclude></div>';return{restrict:"A",require:"?ngModel",priority:0,scope:!0,template:template,replace:!0,transclude:!0,compile:function(){return function(scope,iElement,iAttrs,controller){var getter=$parse(iAttrs.bsTabs);getter.assign,getter(scope),scope.panes=[];var id,title,active,$tabs=iElement.find("ul.nav-tabs"),$panes=iElement.find("div.tab-content"),activeTab=0;$timeout(function(){$panes.find("[data-title], [data-tab]").each(function(index){var $this=angular.element(this);id="tab-"+scope.$id+"-"+index,title=$this.data("title")||$this.data("tab"),active=!active&&$this.hasClass("active"),$this.attr("id",id).addClass("tab-pane"),iAttrs.fade&&$this.addClass("fade"),scope.panes.push({id:id,title:title,content:this.innerHTML,active:active})}),scope.panes.length&&!active&&($panes.find(".tab-pane:first-child").addClass("active"+(iAttrs.fade?" in":"")),scope.panes[0].active=!0)}),controller&&(iElement.on("show",function(ev){var $target=$(ev.target);scope.$apply(function(){controller.$setViewValue($target.data("index"))})}),scope.$watch(iAttrs.ngModel,function(newValue){angular.isUndefined(newValue)||(activeTab=newValue,setTimeout(function(){var $next=$($tabs[0].querySelectorAll("li")[1*newValue]);$next.hasClass("active")||$next.children("a").tab("show")}))}))}}}}]),angular.module("$strap.directives").directive("bsTimepicker",["$timeout","$strapConfig",function($timeout,$strapConfig){var TIME_REGEXP="((?:(?:[0-1][0-9])|(?:[2][0-3])|(?:[0-9])):(?:[0-5][0-9])(?::[0-5][0-9])?(?:\\s?(?:am|AM|pm|PM))?)";return{restrict:"A",require:"?ngModel",link:function(scope,element,attrs,controller){var pad=function(number){var r=String(number);return 1===r.length&&(r="0"+r),r},options=angular.extend({openOnFocus:!1},$strapConfig.timepicker),defaultTime=attrs.defaultTime||options.defaultTime||!1;options.defaultTime=!1;var type=attrs.timeType||options.timeType||"string";if(angular.forEach(["template","minuteStep","showSeconds","secondStep","showMeridian","showInputs","disableFocus","modalBackdrop","openOnFocus"],function(key){angular.isDefined(attrs[key])&&(options[key]="true"===attrs[key]||"false"===attrs[key]?"true"===attrs[key]:/^\-?([0-9]+|Infinity)$/.test(attrs[key])?parseInt(attrs[key],10):attrs[key])
}),controller){element.on("changeTime.timepicker",function(ev){$timeout(function(){if("string"===type)controller.$setViewValue(element.val());else if("date"===type){var date=new Date;date.setHours(ev.time.hours),date.setMinutes(ev.time.minutes),controller.$setViewValue(date)}})});var timeRegExp=new RegExp("^"+TIME_REGEXP+"$",["i"]);controller.$formatters.unshift(function(modelValue){if(modelValue)return"date"===type?(controller.$setViewValue(new Date(modelValue)),element.val(new Date(modelValue)),new Date(modelValue)):(controller.$setViewValue(modelValue),element.val(modelValue),modelValue);if(defaultTime){if("current"===defaultTime){if("date"===type)return controller.$setViewValue(new Date),element.val(new Date),new Date;var currentDate=new Date;return pad(currentDate.getHours())+":"+pad(currentDate.getMinutes()),controller.$setViewValue(currentDate),element.val(currentDate),currentDate}return controller.$setViewValue(defaultTime),element.val(defaultTime),defaultTime}return controller.$setViewValue(element.val()),element.val()}),controller.$render=function(){if(controller.$viewValue){if("date"===type){var renderedDate;if(timeRegExp.test(controller.$viewValue)){renderedDate=new Date;var dateParts=controller.$viewValue.split(":"),hours=isNaN(parseInt(dateParts[0],10))?"0":parseInt(dateParts[0],10),minutes=isNaN(parseInt(dateParts[1],10))?"0":parseInt(dateParts[1],10);return renderedDate.setHours(hours),renderedDate.setMinutes(minutes),element.val(controller.$viewValue),controller.$setViewValue(renderedDate),renderedDate}renderedDate=new Date(controller.$viewValue);var modelRender="Invalid Date"!==renderedDate?pad(renderedDate.getHours())+":"+pad(renderedDate.getMinutes()):"";return element.val(modelRender),controller.$setViewValue(renderedDate),renderedDate}return element.val(controller.$viewValue),controller.$setViewValue(controller.$viewValue),controller.$viewValue}return element.val(""),""},controller.$parsers.unshift(function(viewValue){return!viewValue||"string"===type&&timeRegExp.test(viewValue)?(controller.$setValidity("time",!0),viewValue):"date"===type&&"object"==typeof viewValue&&"Invalid Date"!==viewValue.toString()?(controller.$setValidity("time",!0),viewValue):(controller.$setValidity("time",!1),void 0)})}element.attr("data-toggle","timepicker"),element.parent().addClass("bootstrap-timepicker"),element.timepicker(options||{});var timepicker=element.data("timepicker"),component=element.siblings('[data-toggle="timepicker"]');component.length&&component.on("click",$.proxy(timepicker.showWidget,timepicker)),options.openOnFocus&&element.on("focus",$.proxy(timepicker.showWidget,timepicker))}}}]),angular.module("$strap.directives").directive("bsTooltip",["$parse","$compile",function($parse){return{restrict:"A",scope:!0,link:function(scope,element,attrs){var getter=$parse(attrs.bsTooltip),value=(getter.assign,getter(scope));scope.$watch(attrs.bsTooltip,function(newValue){value=newValue}),attrs.unique&&element.on("show",function(){$(".tooltip.in").each(function(){var $this=$(this),tooltip=$this.data("tooltip");tooltip&&!tooltip.$element.is(element)&&$this.tooltip("hide")})}),element.tooltip({title:function(){return angular.isFunction(value)?value.apply(null,arguments):value},html:!0});var tooltip=element.data("tooltip");tooltip.show=function(){var r=$.fn.tooltip.Constructor.prototype.show.apply(this,arguments);return this.tip().data("tooltip",this),r},scope._tooltip=function(event){element.tooltip(event)},scope.hide=function(){element.tooltip("hide")},scope.show=function(){element.tooltip("show")},scope.dismiss=scope.hide}}}]),angular.module("$strap.directives").directive("bsTypeahead",["$parse",function($parse){return{restrict:"A",require:"?ngModel",link:function(scope,element,attrs,controller){var getter=$parse(attrs.bsTypeahead),value=(getter.assign,getter(scope));scope.$watch(attrs.bsTypeahead,function(newValue,oldValue){newValue!==oldValue&&(value=newValue)}),element.attr("data-provide","typeahead"),element.typeahead({source:function(){return angular.isFunction(value)?value.apply(null,arguments):value},minLength:attrs.minLength||1,items:attrs.items,updater:function(value){return controller&&scope.$apply(function(){controller.$setViewValue(value)}),scope.$emit("typeahead-updated",value,attrs.id),value}});var typeahead=element.data("typeahead");typeahead.lookup=function(){var items;return this.query=this.$element.val()||"",this.query.length<this.options.minLength?this.shown?this.hide():this:(items=$.isFunction(this.source)?this.source(this.query,$.proxy(this.process,this)):this.source,items?this.process(items):this)},attrs.matchAll&&(typeahead.matcher=function(){return!0}),"0"===attrs.minLength&&setTimeout(function(){element.on("focus",function(){0===element.val().length&&setTimeout(element.typeahead.bind(element,"lookup"),200)})})}}}])}(window,document),function($){function Coords(obj){return obj[0]&&$.isPlainObject(obj[0])?this.data=obj[0]:this.el=obj,this.isCoords=!0,this.coords={},this.init(),this}var fn=Coords.prototype;fn.init=function(){this.set(),this.original_coords=this.get()},fn.set=function(update,not_update_offsets){var el=this.el;if(el&&!update&&(this.data=el.offset(),this.data.width=el.width(),this.data.height=el.height()),el&&update&&!not_update_offsets){var offset=el.offset();this.data.top=offset.top,this.data.left=offset.left}var d=this.data;return this.coords.x1=d.left,this.coords.y1=d.top,this.coords.x2=d.left+d.width,this.coords.y2=d.top+d.height,this.coords.cx=d.left+d.width/2,this.coords.cy=d.top+d.height/2,this.coords.width=d.width,this.coords.height=d.height,this.coords.el=el||!1,this},fn.update=function(data){if(!data&&!this.el)return this;if(data){var new_data=$.extend({},this.data,data);return this.data=new_data,this.set(!0,!0)}return this.set(!0),this},fn.get=function(){return this.coords},$.fn.coords=function(){if(this.data("coords"))return this.data("coords");var ins=new Coords(this,arguments[0]);return this.data("coords",ins),ins}}(jQuery,window,document),function($,window,document){function Collision(el,colliders,options){this.options=$.extend(defaults,options),this.$element=el,this.last_colliders=[],this.last_colliders_coords=[],"string"==typeof colliders||colliders instanceof jQuery?this.$colliders=$(colliders,this.options.colliders_context).not(this.$element):this.colliders=$(colliders),this.init()}var defaults={colliders_context:document.body},fn=Collision.prototype;fn.init=function(){this.find_collisions()},fn.overlaps=function(a,b){var x=!1,y=!1;return(b.x1>=a.x1&&b.x1<=a.x2||b.x2>=a.x1&&b.x2<=a.x2||a.x1>=b.x1&&a.x2<=b.x2)&&(x=!0),(b.y1>=a.y1&&b.y1<=a.y2||b.y2>=a.y1&&b.y2<=a.y2||a.y1>=b.y1&&a.y2<=b.y2)&&(y=!0),x&&y},fn.detect_overlapping_region=function(a,b){var regionX="",regionY="";return a.y1>b.cy&&a.y1<b.y2&&(regionX="N"),a.y2>b.y1&&a.y2<b.cy&&(regionX="S"),a.x1>b.cx&&a.x1<b.x2&&(regionY="W"),a.x2>b.x1&&a.x2<b.cx&&(regionY="E"),regionX+regionY||"C"},fn.calculate_overlapped_area_coords=function(a,b){var x1=Math.max(a.x1,b.x1),y1=Math.max(a.y1,b.y1),x2=Math.min(a.x2,b.x2),y2=Math.min(a.y2,b.y2);return $({left:x1,top:y1,width:x2-x1,height:y2-y1}).coords().get()},fn.calculate_overlapped_area=function(coords){return coords.width*coords.height},fn.manage_colliders_start_stop=function(new_colliders_coords,start_callback,stop_callback){for(var last=this.last_colliders_coords,i=0,il=last.length;il>i;i++)-1===$.inArray(last[i],new_colliders_coords)&&start_callback.call(this,last[i]);for(var j=0,jl=new_colliders_coords.length;jl>j;j++)-1===$.inArray(new_colliders_coords[j],last)&&stop_callback.call(this,new_colliders_coords[j])},fn.find_collisions=function(player_data_coords){for(var self=this,colliders_coords=[],colliders_data=[],$colliders=this.colliders||this.$colliders,count=$colliders.length,player_coords=self.$element.coords().update(player_data_coords||!1).get();count--;){var $collider=self.$colliders?$($colliders[count]):$colliders[count],$collider_coords_ins=$collider.isCoords?$collider:$collider.coords(),collider_coords=$collider_coords_ins.get(),overlaps=self.overlaps(player_coords,collider_coords);if(overlaps){var region=self.detect_overlapping_region(player_coords,collider_coords);if("C"===region){var area_coords=self.calculate_overlapped_area_coords(player_coords,collider_coords),area=self.calculate_overlapped_area(area_coords),collider_data={area:area,area_coords:area_coords,region:region,coords:collider_coords,player_coords:player_coords,el:$collider};self.options.on_overlap&&self.options.on_overlap.call(this,collider_data),colliders_coords.push($collider_coords_ins),colliders_data.push(collider_data)}}}return(self.options.on_overlap_stop||self.options.on_overlap_start)&&this.manage_colliders_start_stop(colliders_coords,self.options.on_overlap_start,self.options.on_overlap_stop),this.last_colliders_coords=colliders_coords,colliders_data},fn.get_closest_colliders=function(player_data_coords){var colliders=this.find_collisions(player_data_coords);return colliders.sort(function(a,b){return"C"===a.region&&"C"===b.region?a.coords.y1<b.coords.y1||a.coords.x1<b.coords.x1?-1:1:a.area<b.area?1:1}),colliders},$.fn.collision=function(collider,options){return new Collision(this,collider,options)}}(jQuery,window,document),function(window){window.delay=function(func,wait){var args=Array.prototype.slice.call(arguments,2);return setTimeout(function(){return func.apply(null,args)},wait)},window.debounce=function(func,wait,immediate){var timeout;return function(){var context=this,args=arguments,later=function(){timeout=null,immediate||func.apply(context,args)};immediate&&!timeout&&func.apply(context,args),clearTimeout(timeout),timeout=setTimeout(later,wait)}},window.throttle=function(func,wait){var context,args,timeout,throttling,more,result,whenDone=debounce(function(){more=throttling=!1},wait);return function(){context=this,args=arguments;var later=function(){timeout=null,more&&func.apply(context,args),whenDone()};return timeout||(timeout=setTimeout(later,wait)),throttling?more=!0:result=func.apply(context,args),whenDone(),throttling=!0,result}}}(window),function($,window,document){function Draggable(el,options){this.options=$.extend({},defaults,options),this.$body=$(document.body),this.$container=$(el),this.$dragitems=$(this.options.items,this.$container),this.is_dragging=!1,this.player_min_left=0+this.options.offset_left,this.init()}var defaults={items:"li",distance:1,limit:!0,offset_left:0,autoscroll:!0,ignore_dragging:["INPUT","TEXTAREA","SELECT","BUTTON"],handle:null,container_width:0,move_element:!0,helper:!1},$window=$(window),isTouch=!!("ontouchstart"in window),pointer_events={start:isTouch?"touchstart.gridster-draggable":"mousedown.gridster-draggable",move:isTouch?"touchmove.gridster-draggable":"mousemove.gridster-draggable",end:isTouch?"touchend.gridster-draggable":"mouseup.gridster-draggable"},fn=Draggable.prototype;fn.init=function(){this.calculate_positions(),this.$container.css("position","relative"),this.disabled=!1,this.events(),$(window).bind("resize.gridster-draggable",throttle($.proxy(this.calculate_positions,this),200))},fn.events=function(){this.$container.on("selectstart.gridster-draggable",$.proxy(this.on_select_start,this)),this.$container.on(pointer_events.start,this.options.items,$.proxy(this.drag_handler,this)),this.$body.on(pointer_events.end,$.proxy(function(e){this.is_dragging=!1,this.disabled||(this.$body.off(pointer_events.move),this.drag_start&&this.on_dragstop(e))},this))},fn.get_actual_pos=function($el){var pos=$el.position();return pos},fn.get_mouse_pos=function(e){if(isTouch){var oe=e.originalEvent;e=oe.touches.length?oe.touches[0]:oe.changedTouches[0]}return{left:e.clientX,top:e.clientY}},fn.get_offset=function(e){e.preventDefault();var mouse_actual_pos=this.get_mouse_pos(e),diff_x=Math.round(mouse_actual_pos.left-this.mouse_init_pos.left),diff_y=Math.round(mouse_actual_pos.top-this.mouse_init_pos.top),left=Math.round(this.el_init_offset.left+diff_x-this.baseX),top=Math.round(this.el_init_offset.top+diff_y-this.baseY+this.scrollOffset);return this.options.limit&&(left>this.player_max_left?left=this.player_max_left:left<this.player_min_left&&(left=this.player_min_left)),{position:{left:left,top:top},pointer:{left:mouse_actual_pos.left,top:mouse_actual_pos.top,diff_left:diff_x,diff_top:diff_y+this.scrollOffset}}},fn.get_drag_data=function(e){var offset=this.get_offset(e);return offset.$player=this.$player,offset.$helper=this.helper?this.$helper:this.$player,offset},fn.manage_scroll=function(data){var nextScrollTop,scrollTop=$window.scrollTop(),min_window_y=scrollTop,max_window_y=min_window_y+this.window_height,mouse_down_zone=max_window_y-50,mouse_up_zone=min_window_y+50;data.pointer.left;var abs_mouse_top=min_window_y+data.pointer.top,max_player_y=this.doc_height-this.window_height+this.player_height;abs_mouse_top>=mouse_down_zone&&(nextScrollTop=scrollTop+30,max_player_y>nextScrollTop&&($window.scrollTop(nextScrollTop),this.scrollOffset=this.scrollOffset+30)),mouse_up_zone>=abs_mouse_top&&(nextScrollTop=scrollTop-30,nextScrollTop>0&&($window.scrollTop(nextScrollTop),this.scrollOffset=this.scrollOffset-30))},fn.calculate_positions=function(){this.window_height=$window.height()},fn.drag_handler=function(e){if(e.target.nodeName,!this.disabled&&(1===e.which||isTouch)&&!this.ignore_drag(e)){var self=this,first=!0;return this.$player=$(e.currentTarget),this.el_init_pos=this.get_actual_pos(this.$player),this.mouse_init_pos=this.get_mouse_pos(e),this.offsetY=this.mouse_init_pos.top-this.el_init_pos.top,this.$body.on(pointer_events.move,function(mme){var mouse_actual_pos=self.get_mouse_pos(mme),diff_x=Math.abs(mouse_actual_pos.left-self.mouse_init_pos.left),diff_y=Math.abs(mouse_actual_pos.top-self.mouse_init_pos.top);return diff_x>self.options.distance||diff_y>self.options.distance?first?(first=!1,self.on_dragstart.call(self,mme),!1):(self.is_dragging===!0&&self.on_dragmove.call(self,mme),!1):!1}),isTouch?void 0:!1}},fn.on_dragstart=function(e){if(e.preventDefault(),this.is_dragging)return this;this.drag_start=this.is_dragging=!0;var offset=this.$container.offset();this.baseX=Math.round(offset.left),this.baseY=Math.round(offset.top),this.doc_height=$(document).height(),"clone"===this.options.helper?(this.$helper=this.$player.clone().appendTo(this.$container).addClass("helper"),this.helper=!0):this.helper=!1,this.scrollOffset=0,this.el_init_offset=this.$player.offset(),this.player_width=this.$player.width(),this.player_height=this.$player.height();var container_width=this.options.container_width||this.$container.width();return this.player_max_left=container_width-this.player_width+this.options.offset_left,this.options.start&&this.options.start.call(this.$player,e,this.get_drag_data(e)),!1},fn.on_dragmove=function(e){var data=this.get_drag_data(e);this.options.autoscroll&&this.manage_scroll(data),this.options.move_element&&(this.helper?this.$helper:this.$player).css({position:"absolute",left:data.position.left,top:data.position.top});var last_position=this.last_position||data.position;return data.prev_position=last_position,this.options.drag&&this.options.drag.call(this.$player,e,data),this.last_position=data.position,!1},fn.on_dragstop=function(e){var data=this.get_drag_data(e);return this.drag_start=!1,this.options.stop&&this.options.stop.call(this.$player,e,data),this.helper&&this.$helper.remove(),!1},fn.on_select_start=function(e){return this.disabled||this.ignore_drag(e)?void 0:!1},fn.enable=function(){this.disabled=!1},fn.disable=function(){this.disabled=!0},fn.destroy=function(){this.disable(),this.$container.off(".gridster-draggable"),this.$body.off(".gridster-draggable"),$(window).off(".gridster-draggable"),$.removeData(this.$container,"drag")},fn.ignore_drag=function(event){return this.options.handle?!$(event.target).is(this.options.handle):$(event.target).is(this.options.ignore_dragging.join(", "))},$.fn.drag=function(options){return new Draggable(this,options)}}(jQuery,window,document),function($,window,document){function Gridster(el,options){this.options=$.extend(!0,defaults,options),this.$el=$(el),this.$wrapper=this.$el.parent(),this.$widgets=this.$el.children(this.options.widget_selector).addClass("gs-w"),this.widgets=[],this.$changed=$([]),this.wrapper_width=this.$wrapper.width(),this.min_widget_width=2*this.options.widget_margins[0]+this.options.widget_base_dimensions[0],this.min_widget_height=2*this.options.widget_margins[1]+this.options.widget_base_dimensions[1],this.$style_tags=$([]),this.init()}var defaults={namespace:"",widget_selector:"li",widget_margins:[10,10],widget_base_dimensions:[400,225],extra_rows:0,extra_cols:0,min_cols:1,max_cols:null,min_rows:15,max_size_x:!1,autogenerate_stylesheet:!0,avoid_overlapped_widgets:!0,serialize_params:function($w,wgd){return{col:wgd.col,row:wgd.row,size_x:wgd.size_x,size_y:wgd.size_y}},collision:{},draggable:{items:".gs-w",distance:4},resize:{enabled:!1,axes:["x","y","both"],handle_append_to:"",handle_class:"gs-resize-handle",max_size:[1/0,1/0]}};Gridster.generated_stylesheets=[];var fn=Gridster.prototype;fn.init=function(){this.options.resize.enabled&&this.setup_resize(),this.generate_grid_and_stylesheet(),this.get_widgets_from_DOM(),this.set_dom_grid_height(),this.$wrapper.addClass("ready"),this.draggable(),this.options.resize.enabled&&this.resizable(),$(window).bind("resize.gridster",throttle($.proxy(this.recalculate_faux_grid,this),200))},fn.disable=function(){return this.$wrapper.find(".player-revert").removeClass("player-revert"),this.drag_api.disable(),this},fn.enable=function(){return this.drag_api.enable(),this},fn.disable_resize=function(){return this.$el.addClass("gs-resize-disabled"),this.resize_api.disable(),this},fn.enable_resize=function(){return this.$el.removeClass("gs-resize-disabled"),this.resize_api.enable(),this},fn.add_widget=function(html,size_x,size_y,col,row,max_size){var pos;size_x||(size_x=1),size_y||(size_y=1),!col&!row?pos=this.next_position(size_x,size_y):(pos={col:col,row:row},this.empty_cells(col,row,size_x,size_y));var $w=$(html).attr({"data-col":pos.col,"data-row":pos.row,"data-sizex":size_x,"data-sizey":size_y}).addClass("gs-w").appendTo(this.$el).hide();return this.$widgets=this.$widgets.add($w),this.register_widget($w),this.add_faux_rows(pos.size_y),max_size&&this.set_widget_max_size($w,max_size),this.set_dom_grid_height(),$w.fadeIn()},fn.set_widget_max_size=function($widget,max_size){if($widget="number"==typeof $widget?this.$widgets.eq($widget):$widget,!$widget.length)return this;var wgd=$widget.data("coords").grid;return wgd.max_size_x=max_size[0],wgd.max_size_y=max_size[1],this},fn.add_resize_handle=function($w){var append_to=this.options.resize.handle_append_to;return $(this.resize_handle_tpl).appendTo(append_to?$(append_to,$w):$w),this},fn.resize_widget=function($widget,size_x,size_y,reposition,callback){var wgd=$widget.coords().grid;reposition!==!1&&(reposition=!0),size_x||(size_x=wgd.size_x),size_y||(size_y=wgd.size_y),size_x>this.cols&&(size_x=this.cols);var old_size_y=wgd.size_y,old_col=wgd.col,new_col=old_col;if(reposition&&old_col+size_x-1>this.cols){var diff=old_col+(size_x-1)-this.cols,c=old_col-diff;new_col=Math.max(1,c)}size_y>old_size_y&&this.add_faux_rows(Math.max(size_y-old_size_y,0));var new_grid_data={col:new_col,row:wgd.row,size_x:size_x,size_y:size_y};return this.mutate_widget_in_gridmap($widget,wgd,new_grid_data),this.set_dom_grid_height(),callback&&callback.call(this,new_grid_data.size_x,new_grid_data.size_y),$widget},fn.mutate_widget_in_gridmap=function($widget,wgd,new_wgd){wgd.size_x;var old_size_y=wgd.size_y,old_cells_occupied=this.get_cells_occupied(wgd),new_cells_occupied=this.get_cells_occupied(new_wgd),empty_cols=[];$.each(old_cells_occupied.cols,function(i,col){-1===$.inArray(col,new_cells_occupied.cols)&&empty_cols.push(col)});var occupied_cols=[];$.each(new_cells_occupied.cols,function(i,col){-1===$.inArray(col,old_cells_occupied.cols)&&occupied_cols.push(col)});var empty_rows=[];$.each(old_cells_occupied.rows,function(i,row){-1===$.inArray(row,new_cells_occupied.rows)&&empty_rows.push(row)});var occupied_rows=[];if($.each(new_cells_occupied.rows,function(i,row){-1===$.inArray(row,old_cells_occupied.rows)&&occupied_rows.push(row)}),this.remove_from_gridmap(wgd),occupied_cols.length){var cols_to_empty=[new_wgd.col,new_wgd.row,new_wgd.size_x,Math.min(old_size_y,new_wgd.size_y),$widget];this.empty_cells.apply(this,cols_to_empty)}if(occupied_rows.length){var rows_to_empty=[new_wgd.col,new_wgd.row,new_wgd.size_x,new_wgd.size_y,$widget];this.empty_cells.apply(this,rows_to_empty)}if(wgd.col=new_wgd.col,wgd.row=new_wgd.row,wgd.size_x=new_wgd.size_x,wgd.size_y=new_wgd.size_y,this.add_to_gridmap(new_wgd,$widget),$widget.removeClass("player-revert"),$widget.data("coords").update({width:new_wgd.size_x*this.options.widget_base_dimensions[0]+2*(new_wgd.size_x-1)*this.options.widget_margins[0],height:new_wgd.size_y*this.options.widget_base_dimensions[1]+2*(new_wgd.size_y-1)*this.options.widget_margins[1]}),$widget.attr({"data-col":new_wgd.col,"data-row":new_wgd.row,"data-sizex":new_wgd.size_x,"data-sizey":new_wgd.size_y}),empty_cols.length){var cols_to_remove_holes=[empty_cols[0],new_wgd.row,empty_cols.length,Math.min(old_size_y,new_wgd.size_y),$widget];this.remove_empty_cells.apply(this,cols_to_remove_holes)}if(empty_rows.length){var rows_to_remove_holes=[new_wgd.col,new_wgd.row,new_wgd.size_x,new_wgd.size_y,$widget];this.remove_empty_cells.apply(this,rows_to_remove_holes)}return this.move_widget_up($widget),this},fn.empty_cells=function(col,row,size_x,size_y,$exclude){var $nexts=this.widgets_below({col:col,row:row-size_y,size_x:size_x,size_y:size_y});return $nexts.not($exclude).each($.proxy(function(i,w){var wgd=$(w).coords().grid;if(wgd.row<=row+size_y-1){var diff=row+size_y-wgd.row;this.move_widget_down($(w),diff)}},this)),this.set_dom_grid_height(),this},fn.remove_empty_cells=function(col,row,size_x,size_y,exclude){var $nexts=this.widgets_below({col:col,row:row,size_x:size_x,size_y:size_y});return $nexts.not(exclude).each($.proxy(function(i,widget){this.move_widget_up($(widget),size_y)},this)),this.set_dom_grid_height(),this},fn.next_position=function(size_x,size_y){size_x||(size_x=1),size_y||(size_y=1);for(var rows_l,ga=this.gridmap,cols_l=ga.length,valid_pos=[],c=1;cols_l>c;c++){rows_l=ga[c].length;for(var r=1;rows_l>=r;r++){var can_move_to=this.can_move_to({size_x:size_x,size_y:size_y},c,r);can_move_to&&valid_pos.push({col:c,row:r,size_y:size_y,size_x:size_x})}}return valid_pos.length?this.sort_by_row_and_col_asc(valid_pos)[0]:!1},fn.remove_widget=function(el,silent,callback){var $el=el instanceof jQuery?el:$(el),wgd=$el.coords().grid;$.isFunction(silent)&&(callback=silent,silent=!1),this.cells_occupied_by_placeholder={},this.$widgets=this.$widgets.not($el);var $nexts=this.widgets_below($el);return this.remove_from_gridmap(wgd),$el.fadeOut($.proxy(function(){$el.remove(),silent||$nexts.each($.proxy(function(i,widget){this.move_widget_up($(widget),wgd.size_y)},this)),this.set_dom_grid_height(),callback&&callback.call(this,el)},this)),this},fn.remove_all_widgets=function(callback){return this.$widgets.each($.proxy(function(i,el){this.remove_widget(el,!0,callback)},this)),this},fn.serialize=function($widgets){$widgets||($widgets=this.$widgets);var result=[];return $widgets.each($.proxy(function(i,widget){result.push(this.options.serialize_params($(widget),$(widget).coords().grid))},this)),result},fn.serialize_changed=function(){return this.serialize(this.$changed)},fn.register_widget=function($el){var wgd={col:parseInt($el.attr("data-col"),10),row:parseInt($el.attr("data-row"),10),size_x:parseInt($el.attr("data-sizex"),10),size_y:parseInt($el.attr("data-sizey"),10),max_size_x:parseInt($el.attr("data-max-sizex"),10)||!1,max_size_y:parseInt($el.attr("data-max-sizey"),10)||!1,el:$el};return this.options.avoid_overlapped_widgets&&!this.can_move_to({size_x:wgd.size_x,size_y:wgd.size_y},wgd.col,wgd.row)&&($.extend(wgd,this.next_position(wgd.size_x,wgd.size_y)),$el.attr({"data-col":wgd.col,"data-row":wgd.row,"data-sizex":wgd.size_x,"data-sizey":wgd.size_y})),$el.data("coords",$el.coords()),$el.data("coords").grid=wgd,this.add_to_gridmap(wgd,$el),this.options.resize.enabled&&this.add_resize_handle($el),this},fn.update_widget_position=function(grid_data,value){return this.for_each_cell_occupied(grid_data,function(col,row){return this.gridmap[col]?(this.gridmap[col][row]=value,void 0):this}),this},fn.remove_from_gridmap=function(grid_data){return this.update_widget_position(grid_data,!1)},fn.add_to_gridmap=function(grid_data,value){if(this.update_widget_position(grid_data,value||grid_data.el),grid_data.el){var $widgets=this.widgets_below(grid_data.el);$widgets.each($.proxy(function(i,widget){this.move_widget_up($(widget))},this))}},fn.draggable=function(){var self=this,draggable_options=$.extend(!0,{},this.options.draggable,{offset_left:this.options.widget_margins[0],container_width:this.container_width,ignore_dragging:["INPUT","TEXTAREA","SELECT","BUTTON","."+this.options.resize.handle_class],start:function(event,ui){self.$widgets.filter(".player-revert").removeClass("player-revert"),self.$player=$(this),self.$helper=$(ui.$helper),self.helper=!self.$helper.is(self.$player),self.on_start_drag.call(self,event,ui),self.$el.trigger("gridster:dragstart")},stop:function(event,ui){self.on_stop_drag.call(self,event,ui),self.$el.trigger("gridster:dragstop")},drag:throttle(function(event,ui){self.on_drag.call(self,event,ui),self.$el.trigger("gridster:drag")},60)});return this.drag_api=this.$el.drag(draggable_options),this},fn.resizable=function(){return this.resize_api=this.$el.drag({items:"."+this.options.resize.handle_class,offset_left:this.options.widget_margins[0],container_width:this.container_width,move_element:!1,start:$.proxy(this.on_start_resize,this),stop:$.proxy(function(event,ui){delay($.proxy(function(){this.on_stop_resize(event,ui)},this),120)},this),drag:throttle($.proxy(this.on_resize,this),60)}),this},fn.setup_resize=function(){this.resize_handle_class=this.options.resize.handle_class;var axes=this.options.resize.axes,handle_tpl='<span class="'+this.resize_handle_class+" "+this.resize_handle_class+'-{type}" />';return this.resize_handle_tpl=$.map(axes,function(type){return handle_tpl.replace("{type}",type)}).join(""),this},fn.on_start_drag=function(event,ui){this.$helper.add(this.$player).add(this.$wrapper).addClass("dragging"),this.$player.addClass("player"),this.player_grid_data=this.$player.coords().grid,this.placeholder_grid_data=$.extend({},this.player_grid_data),this.$el.css("height",this.$el.height()+this.player_grid_data.size_y*this.min_widget_height);var colliders=this.faux_grid,coords=this.$player.data("coords").coords;this.cells_occupied_by_player=this.get_cells_occupied(this.player_grid_data),this.cells_occupied_by_placeholder=this.get_cells_occupied(this.placeholder_grid_data),this.last_cols=[],this.last_rows=[],this.collision_api=this.$helper.collision(colliders,this.options.collision),this.$preview_holder=$("<"+this.$player.get(0).tagName+" />",{"class":"preview-holder","data-row":this.$player.attr("data-row"),"data-col":this.$player.attr("data-col"),css:{width:coords.width,height:coords.height}}).appendTo(this.$el),this.options.draggable.start&&this.options.draggable.start.call(this,event,ui)},fn.on_drag=function(event,ui){if(null===this.$player)return!1;var abs_offset={left:ui.position.left+this.baseX,top:ui.position.top+this.baseY};this.colliders_data=this.collision_api.get_closest_colliders(abs_offset),this.on_overlapped_column_change(this.on_start_overlapping_column,this.on_stop_overlapping_column),this.on_overlapped_row_change(this.on_start_overlapping_row,this.on_stop_overlapping_row),this.helper&&this.$player&&this.$player.css({left:ui.position.left,top:ui.position.top}),this.options.draggable.drag&&this.options.draggable.drag.call(this,event,ui)},fn.on_stop_drag=function(event,ui){this.$helper.add(this.$player).add(this.$wrapper).removeClass("dragging"),ui.position.left=ui.position.left+this.baseX,ui.position.top=ui.position.top+this.baseY,this.colliders_data=this.collision_api.get_closest_colliders(ui.position),this.on_overlapped_column_change(this.on_start_overlapping_column,this.on_stop_overlapping_column),this.on_overlapped_row_change(this.on_start_overlapping_row,this.on_stop_overlapping_row),this.$player.addClass("player-revert").removeClass("player").attr({"data-col":this.placeholder_grid_data.col,"data-row":this.placeholder_grid_data.row}).css({left:"",top:""}),this.$changed=this.$changed.add(this.$player),this.cells_occupied_by_player=this.get_cells_occupied(this.placeholder_grid_data),this.set_cells_player_occupies(this.placeholder_grid_data.col,this.placeholder_grid_data.row),this.$player.coords().grid.row=this.placeholder_grid_data.row,this.$player.coords().grid.col=this.placeholder_grid_data.col,this.options.draggable.stop&&this.options.draggable.stop.call(this,event,ui),this.$preview_holder.remove(),this.$player=null,this.$helper=null,this.placeholder_grid_data={},this.player_grid_data={},this.cells_occupied_by_placeholder={},this.cells_occupied_by_player={},this.set_dom_grid_height()},fn.on_start_resize=function(event,ui){this.$resized_widget=ui.$player.closest(".gs-w"),this.resize_coords=this.$resized_widget.coords(),this.resize_wgd=this.resize_coords.grid,this.resize_initial_width=this.resize_coords.coords.width,this.resize_initial_height=this.resize_coords.coords.height,this.resize_initial_sizex=this.resize_coords.grid.size_x,this.resize_initial_sizey=this.resize_coords.grid.size_y,this.resize_last_sizex=this.resize_initial_sizex,this.resize_last_sizey=this.resize_initial_sizey,this.resize_max_size_x=Math.min(this.resize_wgd.max_size_x||this.options.resize.max_size[0],this.cols-this.resize_wgd.col+1),this.resize_max_size_y=this.resize_wgd.max_size_y||this.options.resize.max_size[1],this.resize_dir={right:ui.$player.is("."+this.resize_handle_class+"-x"),bottom:ui.$player.is("."+this.resize_handle_class+"-y")},this.$resized_widget.css({"min-width":this.options.widget_base_dimensions[0],"min-height":this.options.widget_base_dimensions[1]});var nodeName=this.$resized_widget.get(0).tagName;this.$resize_preview_holder=$("<"+nodeName+" />",{"class":"preview-holder resize-preview-holder","data-row":this.$resized_widget.attr("data-row"),"data-col":this.$resized_widget.attr("data-col"),css:{width:this.resize_initial_width,height:this.resize_initial_height}}).appendTo(this.$el),this.$resized_widget.addClass("resizing")},fn.on_stop_resize=function(){this.$resized_widget.removeClass("resizing").css({width:"",height:""}),delay($.proxy(function(){this.$resize_preview_holder.remove().css({"min-width":"","min-height":""})},this),300)},fn.on_resize=function(event,ui){var rel_x=ui.pointer.diff_left,rel_y=ui.pointer.diff_top,wbd_x=this.options.widget_base_dimensions[0],wbd_y=this.options.widget_base_dimensions[1],max_width=1/0,max_height=1/0,inc_units_x=Math.ceil(rel_x/(this.options.widget_base_dimensions[0]+2*this.options.widget_margins[0])-.2),inc_units_y=Math.ceil(rel_y/(this.options.widget_base_dimensions[1]+2*this.options.widget_margins[1])-.2),size_x=Math.max(1,this.resize_initial_sizex+inc_units_x),size_y=Math.max(1,this.resize_initial_sizey+inc_units_y);size_x=Math.min(size_x,this.resize_max_size_x),max_width=this.resize_max_size_x*wbd_x+2*(size_x-1)*this.options.widget_margins[0],size_y=Math.min(size_y,this.resize_max_size_y),max_height=this.resize_max_size_y*wbd_y+2*(size_y-1)*this.options.widget_margins[1],this.resize_dir.right?size_y=this.resize_initial_sizey:this.resize_dir.bottom&&(size_x=this.resize_initial_sizex);var css_props={};!this.resize_dir.bottom&&(css_props.width=Math.min(this.resize_initial_width+rel_x,max_width)),!this.resize_dir.right&&(css_props.height=Math.min(this.resize_initial_height+rel_y,max_height)),this.$resized_widget.css(css_props),(size_x!==this.resize_last_sizex||size_y!==this.resize_last_sizey)&&(this.resize_widget(this.$resized_widget,size_x,size_y,!1),this.$resize_preview_holder.css({width:"",height:""}).attr({"data-row":this.$resized_widget.attr("data-row"),"data-sizex":size_x,"data-sizey":size_y})),this.resize_last_sizex=size_x,this.resize_last_sizey=size_y
},fn.on_overlapped_column_change=function(start_callback,stop_callback){if(!this.colliders_data.length)return this;var i,cols=this.get_targeted_columns(this.colliders_data[0].el.data.col),last_n_cols=this.last_cols.length,n_cols=cols.length;for(i=0;n_cols>i;i++)-1===$.inArray(cols[i],this.last_cols)&&(start_callback||$.noop).call(this,cols[i]);for(i=0;last_n_cols>i;i++)-1===$.inArray(this.last_cols[i],cols)&&(stop_callback||$.noop).call(this,this.last_cols[i]);return this.last_cols=cols,this},fn.on_overlapped_row_change=function(start_callback,end_callback){if(!this.colliders_data.length)return this;var i,rows=this.get_targeted_rows(this.colliders_data[0].el.data.row),last_n_rows=this.last_rows.length,n_rows=rows.length;for(i=0;n_rows>i;i++)-1===$.inArray(rows[i],this.last_rows)&&(start_callback||$.noop).call(this,rows[i]);for(i=0;last_n_rows>i;i++)-1===$.inArray(this.last_rows[i],rows)&&(end_callback||$.noop).call(this,this.last_rows[i]);this.last_rows=rows},fn.set_player=function(col,row,no_player){var self=this;no_player||this.empty_cells_player_occupies();var cell=no_player?{col:col}:self.colliders_data[0].el.data,to_col=cell.col,to_row=row||cell.row;this.player_grid_data={col:to_col,row:to_row,size_y:this.player_grid_data.size_y,size_x:this.player_grid_data.size_x},this.cells_occupied_by_player=this.get_cells_occupied(this.player_grid_data);var $overlapped_widgets=this.get_widgets_overlapped(this.player_grid_data),constraints=this.widgets_constraints($overlapped_widgets);if(this.manage_movements(constraints.can_go_up,to_col,to_row),this.manage_movements(constraints.can_not_go_up,to_col,to_row),!$overlapped_widgets.length){var pp=this.can_go_player_up(this.player_grid_data);pp!==!1&&(to_row=pp),this.set_placeholder(to_col,to_row)}return{col:to_col,row:to_row}},fn.widgets_constraints=function($widgets){var $widgets_can_not_go_up,$widgets_can_go_up=$([]),wgd_can_go_up=[],wgd_can_not_go_up=[];return $widgets.each($.proxy(function(i,w){var $w=$(w),wgd=$w.coords().grid;this.can_go_widget_up(wgd)?($widgets_can_go_up=$widgets_can_go_up.add($w),wgd_can_go_up.push(wgd)):wgd_can_not_go_up.push(wgd)},this)),$widgets_can_not_go_up=$widgets.not($widgets_can_go_up),{can_go_up:this.sort_by_row_asc(wgd_can_go_up),can_not_go_up:this.sort_by_row_desc(wgd_can_not_go_up)}},fn.sort_by_row_asc=function(widgets){return widgets=widgets.sort(function(a,b){return a.row||(a=$(a).coords().grid,b=$(b).coords().grid),a.row>b.row?1:-1})},fn.sort_by_row_and_col_asc=function(widgets){return widgets=widgets.sort(function(a,b){return a.row>b.row||a.row===b.row&&a.col>b.col?1:-1})},fn.sort_by_col_asc=function(widgets){return widgets=widgets.sort(function(a,b){return a.col>b.col?1:-1})},fn.sort_by_row_desc=function(widgets){return widgets=widgets.sort(function(a,b){return a.row+a.size_y<b.row+b.size_y?1:-1})},fn.manage_movements=function($widgets,to_col,to_row){return $.each($widgets,$.proxy(function(i,w){var wgd=w,$w=wgd.el,can_go_widget_up=this.can_go_widget_up(wgd);if(can_go_widget_up)this.move_widget_to($w,can_go_widget_up),this.set_placeholder(to_col,can_go_widget_up+wgd.size_y);else{var can_go_player_up=this.can_go_player_up(this.player_grid_data);if(!can_go_player_up){var y=to_row+this.player_grid_data.size_y-wgd.row;this.move_widget_down($w,y),this.set_placeholder(to_col,to_row)}}},this)),this},fn.is_player=function(col_or_el,row){if(row&&!this.gridmap[col_or_el])return!1;var $w=row?this.gridmap[col_or_el][row]:col_or_el;return $w&&($w.is(this.$player)||$w.is(this.$helper))},fn.is_player_in=function(col,row){var c=this.cells_occupied_by_player||{};return $.inArray(col,c.cols)>=0&&$.inArray(row,c.rows)>=0},fn.is_placeholder_in=function(col,row){var c=this.cells_occupied_by_placeholder||{};return this.is_placeholder_in_col(col)&&$.inArray(row,c.rows)>=0},fn.is_placeholder_in_col=function(col){var c=this.cells_occupied_by_placeholder||[];return $.inArray(col,c.cols)>=0},fn.is_empty=function(col,row){return"undefined"!=typeof this.gridmap[col]?"undefined"!=typeof this.gridmap[col][row]&&this.gridmap[col][row]===!1?!0:!1:!0},fn.is_occupied=function(col,row){return this.gridmap[col]?this.gridmap[col][row]?!0:!1:!1},fn.is_widget=function(col,row){var cell=this.gridmap[col];return cell?(cell=cell[row],cell?cell:!1):!1},fn.is_widget_under_player=function(col,row){return this.is_widget(col,row)?this.is_player_in(col,row):!1},fn.get_widgets_under_player=function(cells){cells||(cells=this.cells_occupied_by_player||{cols:[],rows:[]});var $widgets=$([]);return $.each(cells.cols,$.proxy(function(i,col){$.each(cells.rows,$.proxy(function(i,row){this.is_widget(col,row)&&($widgets=$widgets.add(this.gridmap[col][row]))},this))},this)),$widgets},fn.set_placeholder=function(col,row){var phgd=$.extend({},this.placeholder_grid_data),$nexts=this.widgets_below({col:phgd.col,row:phgd.row,size_y:phgd.size_y,size_x:phgd.size_x}),right_col=col+phgd.size_x-1;right_col>this.cols&&(col-=right_col-col);var moved_down=this.placeholder_grid_data.row<row,changed_column=this.placeholder_grid_data.col!==col;this.placeholder_grid_data.col=col,this.placeholder_grid_data.row=row,this.cells_occupied_by_placeholder=this.get_cells_occupied(this.placeholder_grid_data),this.$preview_holder.attr({"data-row":row,"data-col":col}),(moved_down||changed_column)&&$nexts.each($.proxy(function(i,widget){this.move_widget_up($(widget),this.placeholder_grid_data.col-col+phgd.size_y)},this));var $widgets_under_ph=this.get_widgets_under_player(this.cells_occupied_by_placeholder);$widgets_under_ph.length&&$widgets_under_ph.each($.proxy(function(i,widget){var $w=$(widget);this.move_widget_down($w,row+phgd.size_y-$w.data("coords").grid.row)},this))},fn.can_go_player_up=function(widget_grid_data){var p_bottom_row=widget_grid_data.row+widget_grid_data.size_y-1,result=!0,upper_rows=[],min_row=1e4,$widgets_under_player=this.get_widgets_under_player();return this.for_each_column_occupied(widget_grid_data,function(tcol){var grid_col=this.gridmap[tcol],r=p_bottom_row+1;for(upper_rows[tcol]=[];--r>0&&(this.is_empty(tcol,r)||this.is_player(tcol,r)||this.is_widget(tcol,r)&&grid_col[r].is($widgets_under_player));)upper_rows[tcol].push(r),min_row=min_row>r?r:min_row;return 0===upper_rows[tcol].length?(result=!1,!0):(upper_rows[tcol].sort(function(a,b){return a-b}),void 0)}),result?this.get_valid_rows(widget_grid_data,upper_rows,min_row):!1},fn.can_go_widget_up=function(widget_grid_data){var p_bottom_row=widget_grid_data.row+widget_grid_data.size_y-1,result=!0,upper_rows=[],min_row=1e4;return this.for_each_column_occupied(widget_grid_data,function(tcol){var grid_col=this.gridmap[tcol];upper_rows[tcol]=[];for(var r=p_bottom_row+1;--r>0&&(!this.is_widget(tcol,r)||this.is_player_in(tcol,r)||grid_col[r].is(widget_grid_data.el));)this.is_player(tcol,r)||this.is_placeholder_in(tcol,r)||this.is_player_in(tcol,r)||upper_rows[tcol].push(r),min_row>r&&(min_row=r);return 0===upper_rows[tcol].length?(result=!1,!0):(upper_rows[tcol].sort(function(a,b){return a-b}),void 0)}),result?this.get_valid_rows(widget_grid_data,upper_rows,min_row):!1},fn.get_valid_rows=function(widget_grid_data,upper_rows,min_row){for(var p_top_row=widget_grid_data.row,p_bottom_row=widget_grid_data.row+widget_grid_data.size_y-1,size_y=widget_grid_data.size_y,r=min_row-1,valid_rows=[];++r<=p_bottom_row;){var common=!0;if($.each(upper_rows,function(col,rows){$.isArray(rows)&&-1===$.inArray(r,rows)&&(common=!1)}),common===!0&&(valid_rows.push(r),valid_rows.length===size_y))break}var new_row=!1;return 1===size_y?valid_rows[0]!==p_top_row&&(new_row=valid_rows[0]||!1):valid_rows[0]!==p_top_row&&(new_row=this.get_consecutive_numbers_index(valid_rows,size_y)),new_row},fn.get_consecutive_numbers_index=function(arr,size_y){for(var max=arr.length,result=[],first=!0,prev=-1,i=0;max>i;i++){if(first||arr[i]===prev+1){if(result.push(i),result.length===size_y)break;first=!1}else result=[],first=!0;prev=arr[i]}return result.length>=size_y?arr[result[0]]:!1},fn.get_widgets_overlapped=function(){var $widgets=$([]),used=[],rows_from_bottom=this.cells_occupied_by_player.rows.slice(0);return rows_from_bottom.reverse(),$.each(this.cells_occupied_by_player.cols,$.proxy(function(i,col){$.each(rows_from_bottom,$.proxy(function(i,row){if(!this.gridmap[col])return!0;var $w=this.gridmap[col][row];this.is_occupied(col,row)&&!this.is_player($w)&&-1===$.inArray($w,used)&&($widgets=$widgets.add($w),used.push($w))},this))},this)),$widgets},fn.on_start_overlapping_column=function(col){this.set_player(col,!1)},fn.on_start_overlapping_row=function(row){this.set_player(!1,row)},fn.on_stop_overlapping_column=function(col){this.set_player(col,!1);var self=this;this.for_each_widget_below(col,this.cells_occupied_by_player.rows[0],function(){self.move_widget_up(this,self.player_grid_data.size_y)})},fn.on_stop_overlapping_row=function(row){this.set_player(!1,row);for(var self=this,cols=this.cells_occupied_by_player.cols,c=0,cl=cols.length;cl>c;c++)this.for_each_widget_below(cols[c],row,function(){self.move_widget_up(this,self.player_grid_data.size_y)})},fn.move_widget_to=function($widget,row){var self=this,widget_grid_data=$widget.coords().grid;row-widget_grid_data.row;var $next_widgets=this.widgets_below($widget),can_move_to_new_cell=this.can_move_to(widget_grid_data,widget_grid_data.col,row,$widget);return can_move_to_new_cell===!1?!1:(this.remove_from_gridmap(widget_grid_data),widget_grid_data.row=row,this.add_to_gridmap(widget_grid_data),$widget.attr("data-row",row),this.$changed=this.$changed.add($widget),$next_widgets.each(function(i,widget){var $w=$(widget),wgd=$w.coords().grid,can_go_up=self.can_go_widget_up(wgd);can_go_up&&can_go_up!==wgd.row&&self.move_widget_to($w,can_go_up)}),this)},fn.move_widget_up=function($widget,y_units){var el_grid_data=$widget.coords().grid,actual_row=el_grid_data.row,moved=[];return y_units||(y_units=1),this.can_go_up($widget)?(this.for_each_column_occupied(el_grid_data,function(col){if(-1===$.inArray($widget,moved)){var widget_grid_data=$widget.coords().grid,next_row=actual_row-y_units;if(next_row=this.can_go_up_to_row(widget_grid_data,col,next_row),!next_row)return!0;var $next_widgets=this.widgets_below($widget);this.remove_from_gridmap(widget_grid_data),widget_grid_data.row=next_row,this.add_to_gridmap(widget_grid_data),$widget.attr("data-row",widget_grid_data.row),this.$changed=this.$changed.add($widget),moved.push($widget),$next_widgets.each($.proxy(function(i,widget){this.move_widget_up($(widget),y_units)},this))}}),void 0):!1},fn.move_widget_down=function($widget,y_units){var el_grid_data,actual_row,moved,y_diff;if(0>=y_units)return!1;if(el_grid_data=$widget.coords().grid,actual_row=el_grid_data.row,moved=[],y_diff=y_units,!$widget)return!1;if(-1===$.inArray($widget,moved)){var widget_grid_data=$widget.coords().grid,next_row=actual_row+y_units,$next_widgets=this.widgets_below($widget);this.remove_from_gridmap(widget_grid_data),$next_widgets.each($.proxy(function(i,widget){var $w=$(widget),wd=$w.coords().grid,tmp_y=this.displacement_diff(wd,widget_grid_data,y_diff);tmp_y>0&&this.move_widget_down($w,tmp_y)},this)),widget_grid_data.row=next_row,this.update_widget_position(widget_grid_data,$widget),$widget.attr("data-row",widget_grid_data.row),this.$changed=this.$changed.add($widget),moved.push($widget)}},fn.can_go_up_to_row=function(widget_grid_data,col,row){var r,ga=this.gridmap,result=!0,urc=[],actual_row=widget_grid_data.row;if(this.for_each_column_occupied(widget_grid_data,function(tcol){for(ga[tcol],urc[tcol]=[],r=actual_row;r--&&this.is_empty(tcol,r)&&!this.is_placeholder_in(tcol,r);)urc[tcol].push(r);return urc[tcol].length?void 0:(result=!1,!0)}),!result)return!1;for(r=row,r=1;actual_row>r;r++){for(var common=!0,uc=0,ucl=urc.length;ucl>uc;uc++)urc[uc]&&-1===$.inArray(r,urc[uc])&&(common=!1);if(common===!0){result=r;break}}return result},fn.displacement_diff=function(widget_grid_data,parent_bgd,y_units){var actual_row=widget_grid_data.row,diffs=[],parent_max_y=parent_bgd.row+parent_bgd.size_y;this.for_each_column_occupied(widget_grid_data,function(col){for(var temp_y_units=0,r=parent_max_y;actual_row>r;r++)this.is_empty(col,r)&&(temp_y_units+=1);diffs.push(temp_y_units)});var max_diff=Math.max.apply(Math,diffs);return y_units-=max_diff,y_units>0?y_units:0},fn.widgets_below=function($el){var el_grid_data=$.isPlainObject($el)?$el:$el.coords().grid,self=this;this.gridmap;var next_row=el_grid_data.row+el_grid_data.size_y-1,$nexts=$([]);return this.for_each_column_occupied(el_grid_data,function(col){self.for_each_widget_below(col,next_row,function(){return self.is_player(this)||-1!==$.inArray(this,$nexts)?void 0:($nexts=$nexts.add(this),!0)})}),this.sort_by_row_asc($nexts)},fn.set_cells_player_occupies=function(col,row){return this.remove_from_gridmap(this.placeholder_grid_data),this.placeholder_grid_data.col=col,this.placeholder_grid_data.row=row,this.add_to_gridmap(this.placeholder_grid_data,this.$player),this},fn.empty_cells_player_occupies=function(){return this.remove_from_gridmap(this.placeholder_grid_data),this},fn.can_go_up=function($el){var el_grid_data=$el.coords().grid,initial_row=el_grid_data.row,prev_row=initial_row-1;this.gridmap;var result=!0;return 1===initial_row?!1:(this.for_each_column_occupied(el_grid_data,function(col){return this.is_widget(col,prev_row),this.is_occupied(col,prev_row)||this.is_player(col,prev_row)||this.is_placeholder_in(col,prev_row)||this.is_player_in(col,prev_row)?(result=!1,!0):void 0}),result)},fn.can_move_to=function(widget_grid_data,col,row,max_row){this.gridmap;var $w=widget_grid_data.el,future_wd={size_y:widget_grid_data.size_y,size_x:widget_grid_data.size_x,col:col,row:row},result=!0,right_col=col+widget_grid_data.size_x-1;return right_col>this.cols?!1:max_row&&max_row<row+widget_grid_data.size_y-1?!1:(this.for_each_cell_occupied(future_wd,function(tcol,trow){var $tw=this.is_widget(tcol,trow);!$tw||widget_grid_data.el&&!$tw.is($w)||(result=!1)}),result)},fn.get_targeted_columns=function(from_col){for(var max=(from_col||this.player_grid_data.col)+(this.player_grid_data.size_x-1),cols=[],col=from_col;max>=col;col++)cols.push(col);return cols},fn.get_targeted_rows=function(from_row){for(var max=(from_row||this.player_grid_data.row)+(this.player_grid_data.size_y-1),rows=[],row=from_row;max>=row;row++)rows.push(row);return rows},fn.get_cells_occupied=function(el_grid_data){var i,cells={cols:[],rows:[]};for(arguments[1]instanceof jQuery&&(el_grid_data=arguments[1].coords().grid),i=0;i<el_grid_data.size_x;i++){var col=el_grid_data.col+i;cells.cols.push(col)}for(i=0;i<el_grid_data.size_y;i++){var row=el_grid_data.row+i;cells.rows.push(row)}return cells},fn.for_each_cell_occupied=function(grid_data,callback){return this.for_each_column_occupied(grid_data,function(col){this.for_each_row_occupied(grid_data,function(row){callback.call(this,col,row)})}),this},fn.for_each_column_occupied=function(el_grid_data,callback){for(var i=0;i<el_grid_data.size_x;i++){var col=el_grid_data.col+i;callback.call(this,col,el_grid_data)}},fn.for_each_row_occupied=function(el_grid_data,callback){for(var i=0;i<el_grid_data.size_y;i++){var row=el_grid_data.row+i;callback.call(this,row,el_grid_data)}},fn._traversing_widgets=function(type,direction,col,row,callback){var ga=this.gridmap;if(ga[col]){var cr,max,action=type+"/"+direction;if(arguments[2]instanceof jQuery){var el_grid_data=arguments[2].coords().grid;col=el_grid_data.col,row=el_grid_data.row,callback=arguments[3]}var matched=[],trow=row,methods={"for_each/above":function(){for(;trow--&&!(trow>0&&this.is_widget(col,trow)&&-1===$.inArray(ga[col][trow],matched)&&(cr=callback.call(ga[col][trow],col,trow),matched.push(ga[col][trow]),cr)););},"for_each/below":function(){for(trow=row+1,max=ga[col].length;max>trow&&(!this.is_widget(col,trow)||-1!==$.inArray(ga[col][trow],matched)||(cr=callback.call(ga[col][trow],col,trow),matched.push(ga[col][trow]),!cr));trow++);}};methods[action]&&methods[action].call(this)}},fn.for_each_widget_above=function(col,row,callback){return this._traversing_widgets("for_each","above",col,row,callback),this},fn.for_each_widget_below=function(col,row,callback){return this._traversing_widgets("for_each","below",col,row,callback),this},fn.get_highest_occupied_cell=function(){for(var r,gm=this.gridmap,rows=[],row_in_col=[],c=gm.length-1;c>=1;c--)for(r=gm[c].length-1;r>=1;r--)if(this.is_widget(c,r)){rows.push(r),row_in_col[r]=c;break}var highest_row=Math.max.apply(Math,rows);return this.highest_occupied_cell={col:row_in_col[highest_row],row:highest_row},this.highest_occupied_cell},fn.get_widgets_from=function(col,row){this.gridmap;var $widgets=$();return col&&($widgets=$widgets.add(this.$widgets.filter(function(){var tcol=$(this).attr("data-col");return tcol===col||tcol>col}))),row&&($widgets=$widgets.add(this.$widgets.filter(function(){var trow=$(this).attr("data-row");return trow===row||trow>row}))),$widgets},fn.set_dom_grid_height=function(){var r=this.get_highest_occupied_cell().row;return this.$el.css("height",r*this.min_widget_height),this},fn.generate_stylesheet=function(opts){var i,styles="",max_size_x=this.options.max_size_x||this.cols;opts||(opts={}),opts.cols||(opts.cols=this.cols),opts.rows||(opts.rows=this.rows),opts.namespace||(opts.namespace=this.options.namespace),opts.widget_base_dimensions||(opts.widget_base_dimensions=this.options.widget_base_dimensions),opts.widget_margins||(opts.widget_margins=this.options.widget_margins),opts.min_widget_width=2*opts.widget_margins[0]+opts.widget_base_dimensions[0],opts.min_widget_height=2*opts.widget_margins[1]+opts.widget_base_dimensions[1];var serialized_opts=$.param(opts);if($.inArray(serialized_opts,Gridster.generated_stylesheets)>=0)return!1;for(Gridster.generated_stylesheets.push(serialized_opts),i=opts.cols;i>=0;i--)styles+=opts.namespace+' [data-col="'+(i+1)+'"] { left:'+(i*opts.widget_base_dimensions[0]+i*opts.widget_margins[0]+(i+1)*opts.widget_margins[0])+"px; }\n";for(i=opts.rows;i>=0;i--)styles+=opts.namespace+' [data-row="'+(i+1)+'"] { top:'+(i*opts.widget_base_dimensions[1]+i*opts.widget_margins[1]+(i+1)*opts.widget_margins[1])+"px; }\n";for(var y=1;y<=opts.rows;y++)styles+=opts.namespace+' [data-sizey="'+y+'"] { height:'+(y*opts.widget_base_dimensions[1]+(y-1)*2*opts.widget_margins[1])+"px; }\n";for(var x=1;max_size_x>=x;x++)styles+=opts.namespace+' [data-sizex="'+x+'"] { width:'+(x*opts.widget_base_dimensions[0]+(x-1)*2*opts.widget_margins[0])+"px; }\n";return this.add_style_tag(styles)},fn.add_style_tag=function(css){var d=document,tag=d.createElement("style");return d.getElementsByTagName("head")[0].appendChild(tag),tag.setAttribute("type","text/css"),tag.styleSheet?tag.styleSheet.cssText=css:tag.appendChild(document.createTextNode(css)),this.$style_tags=this.$style_tags.add(tag),this},fn.remove_style_tags=function(){this.$style_tags.remove()},fn.generate_faux_grid=function(rows,cols){this.faux_grid=[],this.gridmap=[];var col,row;for(col=cols;col>0;col--)for(this.gridmap[col]=[],row=rows;row>0;row--)this.add_faux_cell(row,col);return this},fn.add_faux_cell=function(row,col){var coords=$({left:this.baseX+(col-1)*this.min_widget_width,top:this.baseY+(row-1)*this.min_widget_height,width:this.min_widget_width,height:this.min_widget_height,col:col,row:row,original_col:col,original_row:row}).coords();return $.isArray(this.gridmap[col])||(this.gridmap[col]=[]),this.gridmap[col][row]=!1,this.faux_grid.push(coords),this},fn.add_faux_rows=function(rows){for(var actual_rows=this.rows,max_rows=actual_rows+(rows||1),r=max_rows;r>actual_rows;r--)for(var c=this.cols;c>=1;c--)this.add_faux_cell(r,c);return this.rows=max_rows,this.options.autogenerate_stylesheet&&this.generate_stylesheet(),this},fn.add_faux_cols=function(cols){for(var actual_cols=this.cols,max_cols=actual_cols+(cols||1),c=actual_cols;max_cols>c;c++)for(var r=this.rows;r>=1;r--)this.add_faux_cell(r,c);return this.cols=max_cols,this.options.autogenerate_stylesheet&&this.generate_stylesheet(),this},fn.recalculate_faux_grid=function(){var aw=this.$wrapper.width();return this.baseX=($(window).width()-aw)/2,this.baseY=this.$wrapper.offset().top,$.each(this.faux_grid,$.proxy(function(i,coords){this.faux_grid[i]=coords.update({left:this.baseX+(coords.data.col-1)*this.min_widget_width,top:this.baseY+(coords.data.row-1)*this.min_widget_height})},this)),this},fn.get_widgets_from_DOM=function(){return this.$widgets.each($.proxy(function(i,widget){this.register_widget($(widget))},this)),this},fn.generate_grid_and_stylesheet=function(){var aw=this.$wrapper.width();this.$wrapper.height();var max_cols=this.options.max_cols,cols=Math.floor(aw/this.min_widget_width)+this.options.extra_cols,actual_cols=this.$widgets.map(function(){return $(this).attr("data-col")}).get();actual_cols.length||(actual_cols=[0]);var min_cols=Math.max.apply(Math,actual_cols),max_rows=this.options.extra_rows;return this.$widgets.each(function(i,w){max_rows+=+$(w).attr("data-sizey")}),this.cols=Math.max(min_cols,cols,this.options.min_cols),max_cols&&max_cols>=min_cols&&max_cols<this.cols&&(this.cols=max_cols),this.rows=Math.max(max_rows,this.options.min_rows),this.baseX=($(window).width()-aw)/2,this.baseY=this.$wrapper.offset().top,this.container_width=this.cols*this.options.widget_base_dimensions[0]+2*(this.cols-1)*this.options.widget_margins[0],this.options.autogenerate_stylesheet&&this.generate_stylesheet(),this.generate_faux_grid(this.rows,this.cols)},fn.destroy=function(){return $(window).unbind(".gridster"),this.drag_api&&this.drag_api.destroy(),this.remove_style_tags(),this.$el.remove(),this},$.fn.gridster=function(options){return this.each(function(){$(this).data("gridster")||$(this).data("gridster",new Gridster(this,options))})},$.Gridster=fn}(jQuery,window,document),angular.module("angular-gridster",[]).directive("gridster",["$timeout",function($timeout){return{restrict:"AE",scope:{model:"=model"},template:'<ul><div widget ng-repeat="item in model" widget-model="item"></div></ul>',link:function($scope,$element,$attributes){var gridster,ul=$element.find("ul"),defaultOptions={widget_margins:[5,5],widget_base_dimensions:[70,70]},options=angular.extend(defaultOptions,$scope.$eval($attributes.options));$timeout(function(){gridster=ul.gridster(options).data("gridster"),gridster.options.draggable.stop=function(){angular.forEach(ul.find("li"),function(item,index){var li=angular.element(item);if("preview-holder"!==li.attr("class")){var widget=$scope.model[index];widget.row=li.attr("data-row"),widget.col=li.attr("data-col")}}),$scope.$apply()}});var attachElementToGridster=function(li){var $w=li.addClass("gs_w").appendTo(gridster.$el).hide();gridster.$widgets=gridster.$widgets.add($w),gridster.register_widget($w).add_faux_rows(1).set_dom_grid_height(),$w.fadeIn()};$scope.$watch("model.length",function(newValue,oldValue){if(newValue==oldValue+1){var li=ul.find("li").eq(newValue-1);$timeout(function(){attachElementToGridster(li)})}})}}}]).directive("widget",[function(){return{restrict:"AE",scope:{widgetModel:"="},replace:!0,template:'<li data-col="{{widgetModel.col}}" data-row="{{widgetModel.row}}" data-sizex="{{widgetModel.sizex}}" data-sizey="{{widgetModel.sizey}}">{{widgetModel.html}}</li>',link:function(){}}}]);