vendor: 94,788 bytes, lines 1-4
1 2(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test("Â ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function( 3a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.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(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f 4.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf("margin")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()}catch(e){}if(!d||!f.contains(c,a))return d?{top:d.top,left:d.left}:{top:0,left:0};var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position==="fixed")break;d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d}if(j.position==="relative"||j.position==="static")k+=h.offsetTop,l+=h.offsetLeft;f.support.fixedPosition&&j.position==="fixed"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)});var c=this[0],d=c&&c.ownerDocument;if(!d)return null;if(c===d.body)return f.offset.bodyOffset(c);return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);
4 5(function($) { 6var _rootUrl = '/', _serverUrl = _rootUrl + 'ezjscore/', _seperator = '@SEPERATOR$', 7_prefUrl = _rootUrl + 'user/preferences'; 8if ( window.XMLHttpRequest && window.ActiveXObject ) 9$.ajaxSettings.xhr = function() { try { return new window.ActiveXObject('Microsoft.XMLHTTP'); } catch(e) {} }; 10function _ez( callArgs, post, callBack ) 11{ 12callArgs = callArgs.join !== undefined ? callArgs.join( _seperator ) : callArgs; 13var url = _serverUrl + 'call/'; 14if ( post ) 15{ 16var _token = '', _tokenNode = document.getElementById('ezxform_token_js'); 17if ( _tokenNode ) _token = _tokenNode.getAttribute('title'); 18if ( post.join !== undefined )// support serializeArray() format 19{ 20post.push( { 'name': 'ezjscServer_function_arguments', 'value': callArgs } ); 21post.push( { 'name': 'ezxform_token', 'value': _token } ); 22} 23else if ( typeof(post) === 'string' )// string 24{ 25post += ( post ? '&' : '' ) + 'ezjscServer_function_arguments=' + callArgs + '&ezxform_token=' + _token; 26} 27else // object 28{ 29post['ezjscServer_function_arguments'] = callArgs; 30post['ezxform_token'] = _token; 31} 32return $.post( url, post, callBack, 'json' ); 33} 34return $.get( url + encodeURIComponent( callArgs ), {}, callBack, 'json' ); 35}; 36_ez.url = _serverUrl; 37_ez.root_url = _rootUrl; 38_ez.seperator = _seperator; 39$.ez = _ez; 40$.ez.setPreference = function( name, value ) 41{ 42var param = {'Function': 'set_and_exit', 'Key': name, 'Value': value}; 43_tokenNode = document.getElementById( 'ezxform_token_js' ); 44if ( _tokenNode ) 45param.ezxform_token = _tokenNode.getAttribute( 'title' ); 46return $.post( _prefUrl, param ); 47}; 48function _ezLoad( callArgs, post, selector, callBack ) 49{ 50callArgs = callArgs.join !== undefined ? callArgs.join( _seperator ) : callArgs; 51var url = _serverUrl + 'call/'; 52if ( post ) 53{ 54post['ezjscServer_function_arguments'] = callArgs; 55post['ezxform_token'] = jQuery('#ezxformtoken').attr('title'); 56} 57else 58url += encodeURIComponent( callArgs ); 59return this.load( url + ( selector ? ' ' + selector : '' ), post, callBack ); 60}; 61$.fn.ez = _ezLoad; 62})(jQuery); 63function insertMedia() 64{ 65for( var k = 0, l = arguments.length; k < l; k++ ) 66{ 67document.write( arguments[k] ); 68} 69} 70if(typeof YUI!="undefined"){YUI._YUI=YUI;}var YUI=function(){var c=0,f=this,b=arguments,a=b.length,e=function(h,g){return(h&&h.hasOwnProperty&&(h instanceof g));},d=(typeof YUI_config!=="undefined")&&YUI_config;if(!(e(f,YUI))){f=new YUI();}else{f._init();if(YUI.GlobalConfig){f.applyConfig(YUI.GlobalConfig);}if(d){f.applyConfig(d);}if(!a){f._setup();}}if(a){for(;c<a;c++){f.applyConfig(b[c]);}f._setup();}f.instanceOf=e;return f;};(function(){var p,b,q="3.4.1",h=".",n="http://yui.yahooapis.com/",t="yui3-js-enabled",l=function(){},g=Array.prototype.slice,r={"io.xdrReady":1,"io.xdrResponse":1,"SWF.eventHandler":1},f=(typeof window!="undefined"),e=(f)?window:null,v=(f)?e.document:null,d=v&&v.documentElement,a=d&&d.className,c={},i=new Date().getTime(),m=function(z,y,x,w){if(z&&z.addEventListener){z.addEventListener(y,x,w);}else{if(z&&z.attachEvent){z.attachEvent("on"+y,x);}}},u=function(A,z,y,w){if(A&&A.removeEventListener){try{A.removeEventListener(z,y,w);}catch(x){}}else{if(A&&A.detachEvent){A.detachEvent("on"+z,y);}}},s=function(){YUI.Env.windowLoaded=true;YUI.Env.DOMReady=true;if(f){u(window,"load",s);}},j=function(y,x){var w=y.Env._loader;if(w){w.ignoreRegistered=false;w.onEnd=null;w.data=null;w.required=[];w.loadType=null;}else{w=new y.Loader(y.config);y.Env._loader=w;}YUI.Env.core=y.Array.dedupe([].concat(YUI.Env.core,["loader-base","loader-rollup","loader-yui3"]));return w;},o=function(y,x){for(var w in x){if(x.hasOwnProperty(w)){y[w]=x[w];}}},k={success:true};if(d&&a.indexOf(t)==-1){if(a){a+=" ";}a+=t;d.className=a;}if(q.indexOf("@")>-1){q="3.3.0";}p={applyConfig:function(D){D=D||l;var y,A,z=this.config,B=z.modules,x=z.groups,C=z.rls,w=this.Env._loader;for(A in D){if(D.hasOwnProperty(A)){y=D[A];if(B&&A=="modules"){o(B,y);}else{if(x&&A=="groups"){o(x,y);}else{if(C&&A=="rls"){o(C,y);}else{if(A=="win"){z[A]=y.contentWindow||y;z.doc=z[A].document;}else{if(A=="_yuid"){}else{z[A]=y;}}}}}}}if(w){w._config(D);}},_config:function(w){this.applyConfig(w);},_init:function(){var y,z=this,w=YUI.Env,x=z.Env,A;z.version=q;if(!x){z.Env={core:["get","features","intl-base","yui-log","yui-later","loader-base","loader-rollup","loader-yui3"],mods:{},versions:{},base:n,cdn:n+q+"/build/",_idx:0,_used:{},_attached:{},_missed:[],_yidx:0,_uidx:0,_guidp:"y",_loaded:{},_BASE_RE:/(?:\?(?:[^&]*&)*([^&]*))?\b(simpleyui|yui(?:-\w+)?)\/\2(?:-(min|debug))?\.js/,parseBasePath:function(F,D){var B=F.match(D),E,C;if(B){E=RegExp.leftContext||F.slice(0,F.indexOf(B[0]));C=B[3];if(B[1]){E+="?"+B[1];}E={filter:C,path:E};}return E;},getBase:w&&w.getBase||function(F){var D=(v&&v.getElementsByTagName("script"))||[],G=x.cdn,C,E,B,H;for(E=0,B=D.length;E<B;++E){H=D[E].src;
70if(H){C=z.Env.parseBasePath(H,F);if(C){y=C.filter;G=C.path;break;}}}return G;}};x=z.Env;x._loaded[q]={};if(w&&z!==YUI){x._yidx=++w._yidx;x._guidp=("yui_"+q+"_"+x._yidx+"_"+i).replace(/\./g,"_");}else{if(YUI._YUI){w=YUI._YUI.Env;x._yidx+=w._yidx;x._uidx+=w._uidx;for(A in w){if(!(A in x)){x[A]=w[A];}}delete YUI._YUI;}}z.id=z.stamp(z);c[z.id]=z;}z.constructor=YUI;z.config=z.config||{win:e,doc:v,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,cacheUse:true,fetchCSS:true,use_rls:false,rls_timeout:2000};if(YUI.Env.rls_disabled){z.config.use_rls=false;}z.config.lang=z.config.lang||"en-US";z.config.base=YUI.config.base||z.Env.getBase(z.Env._BASE_RE);if(!y||(!("mindebug").indexOf(y))){y="min";}y=(y)?"-"+y:y;z.config.loaderPath=YUI.config.loaderPath||"loader/loader"+y+".js";},_setup:function(B){var x,A=this,w=[],z=YUI.Env.mods,y=A.config.core||[].concat(YUI.Env.core);for(x=0;x<y.length;x++){if(z[y[x]]){w.push(y[x]);}}A._attach(["yui-base"]);A._attach(w);if(A.Loader){j(A);}},applyTo:function(C,B,y){if(!(B in r)){this.log(B+": applyTo not allowed","warn","yui");return null;}var x=c[C],A,w,z;if(x){A=B.split(".");w=x;for(z=0;z<A.length;z=z+1){w=w[A[z]];if(!w){this.log("applyTo not found: "+B,"warn","yui");}}return w.apply(x,y);}return null;},add:function(x,C,B,w){w=w||{};var A=YUI.Env,D={name:x,fn:C,version:B,details:w},E,z,y=A.versions;A.mods[x]=D;y[B]=y[B]||{};y[B][x]=D;for(z in c){if(c.hasOwnProperty(z)){E=c[z].Env._loader;if(E){if(!E.moduleInfo[x]){E.addModule(w,x);}}}}return this;},_attach:function(B,M){var F,N,L,I,w,D,y,z=YUI.Env.mods,G=YUI.Env.aliases,x=this,E,A=x.Env._loader,C=x.Env._attached,H=B.length,A,K=[];for(F=0;F<H;F++){N=B[F];L=z[N];K.push(N);if(A&&A.conditions[N]){x.Object.each(A.conditions[N],function(P){var O=P&&((P.ua&&x.UA[P.ua])||(P.test&&P.test(x)));if(O){K.push(P.name);}});}}B=K;H=B.length;for(F=0;F<H;F++){if(!C[B[F]]){N=B[F];L=z[N];if(G&&G[N]){x._attach(G[N]);continue;}if(!L){if(A&&A.moduleInfo[N]){L=A.moduleInfo[N];M=true;}if(!M){if((N.indexOf("skin-")===-1)&&(N.indexOf("css")===-1)){x.Env._missed.push(N);x.Env._missed=x.Array.dedupe(x.Env._missed);x.message("NOT loaded: "+N,"warn","yui");}}}else{C[N]=true;for(E=0;E<x.Env._missed.length;E++){if(x.Env._missed[E]===N){x.message("Found: "+N+" (was reported as missing earlier)","warn","yui");x.Env._missed.splice(E,1);}}I=L.details;w=I.requires;D=I.use;y=I.after;if(w){for(E=0;E<w.length;E++){if(!C[w[E]]){if(!x._attach(w)){return false;}break;}}}if(y){for(E=0;E<y.length;E++){if(!C[y[E]]){if(!x._attach(y,true)){return false;}break;}}}if(L.fn){try{L.fn(x,N);}catch(J){x.error("Attach error: "+N,J,N);return false;}}if(D){for(E=0;E<D.length;E++){if(!C[D[E]]){if(!x._attach(D)){return false;}break;}}}}}}return true;},use:function(){var y=g.call(arguments,0),C=y[y.length-1],B=this,A=0,x,w=B.Env,z=true;if(B.Lang.isFunction(C)){y.pop();}else{C=null;}if(B.Lang.isArray(y[0])){y=y[0];}if(B.config.cacheUse){while((x=y[A++])){if(!w._attached[x]){z=false;break;}}if(z){if(y.length){}B._notify(C,k,y);return B;}}if(B._loading){B._useQueue=B._useQueue||new B.Queue();B._useQueue.add([y,C]);}else{B._use(y,function(E,D){E._notify(C,D,y);});}return B;},_notify:function(z,w,x){if(!w.success&&this.config.loadErrorFn){this.config.loadErrorFn.call(this,this,z,w,x);}else{if(z){try{z(this,w);}catch(y){this.error("use callback error",y,x); 71}}}},_use:function(y,A){if(!this.Array){this._attach(["yui-base"]);}var M,F,N,K,x=this,O=YUI.Env,z=O.mods,w=x.Env,C=w._used,J=O._loaderQueue,R=y[0],E=x.Array,P=x.config,D=P.bootstrap,L=[],H=[],Q=true,B=P.fetchCSS,I=function(T,S){if(!T.length){return;}E.each(T,function(W){if(!S){H.push(W);}if(C[W]){return;}var U=z[W],X,V;if(U){C[W]=true;X=U.details.requires;V=U.details.use;}else{if(!O._loaded[q][W]){L.push(W);}else{C[W]=true;}}if(X&&X.length){I(X);}if(V&&V.length){I(V,1);}});},G=function(W){var U=W||{success:true,msg:"not dynamic"},T,S,V=true,X=U.data;x._loading=false;if(X){S=L;L=[];H=[];I(X);T=L.length;if(T){if(L.sort().join()==S.sort().join()){T=false;}}}if(T&&X){x._loading=false;x._use(y,function(){if(x._attach(X)){x._notify(A,U,X);}});}else{if(X){V=x._attach(X);}if(V){x._notify(A,U,y);}}if(x._useQueue&&x._useQueue.size()&&!x._loading){x._use.apply(x,x._useQueue.next());}};if(R==="*"){Q=x._attach(x.Object.keys(z));if(Q){G();}return x;}if(D&&x.Loader&&y.length){F=j(x);F.require(y);F.ignoreRegistered=true;F.calculate(null,(B)?null:"js");y=F.sorted;}I(y);M=L.length;
71if(M){L=x.Object.keys(E.hash(L));M=L.length;}if(D&&M&&x.Loader){x._loading=true;F=j(x);F.onEnd=G;F.context=x;F.data=y;F.ignoreRegistered=false;F.require(y);F.insert(null,(B)?null:"js");}else{if(M&&x.config.use_rls&&!YUI.Env.rls_enabled){O._rls_queue=O._rls_queue||new x.Queue();K=function(S,U){var T=function(W){G(W);S.rls_advance();},V=S._rls(U);if(V){S.rls_oncomplete(function(W){T(W);});S.Get.script(V,{data:U,timeout:S.config.rls_timeout,onFailure:S.rls_handleFailure,onTimeout:S.rls_handleTimeout});}else{T({success:true,data:U});}};O._rls_queue.add(function(){O._rls_in_progress=true;x.rls_callback=A;x.rls_locals(x,y,K);});if(!O._rls_in_progress&&O._rls_queue.size()){O._rls_queue.next()();}}else{if(D&&M&&x.Get&&!w.bootstrapped){x._loading=true;N=function(){x._loading=false;J.running=false;w.bootstrapped=true;O._bootstrapping=false;if(x._attach(["loader"])){x._use(y,A);}};if(O._bootstrapping){J.add(N);}else{O._bootstrapping=true;x.Get.script(P.base+P.loaderPath,{onEnd:N});}}else{Q=x._attach(y);if(Q){G();}}}}return x;},namespace:function(){var x=arguments,B=this,z=0,y,A,w;for(;z<x.length;z++){w=x[z];if(w.indexOf(h)){A=w.split(h);for(y=(A[0]=="YAHOO")?1:0;y<A.length;y++){B[A[y]]=B[A[y]]||{};B=B[A[y]];}}else{B[w]=B[w]||{};}}return B;},log:l,message:l,dump:function(w){return""+w;},error:function(A,y,x){var z=this,w;if(z.config.errorFn){w=z.config.errorFn.apply(z,arguments);}if(z.config.throwFail&&!w){throw (y||new Error(A));}else{z.message(A,"error");}return z;},guid:function(w){var x=this.Env._guidp+"_"+(++this.Env._uidx);return(w)?(w+x):x;},stamp:function(y,z){var w;if(!y){return y;}if(y.uniqueID&&y.nodeType&&y.nodeType!==9){w=y.uniqueID;}else{w=(typeof y==="string")?y:y._yuid;}if(!w){w=this.guid();if(!z){try{y._yuid=w;}catch(x){w=null;}}}return w;},destroy:function(){var w=this;if(w.Event){w.Event._unload();}delete c[w.id];delete w.Env;delete w.config;}};YUI.prototype=p;for(b in p){if(p.hasOwnProperty(b)){YUI[b]=p[b];}}YUI._init();if(f){m(window,"load",s);}else{s();}YUI.Env.add=m;YUI.Env.remove=u;if(typeof exports=="object"){exports.YUI=YUI;}}());YUI.add("yui-base",function(b){var i=b.Lang||(b.Lang={}),n=String.prototype,k=Object.prototype.toString,a={"undefined":"undefined","number":"number","boolean":"boolean","string":"string","[object Function]":"function","[object RegExp]":"regexp","[object Array]":"array","[object Date]":"date","[object Error]":"error"},c=/\{\s*([^|}]+?)\s*(?:\|([^}]*))?\s*\}/g,s=/^\s+|\s+$/g,e=b.config.win,o=e&&!!(e.MooTools||e.Prototype);i.isArray=(!o&&Array.isArray)||function(w){return i.type(w)==="array";};i.isBoolean=function(w){return typeof w==="boolean";};i.isFunction=function(w){return i.type(w)==="function";};i.isDate=function(w){return i.type(w)==="date"&&w.toString()!=="Invalid Date"&&!isNaN(w);};i.isNull=function(w){return w===null;};i.isNumber=function(w){return typeof w==="number"&&isFinite(w);};i.isObject=function(y,x){var w=typeof y;return(y&&(w==="object"||(!x&&(w==="function"||i.isFunction(y)))))||false;};i.isString=function(w){return typeof w==="string";};i.isUndefined=function(w){return typeof w==="undefined";};i.trim=n.trim?function(w){return w&&w.trim?w.trim():w;}:function(w){try{return w.replace(s,"");}catch(x){return w;}};i.trimLeft=n.trimLeft?function(w){return w.trimLeft();}:function(w){return w.replace(/^\s+/,"");};i.trimRight=n.trimRight?function(w){return w.trimRight();}:function(w){return w.replace(/\s+$/,"");};i.isValue=function(x){var w=i.type(x);switch(w){case"number":return isFinite(x);case"null":case"undefined":return false;default:return !!w;}};i.type=function(w){return a[typeof w]||a[k.call(w)]||(w?"object":"null");};i.sub=function(w,x){return w.replace?w.replace(c,function(y,z){return i.isUndefined(x[z])?y:x[z];}):w;};i.now=Date.now||function(){return new Date().getTime();};var f=b.Lang,r=Array.prototype,p=Object.prototype.hasOwnProperty;function j(y,B,A){var x,w;B||(B=0);if(A||j.test(y)){try{return r.slice.call(y,B);}catch(z){w=[];for(x=y.length;B<x;++B){w.push(y[B]);}return w;}}return[y];}b.Array=j;j.dedupe=function(B){var A={},y=[],x,z,w;for(x=0,w=B.length;x<w;++x){z=B[x];if(!p.call(A,z)){A[z]=1;y.push(z);}}return y;};j.each=j.forEach=r.forEach?function(y,w,x){r.forEach.call(y||[],w,x||b);return b;}:function(A,y,z){for(var x=0,w=(A&&A.length)||0;x<w;++x){if(x in A){y.call(z||b,A[x],x,A);}}return b;};j.hash=function(z,x){var A={},B=(x&&x.length)||0,y,w;for(y=0,w=z.length;y<w;++y){if(y in z){A[z[y]]=B>y&&y in x?x[y]:true;}}return A;};j.indexOf=r.indexOf?function(x,w){return r.indexOf.call(x,w);}:function(z,y){for(var x=0,w=z.length;x<w;++x){if(x in z&&z[x]===y){return x;}}return -1;};j.numericSort=function(x,w){return x-w;};j.some=r.some?function(y,w,x){return r.some.call(y,w,x);}:function(A,y,z){for(var x=0,w=A.length;x<w;++x){if(x in A&&y.call(z,A[x],x,A)){return true;}}return false;};j.test=function(y){var w=0;if(f.isArray(y)){w=1;}else{if(f.isObject(y)){try{if("length" in y&&!y.tagName&&!y.alert&&!y.apply){w=2; 72}}catch(x){}}}return w;};function u(){this._init();this.add.apply(this,arguments);}u.prototype={_init:function(){this._q=[];},next:function(){return this._q.shift();},last:function(){return this._q.pop();},add:function(){this._q.push.apply(this._q,arguments);return this;},size:function(){return this._q.length;}};b.Queue=u;YUI.Env._loaderQueue=YUI.Env._loaderQueue||new u();var m="__",p=Object.prototype.hasOwnProperty,l=b.Lang.isObject;b.cached=function(y,w,x){w||(w={});return function(z){var A=arguments.length>1?Array.prototype.join.call(arguments,m):String(z);if(!(A in w)||(x&&w[A]==x)){w[A]=y.apply(y,arguments);}return w[A];};};b.merge=function(){var y=arguments,z=0,x=y.length,w={};for(;
72z<x;++z){b.mix(w,y[z],true);}return w;};b.mix=function(w,x,D,y,A,E){var B,H,G,z,I,C,F;if(!w||!x){return w||b;}if(A){if(A===2){b.mix(w.prototype,x.prototype,D,y,0,E);}G=A===1||A===3?x.prototype:x;F=A===1||A===4?w.prototype:w;if(!G||!F){return w;}}else{G=x;F=w;}B=D&&!E;if(y){for(z=0,C=y.length;z<C;++z){I=y[z];if(!p.call(G,I)){continue;}H=B?false:I in F;if(E&&H&&l(F[I],true)&&l(G[I],true)){b.mix(F[I],G[I],D,null,0,E);}else{if(D||!H){F[I]=G[I];}}}}else{for(I in G){if(!p.call(G,I)){continue;}H=B?false:I in F;if(E&&H&&l(F[I],true)&&l(G[I],true)){b.mix(F[I],G[I],D,null,0,E);}else{if(D||!H){F[I]=G[I];}}}if(b.Object._hasEnumBug){b.mix(F,G,D,b.Object._forceEnum,A,E);}}return w;};var p=Object.prototype.hasOwnProperty,e=b.config.win,o=e&&!!(e.MooTools||e.Prototype),v,g=b.Object=(!o&&Object.create)?function(w){return Object.create(w);}:(function(){function w(){}return function(x){w.prototype=x;return new w();};}()),d=g._forceEnum=["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toString","toLocaleString","valueOf"],t=g._hasEnumBug=!{valueOf:0}.propertyIsEnumerable("valueOf"),q=g._hasProtoEnumBug=(function(){}).propertyIsEnumerable("prototype"),h=g.owns=function(x,w){return !!x&&p.call(x,w);};g.hasKey=h;g.keys=(!o&&Object.keys)||function(A){if(!b.Lang.isObject(A)){throw new TypeError("Object.keys called on a non-object");}var z=[],y,x,w;if(q&&typeof A==="function"){for(x in A){if(h(A,x)&&x!=="prototype"){z.push(x);}}}else{for(x in A){if(h(A,x)){z.push(x);}}}if(t){for(y=0,w=d.length;y<w;++y){x=d[y];if(h(A,x)){z.push(x);}}}return z;};g.values=function(A){var z=g.keys(A),y=0,w=z.length,x=[];for(;y<w;++y){x.push(A[z[y]]);}return x;};g.size=function(x){try{return g.keys(x).length;}catch(w){return 0;}};g.hasValue=function(x,w){return b.Array.indexOf(g.values(x),w)>-1;};g.each=function(z,x,A,y){var w;for(w in z){if(y||h(z,w)){x.call(A||b,z[w],w,z);}}return b;};g.some=function(z,x,A,y){var w;for(w in z){if(y||h(z,w)){if(x.call(A||b,z[w],w,z)){return true;}}}return false;};g.getValue=function(A,z){if(!b.Lang.isObject(A)){return v;}var x,y=b.Array(z),w=y.length;for(x=0;A!==v&&x<w;x++){A=A[y[x]];}return A;};g.setValue=function(C,A,B){var w,z=b.Array(A),y=z.length-1,x=C;if(y>=0){for(w=0;x!==v&&w<y;w++){x=x[z[w]];}if(x!==v){x[z[w]]=B;}else{return v;}}return C;};g.isEmpty=function(w){return !g.keys(w).length;};YUI.Env.parseUA=function(C){var B=function(F){var G=0;return parseFloat(F.replace(/\./g,function(){return(G++==1)?"":".";}));},E=b.config.win,w=E&&E.navigator,z={ie:0,opera:0,gecko:0,webkit:0,safari:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:w&&w.cajaVersion,secure:false,os:null},x=C||w&&w.userAgent,D=E&&E.location,y=D&&D.href,A;z.userAgent=x;z.secure=y&&(y.toLowerCase().indexOf("https")===0);if(x){if((/windows|win32/i).test(x)){z.os="windows";}else{if((/macintosh/i).test(x)){z.os="macintosh";}else{if((/rhino/i).test(x)){z.os="rhino";}}}if((/KHTML/).test(x)){z.webkit=1;}A=x.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){z.webkit=B(A[1]);z.safari=z.webkit;if(/ Mobile\//.test(x)){z.mobile="Apple";A=x.match(/OS ([^\s]*)/);if(A&&A[1]){A=B(A[1].replace("_","."));}z.ios=A;z.ipad=z.ipod=z.iphone=0;A=x.match(/iPad|iPod|iPhone/);if(A&&A[0]){z[A[0].toLowerCase()]=z.ios;}}else{A=x.match(/NokiaN[^\/]*|webOS\/\d\.\d/);if(A){z.mobile=A[0];}if(/webOS/.test(x)){z.mobile="WebOS";A=x.match(/webOS\/([^\s]*);/);if(A&&A[1]){z.webos=B(A[1]);}}if(/ Android/.test(x)){if(/Mobile/.test(x)){z.mobile="Android";}A=x.match(/Android ([^\s]*);/);if(A&&A[1]){z.android=B(A[1]);}}}A=x.match(/Chrome\/([^\s]*)/);if(A&&A[1]){z.chrome=B(A[1]);z.safari=0;}else{A=x.match(/AdobeAIR\/([^\s]*)/);if(A){z.air=A[0];}}}if(!z.webkit){A=x.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){z.opera=B(A[1]);A=x.match(/Version\/([^\s]*)/);if(A&&A[1]){z.opera=B(A[1]);}A=x.match(/Opera Mini[^;]*/);if(A){z.mobile=A[0];}}else{A=x.match(/MSIE\s([^;]*)/);if(A&&A[1]){z.ie=B(A[1]);}else{A=x.match(/Gecko\/([^\s]*)/);if(A){z.gecko=1;A=x.match(/rv:([^\s\)]*)/);if(A&&A[1]){z.gecko=B(A[1]);}}}}}}if(!C){YUI.Env.UA=z;}return z;};b.UA=YUI.Env.UA||YUI.Env.parseUA();YUI.Env.aliases={"anim":["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"],"app":["controller","model","model-list","view"],"attribute":["attribute-base","attribute-complex"],"autocomplete":["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"],"base":["base-base","base-pluginhost","base-build"],"cac
72he":["cache-base","cache-offline","cache-plugin"],"collection":["array-extras","arraylist","arraylist-add","arraylist-filter","array-invoke"],"dataschema":["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"],"datasource":["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"],"datatable":["datatable-base","datatable-datasource","datatable-sort","datatable-scroll"],"datatype":["datatype-number","datatype-date","datatype-xml"],"datatype-date":["datatype-date-parse","datatype-date-format"],"datatype-number":["datatype-number-parse","datatype-number-format"],"datatype-xml":["datatype-xml-parse","datatype-xml-format"],"dd":["dd-ddm-base","dd-ddm","dd-ddm-drop","dd-drag","dd-proxy","dd-constrain","dd-drop","dd-scroll","dd-delegate"],"dom":["dom-base","dom-screen","dom-style","selector-native","selector"],"editor":["frame","selection","exec-command","editor-base","editor-para","editor-br","editor-bidi","editor-tab","createlink-base"],"event":["event-base","event-delegate","event-synthetic","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize","event-hover","event-outside"],"event-custom":["event-custom-base","event-custom-complex"],"event-gestures":["event-flick","event-move"],"highlight":["highlight-base","highlight-accentfold"],"history":["history-base","history-hash","history-hash-ie","history-html5"],"io":["io-base","io-xdr","io-form","io-upload-iframe","io-queue"],"json":["json-parse","json-stringify"],"loader":["loader-base","loader-rollup","loader-yui3"],"node":["node-base","node-event-delegate","node-pluginhost","node-screen","node-style"],"pluginhost":["pluginhost-base","pluginhost-config"],"querystring":["querystring-parse","querystring-stringify"],"recordset":["recordset-base","recordset-sort","recordset-filter","recordset-indexer"],"resize":["resize-base","resize-proxy","resize-constrain"],"slider":["slider-base","slider-value-range","clickable-rail","range-slider"],"text":["text-accentfold","text-wordbreak"],"widget":["widget-base","widget-htmlparser","widget-uievents","widget-skin"]}; 73},"3.4.1");YUI.add("get",function(e){var B=e.UA,p=e.Lang,b="text/javascript",v="text/css",I="stylesheet",s="script",q="autopurge",A="utf-8",w="link",C="async",h=true,l={script:h,css:!(B.webkit||B.gecko)},z={},r=0,g,u=function(J){var K=J.timer;if(K){clearTimeout(K);J.timer=null;}},m=function(M,J,P,N){var K=N||e.config.win,O=K.document,Q=O.createElement(M),L;if(P){e.mix(J,P);}for(L in J){if(J[L]&&J.hasOwnProperty(L)){Q.setAttribute(L,J[L]);}}return Q;},k=function(K,L,J){return m(w,{id:e.guid(),type:v,rel:I,href:K},J,L);},E=function(K,L,J){return m(s,{id:e.guid(),type:b,src:K},J,L);},a=function(K,L,J){return{tId:K.tId,win:K.win,data:K.data,nodes:K.nodes,msg:L,statusText:J,purge:function(){d(this.tId);}};},o=function(N,M,J){var L=z[N],K=L&&L.onEnd;L.finished=true;if(K){K.call(L.context,a(L,M,J));}},F=function(M,L){var K=z[M],J=K.onFailure;u(K);if(J){J.call(K.context,a(K,L));}o(M,L,"failure");},y=function(J){F(J,"transaction "+J+" was aborted");},x=function(L){var J=z[L],K=J.onSuccess;u(J);if(J.aborted){y(L);}else{if(K){K.call(J.context,a(J));}o(L,undefined,"OK");}},H=function(J,M){var K=z[M],L=(p.isString(J))?K.win.document.getElementById(J):J;if(!L){F(M,"target node not found: "+J);}return L;},d=function(O){var K,R,S,T,L,Q,P,N,M,J=z[O];if(J){K=J.nodes;M=K.length;for(N=0;N<M;N++){L=K[N];S=L.parentNode;if(L.clearAttributes){L.clearAttributes();}else{for(Q in L){if(L.hasOwnProperty(Q)){delete L[Q];}}}S.removeChild(L);}}J.nodes=[];},t=function(N,J){var K=z[N],L=K.onProgress,M;if(L){M=a(K);M.url=J;L.call(K.context,M);}},D=function(L){var J=z[L],K=J.onTimeout;if(K){K.call(J.context,a(J));}o(L,"timeout","timeout");},f=function(M,J){var L=z[M],K=(L&&!L.async);if(!L){return;}if(K){u(L);}t(M,J);if(!L.finished){if(L.aborted){y(M);}else{if((--L.remaining)===0){x(M);}else{if(K){i(M);}}}}},c=function(K,M,L,J){if(B.ie){M.onreadystatechange=function(){var N=this.readyState;if("loaded"===N||"complete"===N){M.onreadystatechange=null;f(L,J);}};}else{if(B.webkit){if(K===s){M.addEventListener("load",function(){f(L,J);},false);}}else{M.onload=function(){f(L,J);};M.onerror=function(N){F(L,N+": "+J);};}}},G=function(L,P,O){var M=z[P],N=O.document,J=M.insertBefore||N.getElementsByTagName("base")[0],K;if(J){K=H(J,P);if(K){K.parentNode.insertBefore(L,K);}}else{N.getElementsByTagName("head")[0].appendChild(L);}},i=function(Q){var O=z[Q],L=O.type,K=O.attributes,P=O.win,N=O.timeout,M,J;if(O.url.length>0){J=O.url.shift();if(N&&!O.timer){O.timer=setTimeout(function(){D(Q);},N);}
73if(L===s){M=E(J,P,K);}else{M=k(J,P,K);}O.nodes.push(M);c(L,M,Q,J);G(M,Q,P);if(!l[L]){f(Q,J);}if(O.async){i(Q);}}},n=function(){if(g){return;}g=true;var J,K;for(J in z){if(z.hasOwnProperty(J)){K=z[J];if(K.autopurge&&K.finished){d(K.tId);delete z[J];}}}g=false;},j=function(K,J,L){L=L||{};var O="q"+(r++),N=L.purgethreshold||e.Get.PURGE_THRESH,M;if(r%N===0){n();}M=z[O]=e.merge(L);M.tId=O;M.type=K;M.url=J;M.finished=false;M.nodes=[];M.win=M.win||e.config.win;M.context=M.context||M;M.autopurge=(q in M)?M.autopurge:(K===s)?true:false;M.attributes=M.attributes||{};M.attributes.charset=L.charset||M.attributes.charset||A;if(C in M&&K===s){M.attributes.async=M.async;}M.url=(p.isString(M.url))?[M.url]:M.url;if(!M.url[0]){M.url.shift();}M.remaining=M.url.length;i(O);return{tId:O};};e.Get={PURGE_THRESH:20,abort:function(K){var L=(p.isString(K))?K:K.tId,J=z[L];if(J){J.aborted=true;}},script:function(J,K){return j(s,J,K);},css:function(J,K){return j("css",J,K);}};},"3.4.1",{requires:["yui-base"]});YUI.add("features",function(b){var c={};b.mix(b.namespace("Features"),{tests:c,add:function(d,e,f){c[d]=c[d]||{};c[d][e]=f;},all:function(e,f){var g=c[e],d=[];if(g){b.Object.each(g,function(i,h){d.push(h+":"+(b.Features.test(e,h,f)?1:0));});}return(d.length)?d.join(";"):"";},test:function(e,g,f){f=f||[];var d,i,k,j=c[e],h=j&&j[g];if(!h){}else{d=h.result;if(b.Lang.isUndefined(d)){i=h.ua;if(i){d=(b.UA[i]);}k=h.test;if(k&&((!i)||d)){d=k.apply(b,f);}h.result=d;}}return d;}});var a=b.Features.add;a("load","0",{"name":"graphics-canvas-default","test":function(f){var e=f.config.doc,d=e&&e.createElement("canvas");return(e&&!e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(d&&d.getContext&&d.getContext("2d")));},"trigger":"graphics"});a("load","1",{"name":"autocomplete-list-keys","test":function(d){return !(d.UA.ios||d.UA.android);},"trigger":"autocomplete-list"});a("load","2",{"name":"graphics-svg","test":function(e){var d=e.config.doc;return(d&&d.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));},"trigger":"graphics"});a("load","3",{"name":"history-hash-ie","test":function(e){var d=e.config.doc&&e.config.doc.documentMode;return e.UA.ie&&(!("onhashchange" in e.config.win)||!d||d<8);},"trigger":"history-hash"});a("load","4",{"name":"graphics-vml-default","test":function(f){var e=f.config.doc,d=e&&e.createElement("canvas");return(e&&!e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!d||!d.getContext||!d.getContext("2d")));},"trigger":"graphics"});a("load","5",{"name":"graphics-svg-default","test":function(e){var d=e.config.doc;return(d&&d.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));},"trigger":"graphics"});a("load","6",{"name":"widget-base-ie","trigger":"widget-base","ua":"ie"});a("load","7",{"name":"transition-timer","test":function(g){var f=g.config.doc,e=(f)?f.documentElement:null,d=true;if(e&&e.style){d=!("MozTransition" in e.style||"WebkitTransition" in e.style);}return d;},"trigger":"transition"});a("load","8",{"name":"dom-style-ie","test":function(j){var h=j.Features.test,i=j.Features.add,f=j.config.win,g=j.config.doc,d="documentElement",e=false;i("style","computedStyle",{test:function(){return f&&"getComputedStyle" in f;}});i("style","opacity",{test:function(){return g&&"opacity" in g[d].style;}});e=(!h("style","opacity")&&!h("style","computedStyle"));return e;},"trigger":"dom-style"});a("load","9",{"name":"selector-css2","test":function(f){var e=f.config.doc,d=e&&!("querySelectorAll" in e); 74return d;},"trigger":"selector"});a("load","10",{"name":"event-base-ie","test":function(e){var d=e.config.doc&&e.config.doc.implementation;return(d&&(!d.hasFeature("Events","2.0")));},"trigger":"node-base"});a("load","11",{"name":"dd-gestures","test":function(d){return(d.config.win&&("ontouchstart" in d.config.win&&!d.UA.chrome));},"trigger":"dd-drag"});a("load","12",{"name":"scrollview-base-ie","trigger":"scrollview-base","ua":"ie"});a("load","13",{"name":"graphics-canvas","test":function(f){var e=f.config.doc,d=e&&e.createElement("canvas");return(e&&!e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(d&&d.getContext&&d.getContext("2d")));},"trigger":"graphics"});a("load","14",{"name":"graphics-vml","test":function(f){var e=f.config.doc,d=e&&e.createElement("canvas");return(e&&!e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!d||
74!d.getContext||!d.getContext("2d")));},"trigger":"graphics"});},"3.4.1",{requires:["yui-base"]});YUI.add("intl-base",function(b){var a=/[, ]/;b.mix(b.namespace("Intl"),{lookupBestLang:function(g,h){var f,j,c,e;function d(l){var k;for(k=0;k<h.length;k+=1){if(l.toLowerCase()===h[k].toLowerCase()){return h[k];}}}if(b.Lang.isString(g)){g=g.split(a);}for(f=0;f<g.length;f+=1){j=g[f];if(!j||j==="*"){continue;}while(j.length>0){c=d(j);if(c){return c;}else{e=j.lastIndexOf("-");if(e>=0){j=j.substring(0,e);if(e>=2&&j.charAt(e-2)==="-"){j=j.substring(0,e-2);}}else{break;}}}}return"";}});},"3.4.1",{requires:["yui-base"]});YUI.add("yui-log",function(d){var c=d,e="yui:log",a="undefined",b={debug:1,info:1,warn:1,error:1};c.log=function(j,s,g,q){var l,p,n,k,o,i=c,r=i.config,h=(i.fire)?i:YUI.Env.globalEvents;if(r.debug){if(g){p=r.logExclude;n=r.logInclude;if(n&&!(g in n)){l=1;}else{if(n&&(g in n)){l=!n[g];}else{if(p&&(g in p)){l=p[g];}}}}if(!l){if(r.useBrowserConsole){k=(g)?g+": "+j:j;if(i.Lang.isFunction(r.logFn)){r.logFn.call(i,j,s,g);}else{if(typeof console!=a&&console.log){o=(s&&console[s]&&(s in b))?s:"log";console[o](k);}else{if(typeof opera!=a){opera.postError(k);}}}}if(h&&!q){if(h==i&&(!h.getEvent(e))){h.publish(e,{broadcast:2});}h.fire(e,{msg:j,cat:s,src:g});}}}return i;};c.message=function(){return c.log.apply(c,arguments);};},"3.4.1",{requires:["yui-base"]});YUI.add("yui-later",function(b){var a=[];b.later=function(j,f,k,g,h){j=j||0;g=(!b.Lang.isUndefined(g))?b.Array(g):a;f=f||b.config.win||b;var i=false,c=(f&&b.Lang.isString(k))?f[k]:k,d=function(){if(!i){if(!c.apply){c(g[0],g[1],g[2],g[3]);}else{c.apply(f,g||a);}}},e=(h)?setInterval(d,j):setTimeout(d,j);return{id:e,interval:h,cancel:function(){i=true;if(this.interval){clearInterval(e);}else{clearTimeout(e);}}};};b.Lang.later=b.later;},"3.4.1",{requires:["yui-base"]});YUI.add("loader-base",function(d){if(!YUI.Env[d.version]){(function(){var I=d.version,E="/build/",F=I+E,D=d.Env.base,A="gallery-2011.09.14-20-40",C="2in3",B="4",z="2.9.0",G=D+"combo?",H={version:I,root:F,base:d.Env.base,comboBase:G,skin:{defaultSkin:"sam",base:"assets/skins/",path:"skin.css",after:["cssreset","cssfonts","cssgrids","cssbase","cssreset-context","cssfonts-context"]},groups:{},patterns:{}},y=H.groups,x=function(K,L){var J=C+"."+(K||B)+"/"+(L||z)+E;y.yui2.base=D+J;y.yui2.root=J;},w=function(J){var K=(J||A)+E;y.gallery.base=D+K;y.gallery.root=K;};y[I]={};y.gallery={ext:false,combine:true,comboBase:G,update:w,patterns:{"gallery-":{},"lang/gallery-":{},"gallerycss-":{type:"css"}}};y.yui2={combine:true,ext:false,comboBase:G,update:x,patterns:{"yui2-":{configFn:function(J){if(/-skin|reset|fonts|grids|base/.test(J.name)){J.type="css";J.path=J.path.replace(/\.js/,".css");J.path=J.path.replace(/\/yui2-skin/,"/assets/skins/sam/yui2-skin");}}}}};w();x();YUI.Env[I]=H;}());}var f={},c=[],m=2048,a=YUI.Env,p=a._loaded,q="css",k="js",v="intl",s=d.version,u="",e=d.Object,r=e.each,j=d.Array,h=a._loaderQueue,t=a[s],b="skin-",i=d.Lang,n=a.mods,l,o,g=function(x,y,z,w){var A=x+"/"+y;if(!w){A+="-min";}A+="."+(z||q);return A;};if(YUI.Env.aliases){YUI.Env.aliases={};}d.Env.meta=t;d.Loader=function(A){var z=t.modules,x=this;l=t.md5;x.context=d;x.base=d.Env.meta.base+d.Env.meta.root;x.comboBase=d.Env.meta.comboBase;x.combine=A.base&&(A.base.indexOf(x.comboBase.substr(0,20))>-1);x.comboSep="&";x.maxURLLength=m;x.root=d.Env.meta.root;x.timeout=0;x.forceMap={};x.allowRollup=false;x.filters={};x.required={};x.patterns={};x.moduleInfo={};x.groups=d.merge(d.Env.meta.groups);x.skin=d.merge(d.Env.meta.skin);x.conditions={};x.config=A;x._internal=true;o=a._renderedMods;if(o){r(o,function y(C,B){x.moduleInfo[B]=C;});o=a._conditions;r(o,function w(C,B){x.conditions[B]=C;});}else{r(z,x.addModule,x);}if(!a._renderedMods){a._renderedMods=x.moduleInfo;a._conditions=x.conditions;}x._inspectPage();x._internal=false;x._config(A);x.testresults=null;if(d.config.tests){x.testresults=d.config.tests;}x.sorted=[];x.loaded=p[s];x.dirty=true;x.inserted={};x.skipped={};x.tested={};};d.Loader.prototype={FILTER_DEFS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},_inspectPage:function(){r(n,function(y,x){if(y.details){var w=this.moduleInfo[x],A=y.details.requires,z=w&&w.requires;if(w){if(!w._inspected&&A&&z.length!=A.length){delete w.expanded;}}else{w=this.addModule(y.details,x);}w._inspected=true;}},this);},_requires:function(C,B){var y,A,D,E,w=this.moduleInfo,x=w[C],z=w[B];if(!x||!z){return false;}A=x.expanded_map;D=x.after_map;if(D&&(B in D)){return true;}D=z.after_map;if(D&&(C in D)){return false;}E=w[B]&&w[B].supersedes;if(E){for(y=0;y<E.length;y++){if(this._requires(C,E[y])){return true;}}}E=w[C]&&w[C].supersedes;if(E){for(y=0;y<E.length;y++){if(this._requires(B,E[y])){return false;}}}if(A&&(B in A)){return true;}if(x.ext&&x.type==q&&!z.ext&&z.type==q){return true;}return false;},_config:function(C){var y,x,B,z,A,D,w=this;if(C){for(y in C){if(C.hasOwnProperty(y)){B=C[y];if(y=="require"){w.require(B);}else{if(y=="skin"){d.mix(w.skin,C[y],true); 75}else{if(y=="groups"){for(x in B){if(B.hasOwnProperty(x)){D=x;A=B[x];w.addGroup(A,D);}}}else{if(y=="modules"){r(B,w.addModule,w);}else{if(y=="gallery"){this.groups.gallery.update(B);}else{if(y=="yui2"||y=="2in3"){this.groups.yui2.update(C["2in3"],C.yui2);}else{if(y=="maxURLLength"){w[y]=Math.min(m,B);}else{w[y]=B;}}}}}}}}}}z=w.filter;if(i.isString(z)){z=z.toUpperCase();w.filterName=z;w.filter=w.FILTER_DEFS[z];if(z=="DEBUG"){w.require("yui-log","dump");}}if(w.lang){w.require("intl-base","intl");}},formatSkin:function(y,w){var x=b+y;
75if(w){x=x+"-"+w;}return x;},_addSkin:function(F,D,E){var C,B,x,w,A=this.moduleInfo,y=this.skin,z=A[D]&&A[D].ext;if(D){x=this.formatSkin(F,D);if(!A[x]){C=A[D];B=C.pkg||D;w={name:x,group:C.group,type:"css",after:y.after,path:(E||B)+"/"+y.base+F+"/"+D+".css",ext:z};if(C.base){w.base=C.base;}if(C.configFn){w.configFn=C.configFn;}this.addModule(w,x);}}return x;},addGroup:function(z,x){var y=z.modules,w=this;x=x||z.name;z.name=x;w.groups[x]=z;if(z.patterns){r(z.patterns,function(B,A){B.group=x;w.patterns[A]=B;});}if(y){r(y,function(B,A){B.group=x;w.addModule(B,A);},w);}},addModule:function(M,T){T=T||M.name;if(this.moduleInfo[T]&&this.moduleInfo[T].temp){M=d.merge(this.moduleInfo[T],M);}M.name=T;if(!M||!M.name){return null;}if(!M.type){M.type=k;}if(!M.path&&!M.fullpath){M.path=g(T,T,M.type);}M.supersedes=M.supersedes||M.use;M.ext=("ext" in M)?M.ext:(this._internal)?false:true;M.requires=this.filterRequires(M.requires)||[];var Q=M.submodules,P,N,H,w,I,y,L,x,O,J,F,C,A,z,S,R,G,B,D,E=this.conditions,K;this.moduleInfo[T]=M;if(!M.langPack&&M.lang){J=j(M.lang);for(O=0;O<J.length;O++){S=J[O];F=this.getLangPackName(S,T);y=this.moduleInfo[F];if(!y){y=this._addLangPack(S,M,F);}}}if(Q){w=M.supersedes||[];N=0;for(P in Q){if(Q.hasOwnProperty(P)){I=Q[P];I.path=I.path||g(T,P,M.type);I.pkg=T;I.group=M.group;if(I.supersedes){w=w.concat(I.supersedes);}y=this.addModule(I,P);w.push(P);if(y.skinnable){M.skinnable=true;G=this.skin.overrides;if(G&&G[P]){for(O=0;O<G[P].length;O++){B=this._addSkin(G[P][O],P,T);w.push(B);}}B=this._addSkin(this.skin.defaultSkin,P,T);w.push(B);}if(I.lang&&I.lang.length){J=j(I.lang);for(O=0;O<J.length;O++){S=J[O];F=this.getLangPackName(S,T);C=this.getLangPackName(S,P);y=this.moduleInfo[F];if(!y){y=this._addLangPack(S,M,F);}A=A||j.hash(y.supersedes);if(!(C in A)){y.supersedes.push(C);}M.lang=M.lang||[];z=z||j.hash(M.lang);if(!(S in z)){M.lang.push(S);}F=this.getLangPackName(u,T);C=this.getLangPackName(u,P);y=this.moduleInfo[F];if(!y){y=this._addLangPack(S,M,F);}if(!(C in A)){y.supersedes.push(C);}}}N++;}}M.supersedes=j.dedupe(w);if(this.allowRollup){M.rollup=(N<4)?N:Math.min(N-1,4);}}L=M.plugins;if(L){for(P in L){if(L.hasOwnProperty(P)){x=L[P];x.pkg=T;x.path=x.path||g(T,P,M.type);x.requires=x.requires||[];x.group=M.group;this.addModule(x,P);if(M.skinnable){this._addSkin(this.skin.defaultSkin,P,T);}}}}if(M.condition){H=M.condition.trigger;if(YUI.Env.aliases[H]){H=YUI.Env.aliases[H];}if(!d.Lang.isArray(H)){H=[H];}for(P=0;P<H.length;P++){K=H[P];D=M.condition.when;E[K]=E[K]||{};E[K][T]=M.condition;if(D&&D!="after"){if(D=="instead"){M.supersedes=M.supersedes||[];M.supersedes.push(K);}else{}}else{M.after=M.after||[];M.after.push(K);}}}if(M.after){M.after_map=j.hash(M.after);}if(M.configFn){R=M.configFn(M);if(R===false){delete this.moduleInfo[T];M=null;}}return M;},require:function(x){var w=(typeof x==="string")?j(arguments):x;this.dirty=true;this.required=d.merge(this.required,j.hash(this.filterRequires(w)));this._explodeRollups();},_explodeRollups:function(){var x=this,w,y=x.required;if(!x.allowRollup){r(y,function(z,A){w=x.getModule(A);if(w&&w.use){j.each(w.use,function(B){w=x.getModule(B);if(w&&w.use){j.each(w.use,function(C){y[C]=true;});}else{y[B]=true;}});}});x.required=y;}},filterRequires:function(z){if(z){if(!d.Lang.isArray(z)){z=[z];}z=d.Array(z);var B=[],y,x,A,w;for(y=0;y<z.length;y++){x=this.getModule(z[y]);if(x&&x.use){for(A=0;A<x.use.length;A++){w=this.getModule(x.use[A]);if(w&&w.use){B=d.Array.dedupe([].concat(B,this.filterRequires(w.use)));}else{B.push(x.use[A]);}}}else{B.push(z[y]);}}z=B;}return z;},getRequires:function(S){if(!S||S._parsed){return c;}var M,H,L,D,C,U,A=this.testresults,V=S.name,B,I,T=n[V]&&n[V].details,O,J,w,E,P,F,z,Q,R,y,G=S.lang||S.intl,N=this.moduleInfo,K=d.Features&&d.Features.tests.load,x;if(S.temp&&T){P=S;S=this.addModule(T,V);S.group=P.group;S.pkg=P.pkg;delete S.expanded;}if(S.expanded&&(!this.lang||S.langCache===this.lang)){return S.expanded;}O=[];x={};E=this.filterRequires(S.requires);if(S.lang){O.unshift("intl");E.unshift("intl");G=true;}F=this.filterRequires(S.optional);S._parsed=true;S.langCache=this.lang;
75for(M=0;M<E.length;M++){if(!x[E[M]]){O.push(E[M]);x[E[M]]=true;H=this.getModule(E[M]);if(H){D=this.getRequires(H);G=G||(H.expanded_map&&(v in H.expanded_map));for(L=0;L<D.length;L++){O.push(D[L]);}}}}E=this.filterRequires(S.supersedes);if(E){for(M=0;M<E.length;M++){if(!x[E[M]]){if(S.submodules){O.push(E[M]);}x[E[M]]=true;H=this.getModule(E[M]);if(H){D=this.getRequires(H);G=G||(H.expanded_map&&(v in H.expanded_map));for(L=0;L<D.length;L++){O.push(D[L]);}}}}}if(F&&this.loadOptional){for(M=0;M<F.length;M++){if(!x[F[M]]){O.push(F[M]);x[F[M]]=true;H=N[F[M]];if(H){D=this.getRequires(H);G=G||(H.expanded_map&&(v in H.expanded_map));for(L=0;L<D.length;L++){O.push(D[L]);}}}}}B=this.conditions[V];if(B){if(A&&K){r(A,function(W,Y){var X=K[Y].name;if(!x[X]&&K[Y].trigger==V){if(W&&K[Y]){x[X]=true;O.push(X);}}});}else{r(B,function(X,W){if(!x[W]){I=X&&((X.ua&&d.UA[X.ua])||(X.test&&X.test(d,E)));if(I){x[W]=true;O.push(W);H=this.getModule(W);if(H){D=this.getRequires(H);for(L=0;L<D.length;L++){O.push(D[L]);}}}}},this);}}if(S.skinnable){Q=this.skin.overrides;r(YUI.Env.aliases,function(W,X){if(d.Array.indexOf(W,V)>-1){R=X;}});if(Q&&(Q[V]||(R&&Q[R]))){y=V;if(Q[R]){y=R;}for(M=0;M<Q[y].length;M++){z=this._addSkin(Q[y][M],V);O.push(z);}}else{z=this._addSkin(this.skin.defaultSkin,V);O.push(z);}}S._parsed=false;if(G){if(S.lang&&!S.langPack&&d.Intl){U=d.Intl.lookupBestLang(this.lang||u,S.lang); 76C=this.getLangPackName(U,V);if(C){O.unshift(C);}}O.unshift(v);}S.expanded_map=j.hash(O);S.expanded=e.keys(S.expanded_map);return S.expanded;},getProvides:function(x){var w=this.getModule(x),z,y;if(!w){return f;}if(w&&!w.provides){z={};y=w.supersedes;if(y){j.each(y,function(A){d.mix(z,this.getProvides(A));},this);}z[x]=true;w.provides=z;}return w.provides;},calculate:function(x,w){if(x||w||this.dirty){if(x){this._config(x);}if(!this._init){this._setup();}this._explode();if(this.allowRollup){this._rollup();}else{this._explodeRollups();}this._reduce();this._sort();}},_addLangPack:function(B,w,A){var y=w.name,x,z=this.moduleInfo[A];if(!z){x=g((w.pkg||y),A,k,true);this.addModule({path:x,intl:true,langPack:true,ext:w.ext,group:w.group,supersedes:[]},A);if(B){d.Env.lang=d.Env.lang||{};d.Env.lang[B]=d.Env.lang[B]||{};d.Env.lang[B][y]=true;}}return this.moduleInfo[A];},_setup:function(){var C=this.moduleInfo,z,A,y,w,x,B;for(z in C){if(C.hasOwnProperty(z)){w=C[z];if(w){w.requires=j.dedupe(w.requires);if(w.lang&&w.lang.length){B=this.getLangPackName(u,z);this._addLangPack(null,w,B);}}}}x={};if(!this.ignoreRegistered){d.mix(x,a.mods);}if(this.ignore){d.mix(x,j.hash(this.ignore));}for(y in x){if(x.hasOwnProperty(y)){d.mix(x,this.getProvides(y));}}if(this.force){for(A=0;A<this.force.length;A++){if(this.force[A] in x){delete x[this.force[A]];}}}d.mix(this.loaded,x);this._init=true;},getLangPackName:function(x,w){return("lang/"+w+((x)?"_"+x:""));},_explode:function(){var A=this.required,w,z,x={},y=this;y.dirty=false;y._explodeRollups();A=y.required;r(A,function(B,C){if(!x[C]){x[C]=true;w=y.getModule(C);if(w){var D=w.expound;if(D){A[D]=y.getModule(D);z=y.getRequires(A[D]);d.mix(A,j.hash(z));}z=y.getRequires(w);d.mix(A,j.hash(z));}}});},getModule:function(B){if(!B){return null;}var A,z,x,w=this.moduleInfo[B],y=this.patterns;if(!w){for(x in y){if(y.hasOwnProperty(x)){A=y[x];if(B.indexOf(x)>-1){z=A;break;}}}if(z){if(A.action){A.action.call(this,B,x);}else{w=this.addModule(d.merge(z),B);w.temp=true;}}}return w;},_rollup:function(){},_reduce:function(B){B=B||this.required;var y,x,A,w,z=this.loadType,C=this.ignore?j.hash(this.ignore):false;for(y in B){if(B.hasOwnProperty(y)){w=this.getModule(y);if(((this.loaded[y]||n[y])&&!this.forceMap[y]&&!this.ignoreRegistered)||(z&&w&&w.type!=z)){delete B[y];}if(C&&C[y]){delete B[y];}A=w&&w.supersedes;if(A){for(x=0;x<A.length;x++){if(A[x] in B){delete B[A[x]];}}}}}return B;},_finish:function(y,x){h.running=false;var w=this.onEnd;if(w){w.call(this.context,{msg:y,data:this.data,success:x});}this._continue();},_onSuccess:function(){var y=this,x=d.merge(y.skipped),A,w=[],z=y.requireRegistration,C,B;r(x,function(D){delete y.inserted[D];});y.skipped={};r(y.inserted,function(E,D){var F=y.getModule(D);if(F&&z&&F.type==k&&!(D in YUI.Env.mods)){w.push(D);}else{d.mix(y.loaded,y.getProvides(D));}});A=y.onSuccess;B=(w.length)?"notregistered":"success";C=!(w.length);if(A){A.call(y.context,{msg:B,data:y.data,success:C,failed:w,skipped:x});}y._finish(B,C);},_onFailure:function(y){var w=this.onFailure,x="failure: "+y.msg;if(w){w.call(this.context,{msg:x,data:this.data,success:false});}this._finish(x,false);},_onTimeout:function(){var w=this.onTimeout;if(w){w.call(this.context,{msg:"timeout",data:this.data,success:false});}this._finish("timeout",false);},_sort:function(){var F=e.keys(this.required),B={},w=0,y,E,D,A,z,C,x;for(;;){y=F.length;C=false;for(A=w;A<y;A++){E=F[A];for(z=A+1;z<y;z++){x=E+F[z];if(!B[x]&&this._requires(E,F[z])){D=F.splice(z,1);F.splice(A,0,D[0]);B[x]=true;C=true;break;}}if(C){break;}else{w++;}}if(!C){break;}}this.sorted=F;},partial:function(w,y,x){this.sorted=w;this.insert(y,x,true);},_insert:function(z,A,y,x){if(z){this._config(z);}if(!x){this.calculate(A);}this.loadType=y;if(!y){var w=this;this._internalCallback=function(){var C=w.onCSS,E,D,B;if(this.insertBefore&&d.UA.ie){E=d.config.doc.getElementById(this.insertBefore);D=E.parentNode;B=E.nextSibling;D.removeChild(E);
76if(B){D.insertBefore(E,B);}else{D.appendChild(E);}}if(C){C.call(w.context,d);}w._internalCallback=null;w._insert(null,null,k);};this._insert(null,null,q);return;}this._loading=true;this._combineComplete={};this.loadNext();},_continue:function(){if(!(h.running)&&h.size()>0){h.running=true;h.next()();}},insert:function(z,x,y){var w=this,A=d.merge(this);delete A.require;delete A.dirty;h.add(function(){w._insert(A,z,x,y);});this._continue();},loadNext:function(A){if(!this._loading){return;}var H,P,O,M,z,E,B,L,D,G,N,w,C,K,y,F,Q,R,J=this,x=J.loadType,S=function(T){J.loadNext(T.data);},I=function(V){J._combineComplete[x]=true;var U,T=F.length;for(U=0;U<T;U++){J.inserted[F[U]]=true;}S(V);};if(J.combine&&(!J._combineComplete[x])){F=[];J._combining=F;H=J.sorted;P=H.length;R=J.comboBase;z=R;Q=[];K={};for(O=0;O<P;O++){C=R;M=J.getModule(H[O]);G=M&&M.group;if(G){D=J.groups[G];if(!D.combine){M.combine=false;continue;}M.combine=true;if(D.comboBase){C=D.comboBase;}if("root" in D&&i.isValue(D.root)){M.root=D.root;}}K[C]=K[C]||[];K[C].push(M);}for(N in K){if(K.hasOwnProperty(N)){z=N;y=K[N];P=y.length;for(O=0;O<P;O++){M=y[O];if(M&&(M.type===x)&&(M.combine||!M.ext)){w=((i.isValue(M.root))?M.root:J.root)+M.path;w=J._filter(w,M.name);if((z!==N)&&(O<=(P-1))&&((w.length+z.length)>J.maxURLLength)){if(z.substr(z.length-1,1)===J.comboSep){z=z.substr(0,(z.length-1));}Q.push(J._filter(z));z=N;}z+=w;if(O<(P-1)){z+=J.comboSep;}F.push(M.name);}}if(F.length&&(z!=N)){if(z.substr(z.length-1,1)===J.comboSep){z=z.substr(0,(z.length-1));}Q.push(J._filter(z));}}}if(F.length){if(x===q){E=d.Get.css;L=J.cssAttributes;}else{E=d.Get.script;L=J.jsAttributes;}E(Q,{data:J._loading,onSuccess:I,onFailure:J._onFailure,onTimeout:J._onTimeout,insertBefore:J.insertBefore,charset:J.charset,attributes:L,timeout:J.timeout,autopurge:false,context:J});return;}else{J._combineComplete[x]=true;}}if(A){if(A!==J._loading){return;}J.inserted[A]=true;if(J.onProgress){J.onProgress.call(J.context,{name:A,data:J.data});}}H=J.sorted;P=H.length;for(O=0;O<P;O=O+1){if(H[O] in J.inserted){continue; 77}if(H[O]===J._loading){return;}M=J.getModule(H[O]);if(!M){if(!J.skipped[H[O]]){B="Undefined module "+H[O]+" skipped";J.skipped[H[O]]=true;}continue;}D=(M.group&&J.groups[M.group])||f;if(!x||x===M.type){J._loading=H[O];if(M.type===q){E=d.Get.css;L=J.cssAttributes;}else{E=d.Get.script;L=J.jsAttributes;}z=(M.fullpath)?J._filter(M.fullpath,H[O]):J._url(M.path,H[O],D.base||M.base);E(z,{data:H[O],onSuccess:S,insertBefore:J.insertBefore,charset:J.charset,attributes:L,onFailure:J._onFailure,onTimeout:J._onTimeout,timeout:J.timeout,autopurge:false,context:J});return;}}J._loading=null;E=J._internalCallback;if(E){J._internalCallback=null;E.call(J);}else{J._onSuccess();}},_filter:function(y,x){var A=this.filter,w=x&&(x in this.filters),z=w&&this.filters[x],B=this.moduleInfo[x]?this.moduleInfo[x].group:null;if(B&&this.groups[B].filter){z=this.groups[B].filter;w=true;}if(y){if(w){A=(i.isString(z))?this.FILTER_DEFS[z.toUpperCase()]||null:z;}if(A){y=y.replace(new RegExp(A.searchExp,"g"),A.replaceStr);}}return y;},_url:function(y,w,x){return this._filter((x||this.base||"")+y,w);},resolve:function(A,C){var x=this,B,w,z,y={js:[],css:[]};if(A){x.calculate();}C=C||x.sorted;for(B=0;B<C.length;B++){w=x.getModule(C[B]);if(w){if(x.combine){z=x._filter((x.root+w.path),w.name,x.root);}else{z=x._filter(w.fullpath,w.name,"")||x._url(w.path,w.name);}y[w.type].push(z);}}if(x.combine){y.js=[x.comboBase+y.js.join(x.comboSep)];y.css=[x.comboBase+y.css.join(x.comboSep)];}return y;},hash:function(A,C){var x=this,B,w,z,y={js:{},css:{}};if(A){x.calculate();}C=C||x.sorted;for(B=0;B<C.length;B++){w=x.getModule(C[B]);if(w){z=x._filter(w.fullpath,w.name,"")||x._url(w.path,w.name);y[w.type][w.name]=z;}}return y;}};},"3.4.1",{requires:["get"]});YUI.add("loader-rollup",function(a){a.Loader.prototype._rollup=function(){var k,h,g,o,b=this.required,e,f=this.moduleInfo,d,l,n;if(this.dirty||!this.rollups){this.rollups={};for(k in f){if(f.hasOwnProperty(k)){g=this.getModule(k);if(g&&g.rollup){this.rollups[k]=g;}}}this.forceMap=(this.force)?a.Array.hash(this.force):{};}for(;;){d=false;
77for(k in this.rollups){if(this.rollups.hasOwnProperty(k)){if(!b[k]&&((!this.loaded[k])||this.forceMap[k])){g=this.getModule(k);o=g.supersedes||[];e=false;if(!g.rollup){continue;}l=0;for(h=0;h<o.length;h++){n=f[o[h]];if(this.loaded[o[h]]&&!this.forceMap[o[h]]){e=false;break;}else{if(b[o[h]]&&g.type==n.type){l++;e=(l>=g.rollup);if(e){break;}}}}if(e){b[k]=true;d=true;this.getRequires(g);}}}}if(!d){break;}}};},"3.4.1",{requires:["loader-base"]});YUI.add("loader-yui3",function(a){YUI.Env[a.version].modules=YUI.Env[a.version].modules||{"align-plugin":{"requires":["node-screen","node-pluginhost"]},"anim":{"use":["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"]},"anim-base":{"requires":["base-base","node-style"]},"anim-color":{"requires":["anim-base"]},"anim-curve":{"requires":["anim-xy"]},"anim-easing":{"requires":["anim-base"]},"anim-node-plugin":{"requires":["node-pluginhost","anim-base"]},"anim-scroll":{"requires":["anim-base"]},"anim-xy":{"requires":["anim-base","node-screen"]},"app":{"use":["controller","model","model-list","view"]},"array-extras":{"requires":["yui-base"]},"array-invoke":{"requires":["yui-base"]},"arraylist":{"requires":["yui-base"]},"arraylist-add":{"requires":["arraylist"]},"arraylist-filter":{"requires":["arraylist"]},"arraysort":{"requires":["yui-base"]},"async-queue":{"requires":["event-custom"]},"attribute":{"use":["attribute-base","attribute-complex"]},"attribute-base":{"requires":["event-custom"]},"attribute-complex":{"requires":["attribute-base"]},"autocomplete":{"use":["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"]},"autocomplete-base":{"optional":["autocomplete-sources"],"requires":["array-extras","base-build","escape","event-valuechange","node-base"]},"autocomplete-filters":{"requires":["array-extras","text-wordbreak"]},"autocomplete-filters-accentfold":{"requires":["array-extras","text-accentfold","text-wordbreak"]},"autocomplete-highlighters":{"requires":["array-extras","highlight-base"]},"autocomplete-highlighters-accentfold":{"requires":["array-extras","highlight-accentfold"]},"autocomplete-list":{"after":["autocomplete-sources"],"lang":["en"],"requires":["autocomplete-base","event-resize","node-screen","selector-css3","shim-plugin","widget","widget-position","widget-position-align"],"skinnable":true},"autocomplete-list-keys":{"condition":{"name":"autocomplete-list-keys","test":function(b){return !(b.UA.ios||b.UA.android);},"trigger":"autocomplete-list"},"requires":["autocomplete-list","base-build"]},"autocomplete-plugin":{"requires":["autocomplete-list","node-pluginhost"]},"autocomplete-sources":{"optional":["io-base","json-parse","jsonp","yql"],"requires":["autocomplete-base"]},"base":{"use":["base-base","base-pluginhost","base-build"]},"base-base":{"after":["attribute-complex"],"requires":["attribute-base"]},"base-build":{"requires":["base-base"]},"base-pluginhost":{"requires":["base-base","pluginhost"]},"cache":{"use":["cache-base","cache-offline","cache-plugin"]},"cache-base":{"requires":["base"]},"cache-offline":{"requires":["cache-base","json"]},"cache-plugin":{"requires":["plugin","cache-base"]},"calendar":{"lang":["en","ja","ru"],"requires":["calendar-base","calendarnavigator"],"skinnable":true},"calendar-base":{"lang":["en","ja","ru"],"requires":["widget","substitute","datatype-date","datatype-date-math","cssgrids"],"skinnable":true},"calendarnavigator":{"requires":["plugin","classnamemanager","datatype-date","node","substitute"],"skinnable":true},"charts":{"requires":["dom","datatype-number","datatype-date","event-custom","event-mouseenter","widget","widget-position","widget-stack","graphics"]},"classnamemanager":{"requires":["yui-base"]},"clickable-rail":{"requires":["slider-base"]},"collection":{"use":["array-extras","arraylist","arraylist-add","arraylist-filter","array-invoke"]},"console":{"lang":["en","es","ja"],"requires":["yui-log","widget","substitute"],"skinnable":true},"console-filters":{"requires":["plugin","console"],"skinnable":true},"controller":{"optional":["querystring-parse"],"requires":["array-extras","base-build","history"]},"cookie":{"requires":["yui-base"]},"createlink-base":{"requires":["editor-base"]},"cssbase":{"after":["cssreset","cssfonts","cssgrids","cssreset-context","cssfonts-context","cssgrids-context"],"type":"css"},"cssbase-context":{"after":["cssreset","cssfonts","cssgrids","cssreset-context","cssfonts-context","cssgrids-context"],"type":"css"},"cssfonts":{"type":"css"},"cssfonts-context":{"type":"css"},"cssgrids":{"optional":["cssreset","cssfonts"],"type":"css"},"cssreset":{"type":"css"},"cssreset-context":{"type":"css"},"dataschema":{"use":["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"]},"dataschema-array":{"requires":["dataschema-base"]},"dataschema-base":{"requires":["base"]},"dataschema-json":{"requires":["dataschema-base","json"]},"dataschema-text":{"requires":["dataschema-base"]},"dataschema-xml":{"requires":["dataschema-base"]},"datasource":{"use":["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"]},"datasource-arrayschema":{"requires":["datasource-local","plugin","dataschema-array"]},"datasource-cache":{"requires":["datasource-local","plugin","cache-base"]},"datasource-function":{"requires":["datasource-local"]},"datasource-get":{"requires":["datasource-local","get"]},"datasource-io":{"requires":["datasource-local","io-base"]},"datasource-jsonschema":{"requires":["datasource-local","plugin","dataschema-json"]},"datasource-local":{"requires":["base"]},"datasource-polling":{"requires":["datasource-local"]},"datasource-textschema":{"requires":["datasource-local","plugin","dataschema-text"]},"datasource-xmlschema":{"requires":["datasource-local","plugin","dataschema-xml"]},"datatable":{"use":["datatable-base","datatable-datasource","datatable-sort","datatable-scroll"]},"datatable-base":{"requires":["recordset-base","widget","substitute","event-mouseenter"],"skinnable":true},"datatable-datasource":{"requires":["datatable-base","plugin","datasource-local"]},"datatable-scroll":{"requires":["datatable-base","plugin"]},"datatable-sort":{"lang":["en"],"requires":["datatable-base","plugin","recordset-sort"]},"datatype":{"use":["datatype-number","datatype-date","datatype-xml"]},"datatype-date":{"supersedes":["datatype-date-format"],"use":["datatype-date-parse","datatype-date-format"]},"datatype-date-format":{"lang":["ar","ar-JO","ca","ca-ES","da","da-DK","de","de-AT","de-DE","el","el-GR","en","en-AU","en-CA","en-GB","en-IE","en-IN","en-JO","en-MY","en-NZ","en-PH","en-SG","en-US","es","es-AR","es-BO","es-CL","es-CO","es-EC","es-ES","es-MX","es-PE","es-PY","es-US","es-UY","es-VE","fi","fi-FI","fr","fr-BE","fr-CA","fr-FR","hi","hi-IN","id","id-ID","it","it-IT","ja","ja-JP","ko","ko-KR","ms","ms-MY","nb","nb-NO","nl","nl-BE","nl-NL","pl","pl-PL","pt","pt-BR","ro","ro-RO","ru","ru-RU","sv","sv-SE","th","th-TH","tr","tr-TR","vi","vi-VN","zh-Hans","zh-Hans-CN","zh-Hant","zh-Hant-HK","zh-Hant-TW"]},"datatype-date-math":{"requires":["yui-base"]},"datatype-date-parse":{},"datatype-number":{"use":["datatype-number-parse","datatype-number-format"]},"datatype-number-format":{},"datatype-number-parse":{},"datatype-xml":{"use":["datatype-xml-parse","datatype-xml-format"]},"datatype-xml-format":{},"datatype-xml-parse":{},"dd":{"use":["dd-ddm-base","dd-ddm","dd-ddm-drop","dd-drag","dd-proxy","dd-constrain","dd-drop","dd-scroll","dd-delegate"]},"dd-constrain":{"requires":["dd-drag"]},"dd-ddm":{"requires":["dd-ddm-base","event-resize"]},"dd-ddm-base":{"requires":["node","base","yui-throttle","classnamemanager"]},"dd-ddm-drop":{"requires":["dd-ddm"]},"dd-delegate":{"requires":["dd-drag","dd-drop-plugin","event-mouseenter"]},"dd-drag":{"requires":["dd-ddm-base"]},"dd-drop":{"requires":["dd-drag","dd-ddm-drop"]},"dd-drop-plugin":{"requires":["dd-drop"]},"dd-gestures":{"condition":{"name":"dd-gestures","test":function(b){return(b.config.win&&("ontouchstart" in b.config.win&&!b.UA.chrome)); 78},"trigger":"dd-drag"},"requires":["dd-drag","event-synthetic","event-gestures"]},"dd-plugin":{"optional":["dd-constrain","dd-proxy"],"requires":["dd-drag"]},"dd-proxy":{"requires":["dd-drag"]},"dd-scroll":{"requires":["dd-drag"]},"dial":{"lang":["en","es"],"requires":["widget","dd-drag","substitute","event-mouseenter","event-move","event-key","transition","intl"],"skinnable":true},"dom":{"use":["dom-base","dom-screen","dom-style","selector-native","selector"]},"dom-base":{"requires":["dom-core"]},"dom-core":{"requires":["oop","features"]},"dom-deprecated":{"requires":["dom-base"]},"dom-screen":{"requires":["dom-base","dom-style"]},"dom-style":{"requires":["dom-base"]},"dom-style-ie":{"condition":{"name":"dom-style-ie","test":function(h){var f=h.Features.test,g=h.Features.add,d=h.config.win,e=h.config.doc,b="documentElement",c=false;g("style","computedStyle",{test:function(){return d&&"getComputedStyle" in d;}});g("style","opacity",{test:function(){return e&&"opacity" in e[b].style;}});c=(!f("style","opacity")&&!f("style","computedStyle"));return c;},"trigger":"dom-style"},"requires":["dom-style"]},"dump":{"requires":["yui-base"]},"editor":{"use":["frame","selection","exec-command","editor-base","editor-para","editor-br","editor-bidi","editor-tab","createlink-base"]},"editor-base":{"requires":["base","frame","node","exec-command","selection"]},"editor-bidi":{"requires":["editor-base"]},"editor-br":{"requires":["editor-base"]},"editor-lists":{"requires":["editor-base"]},"editor-para":{"requires":["editor-base"]},"editor-tab":{"requires":["editor-base"]},"escape":{"requires":["yui-base"]},"event":{"after":["node-base"],"use":["event-base","event-delegate","event-synthetic","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize","event-hover","event-outside"]},"event-base":{"after":["node-base"],"requires":["event-custom-base"]},"event-base-ie":{"after":["event-base"],"condition":{"name":"event-base-ie","test":function(c){var b=c.config.doc&&c.config.doc.implementation;return(b&&(!b.hasFeature("Events","2.0")));},"trigger":"node-base"},"requires":["node-base"]},"event-custom":{"use":["event-custom-base","event-custom-complex"]},"event-custom-base":{"requires":["oop"]},"event-custom-complex":{"requires":["event-custom-base"]},"event-delegate":{"requires":["node-base"]},"event-flick":{"requires":["node-base","event-touch","event-synthetic"]},"event-focus":{"requires":["event-synthetic"]},"event-gestures":{"use":["event-flick","event-move"]},"event-hover":{"requires":["event-mouseenter"]},"event-key":{"requires":["event-synthetic"]},"event-mouseenter":{"requires":["event-synthetic"]},"event-mousewheel":{"requires":["node-base"]},"event-move":{"requires":["node-base","event-touch","event-synthetic"]},"event-outside":{"requires":["event-synthetic"]},"event-resize":{"requires":["node-base","event-synthetic"]},"event-simulate":{"requires":["event-base"]},"event-synthetic":{"requires":["node-base","event-custom-complex"]},"event-touch":{"requires":["node-base"]},"event-valuechange":{"requires":["event-focus","event-synthetic"]},"exec-command":{"requires":["frame"]},"features":{"requires":["yui-base"]},"frame":{"requires":["base","node","selector-css3","substitute","yui-throttle"]},"get":{"requires":["yui-base"]},"graphics":{"requires":["node","event-custom","pluginhost"]},"graphics-canvas":{"condition":{"name":"graphics-canvas","test":function(d){var c=d.config.doc,b=c&&c.createElement("canvas");return(c&&!c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(b&&b.getContext&&b.getContext("2d")));},"trigger":"graphics"},"requires":["graphics"]},"graphics-canvas-default":{"condition":{"name":"graphics-canvas-default","test":function(d){var c=d.config.doc,b=c&&c.createElement("canvas");return(c&&!c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(b&&b.getContext&&b.getContext("2d")));},"trigger":"graphics"}},"graphics-svg":{"condition":{"name":"graphics-svg","test":function(c){var b=c.config.doc;return(b&&b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));},"trigger":"graphics"},"requires":["graphics"]},"graphics-svg-default":{"condition":{"name":"graphics-svg-default","test":function(c){var b=c.config.doc;return(b&&b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));},"trigger":"graphics"}},"graphics-vml":{"condition":{"name":"graphics-vml","test":function(d){var c=d.config.doc,b=c&&c.createElement("canvas");return(c&&!c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!b||!b.getContext||!b.getContext("2d")));},"trigger":"graphics"},"requires":["graphics"]},"graphics-vml-default":{"condition":{"name":"graphics-vml-default","test":function(d){var c=d.config.doc,b=c&&c.createElement("canvas");return(c&&!c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!b||!b.getContext||!b.getContext("2d")));},"trigger":"graphics"}},"highlight":{"use":["highlight-base","highlight-accentfold"]},"highlight-accentfold":{"requires":["highlight-base","text-accentfold"]},"highlight-base":{"requires":["array-extras","classnamemanager","escape","text-wordbreak"]},"history":{"use":["history-base","history-hash","history-hash-ie","history-html5"]},"history-base":{"requires":["event-custom-complex"]},"history-hash":{"after":["history-html5"],"requires":["event-synthetic","history-base","yui-later"]},"history-hash-ie":{"condition":{"name":"history-hash-ie","test":function(c){var b=c.config.doc&&c.config.doc.documentMode;return c.UA.ie&&(!("onhashchange" in c.config.win)||!b||b<8);},"trigger":"history-hash"}
78,"requires":["history-hash","node-base"]},"history-html5":{"optional":["json"],"requires":["event-base","history-base","node-base"]},"imageloader":{"requires":["base-base","node-style","node-screen"]},"intl":{"requires":["intl-base","event-custom"]},"intl-base":{"requires":["yui-base"]},"io":{"use":["io-base","io-xdr","io-form","io-upload-iframe","io-queue"]},"io-base":{"requires":["event-custom-base","querystring-stringify-simple"]},"io-form":{"requires":["io-base","node-base"]},"io-queue":{"requires":["io-base","queue-promote"]},"io-upload-iframe":{"requires":["io-base","node-base"]},"io-xdr":{"requires":["io-base","datatype-xml-parse"]},"json":{"use":["json-parse","json-stringify"]},"json-parse":{"requires":["yui-base"]},"json-stringify":{"requires":["yui-base"]},"jsonp":{"requires":["get","oop"]},"jsonp-url":{"requires":["jsonp"]},"loader":{"use":["loader-base","loader-rollup","loader-yui3"]},"loader-base":{"requires":["get"]},"loader-rollup":{"requires":["loader-base"]},"loader-yui3":{"requires":["loader-base"]},"model":{"requires":["base-build","escape","json-parse"]},"model-list":{"requires":["array-extras","array-invoke","arraylist","base-build","escape","json-parse","model"]},"node":{"use":["node-base","node-event-delegate","node-pluginhost","node-screen","node-style"]},"node-base":{"requires":["event-base","node-core","dom-base"]},"node-core":{"requires":["dom-core","selector"]},"node-deprecated":{"requires":["node-base"]},"node-event-delegate":{"requires":["node-base","event-delegate"]},"node-event-html5":{"requires":["node-base"]},"node-event-simulate":{"requires":["node-base","event-simulate"]},"node-flick":{"requires":["classnamemanager","transition","event-flick","plugin"],"skinnable":true},"node-focusmanager":{"requires":["attribute","node","plugin","node-event-simulate","event-key","event-focus"]},"node-load":{"requires":["node-base","io-base"]},"node-menunav":{"requires":["node","classnamemanager","plugin","node-focusmanager"],"skinnable":true},"node-pluginhost":{"requires":["node-base","pluginhost"]},"node-screen":{"requires":["dom-screen","node-base"]},"node-style":{"requires":["dom-style","node-base"]},"oop":{"requires":["yui-base"]},"overlay":{"requires":["widget","widget-stdmod","widget-position","widget-position-align","widget-stack","widget-position-constrain"],"skinnable":true},"panel":{"requires":["widget","widget-stdmod","widget-position","widget-position-align","widget-stack","widget-position-constrain","widget-modality","widget-autohide","widget-buttons"],"skinnable":true},"plugin":{"requires":["base-base"]},"pluginhost":{"use":["pluginhost-base","pluginhost-config"]},"pluginhost-base":{"requires":["yui-base"]},"pluginhost-config":{"requires":["pluginhost-base"]},"profiler":{"requires":["yui-base"]},"querystring":{"use":["querystring-parse","querystring-stringify"]},"querystring-parse":{"requires":["yui-base","array-extras"]},"querystring-parse-simple":{"requires":["yui-base"]},"querystring-stringify":{"requires":["yui-base"]},"querystring-stringify-simple":{"requires":["yui-base"]},"queue-promote":{"requires":["yui-base"]},"range-slider":{"requires":["slider-base","slider-value-range","clickable-rail"]},"recordset":{"use":["recordset-base","recordset-sort","recordset-filter","recordset-indexer"]},"recordset-base":{"requires":["base","arraylist"]},"recordset-filter":{"requires":["recordset-base","array-extras","plugin"]},"recordset-indexer":{"requires":["recordset-base","plugin"]},"recordset-sort":{"requires":["arraysort","recordset-base","plugin"]},"resize":{"use":["resize-base","resize-proxy","resize-constrain"]},"resize-base":{"requires":["base","widget","substitute","event","oop","dd-drag","dd-delegate","dd-drop"],"skinnable":true},"resize-constrain":{"requires":["plugin","resize-base"]},"resize-plugin":{"optional":["resize-constrain"],"requires":["resize-base","plugin"]},"resize-proxy":{"requires":["plugin","resize-base"]},"rls":{"requires":["get","features"]},"scrollview":{"requires":["scrollview-base","scrollview-scrollbars"]},"scrollview-base":{"requires":["widget","event-gestures","transition"],"skinnable":true},"scrollview-base-ie":{"condition":{"name":"scrollview-base-ie","trigger":"scrollview-base","ua":"ie"},"requires":["scrollview-base"]},"scrollview-list":{"requires":["plugin","classnamemanager"],"skinnable":true},"scrollview-paginator":{"requires":["plugin"]},"scrollview-scrollbars":{"requires":["classnamemanager","transition","plugin"],"skinnable":true},"selection":{"requires":["node"]},"selector":{"requires":["selector-native"]},"selector-css2":{"condition":{"name":"selector-css2","test":function(d){var c=d.config.doc,b=c&&!("querySelectorAll" in c); 79return b;},"trigger":"selector"},"requires":["selector-native"]},"selector-css3":{"requires":["selector-native","selector-css2"]},"selector-native":{"requires":["dom-base"]},"shim-plugin":{"requires":["node-style","node-pluginhost"]},"slider":{"use":["slider-base","slider-value-range","clickable-rail","range-slider"]},"slider-base":{"requires":["widget","dd-constrain","substitute"],"skinnable":true},"slider-value-range":{"requires":["slider-base"]},"sortable":{"requires":["dd-delegate","dd-drop-plugin","dd-proxy"]},"sortable-scroll":{"requires":["dd-scroll","sortable"]},"stylesheet":{"requires":["yui-base"]},"substitute":{"optional":["dump"],"requires":["yui-base"]},"swf":{"requires":["event-custom","node","swfdetect","escape"]},"swfdetect":{"requires":["yui-base"]},"tabview":{"requires":["widget","widget-parent","widget-child","tabview-base","node-pluginhost","node-focusmanager"],"skinnable":true},"tabview-base":{"requires":["node-event-delegate","classnamemanager","skin-sam-tabview"]},"tabview-plugin":{"requires":["tabview-base"]},"test":{"requires":["event-simulate","event-custom","substitute","json-stringify"],"skinnable":true},"text":{"use":["text-accentfold","text-wordbreak"]},"text-accentfold":{"requires":["array-extras","text-data-accentfold"]},"text-data-accentfold":{"requires":["yui-base"]},"text-data-wordbreak":{"requires":["yui-base"]},"text-wordbreak":{"requires":["array-extras","text-data-wordbreak"]},"transition":{"requires":["node-style"]},"transition-timer":{"condition":{"name":"transition-timer","test":function(e){var d=e.config.doc,c=(d)?d.documentElement:null,b=true;if(c&&c.style){b=!("MozTransition" in c.style||"WebkitTransition" in c.style);}return b;},"trigger":"transition"},"requires":["transition"]},"uploader":{"requires":["event-custom","node","base","swf"]},"view":{"requires":["base-build","node-event-delegate"]},"widget":{"use":["widget-base","widget-htmlparser","widget-uievents","widget-skin"]},"widget-anim":{"requires":["plugin","anim-base","widget"]},"widget-autohide":{"requires":["widget","event-outside","base-build","event-key"],"skinnable":false},"widget-base":{"requires":["attribute","event-focus","base-base","base-pluginhost","node-base","node-style","classnamemanager"],"skinnable":true},"widget-base-ie":{"condition":{"name":"widget-base-ie","trigger":"widget-base","ua":"ie"},"requires":["widget-base"]},"widget-buttons":{"requires":["widget","base-build","widget-stdmod"],"skinnable":true},"widget-child":{"requires":["base-build","widget"]},"widget-htmlparser":{"requires":["widget-base"]},"widget-locale":{"requires":["widget-base"]},"widget-modality":{"requires":["widget","event-outside","base-build"],"skinnable":false},"widget-parent":{"requires":["base-build","arraylist","widget"]},"widget-position":{"requires":["base-build","node-screen","widget"]},"widget-position-align":{"requires":["widget-position"]},"widget-position-constrain":{"requires":["widget-position"]},"widget-skin":{"requires":["widget-base"]},"widget-stack":{"requires":["base-build","widget"],"skinnable":true},"widget-stdmod":{"requires":["base-build","widget"]},"widget-uievents":{"requires":["widget-base","node-event-delegate"]},"yql":{"requires":["jsonp","jsonp-url"]},"yui":{},"yui-base":{},"yui-later":{"requires":["yui-base"]},"yui-log":{"requires":["yui-base"]},"yui-rls":{},"yui-throttle":{"requires":["yui-base"]}};YUI.Env[a.version].md5="105ebffae27a0e3d7331f8cf5c0bb282";},"3.4.1",{requires:["loader-base"]});YUI.add("yui",function(a){},"3.4.1",{use:["yui-base","get","features","intl-base","yui-log","yui-later","loader-base","loader-rollup","loader-yui3"]}); 80var YUI3_config = {"base":"\/extension\/ezjscore\/design\/standard\/lib\/yui\/3.4.1\/build\/","combine":false,"modules":{}}; 81YUI(YUI3_config).use('event', function (Y) { 82Y.on('domready', function () { 83var h = Y.one('html'), 84ua = Y.UA; 85if ( h.hasClass('ie') ) { 86return; 87} 88if ( ua.ie ) { 89h.addClass('ie').addClass('ie-gt9'); 90} else if ( ua.webkit ) { 91h.addClass('webkit').addClass('vers_' + (ua.webkit + '').replace('.', '_')); 92} else if ( ua.gecko ) {
93h.addClass('gecko').addClass('vers_' + (ua.gecko + '').replace('.', '_')); 94} 95}); 96}); 97YUI(YUI3_config).use('event-base', 'node-base', 'event-outside', function (Y) { 98Y.on('domready', function () { 99Y.all('.transition-showed').each(function () { 100this.on('clickoutside', function (e) { 101if ( this.get('id') === location.hash.replace('#', '') ) { 102location.hash = ''; 103} 104}); 105}); 106}); 107}); 108YUI(YUI3_config).use('event', function (Y) { 109Y.on('domready', function () { 110Y.all('*[data-action=toggleclass]').each(function(elem) { 111var cl = elem.getAttribute('data-class'), 112targets = Y.all(elem.getAttribute('data-target')); 113elem.on('click', function (e) { 114e.preventDefault(); 115targets.toggleClass(cl); 116}); 117}); 118}); 119}); 120YUI(YUI3_config).add('ezflyout', function (Y) { 121Y.namespace('eZ'); 122var L = Y.Lang; 123var defaultConfig = { 124element: '', 125close: '.close', 126scrollTrigger: 0, 127trackInitialScroll: true, 128hideTransition: { 129}, 130showTransition: { 131} 132}; 133function eZFlyOut(conf) { 134this.conf = Y.merge(defaultConfig, conf); 135this.element = Y.one(this.conf.element); 136this.hidden = true; 137this.scrollSubscription = false; 138this._initEvents(); 139} 140eZFlyOut.prototype.isHidden = function () { 141return this.hidden; 142} 143eZFlyOut.prototype.show = function () { 144if ( this.isHidden() ) { 145this.element.transition( 146this._transitionConf(this.conf.showTransition) 147); 148this.hidden = false; 149this.fire('show'); 150} 151} 152eZFlyOut.prototype.hide = function () { 153if ( !this.isHidden() ) { 154this.element.transition( 155this._transitionConf(this.conf.hideTransition) 156); 157this.hidden = true; 158this.fire('hide'); 159} 160} 161eZFlyOut.prototype.close = function () { 162this.scrollSubscription.detach(); 163this.hide(); 164this.fire('close'); 165} 166eZFlyOut.prototype._initEvents = function () { 167var that = this, 168handleScroll = function () { 169var limit = false; 170if ( L.isNumber(that.conf.scrollTrigger) ) { 171limit = that.conf.scrollTrigger; 172} else { 173if ( L.isString(that.conf.scrollTrigger) ) { 174limit = Y.one(that.conf.scrollTrigger); 175} 176if ( !L.isObject(limit) ) { 177return; 178} 179limit = limit.getY(); 180} 181if ( that.element.get('docScrollY') >= limit ) { 182that.show(); 183} else { 184that.hide(); 185} 186}; 187this.scrollSubscription = Y.on('scroll', handleScroll); 188this.element.delegate('click', function () { 189that.close(); 190}, this.conf.close); 191this.fire('ready'); 192if ( this.conf.trackInitialScroll ) { 193handleScroll(); 194} 195} 196eZFlyOut.prototype._transitionConf = function(conf) { 197var res = Y.clone(conf, false); 198Y.Object.each(res, function(v, k) { 199if ( L.isFunction(v) ) { 200res[k] = v.call(this); 201} else if ( k !== 'on' && L.isObject(v) ) { 202res[k] = this._transitionConf(v); 203} 204}, this); 205return res; 206} 207Y.augment(eZFlyOut, Y.EventTarget, true, null, {emitFacade: true}); 208Y.eZ.FlyOut = eZFlyOut; 209}, '1.0.0', { 210requires: [ 211'event', 'node-screen', 'transition', 'node-event-delegate' 212] 213}); 214YUI(YUI3_config).add('ezsimplegallery', function (Y) { 215Y.namespace('eZ'); 216var L = Y.Lang; 217var defaultConfig = { 218gallery: '', 219next: '.next', 220prev: '.prev', 221indicators: '.indicator li', 222selectedIndactorClass: 'selected', 223container: '.images', 224images: 'figure', 225transitionDuration: 0.8, 226easing: 'cubic-bezier' 227}; 228function eZSG(conf) { 229this.conf = Y.merge(defaultConfig, conf); 230if ( L.isString(this.conf.gallery) ) { 231this.gallery = Y.one(this.conf.gallery); 232} else if ( L.isObject(this.conf.gallery) ) { 233this.gallery = this.conf.gallery; 234} 235this.container = this.gallery.one(this.conf.container); 236this.next = this.gallery.one(this.conf.next); 237this.prev = this.gallery.one(this.conf.prev); 238this.indicators = this.gallery.all(this.conf.indicators); 239this.index = 0; 240this.total = this.gallery.all(this.conf.images).size(); 241this._init(); 242} 243eZSG.prototype._init = function () { 244var that = this; 245this.next.on('click', function (e) { 246e.preventDefault(); 247that.showNext(); 248}); 249this.prev.on('click', function (e) { 250e.preventDefault(); 251that.showPrev(); 252}); 253Y.on('windowresize', function () { 254that.scrollTo(that.index); 255}); 256this.indicators.each(function(ind, k) { 257ind.on('click', function (e) { 258if ( !this.hasClass(that.conf.selectedIndactorClass) ) { 259that.scrollTo(k); 260} 261}); 262}); 263} 264eZSG.prototype.showNext = function () { 265if ( this.index == (this.total - 1) ) { 266return; 267} 268this.scrollTo(this.index + 1); 269} 270eZSG.prototype.showPrev = function () { 271if ( this.index == 0 ) { 272return; 273} 274this.scrollTo(this.index - 1); 275} 276eZSG.prototype.scrollTo = function (newIndex) { 277var f = 1, s = this.conf.selectedIndactorClass, 278c = this.container, o = this.index * this._getOffset() * -1, 279hasIndicator = (this.indicators.size() > 0); 280f = this.index - newIndex; 281if ( f != 0 ) { 282if ( hasIndicator ) 283this.indicators.item(this.index).removeClass(s); 284this.index = newIndex; 285if ( hasIndicator ) 286this.indicators.item(this.index).addClass(s); 287} 288var target = o + (f * this._getOffset()); 289if ( Y.UA.ie ) { 290var anim = new Y.Anim({ 291node: c, 292duration: this.conf.transitionDuration, 293to: { 294left: target + 'px' 295} 296}); 297anim.run(); 298} else { 299c.transition({ 300left: { 301value: target + 'px', 302duration: this.conf.transitionDuration, 303easing: this.conf.easing 304} 305}); 306} 307this._handleNavigationLink(); 308} 309eZSG.prototype._getOffset = function () { 310return this.gallery.get('clientWidth'); 311} 312eZSG.prototype._handleNavigationLink = function () { 313var d = this.conf.transitionDuration, 314showC = { 315opacity:1, 316duration: d 317}, 318hideC = { 319opacity:0, 320duration: d 321} 322if ( this.index == 0 ) { 323this.prev.transition(hideC); 324} else if ( this.index >= 1 ) { 325this.prev.transition(showC); 326} 327if ( this.index == (this.total -1) ) { 328this.next.transition(hideC); 329} else if ( this.index <= (this.total - 2) ) { 330this.next.transition(showC); 331} 332} 333Y.eZ.SimpleGallery = eZSG; 334}, '1.0.0', { 335requires: [ 336'node-base', 'node-screen', 'transition', 'anim', 'event-resize' 337] 338}); 339YUI(YUI3_config).add('ezgallerynavigator', function (Y) { 340Y.namespace('eZ'); 341var L = Y.Lang; 342var defaultConfig = { 343gallery: '', 344next: '.next', 345prev: '.prev',
346cursor: '.cursor', 347container: '.images', 348images: 'figure', 349transitionDuration: 0.5, 350easing: 'cubic-bezier' 351}; 352function width(el) { 353return parseInt(el.getStyle('width')); 354} 355function left(el) { 356return parseInt(el.getStyle('left')); 357} 358function eZGN(conf) { 359var that = this; 360this.conf = Y.merge(defaultConfig, conf); 361if ( L.isString(this.conf.gallery) ) { 362this.gallery = Y.one(this.conf.gallery); 363} else if ( L.isObject(this.conf.gallery) ) { 364this.gallery = this.conf.gallery; 365} 366this.container = this.gallery.one(this.conf.container); 367this.nextLink = this.gallery.one(this.conf.next); 368this.prevLink = this.gallery.one(this.conf.prev); 369this.images = this.container.all(this.conf.images); 370this.index = 0; 371this.total = this.images.size(); 372this.cursor = this.gallery.one(this.conf.cursor); 373this.cursor.setStyles({ 374left: this._computeCursorX(this.getSelectedImage()) + 'px', 375display: 'inline-block' 376}); 377this._init(); 378} 379eZGN.DEFAULT_CONFIG = defaultConfig; 380eZGN.prototype._init = function () { 381var that = this; 382this.nextLink.on('click', function (e) { 383e.preventDefault(); 384that.next(); 385}); 386this.prevLink.on('click', function (e) { 387e.preventDefault(); 388that.previous(); 389}); 390this.images.each(function(img, k) { 391img.on('click', function (e) { 392e.preventDefault(); 393that.select(k); 394}); 395}); 396} 397eZGN.NAME = 'gallerynavigator'; 398eZGN.prototype.getSelectedImage = function () { 399return this.images.item(this.index); 400} 401eZGN.prototype.getImages = function () { 402return this.images; 403} 404eZGN.prototype.getContainer = function () { 405return this.container; 406} 407eZGN.prototype.select = function (i) { 408var p = this.index; 409if ( !L.isUndefined(i) ) { 410this.index = i; 411} 412var s = this.getSelectedImage(); 413this.fire('select', { 414index: this.index, 415previous: p, 416total: this.total, 417imageNode: s, 418}); 419this._handleNavigationLink(); 420this._animate(); 421} 422eZGN.prototype.next = function () { 423if ( this.index == (this.total -1) ) { 424return; 425} 426this.select(this.index + 1); 427} 428eZGN.prototype.previous = function () { 429if ( this.index == 0 ) { 430return; 431} 432this.select(this.index - 1); 433} 434eZGN.prototype._isSelectedImageOutsideRight = function () { 435var s = this.getSelectedImage(), 436lRight = this.gallery.getX() + parseInt(this.gallery.getStyle('width')); 437if ( ((s.getX() + parseInt(s.getStyle('width'))) > lRight) ) { 438return true; 439} 440return false; 441} 442eZGN.prototype._isSelectedImageOutsideLeft = function () { 443var s = this.getSelectedImage(), 444lLeft = this.gallery.getX(); 445if ( s.getX() < lLeft ) { 446return true; 447} 448return false; 449} 450eZGN.prototype._computeCursorX = function (s) { 451var offset = this.gallery.getX(), 452selectedWidth = width(s), 453cursorWidth = width(this.cursor); 454return s.getX() - offset + selectedWidth/2 - cursorWidth/2; 455} 456eZGN.prototype._animate = function () { 457var trConf = { 458duration: this.conf.transitionDuration, 459easing: this.conf.easing 460}, sel = this.getSelectedImage(), 461cursorX = this._computeCursorX(sel), containerX, containerXOrig; 462if ( this._isSelectedImageOutsideRight() ) { 463containerXOrig = left(this.container); 464containerX = this.container.getX() - sel.getX(); 465cursorX += containerX - containerXOrig; 466trConf['left'] = containerX + 'px'; 467this._doTransition(this.container, trConf); 468} else if ( this._isSelectedImageOutsideLeft() ) { 469containerXOrig = left(this.container); 470var selectedBorderLeft = sel.getX() + width(sel), sizeBetween, 471widthGallery = width(this.gallery); 472for(var i = this.index; i >= 0; i--) { 473sizeBetween = selectedBorderLeft - this.images.item(i).getX(); 474if ( sizeBetween > widthGallery ) { 475i++; 476break; 477} 478} 479if ( i < 0 ) 480i = 0; 481containerX = this.container.getX() - this.images.item(i).getX(); 482cursorX += containerX - containerXOrig; 483trConf['left'] = containerX + 'px'; 484this._doTransition(this.container, trConf); 485} 486trConf['left'] = cursorX + 'px'; 487this._doTransition(this.cursor, trConf); 488} 489eZGN.prototype._doTransition = function(node, conf) { 490if ( Y.UA.ie ) { 491var anim = new Y.Anim({ 492node: node, 493duration: conf.duration, 494to: { 495left: conf.left 496} 497}); 498anim.run(); 499} else { 500node.transition(conf); 501} 502} 503eZGN.prototype._handleNavigationLink = function () { 504var d = this.conf.transitionDuration, 505showC = { 506opacity:1, 507duration: d 508}, 509hideC = { 510opacity:0, 511duration: d 512}; 513if ( this.index == 0 ) { 514this.prevLink.transition(hideC); 515} else if ( this.index >= 1 ) { 516this.prevLink.transition(showC); 517} 518if ( this.index == (this.total -1) ) { 519this.nextLink.transition(hideC); 520} else if ( this.index <= (this.total - 2) ) { 521this.nextLink.transition(showC); 522} 523} 524Y.augment(eZGN, Y.EventTarget, true, null, {emitFacade: true}); 525Y.eZ.GalleryNavigator = eZGN; 526}, '1.0.0', { 527requires: [ 528'event-custom', 'transition', 'node-base', 'node-screen', 'anim' 529] 530}); 531YUI(YUI3_config).add('ezgallery', function (Y) { 532Y.namespace('eZ'); 533var L = Y.Lang; 534var defaultConfig = { 535container: '.gallery-viewer', 536title: 'h2 a', 537counter: '.counter span', 538image: 'figure img', 539caption: 'figcaption', 540figure: 'figure', 541transitionDuration: 0.8, 542autoScrollOnSelect: true, 543autoFixSizes: true, 544initFunc: function () { }, 545updateFunc: function (elem) { }, 546navigator: Y.eZ.GalleryNavigator.DEFAULT_CONFIG 547} 548function eZG(conf) { 549this.conf = Y.merge(defaultConfig, conf); 550this.navigator = new Y.eZ.GalleryNavigator(conf.navigator); 551this._init(); 552this.hasStarted = false;
553} 554eZG.prototype._init = function () { 555var that = this; 556this.container = Y.one(this.conf.container); 557this._fixSizes(); 558this.conf.initFunc.call(this); 559this.navigator.on('select', function (item) { 560that.hasStarted = true; 561if ( that.conf.autoScrollOnSelect ) { 562that.container.scrollIntoView(true); 563} 564that.update(item, (item.index != item.previous)); 565}); 566Y.on('windowresize', function () { 567if ( that.hasStarted && that.conf.autoScrollOnSelect ) { 568that.container.scrollIntoView(true); 569} 570that.navigator.select(); 571}); 572} 573eZG.prototype.update = function (item, animate) { 574var that = this; 575if ( animate ) { 576this.container.setStyle('opacity', 0); 577this.conf.updateFunc.call(that, item); 578this._fixSizes(); 579this.container.transition({ 580duration: this.conf.transitionDuration, 581opacity: 1 582}); 583} else { 584this.conf.updateFunc.call(this, item); 585this._fixSizes(); 586} 587} 588eZG.prototype._fixSizes = function () { 589if ( !this.conf.autoFixSizes ) { 590return; 591} 592var c = this.container, 593fig = c.one(this.conf.figure), 594nav = this.navigator.getContainer(); 595caption = c.one(this.conf.caption); 596img = c.one(this.conf.image), 597offsetFig = 0, figH = 0, offsetImg = 0, 598imgRatio = parseInt(img.getAttribute('width')) / parseInt(img.getAttribute('height')); 599fig.setStyle('height', 'auto'); 600offsetFig = nav.getY() + nav.get('offsetHeight') - this.container.getY() - nav.get('winHeight'); 601figH = fig.get('offsetHeight') - offsetFig 602fig.setStyle('height', figH + 'px'); 603img.setStyles({height: 'auto', width: 'auto'}); 604offsetImg = img.get('offsetHeight') + caption.get('offsetHeight') - figH; 605if ( offsetImg > 0 ) { 606var imgH = img.get('offsetHeight') - offsetImg, 607imgW = imgH * imgRatio; 608if ( imgH > parseInt(img.getAttribute('height')) ) { 609imgH = parseInt(img.getAttribute('height')); 610imgW = imgH * imgRatio; 611} 612img.setStyles({height: imgH + 'px', width: imgW + 'px'}); 613} 614} 615Y.eZ.Gallery = eZG; 616}, '1.0.0', { 617requires: [ 618'ezgallerynavigator', 'transition', 'event-resize', 'anim', 'node-base' 619] 620}); 621/* 622* FullCalendar v1.4.5 623* http://arshaw.com/fullcalendar/ 624* 625* Use fullcalendar.css for basic styling. 626* For event drag & drop, required jQuery UI draggable. 627* For event resizing, requires jQuery UI resizable. 628* 629* Copyright (c) 2009 Adam Shaw 630* Dual licensed under the MIT and GPL licenses: 631* http://www.opensource.org/licenses/mit-license.php 632* http://www.gnu.org/licenses/gpl.html 633* 634* Date: Sun Feb 21 20:30:11 2010 -0800 635* 636*/ 637(function(l){function ua(a,b){a._id=a._id||(a.id==I?"_fc"+cb++:a.id+"");if(a.date){if(!a.start)a.start=a.date;delete a.date}a._start=q(a.start=Pa(a.start));a.end=Pa(a.end);if(a.end&&a.end<=a.start)a.end=null;a._end=a.end?q(a.end):null;if(a.allDay==I)a.allDay=b.allDayDefault;if(a.className){if(typeof a.className=="string")a.className=a.className.split(/\s+/)}else a.className=[]}function Da(a,b,d){function c(i,p,N,F){G=i;K=p;t=b.theme?"ui":"fc";$=b.weekends?0:1;T=b.firstDay;if(ia=b.isRTL){ma=-1;ja= K-1}else{ma=1;ja=0}var W=D.start.getMonth(),Q=va(new Date),M,E=q(D.visStart);if(R){o();p=R.find("tr").length;if(G<p)R.find("tr:gt("+(G-1)+")").remove();else if(G>p){i="";for(p=p;p<G;p++){i+="<tr class='fc-week"+p+"'>";for(M=0;M<K;M++){i+="<td class='fc-"+pa[E.getDay()]+" "+t+"-state-default fc-new fc-day"+(p*K+M)+(M==ja?" fc-leftmost":"")+"'>"+(F?"<div class='fc-day-number'></div>":"")+"<div class='fc-day-content'><div style='position:relative'> </div></div></td>";z(E,1);$&&ea(E)}i+="</tr>"}R.append(i)}R.find("td.fc-new").removeClass("fc-new").click(f); E=q(D.visStart);R.find("td").each(function(){var ba=l(this);if(G>1)E.getMonth()==W?ba.removeClass("fc-other-month"):ba.addClass("fc-other-month");+E==+Q?ba.removeClass("fc-not-today").addClass("fc-today").addClass(t+"-state-highlight"):ba.addClass("fc-not-today").removeClass("fc-today").removeClass(t+"-state-highlight");ba.find("div.fc-day-number").text(E.getDate());z(E,1);$&&ea(E)});if(G==1){E=q(D.visStart);aa.find("th").each(function(){l(this).text(na(E,N,b));this.className=this.className.replace(/^fc-\w+(?= )/, "fc-"+pa[E.getDay()]);z(E,1);$&&ea(E)});E=q(D.visStart);R.find("td").each(function(){this.className=this.className.replace(/^fc-\w+(?= )/,"fc-"+pa[E.getDay()]);
637z(E,1);$&&ea(E)})}}else{var U=l("<table/>").appendTo(a);i="<thead><tr>";for(p=0;p<K;p++){i+="<th class='fc-"+pa[E.getDay()]+" "+t+"-state-default"+(p==ja?" fc-leftmost":"")+"'>"+na(E,N,b)+"</th>";z(E,1);$&&ea(E)}aa=l(i+"</tr></thead>").appendTo(U);i="<tbody>";E=q(D.visStart);for(p=0;p<G;p++){i+="<tr class='fc-week"+p+"'>";for(M=0;M<K;M++){i+= "<td class='fc-"+pa[E.getDay()]+" "+t+"-state-default fc-day"+(p*K+M)+(M==ja?" fc-leftmost":"")+(G>1&&E.getMonth()!=W?" fc-other-month":"")+(+E==+Q?" fc-today "+t+"-state-highlight":" fc-not-today")+"'>"+(F?"<div class='fc-day-number'>"+E.getDate()+"</div>":"")+"<div class='fc-day-content'><div style='position:relative'> </div></div></td>";z(E,1);$&&ea(E)}i+="</tr>"}R=l(i+"</tbody>").appendTo(U);R.find("td").click(f);S=l("<div style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(a)}} function f(i){var p=parseInt(this.className.match(/fc\-day(\d+)/)[1]);p=z(q(D.visStart),Math.floor(p/K)*7+p%K);D.trigger("dayClick",this,p,true,i)}function m(i){ga=i;i=R.find("tr td:first-child");var p=ga-aa.height(),N;if(b.weekMode=="variable")N=p=Math.floor(p/(G==1?2:6));else{N=Math.floor(p/G);p=p-N*(G-1)}if(Ea==I){var F=R.find("tr:first").find("td:first");F.height(N);Ea=N!=F.height()}if(Ea){i.slice(0,-1).height(N);i.slice(-1).height(p)}else{Fa(i.slice(0,-1),N);Fa(i.slice(-1),p)}}function j(i){Z= i;C.clear();za(aa.find("th").slice(0,-1),oa=Math.floor(Z/K))}function x(i){D.reportEvents(fa=i);A(X(i))}function w(i){o();A(X(fa),i)}function o(){D._clearEvents();S.empty()}function X(i){var p=q(D.visStart),N=z(q(p),K),F=l.map(i,V),W,Q,M,E,U,ba,g=[];for(W=0;W<G;W++){Q=Ga(D.sliceSegs(i,F,p,N));for(M=0;M<Q.length;M++){E=Q[M];for(U=0;U<E.length;U++){ba=E[U];ba.row=W;ba.level=M;g.push(ba)}}z(p,7);z(N,7)}return g}function A(i,p){Qa(i,G,D,0,Z,function(N){return R.find("tr:eq("+N+")")},C.left,C.right,S, J,p)}function V(i){if(i.end){var p=q(i.end);return i.allDay||p.getHours()||p.getMinutes()?z(p,1):p}else return z(q(i.start),1)}function J(i,p,N){D.eventElementHandlers(i,p);if(i.editable||i.editable==I&&b.editable){ka(i,p);N.isEnd&&D.resizableDayEvent(i,p,oa)}}function ka(i,p){if(!b.disableDragging&&p.draggable){var N;p.draggable({zIndex:9,delay:50,opacity:D.option("dragOpacity"),revertDuration:b.dragRevertDuration,start:function(F,W){D.hideEvents(i,p);D.trigger("eventDragStart",p,i,F,W);N=new Ha(function(Q){p.draggable("option", "revert",!Q||!Q.rowDelta&&!Q.colDelta);Q?D.showOverlay(Q):D.hideOverlay()});R.find("tr").each(function(){N.row(this)});W=R.find("tr:first td");if(ia)W=l(W.get().reverse());W.each(function(){N.col(this)});N.mouse(F.pageX,F.pageY)},drag:function(F){N.mouse(F.pageX,F.pageY)},stop:function(F,W){D.hideOverlay();D.trigger("eventDragStop",p,i,F,W);var Q=N.cell;if(!Q||!Q.rowDelta&&!Q.colDelta){l.browser.msie&&p.css("filter","");D.showEvents(i,p)}else{p.find("a").removeAttr("href");D.eventDrop(this,i,Q.rowDelta* 7+Q.colDelta*ma,0,i.allDay,F,W)}}})}}var t,T,$,ia,ma,ja,Z,ga,G,K,oa,aa,R,fa=[],S,C=new Ra(function(i){return R.find("td:eq("+(i-Math.max(T,$)+K)%K+") div div")}),D=l.extend(this,Sa,d,{renderGrid:c,renderEvents:x,rerenderEvents:w,clearEvents:o,setHeight:m,setWidth:j,defaultEventEnd:function(i){return q(i.start)}});D.init(a,b);a.addClass("fc-grid");a.disableSelection&&a.disableSelection()}function Qa(a,b,d,c,f,m,j,x,w,o,X){var A=d.options,V=A.isRTL,J,ka=a.length,t,T,$,ia,ma,ja="",Z={},ga={},G=[],K= [];for(J=0;J<ka;J++){t=a[J];T=t.event;$="fc-event fc-event-hori ";if(V){if(t.isStart)$+="fc-corner-right ";if(t.isEnd)$+="fc-corner-left ";ia=t.isEnd?j(t.end.getDay()-1):c;ma=t.isStart?x(t.start.getDay()):f}else{if(t.isStart)$+="fc-corner-left ";if(t.isEnd)$+="fc-corner-right ";ia=t.isStart?j(t.start.getDay()):c;ma=t.isEnd?x(t.end.getDay()-1):f}ja+="<div class='"+$+T.className.join(" ")+"' style='position:absolute;z-index:8;left:"+ia+"px'><a"+(T.url?" href='"+wa(T.url)+"'":"")+">"+(!T.allDay&&t.isStart? "<span class='fc-event-time'>"+wa(ta(T.start,T.end,d.option("timeFormat"),A))+"</span>":"")+"<span class='fc-event-title'>"+wa(T.title)+"</span></a>"+((T.editable||T.editable==I&&A.editable)&&!A.disableResizing&&l.fn.resizable?"<div class='ui-resizable-handle ui-resizable-"+(V?"w":"e")+"'></div>":"")+"</div>";t.left=ia;t.outerWidth=ma-ia}w[0].innerHTML=ja;f=w.children();for(J=0;J<ka;J++){t=a[J];c=l(f[J]);T=t.event;j=d.trigger("eventRender",T,T,c);if(j===false)c.remove();else{if(j&&j!==true){c.remove();
637 c=l(j).css({position:"absolute",left:t.left}).appendTo(w)}t.element=c;if(T._id===X)o(T,c,t);else c[0]._fci=J;d.reportEventElement(T,c)}}Ta(w,a,o);for(J=0;J<ka;J++){t=a[J];if(c=t.element){o=Z[w=t.key=Ua(c[0])];t.hsides=o==I?(Z[w]=Ia(c[0],true)):o}}for(J=0;J<ka;J++){t=a[J];if(c=t.element)c[0].style.width=t.outerWidth-t.hsides+"px"}for(J=0;J<ka;J++){t=a[J];if(c=t.element){o=ga[w=t.key];t.outerHeight=c[0].offsetHeight+(o==I?(ga[w]=Va(c[0])):o)}}for(Z=J=0;Z<b;Z++){for(ga=w=o=0;J<ka&&(t=a[J]).row==Z;){if(t.level!= w){ga+=o;o=0;w++}o=Math.max(o,t.outerHeight||0);t.top=ga;J++}G[Z]=m(Z).find("td:first div.fc-day-content > div").height(ga+o)}for(Z=0;Z<b;Z++)K[Z]=G[Z][0].offsetTop;for(J=0;J<ka;J++){t=a[J];if(c=t.element){c[0].style.top=K[t.row]+t.top+"px";T=t.event;d.trigger("eventAfterRender",T,T,c)}}}function Wa(a,b,d){function c(e,h){fa=e;M=b.theme?"ui":"fc";U=b.weekends?0:1;E=b.firstDay;if(ba=b.isRTL){g=-1;v=fa-1}else{g=1;v=0}L=Xa(b.minTime);H=Xa(b.maxTime);e=ba?z(q(r.visEnd),-1):q(r.visStart);var k=q(e),y= va(new Date);if(G){X();G.find("tr:first th").slice(1,-1).each(function(){l(this).text(na(k,h,b));this.className=this.className.replace(/^fc-\w+(?= )/,"fc-"+pa[k.getDay()]);z(k,g);U&&ea(k,g)});k=q(e);R.find("td").each(function(){this.className=this.className.replace(/^fc-\w+(?= )/,"fc-"+pa[k.getDay()]);+k==+y?l(this).removeClass("fc-not-today").addClass("fc-today").addClass(M+"-state-highlight"):l(this).addClass("fc-not-today").removeClass("fc-today").removeClass(M+"-state-highlight");z(k,g);U&&ea(k, g)})}else{var n,s,u=b.slotMinutes%15==0,B="<div class='fc-agenda-head' style='position:relative;z-index:4'><table style='width:100%'><tr class='fc-first"+(b.allDaySlot?"":" fc-last")+"'><th class='fc-leftmost "+M+"-state-default'> </th>";for(n=0;n<fa;n++){B+="<th class='fc-"+pa[k.getDay()]+" "+M+"-state-default'>"+na(k,h,b)+"</th>";z(k,g);U&&ea(k,g)}B+="<th class='"+M+"-state-default'> </th></tr>";if(b.allDaySlot)B+="<tr class='fc-all-day'><th class='fc-axis fc-leftmost "+M+"-state-default'>"+ b.allDayText+"</th><td colspan='"+fa+"' class='"+M+"-state-default'><div class='fc-day-content'><div style='position:relative'> </div></div></td><th class='"+M+"-state-default'> </th></tr><tr class='fc-divider fc-last'><th colspan='"+(fa+2)+"' class='"+M+"-state-default fc-leftmost'><div/></th></tr>";B+="</table></div>";G=l(B).appendTo(a);G.find("td").click(x);W=l("<div style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(G);k=Ya();var O=ha(q(k),H);ha(k,L);B="<table>";for(n=0;k< O;n++){s=k.getMinutes();B+="<tr class='"+(n==0?"fc-first":s==0?"":"fc-minor")+"'><th class='fc-axis fc-leftmost "+M+"-state-default'>"+(!u||s==0?na(k,b.axisFormat):" ")+"</th><td class='fc-slot"+n+" "+M+"-state-default'><div style='position:relative'> </div></td></tr>";ha(k,b.slotMinutes)}B+="</table>";K=l("<div class='fc-agenda-body' style='position:relative;z-index:2;overflow:auto'/>").append(oa=l("<div style='position:relative;overflow:hidden'>").append(aa=l(B))).appendTo(a);K.find("td").click(x); Q=l("<div style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(oa);k=q(e);B="<div class='fc-agenda-bg' style='position:absolute;z-index:1'><table style='width:100%;height:100%'><tr class='fc-first'>";for(n=0;n<fa;n++){B+="<td class='fc-"+pa[k.getDay()]+" "+M+"-state-default "+(n==0?"fc-leftmost ":"")+(+k==+y?M+"-state-highlight fc-today":"fc-not-today")+"'><div class='fc-day-content'><div> </div></div></td>";z(k,g);U&&ea(k,g)}B+="</tr></table></div>";R=l(B).appendTo(a)}}function f(){var e= Ya(),h=q(e);h.setHours(b.firstHour);var k=Z(e,h)+1;e=function(){K.scrollTop(k)};e();setTimeout(e,0)}function m(e,h){p=e;ca={};K.height(e-G.height());D=K.find("tr:first div").height()+1;R.css({top:G.find("tr").height(),height:e});h&&f()}function j(e){i=e;la.clear();K.width(e);aa.width("");e=G.find("tr:first th");var h=R.find("td"),k=K[0].clientWidth;aa.width(k);S=0;za(G.find("tr:lt(2) th:first").add(K.find("tr:first th")).width("").each(function(){S=Math.max(S,l(this).outerWidth())}),S);C=Math.floor((k- S)/fa);za(h.slice(0,-1),C);za(e.slice(1,-2),C);za(e.slice(-2,-1),k-S-C*(fa-1));
637R.css({left:S,width:k-S})}function x(e){var h=Math.floor((e.pageX-R.offset().left)/C);h=z(q(r.visStart),v+g*h);var k=this.className.match(/fc-slot(\d+)/);if(k){k=parseInt(k[1])*b.slotMinutes;var y=Math.floor(k/60);h.setHours(y);h.setMinutes(k%60+L);r.trigger("dayClick",this,h,false,e)}else r.trigger("dayClick",this,h,true,e)}function w(e,h){r.reportEvents(F=e);var k,y=e.length,n=[],s=[];for(k=0;k<y;k++)e[k].allDay?n.push(e[k]): s.push(e[k]);J(A(n),h);ka(V(s),h)}function o(e){X();w(F,e)}function X(){r._clearEvents();W.empty();Q.empty()}function A(e){e=Ga(r.sliceSegs(e,l.map(e,t),r.visStart,r.visEnd));var h,k=e.length,y,n,s,u=[];for(h=0;h<k;h++){y=e[h];for(n=0;n<y.length;n++){s=y[n];s.row=0;s.level=h;u.push(s)}}return u}function V(e){var h=ha(q(r.visStart),L),k=l.map(e,t),y,n,s,u,B,O,Y=[];for(y=0;y<fa;y++){n=Ga(r.sliceSegs(e,k,h,ha(q(h),H-L)));db(n);for(s=0;s<n.length;s++){u=n[s];for(B=0;B<u.length;B++){O=u[B];O.col=y;O.level= s;Y.push(O)}}z(h,1,true)}return Y}function J(e,h){if(b.allDaySlot){Qa(e,1,r,S,i,function(){return G.find("tr.fc-all-day")},function(k){return S+la.left(ga(k))},function(k){return S+la.right(ga(k))},W,T,h);m(p)}}function ka(e,h){var k,y=e.length,n,s,u,B,O,Y,P,da,qa,ra,Za="",Aa={},$a={};for(k=0;k<y;k++){n=e[k];s=n.event;u="fc-event fc-event-vert ";if(n.isStart)u+="fc-corner-top ";if(n.isEnd)u+="fc-corner-bottom ";B=Z(n.start,n.start);O=Z(n.start,n.end);Y=n.col;P=n.level;da=n.forward||0;qa=S+la.left(Y* g+v);ra=S+la.right(Y*g+v)-qa;ra=Math.min(ra-6,ra*0.95);Y=P?ra/(P+da+1):da?(ra/(da+1)-6)*2:ra;P=qa+ra/(P+da+1)*P*g+(ba?ra-Y:0);n.top=B;n.left=P;n.outerWidth=Y;n.outerHeight=O-B;Za+="<div class='"+u+s.className.join(" ")+"' style='position:absolute;z-index:8;top:"+B+"px;left:"+P+"px'><a"+(s.url?" href='"+wa(s.url)+"'":"")+"><span class='fc-event-bg'></span><span class='fc-event-time'>"+wa(ta(s.start,s.end,r.option("timeFormat")))+"</span><span class='fc-event-title'>"+wa(s.title)+"</span></a>"+((s.editable|| s.editable==I&&b.editable)&&!b.disableResizing&&l.fn.resizable?"<div class='ui-resizable-handle ui-resizable-s'>=</div>":"")+"</div>"}Q[0].innerHTML=Za;B=Q.children();for(k=0;k<y;k++){n=e[k];s=n.event;u=l(B[k]);O=r.trigger("eventRender",s,s,u);if(O===false)u.remove();else{if(O&&O!==true){u.remove();u=l(O).css({position:"absolute",top:n.top,left:n.left}).appendTo(Q)}n.element=u;if(s._id===h)$(s,u,n);else u[0]._fci=k;r.reportEventElement(s,u)}}Ta(Q,e,$);for(k=0;k<y;k++){n=e[k];if(u=n.element){h=Aa[s= n.key=Ua(u[0])];n.vsides=h==I?(Aa[s]=Ja(u[0],true)):h;h=$a[s];n.hsides=h==I?($a[s]=Ia(u[0],true)):h;s=u.find("span.fc-event-title");if(s.length)n.titleTop=s[0].offsetTop}}for(k=0;k<y;k++){n=e[k];if(u=n.element){u[0].style.width=n.outerWidth-n.hsides+"px";u[0].style.height=(Aa=n.outerHeight-n.vsides)+"px";s=n.event;if(n.titleTop!=I&&Aa-n.titleTop<10){u.find("span.fc-event-time").text(na(s.start,r.option("timeFormat"))+" - "+s.title);u.find("span.fc-event-title").remove()}r.trigger("eventAfterRender", s,s,u)}}}function t(e){if(e.allDay)if(e.end){var h=q(e.end);return e.allDay||h.getHours()||h.getMinutes()?z(h,1):h}else return z(q(e.start),1);return e.end?q(e.end):ha(q(e.start),b.defaultEventMinutes)}function T(e,h,k){r.eventElementHandlers(e,h);if(e.editable||e.editable==I&&b.editable){ia(e,h,k.isStart);k.isEnd&&r.resizableDayEvent(e,h,C)}}function $(e,h,k){r.eventElementHandlers(e,h);if(e.editable||e.editable==I&&b.editable){var y=h.find("span.fc-event-time");ma(e,h,y);k.isEnd&&ja(e,h,y)}}function ia(e, h,k){if(!b.disableDragging&&h.draggable){var y,n,s,u=true,B;h.draggable({zIndex:9,opacity:r.option("dragOpacity","month"),revertDuration:b.dragRevertDuration,start:function(O,Y){r.hideEvents(e,h);r.trigger("eventDragStart",h,e,O,Y);y=h.position();n=h.width();s=function(){if(!u){h.width(n).height("").draggable("option","grid",null);u=true}};B=new Ha(function(P){h.draggable("option","revert",!P||!P.rowDelta&&!P.colDelta);if(P)if(P.row){if(k&&u){Fa(h.width(C-10),D*Math.round((e.end?(e.end-e.start)/eb: b.defaultEventMinutes)/b.slotMinutes));h.draggable("option","grid",[C,1]);u=false}r.hideOverlay()}else{s();r.showOverlay(P)}else r.hideOverlay()});B.row(G.find("td"));R.find("td").each(function(){B.col(this)});B.row(K);B.mouse(O.pageX,O.pageY)},drag:function(O){B.mouse(O.pageX,O.pageY)},stop:function(O,Y){r.hideOverlay();r.trigger("eventDragStop",h,e,O,Y);var P=B.cell,da=g*(u?P?P.colDelta:0:Math.floor((Y.position.left-y.left)/C));if(!P||!da&&!P.rowDelta){s();l.browser.msie&&h.css("filter","");r.showEvents(e, h)}else{h.find("a").removeAttr("href");r.eventDrop(this,e,da,u?0:Math.round((h.offset().top-oa.offset().top)/D)*b.slotMinutes+L-(e.start.getHours()*60+e.start.getMinutes()),u,O,Y)}}})}}function ma(e,h,k){if(!b.disableDragging&&h.draggable){var y,n,s,u,B=false,O;h.draggable({zIndex:9,scroll:false,grid:[C,D],axis:fa==1?"y":false,opacity:r.option("dragOpacity"),revertDuration:b.dragRevertDuration,start:function(Y,P){r.hideEvents(e,h);r.trigger("eventDragStart",h,e,Y,P);l.browser.msie&&h.find("span.fc-event-bg").hide(); y=h.position();n=function(){if(B){k.css("display","");h.draggable("option","grid",[C,D]);B=false}};s=0;O=new Ha(function(da){h.draggable("option","revert",!da);if(da)if(!da.row&&b.allDaySlot){if(!B){B=true;
637k.hide();h.draggable("option","grid",null)}r.showOverlay(da)}else{n();r.hideOverlay()}else r.hideOverlay()});b.allDaySlot&&O.row(G.find("td"));R.find("td").each(function(){O.col(this)});O.row(K);O.mouse(Y.pageX,Y.pageY)},drag:function(Y,P){u=Math.round((P.position.top-y.top)/D);if(u!=s){if(!B){P= u*b.slotMinutes;var da=ha(q(e.start),P),qa;if(e.end)qa=ha(q(e.end),P);k.text(ta(da,qa,r.option("timeFormat")))}s=u}O.mouse(Y.pageX,Y.pageY)},stop:function(Y,P){r.hideOverlay();r.trigger("eventDragStop",h,e,Y,P);var da=O.cell,qa=g*(B?da?da.colDelta:0:Math.floor((P.position.left-y.left)/C));if(!da||!u&&!qa){n();l.browser.msie&&h.css("filter","").find("span.fc-event-bg").css("display","");h.css(y);r.showEvents(e,h)}else r.eventDrop(this,e,qa,B?0:u*b.slotMinutes,B,Y,P)}})}}function ja(e,h,k){if(!b.disableResizing&& h.resizable){var y,n;h.resizable({handles:{s:"div.ui-resizable-s"},grid:D,start:function(s,u){y=n=0;r.hideEvents(e,h);l.browser.msie&&l.browser.version=="6.0"&&h.css("overflow","hidden");h.css("z-index",9);r.trigger("eventResizeStart",this,e,s,u)},resize:function(s,u){y=Math.round((Math.max(D,h.height())-u.originalSize.height)/D);if(y!=n){k.text(ta(e.start,!y&&!e.end?null:ha(r.eventEnd(e),b.slotMinutes*y),r.option("timeFormat")));n=y}},stop:function(s,u){r.trigger("eventResizeStop",this,e,s,u);if(y)r.eventResize(this, e,0,b.slotMinutes*y,s,u);else{h.css("z-index",8);r.showEvents(e,h)}}})}}function Z(e,h){e=q(e,true);if(h<ha(q(e),L))return 0;if(h>=ha(q(e),H))return oa.height();e=b.slotMinutes;h=h.getHours()*60+h.getMinutes()-L;var k=Math.floor(h/e),y=ca[k];if(y==I)y=ca[k]=K.find("tr:eq("+k+") td div")[0].offsetTop;return Math.max(0,Math.round(y-1+D*(h%e/e)))}function ga(e){return(e-Math.max(E,U)+fa)%fa*g+v}var G,K,oa,aa,R,fa,S,C,D,i,p,N,F=[],W,Q,M,E,U,ba,g,v,L,H,la=new Ra(function(e){return R.find("td:eq("+e+") div div")}), ca={},r=l.extend(this,Sa,d,{renderAgenda:c,renderEvents:w,rerenderEvents:o,clearEvents:X,setHeight:m,setWidth:j,beforeHide:function(){N=K.scrollTop()},afterShow:function(){K.scrollTop(N)},defaultEventEnd:function(e){var h=q(e.start);if(e.allDay)return h;return ha(h,b.defaultEventMinutes)}});r.init(a,b);a.addClass("fc-agenda");a.disableSelection&&a.disableSelection()}function db(a){var b,d,c,f,m,j;for(b=a.length-1;b>0;b--){f=a[b];for(d=0;d<f.length;d++){m=f[d];for(c=0;c<a[b-1].length;c++){j=a[b-1][c]; if(ab(m,j))j.forward=Math.max(j.forward||0,(m.forward||0)+1)}}}}function Ta(a,b,d){a.unbind("mouseover").mouseover(function(c){for(var f=c.target,m;f!=this;){m=f;f=f.parentNode}if((f=m._fci)!=I){m._fci=I;m=b[f];d(m.event,m.element,m);l(c.target).trigger(c)}c.stopPropagation()})}function Ga(a){var b=[],d,c=a.length,f,m,j,x;for(d=0;d<c;d++){f=a[d];for(m=0;;){j=false;if(b[m])for(x=0;x<b[m].length;x++)if(ab(b[m][x],f)){j=true;break}if(j)m++;else break}if(b[m])b[m].push(f);else b[m]=[f]}return b}function fb(a, b){return(b.msLength-a.msLength)*100+(a.event.start-b.event.start)}function ab(a,b){return a.end>b.start&&a.start<b.end}function Ka(a,b,d){a.setFullYear(a.getFullYear()+b);d||va(a);return a}function La(a,b,d){if(+a){b=a.getMonth()+b;var c=q(a);c.setDate(1);c.setMonth(b);a.setMonth(b);for(d||va(a);a.getMonth()!=c.getMonth();)a.setDate(a.getDate()+(a<c?1:-1))}return a}function z(a,b,d){if(+a){b=a.getDate()+b;var c=q(a);c.setHours(9);c.setDate(b);a.setDate(b);d||va(a);Ma(a,c)}return a}function Ma(a, b){if(+a)for(;a.getDate()!=b.getDate();)a.setTime(+a+(a<b?1:-1)*gb)}function ha(a,b){a.setMinutes(a.getMinutes()+b);return a}function va(a){a.setHours(0);a.setMinutes(0);a.setSeconds(0);a.setMilliseconds(0);return a}function q(a,b){if(b)return va(new Date(+a));return new Date(+a)}function Ya(){var a=0,b;do b=new Date(1970,a++,1);while(b.getHours()!=0);return b}function ea(a,b,d){for(b=b||1;a.getDay()==0||d&&a.getDay()==1||!d&&a.getDay()==6;)z(a,b);return a}function za(a,b,d){a.each(function(c,f){f.style.width= b-Ia(f,d)+"px"})}function Fa(a,b,d){a.each(function(c,f){f.style.height=b-Ja(f,d)+"px"})}function Ia(a,b){return(parseFloat(jQuery.curCSS(a,"paddingLeft",true))||0)+(parseFloat(jQuery.curCSS(a,"paddingRight",true))||0)+(parseFloat(jQuery.curCSS(a,"borderLeftWidth",true))||0)+(parseFloat(jQuery.curCSS(a,"borderRightWidth",true))||0)+(b?hb(a):0)}function hb(a){return(parseFloat(jQuery.curCSS(a,"marginLeft",true))||0)+(parseFloat(jQuery.curCSS(a,"marginRight",true))||0)}function Ja(a,b){return(parseFloat(jQuery.curCSS(a, "paddingTop",true))||0)+(parseFloat(jQuery.curCSS(a,"paddingBottom",true))||0)+(parseFloat(jQuery.curCSS(a,"borderTopWidth",true))||0)+(parseFloat(jQuery.curCSS(a,"borderBottomWidth",true))||0)+(b?Va(a):0)}function Va(a){return(parseFloat(jQuery.curCSS(a,"marginTop",true))||0)+(parseFloat(jQuery.curCSS(a,"marginBottom",true))||0)}function Na(a,b){b=typeof b=="number"?b+"px":b;a[0].style.cssText+=";min-height:"+b+";_height:"+b}
637function ib(a){if(Ba!==false){var b;if(a.is("th,td"))a=(b=a).parent();if(Ba== I&&a.is("tr"))Ba=a.position().top!=a.children().position().top;if(Ba)return a.parent().position().top+(b?a.position().top-b.position().top:0)}return 0}function Ha(a){var b=this,d=[],c=[],f,m,j,x,w,o;b.row=function(X){f=l(X);d.push(f.offset().top+ib(f))};b.col=function(X){m=l(X);c.push(m.offset().left)};b.mouse=function(X,A){if(j==I){d.push(d[d.length-1]+f.outerHeight());c.push(c[c.length-1]+m.outerWidth());w=o=-1}var V;for(V=0;V<d.length&&A>=d[V];V++);for(A=0;A<c.length&&X>=c[A];A++);V=V>=d.length? -1:V-1;A=A>=c.length?-1:A-1;if(V!=w||A!=o){w=V;o=A;if(V==-1||A==-1)b.cell=null;else{if(j==I){j=V;x=A}b.cell={row:V,col:A,top:d[V],left:c[A],width:c[A+1]-c[A],height:d[V+1]-d[V],isOrig:V==j&&A==x,rowDelta:V-j,colDelta:A-x}}a(b.cell)}}}function xa(a){return(a<10?"0":"")+a}function Oa(a,b){if(a[b]!=I)return a[b];b=b.split(/(?=[A-Z])/);for(var d=b.length-1,c;d>=0;d--){c=a[b[d].toLowerCase()];if(c!=I)return c}return a[""]}function wa(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g, ">").replace(/'/g,"'").replace(/"/g,""")}function Ra(a){function b(j){return c[j]=c[j]||a(j)}var d=this,c={},f={},m={};d.left=function(j){return f[j]=f[j]==I?b(j).position().left:f[j]};d.right=function(j){return m[j]=m[j]==I?d.left(j)+b(j).width():m[j]};d.clear=function(){c={};f={};m={}}}function Ua(a){return a.id+"/"+a.className+"/"+a.style.cssText.replace(/(^|;)\s*(top|left|width|height)\s*:[^;]*/ig,"")}var sa=l.fullCalendar={},ya=sa.views={},Ca={defaultView:"month",aspectRatio:1.35, header:{left:"title",center:"",right:"today prev,next"},weekends:true,allDayDefault:true,lazyFetching:true,startParam:"start",endParam:"end",titleFormat:{month:"MMMM yyyy",week:"'Du' d[ MMMM][ yyyy]{ 'au' d MMMM yyyy}",day:"dddd d MMMM yyyy"},columnFormat:{month:"ddd",week:"ddd d/M",day:"dddd d/M"},timeFormat:{"":"h(:mm)t"},isRTL:false,firstDay:0,monthNames:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthNamesShort:["Jan","Fév","Mar", "Avr","Mai","Jun","Jul","Aoû","Sep","Oct","Nov","Déc"],dayNames:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],dayNamesShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],buttonText:{prev:" ◄ ",next:" ► ",prevYear:" << ",nextYear:" >> ",today:"Aujourd\'hui",month:"mois",week:"semaine",day:"jour"},theme:false,buttonIcons:{prev:"circle-triangle-w",next:"circle-triangle-e"}},jb={header:{left:"next,prev today",center:"",right:"title"}, buttonText:{prev:" ► ",next:" ◄ ",prevYear:" >> ",nextYear:" << "},buttonIcons:{prev:"circle-triangle-e",next:"circle-triangle-w"}},bb=sa.setDefaults=function(a){l.extend(true,Ca,a)};l.fn.fullCalendar=function(a){if(typeof a=="string"){var b=Array.prototype.slice.call(arguments,1),d;this.each(function(){var m=l.data(this,"fullCalendar");if(m){m=m[a].apply(this,b);if(d==I)d=m}});if(d!=I)return d;return this}var c=a.eventSources||[];delete a.eventSources; if(a.events){c.push(a.events);delete a.events}c.unshift([]);a=l.extend(true,{},Ca,a.isRTL||a.isRTL==I&&Ca.isRTL?jb:{},a);var f=a.theme?"ui":"fc";this.each(function(){function m(g){if(g!=D){S++;var v=i,L;if(v){if(v.eventsChanged){X();v.eventDirty=v.eventsChanged=false}v.beforeHide&&v.beforeHide();Na(aa,aa.height());v.element.hide()}else Na(aa,1);aa.css("overflow","hidden");if(p[g])(i=p[g]).element.show();else i=p[g]=l.fullCalendar.views[g](L=N=l("<div class='fc-view fc-view-"+g+"' style='position:absolute'/>").appendTo(aa), a);if(U){U.find("div.fc-button-"+D).removeClass(f+"-state-active");U.find("div.fc-button-"+g).addClass(f+"-state-active")}i.name=D=g;j();aa.css("overflow","");v&&Na(aa,1);!L&&i.afterShow&&i.afterShow();S--}}function j(g){if(x()){S++;R==I&&ma();if(!i.start||g||C<i.start||C>=i.end){i.render(C,g||0);ja(true);!W||!a.lazyFetching||i.visStart<W||i.visEnd>Q?t():i.renderEvents(F)}else if(i.sizeDirty||i.eventsDirty||!a.lazyFetching){i.clearEvents();i.sizeDirty&&ja();a.lazyFetching?i.renderEvents(F):t()}oa= K.outerWidth();i.sizeDirty=false;i.eventsDirty=false;if(U){U.find("h2.fc-header-title").html(i.title);g=new Date;g>=i.start&&g<i.end?U.find("div.fc-button-today").addClass(f+"-state-disabled"):U.find("div.fc-button-today").removeClass(f+"-state-disabled")}S--;i.trigger("viewDisplay",G)}}function x(){return G.offsetWidth!==0}function w(){return l("body")[0].offsetWidth!==0}function o(){X();if(x()){i.clearEvents();i.renderEvents(F);i.eventsDirty=false}}function X(){l.each(p,function(){this.eventsDirty= true})}function A(){V();if(x()){ma();ja();i.rerenderEvents();i.sizeDirty=false}}function V(){l.each(p,function(){this.sizeDirty=true})}function J(g){F=[];W=q(i.visStart);Q=q(i.visEnd);for(var v=c.length,L=function(){--v==0&&g&&g(F)},H=0;H<c.length;H++)ka(c[H],L)}function ka(g,v){var L=i.name,H=q(C),la=function(e){if(L==i.name&&+H==+C&&l.inArray(g,c)!=-1){for(var h=0;h<e.length;h++){ua(e[h],a);e[h].source=g}F=F.concat(e);v&&v(e)}},ca=function(e){la(e);$()};if(typeof g=="string"){var r={};r[a.startParam]= Math.round(W.getTime()/1E3);r[a.endParam]=Math.round(Q.getTime()/1E3);if(a.cacheParam)r[a.cacheParam]=(new Date).getTime();T();l.ajax({url:g,dataType:"json",data:r,cache:a.cacheParam||false,success:ca})}else if(l.isFunction(g)){T();g(q(W),q(Q),ca)}else la(g)}function t(){J(function(g){i.renderEvents(g)})}function T(){M++||i.trigger("loading",G,true)}function $(){--M||i.trigger("loading",G,false)}
637function ia(g){if(g){var v=l("<tr/>");l.each(g.split(" "),function(L){L>0&&v.append("<td><span class='fc-header-space'/></td>"); var H;l.each(this.split(","),function(la,ca){if(ca=="title"){v.append("<tr><td><h2 class='fc-header-title'> </h2></td></tr>");H&&H.addClass(f+"-corner-right");H=null}else{var r;if(E[ca])r=E[ca];else if(ya[ca])r=function(){e.removeClass(f+"-state-hover");m(ca)};if(r){H&&H.addClass(f+"-no-right");var e;la=a.theme?Oa(a.buttonIcons,ca):null;var h=Oa(a.buttonText,ca);if(la)e=l("<div class='fc-button-"+ca+" ui-state-default'><a><span class='ui-icon ui-icon-"+la+"'/></a></div>");else if(h)e=l("<div class='fc-button-"+ ca+" "+f+"-state-default'><a><span>"+h+"</span></a></div>");if(e){e.click(function(){e.hasClass(f+"-state-disabled")||r()}).mousedown(function(){e.not("."+f+"-state-active").not("."+f+"-state-disabled").addClass(f+"-state-down")}).mouseup(function(){e.removeClass(f+"-state-down")}).hover(function(){e.not("."+f+"-state-active").not("."+f+"-state-disabled").addClass(f+"-state-hover")},function(){e.removeClass(f+"-state-hover").removeClass(f+"-state-down")}).appendTo(l("<td/>").appendTo(v));H?H.addClass(f+ "-no-right"):e.addClass(f+"-corner-left");H=e}}}});H&&H.addClass(f+"-corner-right")});return l("<table/>").append(v)}}function ma(){R=a.contentHeight?a.contentHeight:a.height?a.height-(U?U.height():0)-Ja(aa[0]):Math.round(aa.width()/Math.max(a.aspectRatio,0.5))}function ja(g){S++;i.setHeight(R,g);if(N){N.css("position","relative");N=null}i.setWidth(aa.width(),g);S--}function Z(){if(!S)if(i.start){var g=++fa;setTimeout(function(){if(g==fa&&!S&&x())if(oa!=(oa=K.outerWidth())){S++;A();i.trigger("windowResize", G);S--}},200)}else ga()}function ga(){setTimeout(function(){!i.start&&w()&&j()},0)}var G=this,K=l(G).addClass("fc"),oa,aa=l("<div class='fc-content "+f+"-widget-content' style='position:relative'/>").prependTo(G),R,fa=0,S=0,C=new Date,D,i,p={},N;a.isRTL&&K.addClass("fc-rtl");a.theme&&K.addClass("ui-widget");if(a.year!=I&&a.year!=C.getFullYear()){C.setDate(1);C.setMonth(0);C.setFullYear(a.year)}if(a.month!=I&&a.month!=C.getMonth()){C.setDate(1);C.setMonth(a.month)}a.date!=I&&C.setDate(a.date);var F= [],W,Q,M=0,E={render:function(){ma();V();X();j()},changeView:m,getView:function(){return i},getDate:function(){return C},option:function(g,v){if(v==I)return a[g];if(g=="height"||g=="contentHeight"||g=="aspectRatio"){a[g]=v;A()}},destroy:function(){l(window).unbind("resize",Z);U&&U.remove();aa.remove();l.removeData(G,"fullCalendar")},prev:function(){j(-1)},next:function(){j(1)},prevYear:function(){Ka(C,-1);j()},nextYear:function(){Ka(C,1);j()},today:function(){C=new Date;j()},gotoDate:function(g,v, L){if(typeof g=="object")C=q(g);else{g!=I&&C.setFullYear(g);v!=I&&C.setMonth(v);L!=I&&C.setDate(L)}j()},incrementDate:function(g,v,L){g!=I&&Ka(C,g);v!=I&&La(C,v);L!=I&&z(C,L);j()},updateEvent:function(g){var v,L=F.length,H,la=g.start-g._start,ca=g.end?g.end-(g._end||i.defaultEventEnd(g)):0;for(v=0;v<L;v++){H=F[v];if(H._id==g._id&&H!=g){H.start=new Date(+H.start+la);H.end=g.end?H.end?new Date(+H.end+ca):new Date(+i.defaultEventEnd(H)+ca):null;H.title=g.title;H.url=g.url;H.allDay=g.allDay;H.className= g.className;H.editable=g.editable;ua(H,a)}}ua(g,a);o()},renderEvent:function(g,v){ua(g,a);if(!g.source){if(v)(g.source=c[0]).push(g);F.push(g)}o()},removeEvents:function(g){if(g){if(!l.isFunction(g)){var v=g+"";g=function(H){return H._id==v}}F=l.grep(F,g,true);for(L=0;L<c.length;L++)if(typeof c[L]=="object")c[L]=l.grep(c[L],g,true)}else{F=[];for(var L=0;L<c.length;L++)if(typeof c[L]=="object")c[L]=[]}o()},clientEvents:function(g){if(l.isFunction(g))return l.grep(F,g);else if(g){g+="";return l.grep(F, function(v){return v._id==g})}return F},rerenderEvents:o,addEventSource:function(g){c.push(g);ka(g,o)},removeEventSource:function(g){c=l.grep(c,function(v){return v!=g});F=l.grep(F,function(v){return v.source!=g});o()},refetchEvents:function(){J(o)}};l.data(this,"fullCalendar",E);var U,ba=a.header;if(ba)U=l("<table class='fc-header'/>").append(l("<tr/>").append(l("<td colspan='3' class='fc-header-center'/>").append(ia(ba.center)))).append(l("<tr/>").append(l("<td class='fc-header-left'/>").append(ia(ba.left))).append(l("<td/>").append(" ")).append(l("<td class='fc-header-right'/>").append(ia(ba.right)))).prependTo(K); l(window).resize(Z);
637m(a.defaultView);w()||ga()});return this};var cb=0;bb({weekMode:"fixed"});ya.month=function(a,b){return new Da(a,b,{render:function(d,c){if(c){La(d,c);d.setDate(1)}d=this.start=q(d,true);d.setDate(1);this.end=La(q(d),1);var f=this.visStart=q(d);c=this.visEnd=q(this.end);var m=b.weekends?0:1;if(m){ea(f);ea(c,-1,true)}z(f,-((f.getDay()-Math.max(b.firstDay,m)+7)%7));z(c,(7-c.getDay()+Math.max(b.firstDay,m))%7);f=Math.round((c-f)/(kb*7));if(b.weekMode=="fixed"){z(c,(6-f)*7);f=6}this.title= na(d,this.option("titleFormat"),b);this.renderGrid(f,b.weekends?7:5,this.option("columnFormat"),true)}})};ya.basicWeek=function(a,b){return new Da(a,b,{render:function(d,c){c&&z(d,c*7);d=this.visStart=q(this.start=z(q(d),-((d.getDay()-b.firstDay+7)%7)));c=this.visEnd=q(this.end=z(q(d),7));if(!b.weekends){ea(d);ea(c,-1,true)}this.title=ta(d,z(q(c),-1),this.option("titleFormat"),b);this.renderGrid(1,b.weekends?7:5,this.option("columnFormat"),false)}})};ya.basicDay=function(a,b){return new Da(a,b,{render:function(d, c){if(c){z(d,c);b.weekends||ea(d,c<0?-1:1)}this.title=na(d,this.option("titleFormat"),b);this.start=this.visStart=q(d,true);this.end=this.visEnd=z(q(this.start),1);this.renderGrid(1,1,this.option("columnFormat"),false)}})};var Ea;bb({allDaySlot:true,allDayText:"all-day",firstHour:6,slotMinutes:30,defaultEventMinutes:120,axisFormat:"h(:mm)tt",timeFormat:{agenda:"h:mm{ - h:mm}"},dragOpacity:{agenda:0.5},minTime:0,maxTime:24});ya.agendaWeek=function(a,b){return new Wa(a,b,{render:function(d,c){c&&z(d, c*7);d=this.visStart=q(this.start=z(q(d),-((d.getDay()-b.firstDay+7)%7)));c=this.visEnd=q(this.end=z(q(d),7));if(!b.weekends){ea(d);ea(c,-1,true)}this.title=ta(d,z(q(c),-1),this.option("titleFormat"),b);this.renderAgenda(b.weekends?7:5,this.option("columnFormat"))}})};ya.agendaDay=function(a,b){return new Wa(a,b,{render:function(d,c){if(c){z(d,c);b.weekends||ea(d,c<0?-1:1)}this.title=na(d,this.option("titleFormat"),b);this.start=this.visStart=q(d,true);this.end=this.visEnd=z(q(this.start),1);this.renderAgenda(1, this.option("columnFormat"))}})};var Sa={init:function(a,b){this.element=a;this.options=b;this.eventsByID={};this.eventElements=[];this.eventElementsByID={}},trigger:function(a,b){if(this.options[a])return this.options[a].apply(b||this,Array.prototype.slice.call(arguments,2).concat([this]))},eventEnd:function(a){return a.end?q(a.end):this.defaultEventEnd(a)},reportEvents:function(a){var b,d=a.length,c,f=this.eventsByID={};for(b=0;b<d;b++){c=a[b];if(f[c._id])f[c._id].push(c);else f[c._id]=[c]}},reportEventElement:function(a, b){this.eventElements.push(b);var d=this.eventElementsByID;if(d[a._id])d[a._id].push(b);else d[a._id]=[b]},_clearEvents:function(){this.eventElements=[];this.eventElementsByID={}},showEvents:function(a,b){this._eee(a,b,"show")},hideEvents:function(a,b){this._eee(a,b,"hide")},_eee:function(a,b,d){a=this.eventElementsByID[a._id];var c,f=a.length;for(c=0;c<f;c++)a[c][0]!=b[0]&&a[c][d]()},eventDrop:function(a,b,d,c,f,m,j){var x=this,w=b.allDay,o=b._id;x.moveEvents(x.eventsByID[o],d,c,f);x.trigger("eventDrop", a,b,d,c,f,function(){x.moveEvents(x.eventsByID[o],-d,-c,w);x.rerenderEvents()},m,j);x.eventsChanged=true;x.rerenderEvents(o)},eventResize:function(a,b,d,c,f,m){var j=this,x=b._id;j.elongateEvents(j.eventsByID[x],d,c);j.trigger("eventResize",a,b,d,c,function(){j.elongateEvents(j.eventsByID[x],-d,-c);j.rerenderEvents()},f,m);j.eventsChanged=true;j.rerenderEvents(x)},moveEvents:function(a,b,d,c){d=d||0;for(var f,m=a.length,j=0;j<m;j++){f=a[j];if(c!=I)f.allDay=c;ha(z(f.start,b,true),d);if(f.end)f.end= ha(z(f.end,b,true),d);ua(f,this.options)}},elongateEvents:function(a,b,d){d=d||0;for(var c,f=a.length,m=0;m<f;m++){c=a[m];c.end=ha(z(this.eventEnd(c),b,true),d);ua(c,this.options)}},showOverlay:function(a){if(!this.dayOverlay)this.dayOverlay=l("<div class='fc-cell-overlay' style='position:absolute;z-index:3;display:none'/>").appendTo(this.element);var b=this.element.offset();this.dayOverlay.css({top:a.top-b.top,left:a.left-b.left,width:a.width,height:a.height}).show()},hideOverlay:function(){this.dayOverlay&& this.dayOverlay.hide()},resizableDayEvent:function(a,b,d){var c=this;if(!c.options.disableResizing&&b.resizable)b.resizable({handles:c.options.isRTL?{w:"div.ui-resizable-w"}:{e:"div.ui-resizable-e"},grid:d,minWidth:d/2,containment:c.element.parent().parent(),start:function(f,m){b.css("z-index",9);c.hideEvents(a,b);c.trigger("eventResizeStart",this,a,f,m)},stop:function(f,m){c.trigger("eventResizeStop",this,a,f,m);var j=Math.round((b.width()-m.originalSize.width)/d);if(j)c.eventResize(this,a,j,0,f, m);else{b.css("z-index",8);c.showEvents(a,b)}}})},eventElementHandlers:function(a,b){var d=this;b.click(function(c){if(!b.hasClass("ui-draggable-dragging")&&!b.hasClass("ui-resizable-resizing"))return d.trigger("eventClick",this,a,c)}).hover(function(c){d.trigger("eventMouseover",this,a,c)},function(c){d.trigger("eventMouseout",this,a,c)})},option:function(a,b){a=this.options[a];if(typeof a=="object")return Oa(a,b||this.name);return a},sliceSegs:function(a,b,d,c){var f=[],m,j=a.length,x,w,o,X,A;for(m= 0;m<j;m++){x=a[m];w=x.start;o=b[m];if(o>d&&w<c){if(w<d){w=q(d);X=false}else{w=w;X=true}if(o>c){o=q(c);A=false}else{o=o;A=true}f.push({event:x,start:w,end:o,isStart:X,isEnd:A,msLength:o-w})}}return f.sort(fb)}},kb=864E5,gb=36E5,eb=6E4;sa.addDays=z;
637var Pa=sa.parseDate=function(a){if(typeof a=="object")return a;if(typeof a=="number")return new Date(a*1E3);if(typeof a=="string"){if(a.match(/^\d+$/))return new Date(parseInt(a)*1E3);return lb(a,true)||(a?new Date(a):null)}return null},lb=sa.parseISO8601= function(a,b){a=a.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?$/);if(!a)return null;var d=new Date(a[1],0,1),c=new Date(a[1],0,1,9,0),f=0;if(a[3]){d.setMonth(a[3]-1);c.setMonth(a[3]-1)}if(a[5]){d.setDate(a[5]);c.setDate(a[5])}Ma(d,c);a[7]&&d.setHours(a[7]);a[8]&&d.setMinutes(a[8]);a[10]&&d.setSeconds(a[10]);a[12]&&d.setMilliseconds(Number("0."+a[12])*1E3);Ma(d,c);if(!b){if(a[14]){f=Number(a[16])*60+Number(a[17]); f*=a[15]=="-"?1:-1}f-=d.getTimezoneOffset()}return new Date(+d+f*60*1E3)},Xa=sa.parseTime=function(a){if(typeof a=="number")return a*60;if(typeof a=="object")return a.getHours()*60+a.getMinutes();if(a=a.match(/(\d+)(?::(\d+))?\s*(\w+)?/)){var b=parseInt(a[1]);if(a[3]){b%=12;if(a[3].toLowerCase().charAt(0)=="p")b+=12}return b*60+(a[2]?parseInt(a[2]):0)}},na=sa.formatDate=function(a,b,d){return ta(a,null,b,d)},ta=sa.formatDates=function(a,b,d,c){c=c||Ca;var f=a,m=b,j,x=d.length,w,o,X,A="";for(j=0;j< x;j++){w=d.charAt(j);if(w=="'")for(o=j+1;o<x;o++){if(d.charAt(o)=="'"){if(f){A+=o==j+1?"'":d.substring(j+1,o);j=o}break}}else if(w=="(")for(o=j+1;o<x;o++){if(d.charAt(o)==")"){j=na(f,d.substring(j+1,o),c);if(parseInt(j.replace(/\D/,"")))A+=j;j=o;break}}else if(w=="[")for(o=j+1;o<x;o++){if(d.charAt(o)=="]"){w=d.substring(j+1,o);j=na(f,w,c);if(j!=na(m,w,c))A+=j;j=o;break}}else if(w=="{"){f=b;m=a}else if(w=="}"){f=a;m=b}else{for(o=x;o>j;o--)if(X=mb[d.substring(j,o)]){if(f)A+=X(f,c);j=o-1;break}if(o== j)if(f)A+=w}}return A},mb={s:function(a){return a.getSeconds()},ss:function(a){return xa(a.getSeconds())},m:function(a){return a.getMinutes()},mm:function(a){return xa(a.getMinutes())},h:function(a){return a.getHours()%12||12},hh:function(a){return xa(a.getHours()%12||12)},H:function(a){return a.getHours()},HH:function(a){return xa(a.getHours())},d:function(a){return a.getDate()},dd:function(a){return xa(a.getDate())},ddd:function(a,b){return b.dayNamesShort[a.getDay()]},dddd:function(a,b){return b.dayNames[a.getDay()]}, M:function(a){return a.getMonth()+1},MM:function(a){return xa(a.getMonth()+1)},MMM:function(a,b){return b.monthNamesShort[a.getMonth()]},MMMM:function(a,b){return b.monthNames[a.getMonth()]},yy:function(a){return(a.getFullYear()+"").substring(2)},yyyy:function(a){return a.getFullYear()},t:function(a){return a.getHours()<12?"a":"p"},tt:function(a){return a.getHours()<12?"am":"pm"},T:function(a){return a.getHours()<12?"A":"P"},TT:function(a){return a.getHours()<12?"AM":"PM"},u:function(a){return na(a, "yyyy-MM-dd'T'HH:mm:ss'Z'")},S:function(a){a=a.getDate();if(a>10&&a<20)return"th";return["st","nd","rd"][a%10-1]||"th"}},Ba,I,pa=["dim","lun","mar","mer","jeu","ven","sam"]})(jQuery); 638function view_event(id, from, to, eclass, site){ 639$.getJSON(site+"/layout/set/json/locationsalle/event?nodeid="+id,'', 640function(data){ 641$('#span-when').text(from + ' - ' + to); 642$('#span-title').text(data.title); 643$('#span-lienevt').attr({ href: data.lienevt }); 644var category = data.category; 645var liensalle = data.liensalle; 646$('#span-category').html('<span class="'+eclass+'">'+category+'</span>'); 647$('span.'+eclass).css('padding','2px'); 648$('span.'+eclass).css('color','white'); 649$('span#span-text').html(data.text); 650$('#span-location').attr({ href: liensalle }); 651if(data.recurring_event!='0'){ 652$('#span-recurring').show(); 653} 654else{ 655$('#span-recurring').hide(); 656} 657if($("#event:first").is(":hidden")) { 658$("#event").fadeIn("slow"); 659} else { 660$("#event").hide(); 661} 662}); 663} 664function view_event_cdad(id, from, to, eclass, site){ 665$.getJSON(site+"/layout/set/json/calendriercdad/event?nodeid="+id,'', 666function(data){ 667$('#span-when').text(from + ' - ' + to); 668$('#span-title').text(data.title); 669$('#span-lienevt').attr({ href: data.lienevt }); 670var category = data.category; 671$('#span-category').html('<span class="'+eclass+'">'+category+'</span>'); 672$('span.'+eclass).css('padding','2px'); 673$('span.'+eclass).css('color','white'); 674$('span#span-text').html(data.text); 675if(data.recurring_event!='0'){ 676$('#span-recurring').show(); 677} 678else{ 679$('#span-recurring').hide(); 680} 681if($("#event:first").is(":hidden")) { 682$("#event").fadeIn("slow"); 683} else { 684$("#event").hide(); 685} 686}); 687} 688function close_event(){ 689$('#event').fadeOut("slow"); 690} 691$(function(){ 692$('div.lien-legende').click( function() { 693$("div.fc-event").removeClass("actif"); 694$("div.fc-event").hide(); 695if(this.id == 0) 696{ 697$("div.fc div.default").addClass("actif"); 698} 699else 700{ 701$('div.fc div.ev_cat_'+this.id+'').addClass("actif"); 702} 703$("div.actif").show(); 704}); 705$("div.tout").click( function() { 706$("div.fc-event").removeClass("actif"); 707$("div.fc-event").show(); 708}); 709}); 710!function(h){h.extend({tablesorter:new function(){function d(){var b=arguments[0],a=1<arguments.length?Array.prototype.slice.call(arguments):b;if("undefined"!==typeof console&&"undefined"!==typeof console.log)console[/error/i.test(b)?"error":/warn/i.test(b)?"warn":"log"](a);else alert(a)}function q(b,a){d(b+" ("+((new Date).getTime()-a.getTime())+"ms)")}function p(b){for(var a in b)return!1;return!0}function r(b,a,c){if(!a)return"";var f,e=b.config,l=e.textExtraction||"",d="",d="basic"===l?h(a).attr(e.textAttribute)|| a.textContent||a.innerText||h(a).text()||"":"function"===typeof l?l(a,b,c):"function"===typeof(f=g.getColumnData(b,l,c))?f(a,b,c):a.textContent||a.innerText||h(a).text()||"";return h.trim(d)}function v(b){var a,c,f=b.config,e=f.$tbodies=f.$table.children("tbody:not(."+f.cssInfoBlock+")"),l,x,k,h,m,B,u,s,t,p=0,v="",w=e.length;if(0===w)return f.debug?d("Warning: *Empty table!* Not building a parser cache"):"";f.debug&&(t=new Date,d("Detecting parsers for each column"));a=[];for(c=[];p<w;){l=e[p].rows; if(l[p])for(x=f.columns,k=0;k<x;k++){h=f.$headers.filter('[data-column="'+k+'"]:last');m=g.getColumnData(b,f.headers,k);s=g.getParserById(g.getData(h,m,"extractor"));u=g.getParserById(g.getData(h,m,"sorter"));B="false"===g.getData(h,m,"parser");f.empties[k]=(g.getData(h,m,"empty")||f.emptyTo||(f.emptyToBottom?"bottom":"top")).toLowerCase();f.strings[k]=(g.getData(h,m,"string")||f.stringTo||"max").toLowerCase();B&&(u=g.getParserById("no-parser"));s||(s=!1);if(!u)a:{h=b;m=l;B=-1;u=k;for(var A=void 0, K=g.parsers.length,G=!1,z="",A=!0;""===z&&A;)B++,m[B]?(G=m[B].cells[u],z=r(h,G,u),h.config.debug&&d("Checking if value was empty on row "+B+", column: "+u+': "'+z+'"')):A=!1;for(;0<=--K;)if((A=g.parsers[K])&&"text"!==A.id&&A.is&&A.is(z,h,G)){u=A;break a}u=g.getParserById("text")}f.debug&&(v+="column:"+k+"; extractor:"+s.id+"; parser:"+u.id+";
710 string:"+f.strings[k]+"; empty: "+f.empties[k]+"\n");c[k]=u;a[k]=s}p+=c.length?w:1}f.debug&&(d(v?v:"No parsers detected"),q("Completed detecting parsers",t)); f.parsers=c;f.extractors=a}function w(b){var a,c,f,e,l,x,k,n,m,p,u,s=b.config,t=s.$table.children("tbody"),v=s.extractors,w=s.parsers;s.cache={};s.totalRows=0;if(!w)return s.debug?d("Warning: *Empty table!* Not building a cache"):"";s.debug&&(n=new Date);s.showProcessing&&g.isProcessing(b,!0);for(l=0;l<t.length;l++)if(u=[],a=s.cache[l]={normalized:[]},!t.eq(l).hasClass(s.cssInfoBlock)){m=t[l]&&t[l].rows.length||0;for(f=0;f<m;++f)if(p={child:[]},x=h(t[l].rows[f]),k=[],x.hasClass(s.cssChildRow)&&0!== f)c=a.normalized.length-1,a.normalized[c][s.columns].$row=a.normalized[c][s.columns].$row.add(x),x.prev().hasClass(s.cssChildRow)||x.prev().addClass(g.css.cssHasChild),p.child[c]=h.trim(x[0].textContent||x[0].innerText||x.text()||"");else{p.$row=x;p.order=f;for(e=0;e<s.columns;++e)"undefined"===typeof w[e]?s.debug&&d("No parser found for cell:",x[0].cells[e],"does it have a header?"):(c=r(b,x[0].cells[e],e),c="undefined"===typeof v[e].id?c:v[e].format(c,b,x[0].cells[e],e),c="no-parser"===w[e].id? "":w[e].format(c,b,x[0].cells[e],e),k.push(s.ignoreCase&&"string"===typeof c?c.toLowerCase():c),"numeric"===(w[e].type||"").toLowerCase()&&(u[e]=Math.max(Math.abs(c)||0,u[e]||0)));k[s.columns]=p;a.normalized.push(k)}a.colMax=u;s.totalRows+=a.normalized.length}s.showProcessing&&g.isProcessing(b);s.debug&&q("Building cache for "+m+" rows",n)}function z(b,a){var c=b.config,f=c.widgetOptions,e=b.tBodies,l=[],d=c.cache,k,n,m,r,u,s;if(p(d))return c.appender?c.appender(b,l):b.isUpdating?c.$table.trigger("updateComplete", b):"";c.debug&&(s=new Date);for(u=0;u<e.length;u++)if(k=h(e[u]),k.length&&!k.hasClass(c.cssInfoBlock)){m=g.processTbody(b,k,!0);k=d[u].normalized;n=k.length;for(r=0;r<n;r++)l.push(k[r][c.columns].$row),c.appender&&(!c.pager||c.pager.removeRows&&f.pager_removeRows||c.pager.ajax)||m.append(k[r][c.columns].$row);g.processTbody(b,m,!1)}c.appender&&c.appender(b,l);c.debug&&q("Rebuilt table",s);a||c.appender||g.applyWidget(b);b.isUpdating&&c.$table.trigger("updateComplete",b)}function D(b){return/^d/i.test(b)|| 1===b}function E(b){var a,c,f,e,l,x,k,n=b.config;n.headerList=[];n.headerContent=[];n.debug&&(k=new Date);n.columns=g.computeColumnIndex(n.$table.children("thead, tfoot").children("tr"));e=n.cssIcon?'<i class="'+(n.cssIcon===g.css.icon?g.css.icon:n.cssIcon+" "+g.css.icon)+'"></i>':"";n.$headers=h(b).find(n.selectorHeaders).each(function(k){c=h(this);a=g.getColumnData(b,n.headers,k,!0);n.headerContent[k]=h(this).html();""!==n.headerTemplate&&(l=n.headerTemplate.replace(/\{content\}/g,h(this).html()).replace(/\{icon\}/g, e),n.onRenderTemplate&&(f=n.onRenderTemplate.apply(c,[k,l]))&&"string"===typeof f&&(l=f),h(this).html('<div class="'+g.css.headerIn+'">'+l+"</div>"));n.onRenderHeader&&n.onRenderHeader.apply(c,[k]);this.column=parseInt(h(this).attr("data-column"),10);this.order=D(g.getData(c,a,"sortInitialOrder")||n.sortInitialOrder)?[1,0,2]:[0,1,2];this.count=-1;this.lockedOrder=!1;x=g.getData(c,a,"lockedOrder")||!1;"undefined"!==typeof x&&!1!==x&&(this.order=this.lockedOrder=D(x)?[1,1,1]:[0,0,0]);c.addClass(g.css.header+ " "+n.cssHeader);n.headerList[k]=this;c.parent().addClass(g.css.headerRow+" "+n.cssHeaderRow).attr("role","row");n.tabIndex&&c.attr("tabindex",0)}).attr({scope:"col",role:"columnheader"});H(b);n.debug&&(q("Built headers:",k),d(n.$headers))}function C(b,a,c){var f=b.config;f.$table.find(f.selectorRemove).remove();v(b);w(b);I(f.$table,a,c)}function H(b){var a,c,f,e=b.config;e.$headers.each(function(l,d){c=h(d);f=g.getColumnData(b,e.headers,l,!0);a="false"===g.getData(d,f,"sorter")||"false"===g.getData(d, f,"parser");d.sortDisabled=a;c[a?"addClass":"removeClass"]("sorter-false").attr("aria-disabled",""+a);b.id&&(a?c.removeAttr("aria-controls"):c.attr("aria-controls",b.id))})}function F(b){var a,c,f=b.config,e=f.sortList,l=e.length,d=g.css.sortNone+" "+f.cssNone,k=[g.css.sortAsc+" "+f.cssAsc,g.css.sortDesc+" "+f.cssDesc],n=["ascending","descending"],m=h(b).find("tfoot tr").children().add(f.$extraHeaders).removeClass(k.join(" "));f.$headers.removeClass(k.join(" ")).addClass(d).attr("aria-sort","none"); for(a=0;a<l;a++)if(2!==e[a][1]&&(b=f.$headers.not(".sorter-false").filter('[data-column="'+e[a][0]+'"]'+(1===l?":last":"")),b.length)){for(c=0;c<b.length;c++)b[c].sortDisabled||b.eq(c).removeClass(d).addClass(k[e[a][1]]).attr("aria-sort",n[e[a][1]]);m.length&&m.filter('[data-column="'+e[a][0]+'"]').removeClass(d).addClass(k[e[a][1]])}f.$headers.not(".sorter-false").each(function(){var b=h(this),a=this.order[(this.count+1)%(f.sortReset?3:2)],a=b.text()+": "+g.language[b.hasClass(g.css.sortAsc)?"sortAsc": b.hasClass(g.css.sortDe
710sc)?"sortDesc":"sortNone"]+g.language[0===a?"nextAsc":1===a?"nextDesc":"nextNone"];b.attr("aria-label",a)})}function O(b){var a,c,f=b.config;f.widthFixed&&0===f.$table.find("colgroup").length&&(a=h("<colgroup>"),c=h(b).width(),h(b.tBodies).not("."+f.cssInfoBlock).find("tr:first").children(":visible").each(function(){a.append(h("<col>").css("width",parseInt(h(this).width()/c*1E3,10)/10+"%"))}),f.$table.prepend(a))}function P(b,a){var c,f,e,l,g,k=b.config,d=a||k.sortList;k.sortList= [];h.each(d,function(b,a){l=parseInt(a[0],10);if(e=k.$headers.filter('[data-column="'+l+'"]:last')[0]){f=(f=(""+a[1]).match(/^(1|d|s|o|n)/))?f[0]:"";switch(f){case "1":case "d":f=1;break;case "s":f=g||0;break;case "o":c=e.order[(g||0)%(k.sortReset?3:2)];f=0===c?1:1===c?0:2;break;case "n":e.count+=1;f=e.order[e.count%(k.sortReset?3:2)];break;default:f=0}g=0===b?f:g;c=[l,parseInt(f,10)||0];k.sortList.push(c);f=h.inArray(c[1],e.order);e.count=0<=f?f:c[1]%(k.sortReset?3:2)}})}function Q(b,a){return b&& b[a]?b[a].type||"":""}function L(b,a,c){if(b.isUpdating)return setTimeout(function(){L(b,a,c)},50);var f,e,l,d,k=b.config,n=!c[k.sortMultiSortKey],m=k.$table;m.trigger("sortStart",b);a.count=c[k.sortResetKey]?2:(a.count+1)%(k.sortReset?3:2);k.sortRestart&&(e=a,k.$headers.each(function(){this===e||!n&&h(this).is("."+g.css.sortDesc+",."+g.css.sortAsc)||(this.count=-1)}));e=a.column;if(n){k.sortList=[];
710if(null!==k.sortForce)for(f=k.sortForce,l=0;l<f.length;l++)f[l][0]!==e&&k.sortList.push(f[l]);f=a.order[a.count]; if(2>f&&(k.sortList.push([e,f]),1<a.colSpan))for(l=1;l<a.colSpan;l++)k.sortList.push([e+l,f])}else{if(k.sortAppend&&1<k.sortList.length)for(l=0;l<k.sortAppend.length;l++)d=g.isValueInArray(k.sortAppend[l][0],k.sortList),0<=d&&k.sortList.splice(d,1);if(0<=g.isValueInArray(e,k.sortList))for(l=0;l<k.sortList.length;l++)d=k.sortList[l],f=k.$headers.filter('[data-column="'+d[0]+'"]:last')[0],d[0]===e&&(d[1]=f.order[a.count],2===d[1]&&(k.sortList.splice(l,1),f.count=-1));else if(f=a.order[a.count],2>f&& (k.sortList.push([e,f]),1<a.colSpan))for(l=1;l<a.colSpan;l++)k.sortList.push([e+l,f])}if(null!==k.sortAppend)for(f=k.sortAppend,l=0;l<f.length;l++)f[l][0]!==e&&k.sortList.push(f[l]);m.trigger("sortBegin",b);setTimeout(function(){F(b);J(b);z(b);m.trigger("sortEnd",b)},1)}function J(b){var a,c,f,e,l,d,k,h,m,r,u,s=0,t=b.config,v=t.textSorter||"",w=t.sortList,y=w.length,z=b.tBodies.length;if(!t.serverSideSorting&&!p(t.cache)){t.debug&&(l=new Date);for(c=0;c<z;c++)d=t.cache[c].colMax,k=t.cache[c].normalized, k.sort(function(c,l){for(a=0;a<y;a++){e=w[a][0];h=w[a][1];s=0===h;if(t.sortStable&&c[e]===l[e]&&1===y)break;(f=/n/i.test(Q(t.parsers,e)))&&t.strings[e]?(f="boolean"===typeof t.string[t.strings[e]]?(s?1:-1)*(t.string[t.strings[e]]?-1:1):t.strings[e]?t.string[t.strings[e]]||0:0,m=t.numberSorter?t.numberSorter(c[e],l[e],s,d[e],b):g["sortNumeric"+(s?"Asc":"Desc")](c[e],l[e],f,d[e],e,b)):(r=s?c:l,u=s?l:c,m="function"===typeof v?v(r[e],u[e],s,e,b):"object"===typeof v&&v.hasOwnProperty(e)?v[e](r[e],u[e], s,e,b):g["sortNatural"+(s?"Asc":"Desc")](c[e],l[e],e,b,t));if(m)return m}return c[t.columns].order-l[t.columns].order});t.debug&&q("Sorting on "+w.toString()+" and dir "+h+" time",l)}}function M(b,a){var c=b[0];c.isUpdating&&b.trigger("updateComplete",c);h.isFunction(a)&&a(b[0])}function I(b,a,c){var f=b[0].config.sortList;!1!==a&&!b[0].isProcessing&&f.length?b.trigger("sorton",[f,function(){M(b,c)},!0]):(M(b,c),g.applyWidget(b[0],!1))}function N(b){var a=b.config,c=a.$table;c.unbind("sortReset update updateRows updateCell updateAll addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave ".split(" ").join(a.namespace+ " ")).bind("sortReset"+a.namespace,function(f,e){f.stopPropagation();a.sortList=[];F(b);J(b);z(b);h.isFunction(e)&&e(b)}).bind("updateAll"+a.namespace,function(f,e,c){f.stopPropagation();b.isUpdating=!0;g.refreshWidgets(b,!0,!0);g.restoreHeaders(b);E(b);g.bindEvents(b,a.$headers,!0);N(b);C(b,e,c)}).bind("update"+a.namespace+" updateRows"+a.namespace,function(a,e,c){a.stopPropagation();b.isUpdating=!0;H(b);C(b,e,c)}).bind("updateCell"+a.namespace,function(f,e,l,g){f.stopPropagation();b.isUpdating= !0;c.find(a.selectorRemove).remove();var d,n,m;n=c.find("tbody");m=h(e);f=n.index(h.fn.closest?m.closest("tbody"):m.parents("tbody").filter(":first"));d=h.fn.closest?m.closest("tr"):m.parents("tr").filter(":first");e=m[0];n.length&&0<=f&&(n=n.eq(f).find("tr").index(d),m=m.index(),a.cache[f].normalized[n][a.columns].$row=d,d="undefined"===typeof a.extractors[m].id?r(b,e,m):a.extractors[m].format(r(b,e,m),b,e,m),e="no-parser"===a.parsers[m].id?"":a.parsers[m].format(d,b,e,m),a.cache[f].normalized[n][m]= a.ignoreCase&&"string"===typeof e?e.toLowerCase():e,"numeric"===(a.parsers[m].type||"").toLowerCase()&&(a.cache[f].colMax[m]=Math.max(Math.abs(e)||0,a.cache[f].colMax[m]||0)),I(c,l,g))}).bind("addRows"+a.namespace,function(f,e,l,g){f.stopPropagation();b.isUpdating=!0;if(p(a.cache))H(b),C(b,l,g);else{e=h(e).attr("role","row");var d,n,m,q,u,s=e.filter("tr").length,t=c.find("tbody").index(e.parents("tbody").filter(":first"));a.parsers&&a.parsers.length||v(b);for(f=0;f<s;f++){n=e[f].cells.length;u=[]; q={child:[],$row:e.eq(f),order:a.cache[t].normalized.length};for(d=0;d<n;d++)m="undefined"===typeof a.extractors[d].id?r(b,e[f].cells[d],d):a.extractors[d].format(r(b,e[f].cells[d],d),b,e[f].cells[d],d),m="no-parser"===a.parsers[d].id?"":a.parsers[d].format(m,b,e[f].cells[d],d),u[d]=a.ignoreCase&&"string"===typeof m?m.toLowerCase():m,"numeric"===(a.parsers[d].type||"").toLowerCase()&&(a.cache[t].colMax[d]=Math.max(Math.abs(u[d])||0,a.cache[t].colMax[d]||0));u.push(q);a.cache[t].normalized.push(u)}I(c, l,g)}}).bind("updateComplete"+a.namespace,function(){b.isUpdating=!1}).bind("sorton"+a.namespace,function(a,e,d,x){var k=b.config;a.stopPropagation();c.trigger("sortStart",this);P(b,e);F(b);k.delayInit&&p(k.cache)&&w(b);c.trigger("sortBegin",this);J(b);z(b,x);c.trigger("sortEnd",this);g.applyWidget(b);h.isFunction(d)&&d(b)}).bind("appendCache"+a.namespace,function(a,e,c){a.stopPropagation();z(b,c);h.isFunction(e)&&e(b)}).bind("updateCache"+a.namespace,function(c,e){a.parsers&&a.parsers.length||v(b); w(b);h.isFunction(e)&&e(b)}).bind("applyWidgetId"+a.namespace,function(c,e){c.stopPropagation();g.getWidgetById(e).format(b,a,a.widgetOptions)}).bind("applyWidgets"+a.namespace,function(a,c){a.stopPropagation();g.applyWidget(b,c)}).bind("refreshWidgets"+a.namespace,function(a,c,d){a.stopPropagation();g.refreshWidgets(b,c,d)}).bind("destroy"+a.namespace,function(a,c,d){a.stopPropagation();g.destroy(b,c,d)}).bind("resetToLoadState"+a.namespace,function(){g.refreshWidgets(b,!0,!0);a=h.extend(!0,g.defaults, a.originalSettings);b.hasInitialized=!1;g.setup(b,a)})}var g=this;g.version="2.17.8";g.parsers=[];g.widgets=[];g.defaults={theme:"default",widthFixed:!1,showProcessing:!1,headerTemplate:"{content}",onRenderTemplate:null,onRenderHeader:null,cancelSelection:!0,tabIndex:!0,dateFormat:"mmddyyyy",sortMultiSortKey:"shiftKey",sortResetKey:"ctrlKey",usNumberFormat:!0,delayInit:!1,serverSideSorting:!1,headers:{}
710,ignoreCase:!0,sortForce:null,sortList:[],sortAppend:null,sortStable:!1,sortInitialOrder:"asc", sortLocaleCompare:!1,sortReset:!1,sortRestart:!1,emptyTo:"bottom",stringTo:"max",textExtraction:"basic",textAttribute:"data-text",textSorter:null,numberSorter:null,widgets:[],widgetOptions:{zebra:["even","odd"]},initWidgets:!0,initialized:null,tableClass:"",cssAsc:"",cssDesc:"",cssNone:"",cssHeader:"",cssHeaderRow:"",cssProcessing:"",cssChildRow:"tablesorter-childRow",cssIcon:"tablesorter-icon",cssInfoBlock:"tablesorter-infoOnly",selectorHeaders:"> thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me", debug:!1,headerList:[],empties:{},strings:{},parsers:[]};g.css={table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",info:"tablesorter-infoOnly",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"};g.language={sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ", sortNone:"No sort applied, ",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"};g.log=d;g.benchmark=q;g.construct=function(b){return this.each(function(){var a=h.extend(!0,{},g.defaults,b);a.originalSettings=b;!this.hasInitialized&&g.buildTable&&"TABLE"!==this.tagName?g.buildTable(this,a):g.setup(this,a)})};g.setup=function(b,a){if(!b||!b.tHead||0===b.tBodies.length||!0===b.hasInitialized)return a.debug?d("ERROR: stopping initialization! No table, thead, tbody or tablesorter has already been initialized"): "";var c="",f=h(b),e=h.metadata;b.hasInitialized=!1;b.isProcessing=!0;b.config=a;h.data(b,"tablesorter",a);a.debug&&h.data(b,"startoveralltimer",new Date);a.supportsDataObject=function(a){a[0]=parseInt(a[0],10);return 1<a[0]||1===a[0]&&4<=parseInt(a[1],10)}(h.fn.jquery.split("."));a.string={max:1,min:-1,emptymin:1,emptymax:-1,zero:0,none:0,"null":0,top:!0,bottom:!1};a.emptyTo=a.emptyTo.toLowerCase();a.stringTo=a.stringTo.toLowerCase();/tablesorter\-/.test(f.attr("class"))||(c=""!==a.theme?" tablesorter-"+ a.theme:"");a.table=b;a.$table=f.addClass(g.css.table+" "+a.tableClass+c).attr("role","grid");a.$headers=f.find(a.selectorHeaders);a.namespace=a.namespace?"."+a.namespace.replace(/\W/g,""):".tablesorter"+Math.random().toString(16).slice(2);a.$table.children().children("tr").attr("role","row");a.$tbodies=f.children("tbody:not(."+a.cssInfoBlock+")").attr({"aria-live":"polite","aria-relevant":"all"});a.$table.find("caption").length&&a.$table.attr("aria-labelledby","theCaption");a.widgetInit={};a.textExtraction= a.$table.attr("data-text-extraction")||a.textExtraction||"basic";E(b);O(b);v(b);a.totalRows=0;a.delayInit||w(b);g.bindEvents(b,a.$headers,!0);N(b);a.supportsDataObject&&"undefined"!==typeof f.data().sortlist?a.sortList=f.data().sortlist:e&&f.metadata()&&f.metadata().sortlist&&(a.sortList=f.metadata().sortlist);g.applyWidget(b,!0);0<a.sortList.length?f.trigger("sorton",[a.sortList,{},!a.initWidgets,!0]):(F(b),a.initWidgets&&g.applyWidget(b,!1));a.showProcessing&&f.unbind("sortBegin"+a.namespace+" sortEnd"+ a.namespace).bind("sortBegin"+a.namespace+" sortEnd"+a.namespace,function(c){clearTimeout(a.processTimer);g.isProcessing(b);"sortBegin"===c.type&&(a.processTimer=setTimeout(function(){g.isProcessing(b,!0)},500))});b.hasInitialized=!0;b.isProcessing=!1;a.debug&&g.benchmark("Overall initialization time",h.data(b,"startoveralltimer"));f.trigger("tablesorter-initialized",b);"function"===typeof a.initialized&&a.initialized(b)};g.getColumnData=function(b,a,c,f){if("undefined"!==typeof a&&null!==a){b=h(b)[0]; var e,d=b.config;if(a[c])return f?a[c]:a[d.$headers.index(d.$headers.filter('[data-column="'+c+'"]:last'))];for(e in a)if("string"===typeof e&&(b=f?d.$headers.eq(c).filter(e):d.$headers.filter('[data-column="'+c+'"]:last').filter(e),b.length))return a[e]}};g.computeColumnIndex=function(b){var a=[],c=0,f,e,d,g,k,n,m,p,q,s;for(f=0;f<b.length;f++)for(k=b[f].cells,e=0;e<k.length;e++){d=k[e];g=h(d);n=d.parentNode.rowIndex;g.index();m=d.rowSpan||1;p=d.colSpan||1;"undefined"===typeof a[n]&&(a[n]=[]);for(d= 0;d<a[n].length+1;d++)if("undefined"===typeof a[n][d]){q=d;break}c=Math.max(q,c);g.attr({"data-column":q});for(d=n;d<n+m;d++)for("undefined"===typeof a[d]&&(a[d]=[]),s=a[d],g=q;g<q+p;g++)s[g]="x"}return c+1};g.isProcessing=function(b,a,c){b=h(b);var f=b[0].config,e=c||b.find("."+g.css.header);a?("undefined"!==typeof c&&0<f.sortList.length&&(e=e.filter(function(){return this.sortDisabled?!1:0<=g.isValueInArray(parseFloat(h(this).attr("data-column")),f.sortList)})),b.add(e).addClass(g.css.processing+ " "+f.cssProcessing)):b.add(e).removeClass(g.css.processing+" "+f.cssProcessing)};g.processTbody=function(b,a,c){b=h(b)[0];if(c)return b.isProcessing=!0,a.before('<span class="tablesorter-savemyplace"/>'),c=h.fn.detach?a.detach():a.remove();c=h(b).find("span.tablesorter-savemyplace");a.insertAfter(c);c.remove();b.isProcessing=!1};g.clearTableBody=function(b){h(b)[0].config.$tbodies.children().detach()};g.bindEvents=function(b,a,c){b=h(b)[0];var f,e=b.config;!0!==c&&(e.$extraHeaders=e.$extraHeaders? e.$extraHeaders.add(a):a);a.find(e.selectorSort).add(a.filter(e.selectorSort)).unbind(["mousedown","mouseup","sort","keyup",""].join(e.namespace+" ")).bind(["mousedown","mouseup","sort","keyup",""].join(e.namespace+" "),function(c,d){var g;
710g=c.type;if(!(1!==(c.which||c.button)&&!/sort|keyup/.test(g)||"keyup"===g&&13!==c.which||"mouseup"===g&&!0!==d&&250<(new Date).getTime()-f)){if("mousedown"===g)return f=(new Date).getTime(),/(input|select|button|textarea)/i.test(c.target.tagName)?"":!e.cancelSelection; e.delayInit&&p(e.cache)&&w(b);g=h.fn.closest?h(this).closest("th, td")[0]:/TH|TD/.test(this.tagName)?this:h(this).parents("th, td")[0];g=e.$headers[a.index(g)];g.sortDisabled||L(b,g,c)}});e.cancelSelection&&a.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})};g.restoreHeaders=function(b){var a=h(b)[0].config;a.$table.find(a.selectorHeaders).each(function(b){h(this).find("."+g.css.headerIn).length&&h(this).html(a.headerContent[b])})};g.destroy=function(b, a,c){b=h(b)[0];if(b.hasInitialized){g.refreshWidgets(b,!0,!0);var f=h(b),e=b.config,d=f.find("thead:first"),q=d.find("tr."+g.css.headerRow).removeClass(g.css.headerRow+" "+e.cssHeaderRow),k=f.find("tfoot:first > tr").children("th, td");!1===a&&0<=h.inArray("uitheme",e.widgets)&&(f.trigger("applyWidgetId",["uitheme"]),f.trigger("applyWidgetId",["zebra"]));d.find("tr").not(q).remove();f.removeData("tablesorter").unbind("sortReset update updateAll updateRows updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave keypress sortBegin sortEnd resetToLoadState ".split(" ").join(e.namespace+ " "));e.$headers.add(k).removeClass([g.css.header,e.cssHeader,e.cssAsc,e.cssDesc,g.css.sortAsc,g.css.sortDesc,g.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true");q.find(e.selectorSort).unbind(["mousedown","mouseup","keypress",""].join(e.namespace+" "));g.restoreHeaders(b);f.toggleClass(g.css.table+" "+e.tableClass+" tablesorter-"+e.theme,!1===a);b.hasInitialized=!1;delete b.config.cache;"function"===typeof c&&c(b)}};g.regex={chunk:/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi, chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i};g.sortNatural=function(b,a){if(b===a)return 0;var c,f,e,d,h,k;f=g.regex;if(f.hex.test(a)){c=parseInt(b.match(f.hex),16);e=parseInt(a.match(f.hex),16);if(c<e)return-1;if(c>e)return 1}c=b.replace(f.chunk,"\\0$1\\0").replace(f.chunks,"").split("\\0");f=a.replace(f.chunk,"\\0$1\\0").replace(f.chunks,"").split("\\0");k=Math.max(c.length,f.length);for(h=0;h<k;h++){e=isNaN(c[h])?c[h]||0:parseFloat(c[h])||0;d=isNaN(f[h])?f[h]||0:parseFloat(f[h])||0;if(isNaN(e)!== isNaN(d))return isNaN(e)?1:-1;typeof e!==typeof d&&(e+="",d+="");if(e<d)return-1;if(e>d)return 1}return 0};g.sortNaturalAsc=function(b,a,c,f,e){if(b===a)return 0;c=e.string[e.empties[c]||e.emptyTo];return""===b&&0!==c?"boolean"===typeof c?c?-1:1:-c||-1:""===a&&0!==c?"boolean"===typeof c?c?1:-1:c||1:g.sortNatural(b,a)};g.sortNaturalDesc=function(b,a,c,f,e){if(b===a)return 0;c=e.string[e.empties[c]||e.emptyTo];return""===b&&0!==c?"boolean"===typeof c?c?-1:1:c||1:""===a&&0!==c?"boolean"===typeof c?c? 1:-1:-c||-1:g.sortNatural(a,b)};g.sortText=function(b,a){return b>a?1:b<a?-1:0};g.getTextValue=function(b,a,c){if(c){var f=b?b.length:0,e=c+a;for(c=0;c<f;c++)e+=b.charCodeAt(c);return a*e}return 0};g.sortNumericAsc=function(b,a,c,f,e,d){if(b===a)return 0;d=d.config;e=d.string[d.empties[e]||d.emptyTo];if(""===b&&0!==e)return"boolean"===typeof e?e?-1:1:-e||-1;if(""===a&&0!==e)return"boolean"===typeof e?e?1:-1:e||1;isNaN(b)&&(b=g.getTextValue(b,c,f));isNaN(a)&&(a=g.getTextValue(a,c,f));return b-a};g.sortNumericDesc= function(b,a,c,f,e,d){if(b===a)return 0;d=d.config;e=d.string[d.empties[e]||d.emptyTo];if(""===b&&0!==e)return"boolean"===typeof e?e?-1:1:e||1;if(""===a&&0!==e)return"boolean"===typeof e?e?1:-1:-e||-1;isNaN(b)&&(b=g.getTextValue(b,c,f));isNaN(a)&&(a=g.getTextValue(a,c,f));return a-b};g.sortNumeric=function(b,a){return b-a};g.characterEquivalents={a:"\u00e1\u00e0\u00e2\u00e3\u00e4\u0105\u00e5",A:"\u00c1\u00c0\u00c2\u00c3\u00c4\u0104\u00c5",c:"\u00e7\u0107\u010d",C:"\u00c7\u0106\u010c",e:"\u00e9\u00e8\u00ea\u00eb\u011b\u0119", E:"\u00c9\u00c8\u00ca\u00cb\u011a\u0118",i:"\u00ed\u00ec\u0130\u00ee\u00ef\u0131",I:"\u00cd\u00cc\u0130\u00ce\u00cf",o:"\u00f3\u00f2\u00f4\u00f5\u00f6",O:"\u00d3\u00d2\u00d4\u00d5\u00d6",ss:"\u00df",
710SS:"\u1e9e",u:"\u00fa\u00f9\u00fb\u00fc\u016f",U:"\u00da\u00d9\u00db\u00dc\u016e"};g.replaceAccents=function(b){var a,c="[",d=g.characterEquivalents;if(!g.characterRegex){g.characterRegexArray={};for(a in d)"string"===typeof a&&(c+=d[a],g.characterRegexArray[a]=new RegExp("["+d[a]+"]","g"));g.characterRegex= new RegExp(c+"]")}if(g.characterRegex.test(b))for(a in d)"string"===typeof a&&(b=b.replace(g.characterRegexArray[a],a));return b};g.isValueInArray=function(b,a){var c,d=a.length;for(c=0;c<d;c++)if(a[c][0]===b)return c;return-1};g.addParser=function(b){var a,c=g.parsers.length,d=!0;for(a=0;a<c;a++)g.parsers[a].id.toLowerCase()===b.id.toLowerCase()&&(d=!1);d&&g.parsers.push(b)};g.getParserById=function(b){if("false"==b)return!1;var a,c=g.parsers.length;for(a=0;a<c;a++)if(g.parsers[a].id.toLowerCase()=== b.toString().toLowerCase())return g.parsers[a];return!1};g.addWidget=function(b){g.widgets.push(b)};g.hasWidget=function(b,a){b=h(b);return b.length&&b[0].config&&b[0].config.widgetInit[a]||!1};g.getWidgetById=function(b){var a,c,d=g.widgets.length;for(a=0;a<d;a++)if((c=g.widgets[a])&&c.hasOwnProperty("id")&&c.id.toLowerCase()===b.toLowerCase())return c};g.applyWidget=function(b,a){b=h(b)[0];var c=b.config,d=c.widgetOptions,e=[],l,p,k;!1!==a&&b.hasInitialized&&(b.isApplyingWidgets||b.isUpdating)|| (c.debug&&(l=new Date),c.widgets.length&&(b.isApplyingWidgets=!0,c.widgets=h.grep(c.widgets,function(a,b){return h.inArray(a,c.widgets)===b}),h.each(c.widgets||[],function(a,b){(k=g.getWidgetById(b))&&k.id&&(k.priority||(k.priority=10),e[a]=k)}),e.sort(function(a,b){return a.priority<b.priority?-1:a.priority===b.priority?0:1}),h.each(e,function(e,g){if(g){if(a||!c.widgetInit[g.id])c.widgetInit[g.id]=!0,g.hasOwnProperty("options")&&(
710d=b.config.widgetOptions=h.extend(!0,{},g.options,d)),g.hasOwnProperty("init")&& g.init(b,g,c,d);!a&&g.hasOwnProperty("format")&&g.format(b,c,d,!1)}})),setTimeout(function(){b.isApplyingWidgets=!1},0),c.debug&&(p=c.widgets.length,q("Completed "+(!0===a?"initializing ":"applying ")+p+" widget"+(1!==p?"s":""),l)))};g.refreshWidgets=function(b,a,c){b=h(b)[0];var f,e=b.config,l=e.widgets,q=g.widgets,k=q.length;for(f=0;f<k;f++)q[f]&&q[f].id&&(a||0>h.inArray(q[f].id,l))&&(e.debug&&d('Refeshing widgets: Removing "'+q[f].id+'"'),q[f].hasOwnProperty("remove")&&e.widgetInit[q[f].id]&&(q[f].remove(b, e,e.widgetOptions),e.widgetInit[q[f].id]=!1));!0!==c&&g.applyWidget(b,a)};g.getData=function(b,a,c){var d="";b=h(b);var e,g;if(!b.length)return"";e=h.metadata?b.metadata():!1;g=" "+(b.attr("class")||"");"undefined"!==typeof b.data(c)||"undefined"!==typeof b.data(c.toLowerCase())?d+=b.data(c)||b.data(c.toLowerCase()):e&&"undefined"!==typeof e[c]?d+=e[c]:a&&"undefined"!==typeof a[c]?d+=a[c]:" "!==g&&g.match(" "+c+"-")&&(d=g.match(new RegExp("\\s"+c+"-([\\w-]+)"))[1]||"");return h.trim(d)};g.formatFloat= function(b,a){if("string"!==typeof b||""===b)return b;var c;b=(a&&a.config?!1!==a.config.usNumberFormat:"undefined"!==typeof a?a:1)?b.replace(/,/g,""):b.replace(/[\s|\.]/g,"").replace(/,/g,".");/^\s*\([.\d]+\)/.test(b)&&(b=b.replace(/^\s*\(([.\d]+)\)/,"-$1"));c=parseFloat(b);return isNaN(c)?h.trim(b):c};g.isDigit=function(b){return isNaN(b)?/^[\-+(]?\d+[)]?$/.test(b.toString().replace(/[,.'"\s]/g,"")):!0}}});var r=h.tablesorter;h.fn.extend({tablesorter:r.construct});r.addParser({id:"no-parser",is:function(){return!1}, format:function(){return""},type:"text"});r.addParser({id:"text",is:function(){return!0},format:function(d,q){var p=q.config;d&&(d=h.trim(p.ignoreCase?d.toLocaleLowerCase():d),d=p.sortLocaleCompare?r.replaceAccents(d):d);return d},type:"text"});r.addParser({id:"digit",is:function(d){return r.isDigit(d)},format:function(d,q){var p=r.formatFloat((d||"").replace(/[^\w,. \-()]/g,""),q);return d&&"number"===typeof p?p:d?h.trim(d&&q.config.ignoreCase?d.toLocaleLowerCase():d):d},type:"numeric"});r.addParser({id:"currency", is:function(d){return/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/.test((d||"").replace(/[+\-,. ]/g,""))},format:function(d,q){var p=r.formatFloat((d||"").replace(/[^\w,. \-()]/g,""),q);return d&&"number"===typeof p?p:d?h.trim(d&&q.config.ignoreCase?d.toLocaleLowerCase():d):d},type:"numeric"});r.addParser({id:"ipAddress",is:function(d){return/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(d)},format:function(d,h){var p,y=d?d.split("."):"",v="",w=y.length; for(p=0;p<w;p++)v+=("00"+y[p]).slice(-3);return d?r.formatFloat(v,h):d},type:"numeric"});r.addParser({id:"url",is:function(d){return/^(https?|ftp|file):\/\//.test(d)},format:function(d){return d?h.trim(d.replace(/(https?|ftp|file):\/\//,"")):d},parsed:!0,type:"text"});r.addParser({id:"isoDate",is:function(d){return/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/.test(d)},format:function(d,h){return d?r.formatFloat(""!==d?(new Date(d.replace(/-/g,"/"))).getTime()||d:"",h):d},type:"numeric"});r.addParser({id:"percent", is:function(d){return/(\d\s*?%|%\s*?\d)/.test(d)&&15>d.length},format:function(d,h){return d?r.formatFloat(d.replace(/%/g,""),h):d},type:"numeric"});r.addParser({id:"usLongDate",is:function(d){return/^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4})(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?$/i.test(d)||/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i.test(d)},format:function(d,h){return d?r.formatFloat((new Date(d.replace(/(\S)([AP]M)$/i,"$1 $2"))).getTime()||d,h):d},type:"numeric"});r.addParser({id:"shortDate",is:function(d){return/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/.test((d|| "").replace(/\s+/g," ").replace(/[\-.,]/g,"/"))},format:function(d,h,p,y){if(d){p=h.config;var v=p.$headers.filter("[data-column="+y+"]:last");y=v.length&&v[0].dateFormat||r.getData(v,r.getColumnData(h,p.headers,y),"dateFormat")||p.dateFormat;d=d.replace(/\s+/g," ").replace(/[\-.,]/g,"/");"mmddyyyy"===y?d=d.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$1/$2"):"ddmmyyyy"===y?d=d.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$2/$1"):"yyyymmdd"===y&&(d=d.replace(/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/, "$1/$2/$3"))}return d?r.formatFloat((new Date(d)).getTime()||d,h):d},type:"numeric"});r.addParser({id:"time",is:function(d){return/^(([0-2]?\d:[0-5]\d)|([0-1]?\d:[0-5]\d\s?([AP]M)))$/i.test(d)},format:function(d,h){return d?r.formatFloat((new Date("2000/01/01 "+d.replace(/(\S)([AP]M)$/i,"$1 $2"))).getTime()||d,h):d},type:"numeric"});r.addParser({id:"metadata",is:function(){return!1},format:function(d,q,p){d=q.config;d=d.parserMetadataName?d.parserMetadataName:"sortValue";return h(p).metadata()[d]}, type:"numeric"});r.addWidget({id:"zebra",priority:90,format:function(d,q,p){var y,v,w,z,D,E=new RegExp(q.cssChildRow,"i"),C=q.$tbodies;q.debug&&(D=new Date);for(d=0;d<C.length;d++)w=0,y=C.eq(d),y=y.children("tr:visible").not(q.selectorRemove),y.each(function(){v=h(this);E.test(this.className)||w++;z=0===w%2;v.removeClass(p.zebra[z?1:0]).addClass(p.zebra[z?0:1])});q.debug&&r.benchmark("Applying Zebra widget",D)},remove:function(d,q,p){var r;q=q.$tbodies;var v=(p.zebra||["even","odd"]).join(" ");for(p= 0;p<q.length;p++)r=h.tablesorter.processTbody(d,q.eq(p),!0),r.children().removeClass(v),h.tablesorter.processTbody(d,r,!1)}})}(jQuery); 711jQuery(function ($) { 712$.fn.quicksearch = function (target, opt) { 713var timeout, cache, rowcache, jq_results, val = '', e = this, options = $.extend({ 714delay: 100, 715selector: null, 716stripeRows: null, 717loader: null, 718noResults: '', 719bind: 'keyup', 720onBefore: function () { 721return; 722}, 723onAfter: function () { 724return; 725}, 726show: function () { 727this.style.display = ""; 728}, 729hide: function () { 730this.style.display = "none"; 731} 732}, opt); 733this.go = function () { 734var i = 0, noresults = true, vals = val.toLowerCase().split(' '); 735var rowcache_length = rowcache.length; 736for (var i = 0; i < rowcache_length; i++) 737{ 738if (this.test(vals, cache[i]) || val == "") { 739options.show.apply(rowcache[i]); 740noresults = false;
741} else { 742options.hide.apply(rowcache[i]); 743} 744} 745if (noresults) { 746this.results(false); 747} else { 748this.results(true); 749this.stripe(); 750} 751this.loader(false); 752options.onAfter(); 753return this; 754}; 755this.stripe = function () { 756if (typeof options.stripeRows === "object" && options.stripeRows !== null) 757{ 758var joined = options.stripeRows.join(' '); 759var stripeRows_length = options.stripeRows.length; 760jq_results.not(':hidden').each(function (i) { 761$(this).removeClass(joined).addClass(options.stripeRows[i % stripeRows_length]); 762}); 763} 764return this; 765}; 766this.strip_html = function (input) { 767var output = input.replace(new RegExp('<[^<]+\>', 'g'), ""); 768output = $.trim(output.toLowerCase()); 769return output; 770}; 771this.results = function (bool) { 772if (typeof options.noResults === "string" && options.noResults !== "") { 773if (bool) { 774$(options.noResults).hide(); 775} else { 776$(options.noResults).show(); 777} 778} 779return this; 780}; 781this.loader = function (bool) { 782if (typeof options.loader === "string" && options.loader !== "") { 783(bool) ? $(options.loader).show() : $(options.loader).hide(); 784} 785return this; 786}; 787this.test = function (vals, t) { 788for (var i = 0; i < vals.length; i += 1) { 789if (t.indexOf(vals[i]) === -1) { 790return false; 791} 792} 793return true; 794}; 795this.cache = function () { 796jq_results = $(target); 797if (typeof options.noResults === "string" && options.noResults !== "") { 798jq_results = jq_results.not(options.noResults); 799} 800var t = (typeof options.selector === "string") ? jq_results.find(options.selector) : $(target).not(options.noResults); 801cache = t.map(function () { 802return e.strip_html(this.innerHTML); 803}); 804rowcache = jq_results.map(function () { 805return this; 806}); 807return this.go(); 808}; 809this.trigger = function () { 810this.loader(true); 811options.onBefore(); 812window.clearTimeout(timeout); 813timeout = window.setTimeout(function () { 814e.go(); 815}, options.delay); 816return this; 817}; 818this.cache(); 819this.results(true); 820this.stripe(); 821this.loader(false); 822return this.each(function () { 823$(this).bind(options.bind, function () { 824val = $(this).val(); 825e.trigger(); 826}); 827}); 828}; 829}); 830$(function(){ 831$('table#monTableau').tablesorter({ 832widgets : ['zebra', 'columns'], 833usNumberFormat : false, 834sortReset : true, 835sortRestart : true 836}); 837$('input#id_search').quicksearch('table#monTableau tbody tr'); 838}); 839(function($){$.fn.rssReader=function(j){var k=$.extend({targeturl:"http://www.clashdesign.net/blog/index.php/feed/rss2",items:5,Maxlength:80,loadingImg:'35-1.gif'},j);if(!j.targeturl)return false;var l=$.extend(k,j);var m=($.browser.msie);if(m){$('#newsfeed').ajaxStart(function(){$("#newsfeed").css({backgroundColor:'#ccc','z-index':90,'opacity':0.4});$('<img id="loading" src="'+l.loadingImg+'" alt="Traitement en cours ..." />').css({'opacity':1}).appendTo('#newsfeed')});$("#newsfeed").ajaxError(function(){$(this).append("<strong>Error requesting page</strong>")});$.get(l.targeturl,function(f){$('#newsfeed img').remove();$("#newsfeed").css({backgroundColor:'#fff','opacity':1});var i=0;var g=j.items;function h(e){$(f).find('item').each(function(i){if(i>e-1)return;var a=$(this).find('title').text();var b=$(this).find('pubDate').text();var c=$(this).find('link').text();var d=$(this).find('description').text();$('<a href="'+c+'">'+a+'</a>').html(a).appendTo('#newsfeed');$('<div class="date">'+b+'</div>').html(b).appendTo('#newsfeed');$('<div class="description">'+o(d,j.Maxlength)+'</div>').html(o(d,j.Maxlength)+'...').appendTo('#newsfeed');$('#newsfeed .description p img').remove();$('<br />').appendTo('#newsfeed')})}return h(g)})}else{var n="xml";$.ajax({type:"get",url:l.targeturl,dataType:n,processData:false,beforeSend:function(){$("#newsfeed").css({backgroundColor:'#ccc','z-index':90,'opacity':0.4});$('<img id="loading" src="'+l.loadingImg+'" alt="Traitement en cours ..." />').css({'opacity':1}).appendTo('#newsfeed')},success:function(f){$("#newsfeed").css({backgroundColor:'#fff','opacity':1});$('#newsfeed img').remove();var i=0;var g=j.items;function h(e){$(f).find('item').each(function(i){if(i>e-1)return;var a=$(this).find('title').text();var b=$(this).find('pubDate').text();var c=$(this).find('link').text();var d=$(this).find('description').text();$('<a class="targetblank" target="_blank" href="'+c+'">'+a+'</a>').html(a).appendTo('#newsfeed');$('<div class="date">'+b+'</div>').html(b).appendTo('#newsfeed');$('<div class="description">'+o(d,j.Maxlength)+'</div>').html(o(d,j.Maxlength)+'...').appendTo('#newsfeed');$('#newsfeed .description p img').remove();$('<br />').appendTo('#newsfeed')})}return h(g)}})}};function o(a,b){var c=a.split(/\s/);if(c.length<=b)return a;var d='';for(var i=0;i<b;i++){d+=c[i]+' '}return d}})(jQuery); 840(function($){$.fn.rssReader2=function(j){var k=$.extend({targeturl:"http://www.clashdesign.net/blog/index.php/feed/rss2",items:5,Maxlength:80,loadingImg:'35-1.gif'},j);if(!j.targeturl)return false;var l=$.extend(k,j);var m=($.browser.msie);if(m){$('#newsfeed2').ajaxStart(function(){$("#newsfeed2").css({backgroundColor:'#ccc','z-index':90,'opacity':0.4});$('<img id="loading" src="'+l.loadingImg+'" alt="Traitement en cours ..." />').css({'opacity':1}).appendTo('#newsfeed2')});$("#newsfeed2").ajaxError(function(){$(this).append("<strong>Error requesting page</strong>")});$.get(l.targeturl,function(f){$('#newsfeed2 img').remove();$("#newsfeed2").css({backgroundColor:'#fff','opacity':1});var i=0;var g=j.items;function h(e){$(f).find('item').each(function(i){if(i>e-1)return;var a=$(this).find('title').text();var b=$(this).find('pubDate').text();var c=$(this).find('link').text();var d=$(this).find('description').text();$('<a href="'+c+'">'+a+'</a>').html(a).appendTo('#newsfeed2');$('<div class="date">'+b+'</div>').html(b).appendTo('#newsfeed2');$('<div class="description">'+o(d,j.Maxlength)+'</div>').html(o(d,j.Maxlength)+'...').appendTo('#newsfeed2');$('#newsfeed2 .description p img').remove();$('<br />').appendTo('#newsfeed2')})}return h(g)})}else{var n="xml";$.ajax({type:"get",url:l.targeturl,dataType:n,processData:false,beforeSend:function(){$("#newsfeed2").css({backgroundColor:'#ccc','z-index':90,'opacity':0.4});$('<img id="loading" src="'+l.loadingImg+'" alt="Traitement en cours ..." />').css({'opacity':1}).appendTo('#newsfeed2')},success:function(f){$("#newsfeed2").css({backgroundColor:'#fff','opacity':1});$('#newsfeed2 img').remove();var i=0;var g=j.items;function h(e){$(f).find('item').each(function(i){if(i>e-1)return;var a=$(this).find('title').text();var b=$(this).find('pubDate').text();var c=$(this).find('link').text();var d=$(this).find('description').text();$('<a class="targetblank" target="_blank" href="'+c+'">'+a+'</a>').html(a).appendTo('#newsfeed2');$('<div class="date">'+b+'</div>').html(b).appendTo('#newsfeed2');$('<div class="description">'+o(d,j.Maxlength)+'</div>').html(o(d,j.Maxlength)+'...').appendTo('#newsfeed2');$('#newsfeed2 .description p img').remove();$('<br />').appendTo('#newsfeed2')})}return h(g)}})}};function o(a,b){var c=a.split(/\s/);if(c.length<=b)return a;var d='';for(var i=0;i<b;i++){d+=c[i]+' '}return d}})(jQuery); 841$(function() { 842$(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix ui-corner-all") 843.find(".portlet-header") 844.addClass("ui-widget-header ui-corner-all") 845.prepend('<span class="ui-icon ui-icon-plusthick"></span>') 846.end() 847.find(".portlet-content"); 848$(".portlet-header .ui-icon").click(function() { 849$(this).toggleClass("ui-icon-minusthick");
850$(this).parents(".portlet:first").find(".portlet-content").toggle(); 851}); 852}); 853function cacher_rigth() 854{ 855$('.right').fadeOut(); 856$('a.button_cacher').css("display","none"); 857$('a.button_montrer').css("display","block"); 858} 859function montrer_rigth() 860{ 861$('.right').fadeIn(); 862$('a.button_montrer').css("display","none"); 863$('a.button_cacher').css("display","block"); 864} 865$(document).ready(function(){ 866$('#newsfeed').rssReader({ 867targeturl: '/extension/webpublic/design/webpublic/javascript/class.rssReader.php', 868items: 1, 869Maxlength:20, 870loadingImg: '/extension/webpublic/design/webpublic/images/35-1.gif' 871}); 872$('.cfs_accueil').hide(); // On cache a chaque chargement de page le contenu de cfs_accueil 873}); 874$(document).ready(function(){ 875$('#newsfeed2').rssReader2({ 876targeturl: '/extension/webpublic/design/webpublic/javascript/class_search.php', 877items: 3, 878Maxlength:20, 879loadingImg: '/extension/webpublic/design/webpublic/images/35-1.gif' 880}); 881$('.cfs_accueil').hide(); // On cache a chaque chargement de page le contenu de cfs_accueil 882}); 883function toggle_box(){ 884$('#newsfeed').toggle(); 885} 886function toggle_box2(){ 887$('#newsfeed2').toggle(); 888} 889(function($) { 890var defaults = { 891topSpacing: 145, 892bottomSpacing: 0, 893className: 'is-sticky', 894wrapperClassName: 'sticky-wrapper', 895center: false, 896getWidthFrom: '', 897responsiveWidth: false 898}, 899$window = $(window), 900$document = $(document), 901sticked = [], 902windowHeight = $window.height(), 903scroller = function() { 904var scrollTop = $window.scrollTop(), 905documentHeight = $document.height(), 906dwh = documentHeight - windowHeight, 907extra = (scrollTop > dwh) ? dwh - scrollTop : 145; 908for (var i = 0; i < sticked.length; i++) { 909var s = sticked[i], 910elementTop = s.stickyWrapper.offset().top, 911etse = elementTop - s.topSpacing - extra; 912if (scrollTop <= etse) { 913if (s.currentTop !== null) { 914s.stickyElement 915.css('position', '') 916.css('top', ''); 917s.stickyElement.trigger('sticky-end', [s]).parent().removeClass(s.className); 918s.currentTop = null; 919} 920} 921else { 922var newTop = documentHeight - s.stickyElement.outerHeight() 923- s.topSpacing - s.bottomSpacing - scrollTop - extra; 924if (newTop < 0) { 925newTop = newTop + s.topSpacing; 926} else { 927newTop = s.topSpacing; 928} 929if (s.currentTop != newTop) { 930s.stickyElement 931.css('position', 'fixed') 932.css('top', newTop); 933if (typeof s.getWidthFrom !== 'undefined') { 934s.stickyElement.css('width', $(s.getWidthFrom).width()); 935} 936s.stickyElement.trigger('sticky-start', [s]).parent().addClass(s.className); 937s.currentTop = newTop; 938} 939} 940} 941}, 942resizer = function() { 943windowHeight = $window.height(); 944for (var i = 0; i < sticked.length; i++) { 945var s = sticked[i]; 946if (typeof s.getWidthFrom !== 'undefined' && s.responsiveWidth === true) { 947s.stickyElement.css('width', $(s.getWidthFrom).width()); 948} 949} 950}, 951methods = { 952init: function(options) { 953var o = $.extend({}, defaults, options); 954return this.each(function() { 955var stickyElement = $(this); 956var stickyId = stickyElement.attr('id'); 957var wrapperId = stickyId ? stickyId + '-' + defaults.wrapperClassName : defaults.wrapperClassName 958var wrapper = $('<div></div>') 959.attr('id', stickyId + '-sticky-wrapper') 960.addClass(o.wrapperClassName); 961stickyElement.wrapAll(wrapper); 962if (o.center) { 963stickyElement.parent().css({width:stickyElement.outerWidth(),marginLeft:"auto",marginRight:"auto"}); 964} 965if (stickyElement.css("float") == "right") { 966stickyElement.css({"float":"none"}).parent().css({"float":"right"}); 967} 968var stickyWrapper = stickyElement.parent(); 969stickyWrapper.css('height', stickyElement.outerHeight()); 970sticked.push({ 971topSpacing: o.topSpacing, 972bottomSpacing: o.bottomSpacing, 973stickyElement: stickyElement, 974currentTop: null, 975stickyWrapper: stickyWrapper, 976className: o.className, 977getWidthFrom: o.getWidthFrom, 978responsiveWidth: o.responsiveWidth 979}); 980}); 981}, 982update: scroller, 983unstick: function(options) { 984return this.each(function() { 985var unstickyElement = $(this); 986var removeIdx = -1; 987for (var i = 0; i < sticked.length; i++) 988{ 989if (sticked[i].stickyElement.get(0) == unstickyElement.get(0)) 990{ 991removeIdx = i; 992} 993} 994if(removeIdx != -1) 995{ 996sticked.splice(removeIdx,1); 997unstickyElement.unwrap(); 998unstickyElement.removeAttr('style'); 999} 1000}); 1001} 1002}; 1003if (window.addEventListener) { 1004window.addEventListener('scroll', scroller, false); 1005window.addEventListener('resize', resizer, false); 1006} else if (window.attachEvent) { 1007window.attachEvent('onscroll', scroller); 1008window.attachEvent('onresize', resizer); 1009} 1010$.fn.sticky = function(method) { 1011if (methods[method]) { 1012return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); 1013} else if (typeof method === 'object' || !method ) { 1014return methods.init.apply( this, arguments ); 1015} else { 1016$.error('Method ' + method + ' does not exist on jQuery.sticky'); 1017} 1018}; 1019$.fn.unstick = function(method) { 1020if (methods[method]) { 1021return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); 1022} else if (typeof method === 'object' || !method ) { 1023return methods.unstick.apply( this, arguments ); 1024} else { 1025$.error('Method ' + method + ' does not exist on jQuery.sticky'); 1026} 1027}; 1028$(function() { 1029setTimeout(scroller, 0); 1030}); 1031})(jQuery); 1032(function(a){a.fn.alpiDropDownMenu=function(d){jz=a.extend({},e,d);$this=a(this);a(this).addClass("alpidropdown");a("li ul",a(this)).addClass("alpiSub");a(".alpiSub ul",a(this)).addClass("alpiSubSub").removeClass("alpiSub");a("li:first-child",a(this)).addClass("first");a("li:last-child",a(this)).addClass("last");a("li:has('.alpiSub')",a(this)).addClass("hasSub");a(".alpiSub li:has('.alpiSubSub')",a(this)).addClass("hasSubSub");$this.after('<div class="alpiClear"> </div>');if(640<a(window).width()){$this.children("li").hover(function(b){a(".alpiSub:visible").trigger("mouseleave"); b.stopPropagation();"slide"==jz.showEffect?a(this).addClass("alpiHovered").find("ul:not('.juiSubSub')").addClass("subHovered").slideDown(jz.showSpeed):a(this).addClass("alpiHovered").find("ul:not('.alpiSubSub')").addClass("subHovered").fadeIn(jz.showSpeed);return!1},function(b){b.stopPropagation();"slide"==jz.hideEffect?a(this).removeClass("alpiHovered").find("ul:not('.alpiSubSub')").removeClass("subHovered").stop(!0,!0).slideUp(jz.hideSpeed):a(this).removeClass("alpiHovered").find("ul:not('.alpiSubSub')").removeClass("subHovered").stop(!0, !0).fadeOut(jz.hideSpeed);return!1});var c="px 0px";1.6<parseFloat(a().jquery)&&(c="");$this.find(".alpiSub > li").hover(function(){a(".alpiSubSub:visible").trigger("mouseleave");a(this).addClass("alpiHovered").find("ul").addClass("subsubHovered").fadeIn(jz.hideSpeed);a(this).children("a").animate({backgroundPosition:jz.hoverFrom+c},jz.showBgSpeed);return!1},function(b){b.stopPropagation();a(this).removeClass("alpiHovered").find("ul").removeClass("subsubHovered").stop(!0,!0).fadeOut(jz.hideSpeed); a(this).children("a").animate({backgroundPosition:jz.hoverBack+c},jz.hideBgSpeed);return!1});a("body").bind("mouseenter click",function(){$this.find(".subHovered").stop(!0,!0).fadeOut(jz.hideSpeed);});$this.find("a").focus(function(){a(this).closest("li").trigger("mouseenter")});a("ul li a",$this).blur(function(){a(this).closest("li").trigger("mouseleave")});a.browser.msie&&"8.0">a.browser.version&&($this.find("li:not('li li')").css({zoom:"1",display:"inline"}),"6.0">a.browser.version&&$this.children("li").hover(function(){a("select, embed, object").hide(300)}, function(){a("select, embed, object").show(300)}))}};var e={showSpeed:400,hideSpeed:400,showBgSpeed:200,hideBgSpeed:200,showEffect:"slide",hideEffect:"fade",hoverFrom:"0",hoverBack:"-150"}})(jQuery); 1033$(function(){ 1034$("#menuderoulant").alpiDropDownMenu({ 1035'showEffect' : 'fade', 1036'hideEffect' : 'slide', 1037'showSpeed' : 0, 1038'showBgSpeed' : 0 1039}); 1040}); 1041$(window).load(function(){ 1042$("#topmenu").sticky({ topSpacing: 0 , getWidthFrom: '#conteneurmenu'}); 1043}); 1044var tailleDeDepart = null; 1045function augmenterTaille (evt) { 1046evt.preventDefault(); 1047$('.span12').css('font-size', parseInt($('.span12').css('font-size'),0) + 1); 1048} 1049function diminuerTaille (evt) { 1050evt.preventDefault(); 1051$('.span12').css('font-size', parseInt($('.span12').css('font-size'),0) - 1); 1052} 1053$(document).ready(function () { 1054$('.agrandir').bind('click', augmenterTaille); 1055$('.reduire').bind('click', diminuerTaille); 1056tailleDeDepart = $('.span12').css('font-size'); 1057}); 1058var selectedString="";function getSelectedHTML(){selectedString="";var a=undefined;if(window.getSelection){selobj=window.getSelection();if(!selobj.isCollapsed){if(selobj.getRangeAt){a=selobj.getRangeAt(0)}else{a=document.createRange();a.setStart(selobj.anchorNode,selobj.anchorOffset);a.setEnd(selobj.focusNode,selobj.focusOffset)}if(a){DOM=a.cloneContents();object=document.createElement("div");object.appendChild(DOM.cloneNode(true));selectedString=object.innerHTML}else{selectedString=selobj}}}else{if(document.selection){selobj=document.selection;a=selobj.createRange();if(a&&a.htmlText){selectedString=a.htmlText}else{if(a&&a.text){selectedString=a.text}}}else{if(document.getSelection){selectedString=document.getSelection()}}}selectedString=cleanSelectedString(selectedString)}function copyselected(){setTimeout("getSelectedHTML()",50);return true}document.onmouseup=copyselected;document.onkeyup=copyselected;function readspeaker(c,b){var d="";if(selectedString.length>0){c=c.replace("/cgi-bin/rsent?","/enterprise/rsent_wrapper.php?")}if(b&&b.indexOf("Expanding_Player")==-1){d=b}else{d="rs_div"}savelink=c;start_rs_table="<table style='border:1px solid #aeaeae; font-size: 10px;'><tr><td>";rs_embed="<object type='application/x-shockwave-flash' data='http://media.readspeaker.com/flash/readspeaker20.swf?mp3="+escape(c)+"&autoplay=1&rskin=bump&time_format=ms&text_play=Lecture&text_pause=Pause&text_stop=Stop&text_vol=Volume' style='height:20px; width:250px;'>";rs_embed+="<param name='movie' value='http://media.readspeaker.com/flash/readspeaker20.swf?mp3="+escape(c)+"&autoplay=1&rskin=bump&time_format=ms&text_play=Lecture&text_pause=Pause&text_stop=Stop&text_vol=Volume' />";rs_embed+="<param name='quality' value='high' />";rs_embed+="<param name='SCALE' value='exactfit' />";rs_embed+="<param name='wmode' value='transparent' />";rs_embed+="</object>";rs_downloadlink="<br />Vocalisé par <a href='http://www.readspeaker.com/fr'>ReadSpeaker</a><br /><a href='"+savelink+"'>
1058Aucun son?</a>";close_rs="<br /><a href='#' onclick='close_rs_div(\""+d+"\"); return false;'>Fermez le lecteur</a>";end_rs_table="</td></tr></table>";var a=document.getElementById(d);if(a){a.innerHTML=start_rs_table+rs_embed+rs_downloadlink+close_rs+end_rs_table}}function close_rs_div(b){var a=document.getElementById(b);if(a){a.innerHTML=""}}function cleanSelectedString(c){var g=c.match(/<!--/gi);var b="";if(g!=undefined){for(i=0;i<g.length;i++){var b=c.substring(c.search(/<!--/gi),c.search(/-->/gi)+3);c=c.replace(b,"")}}var f=/(<\/?[A-Z]+[0-9]?)\s?[^>]*>/gi;c=c.replace(f,"$1>");var a=/<\/?[A-Z]+[0-9]?\s?>/gi;c=c.replace(a,function(h){return returnTags(h)});var d=/\s+?\s*/gi;c=c.replace(d," ");var e=/(<br>)+?\s?(<br>\s*)*/gi;c=c.replace(e,"<br>");return c}function returnTags(a){var b=/<\/?(h[1-6]|a|area|ul|ol|dl|dd|dt|li|table|td|tr|th|p|hr|br)>/i;if(b.test(a)){return a}else{return""}}; 1059(function(){ 1060var tags; 1061var defaults = { 1062height: 400, 1063width: 400, 1064radius: 150, 1065speed: 3, 1066slower: 0.99, 1067timer: 5, 1068fontMultiplier: 15, 1069tagCSSOver: { 1070border: '', 1071color: '' 1072}, 1073tagCSSOut: { 1074border: '', 1075color: '' 1076} 1077} 1078var forCalcs = { 1079halfHeight: null, 1080halfWidth: null, 1081hwratio: null, 1082dtr: null, 1083diametr: null, 1084speedX: null, 1085speedY: null, 1086tLength: null 1087} 1088var curState = { 1089mouseOver: null, 1090lastFy: null, 1091lastFx: null, 1092sy: null, 1093cy: null, 1094sx: null, 1095cx: null, 1096mouseX: null, 1097mouseY: null 1098} 1099var options = {}; 1100jQuery.fn.tagSphere = function(opt){ 1101options = jQuery.extend(defaults, opt); 1102initContainer(this); 1103initTags(this); 1104initCalcs(); 1105deployTags(); 1106setInterval(updateTags, options.timer); 1107return this; 1108}; 1109function initCalcs(){ 1110forCalcs.halfHeight = options.height / 2; 1111forCalcs.halfWidth = options.width / 2; 1112forCalcs.speedX = options.speed / forCalcs.halfWidth; 1113forCalcs.speedY = options.speed / forCalcs.halfHeight; 1114forCalcs.dtr = Math.PI / 180; 1115forCalcs.diametr = options.radius * 2; 1116forCalcs.hwratio = options.height / options.width; 1117forCalcs.whratio = options.width / options.height; 1118forCalcs.tLength = tags.length - 1; 1119curState.mouseOver = false; 1120curState.lastFx = options.speed; 1121curState.lastFy = options.speed; 1122} 1123function initContainer(tagCont){ 1124tagCont.height(options.height); 1125tagCont.width(options.width); 1126tagCont.css({ 1127'overflow': 'hidden', 1128'position': 'relative' 1129}); 1130tagCont.mousemove(function(e){ 1131curState.mouseX = e.pageX - this.offsetLeft; 1132curState.mouseY = e.pageY - this.offsetTop; 1133}); 1134tagCont.hover(function(){ 1135curState.mouseOver = true; 1136}, function(){ 1137curState.mouseOver = false; 1138}); 1139} 1140function initTags(tagCont){ 1141tags = tagCont.children('ul').children(); 1142tags.css({ 1143'position': 'absolute', 1144'list-style-type': 'none', 1145'list-style-position': 'outside', 1146'list-style-image': 'none' 1147}); 1148for (var i = 0; i < tags.length; i++) { 1149var jTag = jQuery(tags[i]); 1150tags[i] = jTag; 1151jTag.hover(function(){ 1152jQuery(this).css(options.tagCSSOver); 1153}, function(){ 1154jQuery(this).css(options.tagCSSOut); 1155}) 1156} 1157} 1158function deployTags(){ 1159var phi = 0; 1160var theta = 0; 1161var max = forCalcs.tLength + 1; 1162var i = 0; 1163while (i++ < max) { 1164phi = Math.acos(-1 + (2 * i - 1) / max); 1165theta = Math.sqrt(max * Math.PI) * phi; 1166tags[i - 1].cx = options.radius * Math.cos(theta) * Math.sin(phi); 1167tags[i - 1].cy = options.radius * Math.sin(theta) * Math.sin(phi); 1168tags[i - 1].cz = options.radius * Math.cos(phi); 1169tags[i - 1].h = jQuery(tags[i - 1]).height() / 4; 1170tags[i - 1].w = jQuery(tags[i - 1]).width() / 4; 1171} 1172} 1173function calcRotation(fy, fx){ 1174curState.sy = Math.sin(fy * forCalcs.dtr); 1175curState.cy = Math.cos(fy * forCalcs.dtr); 1176curState.sx = Math.sin(fx * forCalcs.dtr); 1177curState.cx = Math.cos(fx * forCalcs.dtr); 1178} 1179function updateTags(){ 1180var fy; 1181var fx; 1182if (curState.mouseOver) { 1183fy = options.speed - forCalcs.speedY * curState.mouseY; 1184fx = forCalcs.speedX * curState.mouseX - options.speed; 1185} 1186else { 1187fy = curState.lastFy * options.slower; 1188fx = curState.lastFx * options.slower; 1189} 1190curState.lastFy = fy; 1191curState.lastFx = fx; 1192if (Math.abs(fy) > 0.01 || Math.abs(fx) > 0.01) { 1193calcRotation(fy, fx); 1194j = -1; 1195while (j++ < forCalcs.tLength) { 1196rx1 = tags[j].cx; 1197ry1 = tags[j].cy * curState.cy + tags[j].cz * -curState.sy; 1198rz1 = tags[j].cy * curState.sy + tags[j].cz * curState.cy; 1199tags[j].cx = rx1 * curState.cx + rz1 * curState.sx; 1200tags[j].cy = tags[j].cy * curState.cy + tags[j].cz * -curState.sy; 1201tags[j].cz = rx1 * -curState.sx + rz1 * curState.cx; 1202var per = forCalcs.diametr / (forCalcs.diametr + tags[j].cz); 1203tags[j].x = tags[j].cx * per; 1204tags[j].y = tags[j].cy * per; 1205tags[j].alpha = per / 2; 1206tags[j].css({ 1207'left': forCalcs.whratio * (tags[j].x - tags[j].w * per) + forCalcs.halfWidth, 1208'top': forCalcs.hwratio * (tags[j].y - tags[j].h * per) + forCalcs.halfHeight, 1209'opacity': tags[j].alpha, 1210'font-size': options.fontMultiplier * tags[j].alpha + 'px', 1211'z-index': Math.round(-tags[j].cz) 1212}); 1213} 1214} 1215} 1216})() 1217!function(e){function n(){l=!0,d.$wndw=e(window),d.$html=e("html"),d.$body=e("body"),e.each([i,a,o],function(e,n){
1217n.add=function(e){e=e.split(" ");for(var t in e)n[e[t]]=n.mm(e[t])}}),i.mm=function(e){return"mm-"+e},i.add("wrapper menu inline panel nopanel list nolist subtitle selected label spacer current highest hidden opened subopened subopen fullsubopen subclose"),i.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},a.mm=function(e){return"mm-"+e},a.add("parent"),o.mm=function(e){return e+".mm"},o.add("toggle open close setSelected transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend scroll resize click keydown keyup"),e[t]._c=i,e[t]._d=a,e[t]._e=o,e[t].glbl=d}var t="mmenu",s="4.7.5";if(!e[t]){var i={},a={},o={},l=!1,d={$wndw:null,$html:null,$body:null};e[t]=function(n,s,i){this.$menu=n,this.opts=s,this.conf=i,this.vars={},"function"==typeof this.___deprecated&&this.___deprecated(),this._initMenu(),this._initAnchors(),this._initEvents();var a=this.$menu.children(this.conf.panelNodetype);for(var o in e[t].addons)e[t].addons[o]._add.call(this),e[t].addons[o]._add=function(){},e[t].addons[o]._setup.call(this);return this._init(a),"function"==typeof this.___debug&&this.___debug(),this},e[t].version=s,e[t].addons={},e[t].uniqueId=0,e[t].defaults={classes:"",slidingSubmenus:!0,onClick:{setSelected:!0}},e[t].configuration={panelNodetype:"ul, ol, div",transitionDuration:400,openingInterval:25,classNames:{panel:"Panel",selected:"Selected",label:"Label",spacer:"Spacer"}},e[t].prototype={_init:function(n){n=n.not("."+i.nopanel),n=this._initPanels(n);for(var s in e[t].addons)e[t].addons[s]._init.call(this,n);this._update()},_initMenu:function(){this.opts.offCanvas&&this.conf.clone&&(this.$menu=this.$menu.clone(!0),this.$menu.add(this.$menu.find("*")).filter("[id]").each(function(){e(this).attr("id",i.mm(e(this).attr("id")))})),this.$menu.contents().each(function(){3==e(this)[0].nodeType&&e(this).remove()}),this.$menu.parent().addClass(i.wrapper);var n=[i.menu];n.push(i.mm(this.opts.slidingSubmenus?"horizontal":"vertical")),this.opts.classes&&n.push(this.opts.classes),this.$menu.addClass(n.join(" "))},_initPanels:function(n){var t=this;this.__findAddBack(n,"ul, ol").not("."+i.nolist).addClass(i.list);var s=this.__findAddBack(n,"."+i.list).find("> li");this.__refactorClass(s,this.conf.classNames.selected,"selected"),this.__refactorClass(s,this.conf.classNames.label,"label"),this.__refactorClass(s,this.conf.classNames.spacer,"spacer"),s.off(o.setSelected).on(o.setSelected,function(n,t){n.stopPropagation(),s.removeClass(i.selected),"boolean"!=typeof t&&(t=!0),t&&e(this).addClass(i.selected)}),this.__refactorClass(this.__findAddBack(n,"."+this.conf.classNames.panel),this.conf.classNames.panel,"panel"),n.add(this.__findAddBack(n,"."+i.list).children().children().filter(this.conf.panelNodetype).not("."+i.nopanel)).addClass(i.panel);var l=this.__findAddBack(n,"."+i.panel),d=e("."+i.panel,this.$menu);if(l.each(function(){var n=e(this),s=n.attr("id")||t.__getUniqueId();n.attr("id",s)}),l.each(function(){var n=e(this),s=n.is("ul, ol")?n:n.find("ul ,ol").first(),o=n.parent(),l=o.children("a, span"),d=o.closest("."+i.panel);if(o.parent().is("."+i.list)&&!n.data(a.parent)){n.data(a.parent,o);var r=e('<a class="'+i.subopen+'" href="#'+n.attr("id")+'" />').insertBefore(l);l.is("a")||r.addClass(i.fullsubopen),t.opts.slidingSubmenus&&s.prepend('<li class="'+i.subtitle+'"><a class="'+i.subclose+'" href="#'+d.attr("id")+'">'+l.text()+"</a></li>")}}),this.opts.slidingSubmenus){var r=this.__findAddBack(n,"."+i.list).find("> li."+i.selected);r.parents("li").removeClass(i.selected).end().add(r.parents("li")).each(function(){var n=e(this),t=n.find("> ."+i.panel);t.length&&(n.parents("."+i.panel).addClass(i.subopened),t.addClass(i.opened))}).closest("."+i.panel).addClass(i.opened).parents("."+i.panel).addClass(i.subopened)}else{var r=e("li."+i.selected,d);r.parents("li").removeClass(i.selected).end().add(r.parents("li")).addClass(i.opened)}var u=d.filter("."+i.opened);return u.length||(u=l.first()),u.addClass(i.opened).last().addClass(i.current),this.opts.slidingSubmenus&&l.not(u.last()).addClass(i.hidden).end().appendTo(this.$menu),l},_initAnchors:function(){var n=this;d.$body.on(o.click,"a",function(s){var a=e(this),l=!1,r=n.$menu.find(a).length;for(var u in e[t].addons)if(e[t].addons[u]._clickAnchor&&(l=e[t].addons[u]._clickAnchor.call(n,a,r)))break;if(!l&&r){var c=a.attr("href")||"";if("#"==c.slice(0,1))try{e(c,n.$menu).is("."+i.panel)&&(l=!0,e(c).trigger(n.opts.slidingSubmenus?o.open:o.toggle))}catch(p){}}if(l&&s.preventDefault(),!l&&r&&a.is("."+i.list+" > li > a")&&!a.is('[rel="external"]')&&!a.is('[target="_blank"]')){n.__valueOrFn(n.opts.onClick.setSelected,a)&&a.parent().trigger(o.setSelected);var h=n.__valueOrFn(n.opts.onClick.preventDefault,a,"#"==c.slice(0,1));h&&s.preventDefault(),n.__valueOrFn(n.opts.onClick.blockUI,a,!h)&&d.$html.addClass(i.blocking),n.__valueOrFn(n.opts.onClick.close,a,h)&&n.$menu.trigger(o.close)}})},_initEvents:function(){var n=this;this.$menu.on(o.toggle+" "+o.open+" "+o.close,"."+i.panel,function(e){e.stopPropagation()}),this.opts.slidingSubmenus?this.$menu.on(o.open,"."+i.panel,function(){return n._openSubmenuHorizontal(e(this))}):this.$menu.on(o.toggle,"."+i.panel,function(){var n=e(this);
1217n.trigger(n.parent().hasClass(i.opened)?o.close:o.open)}).on(o.open,"."+i.panel,function(){e(this).parent().addClass(i.opened)}).on(o.close,"."+i.panel,function(){e(this).parent().removeClass(i.opened)})},_openSubmenuHorizontal:function(n){if(n.hasClass(i.current))return!1;var t=e("."+i.panel,this.$menu),s=t.filter("."+i.current);return t.removeClass(i.highest).removeClass(i.current).not(n).not(s).addClass(i.hidden),n.hasClass(i.opened)?s.addClass(i.highest).removeClass(i.opened).removeClass(i.subopened):(n.addClass(i.highest),s.addClass(i.subopened)),n.removeClass(i.hidden).addClass(i.current),setTimeout(function(){n.removeClass(i.subopened).addClass(i.opened)},this.conf.openingInterval),"open"},_update:function(e){if(this.updates||(this.updates=[]),"function"==typeof e)this.updates.push(e);else for(var n=0,t=this.updates.length;t>n;n++)this.updates[n].call(this,e)},__valueOrFn:function(e,n,t){return"function"==typeof e?e.call(n[0]):"undefined"==typeof e&&"undefined"!=typeof t?t:e},__refactorClass:function(e,n,t){return e.filter("."+n).removeClass(n).addClass(i[t])},__findAddBack:function(e,n){return e.find(n).add(e.filter(n))},__transitionend:function(e,n,t){var s=!1,i=function(){s||n.call(e[0]),s=!0};e.one(o.transitionend,i),e.one(o.webkitTransitionEnd,i),setTimeout(i,1.1*t)},__getUniqueId:function(){return i.mm(e[t].uniqueId++)}},e.fn[t]=function(s,i){return l||n(),s=e.extend(!0,{},e[t].defaults,s),i=e.extend(!0,{},e[t].configuration,i),this.each(function(){var n=e(this);n.data(t)||n.data(t,new e[t](n,s,i))})},e[t].support={touch:"ontouchstart"in window||navigator.msMaxTouchPoints}}}(jQuery); 1218!function(e){var t="mmenu",o="offCanvas";e[t].addons[o]={_init:function(){},_setup:function(){if(this.opts[o]){var t=this,s=this.opts[o],p=this.conf[o];"string"!=typeof p.pageSelector&&(p.pageSelector="> "+p.pageNodetype),a.$allMenus=(a.$allMenus||e()).add(this.$menu),this.vars.opened=!1;var r=[n.offcanvas];"left"!=s.position&&r.push(n.mm(s.position)),"back"!=s.zposition&&r.push(n.mm(s.zposition)),this.$menu.addClass(r.join(" ")).parent().removeClass(n.wrapper),this.setPage(a.$page),this[o+"_initBlocker"](),this[o+"_initWindow"](),this.$menu.on(i.open+" "+i.opening+" "+i.opened+" "+i.close+" "+i.closing+" "+i.closed+" "+i.setPage,function(e){e.stopPropagation()}).on(i.open+" "+i.close+" "+i.setPage,function(e){t[e.type]()}),this.$menu[p.menuInjectMethod+"To"](p.menuWrapperSelector)}},_add:function(){n=e[t]._c,s=e[t]._d,i=e[t]._e,n.add("offcanvas slideout modal background opening blocker page"),s.add("style"),i.add("opening opened closing closed setPage"),a=e[t].glbl},_clickAnchor:function(e){if(!this.opts[o])return!1;var t=this.$menu.attr("id");if(t&&t.length&&(this.conf.clone&&(t=n.umm(t)),e.is('[href="#'+t+'"]')))return this.open(),!0;if(a.$page){var t=a.$page.attr("id");return t&&t.length&&e.is('[href="#'+t+'"]')?(this.close(),!0):!1}}},e[t].defaults[o]={position:"left",zposition:"back",modal:!1,moveBackground:!0},e[t].configuration[o]={pageNodetype:"div",pageSelector:null,menuWrapperSelector:"body",menuInjectMethod:"prepend"},e[t].prototype.open=function(){if(this.vars.opened)return!1;var e=this;return this._openSetup(),setTimeout(function(){e._openFinish()},this.conf.openingInterval),"open"},e[t].prototype._openSetup=function(){var e=this;a.$allMenus.not(this.$menu).trigger(i.close),a.$page.data(s.style,a.$page.attr("style")||""),a.$wndw.trigger(i.resize,[!0]);var t=[n.opened];this.opts[o].modal&&t.push(n.modal),this.opts[o].moveBackground&&t.push(n.background),"left"!=this.opts[o].position&&t.push(n.mm(this.opts[o].position)),"back"!=this.opts[o].zposition&&t.push(n.mm(this.opts[o].zposition)),this.opts.classes&&t.push(this.opts.classes),a.$html.addClass(t.join(" ")),setTimeout(function(){e.vars.opened=!0},this.conf.openingInterval),this.$menu.addClass(n.current+" "+n.opened)},e[t].prototype._openFinish=function(){var e=this;this.__transitionend(a.$page,function(){e.$menu.trigger(i.opened)},this.conf.transitionDuration),a.$html.addClass(n.opening),this.$menu.trigger(i.opening)},e[t].prototype.close=function(){if(!this.vars.opened)return!1;var e=this;return this.__transitionend(a.$page,function(){e.$menu.removeClass(n.current).removeClass(n.opened),a.$html.removeClass(n.opened).removeClass(n.modal).removeClass(n.background).removeClass(n.mm(e.opts[o].position)).removeClass(n.mm(e.opts[o].zposition)),e.opts.classes&&a.$html.removeClass(e.opts.classes),a.$page.attr("style",a.$page.data(s.style)),e.vars.opened=!1,e.$menu.trigger(i.closed)},this.conf.transitionDuration),a.$html.removeClass(n.opening),this.$menu.trigger(i.closing),"close"},e[t].prototype.setPage=function(t){t||(t=e(this.conf[o].pageSelector,a.$body),t.length>1&&(t=t.wrapAll("<"+this.conf[o].pageNodetype+" />").parent())),t.addClass(n.page+" "+n.slideout),a.$page=t},e[t].prototype[o+"_initWindow"]=function(){a.$wndw.on(i.keydown,function(e){return a.$html.hasClass(n.opened)&&9==e.keyCode?(e.preventDefault(),!1):void 0});var s=0;a.$wndw.on(i.resize,function(e,t){if(t||a.$html.hasClass(n.opened)){var o=a.$wndw.height();(t||o!=s)&&(s=o,a.$page.css("minHeight",o))}}),e[t].prototype[o+"_initWindow"]=function(){}},e[t].prototype[o+"_initBlocker"]=function(){var s=e('<div id="'+n.blocker+'" class="'+n.slideout+'" />').appendTo(a.$body);s.on(i.touchstart,function(e){e.preventDefault(),e.stopPropagation(),s.trigger(i.mousedown)}).on(i.mousedown,function(e){e.preventDefault(),a.$html.hasClass(n.modal)||a.$allMenus.trigger(i.close)}),e[t].prototype[o+"_initBlocker"]=function(){}};var n,s,i,a}(jQuery); 1219!function(t){var n="mmenu",a="buttonbars";
1219t[n].addons[a]={_init:function(n){this.opts[a],this.conf[a],this.__refactorClass(t("div",n),this.conf.classNames[a].buttonbar,"buttonbar"),t("."+i.buttonbar,n).each(function(){var n=t(this),a=n.children().not("input"),o=n.children().filter("input");n.addClass(i.buttonbar+"-"+a.length),o.each(function(){var n=t(this),i=a.filter('label[for="'+n.attr("id")+'"]');i.length&&n.insertBefore(i)})})},_setup:function(){},_add:function(){i=t[n]._c,o=t[n]._d,r=t[n]._e,i.add("buttonbar"),s=t[n].glbl}},t[n].defaults[a]={},t[n].configuration.classNames[a]={buttonbar:"Buttonbar"};var i,o,r,s}(jQuery); 1220!function(t){var e="mmenu",n="counters";t[e].addons[n]={_init:function(e){var s=this,d=this.opts[n];this.conf[n],this.__refactorClass(t("em",e),this.conf.classNames[n].counter,"counter"),d.add&&e.each(function(){var e=t(this).data(o.parent);e&&(e.find("> em."+a.counter).length||e.prepend(t('<em class="'+a.counter+'" />')))}),d.update&&e.each(function(){var e=t(this),n=e.data(o.parent);if(n){var d=n.find("> em."+a.counter);d.length&&(e.is("."+a.list)||(e=e.find("> ."+a.list)),e.length&&!e.data(o.updatecounter)&&(e.data(o.updatecounter,!0),s._update(function(){var t=e.children().not("."+a.label).not("."+a.subtitle).not("."+a.hidden).not("."+a.search).not("."+a.noresultsmsg);d.html(t.length)})))}})},_setup:function(){var a=this.opts[n];"boolean"==typeof a&&(a={add:a,update:a}),"object"!=typeof a&&(a={}),a=t.extend(!0,{},t[e].defaults[n],a),this.opts[n]=a},_add:function(){a=t[e]._c,o=t[e]._d,s=t[e]._e,a.add("counter search noresultsmsg"),o.add("updatecounter"),d=t[e].glbl}},t[e].defaults[n]={add:!1,update:!1},t[e].configuration.classNames[n]={counter:"Counter"};var a,o,s,d}(jQuery); 1221!function(e){function t(e,t,n){return t>e&&(e=t),e>n&&(e=n),e}var n="mmenu",o="dragOpen";e[n].addons[o]={_init:function(){},_setup:function(){if(this.opts.offCanvas){var s=this,p=this.opts[o],d=this.conf[o];if("boolean"==typeof p&&(p={open:p}),"object"!=typeof p&&(p={}),p=e.extend(!0,{},e[n].defaults[o],p),p.open){if(Hammer.VERSION<2)return;var f,c,h,m,u={},g=0,l=!1,v=!1,_=0,w=0;switch(this.opts.offCanvas.position){case"left":case"right":u.events="panleft panright",u.typeLower="x",u.typeUpper="X",v="width";break;case"top":case"bottom":u.events="panup pandown",u.typeLower="y",u.typeUpper="Y",v="height"}switch(this.opts.offCanvas.position){case"left":case"top":u.negative=!1;break;case"right":case"bottom":u.negative=!0}switch(this.opts.offCanvas.position){case"left":u.open_dir="right",u.close_dir="left";break;case"right":u.open_dir="left",u.close_dir="right";break;case"top":u.open_dir="down",u.close_dir="up";break;case"bottom":u.open_dir="up",u.close_dir="down"}var b=this.__valueOrFn(p.pageNode,this.$menu,r.$page);"string"==typeof b&&(b=e(b));var y=r.$page;switch(this.opts.offCanvas.zposition){case"front":y=this.$menu;break;case"next":y=y.add(this.$menu)}var $=new Hammer(b[0],p.vendors.hammer);$.on("panstart",function(e){switch(m=e.center[u.typeLower],s.opts.offCanvas.position){case"right":case"bottom":m>=r.$wndw[v]()-p.maxStartPos&&(g=1);break;default:m<=p.maxStartPos&&(g=1)}l=u.open_dir}).on(u.events+" panend",function(e){g>0&&e.preventDefault()}).on(u.events,function(e){if(f=e["delta"+u.typeUpper],u.negative&&(f=-f),f!=_&&(l=f>=_?u.open_dir:u.close_dir),_=f,_>p.threshold&&1==g){if(r.$html.hasClass(a.opened))return;g=2,s._openSetup(),s.$menu.trigger(i.opening),r.$html.addClass(a.dragging),w=t(r.$wndw[v]()*d[v].perc,d[v].min,d[v].max)}2==g&&(c=t(_,10,w)-("front"==s.opts.offCanvas.zposition?w:0),u.negative&&(c=-c),h="translate"+u.typeUpper+"("+c+"px )",y.css({"-webkit-transform":"-webkit-"+h,transform:h}))}).on("panend",function(){2==g&&(r.$html.removeClass(a.dragging),y.css("transform",""),s[l==u.open_dir?"_openFinish":"close"]()),g=0})}}},_add:function(){return"function"!=typeof Hammer?(e[n].addons[o]._init=function(){},e[n].addons[o]._setup=function(){},void 0):(a=e[n]._c,s=e[n]._d,i=e[n]._e,a.add("dragging"),r=e[n].glbl,void 0)}},e[n].defaults[o]={open:!1,maxStartPos:100,threshold:50,vendors:{hammer:{}}},e[n].configuration[o]={width:{perc:.8,min:140,max:440}
1221,height:{perc:.8,min:140,max:880}};var a,s,i,r}(jQuery); 1222!function(o){var t="mmenu",d="fixedElements";o[t].addons[d]={_init:function(){if(this.opts.offCanvas){var o=this.conf.classNames[d].fixedTop,t=this.conf.classNames[d].fixedBottom,e=this.__refactorClass(a.$page.find("."+o),o,"fixed-top"),s=this.__refactorClass(a.$page.find("."+t),t,"fixed-bottom");e.add(s).appendTo(a.$body).addClass(i.slideout)}},_setup:function(){},_add:function(){i=o[t]._c,e=o[t]._d,s=o[t]._e,i.add("fixed-top fixed-bottom"),a=o[t].glbl}},o[t].defaults[d]={},o[t].configuration.classNames[d]={fixedTop:"FixedTop",fixedBottom:"FixedBottom"};var i,e,s,a}(jQuery); 1223!function(t){var o="mmenu",e="footer";t[o].addons[e]={_init:function(a){var d=this,i=this.opts[e],r=t("div."+n.footer,this.$menu);r.length&&(i.update&&a.each(function(){var o=t(this),a=t("."+d.conf.classNames[e].panelFooter,o),u=a.html();u||(u=i.title);var l=function(){r[u?"show":"hide"](),r.html(u)};o.on(s.open,l),o.hasClass(n.current)&&l()}),t[o].addons.buttonbars&&t[o].addons.buttonbars._init.call(this,r))},_setup:function(){var a=this.opts[e];if("boolean"==typeof a&&(a={add:a,update:a}),"object"!=typeof a&&(a={}),a=t.extend(!0,{},t[o].defaults[e],a),this.opts[e]=a,a.add){var s=a.content?a.content:a.title;t('<div class="'+n.footer+'" />').appendTo(this.$menu).append(s),this.$menu.addClass(n.hasfooter)}},_add:function(){n=t[o]._c,a=t[o]._d,s=t[o]._e,n.add("footer hasfooter"),d=t[o].glbl}},t[o].defaults[e]={add:!1,content:!1,title:"",update:!1},t[o].configuration.classNames[e]={panelFooter:"Footer"};var n,a,s,d}(jQuery); 1224!function(e){var t="mmenu",a="header";e[t].addons[a]={_init:function(s){var i=this,o=this.opts[a],l=(this.conf[a
1224],e("."+n.header,this.$menu));if(l.length){if(o.update){var h=l.find("."+n.title),c=l.find("."+n.prev),f=l.find("."+n.next),p=l.find("."+n.close),u=!1;r.$page&&(u="#"+r.$page.attr("id"),p.attr("href",u)),s.each(function(){var t=e(this),s=t.find("."+i.conf.classNames[a].panelHeader),r=t.find("."+i.conf.classNames[a].panelPrev),l=t.find("."+i.conf.classNames[a].panelNext),p=s.html(),u=r.attr("href"),v=l.attr("href"),m=r.html(),b=l.html();p||(p=t.find("."+n.subclose).html()),p||(p=o.title),u||(u=t.find("."+n.subclose).attr("href"));var x=function(){h[p?"show":"hide"](),h.html(p),c[u?"attr":"removeAttr"]("href",u),c[u||m?"show":"hide"](),c.html(m),f[v?"attr":"removeAttr"]("href",v),f[v||b?"show":"hide"](),f.html(b)};t.on(d.open,x),t.hasClass(n.current)&&x()})}e[t].addons.buttonbars&&e[t].addons.buttonbars._init.call(this,l)}},_setup:function(){var s=this.opts[a];if(this.conf[a],"boolean"==typeof s&&(s={add:s,update:s}),"object"!=typeof s&&(s={}),"undefined"==typeof s.content&&(s.content=["prev","title","next"]),s=e.extend(!0,{},e[t].defaults[a],s),this.opts[a]=s,s.add){if(s.content instanceof Array){for(var d=e("<div />"),r=0,i=s.content.length;i>r;r++)switch(s.content[r]){case"prev":case"next":case"close":d.append('<a class="'+n[s.content[r]]+'" href="#"></a>');break;case"title":d.append('<span class="'+n.title+'"></span>');break;default:d.append(s.content[r])}d=d.html()}else var d=s.content;e('<div class="'+n.header+'" />').prependTo(this.$menu).append(d),this.$menu.addClass(n.hasheader)}},_add:function(){n=e[t]._c,s=e[t]._d,d=e[t]._e,n.add("header hasheader prev next close title"),r=e[t].glbl}},e[t].defaults[a]={add:!1,title:"Menu",update:!1},e[t].configuration.classNames[a]={panelHeader:"Header",panelNext:"Next",panelPrev:"Prev"};var n,s,d,r}(jQuery); 1225!function(l){var e="mmenu",s="labels";l[e].addons[s]={_init:function(e){var n=this.opts[s];this.__refactorClass(l("li",this.$menu),this.conf.classNames[s].collapsed,"collapsed"),n.collapse&&l("."+a.label,e).each(function(){var e=l(this),s=e.nextUntil("."+a.label,"."+a.collapsed);s.length&&(e.children("."+a.subopen).length||(e.wrapInner("<span />"),e.prepend('<a href="#" class="'+a.subopen+" "+a.fullsubopen+'" />')))})},_setup:function(){var a=this.opts[s];"boolean"==typeof a&&(a={collapse:a}),"object"!=typeof a&&(a={}),a=l.extend(!0,{},l[e].defaults[s],a),this.opts[s]=a},_add:function(){a=l[e]._c,n=l[e]._d,o=l[e]._e,a.add("collapsed uncollapsed"),t=l[e].glbl},_clickAnchor:function(l,e){if(e){var s=l.parent();if(s.is("."+a.label)){var n=s.nextUntil("."+a.label,"."+a.collapsed);return s.toggleClass(a.opened),n[s.hasClass(a.opened)?"addClass":"removeClass"](a.uncollapsed),!0}}return!1}},l[e].defaults[s]={collapse:!1},l[e].configuration.classNames[s]={collapsed:"Collapsed"};var a,n,o,t}(jQuery); 1226!function(e){function s(e){switch(e){case 9:case 16:case 17:case 18:case 37:case 38:case 39:case 40:return!0}return!1}var n="mmenu",t="searchfield";e[n].addons[t]={_init:function(n){var i=this,l=this.opts[t],d=this.conf[t];if(l.add){switch(l.addTo){case"menu":var c=this.$menu;break;case"panels":var c=n;break;default:var c=e(l.addTo,this.$menu).filter("."+a.panel)}c.length&&c.each(function(){var s=e(this),n=s.is("."+a.menu)?d.form?"form":"div":"li";if(!s.children(n+"."+a.search).length){if(s.is("."+a.menu))var t=i.$menu,r="prependTo";else var t=s.children().first(),r=t.is("."+a.subtitle)?"insertAfter":"insertBefore";var o=e("<"+n+' class="'+a.search+'" />');if("form"==n&&"object"==typeof d.form)for(var c in d.form)o.attr(c,d.form[c]);o.append('<input placeholder="'+l.placeholder+'" type="text" autocomplete="off" />'),o[r](t)}l.noResults&&(s.is("."+a.menu)&&(s=s.children("."+a.panel).first()),n=s.is("."+a.list)?"li":"div",s.children(n+"."+a.noresultsmsg).length||e("<"+n+' class="'+a.noresultsmsg+'" />').html(l.noResults).appendTo(s))})}if(this.$menu.children("."+a.search).length&&this.$menu.addClass(a.hassearch),l.search){var h=e("."+a.search,this.$menu);h.length&&h.each(function(){var n=e(this);if("menu"==l.addTo)var t=e("."+a.panel,i.$menu),d=i.$menu;else var t=n.closest("."+a.panel),d=t;var c=n.children("input"),h=i.__findAddBack(t,"."+a.list).children("li"),u=h.filter("."+a.label),f=h.not("."+a.subtitle).not("."+a.label).not("."+a.search).not("."+a.noresultsmsg),p="> a";l.showLinksOnly||(p+=", > span"),c.off(o.keyup+" "+o.change).on(o.keyup,function(e){s(e.keyCode)||n.trigger(o.search)}).on(o.change,function(){n.trigger(o.search)}),n.off(o.reset+" "+o.search).on(o.reset+" "+o.search,function(e){e.stopPropagation()}).on(o.reset,function(){n.trigger(o.search,[""])}).on(o.search,function(s,n){"string"==typeof n?c.val(n):n=c.val(),n=n.toLowerCase(),t.scrollTop(0),f.add(u).addClass(a.hidden),f.each(function(){var s=e(this);e(p,s).text().toLowerCase().indexOf(n)>-1&&s.add(s.prevAll("."+a.label).first()).removeClass(a.hidden)}),e(t.get().reverse()).each(function(s){var n=e(this),t=n.data(r.parent);if(t){var d=n.add(n.find("> ."+a.list)).find("> li").not("."+a.subtitle).not("."+a.search).not("."+a.noresultsmsg).not("."+a.label).not("."+a.hidden);d.length?t.removeClass(a.hidden).removeClass(a.nosubresults).prevAll("."+a.label).first().removeClass(a.hidden):"menu"==l.addTo&&(n.hasClass(a.opened)&&setTimeout(function(){t.trigger(o.open)},1.5*(s+1)*i.conf.openingInterval),t.addClass(a.nosubresults))}}),d[f.not("."+a.hidden).length?"removeClass":"addClass"](a.noresults),i._update()})})}},_setup:function(){var s=this.opts[t];this.conf[t],"boolean"==typeof s&&(s={add:s,search:s}
1226),"object"!=typeof s&&(s={}),s=e.extend(!0,{},e[n].defaults[t],s),"boolean"!=typeof s.showLinksOnly&&(s.showLinksOnly="menu"==s.addTo),this.opts[t]=s},_add:function(){a=e[n]._c,r=e[n]._d,o=e[n]._e,a.add("search hassearch noresultsmsg noresults nosubresults"),o.add("search reset change"),i=e[n].glbl}},e[n].defaults[t]={add:!1,addTo:"menu",search:!1,placeholder:"Search",noResults:"No results found."},e[n].configuration[t]={form:!1};var a,r,o,i}(jQuery); 1227!function(e){var t="mmenu",s="toggles";e[t].addons[s]={_init:function(t){var a=this;this.opts[s],this.conf[s],this.__refactorClass(e("input",t),this.conf.classNames[s].toggle,"toggle"),this.__refactorClass(e("input",t),this.conf.classNames[s].check,"check"),e("input."+c.toggle+", input."+c.check,t).each(function(){var t=e(this),s=t.closest("li"),l=t.hasClass(c.toggle)?"toggle":"check",n=t.attr("id")||a.__getUniqueId();s.children('label[for="'+n+'"]').length||(t.attr("id",n),s.prepend(t),e('<label for="'+n+'" class="'+c[l]+'"></label>').insertBefore(s.children("a, span").last()))})},_setup:function(){},_add:function(){c=e[t]._c,a=e[t]._d,l=e[t]._e,c.add("toggle check"),n=e[t].glbl}},e[t].defaults[s]={},e[t].configuration.classNames[s]={toggle:"Toggle",check:"Check"};var c,a,l,n}(jQuery); 1228!function(t){var e="mmenu",n="counters";t[e].addons[n]={_init:function(e){var s=this,d=this.opts[n];this.conf[n],this.__refactorClass(t("em",e),this.conf.classNames[n].counter,"counter"),d.add&&e.each(function(){var e=t(this).data(o.parent);e&&(e.find("> em."+a.counter).length||e.prepend(t('<em class="'+a.counter+'" />')))}),d.update&&e.each(function(){var e=t(this),n=e.data(o.parent);if(n){var d=n.find("> em."+a.counter);d.length&&(e.is("."+a.list)||(e=e.find("> ."+a.list)),e.length&&!e.data(o.updatecounter)&&(e.data(o.updatecounter,!0),s._update(function(){var t=e.children().not("."+a.label).not("."+a.subtitle).not("."+a.hidden).not("."+a.search).not("."+a.noresultsmsg);d.html(t.length)})))}})},_setup:function(){var a=this.opts[n];"boolean"==typeof a&&(a={add:a,update:a}),"object"!=typeof a&&(a={}),a=t.extend(!0,{},t[e].defaults[n],a),this.opts[n]=a},_add:function(){a=t[e]._c,o=t[e]._d,s=t[e]._e,a.add("counter search noresultsmsg"),o.add("updatecounter"),d=t[e].glbl}},t[e].defaults[n]={add:!1,update:!1},t[e].configuration.classNames[n]={counter:"Counter"};var a,o,s,d}(jQuery); 1229!function(e){var t="mmenu",a="header";e[t].addons[a]={_init:function(s){var i=this,o=this.opts[a],l=(this.conf[a
1229],e("."+n.header,this.$menu));if(l.length){if(o.update){var h=l.find("."+n.title),c=l.find("."+n.prev),f=l.find("."+n.next),p=l.find("."+n.close),u=!1;r.$page&&(u="#"+r.$page.attr("id"),p.attr("href",u)),s.each(function(){var t=e(this),s=t.find("."+i.conf.classNames[a].panelHeader),r=t.find("."+i.conf.classNames[a].panelPrev),l=t.find("."+i.conf.classNames[a].panelNext),p=s.html(),u=r.attr("href"),v=l.attr("href"),m=r.html(),b=l.html();p||(p=t.find("."+n.subclose).html()),p||(p=o.title),u||(u=t.find("."+n.subclose).attr("href"));var x=function(){h[p?"show":"hide"](),h.html(p),c[u?"attr":"removeAttr"]("href",u),c[u||m?"show":"hide"](),c.html(m),f[v?"attr":"removeAttr"]("href",v),f[v||b?"show":"hide"](),f.html(b)};t.on(d.open,x),t.hasClass(n.current)&&x()})}e[t].addons.buttonbars&&e[t].addons.buttonbars._init.call(this,l)}},_setup:function(){var s=this.opts[a];if(this.conf[a],"boolean"==typeof s&&(s={add:s,update:s}),"object"!=typeof s&&(s={}),"undefined"==typeof s.content&&(s.content=["prev","title","next"]),s=e.extend(!0,{},e[t].defaults[a],s),this.opts[a]=s,s.add){if(s.content instanceof Array){for(var d=e("<div />"),r=0,i=s.content.length;i>r;r++)switch(s.content[r]){case"prev":case"next":case"close":d.append('<a class="'+n[s.content[r]]+'" href="#"></a>');break;case"title":d.append('<span class="'+n.title+'"></span>');break;default:d.append(s.content[r])}d=d.html()}else var d=s.content;e('<div class="'+n.header+'" />').prependTo(this.$menu).append(d),this.$menu.addClass(n.hasheader)}},_add:function(){n=e[t]._c,s=e[t]._d,d=e[t]._e,n.add("header hasheader prev next close title"),r=e[t].glbl}},e[t].defaults[a]={add:!1,title:"Menu",update:!1},e[t].configuration.classNames[a]={panelHeader:"Header",panelNext:"Next",panelPrev:"Prev"};var n,s,d,r}(jQuery); 1230(function( factory ) { 1231if ( typeof define === "function" && define.amd ) { 1232define([ "jquery" ], factory ); 1233} else { 1234factory( jQuery ); 1235} 1236}(function( $ ) { 1237$.ui = $.ui || {}; 1238$.extend( $.ui, { 1239version: "1.11.4", 1240keyCode: { 1241BACKSPACE: 8, 1242COMMA: 188, 1243DELETE: 46, 1244DOWN: 40, 1245END: 35, 1246ENTER: 13, 1247ESCAPE: 27, 1248HOME: 36, 1249LEFT: 37, 1250PAGE_DOWN: 34, 1251PAGE_UP: 33, 1252PERIOD: 190, 1253RIGHT: 39, 1254SPACE: 32, 1255TAB: 9, 1256UP: 38 1257} 1258}); 1259$.fn.extend({ 1260scrollParent: function( includeHidden ) { 1261var position = this.css( "position" ), 1262excludeStaticParent = position === "absolute", 1263overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, 1264scrollParent = this.parents().filter( function() { 1265var parent = $( this ); 1266if ( excludeStaticParent && parent.css( "position" ) === "static" ) { 1267return false; 1268} 1269return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) ); 1270}).eq( 0 ); 1271return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent; 1272}, 1273uniqueId: (function() { 1274var uuid = 0; 1275return function() { 1276return this.each(function() { 1277if ( !this.id ) { 1278this.id = "ui-id-" + ( ++uuid ); 1279} 1280}); 1281}; 1282})(), 1283removeUniqueId: function() { 1284return this.each(function() { 1285if ( /^ui-id-\d+$/.test( this.id ) ) { 1286$( this ).removeAttr( "id" ); 1287} 1288}); 1289} 1290}); 1291function focusable( element, isTabIndexNotNaN ) { 1292var map, mapName, img, 1293nodeName = element.nodeName.toLowerCase(); 1294if ( "area" === nodeName ) { 1295map = element.parentNode; 1296mapName = map.name; 1297if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { 1298return false; 1299} 1300img = $( "img[usemap='#" + mapName + "']" )[ 0 ]; 1301return !!img && visible( img ); 1302} 1303return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ? 1304!element.disabled : 1305"a" === nodeName ? 1306element.href || isTabIndexNotNaN : 1307isTabIndexNotNaN) && 1308visible( element ); 1309} 1310function visible( element ) { 1311return $.expr.filters.visible( element ) && 1312!$( element ).parents().addBack().filter(function() { 1313return $.css( this, "visibility" ) === "hidden"; 1314}).length; 1315} 1316$.extend( $.expr[ ":" ], { 1317data: $.expr.createPseudo ? 1318$.expr.createPseudo(function( dataName ) { 1319return function( elem ) { 1320return !!$.data( elem, dataName ); 1321}; 1322}) : 1323function( elem, i, match ) { 1324return !!$.data( elem, match[ 3 ] ); 1325}, 1326focusable: function( element ) { 1327return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); 1328}, 1329tabbable: function( element ) { 1330var tabIndex = $.attr( element, "tabindex" ), 1331isTabIndexNaN = isNaN( tabIndex ); 1332return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); 1333} 1334}); 1335if ( !$( "<a>" ).outerWidth( 1 ).jquery ) { 1336$.each( [ "Width", "Height" ], function( i, name ) { 1337var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], 1338type = name.toLowerCase(), 1339orig = { 1340innerWidth: $.fn.innerWidth, 1341innerHeight: $.fn.innerHeight, 1342outerWidth: $.fn.outerWidth, 1343outerHeight: $.fn.outerHeight 1344}; 1345function reduce( elem, size, border, margin ) { 1346$.each( side, function() { 1347size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; 1348if ( border ) { 1349size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; 1350} 1351if ( margin ) { 1352size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; 1353} 1354}); 1355return size; 1356}
vendor: 4,451 bytes, lines 1357-1531
1357$.fn[ "inner" + name ] = function( size ) { 1358if ( size === undefined ) { 1359return orig[ "inner" + name ].call( this ); 1360} 1361return this.each(function() { 1362$( this ).css( type, reduce( this, size ) + "px" ); 1363}); 1364}; 1365$.fn[ "outer" + name] = function( size, margin ) { 1366if ( typeof size !== "number" ) { 1367return orig[ "outer" + name ].call( this, size ); 1368} 1369return this.each(function() { 1370$( this).css( type, reduce( this, size, true, margin ) + "px" ); 1371}); 1372}; 1373}); 1374} 1375if ( !$.fn.addBack ) { 1376$.fn.addBack = function( selector ) { 1377return this.add( selector == null ? 1378this.prevObject : this.prevObject.filter( selector ) 1379); 1380}; 1381} 1382if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { 1383$.fn.removeData = (function( removeData ) { 1384return function( key ) { 1385if ( arguments.length ) { 1386return removeData.call( this, $.camelCase( key ) ); 1387} else { 1388return removeData.call( this ); 1389} 1390}; 1391})( $.fn.removeData ); 1392} 1393$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); 1394$.fn.extend({ 1395focus: (function( orig ) { 1396return function( delay, fn ) { 1397return typeof delay === "number" ? 1398this.each(function() { 1399var elem = this; 1400setTimeout(function() { 1401$( elem ).focus(); 1402if ( fn ) { 1403fn.call( elem ); 1404} 1405}, delay ); 1406}) : 1407orig.apply( this, arguments ); 1408}; 1409})( $.fn.focus ), 1410disableSelection: (function() { 1411var eventType = "onselectstart" in document.createElement( "div" ) ? 1412"selectstart" : 1413"mousedown"; 1414return function() { 1415return this.bind( eventType + ".ui-disableSelection", function( event ) { 1416event.preventDefault(); 1417}); 1418}; 1419})(), 1420enableSelection: function() { 1421return this.unbind( ".ui-disableSelection" ); 1422}, 1423zIndex: function( zIndex ) { 1424if ( zIndex !== undefined ) { 1425return this.css( "zIndex", zIndex ); 1426} 1427if ( this.length ) { 1428var elem = $( this[ 0 ] ), position, value; 1429while ( elem.length && elem[ 0 ] !== document ) { 1430position = elem.css( "position" ); 1431if ( position === "absolute" || position === "relative" || position === "fixed" ) { 1432value = parseInt( elem.css( "zIndex" ), 10 ); 1433if ( !isNaN( value ) && value !== 0 ) { 1434return value; 1435} 1436} 1437elem = elem.parent(); 1438} 1439} 1440return 0; 1441} 1442}); 1443$.ui.plugin = { 1444add: function( module, option, set ) { 1445var i, 1446proto = $.ui[ module ].prototype; 1447for ( i in set ) { 1448proto.plugins[ i ] = proto.plugins[ i ] || []; 1449proto.plugins[ i ].push( [ option, set[ i ] ] ); 1450} 1451}, 1452call: function( instance, name, args, allowDisconnected ) { 1453var i, 1454set = instance.plugins[ name ]; 1455if ( !set ) { 1456return; 1457} 1458if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) { 1459return; 1460} 1461for ( i = 0; i < set.length; i++ ) { 1462if ( instance.options[ set[ i ][ 0 ] ] ) { 1463set[ i ][ 1 ].apply( instance.element, args ); 1464} 1465} 1466} 1467}; 1468var widget_uuid = 0, 1469widget_slice = Array.prototype.slice; 1470$.cleanData = (function( orig ) { 1471return function( elems ) { 1472var events, elem, i; 1473for ( i = 0; (elem = elems[i]) != null; i++ ) { 1474try { 1475events = $._data( elem, "events" ); 1476if ( events && events.remove ) { 1477$( elem ).triggerHandler( "remove" ); 1478} 1479} catch ( e ) {} 1480} 1481orig( elems ); 1482}; 1483})( $.cleanData ); 1484$.widget = function( name, base, prototype ) { 1485var fullName, existingConstructor, constructor, basePrototype, 1486proxiedPrototype = {}, 1487namespace = name.split( "." )[ 0 ]; 1488name = name.split( "." )[ 1 ]; 1489fullName = namespace + "-" + name; 1490if ( !prototype ) { 1491prototype = base; 1492base = $.Widget; 1493} 1494$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { 1495return !!$.data( elem, fullName ); 1496}; 1497$[ namespace ] = $[ namespace ] || {}; 1498existingConstructor = $[ namespace ][ name ]; 1499constructor = $[ namespace ][ name ] = function( options, element ) { 1500if ( !this._createWidget ) { 1501return new constructor( options, element ); 1502} 1503if ( arguments.length ) { 1504this._createWidget( options, element ); 1505} 1506}; 1507$.extend( constructor, existingConstructor, { 1508version: prototype.version, 1509_proto: $.extend( {}, prototype ), 1510_childConstructors: [] 1511}); 1512basePrototype = new base(); 1513basePrototype.options = $.widget.extend( {}, basePrototype.options ); 1514$.each( prototype, function( prop, value ) { 1515if ( !$.isFunction( value ) ) { 1516proxiedPrototype[ prop ] = value; 1517return; 1518} 1519proxiedPrototype[ prop ] = (function() { 1520var _super = function() { 1521return base.prototype[ prop ].apply( this, arguments ); 1522}, 1523_superApply = function( args ) { 1524return base.prototype[ prop ].apply( this, args ); 1525}; 1526return function() { 1527var __super = this._super, 1528__superApply = this._superApply, 1529returnValue; 1530this._super = _super; 1531this._superApply = _superApply;
vendor: 12,661 bytes, lines 1532-1991
1532returnValue = value.apply( this, arguments ); 1533this._super = __super; 1534this._superApply = __superApply; 1535return returnValue; 1536}; 1537})(); 1538}); 1539constructor.prototype = $.widget.extend( basePrototype, { 1540widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name 1541}, proxiedPrototype, { 1542constructor: constructor, 1543namespace: namespace, 1544widgetName: name, 1545widgetFullName: fullName 1546}); 1547if ( existingConstructor ) { 1548$.each( existingConstructor._childConstructors, function( i, child ) { 1549var childPrototype = child.prototype; 1550$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); 1551}); 1552delete existingConstructor._childConstructors; 1553} else { 1554base._childConstructors.push( constructor ); 1555} 1556$.widget.bridge( name, constructor ); 1557return constructor; 1558}; 1559$.widget.extend = function( target ) { 1560var input = widget_slice.call( arguments, 1 ), 1561inputIndex = 0, 1562inputLength = input.length, 1563key, 1564value; 1565for ( ; inputIndex < inputLength; inputIndex++ ) { 1566for ( key in input[ inputIndex ] ) { 1567value = input[ inputIndex ][ key ]; 1568if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { 1569if ( $.isPlainObject( value ) ) { 1570target[ key ] = $.isPlainObject( target[ key ] ) ? 1571$.widget.extend( {}, target[ key ], value ) : 1572$.widget.extend( {}, value ); 1573} else { 1574target[ key ] = value; 1575} 1576} 1577} 1578} 1579return target; 1580}; 1581$.widget.bridge = function( name, object ) { 1582var fullName = object.prototype.widgetFullName || name; 1583$.fn[ name ] = function( options ) { 1584var isMethodCall = typeof options === "string", 1585args = widget_slice.call( arguments, 1 ), 1586returnValue = this; 1587if ( isMethodCall ) { 1588this.each(function() { 1589var methodValue, 1590instance = $.data( this, fullName ); 1591if ( options === "instance" ) { 1592returnValue = instance; 1593return false; 1594} 1595if ( !instance ) { 1596return $.error( "cannot call methods on " + name + " prior to initialization; " + 1597"attempted to call method '" + options + "'" ); 1598} 1599if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { 1600return $.error( "no such method '" + options + "' for " + name + " widget instance" ); 1601} 1602methodValue = instance[ options ].apply( instance, args ); 1603if ( methodValue !== instance && methodValue !== undefined ) { 1604returnValue = methodValue && methodValue.jquery ? 1605returnValue.pushStack( methodValue.get() ) : 1606methodValue; 1607return false; 1608} 1609}); 1610} else { 1611if ( args.length ) { 1612options = $.widget.extend.apply( null, [ options ].concat(args) ); 1613} 1614this.each(function() { 1615var instance = $.data( this, fullName ); 1616if ( instance ) { 1617instance.option( options || {} ); 1618if ( instance._init ) { 1619instance._init(); 1620} 1621} else { 1622$.data( this, fullName, new object( options, this ) ); 1623} 1624}); 1625} 1626return returnValue; 1627}; 1628}; 1629$.Widget = function( ) {}; 1630$.Widget._childConstructors = []; 1631$.Widget.prototype = { 1632widgetName: "widget", 1633widgetEventPrefix: "", 1634defaultElement: "<div>", 1635options: { 1636disabled: false, 1637create: null 1638}, 1639_createWidget: function( options, element ) { 1640element = $( element || this.defaultElement || this )[ 0 ]; 1641this.element = $( element ); 1642this.uuid = widget_uuid++; 1643this.eventNamespace = "." + this.widgetName + this.uuid; 1644this.bindings = $(); 1645this.hoverable = $(); 1646this.focusable = $(); 1647if ( element !== this ) { 1648$.data( element, this.widgetFullName, this ); 1649this._on( true, this.element, { 1650remove: function( event ) { 1651if ( event.target === element ) { 1652this.destroy(); 1653} 1654} 1655}); 1656this.document = $( element.style ? 1657element.ownerDocument : 1658element.document || element ); 1659this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); 1660} 1661this.options = $.widget.extend( {}, 1662this.options, 1663this._getCreateOptions(), 1664options ); 1665this._create(); 1666this._trigger( "create", null, this._getCreateEventData() ); 1667this._init(); 1668}, 1669_getCreateOptions: $.noop, 1670_getCreateEventData: $.noop, 1671_create: $.noop, 1672_init: $.noop, 1673destroy: function() { 1674this._destroy(); 1675this.element 1676.unbind( this.eventNamespace ) 1677.removeData( this.widgetFullName ) 1678.removeData( $.camelCase( this.widgetFullName ) ); 1679this.widget() 1680.unbind( this.eventNamespace ) 1681.removeAttr( "aria-disabled" ) 1682.removeClass( 1683this.widgetFullName + "-disabled " + 1684"ui-state-disabled" ); 1685this.bindings.unbind( this.eventNamespace ); 1686this.hoverable.removeClass( "ui-state-hover" ); 1687this.focusable.removeClass( "ui-state-focus" ); 1688}, 1689_destroy: $.noop, 1690widget: function() { 1691return this.element; 1692}, 1693option: function( key, value ) { 1694var options = key, 1695parts, 1696curOption, 1697i; 1698if ( arguments.length === 0 ) { 1699return $.widget.extend( {}, this.options ); 1700} 1701if ( typeof key === "string" ) { 1702options = {}; 1703parts = key.split( "." ); 1704key = parts.shift(); 1705if ( parts.length ) { 1706curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); 1707for ( i = 0; i < parts.length - 1; i++ ) { 1708curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; 1709curOption = curOption[ parts[ i ] ]; 1710} 1711key = parts.pop(); 1712if ( arguments.length === 1 ) { 1713return curOption[ key ] === undefined ? null : curOption[ key ]; 1714} 1715curOption[ key ] = value; 1716} else { 1717if ( arguments.length === 1 ) { 1718return this.options[ key ] === undefined ? null : this.options[ key ]; 1719} 1720options[ key ] = value; 1721} 1722} 1723this._setOptions( options ); 1724return this; 1725}, 1726_setOptions: function( options ) { 1727var key; 1728for ( key in options ) { 1729this._setOption( key, options[ key ] ); 1730} 1731return this; 1732}, 1733_setOption: function( key, value ) { 1734this.options[ key ] = value; 1735if ( key === "disabled" ) { 1736this.widget() 1737.toggleClass( this.widgetFullName + "-disabled", !!value ); 1738if ( value ) { 1739this.hoverable.removeClass( "ui-state-hover" ); 1740this.focusable.removeClass( "ui-state-focus" ); 1741} 1742} 1743return this; 1744}, 1745enable: function() { 1746return this._setOptions({ disabled: false }); 1747}, 1748disable: function() { 1749return this._setOptions({ disabled: true }); 1750}, 1751_on: function( suppressDisabledCheck, element, handlers ) { 1752var delegateElement, 1753instance = this; 1754if ( typeof suppressDisabledCheck !== "boolean" ) { 1755handlers = element; 1756element = suppressDisabledCheck; 1757suppressDisabledCheck = false; 1758} 1759if ( !handlers ) { 1760handlers = element; 1761element = this.element; 1762delegateElement = this.widget(); 1763} else { 1764element = delegateElement = $( element ); 1765this.bindings = this.bindings.add( element ); 1766} 1767$.each( handlers, function( event, handler ) { 1768function handlerProxy() { 1769if ( !suppressDisabledCheck && 1770( instance.options.disabled === true || 1771$( this ).hasClass( "ui-state-disabled" ) ) ) { 1772return; 1773} 1774return ( typeof handler === "string" ? instance[ handler ] : handler ) 1775.apply( instance, arguments ); 1776} 1777if ( typeof handler !== "string" ) { 1778handlerProxy.guid = handler.guid = 1779handler.guid || handlerProxy.guid || $.guid++; 1780} 1781var match = event.match( /^([\w:-]*)\s*(.*)$/ ), 1782eventName = match[1] + instance.eventNamespace, 1783selector = match[2]; 1784if ( selector ) { 1785delegateElement.delegate( selector, eventName, handlerProxy ); 1786} else { 1787element.bind( eventName, handlerProxy ); 1788} 1789}); 1790}, 1791_off: function( element, eventName ) { 1792eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + 1793this.eventNamespace; 1794element.unbind( eventName ).undelegate( eventName ); 1795this.bindings = $( this.bindings.not( element ).get() ); 1796this.focusable = $( this.focusable.not( element ).get() ); 1797this.hoverable = $( this.hoverable.not( element ).get() ); 1798}, 1799_delay: function( handler, delay ) { 1800function handlerProxy() { 1801return ( typeof handler === "string" ? instance[ handler ] : handler ) 1802.apply( instance, arguments ); 1803} 1804var instance = this; 1805return setTimeout( handlerProxy, delay || 0 ); 1806}, 1807_hoverable: function( element ) { 1808this.hoverable = this.hoverable.add( element ); 1809this._on( element, { 1810mouseenter: function( event ) { 1811$( event.currentTarget ).addClass( "ui-state-hover" ); 1812}, 1813mouseleave: function( event ) { 1814$( event.currentTarget ).removeClass( "ui-state-hover" ); 1815} 1816}); 1817}, 1818_focusable: function( element ) { 1819this.focusable = this.focusable.add( element ); 1820this._on( element, { 1821focusin: function( event ) { 1822$( event.currentTarget ).addClass( "ui-state-focus" ); 1823}, 1824focusout: function( event ) { 1825$( event.currentTarget ).removeClass( "ui-state-focus" ); 1826} 1827}); 1828}, 1829_trigger: function( type, event, data ) { 1830var prop, orig, 1831callback = this.options[ type ]; 1832data = data || {}; 1833event = $.Event( event ); 1834event.type = ( type === this.widgetEventPrefix ? 1835type : 1836this.widgetEventPrefix + type ).toLowerCase(); 1837event.target = this.element[ 0 ]; 1838orig = event.originalEvent; 1839if ( orig ) { 1840for ( prop in orig ) { 1841if ( !( prop in event ) ) { 1842event[ prop ] = orig[ prop ]; 1843} 1844} 1845} 1846this.element.trigger( event, data ); 1847return !( $.isFunction( callback ) && 1848callback.apply( this.element[0], [ event ].concat( data ) ) === false || 1849event.isDefaultPrevented() ); 1850} 1851}; 1852$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { 1853$.Widget.prototype[ "_" + method ] = function( element, options, callback ) { 1854if ( typeof options === "string" ) { 1855options = { effect: options }; 1856} 1857var hasOptions, 1858effectName = !options ? 1859method : 1860options === true || typeof options === "number" ? 1861defaultEffect : 1862options.effect || defaultEffect; 1863options = options || {}; 1864if ( typeof options === "number" ) { 1865options = { duration: options }; 1866} 1867hasOptions = !$.isEmptyObject( options ); 1868options.complete = callback; 1869if ( options.delay ) { 1870element.delay( options.delay ); 1871} 1872if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { 1873element[ method ]( options ); 1874} else if ( effectName !== method && element[ effectName ] ) { 1875element[ effectName ]( options.duration, options.easing, callback ); 1876} else { 1877element.queue(function( next ) { 1878$( this )[ method ](); 1879if ( callback ) { 1880callback.call( element[ 0 ] ); 1881} 1882next(); 1883}); 1884} 1885}; 1886}); 1887var widget = $.widget; 1888var mouseHandled = false; 1889$( document ).mouseup( function() { 1890mouseHandled = false; 1891}); 1892var mouse = $.widget("ui.mouse", { 1893version: "1.11.4", 1894options: { 1895cancel: "input,textarea,button,select,option", 1896distance: 1, 1897delay: 0 1898}, 1899_mouseInit: function() { 1900var that = this; 1901this.element 1902.bind("mousedown." + this.widgetName, function(event) { 1903return that._mouseDown(event); 1904}) 1905.bind("click." + this.widgetName, function(event) { 1906if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { 1907$.removeData(event.target, that.widgetName + ".preventClickEvent"); 1908event.stopImmediatePropagation(); 1909return false; 1910} 1911}); 1912this.started = false; 1913}, 1914_mouseDestroy: function() { 1915this.element.unbind("." + this.widgetName); 1916if ( this._mouseMoveDelegate ) { 1917this.document 1918.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate) 1919.unbind("mouseup." + this.widgetName, this._mouseUpDelegate); 1920} 1921}, 1922_mouseDown: function(event) { 1923if ( mouseHandled ) { 1924return; 1925} 1926this._mouseMoved = false; 1927(this._mouseStarted && this._mouseUp(event)); 1928this._mouseDownEvent = event; 1929var that = this, 1930btnIsLeft = (event.which === 1), 1931elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); 1932if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { 1933return true; 1934} 1935this.mouseDelayMet = !this.options.delay; 1936if (!this.mouseDelayMet) { 1937this._mouseDelayTimer = setTimeout(function() { 1938that.mouseDelayMet = true; 1939}, this.options.delay); 1940} 1941if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { 1942this._mouseStarted = (this._mouseStart(event) !== false); 1943if (!this._mouseStarted) { 1944event.preventDefault(); 1945return true; 1946} 1947} 1948if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { 1949$.removeData(event.target, this.widgetName + ".preventClickEvent"); 1950} 1951this._mouseMoveDelegate = function(event) { 1952return that._mouseMove(event); 1953}; 1954this._mouseUpDelegate = function(event) { 1955return that._mouseUp(event); 1956}; 1957this.document 1958.bind( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 1959.bind( "mouseup." + this.widgetName, this._mouseUpDelegate ); 1960event.preventDefault(); 1961mouseHandled = true; 1962return true; 1963}, 1964_mouseMove: function(event) { 1965if ( this._mouseMoved ) { 1966if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { 1967return this._mouseUp(event); 1968} else if ( !event.which ) { 1969return this._mouseUp( event ); 1970} 1971} 1972if ( event.which || event.button ) { 1973this._mouseMoved = true; 1974} 1975if (this._mouseStarted) { 1976this._mouseDrag(event); 1977return event.preventDefault(); 1978} 1979if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { 1980this._mouseStarted = 1981(this._mouseStart(this._mouseDownEvent, event) !== false); 1982(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); 1983} 1984return !this._mouseStarted; 1985}, 1986_mouseUp: function(event) { 1987this.document 1988.unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 1989.unbind( "mouseup." + this.widgetName, this._mouseUpDelegate ); 1990if (this._mouseStarted) { 1991this._mouseStarted = false;
vendor: 6,861 bytes, lines 1992-2214
1992if (event.target === this._mouseDownEvent.target) { 1993$.data(event.target, this.widgetName + ".preventClickEvent", true); 1994} 1995this._mouseStop(event); 1996} 1997mouseHandled = false; 1998return false; 1999}, 2000_mouseDistanceMet: function(event) { 2001return (Math.max( 2002Math.abs(this._mouseDownEvent.pageX - event.pageX), 2003Math.abs(this._mouseDownEvent.pageY - event.pageY) 2004) >= this.options.distance 2005); 2006}, 2007_mouseDelayMet: function(/* event */) { 2008return this.mouseDelayMet; 2009}, 2010_mouseStart: function(/* event */) {}, 2011_mouseDrag: function(/* event */) {}, 2012_mouseStop: function(/* event */) {}, 2013_mouseCapture: function(/* event */) { return true; } 2014}); 2015(function() { 2016$.ui = $.ui || {}; 2017var cachedScrollbarWidth, supportsOffsetFractions, 2018max = Math.max, 2019abs = Math.abs, 2020round = Math.round, 2021rhorizontal = /left|center|right/, 2022rvertical = /top|center|bottom/, 2023roffset = /[\+\-]\d+(\.[\d]+)?%?/, 2024rposition = /^\w+/, 2025rpercent = /%$/, 2026_position = $.fn.position; 2027function getOffsets( offsets, width, height ) { 2028return [ 2029parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), 2030parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) 2031]; 2032} 2033function parseCss( element, property ) { 2034return parseInt( $.css( element, property ), 10 ) || 0; 2035} 2036function getDimensions( elem ) { 2037var raw = elem[0]; 2038if ( raw.nodeType === 9 ) { 2039return { 2040width: elem.width(), 2041height: elem.height(), 2042offset: { top: 0, left: 0 } 2043}; 2044} 2045if ( $.isWindow( raw ) ) { 2046return { 2047width: elem.width(), 2048height: elem.height(), 2049offset: { top: elem.scrollTop(), left: elem.scrollLeft() } 2050}; 2051} 2052if ( raw.preventDefault ) { 2053return { 2054width: 0, 2055height: 0, 2056offset: { top: raw.pageY, left: raw.pageX } 2057}; 2058} 2059return { 2060width: elem.outerWidth(), 2061height: elem.outerHeight(), 2062offset: elem.offset() 2063}; 2064} 2065$.position = { 2066scrollbarWidth: function() { 2067if ( cachedScrollbarWidth !== undefined ) { 2068return cachedScrollbarWidth; 2069} 2070var w1, w2, 2071div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ), 2072innerDiv = div.children()[0]; 2073$( "body" ).append( div ); 2074w1 = innerDiv.offsetWidth; 2075div.css( "overflow", "scroll" ); 2076w2 = innerDiv.offsetWidth; 2077if ( w1 === w2 ) { 2078w2 = div[0].clientWidth; 2079} 2080div.remove(); 2081return (cachedScrollbarWidth = w1 - w2); 2082}, 2083getScrollInfo: function( within ) { 2084var overflowX = within.isWindow || within.isDocument ? "" : 2085within.element.css( "overflow-x" ), 2086overflowY = within.isWindow || within.isDocument ? "" : 2087within.element.css( "overflow-y" ), 2088hasOverflowX = overflowX === "scroll" || 2089( overflowX === "auto" && within.width < within.element[0].scrollWidth ), 2090hasOverflowY = overflowY === "scroll" || 2091( overflowY === "auto" && within.height < within.element[0].scrollHeight ); 2092return { 2093width: hasOverflowY ? $.position.scrollbarWidth() : 0, 2094height: hasOverflowX ? $.position.scrollbarWidth() : 0 2095}; 2096}, 2097getWithinInfo: function( element ) { 2098var withinElement = $( element || window ), 2099isWindow = $.isWindow( withinElement[0] ), 2100isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9; 2101return { 2102element: withinElement, 2103isWindow: isWindow, 2104isDocument: isDocument, 2105offset: withinElement.offset() || { left: 0, top: 0 }, 2106scrollLeft: withinElement.scrollLeft(), 2107scrollTop: withinElement.scrollTop(), 2108width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(), 2109height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight() 2110}; 2111} 2112}; 2113$.fn.position = function( options ) { 2114if ( !options || !options.of ) { 2115return _position.apply( this, arguments ); 2116} 2117options = $.extend( {}, options ); 2118var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, 2119target = $( options.of ), 2120within = $.position.getWithinInfo( options.within ), 2121scrollInfo = $.position.getScrollInfo( within ), 2122collision = ( options.collision || "flip" ).split( " " ), 2123offsets = {}; 2124dimensions = getDimensions( target ); 2125if ( target[0].preventDefault ) { 2126options.at = "left top"; 2127} 2128targetWidth = dimensions.width; 2129targetHeight = dimensions.height; 2130targetOffset = dimensions.offset; 2131basePosition = $.extend( {}, targetOffset ); 2132$.each( [ "my", "at" ], function() { 2133var pos = ( options[ this ] || "" ).split( " " ), 2134horizontalOffset, 2135verticalOffset; 2136if ( pos.length === 1) { 2137pos = rhorizontal.test( pos[ 0 ] ) ? 2138pos.concat( [ "center" ] ) : 2139rvertical.test( pos[ 0 ] ) ? 2140[ "center" ].concat( pos ) : 2141[ "center", "center" ]; 2142} 2143pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; 2144pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; 2145horizontalOffset = roffset.exec( pos[ 0 ] ); 2146verticalOffset = roffset.exec( pos[ 1 ] ); 2147offsets[ this ] = [ 2148horizontalOffset ? horizontalOffset[ 0 ] : 0, 2149verticalOffset ? verticalOffset[ 0 ] : 0 2150]; 2151options[ this ] = [ 2152rposition.exec( pos[ 0 ] )[ 0 ], 2153rposition.exec( pos[ 1 ] )[ 0 ] 2154]; 2155}); 2156if ( collision.length === 1 ) { 2157collision[ 1 ] = collision[ 0 ]; 2158} 2159if ( options.at[ 0 ] === "right" ) { 2160basePosition.left += targetWidth; 2161} else if ( options.at[ 0 ] === "center" ) { 2162basePosition.left += targetWidth / 2; 2163} 2164if ( options.at[ 1 ] === "bottom" ) { 2165basePosition.top += targetHeight; 2166} else if ( options.at[ 1 ] === "center" ) { 2167basePosition.top += targetHeight / 2; 2168} 2169atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); 2170basePosition.left += atOffset[ 0 ]; 2171basePosition.top += atOffset[ 1 ]; 2172return this.each(function() { 2173var collisionPosition, using, 2174elem = $( this ), 2175elemWidth = elem.outerWidth(), 2176elemHeight = elem.outerHeight(), 2177marginLeft = parseCss( this, "marginLeft" ), 2178marginTop = parseCss( this, "marginTop" ), 2179collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width, 2180collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height, 2181position = $.extend( {}, basePosition ), 2182myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); 2183if ( options.my[ 0 ] === "right" ) { 2184position.left -= elemWidth; 2185} else if ( options.my[ 0 ] === "center" ) { 2186position.left -= elemWidth / 2; 2187} 2188if ( options.my[ 1 ] === "bottom" ) { 2189position.top -= elemHeight; 2190} else if ( options.my[ 1 ] === "center" ) { 2191position.top -= elemHeight / 2; 2192} 2193position.left += myOffset[ 0 ]; 2194position.top += myOffset[ 1 ]; 2195if ( !supportsOffsetFractions ) { 2196position.left = round( position.left ); 2197position.top = round( position.top ); 2198} 2199collisionPosition = { 2200marginLeft: marginLeft, 2201marginTop: marginTop 2202}; 2203$.each( [ "left", "top" ], function( i, dir ) { 2204if ( $.ui.position[ collision[ i ] ] ) { 2205$.ui.position[ collision[ i ] ][ dir ]( position, { 2206targetWidth: targetWidth, 2207targetHeight: targetHeight, 2208elemWidth: elemWidth, 2209elemHeight: elemHeight, 2210collisionPosition: collisionPosition, 2211collisionWidth: collisionWidth, 2212collisionHeight: collisionHeight, 2213offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], 2214my: options.my,
vendor: 4,837 bytes, lines 2215-2370
2215at: options.at, 2216within: within, 2217elem: elem 2218}); 2219} 2220}); 2221if ( options.using ) { 2222using = function( props ) { 2223var left = targetOffset.left - position.left, 2224right = left + targetWidth - elemWidth, 2225top = targetOffset.top - position.top, 2226bottom = top + targetHeight - elemHeight, 2227feedback = { 2228target: { 2229element: target, 2230left: targetOffset.left, 2231top: targetOffset.top, 2232width: targetWidth, 2233height: targetHeight 2234}, 2235element: { 2236element: elem, 2237left: position.left, 2238top: position.top, 2239width: elemWidth, 2240height: elemHeight 2241}, 2242horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", 2243vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" 2244}; 2245if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { 2246feedback.horizontal = "center"; 2247} 2248if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { 2249feedback.vertical = "middle"; 2250} 2251if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { 2252feedback.important = "horizontal"; 2253} else { 2254feedback.important = "vertical"; 2255} 2256options.using.call( this, props, feedback ); 2257}; 2258} 2259elem.offset( $.extend( position, { using: using } ) ); 2260}); 2261}; 2262$.ui.position = { 2263fit: { 2264left: function( position, data ) { 2265var within = data.within, 2266withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, 2267outerWidth = within.width, 2268collisionPosLeft = position.left - data.collisionPosition.marginLeft, 2269overLeft = withinOffset - collisionPosLeft, 2270overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, 2271newOverRight; 2272if ( data.collisionWidth > outerWidth ) { 2273if ( overLeft > 0 && overRight <= 0 ) { 2274newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; 2275position.left += overLeft - newOverRight; 2276} else if ( overRight > 0 && overLeft <= 0 ) { 2277position.left = withinOffset; 2278} else { 2279if ( overLeft > overRight ) { 2280position.left = withinOffset + outerWidth - data.collisionWidth; 2281} else { 2282position.left = withinOffset; 2283} 2284} 2285} else if ( overLeft > 0 ) { 2286position.left += overLeft; 2287} else if ( overRight > 0 ) { 2288position.left -= overRight; 2289} else { 2290position.left = max( position.left - collisionPosLeft, position.left ); 2291} 2292}, 2293top: function( position, data ) { 2294var within = data.within, 2295withinOffset = within.isWindow ? within.scrollTop : within.offset.top, 2296outerHeight = data.within.height, 2297collisionPosTop = position.top - data.collisionPosition.marginTop, 2298overTop = withinOffset - collisionPosTop, 2299overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, 2300newOverBottom; 2301if ( data.collisionHeight > outerHeight ) { 2302if ( overTop > 0 && overBottom <= 0 ) { 2303newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset; 2304position.top += overTop - newOverBottom; 2305} else if ( overBottom > 0 && overTop <= 0 ) { 2306position.top = withinOffset; 2307} else { 2308if ( overTop > overBottom ) { 2309position.top = withinOffset + outerHeight - data.collisionHeight; 2310} else { 2311position.top = withinOffset; 2312} 2313} 2314} else if ( overTop > 0 ) { 2315position.top += overTop; 2316} else if ( overBottom > 0 ) { 2317position.top -= overBottom; 2318} else { 2319position.top = max( position.top - collisionPosTop, position.top ); 2320} 2321} 2322}, 2323flip: { 2324left: function( position, data ) { 2325var within = data.within, 2326withinOffset = within.offset.left + within.scrollLeft, 2327outerWidth = within.width, 2328offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, 2329collisionPosLeft = position.left - data.collisionPosition.marginLeft, 2330overLeft = collisionPosLeft - offsetLeft, 2331overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, 2332myOffset = data.my[ 0 ] === "left" ? 2333-data.elemWidth : 2334data.my[ 0 ] === "right" ? 2335data.elemWidth : 23360, 2337atOffset = data.at[ 0 ] === "left" ? 2338data.targetWidth : 2339data.at[ 0 ] === "right" ? 2340-data.targetWidth : 23410, 2342offset = -2 * data.offset[ 0 ], 2343newOverRight, 2344newOverLeft; 2345if ( overLeft < 0 ) { 2346newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; 2347if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { 2348position.left += myOffset + atOffset + offset; 2349} 2350} else if ( overRight > 0 ) { 2351newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; 2352if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { 2353position.left += myOffset + atOffset + offset; 2354} 2355} 2356}, 2357top: function( position, data ) { 2358var within = data.within, 2359withinOffset = within.offset.top + within.scrollTop, 2360outerHeight = within.height, 2361offsetTop = within.isWindow ? within.scrollTop : within.offset.top, 2362collisionPosTop = position.top - data.collisionPosition.marginTop, 2363overTop = collisionPosTop - offsetTop, 2364overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, 2365top = data.my[ 1 ] === "top", 2366myOffset = top ? 2367-data.elemHeight : 2368data.my[ 1 ] === "bottom" ? 2369data.elemHeight : 23700,
vendor: 5,173 bytes, lines 2371-2568
2371atOffset = data.at[ 1 ] === "top" ? 2372data.targetHeight : 2373data.at[ 1 ] === "bottom" ? 2374-data.targetHeight : 23750, 2376offset = -2 * data.offset[ 1 ], 2377newOverTop, 2378newOverBottom; 2379if ( overTop < 0 ) { 2380newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; 2381if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) { 2382position.top += myOffset + atOffset + offset; 2383} 2384} else if ( overBottom > 0 ) { 2385newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; 2386if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) { 2387position.top += myOffset + atOffset + offset; 2388} 2389} 2390} 2391}, 2392flipfit: { 2393left: function() { 2394$.ui.position.flip.left.apply( this, arguments ); 2395$.ui.position.fit.left.apply( this, arguments ); 2396}, 2397top: function() { 2398$.ui.position.flip.top.apply( this, arguments ); 2399$.ui.position.fit.top.apply( this, arguments ); 2400} 2401} 2402}; 2403(function() { 2404var testElement, testElementParent, testElementStyle, offsetLeft, i, 2405body = document.getElementsByTagName( "body" )[ 0 ], 2406div = document.createElement( "div" ); 2407testElement = document.createElement( body ? "div" : "body" ); 2408testElementStyle = { 2409visibility: "hidden", 2410width: 0, 2411height: 0, 2412border: 0, 2413margin: 0, 2414background: "none" 2415}; 2416if ( body ) { 2417$.extend( testElementStyle, { 2418position: "absolute", 2419left: "-1000px", 2420top: "-1000px" 2421}); 2422} 2423for ( i in testElementStyle ) { 2424testElement.style[ i ] = testElementStyle[ i ]; 2425} 2426testElement.appendChild( div ); 2427testElementParent = body || document.documentElement; 2428testElementParent.insertBefore( testElement, testElementParent.firstChild ); 2429div.style.cssText = "position: absolute; left: 10.7432222px;"; 2430offsetLeft = $( div ).offset().left; 2431supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11; 2432testElement.innerHTML = ""; 2433testElementParent.removeChild( testElement ); 2434})(); 2435})(); 2436var position = $.ui.position; 2437var accordion = $.widget( "ui.accordion", { 2438version: "1.11.4", 2439options: { 2440active: 0, 2441animate: {}, 2442collapsible: false, 2443event: "click", 2444header: "> li > :first-child,> :not(li):even", 2445heightStyle: "auto", 2446icons: { 2447activeHeader: "ui-icon-triangle-1-s", 2448header: "ui-icon-triangle-1-e" 2449}, 2450activate: null, 2451beforeActivate: null 2452}, 2453hideProps: { 2454borderTopWidth: "hide", 2455borderBottomWidth: "hide", 2456paddingTop: "hide", 2457paddingBottom: "hide", 2458height: "hide" 2459}, 2460showProps: { 2461borderTopWidth: "show", 2462borderBottomWidth: "show", 2463paddingTop: "show", 2464paddingBottom: "show", 2465height: "show" 2466}, 2467_create: function() { 2468var options = this.options; 2469this.prevShow = this.prevHide = $(); 2470this.element.addClass( "ui-accordion ui-widget ui-helper-reset" ) 2471.attr( "role", "tablist" ); 2472if ( !options.collapsible && (options.active === false || options.active == null) ) { 2473options.active = 0; 2474} 2475this._processPanels(); 2476if ( options.active < 0 ) { 2477options.active += this.headers.length; 2478} 2479this._refresh(); 2480}, 2481_getCreateEventData: function() { 2482return { 2483header: this.active, 2484panel: !this.active.length ? $() : this.active.next() 2485}; 2486}, 2487_createIcons: function() { 2488var icons = this.options.icons; 2489if ( icons ) { 2490$( "<span>" ) 2491.addClass( "ui-accordion-header-icon ui-icon " + icons.header ) 2492.prependTo( this.headers ); 2493this.active.children( ".ui-accordion-header-icon" ) 2494.removeClass( icons.header ) 2495.addClass( icons.activeHeader ); 2496this.headers.addClass( "ui-accordion-icons" ); 2497} 2498}, 2499_destroyIcons: function() { 2500this.headers 2501.removeClass( "ui-accordion-icons" ) 2502.children( ".ui-accordion-header-icon" ) 2503.remove(); 2504}, 2505_destroy: function() { 2506var contents; 2507this.element 2508.removeClass( "ui-accordion ui-widget ui-helper-reset" ) 2509.removeAttr( "role" ); 2510this.headers 2511.removeClass( "ui-accordion-header ui-accordion-header-active ui-state-default " + 2512"ui-corner-all ui-state-active ui-state-disabled ui-corner-top" ) 2513.removeAttr( "role" ) 2514.removeAttr( "aria-expanded" ) 2515.removeAttr( "aria-selected" ) 2516.removeAttr( "aria-controls" ) 2517.removeAttr( "tabIndex" ) 2518.removeUniqueId(); 2519this._destroyIcons(); 2520contents = this.headers.next() 2521.removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom " + 2522"ui-accordion-content ui-accordion-content-active ui-state-disabled" ) 2523.css( "display", "" ) 2524.removeAttr( "role" ) 2525.removeAttr( "aria-hidden" ) 2526.removeAttr( "aria-labelledby" ) 2527.removeUniqueId(); 2528if ( this.options.heightStyle !== "content" ) { 2529contents.css( "height", "" ); 2530} 2531}, 2532_setOption: function( key, value ) { 2533if ( key === "active" ) { 2534this._activate( value ); 2535return; 2536} 2537if ( key === "event" ) { 2538if ( this.options.event ) { 2539this._off( this.headers, this.options.event ); 2540} 2541this._setupEvents( value ); 2542} 2543this._super( key, value ); 2544if ( key === "collapsible" && !value && this.options.active === false ) { 2545this._activate( 0 ); 2546} 2547if ( key === "icons" ) { 2548this._destroyIcons(); 2549if ( value ) { 2550this._createIcons(); 2551} 2552} 2553if ( key === "disabled" ) { 2554this.element 2555.toggleClass( "ui-state-disabled", !!value ) 2556.attr( "aria-disabled", value ); 2557this.headers.add( this.headers.next() ) 2558.toggleClass( "ui-state-disabled", !!value ); 2559} 2560}, 2561_keydown: function( event ) { 2562if ( event.altKey || event.ctrlKey ) { 2563return; 2564} 2565var keyCode = $.ui.keyCode, 2566length = this.headers.length, 2567currentIndex = this.headers.index( event.target ), 2568toFocus = false;
vendor: 24,332 bytes, lines 2569-3555
2569switch ( event.keyCode ) { 2570case keyCode.RIGHT: 2571case keyCode.DOWN: 2572toFocus = this.headers[ ( currentIndex + 1 ) % length ]; 2573break; 2574case keyCode.LEFT: 2575case keyCode.UP: 2576toFocus = this.headers[ ( currentIndex - 1 + length ) % length ]; 2577break; 2578case keyCode.SPACE: 2579case keyCode.ENTER: 2580this._eventHandler( event ); 2581break; 2582case keyCode.HOME: 2583toFocus = this.headers[ 0 ]; 2584break; 2585case keyCode.END: 2586toFocus = this.headers[ length - 1 ]; 2587break; 2588} 2589if ( toFocus ) { 2590$( event.target ).attr( "tabIndex", -1 ); 2591$( toFocus ).attr( "tabIndex", 0 ); 2592toFocus.focus(); 2593event.preventDefault(); 2594} 2595}, 2596_panelKeyDown: function( event ) { 2597if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) { 2598$( event.currentTarget ).prev().focus(); 2599} 2600}, 2601refresh: function() { 2602var options = this.options; 2603this._processPanels(); 2604if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) { 2605options.active = false; 2606this.active = $(); 2607} else if ( options.active === false ) { 2608this._activate( 0 ); 2609} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { 2610if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) { 2611options.active = false; 2612this.active = $(); 2613} else { 2614this._activate( Math.max( 0, options.active - 1 ) ); 2615} 2616} else { 2617options.active = this.headers.index( this.active ); 2618} 2619this._destroyIcons(); 2620this._refresh(); 2621}, 2622_processPanels: function() { 2623var prevHeaders = this.headers, 2624prevPanels = this.panels; 2625this.headers = this.element.find( this.options.header ) 2626.addClass( "ui-accordion-header ui-state-default ui-corner-all" ); 2627this.panels = this.headers.next() 2628.addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" ) 2629.filter( ":not(.ui-accordion-content-active)" ) 2630.hide(); 2631if ( prevPanels ) { 2632this._off( prevHeaders.not( this.headers ) ); 2633this._off( prevPanels.not( this.panels ) ); 2634} 2635}, 2636_refresh: function() { 2637var maxHeight, 2638options = this.options, 2639heightStyle = options.heightStyle, 2640parent = this.element.parent(); 2641this.active = this._findActive( options.active ) 2642.addClass( "ui-accordion-header-active ui-state-active ui-corner-top" ) 2643.removeClass( "ui-corner-all" ); 2644this.active.next() 2645.addClass( "ui-accordion-content-active" ) 2646.show(); 2647this.headers 2648.attr( "role", "tab" ) 2649.each(function() { 2650var header = $( this ), 2651headerId = header.uniqueId().attr( "id" ), 2652panel = header.next(), 2653panelId = panel.uniqueId().attr( "id" ); 2654header.attr( "aria-controls", panelId ); 2655panel.attr( "aria-labelledby", headerId ); 2656}) 2657.next() 2658.attr( "role", "tabpanel" ); 2659this.headers 2660.not( this.active ) 2661.attr({ 2662"aria-selected": "false", 2663"aria-expanded": "false", 2664tabIndex: -1 2665}) 2666.next() 2667.attr({ 2668"aria-hidden": "true" 2669}) 2670.hide(); 2671if ( !this.active.length ) { 2672this.headers.eq( 0 ).attr( "tabIndex", 0 ); 2673} else { 2674this.active.attr({ 2675"aria-selected": "true", 2676"aria-expanded": "true", 2677tabIndex: 0 2678}) 2679.next() 2680.attr({ 2681"aria-hidden": "false" 2682}); 2683} 2684this._createIcons(); 2685this._setupEvents( options.event ); 2686if ( heightStyle === "fill" ) { 2687maxHeight = parent.height(); 2688this.element.siblings( ":visible" ).each(function() { 2689var elem = $( this ), 2690position = elem.css( "position" ); 2691if ( position === "absolute" || position === "fixed" ) { 2692return; 2693} 2694maxHeight -= elem.outerHeight( true ); 2695}); 2696this.headers.each(function() { 2697maxHeight -= $( this ).outerHeight( true ); 2698}); 2699this.headers.next() 2700.each(function() { 2701$( this ).height( Math.max( 0, maxHeight - 2702$( this ).innerHeight() + $( this ).height() ) ); 2703}) 2704.css( "overflow", "auto" ); 2705} else if ( heightStyle === "auto" ) { 2706maxHeight = 0; 2707this.headers.next() 2708.each(function() { 2709maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() ); 2710}) 2711.height( maxHeight ); 2712} 2713}, 2714_activate: function( index ) { 2715var active = this._findActive( index )[ 0 ]; 2716if ( active === this.active[ 0 ] ) { 2717return; 2718} 2719active = active || this.active[ 0 ]; 2720this._eventHandler({ 2721target: active, 2722currentTarget: active, 2723preventDefault: $.noop 2724}); 2725}, 2726_findActive: function( selector ) { 2727return typeof selector === "number" ? this.headers.eq( selector ) : $(); 2728}, 2729_setupEvents: function( event ) { 2730var events = { 2731keydown: "_keydown" 2732}; 2733if ( event ) { 2734$.each( event.split( " " ), function( index, eventName ) { 2735events[ eventName ] = "_eventHandler"; 2736}); 2737} 2738this._off( this.headers.add( this.headers.next() ) ); 2739this._on( this.headers, events ); 2740this._on( this.headers.next(), { keydown: "_panelKeyDown" }); 2741this._hoverable( this.headers ); 2742this._focusable( this.headers ); 2743}, 2744_eventHandler: function( event ) { 2745var options = this.options, 2746active = this.active, 2747clicked = $( event.currentTarget ), 2748clickedIsActive = clicked[ 0 ] === active[ 0 ], 2749collapsing = clickedIsActive && options.collapsible, 2750toShow = collapsing ? $() : clicked.next(), 2751toHide = active.next(), 2752eventData = { 2753oldHeader: active, 2754oldPanel: toHide, 2755newHeader: collapsing ? $() : clicked, 2756newPanel: toShow 2757}; 2758event.preventDefault(); 2759if ( 2760( clickedIsActive && !options.collapsible ) || 2761( this._trigger( "beforeActivate", event, eventData ) === false ) ) { 2762return; 2763} 2764options.active = collapsing ? false : this.headers.index( clicked ); 2765this.active = clickedIsActive ? $() : clicked; 2766this._toggle( eventData ); 2767active.removeClass( "ui-accordion-header-active ui-state-active" ); 2768if ( options.icons ) { 2769active.children( ".ui-accordion-header-icon" ) 2770.removeClass( options.icons.activeHeader ) 2771.addClass( options.icons.header ); 2772} 2773if ( !clickedIsActive ) { 2774clicked 2775.removeClass( "ui-corner-all" ) 2776.addClass( "ui-accordion-header-active ui-state-active ui-corner-top" ); 2777if ( options.icons ) { 2778clicked.children( ".ui-accordion-header-icon" ) 2779.removeClass( options.icons.header ) 2780.addClass( options.icons.activeHeader ); 2781} 2782clicked 2783.next() 2784.addClass( "ui-accordion-content-active" ); 2785} 2786}, 2787_toggle: function( data ) { 2788var toShow = data.newPanel, 2789toHide = this.prevShow.length ? this.prevShow : data.oldPanel; 2790this.prevShow.add( this.prevHide ).stop( true, true ); 2791this.prevShow = toShow; 2792this.prevHide = toHide; 2793if ( this.options.animate ) { 2794this._animate( toShow, toHide, data ); 2795} else { 2796toHide.hide(); 2797toShow.show(); 2798this._toggleComplete( data ); 2799} 2800toHide.attr({ 2801"aria-hidden": "true" 2802}); 2803toHide.prev().attr({ 2804"aria-selected": "false", 2805"aria-expanded": "false" 2806}); 2807if ( toShow.length && toHide.length ) { 2808toHide.prev().attr({ 2809"tabIndex": -1, 2810"aria-expanded": "false" 2811}); 2812} else if ( toShow.length ) { 2813this.headers.filter(function() { 2814return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0; 2815}) 2816.attr( "tabIndex", -1 ); 2817} 2818toShow 2819.attr( "aria-hidden", "false" ) 2820.prev() 2821.attr({ 2822"aria-selected": "true", 2823"aria-expanded": "true", 2824tabIndex: 0 2825}); 2826}, 2827_animate: function( toShow, toHide, data ) { 2828var total, easing, duration, 2829that = this, 2830adjust = 0, 2831boxSizing = toShow.css( "box-sizing" ), 2832down = toShow.length && 2833( !toHide.length || ( toShow.index() < toHide.index() ) ), 2834animate = this.options.animate || {}, 2835options = down && animate.down || animate, 2836complete = function() { 2837that._toggleComplete( data ); 2838}; 2839if ( typeof options === "number" ) { 2840duration = options; 2841} 2842if ( typeof options === "string" ) { 2843easing = options; 2844} 2845easing = easing || options.easing || animate.easing; 2846duration = duration || options.duration || animate.duration; 2847if ( !toHide.length ) { 2848return toShow.animate( this.showProps, duration, easing, complete ); 2849} 2850if ( !toShow.length ) { 2851return toHide.animate( this.hideProps, duration, easing, complete ); 2852} 2853total = toShow.show().outerHeight(); 2854toHide.animate( this.hideProps, { 2855duration: duration, 2856easing: easing, 2857step: function( now, fx ) { 2858fx.now = Math.round( now ); 2859} 2860}); 2861toShow 2862.hide() 2863.animate( this.showProps, { 2864duration: duration, 2865easing: easing, 2866complete: complete, 2867step: function( now, fx ) { 2868fx.now = Math.round( now ); 2869if ( fx.prop !== "height" ) { 2870if ( boxSizing === "content-box" ) { 2871adjust += fx.now; 2872} 2873} else if ( that.options.heightStyle !== "content" ) { 2874fx.now = Math.round( total - toHide.outerHeight() - adjust ); 2875adjust = 0; 2876} 2877} 2878}); 2879}, 2880_toggleComplete: function( data ) { 2881var toHide = data.oldPanel; 2882toHide 2883.removeClass( "ui-accordion-content-active" ) 2884.prev() 2885.removeClass( "ui-corner-top" ) 2886.addClass( "ui-corner-all" ); 2887if ( toHide.length ) { 2888toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className; 2889} 2890this._trigger( "activate", null, data ); 2891} 2892}); 2893var menu = $.widget( "ui.menu", { 2894version: "1.11.4", 2895defaultElement: "<ul>", 2896delay: 300, 2897options: { 2898icons: { 2899submenu: "ui-icon-carat-1-e" 2900}, 2901items: "> *", 2902menus: "ul", 2903position: { 2904my: "left-1 top", 2905at: "right top" 2906}, 2907role: "menu", 2908blur: null, 2909focus: null, 2910select: null 2911}, 2912_create: function() { 2913this.activeMenu = this.element; 2914this.mouseHandled = false; 2915this.element 2916.uniqueId() 2917.addClass( "ui-menu ui-widget ui-widget-content" ) 2918.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length ) 2919.attr({ 2920role: this.options.role, 2921tabIndex: 0 2922}); 2923if ( this.options.disabled ) { 2924this.element 2925.addClass( "ui-state-disabled" ) 2926.attr( "aria-disabled", "true" ); 2927} 2928this._on({ 2929"mousedown .ui-menu-item": function( event ) { 2930event.preventDefault(); 2931}, 2932"click .ui-menu-item": function( event ) { 2933var target = $( event.target ); 2934if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) { 2935this.select( event ); 2936if ( !event.isPropagationStopped() ) { 2937this.mouseHandled = true; 2938} 2939if ( target.has( ".ui-menu" ).length ) { 2940this.expand( event ); 2941} else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) { 2942this.element.trigger( "focus", [ true ] ); 2943if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) { 2944clearTimeout( this.timer ); 2945} 2946} 2947} 2948}, 2949"mouseenter .ui-menu-item": function( event ) { 2950if ( this.previousFilter ) { 2951return; 2952} 2953var target = $( event.currentTarget ); 2954target.siblings( ".ui-state-active" ).removeClass( "ui-state-active" ); 2955this.focus( event, target ); 2956}, 2957mouseleave: "collapseAll", 2958"mouseleave .ui-menu": "collapseAll", 2959focus: function( event, keepActiveItem ) { 2960var item = this.active || this.element.find( this.options.items ).eq( 0 ); 2961if ( !keepActiveItem ) { 2962this.focus( event, item ); 2963} 2964}, 2965blur: function( event ) { 2966this._delay(function() { 2967if ( !$.contains( this.element[0], this.document[0].activeElement ) ) { 2968this.collapseAll( event ); 2969} 2970}); 2971}, 2972keydown: "_keydown" 2973}); 2974this.refresh(); 2975this._on( this.document, { 2976click: function( event ) { 2977if ( this._closeOnDocumentClick( event ) ) { 2978this.collapseAll( event ); 2979} 2980this.mouseHandled = false; 2981} 2982}); 2983}, 2984_destroy: function() { 2985this.element 2986.removeAttr( "aria-activedescendant" ) 2987.find( ".ui-menu" ).addBack() 2988.removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" ) 2989.removeAttr( "role" ) 2990.removeAttr( "tabIndex" ) 2991.removeAttr( "aria-labelledby" ) 2992.removeAttr( "aria-expanded" ) 2993.removeAttr( "aria-hidden" ) 2994.removeAttr( "aria-disabled" ) 2995.removeUniqueId() 2996.show(); 2997this.element.find( ".ui-menu-item" ) 2998.removeClass( "ui-menu-item" ) 2999.removeAttr( "role" ) 3000.removeAttr( "aria-disabled" ) 3001.removeUniqueId() 3002.removeClass( "ui-state-hover" ) 3003.removeAttr( "tabIndex" ) 3004.removeAttr( "role" ) 3005.removeAttr( "aria-haspopup" ) 3006.children().each( function() { 3007var elem = $( this ); 3008if ( elem.data( "ui-menu-submenu-carat" ) ) { 3009elem.remove(); 3010} 3011}); 3012this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" ); 3013}, 3014_keydown: function( event ) { 3015var match, prev, character, skip, 3016preventDefault = true; 3017switch ( event.keyCode ) { 3018case $.ui.keyCode.PAGE_UP: 3019this.previousPage( event ); 3020break; 3021case $.ui.keyCode.PAGE_DOWN: 3022this.nextPage( event ); 3023break; 3024case $.ui.keyCode.HOME: 3025this._move( "first", "first", event ); 3026break; 3027case $.ui.keyCode.END: 3028this._move( "last", "last", event ); 3029break; 3030case $.ui.keyCode.UP: 3031this.previous( event ); 3032break; 3033case $.ui.keyCode.DOWN: 3034this.next( event ); 3035break; 3036case $.ui.keyCode.LEFT: 3037this.collapse( event ); 3038break; 3039case $.ui.keyCode.RIGHT: 3040if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { 3041this.expand( event ); 3042} 3043break; 3044case $.ui.keyCode.ENTER: 3045case $.ui.keyCode.SPACE: 3046this._activate( event ); 3047break; 3048case $.ui.keyCode.ESCAPE: 3049this.collapse( event ); 3050break; 3051default: 3052preventDefault = false; 3053prev = this.previousFilter || ""; 3054character = String.fromCharCode( event.keyCode ); 3055skip = false; 3056clearTimeout( this.filterTimer ); 3057if ( character === prev ) { 3058skip = true; 3059} else { 3060character = prev + character; 3061} 3062match = this._filterMenuItems( character ); 3063match = skip && match.index( this.active.next() ) !== -1 ? 3064this.active.nextAll( ".ui-menu-item" ) : 3065match; 3066if ( !match.length ) { 3067character = String.fromCharCode( event.keyCode ); 3068match = this._filterMenuItems( character ); 3069} 3070if ( match.length ) { 3071this.focus( event, match ); 3072this.previousFilter = character; 3073this.filterTimer = this._delay(function() { 3074delete this.previousFilter; 3075}, 1000 ); 3076} else { 3077delete this.previousFilter; 3078} 3079} 3080if ( preventDefault ) { 3081event.preventDefault(); 3082} 3083}, 3084_activate: function( event ) { 3085if ( !this.active.is( ".ui-state-disabled" ) ) { 3086if ( this.active.is( "[aria-haspopup='true']" ) ) { 3087this.expand( event ); 3088} else { 3089this.select( event ); 3090} 3091} 3092}, 3093refresh: function() { 3094var menus, items, 3095that = this, 3096icon = this.options.icons.submenu, 3097submenus = this.element.find( this.options.menus ); 3098this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length ); 3099submenus.filter( ":not(.ui-menu)" ) 3100.addClass( "ui-menu ui-widget ui-widget-content ui-front" ) 3101.hide() 3102.attr({ 3103role: this.options.role, 3104"aria-hidden": "true", 3105"aria-expanded": "false" 3106}) 3107.each(function() { 3108var menu = $( this ), 3109item = menu.parent(), 3110submenuCarat = $( "<span>" ) 3111.addClass( "ui-menu-icon ui-icon " + icon ) 3112.data( "ui-menu-submenu-carat", true ); 3113item 3114.attr( "aria-haspopup", "true" ) 3115.prepend( submenuCarat ); 3116menu.attr( "aria-labelledby", item.attr( "id" ) ); 3117}); 3118menus = submenus.add( this.element ); 3119items = menus.find( this.options.items ); 3120items.not( ".ui-menu-item" ).each(function() { 3121var item = $( this ); 3122if ( that._isDivider( item ) ) { 3123item.addClass( "ui-widget-content ui-menu-divider" ); 3124} 3125}); 3126items.not( ".ui-menu-item, .ui-menu-divider" ) 3127.addClass( "ui-menu-item" ) 3128.uniqueId() 3129.attr({ 3130tabIndex: -1, 3131role: this._itemRole() 3132}); 3133items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" ); 3134if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { 3135this.blur(); 3136} 3137}, 3138_itemRole: function() { 3139return { 3140menu: "menuitem", 3141listbox: "option" 3142}[ this.options.role ]; 3143}, 3144_setOption: function( key, value ) { 3145if ( key === "icons" ) { 3146this.element.find( ".ui-menu-icon" ) 3147.removeClass( this.options.icons.submenu ) 3148.addClass( value.submenu ); 3149} 3150if ( key === "disabled" ) { 3151this.element 3152.toggleClass( "ui-state-disabled", !!value ) 3153.attr( "aria-disabled", value ); 3154} 3155this._super( key, value ); 3156}, 3157focus: function( event, item ) { 3158var nested, focused; 3159this.blur( event, event && event.type === "focus" ); 3160this._scrollIntoView( item ); 3161this.active = item.first(); 3162focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" ); 3163if ( this.options.role ) { 3164this.element.attr( "aria-activedescendant", focused.attr( "id" ) ); 3165} 3166this.active 3167.parent() 3168.closest( ".ui-menu-item" ) 3169.addClass( "ui-state-active" ); 3170if ( event && event.type === "keydown" ) { 3171this._close(); 3172} else { 3173this.timer = this._delay(function() { 3174this._close(); 3175}, this.delay ); 3176} 3177nested = item.children( ".ui-menu" ); 3178if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) { 3179this._startOpening(nested); 3180} 3181this.activeMenu = item.parent(); 3182this._trigger( "focus", event, { item: item } ); 3183}, 3184_scrollIntoView: function( item ) { 3185var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight; 3186if ( this._hasScroll() ) { 3187borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0; 3188paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0; 3189offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop; 3190scroll = this.activeMenu.scrollTop(); 3191elementHeight = this.activeMenu.height(); 3192itemHeight = item.outerHeight(); 3193if ( offset < 0 ) { 3194this.activeMenu.scrollTop( scroll + offset ); 3195} else if ( offset + itemHeight > elementHeight ) { 3196this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight ); 3197} 3198} 3199}, 3200blur: function( event, fromFocus ) { 3201if ( !fromFocus ) { 3202clearTimeout( this.timer ); 3203} 3204if ( !this.active ) { 3205return; 3206} 3207this.active.removeClass( "ui-state-focus" ); 3208this.active = null; 3209this._trigger( "blur", event, { item: this.active } ); 3210}, 3211_startOpening: function( submenu ) { 3212clearTimeout( this.timer ); 3213if ( submenu.attr( "aria-hidden" ) !== "true" ) { 3214return; 3215} 3216this.timer = this._delay(function() { 3217this._close(); 3218this._open( submenu ); 3219}, this.delay ); 3220}, 3221_open: function( submenu ) { 3222var position = $.extend({ 3223of: this.active 3224}, this.options.position ); 3225clearTimeout( this.timer ); 3226this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) ) 3227.hide() 3228.attr( "aria-hidden", "true" ); 3229submenu 3230.show() 3231.removeAttr( "aria-hidden" ) 3232.attr( "aria-expanded", "true" ) 3233.position( position ); 3234}, 3235collapseAll: function( event, all ) { 3236clearTimeout( this.timer ); 3237this.timer = this._delay(function() { 3238var currentMenu = all ? this.element : 3239$( event && event.target ).closest( this.element.find( ".ui-menu" ) ); 3240if ( !currentMenu.length ) { 3241currentMenu = this.element; 3242} 3243this._close( currentMenu ); 3244this.blur( event ); 3245this.activeMenu = currentMenu; 3246}, this.delay ); 3247}, 3248_close: function( startMenu ) { 3249if ( !startMenu ) { 3250startMenu = this.active ? this.active.parent() : this.element; 3251} 3252startMenu 3253.find( ".ui-menu" ) 3254.hide() 3255.attr( "aria-hidden", "true" ) 3256.attr( "aria-expanded", "false" ) 3257.end() 3258.find( ".ui-state-active" ).not( ".ui-state-focus" ) 3259.removeClass( "ui-state-active" ); 3260}, 3261_closeOnDocumentClick: function( event ) { 3262return !$( event.target ).closest( ".ui-menu" ).length; 3263}, 3264_isDivider: function( item ) { 3265return !/[^\-\u2014\u2013\s]/.test( item.text() ); 3266}, 3267collapse: function( event ) { 3268var newItem = this.active && 3269this.active.parent().closest( ".ui-menu-item", this.element ); 3270if ( newItem && newItem.length ) { 3271this._close(); 3272this.focus( event, newItem ); 3273} 3274}, 3275expand: function( event ) { 3276var newItem = this.active && 3277this.active 3278.children( ".ui-menu " ) 3279.find( this.options.items ) 3280.first(); 3281if ( newItem && newItem.length ) { 3282this._open( newItem.parent() ); 3283this._delay(function() { 3284this.focus( event, newItem ); 3285}); 3286} 3287}, 3288next: function( event ) { 3289this._move( "next", "first", event ); 3290}, 3291previous: function( event ) { 3292this._move( "prev", "last", event ); 3293}, 3294isFirstItem: function() { 3295return this.active && !this.active.prevAll( ".ui-menu-item" ).length; 3296}, 3297isLastItem: function() { 3298return this.active && !this.active.nextAll( ".ui-menu-item" ).length; 3299}, 3300_move: function( direction, filter, event ) { 3301var next; 3302if ( this.active ) { 3303if ( direction === "first" || direction === "last" ) { 3304next = this.active 3305[ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" ) 3306.eq( -1 ); 3307} else { 3308next = this.active 3309[ direction + "All" ]( ".ui-menu-item" ) 3310.eq( 0 ); 3311} 3312} 3313if ( !next || !next.length || !this.active ) { 3314next = this.activeMenu.find( this.options.items )[ filter ](); 3315} 3316this.focus( event, next ); 3317}, 3318nextPage: function( event ) { 3319var item, base, height; 3320if ( !this.active ) { 3321this.next( event ); 3322return; 3323} 3324if ( this.isLastItem() ) { 3325return; 3326} 3327if ( this._hasScroll() ) { 3328base = this.active.offset().top; 3329height = this.element.height(); 3330this.active.nextAll( ".ui-menu-item" ).each(function() { 3331item = $( this ); 3332return item.offset().top - base - height < 0; 3333}); 3334this.focus( event, item ); 3335} else { 3336this.focus( event, this.activeMenu.find( this.options.items ) 3337[ !this.active ? "first" : "last" ]() ); 3338} 3339}, 3340previousPage: function( event ) { 3341var item, base, height; 3342if ( !this.active ) { 3343this.next( event ); 3344return; 3345} 3346if ( this.isFirstItem() ) { 3347return; 3348} 3349if ( this._hasScroll() ) { 3350base = this.active.offset().top; 3351height = this.element.height(); 3352this.active.prevAll( ".ui-menu-item" ).each(function() { 3353item = $( this ); 3354return item.offset().top - base + height > 0; 3355}); 3356this.focus( event, item ); 3357} else { 3358this.focus( event, this.activeMenu.find( this.options.items ).first() ); 3359} 3360}, 3361_hasScroll: function() { 3362return this.element.outerHeight() < this.element.prop( "scrollHeight" ); 3363}, 3364select: function( event ) { 3365this.active = this.active || $( event.target ).closest( ".ui-menu-item" ); 3366var ui = { item: this.active }; 3367if ( !this.active.has( ".ui-menu" ).length ) { 3368this.collapseAll( event, true ); 3369} 3370this._trigger( "select", event, ui ); 3371}, 3372_filterMenuItems: function(character) { 3373var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ), 3374regex = new RegExp( "^" + escapedCharacter, "i" ); 3375return this.activeMenu 3376.find( this.options.items ) 3377.filter( ".ui-menu-item" ) 3378.filter(function() { 3379return regex.test( $.trim( $( this ).text() ) ); 3380}); 3381} 3382}); 3383$.widget( "ui.autocomplete", { 3384version: "1.11.4", 3385defaultElement: "<input>", 3386options: { 3387appendTo: null, 3388autoFocus: false, 3389delay: 300, 3390minLength: 1, 3391position: { 3392my: "left top", 3393at: "left bottom", 3394collision: "none" 3395}, 3396source: null, 3397change: null, 3398close: null, 3399focus: null, 3400open: null, 3401response: null, 3402search: null, 3403select: null 3404}, 3405requestIndex: 0, 3406pending: 0, 3407_create: function() { 3408var suppressKeyPress, suppressKeyPressRepeat, suppressInput, 3409nodeName = this.element[ 0 ].nodeName.toLowerCase(), 3410isTextarea = nodeName === "textarea", 3411isInput = nodeName === "input"; 3412this.isMultiLine = 3413isTextarea ? true : 3414isInput ? false : 3415this.element.prop( "isContentEditable" ); 3416this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ]; 3417this.isNewMenu = true; 3418this.element 3419.addClass( "ui-autocomplete-input" ) 3420.attr( "autocomplete", "off" ); 3421this._on( this.element, { 3422keydown: function( event ) { 3423if ( this.element.prop( "readOnly" ) ) { 3424suppressKeyPress = true; 3425suppressInput = true; 3426suppressKeyPressRepeat = true; 3427return; 3428} 3429suppressKeyPress = false; 3430suppressInput = false; 3431suppressKeyPressRepeat = false; 3432var keyCode = $.ui.keyCode; 3433switch ( event.keyCode ) { 3434case keyCode.PAGE_UP: 3435suppressKeyPress = true; 3436this._move( "previousPage", event ); 3437break; 3438case keyCode.PAGE_DOWN: 3439suppressKeyPress = true; 3440this._move( "nextPage", event ); 3441break; 3442case keyCode.UP: 3443suppressKeyPress = true; 3444this._keyEvent( "previous", event ); 3445break; 3446case keyCode.DOWN: 3447suppressKeyPress = true; 3448this._keyEvent( "next", event ); 3449break; 3450case keyCode.ENTER: 3451if ( this.menu.active ) { 3452suppressKeyPress = true; 3453event.preventDefault(); 3454this.menu.select( event ); 3455} 3456break; 3457case keyCode.TAB: 3458if ( this.menu.active ) { 3459this.menu.select( event ); 3460} 3461break; 3462case keyCode.ESCAPE: 3463if ( this.menu.element.is( ":visible" ) ) { 3464if ( !this.isMultiLine ) { 3465this._value( this.term ); 3466} 3467this.close( event ); 3468event.preventDefault(); 3469} 3470break; 3471default: 3472suppressKeyPressRepeat = true; 3473this._searchTimeout( event ); 3474break; 3475} 3476}, 3477keypress: function( event ) { 3478if ( suppressKeyPress ) { 3479suppressKeyPress = false; 3480if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { 3481event.preventDefault(); 3482} 3483return; 3484} 3485if ( suppressKeyPressRepeat ) { 3486return; 3487} 3488var keyCode = $.ui.keyCode; 3489switch ( event.keyCode ) { 3490case keyCode.PAGE_UP: 3491this._move( "previousPage", event ); 3492break; 3493case keyCode.PAGE_DOWN: 3494this._move( "nextPage", event ); 3495break; 3496case keyCode.UP: 3497this._keyEvent( "previous", event ); 3498break; 3499case keyCode.DOWN: 3500this._keyEvent( "next", event ); 3501break; 3502} 3503}, 3504input: function( event ) { 3505if ( suppressInput ) { 3506suppressInput = false; 3507event.preventDefault(); 3508return; 3509} 3510this._searchTimeout( event ); 3511}, 3512focus: function() { 3513this.selectedItem = null; 3514this.previous = this._value(); 3515}, 3516blur: function( event ) { 3517if ( this.cancelBlur ) { 3518delete this.cancelBlur; 3519return; 3520} 3521clearTimeout( this.searching ); 3522this.close( event ); 3523this._change( event ); 3524} 3525}); 3526this._initSource(); 3527this.menu = $( "<ul>" ) 3528.addClass( "ui-autocomplete ui-front" ) 3529.appendTo( this._appendTo() ) 3530.menu({ 3531role: null 3532}) 3533.hide() 3534.menu( "instance" ); 3535this._on( this.menu.element, { 3536mousedown: function( event ) { 3537event.preventDefault(); 3538this.cancelBlur = true; 3539this._delay(function() { 3540delete this.cancelBlur; 3541}); 3542var menuElement = this.menu.element[ 0 ]; 3543if ( !$( event.target ).closest( ".ui-menu-item" ).length ) { 3544this._delay(function() { 3545var that = this; 3546this.document.one( "mousedown", function( event ) { 3547if ( event.target !== that.element[ 0 ] && 3548event.target !== menuElement && 3549!$.contains( menuElement, event.target ) ) { 3550that.close(); 3551} 3552}); 3553}); 3554} 3555},
vendor: 26,131 bytes, lines 3556-4378
3556menufocus: function( event, ui ) { 3557var label, item; 3558if ( this.isNewMenu ) { 3559this.isNewMenu = false; 3560if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) { 3561this.menu.blur(); 3562this.document.one( "mousemove", function() { 3563$( event.target ).trigger( event.originalEvent ); 3564}); 3565return; 3566} 3567} 3568item = ui.item.data( "ui-autocomplete-item" ); 3569if ( false !== this._trigger( "focus", event, { item: item } ) ) { 3570if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) { 3571this._value( item.value ); 3572} 3573} 3574label = ui.item.attr( "aria-label" ) || item.value; 3575if ( label && $.trim( label ).length ) { 3576this.liveRegion.children().hide(); 3577$( "<div>" ).text( label ).appendTo( this.liveRegion ); 3578} 3579}, 3580menuselect: function( event, ui ) { 3581var item = ui.item.data( "ui-autocomplete-item" ), 3582previous = this.previous; 3583if ( this.element[ 0 ] !== this.document[ 0 ].activeElement ) { 3584this.element.focus(); 3585this.previous = previous; 3586this._delay(function() { 3587this.previous = previous; 3588this.selectedItem = item; 3589}); 3590} 3591if ( false !== this._trigger( "select", event, { item: item } ) ) { 3592this._value( item.value ); 3593} 3594this.term = this._value(); 3595this.close( event ); 3596this.selectedItem = item; 3597} 3598}); 3599this.liveRegion = $( "<span>", { 3600role: "status", 3601"aria-live": "assertive", 3602"aria-relevant": "additions" 3603}) 3604.addClass( "ui-helper-hidden-accessible" ) 3605.appendTo( this.document[ 0 ].body ); 3606this._on( this.window, { 3607beforeunload: function() { 3608this.element.removeAttr( "autocomplete" ); 3609} 3610}); 3611}, 3612_destroy: function() { 3613clearTimeout( this.searching ); 3614this.element 3615.removeClass( "ui-autocomplete-input" ) 3616.removeAttr( "autocomplete" ); 3617this.menu.element.remove(); 3618this.liveRegion.remove(); 3619}, 3620_setOption: function( key, value ) { 3621this._super( key, value ); 3622if ( key === "source" ) { 3623this._initSource(); 3624} 3625if ( key === "appendTo" ) { 3626this.menu.element.appendTo( this._appendTo() ); 3627} 3628if ( key === "disabled" && value && this.xhr ) { 3629this.xhr.abort(); 3630} 3631}, 3632_appendTo: function() { 3633var element = this.options.appendTo; 3634if ( element ) { 3635element = element.jquery || element.nodeType ? 3636$( element ) : 3637this.document.find( element ).eq( 0 ); 3638} 3639if ( !element || !element[ 0 ] ) { 3640element = this.element.closest( ".ui-front" ); 3641} 3642if ( !element.length ) { 3643element = this.document[ 0 ].body; 3644} 3645return element; 3646}, 3647_initSource: function() { 3648var array, url, 3649that = this; 3650if ( $.isArray( this.options.source ) ) { 3651array = this.options.source; 3652this.source = function( request, response ) { 3653response( $.ui.autocomplete.filter( array, request.term ) ); 3654}; 3655} else if ( typeof this.options.source === "string" ) { 3656url = this.options.source; 3657this.source = function( request, response ) { 3658if ( that.xhr ) { 3659that.xhr.abort(); 3660} 3661that.xhr = $.ajax({ 3662url: url, 3663data: request, 3664dataType: "json", 3665success: function( data ) { 3666response( data ); 3667}, 3668error: function() { 3669response([]); 3670} 3671}); 3672}; 3673} else { 3674this.source = this.options.source; 3675} 3676}, 3677_searchTimeout: function( event ) { 3678clearTimeout( this.searching ); 3679this.searching = this._delay(function() { 3680var equalValues = this.term === this._value(), 3681menuVisible = this.menu.element.is( ":visible" ), 3682modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey; 3683if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) { 3684this.selectedItem = null; 3685this.search( null, event ); 3686} 3687}, this.options.delay ); 3688}, 3689search: function( value, event ) { 3690value = value != null ? value : this._value(); 3691this.term = this._value(); 3692if ( value.length < this.options.minLength ) { 3693return this.close( event ); 3694} 3695if ( this._trigger( "search", event ) === false ) { 3696return; 3697} 3698return this._search( value ); 3699}, 3700_search: function( value ) { 3701this.pending++; 3702this.element.addClass( "ui-autocomplete-loading" ); 3703this.cancelSearch = false; 3704this.source( { term: value }, this._response() ); 3705}, 3706_response: function() { 3707var index = ++this.requestIndex; 3708return $.proxy(function( content ) { 3709if ( index === this.requestIndex ) { 3710this.__response( content ); 3711} 3712this.pending--; 3713if ( !this.pending ) { 3714this.element.removeClass( "ui-autocomplete-loading" ); 3715} 3716}, this ); 3717}, 3718__response: function( content ) { 3719if ( content ) { 3720content = this._normalize( content ); 3721} 3722this._trigger( "response", null, { content: content } ); 3723if ( !this.options.disabled && content && content.length && !this.cancelSearch ) { 3724this._suggest( content ); 3725this._trigger( "open" ); 3726} else { 3727this._close(); 3728} 3729}, 3730close: function( event ) { 3731this.cancelSearch = true; 3732this._close( event ); 3733}, 3734_close: function( event ) { 3735if ( this.menu.element.is( ":visible" ) ) { 3736this.menu.element.hide(); 3737this.menu.blur(); 3738this.isNewMenu = true; 3739this._trigger( "close", event ); 3740} 3741}, 3742_change: function( event ) { 3743if ( this.previous !== this._value() ) { 3744this._trigger( "change", event, { item: this.selectedItem } ); 3745} 3746}, 3747_normalize: function( items ) { 3748if ( items.length && items[ 0 ].label && items[ 0 ].value ) { 3749return items; 3750} 3751return $.map( items, function( item ) { 3752if ( typeof item === "string" ) { 3753return { 3754label: item, 3755value: item 3756}; 3757} 3758return $.extend( {}, item, { 3759label: item.label || item.value, 3760value: item.value || item.label 3761}); 3762}); 3763}, 3764_suggest: function( items ) { 3765var ul = this.menu.element.empty(); 3766this._renderMenu( ul, items ); 3767this.isNewMenu = true; 3768this.menu.refresh(); 3769ul.show(); 3770this._resizeMenu(); 3771ul.position( $.extend({ 3772of: this.element 3773}, this.options.position ) ); 3774if ( this.options.autoFocus ) { 3775this.menu.next(); 3776} 3777}, 3778_resizeMenu: function() { 3779var ul = this.menu.element; 3780ul.outerWidth( Math.max( 3781ul.width( "" ).outerWidth() + 1, 3782this.element.outerWidth() 3783) ); 3784}, 3785_renderMenu: function( ul, items ) { 3786var that = this; 3787$.each( items, function( index, item ) { 3788that._renderItemData( ul, item ); 3789}); 3790}, 3791_renderItemData: function( ul, item ) { 3792return this._renderItem( ul, item ).data( "ui-autocomplete-item", item ); 3793}, 3794_renderItem: function( ul, item ) { 3795return $( "<li>" ).text( item.label ).appendTo( ul ); 3796}, 3797_move: function( direction, event ) { 3798if ( !this.menu.element.is( ":visible" ) ) { 3799this.search( null, event ); 3800return; 3801} 3802if ( this.menu.isFirstItem() && /^previous/.test( direction ) || 3803this.menu.isLastItem() && /^next/.test( direction ) ) { 3804if ( !this.isMultiLine ) { 3805this._value( this.term ); 3806} 3807this.menu.blur(); 3808return; 3809} 3810this.menu[ direction ]( event ); 3811}, 3812widget: function() { 3813return this.menu.element; 3814}, 3815_value: function() { 3816return this.valueMethod.apply( this.element, arguments ); 3817}, 3818_keyEvent: function( keyEvent, event ) { 3819if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { 3820this._move( keyEvent, event ); 3821event.preventDefault(); 3822} 3823} 3824}); 3825$.extend( $.ui.autocomplete, { 3826escapeRegex: function( value ) { 3827return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ); 3828}, 3829filter: function( array, term ) { 3830var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" ); 3831return $.grep( array, function( value ) { 3832return matcher.test( value.label || value.value || value ); 3833}); 3834} 3835}); 3836$.widget( "ui.autocomplete", $.ui.autocomplete, { 3837options: { 3838messages: { 3839noResults: "No search results.", 3840results: function( amount ) { 3841return amount + ( amount > 1 ? " results are" : " result is" ) + 3842" available, use up and down arrow keys to navigate."; 3843} 3844} 3845}, 3846__response: function( content ) { 3847var message; 3848this._superApply( arguments ); 3849if ( this.options.disabled || this.cancelSearch ) { 3850return; 3851} 3852if ( content && content.length ) { 3853message = this.options.messages.results( content.length ); 3854} else { 3855message = this.options.messages.noResults; 3856} 3857this.liveRegion.children().hide(); 3858$( "<div>" ).text( message ).appendTo( this.liveRegion ); 3859} 3860}); 3861var autocomplete = $.ui.autocomplete; 3862var lastActive, 3863baseClasses = "ui-button ui-widget ui-state-default ui-corner-all", 3864typeClasses = "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", 3865formResetHandler = function() { 3866var form = $( this ); 3867setTimeout(function() { 3868form.find( ":ui-button" ).button( "refresh" ); 3869}, 1 ); 3870}, 3871radioGroup = function( radio ) { 3872var name = radio.name, 3873form = radio.form, 3874radios = $( [] ); 3875if ( name ) { 3876name = name.replace( /'/g, "\\'" ); 3877if ( form ) { 3878radios = $( form ).find( "[name='" + name + "'][type=radio]" ); 3879} else { 3880radios = $( "[name='" + name + "'][type=radio]", radio.ownerDocument ) 3881.filter(function() { 3882return !this.form; 3883}); 3884} 3885} 3886return radios; 3887}; 3888$.widget( "ui.button", { 3889version: "1.11.4", 3890defaultElement: "<button>", 3891options: { 3892disabled: null, 3893text: true, 3894label: null, 3895icons: { 3896primary: null, 3897secondary: null 3898} 3899}, 3900_create: function() { 3901this.element.closest( "form" ) 3902.unbind( "reset" + this.eventNamespace ) 3903.bind( "reset" + this.eventNamespace, formResetHandler ); 3904if ( typeof this.options.disabled !== "boolean" ) { 3905this.options.disabled = !!this.element.prop( "disabled" ); 3906} else { 3907this.element.prop( "disabled", this.options.disabled ); 3908} 3909this._determineButtonType(); 3910this.hasTitle = !!this.buttonElement.attr( "title" ); 3911var that = this, 3912options = this.options, 3913toggleButton = this.type === "checkbox" || this.type === "radio", 3914activeClass = !toggleButton ? "ui-state-active" : ""; 3915if ( options.label === null ) { 3916options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html()); 3917} 3918this._hoverable( this.buttonElement ); 3919this.buttonElement 3920.addClass( baseClasses ) 3921.attr( "role", "button" ) 3922.bind( "mouseenter" + this.eventNamespace, function() { 3923if ( options.disabled ) { 3924return; 3925} 3926if ( this === lastActive ) { 3927$( this ).addClass( "ui-state-active" ); 3928} 3929}) 3930.bind( "mouseleave" + this.eventNamespace, function() { 3931if ( options.disabled ) { 3932return; 3933} 3934$( this ).removeClass( activeClass ); 3935}) 3936.bind( "click" + this.eventNamespace, function( event ) { 3937if ( options.disabled ) { 3938event.preventDefault(); 3939event.stopImmediatePropagation(); 3940} 3941}); 3942this._on({ 3943focus: function() { 3944this.buttonElement.addClass( "ui-state-focus" ); 3945}, 3946blur: function() { 3947this.buttonElement.removeClass( "ui-state-focus" ); 3948} 3949}); 3950if ( toggleButton ) { 3951this.element.bind( "change" + this.eventNamespace, function() { 3952that.refresh(); 3953}); 3954} 3955if ( this.type === "checkbox" ) { 3956this.buttonElement.bind( "click" + this.eventNamespace, function() { 3957if ( options.disabled ) { 3958return false; 3959} 3960}); 3961} else if ( this.type === "radio" ) { 3962this.buttonElement.bind( "click" + this.eventNamespace, function() { 3963if ( options.disabled ) { 3964return false; 3965} 3966$( this ).addClass( "ui-state-active" ); 3967that.buttonElement.attr( "aria-pressed", "true" ); 3968var radio = that.element[ 0 ]; 3969radioGroup( radio ) 3970.not( radio ) 3971.map(function() { 3972return $( this ).button( "widget" )[ 0 ]; 3973}) 3974.removeClass( "ui-state-active" ) 3975.attr( "aria-pressed", "false" ); 3976}); 3977} else { 3978this.buttonElement 3979.bind( "mousedown" + this.eventNamespace, function() { 3980if ( options.disabled ) { 3981return false; 3982} 3983$( this ).addClass( "ui-state-active" ); 3984lastActive = this; 3985that.document.one( "mouseup", function() { 3986lastActive = null; 3987}); 3988}) 3989.bind( "mouseup" + this.eventNamespace, function() { 3990if ( options.disabled ) { 3991return false; 3992} 3993$( this ).removeClass( "ui-state-active" ); 3994}) 3995.bind( "keydown" + this.eventNamespace, function(event) { 3996if ( options.disabled ) { 3997return false; 3998} 3999if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) { 4000$( this ).addClass( "ui-state-active" ); 4001} 4002}) 4003.bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() { 4004$( this ).removeClass( "ui-state-active" ); 4005}); 4006if ( this.buttonElement.is("a") ) { 4007this.buttonElement.keyup(function(event) { 4008if ( event.keyCode === $.ui.keyCode.SPACE ) { 4009$( this ).click(); 4010} 4011}); 4012} 4013} 4014this._setOption( "disabled", options.disabled ); 4015this._resetButton(); 4016}, 4017_determineButtonType: function() { 4018var ancestor, labelSelector, checked; 4019if ( this.element.is("[type=checkbox]") ) { 4020this.type = "checkbox"; 4021} else if ( this.element.is("[type=radio]") ) { 4022this.type = "radio"; 4023} else if ( this.element.is("input") ) { 4024this.type = "input"; 4025} else { 4026this.type = "button"; 4027} 4028if ( this.type === "checkbox" || this.type === "radio" ) { 4029ancestor = this.element.parents().last(); 4030labelSelector = "label[for='" + this.element.attr("id") + "']"; 4031this.buttonElement = ancestor.find( labelSelector ); 4032if ( !this.buttonElement.length ) { 4033ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings(); 4034this.buttonElement = ancestor.filter( labelSelector ); 4035if ( !this.buttonElement.length ) { 4036this.buttonElement = ancestor.find( labelSelector ); 4037} 4038} 4039this.element.addClass( "ui-helper-hidden-accessible" ); 4040checked = this.element.is( ":checked" ); 4041if ( checked ) { 4042this.buttonElement.addClass( "ui-state-active" ); 4043} 4044this.buttonElement.prop( "aria-pressed", checked ); 4045} else { 4046this.buttonElement = this.element; 4047} 4048}, 4049widget: function() { 4050return this.buttonElement; 4051}, 4052_destroy: function() { 4053this.element 4054.removeClass( "ui-helper-hidden-accessible" ); 4055this.buttonElement 4056.removeClass( baseClasses + " ui-state-active " + typeClasses ) 4057.removeAttr( "role" ) 4058.removeAttr( "aria-pressed" ) 4059.html( this.buttonElement.find(".ui-button-text").html() ); 4060if ( !this.hasTitle ) { 4061this.buttonElement.removeAttr( "title" ); 4062} 4063}, 4064_setOption: function( key, value ) { 4065this._super( key, value ); 4066if ( key === "disabled" ) { 4067this.widget().toggleClass( "ui-state-disabled", !!value ); 4068this.element.prop( "disabled", !!value ); 4069if ( value ) { 4070if ( this.type === "checkbox" || this.type === "radio" ) { 4071this.buttonElement.removeClass( "ui-state-focus" ); 4072} else { 4073this.buttonElement.removeClass( "ui-state-focus ui-state-active" ); 4074} 4075} 4076return; 4077} 4078this._resetButton(); 4079}, 4080refresh: function() { 4081var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" ); 4082if ( isDisabled !== this.options.disabled ) { 4083this._setOption( "disabled", isDisabled ); 4084} 4085if ( this.type === "radio" ) { 4086radioGroup( this.element[0] ).each(function() { 4087if ( $( this ).is( ":checked" ) ) { 4088$( this ).button( "widget" ) 4089.addClass( "ui-state-active" ) 4090.attr( "aria-pressed", "true" ); 4091} else { 4092$( this ).button( "widget" ) 4093.removeClass( "ui-state-active" ) 4094.attr( "aria-pressed", "false" ); 4095} 4096}); 4097} else if ( this.type === "checkbox" ) { 4098if ( this.element.is( ":checked" ) ) { 4099this.buttonElement 4100.addClass( "ui-state-active" ) 4101.attr( "aria-pressed", "true" ); 4102} else { 4103this.buttonElement 4104.removeClass( "ui-state-active" ) 4105.attr( "aria-pressed", "false" ); 4106} 4107} 4108}, 4109_resetButton: function() { 4110if ( this.type === "input" ) { 4111if ( this.options.label ) { 4112this.element.val( this.options.label ); 4113} 4114return; 4115} 4116var buttonElement = this.buttonElement.removeClass( typeClasses ), 4117buttonText = $( "<span></span>", this.document[0] ) 4118.addClass( "ui-button-text" ) 4119.html( this.options.label ) 4120.appendTo( buttonElement.empty() ) 4121.text(), 4122icons = this.options.icons, 4123multipleIcons = icons.primary && icons.secondary, 4124buttonClasses = []; 4125if ( icons.primary || icons.secondary ) { 4126if ( this.options.text ) { 4127buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) ); 4128} 4129if ( icons.primary ) { 4130buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" ); 4131} 4132if ( icons.secondary ) { 4133buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" ); 4134} 4135if ( !this.options.text ) { 4136buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" ); 4137if ( !this.hasTitle ) { 4138buttonElement.attr( "title", $.trim( buttonText ) ); 4139} 4140} 4141} else { 4142buttonClasses.push( "ui-button-text-only" ); 4143} 4144buttonElement.addClass( buttonClasses.join( " " ) ); 4145} 4146}); 4147$.widget( "ui.buttonset", { 4148version: "1.11.4", 4149options: { 4150items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)" 4151}, 4152_create: function() { 4153this.element.addClass( "ui-buttonset" ); 4154}, 4155_init: function() { 4156this.refresh(); 4157}, 4158_setOption: function( key, value ) { 4159if ( key === "disabled" ) { 4160this.buttons.button( "option", key, value ); 4161} 4162this._super( key, value ); 4163}, 4164refresh: function() { 4165var rtl = this.element.css( "direction" ) === "rtl", 4166allButtons = this.element.find( this.options.items ), 4167existingButtons = allButtons.filter( ":ui-button" ); 4168allButtons.not( ":ui-button" ).button(); 4169existingButtons.button( "refresh" ); 4170this.buttons = allButtons 4171.map(function() { 4172return $( this ).button( "widget" )[ 0 ]; 4173}) 4174.removeClass( "ui-corner-all ui-corner-left ui-corner-right" ) 4175.filter( ":first" ) 4176.addClass( rtl ? "ui-corner-right" : "ui-corner-left" ) 4177.end() 4178.filter( ":last" ) 4179.addClass( rtl ? "ui-corner-left" : "ui-corner-right" ) 4180.end() 4181.end(); 4182}, 4183_destroy: function() { 4184this.element.removeClass( "ui-buttonset" ); 4185this.buttons 4186.map(function() { 4187return $( this ).button( "widget" )[ 0 ]; 4188}) 4189.removeClass( "ui-corner-left ui-corner-right" ) 4190.end() 4191.button( "destroy" ); 4192} 4193}); 4194var button = $.ui.button; 4195$.extend($.ui, { datepicker: { version: "1.11.4" } }); 4196var datepicker_instActive; 4197function datepicker_getZindex( elem ) { 4198var position, value; 4199while ( elem.length && elem[ 0 ] !== document ) { 4200position = elem.css( "position" ); 4201if ( position === "absolute" || position === "relative" || position === "fixed" ) { 4202value = parseInt( elem.css( "zIndex" ), 10 ); 4203if ( !isNaN( value ) && value !== 0 ) { 4204return value; 4205} 4206} 4207elem = elem.parent(); 4208} 4209return 0; 4210} 4211function Datepicker() { 4212this._curInst = null; // The current instance in use 4213this._keyEvent = false; // If the last event was a key event 4214this._disabledInputs = []; // List of date picker inputs that have been disabled 4215this._datepickerShowing = false; // True if the popup picker is showing , false if not 4216this._inDialog = false; // True if showing within a "dialog", false if not 4217this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division 4218this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class 4219this._appendClass = "ui-datepicker-append"; // The name of the append marker class 4220this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class 4221this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class 4222this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class 4223this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class 4224this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class 4225this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class 4226this.regional = []; // Available regional settings, indexed by language code 4227this.regional[""] = { // Default regional settings 4228closeText: "Done", // Display text for close link 4229prevText: "Prev", // Display text for previous month link 4230nextText: "Next", // Display text for next month link 4231currentText: "Today", // Display text for current month link 4232monthNames: ["January","February","March","April","May","June", 4233"July","August","September","October","November","December"], // Names of months for drop-down and formatting 4234monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], // For formatting 4235dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], // For formatting 4236dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // For formatting 4237dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"], // Column headings for days starting at Sunday 4238weekHeader: "Wk", // Column header for week of the year 4239dateFormat: "mm/dd/yy", // See format options on parseDate 4240firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ... 4241isRTL: false, // True if right-to-left language, false if left-to-right 4242showMonthAfterYear: false, // True if the year select precedes month, false for month then year 4243yearSuffix: "" // Additional text to append to the year in the month headers 4244}; 4245this._defaults = { // Global defaults for all the date picker instances 4246showOn: "focus", // "focus" for popup on focus, 4247showAnim: "fadeIn", // Name of jQuery animation for popup 4248showOptions: {}, // Options for enhanced animations 4249defaultDate: null, // Used when field is blank: actual date, 4250appendText: "", // Display text following the input box, e.g. showing the format 4251buttonText: "...", // Text for trigger button 4252buttonImage: "", // URL for trigger button image 4253buttonImageOnly: false, // True if the image appears alone, false if it appears on a button 4254hideIfNoPrevNext: false, // True to hide next/previous month links 4255navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links 4256gotoCurrent: false, // True if today link goes back to current selection instead 4257changeMonth: false, // True if month can be selected directly, false if only prev/next 4258changeYear: false, // True if year can be selected directly, false if only prev/next 4259yearRange: "c-10:c+10", // Range of years to display in drop-down, 4260showOtherMonths: false, // True to show dates in other months, false to leave blank 4261selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable 4262showWeek: false, // True to show week of the year, false to not show it 4263calculateWeek: this.iso8601Week, // How to calculate the week of the year, 4264shortYearCutoff: "+10", // Short year values < this are in the current century, 4265minDate: null, // The earliest selectable date, or null for no limit 4266maxDate: null, // The latest selectable date, or null for no limit 4267duration: "fast", // Duration of display/closure 4268beforeShowDay: null, // Function that takes a date and returns an array with 4269beforeShow: null, // Function that takes an input field and 4270onSelect: null, // Define a callback function when a date is selected 4271onChangeMonthYear: null, // Define a callback function when the month or year is changed 4272onClose: null, // Define a callback function when the datepicker is closed 4273numberOfMonths: 1, // Number of months to show at a time 4274showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0) 4275stepMonths: 1, // Number of months to step back/forward 4276stepBigMonths: 12, // Number of months to step back/forward for the big links 4277altField: "", // Selector for an alternate field to store selected dates into 4278altFormat: "", // The date format to use for the alternate field 4279constrainInput: true, // The input is constrained by the current date format 4280showButtonPanel: false, // True to show button panel, false to not show it 4281autoSize: false, // True to size the input for the date format, false to leave as is 4282disabled: false // The initial disabled state 4283}; 4284$.extend(this._defaults, this.regional[""]); 4285this.regional.en = $.extend( true, {}, this.regional[ "" ]); 4286this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en ); 4287this.dpDiv = datepicker_bindHover($("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")); 4288} 4289$.extend(Datepicker.prototype, { 4290markerClassName: "hasDatepicker", 4291maxRows: 4, 4292_widgetDatepicker: function() { 4293return this.dpDiv; 4294}, 4295setDefaults: function(settings) { 4296datepicker_extendRemove(this._defaults, settings || {}); 4297return this; 4298}, 4299_attachDatepicker: function(target, settings) { 4300var nodeName, inline, inst; 4301nodeName = target.nodeName.toLowerCase(); 4302inline = (nodeName === "div" || nodeName === "span"); 4303if (!target.id) { 4304this.uuid += 1; 4305target.id = "dp" + this.uuid; 4306} 4307inst = this._newInst($(target), inline); 4308inst.settings = $.extend({}, settings || {}); 4309if (nodeName === "input") { 4310this._connectDatepicker(target, inst); 4311} else if (inline) { 4312this._inlineDatepicker(target, inst); 4313} 4314}, 4315_newInst: function(target, inline) { 4316var id = target[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); // escape jQuery meta chars 4317return {id: id, input: target, // associated target 4318selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection 4319drawMonth: 0, drawYear: 0, // month being drawn 4320inline: inline, // is datepicker inline or not 4321dpDiv: (!inline ? this.dpDiv : // presentation div 4322datepicker_bindHover($("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))}; 4323}, 4324_connectDatepicker: function(target, inst) { 4325var input = $(target); 4326inst.append = $([]); 4327inst.trigger = $([]); 4328if (input.hasClass(this.markerClassName)) { 4329return; 4330} 4331this._attachments(input, inst); 4332input.addClass(this.markerClassName).keydown(this._doKeyDown). 4333keypress(this._doKeyPress).keyup(this._doKeyUp); 4334this._autoSize(inst); 4335$.data(target, "datepicker", inst); 4336if( inst.settings.disabled ) { 4337this._disableDatepicker( target ); 4338} 4339}, 4340_attachments: function(input, inst) { 4341var showOn, buttonText, buttonImage, 4342appendText = this._get(inst, "appendText"), 4343isRTL = this._get(inst, "isRTL"); 4344if (inst.append) { 4345inst.append.remove(); 4346} 4347if (appendText) { 4348inst.append = $("<span class='" + this._appendClass + "'>" + appendText + "</span>"); 4349input[isRTL ? "before" : "after"](inst.append); 4350} 4351input.unbind("focus", this._showDatepicker); 4352if (inst.trigger) { 4353inst.trigger.remove(); 4354} 4355showOn = this._get(inst, "showOn"); 4356if (showOn === "focus" || showOn === "both") { // pop-up date picker when in the marked field 4357input.focus(this._showDatepicker); 4358} 4359if (showOn === "button" || showOn === "both") { // pop-up date picker when button clicked 4360buttonText = this._get(inst, "buttonText"); 4361buttonImage = this._get(inst, "buttonImage"); 4362inst.trigger = $(this._get(inst, "buttonImageOnly") ? 4363$("<img/>").addClass(this._triggerClass). 4364attr({ src: buttonImage, alt: buttonText, title: buttonText }) : 4365$("<button type='button'></button>").addClass(this._triggerClass). 4366html(!buttonImage ? buttonText : $("<img/>").attr( 4367{ src:buttonImage, alt:buttonText, title:buttonText }))); 4368input[isRTL ? "before" : "after"](inst.trigger); 4369inst.trigger.click(function() { 4370if ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) { 4371$.datepicker._hideDatepicker(); 4372} else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) { 4373$.datepicker._hideDatepicker(); 4374$.datepicker._showDatepicker(input[0]); 4375} else { 4376$.datepicker._showDatepicker(input[0]); 4377} 4378return false;
vendor: 5,096 bytes, lines 4379-4530
4379}); 4380} 4381}, 4382_autoSize: function(inst) { 4383if (this._get(inst, "autoSize") && !inst.inline) { 4384var findMax, max, maxI, i, 4385date = new Date(2009, 12 - 1, 20), // Ensure double digits 4386dateFormat = this._get(inst, "dateFormat"); 4387if (dateFormat.match(/[DM]/)) { 4388findMax = function(names) { 4389max = 0; 4390maxI = 0; 4391for (i = 0; i < names.length; i++) { 4392if (names[i].length > max) { 4393max = names[i].length; 4394maxI = i; 4395} 4396} 4397return maxI; 4398}; 4399date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ? 4400"monthNames" : "monthNamesShort")))); 4401date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ? 4402"dayNames" : "dayNamesShort"))) + 20 - date.getDay()); 4403} 4404inst.input.attr("size", this._formatDate(inst, date).length); 4405} 4406}, 4407_inlineDatepicker: function(target, inst) { 4408var divSpan = $(target); 4409if (divSpan.hasClass(this.markerClassName)) { 4410return; 4411} 4412divSpan.addClass(this.markerClassName).append(inst.dpDiv); 4413$.data(target, "datepicker", inst); 4414this._setDate(inst, this._getDefaultDate(inst), true); 4415this._updateDatepicker(inst); 4416this._updateAlternate(inst); 4417if( inst.settings.disabled ) { 4418this._disableDatepicker( target ); 4419} 4420inst.dpDiv.css( "display", "block" ); 4421}, 4422_dialogDatepicker: function(input, date, onSelect, settings, pos) { 4423var id, browserWidth, browserHeight, scrollX, scrollY, 4424inst = this._dialogInst; // internal instance 4425if (!inst) { 4426this.uuid += 1; 4427id = "dp" + this.uuid; 4428this._dialogInput = $("<input type='text' id='" + id + 4429"' style='position: absolute; top: -100px; width: 0px;'/>"); 4430this._dialogInput.keydown(this._doKeyDown); 4431$("body").append(this._dialogInput); 4432inst = this._dialogInst = this._newInst(this._dialogInput, false); 4433inst.settings = {}; 4434$.data(this._dialogInput[0], "datepicker", inst); 4435} 4436datepicker_extendRemove(inst.settings, settings || {}); 4437date = (date && date.constructor === Date ? this._formatDate(inst, date) : date); 4438this._dialogInput.val(date); 4439this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null); 4440if (!this._pos) { 4441browserWidth = document.documentElement.clientWidth; 4442browserHeight = document.documentElement.clientHeight; 4443scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; 4444scrollY = document.documentElement.scrollTop || document.body.scrollTop; 4445this._pos = // should use actual width/height below 4446[(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY]; 4447} 4448this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px"); 4449inst.settings.onSelect = onSelect; 4450this._inDialog = true; 4451this.dpDiv.addClass(this._dialogClass); 4452this._showDatepicker(this._dialogInput[0]); 4453if ($.blockUI) { 4454$.blockUI(this.dpDiv); 4455} 4456$.data(this._dialogInput[0], "datepicker", inst); 4457return this; 4458}, 4459_destroyDatepicker: function(target) { 4460var nodeName, 4461$target = $(target), 4462inst = $.data(target, "datepicker"); 4463if (!$target.hasClass(this.markerClassName)) { 4464return; 4465} 4466nodeName = target.nodeName.toLowerCase(); 4467$.removeData(target, "datepicker"); 4468if (nodeName === "input") { 4469inst.append.remove(); 4470inst.trigger.remove(); 4471$target.removeClass(this.markerClassName). 4472unbind("focus", this._showDatepicker). 4473unbind("keydown", this._doKeyDown). 4474unbind("keypress", this._doKeyPress). 4475unbind("keyup", this._doKeyUp); 4476} else if (nodeName === "div" || nodeName === "span") { 4477$target.removeClass(this.markerClassName).empty(); 4478} 4479if ( datepicker_instActive === inst ) { 4480datepicker_instActive = null; 4481} 4482}, 4483_enableDatepicker: function(target) { 4484var nodeName, inline, 4485$target = $(target), 4486inst = $.data(target, "datepicker"); 4487if (!$target.hasClass(this.markerClassName)) { 4488return; 4489} 4490nodeName = target.nodeName.toLowerCase(); 4491if (nodeName === "input") { 4492target.disabled = false; 4493inst.trigger.filter("button"). 4494each(function() { this.disabled = false; }).end(). 4495filter("img").css({opacity: "1.0", cursor: ""}); 4496} else if (nodeName === "div" || nodeName === "span") { 4497inline = $target.children("." + this._inlineClass); 4498inline.children().removeClass("ui-state-disabled"); 4499inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). 4500prop("disabled", false); 4501} 4502this._disabledInputs = $.map(this._disabledInputs, 4503function(value) { return (value === target ? null : value); }); // delete entry 4504}, 4505_disableDatepicker: function(target) { 4506var nodeName, inline, 4507$target = $(target), 4508inst = $.data(target, "datepicker"); 4509if (!$target.hasClass(this.markerClassName)) { 4510return; 4511} 4512nodeName = target.nodeName.toLowerCase(); 4513if (nodeName === "input") { 4514target.disabled = true; 4515inst.trigger.filter("button"). 4516each(function() { this.disabled = true; }).end(). 4517filter("img").css({opacity: "0.5", cursor: "default"}); 4518} else if (nodeName === "div" || nodeName === "span") { 4519inline = $target.children("." + this._inlineClass); 4520inline.children().addClass("ui-state-disabled"); 4521inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). 4522prop("disabled", true); 4523} 4524this._disabledInputs = $.map(this._disabledInputs, 4525function(value) { return (value === target ? null : value); }); // delete entry 4526this._disabledInputs[this._disabledInputs.length] = target; 4527}, 4528_isDisabledDatepicker: function(target) { 4529if (!target) { 4530return false;
vendor: 4,860 bytes, lines 4531-4686
4531} 4532for (var i = 0; i < this._disabledInputs.length; i++) { 4533if (this._disabledInputs[i] === target) { 4534return true; 4535} 4536} 4537return false; 4538}, 4539_getInst: function(target) { 4540try { 4541return $.data(target, "datepicker"); 4542} 4543catch (err) { 4544throw "Missing instance data for this datepicker"; 4545} 4546}, 4547_optionDatepicker: function(target, name, value) { 4548var settings, date, minDate, maxDate, 4549inst = this._getInst(target); 4550if (arguments.length === 2 && typeof name === "string") { 4551return (name === "defaults" ? $.extend({}, $.datepicker._defaults) : 4552(inst ? (name === "all" ? $.extend({}, inst.settings) : 4553this._get(inst, name)) : null)); 4554} 4555settings = name || {}; 4556if (typeof name === "string") { 4557settings = {}; 4558settings[name] = value; 4559} 4560if (inst) { 4561if (this._curInst === inst) { 4562this._hideDatepicker(); 4563} 4564date = this._getDateDatepicker(target, true); 4565minDate = this._getMinMaxDate(inst, "min"); 4566maxDate = this._getMinMaxDate(inst, "max"); 4567datepicker_extendRemove(inst.settings, settings); 4568if (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) { 4569inst.settings.minDate = this._formatDate(inst, minDate); 4570} 4571if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) { 4572inst.settings.maxDate = this._formatDate(inst, maxDate); 4573} 4574if ( "disabled" in settings ) { 4575if ( settings.disabled ) { 4576this._disableDatepicker(target); 4577} else { 4578this._enableDatepicker(target); 4579} 4580} 4581this._attachments($(target), inst); 4582this._autoSize(inst); 4583this._setDate(inst, date); 4584this._updateAlternate(inst); 4585this._updateDatepicker(inst); 4586} 4587}, 4588_changeDatepicker: function(target, name, value) { 4589this._optionDatepicker(target, name, value); 4590}, 4591_refreshDatepicker: function(target) { 4592var inst = this._getInst(target); 4593if (inst) { 4594this._updateDatepicker(inst); 4595} 4596}, 4597_setDateDatepicker: function(target, date) { 4598var inst = this._getInst(target); 4599if (inst) { 4600this._setDate(inst, date); 4601this._updateDatepicker(inst); 4602this._updateAlternate(inst); 4603} 4604}, 4605_getDateDatepicker: function(target, noDefault) { 4606var inst = this._getInst(target); 4607if (inst && !inst.inline) { 4608this._setDateFromField(inst, noDefault); 4609} 4610return (inst ? this._getDate(inst) : null); 4611}, 4612_doKeyDown: function(event) { 4613var onSelect, dateStr, sel, 4614inst = $.datepicker._getInst(event.target), 4615handled = true, 4616isRTL = inst.dpDiv.is(".ui-datepicker-rtl"); 4617inst._keyEvent = true; 4618if ($.datepicker._datepickerShowing) { 4619switch (event.keyCode) { 4620case 9: $.datepicker._hideDatepicker(); 4621handled = false; 4622break; // hide on tab out 4623case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." + 4624$.datepicker._currentClass + ")", inst.dpDiv); 4625if (sel[0]) { 4626$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]); 4627} 4628onSelect = $.datepicker._get(inst, "onSelect"); 4629if (onSelect) { 4630dateStr = $.datepicker._formatDate(inst); 4631onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); 4632} else { 4633$.datepicker._hideDatepicker(); 4634} 4635return false; // don't submit the form 4636case 27: $.datepicker._hideDatepicker(); 4637break; // hide on escape 4638case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ? 4639-$.datepicker._get(inst, "stepBigMonths") : 4640-$.datepicker._get(inst, "stepMonths")), "M"); 4641break; // previous month/year on page up/+ ctrl 4642case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ? 4643+$.datepicker._get(inst, "stepBigMonths") : 4644+$.datepicker._get(inst, "stepMonths")), "M"); 4645break; // next month/year on page down/+ ctrl 4646case 35: if (event.ctrlKey || event.metaKey) { 4647$.datepicker._clearDate(event.target); 4648} 4649handled = event.ctrlKey || event.metaKey; 4650break; // clear on ctrl or command +end 4651case 36: if (event.ctrlKey || event.metaKey) { 4652$.datepicker._gotoToday(event.target); 4653} 4654handled = event.ctrlKey || event.metaKey; 4655break; // current on ctrl or command +home 4656case 37: if (event.ctrlKey || event.metaKey) { 4657$.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D"); 4658} 4659handled = event.ctrlKey || event.metaKey; 4660if (event.originalEvent.altKey) { 4661$.datepicker._adjustDate(event.target, (event.ctrlKey ? 4662-$.datepicker._get(inst, "stepBigMonths") : 4663-$.datepicker._get(inst, "stepMonths")), "M"); 4664} 4665break; 4666case 38: if (event.ctrlKey || event.metaKey) { 4667$.datepicker._adjustDate(event.target, -7, "D"); 4668} 4669handled = event.ctrlKey || event.metaKey; 4670break; // -1 week on ctrl or command +up 4671case 39: if (event.ctrlKey || event.metaKey) { 4672$.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D"); 4673} 4674handled = event.ctrlKey || event.metaKey; 4675if (event.originalEvent.altKey) { 4676$.datepicker._adjustDate(event.target, (event.ctrlKey ? 4677+$.datepicker._get(inst, "stepBigMonths") : 4678+$.datepicker._get(inst, "stepMonths")), "M"); 4679} 4680break; 4681case 40: if (event.ctrlKey || event.metaKey) { 4682$.datepicker._adjustDate(event.target, +7, "D"); 4683} 4684handled = event.ctrlKey || event.metaKey; 4685break; // +1 week on ctrl or command +down 4686default: handled = false;
vendor: 13,128 bytes, lines 4687-5065
4687} 4688} else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home 4689$.datepicker._showDatepicker(this); 4690} else { 4691handled = false; 4692} 4693if (handled) { 4694event.preventDefault(); 4695event.stopPropagation(); 4696} 4697}, 4698_doKeyPress: function(event) { 4699var chars, chr, 4700inst = $.datepicker._getInst(event.target); 4701if ($.datepicker._get(inst, "constrainInput")) { 4702chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat")); 4703chr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode); 4704return event.ctrlKey || event.metaKey || (chr < " " || !chars || chars.indexOf(chr) > -1); 4705} 4706}, 4707_doKeyUp: function(event) { 4708var date, 4709inst = $.datepicker._getInst(event.target); 4710if (inst.input.val() !== inst.lastVal) { 4711try { 4712date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"), 4713(inst.input ? inst.input.val() : null), 4714$.datepicker._getFormatConfig(inst)); 4715if (date) { // only if valid 4716$.datepicker._setDateFromField(inst); 4717$.datepicker._updateAlternate(inst); 4718$.datepicker._updateDatepicker(inst); 4719} 4720} 4721catch (err) { 4722} 4723} 4724return true; 4725}, 4726_showDatepicker: function(input) { 4727input = input.target || input; 4728if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger 4729input = $("input", input.parentNode)[0]; 4730} 4731if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here 4732return; 4733} 4734var inst, beforeShow, beforeShowSettings, isFixed, 4735offset, showAnim, duration; 4736inst = $.datepicker._getInst(input); 4737if ($.datepicker._curInst && $.datepicker._curInst !== inst) { 4738$.datepicker._curInst.dpDiv.stop(true, true); 4739if ( inst && $.datepicker._datepickerShowing ) { 4740$.datepicker._hideDatepicker( $.datepicker._curInst.input[0] ); 4741} 4742} 4743beforeShow = $.datepicker._get(inst, "beforeShow"); 4744beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {}; 4745if(beforeShowSettings === false){ 4746return; 4747} 4748datepicker_extendRemove(inst.settings, beforeShowSettings); 4749inst.lastVal = null; 4750$.datepicker._lastInput = input; 4751$.datepicker._setDateFromField(inst); 4752if ($.datepicker._inDialog) { // hide cursor 4753input.value = ""; 4754} 4755if (!$.datepicker._pos) { // position below input 4756$.datepicker._pos = $.datepicker._findPos(input); 4757$.datepicker._pos[1] += input.offsetHeight; // add the height 4758} 4759isFixed = false; 4760$(input).parents().each(function() { 4761isFixed |= $(this).css("position") === "fixed"; 4762return !isFixed; 4763}); 4764offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]}; 4765$.datepicker._pos = null; 4766inst.dpDiv.empty(); 4767inst.dpDiv.css({position: "absolute", display: "block", top: "-1000px"}); 4768$.datepicker._updateDatepicker(inst); 4769offset = $.datepicker._checkOffset(inst, offset, isFixed); 4770inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ? 4771"static" : (isFixed ? "fixed" : "absolute")), display: "none", 4772left: offset.left + "px", top: offset.top + "px"}); 4773if (!inst.inline) { 4774showAnim = $.datepicker._get(inst, "showAnim"); 4775duration = $.datepicker._get(inst, "duration"); 4776inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 ); 4777$.datepicker._datepickerShowing = true; 4778if ( $.effects && $.effects.effect[ showAnim ] ) { 4779inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration); 4780} else { 4781inst.dpDiv[showAnim || "show"](showAnim ? duration : null); 4782} 4783if ( $.datepicker._shouldFocusInput( inst ) ) { 4784inst.input.focus(); 4785} 4786$.datepicker._curInst = inst; 4787} 4788}, 4789_updateDatepicker: function(inst) { 4790this.maxRows = 4; //Reset the max number of rows being displayed (see #7043) 4791datepicker_instActive = inst; // for delegate hover events 4792inst.dpDiv.empty().append(this._generateHTML(inst)); 4793this._attachHandlers(inst); 4794var origyearshtml, 4795numMonths = this._getNumberOfMonths(inst), 4796cols = numMonths[1], 4797width = 17, 4798activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" ); 4799if ( activeCell.length > 0 ) { 4800datepicker_handleMouseover.apply( activeCell.get( 0 ) ); 4801} 4802inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""); 4803if (cols > 1) { 4804inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em"); 4805} 4806inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove") + 4807"Class"]("ui-datepicker-multi"); 4808inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") + 4809"Class"]("ui-datepicker-rtl"); 4810if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) { 4811inst.input.focus(); 4812} 4813if( inst.yearshtml ){ 4814origyearshtml = inst.yearshtml; 4815setTimeout(function(){ 4816if( origyearshtml === inst.yearshtml && inst.yearshtml ){ 4817inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml); 4818} 4819origyearshtml = inst.yearshtml = null; 4820}, 0); 4821} 4822}, 4823_shouldFocusInput: function( inst ) { 4824return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" ); 4825}, 4826_checkOffset: function(inst, offset, isFixed) { 4827var dpWidth = inst.dpDiv.outerWidth(), 4828dpHeight = inst.dpDiv.outerHeight(), 4829inputWidth = inst.input ? inst.input.outerWidth() : 0, 4830inputHeight = inst.input ? inst.input.outerHeight() : 0, 4831viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()), 4832viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop()); 4833offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0); 4834offset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0; 4835offset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0; 4836offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? 4837Math.abs(offset.left + dpWidth - viewWidth) : 0); 4838offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? 4839Math.abs(dpHeight + inputHeight) : 0); 4840return offset; 4841}, 4842_findPos: function(obj) { 4843var position, 4844inst = this._getInst(obj), 4845isRTL = this._get(inst, "isRTL"); 4846while (obj && (obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) { 4847obj = obj[isRTL ? "previousSibling" : "nextSibling"]; 4848} 4849position = $(obj).offset(); 4850return [position.left, position.top]; 4851}, 4852_hideDatepicker: function(input) { 4853var showAnim, duration, postProcess, onClose, 4854inst = this._curInst; 4855if (!inst || (input && inst !== $.data(input, "datepicker"))) { 4856return; 4857} 4858if (this._datepickerShowing) { 4859showAnim = this._get(inst, "showAnim"); 4860duration = this._get(inst, "duration"); 4861postProcess = function() { 4862$.datepicker._tidyDialog(inst); 4863}; 4864if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) { 4865inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess); 4866} else { 4867inst.dpDiv[(showAnim === "slideDown" ? "slideUp" : 4868(showAnim === "fadeIn" ? "fadeOut" : "hide"))]((showAnim ? duration : null), postProcess); 4869} 4870if (!showAnim) { 4871postProcess(); 4872} 4873this._datepickerShowing = false; 4874onClose = this._get(inst, "onClose"); 4875if (onClose) { 4876onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]); 4877} 4878this._lastInput = null; 4879if (this._inDialog) { 4880this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" }); 4881if ($.blockUI) { 4882$.unblockUI(); 4883$("body").append(this.dpDiv); 4884} 4885} 4886this._inDialog = false; 4887} 4888}, 4889_tidyDialog: function(inst) { 4890inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar"); 4891}, 4892_checkExternalClick: function(event) { 4893if (!$.datepicker._curInst) { 4894return; 4895} 4896var $target = $(event.target), 4897inst = $.datepicker._getInst($target[0]); 4898if ( ( ( $target[0].id !== $.datepicker._mainDivId && 4899$target.parents("#" + $.datepicker._mainDivId).length === 0 && 4900!$target.hasClass($.datepicker.markerClassName) && 4901!$target.closest("." + $.datepicker._triggerClass).length && 4902$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) || 4903( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) { 4904$.datepicker._hideDatepicker(); 4905} 4906}, 4907_adjustDate: function(id, offset, period) { 4908var target = $(id), 4909inst = this._getInst(target[0]); 4910if (this._isDisabledDatepicker(target[0])) { 4911return; 4912} 4913this._adjustInstDate(inst, offset + 4914(period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning 4915period); 4916this._updateDatepicker(inst); 4917}, 4918_gotoToday: function(id) { 4919var date, 4920target = $(id), 4921inst = this._getInst(target[0]); 4922if (this._get(inst, "gotoCurrent") && inst.currentDay) { 4923inst.selectedDay = inst.currentDay; 4924inst.drawMonth = inst.selectedMonth = inst.currentMonth; 4925inst.drawYear = inst.selectedYear = inst.currentYear; 4926} else { 4927date = new Date(); 4928inst.selectedDay = date.getDate(); 4929inst.drawMonth = inst.selectedMonth = date.getMonth(); 4930inst.drawYear = inst.selectedYear = date.getFullYear(); 4931} 4932this._notifyChange(inst); 4933this._adjustDate(target); 4934}, 4935_selectMonthYear: function(id, select, period) { 4936var target = $(id), 4937inst = this._getInst(target[0]); 4938inst["selected" + (period === "M" ? "Month" : "Year")] = 4939inst["draw" + (period === "M" ? "Month" : "Year")] = 4940parseInt(select.options[select.selectedIndex].value,10); 4941this._notifyChange(inst); 4942this._adjustDate(target); 4943}, 4944_selectDay: function(id, month, year, td) { 4945var inst, 4946target = $(id); 4947if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) { 4948return; 4949} 4950inst = this._getInst(target[0]); 4951inst.selectedDay = inst.currentDay = $("a", td).html(); 4952inst.selectedMonth = inst.currentMonth = month; 4953inst.selectedYear = inst.currentYear = year; 4954this._selectDate(id, this._formatDate(inst, 4955inst.currentDay, inst.currentMonth, inst.currentYear)); 4956}, 4957_clearDate: function(id) { 4958var target = $(id); 4959this._selectDate(target, ""); 4960}, 4961_selectDate: function(id, dateStr) { 4962var onSelect, 4963target = $(id), 4964inst = this._getInst(target[0]); 4965dateStr = (dateStr != null ? dateStr : this._formatDate(inst)); 4966if (inst.input) { 4967inst.input.val(dateStr); 4968} 4969this._updateAlternate(inst); 4970onSelect = this._get(inst, "onSelect"); 4971if (onSelect) { 4972onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback 4973} else if (inst.input) { 4974inst.input.trigger("change"); // fire the change event 4975} 4976if (inst.inline){ 4977this._updateDatepicker(inst); 4978} else { 4979this._hideDatepicker(); 4980this._lastInput = inst.input[0]; 4981if (typeof(inst.input[0]) !== "object") { 4982inst.input.focus(); // restore focus 4983} 4984this._lastInput = null; 4985} 4986}, 4987_updateAlternate: function(inst) { 4988var altFormat, date, dateStr, 4989altField = this._get(inst, "altField"); 4990if (altField) { // update alternate field too 4991altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat"); 4992date = this._getDate(inst); 4993dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst)); 4994$(altField).each(function() { $(this).val(dateStr); }); 4995} 4996}, 4997noWeekends: function(date) { 4998var day = date.getDay(); 4999return [(day > 0 && day < 6), ""]; 5000}, 5001iso8601Week: function(date) { 5002var time, 5003checkDate = new Date(date.getTime()); 5004checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); 5005time = checkDate.getTime(); 5006checkDate.setMonth(0); // Compare with Jan 1 5007checkDate.setDate(1); 5008return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1; 5009}, 5010parseDate: function (format, value, settings) { 5011if (format == null || value == null) { 5012throw "Invalid arguments"; 5013} 5014value = (typeof value === "object" ? value.toString() : value + ""); 5015if (value === "") { 5016return null; 5017} 5018var iFormat, dim, extra, 5019iValue = 0, 5020shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff, 5021shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp : 5022new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)), 5023dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort, 5024dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames, 5025monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort, 5026monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames, 5027year = -1, 5028month = -1, 5029day = -1, 5030doy = -1, 5031literal = false, 5032date, 5033lookAhead = function(match) { 5034var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); 5035if (matches) { 5036iFormat++; 5037} 5038return matches; 5039}, 5040getNumber = function(match) { 5041var isDoubled = lookAhead(match), 5042size = (match === "@" ? 14 : (match === "!" ? 20 : 5043(match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))), 5044minSize = (match === "y" ? size : 1), 5045digits = new RegExp("^\\d{" + minSize + "," + size + "}"), 5046num = value.substring(iValue).match(digits); 5047if (!num) { 5048throw "Missing number at position " + iValue; 5049} 5050iValue += num[0].length; 5051return parseInt(num[0], 10); 5052}, 5053getName = function(match, shortNames, longNames) { 5054var index = -1, 5055names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) { 5056return [ [k, v] ]; 5057}).sort(function (a, b) { 5058return -(a[1].length - b[1].length); 5059}); 5060$.each(names, function (i, pair) { 5061var name = pair[1]; 5062if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) { 5063index = pair[0]; 5064iValue += name.length; 5065return false;
vendor: 9,242 bytes, lines 5066-5423
5066} 5067}); 5068if (index !== -1) { 5069return index + 1; 5070} else { 5071throw "Unknown name at position " + iValue; 5072} 5073}, 5074checkLiteral = function() { 5075if (value.charAt(iValue) !== format.charAt(iFormat)) { 5076throw "Unexpected literal at position " + iValue; 5077} 5078iValue++; 5079}; 5080for (iFormat = 0; iFormat < format.length; iFormat++) { 5081if (literal) { 5082if (format.charAt(iFormat) === "'" && !lookAhead("'")) { 5083literal = false; 5084} else { 5085checkLiteral(); 5086} 5087} else { 5088switch (format.charAt(iFormat)) { 5089case "d": 5090day = getNumber("d"); 5091break; 5092case "D": 5093getName("D", dayNamesShort, dayNames); 5094break; 5095case "o": 5096doy = getNumber("o"); 5097break; 5098case "m": 5099month = getNumber("m"); 5100break; 5101case "M": 5102month = getName("M", monthNamesShort, monthNames); 5103break; 5104case "y": 5105year = getNumber("y"); 5106break; 5107case "@": 5108date = new Date(getNumber("@")); 5109year = date.getFullYear(); 5110month = date.getMonth() + 1; 5111day = date.getDate(); 5112break; 5113case "!": 5114date = new Date((getNumber("!") - this._ticksTo1970) / 10000); 5115year = date.getFullYear(); 5116month = date.getMonth() + 1; 5117day = date.getDate(); 5118break; 5119case "'": 5120if (lookAhead("'")){ 5121checkLiteral(); 5122} else { 5123literal = true; 5124} 5125break; 5126default: 5127checkLiteral(); 5128} 5129} 5130} 5131if (iValue < value.length){ 5132extra = value.substr(iValue); 5133if (!/^\s+/.test(extra)) { 5134throw "Extra/unparsed characters found in date: " + extra; 5135} 5136} 5137if (year === -1) { 5138year = new Date().getFullYear(); 5139} else if (year < 100) { 5140year += new Date().getFullYear() - new Date().getFullYear() % 100 + 5141(year <= shortYearCutoff ? 0 : -100); 5142} 5143if (doy > -1) { 5144month = 1; 5145day = doy; 5146do { 5147dim = this._getDaysInMonth(year, month - 1); 5148if (day <= dim) { 5149break; 5150} 5151month++; 5152day -= dim; 5153} while (true); 5154} 5155date = this._daylightSavingAdjust(new Date(year, month - 1, day)); 5156if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) { 5157throw "Invalid date"; // E.g. 31/02/00 5158} 5159return date; 5160}, 5161ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601) 5162COOKIE: "D, dd M yy", 5163ISO_8601: "yy-mm-dd", 5164RFC_822: "D, d M y", 5165RFC_850: "DD, dd-M-y", 5166RFC_1036: "D, d M y", 5167RFC_1123: "D, d M yy", 5168RFC_2822: "D, d M yy", 5169RSS: "D, d M y", // RFC 822 5170TICKS: "!", 5171TIMESTAMP: "@", 5172W3C: "yy-mm-dd", // ISO 8601 5173_ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + 5174Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000), 5175formatDate: function (format, date, settings) { 5176if (!date) { 5177return ""; 5178} 5179var iFormat, 5180dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort, 5181dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames, 5182monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort, 5183monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames, 5184lookAhead = function(match) { 5185var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); 5186if (matches) { 5187iFormat++; 5188} 5189return matches; 5190}, 5191formatNumber = function(match, value, len) { 5192var num = "" + value; 5193if (lookAhead(match)) { 5194while (num.length < len) { 5195num = "0" + num; 5196} 5197} 5198return num; 5199}, 5200formatName = function(match, value, shortNames, longNames) { 5201return (lookAhead(match) ? longNames[value] : shortNames[value]); 5202}, 5203output = "", 5204literal = false; 5205if (date) { 5206for (iFormat = 0; iFormat < format.length; iFormat++) { 5207if (literal) { 5208if (format.charAt(iFormat) === "'" && !lookAhead("'")) { 5209literal = false; 5210} else { 5211output += format.charAt(iFormat); 5212} 5213} else { 5214switch (format.charAt(iFormat)) { 5215case "d": 5216output += formatNumber("d", date.getDate(), 2); 5217break; 5218case "D": 5219output += formatName("D", date.getDay(), dayNamesShort, dayNames); 5220break; 5221case "o": 5222output += formatNumber("o", 5223Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3); 5224break; 5225case "m": 5226output += formatNumber("m", date.getMonth() + 1, 2); 5227break; 5228case "M": 5229output += formatName("M", date.getMonth(), monthNamesShort, monthNames); 5230break; 5231case "y": 5232output += (lookAhead("y") ? date.getFullYear() : 5233(date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100); 5234break; 5235case "@": 5236output += date.getTime(); 5237break; 5238case "!": 5239output += date.getTime() * 10000 + this._ticksTo1970; 5240break; 5241case "'": 5242if (lookAhead("'")) { 5243output += "'"; 5244} else { 5245literal = true; 5246} 5247break; 5248default: 5249output += format.charAt(iFormat); 5250} 5251} 5252} 5253} 5254return output; 5255}, 5256_possibleChars: function (format) { 5257var iFormat, 5258chars = "", 5259literal = false, 5260lookAhead = function(match) { 5261var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); 5262if (matches) { 5263iFormat++; 5264} 5265return matches; 5266}; 5267for (iFormat = 0; iFormat < format.length; iFormat++) { 5268if (literal) { 5269if (format.charAt(iFormat) === "'" && !lookAhead("'")) { 5270literal = false; 5271} else { 5272chars += format.charAt(iFormat); 5273} 5274} else { 5275switch (format.charAt(iFormat)) { 5276case "d": case "m": case "y": case "@": 5277chars += "0123456789"; 5278break; 5279case "D": case "M": 5280return null; // Accept anything 5281case "'": 5282if (lookAhead("'")) { 5283chars += "'"; 5284} else { 5285literal = true; 5286} 5287break; 5288default: 5289chars += format.charAt(iFormat); 5290} 5291} 5292} 5293return chars; 5294}, 5295_get: function(inst, name) { 5296return inst.settings[name] !== undefined ? 5297inst.settings[name] : this._defaults[name]; 5298}, 5299_setDateFromField: function(inst, noDefault) { 5300if (inst.input.val() === inst.lastVal) { 5301return; 5302} 5303var dateFormat = this._get(inst, "dateFormat"), 5304dates = inst.lastVal = inst.input ? inst.input.val() : null, 5305defaultDate = this._getDefaultDate(inst), 5306date = defaultDate, 5307settings = this._getFormatConfig(inst); 5308try { 5309date = this.parseDate(dateFormat, dates, settings) || defaultDate; 5310} catch (event) { 5311dates = (noDefault ? "" : dates); 5312} 5313inst.selectedDay = date.getDate(); 5314inst.drawMonth = inst.selectedMonth = date.getMonth(); 5315inst.drawYear = inst.selectedYear = date.getFullYear(); 5316inst.currentDay = (dates ? date.getDate() : 0); 5317inst.currentMonth = (dates ? date.getMonth() : 0); 5318inst.currentYear = (dates ? date.getFullYear() : 0); 5319this._adjustInstDate(inst); 5320}, 5321_getDefaultDate: function(inst) { 5322return this._restrictMinMax(inst, 5323this._determineDate(inst, this._get(inst, "defaultDate"), new Date())); 5324}, 5325_determineDate: function(inst, date, defaultDate) { 5326var offsetNumeric = function(offset) { 5327var date = new Date(); 5328date.setDate(date.getDate() + offset); 5329return date; 5330}, 5331offsetString = function(offset) { 5332try { 5333return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"), 5334offset, $.datepicker._getFormatConfig(inst)); 5335} 5336catch (e) { 5337} 5338var date = (offset.toLowerCase().match(/^c/) ? 5339$.datepicker._getDate(inst) : null) || new Date(), 5340year = date.getFullYear(), 5341month = date.getMonth(), 5342day = date.getDate(), 5343pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, 5344matches = pattern.exec(offset); 5345while (matches) { 5346switch (matches[2] || "d") { 5347case "d" : case "D" : 5348day += parseInt(matches[1],10); break; 5349case "w" : case "W" : 5350day += parseInt(matches[1],10) * 7; break; 5351case "m" : case "M" : 5352month += parseInt(matches[1],10); 5353day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); 5354break; 5355case "y": case "Y" : 5356year += parseInt(matches[1],10); 5357day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); 5358break; 5359} 5360matches = pattern.exec(offset); 5361} 5362return new Date(year, month, day); 5363}, 5364newDate = (date == null || date === "" ? defaultDate : (typeof date === "string" ? offsetString(date) : 5365(typeof date === "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime())))); 5366newDate = (newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate); 5367if (newDate) { 5368newDate.setHours(0); 5369newDate.setMinutes(0); 5370newDate.setSeconds(0); 5371newDate.setMilliseconds(0); 5372} 5373return this._daylightSavingAdjust(newDate); 5374}, 5375_daylightSavingAdjust: function(date) { 5376if (!date) { 5377return null; 5378} 5379date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0); 5380return date; 5381}, 5382_setDate: function(inst, date, noChange) { 5383var clear = !date, 5384origMonth = inst.selectedMonth, 5385origYear = inst.selectedYear, 5386newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date())); 5387inst.selectedDay = inst.currentDay = newDate.getDate(); 5388inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth(); 5389inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear(); 5390if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) { 5391this._notifyChange(inst); 5392} 5393this._adjustInstDate(inst); 5394if (inst.input) { 5395inst.input.val(clear ? "" : this._formatDate(inst)); 5396} 5397}, 5398_getDate: function(inst) { 5399var startDate = (!inst.currentYear || (inst.input && inst.input.val() === "") ? null : 5400this._daylightSavingAdjust(new Date( 5401inst.currentYear, inst.currentMonth, inst.currentDay))); 5402return startDate; 5403}, 5404_attachHandlers: function(inst) { 5405var stepMonths = this._get(inst, "stepMonths"), 5406id = "#" + inst.id.replace( /\\\\/g, "\\" ); 5407inst.dpDiv.find("[data-handler]").map(function () { 5408var handler = { 5409prev: function () { 5410$.datepicker._adjustDate(id, -stepMonths, "M"); 5411}, 5412next: function () { 5413$.datepicker._adjustDate(id, +stepMonths, "M"); 5414}, 5415hide: function () { 5416$.datepicker._hideDatepicker(); 5417}, 5418today: function () { 5419$.datepicker._gotoToday(id); 5420}, 5421selectDay: function () { 5422$.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this); 5423return false;
vendor: 5,335 bytes, lines 5424-5528
5424}, 5425selectMonth: function () { 5426$.datepicker._selectMonthYear(id, this, "M"); 5427return false; 5428}, 5429selectYear: function () { 5430$.datepicker._selectMonthYear(id, this, "Y"); 5431return false; 5432} 5433}; 5434$(this).bind(this.getAttribute("data-event"), handler[this.getAttribute("data-handler")]); 5435}); 5436}, 5437_generateHTML: function(inst) { 5438var maxDraw, prevText, prev, nextText, next, currentText, gotoDate, 5439controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin, 5440monthNames, monthNamesShort, beforeShowDay, showOtherMonths, 5441selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate, 5442cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows, 5443printDate, dRow, tbody, daySettings, otherMonth, unselectable, 5444tempDate = new Date(), 5445today = this._daylightSavingAdjust( 5446new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time 5447isRTL = this._get(inst, "isRTL"), 5448showButtonPanel = this._get(inst, "showButtonPanel"), 5449hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"), 5450navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"), 5451numMonths = this._getNumberOfMonths(inst), 5452showCurrentAtPos = this._get(inst, "showCurrentAtPos"), 5453stepMonths = this._get(inst, "stepMonths"), 5454isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1), 5455currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) : 5456new Date(inst.currentYear, inst.currentMonth, inst.currentDay))), 5457minDate = this._getMinMaxDate(inst, "min"), 5458maxDate = this._getMinMaxDate(inst, "max"), 5459drawMonth = inst.drawMonth - showCurrentAtPos, 5460drawYear = inst.drawYear; 5461if (drawMonth < 0) { 5462drawMonth += 12; 5463drawYear--; 5464} 5465if (maxDate) { 5466maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(), 5467maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate())); 5468maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw); 5469while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) { 5470drawMonth--; 5471if (drawMonth < 0) { 5472drawMonth = 11; 5473drawYear--; 5474} 5475} 5476} 5477inst.drawMonth = drawMonth; 5478inst.drawYear = drawYear; 5479prevText = this._get(inst, "prevText"); 5480prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText, 5481this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)), 5482this._getFormatConfig(inst))); 5483prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ? 5484"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" + 5485" title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>" : 5486(hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+ prevText +"'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>")); 5487nextText = this._get(inst, "nextText"); 5488nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText, 5489this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)), 5490this._getFormatConfig(inst))); 5491next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ? 5492"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" + 5493" title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>" : 5494(hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+ nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>")); 5495currentText = this._get(inst, "currentText"); 5496gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today); 5497currentText = (!navigationAsDateFormat ? currentText : 5498this.formatDate(currentText, gotoDate, this._getFormatConfig(inst))); 5499controls = (!inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" + 5500this._get(inst, "closeText") + "</button>" : ""); 5501buttonPanel = (showButtonPanel) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (isRTL ? controls : "") + 5502(this._isInRange(inst, gotoDate) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" + 5503">" + currentText + "</button>" : "") + (isRTL ? "" : controls) + "</div>" : ""; 5504firstDay = parseInt(this._get(inst, "firstDay"),10); 5505firstDay = (isNaN(firstDay) ? 0 : firstDay); 5506showWeek = this._get(inst, "showWeek"); 5507dayNames = this._get(inst, "dayNames"); 5508dayNamesMin = this._get(inst, "dayNamesMin"); 5509monthNames = this._get(inst, "monthNames"); 5510monthNamesShort = this._get(inst, "monthNamesShort"); 5511beforeShowDay = this._get(inst, "beforeShowDay"); 5512showOtherMonths = this._get(inst, "showOtherMonths"); 5513selectOtherMonths = this._get(inst, "selectOtherMonths"); 5514defaultDate = this._getDefaultDate(inst); 5515html = ""; 5516dow; 5517for (row = 0; row < numMonths[0]; row++) { 5518group = ""; 5519this.maxRows = 4; 5520for (col = 0; col < numMonths[1]; col++) { 5521selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay)); 5522cornerClass = " ui-corner-all"; 5523calender = ""; 5524if (isMultiMonth) { 5525calender += "<div class='ui-datepicker-group"; 5526if (numMonths[1] > 1) { 5527switch (col) { 5528case 0: calender += " ui-datepicker-group-first";
vendor: 4,578 bytes, lines 5529-5605
5529cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break; 5530case numMonths[1]-1: calender += " ui-datepicker-group-last"; 5531cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break; 5532default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break; 5533} 5534} 5535calender += "'>"; 5536} 5537calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" + 5538(/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : "") + 5539(/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : "") + 5540this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate, 5541row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers 5542"</div><table class='ui-datepicker-calendar'><thead>" + 5543"<tr>"; 5544thead = (showWeek ? "<th class='ui-datepicker-week-col'>" + this._get(inst, "weekHeader") + "</th>" : ""); 5545for (dow = 0; dow < 7; dow++) { // days of the week 5546day = (dow + firstDay) % 7; 5547thead += "<th scope='col'" + ((dow + firstDay + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" + 5548"<span title='" + dayNames[day] + "'>" + dayNamesMin[day] + "</span></th>"; 5549} 5550calender += thead + "</tr></thead><tbody>"; 5551daysInMonth = this._getDaysInMonth(drawYear, drawMonth); 5552if (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) { 5553inst.selectedDay = Math.min(inst.selectedDay, daysInMonth); 5554} 5555leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7; 5556curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate 5557numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043) 5558this.maxRows = numRows; 5559printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays)); 5560for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows 5561calender += "<tr>"; 5562tbody = (!showWeek ? "" : "<td class='ui-datepicker-week-col'>" + 5563this._get(inst, "calculateWeek")(printDate) + "</td>"); 5564for (dow = 0; dow < 7; dow++) { // create date picker days 5565daySettings = (beforeShowDay ? 5566beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]); 5567otherMonth = (printDate.getMonth() !== drawMonth); 5568unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] || 5569(minDate && printDate < minDate) || (maxDate && printDate > maxDate); 5570tbody += "<td class='" + 5571((dow + firstDay + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + // highlight weekends 5572(otherMonth ? " ui-datepicker-other-month" : "") + // highlight days from other months 5573((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key 5574(defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ? 5575" " + this._dayOverClass : "") + // highlight selected day 5576(unselectable ? " " + this._unselectableClass + " ui-state-disabled": "") + // highlight unselectable days 5577(otherMonth && !showOtherMonths ? "" : " " + daySettings[1] + // highlight custom dates 5578(printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "") + // highlight selected day 5579(printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "")) + "'" + // highlight today (if different) 5580((!otherMonth || showOtherMonths) && daySettings[2] ? " title='" + daySettings[2].replace(/'/g, "'") + "'" : "") + // cell title 5581(unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'") + ">" + // actions 5582(otherMonth && !showOtherMonths ? " " : // display for other months 5583(unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" + 5584(printDate.getTime() === today.getTime() ? " ui-state-highlight" : "") + 5585(printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "") + // highlight selected day 5586(otherMonth ? " ui-priority-secondary" : "") + // distinguish dates from other months 5587"' href='#'>" + printDate.getDate() + "</a>")) + "</td>"; // display selectable date 5588printDate.setDate(printDate.getDate() + 1); 5589printDate = this._daylightSavingAdjust(printDate); 5590} 5591calender += tbody + "</tr>"; 5592} 5593drawMonth++; 5594if (drawMonth > 11) { 5595drawMonth = 0; 5596drawYear++; 5597} 5598calender += "</tbody></table>" + (isMultiMonth ? "</div>" + 5599((numMonths[0] > 0 && col === numMonths[1]-1) ? "<div class='ui-datepicker-row-break'></div>" : "") : ""); 5600group += calender; 5601} 5602html += group; 5603} 5604html += buttonPanel; 5605inst._keyEvent = false;
vendor: 8,935 bytes, lines 5606-5852
5606return html; 5607}, 5608_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, 5609secondary, monthNames, monthNamesShort) { 5610var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear, 5611changeMonth = this._get(inst, "changeMonth"), 5612changeYear = this._get(inst, "changeYear"), 5613showMonthAfterYear = this._get(inst, "showMonthAfterYear"), 5614html = "<div class='ui-datepicker-title'>", 5615monthHtml = ""; 5616if (secondary || !changeMonth) { 5617monthHtml += "<span class='ui-datepicker-month'>" + monthNames[drawMonth] + "</span>"; 5618} else { 5619inMinYear = (minDate && minDate.getFullYear() === drawYear); 5620inMaxYear = (maxDate && maxDate.getFullYear() === drawYear); 5621monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>"; 5622for ( month = 0; month < 12; month++) { 5623if ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) { 5624monthHtml += "<option value='" + month + "'" + 5625(month === drawMonth ? " selected='selected'" : "") + 5626">" + monthNamesShort[month] + "</option>"; 5627} 5628} 5629monthHtml += "</select>"; 5630} 5631if (!showMonthAfterYear) { 5632html += monthHtml + (secondary || !(changeMonth && changeYear) ? " " : ""); 5633} 5634if ( !inst.yearshtml ) { 5635inst.yearshtml = ""; 5636if (secondary || !changeYear) { 5637html += "<span class='ui-datepicker-year'>" + drawYear + "</span>"; 5638} else { 5639years = this._get(inst, "yearRange").split(":"); 5640thisYear = new Date().getFullYear(); 5641determineYear = function(value) { 5642var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) : 5643(value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) : 5644parseInt(value, 10))); 5645return (isNaN(year) ? thisYear : year); 5646}; 5647year = determineYear(years[0]); 5648endYear = Math.max(year, determineYear(years[1] || "")); 5649year = (minDate ? Math.max(year, minDate.getFullYear()) : year); 5650endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); 5651inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; 5652for (; year <= endYear; year++) { 5653inst.yearshtml += "<option value='" + year + "'" + 5654(year === drawYear ? " selected='selected'" : "") + 5655">" + year + "</option>"; 5656} 5657inst.yearshtml += "</select>"; 5658html += inst.yearshtml; 5659inst.yearshtml = null; 5660} 5661} 5662html += this._get(inst, "yearSuffix"); 5663if (showMonthAfterYear) { 5664html += (secondary || !(changeMonth && changeYear) ? " " : "") + monthHtml; 5665} 5666html += "</div>"; // Close datepicker_header 5667return html; 5668}, 5669_adjustInstDate: function(inst, offset, period) { 5670var year = inst.drawYear + (period === "Y" ? offset : 0), 5671month = inst.drawMonth + (period === "M" ? offset : 0), 5672day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0), 5673date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day))); 5674inst.selectedDay = date.getDate(); 5675inst.drawMonth = inst.selectedMonth = date.getMonth(); 5676inst.drawYear = inst.selectedYear = date.getFullYear(); 5677if (period === "M" || period === "Y") { 5678this._notifyChange(inst); 5679} 5680}, 5681_restrictMinMax: function(inst, date) { 5682var minDate = this._getMinMaxDate(inst, "min"), 5683maxDate = this._getMinMaxDate(inst, "max"), 5684newDate = (minDate && date < minDate ? minDate : date); 5685return (maxDate && newDate > maxDate ? maxDate : newDate); 5686}, 5687_notifyChange: function(inst) { 5688var onChange = this._get(inst, "onChangeMonthYear"); 5689if (onChange) { 5690onChange.apply((inst.input ? inst.input[0] : null), 5691[inst.selectedYear, inst.selectedMonth + 1, inst]); 5692} 5693}, 5694_getNumberOfMonths: function(inst) { 5695var numMonths = this._get(inst, "numberOfMonths"); 5696return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths)); 5697}, 5698_getMinMaxDate: function(inst, minMax) { 5699return this._determineDate(inst, this._get(inst, minMax + "Date"), null); 5700}, 5701_getDaysInMonth: function(year, month) { 5702return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate(); 5703}, 5704_getFirstDayOfMonth: function(year, month) { 5705return new Date(year, month, 1).getDay(); 5706}, 5707_canAdjustMonth: function(inst, offset, curYear, curMonth) { 5708var numMonths = this._getNumberOfMonths(inst), 5709date = this._daylightSavingAdjust(new Date(curYear, 5710curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1)); 5711if (offset < 0) { 5712date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); 5713} 5714return this._isInRange(inst, date); 5715}, 5716_isInRange: function(inst, date) { 5717var yearSplit, currentYear, 5718minDate = this._getMinMaxDate(inst, "min"), 5719maxDate = this._getMinMaxDate(inst, "max"), 5720minYear = null, 5721maxYear = null, 5722years = this._get(inst, "yearRange"); 5723if (years){ 5724yearSplit = years.split(":"); 5725currentYear = new Date().getFullYear(); 5726minYear = parseInt(yearSplit[0], 10); 5727maxYear = parseInt(yearSplit[1], 10); 5728if ( yearSplit[0].match(/[+\-].*/) ) { 5729minYear += currentYear; 5730} 5731if ( yearSplit[1].match(/[+\-].*/) ) { 5732maxYear += currentYear; 5733} 5734} 5735return ((!minDate || date.getTime() >= minDate.getTime()) && 5736(!maxDate || date.getTime() <= maxDate.getTime()) && 5737(!minYear || date.getFullYear() >= minYear) && 5738(!maxYear || date.getFullYear() <= maxYear)); 5739}, 5740_getFormatConfig: function(inst) { 5741var shortYearCutoff = this._get(inst, "shortYearCutoff"); 5742shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff : 5743new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); 5744return {shortYearCutoff: shortYearCutoff, 5745dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"), 5746monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")}; 5747}, 5748_formatDate: function(inst, day, month, year) { 5749if (!day) { 5750inst.currentDay = inst.selectedDay; 5751inst.currentMonth = inst.selectedMonth; 5752inst.currentYear = inst.selectedYear; 5753} 5754var date = (day ? (typeof day === "object" ? day : 5755this._daylightSavingAdjust(new Date(year, month, day))) : 5756this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); 5757return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst)); 5758} 5759}); 5760function datepicker_bindHover(dpDiv) { 5761var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; 5762return dpDiv.delegate(selector, "mouseout", function() { 5763$(this).removeClass("ui-state-hover"); 5764if (this.className.indexOf("ui-datepicker-prev") !== -1) { 5765$(this).removeClass("ui-datepicker-prev-hover"); 5766} 5767if (this.className.indexOf("ui-datepicker-next") !== -1) { 5768$(this).removeClass("ui-datepicker-next-hover"); 5769} 5770}) 5771.delegate( selector, "mouseover", datepicker_handleMouseover ); 5772} 5773function datepicker_handleMouseover() { 5774if (!$.datepicker._isDisabledDatepicker( datepicker_instActive.inline? datepicker_instActive.dpDiv.parent()[0] : datepicker_instActive.input[0])) { 5775$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); 5776$(this).addClass("ui-state-hover"); 5777if (this.className.indexOf("ui-datepicker-prev") !== -1) { 5778$(this).addClass("ui-datepicker-prev-hover"); 5779} 5780if (this.className.indexOf("ui-datepicker-next") !== -1) { 5781$(this).addClass("ui-datepicker-next-hover"); 5782} 5783} 5784} 5785function datepicker_extendRemove(target, props) { 5786$.extend(target, props); 5787for (var name in props) { 5788if (props[name] == null) { 5789target[name] = props[name]; 5790} 5791} 5792return target; 5793} 5794$.fn.datepicker = function(options){ 5795if ( !this.length ) { 5796return this; 5797} 5798if (!$.datepicker.initialized) { 5799$(document).mousedown($.datepicker._checkExternalClick); 5800$.datepicker.initialized = true; 5801} 5802if ($("#"+$.datepicker._mainDivId).length === 0) { 5803$("body").append($.datepicker.dpDiv); 5804} 5805var otherArgs = Array.prototype.slice.call(arguments, 1); 5806if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) { 5807return $.datepicker["_" + options + "Datepicker"]. 5808apply($.datepicker, [this[0]].concat(otherArgs)); 5809} 5810if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") { 5811return $.datepicker["_" + options + "Datepicker"]. 5812apply($.datepicker, [this[0]].concat(otherArgs)); 5813} 5814return this.each(function() { 5815typeof options === "string" ? 5816$.datepicker["_" + options + "Datepicker"]. 5817apply($.datepicker, [this].concat(otherArgs)) : 5818$.datepicker._attachDatepicker(this, options); 5819}); 5820}; 5821$.datepicker = new Datepicker(); // singleton instance 5822$.datepicker.initialized = false; 5823$.datepicker.uuid = new Date().getTime(); 5824$.datepicker.version = "1.11.4"; 5825var datepicker = $.datepicker; 5826$.widget("ui.draggable", $.ui.mouse, { 5827version: "1.11.4", 5828widgetEventPrefix: "drag", 5829options: { 5830addClasses: true, 5831appendTo: "parent", 5832axis: false, 5833connectToSortable: false, 5834containment: false, 5835cursor: "auto", 5836cursorAt: false, 5837grid: false, 5838handle: false, 5839helper: "original", 5840iframeFix: false, 5841opacity: false, 5842refreshPositions: false, 5843revert: false, 5844revertDuration: 500, 5845scope: "default", 5846scroll: true, 5847scrollSensitivity: 20, 5848scrollSpeed: 20, 5849snap: false, 5850snapMode: "both", 5851snapTolerance: 20, 5852stack: false,
vendor: 32,965 bytes, lines 5853-6908
5853zIndex: false, 5854drag: null, 5855start: null, 5856stop: null 5857}, 5858_create: function() { 5859if ( this.options.helper === "original" ) { 5860this._setPositionRelative(); 5861} 5862if (this.options.addClasses){ 5863this.element.addClass("ui-draggable"); 5864} 5865if (this.options.disabled){ 5866this.element.addClass("ui-draggable-disabled"); 5867} 5868this._setHandleClassName(); 5869this._mouseInit(); 5870}, 5871_setOption: function( key, value ) { 5872this._super( key, value ); 5873if ( key === "handle" ) { 5874this._removeHandleClassName(); 5875this._setHandleClassName(); 5876} 5877}, 5878_destroy: function() { 5879if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) { 5880this.destroyOnClear = true; 5881return; 5882} 5883this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" ); 5884this._removeHandleClassName(); 5885this._mouseDestroy(); 5886}, 5887_mouseCapture: function(event) { 5888var o = this.options; 5889this._blurActiveElement( event ); 5890if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) { 5891return false; 5892} 5893this.handle = this._getHandle(event); 5894if (!this.handle) { 5895return false; 5896} 5897this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix ); 5898return true; 5899}, 5900_blockFrames: function( selector ) { 5901this.iframeBlocks = this.document.find( selector ).map(function() { 5902var iframe = $( this ); 5903return $( "<div>" ) 5904.css( "position", "absolute" ) 5905.appendTo( iframe.parent() ) 5906.outerWidth( iframe.outerWidth() ) 5907.outerHeight( iframe.outerHeight() ) 5908.offset( iframe.offset() )[ 0 ]; 5909}); 5910}, 5911_unblockFrames: function() { 5912if ( this.iframeBlocks ) { 5913this.iframeBlocks.remove(); 5914delete this.iframeBlocks; 5915} 5916}, 5917_blurActiveElement: function( event ) { 5918var document = this.document[ 0 ]; 5919if ( !this.handleElement.is( event.target ) ) { 5920return; 5921} 5922try { 5923if ( document.activeElement && document.activeElement.nodeName.toLowerCase() !== "body" ) { 5924$( document.activeElement ).blur(); 5925} 5926} catch ( error ) {} 5927}, 5928_mouseStart: function(event) { 5929var o = this.options; 5930this.helper = this._createHelper(event); 5931this.helper.addClass("ui-draggable-dragging"); 5932this._cacheHelperProportions(); 5933if ($.ui.ddmanager) { 5934$.ui.ddmanager.current = this; 5935} 5936this._cacheMargins(); 5937this.cssPosition = this.helper.css( "position" ); 5938this.scrollParent = this.helper.scrollParent( true ); 5939this.offsetParent = this.helper.offsetParent(); 5940this.hasFixedAncestor = this.helper.parents().filter(function() { 5941return $( this ).css( "position" ) === "fixed"; 5942}).length > 0; 5943this.positionAbs = this.element.offset(); 5944this._refreshOffsets( event ); 5945this.originalPosition = this.position = this._generatePosition( event, false ); 5946this.originalPageX = event.pageX; 5947this.originalPageY = event.pageY; 5948(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); 5949this._setContainment(); 5950if (this._trigger("start", event) === false) { 5951this._clear(); 5952return false; 5953} 5954this._cacheHelperProportions(); 5955if ($.ui.ddmanager && !o.dropBehaviour) { 5956$.ui.ddmanager.prepareOffsets(this, event); 5957} 5958this._normalizeRightBottom(); 5959this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position 5960if ( $.ui.ddmanager ) { 5961$.ui.ddmanager.dragStart(this, event); 5962} 5963return true; 5964}, 5965_refreshOffsets: function( event ) { 5966this.offset = { 5967top: this.positionAbs.top - this.margins.top, 5968left: this.positionAbs.left - this.margins.left, 5969scroll: false, 5970parent: this._getParentOffset(), 5971relative: this._getRelativeOffset() 5972}; 5973this.offset.click = { 5974left: event.pageX - this.offset.left, 5975top: event.pageY - this.offset.top 5976}; 5977}, 5978_mouseDrag: function(event, noPropagation) { 5979if ( this.hasFixedAncestor ) { 5980this.offset.parent = this._getParentOffset(); 5981} 5982this.position = this._generatePosition( event, true ); 5983this.positionAbs = this._convertPositionTo("absolute"); 5984if (!noPropagation) { 5985var ui = this._uiHash(); 5986if (this._trigger("drag", event, ui) === false) { 5987this._mouseUp({}); 5988return false; 5989} 5990this.position = ui.position; 5991} 5992this.helper[ 0 ].style.left = this.position.left + "px"; 5993this.helper[ 0 ].style.top = this.position.top + "px"; 5994if ($.ui.ddmanager) { 5995$.ui.ddmanager.drag(this, event); 5996} 5997return false; 5998}, 5999_mouseStop: function(event) { 6000var that = this, 6001dropped = false; 6002if ($.ui.ddmanager && !this.options.dropBehaviour) { 6003dropped = $.ui.ddmanager.drop(this, event); 6004} 6005if (this.dropped) { 6006dropped = this.dropped; 6007this.dropped = false; 6008} 6009if ((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))) { 6010$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { 6011if (that._trigger("stop", event) !== false) { 6012that._clear(); 6013} 6014}); 6015} else { 6016if (this._trigger("stop", event) !== false) { 6017this._clear(); 6018} 6019} 6020return false; 6021}, 6022_mouseUp: function( event ) { 6023this._unblockFrames(); 6024if ( $.ui.ddmanager ) { 6025$.ui.ddmanager.dragStop(this, event); 6026} 6027if ( this.handleElement.is( event.target ) ) { 6028this.element.focus(); 6029} 6030return $.ui.mouse.prototype._mouseUp.call(this, event); 6031}, 6032cancel: function() { 6033if (this.helper.is(".ui-draggable-dragging")) { 6034this._mouseUp({}); 6035} else { 6036this._clear(); 6037} 6038return this; 6039}, 6040_getHandle: function(event) { 6041return this.options.handle ? 6042!!$( event.target ).closest( this.element.find( this.options.handle ) ).length : 6043true; 6044}, 6045_setHandleClassName: function() { 6046this.handleElement = this.options.handle ? 6047this.element.find( this.options.handle ) : this.element; 6048this.handleElement.addClass( "ui-draggable-handle" ); 6049}, 6050_removeHandleClassName: function() { 6051this.handleElement.removeClass( "ui-draggable-handle" ); 6052}, 6053_createHelper: function(event) { 6054var o = this.options, 6055helperIsFunction = $.isFunction( o.helper ), 6056helper = helperIsFunction ? 6057$( o.helper.apply( this.element[ 0 ], [ event ] ) ) : 6058( o.helper === "clone" ? 6059this.element.clone().removeAttr( "id" ) : 6060this.element ); 6061if (!helper.parents("body").length) { 6062helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo)); 6063} 6064if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) { 6065this._setPositionRelative(); 6066} 6067if (helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) { 6068helper.css("position", "absolute"); 6069} 6070return helper; 6071}, 6072_setPositionRelative: function() { 6073if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) { 6074this.element[ 0 ].style.position = "relative"; 6075} 6076}, 6077_adjustOffsetFromHelper: function(obj) { 6078if (typeof obj === "string") { 6079obj = obj.split(" "); 6080} 6081if ($.isArray(obj)) { 6082obj = { left: +obj[0], top: +obj[1] || 0 }; 6083} 6084if ("left" in obj) { 6085this.offset.click.left = obj.left + this.margins.left; 6086} 6087if ("right" in obj) { 6088this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; 6089} 6090if ("top" in obj) { 6091this.offset.click.top = obj.top + this.margins.top; 6092} 6093if ("bottom" in obj) { 6094this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; 6095} 6096}, 6097_isRootNode: function( element ) { 6098return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ]; 6099}, 6100_getParentOffset: function() { 6101var po = this.offsetParent.offset(), 6102document = this.document[ 0 ]; 6103if (this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { 6104po.left += this.scrollParent.scrollLeft(); 6105po.top += this.scrollParent.scrollTop(); 6106} 6107if ( this._isRootNode( this.offsetParent[ 0 ] ) ) { 6108po = { top: 0, left: 0 }; 6109} 6110return { 6111top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), 6112left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) 6113}; 6114}, 6115_getRelativeOffset: function() { 6116if ( this.cssPosition !== "relative" ) { 6117return { top: 0, left: 0 }; 6118} 6119var p = this.element.position(), 6120scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ); 6121return { 6122top: p.top - ( parseInt(this.helper.css( "top" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ), 6123left: p.left - ( parseInt(this.helper.css( "left" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 ) 6124}; 6125}, 6126_cacheMargins: function() { 6127this.margins = { 6128left: (parseInt(this.element.css("marginLeft"), 10) || 0), 6129top: (parseInt(this.element.css("marginTop"), 10) || 0), 6130right: (parseInt(this.element.css("marginRight"), 10) || 0), 6131bottom: (parseInt(this.element.css("marginBottom"), 10) || 0) 6132}; 6133}, 6134_cacheHelperProportions: function() { 6135this.helperProportions = { 6136width: this.helper.outerWidth(), 6137height: this.helper.outerHeight() 6138}; 6139}, 6140_setContainment: function() { 6141var isUserScrollable, c, ce, 6142o = this.options, 6143document = this.document[ 0 ]; 6144this.relativeContainer = null; 6145if ( !o.containment ) { 6146this.containment = null; 6147return; 6148} 6149if ( o.containment === "window" ) { 6150this.containment = [ 6151$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left, 6152$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top, 6153$( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left, 6154$( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top 6155]; 6156return; 6157} 6158if ( o.containment === "document") { 6159this.containment = [ 61600, 61610, 6162$( document ).width() - this.helperProportions.width - this.margins.left, 6163( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top 6164]; 6165return; 6166} 6167if ( o.containment.constructor === Array ) { 6168this.containment = o.containment; 6169return; 6170} 6171if ( o.containment === "parent" ) { 6172o.containment = this.helper[ 0 ].parentNode; 6173} 6174c = $( o.containment ); 6175ce = c[ 0 ]; 6176if ( !ce ) { 6177return; 6178} 6179isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) ); 6180this.containment = [ 6181( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ), 6182( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ), 6183( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - 6184( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - 6185( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) - 6186this.helperProportions.width - 6187this.margins.left - 6188this.margins.right, 6189( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - 6190( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - 6191( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - 6192this.helperProportions.height - 6193this.margins.top - 6194this.margins.bottom 6195]; 6196this.relativeContainer = c; 6197}, 6198_convertPositionTo: function(d, pos) { 6199if (!pos) { 6200pos = this.position; 6201} 6202var mod = d === "absolute" ? 1 : -1, 6203scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ); 6204return { 6205top: ( 6206pos.top + // The absolute mouse position 6207this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent 6208this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) 6209( ( this.cssPosition === "fixed" ? -this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod) 6210), 6211left: ( 6212pos.left + // The absolute mouse position 6213this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent 6214this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) 6215( ( this.cssPosition === "fixed" ? -this.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod) 6216) 6217}; 6218}, 6219_generatePosition: function( event, constrainPosition ) { 6220var containment, co, top, left, 6221o = this.options, 6222scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ), 6223pageX = event.pageX, 6224pageY = event.pageY; 6225if ( !scrollIsRootNode || !this.offset.scroll ) { 6226this.offset.scroll = { 6227top: this.scrollParent.scrollTop(), 6228left: this.scrollParent.scrollLeft() 6229}; 6230} 6231if ( constrainPosition ) { 6232if ( this.containment ) { 6233if ( this.relativeContainer ){ 6234co = this.relativeContainer.offset(); 6235containment = [ 6236this.containment[ 0 ] + co.left, 6237this.containment[ 1 ] + co.top, 6238this.containment[ 2 ] + co.left, 6239this.containment[ 3 ] + co.top 6240]; 6241} else { 6242containment = this.containment; 6243} 6244if (event.pageX - this.offset.click.left < containment[0]) { 6245pageX = containment[0] + this.offset.click.left; 6246} 6247if (event.pageY - this.offset.click.top < containment[1]) { 6248pageY = containment[1] + this.offset.click.top; 6249} 6250if (event.pageX - this.offset.click.left > containment[2]) { 6251pageX = containment[2] + this.offset.click.left; 6252} 6253if (event.pageY - this.offset.click.top > containment[3]) { 6254pageY = containment[3] + this.offset.click.top; 6255} 6256} 6257if (o.grid) { 6258top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY; 6259pageY = 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; 6260left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX; 6261pageX = 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; 6262} 6263if ( o.axis === "y" ) { 6264pageX = this.originalPageX; 6265} 6266if ( o.axis === "x" ) { 6267pageY = this.originalPageY; 6268} 6269} 6270return { 6271top: ( 6272pageY - // The absolute mouse position 6273this.offset.click.top - // Click offset (relative to the element) 6274this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent 6275this.offset.parent.top + // The offsetParent's offset without borders (offset + border) 6276( this.cssPosition === "fixed" ? -this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) 6277), 6278left: ( 6279pageX - // The absolute mouse position 6280this.offset.click.left - // Click offset (relative to the element) 6281this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent 6282this.offset.parent.left + // The offsetParent's offset without borders (offset + border) 6283( this.cssPosition === "fixed" ? -this.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) 6284) 6285}; 6286}, 6287_clear: function() { 6288this.helper.removeClass("ui-draggable-dragging"); 6289if (this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) { 6290this.helper.remove(); 6291} 6292this.helper = null; 6293this.cancelHelperRemoval = false; 6294if ( this.destroyOnClear ) { 6295this.destroy(); 6296} 6297}, 6298_normalizeRightBottom: function() { 6299if ( this.options.axis !== "y" && this.helper.css( "right" ) !== "auto" ) { 6300this.helper.width( this.helper.width() ); 6301this.helper.css( "right", "auto" ); 6302} 6303if ( this.options.axis !== "x" && this.helper.css( "bottom" ) !== "auto" ) { 6304this.helper.height( this.helper.height() ); 6305this.helper.css( "bottom", "auto" ); 6306} 6307}, 6308_trigger: function( type, event, ui ) { 6309ui = ui || this._uiHash(); 6310$.ui.plugin.call( this, type, [ event, ui, this ], true ); 6311if ( /^(drag|start|stop)/.test( type ) ) { 6312this.positionAbs = this._convertPositionTo( "absolute" ); 6313ui.offset = this.positionAbs; 6314} 6315return $.Widget.prototype._trigger.call( this, type, event, ui ); 6316}, 6317plugins: {}, 6318_uiHash: function() { 6319return { 6320helper: this.helper, 6321position: this.position, 6322originalPosition: this.originalPosition, 6323offset: this.positionAbs 6324}; 6325} 6326}); 6327$.ui.plugin.add( "draggable", "connectToSortable", { 6328start: function( event, ui, draggable ) { 6329var uiSortable = $.extend( {}, ui, { 6330item: draggable.element 6331}); 6332draggable.sortables = []; 6333$( draggable.options.connectToSortable ).each(function() { 6334var sortable = $( this ).sortable( "instance" ); 6335if ( sortable && !sortable.options.disabled ) { 6336draggable.sortables.push( sortable ); 6337sortable.refreshPositions(); 6338sortable._trigger("activate", event, uiSortable); 6339} 6340}); 6341}, 6342stop: function( event, ui, draggable ) { 6343var uiSortable = $.extend( {}, ui, { 6344item: draggable.element 6345}); 6346draggable.cancelHelperRemoval = false; 6347$.each( draggable.sortables, function() { 6348var sortable = this; 6349if ( sortable.isOver ) { 6350sortable.isOver = 0; 6351draggable.cancelHelperRemoval = true; 6352sortable.cancelHelperRemoval = false; 6353sortable._storedCSS = { 6354position: sortable.placeholder.css( "position" ), 6355top: sortable.placeholder.css( "top" ), 6356left: sortable.placeholder.css( "left" ) 6357}; 6358sortable._mouseStop(event); 6359sortable.options.helper = sortable.options._helper; 6360} else { 6361sortable.cancelHelperRemoval = true; 6362sortable._trigger( "deactivate", event, uiSortable ); 6363} 6364}); 6365}, 6366drag: function( event, ui, draggable ) { 6367$.each( draggable.sortables, function() { 6368var innermostIntersecting = false, 6369sortable = this; 6370sortable.positionAbs = draggable.positionAbs; 6371sortable.helperProportions = draggable.helperProportions; 6372sortable.offset.click = draggable.offset.click; 6373if ( sortable._intersectsWith( sortable.containerCache ) ) { 6374innermostIntersecting = true; 6375$.each( draggable.sortables, function() { 6376this.positionAbs = draggable.positionAbs; 6377this.helperProportions = draggable.helperProportions; 6378this.offset.click = draggable.offset.click; 6379if ( this !== sortable && 6380this._intersectsWith( this.containerCache ) && 6381$.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) { 6382innermostIntersecting = false; 6383} 6384return innermostIntersecting; 6385}); 6386} 6387if ( innermostIntersecting ) { 6388if ( !sortable.isOver ) { 6389sortable.isOver = 1; 6390draggable._parent = ui.helper.parent(); 6391sortable.currentItem = ui.helper 6392.appendTo( sortable.element ) 6393.data( "ui-sortable-item", true ); 6394sortable.options._helper = sortable.options.helper; 6395sortable.options.helper = function() { 6396return ui.helper[ 0 ]; 6397}; 6398event.target = sortable.currentItem[ 0 ]; 6399sortable._mouseCapture( event, true ); 6400sortable._mouseStart( event, true, true ); 6401sortable.offset.click.top = draggable.offset.click.top; 6402sortable.offset.click.left = draggable.offset.click.left; 6403sortable.offset.parent.left -= draggable.offset.parent.left - 6404sortable.offset.parent.left; 6405sortable.offset.parent.top -= draggable.offset.parent.top - 6406sortable.offset.parent.top; 6407draggable._trigger( "toSortable", event ); 6408draggable.dropped = sortable.element; 6409$.each( draggable.sortables, function() { 6410this.refreshPositions(); 6411}); 6412draggable.currentItem = draggable.element; 6413sortable.fromOutside = draggable; 6414} 6415if ( sortable.currentItem ) { 6416sortable._mouseDrag( event ); 6417ui.position = sortable.position; 6418} 6419} else { 6420if ( sortable.isOver ) { 6421sortable.isOver = 0; 6422sortable.cancelHelperRemoval = true; 6423sortable.options._revert = sortable.options.revert; 6424sortable.options.revert = false; 6425sortable._trigger( "out", event, sortable._uiHash( sortable ) ); 6426sortable._mouseStop( event, true ); 6427sortable.options.revert = sortable.options._revert; 6428sortable.options.helper = sortable.options._helper; 6429if ( sortable.placeholder ) { 6430sortable.placeholder.remove(); 6431} 6432ui.helper.appendTo( draggable._parent ); 6433draggable._refreshOffsets( event ); 6434ui.position = draggable._generatePosition( event, true ); 6435draggable._trigger( "fromSortable", event ); 6436draggable.dropped = false; 6437$.each( draggable.sortables, function() { 6438this.refreshPositions(); 6439}); 6440} 6441} 6442}); 6443} 6444}); 6445$.ui.plugin.add("draggable", "cursor", { 6446start: function( event, ui, instance ) { 6447var t = $( "body" ), 6448o = instance.options; 6449if (t.css("cursor")) { 6450o._cursor = t.css("cursor"); 6451} 6452t.css("cursor", o.cursor); 6453}, 6454stop: function( event, ui, instance ) { 6455var o = instance.options; 6456if (o._cursor) { 6457$("body").css("cursor", o._cursor); 6458} 6459} 6460}); 6461$.ui.plugin.add("draggable", "opacity", { 6462start: function( event, ui, instance ) { 6463var t = $( ui.helper ), 6464o = instance.options; 6465if (t.css("opacity")) { 6466o._opacity = t.css("opacity"); 6467} 6468t.css("opacity", o.opacity); 6469}, 6470stop: function( event, ui, instance ) { 6471var o = instance.options; 6472if (o._opacity) { 6473$(ui.helper).css("opacity", o._opacity); 6474} 6475} 6476}); 6477$.ui.plugin.add("draggable", "scroll", { 6478start: function( event, ui, i ) { 6479if ( !i.scrollParentNotHidden ) { 6480i.scrollParentNotHidden = i.helper.scrollParent( false ); 6481} 6482if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] && i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) { 6483i.overflowOffset = i.scrollParentNotHidden.offset(); 6484} 6485}, 6486drag: function( event, ui, i ) { 6487var o = i.options, 6488scrolled = false, 6489scrollParent = i.scrollParentNotHidden[ 0 ], 6490document = i.document[ 0 ]; 6491if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) { 6492if ( !o.axis || o.axis !== "x" ) { 6493if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY < o.scrollSensitivity ) { 6494scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed; 6495} else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) { 6496scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed; 6497} 6498} 6499if ( !o.axis || o.axis !== "y" ) { 6500if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX < o.scrollSensitivity ) { 6501scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed; 6502} else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) { 6503scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed; 6504} 6505} 6506} else { 6507if (!o.axis || o.axis !== "x") { 6508if (event.pageY - $(document).scrollTop() < o.scrollSensitivity) { 6509scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); 6510} else if ($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) { 6511scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); 6512} 6513} 6514if (!o.axis || o.axis !== "y") { 6515if (event.pageX - $(document).scrollLeft() < o.scrollSensitivity) { 6516scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); 6517} else if ($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) { 6518scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); 6519} 6520} 6521} 6522if (scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { 6523$.ui.ddmanager.prepareOffsets(i, event); 6524} 6525} 6526}); 6527$.ui.plugin.add("draggable", "snap", { 6528start: function( event, ui, i ) { 6529var o = i.options; 6530i.snapElements = []; 6531$(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() { 6532var $t = $(this), 6533$o = $t.offset(); 6534if (this !== i.element[0]) { 6535i.snapElements.push({ 6536item: this, 6537width: $t.outerWidth(), height: $t.outerHeight(), 6538top: $o.top, left: $o.left 6539}); 6540} 6541}); 6542}, 6543drag: function( event, ui, inst ) { 6544var ts, bs, ls, rs, l, r, t, b, i, first, 6545o = inst.options, 6546d = o.snapTolerance, 6547x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width, 6548y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height; 6549for (i = inst.snapElements.length - 1; i >= 0; i--){ 6550l = inst.snapElements[i].left - inst.margins.left; 6551r = l + inst.snapElements[i].width; 6552t = inst.snapElements[i].top - inst.margins.top; 6553b = t + inst.snapElements[i].height; 6554if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) { 6555if (inst.snapElements[i].snapping) { 6556(inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); 6557} 6558inst.snapElements[i].snapping = false; 6559continue; 6560} 6561if (o.snapMode !== "inner") { 6562ts = Math.abs(t - y2) <= d; 6563bs = Math.abs(b - y1) <= d; 6564ls = Math.abs(l - x2) <= d; 6565rs = Math.abs(r - x1) <= d; 6566if (ts) { 6567ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top; 6568} 6569if (bs) { 6570ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top; 6571} 6572if (ls) { 6573ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left; 6574} 6575if (rs) { 6576ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left; 6577} 6578} 6579first = (ts || bs || ls || rs); 6580if (o.snapMode !== "outer") { 6581ts = Math.abs(t - y1) <= d; 6582bs = Math.abs(b - y2) <= d; 6583ls = Math.abs(l - x1) <= d; 6584rs = Math.abs(r - x2) <= d; 6585if (ts) { 6586ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top; 6587} 6588if (bs) { 6589ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top; 6590} 6591if (ls) { 6592ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left; 6593} 6594if (rs) { 6595ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left; 6596} 6597} 6598if (!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) { 6599(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); 6600} 6601inst.snapElements[i].snapping = (ts || bs || ls || rs || first); 6602} 6603} 6604}); 6605$.ui.plugin.add("draggable", "stack", { 6606start: function( event, ui, instance ) { 6607var min, 6608o = instance.options, 6609group = $.makeArray($(o.stack)).sort(function(a, b) { 6610return (parseInt($(a).css("zIndex"), 10) || 0) - (parseInt($(b).css("zIndex"), 10) || 0); 6611}); 6612if (!group.length) { return; } 6613min = parseInt($(group[0]).css("zIndex"), 10) || 0; 6614$(group).each(function(i) { 6615$(this).css("zIndex", min + i); 6616}); 6617this.css("zIndex", (min + group.length)); 6618} 6619}); 6620$.ui.plugin.add("draggable", "zIndex", { 6621start: function( event, ui, instance ) { 6622var t = $( ui.helper ), 6623o = instance.options; 6624if (t.css("zIndex")) { 6625o._zIndex = t.css("zIndex"); 6626} 6627t.css("zIndex", o.zIndex); 6628}, 6629stop: function( event, ui, instance ) { 6630var o = instance.options; 6631if (o._zIndex) { 6632$(ui.helper).css("zIndex", o._zIndex); 6633} 6634} 6635}); 6636var draggable = $.ui.draggable; 6637$.widget("ui.resizable", $.ui.mouse, { 6638version: "1.11.4", 6639widgetEventPrefix: "resize", 6640options: { 6641alsoResize: false, 6642animate: false, 6643animateDuration: "slow", 6644animateEasing: "swing", 6645aspectRatio: false, 6646autoHide: false, 6647containment: false, 6648ghost: false, 6649grid: false, 6650handles: "e,s,se", 6651helper: false, 6652maxHeight: null, 6653maxWidth: null, 6654minHeight: 10, 6655minWidth: 10, 6656zIndex: 90, 6657resize: null, 6658start: null, 6659stop: null 6660}, 6661_num: function( value ) { 6662return parseInt( value, 10 ) || 0; 6663}, 6664_isNumber: function( value ) { 6665return !isNaN( parseInt( value, 10 ) ); 6666}, 6667_hasScroll: function( el, a ) { 6668if ( $( el ).css( "overflow" ) === "hidden") { 6669return false; 6670} 6671var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", 6672has = false; 6673if ( el[ scroll ] > 0 ) { 6674return true; 6675} 6676el[ scroll ] = 1; 6677has = ( el[ scroll ] > 0 ); 6678el[ scroll ] = 0; 6679return has; 6680}, 6681_create: function() { 6682var n, i, handle, axis, hname, 6683that = this, 6684o = this.options; 6685this.element.addClass("ui-resizable"); 6686$.extend(this, { 6687_aspectRatio: !!(o.aspectRatio), 6688aspectRatio: o.aspectRatio, 6689originalElement: this.element, 6690_proportionallyResizeElements: [], 6691_helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null 6692}); 6693if (this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)) { 6694this.element.wrap( 6695$("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({ 6696position: this.element.css("position"), 6697width: this.element.outerWidth(), 6698height: this.element.outerHeight(), 6699top: this.element.css("top"), 6700left: this.element.css("left") 6701}) 6702); 6703this.element = this.element.parent().data( 6704"ui-resizable", this.element.resizable( "instance" ) 6705); 6706this.elementIsWrapper = true; 6707this.element.css({ 6708marginLeft: this.originalElement.css("marginLeft"), 6709marginTop: this.originalElement.css("marginTop"), 6710marginRight: this.originalElement.css("marginRight"), 6711marginBottom: this.originalElement.css("marginBottom") 6712}); 6713this.originalElement.css({ 6714marginLeft: 0, 6715marginTop: 0, 6716marginRight: 0, 6717marginBottom: 0 6718}); 6719this.originalResizeStyle = this.originalElement.css("resize"); 6720this.originalElement.css("resize", "none"); 6721this._proportionallyResizeElements.push( this.originalElement.css({ 6722position: "static", 6723zoom: 1, 6724display: "block" 6725}) ); 6726this.originalElement.css({ margin: this.originalElement.css("margin") }); 6727this._proportionallyResize(); 6728} 6729this.handles = o.handles || 6730( !$(".ui-resizable-handle", this.element).length ? 6731"e,s,se" : { 6732n: ".ui-resizable-n", 6733e: ".ui-resizable-e", 6734s: ".ui-resizable-s", 6735w: ".ui-resizable-w", 6736se: ".ui-resizable-se", 6737sw: ".ui-resizable-sw", 6738ne: ".ui-resizable-ne", 6739nw: ".ui-resizable-nw" 6740} ); 6741this._handles = $(); 6742if ( this.handles.constructor === String ) { 6743if ( this.handles === "all") { 6744this.handles = "n,e,s,w,se,sw,ne,nw"; 6745} 6746n = this.handles.split(","); 6747this.handles = {}; 6748for (i = 0; i < n.length; i++) { 6749handle = $.trim(n[i]); 6750hname = "ui-resizable-" + handle; 6751axis = $("<div class='ui-resizable-handle " + hname + "'></div>"); 6752axis.css({ zIndex: o.zIndex }); 6753if ("se" === handle) { 6754axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se"); 6755} 6756this.handles[handle] = ".ui-resizable-" + handle; 6757this.element.append(axis); 6758} 6759} 6760this._renderAxis = function(target) { 6761var i, axis, padPos, padWrapper; 6762target = target || this.element; 6763for (i in this.handles) { 6764if (this.handles[i].constructor === String) { 6765this.handles[i] = this.element.children( this.handles[ i ] ).first().show(); 6766} else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) { 6767this.handles[ i ] = $( this.handles[ i ] ); 6768this._on( this.handles[ i ], { "mousedown": that._mouseDown }); 6769} 6770if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)) { 6771axis = $(this.handles[i], this.element); 6772padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth(); 6773padPos = [ "padding", 6774/ne|nw|n/.test(i) ? "Top" : 6775/se|sw|s/.test(i) ? "Bottom" : 6776/^e$/.test(i) ? "Right" : "Left" ].join(""); 6777target.css(padPos, padWrapper); 6778this._proportionallyResize(); 6779} 6780this._handles = this._handles.add( this.handles[ i ] ); 6781} 6782}; 6783this._renderAxis(this.element); 6784this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) ); 6785this._handles.disableSelection(); 6786this._handles.mouseover(function() { 6787if (!that.resizing) { 6788if (this.className) { 6789axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); 6790} 6791that.axis = axis && axis[1] ? axis[1] : "se"; 6792} 6793}); 6794if (o.autoHide) { 6795this._handles.hide(); 6796$(this.element) 6797.addClass("ui-resizable-autohide") 6798.mouseenter(function() { 6799if (o.disabled) { 6800return; 6801} 6802$(this).removeClass("ui-resizable-autohide"); 6803that._handles.show(); 6804}) 6805.mouseleave(function() { 6806if (o.disabled) { 6807return; 6808} 6809if (!that.resizing) { 6810$(this).addClass("ui-resizable-autohide"); 6811that._handles.hide(); 6812} 6813}); 6814} 6815this._mouseInit(); 6816}, 6817_destroy: function() { 6818this._mouseDestroy(); 6819var wrapper, 6820_destroy = function(exp) { 6821$(exp) 6822.removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing") 6823.removeData("resizable") 6824.removeData("ui-resizable") 6825.unbind(".resizable") 6826.find(".ui-resizable-handle") 6827.remove(); 6828}; 6829if (this.elementIsWrapper) { 6830_destroy(this.element); 6831wrapper = this.element; 6832this.originalElement.css({ 6833position: wrapper.css("position"), 6834width: wrapper.outerWidth(), 6835height: wrapper.outerHeight(), 6836top: wrapper.css("top"), 6837left: wrapper.css("left") 6838}).insertAfter( wrapper ); 6839wrapper.remove(); 6840} 6841this.originalElement.css("resize", this.originalResizeStyle); 6842_destroy(this.originalElement); 6843return this; 6844}, 6845_mouseCapture: function(event) { 6846var i, handle, 6847capture = false; 6848for (i in this.handles) { 6849handle = $(this.handles[i])[0]; 6850if (handle === event.target || $.contains(handle, event.target)) { 6851capture = true; 6852} 6853} 6854return !this.options.disabled && capture; 6855}, 6856_mouseStart: function(event) { 6857var curleft, curtop, cursor, 6858o = this.options, 6859el = this.element; 6860this.resizing = true; 6861this._renderProxy(); 6862curleft = this._num(this.helper.css("left")); 6863curtop = this._num(this.helper.css("top")); 6864if (o.containment) { 6865curleft += $(o.containment).scrollLeft() || 0; 6866curtop += $(o.containment).scrollTop() || 0; 6867} 6868this.offset = this.helper.offset(); 6869this.position = { left: curleft, top: curtop }; 6870this.size = this._helper ? { 6871width: this.helper.width(), 6872height: this.helper.height() 6873} : { 6874width: el.width(), 6875height: el.height() 6876}; 6877this.originalSize = this._helper ? { 6878width: el.outerWidth(), 6879height: el.outerHeight() 6880} : { 6881width: el.width(), 6882height: el.height() 6883}; 6884this.sizeDiff = { 6885width: el.outerWidth() - el.width(), 6886height: el.outerHeight() - el.height() 6887}; 6888this.originalPosition = { left: curleft, top: curtop }; 6889this.originalMousePosition = { left: event.pageX, top: event.pageY }; 6890this.aspectRatio = (typeof o.aspectRatio === "number") ? 6891o.aspectRatio : 6892((this.originalSize.width / this.originalSize.height) || 1); 6893cursor = $(".ui-resizable-" + this.axis).css("cursor"); 6894$("body").css("cursor", cursor === "auto" ? this.axis + "-resize" : cursor); 6895el.addClass("ui-resizable-resizing"); 6896this._propagate("start", event); 6897return true; 6898}, 6899_mouseDrag: function(event) { 6900var data, props, 6901smp = this.originalMousePosition, 6902a = this.axis, 6903dx = (event.pageX - smp.left) || 0, 6904dy = (event.pageY - smp.top) || 0, 6905trigger = this._change[a]; 6906this._updatePrevProperties(); 6907if (!trigger) { 6908return false;
vendor: 10,188 bytes, lines 6909-7275
6909} 6910data = trigger.apply(this, [ event, dx, dy ]); 6911this._updateVirtualBoundaries(event.shiftKey); 6912if (this._aspectRatio || event.shiftKey) { 6913data = this._updateRatio(data, event); 6914} 6915data = this._respectSize(data, event); 6916this._updateCache(data); 6917this._propagate("resize", event); 6918props = this._applyChanges(); 6919if ( !this._helper && this._proportionallyResizeElements.length ) { 6920this._proportionallyResize(); 6921} 6922if ( !$.isEmptyObject( props ) ) { 6923this._updatePrevProperties(); 6924this._trigger( "resize", event, this.ui() ); 6925this._applyChanges(); 6926} 6927return false; 6928}, 6929_mouseStop: function(event) { 6930this.resizing = false; 6931var pr, ista, soffseth, soffsetw, s, left, top, 6932o = this.options, that = this; 6933if (this._helper) { 6934pr = this._proportionallyResizeElements; 6935ista = pr.length && (/textarea/i).test(pr[0].nodeName); 6936soffseth = ista && this._hasScroll(pr[0], "left") ? 0 : that.sizeDiff.height; 6937soffsetw = ista ? 0 : that.sizeDiff.width; 6938s = { 6939width: (that.helper.width() - soffsetw), 6940height: (that.helper.height() - soffseth) 6941}; 6942left = (parseInt(that.element.css("left"), 10) + 6943(that.position.left - that.originalPosition.left)) || null; 6944top = (parseInt(that.element.css("top"), 10) + 6945(that.position.top - that.originalPosition.top)) || null; 6946if (!o.animate) { 6947this.element.css($.extend(s, { top: top, left: left })); 6948} 6949that.helper.height(that.size.height); 6950that.helper.width(that.size.width); 6951if (this._helper && !o.animate) { 6952this._proportionallyResize(); 6953} 6954} 6955$("body").css("cursor", "auto"); 6956this.element.removeClass("ui-resizable-resizing"); 6957this._propagate("stop", event); 6958if (this._helper) { 6959this.helper.remove(); 6960} 6961return false; 6962}, 6963_updatePrevProperties: function() { 6964this.prevPosition = { 6965top: this.position.top, 6966left: this.position.left 6967}; 6968this.prevSize = { 6969width: this.size.width, 6970height: this.size.height 6971}; 6972}, 6973_applyChanges: function() { 6974var props = {}; 6975if ( this.position.top !== this.prevPosition.top ) { 6976props.top = this.position.top + "px"; 6977} 6978if ( this.position.left !== this.prevPosition.left ) { 6979props.left = this.position.left + "px"; 6980} 6981if ( this.size.width !== this.prevSize.width ) { 6982props.width = this.size.width + "px"; 6983} 6984if ( this.size.height !== this.prevSize.height ) { 6985props.height = this.size.height + "px"; 6986} 6987this.helper.css( props ); 6988return props; 6989}, 6990_updateVirtualBoundaries: function(forceAspectRatio) { 6991var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b, 6992o = this.options; 6993b = { 6994minWidth: this._isNumber(o.minWidth) ? o.minWidth : 0, 6995maxWidth: this._isNumber(o.maxWidth) ? o.maxWidth : Infinity, 6996minHeight: this._isNumber(o.minHeight) ? o.minHeight : 0, 6997maxHeight: this._isNumber(o.maxHeight) ? o.maxHeight : Infinity 6998}; 6999if (this._aspectRatio || forceAspectRatio) { 7000pMinWidth = b.minHeight * this.aspectRatio; 7001pMinHeight = b.minWidth / this.aspectRatio; 7002pMaxWidth = b.maxHeight * this.aspectRatio; 7003pMaxHeight = b.maxWidth / this.aspectRatio; 7004if (pMinWidth > b.minWidth) { 7005b.minWidth = pMinWidth; 7006} 7007if (pMinHeight > b.minHeight) { 7008b.minHeight = pMinHeight; 7009} 7010if (pMaxWidth < b.maxWidth) { 7011b.maxWidth = pMaxWidth; 7012} 7013if (pMaxHeight < b.maxHeight) { 7014b.maxHeight = pMaxHeight; 7015} 7016} 7017this._vBoundaries = b; 7018}, 7019_updateCache: function(data) { 7020this.offset = this.helper.offset(); 7021if (this._isNumber(data.left)) { 7022this.position.left = data.left; 7023} 7024if (this._isNumber(data.top)) { 7025this.position.top = data.top; 7026} 7027if (this._isNumber(data.height)) { 7028this.size.height = data.height; 7029} 7030if (this._isNumber(data.width)) { 7031this.size.width = data.width; 7032} 7033}, 7034_updateRatio: function( data ) { 7035var cpos = this.position, 7036csize = this.size, 7037a = this.axis; 7038if (this._isNumber(data.height)) { 7039data.width = (data.height * this.aspectRatio); 7040} else if (this._isNumber(data.width)) { 7041data.height = (data.width / this.aspectRatio); 7042} 7043if (a === "sw") { 7044data.left = cpos.left + (csize.width - data.width); 7045data.top = null; 7046} 7047if (a === "nw") { 7048data.top = cpos.top + (csize.height - data.height); 7049data.left = cpos.left + (csize.width - data.width); 7050} 7051return data; 7052}, 7053_respectSize: function( data ) { 7054var o = this._vBoundaries, 7055a = this.axis, 7056ismaxw = this._isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), 7057ismaxh = this._isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height), 7058isminw = this._isNumber(data.width) && o.minWidth && (o.minWidth > data.width), 7059isminh = this._isNumber(data.height) && o.minHeight && (o.minHeight > data.height), 7060dw = this.originalPosition.left + this.originalSize.width, 7061dh = this.position.top + this.size.height, 7062cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a); 7063if (isminw) { 7064data.width = o.minWidth; 7065} 7066if (isminh) { 7067data.height = o.minHeight; 7068} 7069if (ismaxw) { 7070data.width = o.maxWidth; 7071} 7072if (ismaxh) { 7073data.height = o.maxHeight; 7074} 7075if (isminw && cw) { 7076data.left = dw - o.minWidth; 7077} 7078if (ismaxw && cw) { 7079data.left = dw - o.maxWidth; 7080} 7081if (isminh && ch) { 7082data.top = dh - o.minHeight; 7083} 7084if (ismaxh && ch) { 7085data.top = dh - o.maxHeight; 7086} 7087if (!data.width && !data.height && !data.left && data.top) { 7088data.top = null; 7089} else if (!data.width && !data.height && !data.top && data.left) { 7090data.left = null; 7091} 7092return data; 7093}, 7094_getPaddingPlusBorderDimensions: function( element ) { 7095var i = 0, 7096widths = [], 7097borders = [ 7098element.css( "borderTopWidth" ), 7099element.css( "borderRightWidth" ), 7100element.css( "borderBottomWidth" ), 7101element.css( "borderLeftWidth" ) 7102], 7103paddings = [ 7104element.css( "paddingTop" ), 7105element.css( "paddingRight" ), 7106element.css( "paddingBottom" ), 7107element.css( "paddingLeft" ) 7108]; 7109for ( ; i < 4; i++ ) { 7110widths[ i ] = ( parseInt( borders[ i ], 10 ) || 0 ); 7111widths[ i ] += ( parseInt( paddings[ i ], 10 ) || 0 ); 7112} 7113return { 7114height: widths[ 0 ] + widths[ 2 ], 7115width: widths[ 1 ] + widths[ 3 ] 7116}; 7117}, 7118_proportionallyResize: function() { 7119if (!this._proportionallyResizeElements.length) { 7120return; 7121} 7122var prel, 7123i = 0, 7124element = this.helper || this.element; 7125for ( ; i < this._proportionallyResizeElements.length; i++) { 7126prel = this._proportionallyResizeElements[i]; 7127if (!this.outerDimensions) { 7128this.outerDimensions = this._getPaddingPlusBorderDimensions( prel ); 7129} 7130prel.css({ 7131height: (element.height() - this.outerDimensions.height) || 0, 7132width: (element.width() - this.outerDimensions.width) || 0 7133}); 7134} 7135}, 7136_renderProxy: function() { 7137var el = this.element, o = this.options; 7138this.elementOffset = el.offset(); 7139if (this._helper) { 7140this.helper = this.helper || $("<div style='overflow:hidden;'></div>"); 7141this.helper.addClass(this._helper).css({ 7142width: this.element.outerWidth() - 1, 7143height: this.element.outerHeight() - 1, 7144position: "absolute", 7145left: this.elementOffset.left + "px", 7146top: this.elementOffset.top + "px", 7147zIndex: ++o.zIndex //TODO: Don't modify option 7148}); 7149this.helper 7150.appendTo("body") 7151.disableSelection(); 7152} else { 7153this.helper = this.element; 7154} 7155}, 7156_change: { 7157e: function(event, dx) { 7158return { width: this.originalSize.width + dx }; 7159}, 7160w: function(event, dx) { 7161var cs = this.originalSize, sp = this.originalPosition; 7162return { left: sp.left + dx, width: cs.width - dx }; 7163}, 7164n: function(event, dx, dy) { 7165var cs = this.originalSize, sp = this.originalPosition; 7166return { top: sp.top + dy, height: cs.height - dy }; 7167}, 7168s: function(event, dx, dy) { 7169return { height: this.originalSize.height + dy }; 7170}, 7171se: function(event, dx, dy) { 7172return $.extend(this._change.s.apply(this, arguments), 7173this._change.e.apply(this, [ event, dx, dy ])); 7174}, 7175sw: function(event, dx, dy) { 7176return $.extend(this._change.s.apply(this, arguments), 7177this._change.w.apply(this, [ event, dx, dy ])); 7178}, 7179ne: function(event, dx, dy) { 7180return $.extend(this._change.n.apply(this, arguments), 7181this._change.e.apply(this, [ event, dx, dy ])); 7182}, 7183nw: function(event, dx, dy) { 7184return $.extend(this._change.n.apply(this, arguments), 7185this._change.w.apply(this, [ event, dx, dy ])); 7186} 7187}, 7188_propagate: function(n, event) { 7189$.ui.plugin.call(this, n, [ event, this.ui() ]); 7190(n !== "resize" && this._trigger(n, event, this.ui())); 7191}, 7192plugins: {}, 7193ui: function() { 7194return { 7195originalElement: this.originalElement, 7196element: this.element, 7197helper: this.helper, 7198position: this.position, 7199size: this.size, 7200originalSize: this.originalSize, 7201originalPosition: this.originalPosition 7202}; 7203} 7204}); 7205$.ui.plugin.add("resizable", "animate", { 7206stop: function( event ) { 7207var that = $(this).resizable( "instance" ), 7208o = that.options, 7209pr = that._proportionallyResizeElements, 7210ista = pr.length && (/textarea/i).test(pr[0].nodeName), 7211soffseth = ista && that._hasScroll(pr[0], "left") ? 0 : that.sizeDiff.height, 7212soffsetw = ista ? 0 : that.sizeDiff.width, 7213style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) }, 7214left = (parseInt(that.element.css("left"), 10) + 7215(that.position.left - that.originalPosition.left)) || null, 7216top = (parseInt(that.element.css("top"), 10) + 7217(that.position.top - that.originalPosition.top)) || null; 7218that.element.animate( 7219$.extend(style, top && left ? { top: top, left: left } : {}), { 7220duration: o.animateDuration, 7221easing: o.animateEasing, 7222step: function() { 7223var data = { 7224width: parseInt(that.element.css("width"), 10), 7225height: parseInt(that.element.css("height"), 10), 7226top: parseInt(that.element.css("top"), 10), 7227left: parseInt(that.element.css("left"), 10) 7228}; 7229if (pr && pr.length) { 7230$(pr[0]).css({ width: data.width, height: data.height }); 7231} 7232that._updateCache(data); 7233that._propagate("resize", event); 7234} 7235} 7236); 7237} 7238}); 7239$.ui.plugin.add( "resizable", "containment", { 7240start: function() { 7241var element, p, co, ch, cw, width, height, 7242that = $( this ).resizable( "instance" ), 7243o = that.options, 7244el = that.element, 7245oc = o.containment, 7246ce = ( oc instanceof $ ) ? oc.get( 0 ) : ( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc; 7247if ( !ce ) { 7248return; 7249} 7250that.containerElement = $( ce ); 7251if ( /document/.test( oc ) || oc === document ) { 7252that.containerOffset = { 7253left: 0, 7254top: 0 7255}; 7256that.containerPosition = { 7257left: 0, 7258top: 0 7259}; 7260that.parentData = { 7261element: $( document ), 7262left: 0, 7263top: 0, 7264width: $( document ).width(), 7265height: $( document ).height() || document.body.parentNode.scrollHeight 7266}; 7267} else { 7268element = $( ce ); 7269p = []; 7270$([ "Top", "Right", "Left", "Bottom" ]).each(function( i, name ) { 7271p[ i ] = that._num( element.css( "padding" + name ) ); 7272}); 7273that.containerOffset = element.offset(); 7274that.containerPosition = element.position(); 7275that.containerSize = {
vendor: 5,069 bytes, lines 7276-7460
7276height: ( element.innerHeight() - p[ 3 ] ), 7277width: ( element.innerWidth() - p[ 1 ] ) 7278}; 7279co = that.containerOffset; 7280ch = that.containerSize.height; 7281cw = that.containerSize.width; 7282width = ( that._hasScroll ( ce, "left" ) ? ce.scrollWidth : cw ); 7283height = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ; 7284that.parentData = { 7285element: ce, 7286left: co.left, 7287top: co.top, 7288width: width, 7289height: height 7290}; 7291} 7292}, 7293resize: function( event ) { 7294var woset, hoset, isParent, isOffsetRelative, 7295that = $( this ).resizable( "instance" ), 7296o = that.options, 7297co = that.containerOffset, 7298cp = that.position, 7299pRatio = that._aspectRatio || event.shiftKey, 7300cop = { 7301top: 0, 7302left: 0 7303}, 7304ce = that.containerElement, 7305continueResize = true; 7306if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) { 7307cop = co; 7308} 7309if ( cp.left < ( that._helper ? co.left : 0 ) ) { 7310that.size.width = that.size.width + 7311( that._helper ? 7312( that.position.left - co.left ) : 7313( that.position.left - cop.left ) ); 7314if ( pRatio ) { 7315that.size.height = that.size.width / that.aspectRatio; 7316continueResize = false; 7317} 7318that.position.left = o.helper ? co.left : 0; 7319} 7320if ( cp.top < ( that._helper ? co.top : 0 ) ) { 7321that.size.height = that.size.height + 7322( that._helper ? 7323( that.position.top - co.top ) : 7324that.position.top ); 7325if ( pRatio ) { 7326that.size.width = that.size.height * that.aspectRatio; 7327continueResize = false; 7328} 7329that.position.top = that._helper ? co.top : 0; 7330} 7331isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 ); 7332isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) ); 7333if ( isParent && isOffsetRelative ) { 7334that.offset.left = that.parentData.left + that.position.left; 7335that.offset.top = that.parentData.top + that.position.top; 7336} else { 7337that.offset.left = that.element.offset().left; 7338that.offset.top = that.element.offset().top; 7339} 7340woset = Math.abs( that.sizeDiff.width + 7341(that._helper ? 7342that.offset.left - cop.left : 7343(that.offset.left - co.left)) ); 7344hoset = Math.abs( that.sizeDiff.height + 7345(that._helper ? 7346that.offset.top - cop.top : 7347(that.offset.top - co.top)) ); 7348if ( woset + that.size.width >= that.parentData.width ) { 7349that.size.width = that.parentData.width - woset; 7350if ( pRatio ) { 7351that.size.height = that.size.width / that.aspectRatio; 7352continueResize = false; 7353} 7354} 7355if ( hoset + that.size.height >= that.parentData.height ) { 7356that.size.height = that.parentData.height - hoset; 7357if ( pRatio ) { 7358that.size.width = that.size.height * that.aspectRatio; 7359continueResize = false; 7360} 7361} 7362if ( !continueResize ) { 7363that.position.left = that.prevPosition.left; 7364that.position.top = that.prevPosition.top; 7365that.size.width = that.prevSize.width; 7366that.size.height = that.prevSize.height; 7367} 7368}, 7369stop: function() { 7370var that = $( this ).resizable( "instance" ), 7371o = that.options, 7372co = that.containerOffset, 7373cop = that.containerPosition, 7374ce = that.containerElement, 7375helper = $( that.helper ), 7376ho = helper.offset(), 7377w = helper.outerWidth() - that.sizeDiff.width, 7378h = helper.outerHeight() - that.sizeDiff.height; 7379if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) { 7380$( this ).css({ 7381left: ho.left - cop.left - co.left, 7382width: w, 7383height: h 7384}); 7385} 7386if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) { 7387$( this ).css({ 7388left: ho.left - cop.left - co.left, 7389width: w, 7390height: h 7391}); 7392} 7393} 7394}); 7395$.ui.plugin.add("resizable", "alsoResize", { 7396start: function() { 7397var that = $(this).resizable( "instance" ), 7398o = that.options; 7399$(o.alsoResize).each(function() { 7400var el = $(this); 7401el.data("ui-resizable-alsoresize", { 7402width: parseInt(el.width(), 10), height: parseInt(el.height(), 10), 7403left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10) 7404}); 7405}); 7406}, 7407resize: function(event, ui) { 7408var that = $(this).resizable( "instance" ), 7409o = that.options, 7410os = that.originalSize, 7411op = that.originalPosition, 7412delta = { 7413height: (that.size.height - os.height) || 0, 7414width: (that.size.width - os.width) || 0, 7415top: (that.position.top - op.top) || 0, 7416left: (that.position.left - op.left) || 0 7417}; 7418$(o.alsoResize).each(function() { 7419var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {}, 7420css = el.parents(ui.originalElement[0]).length ? 7421[ "width", "height" ] : 7422[ "width", "height", "top", "left" ]; 7423$.each(css, function(i, prop) { 7424var sum = (start[prop] || 0) + (delta[prop] || 0); 7425if (sum && sum >= 0) { 7426style[prop] = sum || null; 7427} 7428}); 7429el.css(style); 7430}); 7431}, 7432stop: function() { 7433$(this).removeData("resizable-alsoresize"); 7434} 7435}); 7436$.ui.plugin.add("resizable", "ghost", { 7437start: function() { 7438var that = $(this).resizable( "instance" ), o = that.options, cs = that.size; 7439that.ghost = that.originalElement.clone(); 7440that.ghost 7441.css({ 7442opacity: 0.25, 7443display: "block", 7444position: "relative", 7445height: cs.height, 7446width: cs.width, 7447margin: 0, 7448left: 0, 7449top: 0 7450}) 7451.addClass("ui-resizable-ghost") 7452.addClass(typeof o.ghost === "string" ? o.ghost : ""); 7453that.ghost.appendTo(that.helper); 7454}, 7455resize: function() { 7456var that = $(this).resizable( "instance" ); 7457if (that.ghost) { 7458that.ghost.css({ 7459position: "relative", 7460height: that.size.height,
vendor: 21,501 bytes, lines 7461-8330
7461width: that.size.width 7462}); 7463} 7464}, 7465stop: function() { 7466var that = $(this).resizable( "instance" ); 7467if (that.ghost && that.helper) { 7468that.helper.get(0).removeChild(that.ghost.get(0)); 7469} 7470} 7471}); 7472$.ui.plugin.add("resizable", "grid", { 7473resize: function() { 7474var outerDimensions, 7475that = $(this).resizable( "instance" ), 7476o = that.options, 7477cs = that.size, 7478os = that.originalSize, 7479op = that.originalPosition, 7480a = that.axis, 7481grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid, 7482gridX = (grid[0] || 1), 7483gridY = (grid[1] || 1), 7484ox = Math.round((cs.width - os.width) / gridX) * gridX, 7485oy = Math.round((cs.height - os.height) / gridY) * gridY, 7486newWidth = os.width + ox, 7487newHeight = os.height + oy, 7488isMaxWidth = o.maxWidth && (o.maxWidth < newWidth), 7489isMaxHeight = o.maxHeight && (o.maxHeight < newHeight), 7490isMinWidth = o.minWidth && (o.minWidth > newWidth), 7491isMinHeight = o.minHeight && (o.minHeight > newHeight); 7492o.grid = grid; 7493if (isMinWidth) { 7494newWidth += gridX; 7495} 7496if (isMinHeight) { 7497newHeight += gridY; 7498} 7499if (isMaxWidth) { 7500newWidth -= gridX; 7501} 7502if (isMaxHeight) { 7503newHeight -= gridY; 7504} 7505if (/^(se|s|e)$/.test(a)) { 7506that.size.width = newWidth; 7507that.size.height = newHeight; 7508} else if (/^(ne)$/.test(a)) { 7509that.size.width = newWidth; 7510that.size.height = newHeight; 7511that.position.top = op.top - oy; 7512} else if (/^(sw)$/.test(a)) { 7513that.size.width = newWidth; 7514that.size.height = newHeight; 7515that.position.left = op.left - ox; 7516} else { 7517if ( newHeight - gridY <= 0 || newWidth - gridX <= 0) { 7518outerDimensions = that._getPaddingPlusBorderDimensions( this ); 7519} 7520if ( newHeight - gridY > 0 ) { 7521that.size.height = newHeight; 7522that.position.top = op.top - oy; 7523} else { 7524newHeight = gridY - outerDimensions.height; 7525that.size.height = newHeight; 7526that.position.top = op.top + os.height - newHeight; 7527} 7528if ( newWidth - gridX > 0 ) { 7529that.size.width = newWidth; 7530that.position.left = op.left - ox; 7531} else { 7532newWidth = gridX - outerDimensions.width; 7533that.size.width = newWidth; 7534that.position.left = op.left + os.width - newWidth; 7535} 7536} 7537} 7538}); 7539var resizable = $.ui.resizable; 7540var dialog = $.widget( "ui.dialog", { 7541version: "1.11.4", 7542options: { 7543appendTo: "body", 7544autoOpen: true, 7545buttons: [], 7546closeOnEscape: true, 7547closeText: "Close", 7548dialogClass: "", 7549draggable: true, 7550hide: null, 7551height: "auto", 7552maxHeight: null, 7553maxWidth: null, 7554minHeight: 150, 7555minWidth: 150, 7556modal: false, 7557position: { 7558my: "center", 7559at: "center", 7560of: window, 7561collision: "fit", 7562using: function( pos ) { 7563var topOffset = $( this ).css( pos ).offset().top; 7564if ( topOffset < 0 ) { 7565$( this ).css( "top", pos.top - topOffset ); 7566} 7567} 7568}, 7569resizable: true, 7570show: null, 7571title: null, 7572width: 300, 7573beforeClose: null, 7574close: null, 7575drag: null, 7576dragStart: null, 7577dragStop: null, 7578focus: null, 7579open: null, 7580resize: null, 7581resizeStart: null, 7582resizeStop: null 7583}, 7584sizeRelatedOptions: { 7585buttons: true, 7586height: true, 7587maxHeight: true, 7588maxWidth: true, 7589minHeight: true, 7590minWidth: true, 7591width: true 7592}, 7593resizableRelatedOptions: { 7594maxHeight: true, 7595maxWidth: true, 7596minHeight: true, 7597minWidth: true 7598}, 7599_create: function() { 7600this.originalCss = { 7601display: this.element[ 0 ].style.display, 7602width: this.element[ 0 ].style.width, 7603minHeight: this.element[ 0 ].style.minHeight, 7604maxHeight: this.element[ 0 ].style.maxHeight, 7605height: this.element[ 0 ].style.height 7606}; 7607this.originalPosition = { 7608parent: this.element.parent(), 7609index: this.element.parent().children().index( this.element ) 7610}; 7611this.originalTitle = this.element.attr( "title" ); 7612this.options.title = this.options.title || this.originalTitle; 7613this._createWrapper(); 7614this.element 7615.show() 7616.removeAttr( "title" ) 7617.addClass( "ui-dialog-content ui-widget-content" ) 7618.appendTo( this.uiDialog ); 7619this._createTitlebar(); 7620this._createButtonPane(); 7621if ( this.options.draggable && $.fn.draggable ) { 7622this._makeDraggable(); 7623} 7624if ( this.options.resizable && $.fn.resizable ) { 7625this._makeResizable(); 7626} 7627this._isOpen = false; 7628this._trackFocus(); 7629}, 7630_init: function() { 7631if ( this.options.autoOpen ) { 7632this.open(); 7633} 7634}, 7635_appendTo: function() { 7636var element = this.options.appendTo; 7637if ( element && (element.jquery || element.nodeType) ) { 7638return $( element ); 7639} 7640return this.document.find( element || "body" ).eq( 0 ); 7641}, 7642_destroy: function() { 7643var next, 7644originalPosition = this.originalPosition; 7645this._untrackInstance(); 7646this._destroyOverlay(); 7647this.element 7648.removeUniqueId() 7649.removeClass( "ui-dialog-content ui-widget-content" ) 7650.css( this.originalCss ) 7651.detach(); 7652this.uiDialog.stop( true, true ).remove(); 7653if ( this.originalTitle ) { 7654this.element.attr( "title", this.originalTitle ); 7655} 7656next = originalPosition.parent.children().eq( originalPosition.index ); 7657if ( next.length && next[ 0 ] !== this.element[ 0 ] ) { 7658next.before( this.element ); 7659} else { 7660originalPosition.parent.append( this.element ); 7661} 7662}, 7663widget: function() { 7664return this.uiDialog; 7665}, 7666disable: $.noop, 7667enable: $.noop, 7668close: function( event ) { 7669var activeElement, 7670that = this; 7671if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) { 7672return; 7673} 7674this._isOpen = false; 7675this._focusedElement = null; 7676this._destroyOverlay(); 7677this._untrackInstance(); 7678if ( !this.opener.filter( ":focusable" ).focus().length ) { 7679try { 7680activeElement = this.document[ 0 ].activeElement; 7681if ( activeElement && activeElement.nodeName.toLowerCase() !== "body" ) { 7682$( activeElement ).blur(); 7683} 7684} catch ( error ) {} 7685} 7686this._hide( this.uiDialog, this.options.hide, function() { 7687that._trigger( "close", event ); 7688}); 7689}, 7690isOpen: function() { 7691return this._isOpen; 7692}, 7693moveToTop: function() { 7694this._moveToTop(); 7695}, 7696_moveToTop: function( event, silent ) { 7697var moved = false, 7698zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map(function() { 7699return +$( this ).css( "z-index" ); 7700}).get(), 7701zIndexMax = Math.max.apply( null, zIndices ); 7702if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) { 7703this.uiDialog.css( "z-index", zIndexMax + 1 ); 7704moved = true; 7705} 7706if ( moved && !silent ) { 7707this._trigger( "focus", event ); 7708} 7709return moved; 7710}, 7711open: function() { 7712var that = this; 7713if ( this._isOpen ) { 7714if ( this._moveToTop() ) { 7715this._focusTabbable(); 7716} 7717return; 7718} 7719this._isOpen = true; 7720this.opener = $( this.document[ 0 ].activeElement ); 7721this._size(); 7722this._position(); 7723this._createOverlay(); 7724this._moveToTop( null, true ); 7725if ( this.overlay ) { 7726this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 ); 7727} 7728this._show( this.uiDialog, this.options.show, function() { 7729that._focusTabbable(); 7730that._trigger( "focus" ); 7731}); 7732this._makeFocusTarget(); 7733this._trigger( "open" ); 7734}, 7735_focusTabbable: function() { 7736var hasFocus = this._focusedElement; 7737if ( !hasFocus ) { 7738hasFocus = this.element.find( "[autofocus]" ); 7739} 7740if ( !hasFocus.length ) { 7741hasFocus = this.element.find( ":tabbable" ); 7742} 7743if ( !hasFocus.length ) { 7744hasFocus = this.uiDialogButtonPane.find( ":tabbable" ); 7745} 7746if ( !hasFocus.length ) { 7747hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" ); 7748} 7749if ( !hasFocus.length ) { 7750hasFocus = this.uiDialog; 7751} 7752hasFocus.eq( 0 ).focus(); 7753}, 7754_keepFocus: function( event ) { 7755function checkFocus() { 7756var activeElement = this.document[0].activeElement, 7757isActive = this.uiDialog[0] === activeElement || 7758$.contains( this.uiDialog[0], activeElement ); 7759if ( !isActive ) { 7760this._focusTabbable(); 7761} 7762} 7763event.preventDefault(); 7764checkFocus.call( this ); 7765this._delay( checkFocus ); 7766}, 7767_createWrapper: function() { 7768this.uiDialog = $("<div>") 7769.addClass( "ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " + 7770this.options.dialogClass ) 7771.hide() 7772.attr({ 7773tabIndex: -1, 7774role: "dialog" 7775}) 7776.appendTo( this._appendTo() ); 7777this._on( this.uiDialog, { 7778keydown: function( event ) { 7779if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && 7780event.keyCode === $.ui.keyCode.ESCAPE ) { 7781event.preventDefault(); 7782this.close( event ); 7783return; 7784} 7785if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) { 7786return; 7787} 7788var tabbables = this.uiDialog.find( ":tabbable" ), 7789first = tabbables.filter( ":first" ), 7790last = tabbables.filter( ":last" ); 7791if ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) { 7792this._delay(function() { 7793first.focus(); 7794}); 7795event.preventDefault(); 7796} else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) { 7797this._delay(function() { 7798last.focus(); 7799}); 7800event.preventDefault(); 7801} 7802}, 7803mousedown: function( event ) { 7804if ( this._moveToTop( event ) ) { 7805this._focusTabbable(); 7806} 7807} 7808}); 7809if ( !this.element.find( "[aria-describedby]" ).length ) { 7810this.uiDialog.attr({ 7811"aria-describedby": this.element.uniqueId().attr( "id" ) 7812}); 7813} 7814}, 7815_createTitlebar: function() { 7816var uiDialogTitle; 7817this.uiDialogTitlebar = $( "<div>" ) 7818.addClass( "ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" ) 7819.prependTo( this.uiDialog ); 7820this._on( this.uiDialogTitlebar, { 7821mousedown: function( event ) { 7822if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) { 7823this.uiDialog.focus(); 7824} 7825} 7826}); 7827this.uiDialogTitlebarClose = $( "<button type='button'></button>" ) 7828.button({ 7829label: this.options.closeText, 7830icons: { 7831primary: "ui-icon-closethick" 7832}, 7833text: false 7834}) 7835.addClass( "ui-dialog-titlebar-close" ) 7836.appendTo( this.uiDialogTitlebar ); 7837this._on( this.uiDialogTitlebarClose, { 7838click: function( event ) { 7839event.preventDefault(); 7840this.close( event ); 7841} 7842}); 7843uiDialogTitle = $( "<span>" ) 7844.uniqueId() 7845.addClass( "ui-dialog-title" ) 7846.prependTo( this.uiDialogTitlebar ); 7847this._title( uiDialogTitle ); 7848this.uiDialog.attr({ 7849"aria-labelledby": uiDialogTitle.attr( "id" ) 7850}); 7851}, 7852_title: function( title ) { 7853if ( !this.options.title ) { 7854title.html( " " ); 7855} 7856title.text( this.options.title ); 7857}, 7858_createButtonPane: function() { 7859this.uiDialogButtonPane = $( "<div>" ) 7860.addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" ); 7861this.uiButtonSet = $( "<div>" ) 7862.addClass( "ui-dialog-buttonset" ) 7863.appendTo( this.uiDialogButtonPane ); 7864this._createButtons(); 7865}, 7866_createButtons: function() { 7867var that = this, 7868buttons = this.options.buttons; 7869this.uiDialogButtonPane.remove(); 7870this.uiButtonSet.empty(); 7871if ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) { 7872this.uiDialog.removeClass( "ui-dialog-buttons" ); 7873return; 7874} 7875$.each( buttons, function( name, props ) { 7876var click, buttonOptions; 7877props = $.isFunction( props ) ? 7878{ click: props, text: name } : 7879props; 7880props = $.extend( { type: "button" }, props ); 7881click = props.click; 7882props.click = function() { 7883click.apply( that.element[ 0 ], arguments ); 7884}; 7885buttonOptions = { 7886icons: props.icons, 7887text: props.showText 7888}; 7889delete props.icons; 7890delete props.showText; 7891$( "<button></button>", props ) 7892.button( buttonOptions ) 7893.appendTo( that.uiButtonSet ); 7894}); 7895this.uiDialog.addClass( "ui-dialog-buttons" ); 7896this.uiDialogButtonPane.appendTo( this.uiDialog ); 7897}, 7898_makeDraggable: function() { 7899var that = this, 7900options = this.options; 7901function filteredUi( ui ) { 7902return { 7903position: ui.position, 7904offset: ui.offset 7905}; 7906} 7907this.uiDialog.draggable({ 7908cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", 7909handle: ".ui-dialog-titlebar", 7910containment: "document", 7911start: function( event, ui ) { 7912$( this ).addClass( "ui-dialog-dragging" ); 7913that._blockFrames(); 7914that._trigger( "dragStart", event, filteredUi( ui ) ); 7915}, 7916drag: function( event, ui ) { 7917that._trigger( "drag", event, filteredUi( ui ) ); 7918}, 7919stop: function( event, ui ) { 7920var left = ui.offset.left - that.document.scrollLeft(), 7921top = ui.offset.top - that.document.scrollTop(); 7922options.position = { 7923my: "left top", 7924at: "left" + (left >= 0 ? "+" : "") + left + " " + 7925"top" + (top >= 0 ? "+" : "") + top, 7926of: that.window 7927}; 7928$( this ).removeClass( "ui-dialog-dragging" ); 7929that._unblockFrames(); 7930that._trigger( "dragStop", event, filteredUi( ui ) ); 7931} 7932}); 7933}, 7934_makeResizable: function() { 7935var that = this, 7936options = this.options, 7937handles = options.resizable, 7938position = this.uiDialog.css("position"), 7939resizeHandles = typeof handles === "string" ? 7940handles : 7941"n,e,s,w,se,sw,ne,nw"; 7942function filteredUi( ui ) { 7943return { 7944originalPosition: ui.originalPosition, 7945originalSize: ui.originalSize, 7946position: ui.position, 7947size: ui.size 7948}; 7949} 7950this.uiDialog.resizable({ 7951cancel: ".ui-dialog-content", 7952containment: "document", 7953alsoResize: this.element, 7954maxWidth: options.maxWidth, 7955maxHeight: options.maxHeight, 7956minWidth: options.minWidth, 7957minHeight: this._minHeight(), 7958handles: resizeHandles, 7959start: function( event, ui ) { 7960$( this ).addClass( "ui-dialog-resizing" ); 7961that._blockFrames(); 7962that._trigger( "resizeStart", event, filteredUi( ui ) ); 7963}, 7964resize: function( event, ui ) { 7965that._trigger( "resize", event, filteredUi( ui ) ); 7966}, 7967stop: function( event, ui ) { 7968var offset = that.uiDialog.offset(), 7969left = offset.left - that.document.scrollLeft(), 7970top = offset.top - that.document.scrollTop(); 7971options.height = that.uiDialog.height(); 7972options.width = that.uiDialog.width(); 7973options.position = { 7974my: "left top", 7975at: "left" + (left >= 0 ? "+" : "") + left + " " + 7976"top" + (top >= 0 ? "+" : "") + top, 7977of: that.window 7978}; 7979$( this ).removeClass( "ui-dialog-resizing" ); 7980that._unblockFrames(); 7981that._trigger( "resizeStop", event, filteredUi( ui ) ); 7982} 7983}) 7984.css( "position", position ); 7985}, 7986_trackFocus: function() { 7987this._on( this.widget(), { 7988focusin: function( event ) { 7989this._makeFocusTarget(); 7990this._focusedElement = $( event.target ); 7991} 7992}); 7993}, 7994_makeFocusTarget: function() { 7995this._untrackInstance(); 7996this._trackingInstances().unshift( this ); 7997}, 7998_untrackInstance: function() { 7999var instances = this._trackingInstances(), 8000exists = $.inArray( this, instances ); 8001if ( exists !== -1 ) { 8002instances.splice( exists, 1 ); 8003} 8004}, 8005_trackingInstances: function() { 8006var instances = this.document.data( "ui-dialog-instances" ); 8007if ( !instances ) { 8008instances = []; 8009this.document.data( "ui-dialog-instances", instances ); 8010} 8011return instances; 8012}, 8013_minHeight: function() { 8014var options = this.options; 8015return options.height === "auto" ? 8016options.minHeight : 8017Math.min( options.minHeight, options.height ); 8018}, 8019_position: function() { 8020var isVisible = this.uiDialog.is( ":visible" ); 8021if ( !isVisible ) { 8022this.uiDialog.show(); 8023} 8024this.uiDialog.position( this.options.position ); 8025if ( !isVisible ) { 8026this.uiDialog.hide(); 8027} 8028}, 8029_setOptions: function( options ) { 8030var that = this, 8031resize = false, 8032resizableOptions = {}; 8033$.each( options, function( key, value ) { 8034that._setOption( key, value ); 8035if ( key in that.sizeRelatedOptions ) { 8036resize = true; 8037} 8038if ( key in that.resizableRelatedOptions ) { 8039resizableOptions[ key ] = value; 8040} 8041}); 8042if ( resize ) { 8043this._size(); 8044this._position(); 8045} 8046if ( this.uiDialog.is( ":data(ui-resizable)" ) ) { 8047this.uiDialog.resizable( "option", resizableOptions ); 8048} 8049}, 8050_setOption: function( key, value ) { 8051var isDraggable, isResizable, 8052uiDialog = this.uiDialog; 8053if ( key === "dialogClass" ) { 8054uiDialog 8055.removeClass( this.options.dialogClass ) 8056.addClass( value ); 8057} 8058if ( key === "disabled" ) { 8059return; 8060} 8061this._super( key, value ); 8062if ( key === "appendTo" ) { 8063this.uiDialog.appendTo( this._appendTo() ); 8064} 8065if ( key === "buttons" ) { 8066this._createButtons(); 8067} 8068if ( key === "closeText" ) { 8069this.uiDialogTitlebarClose.button({ 8070label: "" + value 8071}); 8072} 8073if ( key === "draggable" ) { 8074isDraggable = uiDialog.is( ":data(ui-draggable)" ); 8075if ( isDraggable && !value ) { 8076uiDialog.draggable( "destroy" ); 8077} 8078if ( !isDraggable && value ) { 8079this._makeDraggable(); 8080} 8081} 8082if ( key === "position" ) { 8083this._position(); 8084} 8085if ( key === "resizable" ) { 8086isResizable = uiDialog.is( ":data(ui-resizable)" ); 8087if ( isResizable && !value ) { 8088uiDialog.resizable( "destroy" ); 8089} 8090if ( isResizable && typeof value === "string" ) { 8091uiDialog.resizable( "option", "handles", value ); 8092} 8093if ( !isResizable && value !== false ) { 8094this._makeResizable(); 8095} 8096} 8097if ( key === "title" ) { 8098this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) ); 8099} 8100}, 8101_size: function() { 8102var nonContentHeight, minContentHeight, maxContentHeight, 8103options = this.options; 8104this.element.show().css({ 8105width: "auto", 8106minHeight: 0, 8107maxHeight: "none", 8108height: 0 8109}); 8110if ( options.minWidth > options.width ) { 8111options.width = options.minWidth; 8112} 8113nonContentHeight = this.uiDialog.css({ 8114height: "auto", 8115width: options.width 8116}) 8117.outerHeight(); 8118minContentHeight = Math.max( 0, options.minHeight - nonContentHeight ); 8119maxContentHeight = typeof options.maxHeight === "number" ? 8120Math.max( 0, options.maxHeight - nonContentHeight ) : 8121"none"; 8122if ( options.height === "auto" ) { 8123this.element.css({ 8124minHeight: minContentHeight, 8125maxHeight: maxContentHeight, 8126height: "auto" 8127}); 8128} else { 8129this.element.height( Math.max( 0, options.height - nonContentHeight ) ); 8130} 8131if ( this.uiDialog.is( ":data(ui-resizable)" ) ) { 8132this.uiDialog.resizable( "option", "minHeight", this._minHeight() ); 8133} 8134}, 8135_blockFrames: function() { 8136this.iframeBlocks = this.document.find( "iframe" ).map(function() { 8137var iframe = $( this ); 8138return $( "<div>" ) 8139.css({ 8140position: "absolute", 8141width: iframe.outerWidth(), 8142height: iframe.outerHeight() 8143}) 8144.appendTo( iframe.parent() ) 8145.offset( iframe.offset() )[0]; 8146}); 8147}, 8148_unblockFrames: function() { 8149if ( this.iframeBlocks ) { 8150this.iframeBlocks.remove(); 8151delete this.iframeBlocks; 8152} 8153}, 8154_allowInteraction: function( event ) { 8155if ( $( event.target ).closest( ".ui-dialog" ).length ) { 8156return true; 8157} 8158return !!$( event.target ).closest( ".ui-datepicker" ).length; 8159}, 8160_createOverlay: function() { 8161if ( !this.options.modal ) { 8162return; 8163} 8164var isOpening = true; 8165this._delay(function() { 8166isOpening = false; 8167}); 8168if ( !this.document.data( "ui-dialog-overlays" ) ) { 8169this._on( this.document, { 8170focusin: function( event ) { 8171if ( isOpening ) { 8172return; 8173} 8174if ( !this._allowInteraction( event ) ) { 8175event.preventDefault(); 8176this._trackingInstances()[ 0 ]._focusTabbable(); 8177} 8178} 8179}); 8180} 8181this.overlay = $( "<div>" ) 8182.addClass( "ui-widget-overlay ui-front" ) 8183.appendTo( this._appendTo() ); 8184this._on( this.overlay, { 8185mousedown: "_keepFocus" 8186}); 8187this.document.data( "ui-dialog-overlays", 8188(this.document.data( "ui-dialog-overlays" ) || 0) + 1 ); 8189}, 8190_destroyOverlay: function() { 8191if ( !this.options.modal ) { 8192return; 8193} 8194if ( this.overlay ) { 8195var overlays = this.document.data( "ui-dialog-overlays" ) - 1; 8196if ( !overlays ) { 8197this.document 8198.unbind( "focusin" ) 8199.removeData( "ui-dialog-overlays" ); 8200} else { 8201this.document.data( "ui-dialog-overlays", overlays ); 8202} 8203this.overlay.remove(); 8204this.overlay = null; 8205} 8206} 8207}); 8208$.widget( "ui.droppable", { 8209version: "1.11.4", 8210widgetEventPrefix: "drop", 8211options: { 8212accept: "*", 8213activeClass: false, 8214addClasses: true, 8215greedy: false, 8216hoverClass: false, 8217scope: "default", 8218tolerance: "intersect", 8219activate: null, 8220deactivate: null, 8221drop: null, 8222out: null, 8223over: null 8224}, 8225_create: function() { 8226var proportions, 8227o = this.options, 8228accept = o.accept; 8229this.isover = false; 8230this.isout = true; 8231this.accept = $.isFunction( accept ) ? accept : function( d ) { 8232return d.is( accept ); 8233}; 8234this.proportions = function( ) { 8235if ( arguments.length ) { 8236proportions = arguments[ 0 ]; 8237} else { 8238return proportions ? 8239proportions : 8240proportions = { 8241width: this.element[ 0 ].offsetWidth, 8242height: this.element[ 0 ].offsetHeight 8243}; 8244} 8245}; 8246this._addToManager( o.scope ); 8247o.addClasses && this.element.addClass( "ui-droppable" ); 8248}, 8249_addToManager: function( scope ) { 8250$.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || []; 8251$.ui.ddmanager.droppables[ scope ].push( this ); 8252}, 8253_splice: function( drop ) { 8254var i = 0; 8255for ( ; i < drop.length; i++ ) { 8256if ( drop[ i ] === this ) { 8257drop.splice( i, 1 ); 8258} 8259} 8260}, 8261_destroy: function() { 8262var drop = $.ui.ddmanager.droppables[ this.options.scope ]; 8263this._splice( drop ); 8264this.element.removeClass( "ui-droppable ui-droppable-disabled" ); 8265}, 8266_setOption: function( key, value ) { 8267if ( key === "accept" ) { 8268this.accept = $.isFunction( value ) ? value : function( d ) { 8269return d.is( value ); 8270}; 8271} else if ( key === "scope" ) { 8272var drop = $.ui.ddmanager.droppables[ this.options.scope ]; 8273this._splice( drop ); 8274this._addToManager( value ); 8275} 8276this._super( key, value ); 8277}, 8278_activate: function( event ) { 8279var draggable = $.ui.ddmanager.current; 8280if ( this.options.activeClass ) { 8281this.element.addClass( this.options.activeClass ); 8282} 8283if ( draggable ){ 8284this._trigger( "activate", event, this.ui( draggable ) ); 8285} 8286}, 8287_deactivate: function( event ) { 8288var draggable = $.ui.ddmanager.current; 8289if ( this.options.activeClass ) { 8290this.element.removeClass( this.options.activeClass ); 8291} 8292if ( draggable ){ 8293this._trigger( "deactivate", event, this.ui( draggable ) ); 8294} 8295}, 8296_over: function( event ) { 8297var draggable = $.ui.ddmanager.current; 8298if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) { 8299return; 8300} 8301if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) { 8302if ( this.options.hoverClass ) { 8303this.element.addClass( this.options.hoverClass ); 8304} 8305this._trigger( "over", event, this.ui( draggable ) ); 8306} 8307}, 8308_out: function( event ) { 8309var draggable = $.ui.ddmanager.current; 8310if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) { 8311return; 8312} 8313if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) { 8314if ( this.options.hoverClass ) { 8315this.element.removeClass( this.options.hoverClass ); 8316} 8317this._trigger( "out", event, this.ui( draggable ) ); 8318} 8319}, 8320_drop: function( event, custom ) { 8321var draggable = custom || $.ui.ddmanager.current, 8322childrenIntersection = false; 8323if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) { 8324return false; 8325} 8326this.element.find( ":data(ui-droppable)" ).not( ".ui-draggable-dragging" ).each(function() { 8327var inst = $( this ).droppable( "instance" ); 8328if ( 8329inst.options.greedy && 8330!inst.options.disabled &&
vendor: 4,080 bytes, lines 8331-8448
8331inst.options.scope === draggable.options.scope && 8332inst.accept.call( inst.element[ 0 ], ( draggable.currentItem || draggable.element ) ) && 8333$.ui.intersect( draggable, $.extend( inst, { offset: inst.element.offset() } ), inst.options.tolerance, event ) 8334) { childrenIntersection = true; return false; } 8335}); 8336if ( childrenIntersection ) { 8337return false; 8338} 8339if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) { 8340if ( this.options.activeClass ) { 8341this.element.removeClass( this.options.activeClass ); 8342} 8343if ( this.options.hoverClass ) { 8344this.element.removeClass( this.options.hoverClass ); 8345} 8346this._trigger( "drop", event, this.ui( draggable ) ); 8347return this.element; 8348} 8349return false; 8350}, 8351ui: function( c ) { 8352return { 8353draggable: ( c.currentItem || c.element ), 8354helper: c.helper, 8355position: c.position, 8356offset: c.positionAbs 8357}; 8358} 8359}); 8360$.ui.intersect = (function() { 8361function isOverAxis( x, reference, size ) { 8362return ( x >= reference ) && ( x < ( reference + size ) ); 8363} 8364return function( draggable, droppable, toleranceMode, event ) { 8365if ( !droppable.offset ) { 8366return false; 8367} 8368var x1 = ( draggable.positionAbs || draggable.position.absolute ).left + draggable.margins.left, 8369y1 = ( draggable.positionAbs || draggable.position.absolute ).top + draggable.margins.top, 8370x2 = x1 + draggable.helperProportions.width, 8371y2 = y1 + draggable.helperProportions.height, 8372l = droppable.offset.left, 8373t = droppable.offset.top, 8374r = l + droppable.proportions().width, 8375b = t + droppable.proportions().height; 8376switch ( toleranceMode ) { 8377case "fit": 8378return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b ); 8379case "intersect": 8380return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half 8381x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half 8382t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half 8383y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half 8384case "pointer": 8385return isOverAxis( event.pageY, t, droppable.proportions().height ) && isOverAxis( event.pageX, l, droppable.proportions().width ); 8386case "touch": 8387return ( 8388( y1 >= t && y1 <= b ) || // Top edge touching 8389( y2 >= t && y2 <= b ) || // Bottom edge touching 8390( y1 < t && y2 > b ) // Surrounded vertically 8391) && ( 8392( x1 >= l && x1 <= r ) || // Left edge touching 8393( x2 >= l && x2 <= r ) || // Right edge touching 8394( x1 < l && x2 > r ) // Surrounded horizontally 8395); 8396default: 8397return false; 8398} 8399}; 8400})(); 8401$.ui.ddmanager = { 8402current: null, 8403droppables: { "default": [] }, 8404prepareOffsets: function( t, event ) { 8405var i, j, 8406m = $.ui.ddmanager.droppables[ t.options.scope ] || [], 8407type = event ? event.type : null, // workaround for #2317 8408list = ( t.currentItem || t.element ).find( ":data(ui-droppable)" ).addBack(); 8409droppablesLoop: for ( i = 0; i < m.length; i++ ) { 8410if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ], ( t.currentItem || t.element ) ) ) ) { 8411continue; 8412} 8413for ( j = 0; j < list.length; j++ ) { 8414if ( list[ j ] === m[ i ].element[ 0 ] ) { 8415m[ i ].proportions().height = 0; 8416continue droppablesLoop; 8417} 8418} 8419m[ i ].visible = m[ i ].element.css( "display" ) !== "none"; 8420if ( !m[ i ].visible ) { 8421continue; 8422} 8423if ( type === "mousedown" ) { 8424m[ i ]._activate.call( m[ i ], event ); 8425} 8426m[ i ].offset = m[ i ].element.offset(); 8427m[ i ].proportions({ width: m[ i ].element[ 0 ].offsetWidth, height: m[ i ].element[ 0 ].offsetHeight }); 8428} 8429}, 8430drop: function( draggable, event ) { 8431var dropped = false; 8432$.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() { 8433if ( !this.options ) { 8434return; 8435} 8436if ( !this.options.disabled && this.visible && $.ui.intersect( draggable, this, this.options.tolerance, event ) ) { 8437dropped = this._drop.call( this, event ) || dropped; 8438} 8439if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) { 8440this.isout = true; 8441this.isover = false; 8442this._deactivate.call( this, event ); 8443} 8444}); 8445return dropped; 8446}, 8447dragStart: function( draggable, event ) { 8448draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
vendor: 48,219 bytes, lines 8449-10390
8449if ( !draggable.options.refreshPositions ) { 8450$.ui.ddmanager.prepareOffsets( draggable, event ); 8451} 8452}); 8453}, 8454drag: function( draggable, event ) { 8455if ( draggable.options.refreshPositions ) { 8456$.ui.ddmanager.prepareOffsets( draggable, event ); 8457} 8458$.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() { 8459if ( this.options.disabled || this.greedyChild || !this.visible ) { 8460return; 8461} 8462var parentInstance, scope, parent, 8463intersects = $.ui.intersect( draggable, this, this.options.tolerance, event ), 8464c = !intersects && this.isover ? "isout" : ( intersects && !this.isover ? "isover" : null ); 8465if ( !c ) { 8466return; 8467} 8468if ( this.options.greedy ) { 8469scope = this.options.scope; 8470parent = this.element.parents( ":data(ui-droppable)" ).filter(function() { 8471return $( this ).droppable( "instance" ).options.scope === scope; 8472}); 8473if ( parent.length ) { 8474parentInstance = $( parent[ 0 ] ).droppable( "instance" ); 8475parentInstance.greedyChild = ( c === "isover" ); 8476} 8477} 8478if ( parentInstance && c === "isover" ) { 8479parentInstance.isover = false; 8480parentInstance.isout = true; 8481parentInstance._out.call( parentInstance, event ); 8482} 8483this[ c ] = true; 8484this[c === "isout" ? "isover" : "isout"] = false; 8485this[c === "isover" ? "_over" : "_out"].call( this, event ); 8486if ( parentInstance && c === "isout" ) { 8487parentInstance.isout = false; 8488parentInstance.isover = true; 8489parentInstance._over.call( parentInstance, event ); 8490} 8491}); 8492}, 8493dragStop: function( draggable, event ) { 8494draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" ); 8495if ( !draggable.options.refreshPositions ) { 8496$.ui.ddmanager.prepareOffsets( draggable, event ); 8497} 8498} 8499}; 8500var droppable = $.ui.droppable; 8501var dataSpace = "ui-effects-", 8502jQuery = $; 8503$.effects = { 8504effect: {} 8505}; 8506(function( jQuery, undefined ) { 8507var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", 8508rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, 8509stringParsers = [ { 8510re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 8511parse: function( execResult ) { 8512return [ 8513execResult[ 1 ], 8514execResult[ 2 ], 8515execResult[ 3 ], 8516execResult[ 4 ] 8517]; 8518} 8519}, { 8520re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 8521parse: function( execResult ) { 8522return [ 8523execResult[ 1 ] * 2.55, 8524execResult[ 2 ] * 2.55, 8525execResult[ 3 ] * 2.55, 8526execResult[ 4 ] 8527]; 8528} 8529}, { 8530re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, 8531parse: function( execResult ) { 8532return [ 8533parseInt( execResult[ 1 ], 16 ), 8534parseInt( execResult[ 2 ], 16 ), 8535parseInt( execResult[ 3 ], 16 ) 8536]; 8537} 8538}, { 8539re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, 8540parse: function( execResult ) { 8541return [ 8542parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), 8543parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), 8544parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) 8545]; 8546} 8547}, { 8548re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 8549space: "hsla", 8550parse: function( execResult ) { 8551return [ 8552execResult[ 1 ], 8553execResult[ 2 ] / 100, 8554execResult[ 3 ] / 100, 8555execResult[ 4 ] 8556]; 8557} 8558} ], 8559color = jQuery.Color = function( color, green, blue, alpha ) { 8560return new jQuery.Color.fn.parse( color, green, blue, alpha ); 8561}, 8562spaces = { 8563rgba: { 8564props: { 8565red: { 8566idx: 0, 8567type: "byte" 8568}, 8569green: { 8570idx: 1, 8571type: "byte" 8572}, 8573blue: { 8574idx: 2, 8575type: "byte" 8576} 8577} 8578}, 8579hsla: { 8580props: { 8581hue: { 8582idx: 0, 8583type: "degrees" 8584}, 8585saturation: { 8586idx: 1, 8587type: "percent" 8588}, 8589lightness: { 8590idx: 2, 8591type: "percent" 8592} 8593} 8594} 8595}, 8596propTypes = { 8597"byte": { 8598floor: true, 8599max: 255 8600}, 8601"percent": { 8602max: 1 8603}, 8604"degrees": { 8605mod: 360, 8606floor: true 8607} 8608}, 8609support = color.support = {}, 8610supportElem = jQuery( "<p>" )[ 0 ], 8611colors, 8612each = jQuery.each; 8613supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; 8614support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; 8615each( spaces, function( spaceName, space ) { 8616space.cache = "_" + spaceName; 8617space.props.alpha = { 8618idx: 3, 8619type: "percent", 8620def: 1 8621}; 8622}); 8623function clamp( value, prop, allowEmpty ) { 8624var type = propTypes[ prop.type ] || {}; 8625if ( value == null ) { 8626return (allowEmpty || !prop.def) ? null : prop.def; 8627} 8628value = type.floor ? ~~value : parseFloat( value ); 8629if ( isNaN( value ) ) { 8630return prop.def; 8631} 8632if ( type.mod ) { 8633return (value + type.mod) % type.mod; 8634} 8635return 0 > value ? 0 : type.max < value ? type.max : value; 8636} 8637function stringParse( string ) { 8638var inst = color(), 8639rgba = inst._rgba = []; 8640string = string.toLowerCase(); 8641each( stringParsers, function( i, parser ) { 8642var parsed, 8643match = parser.re.exec( string ), 8644values = match && parser.parse( match ), 8645spaceName = parser.space || "rgba"; 8646if ( values ) { 8647parsed = inst[ spaceName ]( values ); 8648inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; 8649rgba = inst._rgba = parsed._rgba; 8650return false; 8651} 8652}); 8653if ( rgba.length ) { 8654if ( rgba.join() === "0,0,0,0" ) { 8655jQuery.extend( rgba, colors.transparent ); 8656} 8657return inst; 8658} 8659return colors[ string ]; 8660} 8661color.fn = jQuery.extend( color.prototype, { 8662parse: function( red, green, blue, alpha ) { 8663if ( red === undefined ) { 8664this._rgba = [ null, null, null, null ]; 8665return this; 8666} 8667if ( red.jquery || red.nodeType ) { 8668red = jQuery( red ).css( green ); 8669green = undefined; 8670} 8671var inst = this, 8672type = jQuery.type( red ), 8673rgba = this._rgba = []; 8674if ( green !== undefined ) { 8675red = [ red, green, blue, alpha ]; 8676type = "array"; 8677} 8678if ( type === "string" ) { 8679return this.parse( stringParse( red ) || colors._default ); 8680} 8681if ( type === "array" ) { 8682each( spaces.rgba.props, function( key, prop ) { 8683rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); 8684}); 8685return this; 8686} 8687if ( type === "object" ) { 8688if ( red instanceof color ) { 8689each( spaces, function( spaceName, space ) { 8690if ( red[ space.cache ] ) { 8691inst[ space.cache ] = red[ space.cache ].slice(); 8692} 8693}); 8694} else { 8695each( spaces, function( spaceName, space ) { 8696var cache = space.cache; 8697each( space.props, function( key, prop ) { 8698if ( !inst[ cache ] && space.to ) { 8699if ( key === "alpha" || red[ key ] == null ) { 8700return; 8701} 8702inst[ cache ] = space.to( inst._rgba ); 8703} 8704inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); 8705}); 8706if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { 8707inst[ cache ][ 3 ] = 1; 8708if ( space.from ) { 8709inst._rgba = space.from( inst[ cache ] ); 8710} 8711} 8712}); 8713} 8714return this; 8715} 8716}, 8717is: function( compare ) { 8718var is = color( compare ), 8719same = true, 8720inst = this; 8721each( spaces, function( _, space ) { 8722var localCache, 8723isCache = is[ space.cache ]; 8724if (isCache) { 8725localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; 8726each( space.props, function( _, prop ) { 8727if ( isCache[ prop.idx ] != null ) { 8728same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); 8729return same; 8730} 8731}); 8732} 8733return same; 8734}); 8735return same; 8736}, 8737_space: function() { 8738var used = [], 8739inst = this; 8740each( spaces, function( spaceName, space ) { 8741if ( inst[ space.cache ] ) { 8742used.push( spaceName ); 8743} 8744}); 8745return used.pop(); 8746}, 8747transition: function( other, distance ) { 8748var end = color( other ), 8749spaceName = end._space(), 8750space = spaces[ spaceName ], 8751startColor = this.alpha() === 0 ? color( "transparent" ) : this, 8752start = startColor[ space.cache ] || space.to( startColor._rgba ), 8753result = start.slice(); 8754end = end[ space.cache ]; 8755each( space.props, function( key, prop ) { 8756var index = prop.idx, 8757startValue = start[ index ], 8758endValue = end[ index ], 8759type = propTypes[ prop.type ] || {}; 8760if ( endValue === null ) { 8761return; 8762} 8763if ( startValue === null ) { 8764result[ index ] = endValue; 8765} else { 8766if ( type.mod ) { 8767if ( endValue - startValue > type.mod / 2 ) { 8768startValue += type.mod; 8769} else if ( startValue - endValue > type.mod / 2 ) { 8770startValue -= type.mod; 8771} 8772} 8773result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); 8774} 8775}); 8776return this[ spaceName ]( result ); 8777}, 8778blend: function( opaque ) { 8779if ( this._rgba[ 3 ] === 1 ) { 8780return this; 8781} 8782var rgb = this._rgba.slice(), 8783a = rgb.pop(), 8784blend = color( opaque )._rgba; 8785return color( jQuery.map( rgb, function( v, i ) { 8786return ( 1 - a ) * blend[ i ] + a * v; 8787})); 8788}, 8789toRgbaString: function() { 8790var prefix = "rgba(", 8791rgba = jQuery.map( this._rgba, function( v, i ) { 8792return v == null ? ( i > 2 ? 1 : 0 ) : v; 8793}); 8794if ( rgba[ 3 ] === 1 ) { 8795rgba.pop(); 8796prefix = "rgb("; 8797} 8798return prefix + rgba.join() + ")"; 8799}, 8800toHslaString: function() { 8801var prefix = "hsla(", 8802hsla = jQuery.map( this.hsla(), function( v, i ) { 8803if ( v == null ) { 8804v = i > 2 ? 1 : 0; 8805} 8806if ( i && i < 3 ) { 8807v = Math.round( v * 100 ) + "%"; 8808} 8809return v; 8810}); 8811if ( hsla[ 3 ] === 1 ) { 8812hsla.pop(); 8813prefix = "hsl("; 8814} 8815return prefix + hsla.join() + ")"; 8816}, 8817toHexString: function( includeAlpha ) { 8818var rgba = this._rgba.slice(), 8819alpha = rgba.pop(); 8820if ( includeAlpha ) { 8821rgba.push( ~~( alpha * 255 ) ); 8822} 8823return "#" + jQuery.map( rgba, function( v ) { 8824v = ( v || 0 ).toString( 16 ); 8825return v.length === 1 ? "0" + v : v; 8826}).join(""); 8827}, 8828toString: function() { 8829return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); 8830} 8831}); 8832color.fn.parse.prototype = color.fn; 8833function hue2rgb( p, q, h ) { 8834h = ( h + 1 ) % 1; 8835if ( h * 6 < 1 ) { 8836return p + ( q - p ) * h * 6; 8837} 8838if ( h * 2 < 1) { 8839return q; 8840} 8841if ( h * 3 < 2 ) { 8842return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6; 8843} 8844return p; 8845} 8846spaces.hsla.to = function( rgba ) { 8847if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { 8848return [ null, null, null, rgba[ 3 ] ]; 8849} 8850var r = rgba[ 0 ] / 255, 8851g = rgba[ 1 ] / 255, 8852b = rgba[ 2 ] / 255, 8853a = rgba[ 3 ], 8854max = Math.max( r, g, b ), 8855min = Math.min( r, g, b ), 8856diff = max - min, 8857add = max + min, 8858l = add * 0.5, 8859h, s; 8860if ( min === max ) { 8861h = 0; 8862} else if ( r === max ) { 8863h = ( 60 * ( g - b ) / diff ) + 360; 8864} else if ( g === max ) { 8865h = ( 60 * ( b - r ) / diff ) + 120; 8866} else { 8867h = ( 60 * ( r - g ) / diff ) + 240; 8868} 8869if ( diff === 0 ) { 8870s = 0; 8871} else if ( l <= 0.5 ) { 8872s = diff / add; 8873} else { 8874s = diff / ( 2 - add ); 8875} 8876return [ Math.round(h) % 360, s, l, a == null ? 1 : a ]; 8877}; 8878spaces.hsla.from = function( hsla ) { 8879if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { 8880return [ null, null, null, hsla[ 3 ] ]; 8881} 8882var h = hsla[ 0 ] / 360, 8883s = hsla[ 1 ], 8884l = hsla[ 2 ], 8885a = hsla[ 3 ], 8886q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, 8887p = 2 * l - q; 8888return [ 8889Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), 8890Math.round( hue2rgb( p, q, h ) * 255 ), 8891Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), 8892a 8893]; 8894}; 8895each( spaces, function( spaceName, space ) { 8896var props = space.props, 8897cache = space.cache, 8898to = space.to, 8899from = space.from; 8900color.fn[ spaceName ] = function( value ) { 8901if ( to && !this[ cache ] ) { 8902this[ cache ] = to( this._rgba ); 8903} 8904if ( value === undefined ) { 8905return this[ cache ].slice(); 8906} 8907var ret, 8908type = jQuery.type( value ), 8909arr = ( type === "array" || type === "object" ) ? value : arguments, 8910local = this[ cache ].slice(); 8911each( props, function( key, prop ) { 8912var val = arr[ type === "object" ? key : prop.idx ]; 8913if ( val == null ) { 8914val = local[ prop.idx ]; 8915} 8916local[ prop.idx ] = clamp( val, prop ); 8917}); 8918if ( from ) { 8919ret = color( from( local ) ); 8920ret[ cache ] = local; 8921return ret; 8922} else { 8923return color( local ); 8924} 8925}; 8926each( props, function( key, prop ) { 8927if ( color.fn[ key ] ) { 8928return; 8929} 8930color.fn[ key ] = function( value ) { 8931var vtype = jQuery.type( value ), 8932fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), 8933local = this[ fn ](), 8934cur = local[ prop.idx ], 8935match; 8936if ( vtype === "undefined" ) { 8937return cur; 8938} 8939if ( vtype === "function" ) { 8940value = value.call( this, cur ); 8941vtype = jQuery.type( value ); 8942} 8943if ( value == null && prop.empty ) { 8944return this; 8945} 8946if ( vtype === "string" ) { 8947match = rplusequals.exec( value ); 8948if ( match ) { 8949value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); 8950} 8951} 8952local[ prop.idx ] = value; 8953return this[ fn ]( local ); 8954}; 8955}); 8956}); 8957color.hook = function( hook ) { 8958var hooks = hook.split( " " ); 8959each( hooks, function( i, hook ) { 8960jQuery.cssHooks[ hook ] = { 8961set: function( elem, value ) { 8962var parsed, curElem, 8963backgroundColor = ""; 8964if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) { 8965value = color( parsed || value ); 8966if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { 8967curElem = hook === "backgroundColor" ? elem.parentNode : elem; 8968while ( 8969(backgroundColor === "" || backgroundColor === "transparent") && 8970curElem && curElem.style 8971) { 8972try { 8973backgroundColor = jQuery.css( curElem, "backgroundColor" ); 8974curElem = curElem.parentNode; 8975} catch ( e ) { 8976} 8977} 8978value = value.blend( backgroundColor && backgroundColor !== "transparent" ? 8979backgroundColor : 8980"_default" ); 8981} 8982value = value.toRgbaString(); 8983} 8984try { 8985elem.style[ hook ] = value; 8986} catch ( e ) { 8987} 8988} 8989}; 8990jQuery.fx.step[ hook ] = function( fx ) { 8991if ( !fx.colorInit ) { 8992fx.start = color( fx.elem, hook ); 8993fx.end = color( fx.end ); 8994fx.colorInit = true; 8995} 8996jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); 8997}; 8998}); 8999}; 9000color.hook( stepHooks ); 9001jQuery.cssHooks.borderColor = { 9002expand: function( value ) { 9003var expanded = {}; 9004each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { 9005expanded[ "border" + part + "Color" ] = value; 9006}); 9007return expanded; 9008} 9009}; 9010colors = jQuery.Color.names = { 9011aqua: "#00ffff", 9012black: "#000000", 9013blue: "#0000ff", 9014fuchsia: "#ff00ff", 9015gray: "#808080", 9016green: "#008000", 9017lime: "#00ff00", 9018maroon: "#800000", 9019navy: "#000080", 9020olive: "#808000", 9021purple: "#800080", 9022red: "#ff0000", 9023silver: "#c0c0c0", 9024teal: "#008080", 9025white: "#ffffff", 9026yellow: "#ffff00", 9027transparent: [ null, null, null, 0 ], 9028_default: "#ffffff" 9029}; 9030})( jQuery ); 9031(function() { 9032var classAnimationActions = [ "add", "remove", "toggle" ], 9033shorthandStyles = { 9034border: 1, 9035borderBottom: 1, 9036borderColor: 1, 9037borderLeft: 1, 9038borderRight: 1, 9039borderTop: 1, 9040borderWidth: 1, 9041margin: 1, 9042padding: 1 9043}; 9044$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) { 9045$.fx.step[ prop ] = function( fx ) { 9046if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { 9047jQuery.style( fx.elem, prop, fx.end ); 9048fx.setAttr = true; 9049} 9050}; 9051}); 9052function getElementStyles( elem ) { 9053var key, len, 9054style = elem.ownerDocument.defaultView ? 9055elem.ownerDocument.defaultView.getComputedStyle( elem, null ) : 9056elem.currentStyle, 9057styles = {}; 9058if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { 9059len = style.length; 9060while ( len-- ) { 9061key = style[ len ]; 9062if ( typeof style[ key ] === "string" ) { 9063styles[ $.camelCase( key ) ] = style[ key ]; 9064} 9065} 9066} else { 9067for ( key in style ) { 9068if ( typeof style[ key ] === "string" ) { 9069styles[ key ] = style[ key ]; 9070} 9071} 9072} 9073return styles; 9074} 9075function styleDifference( oldStyle, newStyle ) { 9076var diff = {}, 9077name, value; 9078for ( name in newStyle ) { 9079value = newStyle[ name ]; 9080if ( oldStyle[ name ] !== value ) { 9081if ( !shorthandStyles[ name ] ) { 9082if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) { 9083diff[ name ] = value; 9084} 9085} 9086} 9087} 9088return diff; 9089} 9090if ( !$.fn.addBack ) { 9091$.fn.addBack = function( selector ) { 9092return this.add( selector == null ? 9093this.prevObject : this.prevObject.filter( selector ) 9094); 9095}; 9096} 9097$.effects.animateClass = function( value, duration, easing, callback ) { 9098var o = $.speed( duration, easing, callback ); 9099return this.queue( function() { 9100var animated = $( this ), 9101baseClass = animated.attr( "class" ) || "", 9102applyClassChange, 9103allAnimations = o.children ? animated.find( "*" ).addBack() : animated; 9104allAnimations = allAnimations.map(function() { 9105var el = $( this ); 9106return { 9107el: el, 9108start: getElementStyles( this ) 9109}; 9110}); 9111applyClassChange = function() { 9112$.each( classAnimationActions, function(i, action) { 9113if ( value[ action ] ) { 9114animated[ action + "Class" ]( value[ action ] ); 9115} 9116}); 9117}; 9118applyClassChange(); 9119allAnimations = allAnimations.map(function() { 9120this.end = getElementStyles( this.el[ 0 ] ); 9121this.diff = styleDifference( this.start, this.end ); 9122return this; 9123}); 9124animated.attr( "class", baseClass ); 9125allAnimations = allAnimations.map(function() { 9126var styleInfo = this, 9127dfd = $.Deferred(), 9128opts = $.extend({}, o, { 9129queue: false, 9130complete: function() { 9131dfd.resolve( styleInfo ); 9132} 9133}); 9134this.el.animate( this.diff, opts ); 9135return dfd.promise(); 9136}); 9137$.when.apply( $, allAnimations.get() ).done(function() { 9138applyClassChange(); 9139$.each( arguments, function() { 9140var el = this.el; 9141$.each( this.diff, function(key) { 9142el.css( key, "" ); 9143}); 9144}); 9145o.complete.call( animated[ 0 ] ); 9146}); 9147}); 9148}; 9149$.fn.extend({ 9150addClass: (function( orig ) { 9151return function( classNames, speed, easing, callback ) { 9152return speed ? 9153$.effects.animateClass.call( this, 9154{ add: classNames }, speed, easing, callback ) : 9155orig.apply( this, arguments ); 9156}; 9157})( $.fn.addClass ), 9158removeClass: (function( orig ) { 9159return function( classNames, speed, easing, callback ) { 9160return arguments.length > 1 ? 9161$.effects.animateClass.call( this, 9162{ remove: classNames }, speed, easing, callback ) : 9163orig.apply( this, arguments ); 9164}; 9165})( $.fn.removeClass ), 9166toggleClass: (function( orig ) { 9167return function( classNames, force, speed, easing, callback ) { 9168if ( typeof force === "boolean" || force === undefined ) { 9169if ( !speed ) { 9170return orig.apply( this, arguments ); 9171} else { 9172return $.effects.animateClass.call( this, 9173(force ? { add: classNames } : { remove: classNames }), 9174speed, easing, callback ); 9175} 9176} else { 9177return $.effects.animateClass.call( this, 9178{ toggle: classNames }, force, speed, easing ); 9179} 9180}; 9181})( $.fn.toggleClass ), 9182switchClass: function( remove, add, speed, easing, callback) { 9183return $.effects.animateClass.call( this, { 9184add: add, 9185remove: remove 9186}, speed, easing, callback ); 9187} 9188}); 9189})(); 9190(function() { 9191$.extend( $.effects, { 9192version: "1.11.4", 9193save: function( element, set ) { 9194for ( var i = 0; i < set.length; i++ ) { 9195if ( set[ i ] !== null ) { 9196element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] ); 9197} 9198} 9199}, 9200restore: function( element, set ) { 9201var val, i; 9202for ( i = 0; i < set.length; i++ ) { 9203if ( set[ i ] !== null ) { 9204val = element.data( dataSpace + set[ i ] ); 9205if ( val === undefined ) { 9206val = ""; 9207} 9208element.css( set[ i ], val ); 9209} 9210} 9211}, 9212setMode: function( el, mode ) { 9213if (mode === "toggle") { 9214mode = el.is( ":hidden" ) ? "show" : "hide"; 9215} 9216return mode; 9217}, 9218getBaseline: function( origin, original ) { 9219var y, x; 9220switch ( origin[ 0 ] ) { 9221case "top": y = 0; break; 9222case "middle": y = 0.5; break; 9223case "bottom": y = 1; break; 9224default: y = origin[ 0 ] / original.height; 9225} 9226switch ( origin[ 1 ] ) { 9227case "left": x = 0; break; 9228case "center": x = 0.5; break; 9229case "right": x = 1; break; 9230default: x = origin[ 1 ] / original.width; 9231} 9232return { 9233x: x, 9234y: y 9235}; 9236}, 9237createWrapper: function( element ) { 9238if ( element.parent().is( ".ui-effects-wrapper" )) { 9239return element.parent(); 9240} 9241var props = { 9242width: element.outerWidth(true), 9243height: element.outerHeight(true), 9244"float": element.css( "float" ) 9245}, 9246wrapper = $( "<div></div>" ) 9247.addClass( "ui-effects-wrapper" ) 9248.css({ 9249fontSize: "100%", 9250background: "transparent", 9251border: "none", 9252margin: 0, 9253padding: 0 9254}), 9255size = { 9256width: element.width(), 9257height: element.height() 9258}, 9259active = document.activeElement; 9260try { 9261active.id; 9262} catch ( e ) { 9263active = document.body; 9264} 9265element.wrap( wrapper ); 9266if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { 9267$( active ).focus(); 9268} 9269wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element 9270if ( element.css( "position" ) === "static" ) { 9271wrapper.css({ position: "relative" }); 9272element.css({ position: "relative" }); 9273} else { 9274$.extend( props, { 9275position: element.css( "position" ), 9276zIndex: element.css( "z-index" ) 9277}); 9278$.each([ "top", "left", "bottom", "right" ], function(i, pos) { 9279props[ pos ] = element.css( pos ); 9280if ( isNaN( parseInt( props[ pos ], 10 ) ) ) { 9281props[ pos ] = "auto"; 9282} 9283}); 9284element.css({ 9285position: "relative", 9286top: 0, 9287left: 0, 9288right: "auto", 9289bottom: "auto" 9290}); 9291} 9292element.css(size); 9293return wrapper.css( props ).show(); 9294}, 9295removeWrapper: function( element ) { 9296var active = document.activeElement; 9297if ( element.parent().is( ".ui-effects-wrapper" ) ) { 9298element.parent().replaceWith( element ); 9299if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { 9300$( active ).focus(); 9301} 9302} 9303return element; 9304}, 9305setTransition: function( element, list, factor, value ) { 9306value = value || {}; 9307$.each( list, function( i, x ) { 9308var unit = element.cssUnit( x ); 9309if ( unit[ 0 ] > 0 ) { 9310value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; 9311} 9312}); 9313return value; 9314} 9315}); 9316function _normalizeArguments( effect, options, speed, callback ) { 9317if ( $.isPlainObject( effect ) ) { 9318options = effect; 9319effect = effect.effect; 9320} 9321effect = { effect: effect }; 9322if ( options == null ) { 9323options = {}; 9324} 9325if ( $.isFunction( options ) ) { 9326callback = options; 9327speed = null; 9328options = {}; 9329} 9330if ( typeof options === "number" || $.fx.speeds[ options ] ) { 9331callback = speed; 9332speed = options; 9333options = {}; 9334} 9335if ( $.isFunction( speed ) ) { 9336callback = speed; 9337speed = null; 9338} 9339if ( options ) { 9340$.extend( effect, options ); 9341} 9342speed = speed || options.duration; 9343effect.duration = $.fx.off ? 0 : 9344typeof speed === "number" ? speed : 9345speed in $.fx.speeds ? $.fx.speeds[ speed ] : 9346$.fx.speeds._default; 9347effect.complete = callback || options.complete; 9348return effect; 9349} 9350function standardAnimationOption( option ) { 9351if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) { 9352return true; 9353} 9354if ( typeof option === "string" && !$.effects.effect[ option ] ) { 9355return true; 9356} 9357if ( $.isFunction( option ) ) { 9358return true; 9359} 9360if ( typeof option === "object" && !option.effect ) { 9361return true; 9362} 9363return false; 9364} 9365$.fn.extend({ 9366effect: function( ) { 9367var args = _normalizeArguments.apply( this, arguments ), 9368mode = args.mode, 9369queue = args.queue, 9370effectMethod = $.effects.effect[ args.effect ]; 9371if ( $.fx.off || !effectMethod ) { 9372if ( mode ) { 9373return this[ mode ]( args.duration, args.complete ); 9374} else { 9375return this.each( function() { 9376if ( args.complete ) { 9377args.complete.call( this ); 9378} 9379}); 9380} 9381} 9382function run( next ) { 9383var elem = $( this ), 9384complete = args.complete, 9385mode = args.mode; 9386function done() { 9387if ( $.isFunction( complete ) ) { 9388complete.call( elem[0] ); 9389} 9390if ( $.isFunction( next ) ) { 9391next(); 9392} 9393} 9394if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) { 9395elem[ mode ](); 9396done(); 9397} else { 9398effectMethod.call( elem[0], args, done ); 9399} 9400} 9401return queue === false ? this.each( run ) : this.queue( queue || "fx", run ); 9402}, 9403show: (function( orig ) { 9404return function( option ) { 9405if ( standardAnimationOption( option ) ) { 9406return orig.apply( this, arguments ); 9407} else { 9408var args = _normalizeArguments.apply( this, arguments ); 9409args.mode = "show"; 9410return this.effect.call( this, args ); 9411} 9412}; 9413})( $.fn.show ), 9414hide: (function( orig ) { 9415return function( option ) { 9416if ( standardAnimationOption( option ) ) { 9417return orig.apply( this, arguments ); 9418} else { 9419var args = _normalizeArguments.apply( this, arguments ); 9420args.mode = "hide"; 9421return this.effect.call( this, args ); 9422} 9423}; 9424})( $.fn.hide ), 9425toggle: (function( orig ) { 9426return function( option ) { 9427if ( standardAnimationOption( option ) || typeof option === "boolean" ) { 9428return orig.apply( this, arguments ); 9429} else { 9430var args = _normalizeArguments.apply( this, arguments ); 9431args.mode = "toggle"; 9432return this.effect.call( this, args ); 9433} 9434}; 9435})( $.fn.toggle ), 9436cssUnit: function(key) { 9437var style = this.css( key ), 9438val = []; 9439$.each( [ "em", "px", "%", "pt" ], function( i, unit ) { 9440if ( style.indexOf( unit ) > 0 ) { 9441val = [ parseFloat( style ), unit ]; 9442} 9443}); 9444return val; 9445} 9446}); 9447})(); 9448(function() { 9449var baseEasings = {}; 9450$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { 9451baseEasings[ name ] = function( p ) { 9452return Math.pow( p, i + 2 ); 9453}; 9454}); 9455$.extend( baseEasings, { 9456Sine: function( p ) { 9457return 1 - Math.cos( p * Math.PI / 2 ); 9458}, 9459Circ: function( p ) { 9460return 1 - Math.sqrt( 1 - p * p ); 9461}, 9462Elastic: function( p ) { 9463return p === 0 || p === 1 ? p : 9464-Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 ); 9465}, 9466Back: function( p ) { 9467return p * p * ( 3 * p - 2 ); 9468}, 9469Bounce: function( p ) { 9470var pow2, 9471bounce = 4; 9472while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} 9473return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); 9474} 9475}); 9476$.each( baseEasings, function( name, easeIn ) { 9477$.easing[ "easeIn" + name ] = easeIn; 9478$.easing[ "easeOut" + name ] = function( p ) { 9479return 1 - easeIn( 1 - p ); 9480}; 9481$.easing[ "easeInOut" + name ] = function( p ) { 9482return p < 0.5 ? 9483easeIn( p * 2 ) / 2 : 94841 - easeIn( p * -2 + 2 ) / 2; 9485}; 9486}); 9487})(); 9488var effect = $.effects; 9489var effectBlind = $.effects.effect.blind = function( o, done ) { 9490var el = $( this ), 9491rvertical = /up|down|vertical/, 9492rpositivemotion = /up|left|vertical|horizontal/, 9493props = [ "position", "top", "bottom", "left", "right", "height", "width" ], 9494mode = $.effects.setMode( el, o.mode || "hide" ), 9495direction = o.direction || "up", 9496vertical = rvertical.test( direction ), 9497ref = vertical ? "height" : "width", 9498ref2 = vertical ? "top" : "left", 9499motion = rpositivemotion.test( direction ), 9500animation = {}, 9501show = mode === "show", 9502wrapper, distance, margin; 9503if ( el.parent().is( ".ui-effects-wrapper" ) ) { 9504$.effects.save( el.parent(), props ); 9505} else { 9506$.effects.save( el, props ); 9507} 9508el.show(); 9509wrapper = $.effects.createWrapper( el ).css({ 9510overflow: "hidden" 9511}); 9512distance = wrapper[ ref ](); 9513margin = parseFloat( wrapper.css( ref2 ) ) || 0; 9514animation[ ref ] = show ? distance : 0; 9515if ( !motion ) { 9516el 9517.css( vertical ? "bottom" : "right", 0 ) 9518.css( vertical ? "top" : "left", "auto" ) 9519.css({ position: "absolute" }); 9520animation[ ref2 ] = show ? margin : distance + margin; 9521} 9522if ( show ) { 9523wrapper.css( ref, 0 ); 9524if ( !motion ) { 9525wrapper.css( ref2, margin + distance ); 9526} 9527} 9528wrapper.animate( animation, { 9529duration: o.duration, 9530easing: o.easing, 9531queue: false, 9532complete: function() { 9533if ( mode === "hide" ) { 9534el.hide(); 9535} 9536$.effects.restore( el, props ); 9537$.effects.removeWrapper( el ); 9538done(); 9539} 9540}); 9541}; 9542var effectBounce = $.effects.effect.bounce = function( o, done ) { 9543var el = $( this ), 9544props = [ "position", "top", "bottom", "left", "right", "height", "width" ], 9545mode = $.effects.setMode( el, o.mode || "effect" ), 9546hide = mode === "hide", 9547show = mode === "show", 9548direction = o.direction || "up", 9549distance = o.distance, 9550times = o.times || 5, 9551anims = times * 2 + ( show || hide ? 1 : 0 ), 9552speed = o.duration / anims, 9553easing = o.easing, 9554ref = ( direction === "up" || direction === "down" ) ? "top" : "left", 9555motion = ( direction === "up" || direction === "left" ), 9556i, 9557upAnim, 9558downAnim, 9559queue = el.queue(), 9560queuelen = queue.length; 9561if ( show || hide ) { 9562props.push( "opacity" ); 9563} 9564$.effects.save( el, props ); 9565el.show(); 9566$.effects.createWrapper( el ); // Create Wrapper 9567if ( !distance ) { 9568distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3; 9569} 9570if ( show ) { 9571downAnim = { opacity: 1 }; 9572downAnim[ ref ] = 0; 9573el.css( "opacity", 0 ) 9574.css( ref, motion ? -distance * 2 : distance * 2 ) 9575.animate( downAnim, speed, easing ); 9576} 9577if ( hide ) { 9578distance = distance / Math.pow( 2, times - 1 ); 9579} 9580downAnim = {}; 9581downAnim[ ref ] = 0; 9582for ( i = 0; i < times; i++ ) { 9583upAnim = {}; 9584upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; 9585el.animate( upAnim, speed, easing ) 9586.animate( downAnim, speed, easing ); 9587distance = hide ? distance * 2 : distance / 2; 9588} 9589if ( hide ) { 9590upAnim = { opacity: 0 }; 9591upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; 9592el.animate( upAnim, speed, easing ); 9593} 9594el.queue(function() { 9595if ( hide ) { 9596el.hide(); 9597} 9598$.effects.restore( el, props ); 9599$.effects.removeWrapper( el ); 9600done(); 9601}); 9602if ( queuelen > 1) { 9603queue.splice.apply( queue, 9604[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); 9605} 9606el.dequeue(); 9607}; 9608var effectClip = $.effects.effect.clip = function( o, done ) { 9609var el = $( this ), 9610props = [ "position", "top", "bottom", "left", "right", "height", "width" ], 9611mode = $.effects.setMode( el, o.mode || "hide" ), 9612show = mode === "show", 9613direction = o.direction || "vertical", 9614vert = direction === "vertical", 9615size = vert ? "height" : "width", 9616position = vert ? "top" : "left", 9617animation = {}, 9618wrapper, animate, distance; 9619$.effects.save( el, props ); 9620el.show(); 9621wrapper = $.effects.createWrapper( el ).css({ 9622overflow: "hidden" 9623}); 9624animate = ( el[0].tagName === "IMG" ) ? wrapper : el; 9625distance = animate[ size ](); 9626if ( show ) { 9627animate.css( size, 0 ); 9628animate.css( position, distance / 2 ); 9629} 9630animation[ size ] = show ? distance : 0; 9631animation[ position ] = show ? 0 : distance / 2; 9632animate.animate( animation, { 9633queue: false, 9634duration: o.duration, 9635easing: o.easing, 9636complete: function() { 9637if ( !show ) { 9638el.hide(); 9639} 9640$.effects.restore( el, props ); 9641$.effects.removeWrapper( el ); 9642done(); 9643} 9644}); 9645}; 9646var effectDrop = $.effects.effect.drop = function( o, done ) { 9647var el = $( this ), 9648props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ], 9649mode = $.effects.setMode( el, o.mode || "hide" ), 9650show = mode === "show", 9651direction = o.direction || "left", 9652ref = ( direction === "up" || direction === "down" ) ? "top" : "left", 9653motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg", 9654animation = { 9655opacity: show ? 1 : 0 9656}, 9657distance; 9658$.effects.save( el, props ); 9659el.show(); 9660$.effects.createWrapper( el ); 9661distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2; 9662if ( show ) { 9663el 9664.css( "opacity", 0 ) 9665.css( ref, motion === "pos" ? -distance : distance ); 9666} 9667animation[ ref ] = ( show ? 9668( motion === "pos" ? "+=" : "-=" ) : 9669( motion === "pos" ? "-=" : "+=" ) ) + 9670distance; 9671el.animate( animation, { 9672queue: false, 9673duration: o.duration, 9674easing: o.easing, 9675complete: function() { 9676if ( mode === "hide" ) { 9677el.hide(); 9678} 9679$.effects.restore( el, props ); 9680$.effects.removeWrapper( el ); 9681done(); 9682} 9683}); 9684}; 9685var effectExplode = $.effects.effect.explode = function( o, done ) { 9686var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3, 9687cells = rows, 9688el = $( this ), 9689mode = $.effects.setMode( el, o.mode || "hide" ), 9690show = mode === "show", 9691offset = el.show().css( "visibility", "hidden" ).offset(), 9692width = Math.ceil( el.outerWidth() / cells ), 9693height = Math.ceil( el.outerHeight() / rows ), 9694pieces = [], 9695i, j, left, top, mx, my; 9696function childComplete() { 9697pieces.push( this ); 9698if ( pieces.length === rows * cells ) { 9699animComplete(); 9700} 9701} 9702for ( i = 0; i < rows ; i++ ) { // ===> 9703top = offset.top + i * height; 9704my = i - ( rows - 1 ) / 2 ; 9705for ( j = 0; j < cells ; j++ ) { // ||| 9706left = offset.left + j * width; 9707mx = j - ( cells - 1 ) / 2 ; 9708el 9709.clone() 9710.appendTo( "body" ) 9711.wrap( "<div></div>" ) 9712.css({ 9713position: "absolute", 9714visibility: "visible", 9715left: -j * width, 9716top: -i * height 9717}) 9718.parent() 9719.addClass( "ui-effects-explode" ) 9720.css({ 9721position: "absolute", 9722overflow: "hidden", 9723width: width, 9724height: height, 9725left: left + ( show ? mx * width : 0 ), 9726top: top + ( show ? my * height : 0 ), 9727opacity: show ? 0 : 1 9728}).animate({ 9729left: left + ( show ? 0 : mx * width ), 9730top: top + ( show ? 0 : my * height ), 9731opacity: show ? 1 : 0 9732}, o.duration || 500, o.easing, childComplete ); 9733} 9734} 9735function animComplete() { 9736el.css({ 9737visibility: "visible" 9738}); 9739$( pieces ).remove(); 9740if ( !show ) { 9741el.hide(); 9742} 9743done(); 9744} 9745}; 9746var effectFade = $.effects.effect.fade = function( o, done ) { 9747var el = $( this ), 9748mode = $.effects.setMode( el, o.mode || "toggle" ); 9749el.animate({ 9750opacity: mode 9751}, { 9752queue: false, 9753duration: o.duration, 9754easing: o.easing, 9755complete: done 9756}); 9757}; 9758var effectFold = $.effects.effect.fold = function( o, done ) { 9759var el = $( this ), 9760props = [ "position", "top", "bottom", "left", "right", "height", "width" ], 9761mode = $.effects.setMode( el, o.mode || "hide" ), 9762show = mode === "show", 9763hide = mode === "hide", 9764size = o.size || 15, 9765percent = /([0-9]+)%/.exec( size ), 9766horizFirst = !!o.horizFirst, 9767widthFirst = show !== horizFirst, 9768ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ], 9769duration = o.duration / 2, 9770wrapper, distance, 9771animation1 = {}, 9772animation2 = {}; 9773$.effects.save( el, props ); 9774el.show(); 9775wrapper = $.effects.createWrapper( el ).css({ 9776overflow: "hidden" 9777}); 9778distance = widthFirst ? 9779[ wrapper.width(), wrapper.height() ] : 9780[ wrapper.height(), wrapper.width() ]; 9781if ( percent ) { 9782size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ]; 9783} 9784if ( show ) { 9785wrapper.css( horizFirst ? { 9786height: 0, 9787width: size 9788} : { 9789height: size, 9790width: 0 9791}); 9792} 9793animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size; 9794animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0; 9795wrapper 9796.animate( animation1, duration, o.easing ) 9797.animate( animation2, duration, o.easing, function() { 9798if ( hide ) { 9799el.hide(); 9800} 9801$.effects.restore( el, props ); 9802$.effects.removeWrapper( el ); 9803done(); 9804}); 9805}; 9806var effectHighlight = $.effects.effect.highlight = function( o, done ) { 9807var elem = $( this ), 9808props = [ "backgroundImage", "backgroundColor", "opacity" ], 9809mode = $.effects.setMode( elem, o.mode || "show" ), 9810animation = { 9811backgroundColor: elem.css( "backgroundColor" ) 9812}; 9813if (mode === "hide") { 9814animation.opacity = 0; 9815} 9816$.effects.save( elem, props ); 9817elem 9818.show() 9819.css({ 9820backgroundImage: "none", 9821backgroundColor: o.color || "#ffff99" 9822}) 9823.animate( animation, { 9824queue: false, 9825duration: o.duration, 9826easing: o.easing, 9827complete: function() { 9828if ( mode === "hide" ) { 9829elem.hide(); 9830} 9831$.effects.restore( elem, props ); 9832done(); 9833} 9834}); 9835}; 9836var effectSize = $.effects.effect.size = function( o, done ) { 9837var original, baseline, factor, 9838el = $( this ), 9839props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ], 9840props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ], 9841props2 = [ "width", "height", "overflow" ], 9842cProps = [ "fontSize" ], 9843vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ], 9844hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ], 9845mode = $.effects.setMode( el, o.mode || "effect" ), 9846restore = o.restore || mode !== "effect", 9847scale = o.scale || "both", 9848origin = o.origin || [ "middle", "center" ], 9849position = el.css( "position" ), 9850props = restore ? props0 : props1, 9851zero = { 9852height: 0, 9853width: 0, 9854outerHeight: 0, 9855outerWidth: 0 9856}; 9857if ( mode === "show" ) { 9858el.show(); 9859} 9860original = { 9861height: el.height(), 9862width: el.width(), 9863outerHeight: el.outerHeight(), 9864outerWidth: el.outerWidth() 9865}; 9866if ( o.mode === "toggle" && mode === "show" ) { 9867el.from = o.to || zero; 9868el.to = o.from || original; 9869} else { 9870el.from = o.from || ( mode === "show" ? zero : original ); 9871el.to = o.to || ( mode === "hide" ? zero : original ); 9872} 9873factor = { 9874from: { 9875y: el.from.height / original.height, 9876x: el.from.width / original.width 9877}, 9878to: { 9879y: el.to.height / original.height, 9880x: el.to.width / original.width 9881} 9882}; 9883if ( scale === "box" || scale === "both" ) { 9884if ( factor.from.y !== factor.to.y ) { 9885props = props.concat( vProps ); 9886el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from ); 9887el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to ); 9888} 9889if ( factor.from.x !== factor.to.x ) { 9890props = props.concat( hProps ); 9891el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from ); 9892el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to ); 9893} 9894} 9895if ( scale === "content" || scale === "both" ) { 9896if ( factor.from.y !== factor.to.y ) { 9897props = props.concat( cProps ).concat( props2 ); 9898el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from ); 9899el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to ); 9900} 9901} 9902$.effects.save( el, props ); 9903el.show(); 9904$.effects.createWrapper( el ); 9905el.css( "overflow", "hidden" ).css( el.from ); 9906if (origin) { // Calculate baseline shifts 9907baseline = $.effects.getBaseline( origin, original ); 9908el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y; 9909el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x; 9910el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y; 9911el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x; 9912} 9913el.css( el.from ); // set top & left 9914if ( scale === "content" || scale === "both" ) { // Scale the children 9915vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps); 9916hProps = hProps.concat([ "marginLeft", "marginRight" ]); 9917props2 = props0.concat(vProps).concat(hProps); 9918el.find( "*[width]" ).each( function() { 9919var child = $( this ), 9920c_original = { 9921height: child.height(), 9922width: child.width(), 9923outerHeight: child.outerHeight(), 9924outerWidth: child.outerWidth() 9925}; 9926if (restore) { 9927$.effects.save(child, props2); 9928} 9929child.from = { 9930height: c_original.height * factor.from.y, 9931width: c_original.width * factor.from.x, 9932outerHeight: c_original.outerHeight * factor.from.y, 9933outerWidth: c_original.outerWidth * factor.from.x 9934}; 9935child.to = { 9936height: c_original.height * factor.to.y, 9937width: c_original.width * factor.to.x, 9938outerHeight: c_original.height * factor.to.y, 9939outerWidth: c_original.width * factor.to.x 9940}; 9941if ( factor.from.y !== factor.to.y ) { 9942child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from ); 9943child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to ); 9944} 9945if ( factor.from.x !== factor.to.x ) { 9946child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from ); 9947child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to ); 9948} 9949child.css( child.from ); 9950child.animate( child.to, o.duration, o.easing, function() { 9951if ( restore ) { 9952$.effects.restore( child, props2 ); 9953} 9954}); 9955}); 9956} 9957el.animate( el.to, { 9958queue: false, 9959duration: o.duration, 9960easing: o.easing, 9961complete: function() { 9962if ( el.to.opacity === 0 ) { 9963el.css( "opacity", el.from.opacity ); 9964} 9965if ( mode === "hide" ) { 9966el.hide(); 9967} 9968$.effects.restore( el, props ); 9969if ( !restore ) { 9970if ( position === "static" ) { 9971el.css({ 9972position: "relative", 9973top: el.to.top, 9974left: el.to.left 9975}); 9976} else { 9977$.each([ "top", "left" ], function( idx, pos ) { 9978el.css( pos, function( _, str ) { 9979var val = parseInt( str, 10 ), 9980toRef = idx ? el.to.left : el.to.top; 9981if ( str === "auto" ) { 9982return toRef + "px"; 9983} 9984return val + toRef + "px"; 9985}); 9986}); 9987} 9988} 9989$.effects.removeWrapper( el ); 9990done(); 9991} 9992}); 9993}; 9994var effectScale = $.effects.effect.scale = function( o, done ) { 9995var el = $( this ), 9996options = $.extend( true, {}, o ), 9997mode = $.effects.setMode( el, o.mode || "effect" ), 9998percent = parseInt( o.percent, 10 ) || 9999( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ), 10000direction = o.direction || "both", 10001origin = o.origin, 10002original = { 10003height: el.height(), 10004width: el.width(), 10005outerHeight: el.outerHeight(), 10006outerWidth: el.outerWidth() 10007}, 10008factor = { 10009y: direction !== "horizontal" ? (percent / 100) : 1, 10010x: direction !== "vertical" ? (percent / 100) : 1 10011}; 10012options.effect = "size"; 10013options.queue = false; 10014options.complete = done; 10015if ( mode !== "effect" ) { 10016options.origin = origin || [ "middle", "center" ]; 10017options.restore = true; 10018} 10019options.from = o.from || ( mode === "show" ? { 10020height: 0, 10021width: 0, 10022outerHeight: 0, 10023outerWidth: 0 10024} : original ); 10025options.to = { 10026height: original.height * factor.y, 10027width: original.width * factor.x, 10028outerHeight: original.outerHeight * factor.y, 10029outerWidth: original.outerWidth * factor.x 10030}; 10031if ( options.fade ) { 10032if ( mode === "show" ) { 10033options.from.opacity = 0; 10034options.to.opacity = 1; 10035} 10036if ( mode === "hide" ) { 10037options.from.opacity = 1; 10038options.to.opacity = 0; 10039} 10040} 10041el.effect( options ); 10042}; 10043var effectPuff = $.effects.effect.puff = function( o, done ) { 10044var elem = $( this ), 10045mode = $.effects.setMode( elem, o.mode || "hide" ), 10046hide = mode === "hide", 10047percent = parseInt( o.percent, 10 ) || 150, 10048factor = percent / 100, 10049original = { 10050height: elem.height(), 10051width: elem.width(), 10052outerHeight: elem.outerHeight(), 10053outerWidth: elem.outerWidth() 10054}; 10055$.extend( o, { 10056effect: "scale", 10057queue: false, 10058fade: true, 10059mode: mode, 10060complete: done, 10061percent: hide ? percent : 100, 10062from: hide ? 10063original : 10064{ 10065height: original.height * factor, 10066width: original.width * factor, 10067outerHeight: original.outerHeight * factor, 10068outerWidth: original.outerWidth * factor 10069} 10070}); 10071elem.effect( o ); 10072}; 10073var effectPulsate = $.effects.effect.pulsate = function( o, done ) { 10074var elem = $( this ), 10075mode = $.effects.setMode( elem, o.mode || "show" ), 10076show = mode === "show", 10077hide = mode === "hide", 10078showhide = ( show || mode === "hide" ), 10079anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ), 10080duration = o.duration / anims, 10081animateTo = 0, 10082queue = elem.queue(), 10083queuelen = queue.length, 10084i; 10085if ( show || !elem.is(":visible")) { 10086elem.css( "opacity", 0 ).show(); 10087animateTo = 1; 10088} 10089for ( i = 1; i < anims; i++ ) { 10090elem.animate({ 10091opacity: animateTo 10092}, duration, o.easing ); 10093animateTo = 1 - animateTo; 10094} 10095elem.animate({ 10096opacity: animateTo 10097}, duration, o.easing); 10098elem.queue(function() { 10099if ( hide ) { 10100elem.hide(); 10101} 10102done(); 10103}); 10104if ( queuelen > 1 ) { 10105queue.splice.apply( queue, 10106[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); 10107} 10108elem.dequeue(); 10109}; 10110var effectShake = $.effects.effect.shake = function( o, done ) { 10111var el = $( this ), 10112props = [ "position", "top", "bottom", "left", "right", "height", "width" ], 10113mode = $.effects.setMode( el, o.mode || "effect" ), 10114direction = o.direction || "left", 10115distance = o.distance || 20, 10116times = o.times || 3, 10117anims = times * 2 + 1, 10118speed = Math.round( o.duration / anims ), 10119ref = (direction === "up" || direction === "down") ? "top" : "left", 10120positiveMotion = (direction === "up" || direction === "left"), 10121animation = {}, 10122animation1 = {}, 10123animation2 = {}, 10124i, 10125queue = el.queue(), 10126queuelen = queue.length; 10127$.effects.save( el, props ); 10128el.show(); 10129$.effects.createWrapper( el ); 10130animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance; 10131animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2; 10132animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2; 10133el.animate( animation, speed, o.easing ); 10134for ( i = 1; i < times; i++ ) { 10135el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing ); 10136} 10137el 10138.animate( animation1, speed, o.easing ) 10139.animate( animation, speed / 2, o.easing ) 10140.queue(function() { 10141if ( mode === "hide" ) { 10142el.hide(); 10143} 10144$.effects.restore( el, props ); 10145$.effects.removeWrapper( el ); 10146done(); 10147}); 10148if ( queuelen > 1) { 10149queue.splice.apply( queue, 10150[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); 10151} 10152el.dequeue(); 10153}; 10154var effectSlide = $.effects.effect.slide = function( o, done ) { 10155var el = $( this ), 10156props = [ "position", "top", "bottom", "left", "right", "width", "height" ], 10157mode = $.effects.setMode( el, o.mode || "show" ), 10158show = mode === "show", 10159direction = o.direction || "left", 10160ref = (direction === "up" || direction === "down") ? "top" : "left", 10161positiveMotion = (direction === "up" || direction === "left"), 10162distance, 10163animation = {}; 10164$.effects.save( el, props ); 10165el.show(); 10166distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ); 10167$.effects.createWrapper( el ).css({ 10168overflow: "hidden" 10169}); 10170if ( show ) { 10171el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance ); 10172} 10173animation[ ref ] = ( show ? 10174( positiveMotion ? "+=" : "-=") : 10175( positiveMotion ? "-=" : "+=")) + 10176distance; 10177el.animate( animation, { 10178queue: false, 10179duration: o.duration, 10180easing: o.easing, 10181complete: function() { 10182if ( mode === "hide" ) { 10183el.hide(); 10184} 10185$.effects.restore( el, props ); 10186$.effects.removeWrapper( el ); 10187done(); 10188} 10189}); 10190}; 10191var effectTransfer = $.effects.effect.transfer = function( o, done ) { 10192var elem = $( this ), 10193target = $( o.to ), 10194targetFixed = target.css( "position" ) === "fixed", 10195body = $("body"), 10196fixTop = targetFixed ? body.scrollTop() : 0, 10197fixLeft = targetFixed ? body.scrollLeft() : 0, 10198endPosition = target.offset(), 10199animation = { 10200top: endPosition.top - fixTop, 10201left: endPosition.left - fixLeft, 10202height: target.innerHeight(), 10203width: target.innerWidth() 10204}, 10205startPosition = elem.offset(), 10206transfer = $( "<div class='ui-effects-transfer'></div>" ) 10207.appendTo( document.body ) 10208.addClass( o.className ) 10209.css({ 10210top: startPosition.top - fixTop, 10211left: startPosition.left - fixLeft, 10212height: elem.innerHeight(), 10213width: elem.innerWidth(), 10214position: targetFixed ? "fixed" : "absolute" 10215}) 10216.animate( animation, o.duration, o.easing, function() { 10217transfer.remove(); 10218done(); 10219}); 10220}; 10221var progressbar = $.widget( "ui.progressbar", { 10222version: "1.11.4", 10223options: { 10224max: 100, 10225value: 0, 10226change: null, 10227complete: null 10228}, 10229min: 0, 10230_create: function() { 10231this.oldValue = this.options.value = this._constrainedValue(); 10232this.element 10233.addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" ) 10234.attr({ 10235role: "progressbar", 10236"aria-valuemin": this.min 10237}); 10238this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" ) 10239.appendTo( this.element ); 10240this._refreshValue(); 10241}, 10242_destroy: function() { 10243this.element 10244.removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" ) 10245.removeAttr( "role" ) 10246.removeAttr( "aria-valuemin" ) 10247.removeAttr( "aria-valuemax" ) 10248.removeAttr( "aria-valuenow" ); 10249this.valueDiv.remove(); 10250}, 10251value: function( newValue ) { 10252if ( newValue === undefined ) { 10253return this.options.value; 10254} 10255this.options.value = this._constrainedValue( newValue ); 10256this._refreshValue(); 10257}, 10258_constrainedValue: function( newValue ) { 10259if ( newValue === undefined ) { 10260newValue = this.options.value; 10261} 10262this.indeterminate = newValue === false; 10263if ( typeof newValue !== "number" ) { 10264newValue = 0; 10265} 10266return this.indeterminate ? false : 10267Math.min( this.options.max, Math.max( this.min, newValue ) ); 10268}, 10269_setOptions: function( options ) { 10270var value = options.value; 10271delete options.value; 10272this._super( options ); 10273this.options.value = this._constrainedValue( value ); 10274this._refreshValue(); 10275}, 10276_setOption: function( key, value ) { 10277if ( key === "max" ) { 10278value = Math.max( this.min, value ); 10279} 10280if ( key === "disabled" ) { 10281this.element 10282.toggleClass( "ui-state-disabled", !!value ) 10283.attr( "aria-disabled", value ); 10284} 10285this._super( key, value ); 10286}, 10287_percentage: function() { 10288return this.indeterminate ? 100 : 100 * ( this.options.value - this.min ) / ( this.options.max - this.min ); 10289}, 10290_refreshValue: function() { 10291var value = this.options.value, 10292percentage = this._percentage(); 10293this.valueDiv 10294.toggle( this.indeterminate || value > this.min ) 10295.toggleClass( "ui-corner-right", value === this.options.max ) 10296.width( percentage.toFixed(0) + "%" ); 10297this.element.toggleClass( "ui-progressbar-indeterminate", this.indeterminate ); 10298if ( this.indeterminate ) { 10299this.element.removeAttr( "aria-valuenow" ); 10300if ( !this.overlayDiv ) { 10301this.overlayDiv = $( "<div class='ui-progressbar-overlay'></div>" ).appendTo( this.valueDiv ); 10302} 10303} else { 10304this.element.attr({ 10305"aria-valuemax": this.options.max, 10306"aria-valuenow": value 10307}); 10308if ( this.overlayDiv ) { 10309this.overlayDiv.remove(); 10310this.overlayDiv = null; 10311} 10312} 10313if ( this.oldValue !== value ) { 10314this.oldValue = value; 10315this._trigger( "change" ); 10316} 10317if ( value === this.options.max ) { 10318this._trigger( "complete" ); 10319} 10320} 10321}); 10322var selectable = $.widget("ui.selectable", $.ui.mouse, { 10323version: "1.11.4", 10324options: { 10325appendTo: "body", 10326autoRefresh: true, 10327distance: 0, 10328filter: "*", 10329tolerance: "touch", 10330selected: null, 10331selecting: null, 10332start: null, 10333stop: null, 10334unselected: null, 10335unselecting: null 10336}, 10337_create: function() { 10338var selectees, 10339that = this; 10340this.element.addClass("ui-selectable"); 10341this.dragged = false; 10342this.refresh = function() { 10343selectees = $(that.options.filter, that.element[0]); 10344selectees.addClass("ui-selectee"); 10345selectees.each(function() { 10346var $this = $(this), 10347pos = $this.offset(); 10348$.data(this, "selectable-item", { 10349element: this, 10350$element: $this, 10351left: pos.left, 10352top: pos.top, 10353right: pos.left + $this.outerWidth(), 10354bottom: pos.top + $this.outerHeight(), 10355startselected: false, 10356selected: $this.hasClass("ui-selected"), 10357selecting: $this.hasClass("ui-selecting"), 10358unselecting: $this.hasClass("ui-unselecting") 10359}); 10360}); 10361}; 10362this.refresh(); 10363this.selectees = selectees.addClass("ui-selectee"); 10364this._mouseInit(); 10365this.helper = $("<div class='ui-selectable-helper'></div>"); 10366}, 10367_destroy: function() { 10368this.selectees 10369.removeClass("ui-selectee") 10370.removeData("selectable-item"); 10371this.element 10372.removeClass("ui-selectable ui-selectable-disabled"); 10373this._mouseDestroy(); 10374}, 10375_mouseStart: function(event) { 10376var that = this, 10377options = this.options; 10378this.opos = [ event.pageX, event.pageY ]; 10379if (this.options.disabled) { 10380return; 10381} 10382this.selectees = $(options.filter, this.element[0]); 10383this._trigger("start", event); 10384$(options.appendTo).append(this.helper); 10385this.helper.css({ 10386"left": event.pageX, 10387"top": event.pageY, 10388"width": 0, 10389"height": 0 10390}
vendor: 10,654 bytes, lines 10390-10818
10390); 10391if (options.autoRefresh) { 10392this.refresh(); 10393} 10394this.selectees.filter(".ui-selected").each(function() { 10395var selectee = $.data(this, "selectable-item"); 10396selectee.startselected = true; 10397if (!event.metaKey && !event.ctrlKey) { 10398selectee.$element.removeClass("ui-selected"); 10399selectee.selected = false; 10400selectee.$element.addClass("ui-unselecting"); 10401selectee.unselecting = true; 10402that._trigger("unselecting", event, { 10403unselecting: selectee.element 10404}); 10405} 10406}); 10407$(event.target).parents().addBack().each(function() { 10408var doSelect, 10409selectee = $.data(this, "selectable-item"); 10410if (selectee) { 10411doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass("ui-selected"); 10412selectee.$element 10413.removeClass(doSelect ? "ui-unselecting" : "ui-selected") 10414.addClass(doSelect ? "ui-selecting" : "ui-unselecting"); 10415selectee.unselecting = !doSelect; 10416selectee.selecting = doSelect; 10417selectee.selected = doSelect; 10418if (doSelect) { 10419that._trigger("selecting", event, { 10420selecting: selectee.element 10421}); 10422} else { 10423that._trigger("unselecting", event, { 10424unselecting: selectee.element 10425}); 10426} 10427return false; 10428} 10429}); 10430}, 10431_mouseDrag: function(event) { 10432this.dragged = true; 10433if (this.options.disabled) { 10434return; 10435} 10436var tmp, 10437that = this, 10438options = this.options, 10439x1 = this.opos[0], 10440y1 = this.opos[1], 10441x2 = event.pageX, 10442y2 = event.pageY; 10443if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; } 10444if (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; } 10445this.helper.css({ left: x1, top: y1, width: x2 - x1, height: y2 - y1 }); 10446this.selectees.each(function() { 10447var selectee = $.data(this, "selectable-item"), 10448hit = false; 10449if (!selectee || selectee.element === that.element[0]) { 10450return; 10451} 10452if (options.tolerance === "touch") { 10453hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) ); 10454} else if (options.tolerance === "fit") { 10455hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2); 10456} 10457if (hit) { 10458if (selectee.selected) { 10459selectee.$element.removeClass("ui-selected"); 10460selectee.selected = false; 10461} 10462if (selectee.unselecting) { 10463selectee.$element.removeClass("ui-unselecting"); 10464selectee.unselecting = false; 10465} 10466if (!selectee.selecting) { 10467selectee.$element.addClass("ui-selecting"); 10468selectee.selecting = true; 10469that._trigger("selecting", event, { 10470selecting: selectee.element 10471}); 10472} 10473} else { 10474if (selectee.selecting) { 10475if ((event.metaKey || event.ctrlKey) && selectee.startselected) { 10476selectee.$element.removeClass("ui-selecting"); 10477selectee.selecting = false; 10478selectee.$element.addClass("ui-selected"); 10479selectee.selected = true; 10480} else { 10481selectee.$element.removeClass("ui-selecting"); 10482selectee.selecting = false; 10483if (selectee.startselected) { 10484selectee.$element.addClass("ui-unselecting"); 10485selectee.unselecting = true; 10486} 10487that._trigger("unselecting", event, { 10488unselecting: selectee.element 10489}); 10490} 10491} 10492if (selectee.selected) { 10493if (!event.metaKey && !event.ctrlKey && !selectee.startselected) { 10494selectee.$element.removeClass("ui-selected"); 10495selectee.selected = false; 10496selectee.$element.addClass("ui-unselecting"); 10497selectee.unselecting = true; 10498that._trigger("unselecting", event, { 10499unselecting: selectee.element 10500}); 10501} 10502} 10503} 10504}); 10505return false; 10506}, 10507_mouseStop: function(event) { 10508var that = this; 10509this.dragged = false; 10510$(".ui-unselecting", this.element[0]).each(function() { 10511var selectee = $.data(this, "selectable-item"); 10512selectee.$element.removeClass("ui-unselecting"); 10513selectee.unselecting = false; 10514selectee.startselected = false; 10515that._trigger("unselected", event, { 10516unselected: selectee.element 10517}); 10518}); 10519$(".ui-selecting", this.element[0]).each(function() { 10520var selectee = $.data(this, "selectable-item"); 10521selectee.$element.removeClass("ui-selecting").addClass("ui-selected"); 10522selectee.selecting = false; 10523selectee.selected = true; 10524selectee.startselected = true; 10525that._trigger("selected", event, { 10526selected: selectee.element 10527}); 10528}); 10529this._trigger("stop", event); 10530this.helper.remove(); 10531return false; 10532} 10533}); 10534var selectmenu = $.widget( "ui.selectmenu", { 10535version: "1.11.4", 10536defaultElement: "<select>", 10537options: { 10538appendTo: null, 10539disabled: null, 10540icons: { 10541button: "ui-icon-triangle-1-s" 10542}, 10543position: { 10544my: "left top", 10545at: "left bottom", 10546collision: "none" 10547}, 10548width: null, 10549change: null, 10550close: null, 10551focus: null, 10552open: null, 10553select: null 10554}, 10555_create: function() { 10556var selectmenuId = this.element.uniqueId().attr( "id" ); 10557this.ids = { 10558element: selectmenuId, 10559button: selectmenuId + "-button", 10560menu: selectmenuId + "-menu" 10561}; 10562this._drawButton(); 10563this._drawMenu(); 10564if ( this.options.disabled ) { 10565this.disable(); 10566} 10567}, 10568_drawButton: function() { 10569var that = this; 10570this.label = $( "label[for='" + this.ids.element + "']" ).attr( "for", this.ids.button ); 10571this._on( this.label, { 10572click: function( event ) { 10573this.button.focus(); 10574event.preventDefault(); 10575} 10576}); 10577this.element.hide(); 10578this.button = $( "<span>", { 10579"class": "ui-selectmenu-button ui-widget ui-state-default ui-corner-all", 10580tabindex: this.options.disabled ? -1 : 0, 10581id: this.ids.button, 10582role: "combobox", 10583"aria-expanded": "false", 10584"aria-autocomplete": "list", 10585"aria-owns": this.ids.menu, 10586"aria-haspopup": "true" 10587}) 10588.insertAfter( this.element ); 10589$( "<span>", { 10590"class": "ui-icon " + this.options.icons.button 10591}) 10592.prependTo( this.button ); 10593this.buttonText = $( "<span>", { 10594"class": "ui-selectmenu-text" 10595}) 10596.appendTo( this.button ); 10597this._setText( this.buttonText, this.element.find( "option:selected" ).text() ); 10598this._resizeButton(); 10599this._on( this.button, this._buttonEvents ); 10600this.button.one( "focusin", function() { 10601if ( !that.menuItems ) { 10602that._refreshMenu(); 10603} 10604}); 10605this._hoverable( this.button ); 10606this._focusable( this.button ); 10607}, 10608_drawMenu: function() { 10609var that = this; 10610this.menu = $( "<ul>", { 10611"aria-hidden": "true", 10612"aria-labelledby": this.ids.button, 10613id: this.ids.menu 10614}); 10615this.menuWrap = $( "<div>", { 10616"class": "ui-selectmenu-menu ui-front" 10617}) 10618.append( this.menu ) 10619.appendTo( this._appendTo() ); 10620this.menuInstance = this.menu 10621.menu({ 10622role: "listbox", 10623select: function( event, ui ) { 10624event.preventDefault(); 10625that._setSelection(); 10626that._select( ui.item.data( "ui-selectmenu-item" ), event ); 10627}, 10628focus: function( event, ui ) { 10629var item = ui.item.data( "ui-selectmenu-item" ); 10630if ( that.focusIndex != null && item.index !== that.focusIndex ) { 10631that._trigger( "focus", event, { item: item } ); 10632if ( !that.isOpen ) { 10633that._select( item, event ); 10634} 10635} 10636that.focusIndex = item.index; 10637that.button.attr( "aria-activedescendant", 10638that.menuItems.eq( item.index ).attr( "id" ) ); 10639} 10640}) 10641.menu( "instance" ); 10642this.menu 10643.addClass( "ui-corner-bottom" ) 10644.removeClass( "ui-corner-all" ); 10645this.menuInstance._off( this.menu, "mouseleave" ); 10646this.menuInstance._closeOnDocumentClick = function() { 10647return false; 10648}; 10649this.menuInstance._isDivider = function() { 10650return false; 10651}; 10652}, 10653refresh: function() { 10654this._refreshMenu(); 10655this._setText( this.buttonText, this._getSelectedItem().text() ); 10656if ( !this.options.width ) { 10657this._resizeButton(); 10658} 10659}, 10660_refreshMenu: function() { 10661this.menu.empty(); 10662var item, 10663options = this.element.find( "option" ); 10664if ( !options.length ) { 10665return; 10666} 10667this._parseOptions( options ); 10668this._renderMenu( this.menu, this.items ); 10669this.menuInstance.refresh(); 10670this.menuItems = this.menu.find( "li" ).not( ".ui-selectmenu-optgroup" ); 10671item = this._getSelectedItem(); 10672this.menuInstance.focus( null, item ); 10673this._setAria( item.data( "ui-selectmenu-item" ) ); 10674this._setOption( "disabled", this.element.prop( "disabled" ) ); 10675}, 10676open: function( event ) { 10677if ( this.options.disabled ) { 10678return; 10679} 10680if ( !this.menuItems ) { 10681this._refreshMenu(); 10682} else { 10683this.menu.find( ".ui-state-focus" ).removeClass( "ui-state-focus" ); 10684this.menuInstance.focus( null, this._getSelectedItem() ); 10685} 10686this.isOpen = true; 10687this._toggleAttr(); 10688this._resizeMenu(); 10689this._position(); 10690this._on( this.document, this._documentClick ); 10691this._trigger( "open", event ); 10692}, 10693_position: function() { 10694this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) ); 10695}, 10696close: function( event ) { 10697if ( !this.isOpen ) { 10698return; 10699} 10700this.isOpen = false; 10701this._toggleAttr(); 10702this.range = null; 10703this._off( this.document ); 10704this._trigger( "close", event ); 10705}, 10706widget: function() { 10707return this.button; 10708}, 10709menuWidget: function() { 10710return this.menu; 10711}, 10712_renderMenu: function( ul, items ) { 10713var that = this, 10714currentOptgroup = ""; 10715$.each( items, function( index, item ) { 10716if ( item.optgroup !== currentOptgroup ) { 10717$( "<li>", { 10718"class": "ui-selectmenu-optgroup ui-menu-divider" + 10719( item.element.parent( "optgroup" ).prop( "disabled" ) ? 10720" ui-state-disabled" : 10721"" ), 10722text: item.optgroup 10723}) 10724.appendTo( ul ); 10725currentOptgroup = item.optgroup; 10726} 10727that._renderItemData( ul, item ); 10728}); 10729}, 10730_renderItemData: function( ul, item ) { 10731return this._renderItem( ul, item ).data( "ui-selectmenu-item", item ); 10732}, 10733_renderItem: function( ul, item ) { 10734var li = $( "<li>" ); 10735if ( item.disabled ) { 10736li.addClass( "ui-state-disabled" ); 10737} 10738this._setText( li, item.label ); 10739return li.appendTo( ul ); 10740}, 10741_setText: function( element, value ) { 10742if ( value ) { 10743element.text( value ); 10744} else { 10745element.html( " " ); 10746} 10747}, 10748_move: function( direction, event ) { 10749var item, next, 10750filter = ".ui-menu-item"; 10751if ( this.isOpen ) { 10752item = this.menuItems.eq( this.focusIndex ); 10753} else { 10754item = this.menuItems.eq( this.element[ 0 ].selectedIndex ); 10755filter += ":not(.ui-state-disabled)"; 10756} 10757if ( direction === "first" || direction === "last" ) { 10758next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 ); 10759} else { 10760next = item[ direction + "All" ]( filter ).eq( 0 ); 10761} 10762if ( next.length ) { 10763this.menuInstance.focus( event, next ); 10764} 10765}, 10766_getSelectedItem: function() { 10767return this.menuItems.eq( this.element[ 0 ].selectedIndex ); 10768}, 10769_toggle: function( event ) { 10770this[ this.isOpen ? "close" : "open" ]( event ); 10771}, 10772_setSelection: function() { 10773var selection; 10774if ( !this.range ) { 10775return; 10776} 10777if ( window.getSelection ) { 10778selection = window.getSelection(); 10779selection.removeAllRanges(); 10780selection.addRange( this.range ); 10781} else { 10782this.range.select(); 10783} 10784this.button.focus(); 10785}, 10786_documentClick: { 10787mousedown: function( event ) { 10788if ( !this.isOpen ) { 10789return; 10790} 10791if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" + this.ids.button ).length ) { 10792this.close( event ); 10793} 10794} 10795}, 10796_buttonEvents: { 10797mousedown: function() { 10798var selection; 10799if ( window.getSelection ) { 10800selection = window.getSelection(); 10801if ( selection.rangeCount ) { 10802this.range = selection.getRangeAt( 0 ); 10803} 10804} else { 10805this.range = document.selection.createRange(); 10806} 10807}, 10808click: function( event ) { 10809this._setSelection(); 10810this._toggle( event ); 10811}, 10812keydown: function( event ) { 10813var preventDefault = true; 10814switch ( event.keyCode ) { 10815case $.ui.keyCode.TAB: 10816case $.ui.keyCode.ESCAPE: 10817this.close( event ); 10818preventDefault = false;
vendor: 13,445 bytes, lines 10819-11344
10819break; 10820case $.ui.keyCode.ENTER: 10821if ( this.isOpen ) { 10822this._selectFocusedItem( event ); 10823} 10824break; 10825case $.ui.keyCode.UP: 10826if ( event.altKey ) { 10827this._toggle( event ); 10828} else { 10829this._move( "prev", event ); 10830} 10831break; 10832case $.ui.keyCode.DOWN: 10833if ( event.altKey ) { 10834this._toggle( event ); 10835} else { 10836this._move( "next", event ); 10837} 10838break; 10839case $.ui.keyCode.SPACE: 10840if ( this.isOpen ) { 10841this._selectFocusedItem( event ); 10842} else { 10843this._toggle( event ); 10844} 10845break; 10846case $.ui.keyCode.LEFT: 10847this._move( "prev", event ); 10848break; 10849case $.ui.keyCode.RIGHT: 10850this._move( "next", event ); 10851break; 10852case $.ui.keyCode.HOME: 10853case $.ui.keyCode.PAGE_UP: 10854this._move( "first", event ); 10855break; 10856case $.ui.keyCode.END: 10857case $.ui.keyCode.PAGE_DOWN: 10858this._move( "last", event ); 10859break; 10860default: 10861this.menu.trigger( event ); 10862preventDefault = false; 10863} 10864if ( preventDefault ) { 10865event.preventDefault(); 10866} 10867} 10868}, 10869_selectFocusedItem: function( event ) { 10870var item = this.menuItems.eq( this.focusIndex ); 10871if ( !item.hasClass( "ui-state-disabled" ) ) { 10872this._select( item.data( "ui-selectmenu-item" ), event ); 10873} 10874}, 10875_select: function( item, event ) { 10876var oldIndex = this.element[ 0 ].selectedIndex; 10877this.element[ 0 ].selectedIndex = item.index; 10878this._setText( this.buttonText, item.label ); 10879this._setAria( item ); 10880this._trigger( "select", event, { item: item } ); 10881if ( item.index !== oldIndex ) { 10882this._trigger( "change", event, { item: item } ); 10883} 10884this.close( event ); 10885}, 10886_setAria: function( item ) { 10887var id = this.menuItems.eq( item.index ).attr( "id" ); 10888this.button.attr({ 10889"aria-labelledby": id, 10890"aria-activedescendant": id 10891}); 10892this.menu.attr( "aria-activedescendant", id ); 10893}, 10894_setOption: function( key, value ) { 10895if ( key === "icons" ) { 10896this.button.find( "span.ui-icon" ) 10897.removeClass( this.options.icons.button ) 10898.addClass( value.button ); 10899} 10900this._super( key, value ); 10901if ( key === "appendTo" ) { 10902this.menuWrap.appendTo( this._appendTo() ); 10903} 10904if ( key === "disabled" ) { 10905this.menuInstance.option( "disabled", value ); 10906this.button 10907.toggleClass( "ui-state-disabled", value ) 10908.attr( "aria-disabled", value ); 10909this.element.prop( "disabled", value ); 10910if ( value ) { 10911this.button.attr( "tabindex", -1 ); 10912this.close(); 10913} else { 10914this.button.attr( "tabindex", 0 ); 10915} 10916} 10917if ( key === "width" ) { 10918this._resizeButton(); 10919} 10920}, 10921_appendTo: function() { 10922var element = this.options.appendTo; 10923if ( element ) { 10924element = element.jquery || element.nodeType ? 10925$( element ) : 10926this.document.find( element ).eq( 0 ); 10927} 10928if ( !element || !element[ 0 ] ) { 10929element = this.element.closest( ".ui-front" ); 10930} 10931if ( !element.length ) { 10932element = this.document[ 0 ].body; 10933} 10934return element; 10935}, 10936_toggleAttr: function() { 10937this.button 10938.toggleClass( "ui-corner-top", this.isOpen ) 10939.toggleClass( "ui-corner-all", !this.isOpen ) 10940.attr( "aria-expanded", this.isOpen ); 10941this.menuWrap.toggleClass( "ui-selectmenu-open", this.isOpen ); 10942this.menu.attr( "aria-hidden", !this.isOpen ); 10943}, 10944_resizeButton: function() { 10945var width = this.options.width; 10946if ( !width ) { 10947width = this.element.show().outerWidth(); 10948this.element.hide(); 10949} 10950this.button.outerWidth( width ); 10951}, 10952_resizeMenu: function() { 10953this.menu.outerWidth( Math.max( 10954this.button.outerWidth(), 10955this.menu.width( "" ).outerWidth() + 1 10956) ); 10957}, 10958_getCreateOptions: function() { 10959return { disabled: this.element.prop( "disabled" ) }; 10960}, 10961_parseOptions: function( options ) { 10962var data = []; 10963options.each(function( index, item ) { 10964var option = $( item ), 10965optgroup = option.parent( "optgroup" ); 10966data.push({ 10967element: option, 10968index: index, 10969value: option.val(), 10970label: option.text(), 10971optgroup: optgroup.attr( "label" ) || "", 10972disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" ) 10973}); 10974}); 10975this.items = data; 10976}, 10977_destroy: function() { 10978this.menuWrap.remove(); 10979this.button.remove(); 10980this.element.show(); 10981this.element.removeUniqueId(); 10982this.label.attr( "for", this.ids.element ); 10983} 10984}); 10985var slider = $.widget( "ui.slider", $.ui.mouse, { 10986version: "1.11.4", 10987widgetEventPrefix: "slide", 10988options: { 10989animate: false, 10990distance: 0, 10991max: 100, 10992min: 0, 10993orientation: "horizontal", 10994range: false, 10995step: 1, 10996value: 0, 10997values: null, 10998change: null, 10999slide: null, 11000start: null, 11001stop: null 11002}, 11003numPages: 5, 11004_create: function() { 11005this._keySliding = false; 11006this._mouseSliding = false; 11007this._animateOff = true; 11008this._handleIndex = null; 11009this._detectOrientation(); 11010this._mouseInit(); 11011this._calculateNewMax(); 11012this.element 11013.addClass( "ui-slider" + 11014" ui-slider-" + this.orientation + 11015" ui-widget" + 11016" ui-widget-content" + 11017" ui-corner-all"); 11018this._refresh(); 11019this._setOption( "disabled", this.options.disabled ); 11020this._animateOff = false; 11021}, 11022_refresh: function() { 11023this._createRange(); 11024this._createHandles(); 11025this._setupEvents(); 11026this._refreshValue(); 11027}, 11028_createHandles: function() { 11029var i, handleCount, 11030options = this.options, 11031existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ), 11032handle = "<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>", 11033handles = []; 11034handleCount = ( options.values && options.values.length ) || 1; 11035if ( existingHandles.length > handleCount ) { 11036existingHandles.slice( handleCount ).remove(); 11037existingHandles = existingHandles.slice( 0, handleCount ); 11038} 11039for ( i = existingHandles.length; i < handleCount; i++ ) { 11040handles.push( handle ); 11041} 11042this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) ); 11043this.handle = this.handles.eq( 0 ); 11044this.handles.each(function( i ) { 11045$( this ).data( "ui-slider-handle-index", i ); 11046}); 11047}, 11048_createRange: function() { 11049var options = this.options, 11050classes = ""; 11051if ( options.range ) { 11052if ( options.range === true ) { 11053if ( !options.values ) { 11054options.values = [ this._valueMin(), this._valueMin() ]; 11055} else if ( options.values.length && options.values.length !== 2 ) { 11056options.values = [ options.values[0], options.values[0] ]; 11057} else if ( $.isArray( options.values ) ) { 11058options.values = options.values.slice(0); 11059} 11060} 11061if ( !this.range || !this.range.length ) { 11062this.range = $( "<div></div>" ) 11063.appendTo( this.element ); 11064classes = "ui-slider-range" + 11065" ui-widget-header ui-corner-all"; 11066} else { 11067this.range.removeClass( "ui-slider-range-min ui-slider-range-max" ) 11068.css({ 11069"left": "", 11070"bottom": "" 11071}); 11072} 11073this.range.addClass( classes + 11074( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) ); 11075} else { 11076if ( this.range ) { 11077this.range.remove(); 11078} 11079this.range = null; 11080} 11081}, 11082_setupEvents: function() { 11083this._off( this.handles ); 11084this._on( this.handles, this._handleEvents ); 11085this._hoverable( this.handles ); 11086this._focusable( this.handles ); 11087}, 11088_destroy: function() { 11089this.handles.remove(); 11090if ( this.range ) { 11091this.range.remove(); 11092} 11093this.element 11094.removeClass( "ui-slider" + 11095" ui-slider-horizontal" + 11096" ui-slider-vertical" + 11097" ui-widget" + 11098" ui-widget-content" + 11099" ui-corner-all" ); 11100this._mouseDestroy(); 11101}, 11102_mouseCapture: function( event ) { 11103var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle, 11104that = this, 11105o = this.options; 11106if ( o.disabled ) { 11107return false; 11108} 11109this.elementSize = { 11110width: this.element.outerWidth(), 11111height: this.element.outerHeight() 11112}; 11113this.elementOffset = this.element.offset(); 11114position = { x: event.pageX, y: event.pageY }; 11115normValue = this._normValueFromMouse( position ); 11116distance = this._valueMax() - this._valueMin() + 1; 11117this.handles.each(function( i ) { 11118var thisDistance = Math.abs( normValue - that.values(i) ); 11119if (( distance > thisDistance ) || 11120( distance === thisDistance && 11121(i === that._lastChangedValue || that.values(i) === o.min ))) { 11122distance = thisDistance; 11123closestHandle = $( this ); 11124index = i; 11125} 11126}); 11127allowed = this._start( event, index ); 11128if ( allowed === false ) { 11129return false; 11130} 11131this._mouseSliding = true; 11132this._handleIndex = index; 11133closestHandle 11134.addClass( "ui-state-active" ) 11135.focus(); 11136offset = closestHandle.offset(); 11137mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" ); 11138this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { 11139left: event.pageX - offset.left - ( closestHandle.width() / 2 ), 11140top: event.pageY - offset.top - 11141( closestHandle.height() / 2 ) - 11142( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) - 11143( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) + 11144( parseInt( closestHandle.css("marginTop"), 10 ) || 0) 11145}; 11146if ( !this.handles.hasClass( "ui-state-hover" ) ) { 11147this._slide( event, index, normValue ); 11148} 11149this._animateOff = true; 11150return true; 11151}, 11152_mouseStart: function() { 11153return true; 11154}, 11155_mouseDrag: function( event ) { 11156var position = { x: event.pageX, y: event.pageY }, 11157normValue = this._normValueFromMouse( position ); 11158this._slide( event, this._handleIndex, normValue ); 11159return false; 11160}, 11161_mouseStop: function( event ) { 11162this.handles.removeClass( "ui-state-active" ); 11163this._mouseSliding = false; 11164this._stop( event, this._handleIndex ); 11165this._change( event, this._handleIndex ); 11166this._handleIndex = null; 11167this._clickOffset = null; 11168this._animateOff = false; 11169return false; 11170}, 11171_detectOrientation: function() { 11172this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal"; 11173}, 11174_normValueFromMouse: function( position ) { 11175var pixelTotal, 11176pixelMouse, 11177percentMouse, 11178valueTotal, 11179valueMouse; 11180if ( this.orientation === "horizontal" ) { 11181pixelTotal = this.elementSize.width; 11182pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 ); 11183} else { 11184pixelTotal = this.elementSize.height; 11185pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 ); 11186} 11187percentMouse = ( pixelMouse / pixelTotal ); 11188if ( percentMouse > 1 ) { 11189percentMouse = 1; 11190} 11191if ( percentMouse < 0 ) { 11192percentMouse = 0; 11193} 11194if ( this.orientation === "vertical" ) { 11195percentMouse = 1 - percentMouse; 11196} 11197valueTotal = this._valueMax() - this._valueMin(); 11198valueMouse = this._valueMin() + percentMouse * valueTotal; 11199return this._trimAlignValue( valueMouse ); 11200}, 11201_start: function( event, index ) { 11202var uiHash = { 11203handle: this.handles[ index ], 11204value: this.value() 11205}; 11206if ( this.options.values && this.options.values.length ) { 11207uiHash.value = this.values( index ); 11208uiHash.values = this.values(); 11209} 11210return this._trigger( "start", event, uiHash ); 11211}, 11212_slide: function( event, index, newVal ) { 11213var otherVal, 11214newValues, 11215allowed; 11216if ( this.options.values && this.options.values.length ) { 11217otherVal = this.values( index ? 0 : 1 ); 11218if ( ( this.options.values.length === 2 && this.options.range === true ) && 11219( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) ) 11220) { 11221newVal = otherVal; 11222} 11223if ( newVal !== this.values( index ) ) { 11224newValues = this.values(); 11225newValues[ index ] = newVal; 11226allowed = this._trigger( "slide", event, { 11227handle: this.handles[ index ], 11228value: newVal, 11229values: newValues 11230} ); 11231otherVal = this.values( index ? 0 : 1 ); 11232if ( allowed !== false ) { 11233this.values( index, newVal ); 11234} 11235} 11236} else { 11237if ( newVal !== this.value() ) { 11238allowed = this._trigger( "slide", event, { 11239handle: this.handles[ index ], 11240value: newVal 11241} ); 11242if ( allowed !== false ) { 11243this.value( newVal ); 11244} 11245} 11246} 11247}, 11248_stop: function( event, index ) { 11249var uiHash = { 11250handle: this.handles[ index ], 11251value: this.value() 11252}; 11253if ( this.options.values && this.options.values.length ) { 11254uiHash.value = this.values( index ); 11255uiHash.values = this.values(); 11256} 11257this._trigger( "stop", event, uiHash ); 11258}, 11259_change: function( event, index ) { 11260if ( !this._keySliding && !this._mouseSliding ) { 11261var uiHash = { 11262handle: this.handles[ index ], 11263value: this.value() 11264}; 11265if ( this.options.values && this.options.values.length ) { 11266uiHash.value = this.values( index ); 11267uiHash.values = this.values(); 11268} 11269this._lastChangedValue = index; 11270this._trigger( "change", event, uiHash ); 11271} 11272}, 11273value: function( newValue ) { 11274if ( arguments.length ) { 11275this.options.value = this._trimAlignValue( newValue ); 11276this._refreshValue(); 11277this._change( null, 0 ); 11278return; 11279} 11280return this._value(); 11281}, 11282values: function( index, newValue ) { 11283var vals, 11284newValues, 11285i; 11286if ( arguments.length > 1 ) { 11287this.options.values[ index ] = this._trimAlignValue( newValue ); 11288this._refreshValue(); 11289this._change( null, index ); 11290return; 11291} 11292if ( arguments.length ) { 11293if ( $.isArray( arguments[ 0 ] ) ) { 11294vals = this.options.values; 11295newValues = arguments[ 0 ]; 11296for ( i = 0; i < vals.length; i += 1 ) { 11297vals[ i ] = this._trimAlignValue( newValues[ i ] ); 11298this._change( null, i ); 11299} 11300this._refreshValue(); 11301} else { 11302if ( this.options.values && this.options.values.length ) { 11303return this._values( index ); 11304} else { 11305return this.value(); 11306} 11307} 11308} else { 11309return this._values(); 11310} 11311}, 11312_setOption: function( key, value ) { 11313var i, 11314valsLength = 0; 11315if ( key === "range" && this.options.range === true ) { 11316if ( value === "min" ) { 11317this.options.value = this._values( 0 ); 11318this.options.values = null; 11319} else if ( value === "max" ) { 11320this.options.value = this._values( this.options.values.length - 1 ); 11321this.options.values = null; 11322} 11323} 11324if ( $.isArray( this.options.values ) ) { 11325valsLength = this.options.values.length; 11326} 11327if ( key === "disabled" ) { 11328this.element.toggleClass( "ui-state-disabled", !!value ); 11329} 11330this._super( key, value ); 11331switch ( key ) { 11332case "orientation": 11333this._detectOrientation(); 11334this.element 11335.removeClass( "ui-slider-horizontal ui-slider-vertical" ) 11336.addClass( "ui-slider-" + this.orientation ); 11337this._refreshValue(); 11338this.handles.css( value === "horizontal" ? "bottom" : "left", "" ); 11339break; 11340case "value": 11341this._animateOff = true; 11342this._refreshValue(); 11343this._change( null, 0 ); 11344this._animateOff = false;
vendor: 15,417 bytes, lines 11345-11857
11345break; 11346case "values": 11347this._animateOff = true; 11348this._refreshValue(); 11349for ( i = 0; i < valsLength; i += 1 ) { 11350this._change( null, i ); 11351} 11352this._animateOff = false; 11353break; 11354case "step": 11355case "min": 11356case "max": 11357this._animateOff = true; 11358this._calculateNewMax(); 11359this._refreshValue(); 11360this._animateOff = false; 11361break; 11362case "range": 11363this._animateOff = true; 11364this._refresh(); 11365this._animateOff = false; 11366break; 11367} 11368}, 11369_value: function() { 11370var val = this.options.value; 11371val = this._trimAlignValue( val ); 11372return val; 11373}, 11374_values: function( index ) { 11375var val, 11376vals, 11377i; 11378if ( arguments.length ) { 11379val = this.options.values[ index ]; 11380val = this._trimAlignValue( val ); 11381return val; 11382} else if ( this.options.values && this.options.values.length ) { 11383vals = this.options.values.slice(); 11384for ( i = 0; i < vals.length; i += 1) { 11385vals[ i ] = this._trimAlignValue( vals[ i ] ); 11386} 11387return vals; 11388} else { 11389return []; 11390} 11391}, 11392_trimAlignValue: function( val ) { 11393if ( val <= this._valueMin() ) { 11394return this._valueMin(); 11395} 11396if ( val >= this._valueMax() ) { 11397return this._valueMax(); 11398} 11399var step = ( this.options.step > 0 ) ? this.options.step : 1, 11400valModStep = (val - this._valueMin()) % step, 11401alignValue = val - valModStep; 11402if ( Math.abs(valModStep) * 2 >= step ) { 11403alignValue += ( valModStep > 0 ) ? step : ( -step ); 11404} 11405return parseFloat( alignValue.toFixed(5) ); 11406}, 11407_calculateNewMax: function() { 11408var max = this.options.max, 11409min = this._valueMin(), 11410step = this.options.step, 11411aboveMin = Math.floor( ( +( max - min ).toFixed( this._precision() ) ) / step ) * step; 11412max = aboveMin + min; 11413this.max = parseFloat( max.toFixed( this._precision() ) ); 11414}, 11415_precision: function() { 11416var precision = this._precisionOf( this.options.step ); 11417if ( this.options.min !== null ) { 11418precision = Math.max( precision, this._precisionOf( this.options.min ) ); 11419} 11420return precision; 11421}, 11422_precisionOf: function( num ) { 11423var str = num.toString(), 11424decimal = str.indexOf( "." ); 11425return decimal === -1 ? 0 : str.length - decimal - 1; 11426}, 11427_valueMin: function() { 11428return this.options.min; 11429}, 11430_valueMax: function() { 11431return this.max; 11432}, 11433_refreshValue: function() { 11434var lastValPercent, valPercent, value, valueMin, valueMax, 11435oRange = this.options.range, 11436o = this.options, 11437that = this, 11438animate = ( !this._animateOff ) ? o.animate : false, 11439_set = {}; 11440if ( this.options.values && this.options.values.length ) { 11441this.handles.each(function( i ) { 11442valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100; 11443_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; 11444$( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); 11445if ( that.options.range === true ) { 11446if ( that.orientation === "horizontal" ) { 11447if ( i === 0 ) { 11448that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate ); 11449} 11450if ( i === 1 ) { 11451that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } ); 11452} 11453} else { 11454if ( i === 0 ) { 11455that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate ); 11456} 11457if ( i === 1 ) { 11458that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } ); 11459} 11460} 11461} 11462lastValPercent = valPercent; 11463}); 11464} else { 11465value = this.value(); 11466valueMin = this._valueMin(); 11467valueMax = this._valueMax(); 11468valPercent = ( valueMax !== valueMin ) ? 11469( value - valueMin ) / ( valueMax - valueMin ) * 100 : 114700; 11471_set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; 11472this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); 11473if ( oRange === "min" && this.orientation === "horizontal" ) { 11474this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate ); 11475} 11476if ( oRange === "max" && this.orientation === "horizontal" ) { 11477this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); 11478} 11479if ( oRange === "min" && this.orientation === "vertical" ) { 11480this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate ); 11481} 11482if ( oRange === "max" && this.orientation === "vertical" ) { 11483this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); 11484} 11485} 11486}, 11487_handleEvents: { 11488keydown: function( event ) { 11489var allowed, curVal, newVal, step, 11490index = $( event.target ).data( "ui-slider-handle-index" ); 11491switch ( event.keyCode ) { 11492case $.ui.keyCode.HOME: 11493case $.ui.keyCode.END: 11494case $.ui.keyCode.PAGE_UP: 11495case $.ui.keyCode.PAGE_DOWN: 11496case $.ui.keyCode.UP: 11497case $.ui.keyCode.RIGHT: 11498case $.ui.keyCode.DOWN: 11499case $.ui.keyCode.LEFT: 11500event.preventDefault(); 11501if ( !this._keySliding ) { 11502this._keySliding = true; 11503$( event.target ).addClass( "ui-state-active" ); 11504allowed = this._start( event, index ); 11505if ( allowed === false ) { 11506return; 11507} 11508} 11509break; 11510} 11511step = this.options.step; 11512if ( this.options.values && this.options.values.length ) { 11513curVal = newVal = this.values( index ); 11514} else { 11515curVal = newVal = this.value(); 11516} 11517switch ( event.keyCode ) { 11518case $.ui.keyCode.HOME: 11519newVal = this._valueMin(); 11520break; 11521case $.ui.keyCode.END: 11522newVal = this._valueMax(); 11523break; 11524case $.ui.keyCode.PAGE_UP: 11525newVal = this._trimAlignValue( 11526curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages ) 11527); 11528break; 11529case $.ui.keyCode.PAGE_DOWN: 11530newVal = this._trimAlignValue( 11531curVal - ( (this._valueMax() - this._valueMin()) / this.numPages ) ); 11532break; 11533case $.ui.keyCode.UP: 11534case $.ui.keyCode.RIGHT: 11535if ( curVal === this._valueMax() ) { 11536return; 11537} 11538newVal = this._trimAlignValue( curVal + step ); 11539break; 11540case $.ui.keyCode.DOWN: 11541case $.ui.keyCode.LEFT: 11542if ( curVal === this._valueMin() ) { 11543return; 11544} 11545newVal = this._trimAlignValue( curVal - step ); 11546break; 11547} 11548this._slide( event, index, newVal ); 11549}, 11550keyup: function( event ) { 11551var index = $( event.target ).data( "ui-slider-handle-index" ); 11552if ( this._keySliding ) { 11553this._keySliding = false; 11554this._stop( event, index ); 11555this._change( event, index ); 11556$( event.target ).removeClass( "ui-state-active" ); 11557} 11558} 11559} 11560}); 11561var sortable = $.widget("ui.sortable", $.ui.mouse, { 11562version: "1.11.4", 11563widgetEventPrefix: "sort", 11564ready: false, 11565options: { 11566appendTo: "parent", 11567axis: false, 11568connectWith: false, 11569containment: false, 11570cursor: "auto", 11571cursorAt: false, 11572dropOnEmpty: true, 11573forcePlaceholderSize: false, 11574forceHelperSize: false, 11575grid: false, 11576handle: false, 11577helper: "original", 11578items: "> *", 11579opacity: false, 11580placeholder: false, 11581revert: false, 11582scroll: true, 11583scrollSensitivity: 20, 11584scrollSpeed: 20, 11585scope: "default", 11586tolerance: "intersect", 11587zIndex: 1000, 11588activate: null, 11589beforeStop: null, 11590change: null, 11591deactivate: null, 11592out: null, 11593over: null, 11594receive: null, 11595remove: null, 11596sort: null, 11597start: null, 11598stop: null, 11599update: null 11600}, 11601_isOverAxis: function( x, reference, size ) { 11602return ( x >= reference ) && ( x < ( reference + size ) ); 11603}, 11604_isFloating: function( item ) { 11605return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display")); 11606}, 11607_create: function() { 11608this.containerCache = {}; 11609this.element.addClass("ui-sortable"); 11610this.refresh(); 11611this.offset = this.element.offset(); 11612this._mouseInit(); 11613this._setHandleClassName(); 11614this.ready = true; 11615}, 11616_setOption: function( key, value ) { 11617this._super( key, value ); 11618if ( key === "handle" ) { 11619this._setHandleClassName(); 11620} 11621}, 11622_setHandleClassName: function() { 11623this.element.find( ".ui-sortable-handle" ).removeClass( "ui-sortable-handle" ); 11624$.each( this.items, function() { 11625( this.instance.options.handle ? 11626this.item.find( this.instance.options.handle ) : this.item ) 11627.addClass( "ui-sortable-handle" ); 11628}); 11629}, 11630_destroy: function() { 11631this.element 11632.removeClass( "ui-sortable ui-sortable-disabled" ) 11633.find( ".ui-sortable-handle" ) 11634.removeClass( "ui-sortable-handle" ); 11635this._mouseDestroy(); 11636for ( var i = this.items.length - 1; i >= 0; i-- ) { 11637this.items[i].item.removeData(this.widgetName + "-item"); 11638} 11639return this; 11640}, 11641_mouseCapture: function(event, overrideHandle) { 11642var currentItem = null, 11643validHandle = false, 11644that = this; 11645if (this.reverting) { 11646return false; 11647} 11648if(this.options.disabled || this.options.type === "static") { 11649return false; 11650} 11651this._refreshItems(event); 11652$(event.target).parents().each(function() { 11653if($.data(this, that.widgetName + "-item") === that) { 11654currentItem = $(this); 11655return false; 11656} 11657}); 11658if($.data(event.target, that.widgetName + "-item") === that) { 11659currentItem = $(event.target); 11660} 11661if(!currentItem) { 11662return false; 11663} 11664if(this.options.handle && !overrideHandle) { 11665$(this.options.handle, currentItem).find("*").addBack().each(function() { 11666if(this === event.target) { 11667validHandle = true; 11668} 11669}); 11670if(!validHandle) { 11671return false; 11672} 11673} 11674this.currentItem = currentItem; 11675this._removeCurrentsFromItems(); 11676return true; 11677}, 11678_mouseStart: function(event, overrideHandle, noActivation) { 11679var i, body, 11680o = this.options; 11681this.currentContainer = this; 11682this.refreshPositions(); 11683this.helper = this._createHelper(event); 11684this._cacheHelperProportions(); 11685this._cacheMargins(); 11686this.scrollParent = this.helper.scrollParent(); 11687this.offset = this.currentItem.offset(); 11688this.offset = { 11689top: this.offset.top - this.margins.top, 11690left: this.offset.left - this.margins.left 11691}; 11692$.extend(this.offset, { 11693click: { //Where the click happened, relative to the element 11694left: event.pageX - this.offset.left, 11695top: event.pageY - this.offset.top 11696}, 11697parent: this._getParentOffset(), 11698relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper 11699}); 11700this.helper.css("position", "absolute"); 11701this.cssPosition = this.helper.css("position"); 11702this.originalPosition = this._generatePosition(event); 11703this.originalPageX = event.pageX; 11704this.originalPageY = event.pageY; 11705(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); 11706this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; 11707if(this.helper[0] !== this.currentItem[0]) { 11708this.currentItem.hide(); 11709} 11710this._createPlaceholder(); 11711if(o.containment) { 11712this._setContainment(); 11713} 11714if( o.cursor && o.cursor !== "auto" ) { // cursor option 11715body = this.document.find( "body" ); 11716this.storedCursor = body.css( "cursor" ); 11717body.css( "cursor", o.cursor ); 11718this.storedStylesheet = $( "<style>*{ cursor: "+o.cursor+" !important; }</style>" ).appendTo( body ); 11719} 11720if(o.opacity) { // opacity option 11721if (this.helper.css("opacity")) { 11722this._storedOpacity = this.helper.css("opacity"); 11723} 11724this.helper.css("opacity", o.opacity); 11725} 11726if(o.zIndex) { // zIndex option 11727if (this.helper.css("zIndex")) { 11728this._storedZIndex = this.helper.css("zIndex"); 11729} 11730this.helper.css("zIndex", o.zIndex); 11731} 11732if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") { 11733this.overflowOffset = this.scrollParent.offset(); 11734} 11735this._trigger("start", event, this._uiHash()); 11736if(!this._preserveHelperProportions) { 11737this._cacheHelperProportions(); 11738} 11739if( !noActivation ) { 11740for ( i = this.containers.length - 1; i >= 0; i-- ) { 11741this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) ); 11742} 11743} 11744if($.ui.ddmanager) { 11745$.ui.ddmanager.current = this; 11746} 11747if ($.ui.ddmanager && !o.dropBehaviour) { 11748$.ui.ddmanager.prepareOffsets(this, event); 11749} 11750this.dragging = true; 11751this.helper.addClass("ui-sortable-helper"); 11752this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position 11753return true; 11754}, 11755_mouseDrag: function(event) { 11756var i, item, itemElement, intersection, 11757o = this.options, 11758scrolled = false; 11759this.position = this._generatePosition(event); 11760this.positionAbs = this._convertPositionTo("absolute"); 11761if (!this.lastPositionAbs) { 11762this.lastPositionAbs = this.positionAbs; 11763} 11764if(this.options.scroll) { 11765if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") { 11766if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { 11767this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; 11768} else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) { 11769this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; 11770} 11771if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { 11772this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; 11773} else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) { 11774this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; 11775} 11776} else { 11777if(event.pageY - this.document.scrollTop() < o.scrollSensitivity) { 11778scrolled = this.document.scrollTop(this.document.scrollTop() - o.scrollSpeed); 11779} else if(this.window.height() - (event.pageY - this.document.scrollTop()) < o.scrollSensitivity) { 11780scrolled = this.document.scrollTop(this.document.scrollTop() + o.scrollSpeed); 11781} 11782if(event.pageX - this.document.scrollLeft() < o.scrollSensitivity) { 11783scrolled = this.document.scrollLeft(this.document.scrollLeft() - o.scrollSpeed); 11784} else if(this.window.width() - (event.pageX - this.document.scrollLeft()) < o.scrollSensitivity) { 11785scrolled = this.document.scrollLeft(this.document.scrollLeft() + o.scrollSpeed); 11786} 11787} 11788if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { 11789$.ui.ddmanager.prepareOffsets(this, event); 11790} 11791} 11792this.positionAbs = this._convertPositionTo("absolute"); 11793if(!this.options.axis || this.options.axis !== "y") { 11794this.helper[0].style.left = this.position.left+"px"; 11795} 11796if(!this.options.axis || this.options.axis !== "x") { 11797this.helper[0].style.top = this.position.top+"px"; 11798} 11799for (i = this.items.length - 1; i >= 0; i--) { 11800item = this.items[i]; 11801itemElement = item.item[0]; 11802intersection = this._intersectsWithPointer(item); 11803if (!intersection) { 11804continue; 11805} 11806if (item.instance !== this.currentContainer) { 11807continue; 11808} 11809if (itemElement !== this.currentItem[0] && 11810this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement && 11811!$.contains(this.placeholder[0], itemElement) && 11812(this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true) 11813) { 11814this.direction = intersection === 1 ? "down" : "up"; 11815if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) { 11816this._rearrange(event, item); 11817} else { 11818break; 11819} 11820this._trigger("change", event, this._uiHash()); 11821break; 11822} 11823} 11824this._contactContainers(event); 11825if($.ui.ddmanager) { 11826$.ui.ddmanager.drag(this, event); 11827} 11828this._trigger("sort", event, this._uiHash()); 11829this.lastPositionAbs = this.positionAbs; 11830return false; 11831}, 11832_mouseStop: function(event, noPropagation) { 11833if(!event) { 11834return; 11835} 11836if ($.ui.ddmanager && !this.options.dropBehaviour) { 11837$.ui.ddmanager.drop(this, event); 11838} 11839if(this.options.revert) { 11840var that = this, 11841cur = this.placeholder.offset(), 11842axis = this.options.axis, 11843animation = {}; 11844if ( !axis || axis === "x" ) { 11845animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft); 11846} 11847if ( !axis || axis === "y" ) { 11848animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop); 11849} 11850this.reverting = true; 11851$(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() { 11852that._clear(event); 11853}); 11854} else { 11855this._clear(event, noPropagation); 11856} 11857return false;
vendor: 4,722 bytes, lines 11858-11984
11858}, 11859cancel: function() { 11860if(this.dragging) { 11861this._mouseUp({ target: null }); 11862if(this.options.helper === "original") { 11863this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); 11864} else { 11865this.currentItem.show(); 11866} 11867for (var i = this.containers.length - 1; i >= 0; i--){ 11868this.containers[i]._trigger("deactivate", null, this._uiHash(this)); 11869if(this.containers[i].containerCache.over) { 11870this.containers[i]._trigger("out", null, this._uiHash(this)); 11871this.containers[i].containerCache.over = 0; 11872} 11873} 11874} 11875if (this.placeholder) { 11876if(this.placeholder[0].parentNode) { 11877this.placeholder[0].parentNode.removeChild(this.placeholder[0]); 11878} 11879if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) { 11880this.helper.remove(); 11881} 11882$.extend(this, { 11883helper: null, 11884dragging: false, 11885reverting: false, 11886_noFinalSort: null 11887}); 11888if(this.domPosition.prev) { 11889$(this.domPosition.prev).after(this.currentItem); 11890} else { 11891$(this.domPosition.parent).prepend(this.currentItem); 11892} 11893} 11894return this; 11895}, 11896serialize: function(o) { 11897var items = this._getItemsAsjQuery(o && o.connected), 11898str = []; 11899o = o || {}; 11900$(items).each(function() { 11901var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/)); 11902if (res) { 11903str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2])); 11904} 11905}); 11906if(!str.length && o.key) { 11907str.push(o.key + "="); 11908} 11909return str.join("&"); 11910}, 11911toArray: function(o) { 11912var items = this._getItemsAsjQuery(o && o.connected), 11913ret = []; 11914o = o || {}; 11915items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); }); 11916return ret; 11917}, 11918_intersectsWith: function(item) { 11919var x1 = this.positionAbs.left, 11920x2 = x1 + this.helperProportions.width, 11921y1 = this.positionAbs.top, 11922y2 = y1 + this.helperProportions.height, 11923l = item.left, 11924r = l + item.width, 11925t = item.top, 11926b = t + item.height, 11927dyClick = this.offset.click.top, 11928dxClick = this.offset.click.left, 11929isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ), 11930isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ), 11931isOverElement = isOverElementHeight && isOverElementWidth; 11932if ( this.options.tolerance === "pointer" || 11933this.options.forcePointerForContainers || 11934(this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"]) 11935) { 11936return isOverElement; 11937} else { 11938return (l < x1 + (this.helperProportions.width / 2) && // Right Half 11939x2 - (this.helperProportions.width / 2) < r && // Left Half 11940t < y1 + (this.helperProportions.height / 2) && // Bottom Half 11941y2 - (this.helperProportions.height / 2) < b ); // Top Half 11942} 11943}, 11944_intersectsWithPointer: function(item) { 11945var isOverElementHeight = (this.options.axis === "x") || this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), 11946isOverElementWidth = (this.options.axis === "y") || this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), 11947isOverElement = isOverElementHeight && isOverElementWidth, 11948verticalDirection = this._getDragVerticalDirection(), 11949horizontalDirection = this._getDragHorizontalDirection(); 11950if (!isOverElement) { 11951return false; 11952} 11953return this.floating ? 11954( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 ) 11955: ( verticalDirection && (verticalDirection === "down" ? 2 : 1) ); 11956}, 11957_intersectsWithSides: function(item) { 11958var isOverBottomHalf = this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), 11959isOverRightHalf = this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), 11960verticalDirection = this._getDragVerticalDirection(), 11961horizontalDirection = this._getDragHorizontalDirection(); 11962if (this.floating && horizontalDirection) { 11963return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf)); 11964} else { 11965return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf)); 11966} 11967}, 11968_getDragVerticalDirection: function() { 11969var delta = this.positionAbs.top - this.lastPositionAbs.top; 11970return delta !== 0 && (delta > 0 ? "down" : "up"); 11971}, 11972_getDragHorizontalDirection: function() { 11973var delta = this.positionAbs.left - this.lastPositionAbs.left; 11974return delta !== 0 && (delta > 0 ? "right" : "left"); 11975}, 11976refresh: function(event) { 11977this._refreshItems(event); 11978this._setHandleClassName(); 11979this.refreshPositions(); 11980return this; 11981}, 11982_connectWith: function() { 11983var options = this.options; 11984return options.connectWith.constructor === String ? [options.connectWith
vendor: 16,729 bytes, lines 11984-12388
11984] : options.connectWith; 11985}, 11986_getItemsAsjQuery: function(connected) { 11987var i, j, cur, inst, 11988items = [], 11989queries = [], 11990connectWith = this._connectWith(); 11991if(connectWith && connected) { 11992for (i = connectWith.length - 1; i >= 0; i--){ 11993cur = $(connectWith[i], this.document[0]); 11994for ( j = cur.length - 1; j >= 0; j--){ 11995inst = $.data(cur[j], this.widgetFullName); 11996if(inst && inst !== this && !inst.options.disabled) { 11997queries.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]); 11998} 11999} 12000} 12001} 12002queries.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]); 12003function addItems() { 12004items.push( this ); 12005} 12006for (i = queries.length - 1; i >= 0; i--){ 12007queries[i][0].each( addItems ); 12008} 12009return $(items); 12010}, 12011_removeCurrentsFromItems: function() { 12012var list = this.currentItem.find(":data(" + this.widgetName + "-item)"); 12013this.items = $.grep(this.items, function (item) { 12014for (var j=0; j < list.length; j++) { 12015if(list[j] === item.item[0]) { 12016return false; 12017} 12018} 12019return true; 12020}); 12021}, 12022_refreshItems: function(event) { 12023this.items = []; 12024this.containers = [this]; 12025var i, j, cur, inst, targetData, _queries, item, queriesLength, 12026items = this.items, 12027queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]], 12028connectWith = this._connectWith(); 12029if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down 12030for (i = connectWith.length - 1; i >= 0; i--){ 12031cur = $(connectWith[i], this.document[0]); 12032for (j = cur.length - 1; j >= 0; j--){ 12033inst = $.data(cur[j], this.widgetFullName); 12034if(inst && inst !== this && !inst.options.disabled) { 12035queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); 12036this.containers.push(inst); 12037} 12038} 12039} 12040} 12041for (i = queries.length - 1; i >= 0; i--) { 12042targetData = queries[i][1]; 12043_queries = queries[i][0]; 12044for (j=0, queriesLength = _queries.length; j < queriesLength; j++) { 12045item = $(_queries[j]); 12046item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager) 12047items.push({ 12048item: item, 12049instance: targetData, 12050width: 0, height: 0, 12051left: 0, top: 0 12052}); 12053} 12054} 12055}, 12056refreshPositions: function(fast) { 12057this.floating = this.items.length ? 12058this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) : 12059false; 12060if(this.offsetParent && this.helper) { 12061this.offset.parent = this._getParentOffset(); 12062} 12063var i, item, t, p; 12064for (i = this.items.length - 1; i >= 0; i--){ 12065item = this.items[i]; 12066if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) { 12067continue; 12068} 12069t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; 12070if (!fast) { 12071item.width = t.outerWidth(); 12072item.height = t.outerHeight(); 12073} 12074p = t.offset(); 12075item.left = p.left; 12076item.top = p.top; 12077} 12078if(this.options.custom && this.options.custom.refreshContainers) { 12079this.options.custom.refreshContainers.call(this); 12080} else { 12081for (i = this.containers.length - 1; i >= 0; i--){ 12082p = this.containers[i].element.offset(); 12083this.containers[i].containerCache.left = p.left; 12084this.containers[i].containerCache.top = p.top; 12085this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); 12086this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); 12087} 12088} 12089return this; 12090}, 12091_createPlaceholder: function(that) { 12092that = that || this; 12093var className, 12094o = that.options; 12095if(!o.placeholder || o.placeholder.constructor === String) { 12096className = o.placeholder; 12097o.placeholder = { 12098element: function() { 12099var nodeName = that.currentItem[0].nodeName.toLowerCase(), 12100element = $( "<" + nodeName + ">", that.document[0] ) 12101.addClass(className || that.currentItem[0].className+" ui-sortable-placeholder") 12102.removeClass("ui-sortable-helper"); 12103if ( nodeName === "tbody" ) { 12104that._createTrPlaceholder( 12105that.currentItem.find( "tr" ).eq( 0 ), 12106$( "<tr>", that.document[ 0 ] ).appendTo( element ) 12107); 12108} else if ( nodeName === "tr" ) { 12109that._createTrPlaceholder( that.currentItem, element ); 12110} else if ( nodeName === "img" ) { 12111element.attr( "src", that.currentItem.attr( "src" ) ); 12112} 12113if ( !className ) { 12114element.css( "visibility", "hidden" ); 12115} 12116return element; 12117}, 12118update: function(container, p) { 12119if(className && !o.forcePlaceholderSize) { 12120return; 12121} 12122if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); } 12123if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); } 12124} 12125}; 12126} 12127that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem)); 12128that.currentItem.after(that.placeholder); 12129o.placeholder.update(that, that.placeholder); 12130}, 12131_createTrPlaceholder: function( sourceTr, targetTr ) { 12132var that = this; 12133sourceTr.children().each(function() { 12134$( "<td> </td>", that.document[ 0 ] ) 12135.attr( "colspan", $( this ).attr( "colspan" ) || 1 ) 12136.appendTo( targetTr ); 12137}); 12138}, 12139_contactContainers: function(event) { 12140var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom, floating, axis, 12141innermostContainer = null, 12142innermostIndex = null; 12143for (i = this.containers.length - 1; i >= 0; i--) { 12144if($.contains(this.currentItem[0], this.containers[i].element[0])) { 12145continue; 12146} 12147if(this._intersectsWith(this.containers[i].containerCache)) { 12148if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) { 12149continue; 12150} 12151innermostContainer = this.containers[i]; 12152innermostIndex = i; 12153} else { 12154if(this.containers[i].containerCache.over) { 12155this.containers[i]._trigger("out", event, this._uiHash(this)); 12156this.containers[i].containerCache.over = 0; 12157} 12158} 12159} 12160if(!innermostContainer) { 12161return; 12162} 12163if(this.containers.length === 1) { 12164if (!this.containers[innermostIndex].containerCache.over) { 12165this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); 12166this.containers[innermostIndex].containerCache.over = 1; 12167} 12168} else { 12169dist = 10000; 12170itemWithLeastDistance = null; 12171floating = innermostContainer.floating || this._isFloating(this.currentItem); 12172posProperty = floating ? "left" : "top"; 12173sizeProperty = floating ? "width" : "height"; 12174axis = floating ? "clientX" : "clientY"; 12175for (j = this.items.length - 1; j >= 0; j--) { 12176if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) { 12177continue; 12178} 12179if(this.items[j].item[0] === this.currentItem[0]) { 12180continue; 12181} 12182cur = this.items[j].item.offset()[posProperty]; 12183nearBottom = false; 12184if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) { 12185nearBottom = true; 12186} 12187if ( Math.abs( event[ axis ] - cur ) < dist ) { 12188dist = Math.abs( event[ axis ] - cur ); 12189itemWithLeastDistance = this.items[ j ]; 12190this.direction = nearBottom ? "up": "down"; 12191} 12192} 12193if(!itemWithLeastDistance && !this.options.dropOnEmpty) { 12194return; 12195} 12196if(this.currentContainer === this.containers[innermostIndex]) { 12197if ( !this.currentContainer.containerCache.over ) { 12198this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() ); 12199this.currentContainer.containerCache.over = 1; 12200} 12201return; 12202} 12203itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); 12204this._trigger("change", event, this._uiHash()); 12205this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); 12206this.currentContainer = this.containers[innermostIndex]; 12207this.options.placeholder.update(this.currentContainer, this.placeholder); 12208this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); 12209this.containers[innermostIndex].containerCache.over = 1; 12210} 12211}, 12212_createHelper: function(event) { 12213var o = this.options, 12214helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem); 12215if(!helper.parents("body").length) { 12216$(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); 12217} 12218if(helper[0] === this.currentItem[0]) { 12219this._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") }; 12220} 12221if(!helper[0].style.width || o.forceHelperSize) { 12222helper.width(this.currentItem.width()); 12223} 12224if(!helper[0].style.height || o.forceHelperSize) { 12225helper.height(this.currentItem.height()); 12226} 12227return helper; 12228}, 12229_adjustOffsetFromHelper: function(obj) { 12230if (typeof obj === "string") { 12231obj = obj.split(" "); 12232} 12233if ($.isArray(obj)) { 12234obj = {left: +obj[0], top: +obj[1] || 0}; 12235} 12236if ("left" in obj) { 12237this.offset.click.left = obj.left + this.margins.left; 12238} 12239if ("right" in obj) { 12240this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; 12241} 12242if ("top" in obj) { 12243this.offset.click.top = obj.top + this.margins.top; 12244} 12245if ("bottom" in obj) { 12246this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; 12247} 12248}, 12249_getParentOffset: function() { 12250this.offsetParent = this.helper.offsetParent(); 12251var po = this.offsetParent.offset(); 12252if(this.cssPosition === "absolute" && this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) { 12253po.left += this.scrollParent.scrollLeft(); 12254po.top += this.scrollParent.scrollTop(); 12255} 12256if( this.offsetParent[0] === this.document[0].body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { 12257po = { top: 0, left: 0 }; 12258} 12259return { 12260top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), 12261left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) 12262}; 12263}, 12264_getRelativeOffset: function() { 12265if(this.cssPosition === "relative") { 12266var p = this.currentItem.position(); 12267return { 12268top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), 12269left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() 12270}; 12271} else { 12272return { top: 0, left: 0 }; 12273} 12274}, 12275_cacheMargins: function() { 12276this.margins = { 12277left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), 12278top: (parseInt(this.currentItem.css("marginTop"),10) || 0) 12279}; 12280}, 12281_cacheHelperProportions: function() { 12282this.helperProportions = { 12283width: this.helper.outerWidth(), 12284height: this.helper.outerHeight() 12285}; 12286}, 12287_setContainment: function() { 12288var ce, co, over, 12289o = this.options; 12290if(o.containment === "parent") { 12291o.containment = this.helper[0].parentNode; 12292} 12293if(o.containment === "document" || o.containment === "window") { 12294this.containment = [ 122950 - this.offset.relative.left - this.offset.parent.left, 122960 - this.offset.relative.top - this.offset.parent.top, 12297o.containment === "document" ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left, 12298(o.containment === "document" ? this.document.width() : this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top 12299]; 12300} 12301if(!(/^(document|window|parent)$/).test(o.containment)) { 12302ce = $(o.containment)[0]; 12303co = $(o.containment).offset(); 12304over = ($(ce).css("overflow") !== "hidden"); 12305this.containment = [ 12306co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, 12307co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, 12308co.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, 12309co.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 12310]; 12311} 12312}, 12313_convertPositionTo: function(d, pos) { 12314if(!pos) { 12315pos = this.position; 12316} 12317var mod = d === "absolute" ? 1 : -1, 12318scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, 12319scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); 12320return { 12321top: ( 12322pos.top + // The absolute mouse position 12323this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent 12324this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) 12325( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) 12326), 12327left: ( 12328pos.left + // The absolute mouse position 12329this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent 12330this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) 12331( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) 12332) 12333}; 12334}, 12335_generatePosition: function(event) { 12336var top, left, 12337o = this.options, 12338pageX = event.pageX, 12339pageY = event.pageY, 12340scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); 12341if(this.cssPosition === "relative" && !(this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0])) { 12342this.offset.relative = this._getRelativeOffset(); 12343} 12344if(this.originalPosition) { //If we are not dragging yet, we won't check for options 12345if(this.containment) { 12346if(event.pageX - this.offset.click.left < this.containment[0]) { 12347pageX = this.containment[0] + this.offset.click.left; 12348} 12349if(event.pageY - this.offset.click.top < this.containment[1]) { 12350pageY = this.containment[1] + this.offset.click.top; 12351} 12352if(event.pageX - this.offset.click.left > this.containment[2]) { 12353pageX = this.containment[2] + this.offset.click.left; 12354} 12355if(event.pageY - this.offset.click.top > this.containment[3]) { 12356pageY = this.containment[3] + this.offset.click.top; 12357} 12358} 12359if(o.grid) { 12360top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; 12361pageY = 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; 12362left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; 12363pageX = 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; 12364} 12365} 12366return { 12367top: ( 12368pageY - // The absolute mouse position 12369this.offset.click.top - // Click offset (relative to the element) 12370this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent 12371this.offset.parent.top + // The offsetParent's offset without borders (offset + border) 12372( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) 12373), 12374left: ( 12375pageX - // The absolute mouse position 12376this.offset.click.left - // Click offset (relative to the element) 12377this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent 12378this.offset.parent.left + // The offsetParent's offset without borders (offset + border) 12379( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) 12380) 12381}; 12382}, 12383_rearrange: function(event, i, a, hardRefresh) { 12384a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling)); 12385this.counter = this.counter ? ++this.counter : 1; 12386var counter = this.counter; 12387this._delay(function() { 12388if(counter === this.counter) {
vendor: 2,847 bytes, lines 12389-12465
12389this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove 12390} 12391}); 12392}, 12393_clear: function(event, noPropagation) { 12394this.reverting = false; 12395var i, 12396delayedTriggers = []; 12397if(!this._noFinalSort && this.currentItem.parent().length) { 12398this.placeholder.before(this.currentItem); 12399} 12400this._noFinalSort = null; 12401if(this.helper[0] === this.currentItem[0]) { 12402for(i in this._storedCSS) { 12403if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") { 12404this._storedCSS[i] = ""; 12405} 12406} 12407this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); 12408} else { 12409this.currentItem.show(); 12410} 12411if(this.fromOutside && !noPropagation) { 12412delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); }); 12413} 12414if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) { 12415delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed 12416} 12417if (this !== this.currentContainer) { 12418if(!noPropagation) { 12419delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); }); 12420delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); 12421delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); 12422} 12423} 12424function delayEvent( type, instance, container ) { 12425return function( event ) { 12426container._trigger( type, event, instance._uiHash( instance ) ); 12427}; 12428} 12429for (i = this.containers.length - 1; i >= 0; i--){ 12430if (!noPropagation) { 12431delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) ); 12432} 12433if(this.containers[i].containerCache.over) { 12434delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) ); 12435this.containers[i].containerCache.over = 0; 12436} 12437} 12438if ( this.storedCursor ) { 12439this.document.find( "body" ).css( "cursor", this.storedCursor ); 12440this.storedStylesheet.remove(); 12441} 12442if(this._storedOpacity) { 12443this.helper.css("opacity", this._storedOpacity); 12444} 12445if(this._storedZIndex) { 12446this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex); 12447} 12448this.dragging = false; 12449if(!noPropagation) { 12450this._trigger("beforeStop", event, this._uiHash()); 12451} 12452this.placeholder[0].parentNode.removeChild(this.placeholder[0]); 12453if ( !this.cancelHelperRemoval ) { 12454if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) { 12455this.helper.remove(); 12456} 12457this.helper = null; 12458} 12459if(!noPropagation) { 12460for (i=0; i < delayedTriggers.length; i++) { 12461delayedTriggers[i].call(this, event); 12462} //Trigger all delayed events 12463this._trigger("stop", event, this._uiHash()); 12464} 12465this.fromOutside = false;
vendor: 11,539 bytes, lines 12466-12930
12466return !this.cancelHelperRemoval; 12467}, 12468_trigger: function() { 12469if ($.Widget.prototype._trigger.apply(this, arguments) === false) { 12470this.cancel(); 12471} 12472}, 12473_uiHash: function(_inst) { 12474var inst = _inst || this; 12475return { 12476helper: inst.helper, 12477placeholder: inst.placeholder || $([]), 12478position: inst.position, 12479originalPosition: inst.originalPosition, 12480offset: inst.positionAbs, 12481item: inst.currentItem, 12482sender: _inst ? _inst.element : null 12483}; 12484} 12485}); 12486function spinner_modifier( fn ) { 12487return function() { 12488var previous = this.element.val(); 12489fn.apply( this, arguments ); 12490this._refresh(); 12491if ( previous !== this.element.val() ) { 12492this._trigger( "change" ); 12493} 12494}; 12495} 12496var spinner = $.widget( "ui.spinner", { 12497version: "1.11.4", 12498defaultElement: "<input>", 12499widgetEventPrefix: "spin", 12500options: { 12501culture: null, 12502icons: { 12503down: "ui-icon-triangle-1-s", 12504up: "ui-icon-triangle-1-n" 12505}, 12506incremental: true, 12507max: null, 12508min: null, 12509numberFormat: null, 12510page: 10, 12511step: 1, 12512change: null, 12513spin: null, 12514start: null, 12515stop: null 12516}, 12517_create: function() { 12518this._setOption( "max", this.options.max ); 12519this._setOption( "min", this.options.min ); 12520this._setOption( "step", this.options.step ); 12521if ( this.value() !== "" ) { 12522this._value( this.element.val(), true ); 12523} 12524this._draw(); 12525this._on( this._events ); 12526this._refresh(); 12527this._on( this.window, { 12528beforeunload: function() { 12529this.element.removeAttr( "autocomplete" ); 12530} 12531}); 12532}, 12533_getCreateOptions: function() { 12534var options = {}, 12535element = this.element; 12536$.each( [ "min", "max", "step" ], function( i, option ) { 12537var value = element.attr( option ); 12538if ( value !== undefined && value.length ) { 12539options[ option ] = value; 12540} 12541}); 12542return options; 12543}, 12544_events: { 12545keydown: function( event ) { 12546if ( this._start( event ) && this._keydown( event ) ) { 12547event.preventDefault(); 12548} 12549}, 12550keyup: "_stop", 12551focus: function() { 12552this.previous = this.element.val(); 12553}, 12554blur: function( event ) { 12555if ( this.cancelBlur ) { 12556delete this.cancelBlur; 12557return; 12558} 12559this._stop(); 12560this._refresh(); 12561if ( this.previous !== this.element.val() ) { 12562this._trigger( "change", event ); 12563} 12564}, 12565mousewheel: function( event, delta ) { 12566if ( !delta ) { 12567return; 12568} 12569if ( !this.spinning && !this._start( event ) ) { 12570return false; 12571} 12572this._spin( (delta > 0 ? 1 : -1) * this.options.step, event ); 12573clearTimeout( this.mousewheelTimer ); 12574this.mousewheelTimer = this._delay(function() { 12575if ( this.spinning ) { 12576this._stop( event ); 12577} 12578}, 100 ); 12579event.preventDefault(); 12580}, 12581"mousedown .ui-spinner-button": function( event ) { 12582var previous; 12583previous = this.element[0] === this.document[0].activeElement ? 12584this.previous : this.element.val(); 12585function checkFocus() { 12586var isActive = this.element[0] === this.document[0].activeElement; 12587if ( !isActive ) { 12588this.element.focus(); 12589this.previous = previous; 12590this._delay(function() { 12591this.previous = previous; 12592}); 12593} 12594} 12595event.preventDefault(); 12596checkFocus.call( this ); 12597this.cancelBlur = true; 12598this._delay(function() { 12599delete this.cancelBlur; 12600checkFocus.call( this ); 12601}); 12602if ( this._start( event ) === false ) { 12603return; 12604} 12605this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); 12606}, 12607"mouseup .ui-spinner-button": "_stop", 12608"mouseenter .ui-spinner-button": function( event ) { 12609if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) { 12610return; 12611} 12612if ( this._start( event ) === false ) { 12613return false; 12614} 12615this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); 12616}, 12617"mouseleave .ui-spinner-button": "_stop" 12618}, 12619_draw: function() { 12620var uiSpinner = this.uiSpinner = this.element 12621.addClass( "ui-spinner-input" ) 12622.attr( "autocomplete", "off" ) 12623.wrap( this._uiSpinnerHtml() ) 12624.parent() 12625.append( this._buttonHtml() ); 12626this.element.attr( "role", "spinbutton" ); 12627this.buttons = uiSpinner.find( ".ui-spinner-button" ) 12628.attr( "tabIndex", -1 ) 12629.button() 12630.removeClass( "ui-corner-all" ); 12631if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) && 12632uiSpinner.height() > 0 ) { 12633uiSpinner.height( uiSpinner.height() ); 12634} 12635if ( this.options.disabled ) { 12636this.disable(); 12637} 12638}, 12639_keydown: function( event ) { 12640var options = this.options, 12641keyCode = $.ui.keyCode; 12642switch ( event.keyCode ) { 12643case keyCode.UP: 12644this._repeat( null, 1, event ); 12645return true; 12646case keyCode.DOWN: 12647this._repeat( null, -1, event ); 12648return true; 12649case keyCode.PAGE_UP: 12650this._repeat( null, options.page, event ); 12651return true; 12652case keyCode.PAGE_DOWN: 12653this._repeat( null, -options.page, event ); 12654return true; 12655} 12656return false; 12657}, 12658_uiSpinnerHtml: function() { 12659return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"; 12660}, 12661_buttonHtml: function() { 12662return "" + 12663"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" + 12664"<span class='ui-icon " + this.options.icons.up + "'>▲</span>" + 12665"</a>" + 12666"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" + 12667"<span class='ui-icon " + this.options.icons.down + "'>▼</span>" + 12668"</a>"; 12669}, 12670_start: function( event ) { 12671if ( !this.spinning && this._trigger( "start", event ) === false ) { 12672return false; 12673} 12674if ( !this.counter ) { 12675this.counter = 1; 12676} 12677this.spinning = true; 12678return true; 12679}, 12680_repeat: function( i, steps, event ) { 12681i = i || 500; 12682clearTimeout( this.timer ); 12683this.timer = this._delay(function() { 12684this._repeat( 40, steps, event ); 12685}, i ); 12686this._spin( steps * this.options.step, event ); 12687}, 12688_spin: function( step, event ) { 12689var value = this.value() || 0; 12690if ( !this.counter ) { 12691this.counter = 1; 12692} 12693value = this._adjustValue( value + step * this._increment( this.counter ) ); 12694if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) { 12695this._value( value ); 12696this.counter++; 12697} 12698}, 12699_increment: function( i ) { 12700var incremental = this.options.incremental; 12701if ( incremental ) { 12702return $.isFunction( incremental ) ? 12703incremental( i ) : 12704Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 ); 12705} 12706return 1; 12707}, 12708_precision: function() { 12709var precision = this._precisionOf( this.options.step ); 12710if ( this.options.min !== null ) { 12711precision = Math.max( precision, this._precisionOf( this.options.min ) ); 12712} 12713return precision; 12714}, 12715_precisionOf: function( num ) { 12716var str = num.toString(), 12717decimal = str.indexOf( "." ); 12718return decimal === -1 ? 0 : str.length - decimal - 1; 12719}, 12720_adjustValue: function( value ) { 12721var base, aboveMin, 12722options = this.options; 12723base = options.min !== null ? options.min : 0; 12724aboveMin = value - base; 12725aboveMin = Math.round(aboveMin / options.step) * options.step; 12726value = base + aboveMin; 12727value = parseFloat( value.toFixed( this._precision() ) ); 12728if ( options.max !== null && value > options.max) { 12729return options.max; 12730} 12731if ( options.min !== null && value < options.min ) { 12732return options.min; 12733} 12734return value; 12735}, 12736_stop: function( event ) { 12737if ( !this.spinning ) { 12738return; 12739} 12740clearTimeout( this.timer ); 12741clearTimeout( this.mousewheelTimer ); 12742this.counter = 0; 12743this.spinning = false; 12744this._trigger( "stop", event ); 12745}, 12746_setOption: function( key, value ) { 12747if ( key === "culture" || key === "numberFormat" ) { 12748var prevValue = this._parse( this.element.val() ); 12749this.options[ key ] = value; 12750this.element.val( this._format( prevValue ) ); 12751return; 12752} 12753if ( key === "max" || key === "min" || key === "step" ) { 12754if ( typeof value === "string" ) { 12755value = this._parse( value ); 12756} 12757} 12758if ( key === "icons" ) { 12759this.buttons.first().find( ".ui-icon" ) 12760.removeClass( this.options.icons.up ) 12761.addClass( value.up ); 12762this.buttons.last().find( ".ui-icon" ) 12763.removeClass( this.options.icons.down ) 12764.addClass( value.down ); 12765} 12766this._super( key, value ); 12767if ( key === "disabled" ) { 12768this.widget().toggleClass( "ui-state-disabled", !!value ); 12769this.element.prop( "disabled", !!value ); 12770this.buttons.button( value ? "disable" : "enable" ); 12771} 12772}, 12773_setOptions: spinner_modifier(function( options ) { 12774this._super( options ); 12775}), 12776_parse: function( val ) { 12777if ( typeof val === "string" && val !== "" ) { 12778val = window.Globalize && this.options.numberFormat ? 12779Globalize.parseFloat( val, 10, this.options.culture ) : +val; 12780} 12781return val === "" || isNaN( val ) ? null : val; 12782}, 12783_format: function( value ) { 12784if ( value === "" ) { 12785return ""; 12786} 12787return window.Globalize && this.options.numberFormat ? 12788Globalize.format( value, this.options.numberFormat, this.options.culture ) : 12789value; 12790}, 12791_refresh: function() { 12792this.element.attr({ 12793"aria-valuemin": this.options.min, 12794"aria-valuemax": this.options.max, 12795"aria-valuenow": this._parse( this.element.val() ) 12796}); 12797}, 12798isValid: function() { 12799var value = this.value(); 12800if ( value === null ) { 12801return false; 12802} 12803return value === this._adjustValue( value ); 12804}, 12805_value: function( value, allowAny ) { 12806var parsed; 12807if ( value !== "" ) { 12808parsed = this._parse( value ); 12809if ( parsed !== null ) { 12810if ( !allowAny ) { 12811parsed = this._adjustValue( parsed ); 12812} 12813value = this._format( parsed ); 12814} 12815} 12816this.element.val( value ); 12817this._refresh(); 12818}, 12819_destroy: function() { 12820this.element 12821.removeClass( "ui-spinner-input" ) 12822.prop( "disabled", false ) 12823.removeAttr( "autocomplete" ) 12824.removeAttr( "role" ) 12825.removeAttr( "aria-valuemin" ) 12826.removeAttr( "aria-valuemax" ) 12827.removeAttr( "aria-valuenow" ); 12828this.uiSpinner.replaceWith( this.element ); 12829}, 12830stepUp: spinner_modifier(function( steps ) { 12831this._stepUp( steps ); 12832}), 12833_stepUp: function( steps ) { 12834if ( this._start() ) { 12835this._spin( (steps || 1) * this.options.step ); 12836this._stop(); 12837} 12838}, 12839stepDown: spinner_modifier(function( steps ) { 12840this._stepDown( steps ); 12841}), 12842_stepDown: function( steps ) { 12843if ( this._start() ) { 12844this._spin( (steps || 1) * -this.options.step ); 12845this._stop(); 12846} 12847}, 12848pageUp: spinner_modifier(function( pages ) { 12849this._stepUp( (pages || 1) * this.options.page ); 12850}), 12851pageDown: spinner_modifier(function( pages ) { 12852this._stepDown( (pages || 1) * this.options.page ); 12853}), 12854value: function( newVal ) { 12855if ( !arguments.length ) { 12856return this._parse( this.element.val() ); 12857} 12858spinner_modifier( this._value ).call( this, newVal ); 12859}, 12860widget: function() { 12861return this.uiSpinner; 12862} 12863}); 12864var tabs = $.widget( "ui.tabs", { 12865version: "1.11.4", 12866delay: 300, 12867options: { 12868active: null, 12869collapsible: false, 12870event: "click", 12871heightStyle: "content", 12872hide: null, 12873show: null, 12874activate: null, 12875beforeActivate: null, 12876beforeLoad: null, 12877load: null 12878}, 12879_isLocal: (function() { 12880var rhash = /#.*$/; 12881return function( anchor ) { 12882var anchorUrl, locationUrl; 12883anchor = anchor.cloneNode( false ); 12884anchorUrl = anchor.href.replace( rhash, "" ); 12885locationUrl = location.href.replace( rhash, "" ); 12886try { 12887anchorUrl = decodeURIComponent( anchorUrl ); 12888} catch ( error ) {} 12889try { 12890locationUrl = decodeURIComponent( locationUrl ); 12891} catch ( error ) {} 12892return anchor.hash.length > 1 && anchorUrl === locationUrl; 12893}; 12894})(), 12895_create: function() { 12896var that = this, 12897options = this.options; 12898this.running = false; 12899this.element 12900.addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" ) 12901.toggleClass( "ui-tabs-collapsible", options.collapsible ); 12902this._processTabs(); 12903options.active = this._initialActive(); 12904if ( $.isArray( options.disabled ) ) { 12905options.disabled = $.unique( options.disabled.concat( 12906$.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) { 12907return that.tabs.index( li ); 12908}) 12909) ).sort(); 12910} 12911if ( this.options.active !== false && this.anchors.length ) { 12912this.active = this._findActive( options.active ); 12913} else { 12914this.active = $(); 12915} 12916this._refresh(); 12917if ( this.active.length ) { 12918this.load( options.active ); 12919} 12920}, 12921_initialActive: function() { 12922var active = this.options.active, 12923collapsible = this.options.collapsible, 12924locationHash = location.hash.substring( 1 ); 12925if ( active === null ) { 12926if ( locationHash ) { 12927this.tabs.each(function( i, tab ) { 12928if ( $( tab ).attr( "aria-controls" ) === locationHash ) { 12929active = i; 12930return false;
vendor: 22,528 bytes, lines 12931-13804
12931} 12932}); 12933} 12934if ( active === null ) { 12935active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) ); 12936} 12937if ( active === null || active === -1 ) { 12938active = this.tabs.length ? 0 : false; 12939} 12940} 12941if ( active !== false ) { 12942active = this.tabs.index( this.tabs.eq( active ) ); 12943if ( active === -1 ) { 12944active = collapsible ? false : 0; 12945} 12946} 12947if ( !collapsible && active === false && this.anchors.length ) { 12948active = 0; 12949} 12950return active; 12951}, 12952_getCreateEventData: function() { 12953return { 12954tab: this.active, 12955panel: !this.active.length ? $() : this._getPanelForTab( this.active ) 12956}; 12957}, 12958_tabKeydown: function( event ) { 12959var focusedTab = $( this.document[0].activeElement ).closest( "li" ), 12960selectedIndex = this.tabs.index( focusedTab ), 12961goingForward = true; 12962if ( this._handlePageNav( event ) ) { 12963return; 12964} 12965switch ( event.keyCode ) { 12966case $.ui.keyCode.RIGHT: 12967case $.ui.keyCode.DOWN: 12968selectedIndex++; 12969break; 12970case $.ui.keyCode.UP: 12971case $.ui.keyCode.LEFT: 12972goingForward = false; 12973selectedIndex--; 12974break; 12975case $.ui.keyCode.END: 12976selectedIndex = this.anchors.length - 1; 12977break; 12978case $.ui.keyCode.HOME: 12979selectedIndex = 0; 12980break; 12981case $.ui.keyCode.SPACE: 12982event.preventDefault(); 12983clearTimeout( this.activating ); 12984this._activate( selectedIndex ); 12985return; 12986case $.ui.keyCode.ENTER: 12987event.preventDefault(); 12988clearTimeout( this.activating ); 12989this._activate( selectedIndex === this.options.active ? false : selectedIndex ); 12990return; 12991default: 12992return; 12993} 12994event.preventDefault(); 12995clearTimeout( this.activating ); 12996selectedIndex = this._focusNextTab( selectedIndex, goingForward ); 12997if ( !event.ctrlKey && !event.metaKey ) { 12998focusedTab.attr( "aria-selected", "false" ); 12999this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" ); 13000this.activating = this._delay(function() { 13001this.option( "active", selectedIndex ); 13002}, this.delay ); 13003} 13004}, 13005_panelKeydown: function( event ) { 13006if ( this._handlePageNav( event ) ) { 13007return; 13008} 13009if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) { 13010event.preventDefault(); 13011this.active.focus(); 13012} 13013}, 13014_handlePageNav: function( event ) { 13015if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) { 13016this._activate( this._focusNextTab( this.options.active - 1, false ) ); 13017return true; 13018} 13019if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) { 13020this._activate( this._focusNextTab( this.options.active + 1, true ) ); 13021return true; 13022} 13023}, 13024_findNextTab: function( index, goingForward ) { 13025var lastTabIndex = this.tabs.length - 1; 13026function constrain() { 13027if ( index > lastTabIndex ) { 13028index = 0; 13029} 13030if ( index < 0 ) { 13031index = lastTabIndex; 13032} 13033return index; 13034} 13035while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) { 13036index = goingForward ? index + 1 : index - 1; 13037} 13038return index; 13039}, 13040_focusNextTab: function( index, goingForward ) { 13041index = this._findNextTab( index, goingForward ); 13042this.tabs.eq( index ).focus(); 13043return index; 13044}, 13045_setOption: function( key, value ) { 13046if ( key === "active" ) { 13047this._activate( value ); 13048return; 13049} 13050if ( key === "disabled" ) { 13051this._setupDisabled( value ); 13052return; 13053} 13054this._super( key, value); 13055if ( key === "collapsible" ) { 13056this.element.toggleClass( "ui-tabs-collapsible", value ); 13057if ( !value && this.options.active === false ) { 13058this._activate( 0 ); 13059} 13060} 13061if ( key === "event" ) { 13062this._setupEvents( value ); 13063} 13064if ( key === "heightStyle" ) { 13065this._setupHeightStyle( value ); 13066} 13067}, 13068_sanitizeSelector: function( hash ) { 13069return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : ""; 13070}, 13071refresh: function() { 13072var options = this.options, 13073lis = this.tablist.children( ":has(a[href])" ); 13074options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) { 13075return lis.index( tab ); 13076}); 13077this._processTabs(); 13078if ( options.active === false || !this.anchors.length ) { 13079options.active = false; 13080this.active = $(); 13081} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) { 13082if ( this.tabs.length === options.disabled.length ) { 13083options.active = false; 13084this.active = $(); 13085} else { 13086this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) ); 13087} 13088} else { 13089options.active = this.tabs.index( this.active ); 13090} 13091this._refresh(); 13092}, 13093_refresh: function() { 13094this._setupDisabled( this.options.disabled ); 13095this._setupEvents( this.options.event ); 13096this._setupHeightStyle( this.options.heightStyle ); 13097this.tabs.not( this.active ).attr({ 13098"aria-selected": "false", 13099"aria-expanded": "false", 13100tabIndex: -1 13101}); 13102this.panels.not( this._getPanelForTab( this.active ) ) 13103.hide() 13104.attr({ 13105"aria-hidden": "true" 13106}); 13107if ( !this.active.length ) { 13108this.tabs.eq( 0 ).attr( "tabIndex", 0 ); 13109} else { 13110this.active 13111.addClass( "ui-tabs-active ui-state-active" ) 13112.attr({ 13113"aria-selected": "true", 13114"aria-expanded": "true", 13115tabIndex: 0 13116}); 13117this._getPanelForTab( this.active ) 13118.show() 13119.attr({ 13120"aria-hidden": "false" 13121}); 13122} 13123}, 13124_processTabs: function() { 13125var that = this, 13126prevTabs = this.tabs, 13127prevAnchors = this.anchors, 13128prevPanels = this.panels; 13129this.tablist = this._getList() 13130.addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) 13131.attr( "role", "tablist" ) 13132.delegate( "> li", "mousedown" + this.eventNamespace, function( event ) { 13133if ( $( this ).is( ".ui-state-disabled" ) ) { 13134event.preventDefault(); 13135} 13136}) 13137.delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() { 13138if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) { 13139this.blur(); 13140} 13141}); 13142this.tabs = this.tablist.find( "> li:has(a[href])" ) 13143.addClass( "ui-state-default ui-corner-top" ) 13144.attr({ 13145role: "tab", 13146tabIndex: -1 13147}); 13148this.anchors = this.tabs.map(function() { 13149return $( "a", this )[ 0 ]; 13150}) 13151.addClass( "ui-tabs-anchor" ) 13152.attr({ 13153role: "presentation", 13154tabIndex: -1 13155}); 13156this.panels = $(); 13157this.anchors.each(function( i, anchor ) { 13158var selector, panel, panelId, 13159anchorId = $( anchor ).uniqueId().attr( "id" ), 13160tab = $( anchor ).closest( "li" ), 13161originalAriaControls = tab.attr( "aria-controls" ); 13162if ( that._isLocal( anchor ) ) { 13163selector = anchor.hash; 13164panelId = selector.substring( 1 ); 13165panel = that.element.find( that._sanitizeSelector( selector ) ); 13166} else { 13167panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id; 13168selector = "#" + panelId; 13169panel = that.element.find( selector ); 13170if ( !panel.length ) { 13171panel = that._createPanel( panelId ); 13172panel.insertAfter( that.panels[ i - 1 ] || that.tablist ); 13173} 13174panel.attr( "aria-live", "polite" ); 13175} 13176if ( panel.length) { 13177that.panels = that.panels.add( panel ); 13178} 13179if ( originalAriaControls ) { 13180tab.data( "ui-tabs-aria-controls", originalAriaControls ); 13181} 13182tab.attr({ 13183"aria-controls": panelId, 13184"aria-labelledby": anchorId 13185}); 13186panel.attr( "aria-labelledby", anchorId ); 13187}); 13188this.panels 13189.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) 13190.attr( "role", "tabpanel" ); 13191if ( prevTabs ) { 13192this._off( prevTabs.not( this.tabs ) ); 13193this._off( prevAnchors.not( this.anchors ) ); 13194this._off( prevPanels.not( this.panels ) ); 13195} 13196}, 13197_getList: function() { 13198return this.tablist || this.element.find( "ol,ul" ).eq( 0 ); 13199}, 13200_createPanel: function( id ) { 13201return $( "<div>" ) 13202.attr( "id", id ) 13203.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) 13204.data( "ui-tabs-destroy", true ); 13205}, 13206_setupDisabled: function( disabled ) { 13207if ( $.isArray( disabled ) ) { 13208if ( !disabled.length ) { 13209disabled = false; 13210} else if ( disabled.length === this.anchors.length ) { 13211disabled = true; 13212} 13213} 13214for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) { 13215if ( disabled === true || $.inArray( i, disabled ) !== -1 ) { 13216$( li ) 13217.addClass( "ui-state-disabled" ) 13218.attr( "aria-disabled", "true" ); 13219} else { 13220$( li ) 13221.removeClass( "ui-state-disabled" ) 13222.removeAttr( "aria-disabled" ); 13223} 13224} 13225this.options.disabled = disabled; 13226}, 13227_setupEvents: function( event ) { 13228var events = {}; 13229if ( event ) { 13230$.each( event.split(" "), function( index, eventName ) { 13231events[ eventName ] = "_eventHandler"; 13232}); 13233} 13234this._off( this.anchors.add( this.tabs ).add( this.panels ) ); 13235this._on( true, this.anchors, { 13236click: function( event ) { 13237event.preventDefault(); 13238} 13239}); 13240this._on( this.anchors, events ); 13241this._on( this.tabs, { keydown: "_tabKeydown" } ); 13242this._on( this.panels, { keydown: "_panelKeydown" } ); 13243this._focusable( this.tabs ); 13244this._hoverable( this.tabs ); 13245}, 13246_setupHeightStyle: function( heightStyle ) { 13247var maxHeight, 13248parent = this.element.parent(); 13249if ( heightStyle === "fill" ) { 13250maxHeight = parent.height(); 13251maxHeight -= this.element.outerHeight() - this.element.height(); 13252this.element.siblings( ":visible" ).each(function() { 13253var elem = $( this ), 13254position = elem.css( "position" ); 13255if ( position === "absolute" || position === "fixed" ) { 13256return; 13257} 13258maxHeight -= elem.outerHeight( true ); 13259}); 13260this.element.children().not( this.panels ).each(function() { 13261maxHeight -= $( this ).outerHeight( true ); 13262}); 13263this.panels.each(function() { 13264$( this ).height( Math.max( 0, maxHeight - 13265$( this ).innerHeight() + $( this ).height() ) ); 13266}) 13267.css( "overflow", "auto" ); 13268} else if ( heightStyle === "auto" ) { 13269maxHeight = 0; 13270this.panels.each(function() { 13271maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() ); 13272}).height( maxHeight ); 13273} 13274}, 13275_eventHandler: function( event ) { 13276var options = this.options, 13277active = this.active, 13278anchor = $( event.currentTarget ), 13279tab = anchor.closest( "li" ), 13280clickedIsActive = tab[ 0 ] === active[ 0 ], 13281collapsing = clickedIsActive && options.collapsible, 13282toShow = collapsing ? $() : this._getPanelForTab( tab ), 13283toHide = !active.length ? $() : this._getPanelForTab( active ), 13284eventData = { 13285oldTab: active, 13286oldPanel: toHide, 13287newTab: collapsing ? $() : tab, 13288newPanel: toShow 13289}; 13290event.preventDefault(); 13291if ( tab.hasClass( "ui-state-disabled" ) || 13292tab.hasClass( "ui-tabs-loading" ) || 13293this.running || 13294( clickedIsActive && !options.collapsible ) || 13295( this._trigger( "beforeActivate", event, eventData ) === false ) ) { 13296return; 13297} 13298options.active = collapsing ? false : this.tabs.index( tab ); 13299this.active = clickedIsActive ? $() : tab; 13300if ( this.xhr ) { 13301this.xhr.abort(); 13302} 13303if ( !toHide.length && !toShow.length ) { 13304$.error( "jQuery UI Tabs: Mismatching fragment identifier." ); 13305} 13306if ( toShow.length ) { 13307this.load( this.tabs.index( tab ), event ); 13308} 13309this._toggle( event, eventData ); 13310}, 13311_toggle: function( event, eventData ) { 13312var that = this, 13313toShow = eventData.newPanel, 13314toHide = eventData.oldPanel; 13315this.running = true; 13316function complete() { 13317that.running = false; 13318that._trigger( "activate", event, eventData ); 13319} 13320function show() { 13321eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" ); 13322if ( toShow.length && that.options.show ) { 13323that._show( toShow, that.options.show, complete ); 13324} else { 13325toShow.show(); 13326complete(); 13327} 13328} 13329if ( toHide.length && this.options.hide ) { 13330this._hide( toHide, this.options.hide, function() { 13331eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); 13332show(); 13333}); 13334} else { 13335eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); 13336toHide.hide(); 13337show(); 13338} 13339toHide.attr( "aria-hidden", "true" ); 13340eventData.oldTab.attr({ 13341"aria-selected": "false", 13342"aria-expanded": "false" 13343}); 13344if ( toShow.length && toHide.length ) { 13345eventData.oldTab.attr( "tabIndex", -1 ); 13346} else if ( toShow.length ) { 13347this.tabs.filter(function() { 13348return $( this ).attr( "tabIndex" ) === 0; 13349}) 13350.attr( "tabIndex", -1 ); 13351} 13352toShow.attr( "aria-hidden", "false" ); 13353eventData.newTab.attr({ 13354"aria-selected": "true", 13355"aria-expanded": "true", 13356tabIndex: 0 13357}); 13358}, 13359_activate: function( index ) { 13360var anchor, 13361active = this._findActive( index ); 13362if ( active[ 0 ] === this.active[ 0 ] ) { 13363return; 13364} 13365if ( !active.length ) { 13366active = this.active; 13367} 13368anchor = active.find( ".ui-tabs-anchor" )[ 0 ]; 13369this._eventHandler({ 13370target: anchor, 13371currentTarget: anchor, 13372preventDefault: $.noop 13373}); 13374}, 13375_findActive: function( index ) { 13376return index === false ? $() : this.tabs.eq( index ); 13377}, 13378_getIndex: function( index ) { 13379if ( typeof index === "string" ) { 13380index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) ); 13381} 13382return index; 13383}, 13384_destroy: function() { 13385if ( this.xhr ) { 13386this.xhr.abort(); 13387} 13388this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" ); 13389this.tablist 13390.removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) 13391.removeAttr( "role" ); 13392this.anchors 13393.removeClass( "ui-tabs-anchor" ) 13394.removeAttr( "role" ) 13395.removeAttr( "tabIndex" ) 13396.removeUniqueId(); 13397this.tablist.unbind( this.eventNamespace ); 13398this.tabs.add( this.panels ).each(function() { 13399if ( $.data( this, "ui-tabs-destroy" ) ) { 13400$( this ).remove(); 13401} else { 13402$( this ) 13403.removeClass( "ui-state-default ui-state-active ui-state-disabled " + 13404"ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" ) 13405.removeAttr( "tabIndex" ) 13406.removeAttr( "aria-live" ) 13407.removeAttr( "aria-busy" ) 13408.removeAttr( "aria-selected" ) 13409.removeAttr( "aria-labelledby" ) 13410.removeAttr( "aria-hidden" ) 13411.removeAttr( "aria-expanded" ) 13412.removeAttr( "role" ); 13413} 13414}); 13415this.tabs.each(function() { 13416var li = $( this ), 13417prev = li.data( "ui-tabs-aria-controls" ); 13418if ( prev ) { 13419li 13420.attr( "aria-controls", prev ) 13421.removeData( "ui-tabs-aria-controls" ); 13422} else { 13423li.removeAttr( "aria-controls" ); 13424} 13425}); 13426this.panels.show(); 13427if ( this.options.heightStyle !== "content" ) { 13428this.panels.css( "height", "" ); 13429} 13430}, 13431enable: function( index ) { 13432var disabled = this.options.disabled; 13433if ( disabled === false ) { 13434return; 13435} 13436if ( index === undefined ) { 13437disabled = false; 13438} else { 13439index = this._getIndex( index ); 13440if ( $.isArray( disabled ) ) { 13441disabled = $.map( disabled, function( num ) { 13442return num !== index ? num : null; 13443}); 13444} else { 13445disabled = $.map( this.tabs, function( li, num ) { 13446return num !== index ? num : null; 13447}); 13448} 13449} 13450this._setupDisabled( disabled ); 13451}, 13452disable: function( index ) { 13453var disabled = this.options.disabled; 13454if ( disabled === true ) { 13455return; 13456} 13457if ( index === undefined ) { 13458disabled = true; 13459} else { 13460index = this._getIndex( index ); 13461if ( $.inArray( index, disabled ) !== -1 ) { 13462return; 13463} 13464if ( $.isArray( disabled ) ) { 13465disabled = $.merge( [ index ], disabled ).sort(); 13466} else { 13467disabled = [ index ]; 13468} 13469} 13470this._setupDisabled( disabled ); 13471}, 13472load: function( index, event ) { 13473index = this._getIndex( index ); 13474var that = this, 13475tab = this.tabs.eq( index ), 13476anchor = tab.find( ".ui-tabs-anchor" ), 13477panel = this._getPanelForTab( tab ), 13478eventData = { 13479tab: tab, 13480panel: panel 13481}, 13482complete = function( jqXHR, status ) { 13483if ( status === "abort" ) { 13484that.panels.stop( false, true ); 13485} 13486tab.removeClass( "ui-tabs-loading" ); 13487panel.removeAttr( "aria-busy" ); 13488if ( jqXHR === that.xhr ) { 13489delete that.xhr; 13490} 13491}; 13492if ( this._isLocal( anchor[ 0 ] ) ) { 13493return; 13494} 13495this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) ); 13496if ( this.xhr && this.xhr.statusText !== "canceled" ) { 13497tab.addClass( "ui-tabs-loading" ); 13498panel.attr( "aria-busy", "true" ); 13499this.xhr 13500.done(function( response, status, jqXHR ) { 13501setTimeout(function() { 13502panel.html( response ); 13503that._trigger( "load", event, eventData ); 13504complete( jqXHR, status ); 13505}, 1 ); 13506}) 13507.fail(function( jqXHR, status ) { 13508setTimeout(function() { 13509complete( jqXHR, status ); 13510}, 1 ); 13511}); 13512} 13513}, 13514_ajaxSettings: function( anchor, event, eventData ) { 13515var that = this; 13516return { 13517url: anchor.attr( "href" ), 13518beforeSend: function( jqXHR, settings ) { 13519return that._trigger( "beforeLoad", event, 13520$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) ); 13521} 13522}; 13523}, 13524_getPanelForTab: function( tab ) { 13525var id = $( tab ).attr( "aria-controls" ); 13526return this.element.find( this._sanitizeSelector( "#" + id ) ); 13527} 13528}); 13529var tooltip = $.widget( "ui.tooltip", { 13530version: "1.11.4", 13531options: { 13532content: function() { 13533var title = $( this ).attr( "title" ) || ""; 13534return $( "<a>" ).text( title ).html(); 13535}, 13536hide: true, 13537items: "[title]:not([disabled])", 13538position: { 13539my: "left top+15", 13540at: "left bottom", 13541collision: "flipfit flip" 13542}, 13543show: true, 13544tooltipClass: null, 13545track: false, 13546close: null, 13547open: null 13548}, 13549_addDescribedBy: function( elem, id ) { 13550var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ); 13551describedby.push( id ); 13552elem 13553.data( "ui-tooltip-id", id ) 13554.attr( "aria-describedby", $.trim( describedby.join( " " ) ) ); 13555}, 13556_removeDescribedBy: function( elem ) { 13557var id = elem.data( "ui-tooltip-id" ), 13558describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ), 13559index = $.inArray( id, describedby ); 13560if ( index !== -1 ) { 13561describedby.splice( index, 1 ); 13562} 13563elem.removeData( "ui-tooltip-id" ); 13564describedby = $.trim( describedby.join( " " ) ); 13565if ( describedby ) { 13566elem.attr( "aria-describedby", describedby ); 13567} else { 13568elem.removeAttr( "aria-describedby" ); 13569} 13570}, 13571_create: function() { 13572this._on({ 13573mouseover: "open", 13574focusin: "open" 13575}); 13576this.tooltips = {}; 13577this.parents = {}; 13578if ( this.options.disabled ) { 13579this._disable(); 13580} 13581this.liveRegion = $( "<div>" ) 13582.attr({ 13583role: "log", 13584"aria-live": "assertive", 13585"aria-relevant": "additions" 13586}) 13587.addClass( "ui-helper-hidden-accessible" ) 13588.appendTo( this.document[ 0 ].body ); 13589}, 13590_setOption: function( key, value ) { 13591var that = this; 13592if ( key === "disabled" ) { 13593this[ value ? "_disable" : "_enable" ](); 13594this.options[ key ] = value; 13595return; 13596} 13597this._super( key, value ); 13598if ( key === "content" ) { 13599$.each( this.tooltips, function( id, tooltipData ) { 13600that._updateContent( tooltipData.element ); 13601}); 13602} 13603}, 13604_disable: function() { 13605var that = this; 13606$.each( this.tooltips, function( id, tooltipData ) { 13607var event = $.Event( "blur" ); 13608event.target = event.currentTarget = tooltipData.element[ 0 ]; 13609that.close( event, true ); 13610}); 13611this.element.find( this.options.items ).addBack().each(function() { 13612var element = $( this ); 13613if ( element.is( "[title]" ) ) { 13614element 13615.data( "ui-tooltip-title", element.attr( "title" ) ) 13616.removeAttr( "title" ); 13617} 13618}); 13619}, 13620_enable: function() { 13621this.element.find( this.options.items ).addBack().each(function() { 13622var element = $( this ); 13623if ( element.data( "ui-tooltip-title" ) ) { 13624element.attr( "title", element.data( "ui-tooltip-title" ) ); 13625} 13626}); 13627}, 13628open: function( event ) { 13629var that = this, 13630target = $( event ? event.target : this.element ) 13631.closest( this.options.items ); 13632if ( !target.length || target.data( "ui-tooltip-id" ) ) { 13633return; 13634} 13635if ( target.attr( "title" ) ) { 13636target.data( "ui-tooltip-title", target.attr( "title" ) ); 13637} 13638target.data( "ui-tooltip-open", true ); 13639if ( event && event.type === "mouseover" ) { 13640target.parents().each(function() { 13641var parent = $( this ), 13642blurEvent; 13643if ( parent.data( "ui-tooltip-open" ) ) { 13644blurEvent = $.Event( "blur" ); 13645blurEvent.target = blurEvent.currentTarget = this; 13646that.close( blurEvent, true ); 13647} 13648if ( parent.attr( "title" ) ) { 13649parent.uniqueId(); 13650that.parents[ this.id ] = { 13651element: this, 13652title: parent.attr( "title" ) 13653}; 13654parent.attr( "title", "" ); 13655} 13656}); 13657} 13658this._registerCloseHandlers( event, target ); 13659this._updateContent( target, event ); 13660}, 13661_updateContent: function( target, event ) { 13662var content, 13663contentOption = this.options.content, 13664that = this, 13665eventType = event ? event.type : null; 13666if ( typeof contentOption === "string" ) { 13667return this._open( event, target, contentOption ); 13668} 13669content = contentOption.call( target[0], function( response ) { 13670that._delay(function() { 13671if ( !target.data( "ui-tooltip-open" ) ) { 13672return; 13673} 13674if ( event ) { 13675event.type = eventType; 13676} 13677this._open( event, target, response ); 13678}); 13679}); 13680if ( content ) { 13681this._open( event, target, content ); 13682} 13683}, 13684_open: function( event, target, content ) { 13685var tooltipData, tooltip, delayedShow, a11yContent, 13686positionOption = $.extend( {}, this.options.position ); 13687if ( !content ) { 13688return; 13689} 13690tooltipData = this._find( target ); 13691if ( tooltipData ) { 13692tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content ); 13693return; 13694} 13695if ( target.is( "[title]" ) ) { 13696if ( event && event.type === "mouseover" ) { 13697target.attr( "title", "" ); 13698} else { 13699target.removeAttr( "title" ); 13700} 13701} 13702tooltipData = this._tooltip( target ); 13703tooltip = tooltipData.tooltip; 13704this._addDescribedBy( target, tooltip.attr( "id" ) ); 13705tooltip.find( ".ui-tooltip-content" ).html( content ); 13706this.liveRegion.children().hide(); 13707if ( content.clone ) { 13708a11yContent = content.clone(); 13709a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" ); 13710} else { 13711a11yContent = content; 13712} 13713$( "<div>" ).html( a11yContent ).appendTo( this.liveRegion ); 13714function position( event ) { 13715positionOption.of = event; 13716if ( tooltip.is( ":hidden" ) ) { 13717return; 13718} 13719tooltip.position( positionOption ); 13720} 13721if ( this.options.track && event && /^mouse/.test( event.type ) ) { 13722this._on( this.document, { 13723mousemove: position 13724}); 13725position( event ); 13726} else { 13727tooltip.position( $.extend({ 13728of: target 13729}, this.options.position ) ); 13730} 13731tooltip.hide(); 13732this._show( tooltip, this.options.show ); 13733if ( this.options.show && this.options.show.delay ) { 13734delayedShow = this.delayedShow = setInterval(function() { 13735if ( tooltip.is( ":visible" ) ) { 13736position( positionOption.of ); 13737clearInterval( delayedShow ); 13738} 13739}, $.fx.interval ); 13740} 13741this._trigger( "open", event, { tooltip: tooltip } ); 13742}, 13743_registerCloseHandlers: function( event, target ) { 13744var events = { 13745keyup: function( event ) { 13746if ( event.keyCode === $.ui.keyCode.ESCAPE ) { 13747var fakeEvent = $.Event(event); 13748fakeEvent.currentTarget = target[0]; 13749this.close( fakeEvent, true ); 13750} 13751} 13752}; 13753if ( target[ 0 ] !== this.element[ 0 ] ) { 13754events.remove = function() { 13755this._removeTooltip( this._find( target ).tooltip ); 13756}; 13757} 13758if ( !event || event.type === "mouseover" ) { 13759events.mouseleave = "close"; 13760} 13761if ( !event || event.type === "focusin" ) { 13762events.focusout = "close"; 13763} 13764this._on( true, target, events ); 13765}, 13766close: function( event ) { 13767var tooltip, 13768that = this, 13769target = $( event ? event.currentTarget : this.element ), 13770tooltipData = this._find( target ); 13771if ( !tooltipData ) { 13772target.removeData( "ui-tooltip-open" ); 13773return; 13774} 13775tooltip = tooltipData.tooltip; 13776if ( tooltipData.closing ) { 13777return; 13778} 13779clearInterval( this.delayedShow ); 13780if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) { 13781target.attr( "title", target.data( "ui-tooltip-title" ) ); 13782} 13783this._removeDescribedBy( target ); 13784tooltipData.hiding = true; 13785tooltip.stop( true ); 13786this._hide( tooltip, this.options.hide, function() { 13787that._removeTooltip( $( this ) ); 13788}); 13789target.removeData( "ui-tooltip-open" ); 13790this._off( target, "mouseleave focusout keyup" ); 13791if ( target[ 0 ] !== this.element[ 0 ] ) { 13792this._off( target, "remove" ); 13793} 13794this._off( this.document, "mousemove" ); 13795if ( event && event.type === "mouseleave" ) { 13796$.each( this.parents, function( id, parent ) { 13797$( parent.element ).attr( "title", parent.title ); 13798delete that.parents[ id ]; 13799}); 13800} 13801tooltipData.closing = true; 13802this._trigger( "close", event, { tooltip: tooltip } ); 13803if ( !tooltipData.hiding ) { 13804tooltipData.closing = false;
13805} 13806}, 13807_tooltip: function( element ) { 13808var tooltip = $( "<div>" ) 13809.attr( "role", "tooltip" ) 13810.addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " + 13811( this.options.tooltipClass || "" ) ), 13812id = tooltip.uniqueId().attr( "id" ); 13813$( "<div>" ) 13814.addClass( "ui-tooltip-content" ) 13815.appendTo( tooltip ); 13816tooltip.appendTo( this.document[0].body ); 13817return this.tooltips[ id ] = { 13818element: element, 13819tooltip: tooltip 13820}; 13821}, 13822_find: function( target ) { 13823var id = target.data( "ui-tooltip-id" ); 13824return id ? this.tooltips[ id ] : null; 13825}, 13826_removeTooltip: function( tooltip ) { 13827tooltip.remove(); 13828delete this.tooltips[ tooltip.attr( "id" ) ]; 13829}, 13830_destroy: function() { 13831var that = this; 13832$.each( this.tooltips, function( id, tooltipData ) { 13833var event = $.Event( "blur" ), 13834element = tooltipData.element; 13835event.target = event.currentTarget = element[ 0 ]; 13836that.close( event, true ); 13837$( "#" + id ).remove(); 13838if ( element.data( "ui-tooltip-title" ) ) { 13839if ( !element.attr( "title" ) ) { 13840element.attr( "title", element.data( "ui-tooltip-title" ) ); 13841} 13842element.removeData( "ui-tooltip-title" ); 13843} 13844}); 13845this.liveRegion.remove(); 13846} 13847}); 13848})); 13849var scrolltotop={ 13850setting: {startline:100, scrollto: 0, scrollduration:1000, fadeduration:[500, 100]}, 13851controlHTML: '',//<img src=\"exemples/scrolltop/retourhaut.png\" style=\"filter:alpha(opacity=70); -moz-opacity:0.7; width:40px; height:40px\" />', //HTML for control, which is auto wrapped in DIV w/ ID="topcontrol" 13852controlattrs: {offsetx:35, offsety:60}, //offset of control relative to right/ bottom of window corner 13853anchorkeyword: '#haut', //Enter href value of HTML anchors on the page that should also act as "Scroll Up" links 13854state: {isvisible:false, shouldvisible:false}, 13855scrollup:function(){ 13856if (!this.cssfixedsupport) //if control is positioned using JavaScript 13857this.$control.css({opacity:0}) //hide control immediately after clicking it 13858var dest=isNaN(this.setting.scrollto)? this.setting.scrollto : parseInt(this.setting.scrollto) 13859if (typeof dest=="string" && jQuery('#'+dest).length==1) //check element set by string exists 13860dest=jQuery('#'+dest).offset().top 13861else 13862dest=0 13863this.$body.animate({scrollTop: dest}, this.setting.scrollduration); 13864}, 13865keepfixed:function(){ 13866var $window=jQuery(window) 13867var controlx=$window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetx 13868var controly=$window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsety 13869this.$control.css({left:controlx+'px', top:controly+'px'}) 13870}, 13871togglecontrol:function(){ 13872var scrolltop=jQuery(window).scrollTop() 13873if (!this.cssfixedsupport) 13874this.keepfixed() 13875this.state.shouldvisible=(scrolltop>=this.setting.startline)? true : false 13876if (this.state.shouldvisible && !this.state.isvisible){ 13877this.$control.stop().animate({opacity:1}, this.setting.fadeduration[0]) 13878this.state.isvisible=true 13879} 13880else if (this.state.shouldvisible==false && this.state.isvisible){ 13881this.$control.stop().animate({opacity:0}
13881, this.setting.fadeduration[1]) 13882this.state.isvisible=false 13883} 13884}, 13885init:function(){ 13886jQuery(document).ready(function($){ 13887var mainobj=scrolltotop 13888var iebrws=document.all 13889mainobj.cssfixedsupport=!iebrws || iebrws && document.compatMode=="CSS1Compat" && window.XMLHttpRequest //not IE or IE7+ browsers in standards mode 13890mainobj.$body=(window.opera)? (document.compatMode=="CSS1Compat"? $('html') : $('body')) : $('html,body') 13891mainobj.$control=$('<div id="topcontrol">'+mainobj.controlHTML+'</div>') 13892.css({position:mainobj.cssfixedsupport? 'fixed' : 'absolute', bottom:mainobj.controlattrs.offsety, right:mainobj.controlattrs.offsetx, opacity:0, cursor:'pointer'}) 13893.attr({title:'back to top'}) 13894.click(function(){mainobj.scrollup(); return false}) 13895.appendTo('body') 13896if (document.all && !window.XMLHttpRequest && mainobj.$control.text()!='') //loose check for IE6 and below, plus whether control contains any text 13897mainobj.$control.css({width:mainobj.$control.width()}) //IE6- seems to require an explicit width on a DIV containing text 13898mainobj.togglecontrol() 13899$('a[href="' + mainobj.anchorkeyword +'"]').click(function(){ 13900mainobj.scrollup() 13901return false 13902}) 13903$(window).bind('scroll resize', function(e){ 13904mainobj.togglecontrol() 13905}) 13906}) 13907} 13908} 13909scrolltotop.init() 13910$(document).ready(function() { 13911$("#addFavoris").click(function() { 13912if (window.sidebar) { // Firefox 13913window.sidebar.addPanel(location.href,document.title,""); 13914} 13915else if(window.external) { // Internet explorer 13916window.external.AddFavorite(location.href,document.title); 13917} 13918else if(window.opera && window.print) { // Opera 13919this.title=document.title; 13920return true; 13921} 13922}) 13923}); 13924(function($) { 13925$.extend($.fn, { 13926validate: function( options ) { 13927if (!this.length) { 13928options && options.debug && window.console && console.warn( "nothing selected, can't validate, returning nothing" ); 13929return; 13930} 13931var validator = $.data(this[0], 'validator'); 13932if ( validator ) { 13933return validator; 13934} 13935validator = new $.validator( options, this[0] ); 13936$.data(this[0], 'validator', validator); 13937if ( validator.settings.onsubmit ) { 13938this.find("input, button").filter(".cancel").click(function() { 13939validator.cancelSubmit = true; 13940}); 13941if (validator.settings.submitHandler) { 13942this.find("input, button").filter(":submit").click(function() { 13943validator.submitButton = this; 13944}); 13945} 13946this.submit( function( event ) { 13947if ( validator.settings.debug ) 13948event.preventDefault(); 13949function handle() { 13950if ( validator.settings.submitHandler ) { 13951if (validator.submitButton) { 13952var hidden = $("<input type='hidden'/>").attr("name", validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm); 13953} 13954validator.settings.submitHandler.call( validator, validator.currentForm ); 13955if (validator.submitButton) { 13956hidden.remove(); 13957} 13958return false; 13959} 13960return true; 13961} 13962if ( validator.cancelSubmit ) { 13963validator.cancelSubmit = false; 13964return handle(); 13965} 13966if ( validator.form() ) { 13967if ( validator.pendingRequest ) { 13968validator.formSubmitted = true; 13969return false; 13970} 13971return handle(); 13972} else { 13973validator.focusInvalid(); 13974return false; 13975} 13976}); 13977} 13978return validator; 13979}, 13980valid: function() { 13981if ( $(this[0]).is('form')) { 13982return this.validate().form(); 13983} else { 13984var valid = true; 13985var validator = $(this[0].form).validate(); 13986this.each(function() { 13987valid &= validator.element(this); 13988}); 13989return valid; 13990} 13991}, 13992removeAttrs: function(attributes) { 13993var result = {}, 13994$element = this; 13995$.each(attributes.split(/\s/), function(index, value) { 13996result[value] = $element.attr(value); 13997$element.removeAttr(value); 13998}); 13999return result; 14000}, 14001rules: function(command, argument) { 14002var element = this[0]; 14003if (command) { 14004var settings = $.data(element.form, 'validator').settings; 14005var staticRules = settings.rules; 14006var existingRules = $.validator.staticRules(element); 14007switch(command) { 14008case "add": 14009$.extend(existingRules, $.validator.normalizeRule(argument)); 14010staticRules[element.name] = existingRules; 14011if (argument.messages) 14012settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages ); 14013break; 14014case "remove": 14015if (!argument) { 14016delete staticRules[element.name]; 14017return existingRules; 14018} 14019var filtered = {}; 14020$.each(argument.split(/\s/), function(index, method) { 14021filtered[method] = existingRules[method]; 14022delete existingRules[method]; 14023}); 14024return filtered; 14025} 14026} 14027var data = $.validator.normalizeRules( 14028$.extend( 14029{}, 14030$.validator.metadataRules(element), 14031$.validator.classRules(element), 14032$.validator.attributeRules(element), 14033$.validator.staticRules(element) 14034), element); 14035if (data.required) { 14036var param = data.required; 14037delete data.required; 14038data = $.extend({required: param}, data); 14039} 14040return data; 14041} 14042}); 14043$.extend($.expr[":"], {
14044blank: function(a) {return !$.trim("" + a.value);}, 14045filled: function(a) {return !!$.trim("" + a.value);}, 14046unchecked: function(a) {return !a.checked;} 14047}); 14048$.validator = function( options, form ) { 14049this.settings = $.extend( true, {}, $.validator.defaults, options ); 14050this.currentForm = form; 14051this.init(); 14052}; 14053$.validator.format = function(source, params) { 14054if ( arguments.length == 1 ) 14055return function() { 14056var args = $.makeArray(arguments); 14057args.unshift(source); 14058return $.validator.format.apply( this, args ); 14059}; 14060if ( arguments.length > 2 && params.constructor != Array ) { 14061params = $.makeArray(arguments).slice(1); 14062} 14063if ( params.constructor != Array ) { 14064params = [ params ]; 14065} 14066$.each(params, function(i, n) { 14067source = source.replace(new RegExp("\\{" + i + "\\}", "g"), n); 14068}); 14069return source; 14070}; 14071$.extend($.validator, { 14072defaults: { 14073messages: {}, 14074groups: {}, 14075rules: {}, 14076errorClass: "error", 14077validClass: "valid", 14078errorElement: "label", 14079focusInvalid: true, 14080errorContainer: $( [] ), 14081errorLabelContainer: $( [] ), 14082onsubmit: true, 14083ignore: [], 14084ignoreTitle: false, 14085onfocusin: function(element) { 14086this.lastActive = element; 14087if ( this.settings.focusCleanup && !this.blockFocusCleanup ) { 14088this.settings.unhighlight && this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass ); 14089this.addWrapper(this.errorsFor(element)).hide(); 14090} 14091}, 14092onfocusout: function(element) { 14093if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) { 14094this.element(element); 14095} 14096}, 14097onkeyup: function(element) { 14098if ( element.name in this.submitted || element == this.lastElement ) { 14099this.element(element); 14100} 14101}, 14102onclick: function(element) { 14103if ( element.name in this.submitted ) 14104this.element(element); 14105else if (element.parentNode.name in this.submitted) 14106this.element(element.parentNode); 14107}, 14108highlight: function(element, errorClass, validClass) { 14109if (element.type === 'radio') { 14110this.findByName(element.name).addClass(errorClass).removeClass(validClass); 14111} else { 14112$(element).addClass(errorClass).removeClass(validClass); 14113} 14114}, 14115unhighlight: function(element, errorClass, validClass) { 14116if (element.type === 'radio') { 14117this.findByName(element.name).removeClass(errorClass).addClass(validClass); 14118} else { 14119$(element).removeClass(errorClass).addClass(validClass); 14120} 14121} 14122}, 14123setDefaults: function(settings) { 14124$.extend( $.validator.defaults, settings ); 14125}, 14126messages: { 14127required: "Ce champ est requis.", 14128remote: "Please fix this field.", 14129email: "Entrez une adresse email valide.", 14130url: "Entrez une URL valide.", 14131date: "Entrez une date valide.", 14132dateISO: "Please enter a valid date (ISO).", 14133number: "Entrez un nombre valide, sans point ni virgule.", 14134digits: "Please enter only digits.", 14135creditcard: "Please enter a valid credit card number.", 14136equalTo: "Les valeurs entrées ne sont pas identiques.", 14137accept: "Please enter a value with a valid extension.", 14138maxlength: $.validator.format("Entrez une valeur moins longue."), 14139minlength: $.validator.format("Please enter at least {0} characters."), 14140rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."), 14141range: $.validator.format("Please enter a value between {0} and {1}."), 14142max: $.validator.format("Please enter a value less than or equal to {0}."), 14143min: $.validator.format("Please enter a value greater than or equal to {0}.") 14144}, 14145autoCreateRanges: false, 14146prototype: { 14147init: function() { 14148this.labelContainer = $(this.settings.errorLabelContainer); 14149this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm); 14150this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer ); 14151this.submitted = {}; 14152this.valueCache = {}; 14153this.pendingRequest = 0; 14154this.pending = {}; 14155this.invalid = {}; 14156this.reset(); 14157var groups = (this.groups = {}); 14158$.each(this.settings.groups, function(key, value) { 14159$.each(value.split(/\s/), function(index, name) { 14160groups[name] = key; 14161}); 14162}); 14163var rules = this.settings.rules; 14164$.each(rules, function(key, value) { 14165rules[key] = $.validator.normalizeRule(value); 14166}); 14167function delegate(event) { 14168var validator = $.data(this[0].form, "validator"), 14169eventType = "on" + event.type.replace(/^validate/, ""); 14170validator.settings[eventType] && validator.settings[eventType].call(validator, this[0] ); 14171} 14172$(this.currentForm) 14173.validateDelegate(":text, :password, :file, select, textarea", "focusin focusout keyup", delegate) 14174.validateDelegate(":radio, :checkbox, select, option", "click", delegate); 14175if (this.settings.invalidHandler) 14176$(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler); 14177}, 14178form: function() { 14179this.checkForm(); 14180$.extend(this.submitted, this.errorMap); 14181this.invalid = $.extend({}, this.errorMap); 14182if (!this.valid()) 14183$(this.currentForm).triggerHandler("invalid-form", [this]); 14184this.showErrors(); 14185return this.valid(); 14186}, 14187checkForm: function() { 14188this.prepareForm(); 14189for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) { 14190this.check( elements[i] ); 14191} 14192return this.valid(); 14193}, 14194element: function( element ) { 14195element = this.clean( element ); 14196this.lastElement = element; 14197this.prepareElement( element ); 14198this.currentElements = $(element); 14199var result = this.check( element ); 14200if ( result ) { 14201delete this.invalid[element.name]; 14202} else { 14203this.invalid[element.name] = true; 14204} 14205if ( !this.numberOfInvalids() ) { 14206this.toHide = this.toHide.add( this.containers ); 14207} 14208this.showErrors(); 14209return result; 14210}, 14211showErrors: function(errors) { 14212if(errors) { 14213$.extend( this.errorMap, errors ); 14214this.errorList = []; 14215for ( var name in errors ) { 14216this.errorList.push({ 14217message: errors[name], 14218element: this.findByName(name)[0] 14219}); 14220} 14221this.successList = $.grep( this.successList, function(element) { 14222return !(element.name in errors); 14223}); 14224} 14225this.settings.showErrors 14226? this.settings.showErrors.call( this, this.errorMap, this.errorList ) 14227: this.defaultShowErrors(); 14228}, 14229resetForm: function() { 14230if ( $.fn.resetForm ) 14231$( this.currentForm ).resetForm(); 14232this.submitted = {}; 14233this.prepareForm(); 14234this.hideErrors(); 14235this.elements().removeClass( this.settings.errorClass ); 14236}, 14237numberOfInvalids: function() { 14238return this.objectLength(this.invalid); 14239}, 14240objectLength: function( obj ) { 14241var count = 0; 14242for ( var i in obj ) 14243count++; 14244return count; 14245}, 14246hideErrors: function() { 14247this.addWrapper( this.toHide ).hide(); 14248}, 14249valid: function() { 14250return this.size() == 0; 14251}, 14252size: function() { 14253return this.errorList.length; 14254}, 14255focusInvalid: function() { 14256if( this.settings.focusInvalid ) { 14257try { 14258$(this.findLastActive() || this.errorList.length && this.errorList[0].element || []) 14259.filter(":visible") 14260.focus() 14261.trigger("focusin"); 14262} catch(e) { 14263} 14264} 14265}, 14266findLastActive: function() { 14267var lastActive = this.lastActive; 14268return lastActive && $.grep(this.errorList, function(n) { 14269return n.element.name == lastActive.name; 14270}).length == 1 && lastActive; 14271}, 14272elements: function() { 14273var validator = this, 14274rulesCache = {}; 14275return $(this.currentForm) 14276.find("input, select, textarea") 14277.not(":submit, :reset, :image, [disabled]") 14278.not( this.settings.ignore ) 14279.filter(function() { 14280!this.name && validator.settings.debug && window.console && console.error( "%o has no name assigned", this); 14281if ( this.name in rulesCache || !validator.objectLength($(this).rules()) ) 14282return false;
14283rulesCache[this.name] = true; 14284return true; 14285}); 14286}, 14287clean: function( selector ) { 14288return $( selector )[0]; 14289}, 14290errors: function() { 14291return $( this.settings.errorElement + "." + this.settings.errorClass, this.errorContext ); 14292}, 14293reset: function() { 14294this.successList = []; 14295this.errorList = []; 14296this.errorMap = {}; 14297this.toShow = $([]); 14298this.toHide = $([]); 14299this.currentElements = $([]); 14300}, 14301prepareForm: function() { 14302this.reset(); 14303this.toHide = this.errors().add( this.containers ); 14304}, 14305prepareElement: function( element ) { 14306this.reset(); 14307this.toHide = this.errorsFor(element); 14308}, 14309check: function( element ) { 14310element = this.clean( element ); 14311if (this.checkable(element)) { 14312element = this.findByName( element.name ).not(this.settings.ignore)[0]; 14313} 14314var rules = $(element).rules(); 14315var dependencyMismatch = false; 14316for (var method in rules ) { 14317var rule = { method: method, parameters: rules[method] }; 14318try { 14319var result = $.validator.methods[method].call( this, element.value.replace(/\r/g, ""), element, rule.parameters ); 14320if ( result == "dependency-mismatch" ) { 14321dependencyMismatch = true; 14322continue; 14323} 14324dependencyMismatch = false; 14325if ( result == "pending" ) { 14326this.toHide = this.toHide.not( this.errorsFor(element) ); 14327return; 14328} 14329if( !result ) { 14330this.formatAndAdd( element, rule ); 14331return false; 14332} 14333} catch(e) { 14334this.settings.debug && window.console && console.log("exception occured when checking element " + element.id 14335+ ", check the '" + rule.method + "' method", e); 14336throw e; 14337} 14338} 14339if (dependencyMismatch) 14340return; 14341if ( this.objectLength(rules) ) 14342this.successList.push(element); 14343return true; 14344}, 14345customMetaMessage: function(element, method) { 14346if (!$.metadata) 14347return; 14348var meta = this.settings.meta 14349? $(element).metadata()[this.settings.meta] 14350: $(element).metadata(); 14351return meta && meta.messages && meta.messages[method]; 14352}, 14353customMessage: function( name, method ) { 14354var m = this.settings.messages[name]; 14355return m && (m.constructor == String 14356? m 14357: m[method]); 14358}, 14359findDefined: function() { 14360for(var i = 0; i < arguments.length; i++) { 14361if (arguments[i] !== undefined) 14362return arguments[i]; 14363} 14364return undefined; 14365}, 14366defaultMessage: function( element, method) { 14367return this.findDefined( 14368this.customMessage( element.name, method ), 14369this.customMetaMessage( element, method ), 14370!this.settings.ignoreTitle && element.title || undefined, 14371$.validator.messages[method], 14372"<strong>Warning: No message defined for " + element.name + "</strong>" 14373); 14374}, 14375formatAndAdd: function( element, rule ) { 14376var message = this.defaultMessage( element, rule.method ), 14377theregex = /\$?\{(\d+)\}/g; 14378if ( typeof message == "function" ) { 14379message = message.call(this, rule.parameters, element); 14380} else if (theregex.test(message)) { 14381message = jQuery.format(message.replace(theregex, '{$1}'), rule.parameters); 14382} 14383this.errorList.push({ 14384message: message, 14385element: element 14386}); 14387this.errorMap[element.name] = message; 14388this.submitted[element.name] = message; 14389}, 14390addWrapper: function(toToggle) { 14391if ( this.settings.wrapper ) 14392toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) ); 14393return toToggle; 14394}, 14395defaultShowErrors: function() { 14396for ( var i = 0; this.errorList[i]; i++ ) { 14397var error = this.errorList[i]; 14398this.settings.highlight && this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass ); 14399this.showLabel( error.element, error.message ); 14400} 14401if( this.errorList.length ) { 14402this.toShow = this.toShow.add( this.containers ); 14403} 14404if (this.settings.success) { 14405for ( var i = 0; this.successList[i]; i++ ) { 14406this.showLabel( this.successList[i] ); 14407} 14408} 14409if (this.settings.unhighlight) { 14410for ( var i = 0, elements = this.validElements(); elements[i]; i++ ) { 14411this.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass ); 14412} 14413} 14414this.toHide = this.toHide.not( this.toShow ); 14415this.hideErrors(); 14416this.addWrapper( this.toShow ).show(); 14417}, 14418validElements: function() { 14419return this.currentElements.not(this.invalidElements()); 14420}, 14421invalidElements: function() { 14422return $(this.errorList).map(function() { 14423return this.element; 14424}); 14425}, 14426showLabel: function(element, message) { 14427var label = this.errorsFor( element ); 14428if ( label.length ) { 14429label.removeClass().addClass( this.settings.errorClass ); 14430label.attr("generated") && label.html(message); 14431} else { 14432label = $("<" + this.settings.errorElement + "/>") 14433.attr({"for": this.idOrName(element), generated: true}) 14434.addClass(this.settings.errorClass) 14435.html(message || ""); 14436if ( this.settings.wrapper ) { 14437label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent(); 14438} 14439if ( !this.labelContainer.append(label).length ) 14440this.settings.errorPlacement 14441? this.settings.errorPlacement(label, $(element) ) 14442: label.insertAfter(element); 14443} 14444if ( !message && this.settings.success ) { 14445label.text(""); 14446typeof this.settings.success == "string" 14447? label.addClass( this.settings.success ) 14448: this.settings.success( label ); 14449} 14450this.toShow = this.toShow.add(label); 14451}, 14452errorsFor: function(element) { 14453var name = this.idOrName(element); 14454return this.errors().filter(function() { 14455return $(this).attr('for') == name; 14456}); 14457}, 14458idOrName: function(element) { 14459return this.groups[element.name] || (this.checkable(element) ? element.name : element.i
14459d || element.name); 14460}, 14461checkable: function( element ) { 14462return /radio|checkbox/i.test(element.type); 14463}, 14464findByName: function( name ) { 14465var form = this.currentForm; 14466return $(document.getElementsByName(name)).map(function(index, element) { 14467return element.form == form && element.name == name && element || null; 14468}); 14469}, 14470getLength: function(value, element) { 14471switch( element.nodeName.toLowerCase() ) { 14472case 'select': 14473return $("option:selected", element).length; 14474case 'input': 14475if( this.checkable( element) ) 14476return this.findByName(element.name).filter(':checked').length; 14477} 14478return value.length; 14479}, 14480depend: function(param, element) { 14481return this.dependTypes[typeof param] 14482? this.dependTypes[typeof param](param, element) 14483: true; 14484}, 14485dependTypes: { 14486"boolean": function(param, element) { 14487return param; 14488}, 14489"string": function(param, element) { 14490return !!$(param, element.form).length; 14491}, 14492"function": function(param, element) { 14493return param(element); 14494} 14495}, 14496optional: function(element) { 14497return !$.validator.methods.required.call(this, $.trim(element.value), element) && "dependency-mismatch"; 14498}, 14499startRequest: function(element) { 14500if (!this.pending[element.name]) { 14501this.pendingRequest++; 14502this.pending[element.name] = true; 14503} 14504}, 14505stopRequest: function(element, valid) { 14506this.pendingRequest--; 14507if (this.pendingRequest < 0) 14508this.pendingRequest = 0; 14509delete this.pending[element.name]; 14510if ( valid && this.pendingRequest == 0 && this.formSubmitted && this.form() ) { 14511$(this.currentForm).submit(); 14512this.formSubmitted = false; 14513} else if (!valid && this.pendingRequest == 0 && this.formSubmitted) { 14514$(this.currentForm).triggerHandler("invalid-form", [this]); 14515this.formSubmitted = false; 14516} 14517}, 14518previousValue: function(element) { 14519return $.data(element, "previousValue") || $.data(element, "previousValue", { 14520old: null, 14521valid: true, 14522message: this.defaultMessage( element, "remote" ) 14523}); 14524} 14525}, 14526classRuleSettings: { 14527required: {required: true}, 14528email: {email: true}, 14529url: {url: true}, 14530date: {date: true}, 14531dateISO: {dateISO: true}, 14532dateDE: {dateDE: true}, 14533number: {number: true}, 14534numberDE: {numberDE: true}, 14535digits: {digits: true}, 14536creditcard: {creditcard: true} 14537}, 14538addClassRules: function(className, rules) { 14539className.constructor == String ? 14540this.classRuleSettings[className] = rules : 14541$.extend(this.classRuleSettings, className); 14542}, 14543classRules: function(element) { 14544var rules = {}; 14545var classes = $(element).attr('class'); 14546classes && $.each(classes.split(' '), function() { 14547if (this in $.validator.classRuleSettings) { 14548$.extend(rules, $.validator.classRuleSettings[this]); 14549} 14550}); 14551return rules; 14552}, 14553attributeRules: function(element) { 14554var rules = {}; 14555var $element = $(element); 14556for (var method in $.validator.methods) { 14557var value = $element.attr(method); 14558if (value) { 14559rules[method] = value; 14560} 14561} 14562if (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) { 14563delete rules.maxlength; 14564} 14565return rules; 14566}, 14567metadataRules: function(element) { 14568if (!$.metadata) return {}; 14569var meta = $.data(element.form, 'validator').settings.meta; 14570return meta ? 14571$(element).metadata()[meta] : 14572$(element).metadata(); 14573}, 14574staticRules: function(element) { 14575var rules = {}; 14576var validator = $.data(element.form, 'validator'); 14577if (validator.settings.rules) { 14578rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {}; 14579} 14580return rules; 14581}, 14582normalizeRules: function(rules, element) { 14583$.each(rules, function(prop, val) { 14584if (val === false) { 14585delete rules[prop]; 14586return; 14587} 14588if (val.param || val.depends) { 14589var keepRule = true; 14590switch (typeof val.depends) { 14591case "string": 14592keepRule = !!$(val.depends, element.form).length; 14593break; 14594case "function": 14595keepRule = val.depends.call(element, element); 14596break; 14597} 14598if (keepRule) { 14599rules[prop] = val.param !== undefined ? val.param : true; 14600} else { 14601delete rules[prop]; 14602} 14603} 14604}); 14605$.each(rules, function(rule, parameter) { 14606rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter; 14607}); 14608$.each(['minlength', 'maxlength', 'min', 'max'], function() { 14609if (rules[this]) { 14610rules[this] = Number(rules[this]); 14611} 14612}); 14613$.each(['rangelength', 'range'], function() { 14614if (rules[this]) { 14615rules[this] = [Number(rules[this][0]), Number(rules[this][1])]; 14616} 14617}); 14618if ($.validator.autoCreateRanges) { 14619if (rules.min && rules.max) { 14620rules.range = [rules.min, rules.max]; 14621delete rules.min; 14622delete rules.max; 14623} 14624if (rules.minlength && rules.maxlength) { 14625rules.rangelength = [rules.minlength, rules.maxlength]; 14626delete rules.minlength; 14627delete rules.maxlength; 14628} 14629} 14630if (rules.messages) { 14631delete rules.messages; 14632} 14633return rules; 14634}, 14635normalizeRule: function(data) { 14636if( typeof data == "string" ) { 14637var transformed = {}; 14638$.each(data.split(/\s/), function() { 14639transformed[this] = true; 14640}); 14641data = transformed; 14642} 14643return data; 14644}, 14645addMethod: function(name, method, message) { 14646$.validator.methods[name] = method; 14647$.validator.messages[name] = message != undefined ? message : $.validator.messages[name]; 14648if (method.length < 3) { 14649$.validator.addClassRules(name, $.validator.normalizeRule(name)); 14650} 14651}, 14652methods: { 14653required: function(value, element, param) { 14654if ( !this.depend(param, element) ) 14655return "dependency-mismatch"; 14656switch( element.nodeName.toLowerCase() ) { 14657case 'select': 14658var val = $(element).val(); 14659return val && val.length > 0; 14660case 'input': 14661if ( this.checkable(element) ) 14662return this.getLength(value, element) > 0; 14663default: 14664return $.trim(value).length > 0; 14665} 14666}, 14667remote: function(value, element, param) { 14668if ( this.optional(element) ) 14669return "dependency-mismatch"; 14670var previous = this.previousValue(element); 14671if (!this.settings.messages[element.name] ) 14672this.settings.messages[element.name] = {}; 14673previous.originalMessage = this.settings.messages[element.name].remote; 14674this.settings.messages[element.name].remote = previous.message; 14675param = typeof param == "string" && {url:param} || param; 14676if ( this.pending[element.name] ) { 14677return "pending"; 14678} 14679if ( previous.old === value ) { 14680return previous.valid; 14681} 14682previous.old = value; 14683var validator = this;
14684this.startRequest(element); 14685var data = {}; 14686data[element.name] = value; 14687$.ajax($.extend(true, { 14688url: param, 14689mode: "abort", 14690port: "validate" + element.name, 14691dataType: "json", 14692data: data, 14693success: function(response) { 14694validator.settings.messages[element.name].remote = previous.originalMessage; 14695var valid = response === true; 14696if ( valid ) { 14697var submitted = validator.formSubmitted; 14698validator.prepareElement(element); 14699validator.formSubmitted = submitted; 14700validator.successList.push(element); 14701validator.showErrors(); 14702} else { 14703var errors = {}; 14704var message = response || validator.defaultMessage( element, "remote" ); 14705errors[element.name] = previous.message = $.isFunction(message) ? message(value) : message; 14706validator.showErrors(errors); 14707} 14708previous.valid = valid; 14709validator.stopRequest(element, valid); 14710} 14711}, param)); 14712return "pending"; 14713}, 14714minlength: function(value, element, param) { 14715return this.optional(element) || this.getLength($.trim(value), element) >= param; 14716}, 14717maxlength: function(value, element, param) { 14718return this.optional(element) || this.getLength($.trim(value), element) <= param; 14719}, 14720rangelength: function(value, element, param) { 14721var length = this.getLength($.trim(value), element); 14722return this.optional(element) || ( length >= param[0] && length <= param[1] ); 14723}, 14724min: function( value, element, param ) { 14725return this.optional(element) || value >= param; 14726}, 14727max: function( value, element, param ) { 14728return this.optional(element) || value <= param; 14729}, 14730range: function( value, element, param ) { 14731return this.optional(element) || ( value >= param[0] && value <= param[1] ); 14732}, 14733email: function(value, element) { 14734return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value); 14735}, 14736url: function(value, element) { 14737return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value); 14738}, 14739date: function(value, element) { 14740return this.optional(element) || !/Invalid|NaN/.test(new Date(value)); 14741}, 14742dateISO: function(value, element) { 14743return this.optional(element) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value); 14744}, 14745number: function(value, element) { 14746return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value); 14747}, 14748digits: function(value, element) { 14749return this.optional(element) || /^\d+$/.test(value); 14750}, 14751creditcard: function(value, element) { 14752if ( this.optional(element) ) 14753return "dependency-mismatch"; 14754if (/[^0-9-]+/.test(value)) 14755return false;
vendor: 8,565 bytes, lines 14756-14850
14756var nCheck = 0, 14757nDigit = 0, 14758bEven = false; 14759value = value.replace(/\D/g, ""); 14760for (var n = value.length - 1; n >= 0; n--) { 14761var cDigit = value.charAt(n); 14762var nDigit = parseInt(cDigit, 10); 14763if (bEven) { 14764if ((nDigit *= 2) > 9) 14765nDigit -= 9; 14766} 14767nCheck += nDigit; 14768bEven = !bEven; 14769} 14770return (nCheck % 10) == 0; 14771}, 14772accept: function(value, element, param) { 14773param = typeof param == "string" ? param.replace(/,/g, '|') : "png|jpe?g|gif"; 14774return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i")); 14775}, 14776equalTo: function(value, element, param) { 14777var target = $(param).unbind(".validate-equalTo").bind("blur.validate-equalTo", function() { 14778$(element).valid(); 14779}); 14780return value == target.val(); 14781} 14782} 14783}); 14784$.format = $.validator.format; 14785})(jQuery); 14786;(function($) { 14787var pendingRequests = {}; 14788if ( $.ajaxPrefilter ) { 14789$.ajaxPrefilter(function(settings, _, xhr) { 14790var port = settings.port; 14791if (settings.mode == "abort") { 14792if ( pendingRequests[port] ) { 14793pendingRequests[port].abort(); 14794} 14795pendingRequests[port] = xhr; 14796} 14797}); 14798} else { 14799var ajax = $.ajax; 14800$.ajax = function(settings) { 14801var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode, 14802port = ( "port" in settings ? settings : $.ajaxSettings ).port; 14803if (mode == "abort") { 14804if ( pendingRequests[port] ) { 14805pendingRequests[port].abort(); 14806} 14807return (pendingRequests[port] = ajax.apply(this, arguments)); 14808} 14809return ajax.apply(this, arguments); 14810}; 14811} 14812})(jQuery); 14813;(function($) { 14814if (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) { 14815$.each({ 14816focus: 'focusin', 14817blur: 'focusout' 14818}, function( original, fix ){ 14819$.event.special[fix] = { 14820setup:function() { 14821this.addEventListener( original, handler, true ); 14822}, 14823teardown:function() { 14824this.removeEventListener( original, handler, true ); 14825}, 14826handler: function(e) { 14827arguments[0] = $.event.fix(e); 14828arguments[0].type = fix; 14829return $.event.handle.apply(this, arguments); 14830} 14831}; 14832function handler(e) { 14833e = $.event.fix(e); 14834e.type = fix; 14835return $.event.handle.call(this, e); 14836} 14837}); 14838}; 14839$.extend($.fn, { 14840validateDelegate: function(delegate, type, handler) { 14841return this.bind(type, function(event) { 14842var target = $(event.target); 14843if (target.is(delegate)) { 14844return handler.apply(target, arguments); 14845} 14846}); 14847} 14848}); 14849})(jQuery); 14850var DateFormatter;!function(){"use strict";var D,s,r,a,n;D=function(e,t){return"string"==typeof e&&"string"==typeof t&&e.toLowerCase()===t.toLowerCase()},s=function(e,t,a){var n=a||"0",r=e.toString();return r.length<t?s(n+r,t):r},r=function(e){var t,a;for(e=e||{},t=1;t<arguments.length;t++)if(a=arguments[t])for(var n in a)a.hasOwnProperty(n)&&("object"==typeof a[n]?r(e[n],a[n]):e[n]=a[n]);return e},a=function(e,t){for(var a=0;a<t.length;a++)if(t[a].toLowerCase()===e.toLowerCase())return a;return-1},n={dateSettings:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["AM","PM"],ordinal:function(e){var t=e%10,a={1:"st",2:"nd",3:"rd"};return 1!==Math.floor(e%100/10)&&a[t]?a[t]:"th"}},separators:/[ \-+\/\.T:@]/g,validParts:/[dDjlNSwzWFmMntLoYyaABgGhHisueTIOPZcrU]/g,intParts:/[djwNzmnyYhHgGis]/g,tzParts:/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,tzClip:/[^-+\dA-Z]/g},(DateFormatter=function(e){var t=this,a=r(n,e);t.dateSettings=a.dateSettings,t.separators=a.separators,t.validParts=a.validParts,t.intParts=a.intParts,t.tzParts=a.tzParts,t.tzClip=a.tzClip}).prototype={constructor:DateFormatter,getMonth:function(e){var t;return 0===(t=a(e,this.dateSettings.monthsShort)+1)&&(t=a(e,this.dateSettings.months)+1),t},parseDate:function(e,t){var a,n,r,o,i,s,d,u,l,f,c=this,m=!1,h=!1,g=c.dateSettings,p={date:null,year:null,month:null,day:null,hour:0,min:0,sec:0};if(!e)return null;if(e instanceof Date)return e;if("U"===t)return(r=parseInt(e))?new Date(1e3*r):e;switch(typeof e){case"number":return new Date(e);case"string":break;default:return null}if(!(a=t.match(c.validParts))||0===a.length)throw new Error("Invalid date format definition.");for(n=e.replace(c.separators,"\0").split("\0"),r=0;r<n.length;r++)switch(o=n[r],i=parseInt(o),a[r]){case"y":case"Y":if(!i)return null;l=o.length,p.year=2===l?parseInt((i<70?"20":"19")+o):i,m=!0;break;case"m":case"n":case"M":case"F":if(isNaN(i)){if(!(0<(s=c.getMonth(o))))return null;p.month=s}else{if(!(1<=i&&i<=12))return null;p.month=i}m=!0;break;case"d":case"j":if(!(1<=i&&i<=31))return null;p.day=i,m=!0;break;case"g":case"h":if(f=n[d=-1<a.indexOf("a")?a.indexOf("a"):-1<a.indexOf("A")?a.indexOf("A"):-1],-1<d)u=D(f,g.meridiem[0])?0:D(f,g.meridiem[1])?12:-1,1<=i&&i<=12&&-1<u?p.hour=i+u-1:0<=i&&i<=23&&(p.hour=i);else{if(!(0<=i&&i<=23))return null;p.hour=i}h=!0;break;case"G":case"H":if(!(0<=i&&i<=23))return null;p.hour=i,h=!0;break;case"i":if(!(0<=i&&i<=59))return null;p.min=i,h=!0;break;case"s":if(!(0<=i&&i<=59))return null;p.sec=i,h=!0}if(!0===m&&p.year&&p.month&&p.day)p.date=new Date(p.year,p.month-1,p.day,p.hour,p.min,p.sec,0);else{if(!0!==h)return null;p.date=new Date(0,0,0,p.hour,p.min,p.sec,0)}return p.date},guessDate:function(e,t){if("string"!=typeof e)return e;var a,n,r,o,i,s,d=e.replace(this.separators,"\0").split("\0"),u=t.match(this.validParts),l=new Date,f=0;if(!/^[djmn]/g.test(u[0]))return e;for(r=0;r<d.length;r++){if(f=2,i=d[r],s=parseInt(i.substr(0,2)),isNaN(s))return null;switch(r){case 0:"m"===u[0]||"n"===u[0]?l.setMonth(s-1):l.setDate(s);break;case 1:"m"===u[0]||"n"===u[0]?l.setDate(s):l.setMonth(s-1);break;case 2:if(n=l.getFullYear(),f=(a=i.length)<4?a:4,!(n=parseInt(a<4?n.toString().substr(0,4-a)+i:i.substr(0,4))))return null;l.setFullYear(n);break;case 3:l.setHours(s);break;case 4:l.setMinutes(s);break;case 5:l.setSeconds(s)}0<(o=i.substr(f)).length&&d.splice(r+1,0,o)}return l},parseFormat:function(e,n){var a,t=this,r=t.dateSettings,o=/\\?(.?)/gi,i=function(e,t){return a[e]?a[e]():t};return a={d:function(){return s(a.j(),2)},D:function(){return r.daysShort[a.w()]},j:function(){return n.getDate()},l:function(){return r.days[a.w()]},N:function(){return a.w()||7},w:function(){return n.getDay()},z:function(){var e=new Date(a.Y(),a.n()-1,a.j()),t=new Date(a.Y(),0,1);return Math.round((e-t)/864e5)},W:function(){var e=new Date(a.Y(),a.n()-1,a.j()-a.N()+3),t=new Date(e.getFullYear(),0,4);return s(1+Math.round((e-t)/864e5/7),2)},F:function(){return r.months[n.getMonth()]},m:function(){return s(a.n(),2)},M:function(){return r.monthsShort[n.getMonth()]},n:function(){return n.getMonth()+1},t:function(){return new Date(a.Y(),a.n(),0).getDate()},L:function(){var e=a.Y();return e%4==0&&e%100!=0||e%400==0?1:0},o:function(){var e=a.n(),t=a.W();return a.Y()+(12===e&&t<9?1:1===e&&9<t?-1:0)},Y:function(){return n.getFullYear()},y:function(){return a.Y().toString().slice(-2)},a:function(){return a.A().toLowerCase()},A:function(){var e=a.G()<12?0:1;return r.meridiem[e]},B:function(){var e=3600*n.getUTCHours(),t=60*n.getUTCMinutes(),a=n.getUTCSeconds();return s(Math.floor((e+t+a+3600)/86.4)%1e3,3)},g:function(){return a.G()%12||12},G:function(){return n.getHours()},h:function(){return s(a.g(),2)},H:function(){return s(a.G(),2)},i:function(){return s(n.getMinutes(),2)},s:function(){return s(n.getSeconds(),2)},u:function(){return s(1e3*n.getMilliseconds(),6)},e:function(){return/\((.*)\)/.exec(String(n))[1]||"Coordinated Universal Time"},I:function(){return new Date(a.Y(),0)-Date.UTC(a.Y(),0)!=new Date(a.Y(),6)-Date.UTC(a.Y(),6)?1:0},O:function(){var e=n.getTimezoneOffset(),t=Math.abs(e);return(0<e?"-":"+")+s(100*Math.floor(t/60)+t%60,4)},P:function(){var e=a.O();return e.substr(0,3)+":"+e.substr(3,2)},T:function(){return(String(n).match(t.tzParts)||[""]).pop().replace(t.tzClip,"")||"UTC"},Z:function(){return 60*-n.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(o,i)},r:function(){return"D, d M Y H:i:s O".replace(o,i)},U:function(){return n.getTime()/1e3||0}},i(e,e)},formatDate:function(e,t){var a,n,r,o,i,s="";if("string"==typeof e&&!(e=this.parseDate(e,t)))return null;if(e instanceof Date){for(r=t.length,a=0;a<r;a++)"S"!==(i=t.charAt(a))&&"\\"!==i&&(0<a&&"\\"===t.charAt(a-1)?s+=i:(o=this.parseFormat(i,e),a!==r-1&&this.intParts.test(i)&&"S"===t.charAt(a+1)&&(n=parseInt(o)||0,o+=this.dateSettings.ordinal(n)),s+=o));return s}return""}}}();var datetimepickerFactory=function(L){"use strict";var s
vendor: 16,701 bytes, line 14850
14850={i18n:{ar:{months:["ÙØ§ÙÙÙ Ø§ÙØ«Ø§ÙÙ","شباط","آذار","ÙÙØ³Ø§Ù","Ù
اÙÙ","ØØ²ÙراÙ","تÙ
ÙØ²","آب","Ø£ÙÙÙÙ","تشرÙÙ Ø§ÙØ£ÙÙ","تشرÙÙ Ø§ÙØ«Ø§ÙÙ","ÙØ§ÙÙÙ Ø§ÙØ£ÙÙ"],dayOfWeekShort:["Ù","Ø«","ع","Ø®","ج","س","Ø"],dayOfWeek:["Ø§ÙØ£ØØ¯","Ø§ÙØ§Ø«ÙÙÙ","Ø§ÙØ«Ùاثاء","Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡","Ø§ÙØ®Ù
ÙØ³","Ø§ÙØ¬Ù
عة","Ø§ÙØ³Ø¨Øª","Ø§ÙØ£ØØ¯"]},ro:{months:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"],dayOfWeekShort:["Du","Lu","Ma","Mi","Jo","Vi","Sâ"],dayOfWeek:["DuminicÄ","Luni","MarÅ£i","Miercuri","Joi","Vineri","SâmbÄtÄ"]},id:{months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],dayOfWeekShort:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],dayOfWeek:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},is:{months:["Janúar","Febrúar","Mars","AprÃl","MaÃ","JúnÃ","JúlÃ","Ãgúst","September","Október","Nóvember","Desember"],dayOfWeekShort:["Sun","Mán","Ãrið","Mið","Fim","Fös","Lau"],dayOfWeek:["Sunnudagur","Mánudagur","Ãriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur"]},bg:{months:["ЯнÑаÑи","ФевÑÑаÑи","ÐаÑÑ","ÐпÑил","Ðай","Юни","Юли","ÐвгÑÑÑ","СепÑемвÑи","ÐкÑомвÑи","ÐоемвÑи","ÐекемвÑи"],dayOfWeekShort:["Ðд","Ðн","ÐÑ","СÑ","ЧÑ","ÐÑ","Сб"],dayOfWeek:["ÐеделÑ","Ðонеделник","ÐÑоÑник","СÑÑда","ЧеÑвÑÑÑÑк","ÐеÑÑк","СÑбоÑа"]},fa:{months:["ÙØ±ÙردÛÙ","Ø§Ø±Ø¯ÛØ¨Ùشت","خرداد","ØªÛØ±","Ù
رداد","Ø´ÙØ±ÛÙØ±","Ù
ÙØ±","آباÙ","آذر","دÛ","بÙÙ
Ù","اسÙÙØ¯"],dayOfWeekShort:["ÛÚ©Ø´ÙØ¨Ù","Ø¯ÙØ´ÙبÙ","Ø³Ù Ø´ÙØ¨Ù","ÚÙØ§Ø±Ø´ÙبÙ","Ù¾ÙØ¬Ø´ÙبÙ","جÙ
عÙ","Ø´ÙØ¨Ù"],dayOfWeek:["ÛÚ©âØ´ÙØ¨Ù","Ø¯ÙØ´ÙبÙ","سÙâØ´ÙØ¨Ù","ÚÙØ§Ø±Ø´ÙبÙ","Ù¾ÙØ¬âØ´ÙØ¨Ù","جÙ
عÙ","Ø´ÙØ¨Ù","ÛÚ©âØ´ÙØ¨Ù"]},ru:{months:["ЯнваÑÑ","ФевÑалÑ","ÐаÑÑ","ÐпÑелÑ","Ðай","ÐÑнÑ","ÐÑлÑ","ÐвгÑÑÑ","СенÑÑбÑÑ","ÐкÑÑбÑÑ","ÐоÑбÑÑ","ÐекабÑÑ"],dayOfWeekShort:["ÐÑ","Ðн","ÐÑ","СÑ","ЧÑ","ÐÑ","Сб"],dayOfWeek:["ÐоÑкÑеÑенÑе","ÐонеделÑник","ÐÑоÑник","СÑеда","ЧеÑвеÑг","ÐÑÑниÑа","СÑббоÑа"]},uk:{months:["СÑÑенÑ","ÐÑÑий","ÐеÑезенÑ","ÐвÑÑенÑ","ТÑавенÑ","ЧеÑвенÑ","ÐипенÑ","СеÑпенÑ","ÐеÑеÑенÑ","ÐовÑенÑ","ÐиÑÑопад","ÐÑÑденÑ"],dayOfWeekShort:["Ðдл","Ðнд","ÐÑÑ","СÑд","ЧÑв","ÐÑн","СбÑ"],dayOfWeek:["ÐедÑлÑ","ÐонедÑлок","ÐÑвÑоÑок","СеÑеда","ЧеÑвеÑ","Ð'ÑÑниÑÑ","СÑбоÑа"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},el:{months:["ÎανοÏ
άÏιοÏ","ΦεβÏοÏ
άÏιοÏ","ÎάÏÏιοÏ","ÎÏÏίλιοÏ","ÎάιοÏ","ÎοÏνιοÏ","ÎοÏλιοÏ","ÎÏγοÏ
ÏÏοÏ","ΣεÏÏÎμβÏιοÏ","ÎκÏÏβÏιοÏ","ÎοÎμβÏιοÏ","ÎεκÎμβÏιοÏ"],dayOfWeekShort:["ÎÏ
Ï","ÎεÏ
","ΤÏι","ΤεÏ","Πεμ","ΠαÏ","Σαβ"],dayOfWeek:["ÎÏ
Ïιακή","ÎεÏ
ÏÎÏα","ΤÏίÏη","ΤεÏάÏÏη","Î ÎμÏÏη","ΠαÏαÏκεÏ
ή","ΣάββαÏο"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeekShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayOfWeek:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeekShort:["zo","ma","di","wo","do","vr","za"],dayOfWeek:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},tr:{months:["Ocak","Åubat","Mart","Nisan","Mayıs","Haziran","Temmuz","AÄustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeekShort:["Paz","Pts","Sal","Ãar","Per","Cum","Cts"],dayOfWeek:["Pazar","Pazartesi","Salı","ÃarÅamba","PerÅembe","Cuma","Cumartesi"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeekShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],dayOfWeek:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeekShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],dayOfWeek:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"]},th:{months:["มà¸à¸£à¸²à¸à¸¡","à¸à¸¸à¸¡à¸ าà¸à¸±à¸à¸à¹","มีà¸à¸²à¸à¸¡","à¹à¸¡à¸©à¸²à¸¢à¸","à¸à¸¤à¸©à¸ าà¸à¸¡","มิà¸à¸¸à¸à¸²à¸¢à¸","à¸à¸£à¸à¸à¸²à¸à¸¡","สิà¸à¸«à¸²à¸à¸¡","à¸à¸±à¸à¸¢à¸²à¸¢à¸","à¸à¸¸à¸¥à¸²à¸à¸¡","à¸à¸¤à¸¨à¸à¸´à¸à¸²à¸¢à¸","à¸à¸±à¸à¸§à¸²à¸à¸¡"],dayOfWeekShort:["à¸à¸².","à¸.","à¸.","à¸.","à¸à¸¤.","ศ.","ส."],dayOfWeek:["à¸à¸²à¸à¸´à¸à¸¢à¹","à¸à¸±à¸à¸à¸£à¹","à¸à¸±à¸à¸à¸²à¸£","à¸à¸¸à¸","à¸à¸¤à¸«à¸±à¸ª","ศุà¸à¸£à¹","à¹à¸ªà¸²à¸£à¹","à¸à¸²à¸à¸´à¸à¸¢à¹"]},pl:{months:["styczeÅ","luty","marzec","kwiecieÅ","maj","czerwiec","lipiec","sierpieÅ","wrzesieÅ","październik","listopad","grudzieÅ"],dayOfWeekShort:["nd","pn","wt","År","cz","pt","sb"],dayOfWeek:["niedziela","poniedziaÅek","wtorek","Åroda","czwartek","piÄ
tek","sobota"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeekShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"],dayOfWeek:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"]},ch:{months:["䏿","äºæ","䏿","åæ","äºæ","å
æ","䏿","å
«æ","乿","åæ","å䏿","åäºæ"],dayOfWeekShort:["æ¥","ä¸","äº","ä¸","å","äº","å
"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeekShort:["Sön","MÃ¥n","Tis","Ons","Tor","Fre","Lör"]},km:{months:["áááá¶â","áá»áááá","áá·áá¶â","áááá¶â","á§ááá¶â","áá·áá»áá¶â","áááááá¶â","áá¸á á¶â","ááááá¶â","áá»áá¶â","áá·á
ááá·áá¶","áááá¼â"],dayOfWeekShort:["á¢á¶áá·â","á
ááááâ","á¢áááá¶áâ","áá»áâ","áááá ââ","áá»áááâ","áá
áá"],dayOfWeek:["á¢á¶áá·áááâ","á
ááááâ","á¢áááá¶áâ","áá»áâ","áááá ááááá·áâ","áá»áááâ","áá
áá"]},kr:{months:["1ì","2ì","3ì","4ì","5ì","6ì","7ì","8ì","9ì","10ì","11ì","12ì"],dayOfWeekShort:["ì¼","ì","í","ì","목","ê¸","í "],dayOfWeek:["ì¼ìì¼","ììì¼","íìì¼","ììì¼","목ìì¼","ê¸ìì¼","í ìì¼"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeekShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dayOfWeek:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"]},da:{months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],dayOfWeekShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayOfWeek:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},no:{months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],dayOfWeekShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayOfWeek:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"]},ja:{months:["1æ","2æ","3æ","4æ","5æ","6æ","7æ","8æ","9æ","10æ","11æ","12æ"],dayOfWeekShort:["æ¥","æ","ç«","æ°´","æ¨","é","å"],dayOfWeek:["æ¥æ","ææ","ç«æ","æ°´æ","æ¨æ","éæ","åæ"]},vi:{months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayOfWeekShort:["CN","T2","T3","T4","T5","T6","T7"],dayOfWeek:["Chá»§ nháºt","Thứ hai","Thứ ba","Thứ tư","Thứ nÄm","Thứ sáu","Thứ bảy"]},sl:{months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],dayOfWeekShort:["Ned","Pon","Tor","Sre","Äet","Pet","Sob"],dayOfWeek:["Nedelja","Ponedeljek","Torek","Sreda","Äetrtek","Petek","Sobota"]},cs:{months:["Leden","Ãnor","BÅezen","Duben","KvÄten","Äerven","Äervenec","Srpen","ZáÅÃ","ÅÃjen","Listopad","Prosinec"],dayOfWeekShort:["Ne","Po","Ãt","St","Ät","Pá","So"]},hu:{months:["Január","Február","Március","Ãprilis","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],dayOfWeekShort:["Va","Hé","Ke","Sze","Cs","Pé","Szo"],dayOfWeek:["vasárnap","hétfÅ","kedd","szerda","csütörtök","péntek","szombat"]},az:{months:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"],dayOfWeekShort:["B","Be","Ãa","Ã","Ca","C","Å"],dayOfWeek:["Bazar","Bazar ertÉsi","ÃÉrÅÉnbÉ axÅamı","ÃÉrÅÉnbÉ","CümÉ axÅamı","CümÉ","ÅÉnbÉ"]},bs:{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeekShort:["Ned","Pon","Uto","Sri","Äet","Pet","Sub"],dayOfWeek:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Äetvrtak","Petak","Subota"]},ca:{months:["Gener","Febrer","Març","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],dayOfWeekShort:["Dg","Dl","Dt","Dc","Dj","Dv","Ds"],dayOfWeek:["Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte"]},"en-GB":{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},et:{months:["Jaanuar","Veebruar","Märts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"],dayOfWeekShort:["P","E","T","K","N","R","L"],dayOfWeek:["Pühapäev","Esmaspäev","Teisipäev","Kolmapäev","Neljapäev","Reede","Laupäev"]},eu:{months:["Urtarrila","Otsaila","Martxoa","Apirila","Maiatza","Ekaina","Uztaila","Abuztua","Iraila","Urria","Azaroa","Abendua"],dayOfWeekShort:["Ig.","Al.","Ar.","Az.","Og.","Or.","La."],dayOfWeek:["Igandea","Astelehena","Asteartea","Asteazkena","Osteguna","Ostirala","Larunbata"]},fi:{months:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],dayOfWeekShort:["Su","Ma","Ti","Ke","To","Pe","La"],dayOfWeek:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"]},gl:{months:["Xan","Feb","Maz","Abr","Mai","Xun","Xul","Ago","Set","Out","Nov","Dec"],dayOfWeekShort:["Dom","Lun","Mar","Mer","Xov","Ven","Sab"],dayOfWeek:["Domingo","Luns","Martes","Mércores","Xoves","Venres","Sábado"]},hr:{months:["SijeÄanj","VeljaÄa","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],dayOfWeekShort:["Ned","Pon","Uto","Sri","Äet","Pet","Sub"],dayOfWeek:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Äetvrtak","Petak","Subota"]},ko:{months:["1ì","2ì","3ì","4ì","5ì","6ì","7ì","8ì","9ì","10ì","11ì","12ì"],dayOfWeekShort:["ì¼","ì","í","ì","목","ê¸","í "],dayOfWeek:["ì¼ìì¼","ììì¼","íìì¼","ììì¼","목ìì¼","ê¸ìì¼","í ìì¼"]},lt:{months:["Sausio","Vasario","Kovo","Balandžio","GegužÄs","Birželio","Liepos","RugpjÅ«Äio","RugsÄjo","Spalio","LapkriÄio","Gruodžio"],dayOfWeekShort:["Sek","Pir","Ant","Tre","Ket","Pen","Å eÅ¡"],dayOfWeek:["Sekmadienis","Pirmadienis","Antradienis","TreÄiadienis","Ketvirtadienis","Penktadienis","Å eÅ¡tadienis"]},lv:{months:["JanvÄris","FebruÄris","Marts","AprÄ«lis ","Maijs","JÅ«nijs","JÅ«lijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],dayOfWeekShort:["Sv","Pr","Ot","Tr","Ct","Pk","St"],dayOfWeek:["SvÄtdiena","Pirmdiena","Otrdiena","TreÅ¡diena","Ceturtdiena","Piektdiena","Sestdiena"]},mk:{months:["ÑанÑаÑи","ÑевÑÑаÑи","маÑÑ","апÑил","маÑ","ÑÑни","ÑÑли","авгÑÑÑ","ÑепÑемвÑи","окÑомвÑи","ноемвÑи","декемвÑи"],dayOfWeekShort:["нед","пон","вÑо","ÑÑе","ÑеÑ","пеÑ","Ñаб"],dayOfWeek:["Ðедела","Ðонеделник","ÐÑоÑник","СÑеда","ЧеÑвÑÑок","ÐеÑок","СабоÑа"]},mn:{months:["1-Ñ ÑаÑ","2-Ñ ÑаÑ","3-Ñ ÑаÑ","4-Ñ ÑаÑ","5-Ñ ÑаÑ","6-Ñ ÑаÑ","7-Ñ ÑаÑ","8-Ñ ÑаÑ","9-Ñ ÑаÑ","10-Ñ ÑаÑ","11-Ñ ÑаÑ","12-Ñ ÑаÑ"],dayOfWeekShort:["Ðав","ÐÑг","ÐÑ
а","ÐÒ¯Ñ","ÐÑн","ÐÑм","ÐÑм"],dayOfWeek:["Ðаваа","ÐÑгмаÑ","ÐÑ
агва","ÐÒ¯ÑÑв","ÐааÑан","ÐÑмба","ÐÑм"]},"pt-BR":{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeekShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayOfWeek:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"]},sk:{months:["Január","Február","Marec","AprÃl","Máj","Jún","Júl","August","September","Október","November","December"],dayOfWeekShort:["Ne","Po","Ut","St","Å t","Pi","So"],dayOfWeek:["Nedeľa","Pondelok","Utorok","Streda","Å tvrtok","Piatok","Sobota"]},sq:{months:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","Nëntor","Dhjetor"],dayOfWeekShort:["Die","Hën","Mar","Mër","Enj","Pre","Shtu"],dayOfWeek:["E Diel","E Hënë","E MartÄ","E Mërkurë","E Enjte","E Premte","E Shtunë"]},"sr-YU":{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeekShort:["Ned","Pon","Uto","Sre","Äet","Pet","Sub"],dayOfWeek:["Nedelja","Ponedeljak","Utorak","Sreda","Äetvrtak","Petak","Subota"]},sr:{months:["ÑанÑаÑ","ÑебÑÑаÑ","маÑÑ","апÑил","маÑ","ÑÑн","ÑÑл","авгÑÑÑ","ÑепÑембаÑ","окÑобаÑ","новембаÑ","деÑембаÑ"],dayOfWeekShort:["нед","пон","ÑÑо","ÑÑе","ÑеÑ","пеÑ","ÑÑб"],dayOfWeek:["ÐедеÑа","ÐонедеÑак","УÑоÑак","СÑеда","ЧеÑвÑÑак","ÐеÑак","СÑбоÑа"]},sv:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeekShort:["Sön","MÃ¥n","Tis","Ons","Tor","Fre","Lör"],dayOfWeek:["Söndag","MÃ¥ndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"]},"zh-TW":{months:["䏿","äºæ","䏿","åæ","äºæ","å
æ","䏿","å
«æ","乿","åæ","å䏿","åäºæ"],dayOfWeekShort:["æ¥","ä¸","äº","ä¸","å","äº","å
"],dayOfWeek:["æææ¥","ææä¸","ææäº","ææä¸","ææå","ææäº","ææå
"]},zh:{months:["䏿","äºæ","䏿","åæ","äºæ","å
æ","䏿","å
«æ","乿","åæ","å䏿","åäºæ"],dayOfWeekShort:["æ¥","ä¸","äº","ä¸","å","äº","å
"],dayOfWeek:["æææ¥","ææä¸","ææäº","ææä¸","ææå","ææäº","ææå
"]},ug:{months:["1-ئاÙ","2-ئاÙ","3-ئاÙ","4-ئاÙ","5-ئاÙ","6-ئاÙ","7-ئاÙ","8-ئاÙ","9-ئاÙ","10-ئاÙ","11-ئاÙ","12-ئاÙ"],dayOfWeek:["ÙÛÙØ´ÛÙØ¨Û","Ø¯ÛØ´ÛÙØ¨Û","سÛÙØ´ÛÙØ¨Û","ÚØ§Ø±Ø´ÛÙØ¨Û","Ù¾ÛÙØ´ÛÙØ¨Û","جÛÙ
Û","Ø´ÛÙØ¨Û"]},he:{months:["×× ××ר","פ×ר××ר","×רץ","×פר××","×××","××× ×","××××","××××ס×","ספ×××ר","×××§×××ר","× ××××ר","×צ××ר"],dayOfWeekShort:["×'","×'","×'","×'","×'","×'","ש×ת"],dayOfWeek:["ר×ש××","×©× ×","ש××ש×","ר×××¢×","×××ש×","ש×ש×","ש×ת","ר×ש××"]},hy:{months:["ÕÕ¸ÖÕ¶Õ¾Õ¡Ö","ÕÕ¥Õ¿ÖÕ¾Õ¡Ö","ÕÕ¡ÖÕ¿","Ô±ÕºÖÕ«Õ¬","ÕÕ¡ÕµÕ«Õ½","ÕÕ¸ÖÕ¶Õ«Õ½","ÕÕ¸ÖÕ¬Õ«Õ½","ÕÕ£Õ¸Õ½Õ¿Õ¸Õ½","ÕÕ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥Ö","ÕÕ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö","ÕÕ¸ÕµÕ¥Õ´Õ¢Õ¥Ö","Ô´Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö"],dayOfWeekShort:["Ô¿Õ«","ÔµÖÕ¯","ÔµÖÖ","ÕÕ¸Ö","ÕÕ¶Õ£","ÕÖÖÕ¢","ÕÕ¢Õ©"],dayOfWeek:["Ô¿Õ«ÖÕ¡Õ¯Õ«","ÔµÖÕ¯Õ¸ÖÕ·Õ¡Õ¢Õ©Õ«","ÔµÖÕ¥ÖÕ·Õ¡Õ¢Õ©Õ«","ÕÕ¸ÖÕ¥ÖÕ·Õ¡Õ¢Õ©Õ«","ÕÕ«Õ¶Õ£Õ·Õ¡Õ¢Õ©Õ«","ÕÖÖÕ¢Õ¡Õ©","ÕÕ¡Õ¢Õ¡Õ©"]}
vendor: 37,801 bytes, line 14850
14850,kg:{months:["Ò®ÑÑүн айÑ","ÐиÑдин айÑ","Ðалган ÐÑÑан","ЧÑн ÐÑÑан","ÐÑгÑ","ÐÑлжа","Теке","ÐÐ°Ñ Ðона","ÐÑк Ðона","ТогÑздÑн айÑ","ÐеÑинин айÑ","ÐеÑÑин айÑ"],dayOfWeekShort:["Ðек","Ðүй","Шей","ШаÑ","Ðей","ÐÑм","ÐÑе"],dayOfWeek:["ÐекÑемб","ÐүйÑөмб","ШейÑемб","ШаÑÑемб","ÐейÑемби","ÐÑма","ÐÑенб"]},rm:{months:["Schaner","Favrer","Mars","Avrigl","Matg","Zercladur","Fanadur","Avust","Settember","October","November","December"],dayOfWeekShort:["Du","Gli","Ma","Me","Gie","Ve","So"],dayOfWeek:["Dumengia","Glindesdi","Mardi","Mesemna","Gievgia","Venderdi","Sonda"]},ka:{months:["áááááá á","ááááá áááá","ááá á¢á","ááá ááá","áááá¡á","ááááá¡á","ááááá¡á","ááááá¡á¢á","á¡áá¥á¢ááááá á","áá¥á¢ááááá á","ááááááá á","áááááááá á"],dayOfWeekShort:["áá","áá á¨","á¡ááá¨","ááá®","á®á£á","ááá ","á¨áá"],dayOfWeek:["áááá á","áá á¨ááááá","á¡ááá¨ááááá","ááá®á¨ááááá","á®á£áá¨ááááá","ááá áá¡áááá","á¨ááááá"]}},ownerDocument:document,contentWindow:window,value:"",rtl:!1,format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,monthChangeSpinner:!0,closeOnDateSelect:!1,closeOnTimeSelect:!0,closeOnWithoutClick:!0,closeOnInputClick:!0,openOnFocus:!0,timepicker:!0,datepicker:!0,weeks:!1,defaultTime:!1,defaultDate:!1,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,minDateTime:!1,maxDateTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,theme:"",touchMovedThreshold:5,onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onGetWeekOfYear:function(){},onChangeYear:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,parentID:"body",timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,prevButton:!0,nextButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,monthStart:0,monthEnd:11,style:"",id:"",fixed:!1,roundTime:"round",className:"",weekends:[],highlightedDates:[],highlightedPeriods:[],allowDates:[],allowDateRe:null,disabledDates:[],disabledWeekDays:[],yearOffset:0,beforeShowDay:null,enterLikeTab:!0,showApplyButton:!1,insideParent:!1},E=null,n=null,R="en",a={meridiem:["AM","PM"]},r=function(){var e=s.i18n[R],t={days:e.dayOfWeek,daysShort:e.dayOfWeekShort,months:e.months,monthsShort:L.map(e.months,function(e){return e.substring(0,3)})};"function"==typeof DateFormatter&&(E=n=new DateFormatter({dateSettings:L.extend({},a,t)}))},o={moment:{default_options:{format:"YYYY/MM/DD HH:mm",formatDate:"YYYY/MM/DD",formatTime:"HH:mm"},formatter:{parseDate:function(e,t){if(i(t))return n.parseDate(e,t);var a=moment(e,t);return!!a.isValid()&&a.toDate()},formatDate:function(e,t){return i(t)?n.formatDate(e,t):moment(e).format(t)},formatMask:function(e){return e.replace(/Y{4}/g,"9999").replace(/Y{2}/g,"99").replace(/M{2}/g,"19").replace(/D{2}/g,"39").replace(/H{2}/g,"29").replace(/m{2}/g,"59").replace(/s{2}/g,"59")}}}};L.datetimepicker={setLocale:function(e){var t=s.i18n[e]?e:"en";R!==t&&(R=t,r())},setDateFormatter:function(e){if("string"==typeof e&&o.hasOwnProperty(e)){var t=o[e];L.extend(s,t.default_options),E=t.formatter}else E=e}};var t={RFC_2822:"D, d M Y H:i:s O",ATOM:"Y-m-dTH:i:sP",ISO_8601:"Y-m-dTH:i:sO",RFC_822:"D, d M y H:i:s O",RFC_850:"l, d-M-y H:i:s T",RFC_1036:"D, d M y H:i:s O",RFC_1123:"D, d M Y H:i:s O",RSS:"D, d M Y H:i:s O",W3C:"Y-m-dTH:i:sP"},i=function(e){return-1!==Object.values(t).indexOf(e)};function m(e,t,a){this.date=e,this.desc=t,this.style=a}L.extend(L.datetimepicker,t),r(),window.getComputedStyle||(window.getComputedStyle=function(a){return this.el=a,this.getPropertyValue=function(e){var t=/(-([a-z]))/g;return"float"===e&&(e="styleFloat"),t.test(e)&&(e=e.replace(t,function(e,t,a){return a.toUpperCase()})),a.currentStyle[e]||null},this}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var a,n;for(a=t||0,n=this.length;a<n;a+=1)if(this[a]===e)return a;return-1}),Date.prototype.countDaysInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0).getDate()},L.fn.xdsoftScroller=function(p,D){return this.each(function(){var o,i,s,d,u,l=L(this),a=function(e){var t,a={x:0,y:0};return"touchstart"===e.type||"touchmove"===e.type||"touchend"===e.type||"touchcancel"===e.type?(t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],a.x=t.clientX,a.y=t.clientY):"mousedown"!==e.type&&"mouseup"!==e.type&&"mousemove"!==e.type&&"mouseover"!==e.type&&"mouseout"!==e.type&&"mouseenter"!==e.type&&"mouseleave"!==e.type||(a.x=e.clientX,a.y=e.clientY),a},f=100,n=!1,r=0,c=0,m=0,t=!1,h=0,g=function(){};"hide"!==D?(L(this).hasClass("xdsoft_scroller_box")||(o=l.children().eq(0),i=l[0].clientHeight,s=o[0].offsetHeight,d=L('<div class="xdsoft_scrollbar"></div>'),u=L('<div class="xdsoft_scroller"></div>'),d.append(u),l.addClass("xdsoft_scroller_box").append(d),g=function(e){var t=a(e).y-r+h;t<0&&(t=0),t+u[0].offsetHeight>m&&(t=m-u[0].offsetHeight),l.trigger("scroll_element.xdsoft_scroller",[f?t/f:0])},u.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",function(e){i||l.trigger("resize_scroll.xdsoft_scroller",[D]),r=a(e).y,h=parseInt(u.css("margin-top"),10),m=d[0].offsetHeight,"mousedown"===e.type||"touchstart"===e.type?(p.ownerDocument&&L(p.ownerDocument.body).addClass("xdsoft_noselect"),L([p.ownerDocument.body,p.contentWindow]).on("touchend mouseup.xdsoft_scroller",function e(){L([p.ownerDocument.body,p.contentWindow]).off("touchend mouseup.xdsoft_scroller",e).off("mousemove.xdsoft_scroller",g).removeClass("xdsoft_noselect")}),L(p.ownerDocument.body).on("mousemove.xdsoft_scroller",g)):(t=!0,e.stopPropagation(),e.preventDefault())}).on("touchmove",function(e){t&&(e.preventDefault(),g(e))}).on("touchend touchcancel",function(){t=!1,h=0}),l.on("scroll_element.xdsoft_scroller",function(e,t){i||l.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=1<t?1:t<0||isNaN(t)?0:t,u.css("margin-top",f*t),setTimeout(function(){o.css("marginTop",-parseInt((o[0].offsetHeight-i)*t,10))},10)}).on("resize_scroll.xdsoft_scroller",function(e,t,a){var n,r;i=l[0].clientHeight,s=o[0].offsetHeight,r=(n=i/s)*d[0].offsetHeight,1<n?u.hide():(u.show(),u.css("height",parseInt(10<r?r:10,10)),f=d[0].offsetHeight-u[0].offsetHeight,!0!==a&&l.trigger("scroll_element.xdsoft_scroller",[t||Math.abs(parseInt(o.css("marginTop"),10))/(s-i)]))}),l.on("mousewheel",function(e){var t=Math.abs(parseInt(o.css("marginTop"),10));return(t-=20*e.deltaY)<0&&(t=0),l.trigger("scroll_element.xdsoft_scroller",[t/(s-i)]),e.stopPropagation(),!1}),l.on("touchstart",function(e){n=a(e),c=Math.abs(parseInt(o.css("marginTop"),10))}),l.on("touchmove",function(e){if(n){e.preventDefault();var t=a(e);l.trigger("scroll_element.xdsoft_scroller",[(c-(t.y-n.y))/(s-i)])}}),l.on("touchend touchcancel",function(){n=!1,c=0})),l.trigger("resize_scroll.xdsoft_scroller",[D])):l.find(".xdsoft_scrollbar").hide()})},L.fn.datetimepicker=function(H,a){var n,r,o=this,p=17,D=13,y=27,v=37,b=38,k=39,x=40,T=9,S=116,M=65,w=67,j=86,J=90,z=89,I=!1,N=L.isPlainObject(H)||!H?L.extend(!0,{},s,H):L.extend(!0,{},s),i=0;return n=function(O){var t,n,a,r,W,h,_=L('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),e=L('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),g=L('<div class="xdsoft_datepicker active"></div>'),F=L('<div class="xdsoft_monthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button><div class="xdsoft_label xdsoft_month"><span></span><i></i></div><div class="xdsoft_label xdsoft_year"><span></span><i></i></div><button type="button" class="xdsoft_next"></button></div>'),C=L('<div class="xdsoft_calendar"></div>'),o=L('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),u=o.find(".xdsoft_time_box").eq(0),P=L('<div class="xdsoft_time_variant"></div>'),i=L('<button type="button" class="xdsoft_save_selected blue-gradient-button">Save Selected</button>'),Y=L('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),A=L('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),s=!1,d=0;N.id&&_.attr("id",N.id),N.style&&_.attr("style",N.style),N.weeks&&_.addClass("xdsoft_showweeks"),N.rtl&&_.addClass("xdsoft_rtl"),_.addClass("xdsoft_"+N.theme),_.addClass(N.className),F.find(".xdsoft_month span").after(Y),F.find(".xdsoft_year span").after(A),F.find(".xdsoft_month,.xdsoft_year").on("touchstart mousedown.xdsoft",function(e){var t,a,n=L(this).find(".xdsoft_select").eq(0),r=0,o=0,i=n.is(":visible");for(F.find(".xdsoft_select").hide(),W.currentTime&&(r=W.currentTime[L(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),n[i?"hide":"show"](),t=n.find("div.xdsoft_option"),a=0;a<t.length&&t.eq(a).data("value")!==r;a+=1)o+=t[0].offsetHeight;return n.xdsoftScroller(N,o/(n.children()[0].offsetHeight-n[0].clientHeight)),e.stopPropagation(),!1});var l=function(e){var t=e.originalEvent,a=t.touches?t.touches[0]:t;this.touchStartPosition=this.touchStartPosition||a;var n=Math.abs(this.touchStartPosition.clientX-a.clientX),r=Math.abs(this.touchStartPosition.clientY-a.clientY);Math.sqrt(n*n+r*r)>N.touchMovedThreshold&&(this.touchMoved=!0)};function f(){var e,t=!1;return N.startDate?t=W.strToDate(N.startDate):(t=N.value||(O&&O.val&&O.val()?O.val():""))?(t=W.strToDateTime(t),N.yearOffset&&(t=new Date(t.getFullYear()-N.yearOffset,t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))):N.defaultDate&&(t=W.strToDateTime(N.defaultDate),N.defaultTime&&(e=W.strtotime(N.defaultTime),t.setHours(e.getHours()),t.setMinutes(e.getMinutes()))),t&&W.isValidDate(t)?_.data("changed",!0):t="",t||0}function c(m){var h=function(e,t){var a=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return new RegExp(a).test(t)},g=function(e,t){if(!(e="string"==typeof e||e instanceof String?m.ownerDocument.getElementById(e):e))return!1;if(e.createTextRange){var a=e.createTextRange();return a.collapse(!0),a.moveEnd("character",t),a.moveStart("character",t),a.select(),!0}return!!e.setSelectionRange&&(e.setSelectionRange(t,t),!0)};m.mask&&O.off("keydown.xdsoft"),!0===m.mask&&(E.formatMask?m.mask=E.formatMask(m.format):m.mask=m.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59")),"string"===L.type(m.mask)&&(h(m.mask,O.val())||(O.val(m.mask.replace(/[0-9]/g,"_")),g(O[0],0)),O.on("paste.xdsoft",function(e){var t=(e.clipboardData||e.originalEvent.clipboardData||window.clipboardData).getData("text"),a=this.value,n=this.selectionStart;return a=a.substr(0,n)+t+a.substr(n+t.length),n+=t.length,h(m.mask,a)?(this.value=a,g(this,n)):""===L.trim(a)?this.value=m.mask.replace(/[0-9]/g,"_"):O.trigger("error_input.xdsoft"),e.preventDefault(),!1}),O.on("keydown.xdsoft",function(e){var t,a=this.value,n=e.which,r=this.selectionStart,o=this.selectionEnd,i=r!==o;if(48<=n&&n<=57||96<=n&&n<=105||8===n||46===n){for(t=8===n||46===n?"_":String.fromCharCode(96<=n&&n<=105?n-48:n),8===n&&r&&!i&&(r-=1);;){var s=m.mask.substr(r,1),d=r<m.mask.length,u=0<r;if(!(/[^0-9_]/.test(s)&&d&&u))break;r+=8!==n||i?1:-1}if(e.metaKey&&(i=!(r=0)),i){var l=o-r,f=m.mask.replace(/[0-9]/g,"_"),c=f.substr(r,l).substr(1);a=a.substr(0,r)+(t+c)+a.substr(r+l)}else{a=a.substr(0,r)+t+a.substr(r+1)}if(""===L.trim(a))a=f;else if(r===m.mask.length)return e.preventDefault(),!1;for(r+=8===n?0:1;/[^0-9_]/.test(m.mask.substr(r,1))&&r<m.mask.length&&0<r;)r+=8===n?0:1;h(m.mask,a)?(this.value=a,g(this,r)):""===L.trim(a)?this.value=m.mask.replace(/[0-9]/g,"_"):O.trigger("error_input.xdsoft")}else if(-1!==[M,w,j,J,z].indexOf(n)&&I||-1!==[y,b,x,v,k,S,p,T,D].indexOf(n))return!0;return e.preventDefault(),!1}))}F.find(".xdsoft_select").xdsoftScroller(N).on("touchstart mousedown.xdsoft",function(e){var t=e.originalEvent;this.touchMoved=!1,this.touchStartPosition=t.touches?t.touches[0]:t,e.stopPropagation(),e.preventDefault()}).on("touchmove",".xdsoft_option",l).on("touchend mousedown.xdsoft",".xdsoft_option",function(){if(!this.touchMoved){void 0!==W.currentTime&&null!==W.currentTime||(W.currentTime=W.now());var e=W.currentTime.getFullYear();W&&W.currentTime&&W.currentTime[L(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](L(this).data("value")),L(this).parent().parent().hide(),_.trigger("xchange.xdsoft"),N.onChangeMonth&&L.isFunction(N.onChangeMonth)&&N.onChangeMonth.call(_,W.currentTime,_.data("input")),e!==W.currentTime.getFullYear()&&L.isFunction(N.onChangeYear)&&N.onChangeYear.call(_,W.currentTime,_.data("input"))}}),_.getValue=function(){return W.getCurrentTime()},_.setOptions=function(e){var l={};N=L.extend(!0,{},N,e),e.allowTimes&&L.isArray(e.allowTimes)&&e.allowTimes.length&&(N.allowTimes=L.extend(!0,[],e.allowTimes)),e.weekends&&L.isArray(e.weekends)&&e.weekends.length&&(N.weekends=L.extend(!0,[],e.weekends)),e.allowDates&&L.isArray(e.allowDates)&&e.allowDates.length&&(N.allowDates=L.extend(!0,[],e.allowDates)),e.allowDateRe&&"[object String]"===Object.prototype.toString.call(e.allowDateRe)&&(N.allowDateRe=new RegExp(e.allowDateRe)),e.highlightedDates&&L.isArray(e.highlightedDates)&&e.highlightedDates.length&&(L.each(e.highlightedDates,function(e,t){var a,n=L.map(t.split(","),L.trim),r=new m(E.parseDate(n[0],N.formatDate),n[1],n[2]),o=E.formatDate(r.date,N.formatDate);void 0!==l[o]?(a=l[o].desc)&&a.length&&r.desc&&r.desc.length&&(l[o].desc=a+"\n"+r.desc):l[o]=r}),N.highlightedDates=L.extend(!0,[],l)),e.highlightedPeriods&&L.isArray(e.highlightedPeriods)&&e.highlightedPeriods.length&&(l=L.extend(!0,[],N.highlightedDates),L.each(e.highlightedPeriods,function(e,t){var a,n,r,o,i,s,d;if(L.isArray(t))a=t[0],n=t[1],r=t[2],d=t[3];else{var u=L.map(t.split(","),L.trim);a=E.parseDate(u[0],N.formatDate),n=E.parseDate(u[1],N.formatDate),r=u[2],d=u[3]}for(;a<=n;)o=new m(a,r,d),i=E.formatDate(a,N.formatDate),a.setDate(a.getDate()+1),void 0!==l[i]?(s=l[i].desc)&&s.length&&o.desc&&o.desc.length&&(l[i].desc=s+"\n"+o.desc):l[i]=o}),N.highlightedDates=L.extend(!0,[],l)),e.disabledDates&&L.isArray(e.disabledDates)&&e.disabledDates.length&&(N.disabledDates=L.extend(!0,[],e.disabledDates)),e.disabledWeekDays&&L.isArray(e.disabledWeekDays)&&e.disabledWeekDays.length&&(N.disabledWeekDays=L.extend(!0,[],e.disabledWeekDays)),!N.open&&!N.opened||N.inline||O.trigger("open.xdsoft"),N.inline&&(s=!0,_.addClass("xdsoft_inline"),O.after(_).hide()),N.inverseButton&&(N.next="xdsoft_prev",N.prev="xdsoft_next"),N.datepicker?g.addClass("active"):g.removeClass("active"),N.timepicker?o.addClass("active"):o.removeClass("active"),N.value&&(W.setCurrentTime(N.value),O&&O.val&&O.val(W.str)),isNaN(N.dayOfWeekStart)?N.dayOfWeekStart=0:N.dayOfWeekStart=parseInt(N.dayOfWeekStart,10)%7,N.timepickerScrollbar||u.xdsoftScroller(N,"hide"),N.minDate&&/^[\+\-](.*)$/.test(N.minDate)&&(N.minDate=E.formatDate(W.strToDateTime(N.minDate),N.formatDate)),N.maxDate&&/^[\+\-](.*)$/.test(N.maxDate)&&(N.maxDate=E.formatDate(W.strToDateTime(N.maxDate),N.formatDate)),N.minDateTime&&/^\+(.*)$/.test(N.minDateTime)&&(N.minDateTime=W.strToDateTime(N.minDateTime).dateFormat(N.formatDate)),N.maxDateTime&&/^\+(.*)$/.test(N.maxDateTime)&&(N.maxDateTime=W.strToDateTime(N.maxDateTime).dateFormat(N.formatDate)),i.toggle(N.showApplyButton),F.find(".xdsoft_today_button").css("visibility",N.todayButton?"visible":"hidden"),F.find("."+N.prev).css("visibility",N.prevButton?"visible":"hidden"),F.find("."+N.next).css("visibility",N.nextButton?"visible":"hidden"),c(N),N.validateOnBlur&&O.off("blur.xdsoft").on("blur.xdsoft",function(){if(N.allowBlank&&(!L.trim(L(this).val()).length||"string"==typeof N.mask&&L.trim(L(this).val())===N.mask.replace(/[0-9]/g,"_")))L(this).val(null),_.data("xdsoft_datetime").empty();else{var e=E.parseDate(L(this).val(),N.format);if(e)L(this).val(E.formatDate(e,N.format));else{var t=+[L(this).val()[0],L(this).val()[1]].join(""),a=+[L(this).val()[2],L(this).val()[3]].join("");!N.datepicker&&N.timepicker&&0<=t&&t<24&&0<=a&&a<60?L(this).val([t,a].map(function(e){return 9<e?e:"0"+e}).join(":")):L(this).val(E.formatDate(W.now(),N.format))}_.data("xdsoft_datetime").setCurrentTime(L(this).val())}_.trigger("changedatetime.xdsoft"),_.trigger("close.xdsoft")}),N.dayOfWeekStartPrev=0===N.dayOfWeekStart?6:N.dayOfWeekStart-1,_.trigger("xchange.xdsoft").trigger("afterOpen.xdsoft")},_.data("options",N).on("touchstart mousedown.xdsoft",function(e){return e.stopPropagation(),e.preventDefault(),A.hide(),Y.hide(),!1}),u.append(P),u.xdsoftScroller(N),_.on("afterOpen.xdsoft",function(){u.xdsoftScroller(N)}),_.append(g).append(o),!0!==N.withoutCopyright&&_.append(e),g.append(F).append(C).append(i),N.insideParent?L(O).parent().append(_):L(N.parentID).append(_),W=new function(){var r=this;r.now=function(e){var t,a,n=new Date;return!e&&N.defaultDate&&(t=r.strToDateTime(N.defaultDate),n.setFullYear(t.getFullYear()),n.setMonth(t.getMonth()),n.setDate(t.getDate())),n.setFullYear(n.getFullYear()),!e&&N.defaultTime&&(a=r.strtotime(N.defaultTime),n.setHours(a.getHours()),n.setMinutes(a.getMinutes()),n.setSeconds(a.getSeconds()),n.setMilliseconds(a.getMilliseconds())),n},r.isValidDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())},r.setCurrentTime=function(e,t){"string"==typeof e?r.currentTime=r.strToDateTime(e):r.isValidDate(e)?r.currentTime=e:e||t||!N.allowBlank||N.inline?r.currentTime=r.now():r.currentTime=null,_.trigger("xchange.xdsoft")},r.empty=function(){r.currentTime=null},r.getCurrentTime=function(){return r.currentTime},r.nextMonth=function(){void 0!==r.currentTime&&null!==r.currentTime||(r.currentTime=r.now());var e,t=r.currentTime.getMonth()+1;return 12===t&&(r.currentTime.setFullYear(r.currentTime.getFullYear()+1),t=0),e=r.currentTime.getFullYear(),r.currentTime.setDate(Math.min(new Date(r.currentTime.getFullYear(),t+1,0).getDate(),r.currentTime.getDate())),r.currentTime.setMonth(t),N.onChangeMonth&&L.isFunction(N.onChangeMonth)&&N.onChangeMonth.call(_,W.currentTime,_.data("input")),e!==r.currentTime.getFullYear()&&L.isFunction(N.onChangeYear)&&N.onChangeYear.call(_,W.currentTime,_.data("input")),_.trigger("xchange.xdsoft"),t},r.prevMonth=function(){void 0!==r.currentTime&&null!==r.currentTime||(r.currentTime=r.now());var e=r.currentTime.getMonth()-1;return-1===e&&(r.currentTime.setFullYear(r.currentTime.getFullYear()-1),e=11),r.currentTime.setDate(Math.min(new Date(r.currentTime.getFullYear(),e+1,0).getDate(),r.currentTime.getDate())),r.currentTime.setMonth(e),N.onChangeMonth&&L.isFunction(N.onChangeMonth)&&N.onChangeMonth.call(_,W.currentTime,_.data("input")),_.trigger("xchange.xdsoft"),e},r.getWeekOfYear=function(e){if(N.onGetWeekOfYear&&L.isFunction(N.onGetWeekOfYear)){var t=N.onGetWeekOfYear.call(_,e);if(void 0!==t)return t}var a=new Date(e.getFullYear(),0,1);return 4!==a.getDay()&&a.setMonth(0,1+(4-a.getDay()+7)%7),Math.ceil(((e-a)/864e5+a.getDay()+1)/7)},r.strToDateTime=function(e){var t,a,n=[];return e&&e instanceof Date&&r.isValidDate(e)?e:((n=/^([+-]{1})(.*)$/.exec(e))&&(n[2]=E.parseDate(n[2],N.formatDate)),a=n&&n[2]?(t=n[2].getTime()-6e4*n[2].getTimezoneOffset(),new Date(r.now(!0).getTime()+parseInt(n[1]+"1",10)*t)):e?E.parseDate(e,N.format):r.now(),r.isValidDate(a)||(a=r.now()),a)},r.strToDate=function(e){if(e&&e instanceof Date&&r.isValidDate(e))return e;var t=e?E.parseDate(e,N.formatDate):r.now(!0);return r.isValidDate(t)||(t=r.now(!0)),t},r.strtotime=function(e){if(e&&e instanceof Date&&r.isValidDate(e))return e;var t=e?E.parseDate(e,N.formatTime):r.now(!0);return r.isValidDate(t)||(t=r.now(!0)),t},r.str=function(){var e=N.format;return N.yearOffset&&(e=(e=e.replace("Y",r.currentTime.getFullYear()+N.yearOffset)).replace("y",String(r.currentTime.getFullYear()+N.yearOffset).substring(2,4))),E.formatDate(r.currentTime,e)},r.currentTime=this.now()},i.on("touchend click",function(e){e.preventDefault(),_.data("changed",!0),W.setCurrentTime(f()),O.val(W.str()),_.trigger("close.xdsoft")}),F.find(".xdsoft_today_button").on("touchend mousedown.xdsoft",function(){_.data("changed",!0),W.setCurrentTime(0,!0),_.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){var e,t,a=W.getCurrentTime();a=new Date(a.getFullYear(),a.getMonth(),a.getDate()),e=W.strToDate(N.minDate),a<(e=new Date(e.getFullYear(),e.getMonth(),e.getDate()))||(t=W.strToDate(N.maxDate),(t=new Date(t.getFullYear(),t.getMonth(),t.getDate()))<a||(O.val(W.str()),O.trigger("change"),_.trigger("close.xdsoft")))}),F.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",function(){var a=L(this),n=0,r=!1;!function e(t){a.hasClass(N.next)?W.nextMonth():a.hasClass(N.prev)&&W.prevMonth(),N.monthChangeSpinner&&(r||(n=setTimeout(e,t||100)))}(500),L([N.ownerDocument.body,N.contentWindow]).on("touchend mouseup.xdsoft",function e(){clearTimeout(n),r=!0,L([N.ownerDocument.body,N.contentWindow]).off("touchend mouseup.xdsoft",e)})}),o.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",function(){var o=L(this),i=0,s=!1,d=110;!function e(t){var a=u[0].clientHeight,n=P[0].offsetHeight,r=Math.abs(parseInt(P.css("marginTop"),10));o.hasClass(N.next)&&n-a-N.timeHeightInTimePicker>=r?P.css("marginTop","-"+(r+N.timeHeightInTimePicker)+"px"):o.hasClass(N.prev)&&0<=r-N.timeHeightInTimePicker&&P.css("marginTop","-"+(r-N.timeHeightInTimePicker)+"px"),u.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(P[0].style.marginTop,10)/(n-a))]),d=10<d?10:d-10,s||(i=setTimeout(e,t||d))}(500),L([N.ownerDocument.body,N.contentWindow]).on("touchend mouseup.xdsoft",function e(){clearTimeout(i),s=!0,L([N.ownerDocument.body,N.contentWindow]).off("touchend mouseup.xdsoft",e)})}),t=0,_.on("xchange.xdsoft",function(e){clearTimeout(t),t=setTimeout(function(){void 0!==W.currentTime&&null!==W.currentTime||(W.currentTime=W.now());for(var e,t,a,n,r,o,i,s,d,u,l="",f=new Date(W.currentTime.getFullYear(),W.currentTime.getMonth(),1,12,0,0),c=0,m=W.now(),h=!1,g=!1,p=!1,D=!1,y=[],v=!0,b="";f.getDay()!==N.dayOfWeekStart;)f.setDate(f.getDate()-1);for(l+="<table><thead><tr>",N.weeks&&(l+="<th></th>"),e=0;e<7;e+=1)l+="<th>"+N.i18n[R].dayOfWeekShort[(e+N.dayOfWeekStart)%7]+"</th>";for(l+="</tr></thead>",l+="<tbody>",!1!==N.maxDate&&(h=W.strToDate(N.maxDate),h=new Date(h.getFullYear(),h.getMonth(),h.getDate(),23,59,59,999)),!1!==N.minDate&&(g=W.strToDate(N.minDate),g=new Date(g.getFullYear(),g.getMonth(),g.getDate())),!1!==N.minDateTime&&(p=W.strToDate(N.minDateTime),p=new Date(p.getFullYear(),p.getMonth(),p.getDate(),p.getHours(),p.getMinutes(),p.getSeconds())),!1!==N.maxDateTime&&(D=W.strToDate(N.maxDateTime),D=new Date(D.getFullYear(),D.getMonth(),D.getDate(),D.getHours(),D.getMinutes(),D.getSeconds())),!1!==D&&(u=31*(12*D.getFullYear()+D.getMonth())+D.getDate());c<W.currentTime.countDaysInMonth()||f.getDay()!==N.dayOfWeekStart||W.currentTime.getMonth()===f.getMonth();){y=[],c+=1,a=f.getDay(),n=f.getDate(),r=f.getFullYear(),M=f.getMonth(),o=W.getWeekOfYear(f),d="",y.push("xdsoft_date"),i=N.beforeShowDay&&L.isFunction(N.beforeShowDay.call)?N.beforeShowDay.call(_,f):null,N.allowDateRe&&"[object RegExp]"===Object.prototype.toString.call(N.allowDateRe)&&(N.allowDateRe.test(E.formatDate(f,N.formatDate))||y.push("xdsoft_disabled")),N.allowDates&&0<N.allowDates.length&&-1===N.allowDates.indexOf(E.formatDate(f,N.formatDate))&&y.push("xdsoft_disabled");var k=31*(12*f.getFullYear()+f.getMonth())+f.getDate();(!1!==h&&h<f||!1!==p&&f<p||!1!==g&&f<g||!1!==D&&u<k||i&&!1===i[0])&&y.push("xdsoft_disabled"),-1!==N.disabledDates.indexOf(E.formatDate(f,N.formatDate))&&y.push("xdsoft_disabled"),-1!==N.disabledWeekDays.indexOf(a)&&y.push("xdsoft_disabled"),O.is("[disabled]")&&y.push("xdsoft_disabled"),i&&""!==i[1]&&y.push(i[1]),W.currentTime.getMonth()!==M&&y.push("xdsoft_other_month"),(N.defaultSelect||_.data("changed"))&&E.formatDate(W.currentTime,N.formatDate)===E.formatDate(f,N.formatDate)&&y.push("xdsoft_current"),E.formatDate(m,N.formatDate)===E.formatDate(f,N.formatDate)&&y.push("xdsoft_today"),0!==f.getDay()&&6!==f.getDay()&&-1===N.weekends.indexOf(E.formatDate(f,N.formatDate))||y.push("xdsoft_weekend"),void 0!==N.highlightedDates[E.formatDate(f,N.formatDate)]&&(t=N.highlightedDates[E.formatDate(f,N.formatDate)],y.push(void 0===t.style?"xdsoft_highlighted_default":t.style),d=void 0===t.desc?"":t.desc),N.beforeShowDay&&L.isFunction(N.beforeShowDay)&&y.push(N.beforeShowDay(f)),v&&(l+="<tr>",v=!1,N.weeks&&(l+="<th>"+o+"</th>")),l+='<td data-date="'+n+'" data-month="'+M+'" data-year="'+r+'" class="xdsoft_date xdsoft_day_of_week'+f.getDay()+" "+y.join(" ")+'" title="'+d+'"><div>'+n+"</div></td>",f.getDay()===N.dayOfWeekStartPrev&&(l+="</tr>",v=!0),f.setDate(n+1)}l+="</tbody></table>",C.html(l),F.find(".xdsoft_label span").eq(0).text(N.i18n[R].months[W.currentTime.getMonth()]),F.find(".xdsoft_label span").eq(1).text(W.currentTime.getFullYear()+N.yearOffset),M=b="";var x=0;if(!1!==N.minTime){var T=W.strtotime(N.minTime);x=60*T.getHours()+T.getMinutes()}var S=1440;if(!1!==N.maxTime){T=W.strtotime(N.maxTime);S=60*T.getHours()+T.getMinutes()}if(!1!==N.minDateTime){T=W.strToDateTime(N.minDateTime);if(E.formatDate(W.currentTime,N.formatDate)===E.formatDate(T,N.formatDate)){var M=60*T.getHours()+T.getMinutes();x<M&&(x=M)}}if(!1!==N.maxDateTime){T=W.strToDateTime(N.maxDateTime);if(E.formatDate(W.currentTime,N.formatDate)===E.formatDate(T,N.formatDate))(M=60*T.getHours()+T.getMinutes())<S&&(S=M)}if(s=function(e,t){var a,n=W.now(),r=N.allowTimes&&L.isArray(N.allowTimes)&&N.allowTimes.length;n.setHours(e),e=parseInt(n.getHours(),10),n.setMinutes(t),t=parseInt(n.getMinutes(),10),y=[];var o=60*e+t;(O.is("[disabled]")||S<=o||o<x)&&y.push("xdsoft_disabled"),(a=new Date(W.currentTime)).setHours(parseInt(W.currentTime.getHours(),10)),r||a.setMinutes(Math[N.roundTime](W.currentTime.getMinutes()/N.step)*N.step),(N.initTime||N.defaultSelect||_.data("changed"))&&a.getHours()===parseInt(e,10)&&(!r&&59<N.step||a.getMinutes()===parseInt(t,10))&&(N.defaultSelect||_.data("changed")?y.push("xdsoft_current"):N.initTime&&y.push("xdsoft_init_time")),parseInt(m.getHours(),10)===parseInt(e,10)&&parseInt(m.getMinutes(),10)===parseInt(t,10)&&y.push("xdsoft_today"),b+='<div class="xdsoft_time '+y.join(" ")+'" data-hour="'+e+'" data-minute="'+t+'">'+E.formatDate(n,N.formatTime)+"</div>"},N.allowTimes&&L.isArray(N.allowTimes)&&N.allowTimes.length)for(c=0;c<N.allowTimes.length;c+=1)s(W.strtotime(N.allowTimes[c]).getHours(),M=W.strtotime(N.allowTimes[c]).getMinutes());else for(e=c=0;c<(N.hours12?12:24);c+=1)for(e=0;e<60;e+=N.step){var w=60*c+e;w<x||(S<=w||s((c<10?"0":"")+c,M=(e<10?"0":"")+e))}for(P.html(b),H="",c=parseInt(N.yearStart,10);c<=parseInt(N.yearEnd,10);c+=1)H+='<div class="xdsoft_option '+(W.currentTime.getFullYear()===c?"xdsoft_current":"")+'" data-value="'+c+'">'+(c+N.yearOffset)+"</div>";for(A.children().eq(0).html(H),c=parseInt(N.monthStart,10),H="";c<=parseInt(N.monthEnd,10);c+=1)H+='<div class="xdsoft_option '+(W.currentTime.getMonth()===c?"xdsoft_current":"")+'" data-value="'+c+'">'+N.i18n[R].months[c]+"</div>";Y.children().eq(0).html(H),L(_).trigger("generate.xdsoft")},10),e.stopPropagation()}).on("afterOpen.xdsoft",function(){var e,t,a,n;N.timepicker&&(P.find(".xdsoft_current").length?e=".xdsoft_current":P.find(".xdsoft_init_time").length&&(e=".xdsoft_init_time"),e?(t=u[0].clientHeight,(a=P[0].offsetHeight)-t<(n=P.find(e).index()*N.timeHeightInTimePicker+1)&&(n=a-t),u.trigger("scroll_element.xdsoft_scroller",[parseInt(n,10)/(a-t)])):u.trigger("scroll_element.xdsoft_scroller",[0]))}),n=0,C.on("touchend click.xdsoft","td",function(e){e.stopPropagation(),n+=1;var t=L(this),a=W.currentTime;if(null==a&&(W.currentTime=W.now(),a=W.currentTime),t.hasClass("xdsoft_disabled"))return!1;a.setDate(1),a.setFullYear(t.data("year")),a.setMonth(t.data("month")),a.setDate(t.data("date")),_.trigger("select.xdsoft",[a]),O.val(W.str()),N.onSelectDate&&L.isFunction(N.onSelectDate)&&N.onSelectDate.call(_,W.currentTime,_.data("input"),e),_.data("changed",!0),_.trigger("xchange.xdsoft"),_.trigger("changedatetime.xdsoft"),(1<n||!0===N.closeOnDateSelect||!1===N.closeOnDateSelect&&!N.timepicker)&&!N.inline&&_.trigger("close.xdsoft"),setTimeout(function(){n=0},200)}),P.on("touchstart","div",function(e){this.touchMoved=!1}).on("touchmove","div",l).on("touchend click.xdsoft","div",function(e){if(!this.touchMoved){e.stopPropagation();var t=L(this),a=W.currentTime;if(null==a&&(W.currentTime=W.now(),a=W.currentTime),t.hasClass("xdsoft_disabled"))return!1;a.setHours(t.data("hour")),a.setMinutes(t.data("minute")),_.trigger("select.xdsoft",[a]),_.data("input").val(W.str()),N.onSelectTime&&L.isFunction(N.onSelectTime)&&N.onSelectTime.call(_,W.currentTime,_.data("input"),e),_.data("changed",!0),_.trigger("xchange.xdsoft"),_.trigger("changedatetime.xdsoft"),!0!==N.inline&&!0===N.closeOnTimeSelect&&_.trigger("close.xdsoft")}}),g.on("mousewheel.xdsoft",function(e){return!N.scrollMonth||(e.deltaY<0?W.nextMonth():W.prevMonth(),!1)}),O.on("mousewheel.xdsoft",function(e){return!N.scrollInput||(!N.datepicker&&N.timepicker?(0<=(a=P.find(".xdsoft_current").length?P.find(".xdsoft_current").eq(0).index():0)+e.deltaY&&a+e.deltaY<P.children().length&&(a+=e.deltaY),P.children().eq(a).length&&P.children().eq(a).trigger("mousedown"),!1):N.datepicker&&!N.timepicker?(g.trigger(e,[e.deltaY,e.deltaX,e.deltaY]),O.val&&O.val(W.str()),_.trigger("changedatetime.xdsoft"),!1):void 0)}),_.on("changedatetime.xdsoft",function(e){if(N.onChangeDateTime&&L.isFunction(N.onChangeDateTime)){var t=_.data("input");N.onChangeDateTime.call(_,W.currentTime,t,e),delete N.value,t.trigger("change")}}).on("generate.xdsoft",function(){N.onGenerate&&L.isFunction(N.onGenerate)&&N.onGenerate.call(_,W.currentTime,_.data("input")),s&&(_.trigger("afterOpen.xdsoft"),s=!1)}).on("click.xdsoft",function(e){e.stopPropagation()}),a=0,h=function(e,t){do{if(!(e=e.parentNode)||!1===t(e))break}while("HTML"!==e.nodeName)},r=function(){var e,t,a,n,r,o,i,s,d,u,l,f,c;if(e=(s=_.data("input")).offset(),t=s[0],u="top",a=e.top+t.offsetHeight-1,n=e.left,r="absolute",d=L(N.contentWindow).width(),f=L(N.contentWindow).height(),c=L(N.contentWindow).scrollTop(),N.ownerDocument.documentElement.clientWidth-e.left<g.parent().outerWidth(!0)){var m=g.parent().outerWidth(!0)-t.offsetWidth;n-=m}"rtl"===s.parent().css("direction")&&(n-=_.outerWidth()-s.outerWidth()),N.fixed?(a-=c,n-=L(N.contentWindow).scrollLeft(),r="fixed"):(i=!1,h(t,function(e){return null!==e&&("fixed"===N.contentWindow.getComputedStyle(e).getPropertyValue("position")?!(i=!0):void 0)}),i&&!N.insideParent?(r="fixed",a+_.outerHeight()>f+c?(u="bottom",a=f+c-e.top):a-=c):a+_[0].offsetHeight>f+c&&(a=e.top-_[0].offsetHeight+1),a<0&&(a=0),n+t.offsetWidth>d&&(n=d-t.offsetWidth)),o=_[0],h(o,function(e){if("relative"===N.contentWindow.getComputedStyle(e).getPropertyValue("position")&&d>=e.offsetWidth)return n-=(d-e.offsetWidth)/2,!1}),l={position:r,left:N.insideParent?t.offsetLeft:n,top:"",bottom:""},N.insideParent?l[u]=t.offsetTop+t.offsetHeight:l[u]=a,_.css(l)},_.on("open.xdsoft",function(e){var t=!0;N.onShow&&L.isFunction(N.onShow)&&(t=N.onShow.call(_,W.currentTime,_.data("input"),e)),!1!==t&&(_.show(),r(),L(N.contentWindow).off("resize.xdsoft",r).on("resize.xdsoft",r),N.closeOnWithoutClick&&L([N.ownerDocument.body,N.contentWindow]).on("touchstart mousedown.xdsoft",function e(){_.trigger("close.xdsoft"),L([N.ownerDocument.body,N.contentWindow]).off("touchstart mousedown.xdsoft",e)}))}).on("close.xdsoft",function(e){var t=!0;F.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide(),N.onClose&&L.isFunction(N.onClose)&&(t=N.onClose.call(_,W.currentTime,_.data("input"),e)),!1===t||N.opened||N.inline||_.hide(),e.stopPropagation()}).on("toggle.xdsoft",function(){_.is(":visible")?_.trigger("close.xdsoft"):_.trigger("open.xdsoft")}).data("input",O),d=0,_.data("xdsoft_datetime",W),_.setOptions(N),W.setCurrentTime(f()),O.data("xdsoft_datetimepicker",_).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function(){O.is(":disabled")||O.data("xdsoft_datetimepicker").is(":visible")&&N.closeOnInputClick||N.openOnFocus&&(clearTimeout(d),d=setTimeout(function(){O.is(":disabled")||(s=!0,W.setCurrentTime(f(),!0),N.mask&&c(N),_.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(e){var t,a=e.which;return-1!==[D].indexOf(a)&&N.enterLikeTab?(t=L("input:visible,textarea:visible,button:visible,a:visible"),_.trigger("close.xdsoft"),t.eq(t.index(this)+1).focus(),!1):-1!==[T].indexOf(a)?(_.trigger("close.xdsoft"),!0):void 0}).on("blur.xdsoft",function(){_.trigger("close.xdsoft")})},r=function(e){var t=e.data("xdsoft_datetimepicker");t&&(t.data("xdsoft_datetime",null),t.remove(),e.data("xdsoft_datetimepicker",null).off(".xdsoft"),L(N.contentWindow).off("resize.xdsoft"),L([N.contentWindow,N.ownerDocument.body]).off("mousedown.xdsoft touchstart"),e.unmousewheel&&e.unmousewheel())},L(N.ownerDocument).off("keydown.xdsoftctrl keyup.xdsoftctrl").off("keydown.xdsoftcmd keyup.xdsoftcmd").on("keydown.xdsoftctrl",function(e){e.keyCode===p&&(I=!0)}).on("keyup.xdsoftctrl",function(e){e.keyCode===p&&(I=!1)}).on("keydown.xdsoftcmd",function(e){91===e.keyCode&&!0}).on("keyup.xdsoftcmd",function(e){91===e.keyCode&&!1}),this.each(function(){var t,e=L(this).data("xdsoft_datetimepicker");if(e){if("string"===L.type(H))switch(H){case"show":L(this).select().focus(),e.trigger("open.xdsoft");break;case"hide":e.trigger("close.xdsoft");break;case"toggle":e.trigger("toggle.xdsoft");break;case"destroy":r(L(this));break;case"reset":this.value=this.defaultValue,this.value&&e.data("xdsoft_datetime").isValidDate(E.parseDate(this.value,N.format))||e.data("changed",!1),e.data("xdsoft_datetime").setCurrentTime(this.value);break;case"validate":e.data("input").trigger("blur.xdsoft");break;default:e[H]&&L.isFunction(e[H])&&(o=e[H](a))}else e.setOptions(H);return 0}"string"!==L.type(H)&&(!N.lazyInit||N.open||N.inline?n(L(this)):(t=L(this)).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function e(){t.is(":disabled")||t.data("xdsoft_datetimepicker")||(clearTimeout(i),i=setTimeout(function(){t.data("xdsoft_datetimepicker")||n(t),t.off("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",e).trigger("open.xdsoft")},100))}))}),o},L.fn.datetimepicker.defaults=s};!function(e){"function"==typeof define&&define.amd?define(["jquery","jquery-mousewheel"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(datetimepickerFactory),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(c){var m,h,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],g=Array.prototype.slice;if(c.event.fixHooks)for(var a=e.length;a;)c.event.fixHooks[e[--a]]=c.event.mouseHooks;var p=c.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],n,!1);else this.onmousewheel=n;c.data(this,"mousewheel-line-height",p.getLineHeight(this)),c.data(this,"mousewheel-page-height",p.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],n,!1);else this.onmousewheel=null;c.removeData(this,"mousewheel-line-height"),c.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=c(e),a=t["offsetParent"in c.fn?"offsetParent":"parent"]();return a.length||(a=c("body")),parseInt(a.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return c(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function n(e){var t,a=e||window.event,n=g.call(arguments,1),r=0,o=0,i=0,s=0,d=0;if((e=c.event.fix(a)).type="mousewheel","detail"in a&&(i=-1*a.detail),"wheelDelta"in a&&(i=a.wheelDelta),"wheelDeltaY"in a&&(i=a.wheelDeltaY),"wheelDeltaX"in a&&(o=-1*a.wheelDeltaX),"axis"in a&&a.axis===a.HORIZONTAL_AXIS&&(o=-1*i,i=0),r=0===i?o:i,"deltaY"in a&&(r=i=-1*a.deltaY),"deltaX"in a&&(o=a.deltaX,0===i&&(r=-1*o)),0!==i||0!==o){if(1===a.deltaMode){var u=c.data(this,"mousewheel-line-height");r*=u,i*=u,o*=u}else if(2===a.deltaMode){var l=c.data(this,"mousewheel-page-height");r*=l,i*=l,o*=l}if(t=Math.max(Math.abs(i),Math.abs(o)),(!h||t<h)&&y(a,h=t)&&(h/=40),y(a,t)&&(r/=40,o/=40,i/=40),r=Math[1<=r?"floor":"ceil"](r/h),o=Math[1<=o?"floor":"ceil"](o/h),i=Math[1<=i?"floor":"ceil"](i/h),p.settings.normalizeOffset&&this.getBoundingClientRect){var f=this.getBoundingClientRect();s=e.clientX-f.left,d=e.clientY-f.top}return e.deltaX=o,e.deltaY=i,e.deltaFactor=h,e.offsetX=s,e.offsetY=d,e.deltaMode=0,n.unshift(e,r,o,i),m&&clearTimeout(m),m=setTimeout(D,200),(c.event.dispatch||c.event.handle).apply(this,n)}}function D(){h=null}function y(e,t){return p.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}c.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})});
14850 14851$(document).ready(function () { 14852$("#verification_form").validate(); 14853}); 14854jQuery.datetimepicker.setLocale('fr');
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.