OwlCyberSecurity - MANAGER
Edit File: product-global.js.tВlВchargement
/* jQuery JavaScript Library v2.1.4 http://jquery.com/ Includes Sizzle.js http://sizzlejs.com/ Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors Released under the MIT license http://jquery.org/license Date: 2015-04-28T16:01Z Sizzle CSS Selector Engine v2.2.0-pre http://sizzlejs.com/ Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors Released under the MIT license http://jquery.org/license Date: 2014-12-16 jQuery UI - v1.9.2 - 2013-01-16 http://jqueryui.com Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.slider.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-drop.js, jquery.ui.effect-fade.js, jquery.ui.effect-highlight.js, jquery.ui.effect-scale.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js Copyright (c) 2013 jQuery Foundation and other contributors Licensed MIT jQuery Color Animations v2.0.0 http://jquery.com/ Copyright 2012 jQuery Foundation and other contributors Released under the MIT license. http://jquery.org/license Date: Mon Aug 13 13:41:02 2012 -0500 jQuery UI Touch Punch 0.2.2 Copyright 2011, Dave Furfero Dual licensed under the MIT or GPL Version 2 licenses. Depends: jquery.ui.widget.js jquery.ui.mouse.js handlebars v2.0.0 Copyright (C) 2011-2014 by Yehuda Katz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @license jQuery Form Plugin version: 3.50.0-2014.02.05 Requires jQuery v1.5 or later Copyright (c) 2013 M. Alsup Examples and documentation at: http://malsup.com/jquery/form/ Project repository: https://github.com/malsup/form Dual licensed under the MIT and GPL licenses. https://github.com/malsup/form#copyright-and-license */ var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d",encode:function(input){var output="";var i=0;for(input=Base64._utf8_encode(input);i<input.length;){var chr1=input.charCodeAt(i++);var chr2=input.charCodeAt(i++);var chr3=input.charCodeAt(i++);var enc1=chr1>>2;var enc2=(chr1&3)<<4|chr2>>4;var enc3=(chr2&15)<<2|chr3>>6;var enc4=chr3&63;if(isNaN(chr2))enc3=enc4=64;else if(isNaN(chr3))enc4=64;output=output+this._keyStr.charAt(enc1)+this._keyStr.charAt(enc2)+this._keyStr.charAt(enc3)+ this._keyStr.charAt(enc4)}return output},decode:function(input){var output="";var i=0;for(input=input.replace(/[^A-Za-z0-9\+\/=]/g,"");i<input.length;){var enc1=this._keyStr.indexOf(input.charAt(i++));var enc2=this._keyStr.indexOf(input.charAt(i++));var enc3=this._keyStr.indexOf(input.charAt(i++));var enc4=this._keyStr.indexOf(input.charAt(i++));var chr1=enc1<<2|enc2>>4;var chr2=(enc2&15)<<4|enc3>>2;var chr3=(enc3&3)<<6|enc4;output+=String.fromCharCode(chr1);if(enc3!=64)output+=String.fromCharCode(chr2); if(enc4!=64)output+=String.fromCharCode(chr3)}output=Base64._utf8_decode(output);return output},_utf8_encode:function(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128)utftext+=String.fromCharCode(c);else if(c>127&&c<2048){utftext+=String.fromCharCode(c>>6|192);utftext+=String.fromCharCode(c&63|128)}else{utftext+=String.fromCharCode(c>>12|224);utftext+=String.fromCharCode(c>>6&63|128);utftext+=String.fromCharCode(c&63|128)}}return utftext}, _utf8_decode:function(utftext){var string="";var i=0;var c=0;var c1=0;var c2=0;for(var c3;i<utftext.length;){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++}else if(c>191&&c<224){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode((c&31)<<6|c2&63);i+=2}else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode((c&15)<<12|(c2&63)<<6|c3&63);i+=3}}return string}}; (function(global,factory){if(typeof module==="object"&&typeof module.exports==="object")module.exports=global.document?factory(global,true):function(w){if(!w.document)throw new Error("jQuery requires a window with a document");return factory(w)};else factory(global)})(typeof window!=="undefined"?window:this,function(window$jscomp$0,noGlobal){function isArraylike(obj){var length="length"in obj&&obj.length;var type=jQuery.type(obj);if(type==="function"||jQuery.isWindow(obj))return false;if(obj.nodeType=== 1&&length)return true;return type==="array"||length===0||typeof length==="number"&&length>0&&length-1 in obj}function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier))return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not});if(qualifier.nodeType)return jQuery.grep(elements,function(elem){return elem===qualifier!==not});if(typeof qualifier==="string"){if(risSimple.test(qualifier))return jQuery.filter(qualifier,elements,not);qualifier=jQuery.filter(qualifier, elements)}return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>=0!==not})}function sibling(cur,dir){for(;(cur=cur[dir])&&cur.nodeType!==1;);return cur}function createOptions(options){var object=optionsCache[options]={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true});return object}function completed(){document$jscomp$0.removeEventListener("DOMContentLoaded",completed,false);window$jscomp$0.removeEventListener("load",completed,false);jQuery.ready()} function Data(){Object.defineProperty(this.cache={},0,{get:function(){return{}}});this.expando=jQuery.expando+Data.uid++}function dataAttr(elem,key,data){if(data===undefined&&elem.nodeType===1){var name="data-"+key.replace(rmultiDash,"-$1").toLowerCase();data=elem.getAttribute(name);if(typeof data==="string"){try{data=data==="true"?true:data==="false"?false:data==="null"?null:+data+""===data?+data:rbrace.test(data)?jQuery.parseJSON(data):data}catch(e){}data_user.set(elem,key,data)}else data=undefined}return data} function returnTrue(){return true}function returnFalse(){return false}function safeActiveElement(){try{return document$jscomp$0.activeElement}catch(err){}}function manipulationTarget(elem,content){return jQuery.nodeName(elem,"table")&&jQuery.nodeName(content.nodeType!==11?content:content.firstChild,"tr")?elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody")):elem}function disableScript(elem){elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;return elem} function restoreScript(elem){var match=rscriptTypeMasked.exec(elem.type);if(match)elem.type=match[1];else elem.removeAttribute("type");return elem}function setGlobalEval(elems,refElements){var i=0;for(var l=elems.length;i<l;i++)data_priv.set(elems[i],"globalEval",!refElements||data_priv.get(refElements[i],"globalEval"))}function cloneCopyEvent(src,dest){var i;var l;var type;if(dest.nodeType!==1)return;if(data_priv.hasData(src)){var pdataOld=data_priv.access(src);var pdataCur=data_priv.set(dest,pdataOld); var events=pdataOld.events;if(events){delete pdataCur.handle;pdataCur.events={};for(type in events)for(i=0,l=events[type].length;i<l;i++)jQuery.event.add(dest,type,events[type][i])}}if(data_user.hasData(src)){var udataOld=data_user.access(src);var udataCur=jQuery.extend({},udataOld);data_user.set(dest,udataCur)}}function getAll(context,tag){var ret=context.getElementsByTagName?context.getElementsByTagName(tag||"*"):context.querySelectorAll?context.querySelectorAll(tag||"*"):[];return tag===undefined|| tag&&jQuery.nodeName(context,tag)?jQuery.merge([context],ret):ret}function fixInput(src,dest){var nodeName=dest.nodeName.toLowerCase();if(nodeName==="input"&&rcheckableType.test(src.type))dest.checked=src.checked;else if(nodeName==="input"||nodeName==="textarea")dest.defaultValue=src.defaultValue}function actualDisplay(name,doc){var style;var elem=jQuery(doc.createElement(name)).appendTo(doc.body);var display=window$jscomp$0.getDefaultComputedStyle&&(style=window$jscomp$0.getDefaultComputedStyle(elem[0]))? style.display:jQuery.css(elem[0],"display");elem.detach();return display}function defaultDisplay(nodeName){var doc=document$jscomp$0;var display=elemdisplay[nodeName];if(!display){display=actualDisplay(nodeName,doc);if(display==="none"||!display){iframe=(iframe||jQuery("\x3ciframe frameborder\x3d'0' width\x3d'0' height\x3d'0'/\x3e")).appendTo(doc.documentElement);doc=iframe[0].contentDocument;doc.write();doc.close();display=actualDisplay(nodeName,doc);iframe.detach()}elemdisplay[nodeName]=display}return display} function curCSS(elem,name,computed){var style=elem.style;computed=computed||getStyles(elem);if(computed)var ret=computed.getPropertyValue(name)||computed[name];if(computed){if(ret===""&&!jQuery.contains(elem.ownerDocument,elem))ret=jQuery.style(elem,name);if(rnumnonpx.test(ret)&&rmargin.test(name)){var width=style.width;var minWidth=style.minWidth;var maxWidth=style.maxWidth;style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;style.width=width;style.minWidth=minWidth;style.maxWidth=maxWidth}}return ret!== undefined?ret+"":ret}function addGetHookIf(conditionFn,hookFn){return{get:function(){if(conditionFn()){delete this.get;return}return(this.get=hookFn).apply(this,arguments)}}}function vendorPropName(style,name){if(name in style)return name;var capName=name[0].toUpperCase()+name.slice(1);var origName=name;for(var i=cssPrefixes.length;i--;){name=cssPrefixes[i]+capName;if(name in style)return name}return origName}function setPositiveNumber(elem,value,subtract){var matches=rnumsplit.exec(value);return matches? Math.max(0,matches[1]-(subtract||0))+(matches[2]||"px"):value}function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){var i=extra===(isBorderBox?"border":"content")?4:name==="width"?1:0;for(var val=0;i<4;i+=2){if(extra==="margin")val+=jQuery.css(elem,extra+cssExpand[i],true,styles);if(isBorderBox){if(extra==="content")val-=jQuery.css(elem,"padding"+cssExpand[i],true,styles);if(extra!=="margin")val-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}else{val+=jQuery.css(elem,"padding"+ cssExpand[i],true,styles);if(extra!=="padding")val+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}}return val}function getWidthOrHeight(elem,name,extra){var valueIsBorderBox=true;var val=name==="width"?elem.offsetWidth:elem.offsetHeight;var styles=getStyles(elem);var isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box";if(val<=0||val==null){val=curCSS(elem,name,styles);if(val<0||val==null)val=elem.style[name];if(rnumnonpx.test(val))return val;valueIsBorderBox=isBorderBox&& (support.boxSizingReliable()||val===elem.style[name]);val=parseFloat(val)||0}return val+augmentWidthOrHeight(elem,name,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles)+"px"}function showHide(elements,show){var values=[];var index=0;for(var length=elements.length;index<length;index++){var elem=elements[index];if(!elem.style)continue;values[index]=data_priv.get(elem,"olddisplay");var display=elem.style.display;if(show){if(!values[index]&&display==="none")elem.style.display="";if(elem.style.display=== ""&&isHidden(elem))values[index]=data_priv.access(elem,"olddisplay",defaultDisplay(elem.nodeName))}else{var hidden=isHidden(elem);if(display!=="none"||!hidden)data_priv.set(elem,"olddisplay",hidden?display:jQuery.css(elem,"display"))}}for(index=0;index<length;index++){elem=elements[index];if(!elem.style)continue;if(!show||elem.style.display==="none"||elem.style.display==="")elem.style.display=show?values[index]||"":"none"}return elements}function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem, options,prop,end,easing)}function createFxNow(){setTimeout(function(){fxNow=undefined});return fxNow=jQuery.now()}function genFx(type,includeWidth){var i=0;var attrs={height:type};for(includeWidth=includeWidth?1:0;i<4;i+=2-includeWidth){var which=cssExpand[i];attrs["margin"+which]=attrs["padding"+which]=type}if(includeWidth)attrs.opacity=attrs.width=type;return attrs}function createTween(value,prop,animation){var tween;var collection=(tweeners[prop]||[]).concat(tweeners["*"]);var index=0;for(var length= collection.length;index<length;index++)if(tween=collection[index].call(animation,prop,value))return tween}function defaultPrefilter(elem,props,opts){var prop$jscomp$0;var anim=this;var orig={};var style=elem.style;var hidden=elem.nodeType&&isHidden(elem);var dataShow=data_priv.get(elem,"fxshow");if(!opts.queue){var hooks=jQuery._queueHooks(elem,"fx");if(hooks.unqueued==null){hooks.unqueued=0;var oldfire=hooks.empty.fire;hooks.empty.fire=function(){if(!hooks.unqueued)oldfire()}}hooks.unqueued++;anim.always(function(){anim.always(function(){hooks.unqueued--; if(!jQuery.queue(elem,"fx").length)hooks.empty.fire()})})}if(elem.nodeType===1&&("height"in props||"width"in props)){opts.overflow=[style.overflow,style.overflowX,style.overflowY];var display=jQuery.css(elem,"display");var checkDisplay=display==="none"?data_priv.get(elem,"olddisplay")||defaultDisplay(elem.nodeName):display;if(checkDisplay==="inline"&&jQuery.css(elem,"float")==="none")style.display="inline-block"}if(opts.overflow){style.overflow="hidden";anim.always(function(){style.overflow=opts.overflow[0]; style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2]})}for(prop$jscomp$0 in props){var value=props[prop$jscomp$0];if(rfxtypes.exec(value)){delete props[prop$jscomp$0];var toggle=toggle||value==="toggle";if(value===(hidden?"hide":"show"))if(value==="show"&&dataShow&&dataShow[prop$jscomp$0]!==undefined)hidden=true;else continue;orig[prop$jscomp$0]=dataShow&&dataShow[prop$jscomp$0]||jQuery.style(elem,prop$jscomp$0)}else display=undefined}if(!jQuery.isEmptyObject(orig)){if(dataShow){if("hidden"in dataShow)hidden=dataShow.hidden}else dataShow=data_priv.access(elem,"fxshow",{});if(toggle)dataShow.hidden=!hidden;if(hidden)jQuery(elem).show();else anim.done(function(){jQuery(elem).hide()});anim.done(function(){var prop;data_priv.remove(elem,"fxshow");for(prop in orig)jQuery.style(elem,prop,orig[prop])});for(prop$jscomp$0 in orig){var tween=createTween(hidden?dataShow[prop$jscomp$0]:0,prop$jscomp$0,anim);if(!(prop$jscomp$0 in dataShow)){dataShow[prop$jscomp$0]=tween.start;if(hidden){tween.end= tween.start;tween.start=prop$jscomp$0==="width"||prop$jscomp$0==="height"?1:0}}}}else if((display==="none"?defaultDisplay(elem.nodeName):display)==="inline")style.display=display}function propFilter(props,specialEasing){var index;for(index in props){var name=jQuery.camelCase(index);var easing=specialEasing[name];var value=props[index];if(jQuery.isArray(value)){easing=value[1];value=props[index]=value[0]}if(index!==name){props[name]=value;delete props[index]}var hooks=jQuery.cssHooks[name];if(hooks&& "expand"in hooks){value=hooks.expand(value);delete props[name];for(index in value)if(!(index in props)){props[index]=value[index];specialEasing[index]=easing}}else specialEasing[name]=easing}}function Animation(elem,properties,options){var stopped;var index$jscomp$0=0;var length$jscomp$0=animationPrefilters.length;var deferred=jQuery.Deferred().always(function(){delete tick.elem});var tick=function(){if(stopped)return false;var currentTime=fxNow||createFxNow();var remaining=Math.max(0,animation.startTime+ animation.duration-currentTime);var temp=remaining/animation.duration||0;var percent=1-temp;var index=0;for(var length=animation.tweens.length;index<length;index++)animation.tweens[index].run(percent);deferred.notifyWith(elem,[animation,percent,remaining]);if(percent<1&&length)return remaining;else{deferred.resolveWith(elem,[animation]);return false}};var animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(true,{specialEasing:{}},options),originalProperties:properties, originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);animation.tweens.push(tween);return tween},stop:function(gotoEnd){var index=0;var length=gotoEnd?animation.tweens.length:0;if(stopped)return this;for(stopped=true;index<length;index++)animation.tweens[index].run(1);if(gotoEnd)deferred.resolveWith(elem,[animation,gotoEnd]); else deferred.rejectWith(elem,[animation,gotoEnd]);return this}});var props=animation.props;for(propFilter(props,animation.opts.specialEasing);index$jscomp$0<length$jscomp$0;index$jscomp$0++){var result=animationPrefilters[index$jscomp$0].call(animation,elem,props,animation.opts);if(result)return result}jQuery.map(props,createTween,animation);if(jQuery.isFunction(animation.opts.start))animation.opts.start.call(elem,animation);jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue})); return animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always)}function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*"}var dataType;var i=0;var dataTypes=dataTypeExpression.toLowerCase().match(rnotwhite)||[];if(jQuery.isFunction(func))for(;dataType=dataTypes[i++];)if(dataType[0]==="+"){dataType= dataType.slice(1)||"*";(structure[dataType]=structure[dataType]||[]).unshift(func)}else(structure[dataType]=structure[dataType]||[]).push(func)}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport==="string"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport); inspect(dataTypeOrTransport);return false}else if(seekingTransport)return!(selected=dataTypeOrTransport)});return selected}var inspected={};var seekingTransport=structure===transports;return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*")}function ajaxExtend(target,src){var key;var deep;var flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src)if(src[key]!==undefined)(flatOptions[key]?target:deep||(deep={}))[key]=src[key];if(deep)jQuery.extend(true,target,deep);return target} function ajaxHandleResponses(s,jqXHR,responses){var type;var contents=s.contents;for(var dataTypes=s.dataTypes;dataTypes[0]==="*";){dataTypes.shift();if(ct===undefined)var ct=s.mimeType||jqXHR.getResponseHeader("Content-Type")}if(ct)for(type in contents)if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break}if(dataTypes[0]in responses)var finalDataType=dataTypes[0];else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break}if(!firstDataType)var firstDataType= type}finalDataType=finalDataType||firstDataType}if(finalDataType){if(finalDataType!==dataTypes[0])dataTypes.unshift(finalDataType);return responses[finalDataType]}}function ajaxConvert(s,response,jqXHR,isSuccess){var conv2;var current;var converters={};var dataTypes=s.dataTypes.slice();if(dataTypes[1])for(conv in s.converters)converters[conv.toLowerCase()]=s.converters[conv];for(current=dataTypes.shift();current;){if(s.responseFields[current])jqXHR[s.responseFields[current]]=response;if(!prev&&isSuccess&& s.dataFilter)response=s.dataFilter(response,s.dataType);var prev=current;current=dataTypes.shift();if(current)if(current==="*")current=prev;else if(prev!=="*"&&prev!==current){var conv=converters[prev+" "+current]||converters["* "+current];if(!conv)for(conv2 in converters){var tmp=conv2.split(" ");if(tmp[1]===current){conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){if(conv===true)conv=converters[conv2];else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1])}break}}}if(conv!== true)if(conv&&s["throws"])response=conv(response);else try{response=conv(response)}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current}}}}return{state:"success",data:response}}function buildParams(prefix,obj,traditional,add){var name;if(jQuery.isArray(obj))jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix))add(prefix,v);else buildParams(prefix+"["+(typeof v==="object"?i:"")+"]",v,traditional,add)});else if(!traditional&&jQuery.type(obj)==="object")for(name in obj)buildParams(prefix+ "["+name+"]",obj[name],traditional,add);else add(prefix,obj)}function getWindow(elem){return jQuery.isWindow(elem)?elem:elem.nodeType===9&&elem.defaultView}var arr=[];var slice=arr.slice;var concat=arr.concat;var push=arr.push;var indexOf=arr.indexOf;var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var support={};var document$jscomp$0=window$jscomp$0.document;var version="2.1.4";var jQuery=function(selector,context){return new jQuery.fn.init(selector,context)}; var rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;var rmsPrefix=/^-ms-/;var rdashAlpha=/-([\da-z])/gi;var fcamelCase=function(all,letter){return letter.toUpperCase()};jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,selector:"",length:0,toArray:function(){return slice.call(this)},get:function(num){return num!=null?num<0?this[num+this.length]:this[num]:slice.call(this)},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);ret.prevObject=this;ret.context=this.context;return ret}, each:function(callback,args){return jQuery.each(this,callback,args)},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},slice:function(){return this.pushStack(slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(i){var len=this.length;var j=+i+(i<0?len:0);return this.pushStack(j>=0&&j<len?[this[j]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:push, sort:arr.sort,splice:arr.splice};jQuery.extend=jQuery.fn.extend=function(){var options;var name;var copyIsArray;var target=arguments[0]||{};var i=1;var length=arguments.length;var deep=false;if(typeof target==="boolean"){deep=target;target=arguments[i]||{};i++}if(typeof target!=="object"&&!jQuery.isFunction(target))target={};if(i===length){target=this;i--}for(;i<length;i++)if((options=arguments[i])!=null)for(name in options){var src=target[name];var copy=options[name];if(target===copy)continue;if(deep&& copy&&(jQuery.isPlainObject(copy)||(copyIsArray=jQuery.isArray(copy)))){if(copyIsArray){copyIsArray=false;var clone=src&&jQuery.isArray(src)?src:[]}else clone=src&&jQuery.isPlainObject(src)?src:{};target[name]=jQuery.extend(deep,clone,copy)}else if(copy!==undefined)target[name]=copy}return target};jQuery.extend({expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),isReady:true,error:function(msg){throw new Error(msg);},noop:function(){},isFunction:function(obj){return jQuery.type(obj)==="function"}, isArray:Array.isArray,isWindow:function(obj){return obj!=null&&obj===obj.window},isNumeric:function(obj){return!jQuery.isArray(obj)&&obj-parseFloat(obj)+1>=0},isPlainObject:function(obj){if(jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj))return false;if(obj.constructor&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf"))return false;return true},isEmptyObject:function(obj){for(var name in obj)return false;return true},type:function(obj){if(obj==null)return obj+"";return typeof obj=== "object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj},globalEval:function(code){var indirect=eval;code=jQuery.trim(code);if(code)if(code.indexOf("use strict")===1){var script=document$jscomp$0.createElement("script");script.text=code;document$jscomp$0.head.appendChild(script).parentNode.removeChild(script)}else indirect(code)},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&& elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback,args){var i=0;var length=obj.length;var isArray=isArraylike(obj);if(args)if(isArray)for(;i<length;i++){var value=callback.apply(obj[i],args);if(value===false)break}else for(i in obj){value=callback.apply(obj[i],args);if(value===false)break}else if(isArray)for(;i<length;i++){value=callback.call(obj[i],i,obj[i]);if(value===false)break}else for(i in obj){value=callback.call(obj[i],i,obj[i]);if(value===false)break}return obj}, trim:function(text){return text==null?"":(text+"").replace(rtrim,"")},makeArray:function(arr,results){var ret=results||[];if(arr!=null)if(isArraylike(Object(arr)))jQuery.merge(ret,typeof arr==="string"?[arr]:arr);else push.call(ret,arr);return ret},inArray:function(elem,arr,i){return arr==null?-1:indexOf.call(arr,elem,i)},merge:function(first,second){var len=+second.length;var j=0;for(var i=first.length;j<len;j++)first[i++]=second[j];first.length=i;return first},grep:function(elems,callback,invert){var matches= [];var i=0;var length=elems.length;for(var callbackExpect=!invert;i<length;i++){var callbackInverse=!callback(elems[i],i);if(callbackInverse!==callbackExpect)matches.push(elems[i])}return matches},map:function(elems,callback,arg){var i=0;var length=elems.length;var isArray=isArraylike(elems);var ret=[];if(isArray)for(;i<length;i++){var value=callback(elems[i],i,arg);if(value!=null)ret.push(value)}else for(i in elems){value=callback(elems[i],i,arg);if(value!=null)ret.push(value)}return concat.apply([], ret)},guid:1,proxy:function(fn,context){if(typeof context==="string"){var tmp=fn[context];context=fn;fn=tmp}if(!jQuery.isFunction(fn))return undefined;var args=slice.call(arguments,2);var proxy=function(){return fn.apply(context||this,args.concat(slice.call(arguments)))};proxy.guid=fn.guid=fn.guid||jQuery.guid++;return proxy},now:Date.now,support:support});jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase()}); var Sizzle=function(window){function Sizzle(selector,context,results,seed){var match;var m;var i;var old;if((context?context.ownerDocument||context:preferredDoc)!==document)setDocument(context);context=context||document;results=results||[];var nodeType=context.nodeType;if(typeof selector!=="string"||!selector||nodeType!==1&&nodeType!==9&&nodeType!==11)return results;if(!seed&&documentIsHTML){if(nodeType!==11&&(match=rquickExpr.exec(selector)))if(m=match[1])if(nodeType===9){var elem=context.getElementById(m); if(elem&&elem.parentNode){if(elem.id===m){results.push(elem);return results}}else return results}else{if(context.ownerDocument&&(elem=context.ownerDocument.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results}}else if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results}else if((m=match[3])&&support.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results}if(support.qsa&&(!rbuggyQSA||!rbuggyQSA.test(selector))){var nid= old=expando;var newContext=context;var newSelector=nodeType!==1&&selector;if(nodeType===1&&context.nodeName.toLowerCase()!=="object"){var groups=tokenize(selector);if(old=context.getAttribute("id"))nid=old.replace(rescape,"\\$\x26");else context.setAttribute("id",nid);nid="[id\x3d'"+nid+"'] ";for(i=groups.length;i--;)groups[i]=nid+toSelector(groups[i]);newContext=rsibling.test(selector)&&testContext(context.parentNode)||context;newSelector=groups.join(",")}if(newSelector)try{push.apply(results,newContext.querySelectorAll(newSelector)); return results}catch(qsaError){}finally{if(!old)context.removeAttribute("id")}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}function createCache(){function cache(key,value){if(keys.push(key+" ")>Expr.cacheLength)delete cache[keys.shift()];return cache[key+" "]=value}var keys=[];return cache}function markFunction(fn){fn[expando]=true;return fn}function assert(fn){var div=document.createElement("div");try{return!!fn(div)}catch(e){return false}finally{if(div.parentNode)div.parentNode.removeChild(div); div=null}}function addHandle(attrs,handler){var arr=attrs.split("|");for(var i=attrs.length;i--;)Expr.attrHandle[arr[i]]=handler}function siblingCheck(a,b){var cur=b&&a;var diff=cur&&a.nodeType===1&&b.nodeType===1&&(~b.sourceIndex||MAX_NEGATIVE)-(~a.sourceIndex||MAX_NEGATIVE);if(diff)return diff;if(cur)for(;cur=cur.nextSibling;)if(cur===b)return-1;return a?1:-1}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name= elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&elem.type===type}}function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j;var matchIndexes=fn([],seed.length,argument);for(var i=matchIndexes.length;i--;)if(seed[j=matchIndexes[i]])seed[j]=!(matches[j]=seed[j])})})}function testContext(context){return context&&typeof context.getElementsByTagName!=="undefined"&&context}function setFilters(){}function toSelector(tokens){var i= 0;var len=tokens.length;for(var selector="";i<len;i++)selector+=tokens[i].value;return selector}function addCombinator(matcher,combinator,base){var dir=combinator.dir;var checkNonElements=base&&dir==="parentNode";var doneName=done++;return combinator.first?function(elem,context,xml){for(;elem=elem[dir];)if(elem.nodeType===1||checkNonElements)return matcher(elem,context,xml)}:function(elem,context,xml){var oldCache;var newCache=[dirruns,doneName];if(xml)for(;elem=elem[dir];){if(elem.nodeType===1|| checkNonElements)if(matcher(elem,context,xml))return true}else for(;elem=elem[dir];)if(elem.nodeType===1||checkNonElements){var outerCache=elem[expando]||(elem[expando]={});if((oldCache=outerCache[dir])&&oldCache[0]===dirruns&&oldCache[1]===doneName)return newCache[2]=oldCache[2];else{outerCache[dir]=newCache;if(newCache[2]=matcher(elem,context,xml))return true}}}}function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){for(var i=matchers.length;i--;)if(!matchers[i](elem, context,xml))return false;return true}:matchers[0]}function multipleContexts(selector,contexts,results){var i=0;for(var len=contexts.length;i<len;i++)Sizzle(selector,contexts[i],results);return results}function condense(unmatched,map,filter,context,xml){var elem;var newUnmatched=[];var i=0;var len=unmatched.length;for(var mapped=map!=null;i<len;i++)if(elem=unmatched[i])if(!filter||filter(elem,context,xml)){newUnmatched.push(elem);if(mapped)map.push(i)}return newUnmatched}function setMatcher(preFilter, selector,matcher,postFilter,postFinder,postSelector){if(postFilter&&!postFilter[expando])postFilter=setMatcher(postFilter);if(postFinder&&!postFinder[expando])postFinder=setMatcher(postFinder,postSelector);return markFunction(function(seed,results,context,xml){var i;var elem;var preMap=[];var postMap=[];var preexisting=results.length;var elems=seed||multipleContexts(selector||"*",context.nodeType?[context]:context,[]);var matcherIn=preFilter&&(seed||!selector)?condense(elems,preMap,preFilter,context, xml):elems;var matcherOut=matcher?postFinder||(seed?preFilter:preexisting||postFilter)?[]:results:matcherIn;if(matcher)matcher(matcherIn,matcherOut,context,xml);if(postFilter){var temp=condense(matcherOut,postMap);postFilter(temp,[],context,xml);for(i=temp.length;i--;)if(elem=temp[i])matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem)}if(seed){if(postFinder||preFilter){if(postFinder){temp=[];for(i=matcherOut.length;i--;)if(elem=matcherOut[i])temp.push(matcherIn[i]=elem);postFinder(null,matcherOut= [],temp,xml)}for(i=matcherOut.length;i--;)if((elem=matcherOut[i])&&(temp=postFinder?indexOf(seed,elem):preMap[i])>-1)seed[temp]=!(results[temp]=elem)}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder)postFinder(null,results,matcherOut,xml);else push.apply(results,matcherOut)}})}function matcherFromTokens(tokens){var checkContext;var matcher;var j;var len=tokens.length;var leadingRelative=Expr.relative[tokens[0].type];var implicitRelative= leadingRelative||Expr.relative[" "];var i=leadingRelative?1:0;var matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,true);var matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1},implicitRelative,true);for(var matchers=[function(elem,context,xml){var ret=!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));checkContext=null;return ret}];i< len;i++)if(matcher=Expr.relative[tokens[i].type])matchers=[addCombinator(elementMatcher(matchers),matcher)];else{matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches);if(matcher[expando]){for(j=++i;j<len;j++)if(Expr.relative[tokens[j].type])break;return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrim,"$1"),matcher,i<j&&matcherFromTokens(tokens.slice(i,j)),j<len&&matcherFromTokens(tokens=tokens.slice(j)), j<len&&toSelector(tokens))}matchers.push(matcher)}return elementMatcher(matchers)}function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0;var byElement=elementMatchers.length>0;var superMatcher=function(seed,context,xml,results,outermost){var elem;var j;var matcher;var matchedCount=0;var i="0";var unmatched=seed&&[];var setMatched=[];var contextBackup=outermostContext;var elems=seed||byElement&&Expr.find["TAG"]("*",outermost);var dirrunsUnique=dirruns+=contextBackup== null?1:Math.random()||.1;var len=elems.length;if(outermost)outermostContext=context!==document&&context;for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){for(j=0;matcher=elementMatchers[j++];)if(matcher(elem,context,xml)){results.push(elem);break}if(outermost)dirruns=dirrunsUnique}if(bySet){if(elem=!matcher&&elem)matchedCount--;if(seed)unmatched.push(elem)}}matchedCount+=i;if(bySet&&i!==matchedCount){for(j=0;matcher=setMatchers[j++];)matcher(unmatched,setMatched,context,xml);if(seed){if(matchedCount> 0)for(;i--;)if(!(unmatched[i]||setMatched[i]))setMatched[i]=pop.call(results);setMatched=condense(setMatched)}push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1)Sizzle.uniqueSort(results)}if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup}return unmatched};return bySet?markFunction(superMatcher):superMatcher}var i$jscomp$0;var outermostContext;var sortInput;var hasDuplicate;var document;var docElem;var documentIsHTML;var rbuggyQSA; var rbuggyMatches;var matches$jscomp$0;var contains;var expando="sizzle"+1*new Date;var preferredDoc=window.document;var dirruns=0;var done=0;var classCache=createCache();var tokenCache=createCache();var compilerCache=createCache();var sortOrder=function(a,b){if(a===b)hasDuplicate=true;return 0};var MAX_NEGATIVE=1<<31;var hasOwn={}.hasOwnProperty;var arr$jscomp$0=[];var pop=arr$jscomp$0.pop;var push_native=arr$jscomp$0.push;var push=arr$jscomp$0.push;var slice=arr$jscomp$0.slice;var indexOf=function(list, elem){var i=0;for(var len=list.length;i<len;i++)if(list[i]===elem)return i;return-1};var booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped";var whitespace="[\\x20\\t\\r\\n\\f]";var characterEncoding="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+";var identifier=characterEncoding.replace("w","w#");var attributes="\\["+whitespace+"*("+characterEncoding+")(?:"+whitespace+"*([*^$|!~]?\x3d)"+whitespace+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ identifier+"))|)"+whitespace+"*\\]";var pseudos=":("+characterEncoding+")(?:\\(("+"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+"((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|"+".*"+")\\)|)";var rwhitespace=new RegExp(whitespace+"+","g");var rtrim=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g");var rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*");var rcombinators=new RegExp("^"+whitespace+"*([\x3e+~]|"+whitespace+")"+whitespace+"*");var rattributeQuotes=new RegExp("\x3d"+ whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g");var rpseudo=new RegExp(pseudos);var ridentifier=new RegExp("^"+identifier+"$");var matchExpr={"ID":new RegExp("^#("+characterEncoding+")"),"CLASS":new RegExp("^\\.("+characterEncoding+")"),"TAG":new RegExp("^("+characterEncoding.replace("w","w*")+")"),"ATTR":new RegExp("^"+attributes),"PSEUDO":new RegExp("^"+pseudos),"CHILD":new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+ whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),"bool":new RegExp("^(?:"+booleans+")$","i"),"needsContext":new RegExp("^"+whitespace+"*[\x3e+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?\x3d[^-]|$)","i")};var rinputs=/^(?:input|select|textarea|button)$/i;var rheader=/^h\d$/i;var rnative=/^[^{]+\{\s*\[native \w/;var rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/;var rsibling=/[+~]/;var rescape=/'|\\/g;var runescape=new RegExp("\\\\([\\da-f]{1,6}"+ whitespace+"?|("+whitespace+")|.)","ig");var funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-65536;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)};var unloadHandler=function(){setDocument()};try{push.apply(arr$jscomp$0=slice.call(preferredDoc.childNodes),preferredDoc.childNodes);arr$jscomp$0[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr$jscomp$0.length?function(target, els){push_native.apply(target,slice.call(els))}:function(target,els){var j=target.length;for(var i=0;target[j++]=els[i++];);target.length=j-1}}}var support=Sizzle.support={};var isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":false};var setDocument=Sizzle.setDocument=function(node){var doc=node?node.ownerDocument||node:preferredDoc;if(doc===document||doc.nodeType!==9||!doc.documentElement)return document; document=doc;docElem=doc.documentElement;var parent=doc.defaultView;if(parent&&parent!==parent.top)if(parent.addEventListener)parent.addEventListener("unload",unloadHandler,false);else if(parent.attachEvent)parent.attachEvent("onunload",unloadHandler);documentIsHTML=!isXML(doc);support.attributes=assert(function(div){div.className="i";return!div.getAttribute("className")});support.getElementsByTagName=assert(function(div){div.appendChild(doc.createComment(""));return!div.getElementsByTagName("*").length}); support.getElementsByClassName=rnative.test(doc.getElementsByClassName);support.getById=assert(function(div){docElem.appendChild(div).id=expando;return!doc.getElementsByName||!doc.getElementsByName(expando).length});if(support.getById){Expr.find["ID"]=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var m=context.getElementById(id);return m&&m.parentNode?[m]:[]}};Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")=== attrId}}}else{delete Expr.find["ID"];Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return node&&node.value===attrId}}}Expr.find["TAG"]=support.getElementsByTagName?function(tag,context){if(typeof context.getElementsByTagName!=="undefined")return context.getElementsByTagName(tag);else if(support.qsa)return context.querySelectorAll(tag)}:function(tag,context){var elem;var tmp= [];var i=0;var results=context.getElementsByTagName(tag);if(tag==="*"){for(;elem=results[i++];)if(elem.nodeType===1)tmp.push(elem);return tmp}return results};Expr.find["CLASS"]=support.getElementsByClassName&&function(className,context){if(documentIsHTML)return context.getElementsByClassName(className)};rbuggyMatches=[];rbuggyQSA=[];if(support.qsa=rnative.test(doc.querySelectorAll)){assert(function(div){docElem.appendChild(div).innerHTML="\x3ca id\x3d'"+expando+"'\x3e\x3c/a\x3e"+"\x3cselect id\x3d'"+ expando+"-\f]' msallowcapture\x3d''\x3e"+"\x3coption selected\x3d''\x3e\x3c/option\x3e\x3c/select\x3e";if(div.querySelectorAll("[msallowcapture^\x3d'']").length)rbuggyQSA.push("[*^$]\x3d"+whitespace+"*(?:''|\"\")");if(!div.querySelectorAll("[selected]").length)rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")");if(!div.querySelectorAll("[id~\x3d"+expando+"-]").length)rbuggyQSA.push("~\x3d");if(!div.querySelectorAll(":checked").length)rbuggyQSA.push(":checked");if(!div.querySelectorAll("a#"+ expando+"+*").length)rbuggyQSA.push(".#.+[+~]")});assert(function(div){var input=doc.createElement("input");input.setAttribute("type","hidden");div.appendChild(input).setAttribute("name","D");if(div.querySelectorAll("[name\x3dd]").length)rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?\x3d");if(!div.querySelectorAll(":enabled").length)rbuggyQSA.push(":enabled",":disabled");div.querySelectorAll("*,:x");rbuggyQSA.push(",.*:")})}if(support.matchesSelector=rnative.test(matches$jscomp$0=docElem.matches||docElem.webkitMatchesSelector|| docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector))assert(function(div){support.disconnectedMatch=matches$jscomp$0.call(div,"div");matches$jscomp$0.call(div,"[s!\x3d'']:x");rbuggyMatches.push("!\x3d",pseudos)});rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|"));var hasCompare=rnative.test(docElem.compareDocumentPosition);contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown= a.nodeType===9?a.documentElement:a;var bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return true;return false};sortOrder=hasCompare?function(a,b){if(a===b){hasDuplicate=true;return 0}var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare)return compare;compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b): 1;if(compare&1||!support.sortDetached&&b.compareDocumentPosition(a)===compare){if(a===doc||a.ownerDocument===preferredDoc&&contains(preferredDoc,a))return-1;if(b===doc||b.ownerDocument===preferredDoc&&contains(preferredDoc,b))return 1;return sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0}return compare&4?-1:1}:function(a,b){if(a===b){hasDuplicate=true;return 0}var cur;var i=0;var aup=a.parentNode;var bup=b.parentNode;var ap=[a];var bp=[b];if(!aup||!bup)return a===doc?-1:b===doc?1:aup?-1:bup? 1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0;else if(aup===bup)return siblingCheck(a,b);for(cur=a;cur=cur.parentNode;)ap.unshift(cur);for(cur=b;cur=cur.parentNode;)bp.unshift(cur);for(;ap[i]===bp[i];)i++;return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0};return doc};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document)setDocument(elem);expr=expr.replace(rattributeQuotes, "\x3d'$1']");if(support.matchesSelector&&documentIsHTML&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr)))try{var ret=matches$jscomp$0.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11)return ret}catch(e){}return Sizzle(expr,document,null,[elem]).length>0};Sizzle.contains=function(context,elem){if((context.ownerDocument||context)!==document)setDocument(context);return contains(context,elem)};Sizzle.attr=function(elem,name){if((elem.ownerDocument|| elem)!==document)setDocument(elem);var fn=Expr.attrHandle[name.toLowerCase()];var val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg);};Sizzle.uniqueSort=function(results){var elem;var duplicates=[];var j=0;var i=0; hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){for(;elem=results[i++];)if(elem===results[i])j=duplicates.push(i);for(;j--;)results.splice(duplicates[j],1)}sortInput=null;return results};var getText=Sizzle.getText=function(elem){var node;var ret="";var i=0;var nodeType=elem.nodeType;if(!nodeType)for(;node=elem[i++];)ret+=getText(node);else if(nodeType===1||nodeType===9||nodeType===11)if(typeof elem.textContent==="string")return elem.textContent; else for(elem=elem.firstChild;elem;elem=elem.nextSibling)ret+=getText(elem);else if(nodeType===3||nodeType===4)return elem.nodeValue;return ret};var Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{"\x3e":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{"ATTR":function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[3]||match[4]||match[5]|| "").replace(runescape,funescape);if(match[2]==="~\x3d")match[3]=" "+match[3]+" ";return match.slice(0,4)},"CHILD":function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){if(!match[3])Sizzle.error(match[0]);match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+(match[7]+match[8]||match[3]==="odd")}else if(match[3])Sizzle.error(match[0]);return match},"PSEUDO":function(match){var excess;var unquoted=!match[6]&&match[2];if(matchExpr["CHILD"].test(match[0]))return null; if(match[3])match[2]=match[4]||match[5]||"";else if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess)}return match.slice(0,3)}},filter:{"TAG":function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()=== nodeName}},"CLASS":function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!=="undefined"&&elem.getAttribute("class")||"")})},"ATTR":function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null)return operator==="!\x3d";if(!operator)return true; result+="";return operator==="\x3d"?result===check:operator==="!\x3d"?result!==check:operator==="^\x3d"?check&&result.indexOf(check)===0:operator==="*\x3d"?check&&result.indexOf(check)>-1:operator==="$\x3d"?check&&result.slice(-check.length)===check:operator==="~\x3d"?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:operator==="|\x3d"?result===check||result.slice(0,check.length+1)===check+"-":false}},"CHILD":function(type,what,argument,first,last){var simple=type.slice(0,3)!=="nth";var forward= type.slice(-4)!=="last";var ofType=what==="of-type";return first===1&&last===0?function(elem){return!!elem.parentNode}:function(elem,context,xml){var node;var dir=simple!==forward?"nextSibling":"previousSibling";var parent=elem.parentNode;var name=ofType&&elem.nodeName.toLowerCase();var useCache=!xml&&!ofType;if(parent){if(simple){for(;dir;){for(node=elem;node=node[dir];)if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)return false;var start=dir=type==="only"&&!start&&"nextSibling"}return true}start= [forward?parent.firstChild:parent.lastChild];if(forward&&useCache){var outerCache=parent[expando]||(parent[expando]={});var cache=outerCache[type]||[];var nodeIndex=cache[0]===dirruns&&cache[1];var diff=cache[0]===dirruns&&cache[2];for(node=nodeIndex&&parent.childNodes[nodeIndex];node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop();)if(node.nodeType===1&&++diff&&node===elem){outerCache[type]=[dirruns,nodeIndex,diff];break}}else if(useCache&&(cache=(elem[expando]||(elem[expando]={}))[type])&& cache[0]===dirruns)diff=cache[1];else for(;node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop();)if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){if(useCache)(node[expando]||(node[expando]={}))[type]=[dirruns,diff];if(node===elem)break}diff-=last;return diff===first||diff%first===0&&diff/first>=0}}},"PSEUDO":function(pseudo,argument){var fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);if(fn[expando])return fn(argument); if(fn.length>1){var args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var matched=fn(seed,argument);for(var i=matched.length;i--;){var idx=indexOf(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i])}}):function(elem){return fn(elem,0,args)}}return fn}},pseudos:{"not":markFunction(function(selector){var input=[];var results=[];var matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed, matches,context,xml){var elem;var unmatched=matcher(seed,null,xml,[]);for(var i=seed.length;i--;)if(elem=unmatched[i])seed[i]=!(matches[i]=elem)}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);input[0]=null;return!results.pop()}}),"has":markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),"contains":markFunction(function(text){text=text.replace(runescape,funescape);return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)> -1}}),"lang":markFunction(function(lang){if(!ridentifier.test(lang||""))Sizzle.error("unsupported lang: "+lang);lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang")){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0}while((elem=elem.parentNode)&&elem.nodeType===1);return false}}),"target":function(elem){var hash=window.location&&window.location.hash; return hash&&hash.slice(1)===elem.id},"root":function(elem){return elem===docElem},"focus":function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},"enabled":function(elem){return elem.disabled===false},"disabled":function(elem){return elem.disabled===true},"checked":function(elem){var nodeName=elem.nodeName.toLowerCase();return nodeName==="input"&&!!elem.checked||nodeName==="option"&&!!elem.selected},"selected":function(elem){if(elem.parentNode)elem.parentNode.selectedIndex; return elem.selected===true},"empty":function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling)if(elem.nodeType<6)return false;return true},"parent":function(elem){return!Expr.pseudos["empty"](elem)},"header":function(elem){return rheader.test(elem.nodeName)},"input":function(elem){return rinputs.test(elem.nodeName)},"button":function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button"},"text":function(elem){var attr;return elem.nodeName.toLowerCase()=== "input"&&elem.type==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text")},"first":createPositionalPseudo(function(){return[0]}),"last":createPositionalPseudo(function(matchIndexes,length){return[length-1]}),"eq":createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument]}),"even":createPositionalPseudo(function(matchIndexes,length){for(var i=0;i<length;i+=2)matchIndexes.push(i);return matchIndexes}),"odd":createPositionalPseudo(function(matchIndexes, length){for(var i=1;i<length;i+=2)matchIndexes.push(i);return matchIndexes}),"lt":createPositionalPseudo(function(matchIndexes,length,argument){for(var i=argument<0?argument+length:argument;--i>=0;)matchIndexes.push(i);return matchIndexes}),"gt":createPositionalPseudo(function(matchIndexes,length,argument){for(var i=argument<0?argument+length:argument;++i<length;)matchIndexes.push(i);return matchIndexes})}};Expr.pseudos["nth"]=Expr.pseudos["eq"];for(i$jscomp$0 in{radio:true,checkbox:true,file:true, password:true,image:true})Expr.pseudos[i$jscomp$0]=createInputPseudo(i$jscomp$0);for(i$jscomp$0 in{submit:true,reset:true})Expr.pseudos[i$jscomp$0]=createButtonPseudo(i$jscomp$0);setFilters.prototype=Expr.filters=Expr.pseudos;Expr.setFilters=new setFilters;var tokenize=Sizzle.tokenize=function(selector,parseOnly){var match;var tokens;var type;var preFilters;var cached=tokenCache[selector+" "];if(cached)return parseOnly?0:cached.slice(0);var soFar=selector;var groups=[];for(preFilters=Expr.preFilter;soFar;){if(!matched|| (match=rcomma.exec(soFar))){if(match)soFar=soFar.slice(match[0].length)||soFar;groups.push(tokens=[])}var matched=false;if(match=rcombinators.exec(soFar)){matched=match.shift();tokens.push({value:matched,type:match[0].replace(rtrim," ")});soFar=soFar.slice(matched.length)}for(type in Expr.filter)if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]||(match=preFilters[type](match)))){matched=match.shift();tokens.push({value:matched,type:type,matches:match});soFar=soFar.slice(matched.length)}if(!matched)break}return parseOnly? soFar.length:soFar?Sizzle.error(selector):tokenCache(selector,groups).slice(0)};var compile=Sizzle.compile=function(selector,match){var i;var setMatchers=[];var elementMatchers=[];var cached=compilerCache[selector+" "];if(!cached){if(!match)match=tokenize(selector);for(i=match.length;i--;){cached=matcherFromTokens(match[i]);if(cached[expando])setMatchers.push(cached);else elementMatchers.push(cached)}cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));cached.selector= selector}return cached};var select=Sizzle.select=function(selector,context,results,seed){var i;var token;var type;var find;var compiled=typeof selector==="function"&&selector;var match=!seed&&tokenize(selector=compiled.selector||selector);results=results||[];if(match.length===1){var tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&support.getById&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find["ID"](token.matches[0].replace(runescape, funescape),context)||[])[0];if(!context)return results;else if(compiled)context=context.parentNode;selector=selector.slice(tokens.shift().value.length)}for(i=matchExpr["needsContext"].test(selector)?0:tokens.length;i--;){token=tokens[i];if(Expr.relative[type=token.type])break;if(find=Expr.find[type])if(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context)){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results, seed);return results}break}}}(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,rsibling.test(selector)&&testContext(context.parentNode)||context);return results};support.sortStable=expando.split("").sort(sortOrder).join("")===expando;support.detectDuplicates=!!hasDuplicate;setDocument();support.sortDetached=assert(function(div1){return div1.compareDocumentPosition(document.createElement("div"))&1});if(!assert(function(div){div.innerHTML="\x3ca href\x3d'#'\x3e\x3c/a\x3e";return div.firstChild.getAttribute("href")=== "#"}))addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML)return elem.getAttribute(name,name.toLowerCase()==="type"?1:2)});if(!support.attributes||!assert(function(div){div.innerHTML="\x3cinput/\x3e";div.firstChild.setAttribute("value","");return div.firstChild.getAttribute("value")===""}))addHandle("value",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()==="input")return elem.defaultValue});if(!assert(function(div){return div.getAttribute("disabled")==null}))addHandle(booleans, function(elem,name,isXML){var val;if(!isXML)return elem[name]===true?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null});return Sizzle}(window$jscomp$0);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;var rneedsContext=jQuery.expr.match.needsContext;var rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>|)$/;var risSimple=/^.[^:#\[\.,]*$/; jQuery.filter=function(expr,elems,not){var elem$jscomp$0=elems[0];if(not)expr=":not("+expr+")";return elems.length===1&&elem$jscomp$0.nodeType===1?jQuery.find.matchesSelector(elem$jscomp$0,expr)?[elem$jscomp$0]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1}))};jQuery.fn.extend({find:function(selector){var i;var len=this.length;var ret=[];var self=this;if(typeof selector!=="string")return this.pushStack(jQuery(selector).filter(function(){for(i=0;i<len;i++)if(jQuery.contains(self[i], this))return true}));for(i=0;i<len;i++)jQuery.find(selector,self[i],ret);ret=this.pushStack(len>1?jQuery.unique(ret):ret);ret.selector=this.selector?this.selector+" "+selector:selector;return ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],false))},not:function(selector){return this.pushStack(winnow(this,selector||[],true))},is:function(selector){return!!winnow(this,typeof selector==="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length}}); var rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;var init=jQuery.fn.init=function(selector,context){if(!selector)return this;if(typeof selector==="string"){if(selector[0]==="\x3c"&&selector[selector.length-1]==="\x3e"&&selector.length>=3)var match=[null,selector,null];else match=rquickExpr.exec(selector);if(match&&(match[1]||!context))if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context: document$jscomp$0,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context))for(match in context)if(jQuery.isFunction(this[match]))this[match](context[match]);else this.attr(match,context[match]);return this}else{var elem=document$jscomp$0.getElementById(match[2]);if(elem&&elem.parentNode){this.length=1;this[0]=elem}this.context=document$jscomp$0;this.selector=selector;return this}else if(!context||context.jquery)return(context||rootjQuery).find(selector);else return this.constructor(context).find(selector)}else if(selector.nodeType){this.context= this[0]=selector;this.length=1;return this}else if(jQuery.isFunction(selector))return typeof rootjQuery.ready!=="undefined"?rootjQuery.ready(selector):selector(jQuery);if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context}return jQuery.makeArray(selector,this)};init.prototype=jQuery.fn;var rootjQuery=jQuery(document$jscomp$0);var rparentsprev=/^(?:parents|prev(?:Until|All))/;var guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.extend({dir:function(elem, dir,until){var matched=[];for(var truncate=until!==undefined;(elem=elem[dir])&&elem.nodeType!==9;)if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until))break;matched.push(elem)}return matched},sibling:function(n,elem){for(var matched=[];n;n=n.nextSibling)if(n.nodeType===1&&n!==elem)matched.push(n);return matched}});jQuery.fn.extend({has:function(target){var targets=jQuery(target,this);var l=targets.length;return this.filter(function(){for(var i=0;i<l;i++)if(jQuery.contains(this,targets[i]))return true})}, closest:function(selectors,context){var cur;var i=0;var l=this.length;var matched=[];for(var pos=rneedsContext.test(selectors)||typeof selectors!=="string"?jQuery(selectors,context||this.context):0;i<l;i++)for(cur=this[i];cur&&cur!==context;cur=cur.parentNode)if(cur.nodeType<11&&(pos?pos.index(cur)>-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}return this.pushStack(matched.length>1?jQuery.unique(matched):matched)},index:function(elem){if(!elem)return this[0]&& this[0].parentNode?this.first().prevAll().length:-1;if(typeof elem==="string")return indexOf.call(jQuery(elem),this[0]);return indexOf.call(this,elem.jquery?elem[0]:elem)},add:function(selector,context){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector))}});jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11? parent:null},parents:function(elem){return jQuery.dir(elem,"parentNode")},parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until)},prevUntil:function(elem,i, until){return jQuery.dir(elem,"previousSibling",until)},siblings:function(elem){return jQuery.sibling((elem.parentNode||{}).firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return elem.contentDocument||jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);if(name.slice(-5)!=="Until")selector=until;if(selector&&typeof selector==="string")matched=jQuery.filter(selector, matched);if(this.length>1){if(!guaranteedUnique[name])jQuery.unique(matched);if(rparentsprev.test(name))matched.reverse()}return this.pushStack(matched)}});var rnotwhite=/\S+/g;var optionsCache={};jQuery.Callbacks=function(options){options=typeof options==="string"?optionsCache[options]||createOptions(options):jQuery.extend({},options);var memory;var fired;var firing;var firingStart;var firingLength;var firingIndex;var list=[];var stack=!options.once&&[];var fire=function(data){memory=options.memory&& data;fired=true;firingIndex=firingStart||0;firingStart=0;firingLength=list.length;for(firing=true;list&&firingIndex<firingLength;firingIndex++)if(list[firingIndex].apply(data[0],data[1])===false&&options.stopOnFalse){memory=false;break}firing=false;if(list)if(stack){if(stack.length)fire(stack.shift())}else if(memory)list=[];else self.disable()};var self={add:function(){if(list){var start=list.length;(function add(args){jQuery.each(args,function(_,arg){var type=jQuery.type(arg);if(type==="function"){if(!options.unique|| !self.has(arg))list.push(arg)}else if(arg&&arg.length&&type!=="string")add(arg)})})(arguments);if(firing)firingLength=list.length;else if(memory){firingStart=start;fire(memory)}}return this},remove:function(){if(list)jQuery.each(arguments,function(_,arg){for(var index;(index=jQuery.inArray(arg,list,index))>-1;){list.splice(index,1);if(firing){if(index<=firingLength)firingLength--;if(index<=firingIndex)firingIndex--}}});return this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:!!(list&&list.length)}, empty:function(){list=[];firingLength=0;return this},disable:function(){list=stack=memory=undefined;return this},disabled:function(){return!list},lock:function(){stack=undefined;if(!memory)self.disable();return this},locked:function(){return!stack},fireWith:function(context,args){if(list&&(!fired||stack)){args=args||[];args=[context,args.slice?args.slice():args];if(firing)stack.push(args);else fire(args)}return this},fire:function(){self.fireWith(this,arguments);return this},fired:function(){return!!fired}}; return self};jQuery.extend({Deferred:function(func){var tuples=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]];var state="pending";var promise={state:function(){return state},always:function(){deferred.done(arguments).fail(arguments);return this},then:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=jQuery.isFunction(fns[i])&& fns[i];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&jQuery.isFunction(returned.promise))returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify);else newDefer[tuple[0]+"With"](this===promise?newDefer.promise():this,fn?[returned]:arguments)})});fns=null}).promise()},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise}};var deferred={};promise.pipe=promise.then;jQuery.each(tuples,function(i,tuple){var list= tuple[2];var stateString=tuple[3];promise[tuple[1]]=list.add;if(stateString)list.add(function(){state=stateString},tuples[i^1][2].disable,tuples[2][2].lock);deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred?promise:this,arguments);return this};deferred[tuple[0]+"With"]=list.fireWith});promise.promise(deferred);if(func)func.call(deferred,deferred);return deferred},when:function(subordinate){var i$jscomp$0=0;var resolveValues=slice.call(arguments);var length=resolveValues.length; var remaining=length!==1||subordinate&&jQuery.isFunction(subordinate.promise)?length:0;var deferred=remaining===1?subordinate:jQuery.Deferred();var updateFunc=function(i,contexts,values){return function(value){contexts[i]=this;values[i]=arguments.length>1?slice.call(arguments):value;if(values===progressValues)deferred.notifyWith(contexts,values);else if(!--remaining)deferred.resolveWith(contexts,values)}};var resolveContexts;if(length>1){var progressValues=new Array(length);var progressContexts=new Array(length); for(resolveContexts=new Array(length);i$jscomp$0<length;i$jscomp$0++)if(resolveValues[i$jscomp$0]&&jQuery.isFunction(resolveValues[i$jscomp$0].promise))resolveValues[i$jscomp$0].promise().done(updateFunc(i$jscomp$0,resolveContexts,resolveValues)).fail(deferred.reject).progress(updateFunc(i$jscomp$0,progressContexts,progressValues));else--remaining}if(!remaining)deferred.resolveWith(resolveContexts,resolveValues);return deferred.promise()}});var readyList;jQuery.fn.ready=function(fn){jQuery.ready.promise().done(fn); return this};jQuery.extend({isReady:false,readyWait:1,holdReady:function(hold){if(hold)jQuery.readyWait++;else jQuery.ready(true)},ready:function(wait){if(wait===true?--jQuery.readyWait:jQuery.isReady)return;jQuery.isReady=true;if(wait!==true&&--jQuery.readyWait>0)return;readyList.resolveWith(document$jscomp$0,[jQuery]);if(jQuery.fn.triggerHandler){jQuery(document$jscomp$0).triggerHandler("ready");jQuery(document$jscomp$0).off("ready")}}});jQuery.ready.promise=function(obj){if(!readyList){readyList= jQuery.Deferred();if(document$jscomp$0.readyState==="complete")setTimeout(jQuery.ready);else{document$jscomp$0.addEventListener("DOMContentLoaded",completed,false);window$jscomp$0.addEventListener("load",completed,false)}}return readyList.promise(obj)};jQuery.ready.promise();var access=jQuery.access=function(elems,fn,key$jscomp$0,value$jscomp$0,chainable,emptyGet,raw){var i=0;var len=elems.length;var bulk=key$jscomp$0==null;if(jQuery.type(key$jscomp$0)==="object"){chainable=true;for(i in key$jscomp$0)jQuery.access(elems, fn,i,key$jscomp$0[i],true,emptyGet,raw)}else if(value$jscomp$0!==undefined){chainable=true;if(!jQuery.isFunction(value$jscomp$0))raw=true;if(bulk)if(raw){fn.call(elems,value$jscomp$0);fn=null}else{bulk=fn;fn=function(elem,key,value){return bulk.call(jQuery(elem),value)}}if(fn)for(;i<len;i++)fn(elems[i],key$jscomp$0,raw?value$jscomp$0:value$jscomp$0.call(elems[i],i,fn(elems[i],key$jscomp$0)))}return chainable?elems:bulk?fn.call(elems):len?fn(elems[0],key$jscomp$0):emptyGet};jQuery.acceptData=function(owner){return owner.nodeType=== 1||owner.nodeType===9||!+owner.nodeType};Data.uid=1;Data.accepts=jQuery.acceptData;Data.prototype={key:function(owner){if(!Data.accepts(owner))return 0;var descriptor={};var unlock=owner[this.expando];if(!unlock){unlock=Data.uid++;try{descriptor[this.expando]={value:unlock};Object.defineProperties(owner,descriptor)}catch(e){descriptor[this.expando]=unlock;jQuery.extend(owner,descriptor)}}if(!this.cache[unlock])this.cache[unlock]={};return unlock},set:function(owner,data,value){var prop;var unlock= this.key(owner);var cache=this.cache[unlock];if(typeof data==="string")cache[data]=value;else if(jQuery.isEmptyObject(cache))jQuery.extend(this.cache[unlock],data);else for(prop in data)cache[prop]=data[prop];return cache},get:function(owner,key){var cache=this.cache[this.key(owner)];return key===undefined?cache:cache[key]},access:function(owner,key,value){if(key===undefined||key&&typeof key==="string"&&value===undefined){var stored=this.get(owner,key);return stored!==undefined?stored:this.get(owner, jQuery.camelCase(key))}this.set(owner,key,value);return value!==undefined?value:key},remove:function(owner,key){var i;var unlock=this.key(owner);var cache=this.cache[unlock];if(key===undefined)this.cache[unlock]={};else{if(jQuery.isArray(key))var name=key.concat(key.map(jQuery.camelCase));else{var camel=jQuery.camelCase(key);if(key in cache)name=[key,camel];else{name=camel;name=name in cache?[name]:name.match(rnotwhite)||[]}}for(i=name.length;i--;)delete cache[name[i]]}},hasData:function(owner){return!jQuery.isEmptyObject(this.cache[owner[this.expando]]|| {})},discard:function(owner){if(owner[this.expando])delete this.cache[owner[this.expando]]}};var data_priv=new Data;var data_user=new Data;var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/;var rmultiDash=/([A-Z])/g;jQuery.extend({hasData:function(elem){return data_user.hasData(elem)||data_priv.hasData(elem)},data:function(elem,name,data){return data_user.access(elem,name,data)},removeData:function(elem,name){data_user.remove(elem,name)},_data:function(elem,name,data){return data_priv.access(elem,name,data)}, _removeData:function(elem,name){data_priv.remove(elem,name)}});jQuery.fn.extend({data:function(key,value$jscomp$0){var i;var elem=this[0];var attrs=elem&&elem.attributes;if(key===undefined){if(this.length){var data$jscomp$1=data_user.get(elem);if(elem.nodeType===1&&!data_priv.get(elem,"hasDataAttrs")){for(i=attrs.length;i--;)if(attrs[i]){var name=attrs[i].name;if(name.indexOf("data-")===0){name=jQuery.camelCase(name.slice(5));dataAttr(elem,name,data$jscomp$1[name])}}data_priv.set(elem,"hasDataAttrs", true)}}return data$jscomp$1}if(typeof key==="object")return this.each(function(){data_user.set(this,key)});return access(this,function(value){var camelKey=jQuery.camelCase(key);if(elem&&value===undefined){var data$jscomp$0=data_user.get(elem,key);if(data$jscomp$0!==undefined)return data$jscomp$0;data$jscomp$0=data_user.get(elem,camelKey);if(data$jscomp$0!==undefined)return data$jscomp$0;data$jscomp$0=dataAttr(elem,camelKey,undefined);if(data$jscomp$0!==undefined)return data$jscomp$0;return}this.each(function(){var data= data_user.get(this,camelKey);data_user.set(this,camelKey,value);if(key.indexOf("-")!==-1&&data!==undefined)data_user.set(this,key,value)})},null,value$jscomp$0,arguments.length>1,null,true)},removeData:function(key){return this.each(function(){data_user.remove(this,key)})}});jQuery.extend({queue:function(elem,type,data){if(elem){type=(type||"fx")+"queue";var queue=data_priv.get(elem,type);if(data)if(!queue||jQuery.isArray(data))queue=data_priv.access(elem,type,jQuery.makeArray(data));else queue.push(data); return queue||[]}},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type);var startLength=queue.length;var fn=queue.shift();var hooks=jQuery._queueHooks(elem,type);var next=function(){jQuery.dequeue(elem,type)};if(fn==="inprogress"){fn=queue.shift();startLength--}if(fn){if(type==="fx")queue.unshift("inprogress");delete hooks.stop;fn.call(elem,next,hooks)}if(!startLength&&hooks)hooks.empty.fire()},_queueHooks:function(elem,type){var key=type+"queueHooks";return data_priv.get(elem, key)||data_priv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){data_priv.remove(elem,[type+"queue",key])})})}});jQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--}if(arguments.length<setter)return jQuery.queue(this[0],type);return data===undefined?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type);if(type==="fx"&&queue[0]!=="inprogress")jQuery.dequeue(this,type)})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this, type)})},clearQueue:function(type){return this.queue(type||"fx",[])},promise:function(type,obj){var count=1;var defer=jQuery.Deferred();var elements=this;var i=this.length;var resolve=function(){if(!--count)defer.resolveWith(elements,[elements])};if(typeof type!=="string"){obj=type;type=undefined}for(type=type||"fx";i--;){var tmp=data_priv.get(elements[i],type+"queueHooks");if(tmp&&tmp.empty){count++;tmp.empty.add(resolve)}}resolve();return defer.promise(obj)}});var pnum=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source; var cssExpand=["Top","Right","Bottom","Left"];var isHidden=function(elem,el){elem=el||elem;return jQuery.css(elem,"display")==="none"||!jQuery.contains(elem.ownerDocument,elem)};var rcheckableType=/^(?:checkbox|radio)$/i;(function(){var fragment=document$jscomp$0.createDocumentFragment();var div=fragment.appendChild(document$jscomp$0.createElement("div"));var input=document$jscomp$0.createElement("input");input.setAttribute("type","radio");input.setAttribute("checked","checked");input.setAttribute("name", "t");div.appendChild(input);support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;div.innerHTML="\x3ctextarea\x3ex\x3c/textarea\x3e";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue})();var strundefined=typeof undefined;support.focusinBubbles="onfocusin"in window$jscomp$0;var rkeyEvent=/^key/;var rmouseEvent=/^(?:mouse|pointer|contextmenu)|click/;var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/;var rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;jQuery.event={global:{}, add:function(elem,types,handler,data,selector){var eventHandle;var events;var t;var handlers;var origType;var elemData=data_priv.get(elem);if(!elemData)return;if(handler.handler){var handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector}if(!handler.guid)handler.guid=jQuery.guid++;if(!(events=elemData.events))events=elemData.events={};if(!(eventHandle=elemData.handle))eventHandle=elemData.handle=function(e){return typeof jQuery!==strundefined&&jQuery.event.triggered!==e.type? jQuery.event.dispatch.apply(elem,arguments):undefined};types=(types||"").match(rnotwhite)||[""];for(t=types.length;t--;){var tmp=rtypenamespace.exec(types[t])||[];var type=origType=tmp[1];var namespaces=(tmp[2]||"").split(".").sort();if(!type)continue;var special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=jQuery.event.special[type]||{};var handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector, needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn);if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false)if(elem.addEventListener)elem.addEventListener(type,eventHandle,false)}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid)handleObj.handler.guid=handler.guid}if(selector)handlers.splice(handlers.delegateCount++, 0,handleObj);else handlers.push(handleObj);jQuery.event.global[type]=true}},remove:function(elem,types,handler,selector,mappedTypes){var j;var origCount;var events;var t;var origType;var elemData=data_priv.hasData(elem)&&data_priv.get(elem);if(!elemData||!(events=elemData.events))return;types=(types||"").match(rnotwhite)||[""];for(t=types.length;t--;){var tmp=rtypenamespace.exec(types[t])||[];var type=origType=tmp[1];var namespaces=(tmp[2]||"").split(".").sort();if(!type){for(type in events)jQuery.event.remove(elem, type+types[t],handler,selector,true);continue}var special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;var handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");for(origCount=j=handlers.length;j--;){var handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector=== "**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector)handlers.delegateCount--;if(special.remove)special.remove.call(elem,handleObj)}}if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false)jQuery.removeEvent(elem,type,elemData.handle);delete events[type]}}if(jQuery.isEmptyObject(events)){delete elemData.handle;data_priv.remove(elem,"events")}},trigger:function(event,data,elem,onlyHandlers){var i;var tmp;var eventPath=[elem|| document$jscomp$0];var type=hasOwn.call(event,"type")?event.type:event;var namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];var cur=tmp=elem=elem||document$jscomp$0;if(elem.nodeType===3||elem.nodeType===8)return;if(rfocusMorph.test(type+jQuery.event.triggered))return;if(type.indexOf(".")>=0){namespaces=type.split(".");type=namespaces.shift();namespaces.sort()}var ontype=type.indexOf(":")<0&&"on"+type;event=event[jQuery.expando]?event:new jQuery.Event(type,typeof event==="object"&& event);event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(".");event.namespace_re=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;event.result=undefined;if(!event.target)event.target=elem;data=data==null?[event]:jQuery.makeArray(data,[event]);var special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false)return;if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){var bubbleType=special.delegateType|| type;if(!rfocusMorph.test(bubbleType+type))cur=cur.parentNode;for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur}if(tmp===(elem.ownerDocument||document$jscomp$0))eventPath.push(tmp.defaultView||tmp.parentWindow||window$jscomp$0)}for(i=0;(cur=eventPath[i++])&&!event.isPropagationStopped();){event.type=i>1?bubbleType:special.bindType||type;var handle=(data_priv.get(cur,"events")||{})[event.type]&&data_priv.get(cur,"handle");if(handle)handle.apply(cur,data);handle=ontype&&cur[ontype];if(handle&& handle.apply&&jQuery.acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false)event.preventDefault()}}event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented())if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&jQuery.acceptData(elem))if(ontype&&jQuery.isFunction(elem[type])&&!jQuery.isWindow(elem)){tmp=elem[ontype];if(tmp)elem[ontype]=null;jQuery.event.triggered=type;elem[type]();jQuery.event.triggered=undefined;if(tmp)elem[ontype]=tmp}return event.result}, dispatch:function(event){event=jQuery.event.fix(event);var i;var j;var matched;var handleObj;var handlerQueue=[];var args=slice.call(arguments);var handlers=(data_priv.get(this,"events")||{})[event.type]||[];var special=jQuery.event.special[event.type]||{};args[0]=event;event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false)return;handlerQueue=jQuery.event.handlers.call(this,event,handlers);for(i=0;(matched=handlerQueue[i++])&&!event.isPropagationStopped();){event.currentTarget= matched.elem;for(j=0;(handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped();)if(!event.namespace_re||event.namespace_re.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;var ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined)if((event.result=ret)===false){event.preventDefault();event.stopPropagation()}}}if(special.postDispatch)special.postDispatch.call(this,event);return event.result}, handlers:function(event,handlers){var i;var handlerQueue=[];var delegateCount=handlers.delegateCount;var cur=event.target;if(delegateCount&&cur.nodeType&&(!event.button||event.type!=="click"))for(;cur!==this;cur=cur.parentNode||this)if(cur.disabled!==true||event.type!=="click"){var matches=[];for(i=0;i<delegateCount;i++){var handleObj=handlers[i];var sel=handleObj.selector+" ";if(matches[sel]===undefined)matches[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>=0:jQuery.find(sel,this,null, [cur]).length;if(matches[sel])matches.push(handleObj)}if(matches.length)handlerQueue.push({elem:cur,handlers:matches})}if(delegateCount<handlers.length)handlerQueue.push({elem:this,handlers:handlers.slice(delegateCount)});return handlerQueue},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(event,original){if(event.which==null)event.which= original.charCode!=null?original.charCode:original.keyCode;return event}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(event,original){var button=original.button;if(event.pageX==null&&original.clientX!=null){var eventDoc=event.target.ownerDocument||document$jscomp$0;var doc=eventDoc.documentElement;var body=eventDoc.body;event.pageX=original.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft|| body&&body.clientLeft||0);event.pageY=original.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0)}if(!event.which&&button!==undefined)event.which=button&1?1:button&2?3:button&4?2:0;return event}},fix:function(event){if(event[jQuery.expando])return event;var i;var type=event.type;var originalEvent=event;var fixHook=this.fixHooks[type];if(!fixHook)this.fixHooks[type]=fixHook=rmouseEvent.test(type)?this.mouseHooks:rkeyEvent.test(type)?this.keyHooks:{}; var copy=fixHook.props?this.props.concat(fixHook.props):this.props;event=new jQuery.Event(originalEvent);for(i=copy.length;i--;){var prop=copy[i];event[prop]=originalEvent[prop]}if(!event.target)event.target=document$jscomp$0;if(event.target.nodeType===3)event.target=event.target.parentNode;return fixHook.filter?fixHook.filter(event,originalEvent):event},special:{load:{noBubble:true},focus:{trigger:function(){if(this!==safeActiveElement()&&this.focus){this.focus();return false}},delegateType:"focusin"}, blur:{trigger:function(){if(this===safeActiveElement()&&this.blur){this.blur();return false}},delegateType:"focusout"},click:{trigger:function(){if(this.type==="checkbox"&&this.click&&jQuery.nodeName(this,"input")){this.click();return false}},_default:function(event){return jQuery.nodeName(event.target,"a")}},beforeunload:{postDispatch:function(event){if(event.result!==undefined&&event.originalEvent)event.originalEvent.returnValue=event.result}}},simulate:function(type,elem,event,bubble){var e=jQuery.extend(new jQuery.Event, event,{type:type,isSimulated:true,originalEvent:{}});if(bubble)jQuery.event.trigger(e,null,elem);else jQuery.event.dispatch.call(elem,e);if(e.isDefaultPrevented())event.preventDefault()}};jQuery.removeEvent=function(elem,type,handle){if(elem.removeEventListener)elem.removeEventListener(type,handle,false)};jQuery.Event=function(src,props){if(!(this instanceof jQuery.Event))return new jQuery.Event(src,props);if(src&&src.type){this.originalEvent=src;this.type=src.type;this.isDefaultPrevented=src.defaultPrevented|| src.defaultPrevented===undefined&&src.returnValue===false?returnTrue:returnFalse}else this.type=src;if(props)jQuery.extend(this,props);this.timeStamp=src&&src.timeStamp||jQuery.now();this[jQuery.expando]=true};jQuery.Event.prototype={isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue;if(e&&e.preventDefault)e.preventDefault()},stopPropagation:function(){var e= this.originalEvent;this.isPropagationStopped=returnTrue;if(e&&e.stopPropagation)e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue;if(e&&e.stopImmediatePropagation)e.stopImmediatePropagation();this.stopPropagation()}};jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var target= this;var related=event.relatedTarget;var handleObj=event.handleObj;if(!related||related!==target&&!jQuery.contains(target,related)){event.type=handleObj.origType;var ret=handleObj.handler.apply(this,arguments);event.type=fix}return ret}}});if(!support.focusinBubbles)jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var handler=function(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event),true)};jQuery.event.special[fix]={setup:function(){var doc=this.ownerDocument|| this;var attaches=data_priv.access(doc,fix);if(!attaches)doc.addEventListener(orig,handler,true);data_priv.access(doc,fix,(attaches||0)+1)},teardown:function(){var doc=this.ownerDocument||this;var attaches=data_priv.access(doc,fix)-1;if(!attaches){doc.removeEventListener(orig,handler,true);data_priv.remove(doc,fix)}else data_priv.access(doc,fix,attaches)}}});jQuery.fn.extend({on:function(types,selector,data,fn,one){var type;if(typeof types==="object"){if(typeof selector!=="string"){data=data||selector; selector=undefined}for(type in types)this.on(type,selector,data,types[type],one);return this}if(data==null&&fn==null){fn=selector;data=selector=undefined}else if(fn==null)if(typeof selector==="string"){fn=data;data=undefined}else{fn=data;data=selector;selector=undefined}if(fn===false)fn=returnFalse;else if(!fn)return this;if(one===1){var origFn=fn;fn=function(event){jQuery().off(event);return origFn.apply(this,arguments)};fn.guid=origFn.guid||(origFn.guid=jQuery.guid++)}return this.each(function(){jQuery.event.add(this, types,fn,data,selector)})},one:function(types,selector,data,fn){return this.on(types,selector,data,fn,1)},off:function(types,selector,fn){var type;if(types&&types.preventDefault&&types.handleObj){var handleObj=types.handleObj;jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler);return this}if(typeof types==="object"){for(type in types)this.off(type,selector,types[type]);return this}if(selector===false|| typeof selector==="function"){fn=selector;selector=undefined}if(fn===false)fn=returnFalse;return this.each(function(){jQuery.event.remove(this,types,fn,selector)})},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){var elem=this[0];if(elem)return jQuery.event.trigger(type,data,elem,true)}});var rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;var rtagName=/<([\w:]+)/;var rhtml=/<|&#?\w+;/; var rnoInnerhtml=/<(?:script|style|link)/i;var rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i;var rscriptType=/^$|\/(?:java|ecma)script/i;var rscriptTypeMasked=/^true\/(.*)/;var rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;var wrapMap={option:[1,"\x3cselect multiple\x3d'multiple'\x3e","\x3c/select\x3e"],thead:[1,"\x3ctable\x3e","\x3c/table\x3e"],col:[2,"\x3ctable\x3e\x3ccolgroup\x3e","\x3c/colgroup\x3e\x3c/table\x3e"],tr:[2,"\x3ctable\x3e\x3ctbody\x3e","\x3c/tbody\x3e\x3c/table\x3e"],td:[3, "\x3ctable\x3e\x3ctbody\x3e\x3ctr\x3e","\x3c/tr\x3e\x3c/tbody\x3e\x3c/table\x3e"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;jQuery.extend({clone:function(elem,dataAndEvents,deepDataAndEvents){var i;var l;var clone=elem.cloneNode(true);var inPage=jQuery.contains(elem.ownerDocument,elem);if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){var destElements= getAll(clone);var srcElements=getAll(elem);for(i=0,l=srcElements.length;i<l;i++)fixInput(srcElements[i],destElements[i])}if(dataAndEvents)if(deepDataAndEvents){srcElements=srcElements||getAll(elem);destElements=destElements||getAll(clone);for(i=0,l=srcElements.length;i<l;i++)cloneCopyEvent(srcElements[i],destElements[i])}else cloneCopyEvent(elem,clone);destElements=getAll(clone,"script");if(destElements.length>0)setGlobalEval(destElements,!inPage&&getAll(elem,"script"));return clone},buildFragment:function(elems, context,scripts,selection){var j;var fragment=context.createDocumentFragment();var nodes=[];var i=0;for(var l=elems.length;i<l;i++){var elem=elems[i];if(elem||elem===0)if(jQuery.type(elem)==="object")jQuery.merge(nodes,elem.nodeType?[elem]:elem);else if(!rhtml.test(elem))nodes.push(context.createTextNode(elem));else{var tmp=tmp||fragment.appendChild(context.createElement("div"));var tag=(rtagName.exec(elem)||["",""])[1].toLowerCase();var wrap=wrapMap[tag]||wrapMap._default;tmp.innerHTML=wrap[1]+elem.replace(rxhtmlTag, "\x3c$1\x3e\x3c/$2\x3e")+wrap[2];for(j=wrap[0];j--;)tmp=tmp.lastChild;jQuery.merge(nodes,tmp.childNodes);tmp=fragment.firstChild;tmp.textContent=""}}fragment.textContent="";for(i=0;elem=nodes[i++];){if(selection&&jQuery.inArray(elem,selection)!==-1)continue;var contains=jQuery.contains(elem.ownerDocument,elem);tmp=getAll(fragment.appendChild(elem),"script");if(contains)setGlobalEval(tmp);if(scripts)for(j=0;elem=tmp[j++];)if(rscriptType.test(elem.type||""))scripts.push(elem)}return fragment},cleanData:function(elems){var data; var elem;var type;var special=jQuery.event.special;for(var i=0;(elem=elems[i])!==undefined;i++){if(jQuery.acceptData(elem)){var key=elem[data_priv.expando];if(key&&(data=data_priv.cache[key])){if(data.events)for(type in data.events)if(special[type])jQuery.event.remove(elem,type);else jQuery.removeEvent(elem,type,data.handle);if(data_priv.cache[key])delete data_priv.cache[key]}}delete data_user.cache[elem[data_user.expando]]}}});jQuery.fn.extend({text:function(value$jscomp$0){return access(this,function(value){return value=== undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9)this.textContent=value})},null,value$jscomp$0,arguments.length)},append:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target= manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}})},before:function(){return this.domManip(arguments,function(elem){if(this.parentNode)this.parentNode.insertBefore(elem,this)})},after:function(){return this.domManip(arguments,function(elem){if(this.parentNode)this.parentNode.insertBefore(elem,this.nextSibling)})},remove:function(selector,keepData){var elem;var elems=selector?jQuery.filter(selector,this):this;for(var i=0;(elem=elems[i])!=null;i++){if(!keepData&&elem.nodeType=== 1)jQuery.cleanData(getAll(elem));if(elem.parentNode){if(keepData&&jQuery.contains(elem.ownerDocument,elem))setGlobalEval(getAll(elem,"script"));elem.parentNode.removeChild(elem)}}return this},empty:function(){var elem;for(var i=0;(elem=this[i])!=null;i++)if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.textContent=""}return this},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents: deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value$jscomp$0){return access(this,function(value){var elem=this[0]||{};var i=0;var l=this.length;if(value===undefined&&elem.nodeType===1)return elem.innerHTML;if(typeof value==="string"&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,"\x3c$1\x3e\x3c/$2\x3e");try{for(;i<l;i++){elem=this[i]||{};if(elem.nodeType=== 1){jQuery.cleanData(getAll(elem,false));elem.innerHTML=value}}elem=0}catch(e){}}if(elem)this.empty().append(value)},null,value$jscomp$0,arguments.length)},replaceWith:function(){var arg=arguments[0];this.domManip(arguments,function(elem){arg=this.parentNode;jQuery.cleanData(getAll(this));if(arg)arg.replaceChild(elem,this)});return arg&&(arg.length||arg.nodeType)?this:this.remove()},detach:function(selector){return this.remove(selector,true)},domManip:function(args,callback){args=concat.apply([],args); var hasScripts;var i=0;var l=this.length;var set=this;var iNoClone=l-1;var value=args[0];var isFunction=jQuery.isFunction(value);if(isFunction||l>1&&typeof value==="string"&&!support.checkClone&&rchecked.test(value))return this.each(function(index){var self=set.eq(index);if(isFunction)args[0]=value.call(this,index,self.html());self.domManip(args,callback)});if(l){var fragment=jQuery.buildFragment(args,this[0].ownerDocument,false,this);var first=fragment.firstChild;if(fragment.childNodes.length=== 1)fragment=first;if(first){var scripts=jQuery.map(getAll(fragment,"script"),disableScript);for(hasScripts=scripts.length;i<l;i++){var node=fragment;if(i!==iNoClone){node=jQuery.clone(node,true,true);if(hasScripts)jQuery.merge(scripts,getAll(node,"script"))}callback.call(this[i],node,i)}if(hasScripts){var doc=scripts[scripts.length-1].ownerDocument;jQuery.map(scripts,restoreScript);for(i=0;i<hasScripts;i++){node=scripts[i];if(rscriptType.test(node.type||"")&&!data_priv.access(node,"globalEval")&&jQuery.contains(doc, node))if(node.src){if(jQuery._evalUrl)jQuery._evalUrl(node.src)}else jQuery.globalEval(node.textContent.replace(rcleanScript,""))}}}}return this}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[];var insert=jQuery(selector);var last=insert.length-1;for(var i=0;i<=last;i++){var elems=i===last?this:this.clone(true);jQuery(insert[i])[original](elems);push.apply(ret, elems.get())}return this.pushStack(ret)}});var iframe;var elemdisplay={};var rmargin=/^margin/;var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");var getStyles=function(elem){if(elem.ownerDocument.defaultView.opener)return elem.ownerDocument.defaultView.getComputedStyle(elem,null);return window$jscomp$0.getComputedStyle(elem,null)};(function(){function computePixelPositionAndBoxSizingReliable(){div.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;"+"box-sizing:border-box;display:block;margin-top:1%;top:1%;"+ "border:1px;padding:1px;width:4px;position:absolute";div.innerHTML="";docElem.appendChild(container);var divStyle=window$jscomp$0.getComputedStyle(div,null);pixelPositionVal=divStyle.top!=="1%";boxSizingReliableVal=divStyle.width==="4px";docElem.removeChild(container)}var pixelPositionVal;var boxSizingReliableVal;var docElem=document$jscomp$0.documentElement;var container=document$jscomp$0.createElement("div");var div=document$jscomp$0.createElement("div");if(!div.style)return;div.style.backgroundClip= "content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";container.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;"+"position:absolute";container.appendChild(div);if(window$jscomp$0.getComputedStyle)jQuery.extend(support,{pixelPosition:function(){computePixelPositionAndBoxSizingReliable();return pixelPositionVal},boxSizingReliable:function(){if(boxSizingReliableVal==null)computePixelPositionAndBoxSizingReliable(); return boxSizingReliableVal},reliableMarginRight:function(){var marginDiv=div.appendChild(document$jscomp$0.createElement("div"));marginDiv.style.cssText=div.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;"+"box-sizing:content-box;display:block;margin:0;border:0;padding:0";marginDiv.style.marginRight=marginDiv.style.width="0";div.style.width="1px";docElem.appendChild(container);var ret=!parseFloat(window$jscomp$0.getComputedStyle(marginDiv,null).marginRight);docElem.removeChild(container); div.removeChild(marginDiv);return ret}})})();jQuery.swap=function(elem,options,callback,args){var name;var old={};for(name in options){old[name]=elem.style[name];elem.style[name]=options[name]}var ret=callback.apply(elem,args||[]);for(name in options)elem.style[name]=old[name];return ret};var rdisplayswap=/^(none|table(?!-c[ea]).+)/;var rnumsplit=new RegExp("^("+pnum+")(.*)$","i");var rrelNum=new RegExp("^([+-])\x3d("+pnum+")","i");var cssShow={position:"absolute",visibility:"hidden",display:"block"}; var cssNormalTransform={letterSpacing:"0",fontWeight:"400"};var cssPrefixes=["Webkit","O","Moz","ms"];jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return ret===""?"1":ret}}}},cssNumber:{"columnCount":true,"fillOpacity":true,"flexGrow":true,"flexShrink":true,"fontWeight":true,"lineHeight":true,"opacity":true,"order":true,"orphans":true,"widows":true,"zIndex":true,"zoom":true},cssProps:{"float":"cssFloat"},style:function(elem,name,value,extra){if(!elem|| elem.nodeType===3||elem.nodeType===8||!elem.style)return;var ret;var origName=jQuery.camelCase(name);var style=elem.style;name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(style,origName));var hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(value!==undefined){var type=typeof value;if(type==="string"&&(ret=rrelNum.exec(value))){value=(ret[1]+1)*ret[2]+parseFloat(jQuery.css(elem,name));type="number"}if(value==null||value!==value)return;if(type==="number"&&!jQuery.cssNumber[origName])value+= "px";if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0)style[name]="inherit";if(!hooks||!("set"in hooks)||(value=hooks.set(elem,value,extra))!==undefined)style[name]=value}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined)return ret;return style[name]}},css:function(elem,name,extra,styles){var origName=jQuery.camelCase(name);name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(elem.style,origName));var hooks=jQuery.cssHooks[name]|| jQuery.cssHooks[origName];if(hooks&&"get"in hooks)var val=hooks.get(elem,true,extra);if(val===undefined)val=curCSS(elem,name,styles);if(val==="normal"&&name in cssNormalTransform)val=cssNormalTransform[name];if(extra===""||extra){var num=parseFloat(val);return extra===true||jQuery.isNumeric(num)?num||0:val}return val}});jQuery.each(["height","width"],function(i,name){jQuery.cssHooks[name]={get:function(elem,computed,extra){if(computed)return rdisplayswap.test(jQuery.css(elem,"display"))&&elem.offsetWidth=== 0?jQuery.swap(elem,cssShow,function(){return getWidthOrHeight(elem,name,extra)}):getWidthOrHeight(elem,name,extra)},set:function(elem,value,extra){var styles=extra&&getStyles(elem);return setPositiveNumber(elem,value,extra?augmentWidthOrHeight(elem,name,extra,jQuery.css(elem,"boxSizing",false,styles)==="border-box",styles):0)}}});jQuery.cssHooks.marginRight=addGetHookIf(support.reliableMarginRight,function(elem,computed){if(computed)return jQuery.swap(elem,{"display":"inline-block"},curCSS,[elem, "marginRight"])});jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){var i=0;var expanded={};for(var parts=typeof value==="string"?value.split(" "):[value];i<4;i++)expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];return expanded}};if(!rmargin.test(prefix))jQuery.cssHooks[prefix+suffix].set=setPositiveNumber});jQuery.fn.extend({css:function(name$jscomp$0,value$jscomp$0){return access(this,function(elem, name,value){var len;var map={};var i=0;if(jQuery.isArray(name)){var styles=getStyles(elem);for(len=name.length;i<len;i++)map[name[i]]=jQuery.css(elem,name[i],false,styles);return map}return value!==undefined?jQuery.style(elem,name,value):jQuery.css(elem,name)},name$jscomp$0,value$jscomp$0,arguments.length>1)},show:function(){return showHide(this,true)},hide:function(){return showHide(this)},toggle:function(state){if(typeof state==="boolean")return state?this.show():this.hide();return this.each(function(){if(isHidden(this))jQuery(this).show(); else jQuery(this).hide()})}});jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||"swing";this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function(percent){var eased;var hooks=Tween.propHooks[this.prop]; if(this.options.duration)this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration);else this.pos=eased=percent;this.now=(this.end-this.start)*eased+this.start;if(this.options.step)this.options.step.call(this.elem,this.now,this);if(hooks&&hooks.set)hooks.set(this);else Tween.propHooks._default.set(this);return this}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(tween){if(tween.elem[tween.prop]!=null&&(!tween.elem.style|| tween.elem.style[tween.prop]==null))return tween.elem[tween.prop];var result=jQuery.css(tween.elem,tween.prop,"");return!result||result==="auto"?0:result},set:function(tween){if(jQuery.fx.step[tween.prop])jQuery.fx.step[tween.prop](tween);else if(tween.elem.style&&(tween.elem.style[jQuery.cssProps[tween.prop]]!=null||jQuery.cssHooks[tween.prop]))jQuery.style(tween.elem,tween.prop,tween.now+tween.unit);else tween.elem[tween.prop]=tween.now}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){if(tween.elem.nodeType&& tween.elem.parentNode)tween.elem[tween.prop]=tween.now}};jQuery.easing={linear:function(p){return p},swing:function(p){return.5-Math.cos(p*Math.PI)/2}};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var fxNow;var timerId;var rfxtypes=/^(?:toggle|show|hide)$/;var rfxnum=new RegExp("^(?:([+-])\x3d|)("+pnum+")([a-z%]*)$","i");var rrun=/queueHooks$/;var animationPrefilters=[defaultPrefilter];var tweeners={"*":[function(prop,value){var tween=this.createTween(prop,value);var target=tween.cur();var parts= rfxnum.exec(value);var unit=parts&&parts[3]||(jQuery.cssNumber[prop]?"":"px");var start=(jQuery.cssNumber[prop]||unit!=="px"&&+target)&&rfxnum.exec(jQuery.css(tween.elem,prop));var scale=1;var maxIterations=20;if(start&&start[3]!==unit){unit=unit||start[3];parts=parts||[];start=+target||1;do{scale=scale||".5";start/=scale;jQuery.style(tween.elem,prop,start+unit)}while(scale!==(scale=tween.cur()/target)&&scale!==1&&--maxIterations)}if(parts){start=tween.start=+start||+target||0;tween.unit=unit;tween.end= parts[1]?start+(parts[1]+1)*parts[2]:+parts[2]}return tween}]};jQuery.Animation=jQuery.extend(Animation,{tweener:function(props,callback){if(jQuery.isFunction(props)){callback=props;props=["*"]}else props=props.split(" ");var index=0;for(var length=props.length;index<length;index++){var prop=props[index];tweeners[prop]=tweeners[prop]||[];tweeners[prop].unshift(callback)}},prefilter:function(callback,prepend){if(prepend)animationPrefilters.unshift(callback);else animationPrefilters.push(callback)}}); jQuery.speed=function(speed,easing,fn){var opt=speed&&typeof speed==="object"?jQuery.extend({},speed):{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:opt.duration in jQuery.fx.speeds?jQuery.fx.speeds[opt.duration]:jQuery.fx.speeds._default;if(opt.queue==null||opt.queue===true)opt.queue="fx";opt.old=opt.complete;opt.complete=function(){if(jQuery.isFunction(opt.old))opt.old.call(this); if(opt.queue)jQuery.dequeue(this,opt.queue)};return opt};jQuery.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHidden).css("opacity",0).show().end().animate({opacity:to},speed,easing,callback)},animate:function(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop);var optall=jQuery.speed(speed,easing,callback);var doAnimation=function(){var anim=Animation(this,jQuery.extend({},prop),optall);if(empty||data_priv.get(this,"finish"))anim.stop(true)};doAnimation.finish= doAnimation;return empty||optall.queue===false?this.each(doAnimation):this.queue(optall.queue,doAnimation)},stop:function(type,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop;stop(gotoEnd)};if(typeof type!=="string"){gotoEnd=clearQueue;clearQueue=type;type=undefined}if(clearQueue&&type!==false)this.queue(type||"fx",[]);return this.each(function(){var dequeue=true;var index=type!=null&&type+"queueHooks";var timers=jQuery.timers;var data=data_priv.get(this);if(index){if(data[index]&& data[index].stop)stopQueue(data[index])}else for(index in data)if(data[index]&&data[index].stop&&rrun.test(index))stopQueue(data[index]);for(index=timers.length;index--;)if(timers[index].elem===this&&(type==null||timers[index].queue===type)){timers[index].anim.stop(gotoEnd);dequeue=false;timers.splice(index,1)}if(dequeue||!gotoEnd)jQuery.dequeue(this,type)})},finish:function(type){if(type!==false)type=type||"fx";return this.each(function(){var index;var data=data_priv.get(this);var queue=data[type+ "queue"];var hooks=data[type+"queueHooks"];var timers=jQuery.timers;var length=queue?queue.length:0;data.finish=true;jQuery.queue(this,type,[]);if(hooks&&hooks.stop)hooks.stop.call(this,true);for(index=timers.length;index--;)if(timers[index].elem===this&&timers[index].queue===type){timers[index].anim.stop(true);timers.splice(index,1)}for(index=0;index<length;index++)if(queue[index]&&queue[index].finish)queue[index].finish.call(this);delete data.finish})}});jQuery.each(["toggle","show","hide"],function(i, name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return speed==null||typeof speed==="boolean"?cssFn.apply(this,arguments):this.animate(genFx(name,true),speed,easing,callback)}});jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback)}});jQuery.timers= [];jQuery.fx.tick=function(){var i=0;var timers=jQuery.timers;for(fxNow=jQuery.now();i<timers.length;i++){var timer=timers[i];if(!timer()&&timers[i]===timer)timers.splice(i--,1)}if(!timers.length)jQuery.fx.stop();fxNow=undefined};jQuery.fx.timer=function(timer){jQuery.timers.push(timer);if(timer())jQuery.fx.start();else jQuery.timers.pop()};jQuery.fx.interval=13;jQuery.fx.start=function(){if(!timerId)timerId=setInterval(jQuery.fx.tick,jQuery.fx.interval)};jQuery.fx.stop=function(){clearInterval(timerId); timerId=null};jQuery.fx.speeds={slow:600,fast:200,_default:400};jQuery.fn.delay=function(time,type){time=jQuery.fx?jQuery.fx.speeds[time]||time:time;type=type||"fx";return this.queue(type,function(next,hooks){var timeout=setTimeout(next,time);hooks.stop=function(){clearTimeout(timeout)}})};(function(){var input=document$jscomp$0.createElement("input");var select=document$jscomp$0.createElement("select");var opt=select.appendChild(document$jscomp$0.createElement("option"));input.type="checkbox";support.checkOn= input.value!=="";support.optSelected=opt.selected;select.disabled=true;support.optDisabled=!opt.disabled;input=document$jscomp$0.createElement("input");input.value="t";input.type="radio";support.radioValue=input.value==="t"})();var nodeHook;var attrHandle=jQuery.expr.attrHandle;jQuery.fn.extend({attr:function(name,value){return access(this,jQuery.attr,name,value,arguments.length>1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})}});jQuery.extend({attr:function(elem, name,value){var ret;var nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2)return;if(typeof elem.getAttribute===strundefined)return jQuery.prop(elem,name,value);if(nType!==1||!jQuery.isXMLDoc(elem)){name=name.toLowerCase();var hooks=jQuery.attrHooks[name]||(jQuery.expr.match.bool.test(name)?boolHook:nodeHook)}if(value!==undefined)if(value===null)jQuery.removeAttr(elem,name);else if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined)return ret;else{elem.setAttribute(name, value+"");return value}else if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null)return ret;else{ret=jQuery.find.attr(elem,name);return ret==null?undefined:ret}},removeAttr:function(elem,value){var name;var i=0;var attrNames=value&&value.match(rnotwhite);if(attrNames&&elem.nodeType===1)for(;name=attrNames[i++];){var propName=jQuery.propFix[name]||name;if(jQuery.expr.match.bool.test(name))elem[propName]=false;elem.removeAttribute(name)}},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&& value==="radio"&&jQuery.nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val)elem.value=val;return value}}}}});var boolHook={set:function(elem,value,name){if(value===false)jQuery.removeAttr(elem,name);else elem.setAttribute(name,name);return name}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name$jscomp$0){var getter=attrHandle[name$jscomp$0]||jQuery.find.attr;attrHandle[name$jscomp$0]=function(elem,name,isXML){if(!isXML){var handle=attrHandle[name]; attrHandle[name]=ret;var ret=getter(elem,name,isXML)!=null?name.toLowerCase():null;attrHandle[name]=handle}return ret}});var rfocusable=/^(?:input|select|textarea|button)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return this.each(function(){delete this[jQuery.propFix[name]||name]})}});jQuery.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(elem,name,value){var ret;var nType=elem.nodeType; if(!elem||nType===3||nType===8||nType===2)return;var notxml=nType!==1||!jQuery.isXMLDoc(elem);if(notxml){name=jQuery.propFix[name]||name;var hooks=jQuery.propHooks[name]}if(value!==undefined)return hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined?ret:elem[name]=value;else return hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null?ret:elem[name]},propHooks:{tabIndex:{get:function(elem){return elem.hasAttribute("tabindex")||rfocusable.test(elem.nodeName)||elem.href?elem.tabIndex: -1}}}});if(!support.optSelected)jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;if(parent&&parent.parentNode)parent.parentNode.selectedIndex;return null}};jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this});var rclass=/[\t\r\n\f]/g;jQuery.fn.extend({addClass:function(value){var classes;var clazz;var j$jscomp$0;var proceed=typeof value=== "string"&&value;var i=0;var len=this.length;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).addClass(value.call(this,j,this.className))});if(proceed)for(classes=(value||"").match(rnotwhite)||[];i<len;i++){var elem=this[i];var cur=elem.nodeType===1&&(elem.className?(" "+elem.className+" ").replace(rclass," "):" ");if(cur){for(j$jscomp$0=0;clazz=classes[j$jscomp$0++];)if(cur.indexOf(" "+clazz+" ")<0)cur+=clazz+" ";var finalValue=jQuery.trim(cur);if(elem.className!==finalValue)elem.className= finalValue}}return this},removeClass:function(value){var classes;var clazz;var j$jscomp$0;var proceed=arguments.length===0||typeof value==="string"&&value;var i=0;var len=this.length;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).removeClass(value.call(this,j,this.className))});if(proceed)for(classes=(value||"").match(rnotwhite)||[];i<len;i++){var elem=this[i];var cur=elem.nodeType===1&&(elem.className?(" "+elem.className+" ").replace(rclass," "):"");if(cur){for(j$jscomp$0= 0;clazz=classes[j$jscomp$0++];)for(;cur.indexOf(" "+clazz+" ")>=0;)cur=cur.replace(" "+clazz+" "," ");var finalValue=value?jQuery.trim(cur):"";if(elem.className!==finalValue)elem.className=finalValue}}return this},toggleClass:function(value,stateVal){var type=typeof value;if(typeof stateVal==="boolean"&&type==="string")return stateVal?this.addClass(value):this.removeClass(value);if(jQuery.isFunction(value))return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,this.className,stateVal), stateVal)});return this.each(function(){if(type==="string"){var className;var i=0;var self=jQuery(this);for(var classNames=value.match(rnotwhite)||[];className=classNames[i++];)if(self.hasClass(className))self.removeClass(className);else self.addClass(className)}else if(type===strundefined||type==="boolean"){if(this.className)data_priv.set(this,"__className__",this.className);this.className=this.className||value===false?"":data_priv.get(this,"__className__")||""}})},hasClass:function(selector){var className= " "+selector+" ";var i=0;for(var l=this.length;i<l;i++)if(this[i].nodeType===1&&(" "+this[i].className+" ").replace(rclass," ").indexOf(className)>=0)return true;return false}});var rreturn=/\r/g;jQuery.fn.extend({val:function(value$jscomp$0){var ret;var elem=this[0];if(!arguments.length){if(elem){var hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined)return ret;ret=elem.value;return typeof ret==="string"? ret.replace(rreturn,""):ret==null?"":ret}return}var isFunction=jQuery.isFunction(value$jscomp$0);return this.each(function(i){if(this.nodeType!==1)return;if(isFunction)var val=value$jscomp$0.call(this,i,jQuery(this).val());else val=value$jscomp$0;if(val==null)val="";else if(typeof val==="number")val+="";else if(jQuery.isArray(val))val=jQuery.map(val,function(value){return value==null?"":value+""});hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set"in hooks)|| hooks.set(this,val,"value")===undefined)this.value=val})}});jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return val!=null?val:jQuery.trim(jQuery.text(elem))}},select:{get:function(elem){var options=elem.options;var index=elem.selectedIndex;var one=elem.type==="select-one"||index<0;var values=one?null:[];var max=one?index+1:options.length;for(var i=index<0?max:one?index:0;i<max;i++){var option=options[i];if((option.selected||i===index)&&(support.optDisabled? !option.disabled:option.getAttribute("disabled")===null)&&(!option.parentNode.disabled||!jQuery.nodeName(option.parentNode,"optgroup"))){var value=jQuery(option).val();if(one)return value;values.push(value)}}return values},set:function(elem,value){var options=elem.options;var values=jQuery.makeArray(value);for(var i=options.length;i--;){var option=options[i];if(option.selected=jQuery.inArray(option.value,values)>=0)var optionSet=true}if(!optionSet)elem.selectedIndex=-1;return values}}}});jQuery.each(["radio", "checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(jQuery.isArray(value))return elem.checked=jQuery.inArray(jQuery(elem).val(),value)>=0}};if(!support.checkOn)jQuery.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value}});jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error contextmenu").split(" "), function(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name)}});jQuery.fn.extend({hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver)},bind:function(types,data,fn){return this.on(types,null,data,fn)},unbind:function(types,fn){return this.off(types,null,fn)},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn)},undelegate:function(selector,types,fn){return arguments.length=== 1?this.off(selector,"**"):this.off(types,selector||"**",fn)}});var nonce=jQuery.now();var rquery=/\?/;jQuery.parseJSON=function(data){return JSON.parse(data+"")};jQuery.parseXML=function(data){if(!data||typeof data!=="string")return null;try{var tmp=new DOMParser;var xml=tmp.parseFromString(data,"text/xml")}catch(e){xml=undefined}if(!xml||xml.getElementsByTagName("parsererror").length)jQuery.error("Invalid XML: "+data);return xml};var rhash=/#.*$/;var rts=/([?&])_=[^&]*/;var rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg; var rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/;var rnoContent=/^(?:GET|HEAD)$/;var rprotocol=/^\/\//;var rurl=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/;var prefilters={};var transports={};var allTypes="*/".concat("*");var ajaxLocation=window$jscomp$0.location.href;var ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[];jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ajaxLocation,type:"GET",isLocal:rlocalProtocol.test(ajaxLocParts[1]), global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset\x3dUTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(target, settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){function done(status,nativeStatusText,responses,headers){var statusText=nativeStatusText;if(state===2)return;state=2;if(timeoutTimer)clearTimeout(timeoutTimer);transport=undefined;responseHeadersString=headers||"";jqXHR.readyState=status>0? 4:0;var isSuccess=status>=200&&status<300||status===304;if(responses)var response=ajaxHandleResponses(s,jqXHR,responses);response=ajaxConvert(s,response,jqXHR,isSuccess);if(isSuccess){if(s.ifModified){var modified=jqXHR.getResponseHeader("Last-Modified");if(modified)jQuery.lastModified[cacheURL]=modified;modified=jqXHR.getResponseHeader("etag");if(modified)jQuery.etag[cacheURL]=modified}if(status===204||s.type==="HEAD")statusText="nocontent";else if(status===304)statusText="notmodified";else{statusText= response.state;var success=response.data;var error=response.error;isSuccess=!error}}else{error=statusText;if(status||!statusText){statusText="error";if(status<0)status=0}}jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+"";if(isSuccess)deferred.resolveWith(callbackContext,[success,statusText,jqXHR]);else deferred.rejectWith(callbackContext,[jqXHR,statusText,error]);jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals)globalEventContext.trigger(isSuccess?"ajaxSuccess": "ajaxError",[jqXHR,s,isSuccess?success:error]);completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!--jQuery.active)jQuery.event.trigger("ajaxStop")}}if(typeof url==="object"){options=url;url=undefined}options=options||{};var responseHeadersString;var responseHeaders;var i;var s=jQuery.ajaxSetup({},options);var callbackContext=s.context||s;var globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)? jQuery(callbackContext):jQuery.event;var deferred=jQuery.Deferred();var completeDeferred=jQuery.Callbacks("once memory");var statusCode=s.statusCode||{};var requestHeaders={};var requestHeadersNames={};var state=0;var strAbort="canceled";var jqXHR={readyState:0,getResponseHeader:function(key){var match;if(state===2){if(!responseHeaders)for(responseHeaders={};match=rheaders.exec(responseHeadersString);)responseHeaders[match[1].toLowerCase()]=match[2];match=responseHeaders[key.toLowerCase()]}return match== null?null:match},getAllResponseHeaders:function(){return state===2?responseHeadersString:null},setRequestHeader:function(name,value){var lname=name.toLowerCase();if(!state){name=requestHeadersNames[lname]=requestHeadersNames[lname]||name;requestHeaders[name]=value}return this},overrideMimeType:function(type){if(!state)s.mimeType=type;return this},statusCode:function(map){var code;if(map)if(state<2)for(code in map)statusCode[code]=[statusCode[code],map[code]];else jqXHR.always(map[jqXHR.status]);return this}, abort:function(statusText){var finalText=statusText||strAbort;if(transport)transport.abort(finalText);done(0,finalText);return this}};deferred.promise(jqXHR).complete=completeDeferred.add;jqXHR.success=jqXHR.done;jqXHR.error=jqXHR.fail;s.url=((url||s.url||ajaxLocation)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//");s.type=options.method||options.type||s.method||s.type;s.dataTypes=jQuery.trim(s.dataType||"*").toLowerCase().match(rnotwhite)||[""];if(s.crossDomain==null){var parts=rurl.exec(s.url.toLowerCase()); s.crossDomain=!!(parts&&(parts[1]!==ajaxLocParts[1]||parts[2]!==ajaxLocParts[2]||(parts[3]||(parts[1]==="http:"?"80":"443"))!==(ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?"80":"443"))))}if(s.data&&s.processData&&typeof s.data!=="string")s.data=jQuery.param(s.data,s.traditional);inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(state===2)return jqXHR;var fireGlobals=jQuery.event&&s.global;if(fireGlobals&&jQuery.active++===0)jQuery.event.trigger("ajaxStart");s.type=s.type.toUpperCase(); s.hasContent=!rnoContent.test(s.type);var cacheURL=s.url;if(!s.hasContent){if(s.data){cacheURL=s.url+=(rquery.test(cacheURL)?"\x26":"?")+s.data;delete s.data}if(s.cache===false)s.url=rts.test(cacheURL)?cacheURL.replace(rts,"$1_\x3d"+nonce++):cacheURL+(rquery.test(cacheURL)?"\x26":"?")+"_\x3d"+nonce++}if(s.ifModified){if(jQuery.lastModified[cacheURL])jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]);if(jQuery.etag[cacheURL])jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL])}if(s.data&& s.hasContent&&s.contentType!==false||options.contentType)jqXHR.setRequestHeader("Content-Type",s.contentType);jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+allTypes+"; q\x3d0.01":""):s.accepts["*"]);for(i in s.headers)jqXHR.setRequestHeader(i,s.headers[i]);if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||state===2))return jqXHR.abort();strAbort="abort";for(i in{success:1,error:1,complete:1})jqXHR[i](s[i]); var transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport)done(-1,"No Transport");else{jqXHR.readyState=1;if(fireGlobals)globalEventContext.trigger("ajaxSend",[jqXHR,s]);if(s.async&&s.timeout>0)var timeoutTimer=setTimeout(function(){jqXHR.abort("timeout")},s.timeout);try{state=1;transport.send(requestHeaders,done)}catch(e){if(state<2)done(-1,e);else throw e;}}return jqXHR},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},getScript:function(url, callback){return jQuery.get(url,undefined,callback,"script")}});jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback;callback=data;data=undefined}return jQuery.ajax({url:url,type:method,dataType:type,data:data,success:callback})}});jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",async:false,global:false,"throws":true})};jQuery.fn.extend({wrapAll:function(html){if(jQuery.isFunction(html))return this.each(function(i){jQuery(this).wrapAll(html.call(this, i))});if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode)wrap.insertBefore(this[0]);wrap.map(function(){for(var elem=this;elem.firstElementChild;)elem=elem.firstElementChild;return elem}).append(this)}return this},wrapInner:function(html){if(jQuery.isFunction(html))return this.each(function(i){jQuery(this).wrapInner(html.call(this,i))});return this.each(function(){var self=jQuery(this);var contents=self.contents();if(contents.length)contents.wrapAll(html); else self.append(html)})},wrap:function(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html)})},unwrap:function(){return this.parent().each(function(){if(!jQuery.nodeName(this,"body"))jQuery(this).replaceWith(this.childNodes)}).end()}});jQuery.expr.filters.hidden=function(elem){return elem.offsetWidth<=0&&elem.offsetHeight<=0};jQuery.expr.filters.visible=function(elem){return!jQuery.expr.filters.hidden(elem)};var r20=/%20/g; var rbracket=/\[\]$/;var rCRLF=/\r?\n/g;var rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i;var rsubmittable=/^(?:input|select|textarea|keygen)/i;jQuery.param=function(a,traditional){var prefix;var s=[];var add=function(key,value){value=jQuery.isFunction(value)?value():value==null?"":value;s[s.length]=encodeURIComponent(key)+"\x3d"+encodeURIComponent(value)};if(traditional===undefined)traditional=jQuery.ajaxSettings&&jQuery.ajaxSettings.traditional;if(jQuery.isArray(a)||a.jquery&&!jQuery.isPlainObject(a))jQuery.each(a, function(){add(this.name,this.value)});else for(prefix in a)buildParams(prefix,a[prefix],traditional,add);return s.join("\x26").replace(r20,"+")};jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&& (this.checked||!rcheckableType.test(type))}).map(function(i,elem){var val$jscomp$0=jQuery(this).val();return val$jscomp$0==null?null:jQuery.isArray(val$jscomp$0)?jQuery.map(val$jscomp$0,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")}}):{name:elem.name,value:val$jscomp$0.replace(rCRLF,"\r\n")}}).get()}});jQuery.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var xhrId=0;var xhrCallbacks={};var xhrSuccessStatus={0:200,1223:204};var xhrSupported=jQuery.ajaxSettings.xhr(); if(window$jscomp$0.attachEvent)window$jscomp$0.attachEvent("onunload",function(){for(var key in xhrCallbacks)xhrCallbacks[key]()});support.cors=!!xhrSupported&&"withCredentials"in xhrSupported;support.ajax=xhrSupported=!!xhrSupported;jQuery.ajaxTransport(function(options){var callback;if(support.cors||xhrSupported&&!options.crossDomain)return{send:function(headers,complete){var i;var xhr=options.xhr();var id=++xhrId;xhr.open(options.type,options.url,options.async,options.username,options.password); if(options.xhrFields)for(i in options.xhrFields)xhr[i]=options.xhrFields[i];if(options.mimeType&&xhr.overrideMimeType)xhr.overrideMimeType(options.mimeType);if(!options.crossDomain&&!headers["X-Requested-With"])headers["X-Requested-With"]="XMLHttpRequest";for(i in headers)xhr.setRequestHeader(i,headers[i]);callback=function(type){return function(){if(callback){delete xhrCallbacks[id];callback=xhr.onload=xhr.onerror=null;if(type==="abort")xhr.abort();else if(type==="error")complete(xhr.status,xhr.statusText); else complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,typeof xhr.responseText==="string"?{text:xhr.responseText}:undefined,xhr.getAllResponseHeaders())}}};xhr.onload=callback();xhr.onerror=callback("error");callback=xhrCallbacks[id]=callback("abort");try{xhr.send(options.hasContent&&options.data||null)}catch(e){if(callback)throw e;}},abort:function(){if(callback)callback()}}});jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"}, contents:{script:/(?:java|ecma)script/},converters:{"text script":function(text){jQuery.globalEval(text);return text}}});jQuery.ajaxPrefilter("script",function(s){if(s.cache===undefined)s.cache=false;if(s.crossDomain)s.type="GET"});jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script;var callback;return{send:function(_,complete){script=jQuery("\x3cscript\x3e").prop({async:true,charset:s.scriptCharset,src:s.url}).on("load error",callback=function(evt){script.remove();callback=null; if(evt)complete(evt.type==="error"?404:200,evt.type)});document$jscomp$0.head.appendChild(script[0])},abort:function(){if(callback)callback()}}}});var oldCallbacks=[];var rjsonp=/(=)\?(?=&|$)|\?\?/;jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var callback=oldCallbacks.pop()||jQuery.expando+"_"+nonce++;this[callback]=true;return callback}});jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var responseContainer;var jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?"url": typeof s.data==="string"&&!(s.contentType||"").indexOf("application/x-www-form-urlencoded")&&rjsonp.test(s.data)&&"data");if(jsonProp||s.dataTypes[0]==="jsonp"){var callbackName=s.jsonpCallback=jQuery.isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback;if(jsonProp)s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName);else if(s.jsonp!==false)s.url+=(rquery.test(s.url)?"\x26":"?")+s.jsonp+"\x3d"+callbackName;s.converters["script json"]=function(){if(!responseContainer)jQuery.error(callbackName+ " was not called");return responseContainer[0]};s.dataTypes[0]="json";var overwritten=window$jscomp$0[callbackName];window$jscomp$0[callbackName]=function(){responseContainer=arguments};jqXHR.always(function(){window$jscomp$0[callbackName]=overwritten;if(s[callbackName]){s.jsonpCallback=originalSettings.jsonpCallback;oldCallbacks.push(callbackName)}if(responseContainer&&jQuery.isFunction(overwritten))overwritten(responseContainer[0]);responseContainer=overwritten=undefined});return"script"}});jQuery.parseHTML= function(data,context,keepScripts){if(!data||typeof data!=="string")return null;if(typeof context==="boolean"){keepScripts=context;context=false}context=context||document$jscomp$0;var parsed=rsingleTag.exec(data);var scripts=!keepScripts&&[];if(parsed)return[context.createElement(parsed[1])];parsed=jQuery.buildFragment([data],context,scripts);if(scripts&&scripts.length)jQuery(scripts).remove();return jQuery.merge([],parsed.childNodes)};var _load=jQuery.fn.load;jQuery.fn.load=function(url,params,callback){if(typeof url!== "string"&&_load)return _load.apply(this,arguments);var response;var self=this;var off=url.indexOf(" ");if(off>=0){var selector=jQuery.trim(url.slice(off));url=url.slice(0,off)}if(jQuery.isFunction(params)){callback=params;params=undefined}else if(params&&typeof params==="object")var type="POST";if(self.length>0)jQuery.ajax({url:url,type:type,dataType:"html",data:params}).done(function(responseText){response=arguments;self.html(selector?jQuery("\x3cdiv\x3e").append(jQuery.parseHTML(responseText)).find(selector): responseText)}).complete(callback&&function(jqXHR,status){self.each(callback,response||[jqXHR.responseText,status,jqXHR])});return this};jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn)}});jQuery.expr.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length};var docElem=window$jscomp$0.document.documentElement;jQuery.offset={setOffset:function(elem, options,i){var position=jQuery.css(elem,"position");var curElem=jQuery(elem);var props={};if(position==="static")elem.style.position="relative";var curOffset=curElem.offset();var curCSSTop=jQuery.css(elem,"top");var curCSSLeft=jQuery.css(elem,"left");var calculatePosition=(position==="absolute"||position==="fixed")&&(curCSSTop+curCSSLeft).indexOf("auto")>-1;if(calculatePosition){var curPosition=curElem.position();var curTop=curPosition.top;var curLeft=curPosition.left}else{curTop=parseFloat(curCSSTop)|| 0;curLeft=parseFloat(curCSSLeft)||0}if(jQuery.isFunction(options))options=options.call(elem,i,curOffset);if(options.top!=null)props.top=options.top-curOffset.top+curTop;if(options.left!=null)props.left=options.left-curOffset.left+curLeft;if("using"in options)options.using.call(elem,props);else curElem.css(props)}};jQuery.fn.extend({offset:function(options){if(arguments.length)return options===undefined?this:this.each(function(i){jQuery.offset.setOffset(this,options,i)});var elem=this[0];var box={top:0, left:0};var doc=elem&&elem.ownerDocument;if(!doc)return;var docElem=doc.documentElement;if(!jQuery.contains(docElem,elem))return box;if(typeof elem.getBoundingClientRect!==strundefined)box=elem.getBoundingClientRect();var win=getWindow(doc);return{top:box.top+win.pageYOffset-docElem.clientTop,left:box.left+win.pageXOffset-docElem.clientLeft}},position:function(){if(!this[0])return;var elem=this[0];var parentOffset={top:0,left:0};if(jQuery.css(elem,"position")==="fixed")var offset=elem.getBoundingClientRect(); else{var offsetParent=this.offsetParent();offset=this.offset();if(!jQuery.nodeName(offsetParent[0],"html"))parentOffset=offsetParent.offset();parentOffset.top+=jQuery.css(offsetParent[0],"borderTopWidth",true);parentOffset.left+=jQuery.css(offsetParent[0],"borderLeftWidth",true)}return{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",true),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",true)}},offsetParent:function(){return this.map(function(){for(var offsetParent=this.offsetParent|| docElem;offsetParent&&(!jQuery.nodeName(offsetParent,"html")&&jQuery.css(offsetParent,"position")==="static");)offsetParent=offsetParent.offsetParent;return offsetParent||docElem})}});jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method$jscomp$0,prop){var top="pageYOffset"===prop;jQuery.fn[method$jscomp$0]=function(val$jscomp$0){return access(this,function(elem,method,val){var win=getWindow(elem);if(val===undefined)return win?win[prop]:elem[method];if(win)win.scrollTo(!top? val:window$jscomp$0.pageXOffset,top?val:window$jscomp$0.pageYOffset);else elem[method]=val},method$jscomp$0,val$jscomp$0,arguments.length,null)}});jQuery.each(["top","left"],function(i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){if(computed){computed=curCSS(elem,prop);return rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed}})});jQuery.each({Height:"height",Width:"width"},function(name,type$jscomp$0){jQuery.each({padding:"inner"+name,content:type$jscomp$0, "":"outer"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value$jscomp$0){var chainable=arguments.length&&(defaultExtra||typeof margin!=="boolean");var extra=defaultExtra||(margin===true||value$jscomp$0===true?"margin":"border");return access(this,function(elem,type,value){if(jQuery.isWindow(elem))return elem.document.documentElement["client"+name];if(elem.nodeType===9){var doc=elem.documentElement;return Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+ name],doc["offset"+name],doc["client"+name])}return value===undefined?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra)},type$jscomp$0,chainable?margin:undefined,chainable,null)}})});jQuery.fn.size=function(){return this.length};jQuery.fn.andSelf=jQuery.fn.addBack;if(typeof define==="function"&&define.amd)define("jquery",[],function(){return jQuery});var _jQuery=window$jscomp$0.jQuery;var _$=window$jscomp$0.$;jQuery.noConflict=function(deep){if(window$jscomp$0.$===jQuery)window$jscomp$0.$= _$;if(deep&&window$jscomp$0.jQuery===jQuery)window$jscomp$0.jQuery=_jQuery;return jQuery};if(typeof noGlobal===strundefined)window$jscomp$0.jQuery=window$jscomp$0.$=jQuery;return jQuery}); (function($,undefined){function focusable(element,isTabIndexNotNaN){var nodeName=element.nodeName.toLowerCase();if("area"===nodeName){var map=element.parentNode;var mapName=map.name;if(!element.href||!mapName||map.nodeName.toLowerCase()!=="map")return false;var img=$("img[usemap\x3d#"+mapName+"]")[0];return!!img&&visible(img)}return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:"a"===nodeName?element.href||isTabIndexNotNaN:isTabIndexNotNaN)&&visible(element)}function visible(element){return $.expr.filters.visible(element)&& !$(element).parents().andSelf().filter(function(){return $.css(this,"visibility")==="hidden"}).length}var uuid=0;var runiqueId=/^ui-id-\d+$/;$.ui=$.ui||{};if($.ui.version)return;$.extend($.ui,{version:"1.9.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});$.fn.extend({_focus:$.fn.focus, focus:function(delay,fn){return typeof delay==="number"?this.each(function(){var elem=this;setTimeout(function(){$(elem).focus();if(fn)fn.call(elem)},delay)}):this._focus.apply(this,arguments)},scrollParent:function(){if($.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position")))var scrollParent=this.parents().filter(function(){return/(relative|absolute|fixed)/.test($.css(this,"position"))&&/(auto|scroll)/.test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this, "overflow-x"))}).eq(0);else scrollParent=this.parents().filter(function(){return/(auto|scroll)/.test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"))}).eq(0);return/fixed/.test(this.css("position"))||!scrollParent.length?$(document):scrollParent},zIndex:function(zIndex){if(zIndex!==undefined)return this.css("zIndex",zIndex);if(this.length){var elem=$(this[0]);for(var value;elem.length&&elem[0]!==document;){var position=elem.css("position");if(position==="absolute"||position=== "relative"||position==="fixed"){value=parseInt(elem.css("zIndex"),10);if(!isNaN(value)&&value!==0)return value}elem=elem.parent()}}return 0},uniqueId:function(){return this.each(function(){if(!this.id)this.id="ui-id-"+ ++uuid})},removeUniqueId:function(){return this.each(function(){if(runiqueId.test(this.id))$(this).removeAttr("id")})}});$.extend($.expr[":"],{data:$.expr.createPseudo?$.expr.createPseudo(function(dataName){return function(elem){return!!$.data(elem,dataName)}}):function(elem,i,match){return!!$.data(elem, match[3])},focusable:function(element){return focusable(element,!isNaN($.attr(element,"tabindex")))},tabbable:function(element){var tabIndex=$.attr(element,"tabindex");var isTabIndexNaN=isNaN(tabIndex);return(isTabIndexNaN||tabIndex>=0)&&focusable(element,!isTabIndexNaN)}});$(function(){var body=document.body;var div=body.appendChild(div=document.createElement("div"));div.offsetHeight;$.extend(div.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});$.support.minHeight=div.offsetHeight=== 100;$.support.selectstart="onselectstart"in div;body.removeChild(div).style.display="none"});if(!$("\x3ca\x3e").outerWidth(1).jquery)$.each(["Width","Height"],function(i,name){function reduce(elem,size,border,margin){$.each(side,function(){size-=parseFloat($.css(elem,"padding"+this))||0;if(border)size-=parseFloat($.css(elem,"border"+this+"Width"))||0;if(margin)size-=parseFloat($.css(elem,"margin"+this))||0});return size}var side=name==="Width"?["Left","Right"]:["Top","Bottom"];var type=name.toLowerCase(); var orig={innerWidth:$.fn.innerWidth,innerHeight:$.fn.innerHeight,outerWidth:$.fn.outerWidth,outerHeight:$.fn.outerHeight};$.fn["inner"+name]=function(size){if(size===undefined)return orig["inner"+name].call(this);return this.each(function(){$(this).css(type,reduce(this,size)+"px")})};$.fn["outer"+name]=function(size,margin){if(typeof size!=="number")return orig["outer"+name].call(this,size);return this.each(function(){$(this).css(type,reduce(this,size,true,margin)+"px")})}});if($("\x3ca\x3e").data("a-b", "a").removeData("a-b").data("a-b"))$.fn.removeData=function(removeData){return function(key){if(arguments.length)return removeData.call(this,$.camelCase(key));else return removeData.call(this)}}($.fn.removeData);(function(){var uaMatch=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];$.ui.ie=uaMatch.length?true:false;$.ui.ie6=parseFloat(uaMatch[1],10)===6})();$.fn.extend({disableSelection:function(){return this.bind(($.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection", function(event){event.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});$.extend($.ui,{plugin:{add:function(module,option,set){var i;var proto=$.ui[module].prototype;for(i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]])}},call:function(instance,name,args){var i;var set=instance.plugins[name];if(!set||!instance.element[0].parentNode||instance.element[0].parentNode.nodeType===11)return;for(i=0;i<set.length;i++)if(instance.options[set[i][0]])set[i][1].apply(instance.element, args)}},contains:$.contains,hasScroll:function(el,a){if($(el).css("overflow")==="hidden")return false;var scroll=a&&a==="left"?"scrollLeft":"scrollTop";var has=false;if(el[scroll]>0)return true;el[scroll]=1;has=el[scroll]>0;el[scroll]=0;return has},isOverAxis:function(x,reference,size){return x>reference&&x<reference+size},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width)}})})(jQuery); (function($,undefined){var uuid=0;var slice=Array.prototype.slice;var _cleanData=$.cleanData;$.cleanData=function(elems){var i=0;for(var elem;(elem=elems[i])!=null;i++)try{$(elem).triggerHandler("remove")}catch(e){}_cleanData(elems)};$.widget=function(name,base,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];var fullName=namespace+"-"+name;if(!prototype){prototype=base;base=$.Widget}$.expr[":"][fullName.toLowerCase()]=function(elem){return!!$.data(elem,fullName)};$[namespace]= $[namespace]||{};var existingConstructor=$[namespace][name];var constructor=$[namespace][name]=function(options,element){if(!this._createWidget)return new constructor(options,element);if(arguments.length)this._createWidget(options,element)};$.extend(constructor,existingConstructor,{version:prototype.version,_proto:$.extend({},prototype),_childConstructors:[]});var basePrototype=new base;basePrototype.options=$.widget.extend({},basePrototype.options);$.each(prototype,function(prop,value){if($.isFunction(value))prototype[prop]= function(){var _super=function(){return base.prototype[prop].apply(this,arguments)};var _superApply=function(args){return base.prototype[prop].apply(this,args)};return function(){var __super=this._super;var __superApply=this._superApply;this._super=_super;this._superApply=_superApply;var returnValue=value.apply(this,arguments);this._super=__super;this._superApply=__superApply;return returnValue}}()});constructor.prototype=$.widget.extend(basePrototype,{widgetEventPrefix:existingConstructor?basePrototype.widgetEventPrefix: name},prototype,{constructor:constructor,namespace:namespace,widgetName:name,widgetBaseClass:fullName,widgetFullName:fullName});if(existingConstructor){$.each(existingConstructor._childConstructors,function(i,child){var childPrototype=child.prototype;$.widget(childPrototype.namespace+"."+childPrototype.widgetName,constructor,child._proto)});delete existingConstructor._childConstructors}else base._childConstructors.push(constructor);$.widget.bridge(name,constructor)};$.widget.extend=function(target){var input= slice.call(arguments,1);var inputIndex=0;var inputLength=input.length;var key;for(var value;inputIndex<inputLength;inputIndex++)for(key in input[inputIndex]){value=input[inputIndex][key];if(input[inputIndex].hasOwnProperty(key)&&value!==undefined)if($.isPlainObject(value))target[key]=$.isPlainObject(target[key])?$.widget.extend({},target[key],value):$.widget.extend({},value);else target[key]=value}return target};$.widget.bridge=function(name,object){var fullName=object.prototype.widgetFullName||name; $.fn[name]=function(options){var isMethodCall=typeof options==="string";var args=slice.call(arguments,1);var returnValue=this;options=!isMethodCall&&args.length?$.widget.extend.apply(null,[options].concat(args)):options;if(isMethodCall)this.each(function(){var instance=$.data(this,fullName);if(!instance)return $.error("cannot call methods on "+name+" prior to initialization; "+"attempted to call method '"+options+"'");if(!$.isFunction(instance[options])||options.charAt(0)==="_")return $.error("no such method '"+ options+"' for "+name+" widget instance");var methodValue=instance[options].apply(instance,args);if(methodValue!==instance&&methodValue!==undefined){returnValue=methodValue&&methodValue.jquery?returnValue.pushStack(methodValue.get()):methodValue;return false}});else this.each(function(){var instance=$.data(this,fullName);if(instance)instance.option(options||{})._init();else $.data(this,fullName,new object(options,this))});return returnValue}};$.Widget=function(){};$.Widget._childConstructors=[];$.Widget.prototype= {widgetName:"widget",widgetEventPrefix:"",defaultElement:"\x3cdiv\x3e",options:{disabled:false,create:null},_createWidget:function(options,element){element=$(element||this.defaultElement||this)[0];this.element=$(element);this.uuid=uuid++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=$.widget.extend({},this.options,this._getCreateOptions(),options);this.bindings=$();this.hoverable=$();this.focusable=$();if(element!==this){$.data(element,this.widgetName,this);$.data(element,this.widgetFullName, this);this._on(true,this.element,{remove:function(event){if(event.target===element)this.destroy()}});this.document=$(element.style?element.ownerDocument:element.document||element);this.window=$(this.document[0].defaultView||this.document[0].parentWindow)}this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:$.noop,_getCreateEventData:$.noop,_create:$.noop,_init:$.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData($.camelCase(this.widgetFullName)); this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:$.noop,widget:function(){return this.element},option:function(key,value){var options=key;var i;if(arguments.length===0)return $.widget.extend({},this.options);if(typeof key==="string"){options={};var parts=key.split(".");key= parts.shift();if(parts.length){var curOption=options[key]=$.widget.extend({},this.options[key]);for(i=0;i<parts.length-1;i++){curOption[parts[i]]=curOption[parts[i]]||{};curOption=curOption[parts[i]]}key=parts.pop();if(value===undefined)return curOption[key]===undefined?null:curOption[key];curOption[key]=value}else{if(value===undefined)return this.options[key]===undefined?null:this.options[key];options[key]=value}}this._setOptions(options);return this},_setOptions:function(options){for(var key in options)this._setOption(key, options[key]);return this},_setOption:function(key,value){this.options[key]=value;if(key==="disabled"){this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!value).attr("aria-disabled",value);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_on:function(suppressDisabledCheck,element,handlers){var instance= this;if(typeof suppressDisabledCheck!=="boolean"){handlers=element;element=suppressDisabledCheck;suppressDisabledCheck=false}if(!handlers){handlers=element;element=this.element;var delegateElement=this.widget()}else{element=delegateElement=$(element);this.bindings=this.bindings.add(element)}$.each(handlers,function(event,handler){function handlerProxy(){if(!suppressDisabledCheck&&(instance.options.disabled===true||$(this).hasClass("ui-state-disabled")))return;return(typeof handler==="string"?instance[handler]: handler).apply(instance,arguments)}if(typeof handler!=="string")handlerProxy.guid=handler.guid=handler.guid||handlerProxy.guid||$.guid++;var match=event.match(/^(\w+)\s*(.*)$/);var eventName=match[1]+instance.eventNamespace;var selector=match[2];if(selector)delegateElement.delegate(selector,eventName,handlerProxy);else element.bind(eventName,handlerProxy)})},_off:function(element,eventName){eventName=(eventName||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;element.unbind(eventName).undelegate(eventName)}, _delay:function(handler,delay){function handlerProxy(){return(typeof handler==="string"?instance[handler]:handler).apply(instance,arguments)}var instance=this;return setTimeout(handlerProxy,delay||0)},_hoverable:function(element){this.hoverable=this.hoverable.add(element);this._on(element,{mouseenter:function(event){$(event.currentTarget).addClass("ui-state-hover")},mouseleave:function(event){$(event.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(element){this.focusable=this.focusable.add(element); this._on(element,{focusin:function(event){$(event.currentTarget).addClass("ui-state-focus")},focusout:function(event){$(event.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(type,event,data){var prop;var callback=this.options[type];data=data||{};event=$.Event(event);event.type=(type===this.widgetEventPrefix?type:this.widgetEventPrefix+type).toLowerCase();event.target=this.element[0];var orig=event.originalEvent;if(orig)for(prop in orig)if(!(prop in event))event[prop]=orig[prop]; this.element.trigger(event,data);return!($.isFunction(callback)&&callback.apply(this.element[0],[event].concat(data))===false||event.isDefaultPrevented())}};$.each({show:"fadeIn",hide:"fadeOut"},function(method,defaultEffect){$.Widget.prototype["_"+method]=function(element,options,callback){if(typeof options==="string")options={effect:options};var effectName=!options?method:options===true||typeof options==="number"?defaultEffect:options.effect||defaultEffect;options=options||{};if(typeof options=== "number")options={duration:options};var hasOptions=!$.isEmptyObject(options);options.complete=callback;if(options.delay)element.delay(options.delay);if(hasOptions&&$.effects&&($.effects.effect[effectName]||$.uiBackCompat!==false&&$.effects[effectName]))element[method](options);else if(effectName!==method&&element[effectName])element[effectName](options.duration,options.easing,callback);else element.queue(function(next){$(this)[method]();if(callback)callback.call(element[0]);next()})}});if($.uiBackCompat!== false)$.Widget.prototype._getCreateOptions=function(){return $.metadata&&$.metadata.get(this.element[0])[this.widgetName]}})(jQuery); (function($,undefined){var mouseHandled=false;$(document).mouseup(function(e){mouseHandled=false});$.widget("ui.mouse",{version:"1.9.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var that=this;this.element.bind("mousedown."+this.widgetName,function(event){return that._mouseDown(event)}).bind("click."+this.widgetName,function(event){if(true===$.data(event.target,that.widgetName+".preventClickEvent")){$.removeData(event.target,that.widgetName+".preventClickEvent"); event.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);if(this._mouseMoveDelegate)$(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(event$jscomp$0){if(mouseHandled)return;this._mouseStarted&&this._mouseUp(event$jscomp$0);this._mouseDownEvent=event$jscomp$0;var that=this;var btnIsLeft=event$jscomp$0.which===1;var elIsCancel= typeof this.options.cancel==="string"&&event$jscomp$0.target.nodeName?$(event$jscomp$0.target).closest(this.options.cancel).length:false;if(!btnIsLeft||elIsCancel||!this._mouseCapture(event$jscomp$0))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){that.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(event$jscomp$0)&&this._mouseDelayMet(event$jscomp$0)){this._mouseStarted=this._mouseStart(event$jscomp$0)!==false; if(!this._mouseStarted){event$jscomp$0.preventDefault();return true}}if(true===$.data(event$jscomp$0.target,this.widgetName+".preventClickEvent"))$.removeData(event$jscomp$0.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(event){return that._mouseMove(event)};this._mouseUpDelegate=function(event){return that._mouseUp(event)};$(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);event$jscomp$0.preventDefault(); mouseHandled=true;return true},_mouseMove:function(event){if($.ui.ie&&!(document.documentMode>=9)&&!event.button)return this._mouseUp(event);if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault()}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=this._mouseStart(this._mouseDownEvent,event)!==false;this._mouseStarted?this._mouseDrag(event):this._mouseUp(event)}return!this._mouseStarted},_mouseUp:function(event){$(document).unbind("mousemove."+this.widgetName, this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(event.target===this._mouseDownEvent.target)$.data(event.target,this.widgetName+".preventClickEvent",true);this._mouseStop(event)}return false},_mouseDistanceMet:function(event){return Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance},_mouseDelayMet:function(event){return this.mouseDelayMet}, _mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true}})})(jQuery); (function($$jscomp$0,undefined){function getOffsets(offsets,width,height){return[parseInt(offsets[0],10)*(rpercent.test(offsets[0])?width/100:1),parseInt(offsets[1],10)*(rpercent.test(offsets[1])?height/100:1)]}function parseCss(element,property){return parseInt($$jscomp$0.css(element,property),10)||0}$$jscomp$0.ui=$$jscomp$0.ui||{};var cachedScrollbarWidth;var max=Math.max;var abs=Math.abs;var round=Math.round;var rhorizontal=/left|center|right/;var rvertical=/top|center|bottom/;var roffset=/[\+\-]\d+%?/; var rposition=/^\w+/;var rpercent=/%$/;var _position=$$jscomp$0.fn.position;$$jscomp$0.position={scrollbarWidth:function(){if(cachedScrollbarWidth!==undefined)return cachedScrollbarWidth;var div=$$jscomp$0("\x3cdiv style\x3d'display:block;width:50px;height:50px;overflow:hidden;'\x3e\x3cdiv style\x3d'height:100px;width:auto;'\x3e\x3c/div\x3e\x3c/div\x3e");var innerDiv=div.children()[0];$$jscomp$0("body").append(div);var w1=innerDiv.offsetWidth;div.css("overflow","scroll");var w2=innerDiv.offsetWidth; if(w1===w2)w2=div[0].clientWidth;div.remove();return cachedScrollbarWidth=w1-w2},getScrollInfo:function(within){var overflowX=within.isWindow?"":within.element.css("overflow-x");var overflowY=within.isWindow?"":within.element.css("overflow-y");var hasOverflowX=overflowX==="scroll"||overflowX==="auto"&&within.width<within.element[0].scrollWidth;var hasOverflowY=overflowY==="scroll"||overflowY==="auto"&&within.height<within.element[0].scrollHeight;return{width:hasOverflowX?$$jscomp$0.position.scrollbarWidth(): 0,height:hasOverflowY?$$jscomp$0.position.scrollbarWidth():0}},getWithinInfo:function(element){var withinElement=$$jscomp$0(element||window);var isWindow=$$jscomp$0.isWindow(withinElement[0]);return{element:withinElement,isWindow:isWindow,offset:withinElement.offset()||{left:0,top:0},scrollLeft:withinElement.scrollLeft(),scrollTop:withinElement.scrollTop(),width:isWindow?withinElement.width():withinElement.outerWidth(),height:isWindow?withinElement.height():withinElement.outerHeight()}}};$$jscomp$0.fn.position= function(options){if(!options||!options.of)return _position.apply(this,arguments);options=$$jscomp$0.extend({},options);var target=$$jscomp$0(options.of);var within=$$jscomp$0.position.getWithinInfo(options.within);var scrollInfo=$$jscomp$0.position.getScrollInfo(within);var targetElem=target[0];var collision=(options.collision||"flip").split(" ");var offsets={};if(targetElem.nodeType===9){var targetWidth=target.width();var targetHeight=target.height();var targetOffset={top:0,left:0}}else if($$jscomp$0.isWindow(targetElem)){targetWidth= target.width();targetHeight=target.height();targetOffset={top:target.scrollTop(),left:target.scrollLeft()}}else if(targetElem.preventDefault){options.at="left top";targetWidth=targetHeight=0;targetOffset={top:targetElem.pageY,left:targetElem.pageX}}else{targetWidth=target.outerWidth();targetHeight=target.outerHeight();targetOffset=target.offset()}var basePosition=$$jscomp$0.extend({},targetOffset);$$jscomp$0.each(["my","at"],function(){var pos=(options[this]||"").split(" ");if(pos.length===1)pos= rhorizontal.test(pos[0])?pos.concat(["center"]):rvertical.test(pos[0])?["center"].concat(pos):["center","center"];pos[0]=rhorizontal.test(pos[0])?pos[0]:"center";pos[1]=rvertical.test(pos[1])?pos[1]:"center";var horizontalOffset=roffset.exec(pos[0]);var verticalOffset=roffset.exec(pos[1]);offsets[this]=[horizontalOffset?horizontalOffset[0]:0,verticalOffset?verticalOffset[0]:0];options[this]=[rposition.exec(pos[0])[0],rposition.exec(pos[1])[0]]});if(collision.length===1)collision[1]=collision[0];if(options.at[0]=== "right")basePosition.left+=targetWidth;else if(options.at[0]==="center")basePosition.left+=targetWidth/2;if(options.at[1]==="bottom")basePosition.top+=targetHeight;else if(options.at[1]==="center")basePosition.top+=targetHeight/2;var atOffset=getOffsets(offsets.at,targetWidth,targetHeight);basePosition.left+=atOffset[0];basePosition.top+=atOffset[1];return this.each(function(){var elem=$$jscomp$0(this);var elemWidth=elem.outerWidth();var elemHeight=elem.outerHeight();var marginLeft=parseCss(this, "marginLeft");var marginTop=parseCss(this,"marginTop");var collisionWidth=elemWidth+marginLeft+parseCss(this,"marginRight")+scrollInfo.width;var collisionHeight=elemHeight+marginTop+parseCss(this,"marginBottom")+scrollInfo.height;var position=$$jscomp$0.extend({},basePosition);var myOffset=getOffsets(offsets.my,elem.outerWidth(),elem.outerHeight());if(options.my[0]==="right")position.left-=elemWidth;else if(options.my[0]==="center")position.left-=elemWidth/2;if(options.my[1]==="bottom")position.top-= elemHeight;else if(options.my[1]==="center")position.top-=elemHeight/2;position.left+=myOffset[0];position.top+=myOffset[1];if(!$$jscomp$0.support.offsetFractions){position.left=round(position.left);position.top=round(position.top)}var collisionPosition={marginLeft:marginLeft,marginTop:marginTop};$$jscomp$0.each(["left","top"],function(i,dir){if($$jscomp$0.ui.position[collision[i]])$$jscomp$0.ui.position[collision[i]][dir](position,{targetWidth:targetWidth,targetHeight:targetHeight,elemWidth:elemWidth, elemHeight:elemHeight,collisionPosition:collisionPosition,collisionWidth:collisionWidth,collisionHeight:collisionHeight,offset:[atOffset[0]+myOffset[0],atOffset[1]+myOffset[1]],my:options.my,at:options.at,within:within,elem:elem})});if($$jscomp$0.fn.bgiframe)elem.bgiframe();if(options.using)var using=function(props){var left=targetOffset.left-position.left;var right=left+targetWidth-elemWidth;var top=targetOffset.top-position.top;var bottom=top+targetHeight-elemHeight;var feedback={target:{element:target, left:targetOffset.left,top:targetOffset.top,width:targetWidth,height:targetHeight},element:{element:elem,left:position.left,top:position.top,width:elemWidth,height:elemHeight},horizontal:right<0?"left":left>0?"right":"center",vertical:bottom<0?"top":top>0?"bottom":"middle"};if(targetWidth<elemWidth&&abs(left+right)<targetWidth)feedback.horizontal="center";if(targetHeight<elemHeight&&abs(top+bottom)<targetHeight)feedback.vertical="middle";if(max(abs(left),abs(right))>max(abs(top),abs(bottom)))feedback.important= "horizontal";else feedback.important="vertical";options.using.call(this,props,feedback)};elem.offset($$jscomp$0.extend(position,{using:using}))})};$$jscomp$0.ui.position={fit:{left:function(position,data){var within=data.within;var withinOffset=within.isWindow?within.scrollLeft:within.offset.left;var outerWidth=within.width;var collisionPosLeft=position.left-data.collisionPosition.marginLeft;var overLeft=withinOffset-collisionPosLeft;var overRight=collisionPosLeft+data.collisionWidth-outerWidth-withinOffset; if(data.collisionWidth>outerWidth)if(overLeft>0&&overRight<=0){var newOverRight=position.left+overLeft+data.collisionWidth-outerWidth-withinOffset;position.left+=overLeft-newOverRight}else if(overRight>0&&overLeft<=0)position.left=withinOffset;else if(overLeft>overRight)position.left=withinOffset+outerWidth-data.collisionWidth;else position.left=withinOffset;else if(overLeft>0)position.left+=overLeft;else if(overRight>0)position.left-=overRight;else position.left=max(position.left-collisionPosLeft, position.left)},top:function(position,data){var within=data.within;var withinOffset=within.isWindow?within.scrollTop:within.offset.top;var outerHeight=data.within.height;var collisionPosTop=position.top-data.collisionPosition.marginTop;var overTop=withinOffset-collisionPosTop;var overBottom=collisionPosTop+data.collisionHeight-outerHeight-withinOffset;if(data.collisionHeight>outerHeight)if(overTop>0&&overBottom<=0){var newOverBottom=position.top+overTop+data.collisionHeight-outerHeight-withinOffset; position.top+=overTop-newOverBottom}else if(overBottom>0&&overTop<=0)position.top=withinOffset;else if(overTop>overBottom)position.top=withinOffset+outerHeight-data.collisionHeight;else position.top=withinOffset;else if(overTop>0)position.top+=overTop;else if(overBottom>0)position.top-=overBottom;else position.top=max(position.top-collisionPosTop,position.top)}},flip:{left:function(position,data){var within=data.within;var withinOffset=within.offset.left+within.scrollLeft;var outerWidth=within.width; var offsetLeft=within.isWindow?within.scrollLeft:within.offset.left;var collisionPosLeft=position.left-data.collisionPosition.marginLeft;var overLeft=collisionPosLeft-offsetLeft;var overRight=collisionPosLeft+data.collisionWidth-outerWidth-offsetLeft;var myOffset=data.my[0]==="left"?-data.elemWidth:data.my[0]==="right"?data.elemWidth:0;var atOffset=data.at[0]==="left"?data.targetWidth:data.at[0]==="right"?-data.targetWidth:0;var offset=-2*data.offset[0];if(overLeft<0){var newOverRight=position.left+ myOffset+atOffset+offset+data.collisionWidth-outerWidth-withinOffset;if(newOverRight<0||newOverRight<abs(overLeft))position.left+=myOffset+atOffset+offset}else if(overRight>0){var newOverLeft=position.left-data.collisionPosition.marginLeft+myOffset+atOffset+offset-offsetLeft;if(newOverLeft>0||abs(newOverLeft)<overRight)position.left+=myOffset+atOffset+offset}},top:function(position,data){var within=data.within;var withinOffset=within.offset.top+within.scrollTop;var outerHeight=within.height;var offsetTop= within.isWindow?within.scrollTop:within.offset.top;var collisionPosTop=position.top-data.collisionPosition.marginTop;var overTop=collisionPosTop-offsetTop;var overBottom=collisionPosTop+data.collisionHeight-outerHeight-offsetTop;var top=data.my[1]==="top";var myOffset=top?-data.elemHeight:data.my[1]==="bottom"?data.elemHeight:0;var atOffset=data.at[1]==="top"?data.targetHeight:data.at[1]==="bottom"?-data.targetHeight:0;var offset=-2*data.offset[1];if(overTop<0){var newOverBottom=position.top+myOffset+ atOffset+offset+data.collisionHeight-outerHeight-withinOffset;if(position.top+myOffset+atOffset+offset>overTop&&(newOverBottom<0||newOverBottom<abs(overTop)))position.top+=myOffset+atOffset+offset}else if(overBottom>0){var newOverTop=position.top-data.collisionPosition.marginTop+myOffset+atOffset+offset-offsetTop;if(position.top+myOffset+atOffset+offset>overBottom&&(newOverTop>0||abs(newOverTop)<overBottom))position.top+=myOffset+atOffset+offset}}},flipfit:{left:function(){$$jscomp$0.ui.position.flip.left.apply(this, arguments);$$jscomp$0.ui.position.fit.left.apply(this,arguments)},top:function(){$$jscomp$0.ui.position.flip.top.apply(this,arguments);$$jscomp$0.ui.position.fit.top.apply(this,arguments)}}};(function(){var i;var body=document.getElementsByTagName("body")[0];var div=document.createElement("div");var testElement=document.createElement(body?"div":"body");var testElementStyle={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};if(body)$$jscomp$0.extend(testElementStyle,{position:"absolute", left:"-1000px",top:"-1000px"});for(i in testElementStyle)testElement.style[i]=testElementStyle[i];testElement.appendChild(div);var testElementParent=body||document.documentElement;testElementParent.insertBefore(testElement,testElementParent.firstChild);div.style.cssText="position: absolute; left: 10.7432222px;";var offsetLeft=$$jscomp$0(div).offset().left;$$jscomp$0.support.offsetFractions=offsetLeft>10&&offsetLeft<11;testElement.innerHTML="";testElementParent.removeChild(testElement)})();if($$jscomp$0.uiBackCompat!== false)(function($){var _position=$.fn.position;$.fn.position=function(options){if(!options||!options.offset)return _position.call(this,options);var offset=options.offset.split(" ");var at=options.at.split(" ");if(offset.length===1)offset[1]=offset[0];if(/^\d/.test(offset[0]))offset[0]="+"+offset[0];if(/^\d/.test(offset[1]))offset[1]="+"+offset[1];if(at.length===1)if(/left|center|right/.test(at[0]))at[1]="center";else{at[1]=at[0];at[0]="center"}return _position.call(this,$.extend(options,{at:at[0]+ offset[0]+" "+at[1]+offset[1],offset:undefined}))}})(jQuery)})(jQuery); (function($,undefined){$.widget("ui.draggable",$.ui.mouse,{version:"1.9.2",widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper== "original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(this.helper||o.disabled||$(event.target).is(".ui-resizable-handle"))return false; this.handle=this._getHandle(event);if(!this.handle)return false;$(o.iframeFix===true?"iframe":o.iframeFix).each(function(){$('\x3cdiv class\x3d"ui-draggable-iframeFix" style\x3d"background: #fff;"\x3e\x3c/div\x3e').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css($(this).offset()).appendTo("body")});return true},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this.helper.addClass("ui-draggable-dragging"); this._cacheHelperProportions();if($.ui.ddmanager)$.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition= this.position=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt);if(o.containment)this._setContainment();if(this._trigger("start",event)===false){this._clear();return false}this._cacheHelperProportions();if($.ui.ddmanager&&!o.dropBehaviour)$.ui.ddmanager.prepareOffsets(this,event);this._mouseDrag(event,true);if($.ui.ddmanager)$.ui.ddmanager.dragStart(this,event);return true},_mouseDrag:function(event,noPropagation){this.position= this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation){var ui=this._uiHash();if(this._trigger("drag",event,ui)===false){this._mouseUp({});return false}this.position=ui.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";if($.ui.ddmanager)$.ui.ddmanager.drag(this,event);return false},_mouseStop:function(event){var dropped= false;if($.ui.ddmanager&&!this.options.dropBehaviour)dropped=$.ui.ddmanager.drop(this,event);if(this.dropped){dropped=this.dropped;this.dropped=false}var element=this.element[0];for(var elementInDom=false;element&&(element=element.parentNode);)if(element==document)elementInDom=true;if(!elementInDom&&this.options.helper==="original")return false;if(this.options.revert=="invalid"&&!dropped||this.options.revert=="valid"&&dropped||this.options.revert===true||$.isFunction(this.options.revert)&&this.options.revert.call(this.element, dropped)){var that=this;$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(that._trigger("stop",event)!==false)that._clear()})}else if(this._trigger("stop",event)!==false)this._clear();return false},_mouseUp:function(event){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});if($.ui.ddmanager)$.ui.ddmanager.dragStop(this,event);return $.ui.mouse.prototype._mouseUp.call(this,event)},cancel:function(){if(this.helper.is(".ui-draggable-dragging"))this._mouseUp({}); else this._clear();return this},_getHandle:function(event){var handle=!this.options.handle||!$(this.options.handle,this.element).length?true:false;$(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==event.target)handle=true});return handle},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event])):o.helper=="clone"?this.element.clone().removeAttr("id"):this.element;if(!helper.parents("body").length)helper.appendTo(o.appendTo== "parent"?this.element[0].parentNode:o.appendTo);if(helper[0]!=this.element[0]&&!/(fixed|absolute)/.test(helper.css("position")))helper.css("position","absolute");return helper},_adjustOffsetFromHelper:function(obj){if(typeof obj=="string")obj=obj.split(" ");if($.isArray(obj))obj={left:+obj[0],top:+obj[1]||0};if("left"in obj)this.offset.click.left=obj.left+this.margins.left;if("right"in obj)this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;if("top"in obj)this.offset.click.top= obj.top+this.margins.top;if("bottom"in obj)this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&$.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()== "html"&&$.ui.ie)po={top:0,left:0};return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.element.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins= {left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var o=this.options;if(o.containment=="parent")o.containment=this.helper[0].parentNode;if(o.containment=="document"||o.containment=="window")this.containment= [o.containment=="document"?0:$(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,o.containment=="document"?0:$(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(o.containment=="document"?0:$(window).scrollLeft())+$(o.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(o.containment=="document"?0:$(window).scrollTop())+($(o.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height- this.margins.top];if(!/^(document|window|parent)$/.test(o.containment)&&o.containment.constructor!=Array){var c=$(o.containment);var ce=c[0];if(!ce)return;var co=c.offset();var over=$(ce).css("overflow")!="hidden";this.containment=[(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0),(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0),(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"), 10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=c}else if(o.containment.constructor==Array)this.containment=o.containment},_convertPositionTo:function(d,pos){if(!pos)pos=this.position; var mod=d=="absolute"?1:-1;var o=this.options;var scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent;var scrollIsRootNode=/(html|body)/i.test(scroll[0].tagName);return{top:pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():scrollIsRootNode?0:scroll.scrollTop())*mod,left:pos.left+this.offset.relative.left*mod+this.offset.parent.left* mod-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod}},_generatePosition:function(event){var o=this.options;var scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent;var scrollIsRootNode=/(html|body)/i.test(scroll[0].tagName);var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(this.relative_container){var co= this.relative_container.offset();var containment=[this.containment[0]+co.left,this.containment[1]+co.top,this.containment[2]+co.left,this.containment[3]+co.top]}else containment=this.containment;if(event.pageX-this.offset.click.left<containment[0])pageX=containment[0]+this.offset.click.left;if(event.pageY-this.offset.click.top<containment[1])pageY=containment[1]+this.offset.click.top;if(event.pageX-this.offset.click.left>containment[2])pageX=containment[2]+this.offset.click.left;if(event.pageY-this.offset.click.top> containment[3])pageY=containment[3]+this.offset.click.top}if(o.grid){var top=o.grid[1]?this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY;pageY=containment?!(top-this.offset.click.top<containment[1]||top-this.offset.click.top>containment[3])?top:!(top-this.offset.click.top<containment[1])?top-o.grid[1]:top+o.grid[1]:top;var left=o.grid[0]?this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX;pageX=containment? !(left-this.offset.click.left<containment[0]||left-this.offset.click.left>containment[2])?left:!(left-this.offset.click.left<containment[0])?left-o.grid[0]:left+o.grid[0]:left}}return{top:pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():scrollIsRootNode?0:scroll.scrollTop()),left:pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft(): scrollIsRootNode?0:scroll.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval)this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(type,event,ui){ui=ui||this._uiHash();$.ui.plugin.call(this,type,[event,ui]);if(type=="drag")this.positionAbs=this._convertPositionTo("absolute");return $.Widget.prototype._trigger.call(this,type,event,ui)},plugins:{},_uiHash:function(event){return{helper:this.helper, position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});$.ui.plugin.add("draggable","connectToSortable",{start:function(event,ui){var inst=$(this).data("draggable");var o=inst.options;var uiSortable=$.extend({},ui,{item:inst.element});inst.sortables=[];$(o.connectToSortable).each(function(){var sortable=$.data(this,"sortable");if(sortable&&!sortable.options.disabled){inst.sortables.push({instance:sortable,shouldRevert:sortable.options.revert});sortable.refreshPositions(); sortable._trigger("activate",event,uiSortable)}})},stop:function(event,ui){var inst=$(this).data("draggable");var uiSortable=$.extend({},ui,{item:inst.element});$.each(inst.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;inst.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(event);this.instance.options.helper=this.instance.options._helper;if(inst.options.helper=="original")this.instance.currentItem.css({top:"auto", left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",event,uiSortable)}})},drag:function(event,ui){var inst=$(this).data("draggable");var that=this;var checkPos=function(o){var dyClick=this.offset.click.top;var dxClick=this.offset.click.left;var helperTop=this.positionAbs.top;var helperLeft=this.positionAbs.left;var itemHeight=o.height;var itemWidth=o.width;var itemTop=o.top;var itemLeft=o.left;return $.ui.isOver(helperTop+dyClick,helperLeft+dxClick,itemTop, itemLeft,itemHeight,itemWidth)};$.each(inst.sortables,function(i){var innermostIntersecting=false;var thisSortable=this;this.instance.positionAbs=inst.positionAbs;this.instance.helperProportions=inst.helperProportions;this.instance.offset.click=inst.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){innermostIntersecting=true;$.each(inst.sortables,function(){this.instance.positionAbs=inst.positionAbs;this.instance.helperProportions=inst.helperProportions;this.instance.offset.click= inst.offset.click;if(this!=thisSortable&&this.instance._intersectsWith(this.instance.containerCache)&&$.ui.contains(thisSortable.instance.element[0],this.instance.element[0]))innermostIntersecting=false;return innermostIntersecting})}if(innermostIntersecting){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=$(that).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper= function(){return ui.helper[0]};event.target=this.instance.currentItem[0];this.instance._mouseCapture(event,true);this.instance._mouseStart(event,true,true);this.instance.offset.click.top=inst.offset.click.top;this.instance.offset.click.left=inst.offset.click.left;this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top;inst._trigger("toSortable",event);inst.dropped=this.instance.element; inst.currentItem=inst.element;this.instance.fromOutside=inst}if(this.instance.currentItem)this.instance._mouseDrag(event)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",event,this.instance._uiHash(this.instance));this.instance._mouseStop(event,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder)this.instance.placeholder.remove(); inst._trigger("fromSortable",event);inst.dropped=false}})}});$.ui.plugin.add("draggable","cursor",{start:function(event,ui){var t=$("body");var o=$(this).data("draggable").options;if(t.css("cursor"))o._cursor=t.css("cursor");t.css("cursor",o.cursor)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._cursor)$("body").css("cursor",o._cursor)}});$.ui.plugin.add("draggable","opacity",{start:function(event,ui){var t=$(ui.helper);var o=$(this).data("draggable").options;if(t.css("opacity"))o._opacity= t.css("opacity");t.css("opacity",o.opacity)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._opacity)$(ui.helper).css("opacity",o._opacity)}});$.ui.plugin.add("draggable","scroll",{start:function(event,ui){var i=$(this).data("draggable");if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!="HTML")i.overflowOffset=i.scrollParent.offset()},drag:function(event,ui){var i=$(this).data("draggable");var o=i.options;var scrolled=false;if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!= "HTML"){if(!o.axis||o.axis!="x")if(i.overflowOffset.top+i.scrollParent[0].offsetHeight-event.pageY<o.scrollSensitivity)i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop+o.scrollSpeed;else if(event.pageY-i.overflowOffset.top<o.scrollSensitivity)i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop-o.scrollSpeed;if(!o.axis||o.axis!="y")if(i.overflowOffset.left+i.scrollParent[0].offsetWidth-event.pageX<o.scrollSensitivity)i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft+ o.scrollSpeed;else if(event.pageX-i.overflowOffset.left<o.scrollSensitivity)i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft-o.scrollSpeed}else{if(!o.axis||o.axis!="x")if(event.pageY-$(document).scrollTop()<o.scrollSensitivity)scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);else if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity)scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);if(!o.axis||o.axis!="y")if(event.pageX- $(document).scrollLeft()<o.scrollSensitivity)scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed);else if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity)scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed)}if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour)$.ui.ddmanager.prepareOffsets(i,event)}});$.ui.plugin.add("draggable","snap",{start:function(event,ui){var i=$(this).data("draggable");var o=i.options;i.snapElements=[];$(o.snap.constructor!= String?o.snap.items||":data(draggable)":o.snap).each(function(){var $t=$(this);var $o=$t.offset();if(this!=i.element[0])i.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left})})},drag:function(event,ui){var inst=$(this).data("draggable");var o=inst.options;var d=o.snapTolerance;var x1=ui.offset.left;var x2=x1+inst.helperProportions.width;var y1=ui.offset.top;var y2=y1+inst.helperProportions.height;for(var i=inst.snapElements.length-1;i>=0;i--){var l= inst.snapElements[i].left;var r=l+inst.snapElements[i].width;var t=inst.snapElements[i].top;var b=t+inst.snapElements[i].height;if(!(l-d<x1&&x1<r+d&&t-d<y1&&y1<b+d||l-d<x1&&x1<r+d&&t-d<y2&&y2<b+d||l-d<x2&&x2<r+d&&t-d<y1&&y1<b+d||l-d<x2&&x2<r+d&&t-d<y2&&y2<b+d)){if(inst.snapElements[i].snapping)inst.options.snap.release&&inst.options.snap.release.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item}));inst.snapElements[i].snapping=false;continue}if(o.snapMode!="inner"){var ts= Math.abs(t-y2)<=d;var bs=Math.abs(b-y1)<=d;var ls=Math.abs(l-x2)<=d;var rs=Math.abs(r-x1)<=d;if(ts)ui.position.top=inst._convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top-inst.margins.top;if(bs)ui.position.top=inst._convertPositionTo("relative",{top:b,left:0}).top-inst.margins.top;if(ls)ui.position.left=inst._convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left-inst.margins.left;if(rs)ui.position.left=inst._convertPositionTo("relative",{top:0, left:r}).left-inst.margins.left}var first=ts||bs||ls||rs;if(o.snapMode!="outer"){ts=Math.abs(t-y1)<=d;bs=Math.abs(b-y2)<=d;ls=Math.abs(l-x1)<=d;rs=Math.abs(r-x2)<=d;if(ts)ui.position.top=inst._convertPositionTo("relative",{top:t,left:0}).top-inst.margins.top;if(bs)ui.position.top=inst._convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top-inst.margins.top;if(ls)ui.position.left=inst._convertPositionTo("relative",{top:0,left:l}).left-inst.margins.left;if(rs)ui.position.left= inst._convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left-inst.margins.left}if(!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first))inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item}));inst.snapElements[i].snapping=ts||bs||ls||rs||first}}});$.ui.plugin.add("draggable","stack",{start:function(event,ui){var o=$(this).data("draggable").options;var group=$.makeArray($(o.stack)).sort(function(a, b){return(parseInt($(a).css("zIndex"),10)||0)-(parseInt($(b).css("zIndex"),10)||0)});if(!group.length)return;var min=parseInt(group[0].style.zIndex)||0;$(group).each(function(i){this.style.zIndex=min+i});this[0].style.zIndex=min+group.length}});$.ui.plugin.add("draggable","zIndex",{start:function(event,ui){var t=$(ui.helper);var o=$(this).data("draggable").options;if(t.css("zIndex"))o._zIndex=t.css("zIndex");t.css("zIndex",o.zIndex)},stop:function(event,ui){var o=$(this).data("draggable").options; if(o._zIndex)$(ui.helper).css("zIndex",o._zIndex)}})})(jQuery); (function($,undefined){$.widget("ui.droppable",{version:"1.9.2",widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var o=this.options;var accept=o.accept;this.isover=0;this.isout=1;this.accept=$.isFunction(accept)?accept:function(d){return d.is(accept)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};$.ui.ddmanager.droppables[o.scope]=$.ui.ddmanager.droppables[o.scope]|| [];$.ui.ddmanager.droppables[o.scope].push(this);o.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){var drop=$.ui.ddmanager.droppables[this.options.scope];for(var i=0;i<drop.length;i++)if(drop[i]==this)drop.splice(i,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(key,value){if(key=="accept")this.accept=$.isFunction(value)?value:function(d){return d.is(value)};$.Widget.prototype._setOption.apply(this,arguments)},_activate:function(event){var draggable= $.ui.ddmanager.current;if(this.options.activeClass)this.element.addClass(this.options.activeClass);draggable&&this._trigger("activate",event,this.ui(draggable))},_deactivate:function(event){var draggable=$.ui.ddmanager.current;if(this.options.activeClass)this.element.removeClass(this.options.activeClass);draggable&&this._trigger("deactivate",event,this.ui(draggable))},_over:function(event){var draggable=$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]==this.element[0])return; if(this.accept.call(this.element[0],draggable.currentItem||draggable.element)){if(this.options.hoverClass)this.element.addClass(this.options.hoverClass);this._trigger("over",event,this.ui(draggable))}},_out:function(event){var draggable=$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]==this.element[0])return;if(this.accept.call(this.element[0],draggable.currentItem||draggable.element)){if(this.options.hoverClass)this.element.removeClass(this.options.hoverClass); this._trigger("out",event,this.ui(draggable))}},_drop:function(event,custom){var draggable=custom||$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]==this.element[0])return false;var childrenIntersection=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var inst=$.data(this,"droppable");if(inst.options.greedy&&!inst.options.disabled&&inst.options.scope==draggable.options.scope&&inst.accept.call(inst.element[0],draggable.currentItem|| draggable.element)&&$.ui.intersect(draggable,$.extend(inst,{offset:inst.element.offset()}),inst.options.tolerance)){childrenIntersection=true;return false}});if(childrenIntersection)return false;if(this.accept.call(this.element[0],draggable.currentItem||draggable.element)){if(this.options.activeClass)this.element.removeClass(this.options.activeClass);if(this.options.hoverClass)this.element.removeClass(this.options.hoverClass);this._trigger("drop",event,this.ui(draggable));return this.element}return false}, ui:function(c){return{draggable:c.currentItem||c.element,helper:c.helper,position:c.position,offset:c.positionAbs}}});$.ui.intersect=function(draggable,droppable,toleranceMode){if(!droppable.offset)return false;var x1=(draggable.positionAbs||draggable.position.absolute).left;var x2=x1+draggable.helperProportions.width;var y1=(draggable.positionAbs||draggable.position.absolute).top;var y2=y1+draggable.helperProportions.height;var l=droppable.offset.left;var r=l+droppable.proportions.width;var t=droppable.offset.top; var b=t+droppable.proportions.height;switch(toleranceMode){case "fit":return l<=x1&&x2<=r&&t<=y1&&y2<=b;break;case "intersect":return l<x1+draggable.helperProportions.width/2&&x2-draggable.helperProportions.width/2<r&&t<y1+draggable.helperProportions.height/2&&y2-draggable.helperProportions.height/2<b;break;case "pointer":var draggableLeft=(draggable.positionAbs||draggable.position.absolute).left+(draggable.clickOffset||draggable.offset.click).left;var draggableTop=(draggable.positionAbs||draggable.position.absolute).top+ (draggable.clickOffset||draggable.offset.click).top;var isOver=$.ui.isOver(draggableTop,draggableLeft,t,l,droppable.proportions.height,droppable.proportions.width);return isOver;break;case "touch":return(y1>=t&&y1<=b||y2>=t&&y2<=b||y1<t&&y2>b)&&(x1>=l&&x1<=r||x2>=l&&x2<=r||x1<l&&x2>r);break;default:return false;break}};$.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,event){var m=$.ui.ddmanager.droppables[t.options.scope]||[];var type=event?event.type:null;var list= (t.currentItem||t.element).find(":data(droppable)").andSelf();var i=0;droppablesLoop:for(;i<m.length;i++){if(m[i].options.disabled||t&&!m[i].accept.call(m[i].element[0],t.currentItem||t.element))continue;for(var j=0;j<list.length;j++)if(list[j]==m[i].element[0]){m[i].proportions.height=0;continue droppablesLoop}m[i].visible=m[i].element.css("display")!="none";if(!m[i].visible)continue;if(type=="mousedown")m[i]._activate.call(m[i],event);m[i].offset=m[i].element.offset();m[i].proportions={width:m[i].element[0].offsetWidth, height:m[i].element[0].offsetHeight}}},drop:function(draggable,event){var dropped=false;$.each($.ui.ddmanager.droppables[draggable.options.scope]||[],function(){if(!this.options)return;if(!this.options.disabled&&this.visible&&$.ui.intersect(draggable,this,this.options.tolerance))dropped=this._drop.call(this,event)||dropped;if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],draggable.currentItem||draggable.element)){this.isout=1;this.isover=0;this._deactivate.call(this,event)}}); return dropped},dragStart:function(draggable,event){draggable.element.parentsUntil("body").bind("scroll.droppable",function(){if(!draggable.options.refreshPositions)$.ui.ddmanager.prepareOffsets(draggable,event)})},drag:function(draggable,event){if(draggable.options.refreshPositions)$.ui.ddmanager.prepareOffsets(draggable,event);$.each($.ui.ddmanager.droppables[draggable.options.scope]||[],function(){if(this.options.disabled||this.greedyChild||!this.visible)return;var intersects=$.ui.intersect(draggable, this,this.options.tolerance);var c=!intersects&&this.isover==1?"isout":intersects&&this.isover==0?"isover":null;if(!c)return;if(this.options.greedy){var scope=this.options.scope;var parent=this.element.parents(":data(droppable)").filter(function(){return $.data(this,"droppable").options.scope===scope});if(parent.length){var parentInstance=$.data(parent[0],"droppable");parentInstance.greedyChild=c=="isover"?1:0}}if(parentInstance&&c=="isover"){parentInstance["isover"]=0;parentInstance["isout"]=1;parentInstance._out.call(parentInstance, event)}this[c]=1;this[c=="isout"?"isover":"isout"]=0;this[c=="isover"?"_over":"_out"].call(this,event);if(parentInstance&&c=="isout"){parentInstance["isout"]=0;parentInstance["isover"]=1;parentInstance._over.call(parentInstance,event)}})},dragStop:function(draggable,event){draggable.element.parentsUntil("body").unbind("scroll.droppable");if(!draggable.options.refreshPositions)$.ui.ddmanager.prepareOffsets(draggable,event)}}})(jQuery); (function($,undefined){$.widget("ui.resizable",$.ui.mouse,{version:"1.9.2",widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var that=this;var o=this.options;this.element.addClass("ui-resizable");$.extend(this,{_aspectRatio:!!o.aspectRatio,aspectRatio:o.aspectRatio, originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap($('\x3cdiv class\x3d"ui-wrapper" style\x3d"overflow: hidden;"\x3e\x3c/div\x3e').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable", this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static", zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=o.handles||(!$(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var n=this.handles.split(","); this.handles={};for(var i$jscomp$0=0;i$jscomp$0<n.length;i$jscomp$0++){var handle=$.trim(n[i$jscomp$0]);var hname="ui-resizable-"+handle;var axis=$('\x3cdiv class\x3d"ui-resizable-handle '+hname+'"\x3e\x3c/div\x3e');axis.css({zIndex:o.zIndex});if("se"==handle)axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[handle]=".ui-resizable-"+handle;this.element.append(axis)}}this._renderAxis=function(target){target=target||this.element;for(var i in this.handles){if(this.handles[i].constructor== String)this.handles[i]=$(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var axis=$(this.handles[i],this.element);var padWrapper=0;padWrapper=/sw|ne|nw|se|n|s/.test(i)?axis.outerHeight():axis.outerWidth();var padPos=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");target.css(padPos,padWrapper);this._proportionallyResize()}if(!$(this.handles[i]).length)continue}}; this._renderAxis(this.element);this._handles=$(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!that.resizing){if(this.className)var axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);that.axis=axis&&axis[1]?axis[1]:"se"}});if(o.autoHide){this._handles.hide();$(this.element).addClass("ui-resizable-autohide").mouseenter(function(){if(o.disabled)return;$(this).removeClass("ui-resizable-autohide");that._handles.show()}).mouseleave(function(){if(o.disabled)return; if(!that.resizing){$(this).addClass("ui-resizable-autohide");that._handles.hide()}})}this._mouseInit()},_destroy:function(){this._mouseDestroy();var _destroy=function(exp){$(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){_destroy(this.element);var wrapper=this.element;this.originalElement.css({position:wrapper.css("position"),width:wrapper.outerWidth(), height:wrapper.outerHeight(),top:wrapper.css("top"),left:wrapper.css("left")}).insertAfter(wrapper);wrapper.remove()}this.originalElement.css("resize",this.originalResizeStyle);_destroy(this.originalElement);return this},_mouseCapture:function(event){var handle=false;for(var i in this.handles)if($(this.handles[i])[0]==event.target)handle=true;return!this.options.disabled&&handle},_mouseStart:function(event){var o=this.options;var iniPos=this.element.position();var el=this.element;this.resizing=true; this.documentScroll={top:$(document).scrollTop(),left:$(document).scrollLeft()};if(el.is(".ui-draggable")||/absolute/.test(el.css("position")))el.css({position:"absolute",top:iniPos.top,left:iniPos.left});this._renderProxy();var curleft=num(this.helper.css("left"));var curtop=num(this.helper.css("top"));if(o.containment){curleft+=$(o.containment).scrollLeft()||0;curtop+=$(o.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:curleft,top:curtop};this.size=this._helper? {width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalSize=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalPosition={left:curleft,top:curtop};this.sizeDiff={width:el.outerWidth()-el.width(),height:el.outerHeight()-el.height()};this.originalMousePosition={left:event.pageX,top:event.pageY};this.aspectRatio=typeof o.aspectRatio=="number"?o.aspectRatio:this.originalSize.width/this.originalSize.height|| 1;var cursor=$(".ui-resizable-"+this.axis).css("cursor");$("body").css("cursor",cursor=="auto"?this.axis+"-resize":cursor);el.addClass("ui-resizable-resizing");this._propagate("start",event);return true},_mouseDrag:function(event){var el=this.helper;var o=this.options;var props={};var that=this;var smp=this.originalMousePosition;var a=this.axis;var dx=event.pageX-smp.left||0;var dy=event.pageY-smp.top||0;var trigger=this._change[a];if(!trigger)return false;var data=trigger.apply(this,[event,dx,dy]); this._updateVirtualBoundaries(event.shiftKey);if(this._aspectRatio||event.shiftKey)data=this._updateRatio(data,event);data=this._respectSize(data,event);this._propagate("resize",event);el.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length)this._proportionallyResize();this._updateCache(data);this._trigger("resize",event,this.ui());return false},_mouseStop:function(event){this.resizing= false;var o=this.options;var that=this;if(this._helper){var pr=this._proportionallyResizeElements;var ista=pr.length&&/textarea/i.test(pr[0].nodeName);var soffseth=ista&&$.ui.hasScroll(pr[0],"left")?0:that.sizeDiff.height;var soffsetw=ista?0:that.sizeDiff.width;var s={width:that.helper.width()-soffsetw,height:that.helper.height()-soffseth};var left=parseInt(that.element.css("left"),10)+(that.position.left-that.originalPosition.left)||null;var top=parseInt(that.element.css("top"),10)+(that.position.top- that.originalPosition.top)||null;if(!o.animate)this.element.css($.extend(s,{top:top,left:left}));that.helper.height(that.size.height);that.helper.width(that.size.width);if(this._helper&&!o.animate)this._proportionallyResize()}$("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",event);if(this._helper)this.helper.remove();return false},_updateVirtualBoundaries:function(forceAspectRatio){var o=this.options;var b={minWidth:isNumber(o.minWidth)?o.minWidth: 0,maxWidth:isNumber(o.maxWidth)?o.maxWidth:Infinity,minHeight:isNumber(o.minHeight)?o.minHeight:0,maxHeight:isNumber(o.maxHeight)?o.maxHeight:Infinity};if(this._aspectRatio||forceAspectRatio){var pMinWidth=b.minHeight*this.aspectRatio;var pMinHeight=b.minWidth/this.aspectRatio;var pMaxWidth=b.maxHeight*this.aspectRatio;var pMaxHeight=b.maxWidth/this.aspectRatio;if(pMinWidth>b.minWidth)b.minWidth=pMinWidth;if(pMinHeight>b.minHeight)b.minHeight=pMinHeight;if(pMaxWidth<b.maxWidth)b.maxWidth=pMaxWidth; if(pMaxHeight<b.maxHeight)b.maxHeight=pMaxHeight}this._vBoundaries=b},_updateCache:function(data){var o=this.options;this.offset=this.helper.offset();if(isNumber(data.left))this.position.left=data.left;if(isNumber(data.top))this.position.top=data.top;if(isNumber(data.height))this.size.height=data.height;if(isNumber(data.width))this.size.width=data.width},_updateRatio:function(data,event){var o=this.options;var cpos=this.position;var csize=this.size;var a=this.axis;if(isNumber(data.height))data.width= data.height*this.aspectRatio;else if(isNumber(data.width))data.height=data.width/this.aspectRatio;if(a=="sw"){data.left=cpos.left+(csize.width-data.width);data.top=null}if(a=="nw"){data.top=cpos.top+(csize.height-data.height);data.left=cpos.left+(csize.width-data.width)}return data},_respectSize:function(data,event){var el=this.helper;var o=this._vBoundaries;var pRatio=this._aspectRatio||event.shiftKey;var a=this.axis;var ismaxw=isNumber(data.width)&&o.maxWidth&&o.maxWidth<data.width;var ismaxh=isNumber(data.height)&& o.maxHeight&&o.maxHeight<data.height;var isminw=isNumber(data.width)&&o.minWidth&&o.minWidth>data.width;var isminh=isNumber(data.height)&&o.minHeight&&o.minHeight>data.height;if(isminw)data.width=o.minWidth;if(isminh)data.height=o.minHeight;if(ismaxw)data.width=o.maxWidth;if(ismaxh)data.height=o.maxHeight;var dw=this.originalPosition.left+this.originalSize.width;var dh=this.position.top+this.size.height;var cw=/sw|nw|w/.test(a);var ch=/nw|ne|n/.test(a);if(isminw&&cw)data.left=dw-o.minWidth;if(ismaxw&& cw)data.left=dw-o.maxWidth;if(isminh&&ch)data.top=dh-o.minHeight;if(ismaxh&&ch)data.top=dh-o.maxHeight;var isNotwh=!data.width&&!data.height;if(isNotwh&&!data.left&&data.top)data.top=null;else if(isNotwh&&!data.top&&data.left)data.left=null;return data},_proportionallyResize:function(){var o=this.options;if(!this._proportionallyResizeElements.length)return;var element=this.helper||this.element;for(var i$jscomp$0=0;i$jscomp$0<this._proportionallyResizeElements.length;i$jscomp$0++){var prel=this._proportionallyResizeElements[i$jscomp$0]; if(!this.borderDif){var b=[prel.css("borderTopWidth"),prel.css("borderRightWidth"),prel.css("borderBottomWidth"),prel.css("borderLeftWidth")];var p=[prel.css("paddingTop"),prel.css("paddingRight"),prel.css("paddingBottom"),prel.css("paddingLeft")];this.borderDif=$.map(b,function(v,i){var border=parseInt(v,10)||0;var padding=parseInt(p[i],10)||0;return border+padding})}prel.css({height:element.height()-this.borderDif[0]-this.borderDif[2]||0,width:element.width()-this.borderDif[1]-this.borderDif[3]|| 0})}},_renderProxy:function(){var el=this.element;var o=this.options;this.elementOffset=el.offset();if(this._helper){this.helper=this.helper||$('\x3cdiv style\x3d"overflow:hidden;"\x3e\x3c/div\x3e');var ie6offset=$.ui.ie6?1:0;var pxyoffset=$.ui.ie6?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+pxyoffset,height:this.element.outerHeight()+pxyoffset,position:"absolute",left:this.elementOffset.left-ie6offset+"px",top:this.elementOffset.top-ie6offset+"px",zIndex:++o.zIndex}); this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(event,dx,dy){return{width:this.originalSize.width+dx}},w:function(event,dx,dy){var o=this.options;var cs=this.originalSize;var sp=this.originalPosition;return{left:sp.left+dx,width:cs.width-dx}},n:function(event,dx,dy){var o=this.options;var cs=this.originalSize;var sp=this.originalPosition;return{top:sp.top+dy,height:cs.height-dy}},s:function(event,dx,dy){return{height:this.originalSize.height+dy}}, se:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},sw:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))},ne:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},nw:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))}},_propagate:function(n, event){$.ui.plugin.call(this,n,[event,this.ui()]);n!="resize"&&this._trigger(n,event,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});$.ui.plugin.add("resizable","alsoResize",{start:function(event,ui){var that=$(this).data("resizable");var o=that.options;var _store=function(exp){$(exp).each(function(){var el=$(this); el.data("resizable-alsoresize",{width:parseInt(el.width(),10),height:parseInt(el.height(),10),left:parseInt(el.css("left"),10),top:parseInt(el.css("top"),10)})})};if(typeof o.alsoResize=="object"&&!o.alsoResize.parentNode)if(o.alsoResize.length){o.alsoResize=o.alsoResize[0];_store(o.alsoResize)}else $.each(o.alsoResize,function(exp){_store(exp)});else _store(o.alsoResize)},resize:function(event,ui){var that=$(this).data("resizable");var o=that.options;var os=that.originalSize;var op=that.originalPosition; var delta={height:that.size.height-os.height||0,width:that.size.width-os.width||0,top:that.position.top-op.top||0,left:that.position.left-op.left||0};var _alsoResize=function(exp,c){$(exp).each(function(){var el=$(this);var start=$(this).data("resizable-alsoresize");var style={};var css=c&&c.length?c:el.parents(ui.originalElement[0]).length?["width","height"]:["width","height","top","left"];$.each(css,function(i,prop){var sum=(start[prop]||0)+(delta[prop]||0);if(sum&&sum>=0)style[prop]=sum||null}); el.css(style)})};if(typeof o.alsoResize=="object"&&!o.alsoResize.nodeType)$.each(o.alsoResize,function(exp,c){_alsoResize(exp,c)});else _alsoResize(o.alsoResize)},stop:function(event,ui){$(this).removeData("resizable-alsoresize")}});$.ui.plugin.add("resizable","animate",{stop:function(event,ui){var that=$(this).data("resizable");var o=that.options;var pr=that._proportionallyResizeElements;var ista=pr.length&&/textarea/i.test(pr[0].nodeName);var soffseth=ista&&$.ui.hasScroll(pr[0],"left")?0:that.sizeDiff.height; var soffsetw=ista?0:that.sizeDiff.width;var style={width:that.size.width-soffsetw,height:that.size.height-soffseth};var left=parseInt(that.element.css("left"),10)+(that.position.left-that.originalPosition.left)||null;var top=parseInt(that.element.css("top"),10)+(that.position.top-that.originalPosition.top)||null;that.element.animate($.extend(style,top&&left?{top:top,left:left}:{}),{duration:o.animateDuration,easing:o.animateEasing,step:function(){var data={width:parseInt(that.element.css("width"), 10),height:parseInt(that.element.css("height"),10),top:parseInt(that.element.css("top"),10),left:parseInt(that.element.css("left"),10)};if(pr&&pr.length)$(pr[0]).css({width:data.width,height:data.height});that._updateCache(data);that._propagate("resize",event)}})}});$.ui.plugin.add("resizable","containment",{start:function(event,ui){var that=$(this).data("resizable");var o=that.options;var el=that.element;var oc=o.containment;var ce=oc instanceof $?oc.get(0):/parent/.test(oc)?el.parent().get(0):oc; if(!ce)return;that.containerElement=$(ce);if(/document/.test(oc)||oc==document){that.containerOffset={left:0,top:0};that.containerPosition={left:0,top:0};that.parentData={element:$(document),left:0,top:0,width:$(document).width(),height:$(document).height()||document.body.parentNode.scrollHeight}}else{var element=$(ce);var p=[];$(["Top","Right","Left","Bottom"]).each(function(i,name){p[i]=num(element.css("padding"+name))});that.containerOffset=element.offset();that.containerPosition=element.position(); that.containerSize={height:element.innerHeight()-p[3],width:element.innerWidth()-p[1]};var co=that.containerOffset;var ch=that.containerSize.height;var cw=that.containerSize.width;var width=$.ui.hasScroll(ce,"left")?ce.scrollWidth:cw;var height=$.ui.hasScroll(ce)?ce.scrollHeight:ch;that.parentData={element:ce,left:co.left,top:co.top,width:width,height:height}}},resize:function(event,ui){var that=$(this).data("resizable");var o=that.options;var ps=that.containerSize;var co=that.containerOffset;var cs= that.size;var cp=that.position;var pRatio=that._aspectRatio||event.shiftKey;var cop={top:0,left:0};var ce=that.containerElement;if(ce[0]!=document&&/static/.test(ce.css("position")))cop=co;if(cp.left<(that._helper?co.left:0)){that.size.width=that.size.width+(that._helper?that.position.left-co.left:that.position.left-cop.left);if(pRatio)that.size.height=that.size.width/that.aspectRatio;that.position.left=o.helper?co.left:0}if(cp.top<(that._helper?co.top:0)){that.size.height=that.size.height+(that._helper? that.position.top-co.top:that.position.top);if(pRatio)that.size.width=that.size.height*that.aspectRatio;that.position.top=that._helper?co.top:0}that.offset.left=that.parentData.left+that.position.left;that.offset.top=that.parentData.top+that.position.top;var woset=Math.abs((that._helper?that.offset.left-cop.left:that.offset.left-cop.left)+that.sizeDiff.width);var hoset=Math.abs((that._helper?that.offset.top-cop.top:that.offset.top-co.top)+that.sizeDiff.height);var isParent=that.containerElement.get(0)== that.element.parent().get(0);var isOffsetRelative=/relative|absolute/.test(that.containerElement.css("position"));if(isParent&&isOffsetRelative)woset-=that.parentData.left;if(woset+that.size.width>=that.parentData.width){that.size.width=that.parentData.width-woset;if(pRatio)that.size.height=that.size.width/that.aspectRatio}if(hoset+that.size.height>=that.parentData.height){that.size.height=that.parentData.height-hoset;if(pRatio)that.size.width=that.size.height*that.aspectRatio}},stop:function(event, ui){var that=$(this).data("resizable");var o=that.options;var cp=that.position;var co=that.containerOffset;var cop=that.containerPosition;var ce=that.containerElement;var helper=$(that.helper);var ho=helper.offset();var w=helper.outerWidth()-that.sizeDiff.width;var h=helper.outerHeight()-that.sizeDiff.height;if(that._helper&&!o.animate&&/relative/.test(ce.css("position")))$(this).css({left:ho.left-cop.left-co.left,width:w,height:h});if(that._helper&&!o.animate&&/static/.test(ce.css("position")))$(this).css({left:ho.left- cop.left-co.left,width:w,height:h})}});$.ui.plugin.add("resizable","ghost",{start:function(event,ui){var that=$(this).data("resizable");var o=that.options;var cs=that.size;that.ghost=that.originalElement.clone();that.ghost.css({opacity:.25,display:"block",position:"relative",height:cs.height,width:cs.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof o.ghost=="string"?o.ghost:"");that.ghost.appendTo(that.helper)},resize:function(event,ui){var that=$(this).data("resizable"); var o=that.options;if(that.ghost)that.ghost.css({position:"relative",height:that.size.height,width:that.size.width})},stop:function(event,ui){var that=$(this).data("resizable");var o=that.options;if(that.ghost&&that.helper)that.helper.get(0).removeChild(that.ghost.get(0))}});$.ui.plugin.add("resizable","grid",{resize:function(event,ui){var that=$(this).data("resizable");var o=that.options;var cs=that.size;var os=that.originalSize;var op=that.originalPosition;var a=that.axis;var ratio=o._aspectRatio|| event.shiftKey;o.grid=typeof o.grid=="number"?[o.grid,o.grid]:o.grid;var ox=Math.round((cs.width-os.width)/(o.grid[0]||1))*(o.grid[0]||1);var oy=Math.round((cs.height-os.height)/(o.grid[1]||1))*(o.grid[1]||1);if(/^(se|s|e)$/.test(a)){that.size.width=os.width+ox;that.size.height=os.height+oy}else if(/^(ne)$/.test(a)){that.size.width=os.width+ox;that.size.height=os.height+oy;that.position.top=op.top-oy}else if(/^(sw)$/.test(a)){that.size.width=os.width+ox;that.size.height=os.height+oy;that.position.left= op.left-ox}else{that.size.width=os.width+ox;that.size.height=os.height+oy;that.position.top=op.top-oy;that.position.left=op.left-ox}}});var num=function(v){return parseInt(v,10)||0};var isNumber=function(value){return!isNaN(parseInt(value,10))}})(jQuery); (function($,undefined){$.widget("ui.selectable",$.ui.mouse,{version:"1.9.2",options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var that=this;this.element.addClass("ui-selectable");this.dragged=false;var selectees;this.refresh=function(){selectees=$(that.options.filter,that.element[0]);selectees.addClass("ui-selectee");selectees.each(function(){var $this=$(this);var pos=$this.offset();$.data(this,"selectable-item",{element:this,$element:$this,left:pos.left, top:pos.top,right:pos.left+$this.outerWidth(),bottom:pos.top+$this.outerHeight(),startselected:false,selected:$this.hasClass("ui-selected"),selecting:$this.hasClass("ui-selecting"),unselecting:$this.hasClass("ui-unselecting")})})};this.refresh();this.selectees=selectees.addClass("ui-selectee");this._mouseInit();this.helper=$("\x3cdiv class\x3d'ui-selectable-helper'\x3e\x3c/div\x3e")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled"); this._mouseDestroy()},_mouseStart:function(event){var that=this;this.opos=[event.pageX,event.pageY];if(this.options.disabled)return;var options=this.options;this.selectees=$(options.filter,this.element[0]);this._trigger("start",event);$(options.appendTo).append(this.helper);this.helper.css({"left":event.clientX,"top":event.clientY,"width":0,"height":0});if(options.autoRefresh)this.refresh();this.selectees.filter(".ui-selected").each(function(){var selectee=$.data(this,"selectable-item");selectee.startselected= true;if(!event.metaKey&&!event.ctrlKey){selectee.$element.removeClass("ui-selected");selectee.selected=false;selectee.$element.addClass("ui-unselecting");selectee.unselecting=true;that._trigger("unselecting",event,{unselecting:selectee.element})}});$(event.target).parents().andSelf().each(function(){var selectee=$.data(this,"selectable-item");if(selectee){var doSelect=!event.metaKey&&!event.ctrlKey||!selectee.$element.hasClass("ui-selected");selectee.$element.removeClass(doSelect?"ui-unselecting": "ui-selected").addClass(doSelect?"ui-selecting":"ui-unselecting");selectee.unselecting=!doSelect;selectee.selecting=doSelect;selectee.selected=doSelect;if(doSelect)that._trigger("selecting",event,{selecting:selectee.element});else that._trigger("unselecting",event,{unselecting:selectee.element});return false}})},_mouseDrag:function(event){var that=this;this.dragged=true;if(this.options.disabled)return;var options=this.options;var x1=this.opos[0];var y1=this.opos[1];var x2=event.pageX;var y2=event.pageY; if(x1>x2){var tmp=x2;x2=x1;x1=tmp}if(y1>y2){tmp=y2;y2=y1;y1=tmp}this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1});this.selectees.each(function(){var selectee=$.data(this,"selectable-item");if(!selectee||selectee.element==that.element[0])return;var hit=false;if(options.tolerance=="touch")hit=!(selectee.left>x2||selectee.right<x1||selectee.top>y2||selectee.bottom<y1);else if(options.tolerance=="fit")hit=selectee.left>x1&&selectee.right<x2&&selectee.top>y1&&selectee.bottom<y2;if(hit){if(selectee.selected){selectee.$element.removeClass("ui-selected"); selectee.selected=false}if(selectee.unselecting){selectee.$element.removeClass("ui-unselecting");selectee.unselecting=false}if(!selectee.selecting){selectee.$element.addClass("ui-selecting");selectee.selecting=true;that._trigger("selecting",event,{selecting:selectee.element})}}else{if(selectee.selecting)if((event.metaKey||event.ctrlKey)&&selectee.startselected){selectee.$element.removeClass("ui-selecting");selectee.selecting=false;selectee.$element.addClass("ui-selected");selectee.selected=true}else{selectee.$element.removeClass("ui-selecting"); selectee.selecting=false;if(selectee.startselected){selectee.$element.addClass("ui-unselecting");selectee.unselecting=true}that._trigger("unselecting",event,{unselecting:selectee.element})}if(selectee.selected)if(!event.metaKey&&!event.ctrlKey&&!selectee.startselected){selectee.$element.removeClass("ui-selected");selectee.selected=false;selectee.$element.addClass("ui-unselecting");selectee.unselecting=true;that._trigger("unselecting",event,{unselecting:selectee.element})}}});return false},_mouseStop:function(event){var that= this;this.dragged=false;var options=this.options;$(".ui-unselecting",this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");selectee.$element.removeClass("ui-unselecting");selectee.unselecting=false;selectee.startselected=false;that._trigger("unselected",event,{unselected:selectee.element})});$(".ui-selecting",this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");selectee.$element.removeClass("ui-selecting").addClass("ui-selected");selectee.selecting=false; selectee.selected=true;selectee.startselected=true;that._trigger("selected",event,{selected:selectee.element})});this._trigger("stop",event);this.helper.remove();return false}})})(jQuery); (function($,undefined){$.widget("ui.sortable",$.ui.mouse,{version:"1.9.2",widgetEventPrefix:"sort",ready:false,options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"\x3e *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){var o= this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?o.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit();this.ready=true},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled");this._mouseDestroy();for(var i=this.items.length-1;i>=0;i--)this.items[i].item.removeData(this.widgetName+ "-item");return this},_setOption:function(key,value){if(key==="disabled"){this.options[key]=value;this.widget().toggleClass("ui-sortable-disabled",!!value)}else $.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(event,overrideHandle){var that=this;if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(event);var currentItem=null;var nodes=$(event.target).parents().each(function(){if($.data(this,that.widgetName+ "-item")==that){currentItem=$(this);return false}});if($.data(event.target,that.widgetName+"-item")==that)currentItem=$(event.target);if(!currentItem)return false;if(this.options.handle&&!overrideHandle){var validHandle=false;$(this.options.handle,currentItem).find("*").andSelf().each(function(){if(this==event.target)validHandle=true});if(!validHandle)return false}this.currentItem=currentItem;this._removeCurrentsFromItems();return true},_mouseStart:function(event,overrideHandle,noActivation){var o= this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(event);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.helper.css("position", "absolute");this.cssPosition=this.helper.css("position");this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0])this.currentItem.hide();this._createPlaceholder();if(o.containment)this._setContainment();if(o.cursor){if($("body").css("cursor"))this._storedCursor=$("body").css("cursor"); $("body").css("cursor",o.cursor)}if(o.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",o.opacity)}if(o.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",o.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",event,this._uiHash());if(!this._preserveHelperProportions)this._cacheHelperProportions(); if(!noActivation)for(var i=this.containers.length-1;i>=0;i--)this.containers[i]._trigger("activate",event,this._uiHash(this));if($.ui.ddmanager)$.ui.ddmanager.current=this;if($.ui.ddmanager&&!o.dropBehaviour)$.ui.ddmanager.prepareOffsets(this,event);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(event);return true},_mouseDrag:function(event){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs= this.positionAbs;if(this.options.scroll){var o=this.options;var scrolled=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-event.pageY<o.scrollSensitivity)this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop+o.scrollSpeed;else if(event.pageY-this.overflowOffset.top<o.scrollSensitivity)this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop-o.scrollSpeed;if(this.overflowOffset.left+ this.scrollParent[0].offsetWidth-event.pageX<o.scrollSensitivity)this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft+o.scrollSpeed;else if(event.pageX-this.overflowOffset.left<o.scrollSensitivity)this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft-o.scrollSpeed}else{if(event.pageY-$(document).scrollTop()<o.scrollSensitivity)scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);else if($(window).height()-(event.pageY-$(document).scrollTop())< o.scrollSensitivity)scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity)scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed);else if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity)scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed)}if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour)$.ui.ddmanager.prepareOffsets(this,event)}this.positionAbs=this._convertPositionTo("absolute"); if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(var i=this.items.length-1;i>=0;i--){var item=this.items[i];var itemElement=item.item[0];var intersection=this._intersectsWithPointer(item);if(!intersection)continue;if(item.instance!==this.currentContainer)continue;if(itemElement!=this.currentItem[0]&&this.placeholder[intersection==1?"next":"prev"]()[0]!=itemElement&& !$.contains(this.placeholder[0],itemElement)&&(this.options.type=="semi-dynamic"?!$.contains(this.element[0],itemElement):true)){this.direction=intersection==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(item))this._rearrange(event,item);else break;this._trigger("change",event,this._uiHash());break}}this._contactContainers(event);if($.ui.ddmanager)$.ui.ddmanager.drag(this,event);this._trigger("sort",event,this._uiHash());this.lastPositionAbs=this.positionAbs;return false}, _mouseStop:function(event,noPropagation){if(!event)return;if($.ui.ddmanager&&!this.options.dropBehaviour)$.ui.ddmanager.drop(this,event);if(this.options.revert){var that=this;var cur=this.placeholder.offset();this.reverting=true;$(this.helper).animate({left:cur.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:cur.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)}, parseInt(this.options.revert,10)||500,function(){that._clear(event)})}else this._clear(event,noPropagation);return false},cancel:function(){if(this.dragging){this._mouseUp({target:null});if(this.options.helper=="original")this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");else this.currentItem.show();for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("deactivate",null,this._uiHash(this));if(this.containers[i].containerCache.over){this.containers[i]._trigger("out", null,this._uiHash(this));this.containers[i].containerCache.over=0}}}if(this.placeholder){if(this.placeholder[0].parentNode)this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode)this.helper.remove();$.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev)$(this.domPosition.prev).after(this.currentItem);else $(this.domPosition.parent).prepend(this.currentItem)}return this}, serialize:function(o){var items=this._getItemsAsjQuery(o&&o.connected);var str=[];o=o||{};$(items).each(function(){var res=($(o.item||this).attr(o.attribute||"id")||"").match(o.expression||/(.+)[-=_](.+)/);if(res)str.push((o.key||res[1]+"[]")+"\x3d"+(o.key&&o.expression?res[1]:res[2]))});if(!str.length&&o.key)str.push(o.key+"\x3d");return str.join("\x26")},toArray:function(o){var items=this._getItemsAsjQuery(o&&o.connected);var ret=[];o=o||{};items.each(function(){ret.push($(o.item||this).attr(o.attribute|| "id")||"")});return ret},_intersectsWith:function(item){var x1=this.positionAbs.left;var x2=x1+this.helperProportions.width;var y1=this.positionAbs.top;var y2=y1+this.helperProportions.height;var l=item.left;var r=l+item.width;var t=item.top;var b=t+item.height;var dyClick=this.offset.click.top;var dxClick=this.offset.click.left;var isOverElement=y1+dyClick>t&&y1+dyClick<b&&x1+dxClick>l&&x1+dxClick<r;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!= "pointer"&&this.helperProportions[this.floating?"width":"height"]>item[this.floating?"width":"height"])return isOverElement;else return l<x1+this.helperProportions.width/2&&x2-this.helperProportions.width/2<r&&t<y1+this.helperProportions.height/2&&y2-this.helperProportions.height/2<b},_intersectsWithPointer:function(item){var isOverElementHeight=this.options.axis==="x"||$.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,item.top,item.height);var isOverElementWidth=this.options.axis==="y"|| $.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,item.left,item.width);var isOverElement=isOverElementHeight&&isOverElementWidth;var verticalDirection=this._getDragVerticalDirection();var horizontalDirection=this._getDragHorizontalDirection();if(!isOverElement)return false;return this.floating?horizontalDirection&&horizontalDirection=="right"||verticalDirection=="down"?2:1:verticalDirection&&(verticalDirection=="down"?2:1)},_intersectsWithSides:function(item){var isOverBottomHalf=$.ui.isOverAxis(this.positionAbs.top+ this.offset.click.top,item.top+item.height/2,item.height);var isOverRightHalf=$.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,item.left+item.width/2,item.width);var verticalDirection=this._getDragVerticalDirection();var horizontalDirection=this._getDragHorizontalDirection();if(this.floating&&horizontalDirection)return horizontalDirection=="right"&&isOverRightHalf||horizontalDirection=="left"&&!isOverRightHalf;else return verticalDirection&&(verticalDirection=="down"&&isOverBottomHalf|| verticalDirection=="up"&&!isOverBottomHalf)},_getDragVerticalDirection:function(){var delta=this.positionAbs.top-this.lastPositionAbs.top;return delta!=0&&(delta>0?"down":"up")},_getDragHorizontalDirection:function(){var delta=this.positionAbs.left-this.lastPositionAbs.left;return delta!=0&&(delta>0?"right":"left")},refresh:function(event){this._refreshItems(event);this.refreshPositions();return this},_connectWith:function(){var options=this.options;return options.connectWith.constructor==String? [options.connectWith]:options.connectWith},_getItemsAsjQuery:function(connected){var items=[];var queries=[];var connectWith=this._connectWith();if(connectWith&&connected)for(var i=connectWith.length-1;i>=0;i--){var cur=$(connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j],this.widgetName);if(inst&&inst!=this&&!inst.options.disabled)queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element):$(inst.options.items,inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst])}}queries.push([$.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(i=queries.length-1;i>=0;i--)queries[i][0].each(function(){items.push(this)});return $(items)},_removeCurrentsFromItems:function(){var list=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=$.grep(this.items,function(item){for(var j=0;j< list.length;j++)if(list[j]==item.item[0])return false;return true})},_refreshItems:function(event){this.items=[];this.containers=[this];var items=this.items;var queries=[[$.isFunction(this.options.items)?this.options.items.call(this.element[0],event,{item:this.currentItem}):$(this.options.items,this.element),this]];var connectWith=this._connectWith();if(connectWith&&this.ready)for(var i=connectWith.length-1;i>=0;i--){var cur=$(connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j], this.widgetName);if(inst&&inst!=this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element[0],event,{item:this.currentItem}):$(inst.options.items,inst.element),inst]);this.containers.push(inst)}}}for(i=queries.length-1;i>=0;i--){var targetData=queries[i][1];var _queries=queries[i][0];j=0;for(var queriesLength=_queries.length;j<queriesLength;j++){var item=$(_queries[j]);item.data(this.widgetName+"-item",targetData);items.push({item:item,instance:targetData, width:0,height:0,left:0,top:0})}}},refreshPositions:function(fast){if(this.offsetParent&&this.helper)this.offset.parent=this._getParentOffset();for(var i=this.items.length-1;i>=0;i--){var item=this.items[i];if(item.instance!=this.currentContainer&&this.currentContainer&&item.item[0]!=this.currentItem[0])continue;var t=this.options.toleranceElement?$(this.options.toleranceElement,item.item):item.item;if(!fast){item.width=t.outerWidth();item.height=t.outerHeight()}var p=t.offset();item.left=p.left; item.top=p.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--){p=this.containers[i].element.offset();this.containers[i].containerCache.left=p.left;this.containers[i].containerCache.top=p.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight()}return this},_createPlaceholder:function(that){that= that||this;var o=that.options;if(!o.placeholder||o.placeholder.constructor==String){var className=o.placeholder;o.placeholder={element:function(){var el=$(document.createElement(that.currentItem[0].nodeName)).addClass(className||that.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!className)el.style.visibility="hidden";return el},update:function(container,p){if(className&&!o.forcePlaceholderSize)return;if(!p.height())p.height(that.currentItem.innerHeight()- parseInt(that.currentItem.css("paddingTop")||0,10)-parseInt(that.currentItem.css("paddingBottom")||0,10));if(!p.width())p.width(that.currentItem.innerWidth()-parseInt(that.currentItem.css("paddingLeft")||0,10)-parseInt(that.currentItem.css("paddingRight")||0,10))}}}that.placeholder=$(o.placeholder.element.call(that.element,that.currentItem));that.currentItem.after(that.placeholder);o.placeholder.update(that,that.placeholder)},_contactContainers:function(event){var innermostContainer=null;var innermostIndex= null;for(var i=this.containers.length-1;i>=0;i--){if($.contains(this.currentItem[0],this.containers[i].element[0]))continue;if(this._intersectsWith(this.containers[i].containerCache)){if(innermostContainer&&$.contains(this.containers[i].element[0],innermostContainer.element[0]))continue;innermostContainer=this.containers[i];innermostIndex=i}else if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",event,this._uiHash(this));this.containers[i].containerCache.over=0}}if(!innermostContainer)return; if(this.containers.length===1){this.containers[innermostIndex]._trigger("over",event,this._uiHash(this));this.containers[innermostIndex].containerCache.over=1}else{var dist=1E4;var itemWithLeastDistance=null;var posProperty=this.containers[innermostIndex].floating?"left":"top";var sizeProperty=this.containers[innermostIndex].floating?"width":"height";var base=this.positionAbs[posProperty]+this.offset.click[posProperty];for(var j=this.items.length-1;j>=0;j--){if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0]))continue;if(this.items[j].item[0]==this.currentItem[0])continue;var cur=this.items[j].item.offset()[posProperty];var nearBottom=false;if(Math.abs(cur-base)>Math.abs(cur+this.items[j][sizeProperty]-base)){nearBottom=true;cur+=this.items[j][sizeProperty]}if(Math.abs(cur-base)<dist){dist=Math.abs(cur-base);itemWithLeastDistance=this.items[j];this.direction=nearBottom?"up":"down"}}if(!itemWithLeastDistance&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[innermostIndex]; itemWithLeastDistance?this._rearrange(event,itemWithLeastDistance,null,true):this._rearrange(event,null,this.containers[innermostIndex].element,true);this._trigger("change",event,this._uiHash());this.containers[innermostIndex]._trigger("change",event,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[innermostIndex]._trigger("over",event,this._uiHash(this));this.containers[innermostIndex].containerCache.over=1}},_createHelper:function(event){var o= this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event,this.currentItem])):o.helper=="clone"?this.currentItem.clone():this.currentItem;if(!helper.parents("body").length)$(o.appendTo!="parent"?o.appendTo:this.currentItem[0].parentNode)[0].appendChild(helper[0]);if(helper[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}; if(helper[0].style.width==""||o.forceHelperSize)helper.width(this.currentItem.width());if(helper[0].style.height==""||o.forceHelperSize)helper.height(this.currentItem.height());return helper},_adjustOffsetFromHelper:function(obj){if(typeof obj=="string")obj=obj.split(" ");if($.isArray(obj))obj={left:+obj[0],top:+obj[1]||0};if("left"in obj)this.offset.click.left=obj.left+this.margins.left;if("right"in obj)this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;if("top"in obj)this.offset.click.top= obj.top+this.margins.top;if("bottom"in obj)this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&$.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()== "html"&&$.ui.ie)po={top:0,left:0};return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.currentItem.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins= {left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var o=this.options;if(o.containment=="parent")o.containment=this.helper[0].parentNode;if(o.containment=="document"||o.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top- this.offset.parent.top,$(o.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(o.containment)){var ce=$(o.containment)[0];var co=$(o.containment).offset();var over=$(ce).css("overflow")!="hidden";this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"), 10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"), 10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(d,pos){if(!pos)pos=this.position;var mod=d=="absolute"?1:-1;var o=this.options;var scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent;var scrollIsRootNode=/(html|body)/i.test(scroll[0].tagName);return{top:pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop(): scrollIsRootNode?0:scroll.scrollTop())*mod,left:pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod}},_generatePosition:function(event){var o=this.options;var scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent;var scrollIsRootNode=/(html|body)/i.test(scroll[0].tagName);if(this.cssPosition== "relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0])pageX=this.containment[0]+this.offset.click.left;if(event.pageY-this.offset.click.top<this.containment[1])pageY=this.containment[1]+this.offset.click.top;if(event.pageX-this.offset.click.left>this.containment[2])pageX= this.containment[2]+this.offset.click.left;if(event.pageY-this.offset.click.top>this.containment[3])pageY=this.containment[3]+this.offset.click.top}if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?!(top-this.offset.click.top<this.containment[1]||top-this.offset.click.top>this.containment[3])?top:!(top-this.offset.click.top<this.containment[1])?top-o.grid[1]:top+o.grid[1]:top;var left=this.originalPageX+Math.round((pageX-this.originalPageX)/ o.grid[0])*o.grid[0];pageX=this.containment?!(left-this.offset.click.left<this.containment[0]||left-this.offset.click.left>this.containment[2])?left:!(left-this.offset.click.left<this.containment[0])?left-o.grid[0]:left+o.grid[0]:left}}return{top:pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():scrollIsRootNode?0:scroll.scrollTop()),left:pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+ (this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())}},_rearrange:function(event,i,a,hardRefresh){a?a[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?i.item[0]:i.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var counter=this.counter;this._delay(function(){if(counter==this.counter)this.refreshPositions(!hardRefresh)})},_clear:function(event$jscomp$0,noPropagation){this.reverting= false;var delayedTriggers=[];if(!this._noFinalSort&&this.currentItem.parent().length)this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var i in this._storedCSS)if(this._storedCSS[i]=="auto"||this._storedCSS[i]=="static")this._storedCSS[i]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();if(this.fromOutside&&!noPropagation)delayedTriggers.push(function(event){this._trigger("receive",event, this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!noPropagation)delayedTriggers.push(function(event){this._trigger("update",event,this._uiHash())});if(this!==this.currentContainer)if(!noPropagation){delayedTriggers.push(function(event){this._trigger("remove",event,this._uiHash())});delayedTriggers.push(function(c){return function(event){c._trigger("receive", event,this._uiHash(this))}}.call(this,this.currentContainer));delayedTriggers.push(function(c){return function(event){c._trigger("update",event,this._uiHash(this))}}.call(this,this.currentContainer))}for(i=this.containers.length-1;i>=0;i--){if(!noPropagation)delayedTriggers.push(function(c){return function(event){c._trigger("deactivate",event,this._uiHash(this))}}.call(this,this.containers[i]));if(this.containers[i].containerCache.over){delayedTriggers.push(function(c){return function(event){c._trigger("out", event,this._uiHash(this))}}.call(this,this.containers[i]));this.containers[i].containerCache.over=0}}if(this._storedCursor)$("body").css("cursor",this._storedCursor);if(this._storedOpacity)this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!noPropagation){this._trigger("beforeStop",event$jscomp$0,this._uiHash());for(i=0;i<delayedTriggers.length;i++)delayedTriggers[i].call(this, event$jscomp$0);this._trigger("stop",event$jscomp$0,this._uiHash())}this.fromOutside=false;return false}if(!noPropagation)this._trigger("beforeStop",event$jscomp$0,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0])this.helper.remove();this.helper=null;if(!noPropagation){for(i=0;i<delayedTriggers.length;i++)delayedTriggers[i].call(this,event$jscomp$0);this._trigger("stop",event$jscomp$0,this._uiHash())}this.fromOutside=false;return true}, _trigger:function(){if($.Widget.prototype._trigger.apply(this,arguments)===false)this.cancel()},_uiHash:function(_inst){var inst=_inst||this;return{helper:inst.helper,placeholder:inst.placeholder||$([]),position:inst.position,originalPosition:inst.originalPosition,offset:inst.positionAbs,item:inst.currentItem,sender:_inst?_inst.element:null}}})})(jQuery); (function($,undefined){var requestIndex=0;$.widget("ui.autocomplete",{version:"1.9.2",defaultElement:"\x3cinput\x3e",options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var suppressKeyPress;var suppressKeyPressRepeat;var suppressInput;this.isMultiLine=this._isMultiLine();this.valueMethod=this.element[this.element.is("input,textarea")? "val":"text"];this.isNewMenu=true;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off");this._on(this.element,{keydown:function(event){if(this.element.prop("readOnly")){suppressKeyPress=true;suppressInput=true;suppressKeyPressRepeat=true;return}suppressKeyPress=false;suppressInput=false;suppressKeyPressRepeat=false;var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:suppressKeyPress=true;this._move("previousPage",event);break;case keyCode.PAGE_DOWN:suppressKeyPress= true;this._move("nextPage",event);break;case keyCode.UP:suppressKeyPress=true;this._keyEvent("previous",event);break;case keyCode.DOWN:suppressKeyPress=true;this._keyEvent("next",event);break;case keyCode.ENTER:case keyCode.NUMPAD_ENTER:if(this.menu.active){suppressKeyPress=true;event.preventDefault();this.menu.select(event)}break;case keyCode.TAB:if(this.menu.active)this.menu.select(event);break;case keyCode.ESCAPE:if(this.menu.element.is(":visible")){this._value(this.term);this.close(event);event.preventDefault()}break; default:suppressKeyPressRepeat=true;this._searchTimeout(event);break}},keypress:function(event){if(suppressKeyPress){suppressKeyPress=false;event.preventDefault();return}if(suppressKeyPressRepeat)return;var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:this._move("previousPage",event);break;case keyCode.PAGE_DOWN:this._move("nextPage",event);break;case keyCode.UP:this._keyEvent("previous",event);break;case keyCode.DOWN:this._keyEvent("next",event);break}},input:function(event){if(suppressInput){suppressInput= false;event.preventDefault();return}this._searchTimeout(event)},focus:function(){this.selectedItem=null;this.previous=this._value()},blur:function(event){if(this.cancelBlur){delete this.cancelBlur;return}clearTimeout(this.searching);this.close(event);this._change(event)}});this._initSource();this.menu=$("\x3cul\x3e").addClass("ui-autocomplete").appendTo(this.document.find(this.options.appendTo||"body")[0]).menu({input:$(),role:null}).zIndex(this.element.zIndex()+1).hide().data("menu");this._on(this.menu.element, {mousedown:function(event$jscomp$0){event$jscomp$0.preventDefault();this.cancelBlur=true;this._delay(function(){delete this.cancelBlur});var menuElement=this.menu.element[0];if(!$(event$jscomp$0.target).closest(".ui-menu-item").length)this._delay(function(){var that=this;this.document.one("mousedown",function(event){if(event.target!==that.element[0]&&event.target!==menuElement&&!$.contains(menuElement,event.target))that.close()})})},menufocus:function(event,ui){if(this.isNewMenu){this.isNewMenu=false; if(event.originalEvent&&/^mouse/.test(event.originalEvent.type)){this.menu.blur();this.document.one("mousemove",function(){$(event.target).trigger(event.originalEvent)});return}}var item=ui.item.data("ui-autocomplete-item")||ui.item.data("item.autocomplete");if(false!==this._trigger("focus",event,{item:item})){if(event.originalEvent&&/^key/.test(event.originalEvent.type))this._value(item.value)}else this.liveRegion.text(item.value)},menuselect:function(event,ui){var item=ui.item.data("ui-autocomplete-item")|| ui.item.data("item.autocomplete");var previous=this.previous;if(this.element[0]!==this.document[0].activeElement){this.element.focus();this.previous=previous;this._delay(function(){this.previous=previous;this.selectedItem=item})}if(false!==this._trigger("select",event,{item:item}))this._value(item.value);this.term=this._value();this.close(event);this.selectedItem=item}});this.liveRegion=$("\x3cspan\x3e",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element); if($.fn.bgiframe)this.menu.element.bgiframe();this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching);this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete");this.menu.element.remove();this.liveRegion.remove()},_setOption:function(key,value){this._super(key,value);if(key==="source")this._initSource();if(key==="appendTo")this.menu.element.appendTo(this.document.find(value||"body")[0]);if(key==="disabled"&& value&&this.xhr)this.xhr.abort()},_isMultiLine:function(){if(this.element.is("textarea"))return true;if(this.element.is("input"))return false;return this.element.prop("isContentEditable")},_initSource:function(){var that=this;if($.isArray(this.options.source)){var array=this.options.source;this.source=function(request,response){response($.ui.autocomplete.filter(array,request.term))}}else if(typeof this.options.source==="string"){var url=this.options.source;this.source=function(request,response){if(that.xhr)that.xhr.abort(); that.xhr=$.ajax({url:url,data:request,dataType:"json",success:function(data){response(data)},error:function(){response([])}})}}else this.source=this.options.source},_searchTimeout:function(event){clearTimeout(this.searching);this.searching=this._delay(function(){if(this.term!==this._value()){this.selectedItem=null;this.search(null,event)}},this.options.delay)},search:function(value,event){value=value!=null?value:this._value();this.term=this._value();if(value.length<this.options.minLength)return this.close(event); if(this._trigger("search",event)===false)return;return this._search(value)},_search:function(value){this.pending++;this.element.addClass("ui-autocomplete-loading");this.cancelSearch=false;this.source({term:value},this._response())},_response:function(){var that=this;var index=++requestIndex;return function(content){if(index===requestIndex)that.__response(content);that.pending--;if(!that.pending)that.element.removeClass("ui-autocomplete-loading")}},__response:function(content){if(content)content=this._normalize(content); this._trigger("response",null,{content:content});if(!this.options.disabled&&content&&content.length&&!this.cancelSearch){this._suggest(content);this._trigger("open")}else this._close()},close:function(event){this.cancelSearch=true;this._close(event)},_close:function(event){if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.blur();this.isNewMenu=true;this._trigger("close",event)}},_change:function(event){if(this.previous!==this._value())this._trigger("change",event,{item:this.selectedItem})}, _normalize:function(items){if(items.length&&items[0].label&&items[0].value)return items;return $.map(items,function(item){if(typeof item==="string")return{label:item,value:item};return $.extend({label:item.label||item.value,value:item.value||item.label},item)})},_suggest:function(items){var ul=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(ul,items);this.menu.refresh();ul.show();this._resizeMenu();ul.position($.extend({of:this.element},this.options.position));if(this.options.autoFocus)this.menu.next()}, _resizeMenu:function(){var ul=this.menu.element;ul.outerWidth(Math.max(ul.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(ul,items){var that=this;$.each(items,function(index,item){that._renderItemData(ul,item)})},_renderItemData:function(ul,item){return this._renderItem(ul,item).data("ui-autocomplete-item",item)},_renderItem:function(ul,item){return $("\x3cli\x3e").append($("\x3ca\x3e").text(item.label)).appendTo(ul)},_move:function(direction,event){if(!this.menu.element.is(":visible")){this.search(null, event);return}if(this.menu.isFirstItem()&&/^previous/.test(direction)||this.menu.isLastItem()&&/^next/.test(direction)){this._value(this.term);this.menu.blur();return}this.menu[direction](event)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(keyEvent,event){if(!this.isMultiLine||this.menu.element.is(":visible")){this._move(keyEvent,event);event.preventDefault()}}});$.extend($.ui.autocomplete,{escapeRegex:function(value){return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$\x26")},filter:function(array,term){var matcher=new RegExp($.ui.autocomplete.escapeRegex(term),"i");return $.grep(array,function(value){return matcher.test(value.label||value.value||value)})}});$.widget("ui.autocomplete",$.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(amount){return amount+(amount>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(content){this._superApply(arguments);if(this.options.disabled|| this.cancelSearch)return;if(content&&content.length)var message=this.options.messages.results(content.length);else message=this.options.messages.noResults;this.liveRegion.text(message)}})})(jQuery); (function($,undefined){var lastActive;var startXPos;var startYPos;var clickDragged;var baseClasses="ui-button ui-widget ui-state-default ui-corner-all";var stateClasses="ui-state-hover ui-state-active ";var typeClasses="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only";var formResetHandler=function(){var buttons=$(this).find(":ui-button");setTimeout(function(){buttons.button("refresh")},1)};var radioGroup=function(radio){var name= radio.name;var form=radio.form;var radios=$([]);if(name)if(form)radios=$(form).find("[name\x3d'"+name+"']");else radios=$("[name\x3d'"+name+"']",radio.ownerDocument).filter(function(){return!this.form});return radios};$.widget("ui.button",{version:"1.9.2",defaultElement:"\x3cbutton\x3e",options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,formResetHandler); if(typeof this.options.disabled!=="boolean")this.options.disabled=!!this.element.prop("disabled");else this.element.prop("disabled",this.options.disabled);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var that=this;var options=this.options;var toggleButton=this.type==="checkbox"||this.type==="radio";var activeClass=!toggleButton?"ui-state-active":"";var focusClass="ui-state-focus";if(options.label===null)options.label=this.type==="input"?this.buttonElement.val():this.buttonElement.html(); this._hoverable(this.buttonElement);this.buttonElement.addClass(baseClasses).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){if(options.disabled)return;if(this===lastActive)$(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){if(options.disabled)return;$(this).removeClass(activeClass)}).bind("click"+this.eventNamespace,function(event){if(options.disabled){event.preventDefault();event.stopImmediatePropagation()}});this.element.bind("focus"+this.eventNamespace, function(){that.buttonElement.addClass(focusClass)}).bind("blur"+this.eventNamespace,function(){that.buttonElement.removeClass(focusClass)});if(toggleButton){this.element.bind("change"+this.eventNamespace,function(){if(clickDragged)return;that.refresh()});this.buttonElement.bind("mousedown"+this.eventNamespace,function(event){if(options.disabled)return;clickDragged=false;startXPos=event.pageX;startYPos=event.pageY}).bind("mouseup"+this.eventNamespace,function(event){if(options.disabled)return;if(startXPos!== event.pageX||startYPos!==event.pageY)clickDragged=true})}if(this.type==="checkbox")this.buttonElement.bind("click"+this.eventNamespace,function(){if(options.disabled||clickDragged)return false;$(this).toggleClass("ui-state-active");that.buttonElement.attr("aria-pressed",that.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click"+this.eventNamespace,function(){if(options.disabled||clickDragged)return false;$(this).addClass("ui-state-active");that.buttonElement.attr("aria-pressed", "true");var radio=that.element[0];radioGroup(radio).not(radio).map(function(){return $(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")});else{this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(options.disabled)return false;$(this).addClass("ui-state-active");lastActive=this;that.document.one("mouseup",function(){lastActive=null})}).bind("mouseup"+this.eventNamespace,function(){if(options.disabled)return false;$(this).removeClass("ui-state-active")}).bind("keydown"+ this.eventNamespace,function(event){if(options.disabled)return false;if(event.keyCode===$.ui.keyCode.SPACE||event.keyCode===$.ui.keyCode.ENTER)$(this).addClass("ui-state-active")}).bind("keyup"+this.eventNamespace,function(){$(this).removeClass("ui-state-active")});if(this.buttonElement.is("a"))this.buttonElement.keyup(function(event){if(event.keyCode===$.ui.keyCode.SPACE)$(this).click()})}this._setOption("disabled",options.disabled);this._resetButton()},_determineButtonType:function(){if(this.element.is("[type\x3dcheckbox]"))this.type= "checkbox";else if(this.element.is("[type\x3dradio]"))this.type="radio";else if(this.element.is("input"))this.type="input";else this.type="button";if(this.type==="checkbox"||this.type==="radio"){var ancestor=this.element.parents().last();var labelSelector="label[for\x3d'"+this.element.attr("id")+"']";this.buttonElement=ancestor.find(labelSelector);if(!this.buttonElement.length){ancestor=ancestor.length?ancestor.siblings():this.element.siblings();this.buttonElement=ancestor.filter(labelSelector);if(!this.buttonElement.length)this.buttonElement= ancestor.find(labelSelector)}this.element.addClass("ui-helper-hidden-accessible");var checked=this.element.is(":checked");if(checked)this.buttonElement.addClass("ui-state-active");this.buttonElement.prop("aria-pressed",checked)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass(baseClasses+" "+stateClasses+" "+typeClasses).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()); if(!this.hasTitle)this.buttonElement.removeAttr("title")},_setOption:function(key,value){this._super(key,value);if(key==="disabled"){if(value)this.element.prop("disabled",true);else this.element.prop("disabled",false);return}this._resetButton()},refresh:function(){var isDisabled=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");if(isDisabled!==this.options.disabled)this._setOption("disabled",isDisabled);if(this.type==="radio")radioGroup(this.element[0]).each(function(){if($(this).is(":checked"))$(this).button("widget").addClass("ui-state-active").attr("aria-pressed", "true");else $(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")});else if(this.type==="checkbox")if(this.element.is(":checked"))this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true");else this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false")},_resetButton:function(){if(this.type==="input"){if(this.options.label)this.element.val(this.options.label);return}var buttonElement=this.buttonElement.removeClass(typeClasses);var buttonText= $("\x3cspan\x3e\x3c/span\x3e",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(buttonElement.empty()).text();var icons=this.options.icons;var multipleIcons=icons.primary&&icons.secondary;var buttonClasses=[];if(icons.primary||icons.secondary){if(this.options.text)buttonClasses.push("ui-button-text-icon"+(multipleIcons?"s":icons.primary?"-primary":"-secondary"));if(icons.primary)buttonElement.prepend("\x3cspan class\x3d'ui-button-icon-primary ui-icon "+icons.primary+"'\x3e\x3c/span\x3e"); if(icons.secondary)buttonElement.append("\x3cspan class\x3d'ui-button-icon-secondary ui-icon "+icons.secondary+"'\x3e\x3c/span\x3e");if(!this.options.text){buttonClasses.push(multipleIcons?"ui-button-icons-only":"ui-button-icon-only");if(!this.hasTitle)buttonElement.attr("title",$.trim(buttonText))}}else buttonClasses.push("ui-button-text-only");buttonElement.addClass(buttonClasses.join(" "))}});$.widget("ui.buttonset",{version:"1.9.2",options:{items:"button, input[type\x3dbutton], input[type\x3dsubmit], input[type\x3dreset], input[type\x3dcheckbox], input[type\x3dradio], a, :data(button)"}, _create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(key,value){if(key==="disabled")this.buttons.button("option",key,value);this._super(key,value)},refresh:function(){var rtl=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return $(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(rtl? "ui-corner-right":"ui-corner-left").end().filter(":last").addClass(rtl?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return $(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery); (function($,undefined){function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day"; this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri", "Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week, shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false,disabled:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=bindHover($('\x3cdiv id\x3d"'+this._mainDivId+'" class\x3d"ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"\x3e\x3c/div\x3e'))} function bindHover(dpDiv){var selector="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return dpDiv.delegate(selector,"mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1)$(this).removeClass("ui-datepicker-prev-hover");if(this.className.indexOf("ui-datepicker-next")!=-1)$(this).removeClass("ui-datepicker-next-hover")}).delegate(selector,"mouseover",function(){if(!$.datepicker._isDisabledDatepicker(instActive.inline? dpDiv.parent()[0]:instActive.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1)$(this).addClass("ui-datepicker-prev-hover");if(this.className.indexOf("ui-datepicker-next")!=-1)$(this).addClass("ui-datepicker-next-hover")}})}function extendRemove(target,props){$.extend(target,props);for(var name in props)if(props[name]==null||props[name]==undefined)target[name]=props[name]; return target}$.extend($.ui,{datepicker:{version:"1.9.2"}});var PROP_NAME="datepicker";var dpuuid=(new Date).getTime();var instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){if(this.debug)console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue= target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=nodeName=="div"||nodeName=="span";if(!target.id){this.uuid+=1;target.id="dp"+this.uuid}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input")this._connectDatepicker(target,inst);else if(inline)this._inlineDatepicker(target, inst)},_newInst:function(target,inline){var id=target[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:!inline?this.dpDiv:bindHover($('\x3cdiv class\x3d"'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"\x3e\x3c/div\x3e'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName))return; this._attachments(input,inst);input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});this._autoSize(inst);$.data(target,PROP_NAME,inst);if(inst.settings.disabled)this._disableDatepicker(target)},_attachments:function(input,inst){var appendText=this._get(inst,"appendText");var isRTL=this._get(inst, "isRTL");if(inst.append)inst.append.remove();if(appendText){inst.append=$('\x3cspan class\x3d"'+this._appendClass+'"\x3e'+appendText+"\x3c/span\x3e");input[isRTL?"before":"after"](inst.append)}input.unbind("focus",this._showDatepicker);if(inst.trigger)inst.trigger.remove();var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both")input.focus(this._showDatepicker);if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage"); inst.trigger=$(this._get(inst,"buttonImageOnly")?$("\x3cimg/\x3e").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('\x3cbutton type\x3d"button"\x3e\x3c/button\x3e').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("\x3cimg/\x3e").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==input[0])$.datepicker._hideDatepicker(); else if($.datepicker._datepickerShowing&&$.datepicker._lastInput!=input[0]){$.datepicker._hideDatepicker();$.datepicker._showDatepicker(input[0])}else $.datepicker._showDatepicker(input[0]);return false})}},_autoSize:function(inst){if(this._get(inst,"autoSize")&&!inst.inline){var date=new Date(2009,12-1,20);var dateFormat=this._get(inst,"dateFormat");if(dateFormat.match(/[DM]/)){var findMax=function(names){var max=0;var maxI=0;for(var i=0;i<names.length;i++)if(names[i].length>max){max=names[i].length; maxI=i}return maxI};date.setMonth(findMax(this._get(inst,dateFormat.match(/MM/)?"monthNames":"monthNamesShort")));date.setDate(findMax(this._get(inst,dateFormat.match(/DD/)?"dayNames":"dayNamesShort"))+20-date.getDay())}inst.input.attr("size",this._formatDate(inst,date).length)}},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName))return;divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]= value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst),true);this._updateDatepicker(inst);this._updateAlternate(inst);if(inst.settings.disabled)this._disableDatepicker(target);inst.dpDiv.css("display","block")},_dialogDatepicker:function(input,date,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){this.uuid+=1;var id="dp"+this.uuid;this._dialogInput=$('\x3cinput type\x3d"text" id\x3d"'+ id+'" style\x3d"position: absolute; top: -100px; width: 0px;"/\x3e');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});date=date&&date.constructor==Date?this._formatDate(inst,date):date;this._dialogInput.val(date);this._pos=pos?pos.length?pos:[pos.pageX,pos.pageY]:null;if(!this._pos){var browserWidth=document.documentElement.clientWidth; var browserHeight=document.documentElement.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[browserWidth/2-100+scrollX,browserHeight/2-150+scrollY]}this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI)$.blockUI(this.dpDiv); $.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName))return;var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup", this._doKeyUp)}else if(nodeName=="div"||nodeName=="span")$target.removeClass(this.markerClassName).empty()},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName))return;var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(nodeName=="div"||nodeName=="span"){var inline= $target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled");inline.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",false)}this._disabledInputs=$.map(this._disabledInputs,function(value){return value==target?null:value})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName))return;var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled= true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled");inline.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",true)}this._disabledInputs=$.map(this._disabledInputs,function(value){return value==target?null:value});this._disabledInputs[this._disabledInputs.length]= target},_isDisabledDatepicker:function(target){if(!target)return false;for(var i=0;i<this._disabledInputs.length;i++)if(this._disabledInputs[i]==target)return true;return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string")return name=="defaults"?$.extend({},$.datepicker._defaults):inst?name=="all"? $.extend({},inst.settings):this._get(inst,name):null;var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst)this._hideDatepicker();var date=this._getDateDatepicker(target,true);var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");extendRemove(inst.settings,settings);if(minDate!==null&&settings["dateFormat"]!==undefined&&settings["minDate"]===undefined)inst.settings.minDate=this._formatDate(inst,minDate);if(maxDate!== null&&settings["dateFormat"]!==undefined&&settings["maxDate"]===undefined)inst.settings.maxDate=this._formatDate(inst,maxDate);this._attachments($(target),inst);this._autoSize(inst);this._setDate(inst,date);this._updateAlternate(inst);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst)this._updateDatepicker(inst)},_setDateDatepicker:function(target,date){var inst= this._getInst(target);if(inst){this._setDate(inst,date);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target,noDefault){var inst=this._getInst(target);if(inst&&!inst.inline)this._setDateFromField(inst,noDefault);return inst?this._getDate(inst):null},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing)switch(event.keyCode){case 9:$.datepicker._hideDatepicker(); handled=false;break;case 13:var sel=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",inst.dpDiv);if(sel[0])$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0]);var onSelect=$.datepicker._get(inst,"onSelect");if(onSelect){var dateStr=$.datepicker._formatDate(inst);onSelect.apply(inst.input?inst.input[0]:null,[dateStr,inst])}else $.datepicker._hideDatepicker();return false;break;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(event.target, event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(event.target,event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths"),"M");break;case 35:if(event.ctrlKey||event.metaKey)$.datepicker._clearDate(event.target);handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey)$.datepicker._gotoToday(event.target);handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey|| event.metaKey)$.datepicker._adjustDate(event.target,isRTL?+1:-1,"D");handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey)$.datepicker._adjustDate(event.target,event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths"),"M");break;case 38:if(event.ctrlKey||event.metaKey)$.datepicker._adjustDate(event.target,-7,"D");handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey)$.datepicker._adjustDate(event.target,isRTL?-1:+1,"D"); handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey)$.datepicker._adjustDate(event.target,event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths"),"M");break;case 40:if(event.ctrlKey||event.metaKey)$.datepicker._adjustDate(event.target,+7,"D");handled=event.ctrlKey||event.metaKey;break;default:handled=false}else if(event.keyCode==36&&event.ctrlKey)$.datepicker._showDatepicker(this);else handled=false;if(handled){event.preventDefault();event.stopPropagation()}}, _doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||event.metaKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_doKeyUp:function(event){var inst=$.datepicker._getInst(event.target);if(inst.input.val()!=inst.lastVal)try{var date=$.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),inst.input?inst.input.val():null,$.datepicker._getFormatConfig(inst));if(date){$.datepicker._setDateFromField(inst);$.datepicker._updateAlternate(inst);$.datepicker._updateDatepicker(inst)}}catch(err){$.datepicker.log(err)}return true},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input")input=$("input",input.parentNode)[0];if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input)return;var inst=$.datepicker._getInst(input); if($.datepicker._curInst&&$.datepicker._curInst!=inst){$.datepicker._curInst.dpDiv.stop(true,true);if(inst&&$.datepicker._datepickerShowing)$.datepicker._hideDatepicker($.datepicker._curInst.input[0])}var beforeShow=$.datepicker._get(inst,"beforeShow");var beforeShowSettings=beforeShow?beforeShow.apply(input,[input,inst]):{};if(beforeShowSettings===false)return;extendRemove(inst.settings,beforeShowSettings);inst.lastVal=null;$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog)input.value= "";if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return!isFixed});var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.dpDiv.empty();inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:$.datepicker._inDialog&& $.blockUI?"static":isFixed?"fixed":"absolute",display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim");var duration=$.datepicker._get(inst,"duration");var postProcess=function(){var cover=inst.dpDiv.find("iframe.ui-datepicker-cover");if(!!cover.length){var borders=$.datepicker._getBorders(inst.dpDiv);cover.css({left:-borders[0],top:-borders[1],width:inst.dpDiv.outerWidth(),height:inst.dpDiv.outerHeight()})}};inst.dpDiv.zIndex($(input).zIndex()+ 1);$.datepicker._datepickerShowing=true;if($.effects&&($.effects.effect[showAnim]||$.effects[showAnim]))inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess);else inst.dpDiv[showAnim||"show"](showAnim?duration:null,postProcess);if(!showAnim||!duration)postProcess();if(inst.input.is(":visible")&&!inst.input.is(":disabled"))inst.input.focus();$.datepicker._curInst=inst}},_updateDatepicker:function(inst){this.maxRows=4;var borders=$.datepicker._getBorders(inst.dpDiv);instActive= inst;inst.dpDiv.empty().append(this._generateHTML(inst));this._attachHandlers(inst);var cover=inst.dpDiv.find("iframe.ui-datepicker-cover");if(!!cover.length)cover.css({left:-borders[0],top:-borders[1],width:inst.dpDiv.outerWidth(),height:inst.dpDiv.outerHeight()});inst.dpDiv.find("."+this._dayOverClass+" a").mouseover();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""); if(cols>1)inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",width*cols+"em");inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst==$.datepicker._curInst&&$.datepicker._datepickerShowing&&inst.input&&inst.input.is(":visible")&&!inst.input.is(":disabled")&&inst.input[0]!=document.activeElement)inst.input.focus();if(inst.yearshtml){var origyearshtml=inst.yearshtml; setTimeout(function(){if(origyearshtml===inst.yearshtml&&inst.yearshtml)inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml);origyearshtml=inst.yearshtml=null},0)}},_getBorders:function(elem){var convert=function(value){return{thin:1,medium:2,thick:3}[value]||value};return[parseFloat(convert(elem.css("border-left-width"))),parseFloat(convert(elem.css("border-top-width")))]},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight(); var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=document.documentElement.clientWidth+(isFixed?0:$(document).scrollLeft());var viewHeight=document.documentElement.clientHeight+(isFixed?0:$(document).scrollTop());offset.left-=this._get(inst,"isRTL")?dpWidth-inputWidth:0;offset.left-=isFixed&&offset.left==inst.input.offset().left?$(document).scrollLeft():0;offset.top-=isFixed&&offset.top==inst.input.offset().top+inputHeight?$(document).scrollTop(): 0;offset.left-=Math.min(offset.left,offset.left+dpWidth>viewWidth&&viewWidth>dpWidth?Math.abs(offset.left+dpWidth-viewWidth):0);offset.top-=Math.min(offset.top,offset.top+dpHeight>viewHeight&&viewHeight>dpHeight?Math.abs(dpHeight+inputHeight):0);return offset},_findPos:function(obj){var inst=this._getInst(obj);for(var isRTL=this._get(inst,"isRTL");obj&&(obj.type=="hidden"||obj.nodeType!=1||$.expr.filters.hidden(obj));)obj=obj[isRTL?"previousSibling":"nextSibling"];var position=$(obj).offset();return[position.left, position.top]},_hideDatepicker:function(input){var inst=this._curInst;if(!inst||input&&inst!=$.data(input,PROP_NAME))return;if(this._datepickerShowing){var showAnim=this._get(inst,"showAnim");var duration=this._get(inst,"duration");var postProcess=function(){$.datepicker._tidyDialog(inst)};if($.effects&&($.effects.effect[showAnim]||$.effects[showAnim]))inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess);else inst.dpDiv[showAnim=="slideDown"?"slideUp":showAnim=="fadeIn"? "fadeOut":"hide"](showAnim?duration:null,postProcess);if(!showAnim)postProcess();this._datepickerShowing=false;var onClose=this._get(inst,"onClose");if(onClose)onClose.apply(inst.input?inst.input[0]:null,[inst.input?inst.input.val():"",inst]);this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")}, _checkExternalClick:function(event){if(!$.datepicker._curInst)return;var $target=$(event.target);var inst=$.datepicker._getInst($target[0]);if($target[0].id!=$.datepicker._mainDivId&&$target.parents("#"+$.datepicker._mainDivId).length==0&&!$target.hasClass($.datepicker.markerClassName)&&!$target.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)||$target.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=inst)$.datepicker._hideDatepicker()}, _adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0]))return;this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear= inst.currentYear}else{var date=new Date;inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)}, _selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0]))return;var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);this._selectDate(target, "")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=dateStr!=null?dateStr:this._formatDate(inst);if(inst.input)inst.input.val(dateStr);this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect)onSelect.apply(inst.input?inst.input[0]:null,[dateStr,inst]);else if(inst.input)inst.input.trigger("change");if(inst.inline)this._updateDatepicker(inst);else{this._hideDatepicker();this._lastInput=inst.input[0];if(typeof inst.input[0]!="object")inst.input.focus(); this._lastInput=null}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);var dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[day>0&&day<6,""]},iso8601Week:function(date){var checkDate=new Date(date.getTime());checkDate.setDate(checkDate.getDate()+ 4-(checkDate.getDay()||7));var time=checkDate.getTime();checkDate.setMonth(0);checkDate.setDate(1);return Math.floor(Math.round((time-checkDate)/864E5)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null)throw"Invalid arguments";value=typeof value=="object"?value.toString():value+"";if(value=="")return null;var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;shortYearCutoff=typeof shortYearCutoff!="string"?shortYearCutoff:(new Date).getFullYear()% 100+parseInt(shortYearCutoff,10);var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=iFormat+1<format.length&&format.charAt(iFormat+ 1)==match;if(matches)iFormat++;return matches};var getNumber=function(match){var isDoubled=lookAhead(match);var size=match=="@"?14:match=="!"?20:match=="y"&&isDoubled?4:match=="o"?3:2;var digits=new RegExp("^\\d{1,"+size+"}");var num=value.substring(iValue).match(digits);if(!num)throw"Missing number at position "+iValue;iValue+=num[0].length;return parseInt(num[0],10)};var getName=function(match,shortNames,longNames){var names=$.map(lookAhead(match)?longNames:shortNames,function(v,k){return[[k,v]]}).sort(function(a, b){return-(a[1].length-b[1].length)});var index=-1;$.each(names,function(i,pair){var name=pair[1];if(value.substr(iValue,name.length).toLowerCase()==name.toLowerCase()){index=pair[0];iValue+=name.length;return false}});if(index!=-1)return index+1;else throw"Unknown name at position "+iValue;};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat))throw"Unexpected literal at position "+iValue;iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++)if(literal)if(format.charAt(iFormat)== "'"&&!lookAhead("'"))literal=false;else checkLiteral();else switch(format.charAt(iFormat)){case "d":day=getNumber("d");break;case "D":getName("D",dayNamesShort,dayNames);break;case "o":doy=getNumber("o");break;case "m":month=getNumber("m");break;case "M":month=getName("M",monthNamesShort,monthNames);break;case "y":year=getNumber("y");break;case "@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case "!":date=new Date((getNumber("!")-this._ticksTo1970)/ 1E4);year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case "'":if(lookAhead("'"))checkLiteral();else literal=true;break;default:checkLiteral()}if(iValue<value.length){var extra=value.substr(iValue);if(!/^\s+/.test(extra))throw"Extra/unparsed characters found in date: "+extra;}if(year==-1)year=(new Date).getFullYear();else if(year<100)year+=(new Date).getFullYear()-(new Date).getFullYear()%100+(year<=shortYearCutoff?0:-100);if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year, month-1);if(day<=dim)break;month++;day-=dim}while(true)}date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day)throw"Invalid date";return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+ Math.floor(1970/400))*24*60*60*1E7,formatDate:function(format,date,settings){if(!date)return"";var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=iFormat+1<format.length&&format.charAt(iFormat+ 1)==match;if(matches)iFormat++;return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match))for(;num.length<len;)num="0"+num;return num};var formatName=function(match,value,shortNames,longNames){return lookAhead(match)?longNames[value]:shortNames[value]};var output="";var literal=false;if(date)for(var iFormat=0;iFormat<format.length;iFormat++)if(literal)if(format.charAt(iFormat)=="'"&&!lookAhead("'"))literal=false;else output+=format.charAt(iFormat);else switch(format.charAt(iFormat)){case "d":output+= formatNumber("d",date.getDate(),2);break;case "D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case "o":output+=formatNumber("o",Math.round(((new Date(date.getFullYear(),date.getMonth(),date.getDate())).getTime()-(new Date(date.getFullYear(),0,0)).getTime())/864E5),3);break;case "m":output+=formatNumber("m",date.getMonth()+1,2);break;case "M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case "y":output+=lookAhead("y")?date.getFullYear():(date.getYear()% 100<10?"0":"")+date.getYear()%100;break;case "@":output+=date.getTime();break;case "!":output+=date.getTime()*1E4+this._ticksTo1970;break;case "'":if(lookAhead("'"))output+="'";else literal=true;break;default:output+=format.charAt(iFormat)}return output},_possibleChars:function(format){var chars="";var literal=false;var lookAhead=function(match){var matches=iFormat+1<format.length&&format.charAt(iFormat+1)==match;if(matches)iFormat++;return matches};for(var iFormat=0;iFormat<format.length;iFormat++)if(literal)if(format.charAt(iFormat)== "'"&&!lookAhead("'"))literal=false;else chars+=format.charAt(iFormat);else switch(format.charAt(iFormat)){case "d":case "m":case "y":case "@":chars+="0123456789";break;case "D":case "M":return null;case "'":if(lookAhead("'"))chars+="'";else literal=true;break;default:chars+=format.charAt(iFormat)}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst,noDefault){if(inst.input.val()==inst.lastVal)return; var dateFormat=this._get(inst,"dateFormat");var dates=inst.lastVal=inst.input?inst.input.val():null;var defaultDate;var date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);dates=noDefault?"":dates}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=dates?date.getDate():0;inst.currentMonth= dates?date.getMonth():0;inst.currentYear=dates?date.getFullYear():0;this._adjustInstDate(inst)},_getDefaultDate:function(inst){return this._restrictMinMax(inst,this._determineDate(inst,this._get(inst,"defaultDate"),new Date))},_determineDate:function(inst,date$jscomp$0,defaultDate){var offsetNumeric=function(offset){var date=new Date;date.setDate(date.getDate()+offset);return date};var offsetString=function(offset){try{return $.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),offset,$.datepicker._getFormatConfig(inst))}catch(e){}var date= (offset.toLowerCase().match(/^c/)?$.datepicker._getDate(inst):null)||new Date;var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;for(var matches=pattern.exec(offset);matches;){switch(matches[2]||"d"){case "d":case "D":day+=parseInt(matches[1],10);break;case "w":case "W":day+=parseInt(matches[1],10)*7;break;case "m":case "M":month+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break;case "y":case "Y":year+= parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};var newDate=date$jscomp$0==null||date$jscomp$0===""?defaultDate:typeof date$jscomp$0=="string"?offsetString(date$jscomp$0):typeof date$jscomp$0=="number"?isNaN(date$jscomp$0)?defaultDate:offsetNumeric(date$jscomp$0):new Date(date$jscomp$0.getTime());newDate=newDate&&newDate.toString()=="Invalid Date"?defaultDate:newDate;if(newDate){newDate.setHours(0); newDate.setMinutes(0);newDate.setSeconds(0);newDate.setMilliseconds(0)}return this._daylightSavingAdjust(newDate)},_daylightSavingAdjust:function(date){if(!date)return null;date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,noChange){var clear=!date;var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;var newDate=this._restrictMinMax(inst,this._determineDate(inst,date,new Date));inst.selectedDay=inst.currentDay=newDate.getDate();inst.drawMonth= inst.selectedMonth=inst.currentMonth=newDate.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=newDate.getFullYear();if((origMonth!=inst.selectedMonth||origYear!=inst.selectedYear)&&!noChange)this._notifyChange(inst);this._adjustInstDate(inst);if(inst.input)inst.input.val(clear?"":this._formatDate(inst))},_getDate:function(inst){var startDate=!inst.currentYear||inst.input&&inst.input.val()==""?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)); return startDate},_attachHandlers:function(inst){var stepMonths=this._get(inst,"stepMonths");var id="#"+inst.id.replace(/\\\\/g,"\\");inst.dpDiv.find("[data-handler]").map(function(){var handler={prev:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(id,-stepMonths,"M")},next:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(id,+stepMonths,"M")},hide:function(){window["DP_jQuery_"+dpuuid].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+dpuuid].datepicker._gotoToday(id)}, selectDay:function(){window["DP_jQuery_"+dpuuid].datepicker._selectDay(id,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this);return false},selectMonth:function(){window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(id,this,"M");return false},selectYear:function(){window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(id,this,"Y");return false}};$(this).bind(this.getAttribute("data-event"),handler[this.getAttribute("data-handler")])})},_generateHTML:function(inst){var today= new Date;today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var isMultiMonth=numMonths[0]!=1||numMonths[1]!= 1;var currentDate=this._daylightSavingAdjust(!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay));var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[0]*numMonths[1]+1,maxDate.getDate()));for(maxDraw= minDate&&maxDraw<minDate?minDate:maxDraw;this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw;){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst));var prev=this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'\x3ca class\x3d"ui-datepicker-prev ui-corner-all" data-handler\x3d"prev" data-event\x3d"click"'+ ' title\x3d"'+prevText+'"\x3e\x3cspan class\x3d"ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'"\x3e'+prevText+"\x3c/span\x3e\x3c/a\x3e":hideIfNoPrevNext?"":'\x3ca class\x3d"ui-datepicker-prev ui-corner-all ui-state-disabled" title\x3d"'+prevText+'"\x3e\x3cspan class\x3d"ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'"\x3e'+prevText+"\x3c/span\x3e\x3c/a\x3e";var nextText=this._get(inst,"nextText");nextText=!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear, drawMonth+stepMonths,1)),this._getFormatConfig(inst));var next=this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'\x3ca class\x3d"ui-datepicker-next ui-corner-all" data-handler\x3d"next" data-event\x3d"click"'+' title\x3d"'+nextText+'"\x3e\x3cspan class\x3d"ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'"\x3e'+nextText+"\x3c/span\x3e\x3c/a\x3e":hideIfNoPrevNext?"":'\x3ca class\x3d"ui-datepicker-next ui-corner-all ui-state-disabled" title\x3d"'+nextText+'"\x3e\x3cspan class\x3d"ui-icon ui-icon-circle-triangle-'+ (isRTL?"w":"e")+'"\x3e'+nextText+"\x3c/span\x3e\x3c/a\x3e";var currentText=this._get(inst,"currentText");var gotoDate=this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today;currentText=!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst));var controls=!inst.inline?'\x3cbutton type\x3d"button" class\x3d"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler\x3d"hide" data-event\x3d"click"\x3e'+this._get(inst,"closeText")+ "\x3c/button\x3e":"";var buttonPanel=showButtonPanel?'\x3cdiv class\x3d"ui-datepicker-buttonpane ui-widget-content"\x3e'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'\x3cbutton type\x3d"button" class\x3d"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler\x3d"today" data-event\x3d"click"'+"\x3e"+currentText+"\x3c/button\x3e":"")+(isRTL?"":controls)+"\x3c/div\x3e":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=isNaN(firstDay)?0:firstDay; var showWeek=this._get(inst,"showWeek");var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var selectOtherMonths=this._get(inst,"selectOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week; var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";this.maxRows=4;for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='\x3cdiv class\x3d"ui-datepicker-group';if(numMonths[1]>1)switch(col){case 0:calender+=" ui-datepicker-group-first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]- 1:calender+=" ui-datepicker-group-last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+=" ui-datepicker-group-middle";cornerClass="";break}calender+='"\x3e'}calender+='\x3cdiv class\x3d"ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'"\x3e'+(/all|left/.test(cornerClass)&&row==0?isRTL?next:prev:"")+(/all|right/.test(cornerClass)&&row==0?isRTL?prev:next:"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+ '\x3c/div\x3e\x3ctable class\x3d"ui-datepicker-calendar"\x3e\x3cthead\x3e'+"\x3ctr\x3e";var thead=showWeek?'\x3cth class\x3d"ui-datepicker-week-col"\x3e'+this._get(inst,"weekHeader")+"\x3c/th\x3e":"";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="\x3cth"+((dow+firstDay+6)%7>=5?' class\x3d"ui-datepicker-week-end"':"")+"\x3e"+'\x3cspan title\x3d"'+dayNames[day]+'"\x3e'+dayNamesMin[day]+"\x3c/span\x3e\x3c/th\x3e"}calender+=thead+"\x3c/tr\x3e\x3c/thead\x3e\x3ctbody\x3e";var daysInMonth=this._getDaysInMonth(drawYear, drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth)inst.selectedDay=Math.min(inst.selectedDay,daysInMonth);var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var curRows=Math.ceil((leadDays+daysInMonth)/7);var numRows=isMultiMonth?this.maxRows>curRows?this.maxRows:curRows:curRows;this.maxRows=numRows;var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="\x3ctr\x3e";var tbody=!showWeek? "":'\x3ctd class\x3d"ui-datepicker-week-col"\x3e'+this._get(inst,"calculateWeek")(printDate)+"\x3c/td\x3e";for(dow=0;dow<7;dow++){var daySettings=beforeShowDay?beforeShowDay.apply(inst.input?inst.input[0]:null,[printDate]):[true,""];var otherMonth=printDate.getMonth()!=drawMonth;var unselectable=otherMonth&&!selectOtherMonths||!daySettings[0]||minDate&&printDate<minDate||maxDate&&printDate>maxDate;tbody+='\x3ctd class\x3d"'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month": "")+(printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent||defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime()?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()==currentDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&& daySettings[2]?' title\x3d"'+daySettings[2]+'"':"")+(unselectable?"":' data-handler\x3d"selectDay" data-event\x3d"click" data-month\x3d"'+printDate.getMonth()+'" data-year\x3d"'+printDate.getFullYear()+'"')+"\x3e"+(otherMonth&&!showOtherMonths?"\x26#xa0;":unselectable?'\x3cspan class\x3d"ui-state-default"\x3e'+printDate.getDate()+"\x3c/span\x3e":'\x3ca class\x3d"ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()==currentDate.getTime()?" ui-state-active": "")+(otherMonth?" ui-priority-secondary":"")+'" href\x3d"#"\x3e'+printDate.getDate()+"\x3c/a\x3e")+"\x3c/td\x3e";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"\x3c/tr\x3e"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="\x3c/tbody\x3e\x3c/table\x3e"+(isMultiMonth?"\x3c/div\x3e"+(numMonths[0]>0&&col==numMonths[1]-1?'\x3cdiv class\x3d"ui-datepicker-row-break"\x3e\x3c/div\x3e':""):"");group+=calender}html+=group}html+=buttonPanel+ ($.ui.ie6&&!inst.inline?'\x3ciframe src\x3d"javascript:false;" class\x3d"ui-datepicker-cover" frameborder\x3d"0"\x3e\x3c/iframe\x3e':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,secondary,monthNames,monthNamesShort){var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='\x3cdiv class\x3d"ui-datepicker-title"\x3e';var monthHtml= "";if(secondary||!changeMonth)monthHtml+='\x3cspan class\x3d"ui-datepicker-month"\x3e'+monthNames[drawMonth]+"\x3c/span\x3e";else{var inMinYear=minDate&&minDate.getFullYear()==drawYear;var inMaxYear=maxDate&&maxDate.getFullYear()==drawYear;monthHtml+='\x3cselect class\x3d"ui-datepicker-month" data-handler\x3d"selectMonth" data-event\x3d"change"\x3e';for(var month=0;month<12;month++)if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth()))monthHtml+='\x3coption value\x3d"'+ month+'"'+(month==drawMonth?' selected\x3d"selected"':"")+"\x3e"+monthNamesShort[month]+"\x3c/option\x3e";monthHtml+="\x3c/select\x3e"}if(!showMonthAfterYear)html+=monthHtml+(secondary||!(changeMonth&&changeYear)?"\x26#xa0;":"");if(!inst.yearshtml){inst.yearshtml="";if(secondary||!changeYear)html+='\x3cspan class\x3d"ui-datepicker-year"\x3e'+drawYear+"\x3c/span\x3e";else{var years=this._get(inst,"yearRange").split(":");var thisYear=(new Date).getFullYear();var determineYear=function(value){var year= value.match(/c[+-].*/)?drawYear+parseInt(value.substring(1),10):value.match(/[+-].*/)?thisYear+parseInt(value,10):parseInt(value,10);return isNaN(year)?thisYear:year};var year$jscomp$0=determineYear(years[0]);var endYear=Math.max(year$jscomp$0,determineYear(years[1]||""));year$jscomp$0=minDate?Math.max(year$jscomp$0,minDate.getFullYear()):year$jscomp$0;endYear=maxDate?Math.min(endYear,maxDate.getFullYear()):endYear;for(inst.yearshtml+='\x3cselect class\x3d"ui-datepicker-year" data-handler\x3d"selectYear" data-event\x3d"change"\x3e';year$jscomp$0<= endYear;year$jscomp$0++)inst.yearshtml+='\x3coption value\x3d"'+year$jscomp$0+'"'+(year$jscomp$0==drawYear?' selected\x3d"selected"':"")+"\x3e"+year$jscomp$0+"\x3c/option\x3e";inst.yearshtml+="\x3c/select\x3e";html+=inst.yearshtml;inst.yearshtml=null}}html+=this._get(inst,"yearSuffix");if(showMonthAfterYear)html+=(secondary||!(changeMonth&&changeYear)?"\x26#xa0;":"")+monthHtml;html+="\x3c/div\x3e";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset: 0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y")this._notifyChange(inst)},_restrictMinMax:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");var maxDate= this._getMinMaxDate(inst,"max");var newDate=minDate&&date<minDate?minDate:date;newDate=maxDate&&newDate>maxDate?maxDate:newDate;return newDate},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange)onChange.apply(inst.input?inst.input[0]:null,[inst.selectedYear,inst.selectedMonth+1,inst])},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return numMonths==null?[1,1]:typeof numMonths=="number"?[1,numMonths]:numMonths},_getMinMaxDate:function(inst, minMax){return this._determineDate(inst,this._get(inst,minMax+"Date"),null)},_getDaysInMonth:function(year,month){return 32-this._daylightSavingAdjust(new Date(year,month,32)).getDate()},_getFirstDayOfMonth:function(year,month){return(new Date(year,month,1)).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));if(offset<0)date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));return this._isInRange(inst,date)},_isInRange:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return(!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime())},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=typeof shortYearCutoff!="string"?shortYearCutoff:(new Date).getFullYear()%100+parseInt(shortYearCutoff,10);return{shortYearCutoff:shortYearCutoff, dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=day?typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day)):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)); return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});$.fn.datepicker=function(options){if(!this.length)return this;if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find(document.body).append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate"||options=="widget"))return $.datepicker["_"+options+"Datepicker"].apply($.datepicker, [this[0]].concat(otherArgs));if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string")return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs));return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker;$.datepicker.initialized=false;$.datepicker.uuid=(new Date).getTime();$.datepicker.version="1.9.2"; window["DP_jQuery_"+dpuuid]=$})(jQuery); (function($,undefined){var uiDialogClasses="ui-dialog ui-widget ui-widget-content ui-corner-all ";var sizeRelatedOptions={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true};var resizableRelatedOptions={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};$.widget("ui.dialog",{version:"1.9.2",options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150, minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(pos){var topOffset=$(this).css(pos).offset().top;if(topOffset<0)$(this).css("top",pos.top-topOffset)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.oldPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)}; this.options.title=this.options.title||this.originalTitle;var that=this;var options=this.options;var title=options.title||"\x26#160;";var uiDialog=(this.uiDialog=$("\x3cdiv\x3e")).addClass(uiDialogClasses+options.dialogClass).css({display:"none",outline:0,zIndex:options.zIndex}).attr("tabIndex",-1).keydown(function(event){if(options.closeOnEscape&&!event.isDefaultPrevented()&&event.keyCode&&event.keyCode===$.ui.keyCode.ESCAPE){that.close(event);event.preventDefault()}}).mousedown(function(event){that.moveToTop(false, event)}).appendTo("body");this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(uiDialog);var uiDialogTitlebar=(this.uiDialogTitlebar=$("\x3cdiv\x3e")).addClass("ui-dialog-titlebar ui-widget-header "+"ui-corner-all ui-helper-clearfix").bind("mousedown",function(){uiDialog.focus()}).prependTo(uiDialog);var uiDialogTitlebarClose=$("\x3ca href\x3d'#'\x3e\x3c/a\x3e").addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").click(function(event){event.preventDefault(); that.close(event)}).appendTo(uiDialogTitlebar);(this.uiDialogTitlebarCloseText=$("\x3cspan\x3e")).addClass("ui-icon ui-icon-closethick").text(options.closeText).appendTo(uiDialogTitlebarClose);var uiDialogTitle=$("\x3cspan\x3e").uniqueId().addClass("ui-dialog-title").html(title).prependTo(uiDialogTitlebar);var uiDialogButtonPane=(this.uiDialogButtonPane=$("\x3cdiv\x3e")).addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");(this.uiButtonSet=$("\x3cdiv\x3e")).addClass("ui-dialog-buttonset").appendTo(uiDialogButtonPane); uiDialog.attr({role:"dialog","aria-labelledby":uiDialogTitle.attr("id")});uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();this._hoverable(uiDialogTitlebarClose);this._focusable(uiDialogTitlebarClose);if(options.draggable&&$.fn.draggable)this._makeDraggable();if(options.resizable&&$.fn.resizable)this._makeResizable();this._createButtons(options.buttons);this._isOpen=false;if($.fn.bgiframe)uiDialog.bgiframe();this._on(uiDialog,{keydown:function(event){if(!options.modal||event.keyCode!== $.ui.keyCode.TAB)return;var tabbables=$(":tabbable",uiDialog);var first=tabbables.filter(":first");var last=tabbables.filter(":last");if(event.target===last[0]&&!event.shiftKey){first.focus(1);return false}else if(event.target===first[0]&&event.shiftKey){last.focus(1);return false}}})},_init:function(){if(this.options.autoOpen)this.open()},_destroy:function(){var oldPosition=this.oldPosition;if(this.overlay)this.overlay.destroy();this.uiDialog.hide();this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"); this.uiDialog.remove();if(this.originalTitle)this.element.attr("title",this.originalTitle);var next=oldPosition.parent.children().eq(oldPosition.index);if(next.length&&next[0]!==this.element[0])next.before(this.element);else oldPosition.parent.append(this.element)},widget:function(){return this.uiDialog},close:function(event){var that=this;var thisZ;if(!this._isOpen)return;if(false===this._trigger("beforeClose",event))return;this._isOpen=false;if(this.overlay)this.overlay.destroy();if(this.options.hide)this._hide(this.uiDialog, this.options.hide,function(){that._trigger("close",event)});else{this.uiDialog.hide();this._trigger("close",event)}$.ui.dialog.overlay.resize();if(this.options.modal){var maxZ=0;$(".ui-dialog").each(function(){if(this!==that.uiDialog[0]){thisZ=$(this).css("z-index");if(!isNaN(thisZ))maxZ=Math.max(maxZ,thisZ)}});$.ui.dialog.maxZ=maxZ}return this},isOpen:function(){return this._isOpen},moveToTop:function(force,event){var options=this.options;if(options.modal&&!force||!options.stack&&!options.modal)return this._trigger("focus", event);if(options.zIndex>$.ui.dialog.maxZ)$.ui.dialog.maxZ=options.zIndex;if(this.overlay){$.ui.dialog.maxZ+=1;$.ui.dialog.overlay.maxZ=$.ui.dialog.maxZ;this.overlay.$el.css("z-index",$.ui.dialog.overlay.maxZ)}var saveScroll={scrollTop:this.element.scrollTop(),scrollLeft:this.element.scrollLeft()};$.ui.dialog.maxZ+=1;this.uiDialog.css("z-index",$.ui.dialog.maxZ);this.element.attr(saveScroll);this._trigger("focus",event);return this},open:function(){if(this._isOpen)return;var options=this.options; var uiDialog=this.uiDialog;this._size();this._position(options.position);uiDialog.show(options.show);this.overlay=options.modal?new $.ui.dialog.overlay(this):null;this.moveToTop(true);var hasFocus=this.element.find(":tabbable");if(!hasFocus.length){hasFocus=this.uiDialogButtonPane.find(":tabbable");if(!hasFocus.length)hasFocus=uiDialog}hasFocus.eq(0).focus();this._isOpen=true;this._trigger("open");return this},_createButtons:function(buttons){var that=this;var hasButtons=false;this.uiDialogButtonPane.remove(); this.uiButtonSet.empty();if(typeof buttons==="object"&&buttons!==null)$.each(buttons,function(){return!(hasButtons=true)});if(hasButtons){$.each(buttons,function(name,props){props=$.isFunction(props)?{click:props,text:name}:props;props=$.extend({type:"button"},props);var click=props.click;props.click=function(){click.apply(that.element[0],arguments)};var button=$("\x3cbutton\x3e\x3c/button\x3e",props).appendTo(that.uiButtonSet);if($.fn.button)button.button()});this.uiDialog.addClass("ui-dialog-buttons"); this.uiDialogButtonPane.appendTo(this.uiDialog)}else this.uiDialog.removeClass("ui-dialog-buttons")},_makeDraggable:function(){function filteredUi(ui){return{position:ui.position,offset:ui.offset}}var that=this;var options=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(event,ui){$(this).addClass("ui-dialog-dragging");that._trigger("dragStart",event,filteredUi(ui))},drag:function(event, ui){that._trigger("drag",event,filteredUi(ui))},stop:function(event,ui){options.position=[ui.position.left-that.document.scrollLeft(),ui.position.top-that.document.scrollTop()];$(this).removeClass("ui-dialog-dragging");that._trigger("dragStop",event,filteredUi(ui));$.ui.dialog.overlay.resize()}})},_makeResizable:function(handles){function filteredUi(ui){return{originalPosition:ui.originalPosition,originalSize:ui.originalSize,position:ui.position,size:ui.size}}handles=handles===undefined?this.options.resizable: handles;var that=this;var options=this.options;var position=this.uiDialog.css("position");var resizeHandles=typeof handles==="string"?handles:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:this._minHeight(),handles:resizeHandles,start:function(event,ui){$(this).addClass("ui-dialog-resizing");that._trigger("resizeStart",event,filteredUi(ui))}, resize:function(event,ui){that._trigger("resize",event,filteredUi(ui))},stop:function(event,ui){$(this).removeClass("ui-dialog-resizing");options.height=$(this).height();options.width=$(this).width();that._trigger("resizeStop",event,filteredUi(ui));$.ui.dialog.overlay.resize()}}).css("position",position).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var options=this.options;if(options.height==="auto")return options.minHeight;else return Math.min(options.minHeight, options.height)},_position:function(position){var myAt=[];var offset=[0,0];if(position){if(typeof position==="string"||typeof position==="object"&&"0"in position){myAt=position.split?position.split(" "):[position[0],position[1]];if(myAt.length===1)myAt[1]=myAt[0];$.each(["left","top"],function(i,offsetPosition){if(+myAt[i]===myAt[i]){offset[i]=myAt[i];myAt[i]=offsetPosition}});position={my:myAt[0]+(offset[0]<0?offset[0]:"+"+offset[0])+" "+myAt[1]+(offset[1]<0?offset[1]:"+"+offset[1]),at:myAt.join(" ")}}position= $.extend({},$.ui.dialog.prototype.options.position,position)}else position=$.ui.dialog.prototype.options.position;var isVisible=this.uiDialog.is(":visible");if(!isVisible)this.uiDialog.show();this.uiDialog.position(position);if(!isVisible)this.uiDialog.hide()},_setOptions:function(options){var that=this;var resizableOptions={};var resize=false;$.each(options,function(key,value){that._setOption(key,value);if(key in sizeRelatedOptions)resize=true;if(key in resizableRelatedOptions)resizableOptions[key]= value});if(resize)this._size();if(this.uiDialog.is(":data(resizable)"))this.uiDialog.resizable("option",resizableOptions)},_setOption:function(key,value){var uiDialog=this.uiDialog;switch(key){case "buttons":this._createButtons(value);break;case "closeText":this.uiDialogTitlebarCloseText.text(""+value);break;case "dialogClass":uiDialog.removeClass(this.options.dialogClass).addClass(uiDialogClasses+value);break;case "disabled":if(value)uiDialog.addClass("ui-dialog-disabled");else uiDialog.removeClass("ui-dialog-disabled"); break;case "draggable":var isDraggable=uiDialog.is(":data(draggable)");if(isDraggable&&!value)uiDialog.draggable("destroy");if(!isDraggable&&value)this._makeDraggable();break;case "position":this._position(value);break;case "resizable":var isResizable=uiDialog.is(":data(resizable)");if(isResizable&&!value)uiDialog.resizable("destroy");if(isResizable&&typeof value==="string")uiDialog.resizable("option","handles",value);if(!isResizable&&value!==false)this._makeResizable(value);break;case "title":$(".ui-dialog-title", this.uiDialogTitlebar).html(""+(value||"\x26#160;"));break}this._super(key,value)},_size:function(){var options=this.options;var isVisible=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(options.minWidth>options.width)options.width=options.minWidth;var nonContentHeight=this.uiDialog.css({height:"auto",width:options.width}).outerHeight();var minContentHeight=Math.max(0,options.minHeight-nonContentHeight);if(options.height==="auto")if($.support.minHeight)this.element.css({minHeight:minContentHeight, height:"auto"});else{this.uiDialog.show();var autoHeight=this.element.css("height","auto").height();if(!isVisible)this.uiDialog.hide();this.element.height(Math.max(autoHeight,minContentHeight))}else this.element.height(Math.max(options.height-nonContentHeight,0));if(this.uiDialog.is(":data(resizable)"))this.uiDialog.resizable("option","minHeight",this._minHeight())}});$.extend($.ui.dialog,{uuid:0,maxZ:0,getTitleId:function($el){var id=$el.attr("id");if(!id){this.uuid+=1;id=this.uuid}return"ui-dialog-title-"+ id},overlay:function(dialog){this.$el=$.ui.dialog.overlay.create(dialog)}});$.extend($.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:$.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(event){return event+".dialog-overlay"}).join(" "),create:function(dialog){if(this.instances.length===0){setTimeout(function(){if($.ui.dialog.overlay.instances.length)$(document).bind($.ui.dialog.overlay.events,function(event){if($(event.target).zIndex()<$.ui.dialog.overlay.maxZ)return false})}, 1);$(window).bind("resize.dialog-overlay",$.ui.dialog.overlay.resize)}var $el=this.oldInstances.pop()||$("\x3cdiv\x3e").addClass("ui-widget-overlay");$(document).bind("keydown.dialog-overlay",function(event){var instances=$.ui.dialog.overlay.instances;if(instances.length!==0&&instances[instances.length-1]===$el&&dialog.options.closeOnEscape&&!event.isDefaultPrevented()&&event.keyCode&&event.keyCode===$.ui.keyCode.ESCAPE){dialog.close(event);event.preventDefault()}});$el.appendTo(document.body).css({width:this.width(), height:this.height()});if($.fn.bgiframe)$el.bgiframe();this.instances.push($el);return $el},destroy:function($el){var indexOf=$.inArray($el,this.instances);var maxZ=0;if(indexOf!==-1)this.oldInstances.push(this.instances.splice(indexOf,1)[0]);if(this.instances.length===0)$([document,window]).unbind(".dialog-overlay");$el.height(0).width(0).remove();$.each(this.instances,function(){maxZ=Math.max(maxZ,this.css("z-index"))});this.maxZ=maxZ},height:function(){if($.ui.ie){var scrollHeight=Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);var offsetHeight=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(scrollHeight<offsetHeight)return $(window).height()+"px";else return scrollHeight+"px"}else return $(document).height()+"px"},width:function(){if($.ui.ie){var scrollWidth=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(scrollWidth<offsetWidth)return $(window).width()+ "px";else return scrollWidth+"px"}else return $(document).width()+"px"},resize:function(){var $overlays=$([]);$.each($.ui.dialog.overlay.instances,function(){$overlays=$overlays.add(this)});$overlays.css({width:0,height:0}).css({width:$.ui.dialog.overlay.width(),height:$.ui.dialog.overlay.height()})}});$.extend($.ui.dialog.overlay.prototype,{destroy:function(){$.ui.dialog.overlay.destroy(this.$el)}})})(jQuery); (function($,undefined){var mouseHandled=false;$.widget("ui.menu",{version:"1.9.2",defaultElement:"\x3cul\x3e",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+ this.eventNamespace,$.proxy(function(event){if(this.options.disabled)event.preventDefault()},this));if(this.options.disabled)this.element.addClass("ui-state-disabled").attr("aria-disabled","true");this._on({"mousedown .ui-menu-item \x3e a":function(event){event.preventDefault()},"click .ui-state-disabled \x3e a":function(event){event.preventDefault()},"click .ui-menu-item:has(a)":function(event){var target=$(event.target).closest(".ui-menu-item");if(!mouseHandled&&target.not(".ui-state-disabled").length){mouseHandled= true;this.select(event);if(target.has(".ui-menu").length)this.expand(event);else if(!this.element.is(":focus")){this.element.trigger("focus",[true]);if(this.active&&this.active.parents(".ui-menu").length===1)clearTimeout(this.timer)}}},"mouseenter .ui-menu-item":function(event){var target=$(event.currentTarget);target.siblings().children(".ui-state-active").removeClass("ui-state-active");this.focus(event,target)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(event,keepActiveItem){var item= this.active||this.element.children(".ui-menu-item").eq(0);if(!keepActiveItem)this.focus(event,item)},blur:function(event){this._delay(function(){if(!$.contains(this.element[0],this.document[0].activeElement))this.collapseAll(event)})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(event){if(!$(event.target).closest(".ui-menu").length)this.collapseAll(event);mouseHandled=false}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(); this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var elem=$(this);if(elem.data("ui-menu-submenu-carat"))elem.remove()});this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(event){function escape(value){return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$\x26")}var preventDefault=true;switch(event.keyCode){case $.ui.keyCode.PAGE_UP:this.previousPage(event);break;case $.ui.keyCode.PAGE_DOWN:this.nextPage(event);break;case $.ui.keyCode.HOME:this._move("first","first",event);break;case $.ui.keyCode.END:this._move("last","last",event);break;case $.ui.keyCode.UP:this.previous(event);break;case $.ui.keyCode.DOWN:this.next(event);break;case $.ui.keyCode.LEFT:this.collapse(event);break;case $.ui.keyCode.RIGHT:if(this.active&&!this.active.is(".ui-state-disabled"))this.expand(event); break;case $.ui.keyCode.ENTER:case $.ui.keyCode.SPACE:this._activate(event);break;case $.ui.keyCode.ESCAPE:this.collapse(event);break;default:preventDefault=false;var prev=this.previousFilter||"";var character=String.fromCharCode(event.keyCode);var skip=false;clearTimeout(this.filterTimer);if(character===prev)skip=true;else character=prev+character;var regex=new RegExp("^"+escape(character),"i");var match=this.activeMenu.children(".ui-menu-item").filter(function(){return regex.test($(this).children("a").text())}); match=skip&&match.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):match;if(!match.length){character=String.fromCharCode(event.keyCode);regex=new RegExp("^"+escape(character),"i");match=this.activeMenu.children(".ui-menu-item").filter(function(){return regex.test($(this).children("a").text())})}if(match.length){this.focus(event,match);if(match.length>1){this.previousFilter=character;this.filterTimer=this._delay(function(){delete this.previousFilter},1E3)}else delete this.previousFilter}else delete this.previousFilter}if(preventDefault)event.preventDefault()}, _activate:function(event){if(!this.active.is(".ui-state-disabled"))if(this.active.children("a[aria-haspopup\x3d'true']").length)this.expand(event);else this.select(event)},refresh:function(){var icon=this.options.icons.submenu;var submenus=this.element.find(this.options.menus);submenus.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var menu=$(this);var item=menu.prev("a"); var submenuCarat=$("\x3cspan\x3e").addClass("ui-menu-icon ui-icon "+icon).data("ui-menu-submenu-carat",true);item.attr("aria-haspopup","true").prepend(submenuCarat);menu.attr("aria-labelledby",item.attr("id"))});var menus=submenus.add(this.element);menus.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()});menus.children(":not(.ui-menu-item)").each(function(){var item= $(this);if(!/[^\-�??�??\s]/.test(item.text()))item.addClass("ui-widget-content ui-menu-divider")});menus.children(".ui-state-disabled").attr("aria-disabled","true");if(this.active&&!$.contains(this.element[0],this.active[0]))this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},focus:function(event,item){this.blur(event,event&&event.type==="focus");this._scrollIntoView(item);this.active=item.first();var focused=this.active.children("a").addClass("ui-state-focus"); if(this.options.role)this.element.attr("aria-activedescendant",focused.attr("id"));this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");if(event&&event.type==="keydown")this._close();else this.timer=this._delay(function(){this._close()},this.delay);var nested=item.children(".ui-menu");if(nested.length&&/^mouse/.test(event.type))this._startOpening(nested);this.activeMenu=item.parent();this._trigger("focus",event,{item:item})},_scrollIntoView:function(item){if(this._hasScroll()){var borderTop= parseFloat($.css(this.activeMenu[0],"borderTopWidth"))||0;var paddingTop=parseFloat($.css(this.activeMenu[0],"paddingTop"))||0;var offset=item.offset().top-this.activeMenu.offset().top-borderTop-paddingTop;var scroll=this.activeMenu.scrollTop();var elementHeight=this.activeMenu.height();var itemHeight=item.height();if(offset<0)this.activeMenu.scrollTop(scroll+offset);else if(offset+itemHeight>elementHeight)this.activeMenu.scrollTop(scroll+offset-elementHeight+itemHeight)}},blur:function(event,fromFocus){if(!fromFocus)clearTimeout(this.timer); if(!this.active)return;this.active.children("a").removeClass("ui-state-focus");this.active=null;this._trigger("blur",event,{item:this.active})},_startOpening:function(submenu){clearTimeout(this.timer);if(submenu.attr("aria-hidden")!=="true")return;this.timer=this._delay(function(){this._close();this._open(submenu)},this.delay)},_open:function(submenu){var position=$.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(submenu.parents(".ui-menu")).hide().attr("aria-hidden", "true");submenu.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(position)},collapseAll:function(event,all){clearTimeout(this.timer);this.timer=this._delay(function(){var currentMenu=all?this.element:$(event&&event.target).closest(this.element.find(".ui-menu"));if(!currentMenu.length)currentMenu=this.element;this._close(currentMenu);this.blur(event);this.activeMenu=currentMenu},this.delay)},_close:function(startMenu){if(!startMenu)startMenu=this.active?this.active.parent():this.element; startMenu.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(event){var newItem=this.active&&this.active.parent().closest(".ui-menu-item",this.element);if(newItem&&newItem.length){this._close();this.focus(event,newItem)}},expand:function(event){var newItem=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();if(newItem&&newItem.length){this._open(newItem.parent()); this._delay(function(){this.focus(event,newItem)})}},next:function(event){this._move("next","first",event)},previous:function(event){this._move("prev","last",event)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(direction,filter,event){if(this.active)if(direction==="first"||direction==="last")var next=this.active[direction==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1); else next=this.active[direction+"All"](".ui-menu-item").eq(0);if(!next||!next.length||!this.active)next=this.activeMenu.children(".ui-menu-item")[filter]();this.focus(event,next)},nextPage:function(event){var item;if(!this.active){this.next(event);return}if(this.isLastItem())return;if(this._hasScroll()){var base=this.active.offset().top;var height=this.element.height();this.active.nextAll(".ui-menu-item").each(function(){item=$(this);return item.offset().top-base-height<0});this.focus(event,item)}else this.focus(event, this.activeMenu.children(".ui-menu-item")[!this.active?"first":"last"]())},previousPage:function(event){var item;if(!this.active){this.next(event);return}if(this.isFirstItem())return;if(this._hasScroll()){var base=this.active.offset().top;var height=this.element.height();this.active.prevAll(".ui-menu-item").each(function(){item=$(this);return item.offset().top-base+height>0});this.focus(event,item)}else this.focus(event,this.activeMenu.children(".ui-menu-item").first())},_hasScroll:function(){return this.element.outerHeight()< this.element.prop("scrollHeight")},select:function(event){this.active=this.active||$(event.target).closest(".ui-menu-item");var ui={item:this.active};if(!this.active.has(".ui-menu").length)this.collapseAll(event,true);this._trigger("select",event,ui)}})})(jQuery); (function($,undefined){var numPages=5;$.widget("ui.slider",$.ui.mouse,{version:"1.9.2",widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var i$jscomp$0;var o=this.options;var existingHandles=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all");var handle="\x3ca class\x3d'ui-slider-handle ui-state-default ui-corner-all' href\x3d'#'\x3e\x3c/a\x3e";var handles=[];this._keySliding= false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider"+" ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(o.disabled?" ui-slider-disabled ui-disabled":""));this.range=$([]);if(o.range){if(o.range===true){if(!o.values)o.values=[this._valueMin(),this._valueMin()];if(o.values.length&&o.values.length!==2)o.values=[o.values[0],o.values[0]]}this.range=$("\x3cdiv\x3e\x3c/div\x3e").appendTo(this.element).addClass("ui-slider-range"+ " ui-widget-header"+(o.range==="min"||o.range==="max"?" ui-slider-range-"+o.range:""))}var handleCount=o.values&&o.values.length||1;for(i$jscomp$0=existingHandles.length;i$jscomp$0<handleCount;i$jscomp$0++)handles.push(handle);this.handles=existingHandles.add($(handles.join("")).appendTo(this.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(event){event.preventDefault()}).mouseenter(function(){if(!o.disabled)$(this).addClass("ui-state-hover")}).mouseleave(function(){$(this).removeClass("ui-state-hover")}).focus(function(){if(!o.disabled){$(".ui-slider .ui-state-focus").removeClass("ui-state-focus"); $(this).addClass("ui-state-focus")}else $(this).blur()}).blur(function(){$(this).removeClass("ui-state-focus")});this.handles.each(function(i){$(this).data("ui-slider-handle-index",i)});this._on(this.handles,{keydown:function(event){var newVal;var index=$(event.target).data("ui-slider-handle-index");switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.PAGE_UP:case $.ui.keyCode.PAGE_DOWN:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:event.preventDefault(); if(!this._keySliding){this._keySliding=true;$(event.target).addClass("ui-state-active");var allowed=this._start(event,index);if(allowed===false)return}break}var step=this.options.step;if(this.options.values&&this.options.values.length)var curVal=newVal=this.values(index);else curVal=newVal=this.value();switch(event.keyCode){case $.ui.keyCode.HOME:newVal=this._valueMin();break;case $.ui.keyCode.END:newVal=this._valueMax();break;case $.ui.keyCode.PAGE_UP:newVal=this._trimAlignValue(curVal+(this._valueMax()- this._valueMin())/numPages);break;case $.ui.keyCode.PAGE_DOWN:newVal=this._trimAlignValue(curVal-(this._valueMax()-this._valueMin())/numPages);break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal===this._valueMax())return;newVal=this._trimAlignValue(curVal+step);break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal===this._valueMin())return;newVal=this._trimAlignValue(curVal-step);break}this._slide(event,index,newVal)},keyup:function(event){var index=$(event.target).data("ui-slider-handle-index"); if(this._keySliding){this._keySliding=false;this._stop(event,index);this._change(event,index);$(event.target).removeClass("ui-state-active")}}});this._refreshValue();this._animateOff=false},_destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider"+" ui-slider-horizontal"+" ui-slider-vertical"+" ui-slider-disabled"+" ui-widget"+" ui-widget-content"+" ui-corner-all");this._mouseDestroy()},_mouseCapture:function(event){var index;var that=this;var o=this.options; if(o.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);var distance=this._valueMax()-this._valueMin()+1;this.handles.each(function(i){var thisDistance=Math.abs(normValue-that.values(i));if(distance>thisDistance){distance=thisDistance;closestHandle=$(this);index=i}});if(o.range===true&&this.values(1)===o.min){index+= 1;var closestHandle=$(this.handles[index])}var allowed=this._start(event,index);if(allowed===false)return false;this._mouseSliding=true;this._handleIndex=index;closestHandle.addClass("ui-state-active").focus();var offset=closestHandle.offset();var mouseOverHandle=!$(event.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-closestHandle.width()/2,top:event.pageY-offset.top-closestHandle.height()/2-(parseInt(closestHandle.css("borderTopWidth"), 10)||0)-(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+(parseInt(closestHandle.css("marginTop"),10)||0)};if(!this.handles.hasClass("ui-state-hover"))this._slide(event,index,normValue);this._animateOff=true;return true},_mouseStart:function(){return true},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false},_mouseStop:function(event){this.handles.removeClass("ui-state-active"); this._mouseSliding=false;this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(position){if(this.orientation==="horizontal"){var pixelTotal=this.elementSize.width;var pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{pixelTotal= this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var percentMouse=pixelMouse/pixelTotal;if(percentMouse>1)percentMouse=1;if(percentMouse<0)percentMouse=0;if(this.orientation==="vertical")percentMouse=1-percentMouse;var valueTotal=this._valueMax()-this._valueMin();var valueMouse=this._valueMin()+percentMouse*valueTotal;return this._trimAlignValue(valueMouse)},_start:function(event,index){var uiHash={handle:this.handles[index],value:this.value()}; if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values()}return this._trigger("start",event,uiHash)},_slide:function(event,index,newVal){if(this.options.values&&this.options.values.length){var otherVal=this.values(index?0:1);if(this.options.values.length===2&&this.options.range===true&&(index===0&&newVal>otherVal||index===1&&newVal<otherVal))newVal=otherVal;if(newVal!==this.values(index)){var newValues=this.values();newValues[index]=newVal;var allowed= this._trigger("slide",event,{handle:this.handles[index],value:newVal,values:newValues});otherVal=this.values(index?0:1);if(allowed!==false)this.values(index,newVal,true)}}else if(newVal!==this.value()){allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal});if(allowed!==false)this.value(newVal)}},_stop:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values= this.values()}this._trigger("stop",event,uiHash)},_change:function(event,index){if(!this._keySliding&&!this._mouseSliding){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values()}this._trigger("change",event,uiHash)}},value:function(newValue){if(arguments.length){this.options.value=this._trimAlignValue(newValue);this._refreshValue();this._change(null,0);return}return this._value()},values:function(index, newValue){var i;if(arguments.length>1){this.options.values[index]=this._trimAlignValue(newValue);this._refreshValue();this._change(null,index);return}if(arguments.length)if($.isArray(arguments[0])){var vals=this.options.values;var newValues=arguments[0];for(i=0;i<vals.length;i+=1){vals[i]=this._trimAlignValue(newValues[i]);this._change(null,i)}this._refreshValue()}else if(this.options.values&&this.options.values.length)return this._values(index);else return this.value();else return this._values()}, _setOption:function(key,value){var i;var valsLength=0;if($.isArray(this.options.values))valsLength=this.options.values.length;$.Widget.prototype._setOption.apply(this,arguments);switch(key){case "disabled":if(value){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.prop("disabled",true);this.element.addClass("ui-disabled")}else{this.handles.prop("disabled",false);this.element.removeClass("ui-disabled")}break;case "orientation":this._detectOrientation(); this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(i=0;i<valsLength;i+=1)this._change(null,i);this._animateOff=false;break;case "min":case "max":this._animateOff=true;this._refreshValue();this._animateOff=false;break}},_value:function(){var val=this.options.value; val=this._trimAlignValue(val);return val},_values:function(index){var i;if(arguments.length){var val=this.options.values[index];val=this._trimAlignValue(val);return val}else{var vals=this.options.values.slice();for(i=0;i<vals.length;i+=1)vals[i]=this._trimAlignValue(vals[i]);return vals}},_trimAlignValue:function(val){if(val<=this._valueMin())return this._valueMin();if(val>=this._valueMax())return this._valueMax();var step=this.options.step>0?this.options.step:1;var valModStep=(val-this._valueMin())% step;var alignValue=val-valModStep;if(Math.abs(valModStep)*2>=step)alignValue+=valModStep>0?step:-step;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var lastValPercent;var oRange=this.options.range;var o=this.options;var that=this;var animate=!this._animateOff?o.animate:false;var _set={};if(this.options.values&&this.options.values.length)this.handles.each(function(i){valPercent=(that.values(i)- that._valueMin())/(that._valueMax()-that._valueMin())*100;_set[that.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate);if(that.options.range===true)if(that.orientation==="horizontal"){if(i===0)that.range.stop(1,1)[animate?"animate":"css"]({left:valPercent+"%"},o.animate);if(i===1)that.range[animate?"animate":"css"]({width:valPercent-lastValPercent+"%"},{queue:false,duration:o.animate})}else{if(i===0)that.range.stop(1,1)[animate?"animate": "css"]({bottom:valPercent+"%"},o.animate);if(i===1)that.range[animate?"animate":"css"]({height:valPercent-lastValPercent+"%"},{queue:false,duration:o.animate})}lastValPercent=valPercent});else{var value=this.value();var valueMin=this._valueMin();var valueMax=this._valueMax();var valPercent=valueMax!==valueMin?(value-valueMin)/(valueMax-valueMin)*100:0;_set[this.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate);if(oRange==="min"&& this.orientation==="horizontal")this.range.stop(1,1)[animate?"animate":"css"]({width:valPercent+"%"},o.animate);if(oRange==="max"&&this.orientation==="horizontal")this.range[animate?"animate":"css"]({width:100-valPercent+"%"},{queue:false,duration:o.animate});if(oRange==="min"&&this.orientation==="vertical")this.range.stop(1,1)[animate?"animate":"css"]({height:valPercent+"%"},o.animate);if(oRange==="max"&&this.orientation==="vertical")this.range[animate?"animate":"css"]({height:100-valPercent+"%"}, {queue:false,duration:o.animate})}}})})(jQuery); (function($){function addDescribedBy(elem,id){var describedby=(elem.attr("aria-describedby")||"").split(/\s+/);describedby.push(id);elem.data("ui-tooltip-id",id).attr("aria-describedby",$.trim(describedby.join(" ")))}function removeDescribedBy(elem){var id=elem.data("ui-tooltip-id");var describedby=(elem.attr("aria-describedby")||"").split(/\s+/);var index=$.inArray(id,describedby);if(index!==-1)describedby.splice(index,1);elem.removeData("ui-tooltip-id");describedby=$.trim(describedby.join(" ")); if(describedby)elem.attr("aria-describedby",describedby);else elem.removeAttr("aria-describedby")}var increments=0;$.widget("ui.tooltip",{version:"1.9.2",options:{content:function(){return $(this).attr("title")},hide:true,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:true,tooltipClass:null,track:false,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"});this.tooltips={};this.parents={};if(this.options.disabled)this._disable()}, _setOption:function(key,value){var that=this;if(key==="disabled"){this[value?"_disable":"_enable"]();this.options[key]=value;return}this._super(key,value);if(key==="content")$.each(this.tooltips,function(id,element){that._updateContent(element)})},_disable:function(){var that=this;$.each(this.tooltips,function(id,element){var event=$.Event("blur");event.target=event.currentTarget=element[0];that.close(event,true)});this.element.find(this.options.items).andSelf().each(function(){var element=$(this); if(element.is("[title]"))element.data("ui-tooltip-title",element.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).andSelf().each(function(){var element=$(this);if(element.data("ui-tooltip-title"))element.attr("title",element.data("ui-tooltip-title"))})},open:function(event){var that=this;var target=$(event?event.target:this.element).closest(this.options.items);if(!target.length||target.data("ui-tooltip-id"))return;if(target.attr("title"))target.data("ui-tooltip-title", target.attr("title"));target.data("ui-tooltip-open",true);if(event&&event.type==="mouseover")target.parents().each(function(){var parent=$(this);if(parent.data("ui-tooltip-open")){var blurEvent=$.Event("blur");blurEvent.target=blurEvent.currentTarget=this;that.close(blurEvent,true)}if(parent.attr("title")){parent.uniqueId();that.parents[this.id]={element:this,title:parent.attr("title")};parent.attr("title","")}});this._updateContent(target,event)},_updateContent:function(target,event){var contentOption= this.options.content;var that=this;var eventType=event?event.type:null;if(typeof contentOption==="string")return this._open(event,target,contentOption);var content=contentOption.call(target[0],function(response){if(!target.data("ui-tooltip-open"))return;that._delay(function(){if(event)event.type=eventType;this._open(event,target,response)})});if(content)this._open(event,target,content)},_open:function(event$jscomp$0,target,content){function position(event){positionOption.of=event;if(tooltip.is(":hidden"))return; tooltip.position(positionOption)}var positionOption=$.extend({},this.options.position);if(!content)return;var tooltip=this._find(target);if(tooltip.length){tooltip.find(".ui-tooltip-content").html(content);return}if(target.is("[title]"))if(event$jscomp$0&&event$jscomp$0.type==="mouseover")target.attr("title","");else target.removeAttr("title");tooltip=this._tooltip(target);addDescribedBy(target,tooltip.attr("id"));tooltip.find(".ui-tooltip-content").html(content);if(this.options.track&&event$jscomp$0&& /^mouse/.test(event$jscomp$0.type)){this._on(this.document,{mousemove:position});position(event$jscomp$0)}else tooltip.position($.extend({of:target},this.options.position));tooltip.hide();this._show(tooltip,this.options.show);if(this.options.show&&this.options.show.delay)var delayedShow=setInterval(function(){if(tooltip.is(":visible")){position(positionOption.of);clearInterval(delayedShow)}},$.fx.interval);this._trigger("open",event$jscomp$0,{tooltip:tooltip});var events={keyup:function(event){if(event.keyCode=== $.ui.keyCode.ESCAPE){var fakeEvent=$.Event(event);fakeEvent.currentTarget=target[0];this.close(fakeEvent,true)}},remove:function(){this._removeTooltip(tooltip)}};if(!event$jscomp$0||event$jscomp$0.type==="mouseover")events.mouseleave="close";if(!event$jscomp$0||event$jscomp$0.type==="focusin")events.focusout="close";this._on(true,target,events)},close:function(event){var that=this;var target=$(event?event.currentTarget:this.element);var tooltip=this._find(target);if(this.closing)return;if(target.data("ui-tooltip-title"))target.attr("title", target.data("ui-tooltip-title"));removeDescribedBy(target);tooltip.stop(true);this._hide(tooltip,this.options.hide,function(){that._removeTooltip($(this))});target.removeData("ui-tooltip-open");this._off(target,"mouseleave focusout keyup");if(target[0]!==this.element[0])this._off(target,"remove");this._off(this.document,"mousemove");if(event&&event.type==="mouseleave")$.each(this.parents,function(id,parent){$(parent.element).attr("title",parent.title);delete that.parents[id]});this.closing=true;this._trigger("close", event,{tooltip:tooltip});this.closing=false},_tooltip:function(element){var id="ui-tooltip-"+increments++;var tooltip=$("\x3cdiv\x3e").attr({id:id,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));$("\x3cdiv\x3e").addClass("ui-tooltip-content").appendTo(tooltip);tooltip.appendTo(this.document[0].body);if($.fn.bgiframe)tooltip.bgiframe();this.tooltips[id]=element;return tooltip},_find:function(target){var id=target.data("ui-tooltip-id"); return id?$("#"+id):$()},_removeTooltip:function(tooltip){tooltip.remove();delete this.tooltips[tooltip.attr("id")]},_destroy:function(){var that=this;$.each(this.tooltips,function(id,element){var event=$.Event("blur");event.target=event.currentTarget=element[0];that.close(event,true);$("#"+id).remove();if(element.data("ui-tooltip-title")){element.attr("title",element.data("ui-tooltip-title"));element.removeData("ui-tooltip-title")}})}})})(jQuery); jQuery.effects||function($,undefined$jscomp$0){var backCompat=$.uiBackCompat!==false;var dataSpace="ui-effects-";$.effects={effect:{}};(function(jQuery,undefined){function clamp(value,prop,allowEmpty){var type=propTypes[prop.type]||{};if(value==null)return allowEmpty||!prop.def?null:prop.def;value=type.floor?~~value:parseFloat(value);if(isNaN(value))return prop.def;if(type.mod)return(value+type.mod)%type.mod;return 0>value?0:type.max<value?type.max:value}function stringParse(string){var inst=color(); var rgba=inst._rgba=[];string=string.toLowerCase();each(stringParsers,function(i,parser){var match=parser.re.exec(string);var values=match&&parser.parse(match);var spaceName=parser.space||"rgba";if(values){var parsed=inst[spaceName](values);inst[spaces[spaceName].cache]=parsed[spaces[spaceName].cache];rgba=inst._rgba=parsed._rgba;return false}});if(rgba.length){if(rgba.join()==="0,0,0,0")jQuery.extend(rgba,colors.transparent);return inst}return colors[string]}function hue2rgb(p,q,h){h=(h+1)%1;if(h* 6<1)return p+(q-p)*h*6;if(h*2<1)return q;if(h*3<2)return p+(q-p)*(2/3-h)*6;return p}var stepHooks="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" ");var rplusequals=/^([\-+])=\s*(\d+\.?\d*)/;var stringParsers=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[execResult[1],execResult[2],execResult[3],execResult[4]]}}, {re:/rgba?\(\s*(\d+(?:\.\d+)?)%\s*,\s*(\d+(?:\.\d+)?)%\s*,\s*(\d+(?:\.\d+)?)%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[execResult[1]*2.55,execResult[2]*2.55,execResult[3]*2.55,execResult[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(execResult){return[parseInt(execResult[1],16),parseInt(execResult[2],16),parseInt(execResult[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(execResult){return[parseInt(execResult[1]+execResult[1],16),parseInt(execResult[2]+ execResult[2],16),parseInt(execResult[3]+execResult[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)%\s*,\s*(\d+(?:\.\d+)?)%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(execResult){return[execResult[1],execResult[2]/100,execResult[3]/100,execResult[4]]}}];var color=jQuery.Color=function(color,green,blue,alpha){return new jQuery.Color.fn.parse(color,green,blue,alpha)};var spaces={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}}, hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}};var propTypes={"byte":{floor:true,max:255},"percent":{max:1},"degrees":{mod:360,floor:true}};var support=color.support={};var supportElem=jQuery("\x3cp\x3e")[0];var each=jQuery.each;supportElem.style.cssText="background-color:rgba(1,1,1,.5)";support.rgba=supportElem.style.backgroundColor.indexOf("rgba")>-1;each(spaces,function(spaceName,space){space.cache="_"+spaceName;space.props.alpha={idx:3, type:"percent",def:1}});color.fn=jQuery.extend(color.prototype,{parse:function(red,green,blue,alpha){if(red===undefined){this._rgba=[null,null,null,null];return this}if(red.jquery||red.nodeType){red=jQuery(red).css(green);green=undefined}var inst=this;var type=jQuery.type(red);var rgba=this._rgba=[];if(green!==undefined){red=[red,green,blue,alpha];type="array"}if(type==="string")return this.parse(stringParse(red)||colors._default);if(type==="array"){each(spaces.rgba.props,function(key,prop){rgba[prop.idx]= clamp(red[prop.idx],prop)});return this}if(type==="object"){if(red instanceof color)each(spaces,function(spaceName,space){if(red[space.cache])inst[space.cache]=red[space.cache].slice()});else each(spaces,function(spaceName,space){var cache=space.cache;each(space.props,function(key,prop){if(!inst[cache]&&space.to){if(key==="alpha"||red[key]==null)return;inst[cache]=space.to(inst._rgba)}inst[cache][prop.idx]=clamp(red[key],prop,true)});if(inst[cache]&&$.inArray(null,inst[cache].slice(0,3))<0){inst[cache][3]= 1;if(space.from)inst._rgba=space.from(inst[cache])}});return this}},is:function(compare){var is=color(compare);var same=true;var inst=this;each(spaces,function(_$jscomp$0,space){var isCache=is[space.cache];if(isCache){var localCache=inst[space.cache]||space.to&&space.to(inst._rgba)||[];each(space.props,function(_,prop){if(isCache[prop.idx]!=null){same=isCache[prop.idx]===localCache[prop.idx];return same}})}return same});return same},_space:function(){var used=[];var inst=this;each(spaces,function(spaceName, space){if(inst[space.cache])used.push(spaceName)});return used.pop()},transition:function(other,distance){var end=color(other);var spaceName=end._space();var space=spaces[spaceName];var startColor=this.alpha()===0?color("transparent"):this;var start=startColor[space.cache]||space.to(startColor._rgba);var result=start.slice();end=end[space.cache];each(space.props,function(key,prop){var index=prop.idx;var startValue=start[index];var endValue=end[index];var type=propTypes[prop.type]||{};if(endValue=== null)return;if(startValue===null)result[index]=endValue;else{if(type.mod)if(endValue-startValue>type.mod/2)startValue+=type.mod;else if(startValue-endValue>type.mod/2)startValue-=type.mod;result[index]=clamp((endValue-startValue)*distance+startValue,prop)}});return this[spaceName](result)},blend:function(opaque){if(this._rgba[3]===1)return this;var rgb=this._rgba.slice();var a=rgb.pop();var blend=color(opaque)._rgba;return color(jQuery.map(rgb,function(v,i){return(1-a)*blend[i]+a*v}))},toRgbaString:function(){var prefix= "rgba(";var rgba=jQuery.map(this._rgba,function(v,i){return v==null?i>2?1:0:v});if(rgba[3]===1){rgba.pop();prefix="rgb("}return prefix+rgba.join()+")"},toHslaString:function(){var prefix="hsla(";var hsla=jQuery.map(this.hsla(),function(v,i){if(v==null)v=i>2?1:0;if(i&&i<3)v=Math.round(v*100)+"%";return v});if(hsla[3]===1){hsla.pop();prefix="hsl("}return prefix+hsla.join()+")"},toHexString:function(includeAlpha){var rgba=this._rgba.slice();var alpha=rgba.pop();if(includeAlpha)rgba.push(~~(alpha*255)); return"#"+jQuery.map(rgba,function(v){v=(v||0).toString(16);return v.length===1?"0"+v:v}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}});color.fn.parse.prototype=color.fn;spaces.hsla.to=function(rgba){if(rgba[0]==null||rgba[1]==null||rgba[2]==null)return[null,null,null,rgba[3]];var r=rgba[0]/255;var g=rgba[1]/255;var b=rgba[2]/255;var a=rgba[3];var max=Math.max(r,g,b);var min=Math.min(r,g,b);var diff=max-min;var add=max+min;var l=add*.5;if(min===max)var h= 0;else if(r===max)h=60*(g-b)/diff+360;else if(g===max)h=60*(b-r)/diff+120;else h=60*(r-g)/diff+240;if(l===0||l===1)var s=l;else if(l<=.5)s=diff/add;else s=diff/(2-add);return[Math.round(h)%360,s,l,a==null?1:a]};spaces.hsla.from=function(hsla){if(hsla[0]==null||hsla[1]==null||hsla[2]==null)return[null,null,null,hsla[3]];var h=hsla[0]/360;var s=hsla[1];var l=hsla[2];var a=hsla[3];var q=l<=.5?l*(1+s):l+s-l*s;var p=2*l-q;return[Math.round(hue2rgb(p,q,h+1/3)*255),Math.round(hue2rgb(p,q,h)*255),Math.round(hue2rgb(p, q,h-1/3)*255),a]};each(spaces,function(spaceName,space){var props=space.props;var cache=space.cache;var to=space.to;var from=space.from;color.fn[spaceName]=function(value){if(to&&!this[cache])this[cache]=to(this._rgba);if(value===undefined)return this[cache].slice();var type=jQuery.type(value);var arr=type==="array"||type==="object"?value:arguments;var local=this[cache].slice();each(props,function(key,prop){var val=arr[type==="object"?key:prop.idx];if(val==null)val=local[prop.idx];local[prop.idx]= clamp(val,prop)});if(from){var ret=color(from(local));ret[cache]=local;return ret}else return color(local)};each(props,function(key,prop){if(color.fn[key])return;color.fn[key]=function(value){var vtype=jQuery.type(value);var fn=key==="alpha"?this._hsla?"hsla":"rgba":spaceName;var local=this[fn]();var cur=local[prop.idx];if(vtype==="undefined")return cur;if(vtype==="function"){value=value.call(this,cur);vtype=jQuery.type(value)}if(value==null&&prop.empty)return this;if(vtype==="string"){var match= rplusequals.exec(value);if(match)value=cur+parseFloat(match[2])*(match[1]==="+"?1:-1)}local[prop.idx]=value;return this[fn](local)}})});each(stepHooks,function(i,hook){jQuery.cssHooks[hook]={set:function(elem,value){var parsed;var curElem;var backgroundColor="";if(jQuery.type(value)!=="string"||(parsed=stringParse(value))){value=color(parsed||value);if(!support.rgba&&value._rgba[3]!==1){for(curElem=hook==="backgroundColor"?elem.parentNode:elem;(backgroundColor===""||backgroundColor==="transparent")&& curElem&&curElem.style;)try{backgroundColor=jQuery.css(curElem,"backgroundColor");curElem=curElem.parentNode}catch(e){}value=value.blend(backgroundColor&&backgroundColor!=="transparent"?backgroundColor:"_default")}value=value.toRgbaString()}try{elem.style[hook]=value}catch(error){}}};jQuery.fx.step[hook]=function(fx){if(!fx.colorInit){fx.start=color(fx.elem,hook);fx.end=color(fx.end);fx.colorInit=true}jQuery.cssHooks[hook].set(fx.elem,fx.start.transition(fx.end,fx.pos))}});jQuery.cssHooks.borderColor= {expand:function(value){var expanded={};each(["Top","Right","Bottom","Left"],function(i,part){expanded["border"+part+"Color"]=value});return expanded}};var colors=jQuery.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery);(function(){function getElementStyles(){var style= this.ownerDocument.defaultView?this.ownerDocument.defaultView.getComputedStyle(this,null):this.currentStyle;var newStyle={};var len;if(style&&style.length&&style[0]&&style[style[0]])for(len=style.length;len--;){var key=style[len];if(typeof style[key]==="string")newStyle[$.camelCase(key)]=style[key]}else for(key in style)if(typeof style[key]==="string")newStyle[key]=style[key];return newStyle}function styleDifference(oldStyle,newStyle){var diff={};var name;for(name in newStyle){var value=newStyle[name]; if(oldStyle[name]!==value)if(!shorthandStyles[name])if($.fx.step[name]||!isNaN(parseFloat(value)))diff[name]=value}return diff}var classAnimationActions=["add","remove","toggle"];var shorthandStyles={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};$.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(_,prop){$.fx.step[prop]=function(fx){if(fx.end!=="none"&&!fx.setAttr||fx.pos===1&&!fx.setAttr){jQuery.style(fx.elem, prop,fx.end);fx.setAttr=true}}});$.effects.animateClass=function(value,duration,easing,callback){var o=$.speed(duration,easing,callback);return this.queue(function(){var animated=$(this);var baseClass=animated.attr("class")||"";var allAnimations=o.children?animated.find("*").andSelf():animated;allAnimations=allAnimations.map(function(){var el=$(this);return{el:el,start:getElementStyles.call(this)}});var applyClassChange=function(){$.each(classAnimationActions,function(i,action){if(value[action])animated[action+ "Class"](value[action])})};applyClassChange();allAnimations=allAnimations.map(function(){this.end=getElementStyles.call(this.el[0]);this.diff=styleDifference(this.start,this.end);return this});animated.attr("class",baseClass);allAnimations=allAnimations.map(function(){var styleInfo=this;var dfd=$.Deferred();var opts=jQuery.extend({},o,{queue:false,complete:function(){dfd.resolve(styleInfo)}});this.el.animate(this.diff,opts);return dfd.promise()});$.when.apply($,allAnimations.get()).done(function(){applyClassChange(); $.each(arguments,function(){var el=this.el;$.each(this.diff,function(key){el.css(key,"")})});o.complete.call(animated[0])})})};$.fn.extend({_addClass:$.fn.addClass,addClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.call(this,{add:classNames},speed,easing,callback):this._addClass(classNames)},_removeClass:$.fn.removeClass,removeClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.call(this,{remove:classNames},speed,easing,callback): this._removeClass(classNames)},_toggleClass:$.fn.toggleClass,toggleClass:function(classNames,force,speed,easing,callback){if(typeof force==="boolean"||force===undefined$jscomp$0)if(!speed)return this._toggleClass(classNames,force);else return $.effects.animateClass.call(this,force?{add:classNames}:{remove:classNames},speed,easing,callback);else return $.effects.animateClass.call(this,{toggle:classNames},force,speed,easing)},switchClass:function(remove,add,speed,easing,callback){return $.effects.animateClass.call(this, {add:add,remove:remove},speed,easing,callback)}})})();(function(){function _normalizeArguments(effect,options,speed,callback){if($.isPlainObject(effect)){options=effect;effect=effect.effect}effect={effect:effect};if(options==null)options={};if($.isFunction(options)){callback=options;speed=null;options={}}if(typeof options==="number"||$.fx.speeds[options]){callback=speed;speed=options;options={}}if($.isFunction(speed)){callback=speed;speed=null}if(options)$.extend(effect,options);speed=speed||options.duration; effect.duration=$.fx.off?0:typeof speed==="number"?speed:speed in $.fx.speeds?$.fx.speeds[speed]:$.fx.speeds._default;effect.complete=callback||options.complete;return effect}function standardSpeed(speed){if(!speed||typeof speed==="number"||$.fx.speeds[speed])return true;if(typeof speed==="string"&&!$.effects.effect[speed]){if(backCompat&&$.effects[speed])return false;return true}return false}$.extend($.effects,{version:"1.9.2",save:function(element,set){for(var i=0;i<set.length;i++)if(set[i]!==null)element.data(dataSpace+ set[i],element[0].style[set[i]])},restore:function(element,set){var i;for(i=0;i<set.length;i++)if(set[i]!==null){var val=element.data(dataSpace+set[i]);if(val===undefined$jscomp$0)val="";element.css(set[i],val)}},setMode:function(el,mode){if(mode==="toggle")mode=el.is(":hidden")?"show":"hide";return mode},getBaseline:function(origin,original){switch(origin[0]){case "top":var y=0;break;case "middle":y=.5;break;case "bottom":y=1;break;default:y=origin[0]/original.height}switch(origin[1]){case "left":var x= 0;break;case "center":x=.5;break;case "right":x=1;break;default:x=origin[1]/original.width}return{x:x,y:y}},createWrapper:function(element){if(element.parent().is(".ui-effects-wrapper"))return element.parent();var props={width:element.outerWidth(true),height:element.outerHeight(true),"float":element.css("float")};var wrapper=$("\x3cdiv\x3e\x3c/div\x3e").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});var size={width:element.width(),height:element.height()}; var active=document.activeElement;try{active.id}catch(e){active=document.body}element.wrap(wrapper);if(element[0]===active||$.contains(element[0],active))$(active).focus();wrapper=element.parent();if(element.css("position")==="static"){wrapper.css({position:"relative"});element.css({position:"relative"})}else{$.extend(props,{position:element.css("position"),zIndex:element.css("z-index")});$.each(["top","left","bottom","right"],function(i,pos){props[pos]=element.css(pos);if(isNaN(parseInt(props[pos], 10)))props[pos]="auto"});element.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}element.css(size);return wrapper.css(props).show()},removeWrapper:function(element){var active=document.activeElement;if(element.parent().is(".ui-effects-wrapper")){element.parent().replaceWith(element);if(element[0]===active||$.contains(element[0],active))$(active).focus()}return element},setTransition:function(element,list,factor,value){value=value||{};$.each(list,function(i,x){var unit=element.cssUnit(x); if(unit[0]>0)value[x]=unit[0]*factor+unit[1]});return value}});$.fn.extend({effect:function(){function run(next){function done(){if($.isFunction(complete))complete.call(elem[0]);if($.isFunction(next))next()}var elem=$(this);var complete=args.complete;var mode=args.mode;if(elem.is(":hidden")?mode==="hide":mode==="show")done();else effectMethod.call(elem[0],args,done)}var args=_normalizeArguments.apply(this,arguments);var mode$jscomp$0=args.mode;var queue=args.queue;var effectMethod=$.effects.effect[args.effect]; var oldEffectMethod=!effectMethod&&backCompat&&$.effects[args.effect];if($.fx.off||!(effectMethod||oldEffectMethod))if(mode$jscomp$0)return this[mode$jscomp$0](args.duration,args.complete);else return this.each(function(){if(args.complete)args.complete.call(this)});if(effectMethod)return queue===false?this.each(run):this.queue(queue||"fx",run);else return oldEffectMethod.call(this,{options:args,duration:args.duration,callback:args.complete,mode:args.mode})},_show:$.fn.show,show:function(speed){if(standardSpeed(speed))return this._show.apply(this, arguments);else{var args=_normalizeArguments.apply(this,arguments);args.mode="show";return this.effect.call(this,args)}},_hide:$.fn.hide,hide:function(speed){if(standardSpeed(speed))return this._hide.apply(this,arguments);else{var args=_normalizeArguments.apply(this,arguments);args.mode="hide";return this.effect.call(this,args)}},__toggle:$.fn.toggle,toggle:function(speed){if(standardSpeed(speed)||typeof speed==="boolean"||$.isFunction(speed))return this.__toggle.apply(this,arguments);else{var args= _normalizeArguments.apply(this,arguments);args.mode="toggle";return this.effect.call(this,args)}},cssUnit:function(key){var style=this.css(key);var val=[];$.each(["em","px","%","pt"],function(i,unit){if(style.indexOf(unit)>0)val=[parseFloat(style),unit]});return val}})})();(function(){var baseEasings={};$.each(["Quad","Cubic","Quart","Quint","Expo"],function(i,name){baseEasings[name]=function(p){return Math.pow(p,i+2)}});$.extend(baseEasings,{Sine:function(p){return 1-Math.cos(p*Math.PI/2)},Circ:function(p){return 1- Math.sqrt(1-p*p)},Elastic:function(p){return p===0||p===1?p:-Math.pow(2,8*(p-1))*Math.sin(((p-1)*80-7.5)*Math.PI/15)},Back:function(p){return p*p*(3*p-2)},Bounce:function(p){var pow2;for(var bounce=4;p<((pow2=Math.pow(2,--bounce))-1)/11;);return 1/Math.pow(4,3-bounce)-7.5625*Math.pow((pow2*3-2)/22-p,2)}});$.each(baseEasings,function(name,easeIn){$.easing["easeIn"+name]=easeIn;$.easing["easeOut"+name]=function(p){return 1-easeIn(1-p)};$.easing["easeInOut"+name]=function(p){return p<.5?easeIn(p*2)/ 2:1-easeIn(p*-2+2)/2}})})()}(jQuery); (function($,undefined){$.effects.effect.drop=function(o,done){var el=$(this);var props=["position","top","bottom","left","right","opacity","height","width"];var mode=$.effects.setMode(el,o.mode||"hide");var show=mode==="show";var direction=o.direction||"left";var ref=direction==="up"||direction==="down"?"top":"left";var motion=direction==="up"||direction==="left"?"pos":"neg";var animation={opacity:show?1:0};$.effects.save(el,props);el.show();$.effects.createWrapper(el);var distance=o.distance||el[ref=== "top"?"outerHeight":"outerWidth"](true)/2;if(show)el.css("opacity",0).css(ref,motion==="pos"?-distance:distance);animation[ref]=(show?motion==="pos"?"+\x3d":"-\x3d":motion==="pos"?"-\x3d":"+\x3d")+distance;el.animate(animation,{queue:false,duration:o.duration,easing:o.easing,complete:function(){if(mode==="hide")el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);done()}})}})(jQuery); (function($,undefined){$.effects.effect.fade=function(o,done){var el=$(this);var mode=$.effects.setMode(el,o.mode||"toggle");el.animate({opacity:mode},{queue:false,duration:o.duration,easing:o.easing,complete:done})}})(jQuery); (function($,undefined){$.effects.effect.highlight=function(o,done){var elem=$(this);var props=["backgroundImage","backgroundColor","opacity"];var mode=$.effects.setMode(elem,o.mode||"show");var animation={backgroundColor:elem.css("backgroundColor")};if(mode==="hide")animation.opacity=0;$.effects.save(elem,props);elem.show().css({backgroundImage:"none",backgroundColor:o.color||"#ffff99"}).animate(animation,{queue:false,duration:o.duration,easing:o.easing,complete:function(){if(mode==="hide")elem.hide(); $.effects.restore(elem,props);done()}})}})(jQuery); (function($,undefined){$.effects.effect.puff=function(o,done){var elem=$(this);var mode=$.effects.setMode(elem,o.mode||"hide");var hide=mode==="hide";var percent=parseInt(o.percent,10)||150;var factor=percent/100;var original={height:elem.height(),width:elem.width(),outerHeight:elem.outerHeight(),outerWidth:elem.outerWidth()};$.extend(o,{effect:"scale",queue:false,fade:true,mode:mode,complete:done,percent:hide?percent:100,from:hide?original:{height:original.height*factor,width:original.width*factor, outerHeight:original.outerHeight*factor,outerWidth:original.outerWidth*factor}});elem.effect(o)};$.effects.effect.scale=function(o,done){var el=$(this);var options=$.extend(true,{},o);var mode=$.effects.setMode(el,o.mode||"effect");var percent=parseInt(o.percent,10)||(parseInt(o.percent,10)===0?0:mode==="hide"?0:100);var direction=o.direction||"both";var origin=o.origin;var original={height:el.height(),width:el.width(),outerHeight:el.outerHeight(),outerWidth:el.outerWidth()};var factor={y:direction!== "horizontal"?percent/100:1,x:direction!=="vertical"?percent/100:1};options.effect="size";options.queue=false;options.complete=done;if(mode!=="effect"){options.origin=origin||["middle","center"];options.restore=true}options.from=o.from||(mode==="show"?{height:0,width:0,outerHeight:0,outerWidth:0}:original);options.to={height:original.height*factor.y,width:original.width*factor.x,outerHeight:original.outerHeight*factor.y,outerWidth:original.outerWidth*factor.x};if(options.fade){if(mode==="show"){options.from.opacity= 0;options.to.opacity=1}if(mode==="hide"){options.from.opacity=1;options.to.opacity=0}}el.effect(options)};$.effects.effect.size=function(o,done){var el=$(this);var props0=["position","top","bottom","left","right","width","height","overflow","opacity"];var props1=["position","top","bottom","left","right","overflow","opacity"];var props2=["width","height","overflow"];var cProps=["fontSize"];var vProps=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var hProps=["borderLeftWidth", "borderRightWidth","paddingLeft","paddingRight"];var mode=$.effects.setMode(el,o.mode||"effect");var restore=o.restore||mode!=="effect";var scale=o.scale||"both";var origin=o.origin||["middle","center"];var position=el.css("position");var props=restore?props0:props1;var zero={height:0,width:0,outerHeight:0,outerWidth:0};if(mode==="show")el.show();var original={height:el.height(),width:el.width(),outerHeight:el.outerHeight(),outerWidth:el.outerWidth()};if(o.mode==="toggle"&&mode==="show"){el.from= o.to||zero;el.to=o.from||original}else{el.from=o.from||(mode==="show"?zero:original);el.to=o.to||(mode==="hide"?zero:original)}var factor={from:{y:el.from.height/original.height,x:el.from.width/original.width},to:{y:el.to.height/original.height,x:el.to.width/original.width}};if(scale==="box"||scale==="both"){if(factor.from.y!==factor.to.y){props=props.concat(vProps);el.from=$.effects.setTransition(el,vProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,vProps,factor.to.y,el.to)}if(factor.from.x!== factor.to.x){props=props.concat(hProps);el.from=$.effects.setTransition(el,hProps,factor.from.x,el.from);el.to=$.effects.setTransition(el,hProps,factor.to.x,el.to)}}if(scale==="content"||scale==="both")if(factor.from.y!==factor.to.y){props=props.concat(cProps).concat(props2);el.from=$.effects.setTransition(el,cProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,cProps,factor.to.y,el.to)}$.effects.save(el,props);el.show();$.effects.createWrapper(el);el.css("overflow","hidden").css(el.from); if(origin){var baseline=$.effects.getBaseline(origin,original);el.from.top=(original.outerHeight-el.outerHeight())*baseline.y;el.from.left=(original.outerWidth-el.outerWidth())*baseline.x;el.to.top=(original.outerHeight-el.to.outerHeight)*baseline.y;el.to.left=(original.outerWidth-el.to.outerWidth)*baseline.x}el.css(el.from);if(scale==="content"||scale==="both"){vProps=vProps.concat(["marginTop","marginBottom"]).concat(cProps);hProps=hProps.concat(["marginLeft","marginRight"]);props2=props0.concat(vProps).concat(hProps); el.find("*[width]").each(function(){var child=$(this);var c_original={height:child.height(),width:child.width(),outerHeight:child.outerHeight(),outerWidth:child.outerWidth()};if(restore)$.effects.save(child,props2);child.from={height:c_original.height*factor.from.y,width:c_original.width*factor.from.x,outerHeight:c_original.outerHeight*factor.from.y,outerWidth:c_original.outerWidth*factor.from.x};child.to={height:c_original.height*factor.to.y,width:c_original.width*factor.to.x,outerHeight:c_original.height* factor.to.y,outerWidth:c_original.width*factor.to.x};if(factor.from.y!==factor.to.y){child.from=$.effects.setTransition(child,vProps,factor.from.y,child.from);child.to=$.effects.setTransition(child,vProps,factor.to.y,child.to)}if(factor.from.x!==factor.to.x){child.from=$.effects.setTransition(child,hProps,factor.from.x,child.from);child.to=$.effects.setTransition(child,hProps,factor.to.x,child.to)}child.css(child.from);child.animate(child.to,o.duration,o.easing,function(){if(restore)$.effects.restore(child, props2)})})}el.animate(el.to,{queue:false,duration:o.duration,easing:o.easing,complete:function(){if(el.to.opacity===0)el.css("opacity",el.from.opacity);if(mode==="hide")el.hide();$.effects.restore(el,props);if(!restore)if(position==="static")el.css({position:"relative",top:el.to.top,left:el.to.left});else $.each(["top","left"],function(idx,pos){el.css(pos,function(_,str){var val=parseInt(str,10);var toRef=idx?el.to.left:el.to.top;if(str==="auto")return toRef+"px";return val+toRef+"px"})});$.effects.removeWrapper(el); done()}})}})(jQuery); (function($,undefined){$.effects.effect.slide=function(o,done){var el=$(this);var props=["position","top","bottom","left","right","width","height"];var mode=$.effects.setMode(el,o.mode||"show");var show=mode==="show";var direction=o.direction||"left";var ref=direction==="up"||direction==="down"?"top":"left";var positiveMotion=direction==="up"||direction==="left";var animation={};$.effects.save(el,props);el.show();var distance=o.distance||el[ref==="top"?"outerHeight":"outerWidth"](true);$.effects.createWrapper(el).css({overflow:"hidden"}); if(show)el.css(ref,positiveMotion?isNaN(distance)?"-"+distance:-distance:distance);animation[ref]=(show?positiveMotion?"+\x3d":"-\x3d":positiveMotion?"-\x3d":"+\x3d")+distance;el.animate(animation,{queue:false,duration:o.duration,easing:o.easing,complete:function(){if(mode==="hide")el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);done()}})}})(jQuery); (function($,undefined){$.effects.effect.transfer=function(o,done){var elem=$(this);var target=$(o.to);var targetFixed=target.css("position")==="fixed";var body=$("body");var fixTop=targetFixed?body.scrollTop():0;var fixLeft=targetFixed?body.scrollLeft():0;var endPosition=target.offset();var animation={top:endPosition.top-fixTop,left:endPosition.left-fixLeft,height:target.innerHeight(),width:target.innerWidth()};var startPosition=elem.offset();var transfer=$('\x3cdiv class\x3d"ui-effects-transfer"\x3e\x3c/div\x3e').appendTo(document.body).addClass(o.className).css({top:startPosition.top- fixTop,left:startPosition.left-fixLeft,height:elem.innerHeight(),width:elem.innerWidth(),position:targetFixed?"fixed":"absolute"}).animate(animation,o.duration,o.easing,function(){transfer.remove();done()})}})(jQuery); (function($){function simulateMouseEvent(event,simulatedType){if(event.originalEvent.touches.length>1)return;event.preventDefault();var touch=event.originalEvent.changedTouches[0];var simulatedEvent=document.createEvent("MouseEvents");simulatedEvent.initMouseEvent(simulatedType,true,true,window,1,touch.screenX,touch.screenY,touch.clientX,touch.clientY,false,false,false,false,0,null);event.target.dispatchEvent(simulatedEvent)}$.support.touch="ontouchend"in document;if(!$.support.touch)return;var mouseProto= $.ui.mouse.prototype;var _mouseInit=mouseProto._mouseInit;var touchHandled;mouseProto._touchStart=function(event){var self=this;if(touchHandled||!self._mouseCapture(event.originalEvent.changedTouches[0]))return;touchHandled=true;self._touchMoved=false;simulateMouseEvent(event,"mouseover");simulateMouseEvent(event,"mousemove");simulateMouseEvent(event,"mousedown")};mouseProto._touchMove=function(event){if(!touchHandled)return;this._touchMoved=true;simulateMouseEvent(event,"mousemove")};mouseProto._touchEnd= function(event){if(!touchHandled)return;simulateMouseEvent(event,"mouseup");simulateMouseEvent(event,"mouseout");if(!this._touchMoved)simulateMouseEvent(event,"click");touchHandled=false};mouseProto._mouseInit=function(){var self=this;self.element.bind("touchstart",$.proxy(self,"_touchStart")).bind("touchmove",$.proxy(self,"_touchMove")).bind("touchend",$.proxy(self,"_touchEnd"));_mouseInit.call(self)}})(jQuery); (function(root,factory){if(typeof define==="function"&&define.amd)define([],factory);else if(typeof exports==="object")module.exports=factory();else root.Handlebars=root.Handlebars||factory()})(this,function(){var __module4__=function(){function SafeString(string){this.string=string}SafeString.prototype.toString=function(){return""+this.string};var __exports__=SafeString;return __exports__}();var __module3__=function(__dependency1__){function escapeChar(chr){return escape[chr]}function extend(obj){for(var i= 1;i<arguments.length;i++)for(var key in arguments[i])if(Object.prototype.hasOwnProperty.call(arguments[i],key))obj[key]=arguments[i][key];return obj}function escapeExpression(string){if(string instanceof SafeString)return string.toString();else if(string==null)return"";else if(!string)return string+"";string=""+string;if(!possible.test(string))return string;return string.replace(badChars,escapeChar)}function isEmpty(value){if(!value&&value!==0)return true;else if(isArray(value)&&value.length===0)return true; else return false}function appendContextPath(contextPath,id){return(contextPath?contextPath+".":"")+id}var __exports__={};var SafeString=__dependency1__;var escape={"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;","`":"\x26#x60;"};var badChars=/[&<>"'`]/g;var possible=/[&<>"'`]/;__exports__.extend=extend;var toString=Object.prototype.toString;__exports__.toString=toString;var isFunction=function(value){return typeof value==="function"};if(isFunction(/x/))isFunction= function(value){return typeof value==="function"&&toString.call(value)==="[object Function]"};__exports__.isFunction=isFunction;var isArray=Array.isArray||function(value){return value&&typeof value==="object"?toString.call(value)==="[object Array]":false};__exports__.isArray=isArray;__exports__.escapeExpression=escapeExpression;__exports__.isEmpty=isEmpty;__exports__.appendContextPath=appendContextPath;return __exports__}(__module4__);var __module5__=function(){function Exception(message,node){if(node&& node.firstLine){var line=node.firstLine;message+=" - "+line+":"+node.firstColumn}var tmp=Error.prototype.constructor.call(this,message);for(var idx=0;idx<errorProps.length;idx++)this[errorProps[idx]]=tmp[errorProps[idx]];if(line){this.lineNumber=line;this.column=node.firstColumn}}var errorProps=["description","fileName","lineNumber","message","name","number","stack"];Exception.prototype=new Error;var __exports__=Exception;return __exports__}();var __module2__=function(__dependency1__,__dependency2__){function HandlebarsEnvironment(helpers, partials){this.helpers=helpers||{};this.partials=partials||{};registerDefaultHelpers(this)}function registerDefaultHelpers(instance){instance.registerHelper("helperMissing",function(){if(arguments.length===1)return undefined;else throw new Exception("Missing helper: '"+arguments[arguments.length-1].name+"'");});instance.registerHelper("blockHelperMissing",function(context,options){var inverse=options.inverse;var fn=options.fn;if(context===true)return fn(this);else if(context===false||context==null)return inverse(this); else if(isArray(context))if(context.length>0){if(options.ids)options.ids=[options.name];return instance.helpers.each(context,options)}else return inverse(this);else{if(options.data&&options.ids){var data=createFrame(options.data);data.contextPath=Utils.appendContextPath(options.data.contextPath,options.name);options={data:data}}return fn(context,options)}});instance.registerHelper("each",function(context,options){if(!options)throw new Exception("Must pass iterator to #each");var fn=options.fn;var inverse= options.inverse;var i=0;var ret="";if(options.data&&options.ids)var contextPath=Utils.appendContextPath(options.data.contextPath,options.ids[0])+".";if(isFunction(context))context=context.call(this);if(options.data)var data=createFrame(options.data);if(context&&typeof context==="object")if(isArray(context))for(var j=context.length;i<j;i++){if(data){data.index=i;data.first=i===0;data.last=i===context.length-1;if(contextPath)data.contextPath=contextPath+i}ret+=fn(context[i],{data:data})}else for(var key in context)if(context.hasOwnProperty(key)){if(data){data.key= key;data.index=i;data.first=i===0;if(contextPath)data.contextPath=contextPath+key}ret+=fn(context[key],{data:data});i++}if(i===0)ret=inverse(this);return ret});instance.registerHelper("if",function(conditional,options){if(isFunction(conditional))conditional=conditional.call(this);if(!options.hash.includeZero&&!conditional||Utils.isEmpty(conditional))return options.inverse(this);else return options.fn(this)});instance.registerHelper("unless",function(conditional,options){return instance.helpers["if"].call(this, conditional,{fn:options.inverse,inverse:options.fn,hash:options.hash})});instance.registerHelper("with",function(context,options){if(isFunction(context))context=context.call(this);var fn=options.fn;if(!Utils.isEmpty(context)){if(options.data&&options.ids){var data=createFrame(options.data);data.contextPath=Utils.appendContextPath(options.data.contextPath,options.ids[0]);options={data:data}}return fn(context,options)}else return options.inverse(this)});instance.registerHelper("log",function(message, options){var level=options.data&&options.data.level!=null?parseInt(options.data.level,10):1;instance.log(level,message)});instance.registerHelper("lookup",function(obj,field){return obj&&obj[field]})}var __exports__={};var Utils=__dependency1__;var Exception=__dependency2__;var VERSION="2.0.0";__exports__.VERSION=VERSION;var COMPILER_REVISION=6;__exports__.COMPILER_REVISION=COMPILER_REVISION;var REVISION_CHANGES={1:"\x3c\x3d 1.0.rc.2",2:"\x3d\x3d 1.0.0-rc.3",3:"\x3d\x3d 1.0.0-rc.4",4:"\x3d\x3d 1.x.x", 5:"\x3d\x3d 2.0.0-alpha.x",6:"\x3e\x3d 2.0.0-beta.1"};__exports__.REVISION_CHANGES=REVISION_CHANGES;var isArray=Utils.isArray;var isFunction=Utils.isFunction;var toString=Utils.toString;var objectType="[object Object]";__exports__.HandlebarsEnvironment=HandlebarsEnvironment;HandlebarsEnvironment.prototype={constructor:HandlebarsEnvironment,logger:logger,log:log,registerHelper:function(name,fn){if(toString.call(name)===objectType){if(fn)throw new Exception("Arg not supported with multiple helpers"); Utils.extend(this.helpers,name)}else this.helpers[name]=fn},unregisterHelper:function(name){delete this.helpers[name]},registerPartial:function(name,partial){if(toString.call(name)===objectType)Utils.extend(this.partials,name);else this.partials[name]=partial},unregisterPartial:function(name){delete this.partials[name]}};var logger={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(level,message){if(logger.level<=level){var method=logger.methodMap[level]; if(typeof console!=="undefined"&&console[method])console[method].call(console,message)}}};__exports__.logger=logger;var log=logger.log;__exports__.log=log;var createFrame=function(object){var frame=Utils.extend({},object);frame._parent=object;return frame};__exports__.createFrame=createFrame;return __exports__}(__module3__,__module5__);var __module6__=function(__dependency1__,__dependency2__,__dependency3__){function checkRevision(compilerInfo){var compilerRevision=compilerInfo&&compilerInfo[0]|| 1;var currentRevision=COMPILER_REVISION;if(compilerRevision!==currentRevision)if(compilerRevision<currentRevision){var runtimeVersions=REVISION_CHANGES[currentRevision];var compilerVersions=REVISION_CHANGES[compilerRevision];throw new Exception("Template was precompiled with an older version of Handlebars than the current runtime. "+"Please update your precompiler to a newer version ("+runtimeVersions+") or downgrade your runtime to an older version ("+compilerVersions+").");}else throw new Exception("Template was precompiled with a newer version of Handlebars than the current runtime. "+ "Please update your runtime to a newer version ("+compilerInfo[1]+").");}function template(templateSpec,env){if(!env)throw new Exception("No environment passed to template");if(!templateSpec||!templateSpec.main)throw new Exception("Unknown template object: "+typeof templateSpec);env.VM.checkRevision(templateSpec.compiler);var invokePartialWrapper=function(partial,indent,name,context,hash,helpers,partials,data,depths){if(hash)context=Utils.extend({},context,hash);var result=env.VM.invokePartial.call(this, partial,name,context,helpers,partials,data,depths);if(result==null&&env.compile){var options={helpers:helpers,partials:partials,data:data,depths:depths};partials[name]=env.compile(partial,{data:data!==undefined,compat:templateSpec.compat},env);result=partials[name](context,options)}if(result!=null){if(indent){var lines=result.split("\n");var i=0;for(var l=lines.length;i<l;i++){if(!lines[i]&&i+1===l)break;lines[i]=indent+lines[i]}result=lines.join("\n")}return result}else throw new Exception("The partial "+ name+" could not be compiled when running in runtime-only mode");};var container={lookup:function(depths,name){var len=depths.length;for(var i=0;i<len;i++)if(depths[i]&&depths[i][name]!=null)return depths[i][name]},lambda:function(current,context){return typeof current==="function"?current.call(context):current},escapeExpression:Utils.escapeExpression,invokePartial:invokePartialWrapper,fn:function(i){return templateSpec[i]},programs:[],program:function(i,data,depths){var programWrapper=this.programs[i]; var fn=this.fn(i);if(data||depths)programWrapper=program(this,i,fn,data,depths);else if(!programWrapper)programWrapper=this.programs[i]=program(this,i,fn);return programWrapper},data:function(data,depth){for(;data&&depth--;)data=data._parent;return data},merge:function(param,common){var ret=param||common;if(param&&common&¶m!==common)ret=Utils.extend({},common,param);return ret},noop:env.VM.noop,compilerInfo:templateSpec.compiler};var ret$jscomp$0=function(context,options){options=options||{}; var data=options.data;ret$jscomp$0._setup(options);if(!options.partial&&templateSpec.useData)data=initData(context,data);if(templateSpec.useDepths)var depths=options.depths?[context].concat(options.depths):[context];return templateSpec.main.call(container,context,container.helpers,container.partials,data,depths)};ret$jscomp$0.isTop=true;ret$jscomp$0._setup=function(options){if(!options.partial){container.helpers=container.merge(options.helpers,env.helpers);if(templateSpec.usePartial)container.partials= container.merge(options.partials,env.partials)}else{container.helpers=options.helpers;container.partials=options.partials}};ret$jscomp$0._child=function(i,data,depths){if(templateSpec.useDepths&&!depths)throw new Exception("must pass parent depths");return program(container,i,templateSpec[i],data,depths)};return ret$jscomp$0}function program(container,i,fn,data,depths){var prog=function(context,options){options=options||{};return fn.call(container,context,container.helpers,container.partials,options.data|| data,depths&&[context].concat(depths))};prog.program=i;prog.depth=depths?depths.length:0;return prog}function invokePartial(partial,name,context,helpers,partials,data,depths){var options={partial:true,helpers:helpers,partials:partials,data:data,depths:depths};if(partial===undefined)throw new Exception("The partial "+name+" could not be found");else if(partial instanceof Function)return partial(context,options)}function noop(){return""}function initData(context,data){if(!data||!("root"in data)){data= data?createFrame(data):{};data.root=context}return data}var __exports__={};var Utils=__dependency1__;var Exception=__dependency2__;var COMPILER_REVISION=__dependency3__.COMPILER_REVISION;var REVISION_CHANGES=__dependency3__.REVISION_CHANGES;var createFrame=__dependency3__.createFrame;__exports__.checkRevision=checkRevision;__exports__.template=template;__exports__.program=program;__exports__.invokePartial=invokePartial;__exports__.noop=noop;return __exports__}(__module3__,__module5__,__module2__); var __module1__=function(__dependency1__,__dependency2__,__dependency3__,__dependency4__,__dependency5__){var base=__dependency1__;var SafeString=__dependency2__;var Exception=__dependency3__;var Utils=__dependency4__;var runtime=__dependency5__;var create=function(){var hb=new base.HandlebarsEnvironment;Utils.extend(hb,base);hb.SafeString=SafeString;hb.Exception=Exception;hb.Utils=Utils;hb.escapeExpression=Utils.escapeExpression;hb.VM=runtime;hb.template=function(spec){return runtime.template(spec, hb)};return hb};var Handlebars=create();Handlebars.create=create;Handlebars["default"]=Handlebars;var __exports__=Handlebars;return __exports__}(__module2__,__module4__,__module5__,__module3__,__module6__);var __module7__=function(__dependency1__){function LocationInfo(locInfo){locInfo=locInfo||{};this.firstLine=locInfo.first_line;this.firstColumn=locInfo.first_column;this.lastColumn=locInfo.last_column;this.lastLine=locInfo.last_line}var Exception=__dependency1__;var AST={ProgramNode:function(statements, strip,locInfo){LocationInfo.call(this,locInfo);this.type="program";this.statements=statements;this.strip=strip},MustacheNode:function(rawParams,hash,open,strip,locInfo){LocationInfo.call(this,locInfo);this.type="mustache";this.strip=strip;if(open!=null&&open.charAt){var escapeFlag=open.charAt(3)||open.charAt(2);this.escaped=escapeFlag!=="{"&&escapeFlag!=="\x26"}else this.escaped=!!open;if(rawParams instanceof AST.SexprNode)this.sexpr=rawParams;else this.sexpr=new AST.SexprNode(rawParams,hash);this.id= this.sexpr.id;this.params=this.sexpr.params;this.hash=this.sexpr.hash;this.eligibleHelper=this.sexpr.eligibleHelper;this.isHelper=this.sexpr.isHelper},SexprNode:function(rawParams,hash,locInfo){LocationInfo.call(this,locInfo);this.type="sexpr";this.hash=hash;var id=this.id=rawParams[0];var params=this.params=rawParams.slice(1);this.isHelper=!!(params.length||hash);this.eligibleHelper=this.isHelper||id.isSimple},PartialNode:function(partialName,context,hash,strip,locInfo){LocationInfo.call(this,locInfo); this.type="partial";this.partialName=partialName;this.context=context;this.hash=hash;this.strip=strip;this.strip.inlineStandalone=true},BlockNode:function(mustache,program,inverse,strip,locInfo){LocationInfo.call(this,locInfo);this.type="block";this.mustache=mustache;this.program=program;this.inverse=inverse;this.strip=strip;if(inverse&&!program)this.isInverse=true},RawBlockNode:function(mustache,content,close,locInfo){LocationInfo.call(this,locInfo);if(mustache.sexpr.id.original!==close)throw new Exception(mustache.sexpr.id.original+ " doesn't match "+close,this);content=new AST.ContentNode(content,locInfo);this.type="block";this.mustache=mustache;this.program=new AST.ProgramNode([content],{},locInfo)},ContentNode:function(string,locInfo){LocationInfo.call(this,locInfo);this.type="content";this.original=this.string=string},HashNode:function(pairs,locInfo){LocationInfo.call(this,locInfo);this.type="hash";this.pairs=pairs},IdNode:function(parts,locInfo){LocationInfo.call(this,locInfo);this.type="ID";var original="";var dig=[];var depth= 0;var depthString="";var i=0;for(var l=parts.length;i<l;i++){var part=parts[i].part;original+=(parts[i].separator||"")+part;if(part===".."||part==="."||part==="this")if(dig.length>0)throw new Exception("Invalid path: "+original,this);else if(part===".."){depth++;depthString+="../"}else this.isScoped=true;else dig.push(part)}this.original=original;this.parts=dig;this.string=dig.join(".");this.depth=depth;this.idName=depthString+this.string;this.isSimple=parts.length===1&&!this.isScoped&&depth===0; this.stringModeValue=this.string},PartialNameNode:function(name,locInfo){LocationInfo.call(this,locInfo);this.type="PARTIAL_NAME";this.name=name.original},DataNode:function(id,locInfo){LocationInfo.call(this,locInfo);this.type="DATA";this.id=id;this.stringModeValue=id.stringModeValue;this.idName="@"+id.stringModeValue},StringNode:function(string,locInfo){LocationInfo.call(this,locInfo);this.type="STRING";this.original=this.string=this.stringModeValue=string},NumberNode:function(number,locInfo){LocationInfo.call(this, locInfo);this.type="NUMBER";this.original=this.number=number;this.stringModeValue=Number(number)},BooleanNode:function(bool,locInfo){LocationInfo.call(this,locInfo);this.type="BOOLEAN";this.bool=bool;this.stringModeValue=bool==="true"},CommentNode:function(comment,locInfo){LocationInfo.call(this,locInfo);this.type="comment";this.comment=comment;this.strip={inlineStandalone:true}}};var __exports__=AST;return __exports__}(__module5__);var __module9__=function(){var handlebars=function(){function Parser(){this.yy= {}}var parser={trace:function trace(){},yy:{},symbols_:{"error":2,"root":3,"program":4,"EOF":5,"program_repetition0":6,"statement":7,"mustache":8,"block":9,"rawBlock":10,"partial":11,"CONTENT":12,"COMMENT":13,"openRawBlock":14,"END_RAW_BLOCK":15,"OPEN_RAW_BLOCK":16,"sexpr":17,"CLOSE_RAW_BLOCK":18,"openBlock":19,"block_option0":20,"closeBlock":21,"openInverse":22,"block_option1":23,"OPEN_BLOCK":24,"CLOSE":25,"OPEN_INVERSE":26,"inverseAndProgram":27,"INVERSE":28,"OPEN_ENDBLOCK":29,"path":30,"OPEN":31, "OPEN_UNESCAPED":32,"CLOSE_UNESCAPED":33,"OPEN_PARTIAL":34,"partialName":35,"param":36,"partial_option0":37,"partial_option1":38,"sexpr_repetition0":39,"sexpr_option0":40,"dataName":41,"STRING":42,"NUMBER":43,"BOOLEAN":44,"OPEN_SEXPR":45,"CLOSE_SEXPR":46,"hash":47,"hash_repetition_plus0":48,"hashSegment":49,"ID":50,"EQUALS":51,"DATA":52,"pathSegments":53,"SEP":54,"$accept":0,"$end":1},terminals_:{2:"error",5:"EOF",12:"CONTENT",13:"COMMENT",15:"END_RAW_BLOCK",16:"OPEN_RAW_BLOCK",18:"CLOSE_RAW_BLOCK", 24:"OPEN_BLOCK",25:"CLOSE",26:"OPEN_INVERSE",28:"INVERSE",29:"OPEN_ENDBLOCK",31:"OPEN",32:"OPEN_UNESCAPED",33:"CLOSE_UNESCAPED",34:"OPEN_PARTIAL",42:"STRING",43:"NUMBER",44:"BOOLEAN",45:"OPEN_SEXPR",46:"CLOSE_SEXPR",50:"ID",51:"EQUALS",52:"DATA",54:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[10,3],[14,3],[9,4],[9,4],[19,3],[22,3],[27,2],[21,3],[8,3],[8,3],[11,5],[11,4],[17,3],[17,1],[36,1],[36,1],[36,1],[36,1],[36,1],[36,3],[47,1],[49,3],[35,1],[35,1],[35,1],[41,2],[30, 1],[53,3],[53,1],[6,0],[6,2],[20,0],[20,1],[23,0],[23,1],[37,0],[37,1],[38,0],[38,1],[39,0],[39,2],[40,0],[40,1],[48,1],[48,2]],performAction:function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:yy.prepareProgram($$[$0-1].statements,true);return $$[$0-1];break;case 2:this.$=new yy.ProgramNode(yy.prepareProgram($$[$0]),{},this._$);break;case 3:this.$=$$[$0];break;case 4:this.$=$$[$0];break;case 5:this.$=$$[$0];break;case 6:this.$=$$[$0];break;case 7:this.$= new yy.ContentNode($$[$0],this._$);break;case 8:this.$=new yy.CommentNode($$[$0],this._$);break;case 9:this.$=new yy.RawBlockNode($$[$0-2],$$[$0-1],$$[$0],this._$);break;case 10:this.$=new yy.MustacheNode($$[$0-1],null,"","",this._$);break;case 11:this.$=yy.prepareBlock($$[$0-3],$$[$0-2],$$[$0-1],$$[$0],false,this._$);break;case 12:this.$=yy.prepareBlock($$[$0-3],$$[$0-2],$$[$0-1],$$[$0],true,this._$);break;case 13:this.$=new yy.MustacheNode($$[$0-1],null,$$[$0-2],yy.stripFlags($$[$0-2],$$[$0]),this._$); break;case 14:this.$=new yy.MustacheNode($$[$0-1],null,$$[$0-2],yy.stripFlags($$[$0-2],$$[$0]),this._$);break;case 15:this.$={strip:yy.stripFlags($$[$0-1],$$[$0-1]),program:$$[$0]};break;case 16:this.$={path:$$[$0-1],strip:yy.stripFlags($$[$0-2],$$[$0])};break;case 17:this.$=new yy.MustacheNode($$[$0-1],null,$$[$0-2],yy.stripFlags($$[$0-2],$$[$0]),this._$);break;case 18:this.$=new yy.MustacheNode($$[$0-1],null,$$[$0-2],yy.stripFlags($$[$0-2],$$[$0]),this._$);break;case 19:this.$=new yy.PartialNode($$[$0- 3],$$[$0-2],$$[$0-1],yy.stripFlags($$[$0-4],$$[$0]),this._$);break;case 20:this.$=new yy.PartialNode($$[$0-2],undefined,$$[$0-1],yy.stripFlags($$[$0-3],$$[$0]),this._$);break;case 21:this.$=new yy.SexprNode([$$[$0-2]].concat($$[$0-1]),$$[$0],this._$);break;case 22:this.$=new yy.SexprNode([$$[$0]],null,this._$);break;case 23:this.$=$$[$0];break;case 24:this.$=new yy.StringNode($$[$0],this._$);break;case 25:this.$=new yy.NumberNode($$[$0],this._$);break;case 26:this.$=new yy.BooleanNode($$[$0],this._$); break;case 27:this.$=$$[$0];break;case 28:$$[$0-1].isHelper=true;this.$=$$[$0-1];break;case 29:this.$=new yy.HashNode($$[$0],this._$);break;case 30:this.$=[$$[$0-2],$$[$0]];break;case 31:this.$=new yy.PartialNameNode($$[$0],this._$);break;case 32:this.$=new yy.PartialNameNode(new yy.StringNode($$[$0],this._$),this._$);break;case 33:this.$=new yy.PartialNameNode(new yy.NumberNode($$[$0],this._$));break;case 34:this.$=new yy.DataNode($$[$0],this._$);break;case 35:this.$=new yy.IdNode($$[$0],this._$); break;case 36:$$[$0-2].push({part:$$[$0],separator:$$[$0-1]});this.$=$$[$0-2];break;case 37:this.$=[{part:$$[$0]}];break;case 38:this.$=[];break;case 39:$$[$0-1].push($$[$0]);break;case 48:this.$=[];break;case 49:$$[$0-1].push($$[$0]);break;case 52:this.$=[$$[$0]];break;case 53:$$[$0-1].push($$[$0]);break}},table:[{3:1,4:2,5:[2,38],6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],31:[2,38],32:[2,38],34:[2,38]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:[1,10],13:[1,11],14:16,16:[1,20], 19:14,22:15,24:[1,18],26:[1,19],28:[2,2],29:[2,2],31:[1,12],32:[1,13],34:[1,17]},{1:[2,1]},{5:[2,39],12:[2,39],13:[2,39],16:[2,39],24:[2,39],26:[2,39],28:[2,39],29:[2,39],31:[2,39],32:[2,39],34:[2,39]},{5:[2,3],12:[2,3],13:[2,3],16:[2,3],24:[2,3],26:[2,3],28:[2,3],29:[2,3],31:[2,3],32:[2,3],34:[2,3]},{5:[2,4],12:[2,4],13:[2,4],16:[2,4],24:[2,4],26:[2,4],28:[2,4],29:[2,4],31:[2,4],32:[2,4],34:[2,4]},{5:[2,5],12:[2,5],13:[2,5],16:[2,5],24:[2,5],26:[2,5],28:[2,5],29:[2,5],31:[2,5],32:[2,5],34:[2,5]}, {5:[2,6],12:[2,6],13:[2,6],16:[2,6],24:[2,6],26:[2,6],28:[2,6],29:[2,6],31:[2,6],32:[2,6],34:[2,6]},{5:[2,7],12:[2,7],13:[2,7],16:[2,7],24:[2,7],26:[2,7],28:[2,7],29:[2,7],31:[2,7],32:[2,7],34:[2,7]},{5:[2,8],12:[2,8],13:[2,8],16:[2,8],24:[2,8],26:[2,8],28:[2,8],29:[2,8],31:[2,8],32:[2,8],34:[2,8]},{17:21,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:27,30:22,41:23,50:[1,26],52:[1,25],53:24},{4:28,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]}, {4:29,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{12:[1,30]},{30:32,35:31,42:[1,33],43:[1,34],50:[1,26],53:24},{17:35,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:36,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:37,30:22,41:23,50:[1,26],52:[1,25],53:24},{25:[1,38]},{18:[2,48],25:[2,48],33:[2,48],39:39,42:[2,48],43:[2,48],44:[2,48],45:[2,48],46:[2,48],50:[2,48],52:[2,48]},{18:[2,22],25:[2,22],33:[2,22],46:[2,22]},{18:[2,35],25:[2,35],33:[2,35], 42:[2,35],43:[2,35],44:[2,35],45:[2,35],46:[2,35],50:[2,35],52:[2,35],54:[1,40]},{30:41,50:[1,26],53:24},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],52:[2,37],54:[2,37]},{33:[1,42]},{20:43,27:44,28:[1,45],29:[2,40]},{23:46,27:47,28:[1,45],29:[2,42]},{15:[1,48]},{25:[2,46],30:51,36:49,38:50,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],47:57,48:58,49:60,50:[1,59],52:[1,25],53:24},{25:[2,31],42:[2,31],43:[2,31],44:[2,31],45:[2,31],50:[2,31],52:[2,31]}, {25:[2,32],42:[2,32],43:[2,32],44:[2,32],45:[2,32],50:[2,32],52:[2,32]},{25:[2,33],42:[2,33],43:[2,33],44:[2,33],45:[2,33],50:[2,33],52:[2,33]},{25:[1,61]},{25:[1,62]},{18:[1,63]},{5:[2,17],12:[2,17],13:[2,17],16:[2,17],24:[2,17],26:[2,17],28:[2,17],29:[2,17],31:[2,17],32:[2,17],34:[2,17]},{18:[2,50],25:[2,50],30:51,33:[2,50],36:65,40:64,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],46:[2,50],47:66,48:58,49:60,50:[1,59],52:[1,25],53:24},{50:[1,67]},{18:[2,34],25:[2,34],33:[2,34],42:[2,34],43:[2,34], 44:[2,34],45:[2,34],46:[2,34],50:[2,34],52:[2,34]},{5:[2,18],12:[2,18],13:[2,18],16:[2,18],24:[2,18],26:[2,18],28:[2,18],29:[2,18],31:[2,18],32:[2,18],34:[2,18]},{21:68,29:[1,69]},{29:[2,41]},{4:70,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{21:71,29:[1,69]},{29:[2,43]},{5:[2,9],12:[2,9],13:[2,9],16:[2,9],24:[2,9],26:[2,9],28:[2,9],29:[2,9],31:[2,9],32:[2,9],34:[2,9]},{25:[2,44],37:72,47:73,48:58,49:60,50:[1,74]},{25:[1,75]},{18:[2,23],25:[2,23], 33:[2,23],42:[2,23],43:[2,23],44:[2,23],45:[2,23],46:[2,23],50:[2,23],52:[2,23]},{18:[2,24],25:[2,24],33:[2,24],42:[2,24],43:[2,24],44:[2,24],45:[2,24],46:[2,24],50:[2,24],52:[2,24]},{18:[2,25],25:[2,25],33:[2,25],42:[2,25],43:[2,25],44:[2,25],45:[2,25],46:[2,25],50:[2,25],52:[2,25]},{18:[2,26],25:[2,26],33:[2,26],42:[2,26],43:[2,26],44:[2,26],45:[2,26],46:[2,26],50:[2,26],52:[2,26]},{18:[2,27],25:[2,27],33:[2,27],42:[2,27],43:[2,27],44:[2,27],45:[2,27],46:[2,27],50:[2,27],52:[2,27]},{17:76,30:22, 41:23,50:[1,26],52:[1,25],53:24},{25:[2,47]},{18:[2,29],25:[2,29],33:[2,29],46:[2,29],49:77,50:[1,74]},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],51:[1,78],52:[2,37],54:[2,37]},{18:[2,52],25:[2,52],33:[2,52],46:[2,52],50:[2,52]},{12:[2,13],13:[2,13],16:[2,13],24:[2,13],26:[2,13],28:[2,13],29:[2,13],31:[2,13],32:[2,13],34:[2,13]},{12:[2,14],13:[2,14],16:[2,14],24:[2,14],26:[2,14],28:[2,14],29:[2,14],31:[2,14],32:[2,14],34:[2,14]},{12:[2,10]},{18:[2,21], 25:[2,21],33:[2,21],46:[2,21]},{18:[2,49],25:[2,49],33:[2,49],42:[2,49],43:[2,49],44:[2,49],45:[2,49],46:[2,49],50:[2,49],52:[2,49]},{18:[2,51],25:[2,51],33:[2,51],46:[2,51]},{18:[2,36],25:[2,36],33:[2,36],42:[2,36],43:[2,36],44:[2,36],45:[2,36],46:[2,36],50:[2,36],52:[2,36],54:[2,36]},{5:[2,11],12:[2,11],13:[2,11],16:[2,11],24:[2,11],26:[2,11],28:[2,11],29:[2,11],31:[2,11],32:[2,11],34:[2,11]},{30:79,50:[1,26],53:24},{29:[2,15]},{5:[2,12],12:[2,12],13:[2,12],16:[2,12],24:[2,12],26:[2,12],28:[2,12], 29:[2,12],31:[2,12],32:[2,12],34:[2,12]},{25:[1,80]},{25:[2,45]},{51:[1,78]},{5:[2,20],12:[2,20],13:[2,20],16:[2,20],24:[2,20],26:[2,20],28:[2,20],29:[2,20],31:[2,20],32:[2,20],34:[2,20]},{46:[1,81]},{18:[2,53],25:[2,53],33:[2,53],46:[2,53],50:[2,53]},{30:51,36:82,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],50:[1,26],52:[1,25],53:24},{25:[1,83]},{5:[2,19],12:[2,19],13:[2,19],16:[2,19],24:[2,19],26:[2,19],28:[2,19],29:[2,19],31:[2,19],32:[2,19],34:[2,19]},{18:[2,28],25:[2,28],33:[2,28],42:[2,28], 43:[2,28],44:[2,28],45:[2,28],46:[2,28],50:[2,28],52:[2,28]},{18:[2,30],25:[2,30],33:[2,30],46:[2,30],50:[2,30]},{5:[2,16],12:[2,16],13:[2,16],16:[2,16],24:[2,16],26:[2,16],28:[2,16],29:[2,16],31:[2,16],32:[2,16],34:[2,16]}],defaultActions:{4:[2,1],44:[2,41],47:[2,43],57:[2,47],63:[2,10],70:[2,15],73:[2,45]},parseError:function parseError(str,hash){throw new Error(str);},parse:function parse(input){function popStack(n){stack.length=stack.length-2*n;vstack.length=vstack.length-n;lstack.length=lstack.length- n}function lex(){var token=self.lexer.lex()||1;if(typeof token!=="number")token=self.symbols_[token]||token;return token}var self=this;var stack=[0];var vstack=[null];var lstack=[];var table=this.table;var yytext="";var yylineno=0;var yyleng=0;var recovering=0;var TERROR=2;var EOF=1;this.lexer.setInput(input);this.lexer.yy=this.yy;this.yy.lexer=this.lexer;this.yy.parser=this;if(typeof this.lexer.yylloc=="undefined")this.lexer.yylloc={};var yyloc=this.lexer.yylloc;lstack.push(yyloc);var ranges=this.lexer.options&& this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;var a;var yyval={};var p;for(var expected;true;){var state=stack[stack.length-1];if(this.defaultActions[state])var action=this.defaultActions[state];else{if(symbol===null||typeof symbol=="undefined")var symbol=lex();action=table[state]&&table[state][symbol]}if(typeof action==="undefined"||!action.length||!action[0]){var errStr="";if(!recovering){expected=[];for(p in table[state])if(this.terminals_[p]&& p>2)expected.push("'"+this.terminals_[p]+"'");if(this.lexer.showPosition)errStr="Parse error on line "+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'";else errStr="Parse error on line "+(yylineno+1)+": Unexpected "+(symbol==1?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'");this.parseError(errStr,{text:this.lexer.match,token:this.terminals_[symbol]||symbol,line:this.lexer.yylineno,loc:yyloc,expected:expected})}}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol);vstack.push(this.lexer.yytext);lstack.push(this.lexer.yylloc);stack.push(action[1]);symbol=null;if(!preErrorSymbol){yyleng=this.lexer.yyleng;yytext=this.lexer.yytext;yylineno=this.lexer.yylineno;yyloc=this.lexer.yylloc;if(recovering>0)recovering--}else{symbol=preErrorSymbol;var preErrorSymbol=null}break;case 2:var len=this.productions_[action[1]][1]; yyval.$=vstack[vstack.length-len];yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column};if(ranges)yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]];var r=this.performAction.call(yyval,yytext,yyleng,yylineno,this.yy,action[1],vstack,lstack);if(typeof r!=="undefined")return r;if(len){stack=stack.slice(0, -1*len*2);vstack=vstack.slice(0,-1*len);lstack=lstack.slice(0,-1*len)}stack.push(this.productions_[action[1]][0]);vstack.push(yyval.$);lstack.push(yyval._$);var newState=table[stack[stack.length-2]][stack[stack.length-1]];stack.push(newState);break;case 3:return true}}return true}};var lexer=function(){var lexer={EOF:1,parseError:function parseError(str,hash){if(this.yy.parser)this.yy.parser.parseError(str,hash);else throw new Error(str);},setInput:function(input){this._input=input;this._more=this._less= this.done=false;this.yylineno=this.yyleng=0;this.yytext=this.matched=this.match="";this.conditionStack=["INITIAL"];this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0};if(this.options.ranges)this.yylloc.range=[0,0];this.offset=0;return this},input:function(){var ch=this._input[0];this.yytext+=ch;this.yyleng++;this.offset++;this.match+=ch;this.matched+=ch;var lines=ch.match(/(?:\r\n?|\n).*/g);if(lines){this.yylineno++;this.yylloc.last_line++}else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++; this._input=this._input.slice(1);return ch},unput:function(ch){var len=ch.length;var lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input;this.yytext=this.yytext.substr(0,this.yytext.length-len-1);this.offset-=len;var oldLines=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1);this.matched=this.matched.substr(0,this.matched.length-1);if(lines.length-1)this.yylineno-=lines.length-1;var r=this.yylloc.range;this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+ 1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len};if(this.options.ranges)this.yylloc.range=[r[0],r[0]+this.yyleng-len];return this},more:function(){this._more=true;return this},less:function(n){this.unput(this.match.slice(n))},pastInput:function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...": "")+past.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var next=this.match;if(next.length<20)next+=this._input.substr(0,20-next.length);return(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var pre=this.pastInput();var c=(new Array(pre.length+1)).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},next:function(){if(this.done)return this.EOF;if(!this._input)this.done=true;var col;if(!this._more){this.yytext="";this.match=""}var rules=this._currentRules(); for(var i=0;i<rules.length;i++){var tempMatch=this._input.match(this.rules[rules[i]]);if(tempMatch&&(!match||tempMatch[0].length>match[0].length)){var match=tempMatch;var index=i;if(!this.options.flex)break}}if(match){var lines=match[0].match(/(?:\r\n?|\n).*/g);if(lines)this.yylineno+=lines.length;this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length: this.yylloc.last_column+match[0].length};this.yytext+=match[0];this.match+=match[0];this.matches=match;this.yyleng=this.yytext.length;if(this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];this._more=false;this._input=this._input.slice(match[0].length);this.matched+=match[0];var token=this.performAction.call(this,this.yy,this,rules[index],this.conditionStack[this.conditionStack.length-1]);if(this.done&&this._input)this.done=false;if(token)return token;else return}if(this._input=== "")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function lex(){var r=this.next();if(typeof r!=="undefined")return r;else return this.lex()},begin:function begin(condition){this.conditionStack.push(condition)},popState:function popState(){return this.conditionStack.pop()},_currentRules:function _currentRules(){return this.conditions[this.conditionStack[this.conditionStack.length- 1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function begin(condition){this.begin(condition)}};lexer.options={};lexer.performAction=function anonymous(yy,yy_,$avoiding_name_collisions,YY_START){function strip(start,end){return yy_.yytext=yy_.yytext.substr(start,yy_.yyleng-end)}var YYSTATE=YY_START;switch($avoiding_name_collisions){case 0:if(yy_.yytext.slice(-2)==="\\\\"){strip(0,1);this.begin("mu")}else if(yy_.yytext.slice(-1)==="\\"){strip(0, 1);this.begin("emu")}else this.begin("mu");if(yy_.yytext)return 12;break;case 1:return 12;break;case 2:this.popState();return 12;break;case 3:yy_.yytext=yy_.yytext.substr(5,yy_.yyleng-9);this.popState();return 15;break;case 4:return 12;break;case 5:strip(0,4);this.popState();return 13;break;case 6:return 45;break;case 7:return 46;break;case 8:return 16;break;case 9:this.popState();this.begin("raw");return 18;break;case 10:return 34;break;case 11:return 24;break;case 12:return 29;break;case 13:this.popState(); return 28;break;case 14:this.popState();return 28;break;case 15:return 26;break;case 16:return 26;break;case 17:return 32;break;case 18:return 31;break;case 19:this.popState();this.begin("com");break;case 20:strip(3,5);this.popState();return 13;break;case 21:return 31;break;case 22:return 51;break;case 23:return 50;break;case 24:return 50;break;case 25:return 54;break;case 26:break;case 27:this.popState();return 33;break;case 28:this.popState();return 25;break;case 29:yy_.yytext=strip(1,2).replace(/\\"/g, '"');return 42;break;case 30:yy_.yytext=strip(1,2).replace(/\\'/g,"'");return 42;break;case 31:return 52;break;case 32:return 44;break;case 33:return 44;break;case 34:return 43;break;case 35:return 50;break;case 36:yy_.yytext=strip(1,2);return 50;break;case 37:return"INVALID";break;case 38:return 5;break}};lexer.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{\/)))/, /^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/];lexer.conditions={"mu":{"rules":[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"com":{"rules":[5],"inclusive":false},"raw":{"rules":[3,4],"inclusive":false},"INITIAL":{"rules":[0,1,38],"inclusive":true}};return lexer}();parser.lexer= lexer;Parser.prototype=parser;parser.Parser=Parser;return new Parser}();var __exports__=handlebars;return __exports__}();var __module10__=function(__dependency1__){function stripFlags(open,close){return{left:open.charAt(2)==="~",right:close.charAt(close.length-3)==="~"}}function prepareBlock(mustache,program,inverseAndProgram,close,inverted,locInfo){if(mustache.sexpr.id.original!==close.path.original)throw new Exception(mustache.sexpr.id.original+" doesn't match "+close.path.original,mustache);var inverse= inverseAndProgram&&inverseAndProgram.program;var strip={left:mustache.strip.left,right:close.strip.right,openStandalone:isNextWhitespace(program.statements),closeStandalone:isPrevWhitespace((inverse||program).statements)};if(mustache.strip.right)omitRight(program.statements,null,true);if(inverse){var inverseStrip=inverseAndProgram.strip;if(inverseStrip.left)omitLeft(program.statements,null,true);if(inverseStrip.right)omitRight(inverse.statements,null,true);if(close.strip.left)omitLeft(inverse.statements, null,true);if(isPrevWhitespace(program.statements)&&isNextWhitespace(inverse.statements)){omitLeft(program.statements);omitRight(inverse.statements)}}else if(close.strip.left)omitLeft(program.statements,null,true);if(inverted)return new this.BlockNode(mustache,inverse,program,strip,locInfo);else return new this.BlockNode(mustache,program,inverse,strip,locInfo)}function prepareProgram(statements,isRoot){var i=0;for(var l=statements.length;i<l;i++){var current=statements[i];var strip=current.strip; if(!strip)continue;var _isPrevWhitespace=isPrevWhitespace(statements,i,isRoot,current.type==="partial");var _isNextWhitespace=isNextWhitespace(statements,i,isRoot);var openStandalone=strip.openStandalone&&_isPrevWhitespace;var closeStandalone=strip.closeStandalone&&_isNextWhitespace;var inlineStandalone=strip.inlineStandalone&&_isPrevWhitespace&&_isNextWhitespace;if(strip.right)omitRight(statements,i,true);if(strip.left)omitLeft(statements,i,true);if(inlineStandalone){omitRight(statements,i);if(omitLeft(statements, i))if(current.type==="partial")current.indent=/([ \t]+$)/.exec(statements[i-1].original)?RegExp.$1:""}if(openStandalone){omitRight((current.program||current.inverse).statements);omitLeft(statements,i)}if(closeStandalone){omitRight(statements,i);omitLeft((current.inverse||current.program).statements)}}return statements}function isPrevWhitespace(statements,i,isRoot){if(i===undefined)i=statements.length;var prev=statements[i-1];var sibling=statements[i-2];if(!prev)return isRoot;if(prev.type==="content")return(sibling|| !isRoot?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(prev.original)}function isNextWhitespace(statements,i,isRoot){if(i===undefined)i=-1;var next=statements[i+1];var sibling=statements[i+2];if(!next)return isRoot;if(next.type==="content")return(sibling||!isRoot?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(next.original)}function omitRight(statements,i,multiple){var current=statements[i==null?0:i+1];if(!current||current.type!=="content"||!multiple&¤t.rightStripped)return;var original=current.string;current.string= current.string.replace(multiple?/^\s+/:/^[ \t]*\r?\n?/,"");current.rightStripped=current.string!==original}function omitLeft(statements,i,multiple){var current=statements[i==null?statements.length-1:i-1];if(!current||current.type!=="content"||!multiple&¤t.leftStripped)return;var original=current.string;current.string=current.string.replace(multiple?/\s+$/:/[ \t]+$/,"");current.leftStripped=current.string!==original;return current.leftStripped}var __exports__={};var Exception=__dependency1__; __exports__.stripFlags=stripFlags;__exports__.prepareBlock=prepareBlock;__exports__.prepareProgram=prepareProgram;return __exports__}(__module5__);var __module8__=function(__dependency1__,__dependency2__,__dependency3__,__dependency4__){function parse(input){if(input.constructor===AST.ProgramNode)return input;parser.yy=yy;return parser.parse(input)}var __exports__={};var parser=__dependency1__;var AST=__dependency2__;var Helpers=__dependency3__;var extend=__dependency4__.extend;__exports__.parser= parser;var yy={};extend(yy,Helpers,AST);__exports__.parse=parse;return __exports__}(__module9__,__module7__,__module10__,__module3__);var __module11__=function(__dependency1__,__dependency2__){function Compiler(){}function precompile(input,options,env){if(input==null||typeof input!=="string"&&input.constructor!==env.AST.ProgramNode)throw new Exception("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+input);options=options||{};if(!("data"in options))options.data=true; if(options.compat)options.useDepths=true;var ast=env.parse(input);var environment=(new env.Compiler).compile(ast,options);return(new env.JavaScriptCompiler).compile(environment,options)}function compile(input,options$jscomp$0,env){function compileInput(){var ast=env.parse(input);var environment=(new env.Compiler).compile(ast,options$jscomp$0);var templateSpec=(new env.JavaScriptCompiler).compile(environment,options$jscomp$0,undefined,true);return env.template(templateSpec)}if(input==null||typeof input!== "string"&&input.constructor!==env.AST.ProgramNode)throw new Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+input);options$jscomp$0=options$jscomp$0||{};if(!("data"in options$jscomp$0))options$jscomp$0.data=true;if(options$jscomp$0.compat)options$jscomp$0.useDepths=true;var compiled;var ret=function(context,options){if(!compiled)compiled=compileInput();return compiled.call(this,context,options)};ret._setup=function(options){if(!compiled)compiled=compileInput(); return compiled._setup(options)};ret._child=function(i,data,depths){if(!compiled)compiled=compileInput();return compiled._child(i,data,depths)};return ret}function argEquals(a,b){if(a===b)return true;if(isArray(a)&&isArray(b)&&a.length===b.length){for(var i=0;i<a.length;i++)if(!argEquals(a[i],b[i]))return false;return true}}var __exports__={};var Exception=__dependency1__;var isArray=__dependency2__.isArray;var slice=[].slice;__exports__.Compiler=Compiler;Compiler.prototype={compiler:Compiler,equals:function(other){var len= this.opcodes.length;if(other.opcodes.length!==len)return false;for(var i=0;i<len;i++){var opcode=this.opcodes[i];var otherOpcode=other.opcodes[i];if(opcode.opcode!==otherOpcode.opcode||!argEquals(opcode.args,otherOpcode.args))return false}len=this.children.length;for(i=0;i<len;i++)if(!this.children[i].equals(other.children[i]))return false;return true},guid:0,compile:function(program,options){this.opcodes=[];this.children=[];this.depths={list:[]};this.options=options;this.stringParams=options.stringParams; this.trackIds=options.trackIds;var knownHelpers=this.options.knownHelpers;this.options.knownHelpers={"helperMissing":true,"blockHelperMissing":true,"each":true,"if":true,"unless":true,"with":true,"log":true,"lookup":true};if(knownHelpers)for(var name in knownHelpers)this.options.knownHelpers[name]=knownHelpers[name];return this.accept(program)},accept:function(node){return this[node.type](node)},program:function(program){var statements=program.statements;var i=0;for(var l=statements.length;i<l;i++)this.accept(statements[i]); this.isSimple=l===1;this.depths.list=this.depths.list.sort(function(a,b){return a-b});return this},compileProgram:function(program){var result=(new this.compiler).compile(program,this.options);var guid=this.guid++;this.usePartial=this.usePartial||result.usePartial;this.children[guid]=result;var i=0;for(var l=result.depths.list.length;i<l;i++){var depth=result.depths.list[i];if(depth<2)continue;else this.addDepth(depth-1)}return guid},block:function(block){var mustache=block.mustache;var program=block.program; var inverse=block.inverse;if(program)program=this.compileProgram(program);if(inverse)inverse=this.compileProgram(inverse);var sexpr=mustache.sexpr;var type=this.classifySexpr(sexpr);if(type==="helper")this.helperSexpr(sexpr,program,inverse);else if(type==="simple"){this.simpleSexpr(sexpr);this.opcode("pushProgram",program);this.opcode("pushProgram",inverse);this.opcode("emptyHash");this.opcode("blockValue",sexpr.id.original)}else{this.ambiguousSexpr(sexpr,program,inverse);this.opcode("pushProgram", program);this.opcode("pushProgram",inverse);this.opcode("emptyHash");this.opcode("ambiguousBlockValue")}this.opcode("append")},hash:function(hash){var pairs=hash.pairs;var i;var l;this.opcode("pushHash");for(i=0,l=pairs.length;i<l;i++)this.pushParam(pairs[i][1]);for(;i--;)this.opcode("assignToHash",pairs[i][0]);this.opcode("popHash")},partial:function(partial){var partialName=partial.partialName;this.usePartial=true;if(partial.hash)this.accept(partial.hash);else this.opcode("push","undefined");if(partial.context)this.accept(partial.context); else{this.opcode("getContext",0);this.opcode("pushContext")}this.opcode("invokePartial",partialName.name,partial.indent||"");this.opcode("append")},content:function(content){if(content.string)this.opcode("appendContent",content.string)},mustache:function(mustache){this.sexpr(mustache.sexpr);if(mustache.escaped&&!this.options.noEscape)this.opcode("appendEscaped");else this.opcode("append")},ambiguousSexpr:function(sexpr,program,inverse){var id=sexpr.id;var name=id.parts[0];var isBlock=program!=null|| inverse!=null;this.opcode("getContext",id.depth);this.opcode("pushProgram",program);this.opcode("pushProgram",inverse);this.ID(id);this.opcode("invokeAmbiguous",name,isBlock)},simpleSexpr:function(sexpr){var id=sexpr.id;if(id.type==="DATA")this.DATA(id);else if(id.parts.length)this.ID(id);else{this.addDepth(id.depth);this.opcode("getContext",id.depth);this.opcode("pushContext")}this.opcode("resolvePossibleLambda")},helperSexpr:function(sexpr,program,inverse){var params=this.setupFullMustacheParams(sexpr, program,inverse);var id=sexpr.id;var name=id.parts[0];if(this.options.knownHelpers[name])this.opcode("invokeKnownHelper",params.length,name);else if(this.options.knownHelpersOnly)throw new Exception("You specified knownHelpersOnly, but used the unknown helper "+name,sexpr);else{id.falsy=true;this.ID(id);this.opcode("invokeHelper",params.length,id.original,id.isSimple)}},sexpr:function(sexpr){var type=this.classifySexpr(sexpr);if(type==="simple")this.simpleSexpr(sexpr);else if(type==="helper")this.helperSexpr(sexpr); else this.ambiguousSexpr(sexpr)},ID:function(id){this.addDepth(id.depth);this.opcode("getContext",id.depth);var name=id.parts[0];if(!name)this.opcode("pushContext");else this.opcode("lookupOnContext",id.parts,id.falsy,id.isScoped)},DATA:function(data){this.options.data=true;this.opcode("lookupData",data.id.depth,data.id.parts)},STRING:function(string){this.opcode("pushString",string.string)},NUMBER:function(number){this.opcode("pushLiteral",number.number)},BOOLEAN:function(bool){this.opcode("pushLiteral", bool.bool)},comment:function(){},opcode:function(name){this.opcodes.push({opcode:name,args:slice.call(arguments,1)})},addDepth:function(depth){if(depth===0)return;if(!this.depths[depth]){this.depths[depth]=true;this.depths.list.push(depth)}},classifySexpr:function(sexpr){var isHelper=sexpr.isHelper;var isEligible=sexpr.eligibleHelper;var options=this.options;if(isEligible&&!isHelper){var name=sexpr.id.parts[0];if(options.knownHelpers[name])isHelper=true;else if(options.knownHelpersOnly)isEligible= false}if(isHelper)return"helper";else if(isEligible)return"ambiguous";else return"simple"},pushParams:function(params){var i=0;for(var l=params.length;i<l;i++)this.pushParam(params[i])},pushParam:function(val){if(this.stringParams){if(val.depth)this.addDepth(val.depth);this.opcode("getContext",val.depth||0);this.opcode("pushStringParam",val.stringModeValue,val.type);if(val.type==="sexpr")this.sexpr(val)}else{if(this.trackIds)this.opcode("pushId",val.type,val.idName||val.stringModeValue);this.accept(val)}}, setupFullMustacheParams:function(sexpr,program,inverse){var params=sexpr.params;this.pushParams(params);this.opcode("pushProgram",program);this.opcode("pushProgram",inverse);if(sexpr.hash)this.hash(sexpr.hash);else this.opcode("emptyHash");return params}};__exports__.precompile=precompile;__exports__.compile=compile;return __exports__}(__module5__,__module3__);var __module12__=function(__dependency1__,__dependency2__){function Literal(value){this.value=value}function JavaScriptCompiler(){}var COMPILER_REVISION= __dependency1__.COMPILER_REVISION;var REVISION_CHANGES=__dependency1__.REVISION_CHANGES;var Exception=__dependency2__;JavaScriptCompiler.prototype={nameLookup:function(parent,name){if(JavaScriptCompiler.isValidJavaScriptVariableName(name))return parent+"."+name;else return parent+"['"+name+"']"},depthedLookup:function(name){this.aliases.lookup="this.lookup";return'lookup(depths, "'+name+'")'},compilerInfo:function(){var revision=COMPILER_REVISION;var versions=REVISION_CHANGES[revision];return[revision, versions]},appendToBuffer:function(string){if(this.environment.isSimple)return"return "+string+";";else return{appendToBuffer:true,content:string,toString:function(){return"buffer +\x3d "+string+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(environment,options,context,asObject){this.environment=environment;this.options=options;this.stringParams=this.options.stringParams;this.trackIds=this.options.trackIds;this.precompile=!asObject;this.name= this.environment.name;this.isChild=!!context;this.context=context||{programs:[],environments:[]};this.preamble();this.stackSlot=0;this.stackVars=[];this.aliases={};this.registers={list:[]};this.hashes=[];this.compileStack=[];this.inlineStack=[];this.compileChildren(environment,options);this.useDepths=this.useDepths||environment.depths.list.length||this.options.compat;var opcodes=environment.opcodes;var i;var l;for(i=0,l=opcodes.length;i<l;i++){var opcode=opcodes[i];this[opcode.opcode].apply(this, opcode.args)}this.pushSource("");if(this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new Exception("Compile completed with content left on stack");var fn=this.createFunctionContext(asObject);if(!this.isChild){var ret={compiler:this.compilerInfo(),main:fn};var programs=this.context.programs;for(i=0,l=programs.length;i<l;i++)if(programs[i])ret[i]=programs[i];if(this.environment.usePartial)ret.usePartial=true;if(this.options.data)ret.useData=true;if(this.useDepths)ret.useDepths= true;if(this.options.compat)ret.compat=true;if(!asObject){ret.compiler=JSON.stringify(ret.compiler);ret=this.objectLiteral(ret)}return ret}else return fn},preamble:function(){this.lastContext=0;this.source=[]},createFunctionContext:function(asObject){var varDeclarations="";var locals=this.stackVars.concat(this.registers.list);if(locals.length>0)varDeclarations+=", "+locals.join(", ");for(var alias in this.aliases)if(this.aliases.hasOwnProperty(alias))varDeclarations+=", "+alias+"\x3d"+this.aliases[alias]; var params=["depth0","helpers","partials","data"];if(this.useDepths)params.push("depths");var source=this.mergeSource(varDeclarations);if(asObject){params.push(source);return Function.apply(this,params)}else return"function("+params.join(",")+") {\n "+source+"}"},mergeSource:function(varDeclarations){var source="";var appendOnly=!this.forceBuffer;var i=0;for(var len=this.source.length;i<len;i++){var line=this.source[i];if(line.appendToBuffer)if(buffer)var buffer=buffer+"\n + "+line.content;else buffer= line.content;else{if(buffer){if(!source){var appendFirst=true;source=buffer+";\n "}else source+="buffer +\x3d "+buffer+";\n ";buffer=undefined}source+=line+"\n ";if(!this.environment.isSimple)appendOnly=false}}if(appendOnly){if(buffer||!source)source+="return "+(buffer||'""')+";\n"}else{varDeclarations+=", buffer \x3d "+(appendFirst?"":this.initializeBuffer());if(buffer)source+="return buffer + "+buffer+";\n";else source+="return buffer;\n"}if(varDeclarations)source="var "+varDeclarations.substring(2)+ (appendFirst?"":";\n ")+source;return source},blockValue:function(name){this.aliases.blockHelperMissing="helpers.blockHelperMissing";var params=[this.contextName(0)];this.setupParams(name,0,params);var blockName=this.popStack();params.splice(1,0,blockName);this.push("blockHelperMissing.call("+params.join(", ")+")")},ambiguousBlockValue:function(){this.aliases.blockHelperMissing="helpers.blockHelperMissing";var params=[this.contextName(0)];this.setupParams("",0,params,true);this.flushInline();var current= this.topStack();params.splice(1,0,current);this.pushSource("if (!"+this.lastHelper+") { "+current+" \x3d blockHelperMissing.call("+params.join(", ")+"); }")},appendContent:function(content){if(this.pendingContent)content=this.pendingContent+content;this.pendingContent=content},append:function(){this.flushInline();var local=this.popStack();this.pushSource("if ("+local+" !\x3d null) { "+this.appendToBuffer(local)+" }");if(this.environment.isSimple)this.pushSource("else { "+this.appendToBuffer("''")+ " }")},appendEscaped:function(){this.aliases.escapeExpression="this.escapeExpression";this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(depth){this.lastContext=depth},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(parts,falsy,scoped){var i=0;var len=parts.length;if(!scoped&&this.options.compat&&!this.lastContext)this.push(this.depthedLookup(parts[i++]));else this.pushContext();for(;i<len;i++)this.replaceStack(function(current){var lookup= this.nameLookup(current,parts[i],"context");if(!falsy)return" !\x3d null ? "+lookup+" : "+current;else return" \x26\x26 "+lookup})},lookupData:function(depth,parts){if(!depth)this.pushStackLiteral("data");else this.pushStackLiteral("this.data(data, "+depth+")");var len=parts.length;for(var i=0;i<len;i++)this.replaceStack(function(current){return" \x26\x26 "+this.nameLookup(current,parts[i],"data")})},resolvePossibleLambda:function(){this.aliases.lambda="this.lambda";this.push("lambda("+this.popStack()+ ", "+this.contextName(0)+")")},pushStringParam:function(string,type){this.pushContext();this.pushString(type);if(type!=="sexpr")if(typeof string==="string")this.pushString(string);else this.pushStackLiteral(string)},emptyHash:function(){this.pushStackLiteral("{}");if(this.trackIds)this.push("{}");if(this.stringParams){this.push("{}");this.push("{}")}},pushHash:function(){if(this.hash)this.hashes.push(this.hash);this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var hash=this.hash; this.hash=this.hashes.pop();if(this.trackIds)this.push("{"+hash.ids.join(",")+"}");if(this.stringParams){this.push("{"+hash.contexts.join(",")+"}");this.push("{"+hash.types.join(",")+"}")}this.push("{\n "+hash.values.join(",\n ")+"\n }")},pushString:function(string){this.pushStackLiteral(this.quotedString(string))},push:function(expr){this.inlineStack.push(expr);return expr},pushLiteral:function(value){this.pushStackLiteral(value)},pushProgram:function(guid){if(guid!=null)this.pushStackLiteral(this.programExpression(guid)); else this.pushStackLiteral(null)},invokeHelper:function(paramSize,name,isSimple){this.aliases.helperMissing="helpers.helperMissing";var nonHelper=this.popStack();var helper=this.setupHelper(paramSize,name);var lookup=(isSimple?helper.name+" || ":"")+nonHelper+" || helperMissing";this.push("(("+lookup+").call("+helper.callParams+"))")},invokeKnownHelper:function(paramSize,name){var helper=this.setupHelper(paramSize,name);this.push(helper.name+".call("+helper.callParams+")")},invokeAmbiguous:function(name, helperCall){this.aliases.functionType='"function"';this.aliases.helperMissing="helpers.helperMissing";this.useRegister("helper");var nonHelper=this.popStack();this.emptyHash();var helper=this.setupHelper(0,name,helperCall);var helperName=this.lastHelper=this.nameLookup("helpers",name,"helper");this.push("((helper \x3d (helper \x3d "+helperName+" || "+nonHelper+") !\x3d null ? helper : helperMissing"+(helper.paramsInit?"),("+helper.paramsInit:"")+"),"+"(typeof helper \x3d\x3d\x3d functionType ? helper.call("+ helper.callParams+") : helper))")},invokePartial:function(name,indent){var params=[this.nameLookup("partials",name,"partial"),"'"+indent+"'","'"+name+"'",this.popStack(),this.popStack(),"helpers","partials"];if(this.options.data)params.push("data");else if(this.options.compat)params.push("undefined");if(this.options.compat)params.push("depths");this.push("this.invokePartial("+params.join(", ")+")")},assignToHash:function(key){var value=this.popStack();if(this.trackIds)var id=this.popStack();if(this.stringParams){var type= this.popStack();var context=this.popStack()}var hash=this.hash;if(context)hash.contexts.push("'"+key+"': "+context);if(type)hash.types.push("'"+key+"': "+type);if(id)hash.ids.push("'"+key+"': "+id);hash.values.push("'"+key+"': ("+value+")")},pushId:function(type,name){if(type==="ID"||type==="DATA")this.pushString(name);else if(type==="sexpr")this.pushStackLiteral("true");else this.pushStackLiteral("null")},compiler:JavaScriptCompiler,compileChildren:function(environment,options){var children=environment.children; var i=0;for(var l=children.length;i<l;i++){var child=children[i];var compiler=new this.compiler;var index=this.matchExistingProgram(child);if(index==null){this.context.programs.push("");index=this.context.programs.length;child.index=index;child.name="program"+index;this.context.programs[index]=compiler.compile(child,options,this.context,!this.precompile);this.context.environments[index]=child;this.useDepths=this.useDepths||compiler.useDepths}else{child.index=index;child.name="program"+index}}},matchExistingProgram:function(child){var i= 0;for(var len=this.context.environments.length;i<len;i++){var environment=this.context.environments[i];if(environment&&environment.equals(child))return i}},programExpression:function(guid){var child=this.environment.children[guid];var depths=child.depths.list;var useDepths=this.useDepths;var depth;var programParams=[child.index,"data"];if(useDepths)programParams.push("depths");return"this.program("+programParams.join(", ")+")"},useRegister:function(name){if(!this.registers[name]){this.registers[name]= true;this.registers.list.push(name)}},pushStackLiteral:function(item){return this.push(new Literal(item))},pushSource:function(source){if(this.pendingContent){this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent)));this.pendingContent=undefined}if(source)this.source.push(source)},pushStack:function(item){this.flushInline();var stack=this.incrStack();this.pushSource(stack+" \x3d "+item+";");this.compileStack.push(stack);return stack},replaceStack:function(callback){var prefix= "";var inline=this.isInline();var stack;if(!this.isInline())throw new Exception("replaceStack on non-inline");var top=this.popStack(true);if(top instanceof Literal){prefix=stack=top.value;var usedLiteral=true}else{var createdStack=!this.stackSlot;var name=!createdStack?this.topStackName():this.incrStack();prefix="("+this.push(name)+" \x3d "+top+")";stack=this.topStack()}var item=callback.call(this,stack);if(!usedLiteral)this.popStack();if(createdStack)this.stackSlot--;this.push("("+prefix+item+")")}, incrStack:function(){this.stackSlot++;if(this.stackSlot>this.stackVars.length)this.stackVars.push("stack"+this.stackSlot);return this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var inlineStack=this.inlineStack;if(inlineStack.length){this.inlineStack=[];var i=0;for(var len=inlineStack.length;i<len;i++){var entry=inlineStack[i];if(entry instanceof Literal)this.compileStack.push(entry);else this.pushStack(entry)}}},isInline:function(){return this.inlineStack.length}, popStack:function(wrapped){var inline=this.isInline();var item=(inline?this.inlineStack:this.compileStack).pop();if(!wrapped&&item instanceof Literal)return item.value;else{if(!inline){if(!this.stackSlot)throw new Exception("Invalid stack pop");this.stackSlot--}return item}},topStack:function(){var stack=this.isInline()?this.inlineStack:this.compileStack;var item=stack[stack.length-1];if(item instanceof Literal)return item.value;else return item},contextName:function(context){if(this.useDepths&&context)return"depths["+ context+"]";else return"depth"+context},quotedString:function(str){return'"'+str.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(obj){var pairs=[];for(var key in obj)if(obj.hasOwnProperty(key))pairs.push(this.quotedString(key)+":"+obj[key]);return"{"+pairs.join(",")+"}"},setupHelper:function(paramSize,name,blockHelper){var params=[];var paramsInit=this.setupParams(name,paramSize, params,blockHelper);var foundHelper=this.nameLookup("helpers",name,"helper");return{params:params,paramsInit:paramsInit,name:foundHelper,callParams:[this.contextName(0)].concat(params).join(", ")}},setupOptions:function(helper,paramSize,params){var options={};var contexts=[];var types=[];var ids=[];options.name=this.quotedString(helper);options.hash=this.popStack();if(this.trackIds)options.hashIds=this.popStack();if(this.stringParams){options.hashTypes=this.popStack();options.hashContexts=this.popStack()}var inverse= this.popStack();var program=this.popStack();if(program||inverse){if(!program)program="this.noop";if(!inverse)inverse="this.noop";options.fn=program;options.inverse=inverse}for(var i=paramSize;i--;){var param=this.popStack();params[i]=param;if(this.trackIds)ids[i]=this.popStack();if(this.stringParams){types[i]=this.popStack();contexts[i]=this.popStack()}}if(this.trackIds)options.ids="["+ids.join(",")+"]";if(this.stringParams){options.types="["+types.join(",")+"]";options.contexts="["+contexts.join(",")+ "]"}if(this.options.data)options.data="data";return options},setupParams:function(helperName,paramSize,params,useRegister){var options=this.objectLiteral(this.setupOptions(helperName,paramSize,params));if(useRegister){this.useRegister("options");params.push("options");return"options\x3d"+options}else{params.push(options);return""}}};var reservedWords=("break else new var"+" case finally return void"+" catch for switch while"+" continue function this with"+" default if throw"+" delete in try"+" do instanceof typeof"+ " abstract enum int short"+" boolean export interface static"+" byte extends long super"+" char final native synchronized"+" class float package throws"+" const goto private transient"+" debugger implements protected volatile"+" double import public let yield").split(" ");var compilerWords=JavaScriptCompiler.RESERVED_WORDS={};var i$jscomp$0=0;for(var l$jscomp$0=reservedWords.length;i$jscomp$0<l$jscomp$0;i$jscomp$0++)compilerWords[reservedWords[i$jscomp$0]]=true;JavaScriptCompiler.isValidJavaScriptVariableName= function(name){return!JavaScriptCompiler.RESERVED_WORDS[name]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name)};var __exports__=JavaScriptCompiler;return __exports__}(__module2__,__module5__);var __module0__=function(__dependency1__,__dependency2__,__dependency3__,__dependency4__,__dependency5__){var Handlebars=__dependency1__;var AST=__dependency2__;var Parser=__dependency3__.parser;var parse=__dependency3__.parse;var Compiler=__dependency4__.Compiler;var compile=__dependency4__.compile;var precompile=__dependency4__.precompile; var JavaScriptCompiler=__dependency5__;var _create=Handlebars.create;var create=function(){var hb=_create();hb.compile=function(input,options){return compile(input,options,hb)};hb.precompile=function(input,options){return precompile(input,options,hb)};hb.AST=AST;hb.Compiler=Compiler;hb.JavaScriptCompiler=JavaScriptCompiler;hb.Parser=Parser;hb.parse=parse;return hb};Handlebars=create();Handlebars.create=create;Handlebars["default"]=Handlebars;var __exports__=Handlebars;return __exports__}(__module1__, __module7__,__module8__,__module11__,__module12__);return __module0__}); (function($){$.widget("abaxx.contextmenu",{options:{triggerEvent:"contextmenu",trigger:null,menuId:null,zIndex:1,lazy:true,dropDownMenuClass:"drop-down-menu",contextMenuClass:"context-menu",anchor:null},contextEventTarget:null,_timer:null,_deferredClose:function(element){var self=this;if(self._timer)window.clearTimeout(self._timer);self._timer=window.setTimeout(function(){self._hide(element)},250)},_generateId:function(){for(var id="contextmenu_"+Math.floor(Math.random()*1E3);document.getElementById(id);)id= "contextmenu_"+Math.floor(Math.random()*1E3);return id},_removeOrphans:function(base){var menuId=this.options.menuId;base.each(function(index,element){var oldMenu=jQuery(element).data("contextmenu");if(oldMenu&&oldMenu.destroy){oldMenu.destroy();jQuery(element).data("contextmenu",null)}if(menuId){var oldElement=document.getElementById(menuId);if(oldElement){oldMenu=jQuery(oldElement).data("contextmenu");if(oldMenu&&oldMenu.destroy)oldMenu.destroy();jQuery(oldElement).remove()}}})},_setupTrigger:function(triggerEvent, triggerSelector){var self=this;if(jQuery.isPlainObject(triggerSelector))jQuery.each(triggerSelector,function(eventName,selector){if(triggerSelector.hasOwnProperty(eventName)&&selector)self._setupTrigger(eventName,selector)});else{var $trigger=jQuery(triggerSelector);this._removeOrphans($trigger);$trigger.data("contextmenu",this).on(triggerEvent+this.eventNamespace,function(event){self.show(event)});$trigger.find("a").on("click",function(event){if(event.ctrlKey){event.stopPropagation();event.preventDefault()}}); this.trigger=(this.trigger||jQuery()).add(triggerSelector)}},_removeTrigger:function(){this.trigger.off(this.eventNamespace)},_create:function(){var self=this;this.rendered=false;this.options.menuId=(this.options.menuId||this._generateId()).replace(/[:.\s]/g,"_");this.eventNamespace=".contextmenu"+this.options.menuId;this.element.hide().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").css({position:"absolute",zIndex:this.options.zIndex});this._setupTrigger(this.options.triggerEvent,this.options.trigger); if(!this.options.lazy)this.render();jQuery(this.element).on("mouseenter"+this.eventNamespace,".ui-menu-item",function(){jQuery(this).addClass("ui-state-focus").parents(".ui-menu-item").addClass("ui-state-active")}).on("mouseleave"+this.eventNamespace,".ui-menu-item",function(){jQuery(this).removeClass("ui-state-focus").parents(".ui-menu-item").removeClass("ui-state-active")}).on("mouseenter"+this.eventNamespace,".has-submenu",jQuery.proxy(self._showSubMenu,self)).on("mouseleave"+this.eventNamespace, ".has-submenu",function(){self._deferredClose(jQuery(this).find("\x3e .submenu")[0])});jQuery(document).on("contextmenu-closeall"+this.eventNamespace,function(event){if(event.target!==self.element[0])self.close()}).on("keyup"+this.eventNamespace,function(event){if(event.keyCode===27)self.close()})},_destroy:function(){jQuery(document).off(this.eventNamespace);this._removeTrigger()},_showSubMenu:function(event){var $parent=jQuery(event.currentTarget);var $submenu=$parent.find("\x3e .ui-menu");$parent.siblings(".has-submenu").each(function(i, siblingMenu){jQuery(siblingMenu).removeClass("ui-state-active").find("\x3e .submenu:visible").removeClass("ui-state-active").hide()});$submenu.addClass("ui-state-active").show().position({my:"left top",at:"right top",of:$parent})},_hide:function(submenu){jQuery(submenu).removeClass("ui-state-active").hide()},_menuItemClicked:function(event){var $item=jQuery(event.currentTarget);var itemData=$item.data("contextmenuitem");var disabled=$item.is(".ui-state-disabled");var eventHandled=false;if(!disabled)if(jQuery.isFunction(itemData.onclick)){itemData.onclick.call(this, event);eventHandled=true}else if(jQuery.isPlainObject(itemData.onclick)&&jQuery.isFunction(itemData.onclick.fn)){itemData.onclick.fn.call(itemData.onclick.scope||this,"click",event,itemData.onclick.obj||this);eventHandled=true}else if(itemData.url&&jQuery(event.target).is(":not(a)")){eventHandled=true;var $anchor=$item.find("a[href]");if($anchor.length>0)$anchor[0].click()}this.close();if(eventHandled||disabled){event.preventDefault();event.stopPropagation()}},_buildMenu:function($menu,menuId,itemData){var self= this;var $subMenuElement;var $item;var subMenuIndicator="\x3cspan class\x3d'ui-menu-icon ui-icon ui-icon-carat-1-e'\x3e\x3c/span\x3e";var helpTextWrapper="\x3cem class\x3d'helptext'\x3e\x3c/em\x3e";if(menuId)$menu.attr("id",menuId);jQuery.each(itemData,function(index,item){if(jQuery.isArray(item)){if(index>0)$menu.append(jQuery.parseHTML("\x3cli class\x3d'ui-menu-divider ui-corner-all'\x3e\x3c/li\x3e"));self._buildMenu($menu,menuId,item)}else{$item=jQuery(jQuery.parseHTML("\x3cli class\x3d'ui-menu-item ui-corner-all'\x3e\x3ca href\x3d'#'\x3e"+ item.text+"\x3c/a\x3e\x3c/li\x3e"));$item.toggleClass("ui-state-disabled",item.disabled===true);if(item.classname)$item.addClass(item.classname);if(item.id)$item.attr("id",item.id);if(item.url)$item.find("\x3e a").attr("href",item.url);if(item.title)$item.attr("title",item.title);$item.data("contextmenuitem",item).click(jQuery.proxy(self._menuItemClicked,self));if(item.submenu){$subMenuElement=jQuery(jQuery.parseHTML("\x3cul class\x3d'ui-menu ui-widget ui-widget-content ui-corner-all submenu' /\x3e")); $subMenuElement.hide().css("position","absolute");$item.find("\x3e a").append(subMenuIndicator);$item.addClass("has-submenu").append(self._buildMenu($subMenuElement,item.submenu.id,item.submenu.itemData));if(item.disabled)$item.find(".ui-menu-item").addClass("ui-state-disabled");if(item.submenu.classname)$subMenuElement.addClass(item.submenu.classname)}else if(item.helptext)jQuery(jQuery.parseHTML(helpTextWrapper)).html(item.helptext).appendTo($item.find("\x3e a"));$item.appendTo($menu)}});return $menu}, close:function(){var closeEvent=jQuery.Event("contextmenuclose");if(jQuery.isFunction(this.options.close))if(this.options.close.call(this.element,closeEvent,this)===false)closeEvent.preventDefault();jQuery(this.contextEventTarget).trigger(closeEvent,this);if(!closeEvent.isDefaultPrevented()){this.element.hide().find("\x3e .ui-state-active").removeClass("ui-state-active");if(this.options.highlightedTriggerClass)jQuery(this.contextEventTarget).removeClass(this.options.highlightedTriggerClass);this.contextEventTarget= null}},render:function(){if(this.options.itemData){this.element.html("");this._buildMenu(this.element,this.options.menuId,this.options.itemData)}if(this.options.classname)this.element.addClass(this.options.classname);this.element.prependTo(document.body);this.rendered=true},_findContextEventTarget:function(event){if(this.options.restriction)var target=jQuery(event.target).closest(this.options.restriction)[0];else target=event.target;return target},show:function(event){var self=this;var beforeShowEvent= jQuery.Event("contextmenubeforeshow");if(event){var oldContextEventTarget=self.contextEventTarget;self.contextEventTarget=self._findContextEventTarget(event);if(self.contextEventTarget){if(jQuery.isFunction(self.options.beforeShow))if(self.options.beforeShow.call(self.element,beforeShowEvent,self)===false)beforeShowEvent.preventDefault();jQuery(self.contextEventTarget).trigger(beforeShowEvent,self);if(!beforeShowEvent.isDefaultPrevented()){if(!this.rendered)this.render();if(this.options.highlightedTriggerClass){if(oldContextEventTarget)jQuery(oldContextEventTarget).removeClass(this.options.highlightedTriggerClass); jQuery(self.contextEventTarget).addClass(this.options.highlightedTriggerClass)}this.element.trigger(jQuery.Event("contextmenu-closeall")).toggleClass(this.options.dropDownMenuClass,event.type==="click").toggleClass(this.options.contextMenuClass,event.type==="contextmenu").prependTo(document.body).show().position({my:"left top",at:"left bottom",of:this.options.anchor?this.options.anchor:event.type==="contextmenu"?event:event.currentTarget,collision:"flipfit",offset:this.options.anchor?"0 "+this.options.anchor.css("margin-bottom"): event.type==="contextmenu"?"0 10":null});jQuery(document).one("click.contextmenu",function(){self.close()});jQuery(window).resize(function(){self.close()});if(jQuery.isFunction(self.options.show))self.options.show.call(self.element,beforeShowEvent,self)}}event.preventDefault();event.stopPropagation()}},eachMenuItem:function(visitor){this.element.find("li").each(visitor)}})})(jQuery); (function(factory){if(typeof define==="function"&&define.amd)define(["jquery"],factory);else factory(typeof jQuery!="undefined"?jQuery:window.Zepto)})(function($){function doAjaxSubmit(e){var options=e.data;if(!e.isDefaultPrevented()){e.preventDefault();$(e.target).ajaxSubmit(options)}}function captureSubmittingElement(e){var target=e.target;var $el=$(target);if(!$el.is("[type\x3dsubmit],[type\x3dimage]")){var t=$el.closest("[type\x3dsubmit]");if(t.length===0)return;target=t[0]}var form=this;form.clk= target;if(target.type=="image")if(e.offsetX!==undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY}else if(typeof $.fn.offset=="function"){var offset=$el.offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top}else{form.clk_x=e.pageX-target.offsetLeft;form.clk_y=e.pageY-target.offsetTop}setTimeout(function(){form.clk=form.clk_x=form.clk_y=null},100)}function log(){if(!$.fn.ajaxSubmit.debug)return;var msg="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log)window.console.log(msg); else if(window.opera&&window.opera.postError)window.opera.postError(msg)}var feature={};feature.fileapi=$("\x3cinput type\x3d'file'/\x3e").get(0).files!==undefined;feature.formdata=window.FormData!==undefined;var hasProp=!!$.fn.prop;$.fn.attr2=function(){if(!hasProp)return this.attr.apply(this,arguments);var val=this.prop.apply(this,arguments);if(val&&val.jquery||typeof val==="string")return val;return this.attr.apply(this,arguments)};$.fn.ajaxSubmit=function(options){function deepSerialize(extraData){var serialized= $.param(extraData,options.traditional).split("\x26");var len=serialized.length;var result=[];var i;for(i=0;i<len;i++){serialized[i]=serialized[i].replace(/\+/g," ");var part=serialized[i].split("\x3d");result.push([decodeURIComponent(part[0]),decodeURIComponent(part[1])])}return result}function fileUploadXhr(a){var formdata=new FormData;for(var i=0;i<a.length;i++)formdata.append(a[i].name,a[i].value);if(options.extraData){var serializedData=deepSerialize(options.extraData);for(i=0;i<serializedData.length;i++)if(serializedData[i])formdata.append(serializedData[i][0], serializedData[i][1])}options.data=null;var s=$.extend(true,{},$.ajaxSettings,options,{contentType:false,processData:false,cache:false,type:method||"POST"});if(options.uploadProgress)s.xhr=function(){var xhr=$.ajaxSettings.xhr();if(xhr.upload)xhr.upload.addEventListener("progress",function(event){var percent=0;var position=event.loaded||event.position;var total=event.total;if(event.lengthComputable)percent=Math.ceil(position/total*100);options.uploadProgress(event,position,total,percent)},false); return xhr};s.data=null;var beforeSend=s.beforeSend;s.beforeSend=function(xhr,o){if(options.formData)o.data=options.formData;else o.data=formdata;if(beforeSend)beforeSend.call(this,xhr,o)};return $.ajax(s)}function fileUploadIframe(a$jscomp$0){function getDoc(frame){var doc=null;try{if(frame.contentWindow)doc=frame.contentWindow.document}catch(err){log("cannot get iframe.contentWindow document: "+err)}if(doc)return doc;try{doc=frame.contentDocument?frame.contentDocument:frame.document}catch(err){log("cannot get iframe.contentDocument: "+ err);doc=frame.document}return doc}function doSubmit(){function checkState(){try{var state=getDoc(io).readyState;log("state \x3d "+state);if(state&&state.toLowerCase()=="uninitialized")setTimeout(checkState,50)}catch(e){log("Server abort: ",e," (",e.name,")");cb(SERVER_ABORT);if(timeoutHandle)clearTimeout(timeoutHandle);timeoutHandle=undefined}}var t=$form.attr2("target");var a=$form.attr2("action");var mp="multipart/form-data";var et=$form.attr("enctype")||$form.attr("encoding")||mp;form.setAttribute("target", id);if(!method||/post/i.test(method))form.setAttribute("method","POST");if(a!=s$jscomp$0.url)form.setAttribute("action",s$jscomp$0.url);if(!s$jscomp$0.skipEncodingOverride&&(!method||/post/i.test(method)))$form.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});if(s$jscomp$0.timeout)timeoutHandle=setTimeout(function(){timedOut=true;cb(CLIENT_TIMEOUT_ABORT)},s$jscomp$0.timeout);var extraInputs=[];try{if(s$jscomp$0.extraData)for(var n in s$jscomp$0.extraData)if(s$jscomp$0.extraData.hasOwnProperty(n))if($.isPlainObject(s$jscomp$0.extraData[n])&& s$jscomp$0.extraData[n].hasOwnProperty("name")&&s$jscomp$0.extraData[n].hasOwnProperty("value"))extraInputs.push($('\x3cinput type\x3d"hidden" name\x3d"'+s$jscomp$0.extraData[n].name+'"\x3e').val(s$jscomp$0.extraData[n].value).appendTo(form)[0]);else extraInputs.push($('\x3cinput type\x3d"hidden" name\x3d"'+n+'"\x3e').val(s$jscomp$0.extraData[n]).appendTo(form)[0]);if(!s$jscomp$0.iframeTarget)$io.appendTo("body");if(io.attachEvent)io.attachEvent("onload",cb);else io.addEventListener("load",cb,false); setTimeout(checkState,15);try{form.submit()}catch(err){var submitFn=document.createElement("form").submit;submitFn.apply(form)}}finally{form.setAttribute("action",a);form.setAttribute("enctype",et);if(t)form.setAttribute("target",t);else $form.removeAttr("target");$(extraInputs).remove()}}function cb(e){if(xhr$jscomp$0.aborted||callbackProcessed)return;doc$jscomp$0=getDoc(io);if(!doc$jscomp$0){log("cannot access response document");e=SERVER_ABORT}if(e===CLIENT_TIMEOUT_ABORT&&xhr$jscomp$0){xhr$jscomp$0.abort("timeout"); deferred.reject(xhr$jscomp$0,"timeout");return}else if(e==SERVER_ABORT&&xhr$jscomp$0){xhr$jscomp$0.abort("server abort");deferred.reject(xhr$jscomp$0,"error","server abort");return}if(!doc$jscomp$0||doc$jscomp$0.location.href==s$jscomp$0.iframeSrc)if(!timedOut)return;if(io.detachEvent)io.detachEvent("onload",cb);else io.removeEventListener("load",cb,false);var status="success";var errMsg;try{if(timedOut)throw"timeout";var isXml=s$jscomp$0.dataType=="xml"||doc$jscomp$0.XMLDocument||$.isXMLDoc(doc$jscomp$0); log("isXml\x3d"+isXml);if(!isXml&&window.opera&&(doc$jscomp$0.body===null||!doc$jscomp$0.body.innerHTML))if(--domCheckCount){log("requeing onLoad callback, DOM not available");setTimeout(cb,250);return}var docRoot=doc$jscomp$0.body?doc$jscomp$0.body:doc$jscomp$0.documentElement;xhr$jscomp$0.responseText=docRoot?docRoot.innerHTML:null;xhr$jscomp$0.responseXML=doc$jscomp$0.XMLDocument?doc$jscomp$0.XMLDocument:doc$jscomp$0;if(isXml)s$jscomp$0.dataType="xml";xhr$jscomp$0.getResponseHeader=function(header){var headers= {"content-type":s$jscomp$0.dataType};return headers[header.toLowerCase()]};if(docRoot){xhr$jscomp$0.status=Number(docRoot.getAttribute("status"))||xhr$jscomp$0.status;xhr$jscomp$0.statusText=docRoot.getAttribute("statusText")||xhr$jscomp$0.statusText}var dt=(s$jscomp$0.dataType||"").toLowerCase();var scr=/(json|script|text)/.test(dt);if(scr||s$jscomp$0.textarea){var ta=doc$jscomp$0.getElementsByTagName("textarea")[0];if(ta){xhr$jscomp$0.responseText=ta.value;xhr$jscomp$0.status=Number(ta.getAttribute("status"))|| xhr$jscomp$0.status;xhr$jscomp$0.statusText=ta.getAttribute("statusText")||xhr$jscomp$0.statusText}else if(scr){var pre=doc$jscomp$0.getElementsByTagName("pre")[0];var b=doc$jscomp$0.getElementsByTagName("body")[0];if(pre)xhr$jscomp$0.responseText=pre.textContent?pre.textContent:pre.innerText;else if(b)xhr$jscomp$0.responseText=b.textContent?b.textContent:b.innerText}}else if(dt=="xml"&&!xhr$jscomp$0.responseXML&&xhr$jscomp$0.responseText)xhr$jscomp$0.responseXML=toXml(xhr$jscomp$0.responseText); try{data$jscomp$0=httpData(xhr$jscomp$0,dt,s$jscomp$0)}catch(err){status="parsererror";xhr$jscomp$0.error=errMsg=err||status}}catch(err){log("error caught: ",err);status="error";xhr$jscomp$0.error=errMsg=err||status}if(xhr$jscomp$0.aborted){log("upload aborted");status=null}if(xhr$jscomp$0.status)status=xhr$jscomp$0.status>=200&&xhr$jscomp$0.status<300||xhr$jscomp$0.status===304?"success":"error";if(status==="success"){if(s$jscomp$0.success)s$jscomp$0.success.call(s$jscomp$0.context,data$jscomp$0, "success",xhr$jscomp$0);deferred.resolve(xhr$jscomp$0.responseText,"success",xhr$jscomp$0);if(g)$.event.trigger("ajaxSuccess",[xhr$jscomp$0,s$jscomp$0])}else if(status){if(errMsg===undefined)errMsg=xhr$jscomp$0.statusText;if(s$jscomp$0.error)s$jscomp$0.error.call(s$jscomp$0.context,xhr$jscomp$0,status,errMsg);deferred.reject(xhr$jscomp$0,"error",errMsg);if(g)$.event.trigger("ajaxError",[xhr$jscomp$0,s$jscomp$0,errMsg])}if(g)$.event.trigger("ajaxComplete",[xhr$jscomp$0,s$jscomp$0]);if(g&&!--$.active)$.event.trigger("ajaxStop"); if(s$jscomp$0.complete)s$jscomp$0.complete.call(s$jscomp$0.context,xhr$jscomp$0,status);callbackProcessed=true;if(s$jscomp$0.timeout)clearTimeout(timeoutHandle);setTimeout(function(){if(!s$jscomp$0.iframeTarget)$io.remove();else $io.attr("src",s$jscomp$0.iframeSrc);xhr$jscomp$0.responseXML=null},100)}var form=$form[0];var i;var timedOut;var timeoutHandle;var deferred=$.Deferred();deferred.abort=function(status){xhr$jscomp$0.abort(status)};if(a$jscomp$0)for(i=0;i<elements.length;i++){var el=$(elements[i]); if(hasProp)el.prop("disabled",false);else el.removeAttr("disabled")}var s$jscomp$0=$.extend(true,{},$.ajaxSettings,options);s$jscomp$0.context=s$jscomp$0.context||s$jscomp$0;var id="jqFormIO"+(new Date).getTime();if(s$jscomp$0.iframeTarget){var $io=$(s$jscomp$0.iframeTarget);var n$jscomp$0=$io.attr2("name");if(!n$jscomp$0)$io.attr2("name",id);else id=n$jscomp$0}else{$io=$('\x3ciframe name\x3d"'+id+'" src\x3d"'+s$jscomp$0.iframeSrc+'" /\x3e');$io.css({position:"absolute",top:"-1000px",left:"-1000px"})}var io= $io[0];var xhr$jscomp$0={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(status){var e=status==="timeout"?"timeout":"aborted";log("aborting upload... "+e);this.aborted=1;try{if(io.contentWindow.document.execCommand)io.contentWindow.document.execCommand("Stop")}catch(ignore){}$io.attr("src",s$jscomp$0.iframeSrc);xhr$jscomp$0.error=e;if(s$jscomp$0.error)s$jscomp$0.error.call(s$jscomp$0.context, xhr$jscomp$0,e,status);if(g)$.event.trigger("ajaxError",[xhr$jscomp$0,s$jscomp$0,e]);if(s$jscomp$0.complete)s$jscomp$0.complete.call(s$jscomp$0.context,xhr$jscomp$0,e)}};var g=s$jscomp$0.global;if(g&&0===$.active++)$.event.trigger("ajaxStart");if(g)$.event.trigger("ajaxSend",[xhr$jscomp$0,s$jscomp$0]);if(s$jscomp$0.beforeSend&&s$jscomp$0.beforeSend.call(s$jscomp$0.context,xhr$jscomp$0,s$jscomp$0)===false){if(s$jscomp$0.global)$.active--;deferred.reject();return deferred}if(xhr$jscomp$0.aborted){deferred.reject(); return deferred}var sub=form.clk;if(sub){n$jscomp$0=sub.name;if(n$jscomp$0&&!sub.disabled){s$jscomp$0.extraData=s$jscomp$0.extraData||{};s$jscomp$0.extraData[n$jscomp$0]=sub.value;if(sub.type=="image"){s$jscomp$0.extraData[n$jscomp$0+".x"]=form.clk_x;s$jscomp$0.extraData[n$jscomp$0+".y"]=form.clk_y}}}var CLIENT_TIMEOUT_ABORT=1;var SERVER_ABORT=2;var csrf_token=$("meta[name\x3dcsrf-token]").attr("content");var csrf_param=$("meta[name\x3dcsrf-param]").attr("content");if(csrf_param&&csrf_token){s$jscomp$0.extraData= s$jscomp$0.extraData||{};s$jscomp$0.extraData[csrf_param]=csrf_token}if(s$jscomp$0.forceSync)doSubmit();else setTimeout(doSubmit,10);var data$jscomp$0;var doc$jscomp$0;var domCheckCount=50;var callbackProcessed;var toXml=$.parseXML||function(s,doc){if(window.ActiveXObject){doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(s)}else doc=(new DOMParser).parseFromString(s,"text/xml");return doc&&doc.documentElement&&doc.documentElement.nodeName!="parsererror"?doc:null};var parseJSON= $.parseJSON||function(s){return window["eval"]("("+s+")")};var httpData=function(xhr,type,s){var ct=xhr.getResponseHeader("content-type")||"";var xml=type==="xml"||!type&&ct.indexOf("xml")>=0;var data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.nodeName==="parsererror")if($.error)$.error("parsererror");if(s&&s.dataFilter)data=s.dataFilter(data,type);if(typeof data==="string")if(type==="json"||!type&&ct.indexOf("json")>=0)data=parseJSON(data);else if(type==="script"||!type&&ct.indexOf("javascript")>= 0)$.globalEval(data);return data};return deferred}if(!this.length){log("ajaxSubmit: skipping submit process - no element selected");return this}var $form=this;if(typeof options=="function")options={success:options};else if(options===undefined)options={};var method=options.type||this.attr2("method");var action=options.url||this.attr2("action");var url=typeof action==="string"?$.trim(action):"";url=url||window.location.href||"";if(url)url=(url.match(/^([^#]+)/)||[])[1];options=$.extend(true,{url:url, success:options.success||$.ajaxSettings.success,type:method||$.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},options);var veto={};this.trigger("form-pre-serialize",[this,options,veto]);if(veto.veto){log("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var traditional=options.traditional; if(traditional===undefined)traditional=$.ajaxSettings.traditional;var elements=[];var a$jscomp$1=this.formToArray(options.semantic,elements);if(options.data){options.extraData=options.data;var qx=$.param(options.data,traditional)}if(options.beforeSubmit&&options.beforeSubmit(a$jscomp$1,this,options)===false){log("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[a$jscomp$1,this,options,veto]);if(veto.veto){log("ajaxSubmit: submit vetoed via form-submit-validate trigger"); return this}var q=$.param(a$jscomp$1,traditional);if(qx)q=q?q+"\x26"+qx:qx;if(options.type.toUpperCase()=="GET"){options.url+=(options.url.indexOf("?")>=0?"\x26":"?")+q;options.data=null}else options.data=q;var callbacks=[];if(options.resetForm)callbacks.push(function(){$form.resetForm()});if(options.clearForm)callbacks.push(function(){$form.clearForm(options.includeHidden)});if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){var fn=options.replaceTarget? "replaceWith":"html";$(options.target)[fn](data).each(oldSuccess,arguments)})}else if(options.success)callbacks.push(options.success);options.success=function(data,status,xhr){var context=options.context||this;var i=0;for(var max=callbacks.length;i<max;i++)callbacks[i].apply(context,[data,status,xhr||$form,$form])};if(options.error){var oldError=options.error;options.error=function(xhr,status,error){var context=options.context||this;oldError.apply(context,[xhr,status,error,$form])}}if(options.complete){var oldComplete= options.complete;options.complete=function(xhr,status){var context=options.context||this;oldComplete.apply(context,[xhr,status,$form])}}var fileInputs=$("input[type\x3dfile]:enabled",this).filter(function(){return $(this).val()!==""});var hasFileInputs=fileInputs.length>0;var mp="multipart/form-data";var multipart=$form.attr("enctype")==mp||$form.attr("encoding")==mp;var fileAPI=feature.fileapi&&feature.formdata;log("fileAPI :"+fileAPI);var shouldUseFrame=(hasFileInputs||multipart)&&!fileAPI;if(options.iframe!== false&&(options.iframe||shouldUseFrame))if(options.closeKeepAlive)$.get(options.closeKeepAlive,function(){jqxhr=fileUploadIframe(a$jscomp$1)});else var jqxhr=fileUploadIframe(a$jscomp$1);else if((hasFileInputs||multipart)&&fileAPI)jqxhr=fileUploadXhr(a$jscomp$1);else jqxhr=$.ajax(options);$form.removeData("jqxhr").data("jqxhr",jqxhr);for(var k=0;k<elements.length;k++)elements[k]=null;this.trigger("form-submit-notify",[this,options]);return this};$.fn.ajaxForm=function(options){options=options||{}; options.delegation=options.delegation&&$.isFunction($.fn.on);if(!options.delegation&&this.length===0){var o={s:this.selector,c:this.context};if(!$.isReady&&o.s){log("DOM not ready, queuing ajaxForm");$(function(){$(o.s,o.c).ajaxForm(options)});return this}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this}if(options.delegation){$(document).off("submit.form-plugin",this.selector,doAjaxSubmit).off("click.form-plugin",this.selector,captureSubmittingElement).on("submit.form-plugin", this.selector,options,doAjaxSubmit).on("click.form-plugin",this.selector,options,captureSubmittingElement);return this}return this.ajaxFormUnbind().bind("submit.form-plugin",options,doAjaxSubmit).bind("click.form-plugin",options,captureSubmittingElement)};$.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};$.fn.formToArray=function(semantic,elements){var a=[];if(this.length===0)return a;var form=this[0];var formId=this.attr("id");var els=semantic?form.getElementsByTagName("*"): form.elements;if(els&&!/MSIE [678]/.test(navigator.userAgent))els=$(els).get();if(formId){var els2=$(":input[form\x3d"+formId+"]").get();if(els2.length)els=(els||[]).concat(els2)}if(!els||!els.length)return a;var i;var j;var max;var jmax;for(i=0,max=els.length;i<max;i++){var el=els[i];var n=el.name;if(!n||el.disabled)continue;if(semantic&&form.clk&&el.type=="image"){if(form.clk==el){a.push({name:n,value:$(el).val(),type:el.type});a.push({name:n+".x",value:form.clk_x},{name:n+".y",value:form.clk_y})}continue}var v= $.fieldValue(el,true);if(v&&v.constructor==Array){if(elements)elements.push(el);for(j=0,jmax=v.length;j<jmax;j++)a.push({name:n,value:v[j]})}else if(feature.fileapi&&el.type=="file"){if(elements)elements.push(el);var files=el.files;if(files.length)for(j=0;j<files.length;j++)a.push({name:n,value:files[j],type:el.type});else a.push({name:n,value:"",type:el.type})}else if(v!==null&&typeof v!="undefined"){if(elements)elements.push(el);a.push({name:n,value:v,type:el.type,required:el.required})}}if(!semantic&& form.clk){var $input=$(form.clk);var input=$input[0];n=input.name;if(n&&!input.disabled&&input.type=="image"){a.push({name:n,value:$input.val()});a.push({name:n+".x",value:form.clk_x},{name:n+".y",value:form.clk_y})}}return a};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic))};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n)return;var v=$.fieldValue(this,successful);if(v&&v.constructor==Array){var i=0;for(var max=v.length;i< max;i++)a.push({name:n,value:v[i]})}else if(v!==null&&typeof v!="undefined")a.push({name:this.name,value:v})});return $.param(a)};$.fn.fieldValue=function(successful){var val=[];var i=0;for(var max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=="undefined"||v.constructor==Array&&!v.length)continue;if(v.constructor==Array)$.merge(val,v);else val.push(v)}return val};$.fieldValue=function(el,successful){var n=el.name;var t=el.type;var tag=el.tagName.toLowerCase(); if(successful===undefined)successful=true;if(successful&&(!n||el.disabled||t=="reset"||t=="button"||(t=="checkbox"||t=="radio")&&!el.checked||(t=="submit"||t=="image")&&el.form&&el.form.clk!=el||tag=="select"&&el.selectedIndex==-1))return null;if(tag=="select"){var index=el.selectedIndex;if(index<0)return null;var a=[];var ops=el.options;var one=t=="select-one";var max=one?index+1:ops.length;for(var i=one?index:0;i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v)v=op.attributes&&op.attributes.value&& !op.attributes.value.specified?op.text:op.value;if(one)return v;a.push(v)}}return a}return $(el).val()};$.fn.clearForm=function(includeHidden){return this.each(function(){$("input,select,textarea",this).clearFields(includeHidden)})};$.fn.clearFields=$.fn.clearInputs=function(includeHidden){var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var t=this.type;var tag=this.tagName.toLowerCase();if(re.test(t)||tag=="textarea")this.value= "";else if(t=="checkbox"||t=="radio")this.checked=false;else if(tag=="select")this.selectedIndex=-1;else if(t=="file")if(/MSIE/.test(navigator.userAgent))$(this).replaceWith($(this).clone(true));else $(this).val("");else if(includeHidden)if(includeHidden===true&&/hidden/.test(t)||typeof includeHidden=="string"&&$(this).is(includeHidden))this.value=""})};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||typeof this.reset=="object"&&!this.reset.nodeType)this.reset()})}; $.fn.enable=function(b){if(b===undefined)b=true;return this.each(function(){this.disabled=!b})};$.fn.selected=function(select){if(select===undefined)select=true;return this.each(function(){var t=this.type;if(t=="checkbox"||t=="radio")this.checked=select;else if(this.tagName.toLowerCase()=="option"){var $sel=$(this).parent("select");if(select&&$sel[0]&&$sel[0].type=="select-one")$sel.find("option").selected(false);this.selected=select}})};$.fn.ajaxSubmit.debug=false}); var Abaxx=function(){function Package(props){if(props)jQuery.extend(this,props)}Package.prototype.createPackage=function(packageName){var i;var currentPackage=this;if(arguments.length>1)for(i=0;i<arguments.length;i++)this.createPackage(arguments[i]);var levels=packageName.split(".");for(i=0;i<levels.length;++i){currentPackage[levels[i]]=currentPackage[levels[i]]||new Package;currentPackage=currentPackage[levels[i]]}return currentPackage};Package.prototype.define=function(namespace,init){var thePackage= this.createPackage(namespace);var scope={};var o=jQuery.isFunction(init)?init.apply(scope):init;jQuery.extend(thePackage,o);thePackage.__internals=scope.internals;if(window.debugDependencies===true)thePackage._init=init};var defaultPortalLanguage="en";var defaultPortalLocale="en_US";var defaultBaseUrl="";var displayType={Param:"$display.type",SinglePart:"single-part",SinglePartWithDecorator:"single-part-decorator"};document.cookie="javascript\x3denabled;path\x3d/;secure;SameSite\x3dlax";var root= new Package({baseUrl:defaultBaseUrl,portalLanguage:defaultPortalLanguage,portalLocale:defaultPortalLocale,displayType:displayType,init:function(language,locale,theBaseUrl){try{this.baseUrl=theBaseUrl;this.portalLocale=locale;this.portalLanguage=language;window.CKEDITOR_BASEPATH=this.baseUrl+"scripts/ckeditor/"}catch(t){}},toString:function(){return"baseUrl: "+this.baseUrl+", portalLanguage: "+this.portalLanguage+", portalLocale: "+this.portalLocale}});root.createPackage("util","layout","table","href", "tree","switchlayout","decorator","collaboration");return root}(); Abaxx.define("core",function(){function _handleOnChangeSubmit(event){var $this=jQuery(this);var abxEvent=jQuery(event.target).data("abxOnChangeSubmit");$this.submitAbaxxEvent(abxEvent)}function _handleConfirm(event){var message=(jQuery(this).data("abxConfirm")||"").replace(/\\n/g,"\n");if(!confirm(message)){event.stopImmediatePropagation();event.stopPropagation();event.preventDefault()}}function unescapeHtml(s,keepScripts){var unescaped=jQuery("\x3cdiv /\x3e").html(s).text();if(!keepScripts)unescaped= unescaped.replace(/<script.*>.*<\/script>/g,"");return unescaped}function companionScript(name,script){var dataKey=name.replace(/^data-/,"");onReady(function(){jQuery("["+name+"]").each(function(index,element){var $element=jQuery(element);if(!$element.data(dataKey+"-initialized")){$element.data(dataKey+"-initialized",true);script($element,$element.data(dataKey.toLowerCase()))}})})}var readyListeners=[];var initialDomReady=false;var location=document.location;var onReady=function addReadyListener(listener){for(var i= 0;i<readyListeners.length;i++)if(readyListeners[i]===listener)return;if(initialDomReady)listener();readyListeners.push(listener)};var triggerReadyEvent=function triggerReadyEvent(){initialDomReady=true;for(var i=0;i<readyListeners.length;i++)try{readyListeners[i]()}catch(e){if(window.console&&console.error)console.error(e)}jQuery(document).trigger(jQuery.Event("abx_page_ready"))};var setUrlParameter=function(url,name,value$jscomp$0){if(!name)return url;if(arguments.length===2){if(jQuery.isPlainObject(name)){var map= name;jQuery.each(map,function(key,value){if(map.hasOwnProperty(key))url=setUrlParameter(url,key,value)});return url}var decoded=/^([^=]+)=([^=]+)$/.exec(name);if(decoded)return setUrlParameter(url,decoded[1],decoded[2])}var rUrlWithOptionalAnchor=/(^[^#]*)(#.*)?$/;var encodedNameAndValue=encodeURIComponent(name)+"\x3d"+encodeURIComponent(value$jscomp$0);var nameOrEncodedName="(?:"+name.replace("$","\\$")+"|"+encodeURIComponent(name)+")";var rName=new RegExp("(\\?|\x26|^)("+nameOrEncodedName+"\x3d[^$\x26]*)($|\x26)"); url=(rUrlWithOptionalAnchor.exec(url)||["",""])[1];var anchor=RegExp.$2||"";if(rName.test(url))var result=url.replace(rName,"$1"+encodedNameAndValue+"$3");else if(url==="")result=encodedNameAndValue;else if(url.indexOf("?")!==-1||url.indexOf("\x3d")!==-1&&url.indexOf(";")===-1)result=url+"\x26"+encodedNameAndValue;else result=url+"?"+encodedNameAndValue;return result+anchor};var setParameter=function(form,name,value){form=jQuery(form);if(form.find("input[name\x3d'"+name+"']").length===0)jQuery("\x3cinput type\x3d'hidden' /\x3e").attr({name:name, value:value}).appendTo(form);else form.find("input[name\x3d'"+name+"']").val(value)};var _resolveFormFromObjectOrId=function(formname){if(formname===null||formname===undefined)var form=null;else if(typeof formname==="string")form=document.getElementById(formname);else form=formname;return form};var OpenPopupEvent=function(data){return jQuery.Event("abx_open_popup",data)};var ClosePopupEvent=function(data){return jQuery.Event("abx_close_popup",data)};var OpenLinkEvent=function(data){return jQuery.Event("abx_open_link", data)};var submitForm=function(idOrForm,popupMode,originalEventName){var form=_resolveFormFromObjectOrId(idOrForm);if(typeof form.onsubmit==="function"&&!form.onsubmit())return false;if(popupMode===true||popupMode==="open")var popupEvent=new OpenPopupEvent({form:form,originalEventName:originalEventName});else if(popupMode==="close"||popupMode==="only-close")popupEvent=new ClosePopupEvent({form:form,originalEventName:originalEventName,popupMode:popupMode});if(popupEvent){jQuery(form).trigger(popupEvent); if(popupEvent.isDefaultPrevented())return false}jQuery(form).submit();return false};var submitEvent=function(formname,event,ignored,popupMode,button){var form=_resolveFormFromObjectOrId(formname);if(form===null&&typeof button!=="undefined")form=button.form;var originalEventName=jQuery(form).find("input[name\x3d'$event']").val()||"";setParameter(form,"$event",event);return submitForm(form,popupMode,originalEventName)};var sendEvent=function(eventUrl,button,popupMode){if(popupMode===true||popupMode=== "open")var popupEvent=new OpenPopupEvent({url:eventUrl});else if(popupMode==="close"||popupMode==="only-close")popupEvent=new ClosePopupEvent({url:eventUrl,popupMode:popupMode});if(popupEvent){jQuery(button||document).trigger(popupEvent);if(popupEvent.isDefaultPrevented())return}var linkEvent=new OpenLinkEvent({url:eventUrl});jQuery(button).trigger(linkEvent)};var scrollToAnchor=function(url){var anchor=url.indexOf("#")>=0?url.substring(url.indexOf("#")+1):null;if(anchor!==null){var $anchorElement= jQuery("a[name\x3d'"+anchor+"']");if($anchorElement.length===0)return;var $scrollingParent=$anchorElement.parents("div").filter(function(){var $div=jQuery(this);return $div.css("overflowX")==="auto"||$div.css("overflowY")==="auto"||$div.css("overflowX")==="scroll"||$div.css("overflowY")==="scroll"}).first();var anchorOffset=$anchorElement.offset();if($scrollingParent.length===0)jQuery(document).scrollTop(anchorOffset.top).scrollLeft(anchorOffset.left);else{var parentOffset=$scrollingParent.offset()|| {top:0,left:0};$scrollingParent.scrollLeft(anchorOffset.left-parentOffset.left).scrollTop(anchorOffset.top-parentOffset.top)}}};var currentZIndex=function(){return Math.max.apply(null,jQuery("*").map(function(index,element){var cssZIndex=jQuery(element).css("z-index");if(cssZIndex==="auto")return 0;try{return parseInt(cssZIndex,10)}catch(e){return 0}}).get())};var registeredZIndexes=[10];var nextZIndex=function(offset){offset=offset||1;var nextIndex=Math.max.apply(null,registeredZIndexes)+offset; registeredZIndexes.push(nextIndex);return nextIndex};var freeZIndex=function(zIndex){var i;for(i=0;i<registeredZIndexes.length;i++)if(registeredZIndexes[i]===zIndex)registeredZIndexes.splice(i,1);if(registeredZIndexes.length===0)registeredZIndexes.push(0)};var openWindow=function(url,name,args){var w=args.width||333;var h=args.height||444;var x=(screen.availWidth-w)/2;var y=(screen.availHeight-h)/2;var features="resizable"+",left\x3d"+x+",top\x3d"+y+",width\x3d"+w+",height\x3d"+h;if(args.features)features+= ","+args.features;var popup=window.open(url,name,features);popup.focus();return popup};var establishDefaultBehaviourForButtons=function(){jQuery("button[type\x3dbutton][onclick]").each(function(index,button){if(!button.abxOriginalOnClick){button.abxOriginalOnClick=button.onclick;button.onclick=function(event){var result=button.abxOriginalOnClick(event||window.event);if(!result)jQuery.Event(event||window.event).preventDefault();return result}}})};var enhanceForms=function(){jQuery("form").each(function(index, form){var $form=jQuery(form);var popupMode=$form.attr("data-xpopup-mode");if(typeof popupMode==="undefined")popupMode="auto";if(typeof form._event==="undefined")form._event=function(event,doSubmit){return submitEvent(form,event,doSubmit,popupMode)}});establishDefaultBehaviourForButtons()};var _handleButtonClick=function(event){var $button=jQuery(this);if(!event.isDefaultPrevented()){var $form=$button.parents("form").first();if($form.length==0){var formId=$button.parents("[data-abx-submitform]").attr("data-abx-submitform"); if(formId!=null)$form=jQuery("form[id\x3d'"+formId+"']")}var params=$button.data("abxParams");if(params!=null&&$form.length>0)jQuery.each(params,function(key,values){jQuery.each(values,function(index,value){setParameter($form,key,value)})});var popupMode=$button.attr("data-xpopupmode")||"auto";if($button.attr("data-xhref")||$form.length===0){var url=$button.attr("href")||$button.attr("data-xhref");sendEvent(url,this,popupMode)}else{var abaxxEvent=$button.attr("data-xevent");submitEvent($form.attr("id"), abaxxEvent,true,popupMode,this)}event.preventDefault()}};var _handleButtonPopupClick=function(event){var $button=jQuery(this);var popupMode=$button.attr("data-xpopupmode")||"auto";if(!event.isDefaultPrevented()||popupMode==="auto"){var $form=$button.parents("form").first();if($form.length>0){submitEvent($form,null,true,popupMode,this);event.preventDefault()}}};var _handleHrefWithPopupModeOpen=function(clickEvent){var $a=jQuery(this);if(!clickEvent.isDefaultPrevented()){var popupEvent=new Abaxx.core.OpenPopupEvent({url:$a.attr("href")}); $a.trigger(popupEvent);if(popupEvent.isDefaultPrevented())clickEvent.preventDefault()}};var _handleHrefWithPopupModeClose=function(clickEvent){var $a=jQuery(this);if(!clickEvent.isDefaultPrevented()){var popupEvent=new Abaxx.core.ClosePopupEvent({url:$a.attr("href")});$a.trigger(popupEvent);if(popupEvent.isDefaultPrevented())clickEvent.preventDefault()}};var _openLink=function(event){if(!event.isDefaultPrevented()){event.preventDefault();if(Abaxx.loadingIndicator)Abaxx.loadingIndicator.show();location.assign(event.url); if(Abaxx.loadingIndicator)Abaxx.loadingIndicator.remove()}};jQuery.fn.submitAbaxxEvent=function(eventName){var form=this.filter("form")[0];if(!form){var elementsWithForm=this.filter(function(){return typeof this.form!=="undefined"});if(elementsWithForm.length>0)form=elementsWithForm[0].form;else form=this.closest("form")[0]}if(form)if(eventName)submitEvent(form,eventName);else submitForm(form);return this};var registerEventHandlers=function(){jQuery(document).off(".abaxx_core").on("click.abaxx_core", "input[type\x3dsubmit][data-xevent], input[type\x3dimage][data-xevent], button[data-xevent], a[data-xevent]",_handleButtonClick).on("click.abaxx_core","input[type\x3dsubmit][data-xpopupmode]:not([data-xevent]), input[type\x3dimage][data-xpopupmode]:not([data-xevent])",_handleButtonPopupClick).on("click.abaxx_core","a[data-xpopupmode\x3dopen]",_handleHrefWithPopupModeOpen).on("click.abaxx_core","a[data-xpopupmode\x3dclose]",_handleHrefWithPopupModeClose).on("change.abaxx_core","[data-abx-on-change-submit]", _handleOnChangeSubmit).on("abx_open_link.abaxx_core",_openLink);onReady(function(){jQuery("[data-abx-confirm]").off("click.abaxx_core").on("click.abaxx_core",_handleConfirm)})};var cloneAndReplace=function(source,targetId,idSuffix){idSuffix=idSuffix||"Bottom";var $target=jQuery("[id\x3d'"+targetId+"']");var $clone=jQuery(source).clone();$clone.find("*[id]").attr("id",function(index,id){return id+idSuffix});$clone.attr("id",targetId);$clone.addClass("abaxx-pos-bottom");$clone.removeClass("abaxx-pos-top"); $target.replaceWith($clone)};var cloneFragments=function(){jQuery("div[data-abx-clone]").each(function(index,fragment){var $fragment=jQuery(fragment);var target=$fragment.attr("id");if(typeof target==="undefined")return;cloneAndReplace(fragment,target+"Bottom")})};var initInfo=jQuery("[data-abx-web-context]");if(initInfo.length>0)Abaxx.init(initInfo.data("abxWebLanguage"),initInfo.data("abxWebLocale"),initInfo.data("abxWebContext"));jQuery(triggerReadyEvent);jQuery(cloneFragments);registerEventHandlers(); onReady(enhanceForms);companionScript("data-abx-core-open-window",function(trigger,data){if(data)jQuery(trigger).click(function(evt){evt.preventDefault();openWindow(data.url,data.name,data)})});this.internals={clearReadyListeners:function(){readyListeners=[]},removeReadyListener:function(listener){for(var i=0;i<readyListeners.length;i++)if(readyListeners[i]===listener){readyListeners.splice(i,1);return}},setLocationService:function(service){location=service}};(function(){jQuery.uaMatch=function(ua){ua= ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"}};var matched=jQuery.uaMatch(navigator.userAgent);var browser={};if(matched.browser){browser[matched.browser]=true;browser.version=matched.version}if(browser.chrome)browser.webkit=true;else if(browser.webkit)browser.safari= true;jQuery.browser=browser})();return{OpenPopupEvent:OpenPopupEvent,ClosePopupEvent:ClosePopupEvent,OpenLinkEvent:OpenLinkEvent,setParameter:setParameter,setUrlParameter:setUrlParameter,submitForm:submitForm,sendEvent:sendEvent,submitEvent:submitEvent,scrollToAnchor:scrollToAnchor,currentZIndex:currentZIndex,nextZIndex:nextZIndex,freeZIndex:freeZIndex,openWindow:openWindow,enhanceForms:enhanceForms,registerEventHandlers:registerEventHandlers,cloneAndReplace:cloneAndReplace,onReady:onReady,triggerReadyEvent:triggerReadyEvent, companionScript:companionScript,unescapeHtml:unescapeHtml}}); Abaxx.define("i18n",function(){function Amount(value,currency){if(value instanceof Amount){this.value=value.value;this.currency=value.currency}else if(typeof value==="object"&&typeof value.value!=="undefined"){this.value=Number(value.value);if(typeof value.currency==="string")this.currency=value.currency;else if(typeof value.cur==="string")this.currency=value.cur}else{this.value=Number(value);this.currency=currency}}function parseAmount(text){if(typeof text==="number")return text;if(Abaxx.portalLocale.indexOf("de")=== 0)var normalized=text.replace(/\./g,"").replace(/,/g,".");else normalized=text.replace(/,/g,"");var result=Number(normalized);if(isNaN(result))result=0;return result}function formatAmount(amountOrNumber,fractionDigits){var amount=new Amount(amountOrNumber);return formatNumberWithSymbol(amount.value,amount.currency?" "+amount.currency:"",fractionDigits)}function absoluteAmount(amountOrNumber){var amount=new Amount(amountOrNumber);return amount.abs()}function formatPercent(percent,fractionDigits){var symbol= " %";return formatNumberWithSymbol(percent,symbol,fractionDigits)}function formatNumberWithSymbol(number,symbol,fractionDigits){if(fractionDigits===undefined)fractionDigits=2;if(symbol===undefined)symbol="";if(typeof Intl!=="undefined"&&Intl.NumberFormat)return Intl.NumberFormat(Abaxx.portalLocale.replace(/_/g,"-"),{minimumFractionDigits:fractionDigits,maximumFractionDigits:fractionDigits}).format(number)+symbol;var thousandsSeparator=",";var decimalSeparator=".";var text=number.toFixed(fractionDigits).replace(/,/g, "");var integerText=text.split(".")[0]||"0";var fractionsText=text.split(".")[1]||"0";if(Abaxx.portalLocale.indexOf("de")===0){thousandsSeparator=".";decimalSeparator=","}integerText=integerText.replace(/\B(?=(\d{3})+(?!\d))/g,thousandsSeparator);if(fractionDigits===0)return integerText;return integerText+decimalSeparator+fractionsText+symbol}Amount.prototype.format=function(fractionDigits){return formatNumberWithSymbol(this.value,this.currency?" "+this.currency:"",fractionDigits)};Amount.prototype.abs= function(){return new Amount(Math.abs(this.value),this.currency)};return{Amount:Amount,parseAmount:parseAmount,absoluteAmount:absoluteAmount,formatAmount:formatAmount,formatPercent:formatPercent}}); Abaxx.define("device",function(){function isSmallScreen(){if(typeof is_small_and_down=="function")return is_small_and_down();console.log("is_small_and_down() not found");return false}function isMediumScreen(){if(typeof is_medium_and_down=="function")return is_medium_and_down();console.log("is_medium_and_down() not found");return false}function isLargeScreen(){if(typeof is_large_up=="function")return is_large_up();console.log("is_large_up() not found");return false}function isScreen(size){if(window.Foundation&& Foundation.media_queries[size])return matchMedia(mediaQueries[size]).matches}function isAndroid(){var nua=navigator.userAgent;return nua.indexOf("Android ")>-1}function isIeMobile(userAgent){var ieMobileRE=/IEMobile\/(\d+)(\.\d+)?/;return ieMobileRE.test(userAgent)}function isTouch(){return"ontouchstart"in document.documentElement}function isIOS(){var nua=navigator.userAgent;return/\((iPhone|iPad|iPod touch);.*\)/.exec(nua)!==null}var defaultMediaQueries={small:"only screen",medium:"only screen and (min-width: 641px)", large:"only screen and (min-width: 1025px)"};var mediaQueries=jQuery.extend(defaultMediaQueries,window.Foundation?window.Foundation.media_queries:{});if(isIeMobile(navigator.userAgent))jQuery("html").addClass("ie-mobile");return{isSmallScreen:isSmallScreen,isMediumScreen:isMediumScreen,isLargeScreen:isLargeScreen,isScreen:isScreen,isAndroid:isAndroid,isIOS:isIOS,isTouch:isTouch}}); Abaxx.define("log",function(){function determineLogMethod(name,fallback){if(typeof console!=="undefined")if(jQuery.isFunction(console[name]))return function(){console[name].apply(console,arguments)};else if(typeof console[name]==="object"){if(isIEObjectConsole)return console[name];try{console[name]("Initializing Abaxx.log");isIEObjectConsole=true;return console[name]}catch(e){return fallback}}return fallback}var exports={};var isIEObjectConsole=false;exports.log=determineLogMethod("log",function(){}); exports.debug=determineLogMethod("debug",exports.log);exports.info=determineLogMethod("info",exports.log);exports.error=determineLogMethod("error",exports.log);return exports}); Abaxx.define("loadingIndicator",function(){var LoadingIndicator=function(indicatorId,position){var TYPE_AJAX="ajax";var TYPE_PAGE="page";var currentType;var invocationCount=0;position=position||"body";var loadingIndicator={show:function(type){type=type||TYPE_AJAX;if(jQuery("#"+indicatorId).length===0)jQuery(position).append("\x3cdiv id\x3d'"+indicatorId+"'\x3eLoading...\x3c/div\x3e");if(currentType!==TYPE_PAGE){currentType=type;invocationCount+=1}},fullPageLoad:function(){loadingIndicator.show(TYPE_PAGE)}, remove:function(){if(currentType!==TYPE_PAGE){jQuery("#"+indicatorId).remove();currentType=null;invocationCount=0}},removeOneLevel:function(){invocationCount-=1;if(invocationCount<=0){invocationCount=0;this.remove()}},getMessage:function(){return jQuery("#"+indicatorId).text()},setMessage:function(message){jQuery("#"+indicatorId).text(message)},isDisplayed:function(){return jQuery("#"+indicatorId).length>0},Type:{page:TYPE_PAGE,ajax:TYPE_AJAX}};if(window.Ajax&&Ajax.Responders)Ajax.Responders.register({onCreate:function(){loadingIndicator.show()}, onComplete:function(){loadingIndicator.remove()},on404:function(){loadingIndicator.remove()},onFailure:function(){loadingIndicator.remove()},onException:function(){loadingIndicator.remove()}});jQuery(document).ajaxSend(function(event,xhr,options){if(!options||!options.omitLoadingIndicator)loadingIndicator.show()});jQuery(document).ajaxComplete(function(){loadingIndicator.removeOneLevel()});jQuery(document).ajaxStop(function(){loadingIndicator.remove()});jQuery(document).on("abx_page_ready",function(){loadingIndicator.remove()}); return loadingIndicator};return new LoadingIndicator("systemWorking")}); Abaxx.define("ajax",function(){function getJSON(url,data,options){data=data||{};options=options||{};if(outstandingAjaxRequests[url]&&typeof outstandingAjaxRequests[url].abort==="function")outstandingAjaxRequests[url].abort();data[Abaxx.displayType.Param]=Abaxx.displayType.SinglePart;options.url=url;options.dataType="json";options.data=data;options.method="POST";outstandingAjaxRequests[url]=jQuery.ajax(options).always(function(){outstandingAjaxRequests[url]=null});return outstandingAjaxRequests[url]} function isStylesheetLoaded(href,type,media){var url=rUrlWithOptionalPathParameter.exec(href)[1];var existenceCheck="link[rel\x3dstylesheet][href*\x3d'"+url+"']";if(media)existenceCheck+="[media\x3d'"+media+"']";else existenceCheck+=":not([media])";if(type)existenceCheck+="[type\x3d'"+type+"']";else existenceCheck+=":not([type])";return jQuery(existenceCheck).length>0}function insertStylesheets($stylesheets){if(!$stylesheets)return;var $head=jQuery("head");$stylesheets.each(function(index,link){var $link= jQuery(link);if(!isStylesheetLoaded($link.attr("href"),$link.attr("type"),$link.attr("media")))$head.append(link)})}function isScriptLoaded(scriptUrl){var rawUrl=rUrlWithOptionalPathParameter.exec(scriptUrl)[1];return jQuery("script[src*\x3d'"+rawUrl+"'], script[data-abx-src*\x3d'"+rawUrl+"']").length>0}function includeExternalScript(scriptUrl,defer){if(!isScriptLoaded(scriptUrl)){jQuery.ajax(scriptUrl,{dataType:"script",async:defer,cache:true});var script=document.createElement("script");script.setAttribute("data-abx-src", scriptUrl);document.getElementsByTagName("head")[0].appendChild(script)}}function _handleInvalidatedParts(event){var index;if(event.request&&event.request.getResponseHeader("x-abx-invalidate-parts")){var partPathsWithUrls=event.request.getResponseHeader("x-abx-invalidate-parts").split(";");for(index=0;index<partPathsWithUrls.length;index++){var pathAndUrl=partPathsWithUrls[index].split(":");var partSelector="[data-abx-web-part\x3d'"+pathAndUrl[0]+"']";if(jQuery(partSelector).length>0)partialLoad(partSelector, decodeURIComponent(pathAndUrl[1]),{triggerEvents:false}).done(triggerPartialLoadEvent)}}}function _handleOnChangePartialSubmit(event){var $element=jQuery(event.target);var $form=$element.closest("form");var abxSubmitOptions=$element.data("abxOnChangePartialSubmit")||{};var options={reloadScripts:true};var eventName=abxSubmitOptions.event;var originalEventName=$form.find("input[name\x3d'$event']").val()||"";if(abxSubmitOptions.partial||typeof abxSubmitOptions.partial==="undefined")if(abxSubmitOptions.replacementSelector)options.replacementSelector= abxSubmitOptions.replacementSelector;if(abxSubmitOptions.hasOwnProperty("reloadScripts"))options.reloadScripts=abxSubmitOptions.reloadScripts;if(eventName)Abaxx.core.setParameter($form,"$event",eventName);var currentFocus=jQuery(document.activeElement);partialSubmit($form,options).always(function(){Abaxx.core.setParameter($form,"$event",originalEventName);if(currentFocus.attr("id")!=null)jQuery("[id\x3d'"+currentFocus.attr("id")+"']").focus()})}function loadAsyncParts(){var asyncLoad=jQuery("[data-abx-load-async]"); var updateInfo=[];asyncLoad.each(function(index,container){var element=jQuery(container);var url=element.attr("data-abx-load-async");element.removeAttr("data-abx-load-async");var reloadId=element.attr("id");if(url&&reloadId)updateInfo.push({url:url,reloadId:reloadId})});jQuery(updateInfo).each(function(index,info){var url=info.url;var reloadId=info.reloadId;var reloadSelector="[id\x3d'"+reloadId+"']";partialLoad(reloadSelector,url,{omitLoadingIndicator:true}).done(function(){jQuery(reloadSelector).removeClass("abx-web-async-loading")})})} var rUrlWithOptionalAnchor=/^([^#]*)(?:#([^#]*))?$/;var rUrlWithOptionalPathParameter=/^(.*?)(;.*)?$/;var NOP=function(){};var triggerPartialLoadFailedEvent=function(data){jQuery(document).trigger(jQuery.Event("abx_partial_load_failed",data))};var triggerPartialLoadEvent=function(source,data){var $eventSource=source||{};var eventData=data||{};if(!source||jQuery.isPlainObject(source)){$eventSource=jQuery(document);eventData=source}$eventSource.trigger(jQuery.Event("abx_partial_load",eventData))};var triggerHtmlChangedEvent= function(data){jQuery(document).trigger(new jQuery.Event("abx_ajax_html_changed",data))};var outstandingAjaxRequests={};var urlForSinglePart=function(url,includeDecorator){includeDecorator=includeDecorator===true;url=rUrlWithOptionalAnchor.exec(url||"")[1];var displayType=includeDecorator?Abaxx.displayType.SinglePartWithDecorator:Abaxx.displayType.SinglePart;return Abaxx.core.setUrlParameter(url,Abaxx.displayType.Param,displayType)};var createAjaxSubmitEvent=function(){return jQuery.Event("abx_ajax_submit")}; var replaceMatching=function(elementSelector,html,reloadScripts,fireHtmlChangedEvent){var deferred=new jQuery.Deferred;var newElements=jQuery(elementSelector,html.scriptless);if(newElements.length===0)newElements=jQuery(html.scriptless).filter(elementSelector);if(newElements.length===0)deferred.reject("Element not found: "+elementSelector);else try{var replaced=[];if(newElements.length===1&&jQuery(elementSelector).length===1){jQuery(elementSelector).replaceWith(newElements);replaced.push(elementSelector)}else newElements.each(function(index, element){var id=jQuery(element).attr("id");if(id){var idSelector="[id\x3d'"+id+"']";jQuery(idSelector).replaceWith(element);replaced.push(idSelector)}});if(replaced.length>0)replaced=jQuery(replaced.join(","));insertStylesheets(html.stylesheets);if(typeof reloadScripts==="undefined"||reloadScripts)if(!executeScripts(html.scripts))deferred.reject();if(typeof fireHtmlChangedEvent==="undefined"||fireHtmlChangedEvent)triggerHtmlChangedEvent({changed:replaced});if(deferred.state()!=="rejected")deferred.resolve()}catch(e){deferred.reject(e)}return deferred.promise()}; var partialLoad=function(elementSelector,url,options){var defaultOptions={reloadScripts:true,async:true,data:"",method:"get",success:NOP,transformHtml:NOP,triggerEvents:true,includeDecorator:false};var deferred=jQuery.Deferred();options=jQuery.extend(defaultOptions,options||{});jQuery.ajax(Abaxx.ajax.urlForSinglePart(url,options.includeDecorator),{dataType:"text",async:options.async,data:options.data,type:options.method,success:function(data,status,request){handlePartialLoadSuccess(deferred,url,elementSelector, options,data,status,request)},error:function(request,status,error){if(options.triggerEvents)triggerPartialLoadFailedEvent({request:request,url:url,cause:status});deferred.reject()}});return deferred.promise()};var handlePartialLoadSuccess=function(deferred,url,elementSelector,options,data,status,request){var contentDisposition=request.getResponseHeader("Content-Disposition");if(contentDisposition!=null&&contentDisposition.indexOf("attachment")>=0){Abaxx.log.log("Ajax download detected, reloading file by browser"); document.location=url;return}var response=parseHtml(data);if(response.redirectUrl)partialLoad(elementSelector,response.redirectUrl,options).done(function(xhr){deferred.resolve(xhr,response.redirectUrl)}).fail(function(){deferred.reject()});else{options.transformHtml(response);replaceMatching(elementSelector,response,options.reloadScripts).fail(function(cause){if(options.triggerEvents)triggerPartialLoadFailedEvent({request:request,url:url,cause:cause});deferred.reject()}).done(function(){deferred.resolve(request, url);options.success();Abaxx.core.scrollToAnchor(url)}).done(function(){if(options.triggerEvents)triggerPartialLoadEvent({request:request,url:url})})}};var partialSubmit=function(form,options){var $form=jQuery(form);var defaultOptions={replacementSelector:"#"+$form.attr("id"),url:$form[0].action,transformHtml:NOP,triggerEvents:true,success:NOP};options=jQuery.extend(defaultOptions,options||{});options.url=Abaxx.ajax.urlForSinglePart(options.url,options.includeDecorator);var isMultiPart=$form.attr("enctype")=== "multipart/form-data";var deferred=new jQuery.Deferred;var sendResult=sendForm($form,isMultiPart,function(response,text,status){handlePartialLoadSuccess(deferred,options.url,options.replacementSelector,options,text,status,response)},options);if(sendResult.state()==="rejected")return sendResult;else return deferred};var loadSinglePart=function(elementId,url,reloadScripts,asynchronous){partialLoad("[id\x3d'"+elementId+"']",url,{reloadScripts:typeof reloadScripts==="undefined"?true:reloadScripts,async:typeof asynchronous=== "undefined"?true:asynchronous});return false};var loadSinglePartByClass=function(className,url,options){options=jQuery.extend({reloadScripts:true,async:true},options||{});partialLoad("[class~\x3d'"+className+"']",url,options);return false};var partialReload=function(reloadId,reloadUrl,reloadScripts){partialLoad("[id\x3d'"+reloadId+"']",reloadUrl,{reloadScripts:reloadScripts||false,updateHistory:"href"});return false};var ParsedHtml=function(htmlString){this.empty=htmlString.replace(/^\s+|\s+$/g,"").length=== 0;this.redirectUrl=null;this.scripts=[];this.scriptless=null;this._extractScripts(htmlString);this._parse(htmlString);this.stylesheets=jQuery(this.scriptless).find("link[rel\x3dstylesheet][href]").remove();return this};ParsedHtml.prototype._extractScripts=function(htmlString){var parsed=this;this.scripts=jQuery.map(htmlString.match(/<script[^>]*>([\S\s]*?)<\/script>/img)||[],function(match){var script=jQuery(match);var type=script.attr("type")||script.attr("lang")||"text/javascript";if(jQuery.inArray(type, ["text/javascript","javascript","text/jscript","jscript"])!==-1){var text=(/<script[^>]*>([\S\s]*?)<\/script>/im.exec(match)||["",""])[1];var redirectMatch=/document\.location\s*=\s*('|")(.+)\1/m.exec(text);if(redirectMatch){parsed.redirectUrl=redirectMatch[2];text=""}if(script.attr("src"))text="Abaxx.ajax.includeExternalScript('"+script.attr("src")+"',"+(script.attr("defer")=="true")+"); "+text;return text}return""});this.scripts=jQuery.grep(this.scripts,function(s){return s})};ParsedHtml.prototype._parse= function(htmlString){this.scriptless=jQuery.parseHTML("\x3cdiv\x3e"+htmlString+"\x3c/div\x3e")[0]};var parseHtml=function(htmlString){return new ParsedHtml(htmlString)};var executeScripts=function(scripts){var scriptErrors=false;if(typeof scripts==="string")scripts=[scripts];jQuery.each(scripts,function(index,script){try{jQuery.globalEval(script)}catch(e){Abaxx.log.error(e);scriptErrors=true}});return!scriptErrors};var submitForm=function(bodyId,options){options=jQuery.extend({onSuccess:NOP,keepDecorator:false}, options||{});var $part=jQuery("[id\x3d'"+bodyId+"']");var $form=$part.is("form")?$part:$part.find("form").first();if($form.length===0)$form=$part.parents("form").first();if($form.length>0){$form.trigger(createAjaxSubmitEvent());if(options.event){var event=$form.find("input[name\x3d'$event']").val()||options.event;Abaxx.core.setParameter($form,"$event",event)}var url=$form.attr("action");jQuery.ajax(urlForSinglePart(url,options.keepDecorator),{data:$form.serialize(),dataType:"text",type:"POST",async:false, success:function(text,status,xhr){options.onSuccess(text,status,xhr)}});return true}return false};var getResponseHeader=function(response,headerName,decodeBase64){decodeBase64=decodeBase64===true;try{if(typeof response.getHeader==="undefined")if(typeof response.getResponseHeader==="undefined")return null;else if(typeof response.getResponseHeader==="function")var result=response.getResponseHeader(headerName);else{if(typeof response.getResponseHeader==="object")result=response.getResponseHeader[headerName]}else{result= response.getHeader(headerName);if(typeof response.getHeader==="function")result=response.getHeader(headerName);else if(typeof response.getHeader==="object")result=response.getHeader[headerName]}if(typeof result!=="undefined"&&result!==null&&result!=="")return decodeBase64?Base64.decode(result):result;else return null}catch(e){return null}};var updateHtmlPageTitle=function(response){};var enableAsyncAspectValidation=function(){var messageTypes=["error","warning","info"];var getMostSignificantMessages= function(xml){var i;var messageToText=function(index,element){return jQuery(element).text()};for(i=0;i<messageTypes.length;i++){var messages=jQuery(messageTypes[i],xml);if(messages.length>0)return{type:messageTypes[i],texts:messages.map(messageToText).get()}}return null};var showValidationMessages=function(xml){var $validationResult=jQuery("aspect",xml).first();var messages=getMostSignificantMessages($validationResult);var aspectId=$validationResult.attr("id");var aspectSelector="[id\x3d'"+aspectId+ "']";var messageSelector="[id\x3d'"+aspectId+"-message']";var labelSelector="[id\x3d'"+aspectId+"-label']";jQuery(aspectSelector+", "+labelSelector).removeClass("aspect-info aspect-warning aspect-error");if(messages){var tooltip=messages.texts.join("\n");var text$jscomp$0=jQuery.map(messages.texts,function(text){return"\x3cspan\x3e"+text+"\x3c/span\x3e"}).join("");jQuery(messageSelector).html(text$jscomp$0).show();jQuery(aspectSelector+", "+labelSelector).addClass("aspect-"+messages.type).attr("title", tooltip);jQuery(labelSelector).css("cursor","help")}else{jQuery(messageSelector).html("").hide();jQuery(aspectSelector+", "+labelSelector).attr("title","");jQuery(labelSelector).css("cursor","")}};var validateOnServer=function(event){var $aspect=jQuery(this);jQuery.ajax(Abaxx.baseUrl+"validate",{dataType:"xml",data:{id:$aspect.attr("id"),aspect:$aspect.attr("data-xaspect"),value:$aspect.val(),part:$aspect.attr("data-xpart")}}).done(showValidationMessages)};jQuery("input[data-xaspect], textarea[data-xaspect]").blur(validateOnServer)}; var _handlePartialLoadFailed=function(event){if(event.url)document.location=event.url.replace(/(?:\$|%24)display\.type=single-part(-decorator)?(&?)/g,"")};var _handleActionWithPartialReload=function(clickEvent){var action=jQuery(this);var reloadSelector=action.attr("data-xreload");var reloadScripts=action.attr("data-xreloadscripts");if(!clickEvent.isDefaultPrevented()){clickEvent.preventDefault();Abaxx.ajax.partialLoad(reloadSelector,action.attr("href"),{reloadScripts:reloadScripts==="true"||false, updateHistory:"href"})}};var _handleActionWithPartialSubmit=function(clickEvent){var action=jQuery(this);var reloadSelector=action.attr("data-xsubmit");var reloadScripts=action.attr("data-xreloadscripts");if(!clickEvent.isDefaultPrevented()){clickEvent.preventDefault();var $form=action.closest("form");if($form.length==0){var formId=action.parents("[data-abx-submitform]").attr("data-abx-submitform");if(formId!=null)$form=jQuery("form[id\x3d'"+formId+"']")}var params=action.data("abxParams");var oldParams= {};if(params!=null&&$form.length>0)jQuery.each(params,function(key,values){oldParams[key]=$form.find("input[name\x3d'"+key+"']").val()||null;jQuery.each(values,function(index,value){Abaxx.core.setParameter($form,key,value)})});var abaxxEvent=action.attr("data-xevent");var originalEventName=$form.find("input[name\x3d'$event']").val()||"";Abaxx.core.setParameter($form,"$event",abaxxEvent);Abaxx.ajax.partialSubmit($form,{reloadScripts:reloadScripts==="true"||false,replacementSelector:reloadSelector!== "true"?reloadSelector:undefined}).always(function(){Abaxx.core.setParameter($form,"$event",originalEventName);jQuery.each(oldParams,function(key,value){if(value==null)$form.find("input[name\x3d'"+key+"']").remove();else Abaxx.core.setParameter($form,key,value)})})}};var registerEventHandlers=function(){jQuery(document).ajaxComplete(function(event,xhr){updateHtmlPageTitle(xhr)}).off(".abaxx_ajax").on("abx_ajax_html_changed.abaxx_ajax",Abaxx.core.triggerReadyEvent).on("abx_partial_load_failed.abaxx_ajax", _handlePartialLoadFailed).on("abx_partial_load.abaxx_ajax",_handleInvalidatedParts).on("change.abaxx_ajax","[data-abx-on-change-partial-submit]",_handleOnChangePartialSubmit);jQuery(document.body).on("click.abaxx_ajax","[data-xreload]",_handleActionWithPartialReload).on("click.abaxx_ajax","[data-xsubmit]",_handleActionWithPartialSubmit)};jQuery(registerEventHandlers);Abaxx.core.onReady(enableAsyncAspectValidation);Abaxx.core.onReady(loadAsyncParts);this.internals={isScriptLoaded:isScriptLoaded,isStylesheetLoaded:isStylesheetLoaded}; var sendForm=function(form,isMultiPart,onSuccess,options){var waitInterval=100;var maxWait=500;var timeout=waitInterval*maxWait;var $form=jQuery(form);var deferred=new jQuery.Deferred;var defaultOptions={async:true,method:$form.attr("method")||"POST",url:$form.attr("action"),timeout:timeout,includeDecorator:false};options=jQuery.extend(defaultOptions,options||{});form=$form[0];var submitEvent=createAjaxSubmitEvent();$form.trigger(submitEvent);if(submitEvent.isDefaultPrevented()){deferred.reject(form); return deferred}Abaxx.loadingIndicator.show();if(isMultiPart){var originalAction=options.url;var originalDisplayType=$form.find("input[name\x3d'"+Abaxx.displayType.Param+"']").val();var uploadFields=$form.find("input[type\x3dfile]").map(function(index,element){return element.name}).get().join(",");var sessionId=(/;.*$/.exec(originalAction)||[""])[0];var part=form.dataset?form.dataset.uploadpart:form.attributes["data-uploadpart"].value;form.action=Abaxx.baseUrl+"UploadServlet"+sessionId+"?$uploadPart\x3d"+ part+"\x26$uploadFields\x3d"+uploadFields;var uploadCompleted=function(transactionId,response){var cleanups=[];var files=[];var j;Abaxx.core.setParameter(form,Abaxx.displayType.Param,null);if(response.responseText&&(response.responseText.lastIndexOf("[]",0)===0||response.responseText.lastIndexOf("[{",0)===0)){files=[];try{files=jQuery.parseJSON(response.responseText)}catch(e){Abaxx.log.error("Upload failed",e)}for(j=0;j<files.length;j++){var newEl=jQuery('\x3cinput type\x3d"hidden" /\x3e').attr({name:"$uploadApplet_"+ files[j].field,value:files[j].fileName}).appendTo(form);cleanups.push(newEl[0])}}else{Abaxx.log.error("Upload failed",response);jQuery(form).trigger(jQuery.Event("abx_upload_failed"))}newEl=jQuery('\x3cinput type\x3d"hidden" /\x3e').attr({name:"$uploadRequest",value:"true"}).appendTo(form);cleanups.push(newEl);form.action=originalAction;Abaxx.core.setParameter(form,Abaxx.displayType.Param,originalDisplayType);var cleanupOnSuccess=function(xhr,text,status){jQuery(cleanups).remove();onSuccess(xhr,text, status)};jQuery.ajax(options.url,{data:$form.serialize(),dataType:"text",type:options.method,async:options.async,timeout:options.timeout}).done(function(text,status,xhr){deferred.resolve(form);cleanupOnSuccess(xhr,text,status)}).fail(function(){deferred.reject(form)})};var submitOptions={url:form.action,iframe:true,timeout:options.timeout,success:function(data,status,xhr){uploadCompleted(status,xhr)},error:function(xhr,status,error){deferred.reject(form)}};jQuery(form).ajaxSubmit(submitOptions)}else jQuery.ajax(options.url, {data:$form.serialize(),dataType:"text",type:options.method,async:options.async,timeout:options.timeout}).done(function(text,status,xhr){try{onSuccess(xhr,text,status)}finally{deferred.resolve(form)}}).fail(function(){Abaxx.core.setParameter(form,Abaxx.displayType.Param,undefined);form.submit();deferred.reject(form)});return deferred.promise()};return{triggerPartialLoadFailedEvent:triggerPartialLoadFailedEvent,triggerPartialLoadEvent:triggerPartialLoadEvent,triggerHtmlChangedEvent:triggerHtmlChangedEvent, partialSubmit:partialSubmit,partialLoad:partialLoad,getJSON:getJSON,urlForSinglePart:urlForSinglePart,loadSinglePart:loadSinglePart,loadSinglePartByClass:loadSinglePartByClass,partialReload:partialReload,parseHtml:parseHtml,executeScripts:executeScripts,submitForm:submitForm,getResponseHeader:getResponseHeader,updateHtmlPageTitle:updateHtmlPageTitle,createAjaxSubmitEvent:createAjaxSubmitEvent,replaceMatching:replaceMatching,registerEventHandlers:registerEventHandlers,includeExternalScript:includeExternalScript, insertStylesheets:insertStylesheets,sendForm:sendForm}}); Abaxx.define("popups.adapter",function(){var $template=jQuery('\x3cdiv class\x3d"abaxxPopupPanel" /\x3e');var Popup=function(id,zIndex){this.element=$template.clone().attr("id",id);this.element.dialog({autoOpen:false,modal:true,closeOnEscape:false,position:{my:"center",at:"center",of:window},width:"auto",minHeight:135,zIndex:zIndex,draggable:true,resizable:false,create:function(event){jQuery(event.target).parent().find("\x3e .ui-dialog-titlebar \x3e .ui-dialog-titlebar-close").hide()}});this.element.closest(".ui-dialog").prependTo(document.body); this.element.parent().find(".ui-dialog-titlebar .ui-dialog-title").addClass("abx-page-icon")};Popup.prototype.open=function open(){if(Abaxx.device.isSmallScreen())window.scrollTo(0,0);var title=jQuery("\x3cspan\x3e"+this.getTitle()+"\x3c/span\x3e");var dialogType=title.find("[data-abx-wdg-dialog-type]");if(dialogType.length>0)this.element.parent().find(".ui-dialog-titlebar .ui-dialog-title").addClass("abx-wdg-"+dialogType.attr("data-abx-wdg-dialog-type"));this.element.dialog("open");if(jQuery.browser.msie){var dialog= this.element.parent(".ui-dialog");var width=dialog.innerWidth();if(width)dialog.css("width",width)}};Popup.prototype.center=function center(){this.element.dialog({my:"center",at:"center",of:window})};Popup.prototype.setContent=function setContent(newContent){this.element.html(newContent)};Popup.prototype.getContent=function getContent(){return this.element.html()};Popup.prototype.getTitle=function getTitle(){return this.element.dialog("option","title")};Popup.prototype.setTitle=function setTitle(newTitle){this.element.dialog("option", "title",newTitle)};Popup.prototype.getElement=function getElement(){return this.element};Popup.prototype.close=function closePopup(){this.element.dialog("close");this.setContent("")};Popup.prototype.setDisplayedPart=function setDisplayedPart(partPath){this.partName=partPath.indexOf(".")>0?partPath.substring(partPath.lastIndexOf(".")+1):partPath;this.element.parent().addClass(this.partName)};Popup.prototype.unsetDisplayedPart=function unsetDisplayedPart(partPath){if(this.partName)this.element.parent().removeClass(this.partName)}; Popup.prototype.find=function find(selector){return this.element.find(selector)};Popup.prototype.handleResize=function handleResize(){if(jQuery.browser.msie){var dialog=this.element.parent(".ui-dialog");dialog.css("width","auto");var width=dialog.children(".abaxxPopupPanel").innerWidth();if(width)dialog.css("width",width)}this.center()};Popup.prototype.trigger=function(event){this.element.trigger(event)};return{Popup:Popup}}); Abaxx.define("popups",function(){function triggerPopupCreatedEvent(popup){jQuery(document).trigger(jQuery.Event("abx_popup_created",{popup:popup}))}function triggerPopupOpenedEvent(popup){popup.trigger(new jQuery.Event("abx_popup_opened",{popup:popup}))}function createPopup(){var idPrefix="abaxxPopupPanel_";currentPopup+=1;if(currentPopup===0)jQuery(document.body).addClass("abx-web-hasPopup");var nextId=currentPopup;var zIndex=Abaxx.core.nextZIndex(1E3);Abaxx.core.nextZIndex(10);if(typeof popups[currentPopup]=== "undefined"||popups[currentPopup]===null){var popup=new Abaxx.popups.adapter.Popup(idPrefix+nextId,zIndex);popups[currentPopup]=popup;triggerPopupCreatedEvent(popup)}else popups[currentPopup].getElement().dialog({zIndex:zIndex})}function _handleResize(event){var popup=getPopup(false);if(popup!=null)popup.handleResize()}var displayTypePopup="single-part-popup";var mode={AUTO:"auto",OPEN:"open",CLOSE:"close",CLOSE_WITHOUT_RELOAD:"only-close",SKIP:"skip"};var currentPopup=-1;var rClosePopup=/&?(%24|\$)closePopup=true/; var popups=[];var popupsToClose=[];var maxRedirect=50;var urlForPopup=function(url){url=/^([^#]*)(?:#([^#]*))?$/.exec(url||"")[1];return Abaxx.core.setUrlParameter(url,Abaxx.displayType.Param,displayTypePopup)};var getPopup=function(newPopup){if(newPopup===true)createPopup();return popups[currentPopup]};var popupIsVisible=function(){return typeof getPopup(false)!=="undefined"};var isElementInPopup=function(element){return popupIsVisible()&&jQuery(element).parents(".abaxxPopupPanel").length>0};var currentZIndex= function(){var popup=getPopup(false);if(popup)return parseInt(popup.getElement().closest(".ui-dialog").css("z-index"),10);return 0};var closePopup=function(lazy){if(currentPopup<0)return null;if(currentPopup===0)jQuery(document.body).removeClass("abx-web-hasPopup");var popup=getPopup(false);if(popup){removePortletNameFromPopup(popup);popup.trigger(new jQuery.Event("abx_popup_closing"))}if(lazy===true)popupsToClose.push(popups[currentPopup]);else popup.close();currentPopup-=1;return popups[currentPopup]}; var closePopupDelayed=function(){for(;popupsToClose.length>0;){var p=popupsToClose.pop();p.close()}};var fillPopup=function(html,newPopup,basePart){closePopupDelayed();var abaxxPopupPanel=getPopup(newPopup);if(!abaxxPopupPanel)return;abaxxPopupPanel.setContent(html.scriptless);initializeAddPortletNameToPopup(html,abaxxPopupPanel);if(html.title)abaxxPopupPanel.setTitle(html.title);if(basePart)abaxxPopupPanel.setDisplayedPart(basePart);Abaxx.ajax.insertStylesheets(html.stylesheets);abaxxPopupPanel.open(); try{jQuery(".top-bar, [data-topbar]").css("height","").removeClass("expanded")}catch(e){Abaxx.log.error(e)}triggerPopupOpenedEvent(abaxxPopupPanel);abaxxPopupPanel.find("[autofocus]").focus();Abaxx.ajax.executeScripts(html.scripts);Abaxx.ajax.triggerHtmlChangedEvent({changed:abaxxPopupPanel})};var handlePopupResponse=function(html,popupMode,baseComposite){var failed=html.empty;var redirectCount=0;var handleRedirect=function(text,status,response){html=Abaxx.ajax.parseHtml(text);html.title=Abaxx.ajax.getResponseHeader(response, "Caption",true);baseComposite=Abaxx.ajax.getResponseHeader(response,"BaseComposite");Abaxx.core.scrollToAnchor(this.url);redirectCount+=1;failed=redirectCount>maxRedirect};for(var handleRedirectError=function(){failed=true};!failed;){var redirectUrl=html.redirectUrl;if(redirectUrl===null){if(popupMode===mode.CLOSE_WITHOUT_RELOAD)closePopup(false);break}if(rClosePopup.test(redirectUrl)){for(var uri=redirectUrl;rClosePopup.test(uri);)uri=uri.replace(rClosePopup,"");if(uri.indexOf("?",uri.length-1)!== -1)uri=uri.substring(0,uri.length-1);if(popupMode===mode.CLOSE_WITHOUT_RELOAD){closePopup(false);jQuery.ajax(urlForPopup(uri),{type:"get",dataType:"text",async:true}).done(function(response){Abaxx.ajax.updateHtmlPageTitle(response)});Abaxx.ajax.triggerPartialLoadEvent();return true}else{var parent=closePopup(false);if(typeof parent==="undefined"||parent===null){var linkEvent=new Abaxx.core.OpenLinkEvent({url:uri});jQuery(document).trigger(linkEvent);return true}}}jQuery.ajax(urlForPopup(redirectUrl), {type:"get",dataType:"text",async:false}).done(handleRedirect).fail(handleRedirectError)}if(!failed&&html.scriptless!==null){if(popupMode!==mode.CLOSE_WITHOUT_RELOAD)fillPopup(html,popupMode===mode.OPEN,baseComposite);Abaxx.ajax.triggerPartialLoadEvent();return true}else return false};var setTitle=function(title){if(title&&popupIsVisible())getPopup(false).setTitle(title)};var openLink=function(url,popupMode){if(popupMode===mode.SKIP)return true;if(popupMode===mode.CLOSE){var parent=closePopup(true); if(typeof parent==="undefined"||parent===null)return true}var html={title:null};var baseComposite=null;jQuery.ajax(urlForPopup(url),{type:"get",dataType:"text",async:true}).then(function(text,status,xhr){Abaxx.ajax.updateHtmlPageTitle(xhr);html=Abaxx.ajax.parseHtml(text);html.title=Abaxx.ajax.getResponseHeader(xhr,"Caption",true);baseComposite=Abaxx.ajax.getResponseHeader(xhr,"BaseComposite");if(handlePopupResponse(html,popupMode,baseComposite))Abaxx.core.scrollToAnchor(url);else Abaxx.ajax.triggerPartialLoadFailedEvent({url:url})}).fail(function(){Abaxx.ajax.triggerPartialLoadFailedEvent({url:url})}); return false};var _handleSubmitError=function(response,popupMode){var html=Abaxx.ajax.parseHtml(response.responseText);var replacement=jQuery(html.scriptless).find("\x3e div[id], \x3e div[class], \x3e form[id], \x3e form[class]").first();if(replacement.length===1){var toReplace=null;if(replacement.attr("id"))var replacementCandidates=jQuery("[id\x3d'"+replacement.attr("id")+"']");else{var selector=jQuery.trim(jQuery(replacement).attr("class")).replace(/^|\s+/g,".");replacementCandidates=jQuery(selector)}if(replacementCandidates.length=== 1){toReplace=replacementCandidates.first();toReplace.replaceWith(replacement);Abaxx.ajax.insertStylesheets(html.stylesheets);Abaxx.ajax.executeScripts(html.scripts);Abaxx.ajax.triggerHtmlChangedEvent({changed:toReplace});Abaxx.ajax.triggerPartialLoadEvent();return true}else if(response.status===200){fillPopup(html,popupMode===mode.OPEN,Abaxx.ajax.getResponseHeader(response,"BaseComposite"));Abaxx.ajax.triggerPartialLoadEvent();return true}}return false};var submitForm=function(formname,popupMode, originalEventName){var $form=typeof formname==="string"?jQuery("[id\x3d'"+formname+"']"):jQuery(formname);if(popupMode===mode.CLOSE){var parent=closePopup(true);if(typeof parent==="undefined"||parent===null){$form.submit();return false}}var isMultiPart=$form.attr("enctype")==="multipart/form-data";var onSuccess=function(response){var actionResult=Abaxx.ajax.getResponseHeader(response,"ActionResult");if(actionResult==="FAILED"||actionResult&&actionResult.trim&&actionResult.trim()==="FAILED"){if(!_handleSubmitError(response, popupMode)){try{Abaxx.core.setParameter($form,Abaxx.displayType.Param,undefined)}catch(ignored){}$form[0].submit()}return}Abaxx.ajax.updateHtmlPageTitle(response);var html=Abaxx.ajax.parseHtml(response.responseText);var title=Abaxx.ajax.getResponseHeader(response,"Caption",true);var baseComposite=Abaxx.ajax.getResponseHeader(response,"BaseComposite");if(title!==null)html.title=title;if(!handlePopupResponse(html,popupMode,baseComposite))if(html.redirectUrl){var linkEvent=new Abaxx.core.OpenLinkEvent({url:html.redirectUrl}); jQuery(document).trigger(linkEvent)}};Abaxx.core.setParameter($form,Abaxx.displayType.Param,displayTypePopup);return Abaxx.ajax.sendForm($form[0],isMultiPart,onSuccess).always(function(){if(typeof originalEventName!=="undefined")Abaxx.core.setParameter($form,"$event",originalEventName);Abaxx.core.setParameter($form,Abaxx.displayType.Param,null)})};var needsPopupHandling=function(popupMode){return popupMode===mode.OPEN||popupMode===mode.CLOSE||popupMode===mode.AUTO&&popupIsVisible()};var setMode=function(element, newMode){if(newMode&&mode[newMode.toUpperCase()])jQuery(element).attr("data-xpopupmode",newMode)};var registerEventHandlers=function(){jQuery(document).on("submit","form",function(event){if(!event.isDefaultPrevented()&&popupIsVisible()){event.preventDefault();submitForm(this,mode.AUTO)}}).on("abx_open_popup.popup",function(event){if(!event.isDefaultPrevented())if(event.form){submitForm(event.form,mode.OPEN,event.originalEventName);event.preventDefault()}else if(event.url)if(!openLink(event.url,mode.OPEN))event.preventDefault()}).on("abx_close_popup.popup", function(event){if(!event.isDefaultPrevented())if(event.form){submitForm(event.form,event.popupMode||mode.CLOSE,event.originalEventName);event.preventDefault()}else if(event.url){if(openLink(event.url,event.popupMode||mode.CLOSE)||event.popupMode===mode.CLOSE_WITHOUT_RELOAD){if(event.popupMode!==mode.CLOSE_WITHOUT_RELOAD){var linkEvent=new Abaxx.core.OpenLinkEvent({url:event.url});jQuery(event.target).trigger(linkEvent)}event.preventDefault()}}else{closePopup(false);event.preventDefault()}}).on("abx_open_link.popup", "body",function(event){if(!event.isDefaultPrevented()&&popupIsVisible()&&!openLink(event.url,mode.AUTO))event.preventDefault()}).on("click","a[href]",function(event){var $a=jQuery(this);var href=$a.attr("href");var popupMode=$a.attr("data-xpopupmode");var target=$a.attr("target");var isJavaScriptLink=href.toLowerCase().indexOf("javascript:")===0;var targetsAnotherWindow=target&&target!=window.name;if(!event.isDefaultPrevented()&&popupMode!==mode.SKIP&&!targetsAnotherWindow&&href!==""&&href.indexOf("#")!== 0&&popupIsVisible()&&!isJavaScriptLink){var linkEvent=jQuery.Event("abx_open_link",{url:$a.attr("href")});$a.trigger(linkEvent);if(linkEvent.isDefaultPrevented())event.preventDefault()}});jQuery.ajaxPrefilter(function(settings){if(popupIsVisible()&&settings.dataType!="script")settings.url=Abaxx.core.setUrlParameter(settings.url,Abaxx.displayType.Param,Abaxx.popups.displayType)});if(!Abaxx.device.isAndroid()&&!Abaxx.device.isIOS())jQuery(window).on("resize",function(event){_handleResize(event)});if(screen.orientation)screen.orientation.addEventListener("change", function(event){_handleResize(event)})};var initializeAddPortletNameToPopup=function(html,popup){jQuery("[data-abx-popup-portlet]",html.scriptless).each(function(id,element){var e=jQuery(element);var portletName=e.attr("data-abx-popup-portlet");if(portletName&&portletName!="")jQuery(popup.element).parent(".ui-dialog").addClass(portletName)})};var removePortletNameFromPopup=function(popup){jQuery("[data-abx-popup-portlet]",popup.getContent()).each(function(id,element){var e=jQuery(element);var portletName= e.attr("data-abx-popup-portlet");if(portletName&&portletName!="")jQuery(popup.element).parent(".ui-dialog").removeClass(portletName)});popup.unsetDisplayedPart()};jQuery(registerEventHandlers);this.internals={handleSubmitError:_handleSubmitError,handlePopupResponse:handlePopupResponse,fillPopup:fillPopup,closePopupDelayed:closePopupDelayed};return{displayType:displayTypePopup,mode:mode,setTitle:setTitle,isVisible:popupIsVisible,isElementInPopup:isElementInPopup,currentZIndex:currentZIndex,getPopup:getPopup, closePopup:closePopup,openLink:openLink,submitForm:submitForm,needsPopupHandling:needsPopupHandling,setMode:setMode,sendUsingYahoo:Abaxx.ajax.sendForm,registerEventHandlers:registerEventHandlers}}); Abaxx.define("util",function(){var idsToSelector=function(){var ids=[];jQuery.each(jQuery.makeArray(arguments),function(index,arg){jQuery.merge(ids,jQuery.makeArray(arg))});return jQuery.map(ids,function(id){return"[id\x3d'"+id+"']"}).join(",")};var reloadImage=function(imageId){var src=jQuery("[id\x3d'"+imageId+"']").attr("src");if(src){var seq=(new Date).getTime();var r=/(\?|&)seq=\d+/;if(r.exec(src))src=src.replace(r,"$1seq\x3d"+seq);else src=src+(src.indexOf("?")===-1?"?seq\x3d":"\x26seq\x3d")+ seq;jQuery("[id\x3d'"+imageId+"']").attr("src",src)}};var _leftPadZero=function(value,targetLength){targetLength=targetLength||2;for(var padded=value.toString();padded.length<targetLength;)padded="0"+padded;return padded};var formatTime=function(millis){var seconds=Math.floor(millis/1E3)%60;var minutes=Math.floor(millis/(60*1E3))%60;var hours=Math.floor(millis/(60*60*1E3))%24;var formatted="";if(hours>0)formatted=_leftPadZero(hours)+":";formatted+=_leftPadZero(minutes)+":"+_leftPadZero(seconds);return formatted}; var registerEnterKeyListener=function(item,action){jQuery(item).keypress(function(event){if(event.which===13)action(item,item.form,event)})};var print=function(){window.print()};var concatURL=function(baseURL,params){var url=baseURL;if(params)if(url.indexOf("#")>0)url=concatURL(url.substring(0,url.indexOf("#")),params)+url.substring(url.indexOf("#"),url.length);else url+=(url.indexOf("?")===-1?"?":"\x26")+params;return url};var enableAction=function(id,enabled){if(jQuery.isArray(id))jQuery.each(id, function(index,element){enableAction(element,enabled)});jQuery("#"+id+", #"+id+"Top, #"+id+"Bottom, #"+id+"DropDown").each(function(index,element){enableElement(element,enabled)})};var enableElement=function(element,enabled){if(jQuery.isFunction(element.enableAction))element.enableAction(enabled);else{var e=jQuery(element);if(enabled){e.prop("disabled",false).removeAttr("disabled").removeClass("abaxx-disabled");if(e.attr("href")=="javascript: void(0)"&&e.attr("data-xhref")!=null)e.attr("href",e.attr("data-xhref"))}else{e.prop("disabled", true).attr("disabled","disabled").addClass("abaxx-disabled");if(e.attr("href")!=null&&e.attr("data-xhref")!=null)e.attr("href","javascript: void(0)")}}};Abaxx.core.onReady(function(){jQuery("a[disabled]").each(function(index,element){enableElement(element,false)})});return{idsToSelector:idsToSelector,reloadImage:reloadImage,formatTime:formatTime,registerEnterKeyListener:registerEnterKeyListener,concatURL:concatURL,enableAction:enableAction,enableElement:enableElement,print:print}}); Abaxx.define("html5compat.placeholders",function(){if(document.createElement("input").placeholder===undefined){var hidePlaceholderText=function(input){var $input=jQuery(input);var placeholder=$input.attr("placeholder");$input.addClass("focus").removeClass("placeholderVisible");if($input.val()===placeholder)$input.val("")};var showPlaceholderText=function(input){var $input=jQuery(input);var placeholder=$input.attr("placeholder");var currentValue=$input.val();$input.removeClass("focus").toggleClass("placeholderVisible", currentValue===placeholder);if(currentValue==="")$input.val(placeholder)};jQuery(document).on("submit abx_ajax_submit","form",function(){jQuery("input[placeholder]").each(function(index,element){var $input=jQuery(element);if($input.val()===$input.attr("placeholder"))$input.val("")})}).on("blur","input[placeholder]",function(){showPlaceholderText(this)}).on("focus","input[placeholder]",function(){hidePlaceholderText(this)});jQuery("input[placeholder]").each(function(index,input){showPlaceholderText(input)})}}); Abaxx.define("html5compat.autofocus",function(){if(document.createElement("input").autofocus===undefined)jQuery(function(){jQuery("form [autofocus]").focus()})}); Abaxx.define("widgets.contextMenu",function(){function init(options){var $menu=jQuery("\x3cul /\x3e").contextmenu(options);return $menu.data("contextmenu")}function forElement(selector){return jQuery(selector).data("contextmenu")}function initializeContextMenus(){jQuery("[data-abx-widget\x3dcontext-menu]").each(function(id,element){var menuOptions=jQuery(element).data("abxOptions");if(!menuOptions.trigger)menuOptions.trigger=element;init(menuOptions)})}Abaxx.core.onReady(initializeContextMenus);return{init:init, forElement:forElement}}); Abaxx.define("widgets.dialog",function(){function initializeDialogs(){jQuery("[data-abx-widget\x3ddialog]").each(function(id,element){var dialog=jQuery(element);var options=dialog.data("abxOptions");if(!options.callback||options.callback=="Abaxx.widgets.dialog.show")show(options.message);else eval(options.callback+"('"+options.message+"');");dialog.remove()})}var show=function(message,options){var infoPopup=jQuery("#infoPopup");if(infoPopup.length===0)infoPopup=jQuery("\x3cdiv id\x3d'infoPopup' /\x3e");infoPopup.html(message.replace(/\n/g, "\x3cbr /\x3e")).dialog(options).on("dialogclose",function(event,dialog){jQuery(event.target).dialog("destroy");jQuery(event.target).remove()})};var close=function(){jQuery("#infoPopup").dialog("close")};var setupDialogTriggers=function(){Abaxx.core.companionScript("data-abx-web-dialog-closer",function(trigger,data){var closeDialog=function(event){if(event.type==="keypress"&&event.keyCode!=13)return;trigger.parents("[data-abx-web-dialog]").dialog("close")};trigger.off(".abx-web-dialog-close");if(trigger.is("select"))trigger.on("change.abx-web-dialog-close", closeDialog);else if(trigger.is("input"))trigger.on("keypress.abx-web-dialog-close",closeDialog);else trigger.on("click.abx-web-dialog-close",closeDialog)});Abaxx.core.companionScript("data-abx-web-dialog-open",function(trigger,data){var button=trigger;trigger.off("click.abx-web-dialog-open").on("click.abx-web-dialog-open",function(event$jscomp$0){event$jscomp$0.preventDefault();var dialogTemplate=jQuery("[id\x3d'"+data.dialog+"']");data=data||{};var defaultOptions={minHeight:0,minWidth:0,resizable:false, position:{my:"left top",at:"left bottom",of:button}};var options=jQuery.extend(defaultOptions,data);var setFocus=function(event,ui){jQuery(event.target).find(":input").first().focus()};dialogTemplate.dialog(options).on("dialogopen",setFocus).on("dialogfocus",setFocus).on("dialogclose",function(event,dialog){try{jQuery(event.target).dialog("destroy")}catch(e){Abaxx.log.error(e)}});Abaxx.ajax.triggerHtmlChangedEvent({changed:dialogTemplate});dialogTemplate.show()})})};Abaxx.core.onReady(initializeDialogs); setupDialogTriggers();return{show:show,close:close}}); Abaxx.define("widgets.form",function(){var addInfos=function(form,aspectName,infos){jQuery(form).find("[data-abx-form-row]").each(function(index$jscomp$0,element$jscomp$0){var formRow=jQuery(element$jscomp$0);var dataFormRow=formRow.data("abxFormRow");if(dataFormRow.aspect==aspectName){var data=formRow.data("abxWebFormrowMessages");data.totalCountErrors=0;data.totalCountWarning=0;data.totalCountInfos=0;var infoAreaFormRow=data.infoarea;if(infoAreaFormRow.messages.length==0)infoAreaFormRow.messages[0]= {aspectName:aspectName};var newInfos=infos;jQuery(infoAreaFormRow.messages).each(function(index,element){if(element.aspectName===aspectName){element.errors=newInfos.errors;element.warnings=newInfos.warnings;element.infos=newInfos.warnings;if(typeof newInfos.errors!="undefined")data.totalCountErrors+=newInfos.errors.length;if(typeof newInfos.warnings!="undefined")data.totalCountWarning+=newInfos.warnings.length;if(typeof newInfos.infos!="undefined")data.totalCountInfos+=newInfos.infos.length;if(typeof newInfos.errors!= "undefined"&&newInfos.errors.length>0){data.infoarea.highestMessageType="error";data.infoarea.hasEntries=true;data.infoarea.hasMessages=true;Abaxx.theme.messages.highlightAspects(formRow,true,"error");Abaxx.theme.messages.highlightAspects(formRow,false,"warning");Abaxx.theme.messages.highlightAspects(formRow,false,"info")}else if(typeof newInfos.warnings!="undefined"&&newInfos.warnings.length>0){data.infoarea.highestMessageType="warn";data.infoarea.hasEntries=true;data.infoarea.hasMessages=true;Abaxx.theme.messages.highlightAspects(formRow, false,"error");Abaxx.theme.messages.highlightAspects(formRow,true,"warning");Abaxx.theme.messages.highlightAspects(formRow,false,"info")}else if(typeof newInfos.infos!="undefined"&&newInfos.infos.length>0){data.infoarea.highestMessageType="info";data.infoarea.hasEntries=true;data.infoarea.hasMessages=true;Abaxx.theme.messages.highlightAspects(formRow,false,"error");Abaxx.theme.messages.highlightAspects(formRow,false,"warning");Abaxx.theme.messages.highlightAspects(formRow,true,"info")}else{data.infoarea.highestMessageType= "help";data.infoarea.hasEntries=data.infoarea.hasHelp;data.infoarea.hasMessages=false;Abaxx.theme.messages.highlightAspects(formRow,false,"error");Abaxx.theme.messages.highlightAspects(formRow,false,"warning");Abaxx.theme.messages.highlightAspects(formRow,false,"info")}data.hasErrors=data.totalCountErrors>0;data.hasWarnings=data.totalCountWarning>0;data.hasInfos=data.totalCountInfos>0;return false}});if(newInfos.help&&newInfos.help.length>0)jQuery(infoAreaFormRow.help).each(function(index,element){if(element.aspectName=== aspectName){element.help=newInfos.help;if(typeof newInfos.help!="undefined"&&newInfos.help.length>0){data.infoarea.hasEntries=true;data.infoarea.hasHelp=true;Abaxx.theme.messages.highlightAspects(formRow,true,"help")}else{data.infoarea.hasHelp=false;Abaxx.theme.messages.highlightAspects(formRow,false,"help")}return false}});return false}})};return{addInfos:addInfos}}); Abaxx.define("widgets.tree",function(){function initAll(){jQuery(".abaxx-menu-withSubMenu[data-abx-widget\x3dmenu]").each(function(index,menu){var $menu=jQuery(menu);var options=$menu.data("abxOptions");if(!$menu.data("abxMenuInitialized")){$menu.data("abxMenuInitialized",true);installHoverSubMenu($menu,options.type,options.rowSize)}});jQuery("[data-abx-widget\x3dasync-tree]").each(function(index,tree){var $tree=jQuery(tree);var options=$tree.data("abxOptions");if(!$tree.data("abxTreeInitialized")){$tree.data("abxTreeInitialized", true);init(tree.id,options.reloadScripts)}})}var partialReload=function(treeId,nodeId,url,reloadScripts){jQuery.ajax(Abaxx.ajax.urlForSinglePart(url),{data:{targetId:nodeId},dataType:"text",success:function(data,status,request){var response=Abaxx.ajax.parseHtml(data);var newDoc=response.scriptless;var nodeSelector="[id\x3d'"+nodeId+"-node']";var newElement=jQuery(nodeSelector,newDoc);if(newElement.length===0)Abaxx.ajax.triggerPartialLoadFailedEvent({request:request,url:url,cause:"Element not found "+ nodeSelector});else{newElement=newElement.first();jQuery(nodeSelector).replaceWith(newElement);var filterByClass=function(){var cssClass=jQuery(this).attr("class")||"";return cssClass.indexOf(nodeId+"-child")!==-1};jQuery(nodeSelector).closest(".tree").find("tr").filter(filterByClass).remove();jQuery(".tree tr",newDoc).filter(filterByClass).insertAfter(newElement);if(reloadScripts)Abaxx.ajax.executeScripts(response.scripts);Abaxx.ajax.triggerHtmlChangedEvent({changed:jQuery(nodeSelector)});Abaxx.ajax.triggerPartialLoadEvent()}}, error:function(request,status){Abaxx.ajax.triggerPartialLoadFailedEvent({request:request,url:url,cause:status})}});return false};var _rTargetIdForNode=/^(.+)-node$/;var _rTargetIdForChunk=/^(.+)-node(?:-prev|-next)$/;var init=function(treeId,reloadScripts){var expandOrCollapseNode=function(event){if(!event.isDefaultPrevented()){var $this=jQuery(this);var nodeId=$this.parents(".tree-node").attr("id").match(_rTargetIdForNode)[1];partialReload(treeId,nodeId,$this.attr("href"),reloadScripts);event.preventDefault()}}; var navigateChunk=function(event){if(!event.isDefaultPrevented()){var $this=jQuery(this);var nodeId=$this.parents(".tree-prev, .tree-next").attr("id").match(_rTargetIdForChunk)[1];partialReload(treeId,nodeId,$this.attr("href"),reloadScripts);event.preventDefault()}};jQuery("[id\x3d'"+treeId+"']").off("click.tree-widget").on("click.tree-widget","a[data-xtree-expand]",expandOrCollapseNode).on("click.tree-widget",".tree-prev a, .tree-next a",navigateChunk)};var installHoverSubMenu=function($menu,type, rowSize){jQuery(document).ready(function($){if(rowSize>0)$menu.find("li.tree-l1").each(function(index$jscomp$0,submenu){var $submenu=$(submenu);if($submenu.find("li.tree-l3").length>0){var width=0;var rows=$submenu.find("li.tree-l2");for(var i=0;i<rows.length;i+=rowSize){var entries=rows.slice(i,i+rowSize);var entriesWidth=0;entries.each(function(index,entry){entriesWidth+=$(entry).width()});if(entriesWidth>width)width=entriesWidth;entries.wrapAll('\x3cdiv class\x3d"abaxx-menu-row"/\x3e')}$submenu.find("div.abaxx-menu-row").width(width); $submenu.children("ul").css("left","-"+width/4+"px")}});var options={defaultConfig:{hoverClass:"abaxx-menu-hover",animation:{opacity:"show"},speed:"fast",delay:100}};var option=options[type];if(!option)option=options.defaultConfig;var menuElement=$menu.find("\x3e div \x3e ul");if(menuElement.superfish)menuElement.superfish(option)})};var initAbxTree=function(){Abaxx.core.companionScript("data-abx-tree-toggle",function(trigger,data){var options=data;trigger.off(".abx-tree-toggle").on("click.abx-tree-toggle", function(event){if(!event.isDefaultPrevented()){Abaxx.ajax.partialLoad("[id\x3d'"+options.node+"']",options.url,{});event.preventDefault();event.stopPropagation()}})});Abaxx.core.companionScript("data-abx-tree-select",function(trigger$jscomp$0,options$jscomp$0){var cleanSelection=function(trigger,options){var cssSelected=options.cssSelected;var cssBranchSelected=options.cssBranchSelected;var root=trigger.closest("[data-abx-tree-root]");if(cssSelected)jQuery("."+cssSelected,root).removeClass(cssSelected); if(cssBranchSelected)jQuery("."+cssBranchSelected,root).removeClass(cssBranchSelected)};var markNodeAsSelected=function(trigger,options){cleanSelection(trigger,options);var cssSelected=options.cssSelected;var cssBranchSelected=options.cssBranchSelected;trigger.closest("[data-abx-tree-node]").addClass(cssSelected);trigger.parentsUntil("[data-abx-tree-root]").addClass(cssBranchSelected)};var selectNode=function(event){event.preventDefault();event.stopPropagation();if(options$jscomp$0.target)window.open(options$jscomp$0.url, options$jscomp$0.target);else if(options$jscomp$0.popupMode)Abaxx.popups.openLink(options$jscomp$0.url,options$jscomp$0.popupMode);else if(options$jscomp$0.mode=="reload")jQuery(this).trigger(new Abaxx.core.OpenLinkEvent({url:options$jscomp$0.url}));else if(options$jscomp$0.mode=="partial"){cleanSelection(trigger$jscomp$0,options$jscomp$0);if(options$jscomp$0.reloadId)if(options$jscomp$0.reloadId=="node")var reloadId=options$jscomp$0.node;else if(options$jscomp$0.reloadId=="tree"){var root=trigger$jscomp$0.closest("[data-abx-tree-root]"); reloadId=root.attr("id")}else reloadId=options$jscomp$0.reloadId;else{root=trigger$jscomp$0.closest("[data-abx-tree-root]");reloadId=root.attr("id")}Abaxx.ajax.partialLoad("[id\x3d'"+reloadId+"']",options$jscomp$0.url,{})}else if(options$jscomp$0.mode=="onlySelect"){jQuery.ajax(options$jscomp$0.url,{type:"GET",async:false});markNodeAsSelected(trigger$jscomp$0,options$jscomp$0)}else if(options$jscomp$0.mode=="noRequest"){markNodeAsSelected(trigger$jscomp$0,options$jscomp$0);trigger$jscomp$0.trigger(jQuery.Event("abx_web_tree_node_selected", options$jscomp$0))}};trigger$jscomp$0.off(".abx-tree-select").on("click.abx-tree-select",selectNode)})};initAbxTree();Abaxx.core.onReady(initAll);return{partialReload:partialReload,installHoverSubMenu:installHoverSubMenu,init:init}});