/*! jQuery v3.6.4 | (c) OpenJS Foundation and other contributors | jquery.org/license */ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.4",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.cssHas=ce(function(){try{return C.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),d.cssHas||y.push(":has"),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType&&e.documentElement||e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0').get(0).files,S.formdata=void 0!==window.FormData;var _=!!q.fn.prop;function o(e){var t=e.data;e.isDefaultPrevented()||(e.preventDefault(),q(e.target).closest("form").ajaxSubmit(t))}function i(e){var t=e.target,r=q(t);if(!r.is("[type=submit],[type=image]")){var a=r.closest("[type=submit]");if(0===a.length)return;t=a[0]}var n,o=t.form;"image"===(o.clk=t).type&&(void 0!==e.offsetX?(o.clk_x=e.offsetX,o.clk_y=e.offsetY):"function"==typeof q.fn.offset?(n=r.offset(),o.clk_x=e.pageX-n.left,o.clk_y=e.pageY-n.top):(o.clk_x=e.pageX-t.offsetLeft,o.clk_y=e.pageY-t.offsetTop)),setTimeout(function(){o.clk=o.clk_x=o.clk_y=null},100)}function N(){var e;q.fn.ajaxSubmit.debug&&(e="[jquery.form] "+Array.prototype.join.call(arguments,""),window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e))}q.fn.attr2=function(){if(!_)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},q.fn.ajaxSubmit=function(M,e,t,r){if(!this.length)return N("ajaxSubmit: skipping submit process - no element selected"),this;var O,a,n,o,X=this;"function"==typeof M?M={success:M}:"string"==typeof M||!1===M&&0',s)).css({position:"absolute",top:"-1000px",left:"-1000px"}),m=d[0],p={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var t="timeout"===e?"timeout":"aborted";N("aborting upload... "+t),this.aborted=1;try{m.contentWindow.document.execCommand&&m.contentWindow.document.execCommand("Stop")}catch(e){}d.attr("src",l.iframeSrc),p.error=t,l.error&&l.error.call(l.context,p,t,e),f&&q.event.trigger("ajaxError",[p,l,t]),l.complete&&l.complete.call(l.context,p,t)}},(f=l.global)&&0==q.active++&&q.event.trigger("ajaxStart"),f&&q.event.trigger("ajaxSend",[p,l]),l.beforeSend&&!1===l.beforeSend.call(l.context,p,l))return l.global&&q.active--,g.reject(),g;if(p.aborted)return g.reject(),g;(a=i.clk)&&(n=a.name)&&!a.disabled&&(l.extraData=l.extraData||{},l.extraData[n]=a.value,"image"===a.type&&(l.extraData[n+".x"]=i.clk_x,l.extraData[n+".y"]=i.clk_y));var x=1,y=2;function b(t){var r=null;try{t.contentWindow&&(r=t.contentWindow.document)}catch(e){N("cannot get iframe.contentWindow document: "+e)}if(r)return r;try{r=t.contentDocument?t.contentDocument:t.document}catch(e){N("cannot get iframe.contentDocument: "+e),r=t.document}return r}var c=q("meta[name=csrf-token]").attr("content"),T=q("meta[name=csrf-param]").attr("content");function j(){var e=X.attr2("target"),t=X.attr2("action"),r=X.attr("enctype")||X.attr("encoding")||"multipart/form-data";i.setAttribute("target",o),O&&!/post/i.test(O)||i.setAttribute("method","POST"),t!==l.url&&i.setAttribute("action",l.url),l.skipEncodingOverride||O&&!/post/i.test(O)||X.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),l.timeout&&(v=setTimeout(function(){h=!0,A(x)},l.timeout));var a=[];try{if(l.extraData)for(var n in l.extraData)l.extraData.hasOwnProperty(n)&&(q.isPlainObject(l.extraData[n])&&l.extraData[n].hasOwnProperty("name")&&l.extraData[n].hasOwnProperty("value")?a.push(q('',s).val(l.extraData[n].value).appendTo(i)[0]):a.push(q('',s).val(l.extraData[n]).appendTo(i)[0]));l.iframeTarget||d.appendTo(u),m.attachEvent?m.attachEvent("onload",A):m.addEventListener("load",A,!1),setTimeout(function e(){try{var t=b(m).readyState;N("state = "+t),t&&"uninitialized"===t.toLowerCase()&&setTimeout(e,50)}catch(e){N("Server abort: ",e," (",e.name,")"),A(y),v&&clearTimeout(v),v=void 0}},15);try{i.submit()}catch(e){document.createElement("form").submit.apply(i)}}finally{i.setAttribute("action",t),i.setAttribute("enctype",r),e?i.setAttribute("target",e):X.removeAttr("target"),q(a).remove()}}T&&c&&(l.extraData=l.extraData||{},l.extraData[T]=c),l.forceSync?j():setTimeout(j,10);var w,S,k,D=50;function A(e){if(!p.aborted&&!k){if((S=b(m))||(N("cannot access response document"),e=y),e===x&&p)return p.abort("timeout"),void g.reject(p,"timeout");if(e===y&&p)return p.abort("server abort"),void g.reject(p,"error","server abort");if(S&&S.location.href!==l.iframeSrc||h){m.detachEvent?m.detachEvent("onload",A):m.removeEventListener("load",A,!1);var t,r="success";try{if(h)throw"timeout";var a="xml"===l.dataType||S.XMLDocument||q.isXMLDoc(S);if(N("isXml="+a),!a&&window.opera&&(null===S.body||!S.body.innerHTML)&&--D)return N("requeing onLoad callback, DOM not available"),void setTimeout(A,250);var n=S.body?S.body:S.documentElement;p.responseText=n?n.innerHTML:null,p.responseXML=S.XMLDocument?S.XMLDocument:S,a&&(l.dataType="xml"),p.getResponseHeader=function(e){return{"content-type":l.dataType}[e.toLowerCase()]},n&&(p.status=Number(n.getAttribute("status"))||p.status,p.statusText=n.getAttribute("statusText")||p.statusText);var o,i,s,u=(l.dataType||"").toLowerCase(),c=/(json|script|text)/.test(u);c||l.textarea?(o=S.getElementsByTagName("textarea")[0])?(p.responseText=o.value,p.status=Number(o.getAttribute("status"))||p.status,p.statusText=o.getAttribute("statusText")||p.statusText):c&&(i=S.getElementsByTagName("pre")[0],s=S.getElementsByTagName("body")[0],i?p.responseText=i.textContent?i.textContent:i.innerText:s&&(p.responseText=s.textContent?s.textContent:s.innerText)):"xml"===u&&!p.responseXML&&p.responseText&&(p.responseXML=F(p.responseText));try{w=E(p,u,l)}catch(e){r="parsererror",p.error=t=e||r}}catch(e){N("error caught: ",e),r="error",p.error=t=e||r}p.aborted&&(N("upload aborted"),r=null),p.status&&(r=200<=p.status&&p.status<300||304===p.status?"success":"error"),"success"===r?(l.success&&l.success.call(l.context,w,"success",p),g.resolve(p.responseText,"success",p),f&&q.event.trigger("ajaxSuccess",[p,l])):r&&(void 0===t&&(t=p.statusText),l.error&&l.error.call(l.context,p,r,t),g.reject(p,"error",t),f&&q.event.trigger("ajaxError",[p,l,t])),f&&q.event.trigger("ajaxComplete",[p,l]),f&&!--q.active&&q.event.trigger("ajaxStop"),l.complete&&l.complete.call(l.context,p,r),k=!0,l.timeout&&clearTimeout(v),setTimeout(function(){l.iframeTarget?d.attr("src",l.iframeSrc):d.remove(),p.responseXML=null},100)}}}var F=q.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!==t.documentElement.nodeName?t:null},L=q.parseJSON||function(e){return window.eval("("+e+")")},E=function(e,t,r){var a=e.getResponseHeader("content-type")||"",n=("xml"===t||!t)&&0<=a.indexOf("xml"),o=n?e.responseXML:e.responseText;return n&&"parsererror"===o.documentElement.nodeName&&q.error&&q.error("parsererror"),r&&r.dataFilter&&(o=r.dataFilter(o,t)),"string"==typeof o&&(("json"===t||!t)&&0<=a.indexOf("json")?o=L(o):("script"===t||!t)&&0<=a.indexOf("javascript")&&q.globalEval(o)),o};return g}},q.fn.ajaxForm=function(e,t,r,a){if(("string"==typeof e||!1===e&&0n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,{passive:true});else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,{passive:true});else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}); (function($) { function fixTitle($ele) { if ($ele.attr('title') || typeof($ele.attr('original-title')) != 'string') { $ele.attr('original-title', $ele.attr('title') || '').removeAttr('title'); } } function Tipsy(element, options) { this.$element = $(element); this.options = options; this.enabled = true; fixTitle(this.$element); } Tipsy.prototype = { show: function() { var title = this.getTitle(); if (title && this.enabled) { var $tip = this.tip(); $tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title); $tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body); var pos = $.extend({}, this.$element.offset(), { width: this.$element[0].offsetWidth, height: this.$element[0].offsetHeight }); var actualWidth = $tip[0].offsetWidth, actualHeight = $tip[0].offsetHeight; var gravity = (typeof this.options.gravity == 'function') ? this.options.gravity.call(this.$element[0]) : this.options.gravity; var tp; switch (gravity.charAt(0)) { case 'n': tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; break; case 's': tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; break; case 'e': tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset}; break; case 'w': tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset}; break; } if (gravity.length == 2) { if (gravity.charAt(1) == 'w') { tp.left = pos.left + pos.width / 2 - 15; } else { tp.left = pos.left + pos.width / 2 - actualWidth + 15; } } $tip.css(tp).addClass('tipsy-' + gravity); if (this.options.fade) { $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity}); } else { $tip.css({visibility: 'visible', opacity: this.options.opacity}); } } }, hide: function() { if (this.options.fade) { this.tip().stop().fadeOut(function() { $(this).remove(); }); } else { this.tip().remove(); } }, getTitle: function() { var title, $e = this.$element, o = this.options; fixTitle($e); var title, o = this.options; if (typeof o.title == 'string') { title = $e.attr(o.title == 'title' ? 'original-title' : o.title); } else if (typeof o.title == 'function') { title = o.title.call($e[0]); } title = ('' + title).replace(/(^\s*|\s*$)/, ""); return title || o.fallback; }, tip: function() { if (!this.$tip) { this.$tip = $('
').html('
'); } return this.$tip; }, validate: function() { if (!this.$element[0].parentNode) this.hide(); }, enable: function() { this.enabled = true; }, disable: function() { this.enabled = false; }, toggleEnabled: function() { this.enabled = !this.enabled; } }; $.fn.tipsy = function(options) { if (options === true) { return this.data('tipsy'); } else if (typeof options == 'string') { return this.data('tipsy')[options](); } options = $.extend({}, $.fn.tipsy.defaults, options); function get(ele) { var tipsy = $.data(ele, 'tipsy'); if (!tipsy) { tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options)); $.data(ele, 'tipsy', tipsy); } return tipsy; } function enter() { var tipsy = get(this); tipsy.hoverState = 'in'; if (options.delayIn == 0) { tipsy.show(); } else { setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn); } }; function leave() { var tipsy = get(this); tipsy.hoverState = 'out'; if (options.delayOut == 0) { tipsy.hide(); } else { setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut); } }; if (!options.live) this.each(function() { get(this); }); if (options.trigger != 'manual') { var binder = options.live ? 'live' : 'bind', eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus', eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur'; this[binder](eventIn, enter)[binder](eventOut, leave); } return this; }; $.fn.tipsy.defaults = { delayIn: 0, delayOut: 0, fade: false, fallback: '', gravity: 'n', html: false, live: false, offset: 0, opacity: 0.8, title: 'title', trigger: 'hover' }; // Overwrite this method to provide options on a per-element basis. // For example, you could store the gravity in a 'tipsy-gravity' attribute: // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' }); // (remember - do not modify 'options' in place!) $.fn.tipsy.elementOptions = function(ele, options) { return $.metadata ? $.extend({}, options, $(ele).metadata()) : options; }; $.fn.tipsy.autoNS = function() { return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n'; }; $.fn.tipsy.autoWE = function() { return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w'; }; })(jQuery); /** * * Color picker * Author: Stefan Petre www.eyecon.ro * * Dual licensed under the MIT and GPL licenses * */ (function ($) { var ColorPicker = function () { var ids = {}, inAction, charMin = 65, visible, tpl = '
', defaults = { eventName: 'click', onShow: function () {}, onBeforeShow: function(){}, onHide: function () {}, onChange: function () {}, onSubmit: function () {}, color: 'ff0000', livePreview: true, flat: false }, fillRGBFields = function (hsb, cal) { var rgb = HSBToRGB(hsb); $(cal).data('colorpicker').fields .eq(1).val(rgb.r).end() .eq(2).val(rgb.g).end() .eq(3).val(rgb.b).end(); }, fillHSBFields = function (hsb, cal) { $(cal).data('colorpicker').fields .eq(4).val(hsb.h).end() .eq(5).val(hsb.s).end() .eq(6).val(hsb.b).end(); }, fillHexFields = function (hsb, cal) { $(cal).data('colorpicker').fields .eq(0).val(HSBToHex(hsb)).end(); }, setSelector = function (hsb, cal) { $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100})); $(cal).data('colorpicker').selectorIndic.css({ left: parseInt(150 * hsb.s/100, 10), top: parseInt(150 * (100-hsb.b)/100, 10) }); }, setHue = function (hsb, cal) { $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10)); }, setCurrentColor = function (hsb, cal) { $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb)); }, setNewColor = function (hsb, cal) { $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb)); }, keyDown = function (ev) { var pressedKey = ev.charCode || ev.keyCode || -1; if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) { return false; } var cal = $(this).parent().parent(); if (cal.data('colorpicker').livePreview === true) { change.apply(this); } }, change = function (ev) { var cal = $(this).parent().parent(), col; if (this.parentNode.className.indexOf('_hex') > 0) { cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value)); } else if (this.parentNode.className.indexOf('_hsb') > 0) { cal.data('colorpicker').color = col = fixHSB({ h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10), s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10), b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10) }); } else { cal.data('colorpicker').color = col = RGBToHSB(fixRGB({ r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10), g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10), b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10) })); } if (ev) { fillRGBFields(col, cal.get(0)); fillHexFields(col, cal.get(0)); fillHSBFields(col, cal.get(0)); } setSelector(col, cal.get(0)); setHue(col, cal.get(0)); setNewColor(col, cal.get(0)); cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]); }, blur = function (ev) { var cal = $(this).parent().parent(); cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus'); }, focus = function () { charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65; $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus'); $(this).parent().addClass('colorpicker_focus'); }, downIncrement = function (ev) { var field = $(this).parent().find('input').focus(); var current = { el: $(this).parent().addClass('colorpicker_slider'), max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255), y: ev.pageY, field: field, val: parseInt(field.val(), 10), preview: $(this).parent().parent().data('colorpicker').livePreview }; $(document).bind('mouseup', current, upIncrement); $(document).bind('mousemove', current, moveIncrement); }, moveIncrement = function (ev) { ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10)))); if (ev.data.preview) { change.apply(ev.data.field.get(0), [true]); } return false; }, upIncrement = function (ev) { change.apply(ev.data.field.get(0), [true]); ev.data.el.removeClass('colorpicker_slider').find('input').focus(); $(document).unbind('mouseup', upIncrement); $(document).unbind('mousemove', moveIncrement); return false; }, downHue = function (ev) { var current = { cal: $(this).parent(), y: $(this).offset().top }; current.preview = current.cal.data('colorpicker').livePreview; $(document).bind('mouseup', current, upHue); $(document).bind('mousemove', current, moveHue); }, moveHue = function (ev) { change.apply( ev.data.cal.data('colorpicker') .fields .eq(4) .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10)) .get(0), [ev.data.preview] ); return false; }, upHue = function (ev) { fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); $(document).unbind('mouseup', upHue); $(document).unbind('mousemove', moveHue); return false; }, downSelector = function (ev) { var current = { cal: $(this).parent(), pos: $(this).offset() }; current.preview = current.cal.data('colorpicker').livePreview; $(document).bind('mouseup', current, upSelector); $(document).bind('mousemove', current, moveSelector); }, moveSelector = function (ev) { change.apply( ev.data.cal.data('colorpicker') .fields .eq(6) .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10)) .end() .eq(5) .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10)) .get(0), [ev.data.preview] ); return false; }, upSelector = function (ev) { fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); $(document).unbind('mouseup', upSelector); $(document).unbind('mousemove', moveSelector); return false; }, enterSubmit = function (ev) { $(this).addClass('colorpicker_focus'); }, leaveSubmit = function (ev) { $(this).removeClass('colorpicker_focus'); }, clickSubmit = function (ev) { var cal = $(this).parent(); var col = cal.data('colorpicker').color; cal.data('colorpicker').origColor = col; setCurrentColor(col, cal.get(0)); cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el); }, show = function (ev) { var cal = $('#' + $(this).data('colorpickerId')); cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]); var pos = $(this).offset(); var viewPort = getViewport(); var top = pos.top + this.offsetHeight; var left = pos.left; if (top + 176 > viewPort.t + viewPort.h) { top -= this.offsetHeight + 176; } if (left + 356 > viewPort.l + viewPort.w) { left -= 356; } cal.css({left: left + 'px', top: top + 'px'}); if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) { cal.show(); } $(document).bind('mousedown', {cal: cal}, hide); return false; }, hide = function (ev) { if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) { if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) { ev.data.cal.hide(); } $(document).unbind('mousedown', hide); } }, isChildOf = function(parentEl, el, container) { if (parentEl == el) { return true; } if (parentEl.contains) { return parentEl.contains(el); } if ( parentEl.compareDocumentPosition ) { return !!(parentEl.compareDocumentPosition(el) & 16); } var prEl = el.parentNode; while(prEl && prEl != container) { if (prEl == parentEl) return true; prEl = prEl.parentNode; } return false; }, getViewport = function () { var m = document.compatMode == 'CSS1Compat'; return { l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft), t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop), w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth), h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight) }; }, fixHSB = function (hsb) { return { h: Math.min(360, Math.max(0, hsb.h)), s: Math.min(100, Math.max(0, hsb.s)), b: Math.min(100, Math.max(0, hsb.b)) }; }, fixRGB = function (rgb) { return { r: Math.min(255, Math.max(0, rgb.r)), g: Math.min(255, Math.max(0, rgb.g)), b: Math.min(255, Math.max(0, rgb.b)) }; }, fixHex = function (hex) { var len = 6 - hex.length; if (len > 0) { var o = []; for (var i=0; i -1) ? hex.substring(1) : hex), 16); return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)}; }, HexToHSB = function (hex) { return RGBToHSB(HexToRGB(hex)); }, RGBToHSB = function (rgb) { var hsb = { h: 0, s: 0, b: 0 }; var min = Math.min(rgb.r, rgb.g, rgb.b); var max = Math.max(rgb.r, rgb.g, rgb.b); var delta = max - min; hsb.b = max; if (max != 0) { } hsb.s = max != 0 ? 255 * delta / max : 0; if (hsb.s != 0) { if (rgb.r == max) { hsb.h = (rgb.g - rgb.b) / delta; } else if (rgb.g == max) { hsb.h = 2 + (rgb.b - rgb.r) / delta; } else { hsb.h = 4 + (rgb.r - rgb.g) / delta; } } else { hsb.h = -1; } hsb.h *= 60; if (hsb.h < 0) { hsb.h += 360; } hsb.s *= 100/255; hsb.b *= 100/255; return hsb; }, HSBToRGB = function (hsb) { var rgb = {}; var h = Math.round(hsb.h); var s = Math.round(hsb.s*255/100); var v = Math.round(hsb.b*255/100); if(s == 0) { rgb.r = rgb.g = rgb.b = v; } else { var t1 = v; var t2 = (255-s)*v/255; var t3 = (t1-t2)*(h%60)/60; if(h==360) h = 0; if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3} else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3} else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3} else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3} else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3} else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3} else {rgb.r=0; rgb.g=0; rgb.b=0} } return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)}; }, RGBToHex = function (rgb) { var hex = [ rgb.r.toString(16), rgb.g.toString(16), rgb.b.toString(16) ]; $.each(hex, function (nr, val) { if (val.length == 1) { hex[nr] = '0' + val; } }); return hex.join(''); }, HSBToHex = function (hsb) { return RGBToHex(HSBToRGB(hsb)); }, restoreOriginal = function () { var cal = $(this).parent(); var col = cal.data('colorpicker').origColor; cal.data('colorpicker').color = col; fillRGBFields(col, cal.get(0)); fillHexFields(col, cal.get(0)); fillHSBFields(col, cal.get(0)); setSelector(col, cal.get(0)); setHue(col, cal.get(0)); setNewColor(col, cal.get(0)); }; return { init: function (opt) { opt = $.extend({}, defaults, opt||{}); if (typeof opt.color == 'string') { opt.color = HexToHSB(opt.color); } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) { opt.color = RGBToHSB(opt.color); } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) { opt.color = fixHSB(opt.color); } else { return this; } return this.each(function () { if (!$(this).data('colorpickerId')) { var options = $.extend({}, opt); options.origColor = opt.color; var id = 'collorpicker_' + parseInt(Math.random() * 1000); $(this).data('colorpickerId', id); var cal = $(tpl).attr('id', id); if (options.flat) { cal.appendTo(this).show(); } else { cal.appendTo(document.body); } options.fields = cal .find('input') .bind('keyup', keyDown) .bind('change', change) .bind('blur', blur) .bind('focus', focus); cal .find('span').bind('mousedown', downIncrement).end() .find('>div.colorpicker_current_color').bind('click', restoreOriginal); options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector); options.selectorIndic = options.selector.find('div div'); options.el = this; options.hue = cal.find('div.colorpicker_hue div'); cal.find('div.colorpicker_hue').bind('mousedown', downHue); options.newColor = cal.find('div.colorpicker_new_color'); options.currentColor = cal.find('div.colorpicker_current_color'); cal.data('colorpicker', options); cal.find('div.colorpicker_submit') .bind('mouseenter', enterSubmit) .bind('mouseleave', leaveSubmit) .bind('click', clickSubmit); fillRGBFields(options.color, cal.get(0)); fillHSBFields(options.color, cal.get(0)); fillHexFields(options.color, cal.get(0)); setHue(options.color, cal.get(0)); setSelector(options.color, cal.get(0)); setCurrentColor(options.color, cal.get(0)); setNewColor(options.color, cal.get(0)); if (options.flat) { cal.css({ position: 'relative', display: 'block' }); } else { $(this).bind(options.eventName, show); } } }); }, showPicker: function() { return this.each( function () { if ($(this).data('colorpickerId')) { show.apply(this); } }); }, hidePicker: function() { return this.each( function () { if ($(this).data('colorpickerId')) { $('#' + $(this).data('colorpickerId')).hide(); } }); }, setColor: function(col) { if (typeof col == 'string') { col = HexToHSB(col); } else if (col.r != undefined && col.g != undefined && col.b != undefined) { col = RGBToHSB(col); } else if (col.h != undefined && col.s != undefined && col.b != undefined) { col = fixHSB(col); } else { return this; } return this.each(function(){ if ($(this).data('colorpickerId')) { var cal = $('#' + $(this).data('colorpickerId')); cal.data('colorpicker').color = col; cal.data('colorpicker').origColor = col; fillRGBFields(col, cal.get(0)); fillHSBFields(col, cal.get(0)); fillHexFields(col, cal.get(0)); setHue(col, cal.get(0)); setSelector(col, cal.get(0)); setCurrentColor(col, cal.get(0)); setNewColor(col, cal.get(0)); } }); } }; }(); $.fn.extend({ ColorPicker: ColorPicker.init, ColorPickerHide: ColorPicker.hidePicker, ColorPickerShow: ColorPicker.showPicker, ColorPickerSetColor: ColorPicker.setColor }); })(jQuery) /*! nanoScrollerJS - v0.8.8 */ function isRTL(e) {if (window.getComputedStyle) {cs = window.getComputedStyle(e, null).getPropertyValue('direction');} else {cs = e.currentStyle.direction;}return cs == "rtl";} !function(a){return"function"==typeof define&&define.amd?define(["jquery"],function(b){return a(b,window,document)}):"object"==typeof exports?module.exports=a(require("jquery"),window,document):a(jQuery,window,document)}(function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H;z={paneClass:"nano-pane",sliderClass:"nano-slider",contentClass:"nano-content",enabledClass:"has-scrollbar",flashedClass:"flashed",activeClass:"active",iOSNativeScrolling:!1,preventPageScrolling:!1,disableResize:!1,alwaysVisible:!1,flashDelay:1500,sliderMinHeight:20,sliderMaxHeight:null,documentContext:null,windowContext:null},u="scrollbar",t="scroll",l="mousedown",m="mouseenter",n="mousemove",p="mousewheel",o="mouseup",s="resize",h="drag",i="enter",w="up",r="panedown",f="DOMMouseScroll",g="down",x="wheel",j="keydown",k="keyup",v="touchmove",d="Microsoft Internet Explorer"===b.navigator.appName&&/msie 7./i.test(b.navigator.appVersion)&&b.ActiveXObject,e=null,D=b.requestAnimationFrame,y=b.cancelAnimationFrame,F=c.createElement("div").style,H=function(){var a,b,c,d,e,f;for(d=["t","webkitT","MozT","msT","OT"],a=e=0,f=d.length;f>e;a=++e)if(c=d[a],b=d[a]+"ransform",b in F)return d[a].substr(0,d[a].length-1);return!1}(),G=function(a){return H===!1?!1:""===H?a:H+a.charAt(0).toUpperCase()+a.substr(1)},E=G("transform"),B=E!==!1,A=function(){var a,b,d;return a=c.createElement("div"),b=a.style,b.position="absolute",b.width="100px",b.height="100px",b.overflow=t,b.top="-9999px",c.body.appendChild(a),d=a.offsetWidth-a.clientWidth,c.body.removeChild(a),d},C=function(){var a,c,d;return c=b.navigator.userAgent,(a=/(?=.+Mac OS X)(?=.+Firefox)/.test(c))?(d=/Firefox\/\d{2}\./.exec(c),d&&(d=d[0].replace(/\D+/g,"")),a&&+d>23):!1},q=function(){function j(d,f){this.el=d,this.options=f,e||(e=A()),this.$el=a(this.el),this.doc=a(this.options.documentContext||c),this.win=a(this.options.windowContext||b),this.body=this.doc.find("body"),this.$content=this.$el.children("."+this.options.contentClass),this.$content.attr("tabindex",this.options.tabIndex||0),this.content=this.$content[0],this.previousPosition=0,this.options.iOSNativeScrolling&&null!=this.el.style.WebkitOverflowScrolling?this.nativeScrolling():this.generate(),this.createEvents(),this.addEvents(),this.reset()}return j.prototype.preventScrolling=function(a,b){if(this.isActive)if(a.type===f)(b===g&&a.originalEvent.detail>0||b===w&&a.originalEvent.detail<0)&&a.preventDefault();else if(a.type===p){if(!a.originalEvent||!a.originalEvent.wheelDelta)return;(b===g&&a.originalEvent.wheelDelta<0||b===w&&a.originalEvent.wheelDelta>0)&&a.preventDefault()}},j.prototype.nativeScrolling=function(){this.$content.css({WebkitOverflowScrolling:"touch"}),this.iOSNativeScrolling=!0,this.isActive=!0},j.prototype.updateScrollValues=function(){var a,b;a=this.content,this.maxScrollTop=a.scrollHeight-a.clientHeight,this.prevScrollTop=this.contentScrollTop||0,this.contentScrollTop=a.scrollTop,b=this.contentScrollTop>this.previousPosition?"down":this.contentScrollTop=a.maxScrollTop&&a.prevScrollTop!==a.maxScrollTop?a.$el.trigger("scrollend"):0===a.contentScrollTop&&0!==a.prevScrollTop&&a.$el.trigger("scrolltop"),!1}}(this),up:function(a){return function(b){return a.isBeingDragged=!1,a.pane.removeClass(a.options.activeClass),a.doc.unbind(n,a.events[h]).unbind(o,a.events[w]),a.body.unbind(m,a.events[i]),!1}}(this),resize:function(a){return function(b){a.reset()}}(this),panedown:function(a){return function(b){return a.sliderY=(b.offsetY||b.originalEvent.layerY)-.5*a.sliderHeight,a.scroll(),a.events.down(b),!1}}(this),scroll:function(a){return function(b){a.updateScrollValues(),a.isBeingDragged||(a.iOSNativeScrolling||(a.sliderY=a.sliderTop,a.setOnScrollStyles()),null!=b&&(a.contentScrollTop>=a.maxScrollTop?(a.options.preventPageScrolling&&a.preventScrolling(b,g),a.prevScrollTop!==a.maxScrollTop&&a.$el.trigger("scrollend")):0===a.contentScrollTop&&(a.options.preventPageScrolling&&a.preventScrolling(b,w),0!==a.prevScrollTop&&a.$el.trigger("scrolltop"))))}}(this),wheel:function(a){return function(b){var c;if(null!=b)return c=b.delta||b.wheelDelta||b.originalEvent&&b.originalEvent.wheelDelta||-b.detail||b.originalEvent&&-b.originalEvent.detail,c&&(a.sliderY+=-c/3),a.scroll(),!1}}(this),enter:function(a){return function(b){var c;if(a.isBeingDragged)return 1!==(b.buttons||b.which)?(c=a.events)[w].apply(c,arguments):void 0}}(this)}},j.prototype.addEvents=function(){var a;this.removeEvents(),a=this.events,this.options.disableResize||this.win.bind(s,a[s]),this.iOSNativeScrolling||(this.slider.bind(l,a[g]),this.pane.bind(l,a[r]).bind(""+p+" "+f,a[x])),this.$content.bind(""+t+" "+p+" "+f+" "+v,a[t])},j.prototype.removeEvents=function(){var a;a=this.events,this.win.unbind(s,a[s]),this.iOSNativeScrolling||(this.slider.unbind(),this.pane.unbind()),this.$content.unbind(""+t+" "+p+" "+f+" "+v,a[t])},j.prototype.generate=function(){var a,c,d,f,g,h,i;return f=this.options,h=f.paneClass,i=f.sliderClass,a=f.contentClass,(g=this.$el.children("."+h)).length||g.children("."+i).length||this.$el.append('
'),this.pane=this.$el.children("."+h),this.slider=this.pane.find("."+i),0===e&&C()?(d=b.getComputedStyle(this.content,null).getPropertyValue("padding-right").replace(/[^0-9.]+/g,""),c={right:-14,paddingRight:+d+14}):e&&(c=(isRTL(this.content)?{left:-e}:{right:-e}),this.$el.addClass(f.enabledClass)),null!=c&&this.$content.css(c),this},j.prototype.restore=function(){this.stopped=!1,this.iOSNativeScrolling||this.pane.show(),this.addEvents()},j.prototype.reset=function(){var a,b,c,f,g,h,i,j,k,l,m,n;return this.iOSNativeScrolling?void(this.contentHeight=this.content.scrollHeight):(this.$el.find("."+this.options.paneClass).length||this.generate().stop(),this.stopped&&this.restore(),a=this.content,f=a.style,g=f.overflowY,d&&this.$content.css({height:this.$content.height()}),b=a.scrollHeight+e,l=parseInt(this.$el.css("max-height"),10),l>0&&(this.$el.height(""),this.$el.height(a.scrollHeight>l?l:a.scrollHeight)),i=this.pane.outerHeight(!1),k=parseInt(this.pane.css("top"),10),h=parseInt(this.pane.css("bottom"),10),j=i+k+h,n=Math.round(j/b*i),nthis.options.sliderMaxHeight&&(n=this.options.sliderMaxHeight),g===t&&f.overflowX!==t&&(n+=e),this.maxSliderTop=j-n,this.contentHeight=b,this.paneHeight=i,this.paneOuterHeight=j,this.sliderHeight=n,this.paneTop=k,this.slider.height(n),this.events.scroll(),this.pane.show(),this.isActive=!0,a.scrollHeight===a.clientHeight||this.pane.outerHeight(!0)>=a.scrollHeight&&g!==t?(this.pane.hide(),this.isActive=!1):this.el.clientHeight===a.scrollHeight&&g===t?this.slider.hide():this.slider.show(),this.pane.css({opacity:this.options.alwaysVisible?1:"",visibility:this.options.alwaysVisible?"visible":""}),c=this.$content.css("position"),("static"===c||"relative"===c)&&(m=parseInt(this.$content.css("right"),10),m&&this.$content.css({right:"",marginRight:m})),this)},j.prototype.scroll=function(){return this.isActive?(this.sliderY=Math.max(0,this.sliderY),this.sliderY=Math.min(this.maxSliderTop,this.sliderY),this.$content.scrollTop(this.maxScrollTop*this.sliderY/this.maxSliderTop),this.iOSNativeScrolling||(this.updateScrollValues(),this.setOnScrollStyles()),this):void 0},j.prototype.scrollBottom=function(a){return this.isActive?(this.$content.scrollTop(this.contentHeight-this.$content.height()-a).trigger(p),this.stop().restore(),this):void 0},j.prototype.scrollTop=function(a){return this.isActive?(this.$content.scrollTop(+a).trigger(p),this.stop().restore(),this):void 0},j.prototype.scrollTo=function(a){return this.isActive?(this.scrollTop(this.$el.find(a).get(0).offsetTop),this):void 0},j.prototype.stop=function(){return y&&this.scrollRAF&&(y(this.scrollRAF),this.scrollRAF=null),this.stopped=!0,this.removeEvents(),this.iOSNativeScrolling||this.pane.hide(),this},j.prototype.destroy=function(){return this.stopped||this.stop(),!this.iOSNativeScrolling&&this.pane.length&&this.pane.remove(),d&&this.$content.height(""),this.$content.removeAttr("tabindex"),this.$el.hasClass(this.options.enabledClass)&&(this.$el.removeClass(this.options.enabledClass),this.$content.css({right:""})),this},j.prototype.flash=function(){return!this.iOSNativeScrolling&&this.isActive?(this.reset(),this.pane.addClass(this.options.flashedClass),setTimeout(function(a){return function(){a.pane.removeClass(a.options.flashedClass)}}(this),this.options.flashDelay),this):void 0},j}(),a.fn.nanoScroller=function(b){return this.each(function(){var c,d;if((d=this.nanoscroller)||(c=a.extend({},z,b),this.nanoscroller=d=new q(this,c)),b&&"object"==typeof b){if(a.extend(d.options,b),null!=b.scrollBottom)return d.scrollBottom(b.scrollBottom);if(null!=b.scrollTop)return d.scrollTop(b.scrollTop);if(b.scrollTo)return d.scrollTo(b.scrollTo);if("bottom"===b.scroll)return d.scrollBottom(0);if("top"===b.scroll)return d.scrollTop(0);if(b.scroll&&b.scroll instanceof a)return d.scrollTo(b.scroll);if(b.stop)return d.stop();if(b.destroy)return d.destroy();if(b.flash)return d.flash()}return d.reset()})},a.fn.nanoScroller.Constructor=q}); //# sourceMappingURL=jquery.nanoscroller.min.js.map /*! Simple JavaScript Inheritance * By John Resig http://ejohn.org/ * MIT Licensed. */ !function(){"use strict";var a=!1;window.JQClass=function(){},JQClass.classes={},JQClass.extend=function b(c){function d(){!a&&this._init&&this._init.apply(this,arguments)}var e=this.prototype;a=!0;var f=new this;a=!1;for(var g in c)if("function"==typeof c[g]&&"function"==typeof e[g])f[g]=function(a,b){return function(){var c=this._super;this._super=function(b){return e[a].apply(this,b||[])};var d=b.apply(this,arguments);return this._super=c,d}}(g,c[g]);else if("object"==typeof c[g]&&"object"==typeof e[g]&&"defaultOptions"===g){var h,i=e[g],j=c[g],k={};for(h in i)k[h]=i[h];for(h in j)k[h]=j[h];f[g]=k}else f[g]=c[g];return d.prototype=f,d.prototype.constructor=d,d.extend=b,d}}(),/*! Abstract base class for collection plugins v1.0.2. Written by Keith Wood (wood.keith{at}optusnet.com.au) December 2013. Licensed under the MIT license (http://keith-wood.name/licence.html). */ function($){"use strict";function camelCase(a){return a.replace(/-([a-z])/g,function(a,b){return b.toUpperCase()})}JQClass.classes.JQPlugin=JQClass.extend({name:"plugin",defaultOptions:{},regionalOptions:{},deepMerge:!0,_getMarker:function(){return"is-"+this.name},_init:function(){$.extend(this.defaultOptions,this.regionalOptions&&this.regionalOptions[""]||{});var a=camelCase(this.name);$[a]=this,$.fn[a]=function(b){var c=Array.prototype.slice.call(arguments,1),d=this,e=this;return this.each(function(){if("string"==typeof b){if("_"===b[0]||!$[a][b])throw"Unknown method: "+b;var f=$[a][b].apply($[a],[this].concat(c));if(f!==d&&void 0!==f)return e=f,!1}else $[a]._attach(this,b)}),e}},setDefaults:function(a){$.extend(this.defaultOptions,a||{})},_attach:function(a,b){if(a=$(a),!a.hasClass(this._getMarker())){a.addClass(this._getMarker()),b=$.extend(this.deepMerge,{},this.defaultOptions,this._getMetadata(a),b||{});var c=$.extend({name:this.name,elem:a,options:b},this._instSettings(a,b));a.data(this.name,c),this._postAttach(a,c),this.option(a,b)}},_instSettings:function(a,b){return{}},_postAttach:function(a,b){},_getMetadata:function(elem){try{var data=elem.data(this.name.toLowerCase())||"";data=data.replace(/(\\?)'/g,function(a,b){return b?"'":'"'}).replace(/([a-zA-Z0-9]+):/g,function(a,b,c){var d=data.substring(0,c).match(/"/g);return d&&d.length%2!==0?b+":":'"'+b+'":'}).replace(/\\:/g,":"),data=$.parseJSON("{"+data+"}");for(var key in data)if(data.hasOwnProperty(key)){var value=data[key];"string"==typeof value&&value.match(/^new Date\(([-0-9,\s]*)\)$/)&&(data[key]=eval(value))}return data}catch(a){return{}}},_getInst:function(a){return $(a).data(this.name)||{}},option:function(a,b,c){a=$(a);var d=a.data(this.name),e=b||{};return!b||"string"==typeof b&&"undefined"==typeof c?(e=(d||{}).options,e&&b?e[b]:e):void(a.hasClass(this._getMarker())&&("string"==typeof b&&(e={},e[b]=c),this._optionsChanged(a,d,e),$.extend(d.options,e)))},_optionsChanged:function(a,b,c){},destroy:function(a){a=$(a),a.hasClass(this._getMarker())&&(this._preDestroy(a,this._getInst(a)),a.removeData(this.name).removeClass(this._getMarker()))},_preDestroy:function(a,b){}}),$.JQPlugin={createPlugin:function(a,b){"object"==typeof a&&(b=a,a="JQPlugin"),a=camelCase(a);var c=camelCase(b.name);JQClass.classes[c]=JQClass.classes[a].extend(b),new JQClass.classes[c]}}}(jQuery); //# sourceMappingURL=jquery.plugin.min.map /*! http://keith-wood.name/datepick.html Date picker for jQuery v5.1.1. Written by Keith Wood (wood.keith{at}optusnet.com.au) February 2010. Licensed under the MIT (http://keith-wood.name/licence.html) licence. Please attribute the author if you use it. */ !function(a){"use strict";var b="datepick";a.JQPlugin.createPlugin({name:b,defaultRenderer:{picker:'
{link:prev}{link:today}{link:next}
{months}{popup:start}
{link:clear}{link:close}
{popup:end}
',monthRow:'
{months}
',month:'
{monthHeader}
{weekHeader}{weeks}
',weekHeader:"{days}",dayHeader:"{day}",week:"{days}",day:"{day}",monthSelector:".datepick-month",daySelector:"td",rtlClass:"datepick-rtl",multiClass:"datepick-multi",defaultClass:"",selectedClass:"datepick-selected",highlightedClass:"datepick-highlight",todayClass:"datepick-today",otherMonthClass:"datepick-other-month",weekendClass:"datepick-weekend",commandClass:"datepick-cmd",commandButtonClass:"",commandLinkClass:"",disabledClass:"datepick-disabled"},commands:{prev:{text:"prevText",status:"prevStatus",keystroke:{keyCode:33},enabled:function(a){var b=a.curMinDate();return!b||c.add(c.day(c._applyMonthsOffset(c.add(c.newDate(a.drawDate),1-a.options.monthsToStep,"m"),a),1),-1,"d").getTime()>=b.getTime()},date:function(a){return c.day(c._applyMonthsOffset(c.add(c.newDate(a.drawDate),-a.options.monthsToStep,"m"),a),1)},action:function(a){c.changeMonth(this,-a.options.monthsToStep)}},prevJump:{text:"prevJumpText",status:"prevJumpStatus",keystroke:{keyCode:33,ctrlKey:!0},enabled:function(a){var b=a.curMinDate();return!b||c.add(c.day(c._applyMonthsOffset(c.add(c.newDate(a.drawDate),1-a.options.monthsToJump,"m"),a),1),-1,"d").getTime()>=b.getTime()},date:function(a){return c.day(c._applyMonthsOffset(c.add(c.newDate(a.drawDate),-a.options.monthsToJump,"m"),a),1)},action:function(a){c.changeMonth(this,-a.options.monthsToJump)}},next:{text:"nextText",status:"nextStatus",keystroke:{keyCode:34},enabled:function(a){var b=a.get("maxDate");return!b||c.day(c._applyMonthsOffset(c.add(c.newDate(a.drawDate),a.options.monthsToStep,"m"),a),1).getTime()<=b.getTime()},date:function(a){return c.day(c._applyMonthsOffset(c.add(c.newDate(a.drawDate),a.options.monthsToStep,"m"),a),1)},action:function(a){c.changeMonth(this,a.options.monthsToStep)}},nextJump:{text:"nextJumpText",status:"nextJumpStatus",keystroke:{keyCode:34,ctrlKey:!0},enabled:function(a){var b=a.get("maxDate");return!b||c.day(c._applyMonthsOffset(c.add(c.newDate(a.drawDate),a.options.monthsToJump,"m"),a),1).getTime()<=b.getTime()},date:function(a){return c.day(c._applyMonthsOffset(c.add(c.newDate(a.drawDate),a.options.monthsToJump,"m"),a),1)},action:function(a){c.changeMonth(this,a.options.monthsToJump)}},current:{text:"currentText",status:"currentStatus",keystroke:{keyCode:36,ctrlKey:!0},enabled:function(a){var b=a.curMinDate(),d=a.get("maxDate"),e=a.selectedDates[0]||c.today();return(!b||e.getTime()>=b.getTime())&&(!d||e.getTime()<=d.getTime())},date:function(a){return a.selectedDates[0]||c.today()},action:function(a){var b=a.selectedDates[0]||c.today();c.showMonth(this,b.getFullYear(),b.getMonth()+1)}},today:{text:"todayText",status:"todayStatus",keystroke:{keyCode:36,ctrlKey:!0},enabled:function(a){var b=a.curMinDate(),d=a.get("maxDate");return(!b||c.today().getTime()>=b.getTime())&&(!d||c.today().getTime()<=d.getTime())},date:function(){return c.today()},action:function(){c.showMonth(this)}},clear:{text:"clearText",status:"clearStatus",keystroke:{keyCode:35,ctrlKey:!0},enabled:function(){return!0},date:function(){return null},action:function(){c.clear(this)}},close:{text:"closeText",status:"closeStatus",keystroke:{keyCode:27},enabled:function(){return!0},date:function(){return null},action:function(){c.hide(this)}},prevWeek:{text:"prevWeekText",status:"prevWeekStatus",keystroke:{keyCode:38,ctrlKey:!0},enabled:function(a){var b=a.curMinDate();return!b||c.add(c.newDate(a.drawDate),-7,"d").getTime()>=b.getTime()},date:function(a){return c.add(c.newDate(a.drawDate),-7,"d")},action:function(){c.changeDay(this,-7)}},prevDay:{text:"prevDayText",status:"prevDayStatus",keystroke:{keyCode:37,ctrlKey:!0},enabled:function(a){var b=a.curMinDate();return!b||c.add(c.newDate(a.drawDate),-1,"d").getTime()>=b.getTime()},date:function(a){return c.add(c.newDate(a.drawDate),-1,"d")},action:function(){c.changeDay(this,-1)}},nextDay:{text:"nextDayText",status:"nextDayStatus",keystroke:{keyCode:39,ctrlKey:!0},enabled:function(a){var b=a.get("maxDate");return!b||c.add(c.newDate(a.drawDate),1,"d").getTime()<=b.getTime()},date:function(a){return c.add(c.newDate(a.drawDate),1,"d")},action:function(){c.changeDay(this,1)}},nextWeek:{text:"nextWeekText",status:"nextWeekStatus",keystroke:{keyCode:40,ctrlKey:!0},enabled:function(a){var b=a.get("maxDate");return!b||c.add(c.newDate(a.drawDate),7,"d").getTime()<=b.getTime()},date:function(a){return c.add(c.newDate(a.drawDate),7,"d")},action:function(){c.changeDay(this,7)}}},defaultOptions:{pickerClass:"",showOnFocus:!0,showTrigger:null,showAnim:"show",showOptions:{},showSpeed:"normal",popupContainer:null,alignment:"bottom",fixedWeeks:!1,firstDay:0,calculateWeek:null,monthsToShow:1,monthsOffset:0,monthsToStep:1,monthsToJump:12,useMouseWheel:!0,changeMonth:!0,yearRange:"c-10:c+10",shortYearCutoff:"+10",showOtherMonths:!1,selectOtherMonths:!1,defaultDate:null,selectDefaultDate:!1,minDate:null,maxDate:null,dateFormat:"mm/dd/yyyy",autoSize:!1,rangeSelect:!1,rangeSeparator:" - ",multiSelect:0,multiSeparator:",",onDate:null,onShow:null,onChangeMonthYear:null,onSelect:null,onClose:null,altField:null,altFormat:null,constrainInput:!0,commandsAsDateFormat:!1,commands:{}},regionalOptions:{"":{monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dateFormat:"mm/dd/yyyy",firstDay:0,renderer:{},prevText:"◄ Prev",prevStatus:"Show the previous month",prevJumpText:"<<",prevJumpStatus:"Show the previous year",nextText:"Next ►",nextStatus:"Show the next month",nextJumpText:">>",nextJumpStatus:"Show the next year",currentText:"Current",currentStatus:"Show the current month",todayText:"Today",todayStatus:"Show today's month",clearText:"Clear",clearStatus:"Clear all the dates",closeText:"Close",closeStatus:"Close the datepicker",yearStatus:"Change the year",earlierText:"  â–²",laterText:"  â–¼",monthStatus:"Change the month",weekText:"Wk",weekStatus:"Week of the year",dayStatus:"Select DD, M d, yyyy",defaultStatus:"Select a date",isRTL:!1}},_disabled:[],_popupClass:b+"-popup",_triggerClass:b+"-trigger",_disableClass:b+"-disable",_monthYearClass:b+"-month-year",_curMonthClass:b+"-month-",_anyYearClass:b+"-any-year",_curDoWClass:b+"-dow-",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,_msPerDay:864e5,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(a,b,c){if("string"!=typeof a&&(c=b,b=a,a=""),!b)return"";a=a||this.defaultOptions.dateFormat,c=c||{};for(var d=c.dayNamesShort||this.defaultOptions.dayNamesShort,e=c.dayNames||this.defaultOptions.dayNames,f=c.monthNamesShort||this.defaultOptions.monthNamesShort,g=c.monthNames||this.defaultOptions.monthNames,h=c.calculateWeek||this.defaultOptions.calculateWeek,i=function(b,c){for(var d=1;n+d1},j=function(a,b,c,d){var e=""+b;if(i(a,d))for(;e.length1},q=function(a,c){var d=p(a,c),e=[2,3,d?4:2,11,20]["oy@!".indexOf(a)+1],f=new RegExp("^-?\\d{1,"+e+"}"),g=b.substring(t).match(f);if(!g)throw"Missing number at position {0}".replace(/\{0\}/,t);return t+=g[0].length,parseInt(g[0],10)},r=function(a,c,d,e){for(var f=p(a,e)?d:c,g=0;g-1){j=1,k=l;for(var w=this.daysInMonth(i,j);k>w;w=this.daysInMonth(i,j))j++,k-=w}if(o=this.newDate(i,j,k),o.getFullYear()!==i||o.getMonth()+1!==j||o.getDate()!==k)throw"Invalid date";return o},determineDate:function(a,b,d,e,f){d&&"object"!=typeof d&&(f=e,e=d,d=null),"string"!=typeof e&&(f=e,e="");var g=function(a){try{return c.parseDate(e,a,f)}catch(a){}a=a.toLowerCase();for(var b=(a.match(/^c/)&&d?c.newDate(d):null)||c.today(),g=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,h=null;h=g.exec(a);)b=c.add(b,parseInt(h[1],10),h[2]||"d");return b};return b=b?c.newDate(b):null,a="undefined"==typeof a?b:"string"==typeof a?g(a):"number"==typeof a?isNaN(a)||a===1/0||a===-(1/0)?b:c.add(c.today(),a,"d"):c.newDate(a)},daysInMonth:function(a,b){return b=a.getFullYear?a.getMonth()+1:b,a=a.getFullYear?a.getFullYear():a,this.newDate(a,b+1,0).getDate()},dayOfYear:function(a,b,d){var e=a.getFullYear?a:c.newDate(a,b,d),f=c.newDate(e.getFullYear(),1,1);return Math.floor((e.getTime()-f.getTime())/c._msPerDay)+1},iso8601Week:function(a,b,d){var e=a.getFullYear?new Date(a.getTime()):c.newDate(a,b,d);e.setDate(e.getDate()+4-(e.getDay()||7));var f=e.getTime();return e.setMonth(0,1),Math.floor(Math.round((f-e)/c._msPerDay)/7)+1},today:function(){return this._normaliseDate(new Date)},newDate:function(a,b,c){return a?a.getFullYear?this._normaliseDate(new Date(a.getTime())):new Date(a,b-1,c,12):null},_normaliseDate:function(a){return a&&a.setHours(12,0,0,0),a},year:function(a,b){return a.setFullYear(b),this._normaliseDate(a)},month:function(a,b){return a.setMonth(b-1),this._normaliseDate(a)},day:function(a,b){return a.setDate(b),this._normaliseDate(a)},add:function(a,b,d){if("d"===d||"w"===d)this._normaliseDate(a),a.setDate(a.getDate()+b*("w"===d?7:1));else{var e=a.getFullYear()+("y"===d?b:0),f=a.getMonth()+("m"===d?b:0);a.setTime(c.newDate(e,f+1,Math.min(a.getDate(),this.daysInMonth(e,f+1))).getTime())}return a},_applyMonthsOffset:function(b,d){var e=d.options.monthsOffset;return a.isFunction(e)&&(e=e.apply(d.elem[0],[b])),c.add(b,-e,"m")},_init:function(){this.defaultOptions.commands=this.commands,this.defaultOptions.calculateWeek=this.iso8601Week,this.regionalOptions[""].renderer=this.defaultRenderer,this._super()},_instSettings:function(b){return{selectedDates:[],drawDate:null,pickingRange:!1,inline:a.inArray(b[0].nodeName.toLowerCase(),["div","span"])>-1,get:function(b){return a.inArray(b,["defaultDate","minDate","maxDate"])>-1?c.determineDate(this.options[b],null,this.selectedDates[0],this.options.dateFormat,this.getConfig()):this.options[b]},curMinDate:function(){return this.pickingRange?this.selectedDates[0]:this.get("minDate")},getConfig:function(){return{dayNamesShort:this.options.dayNamesShort,dayNames:this.options.dayNames,monthNamesShort:this.options.monthNamesShort,monthNames:this.options.monthNames,calculateWeek:this.options.calculateWeek,shortYearCutoff:this.options.shortYearCutoff}}}},_postAttach:function(b,d){d.inline?(d.drawDate=c._checkMinMax(c.newDate(d.selectedDates[0]||d.get("defaultDate")||c.today()),d),d.prevDate=c.newDate(d.drawDate),this._update(b[0]),a.fn.mousewheel&&b.mousewheel(this._doMouseWheel)):(this._attachments(b,d),b.on("keydown."+d.name,this._keyDown).on("keypress."+d.name,this._keyPress).on("keyup."+d.name,this._keyUp),b.attr("disabled")&&this.disable(b[0]))},_optionsChanged:function(b,d,e){if(e.calendar&&e.calendar!==d.options.calendar){var f=function(a){return"object"==typeof d.options[a]?null:d.options[a]};e=a.extend({defaultDate:f("defaultDate"),minDate:f("minDate"),maxDate:f("maxDate")},e),d.selectedDates=[],d.drawDate=null}var g=d.selectedDates;a.extend(d.options,e),this.setDate(b[0],g,null,!1,!0),d.pickingRange=!1,d.drawDate=c.newDate(this._checkMinMax((d.options.defaultDate?d.get("defaultDate"):d.drawDate)||d.get("defaultDate")||c.today(),d)),d.inline||this._attachments(b,d),(d.inline||d.div)&&this._update(b[0])},_attachments:function(b,d){b.off("focus."+d.name),d.options.showOnFocus&&b.on("focus."+d.name,this.show),d.trigger&&d.trigger.remove();var e=d.options.showTrigger;d.trigger=e?a(e).clone().removeAttr("id").addClass(this._triggerClass)[d.options.isRTL?"insertBefore":"insertAfter"](b).click(function(){c.isDisabled(b[0])||c[c.curInst===d?"hide":"show"](b[0])}):a([]),this._autoSize(b,d);var f=this._extractDates(d,b.val());f&&this.setDate(b[0],f,null,!0);var g=d.get("defaultDate");d.options.selectDefaultDate&&g&&0===d.selectedDates.length&&this.setDate(b[0],c.newDate(g||c.today()))},_autoSize:function(a,b){if(b.options.autoSize&&!b.inline){var d=c.newDate(2009,10,20),e=b.options.dateFormat;if(e.match(/[DM]/)){var f=function(a){for(var b=0,c=0,d=0;db&&(b=a[d].length,c=d);return c};d.setMonth(f(b.options[e.match(/MM/)?"monthNames":"monthNamesShort"])),d.setDate(f(b.options[e.match(/DD/)?"dayNames":"dayNamesShort"])+20-d.getDay())}b.elem.attr("size",c.formatDate(e,d,b.getConfig()).length)}},_preDestroy:function(b,c){c.trigger&&c.trigger.remove(),b.empty().off("."+c.name),c.inline&&a.fn.mousewheel&&b.unmousewheel(),!c.inline&&c.options.autoSize&&b.removeAttr("size")},multipleEvents:function(){var a=arguments;return function(){for(var b=0;b
').find("button,select").prop("disabled",!0).end().find("a").removeAttr("href")}else b.prop("disabled",!0),c.trigger.filter("button."+this._triggerClass).prop("disabled",!0).end().filter("img."+this._triggerClass).css({opacity:"0.5",cursor:"default"});this._disabled=a.map(this._disabled,function(a){return a===b[0]?null:a}),this._disabled.push(b[0])}},isDisabled:function(b){return b&&a.inArray(b,this._disabled)>-1},show:function(b){b=a(b.target||b);var d=c._getInst(b);if(c.curInst!==d&&(c.curInst&&c.hide(c.curInst,!0),!a.isEmptyObject(d))){d.lastVal=null,d.selectedDates=c._extractDates(d,b.val()),d.pickingRange=!1,d.drawDate=c._checkMinMax(c.newDate(d.selectedDates[0]||d.get("defaultDate")||c.today()),d),d.prevDate=c.newDate(d.drawDate),c.curInst=d,c._update(b[0],!0);var e=c._checkOffset(d);d.div.css({left:e.left,top:e.top});var f=d.options.showAnim,g=d.options.showSpeed;if(g="normal"===g&&a.ui&&parseInt(a.ui.version.substring(2))>=8?"_default":g,a.effects&&(a.effects[f]||a.effects.effect&&a.effects.effect[f])){var h=d.div.data();for(var i in h)i.match(/^ec\.storage\./)&&(h[i]=d._mainDiv.css(i.replace(/ec\.storage\./,"")));d.div.data(h).show(f,d.options.showOptions,g)}else d.div[f||"show"](f?g:0)}},_extractDates:function(a,b){if(b!==a.lastVal){a.lastVal=b,b=b.split(a.options.multiSelect?a.options.multiSeparator:a.options.rangeSelect?a.options.rangeSeparator:"\0");for(var d=[],e=0;e").addClass(this._popupClass).css({display:d?"none":"static",position:"absolute",left:b.offset().left,top:b.offset().top+b.outerHeight()}).appendTo(a(e.options.popupContainer||"body")),a.fn.mousewheel&&e.div.mousewheel(this._doMouseWheel)),e.div.html(this._generateContent(b[0],e)),b.focus())},_updateInput:function(b,d){var e=this._getInst(b);if(!a.isEmptyObject(e)){for(var f="",g="",h=e.options.multiSelect?e.options.multiSeparator:e.options.rangeSeparator,i=e.options.altFormat||e.options.dateFormat,j=0;j0?h:"")+c.formatDate(e.options.dateFormat,e.selectedDates[j],e.getConfig()),g+=(j>0?h:"")+c.formatDate(i,e.selectedDates[j],e.getConfig());e.inline||d||a(b).val(f),a(e.options.altField).val(g),!a.isFunction(e.options.onSelect)||d||e.inSelect||(e.inSelect=!0,e.options.onSelect.apply(b,[e.selectedDates]),e.inSelect=!1)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:3,thick:5}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(b){var c=b.elem.is(":hidden")&&b.trigger?b.trigger:b.elem,d=c.offset(),e=a(window).width(),f=a(window).height();if(0===e)return d;var g=!1;a(b.elem).parents().each(function(){return g=g||"fixed"===a(this).css("position"),!g});var h=document.documentElement.scrollLeft||document.body.scrollLeft,i=document.documentElement.scrollTop||document.body.scrollTop,j=d.top-(g?i:0)-b.div.outerHeight(),k=d.top-(g?i:0)+c.outerHeight(),l=d.left-(g?h:0),m=d.left-(g?h:0)+c.outerWidth()-b.div.outerWidth(),n=d.left-h+b.div.outerWidth()>e,o=d.top-i+b.elem.outerHeight()+b.div.outerHeight()>f;b.div.css("position",g?"fixed":"absolute");var p=b.options.alignment;return d="topLeft"===p?{left:l,top:j}:"topRight"===p?{left:m,top:j}:"bottomLeft"===p?{left:l,top:k}:"bottomRight"===p?{left:m,top:k}:"top"===p?{left:b.options.isRTL||n?m:l,top:j}:{left:b.options.isRTL||n?m:l,top:o?j:k},d.left=Math.max(g?0:h,d.left),d.top=Math.max(g?0:i,d.top),d},_checkExternalClick:function(b){if(c.curInst){var d=a(b.target);0!==d.closest("."+c._popupClass+",."+c._triggerClass).length||d.hasClass(c._getMarker())||c.hide(c.curInst)}},hide:function(b,d){if(b){var e=this._getInst(b);if(a.isEmptyObject(e)&&(e=b),e&&e===c.curInst){var f=d?"":e.options.showAnim,g=e.options.showSpeed;g="normal"===g&&a.ui&&parseInt(a.ui.version.substring(2))>=8?"_default":g;var h=function(){e.div&&(e.div.remove(),e.div=null,c.curInst=null,a.isFunction(e.options.onClose)&&e.options.onClose.apply(b,[e.selectedDates]))};if(e.div.stop(),a.effects&&(a.effects[f]||a.effects.effect&&a.effects.effect[f]))e.div.hide(f,e.options.showOptions,g,h);else{var i="slideDown"===f?"slideUp":"fadeIn"===f?"fadeOut":"hide";e.div[i](f?g:"",h)}f||h()}}},_keyDown:function(b){var d=b.data&&b.data.elem||b.target,e=c._getInst(d),f=!1,g=null;if(e.inline||e.div){if(9===b.keyCode)c.hide(d);else if(13===b.keyCode)c.selectDate(d,a("a."+e.options.renderer.highlightedClass,e.div)[0]),f=!0;else for(var h in e.options.commands)if(e.options.commands.hasOwnProperty(h)&&(g=e.options.commands[h],g.keystroke.keyCode===b.keyCode&&!!g.keystroke.ctrlKey==!(!b.ctrlKey&&!b.metaKey)&&!!g.keystroke.altKey===b.altKey&&!!g.keystroke.shiftKey===b.shiftKey)){c.performAction(d,h),f=!0;break}}else g=e.options.commands.current,g.keystroke.keyCode===b.keyCode&&!!g.keystroke.ctrlKey==!(!b.ctrlKey&&!b.metaKey)&&!!g.keystroke.altKey===b.altKey&&!!g.keystroke.shiftKey===b.shiftKey&&(c.show(d),f=!0);return e.ctrlKey=b.keyCode<48&&32!==b.keyCode||b.ctrlKey||b.metaKey,f&&(b.preventDefault(),b.stopPropagation()),!f},_keyPress:function(b){var d=c._getInst(b.data&&b.data.elem||b.target);if(!a.isEmptyObject(d)&&d.options.constrainInput){var e=String.fromCharCode(b.keyCode||b.charCode),f=c._allowedChars(d);return b.metaKey||d.ctrlKey||e<" "||!f||f.indexOf(e)>-1}return!0},_allowedChars:function(a){for(var b=a.options.multiSelect?a.options.multiSeparator:a.options.rangeSelect?a.options.rangeSeparator:"",c=!1,d=!1,e=a.options.dateFormat,f=0;f0&&c.setDate(d,f,null,!0)}catch(a){}return!0},_doMouseWheel:function(b,d){var e=c.curInst&&c.curInst.elem[0]||a(b.target).closest("."+c._getMarker())[0];if(!c.isDisabled(e)){var f=c._getInst(e);f.options.useMouseWheel&&(d=d<0?-1:1,c.changeMonth(e,-f.options[b.ctrlKey?"monthsToJump":"monthsToStep"]*d)),b.preventDefault()}},clear:function(b){var d=this._getInst(b);if(!a.isEmptyObject(d)){d.selectedDates=[],this.hide(b);var e=d.get("defaultDate");d.options.selectDefaultDate&&e?this.setDate(b,c.newDate(e||c.today())):this._updateInput(b)}},getDate:function(b){var c=this._getInst(b);return a.isEmptyObject(c)?[]:c.selectedDates},setDate:function(b,d,e,f,g){var h=this._getInst(b);if(!a.isEmptyObject(h)){a.isArray(d)||(d=[d],e&&d.push(e));var i=h.get("minDate"),j=h.get("maxDate"),k=h.selectedDates[0];h.selectedDates=[];for(var l=0;l=i.getTime())&&(!j||m.getTime()<=j.getTime())){for(var n=!1,o=0;oh.selectedDates[1].getTime()?h.selectedDates[0]:h.selectedDates[1]}h.pickingRange=!1}h.prevDate=h.drawDate?c.newDate(h.drawDate):null,h.drawDate=this._checkMinMax(c.newDate(h.selectedDates[0]||h.get("defaultDate")||c.today()),h),g||(this._update(b),this._updateInput(b,f))}},isSelectable:function(b,d){var e=this._getInst(b);return!a.isEmptyObject(e)&&(d=c.determineDate(d,e.selectedDates[0]||this.today(),null,e.options.dateFormat,e.getConfig()),this._isSelectable(b,d,e.options.onDate,e.get("minDate"),e.get("maxDate")))},_isSelectable:function(b,c,d,e,f){var g="boolean"==typeof d?{selectable:d}:a.isFunction(d)?d.apply(b,[c,!0]):{};return g.selectable!==!1&&(!e||c.getTime()>=e.getTime())&&(!f||c.getTime()<=f.getTime())},performAction:function(b,c){var d=this._getInst(b);if(!a.isEmptyObject(d)&&!this.isDisabled(b)){var e=d.options.commands;e[c]&&e[c].enabled.apply(b,[d])&&e[c].action.apply(b,[d])}},showMonth:function(b,d,e,f){var g=this._getInst(b);if(!a.isEmptyObject(g)&&("undefined"!=typeof f||g.drawDate.getFullYear()!==d||g.drawDate.getMonth()+1!==e)){g.prevDate=c.newDate(g.drawDate);var h=this._checkMinMax("undefined"!=typeof d?c.newDate(d,e,1):c.today(),g);g.drawDate=c.newDate(h.getFullYear(),h.getMonth()+1,"undefined"!=typeof f?f:Math.min(g.drawDate.getDate(),c.daysInMonth(h.getFullYear(),h.getMonth()+1))),this._update(b)}},changeMonth:function(b,d){var e=this._getInst(b);if(!a.isEmptyObject(e)){var f=c.add(c.newDate(e.drawDate),d,"m");this.showMonth(b,f.getFullYear(),f.getMonth()+1)}},changeDay:function(b,d){var e=this._getInst(b);if(!a.isEmptyObject(e)){var f=c.add(c.newDate(e.drawDate),d,"d");this.showMonth(b,f.getFullYear(),f.getMonth()+1,f.getDate())}},_checkMinMax:function(a,b){var d=b.get("minDate"),e=b.get("maxDate");return a=d&&a.getTime()e.getTime()?c.newDate(e):a},retrieveDate:function(b,c){var d=this._getInst(b);return a.isEmptyObject(d)?null:this._normaliseDate(new Date(parseInt(c.className.replace(/^.*dp(-?\d+).*$/,"$1"),10)))},selectDate:function(b,d){var e=this._getInst(b);if(!a.isEmptyObject(e)&&!this.isDisabled(b)){var f=this.retrieveDate(b,d);if(e.options.multiSelect){for(var g=!1,h=0;h'+(j?c.formatDate(d.options[i.text],j,d.getConfig()):d.options[i.text])+"")}};for(var n in d.options.commands)d.options.commands.hasOwnProperty(n)&&(m("button",'button type="button"',"button",n,d.options.renderer.commandButtonClass),m("link",'a href="javascript:void(0)"',"a",n,d.options.renderer.commandLinkClass));if(l=a(l),f[1]>1){var o=0;a(d.options.renderer.monthSelector,l).each(function(){var b=++o%f[1];a(this).addClass(1===b?"first":0===b?"last":"")})}var p=this;l.find(d.options.renderer.daySelector+" a").hover(function(){e.apply(this),a(this).addClass(d.options.renderer.highlightedClass)},e).click(function(){p.selectDate(b,this)}).end().find("select."+this._monthYearClass+":not(."+this._anyYearClass+")").change(function(){var c=a(this).val().split("/");p.showMonth(b,parseInt(c[1],10),parseInt(c[0],10))}).end().find("select."+this._anyYearClass).click(function(){a(this).css("visibility","hidden").next("input").css({left:this.offsetLeft,top:this.offsetTop,width:this.offsetWidth,height:this.offsetHeight}).show().focus()}).end().find("input."+p._monthYearClass).change(function(){try{var c=parseInt(a(this).val(),10);c=isNaN(c)?d.drawDate.getFullYear():c,p.showMonth(b,c,d.drawDate.getMonth()+1,d.drawDate.getDate())}catch(a){window.alert(a)}}).keydown(function(b){13===b.keyCode?a(b.elem).change():27===b.keyCode&&(a(b.elem).hide().prev("select").css("visibility","visible"),d.elem.focus())});var q={elem:d.elem[0]};l.keydown(q,this._keyDown).keypress(q,this._keyPress).keyup(q,this._keyUp),l.find("."+d.options.renderer.commandClass).click(function(){if(!a(this).hasClass(d.options.renderer.disabledClass)){var e=this.className.replace(new RegExp("^.*"+d.options.renderer.commandClass+"-([^ ]+).*$"),"$1");c.performAction(b,e)}}),d.options.isRTL&&l.addClass(d.options.renderer.rtlClass),f[0]*f[1]>1&&l.addClass(d.options.renderer.multiClass),d.options.pickerClass&&l.addClass(d.options.pickerClass),a("body").append(l);var r=0;return l.find(d.options.renderer.monthSelector).each(function(){r+=a(this).outerWidth()}),l.width(r/f[0]),a.isFunction(d.options.onShow)&&d.options.onShow.apply(b,[l,d]),l},_generateMonth:function(b,d,e,f,g,h){var i=c.daysInMonth(e,f),j=d.options.monthsToShow;j=a.isArray(j)?j:[1,j];var k=d.options.fixedWeeks||j[0]*j[1]>1,l=d.options.firstDay,m=(c.newDate(e,f,1).getDay()-l+7)%7,n=k?6:Math.ceil((m+i)/7),o=d.options.selectOtherMonths&&d.options.showOtherMonths,p=d.pickingRange?d.selectedDates[0]:d.get("minDate"),q=d.get("maxDate"),r=g.week.indexOf("{weekOfYear}")>-1,s=c.today(),t=c.newDate(e,f,1);c.add(t,-m-(k&&t.getDay()===l?7:0),"d");for(var u=t.getTime(),v="",w=0;w'+(a.isFunction(d.options.calculateWeek)?d.options.calculateWeek(t):0)+"":"",y="",z=0;z<7;z++){var A=!1;if(d.options.rangeSelect&&d.selectedDates.length>0)A=t.getTime()>=d.selectedDates[0]&&t.getTime()<=d.selectedDates[1];else for(var B=0;B"+(d.options.showOtherMonths||t.getMonth()+1===f?C.content||t.getDate():" ")+(D?"":"")), c.add(t,1,"d"),u=t.getTime()}v+=this._prepare(g.week,d).replace(/\{days\}/g,y).replace(/\{weekOfYear\}/g,x)}var E=this._prepare(g.month,d).match(/\{monthHeader(:[^\}]+)?\}/);E=E[0].length<=13?"MM yyyy":E[0].substring(13,E[0].length-1),E=h?this._generateMonthSelection(d,e,f,p,q,E,g):c.formatDate(E,c.newDate(e,f,1),d.getConfig());var F=this._prepare(g.weekHeader,d).replace(/\{days\}/g,this._generateDayHeaders(d,g));return this._prepare(g.month,d).replace(/\{monthHeader(:[^\}]+)?\}/g,E).replace(/\{weekHeader\}/g,F).replace(/\{weeks\}/g,v)},_generateDayHeaders:function(a,b){for(var c="",d=0;d<7;d++){var e=(d+a.options.firstDay)%7;c+=this._prepare(b.dayHeader,a).replace(/\{day\}/g,''+a.options.dayNamesMin[e]+"")}return c},_generateMonthSelection:function(a,b,d,e,f,g){if(!a.options.changeMonth)return c.formatDate(g,c.newDate(b,d,1),a.getConfig());for(var h=a.options["monthNames"+(g.match(/mm/i)?"":"Short")],i=g.replace(/m+/i,"\\x2E").replace(/y+/i,"\\x2F"),j='",i=i.replace(/\\x2E/,j);var l=a.options.yearRange;if("any"===l)j='';else{l=l.split(":");var m=c.today().getFullYear(),n=l[0].match("c[+-].*")?b+parseInt(l[0].substring(1),10):(l[0].match("[+-].*")?m:0)+parseInt(l[0],10),o=l[1].match("c[+-].*")?b+parseInt(l[1].substring(1),10):(l[1].match("[+-].*")?m:0)+parseInt(l[1],10);j='