/**** start overview of included js files *****/

/* list of files for rank:30dependancy */
/* Array
(
    [0] => vendor_bundled/vendor/components/jquery/jquery.min.js
    [1] => vendor_bundled/vendor/components/jquery-migrate/jquery-migrate.min.js
    [2] => vendor_bundled/vendor/jquery/jquery-ui/jquery-ui.min.js
)
 */

/* rank:30dependancy - minify:disabled - adding raw file. vendor_bundled/vendor/components/jquery/jquery.min.js */

/* rank:30dependancy - minify:disabled - adding raw file. vendor_bundled/vendor/components/jquery-migrate/jquery-migrate.min.js */

/* rank:30dependancy - minify:disabled - adding raw file. vendor_bundled/vendor/jquery/jquery-ui/jquery-ui.min.js */

/* list of files for rank:40external */
/*  */

/* list of files for rank:50standard */
/* Array
(
    [0] => vendor_bundled/vendor/twitter/bootstrap/dist/js/bootstrap.js
    [1] => lib/jquery_tiki/tiki-bootstrapmodalfix.js
    [2] => lib/jquery_tiki/iconsets.js
    [3] => lib/tiki-js.js
    [4] => lib/jquery_tiki/tiki-jquery.js
    [5] => lib/jquery_tiki/tiki-maps.js
    [6] => vendor_bundled/vendor/jquery/plugins/jquery-json/src/jquery.json.js
    [7] => vendor_bundled/vendor/jquery/plugins/infinitecarousel/jquery.infinitecarousel3.js
    [8] => lib/jquery_tiki/tiki-ajax_services.js
    [9] => lib/ajax/autosave.js
    [10] => vendor_bundled/vendor/jquery/jquery-timepicker-addon/dist/jquery-ui-timepicker-addon.js
    [11] => vendor_bundled/vendor/jquery/plugins/superfish/dist/js/superfish.js
    [12] => vendor_bundled/vendor/jquery/plugins/superfish/dist/js/supersubs.js
    [13] => vendor_bundled/vendor/jquery/plugins/superfish/dist/js/hoverIntent.js
    [14] => vendor_bundled/vendor/jquery/plugins/reflection-jquery/js/reflection.js
    [15] => vendor_bundled/vendor/jquery/plugins/media/jquery.media.js
    [16] => vendor_bundled/vendor/jquery/plugins/tagcanvas/jquery.tagcanvas.js
    [17] => vendor_bundled/vendor/jquery/plugins/colorbox/jquery.colorbox.js
    [18] => vendor_bundled/vendor/jquery/plugins/jquery-validation/dist/jquery.validate.js
    [19] => lib/validators/validator_tiki.js
    [20] => vendor_bundled/vendor/jquery/plugins/async/jquery.async.js
    [21] => vendor_bundled/vendor/jquery/plugins/treetable/jquery.treetable.js
    [22] => vendor_bundled/vendor/cwspear/bootstrap-hover-dropdown/bootstrap-hover-dropdown.js
    [23] => lib/jquery_tiki/files.js
    [24] => lib/jquery_tiki/tiki-trackers.js
    [25] => lib/jquery_tiki/inline_edit.js
    [26] => lib/jquery_tiki/pluginedit.js
)
 */

/* rank:50standard - minify:ok. vendor_bundled/vendor/twitter/bootstrap/dist/js/bootstrap.js */

/* rank:50standard - minify:ok. lib/jquery_tiki/tiki-bootstrapmodalfix.js */

/* rank:50standard - minify:ok. lib/jquery_tiki/iconsets.js */

/* rank:50standard - minify:ok. lib/tiki-js.js */

/* rank:50standard - minify:ok. lib/jquery_tiki/tiki-jquery.js */

/* rank:50standard - minify:ok. lib/jquery_tiki/tiki-maps.js */

/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/jquery-json/src/jquery.json.js */

/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/infinitecarousel/jquery.infinitecarousel3.js */

/* rank:50standard - minify:ok. lib/jquery_tiki/tiki-ajax_services.js */

/* rank:50standard - minify:ok. lib/ajax/autosave.js */

/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/jquery-timepicker-addon/dist/jquery-ui-timepicker-addon.js */

/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/superfish/dist/js/superfish.js */

/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/superfish/dist/js/supersubs.js */

/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/superfish/dist/js/hoverIntent.js */

/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/reflection-jquery/js/reflection.js */

/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/media/jquery.media.js */

/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/tagcanvas/jquery.tagcanvas.js */

/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/colorbox/jquery.colorbox.js */

/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/jquery-validation/dist/jquery.validate.js */

/* rank:50standard - minify:ok. lib/validators/validator_tiki.js */

/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/async/jquery.async.js */

/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/treetable/jquery.treetable.js */

/* rank:50standard - minify:ok. vendor_bundled/vendor/cwspear/bootstrap-hover-dropdown/bootstrap-hover-dropdown.js */

/* rank:50standard - minify:ok. lib/jquery_tiki/files.js */

/* rank:50standard - minify:ok. lib/jquery_tiki/tiki-trackers.js */

/* rank:50standard - minify:ok. lib/jquery_tiki/inline_edit.js */

/* rank:50standard - minify:ok. lib/jquery_tiki/pluginedit.js */

/**** end overview of included js files *****/
;
/* rank:30dependancy - minify:disabled - adding raw file. vendor_bundled/vendor/components/jquery/jquery.min.js */
/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=Array.isArray(d)))?(e?(e=!1,f=c&&Array.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return!(!a||"[object Object]"!==k.call(a))&&(!(b=e(a))||(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;d<c;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;f<d;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a))return d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"!==c&&!r.isWindow(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:pa(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:pa(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function ra(){}ra.prototype=d.filters=d.pseudos,d.setFilters=new ra,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=Q.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function sa(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function ta(a,b,c){var d=b.dir,e=b.next,f=e||d,g=c&&"parentNode"===f,h=x++;return b.first?function(b,c,e){while(b=b[d])if(1===b.nodeType||g)return a(b,c,e);return!1}:function(b,c,i){var j,k,l,m=[w,h];if(i){while(b=b[d])if((1===b.nodeType||g)&&a(b,c,i))return!0}else while(b=b[d])if(1===b.nodeType||g)if(l=b[u]||(b[u]={}),k=l[b.uniqueID]||(l[b.uniqueID]={}),e&&e===b.nodeName.toLowerCase())b=b[d]||b;else{if((j=k[f])&&j[0]===w&&j[1]===h)return m[2]=j[2];if(k[f]=m,m[2]=a(b,c,i))return!0}return!1}}function ua(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d<e;d++)ga(a,b[d],c);return c}function wa(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function xa(a,b,c,d,e,f){return d&&!d[u]&&(d=xa(d)),e&&!e[u]&&(e=xa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||va(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:wa(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=wa(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i<f;i++)if(c=d.relative[a[i].type])m=[ta(ua(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;e<f;e++)if(d.relative[a[e].type])break;return xa(i>1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i<e&&ya(a.slice(i,e)),e<f&&ya(a=a.slice(e)),e<f&&sa(a))}m.push(c)}return ua(m)}function za(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext;function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function E(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):D.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b<d;b++)if(r.contains(e[b],this))return!0}));for(c=this.pushStack([]),b=0;b<d;b++)r.find(a,e[b],c);return d>1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(E(this,a||[],!1))},not:function(a){return this.pushStack(E(this,a||[],!0))},is:function(a){return!!E(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var F,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||F,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:G.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),C.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};H.prototype=r.fn,F=r(d);var I=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(r.contains(this,b[a]))return!0})},closest:function(a,b){var c,d=0,e=this.length,f=[],g="string"!=typeof a&&r(a);if(!A.test(a))for(;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function K(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return K(a,"nextSibling")},prev:function(a){return K(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return B(a,"iframe")?a.contentDocument:(B(a,"template")&&(a=a.content||a),r.merge([],a.childNodes))}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(J[a]||r.uniqueSort(e),I.test(a)&&e.reverse()),this.pushStack(e)}});var L=/[^\x20\t\r\n\f]+/g;function M(a){var b={};return r.each(a.match(L)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?M(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=e||a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){r.each(b,function(b,c){r.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==r.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return r.each(arguments,function(a,b){var c;while((c=r.inArray(b,f,c))>-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function N(a){return a}function O(a){throw a}function P(a,b,c,d){var e;try{a&&r.isFunction(e=a.promise)?e.call(a).done(b).fail(c):a&&r.isFunction(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b<f)){if(a=d.apply(h,i),a===c.promise())throw new TypeError("Thenable self-resolution");j=a&&("object"==typeof a||"function"==typeof a)&&a.then,r.isFunction(j)?e?j.call(a,g(f,c,N,e),g(f,c,O,e)):(f++,j.call(a,g(f,c,N,e),g(f,c,O,e),g(f,c,N,c.notifyWith))):(d!==N&&(h=void 0,i=[a]),(e||c.resolveWith)(h,i))}},k=e?j:function(){try{j()}catch(a){r.Deferred.exceptionHook&&r.Deferred.exceptionHook(a,k.stackTrace),b+1>=f&&(d!==O&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:N,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:N)),c[2][3].add(g(0,a,r.isFunction(d)?d:O))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(P(a,g.done(h(c)).resolve,g.reject,!b),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)P(e[c],h(c),g.reject);return g.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Q.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var R=r.Deferred();r.fn.ready=function(a){return R.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||R.resolveWith(d,[r]))}}),r.ready.then=R.then;function S(){d.removeEventListener("DOMContentLoaded",S),
a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},U=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function V(){this.expando=r.expando+V.uid++}V.uid=1,V.prototype={cache:function(a){var b=a[this.expando];return b||(b={},U(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){Array.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(L)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var W=new V,X=new V,Y=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function $(a){return"true"===a||"false"!==a&&("null"===a?null:a===+a+""?+a:Y.test(a)?JSON.parse(a):a)}function _(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Z,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c=$(c)}catch(e){}X.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return X.hasData(a)||W.hasData(a)},data:function(a,b,c){return X.access(a,b,c)},removeData:function(a,b){X.remove(a,b)},_data:function(a,b,c){return W.access(a,b,c)},_removeData:function(a,b){W.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=X.get(f),1===f.nodeType&&!W.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),_(f,d,e[d])));W.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){X.set(this,a)}):T(this,function(b){var c;if(f&&void 0===b){if(c=X.get(f,a),void 0!==c)return c;if(c=_(f,a),void 0!==c)return c}else this.each(function(){X.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?r.queue(this[0],a):void 0===b?this:this.each(function(){var c=r.queue(this,a,b);r._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&r.dequeue(this,a)})},dequeue:function(a){return this.each(function(){r.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=r.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=W.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var aa=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ba=new RegExp("^(?:([+-])=|)("+aa+")([a-z%]*)$","i"),ca=["Top","Right","Bottom","Left"],da=function(a,b){return a=b||a,"none"===a.style.display||""===a.style.display&&r.contains(a.ownerDocument,a)&&"none"===r.css(a,"display")},ea=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};function fa(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return r.css(a,b,"")},i=h(),j=c&&c[3]||(r.cssNumber[b]?"":"px"),k=(r.cssNumber[b]||"px"!==j&&+i)&&ba.exec(r.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,r.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var ga={};function ha(a){var b,c=a.ownerDocument,d=a.nodeName,e=ga[d];return e?e:(b=c.body.appendChild(c.createElement(d)),e=r.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e="block"),ga[d]=e,e)}function ia(a,b){for(var c,d,e=[],f=0,g=a.length;f<g;f++)d=a[f],d.style&&(c=d.style.display,b?("none"===c&&(e[f]=W.get(d,"display")||null,e[f]||(d.style.display="")),""===d.style.display&&da(d)&&(e[f]=ha(d))):"none"!==c&&(e[f]="none",W.set(d,"display",c)));for(f=0;f<g;f++)null!=e[f]&&(a[f].style.display=e[f]);return a}r.fn.extend({show:function(){return ia(this,!0)},hide:function(){return ia(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){da(this)?r(this).show():r(this).hide()})}});var ja=/^(?:checkbox|radio)$/i,ka=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,la=/^$|\/(?:java|ecma)script/i,ma={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ma.optgroup=ma.option,ma.tbody=ma.tfoot=ma.colgroup=ma.caption=ma.thead,ma.th=ma.td;function na(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&B(a,b)?r.merge([a],c):c}function oa(a,b){for(var c=0,d=a.length;c<d;c++)W.set(a[c],"globalEval",!b||W.get(b[c],"globalEval"))}var pa=/<|&#?\w+;/;function qa(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],n=0,o=a.length;n<o;n++)if(f=a[n],f||0===f)if("object"===r.type(f))r.merge(m,f.nodeType?[f]:f);else if(pa.test(f)){g=g||l.appendChild(b.createElement("div")),h=(ka.exec(f)||["",""])[1].toLowerCase(),i=ma[h]||ma._default,g.innerHTML=i[1]+r.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;r.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",n=0;while(f=m[n++])if(d&&r.inArray(f,d)>-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=na(l.appendChild(f),"script"),j&&oa(g),c){k=0;while(f=g[k++])la.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ra=d.documentElement,sa=/^key/,ta=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ua=/^([^.]*)(?:\.(.+)|)/;function va(){return!0}function wa(){return!1}function xa(){try{return d.activeElement}catch(a){}}function ya(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ya(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=wa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(ra,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(L)||[""],j=b.length;while(j--)h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.hasData(a)&&W.get(a);if(q&&(i=q.events)){b=(b||"").match(L)||[""],j=b.length;while(j--)if(h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&W.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(W.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c<arguments.length;c++)i[c]=arguments[c];if(b.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,b)!==!1){h=r.event.handlers.call(this,b,j),c=0;while((f=h[c++])&&!b.isPropagationStopped()){b.currentTarget=f.elem,d=0;while((g=f.handlers[d++])&&!b.isImmediatePropagationStopped())b.rnamespace&&!b.rnamespace.test(g.namespace)||(b.handleObj=g,b.data=g.data,e=((r.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(b.result=e)===!1&&(b.preventDefault(),b.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,b),b.result}},handlers:function(a,b){var c,d,e,f,g,h=[],i=b.delegateCount,j=a.target;if(i&&j.nodeType&&!("click"===a.type&&a.button>=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c<i;c++)d=b[c],e=d.selector+" ",void 0===g[e]&&(g[e]=d.needsContext?r(e,this).index(j)>-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i<b.length&&h.push({elem:j,handlers:b.slice(i)}),h},addProp:function(a,b){Object.defineProperty(r.Event.prototype,a,{enumerable:!0,configurable:!0,get:r.isFunction(b)?function(){if(this.originalEvent)return b(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[a]},set:function(b){Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:b})}})},fix:function(a){return a[r.expando]?a:new r.Event(a)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==xa()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===xa()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&B(this,"input"))return this.click(),!1},_default:function(a){return B(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},r.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},r.Event=function(a,b){return this instanceof r.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?va:wa,this.target=a.target&&3===a.target.nodeType?a.target.parentNode:a.target,this.currentTarget=a.currentTarget,this.relatedTarget=a.relatedTarget):this.type=a,b&&r.extend(this,b),this.timeStamp=a&&a.timeStamp||r.now(),void(this[r.expando]=!0)):new r.Event(a,b)},r.Event.prototype={constructor:r.Event,isDefaultPrevented:wa,isPropagationStopped:wa,isImmediatePropagationStopped:wa,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=va,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=va,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=va,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},r.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(a){var b=a.button;return null==a.which&&sa.test(a.type)?null!=a.charCode?a.charCode:a.keyCode:!a.which&&void 0!==b&&ta.test(a.type)?1&b?1:2&b?3:4&b?2:0:a.which}},r.event.addProp),r.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){r.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||r.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),r.fn.extend({on:function(a,b,c,d){return ya(this,a,b,c,d)},one:function(a,b,c,d){return ya(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,r(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=wa),this.each(function(){r.event.remove(this,a,c,b)})}});var za=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Aa=/<script|<style|<link/i,Ba=/checked\s*(?:[^=]|=\s*.checked.)/i,Ca=/^true\/(.*)/,Da=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ea(a,b){return B(a,"table")&&B(11!==b.nodeType?b:b.firstChild,"tr")?r(">tbody",a)[0]||a:a}function Fa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ga(a){var b=Ca.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ha(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(W.hasData(a)&&(f=W.access(a),g=W.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c<d;c++)r.event.add(b,e,j[e][c])}X.hasData(a)&&(h=X.access(a),i=r.extend({},h),X.set(b,i))}}function Ia(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ja.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function Ja(a,b,c,d){b=g.apply([],b);var e,f,h,i,j,k,l=0,m=a.length,n=m-1,q=b[0],s=r.isFunction(q);if(s||m>1&&"string"==typeof q&&!o.checkClone&&Ba.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ja(f,b,c,d)});if(m&&(e=qa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(na(e,"script"),Fa),i=h.length;l<m;l++)j=e,l!==n&&(j=r.clone(j,!0,!0),i&&r.merge(h,na(j,"script"))),c.call(a[l],j,l);if(i)for(k=h[h.length-1].ownerDocument,r.map(h,Ga),l=0;l<i;l++)j=h[l],la.test(j.type||"")&&!W.access(j,"globalEval")&&r.contains(k,j)&&(j.src?r._evalUrl&&r._evalUrl(j.src):p(j.textContent.replace(Da,""),k))}return a}function Ka(a,b,c){for(var d,e=b?r.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||r.cleanData(na(d)),d.parentNode&&(c&&r.contains(d.ownerDocument,d)&&oa(na(d,"script")),d.parentNode.removeChild(d));return a}r.extend({htmlPrefilter:function(a){return a.replace(za,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=na(h),f=na(a),d=0,e=f.length;d<e;d++)Ia(f[d],g[d]);if(b)if(c)for(f=f||na(a),g=g||na(h),d=0,e=f.length;d<e;d++)Ha(f[d],g[d]);else Ha(a,h);return g=na(h,"script"),g.length>0&&oa(g,!i&&na(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(U(c)){if(b=c[W.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[W.expando]=void 0}c[X.expando]&&(c[X.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ka(this,a,!0)},remove:function(a){return Ka(this,a)},text:function(a){return T(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.appendChild(a)}})},prepend:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(na(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return T(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Aa.test(a)&&!ma[(ka.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c<d;c++)b=this[c]||{},1===b.nodeType&&(r.cleanData(na(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ja(this,arguments,function(b){var c=this.parentNode;r.inArray(this,a)<0&&(r.cleanData(na(this)),c&&c.replaceChild(b,this))},a)}}),r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){r.fn[a]=function(a){for(var c,d=[],e=r(a),f=e.length-1,g=0;g<=f;g++)c=g===f?this:this.clone(!0),r(e[g])[b](c),h.apply(d,c.get());return this.pushStack(d)}});var La=/^margin/,Ma=new RegExp("^("+aa+")(?!px)[a-z%]+$","i"),Na=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)};!function(){function b(){if(i){i.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",i.innerHTML="",ra.appendChild(h);var b=a.getComputedStyle(i);c="1%"!==b.top,g="2px"===b.marginLeft,e="4px"===b.width,i.style.marginRight="50%",f="4px"===b.marginRight,ra.removeChild(h),i=null}}var c,e,f,g,h=d.createElement("div"),i=d.createElement("div");i.style&&(i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===i.style.backgroundClip,h.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.appendChild(i),r.extend(o,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return b(),e},pixelMarginRight:function(){return b(),f},reliableMarginLeft:function(){return b(),g}}))}();function Oa(a,b,c){var d,e,f,g,h=a.style;return c=c||Na(a),c&&(g=c.getPropertyValue(b)||c[b],""!==g||r.contains(a.ownerDocument,a)||(g=r.style(a,b)),!o.pixelMarginRight()&&Ma.test(g)&&La.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function Pa(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Qa=/^(none|table(?!-c[ea]).+)/,Ra=/^--/,Sa={position:"absolute",visibility:"hidden",display:"block"},Ta={letterSpacing:"0",fontWeight:"400"},Ua=["Webkit","Moz","ms"],Va=d.createElement("div").style;function Wa(a){if(a in Va)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ua.length;while(c--)if(a=Ua[c]+b,a in Va)return a}function Xa(a){var b=r.cssProps[a];return b||(b=r.cssProps[a]=Wa(a)||a),b}function Ya(a,b,c){var d=ba.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Za(a,b,c,d,e){var f,g=0;for(f=c===(d?"border":"content")?4:"width"===b?1:0;f<4;f+=2)"margin"===c&&(g+=r.css(a,c+ca[f],!0,e)),d?("content"===c&&(g-=r.css(a,"padding"+ca[f],!0,e)),"margin"!==c&&(g-=r.css(a,"border"+ca[f]+"Width",!0,e))):(g+=r.css(a,"padding"+ca[f],!0,e),"padding"!==c&&(g+=r.css(a,"border"+ca[f]+"Width",!0,e)));return g}function $a(a,b,c){var d,e=Na(a),f=Oa(a,b,e),g="border-box"===r.css(a,"boxSizing",!1,e);return Ma.test(f)?f:(d=g&&(o.boxSizingReliable()||f===a.style[b]),"auto"===f&&(f=a["offset"+b[0].toUpperCase()+b.slice(1)]),f=parseFloat(f)||0,f+Za(a,b,c||(g?"border":"content"),d,e)+"px")}r.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Oa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=r.camelCase(b),i=Ra.test(b),j=a.style;return i||(b=Xa(h)),g=r.cssHooks[b]||r.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:j[b]:(f=typeof c,"string"===f&&(e=ba.exec(c))&&e[1]&&(c=fa(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(r.cssNumber[h]?"":"px")),o.clearCloneStyle||""!==c||0!==b.indexOf("background")||(j[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i?j.setProperty(b,c):j[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=r.camelCase(b),i=Ra.test(b);return i||(b=Xa(h)),g=r.cssHooks[b]||r.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Oa(a,b,d)),"normal"===e&&b in Ta&&(e=Ta[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),r.each(["height","width"],function(a,b){r.cssHooks[b]={get:function(a,c,d){if(c)return!Qa.test(r.css(a,"display"))||a.getClientRects().length&&a.getBoundingClientRect().width?$a(a,b,d):ea(a,Sa,function(){return $a(a,b,d)})},set:function(a,c,d){var e,f=d&&Na(a),g=d&&Za(a,b,d,"border-box"===r.css(a,"boxSizing",!1,f),f);return g&&(e=ba.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=r.css(a,b)),Ya(a,c,g)}}}),r.cssHooks.marginLeft=Pa(o.reliableMarginLeft,function(a,b){if(b)return(parseFloat(Oa(a,"marginLeft"))||a.getBoundingClientRect().left-ea(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px"}),r.each({margin:"",padding:"",border:"Width"},function(a,b){r.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+ca[d]+b]=f[d]||f[d-2]||f[0];return e}},La.test(a)||(r.cssHooks[a+b].set=Ya)}),r.fn.extend({css:function(a,b){return T(this,function(a,b,c){var d,e,f={},g=0;if(Array.isArray(b)){for(d=Na(a),e=b.length;g<e;g++)f[b[g]]=r.css(a,b[g],!1,d);return f}return void 0!==c?r.style(a,b,c):r.css(a,b)},a,b,arguments.length>1)}});function _a(a,b,c,d,e){return new _a.prototype.init(a,b,c,d,e)}r.Tween=_a,_a.prototype={constructor:_a,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=_a.propHooks[this.prop];return a&&a.get?a.get(this):_a.propHooks._default.get(this)},run:function(a){var b,c=_a.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):_a.propHooks._default.set(this),this}},_a.prototype.init.prototype=_a.prototype,_a.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},_a.propHooks.scrollTop=_a.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=_a.prototype.init,r.fx.step={};var ab,bb,cb=/^(?:toggle|show|hide)$/,db=/queueHooks$/;function eb(){bb&&(d.hidden===!1&&a.requestAnimationFrame?a.requestAnimationFrame(eb):a.setTimeout(eb,r.fx.interval),r.fx.tick())}function fb(){return a.setTimeout(function(){ab=void 0}),ab=r.now()}function gb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ca[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function hb(a,b,c){for(var d,e=(kb.tweeners[b]||[]).concat(kb.tweeners["*"]),f=0,g=e.length;f<g;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,k,l="width"in b||"height"in b,m=this,n={},o=a.style,p=a.nodeType&&da(a),q=W.get(a,"fxshow");c.queue||(g=r._queueHooks(a,"fx"),null==g.unqueued&&(g.unqueued=0,h=g.empty.fire,g.empty.fire=function(){g.unqueued||h()}),g.unqueued++,m.always(function(){m.always(function(){g.unqueued--,r.queue(a,"fx").length||g.empty.fire()})}));for(d in b)if(e=b[d],cb.test(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}n[d]=q&&q[d]||r.style(a,d)}if(i=!r.isEmptyObject(b),i||!r.isEmptyObject(n)){l&&1===a.nodeType&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=q&&q.display,null==j&&(j=W.get(a,"display")),k=r.css(a,"display"),"none"===k&&(j?k=j:(ia([a],!0),j=a.style.display||j,k=r.css(a,"display"),ia([a]))),("inline"===k||"inline-block"===k&&null!=j)&&"none"===r.css(a,"float")&&(i||(m.done(function(){o.display=j}),null==j&&(k=o.display,j="none"===k?"":k)),o.display="inline-block")),c.overflow&&(o.overflow="hidden",m.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]})),i=!1;for(d in n)i||(q?"hidden"in q&&(p=q.hidden):q=W.access(a,"fxshow",{display:j}),f&&(q.hidden=!p),p&&ia([a],!0),m.done(function(){p||ia([a]),W.remove(a,"fxshow");for(d in n)r.style(a,d,n[d])})),i=hb(p?q[d]:0,d,m),d in q||(q[d]=i.start,p&&(i.end=i.start,i.start=0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=r.camelCase(c),e=b[d],f=a[c],Array.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=r.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=kb.prefilters.length,h=r.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=ab||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;g<i;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),f<1&&i?c:(i||h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:r.extend({},b),opts:r.extend(!0,{specialEasing:{},easing:r.easing._default},c),originalProperties:b,originalOptions:c,startTime:ab||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=r.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;c<d;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);f<g;f++)if(d=kb.prefilters[f].call(j,a,k,j.opts))return r.isFunction(d.stop)&&(r._queueHooks(j.elem,j.opts.queue).stop=r.proxy(d.stop,d)),d;return r.map(k,hb,j),r.isFunction(j.opts.start)&&j.opts.start.call(a,j),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always),r.fx.timer(r.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j}r.Animation=r.extend(kb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return fa(c.elem,a,ba.exec(b),c),c}]},tweener:function(a,b){r.isFunction(a)?(b=a,a=["*"]):a=a.match(L);for(var c,d=0,e=a.length;d<e;d++)c=a[d],kb.tweeners[c]=kb.tweeners[c]||[],kb.tweeners[c].unshift(b)},prefilters:[ib],prefilter:function(a,b){b?kb.prefilters.unshift(a):kb.prefilters.push(a)}}),r.speed=function(a,b,c){var d=a&&"object"==typeof a?r.extend({},a):{complete:c||!c&&b||r.isFunction(a)&&a,duration:a,easing:c&&b||b&&!r.isFunction(b)&&b};return r.fx.off?d.duration=0:"number"!=typeof d.duration&&(d.duration in r.fx.speeds?d.duration=r.fx.speeds[d.duration]:d.duration=r.fx.speeds._default),null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){r.isFunction(d.old)&&d.old.call(this),d.queue&&r.dequeue(this,d.queue)},d},r.fn.extend({fadeTo:function(a,b,c,d){return this.filter(da).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=r.isEmptyObject(a),f=r.speed(b,c,d),g=function(){var b=kb(this,r.extend({},a),f);(e||W.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=r.timers,g=W.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&db.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||r.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=W.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=r.timers,g=d?d.length:0;for(c.finish=!0,r.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),r.each(["toggle","show","hide"],function(a,b){var c=r.fn[b];r.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),r.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){r.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),r.timers=[],r.fx.tick=function(){var a,b=0,c=r.timers;for(ab=r.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||r.fx.stop(),ab=void 0},r.fx.timer=function(a){r.timers.push(a),r.fx.start()},r.fx.interval=13,r.fx.start=function(){bb||(bb=!0,eb())},r.fx.stop=function(){bb=null},r.fx.speeds={slow:600,fast:200,_default:400},r.fn.delay=function(b,c){return b=r.fx?r.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",o.checkOn=""!==a.value,o.optSelected=c.selected,a=d.createElement("input"),a.value="t",a.type="radio",o.radioValue="t"===a.value}();var lb,mb=r.expr.attrHandle;r.fn.extend({attr:function(a,b){return T(this,r.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?lb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),
null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),lb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=mb[b]||r.find.attr;mb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=mb[g],mb[g]=e,e=null!=c(a,b,d)?g:null,mb[g]=f),e}});var nb=/^(?:input|select|textarea|button)$/i,ob=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return T(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):nb.test(a.nodeName)||ob.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function pb(a){var b=a.match(L)||[];return b.join(" ")}function qb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,qb(this)))});if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,qb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,qb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(L)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=qb(this),b&&W.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":W.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+pb(qb(c))+" ").indexOf(b)>-1)return!0;return!1}});var rb=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:pb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d<i;d++)if(c=e[d],(c.selected||d===f)&&!c.disabled&&(!c.parentNode.disabled||!B(c.parentNode,"optgroup"))){if(b=r(c).val(),g)return b;h.push(b)}return h},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var sb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!sb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,sb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(W.get(h,"events")||{})[b.type]&&W.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&U(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!U(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.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(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=W.access(d,b);e||d.addEventListener(a,c,!0),W.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=W.access(d,b)-1;e?W.access(d,b,e):(d.removeEventListener(a,c,!0),W.remove(d,b))}}});var tb=a.location,ub=r.now(),vb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(Array.isArray(b))r.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(Array.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!ja.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:Array.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}});var Bb=/%20/g,Cb=/#.*$/,Db=/([?&])_=[^&]*/,Eb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Fb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Gb=/^(?:GET|HEAD)$/,Hb=/^\/\//,Ib={},Jb={},Kb="*/".concat("*"),Lb=d.createElement("a");Lb.href=tb.href;function Mb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(L)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nb(a,b,c,d){var e={},f=a===Jb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Ob(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Pb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Qb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:tb.href,type:"GET",isLocal:Fb.test(tb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Ob(Ob(a,r.ajaxSettings),b):Ob(r.ajaxSettings,a)},ajaxPrefilter:Mb(Ib),ajaxTransport:Mb(Jb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Eb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||tb.href)+"").replace(Hb,tb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(L)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Lb.protocol+"//"+Lb.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Nb(Ib,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Gb.test(o.type),f=o.url.replace(Cb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(Bb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(vb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Db,"$1"),n=(vb.test(f)?"&":"?")+"_="+ub++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Kb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Nb(Jb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Pb(o,y,d)),v=Qb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Rb={0:200,1223:204},Sb=r.ajaxSettings.xhr();o.cors=!!Sb&&"withCredentials"in Sb,o.ajax=Sb=!!Sb,r.ajaxTransport(function(b){var c,d;if(o.cors||Sb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Rb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Tb=[],Ub=/(=)\?(?=&|$)|\?\?/;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Tb.pop()||r.expando+"_"+ub++;return this[a]=!0,a}}),r.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Ub.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ub.test(b.data)&&"data");if(h||"jsonp"===b.dataTypes[0])return e=b.jsonpCallback=r.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Ub,"$1"+e):b.jsonp!==!1&&(b.url+=(vb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||r.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?r(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Tb.push(e)),g&&r.isFunction(f)&&f(g[0]),g=f=void 0}),"script"}),o.createHTMLDocument=function(){var a=d.implementation.createHTMLDocument("").body;return a.innerHTML="<form></form><form></form>",2===a.childNodes.length}(),r.parseHTML=function(a,b,c){if("string"!=typeof a)return[];"boolean"==typeof b&&(c=b,b=!1);var e,f,g;return b||(o.createHTMLDocument?(b=d.implementation.createHTMLDocument(""),e=b.createElement("base"),e.href=d.location.href,b.head.appendChild(e)):b=d),f=C.exec(a),g=!c&&[],f?[b.createElement(f[1])]:(f=qa([a],b,g),g&&g.length&&r(g).remove(),r.merge([],f.childNodes))},r.fn.load=function(a,b,c){var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=pb(a.slice(h)),a=a.slice(0,h)),r.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&r.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?r("<div>").append(r.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},r.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){r.fn[b]=function(a){return this.on(b,a)}}),r.expr.pseudos.animated=function(a){return r.grep(r.timers,function(b){return a===b.elem}).length},r.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=r.css(a,"position"),l=r(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=r.css(a,"top"),i=r.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),r.isFunction(b)&&(b=b.call(a,c,r.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},r.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){r.offset.setOffset(this,a,b)});var b,c,d,e,f=this[0];if(f)return f.getClientRects().length?(d=f.getBoundingClientRect(),b=f.ownerDocument,c=b.documentElement,e=b.defaultView,{top:d.top+e.pageYOffset-c.clientTop,left:d.left+e.pageXOffset-c.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===r.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),B(a[0],"html")||(d=a.offset()),d={top:d.top+r.css(a[0],"borderTopWidth",!0),left:d.left+r.css(a[0],"borderLeftWidth",!0)}),{top:b.top-d.top-r.css(c,"marginTop",!0),left:b.left-d.left-r.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===r.css(a,"position"))a=a.offsetParent;return a||ra})}}),r.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;r.fn[a]=function(d){return T(this,function(a,d,e){var f;return r.isWindow(a)?f=a:9===a.nodeType&&(f=a.defaultView),void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),r.each(["top","left"],function(a,b){r.cssHooks[b]=Pa(o.pixelPosition,function(a,c){if(c)return c=Oa(a,b),Ma.test(c)?r(a).position()[b]+"px":c})}),r.each({Height:"height",Width:"width"},function(a,b){r.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){r.fn[d]=function(e,f){var g=arguments.length&&(c||"boolean"!=typeof e),h=c||(e===!0||f===!0?"margin":"border");return T(this,function(b,c,e){var f;return r.isWindow(b)?0===d.indexOf("outer")?b["inner"+a]:b.document.documentElement["client"+a]:9===b.nodeType?(f=b.documentElement,Math.max(b.body["scroll"+a],f["scroll"+a],b.body["offset"+a],f["offset"+a],f["client"+a])):void 0===e?r.css(b,c,h):r.style(b,c,e,h)},b,g?e:void 0,g)}})}),r.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),r.holdReady=function(a){a?r.readyWait++:r.ready(!0)},r.isArray=Array.isArray,r.parseJSON=JSON.parse,r.nodeName=B,"function"==typeof define&&define.amd&&define("jquery",[],function(){return r});var Vb=a.jQuery,Wb=a.$;return r.noConflict=function(b){return a.$===r&&(a.$=Wb),b&&a.jQuery===r&&(a.jQuery=Vb),r},b||(a.jQuery=a.$=r),r});
;
/* rank:30dependancy - minify:disabled - adding raw file. vendor_bundled/vendor/components/jquery-migrate/jquery-migrate.min.js */
/*! jQuery Migrate v3.0.0 | (c) jQuery Foundation and other contributors | jquery.org/license */
"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(a,b){"use strict";function c(c){var d=b.console;e[c]||(e[c]=!0,a.migrateWarnings.push(c),d&&d.warn&&!a.migrateMute&&(d.warn("JQMIGRATE: "+c),a.migrateTrace&&d.trace&&d.trace()))}function d(a,b,d,e){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return c(e),d}})}a.migrateVersion="3.0.0",function(){var c=b.console&&b.console.log&&function(){b.console.log.apply(b.console,arguments)},d=/^[12]\./;c&&(a&&!d.test(a.fn.jquery)||c("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),a.migrateWarnings&&c("JQMIGRATE: Migrate plugin loaded multiple times"),c("JQMIGRATE: Migrate is installed"+(a.migrateMute?"":" with logging active")+", version "+a.migrateVersion))}();var e={};a.migrateWarnings=[],void 0===a.migrateTrace&&(a.migrateTrace=!0),a.migrateReset=function(){e={},a.migrateWarnings.length=0},"BackCompat"===document.compatMode&&c("jQuery is not compatible with Quirks Mode");var f=a.fn.init,g=a.isNumeric,h=a.find,i=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,j=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;a.fn.init=function(a){var b=Array.prototype.slice.call(arguments);return"string"==typeof a&&"#"===a&&(c("jQuery( '#' ) is not a valid selector"),b[0]=[]),f.apply(this,b)},a.fn.init.prototype=a.fn,a.find=function(a){var b=Array.prototype.slice.call(arguments);if("string"==typeof a&&i.test(a))try{document.querySelector(a)}catch(d){a=a.replace(j,function(a,b,c,d){return"["+b+c+'"'+d+'"]'});try{document.querySelector(a),c("Attribute selector with '#' must be quoted: "+b[0]),b[0]=a}catch(e){c("Attribute selector with '#' was not fixed: "+b[0])}}return h.apply(this,b)};var k;for(k in h)Object.prototype.hasOwnProperty.call(h,k)&&(a.find[k]=h[k]);a.fn.size=function(){return c("jQuery.fn.size() is deprecated; use the .length property"),this.length},a.parseJSON=function(){return c("jQuery.parseJSON is deprecated; use JSON.parse"),JSON.parse.apply(null,arguments)},a.isNumeric=function(b){function d(b){var c=b&&b.toString();return!a.isArray(b)&&c-parseFloat(c)+1>=0}var e=g(b),f=d(b);return e!==f&&c("jQuery.isNumeric() should not be called on constructed objects"),f},d(a,"unique",a.uniqueSort,"jQuery.unique is deprecated, use jQuery.uniqueSort"),d(a.expr,"filters",a.expr.pseudos,"jQuery.expr.filters is now jQuery.expr.pseudos"),d(a.expr,":",a.expr.pseudos,'jQuery.expr[":"] is now jQuery.expr.pseudos');var l=a.ajax;a.ajax=function(){var a=l.apply(this,arguments);return a.promise&&(d(a,"success",a.done,"jQXHR.success is deprecated and removed"),d(a,"error",a.fail,"jQXHR.error is deprecated and removed"),d(a,"complete",a.always,"jQXHR.complete is deprecated and removed")),a};var m=a.fn.removeAttr,n=a.fn.toggleClass,o=/\S+/g;a.fn.removeAttr=function(b){var d=this;return a.each(b.match(o),function(b,e){a.expr.match.bool.test(e)&&(c("jQuery.fn.removeAttr no longer sets boolean properties: "+e),d.prop(e,!1))}),m.apply(this,arguments)},a.fn.toggleClass=function(b){return void 0!==b&&"boolean"!=typeof b?n.apply(this,arguments):(c("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var c=this.getAttribute&&this.getAttribute("class")||"";c&&a.data(this,"__className__",c),this.setAttribute&&this.setAttribute("class",c||b===!1?"":a.data(this,"__className__")||"")}))};var p=!1;a.swap&&a.each(["height","width","reliableMarginRight"],function(b,c){var d=a.cssHooks[c]&&a.cssHooks[c].get;d&&(a.cssHooks[c].get=function(){var a;return p=!0,a=d.apply(this,arguments),p=!1,a})}),a.swap=function(a,b,d,e){var f,g,h={};p||c("jQuery.swap() is undocumented and deprecated");for(g in b)h[g]=a.style[g],a.style[g]=b[g];f=d.apply(a,e||[]);for(g in b)a.style[g]=h[g];return f};var q=a.data;a.data=function(b,d,e){var f;return d&&d!==a.camelCase(d)&&(f=a.hasData(b)&&q.call(this,b),f&&d in f)?(c("jQuery.data() always sets/gets camelCased names: "+d),arguments.length>2&&(f[d]=e),f[d]):q.apply(this,arguments)};var r=a.Tween.prototype.run;a.Tween.prototype.run=function(b){a.easing[this.easing].length>1&&(c('easing function "jQuery.easing.'+this.easing.toString()+'" should use only first argument'),a.easing[this.easing]=a.easing[this.easing].bind(a.easing,b,this.options.duration*b,0,1,this.options.duration)),r.apply(this,arguments)};var s=a.fn.load,t=a.event.fix;a.event.props=[],a.event.fixHooks={},a.event.fix=function(b){var d,e=b.type,f=this.fixHooks[e],g=a.event.props;if(g.length)for(c("jQuery.event.props are deprecated and removed: "+g.join());g.length;)a.event.addProp(g.pop());if(f&&!f._migrated_&&(f._migrated_=!0,c("jQuery.event.fixHooks are deprecated and removed: "+e),(g=f.props)&&g.length))for(;g.length;)a.event.addProp(g.pop());return d=t.call(this,b),f&&f.filter?f.filter(d,b):d},a.each(["load","unload","error"],function(b,d){a.fn[d]=function(){var a=Array.prototype.slice.call(arguments,0);return"load"===d&&"string"==typeof a[0]?s.apply(this,a):(c("jQuery.fn."+d+"() is deprecated"),a.splice(0,0,d),arguments.length?this.on.apply(this,a):(this.triggerHandler.apply(this,a),this))}}),a(function(){a(document).triggerHandler("ready")}),a.event.special.ready={setup:function(){this===document&&c("'ready' event is deprecated")}},a.fn.extend({bind:function(a,b,d){return c("jQuery.fn.bind() is deprecated"),this.on(a,null,b,d)},unbind:function(a,b){return c("jQuery.fn.unbind() is deprecated"),this.off(a,null,b)},delegate:function(a,b,d,e){return c("jQuery.fn.delegate() is deprecated"),this.on(b,a,d,e)},undelegate:function(a,b,d){return c("jQuery.fn.undelegate() is deprecated"),1===arguments.length?this.off(a,"**"):this.off(b,a||"**",d)}});var u=a.fn.offset;a.fn.offset=function(){var b,d=this[0],e={top:0,left:0};return d&&d.nodeType?(b=(d.ownerDocument||document).documentElement,a.contains(b,d)?u.apply(this,arguments):(c("jQuery.fn.offset() requires an element connected to a document"),e)):(c("jQuery.fn.offset() requires a valid DOM element"),e)};var v=a.param;a.param=function(b,d){var e=a.ajaxSettings&&a.ajaxSettings.traditional;return void 0===d&&e&&(c("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),d=e),v.call(this,b,d)};var w=a.fn.andSelf||a.fn.addBack;a.fn.andSelf=function(){return c("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)};var x=a.Deferred,y=[["resolve","done",a.Callbacks("once memory"),a.Callbacks("once memory"),"resolved"],["reject","fail",a.Callbacks("once memory"),a.Callbacks("once memory"),"rejected"],["notify","progress",a.Callbacks("memory"),a.Callbacks("memory")]];a.Deferred=function(b){var d=x(),e=d.promise();return d.pipe=e.pipe=function(){var b=arguments;return c("deferred.pipe() is deprecated"),a.Deferred(function(c){a.each(y,function(f,g){var h=a.isFunction(b[f])&&b[f];d[g[1]](function(){var b=h&&h.apply(this,arguments);b&&a.isFunction(b.promise)?b.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g[0]+"With"](this===e?c.promise():this,h?[b]:arguments)})}),b=null}).promise()},b&&b.call(d,d),d}}(jQuery,window);;
/* rank:30dependancy - minify:disabled - adding raw file. vendor_bundled/vendor/jquery/jquery-ui/jquery-ui.min.js */
/*! jQuery UI - v1.12.1 - 2016-09-14
* http://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */

(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function s(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isDisabledDatepicker(m.inline?m.dpDiv.parent()[0]:m.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var h=0,l=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},h=e.split(".")[0];e=e.split(".")[1];var l=h+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:h,widgetName:e,widgetFullName:l}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=l.call(arguments,1),o=0,a=n.length;a>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,a=l.call(arguments,1),r=this;return o?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(r=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,a),i!==o&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+n+"'")}):r=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),r}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=h++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType,o=!s&&!n;return{element:i,isWindow:s,isDocument:n,offset:o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return d.apply(this,arguments);n=t.extend({},n);var u,p,f,g,m,_,v=t(n.of),b=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(b),w=(n.collision||"flip").split(" "),k={};return _=s(v),v[0].preventDefault&&(n.at="left top"),p=_.width,f=_.height,g=_.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):h.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=h.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===n.at[0]?m.left+=p:"center"===n.at[0]&&(m.left+=p/2),"bottom"===n.at[1]?m.top+=f:"center"===n.at[1]&&(m.top+=f/2),u=e(k.at,p,f),m.left+=u[0],m.top+=u[1],this.each(function(){var s,r,h=t(this),l=h.outerWidth(),c=h.outerHeight(),d=i(this,"marginLeft"),_=i(this,"marginTop"),x=l+d+i(this,"marginRight")+y.width,C=c+_+i(this,"marginBottom")+y.height,D=t.extend({},m),I=e(k.my,h.outerWidth(),h.outerHeight());"right"===n.my[0]?D.left-=l:"center"===n.my[0]&&(D.left-=l/2),"bottom"===n.my[1]?D.top-=c:"center"===n.my[1]&&(D.top-=c/2),D.left+=I[0],D.top+=I[1],s={marginLeft:d,marginTop:_},t.each(["left","top"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:l,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[u[0]+I[0],u[1]+I[1]],my:n.my,at:n.at,within:b,elem:h})}),n.using&&(r=function(t){var e=g.left-D.left,i=e+p-l,s=g.top-D.top,r=s+f-c,u={target:{element:v,left:g.left,top:g.top,width:p,height:f},element:{element:h,left:D.left,top:D.top,width:l,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}});var c="ui-effects-",u="ui-effects-style",d="ui-effects-animated",p=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(p),function(){function e(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isNaN(parseFloat(o)))&&(a[s]=o));return a}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(p.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(s,function(t,e){n[e]&&a[e+"Class"](n[e])})},o(),l=l.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,n,o,a){return"boolean"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),n=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=n.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(d)||e(i)}}(t.expr.filters.animated)),t.uiBackCompat!==!1&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;s>i;i++)null!==e[i]&&t.data(c+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;n>s;s++)null!==e[s]&&(i=t.data(c+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,n="vertical"!==i?(e||100)/100:1;return{height:t.height()*n,width:t.width()*s,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(u,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(u)||"",t.removeData(u)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),n=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),"float":e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(c+"placeholder",i)),e.css({position:s,left:n.left,top:n.top}),i},removePlaceholder:function(t){var e=c+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(d),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),a()}function a(){t.isFunction(h)&&h.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=c.shift(),t.uiBackCompat===!1||o?"none"===s.mode?(r[l](),a()):n.call(r[0],s,i):(r.is(":hidden")?"hide"===l:"show"===l)?(r[l](),a()):n.call(r[0],s,a)}var s=e.apply(this,arguments),n=t.effects.effect[s.effect],o=n.mode,a=s.queue,r=a||"fx",h=s.complete,l=s.mode,c=[],u=function(e){var i=t(this),s=t.effects.mode(i,l)||o;i.data(d,!0),c.push(s),o&&("show"===s||s===o&&"hide"===s)&&i.show(),o&&"none"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!n?l?this[l](s.duration,h):this.each(function(){h&&h.call(this)}):a===!1?this.each(u).each(i):this.queue(r,u).queue(r,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n)
}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}();var f=t.effects;t.effects.define("blind","hide",function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=t(this),o=e.direction||"up",a=n.cssClip(),r={clip:t.extend({},a)},h=t.effects.createPlaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],"show"===e.mode&&(n.cssClip(r.clip),h&&h.css(t.effects.clipToBox(r)),r.clip=a),h&&h.animate(t.effects.clipToBox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var s,n,o,a=t(this),r=e.mode,h="hide"===r,l="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(l||h?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",_="up"===c||"left"===c,v=0,b=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),l&&(n={opacity:1},n[m]=o,a.css("opacity",0).css(m,_?2*-u:2*u).animate(n,f,g)),h&&(u/=Math.pow(2,d-1)),n={},n[m]=o;d>v;v++)s={},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g).animate(n,f,g),u=h?2*u:u/2;h&&(s={opacity:0},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define("clip","hide",function(e,i){var s,n={},o=t(this),a=e.direction||"vertical",r="both"===a,h=r||"horizontal"===a,l=r||"vertical"===a;s=o.cssClip(),n.clip={top:l?(s.bottom-s.top)/2:s.top,right:h?(s.right-s.left)/2:s.right,bottom:l?(s.bottom-s.top)/2:s.bottom,left:h?(s.right-s.left)/2:s.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(n.clip),n.clip=s),o.animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var s,n=t(this),o=e.mode,a="show"===o,r=e.direction||"left",h="up"===r||"down"===r?"top":"left",l="up"===r||"left"===r?"-=":"+=",c="+="===l?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,u[h]=l+s,a&&(n.css(u),u[h]=c+s,u.opacity=1),n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,g="show"===f,m=p.show().css("visibility","hidden").offset(),_=Math.ceil(p.outerWidth()/d),v=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*v,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*_,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*_,top:-o*v}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:_,height:v,left:r+(g?l*_:0),top:h+(g?c*v:0),opacity:g?0:1}).animate({left:r+(g?0:l*_),top:h+(g?0:c*v),opacity:g?1:0},e.duration||500,e.easing,s)}),t.effects.define("fade","toggle",function(e,i){var s="show"===e.mode;t(this).css("opacity",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=e.size||15,h=/([0-9]+)%/.exec(r),l=!!e.horizFirst,c=l?["right","bottom"]:["bottom","right"],u=e.duration/2,d=t.effects.createPlaceholder(s),p=s.cssClip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[c[0]],p[c[1]]],_=s.queue().length;h&&(r=parseInt(h[1],10)/100*m[a?0:1]),f.clip[c[0]]=r,g.clip[c[0]]=r,g.clip[c[1]]=0,o&&(s.cssClip(g.clip),d&&d.css(t.effects.clipToBox(g)),g.clip=p),s.queue(function(i){d&&d.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(g),u,e.easing),i()}).animate(f,u,e.easing).animate(g,u,e.easing).queue(i),t.effects.unshift(s,_,4)}),t.effects.define("highlight","show",function(e,i){var s=t(this),n={backgroundColor:s.css("backgroundColor")};"hide"===e.mode&&(n.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var s,n,o,a=t(this),r=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=a.css("position"),g=a.position(),m=t.effects.scaledDimensions(a),_=e.from||m,v=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===c&&(o=_,_=v,v=o),n={from:{y:_.height/m.height,x:_.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},("box"===d||"both"===d)&&(n.from.y!==n.to.y&&(_=t.effects.setTransition(a,h,n.from.y,_),v=t.effects.setTransition(a,h,n.to.y,v)),n.from.x!==n.to.x&&(_=t.effects.setTransition(a,l,n.from.x,_),v=t.effects.setTransition(a,l,n.to.x,v))),("content"===d||"both"===d)&&n.from.y!==n.to.y&&(_=t.effects.setTransition(a,r,n.from.y,_),v=t.effects.setTransition(a,r,n.to.y,v)),p&&(s=t.effects.getBaseline(p,m),_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left,v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left),a.css(_),("content"===d||"both"===d)&&(h=h.concat(["marginTop","marginBottom"]).concat(r),l=l.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),s=t.effects.scaledDimensions(i),o={height:s.height*n.from.y,width:s.width*n.from.x,outerHeight:s.outerHeight*n.from.y,outerWidth:s.outerWidth*n.from.x},a={height:s.height*n.to.y,width:s.width*n.to.x,outerHeight:s.height*n.to.y,outerWidth:s.width*n.to.x};n.from.y!==n.to.y&&(o=t.effects.setTransition(i,h,n.from.y,o),a=t.effects.setTransition(i,h,n.to.y,a)),n.from.x!==n.to.x&&(o=t.effects.setTransition(i,l,n.from.x,o),a=t.effects.setTransition(i,l,n.to.x,a)),u&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){u&&t.effects.restoreStyle(i)})})),a.animate(v,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===v.opacity&&a.css("opacity",_.opacity),u||(a.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var s=t(this),n=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==n?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)}),t.effects.define("pulsate","show",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=o||a,h=2*(e.times||5)+(r?1:0),l=e.duration/h,c=0,u=1,d=s.queue().length;for((o||!s.is(":visible"))&&(s.css("opacity",0).show(),c=1);h>u;u++)s.animate({opacity:c},l,e.easing),c=1-c;s.animate({opacity:c},l,e.easing),s.queue(i),t.effects.unshift(s,d,h+1)}),t.effects.define("shake",function(e,i){var s=1,n=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,h=2*r+1,l=Math.round(e.duration/h),c="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,d={},p={},f={},g=n.queue().length;for(t.effects.createPlaceholder(n),d[c]=(u?"-=":"+=")+a,p[c]=(u?"+=":"-=")+2*a,f[c]=(u?"-=":"+=")+2*a,n.animate(d,l,e.easing);r>s;s++)n.animate(p,l,e.easing).animate(f,l,e.easing);n.animate(p,l,e.easing).animate(d,l/2,e.easing).queue(i),t.effects.unshift(n,g,h+1)}),t.effects.define("slide","show",function(e,i){var s,n,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u=e.distance||o["top"===l?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),s=o.cssClip(),n=o.position()[l],d[l]=(c?-1:1)*u+n,d.clip=o.cssClip(),d.clip[a[h][1]]=d.clip[a[h][0]],"show"===r&&(o.cssClip(d.clip),o.css(l,d[l]),d.clip=s,d[l]=n),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});var f;t.uiBackCompat!==!1&&(f=t.effects.define("transfer",function(e,i){t(this).transfer(e,i)})),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,s=this.options.icons;s&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+s.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,s.header)._addClass(i,null,s.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void 0)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),s=e.next(),n=s.uniqueId().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,s,n=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],h=r&&n.collapsible,l=h?t():a.next(),c=o.next(),u={oldHeader:o,oldPanel:c,newHeader:h?t():a,newPanel:l};e.preventDefault(),r&&!n.collapsible||this._trigger("beforeActivate",e,u)===!1||(n.active=h?!1:this.headers.index(a),this.active=r?t():a,this._toggle(u),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.activeHeader)._addClass(i,null,n.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),n.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeClass(s,null,n.icons.header)._addClass(s,null,n.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var s,n,o,a=this,r=0,h=t.css("box-sizing"),l=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},u=l&&c.down||c,d=function(){a._toggleComplete(i)};return"number"==typeof u&&(o=u),"string"==typeof u&&(n=u),n=n||u.easing||c.easing,o=o||u.duration||c.duration,e.length?t.length?(s=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(this.showProps,{duration:o,easing:n,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===h&&(r+=i.now):"content"!==a.options.heightStyle&&(i.now=Math.round(s-e.outerHeight()-r),r=0)}}),void 0):e.animate(this.hideProps,o,n,d):t.animate(this.showProps,o,n,d)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,h=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=h.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("<span>").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=h.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}}),t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;
this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete;var g=/ui-corner-([a-z]){2,6}/g;t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(s,n){var o,a={};return n?"controlgroupLabel"===s?(o=e.element.find(n),o.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),i=i.concat(o.get()),void 0):(t.fn[s]&&(a=e["_"+s+"Options"]?e["_"+s+"Options"]("middle"):{classes:{}},e.element.find(n).each(function(){var n=t(this),o=n[s]("instance"),r=t.widget.extend({},a);if("button"!==s||!n.parent(".ui-spinner").length){o||(o=n[s]()[s]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),n[s](r);var h=n[s]("widget");t.data(h[0],"ui-controlgroup-data",o?o:n[s]("instance")),i.push(h[0])}})),void 0):void 0}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this),s=i.data("ui-controlgroup-data");s&&s[e]&&s[e]()})},_updateCornerClass:function(t,e){var i="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",s=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,i),this._addClass(t,null,s)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e?"auto":!1,classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var s={};return t.each(e,function(n){var o=i.options.classes[n]||"";o=t.trim(o.replace(g,"")),s[n]=(o+" "+e[n]).replace(/\s+/g," ")}),s},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?(this._callChildMethod(e?"disable":"enable"),void 0):(this.refresh(),void 0)},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,s){var n=e[s]().data("ui-controlgroup-data");if(n&&i["_"+n.widgetName+"Options"]){var o=i["_"+n.widgetName+"Options"](1===e.length?"only":s);o.classes=i._resolveClassesValues(o.classes,n),n.element[n.widgetName](o)}else i._updateCornerClass(e[s](),s)}),this._callChildMethod("refresh"))}}),t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,s=this,n=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){s.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(n.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(n.disabled=e),n},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,i=this.element[0].name,s="input[name='"+t.ui.escapeSelector(i)+"']";return i?(e=this.form.length?t(this.form[0].elements).filter(s):t(s).filter(function(){return 0===t(this).form().length}),e.not(this.element)):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){return"label"!==t||e?(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),this.element[0].disabled=e,void 0):(this.refresh(),void 0)):void 0},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio,t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),t=this.element[0].disabled,null!=t&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var s="iconPosition"!==e,n=s?this.options.iconPosition:i,o="top"===n||"bottom"===n;this.icon?s&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),s&&this._addClass(this.icon,null,i),this._attachIcon(n),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(n))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),t.uiBackCompat!==!1&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){return"text"===t?(this._super("showLabel",e),void 0):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments),void 0)}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),t.ui.button,t.extend(t.ui,{datepicker:{version:"1.12.1"}});var m;t.extend(s.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return a(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var s=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.on("focus",this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,o){var r,h,l,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),a(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+c,l/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),m===n&&(m=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,o,r,h,l=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):l?"all"===i?t.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),a(l.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,r)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),l),this._autoSize(l),this._setDate(l,o),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var s,n,o,r,h,l,c;s=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==s&&(t.datepicker._curInst.dpDiv.stop(!0,!0),s&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(s,"beforeShow"),o=n?n.apply(e,[e,s]):{},o!==!1&&(a(s.settings,o),s.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(s),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),h={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(s),h=t.datepicker._checkOffset(s,h,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),s.inline||(l=t.datepicker._get(s,"showAnim"),c=t.datepicker._get(s,"duration"),s.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?s.dpDiv.show(l,t.datepicker._get(s,"showOptions"),c):s.dpDiv[l||"show"](l?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s))
}},_updateDatepicker:function(e){this.maxRows=4,m=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],a=17,r=e.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,o,a,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),a=i.substring(h).match(o);if(!a)throw"Missing number at position "+h;return h+=a[0].length,parseInt(a[0],10)},k=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],h+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+h},x=function(){if(i.charAt(h)!==e.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;e.length>n;n++)if(b)"'"!==e.charAt(n)||y("'")?x():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":k("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=k("M",p,f);break;case"y":g=w("y");break;case"@":r=new Date(w("@")),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(i.length>h&&(a=i.substr(h),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),v>-1)for(m=1,_=v;;){if(o=this._getDaysInMonth(g,m-1),o>=_)break;m++,_-=o}if(r=this._daylightSavingAdjust(new Date(g,m-1,_)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,I,T,P,M,S,H,z,O,A,N,W,E,F,L,R=new Date,B=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),$=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=Q&&Q>e?Q:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-$,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+$,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:B,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,C=0;U[1]>C;C++){if(D=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),I=" ui-corner-all",T="",X){if(T+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:T+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:T+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:T+=" ui-datepicker-group-middle",I=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,Q,J,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",P=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,P+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[M]+"'>"+p[M]+"</span></th>";for(T+=P+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),H=(this._getFirstDayOfMonth(te,Z)-c+7)%7,z=Math.ceil((H+S)/7),O=X?this.maxRows>z?this.maxRows:z:z,this.maxRows=O,A=this._daylightSavingAdjust(new Date(te,Z,1-H)),N=0;O>N;N++){for(T+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(A)+"</td>":"",w=0;7>w;w++)E=m?m.apply(t.input?t.input[0]:null,[A]):[!0,""],F=A.getMonth()!==Z,L=F&&!v||!E[0]||Q&&Q>A||J&&A>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(A.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===A.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+E[1]+(A.getTime()===G.getTime()?" "+this._currentClass:"")+(A.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!E[2]?"":" title='"+E[2].replace(/'/g,"&#39;")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+A.getMonth()+"' data-year='"+A.getFullYear()+"'")+">"+(F&&!_?"&#xa0;":L?"<span class='ui-state-default'>"+A.getDate()+"</span>":"<a class='ui-state-default"+(A.getTime()===B.getTime()?" ui-state-highlight":"")+(A.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+A.getDate()+"</a>")+"</td>",A.setDate(A.getDate()+1),A=this._daylightSavingAdjust(A);T+=W+"</tr>"}Z++,Z>11&&(Z=0,te++),T+="</tbody></table>"+(X?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=T}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&_?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!_)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new s,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker,t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var _=!1;t(document).on("mouseup",function(){_=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!_){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),_=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,_=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blurActiveElement(e),this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]),s=t(e.target);s.closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}
},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(h=this.originalPageX),"x"===a.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&"HTML"!==a.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+a.offsetHeight-e.pageY<n.scrollSensitivity?a.scrollTop=o=a.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+a.offsetWidth-e.pageX<n.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(r).scrollTop()<n.scrollSensitivity?o=t(r).scrollTop(t(r).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<n.scrollSensitivity&&(o=t(r).scrollTop(t(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(r).scrollLeft()<n.scrollSensitivity?o=t(r).scrollLeft(t(r).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<n.scrollSensitivity&&(o=t(r).scrollLeft(t(r).scrollLeft()+n.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,o,a,r,h,l,c,u,d,p,f=s.options,g=f.snapTolerance,m=i.offset.left,_=m+s.helperProportions.width,v=i.offset.top,b=v+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--)h=s.snapElements[d].left-s.margins.left,l=h+s.snapElements[d].width,c=s.snapElements[d].top-s.margins.top,u=c+s.snapElements[d].height,h-g>_||m>l+g||c-g>b||v>u+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=g>=Math.abs(c-b),o=g>=Math.abs(u-v),a=g>=Math.abs(h-_),r=g>=Math.abs(l-m),n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||o||a||r,"outer"!==f.snapMode&&(n=g>=Math.abs(c-v),o=g>=Math.abs(u-b),a=g>=Math.abs(h-m),r=g>=Math.abs(l-_),n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(n=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("<div>"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,g=s.maxWidth&&p>s.maxWidth,m=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),g&&(p-=l),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog
},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,n);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),s=!0),s&&!i&&this._trigger("focus",e),s},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]),i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),void 0;if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){n.trigger("focus")}),e.preventDefault()):(this._delay(function(){s.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this._removeClass(this.uiDialog,"ui-dialog-buttons"),void 0):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,o={icon:s.icon,iconPosition:s.iconPosition,showLabel:s.showLabel,icons:s.icons,text:s.text},delete s.click,delete s.icon,delete s.iconPosition,delete s.showLabel,delete s.icons,"boolean"==typeof s.text&&delete s.text,t("<button></button>",s).button(o).appendTo(e.uiButtonSet).on("click",function(){n.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){i._addClass(t(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){var a=o.offset.left-i.document.scrollLeft(),r=o.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" "+"top"+(r>=0?"+":"")+r,of:i.window},i._removeClass(t(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){i._addClass(t(this),"ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){var a=i.uiDialog.offset(),r=a.left-i.document.scrollLeft(),h=a.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(h>=0?"+":"")+h,of:i.window},i._removeClass(t(this),"ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,s=!1,n={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,i){var s,n,o=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&(s=o.is(":data(ui-draggable)"),s&&!i&&o.draggable("destroy"),!s&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(n=o.is(":data(ui-resizable)"),n&&!i&&o.resizable("destroy"),n&&"string"==typeof i&&o.resizable("option","handles",i),n||i===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),t.ui.dialog,t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],void 0):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&v(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var v=t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,s,n){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,r=o+e.helperProportions.width,h=a+e.helperProportions.height,l=i.offset.left,c=i.offset.top,u=l+i.proportions().width,d=c+i.proportions().height;switch(s){case"fit":return o>=l&&u>=r&&a>=c&&d>=h;case"intersect":return o+e.helperProportions.width/2>l&&u>r-e.helperProportions.width/2&&a+e.helperProportions.height/2>c&&d>h-e.helperProportions.height/2;case"pointer":return t(n.pageY,c,i.proportions().height)&&t(n.pageX,l,i.proportions().width);case"touch":return(a>=c&&d>=a||h>=c&&d>=h||c>a&&h>d)&&(o>=l&&u>=o||r>=l&&u>=r||l>o&&r>u);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&v(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=v(e,this,this.options.tolerance,i),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===n}),o.length&&(s=t(o[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},t.uiBackCompat!==!1&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),t.ui.droppable,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),void 0)},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),s=i.offset(),n={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:n.left,top:n.top,right:n.left+i.outerWidth(),bottom:n.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),i._removeClass(n.$element,s?"ui-unselecting":"ui-selected")._addClass(n.$element,s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===n.tolerance?l=!(c.left>r||o>c.right||c.top>h||a>c.bottom):"fit"===n.tolerance&&(l=c.left>o&&r>c.right&&c.top>a&&h>c.bottom),l?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,s=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(s).appendTo(this.button),this.options.width!==!1&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var s=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&s.index!==e.focusIndex&&(e._trigger("focus",t,{item:s}),e.isOpen||e._select(s,t)),e.focusIndex=s.index,e.button.attr("aria-activedescendant",e.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var s=this,n="";t.each(i,function(i,o){var a;o.optgroup!==n&&(a=t("<li>",{text:o.optgroup}),s._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),n=o.optgroup),s._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var s=t("<li>"),n=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(s,null,"ui-state-disabled"),this._setText(n,i.label),s.append(n).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),n+=":not(.ui-state-disabled)"),s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](n).eq(-1):i[t+"All"](n).eq(0),s.length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;return t===!1?(this.button.css("width",""),void 0):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t),void 0)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,s=[];e.each(function(e,n){s.push(i._parseOption(t(n),e))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1
},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.round((t-e)/i)*i;t=s+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),i=this._start(e,a),i===!1))return}switch(o=this.options.step,s=n=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,a,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),o=s&&n;return o?(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1)):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s],this.document[0]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&h.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i],this.document[0]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]);return e._addClass(n,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td>&#160;</td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,a,r,h,l,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,c=d.floating||this._isFloating(this.currentItem),a=c?"left":"top",r=c?"width":"height",u=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[a],l=!1,e[u]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(e[u]-h)&&(n=Math.abs(e[u]-h),o=this.items[s],this.direction=l?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;
this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);null!=n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var e=this.element[0]===t.ui.safeActiveElement(this.document[0]);e||(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,s,n;return"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,this.element.val(this._format(i)),void 0):(("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(s=this.buttons.first().find(".ui-icon"),this._removeClass(s,null,this.options.icons.up),this._addClass(s,null,e.up),n=this.buttons.last().find(".ui-icon"),this._removeClass(n,null,this.options.icons.down),this._addClass(n,null,e.down)),this._super(t,e),void 0)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:r(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null===t?!1:t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:r(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:r(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:r(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:r(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(r(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),t.uiBackCompat!==!1&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),t.ui.spinner,t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,s;i=e.href.replace(t,""),s=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return e.hash.length>1&&i===s}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){return t(n).attr("aria-controls")===s?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=i?!1:0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e),void 0)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,s){var n,o,a,r=t(s).uniqueId().attr("id"),h=t(s).closest("li"),l=h.attr("aria-controls");e._isLocal(s)?(n=s.hash,a=n.substring(1),o=e.element.find(e._sanitizeSelector(n))):(a=h.attr("aria-controls")||t({}).uniqueId()[0].id,n="#"+a,o=e.element.find(n),o.length||(o=e._createPanel(a),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":a,"aria-labelledby":r}),o.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,s,n;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),n=0;s=this.tabs[n];n++)i=t(s),e===!0||-1!==t.inArray(n,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,e===!0)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){o._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){o._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;i!==!1&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(i!==!0){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,n=this.tabs.eq(e),o=n.find(".ui-tabs-anchor"),a=this._getPanelForTab(n),r={tab:n,panel:a},h=function(t,e){"abort"===e&&s.panels.stop(!1,!0),s._removeClass(n,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,n){setTimeout(function(){a.html(t),s._trigger("load",i,r),h(n,e)},1)}).fail(function(t,e){setTimeout(function(){h(t,e)},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.uiBackCompat!==!1&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),t.ui.tabs,t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var s=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);return e.is("[title]")?e.data("ui-tooltip-title",e.attr("title")).removeAttr("title"):void 0}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s||s.nodeType||s.jquery?this._open(e,t,s):(i=s.call(t[0],function(i){n._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),i&&this._open(e,t,i),void 0)},_open:function(e,i,s){function n(t){l.of=t,a.is(":hidden")||a.position(l)}var o,a,r,h,l=t.extend({},this.options.position);if(s){if(o=this._find(i))return o.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),a=o.tooltip,this._addDescribedBy(i,a.attr("id")),a.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),h=t("<div>").html(a.find(".ui-tooltip-content").html()),h.removeAttr("name").find("[name]").removeAttr("name"),h.removeAttr("id").find("[id]").removeAttr("id"),h.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:n}),n(e)):a.position(t.extend({of:i},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){a.is(":visible")&&(n(l.of),clearInterval(r))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,i){var s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);return o?(i=o.tooltip,o.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),s=t("<div>").appendTo(i),n=i.uniqueId().attr("id");return this._addClass(s,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),t.uiBackCompat!==!1&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip});;
/* rank:50standard - minify:ok. vendor_bundled/vendor/twitter/bootstrap/dist/js/bootstrap.js */
if(typeof jQuery==='undefined'){throw new Error('Bootstrap\'s JavaScript requires jQuery')}+function($){'use strict';var version=$.fn.jquery.split(' ')[0].split('.')
if((version[0]<2&&version[1]<9)||(version[0]==1&&version[1]==9&&version[2]<1)||(version[0]>3)){throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')}}(jQuery);+function($){'use strict';function transitionEnd(){var el=document.createElement('bootstrap')
var transEndEventNames={WebkitTransition:'webkitTransitionEnd',MozTransition:'transitionend',OTransition:'oTransitionEnd otransitionend',transition:'transitionend'}
for(var name in transEndEventNames){if(el.style[name]!==undefined){return{end:transEndEventNames[name]}}}
return!1}
$.fn.emulateTransitionEnd=function(duration){var called=!1
var $el=this
$(this).one('bsTransitionEnd',function(){called=!0})
var callback=function(){if(!called)$($el).trigger($.support.transition.end)}
setTimeout(callback,duration)
return this}
$(function(){$.support.transition=transitionEnd()
if(!$.support.transition)return
$.event.special.bsTransitionEnd={bindType:$.support.transition.end,delegateType:$.support.transition.end,handle:function(e){if($(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}})}(jQuery);+function($){'use strict';var dismiss='[data-dismiss="alert"]'
var Alert=function(el){$(el).on('click',dismiss,this.close)}
Alert.VERSION='3.3.7'
Alert.TRANSITION_DURATION=150
Alert.prototype.close=function(e){var $this=$(this)
var selector=$this.attr('data-target')
if(!selector){selector=$this.attr('href')
selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')}
var $parent=$(selector==='#'?[]:selector)
if(e)e.preventDefault()
if(!$parent.length){$parent=$this.closest('.alert')}
$parent.trigger(e=$.Event('close.bs.alert'))
if(e.isDefaultPrevented())return
$parent.removeClass('in')
function removeElement(){$parent.detach().trigger('closed.bs.alert').remove()}
$.support.transition&&$parent.hasClass('fade')?$parent.one('bsTransitionEnd',removeElement).emulateTransitionEnd(Alert.TRANSITION_DURATION):removeElement()}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.alert')
if(!data)$this.data('bs.alert',(data=new Alert(this)))
if(typeof option=='string')data[option].call($this)})}
var old=$.fn.alert
$.fn.alert=Plugin
$.fn.alert.Constructor=Alert
$.fn.alert.noConflict=function(){$.fn.alert=old
return this}
$(document).on('click.bs.alert.data-api',dismiss,Alert.prototype.close)}(jQuery);+function($){'use strict';var Button=function(element,options){this.$element=$(element)
this.options=$.extend({},Button.DEFAULTS,options)
this.isLoading=!1}
Button.VERSION='3.3.7'
Button.DEFAULTS={loadingText:'loading...'}
Button.prototype.setState=function(state){var d='disabled'
var $el=this.$element
var val=$el.is('input')?'val':'html'
var data=$el.data()
state+='Text'
if(data.resetText==null)$el.data('resetText',$el[val]())
setTimeout($.proxy(function(){$el[val](data[state]==null?this.options[state]:data[state])
if(state=='loadingText'){this.isLoading=!0
$el.addClass(d).attr(d,d).prop(d,!0)}else if(this.isLoading){this.isLoading=!1
$el.removeClass(d).removeAttr(d).prop(d,!1)}},this),0)}
Button.prototype.toggle=function(){var changed=!0
var $parent=this.$element.closest('[data-toggle="buttons"]')
if($parent.length){var $input=this.$element.find('input')
if($input.prop('type')=='radio'){if($input.prop('checked'))changed=!1
$parent.find('.active').removeClass('active')
this.$element.addClass('active')}else if($input.prop('type')=='checkbox'){if(($input.prop('checked'))!==this.$element.hasClass('active'))changed=!1
this.$element.toggleClass('active')}
$input.prop('checked',this.$element.hasClass('active'))
if(changed)$input.trigger('change')}else{this.$element.attr('aria-pressed',!this.$element.hasClass('active'))
this.$element.toggleClass('active')}}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.button')
var options=typeof option=='object'&&option
if(!data)$this.data('bs.button',(data=new Button(this,options)))
if(option=='toggle')data.toggle()
else if(option)data.setState(option)})}
var old=$.fn.button
$.fn.button=Plugin
$.fn.button.Constructor=Button
$.fn.button.noConflict=function(){$.fn.button=old
return this}
$(document).on('click.bs.button.data-api','[data-toggle^="button"]',function(e){var $btn=$(e.target).closest('.btn')
Plugin.call($btn,'toggle')
if(!($(e.target).is('input[type="radio"], input[type="checkbox"]'))){e.preventDefault()
if($btn.is('input,button'))$btn.trigger('focus')
else $btn.find('input:visible,button:visible').first().trigger('focus')}}).on('focus.bs.button.data-api blur.bs.button.data-api','[data-toggle^="button"]',function(e){$(e.target).closest('.btn').toggleClass('focus',/^focus(in)?$/.test(e.type))})}(jQuery);+function($){'use strict';var Carousel=function(element,options){this.$element=$(element)
this.$indicators=this.$element.find('.carousel-indicators')
this.options=options
this.paused=null
this.sliding=null
this.interval=null
this.$active=null
this.$items=null
this.options.keyboard&&this.$element.on('keydown.bs.carousel',$.proxy(this.keydown,this))
this.options.pause=='hover'&&!('ontouchstart' in document.documentElement)&&this.$element.on('mouseenter.bs.carousel',$.proxy(this.pause,this)).on('mouseleave.bs.carousel',$.proxy(this.cycle,this))}
Carousel.VERSION='3.3.7'
Carousel.TRANSITION_DURATION=600
Carousel.DEFAULTS={interval:5000,pause:'hover',wrap:!0,keyboard:!0}
Carousel.prototype.keydown=function(e){if(/input|textarea/i.test(e.target.tagName))return
switch(e.which){case 37:this.prev();break
case 39:this.next();break
default:return}
e.preventDefault()}
Carousel.prototype.cycle=function(e){e||(this.paused=!1)
this.interval&&clearInterval(this.interval)
this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval))
return this}
Carousel.prototype.getItemIndex=function(item){this.$items=item.parent().children('.item')
return this.$items.index(item||this.$active)}
Carousel.prototype.getItemForDirection=function(direction,active){var activeIndex=this.getItemIndex(active)
var willWrap=(direction=='prev'&&activeIndex===0)||(direction=='next'&&activeIndex==(this.$items.length-1))
if(willWrap&&!this.options.wrap)return active
var delta=direction=='prev'?-1:1
var itemIndex=(activeIndex+delta)%this.$items.length
return this.$items.eq(itemIndex)}
Carousel.prototype.to=function(pos){var that=this
var activeIndex=this.getItemIndex(this.$active=this.$element.find('.item.active'))
if(pos>(this.$items.length-1)||pos<0)return
if(this.sliding)return this.$element.one('slid.bs.carousel',function(){that.to(pos)})
if(activeIndex==pos)return this.pause().cycle()
return this.slide(pos>activeIndex?'next':'prev',this.$items.eq(pos))}
Carousel.prototype.pause=function(e){e||(this.paused=!0)
if(this.$element.find('.next, .prev').length&&$.support.transition){this.$element.trigger($.support.transition.end)
this.cycle(!0)}
this.interval=clearInterval(this.interval)
return this}
Carousel.prototype.next=function(){if(this.sliding)return
return this.slide('next')}
Carousel.prototype.prev=function(){if(this.sliding)return
return this.slide('prev')}
Carousel.prototype.slide=function(type,next){var $active=this.$element.find('.item.active')
var $next=next||this.getItemForDirection(type,$active)
var isCycling=this.interval
var direction=type=='next'?'left':'right'
var that=this
if($next.hasClass('active'))return(this.sliding=!1)
var relatedTarget=$next[0]
var slideEvent=$.Event('slide.bs.carousel',{relatedTarget:relatedTarget,direction:direction})
this.$element.trigger(slideEvent)
if(slideEvent.isDefaultPrevented())return
this.sliding=!0
isCycling&&this.pause()
if(this.$indicators.length){this.$indicators.find('.active').removeClass('active')
var $nextIndicator=$(this.$indicators.children()[this.getItemIndex($next)])
$nextIndicator&&$nextIndicator.addClass('active')}
var slidEvent=$.Event('slid.bs.carousel',{relatedTarget:relatedTarget,direction:direction})
if($.support.transition&&this.$element.hasClass('slide')){$next.addClass(type)
$next[0].offsetWidth
$active.addClass(direction)
$next.addClass(direction)
$active.one('bsTransitionEnd',function(){$next.removeClass([type,direction].join(' ')).addClass('active')
$active.removeClass(['active',direction].join(' '))
that.sliding=!1
setTimeout(function(){that.$element.trigger(slidEvent)},0)}).emulateTransitionEnd(Carousel.TRANSITION_DURATION)}else{$active.removeClass('active')
$next.addClass('active')
this.sliding=!1
this.$element.trigger(slidEvent)}
isCycling&&this.cycle()
return this}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.carousel')
var options=$.extend({},Carousel.DEFAULTS,$this.data(),typeof option=='object'&&option)
var action=typeof option=='string'?option:options.slide
if(!data)$this.data('bs.carousel',(data=new Carousel(this,options)))
if(typeof option=='number')data.to(option)
else if(action)data[action]()
else if(options.interval)data.pause().cycle()})}
var old=$.fn.carousel
$.fn.carousel=Plugin
$.fn.carousel.Constructor=Carousel
$.fn.carousel.noConflict=function(){$.fn.carousel=old
return this}
var clickHandler=function(e){var href
var $this=$(this)
var $target=$($this.attr('data-target')||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,''))
if(!$target.hasClass('carousel'))return
var options=$.extend({},$target.data(),$this.data())
var slideIndex=$this.attr('data-slide-to')
if(slideIndex)options.interval=!1
Plugin.call($target,options)
if(slideIndex){$target.data('bs.carousel').to(slideIndex)}
e.preventDefault()}
$(document).on('click.bs.carousel.data-api','[data-slide]',clickHandler).on('click.bs.carousel.data-api','[data-slide-to]',clickHandler)
$(window).on('load',function(){$('[data-ride="carousel"]').each(function(){var $carousel=$(this)
Plugin.call($carousel,$carousel.data())})})}(jQuery);+function($){'use strict';var Collapse=function(element,options){this.$element=$(element)
this.options=$.extend({},Collapse.DEFAULTS,options)
this.$trigger=$('[data-toggle="collapse"][href="#'+element.id+'"],'+'[data-toggle="collapse"][data-target="#'+element.id+'"]')
this.transitioning=null
if(this.options.parent){this.$parent=this.getParent()}else{this.addAriaAndCollapsedClass(this.$element,this.$trigger)}
if(this.options.toggle)this.toggle()}
Collapse.VERSION='3.3.7'
Collapse.TRANSITION_DURATION=350
Collapse.DEFAULTS={toggle:!0}
Collapse.prototype.dimension=function(){var hasWidth=this.$element.hasClass('width')
return hasWidth?'width':'height'}
Collapse.prototype.show=function(){if(this.transitioning||this.$element.hasClass('in'))return
var activesData
var actives=this.$parent&&this.$parent.children('.panel').children('.in, .collapsing')
if(actives&&actives.length){activesData=actives.data('bs.collapse')
if(activesData&&activesData.transitioning)return}
var startEvent=$.Event('show.bs.collapse')
this.$element.trigger(startEvent)
if(startEvent.isDefaultPrevented())return
if(actives&&actives.length){Plugin.call(actives,'hide')
activesData||actives.data('bs.collapse',null)}
var dimension=this.dimension()
this.$element.removeClass('collapse').addClass('collapsing')[dimension](0).attr('aria-expanded',!0)
this.$trigger.removeClass('collapsed').attr('aria-expanded',!0)
this.transitioning=1
var complete=function(){this.$element.removeClass('collapsing').addClass('collapse in')[dimension]('')
this.transitioning=0
this.$element.trigger('shown.bs.collapse')}
if(!$.support.transition)return complete.call(this)
var scrollSize=$.camelCase(['scroll',dimension].join('-'))
this.$element.one('bsTransitionEnd',$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])}
Collapse.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass('in'))return
var startEvent=$.Event('hide.bs.collapse')
this.$element.trigger(startEvent)
if(startEvent.isDefaultPrevented())return
var dimension=this.dimension()
this.$element[dimension](this.$element[dimension]())[0].offsetHeight
this.$element.addClass('collapsing').removeClass('collapse in').attr('aria-expanded',!1)
this.$trigger.addClass('collapsed').attr('aria-expanded',!1)
this.transitioning=1
var complete=function(){this.transitioning=0
this.$element.removeClass('collapsing').addClass('collapse').trigger('hidden.bs.collapse')}
if(!$.support.transition)return complete.call(this)
this.$element[dimension](0).one('bsTransitionEnd',$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION)}
Collapse.prototype.toggle=function(){this[this.$element.hasClass('in')?'hide':'show']()}
Collapse.prototype.getParent=function(){return $(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each($.proxy(function(i,element){var $element=$(element)
this.addAriaAndCollapsedClass(getTargetFromTrigger($element),$element)},this)).end()}
Collapse.prototype.addAriaAndCollapsedClass=function($element,$trigger){var isOpen=$element.hasClass('in')
$element.attr('aria-expanded',isOpen)
$trigger.toggleClass('collapsed',!isOpen).attr('aria-expanded',isOpen)}
function getTargetFromTrigger($trigger){var href
var target=$trigger.attr('data-target')||(href=$trigger.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'')
return $(target)}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.collapse')
var options=$.extend({},Collapse.DEFAULTS,$this.data(),typeof option=='object'&&option)
if(!data&&options.toggle&&/show|hide/.test(option))options.toggle=!1
if(!data)$this.data('bs.collapse',(data=new Collapse(this,options)))
if(typeof option=='string')data[option]()})}
var old=$.fn.collapse
$.fn.collapse=Plugin
$.fn.collapse.Constructor=Collapse
$.fn.collapse.noConflict=function(){$.fn.collapse=old
return this}
$(document).on('click.bs.collapse.data-api','[data-toggle="collapse"]',function(e){var $this=$(this)
if(!$this.attr('data-target'))e.preventDefault()
var $target=getTargetFromTrigger($this)
var data=$target.data('bs.collapse')
var option=data?'toggle':$this.data()
Plugin.call($target,option)})}(jQuery);+function($){'use strict';var backdrop='.dropdown-backdrop'
var toggle='[data-toggle="dropdown"]'
var Dropdown=function(element){$(element).on('click.bs.dropdown',this.toggle)}
Dropdown.VERSION='3.3.7'
function getParent($this){var selector=$this.attr('data-target')
if(!selector){selector=$this.attr('href')
selector=selector&&/#[A-Za-z]/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,'')}
var $parent=selector&&$(selector)
return $parent&&$parent.length?$parent:$this.parent()}
function clearMenus(e){if(e&&e.which===3)return
$(backdrop).remove()
$(toggle).each(function(){var $this=$(this)
var $parent=getParent($this)
var relatedTarget={relatedTarget:this}
if(!$parent.hasClass('open'))return
if(e&&e.type=='click'&&/input|textarea/i.test(e.target.tagName)&&$.contains($parent[0],e.target))return
$parent.trigger(e=$.Event('hide.bs.dropdown',relatedTarget))
if(e.isDefaultPrevented())return
$this.attr('aria-expanded','false')
$parent.removeClass('open').trigger($.Event('hidden.bs.dropdown',relatedTarget))})}
Dropdown.prototype.toggle=function(e){var $this=$(this)
if($this.is('.disabled, :disabled'))return
var $parent=getParent($this)
var isActive=$parent.hasClass('open')
clearMenus()
if(!isActive){if('ontouchstart' in document.documentElement&&!$parent.closest('.navbar-nav').length){$(document.createElement('div')).addClass('dropdown-backdrop').insertAfter($(this)).on('click',clearMenus)}
var relatedTarget={relatedTarget:this}
$parent.trigger(e=$.Event('show.bs.dropdown',relatedTarget))
if(e.isDefaultPrevented())return
$this.trigger('focus').attr('aria-expanded','true')
$parent.toggleClass('open').trigger($.Event('shown.bs.dropdown',relatedTarget))}
return!1}
Dropdown.prototype.keydown=function(e){if(!/(38|40|27|32)/.test(e.which)||/input|textarea/i.test(e.target.tagName))return
var $this=$(this)
e.preventDefault()
e.stopPropagation()
if($this.is('.disabled, :disabled'))return
var $parent=getParent($this)
var isActive=$parent.hasClass('open')
if(!isActive&&e.which!=27||isActive&&e.which==27){if(e.which==27)$parent.find(toggle).trigger('focus')
return $this.trigger('click')}
var desc=' li:not(.disabled):visible a'
var $items=$parent.find('.dropdown-menu'+desc)
if(!$items.length)return
var index=$items.index(e.target)
if(e.which==38&&index>0)index--
if(e.which==40&&index<$items.length-1)index++
if(!~index)index=0
$items.eq(index).trigger('focus')}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.dropdown')
if(!data)$this.data('bs.dropdown',(data=new Dropdown(this)))
if(typeof option=='string')data[option].call($this)})}
var old=$.fn.dropdown
$.fn.dropdown=Plugin
$.fn.dropdown.Constructor=Dropdown
$.fn.dropdown.noConflict=function(){$.fn.dropdown=old
return this}
$(document).on('click.bs.dropdown.data-api',clearMenus).on('click.bs.dropdown.data-api','.dropdown form',function(e){e.stopPropagation()}).on('click.bs.dropdown.data-api',toggle,Dropdown.prototype.toggle).on('keydown.bs.dropdown.data-api',toggle,Dropdown.prototype.keydown).on('keydown.bs.dropdown.data-api','.dropdown-menu',Dropdown.prototype.keydown)}(jQuery);+function($){'use strict';var Modal=function(element,options){this.options=options
this.$body=$(document.body)
this.$element=$(element)
this.$dialog=this.$element.find('.modal-dialog')
this.$backdrop=null
this.isShown=null
this.originalBodyPad=null
this.scrollbarWidth=0
this.ignoreBackdropClick=!1
if(this.options.remote){this.$element.find('.modal-content').load(this.options.remote,$.proxy(function(){this.$element.trigger('loaded.bs.modal')},this))}}
Modal.VERSION='3.3.7'
Modal.TRANSITION_DURATION=300
Modal.BACKDROP_TRANSITION_DURATION=150
Modal.DEFAULTS={backdrop:!0,keyboard:!0,show:!0}
Modal.prototype.toggle=function(_relatedTarget){return this.isShown?this.hide():this.show(_relatedTarget)}
Modal.prototype.show=function(_relatedTarget){var that=this
var e=$.Event('show.bs.modal',{relatedTarget:_relatedTarget})
this.$element.trigger(e)
if(this.isShown||e.isDefaultPrevented())return
this.isShown=!0
this.checkScrollbar()
this.setScrollbar()
this.$body.addClass('modal-open')
this.escape()
this.resize()
this.$element.on('click.dismiss.bs.modal','[data-dismiss="modal"]',$.proxy(this.hide,this))
this.$dialog.on('mousedown.dismiss.bs.modal',function(){that.$element.one('mouseup.dismiss.bs.modal',function(e){if($(e.target).is(that.$element))that.ignoreBackdropClick=!0})})
this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass('fade')
if(!that.$element.parent().length){that.$element.appendTo(that.$body)}
that.$element.show().scrollTop(0)
that.adjustDialog()
if(transition){that.$element[0].offsetWidth}
that.$element.addClass('in')
that.enforceFocus()
var e=$.Event('shown.bs.modal',{relatedTarget:_relatedTarget})
transition?that.$dialog.one('bsTransitionEnd',function(){that.$element.trigger('focus').trigger(e)}).emulateTransitionEnd(Modal.TRANSITION_DURATION):that.$element.trigger('focus').trigger(e)})}
Modal.prototype.hide=function(e){if(e)e.preventDefault()
e=$.Event('hide.bs.modal')
this.$element.trigger(e)
if(!this.isShown||e.isDefaultPrevented())return
this.isShown=!1
this.escape()
this.resize()
$(document).off('focusin.bs.modal')
this.$element.removeClass('in').off('click.dismiss.bs.modal').off('mouseup.dismiss.bs.modal')
this.$dialog.off('mousedown.dismiss.bs.modal')
$.support.transition&&this.$element.hasClass('fade')?this.$element.one('bsTransitionEnd',$.proxy(this.hideModal,this)).emulateTransitionEnd(Modal.TRANSITION_DURATION):this.hideModal()}
Modal.prototype.enforceFocus=function(){$(document).off('focusin.bs.modal').on('focusin.bs.modal',$.proxy(function(e){if(document!==e.target&&this.$element[0]!==e.target&&!this.$element.has(e.target).length){this.$element.trigger('focus')}},this))}
Modal.prototype.escape=function(){if(this.isShown&&this.options.keyboard){this.$element.on('keydown.dismiss.bs.modal',$.proxy(function(e){e.which==27&&this.hide()},this))}else if(!this.isShown){this.$element.off('keydown.dismiss.bs.modal')}}
Modal.prototype.resize=function(){if(this.isShown){$(window).on('resize.bs.modal',$.proxy(this.handleUpdate,this))}else{$(window).off('resize.bs.modal')}}
Modal.prototype.hideModal=function(){var that=this
this.$element.hide()
this.backdrop(function(){that.$body.removeClass('modal-open')
that.resetAdjustments()
that.resetScrollbar()
that.$element.trigger('hidden.bs.modal')})}
Modal.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove()
this.$backdrop=null}
Modal.prototype.backdrop=function(callback){var that=this
var animate=this.$element.hasClass('fade')?'fade':''
if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate
this.$backdrop=$(document.createElement('div')).addClass('modal-backdrop '+animate).appendTo(this.$body)
this.$element.on('click.dismiss.bs.modal',$.proxy(function(e){if(this.ignoreBackdropClick){this.ignoreBackdropClick=!1
return}
if(e.target!==e.currentTarget)return
this.options.backdrop=='static'?this.$element[0].focus():this.hide()},this))
if(doAnimate)this.$backdrop[0].offsetWidth
this.$backdrop.addClass('in')
if(!callback)return
doAnimate?this.$backdrop.one('bsTransitionEnd',callback).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callback()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass('in')
var callbackRemove=function(){that.removeBackdrop()
callback&&callback()}
$.support.transition&&this.$element.hasClass('fade')?this.$backdrop.one('bsTransitionEnd',callbackRemove).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callbackRemove()}else if(callback){callback()}}
Modal.prototype.handleUpdate=function(){this.adjustDialog()}
Modal.prototype.adjustDialog=function(){var modalIsOverflowing=this.$element[0].scrollHeight>document.documentElement.clientHeight
this.$element.css({paddingLeft:!this.bodyIsOverflowing&&modalIsOverflowing?this.scrollbarWidth:'',paddingRight:this.bodyIsOverflowing&&!modalIsOverflowing?this.scrollbarWidth:''})}
Modal.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:'',paddingRight:''})}
Modal.prototype.checkScrollbar=function(){var fullWindowWidth=window.innerWidth
if(!fullWindowWidth){var documentElementRect=document.documentElement.getBoundingClientRect()
fullWindowWidth=documentElementRect.right-Math.abs(documentElementRect.left)}
this.bodyIsOverflowing=document.body.clientWidth<fullWindowWidth
this.scrollbarWidth=this.measureScrollbar()}
Modal.prototype.setScrollbar=function(){var bodyPad=parseInt((this.$body.css('padding-right')||0),10)
this.originalBodyPad=document.body.style.paddingRight||''
if(this.bodyIsOverflowing)this.$body.css('padding-right',bodyPad+this.scrollbarWidth)}
Modal.prototype.resetScrollbar=function(){this.$body.css('padding-right',this.originalBodyPad)}
Modal.prototype.measureScrollbar=function(){var scrollDiv=document.createElement('div')
scrollDiv.className='modal-scrollbar-measure'
this.$body.append(scrollDiv)
var scrollbarWidth=scrollDiv.offsetWidth-scrollDiv.clientWidth
this.$body[0].removeChild(scrollDiv)
return scrollbarWidth}
function Plugin(option,_relatedTarget){return this.each(function(){var $this=$(this)
var data=$this.data('bs.modal')
var options=$.extend({},Modal.DEFAULTS,$this.data(),typeof option=='object'&&option)
if(!data)$this.data('bs.modal',(data=new Modal(this,options)))
if(typeof option=='string')data[option](_relatedTarget)
else if(options.show)data.show(_relatedTarget)})}
var old=$.fn.modal
$.fn.modal=Plugin
$.fn.modal.Constructor=Modal
$.fn.modal.noConflict=function(){$.fn.modal=old
return this}
$(document).on('click.bs.modal.data-api','[data-toggle="modal"]',function(e){var $this=$(this)
var href=$this.attr('href')
var $target=$($this.attr('data-target')||(href&&href.replace(/.*(?=#[^\s]+$)/,'')))
var option=$target.data('bs.modal')?'toggle':$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data())
if($this.is('a'))e.preventDefault()
$target.one('show.bs.modal',function(showEvent){if(showEvent.isDefaultPrevented())return
$target.one('hidden.bs.modal',function(){$this.is(':visible')&&$this.trigger('focus')})})
Plugin.call($target,option,this)})}(jQuery);+function($){'use strict';var Tooltip=function(element,options){this.type=null
this.options=null
this.enabled=null
this.timeout=null
this.hoverState=null
this.$element=null
this.inState=null
this.init('tooltip',element,options)}
Tooltip.VERSION='3.3.7'
Tooltip.TRANSITION_DURATION=150
Tooltip.DEFAULTS={animation:!0,placement:'top',selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:'hover focus',title:'',delay:0,html:!1,container:!1,viewport:{selector:'body',padding:0}}
Tooltip.prototype.init=function(type,element,options){this.enabled=!0
this.type=type
this.$element=$(element)
this.options=this.getOptions(options)
this.$viewport=this.options.viewport&&$($.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):(this.options.viewport.selector||this.options.viewport))
this.inState={click:!1,hover:!1,focus:!1}
if(this.$element[0]instanceof document.constructor&&!this.options.selector){throw new Error('`selector` option must be specified when initializing '+this.type+' on the window.document object!')}
var triggers=this.options.trigger.split(' ')
for(var i=triggers.length;i--;){var trigger=triggers[i]
if(trigger=='click'){this.$element.on('click.'+this.type,this.options.selector,$.proxy(this.toggle,this))}else if(trigger!='manual'){var eventIn=trigger=='hover'?'mouseenter':'focusin'
var eventOut=trigger=='hover'?'mouseleave':'focusout'
this.$element.on(eventIn+'.'+this.type,this.options.selector,$.proxy(this.enter,this))
this.$element.on(eventOut+'.'+this.type,this.options.selector,$.proxy(this.leave,this))}}
this.options.selector?(this._options=$.extend({},this.options,{trigger:'manual',selector:''})):this.fixTitle()}
Tooltip.prototype.getDefaults=function(){return Tooltip.DEFAULTS}
Tooltip.prototype.getOptions=function(options){options=$.extend({},this.getDefaults(),this.$element.data(),options)
if(options.delay&&typeof options.delay=='number'){options.delay={show:options.delay,hide:options.delay}}
return options}
Tooltip.prototype.getDelegateOptions=function(){var options={}
var defaults=this.getDefaults()
this._options&&$.each(this._options,function(key,value){if(defaults[key]!=value)options[key]=value})
return options}
Tooltip.prototype.enter=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data('bs.'+this.type)
if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions())
$(obj.currentTarget).data('bs.'+this.type,self)}
if(obj instanceof $.Event){self.inState[obj.type=='focusin'?'focus':'hover']=!0}
if(self.tip().hasClass('in')||self.hoverState=='in'){self.hoverState='in'
return}
clearTimeout(self.timeout)
self.hoverState='in'
if(!self.options.delay||!self.options.delay.show)return self.show()
self.timeout=setTimeout(function(){if(self.hoverState=='in')self.show()},self.options.delay.show)}
Tooltip.prototype.isInStateTrue=function(){for(var key in this.inState){if(this.inState[key])return!0}
return!1}
Tooltip.prototype.leave=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data('bs.'+this.type)
if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions())
$(obj.currentTarget).data('bs.'+this.type,self)}
if(obj instanceof $.Event){self.inState[obj.type=='focusout'?'focus':'hover']=!1}
if(self.isInStateTrue())return
clearTimeout(self.timeout)
self.hoverState='out'
if(!self.options.delay||!self.options.delay.hide)return self.hide()
self.timeout=setTimeout(function(){if(self.hoverState=='out')self.hide()},self.options.delay.hide)}
Tooltip.prototype.show=function(){var e=$.Event('show.bs.'+this.type)
if(this.hasContent()&&this.enabled){this.$element.trigger(e)
var inDom=$.contains(this.$element[0].ownerDocument.documentElement,this.$element[0])
if(e.isDefaultPrevented()||!inDom)return
var that=this
var $tip=this.tip()
var tipId=this.getUID(this.type)
this.setContent()
$tip.attr('id',tipId)
this.$element.attr('aria-describedby',tipId)
if(this.options.animation)$tip.addClass('fade')
var placement=typeof this.options.placement=='function'?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement
var autoToken=/\s?auto?\s?/i
var autoPlace=autoToken.test(placement)
if(autoPlace)placement=placement.replace(autoToken,'')||'top'
$tip.detach().css({top:0,left:0,display:'block'}).addClass(placement).data('bs.'+this.type,this)
this.options.container?$tip.appendTo(this.options.container):$tip.insertAfter(this.$element)
this.$element.trigger('inserted.bs.'+this.type)
var pos=this.getPosition()
var actualWidth=$tip[0].offsetWidth
var actualHeight=$tip[0].offsetHeight
if(autoPlace){var orgPlacement=placement
var viewportDim=this.getPosition(this.$viewport)
placement=placement=='bottom'&&pos.bottom+actualHeight>viewportDim.bottom?'top':placement=='top'&&pos.top-actualHeight<viewportDim.top?'bottom':placement=='right'&&pos.right+actualWidth>viewportDim.width?'left':placement=='left'&&pos.left-actualWidth<viewportDim.left?'right':placement
$tip.removeClass(orgPlacement).addClass(placement)}
var calculatedOffset=this.getCalculatedOffset(placement,pos,actualWidth,actualHeight)
this.applyPlacement(calculatedOffset,placement)
var complete=function(){var prevHoverState=that.hoverState
that.$element.trigger('shown.bs.'+that.type)
that.hoverState=null
if(prevHoverState=='out')that.leave(that)}
$.support.transition&&this.$tip.hasClass('fade')?$tip.one('bsTransitionEnd',complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete()}}
Tooltip.prototype.applyPlacement=function(offset,placement){var $tip=this.tip()
var width=$tip[0].offsetWidth
var height=$tip[0].offsetHeight
var marginTop=parseInt($tip.css('margin-top'),10)
var marginLeft=parseInt($tip.css('margin-left'),10)
if(isNaN(marginTop))marginTop=0
if(isNaN(marginLeft))marginLeft=0
offset.top+=marginTop
offset.left+=marginLeft
$.offset.setOffset($tip[0],$.extend({using:function(props){$tip.css({top:Math.round(props.top),left:Math.round(props.left)})}},offset),0)
$tip.addClass('in')
var actualWidth=$tip[0].offsetWidth
var actualHeight=$tip[0].offsetHeight
if(placement=='top'&&actualHeight!=height){offset.top=offset.top+height-actualHeight}
var delta=this.getViewportAdjustedDelta(placement,offset,actualWidth,actualHeight)
if(delta.left)offset.left+=delta.left
else offset.top+=delta.top
var isVertical=/top|bottom/.test(placement)
var arrowDelta=isVertical?delta.left*2-width+actualWidth:delta.top*2-height+actualHeight
var arrowOffsetPosition=isVertical?'offsetWidth':'offsetHeight'
$tip.offset(offset)
this.replaceArrow(arrowDelta,$tip[0][arrowOffsetPosition],isVertical)}
Tooltip.prototype.replaceArrow=function(delta,dimension,isVertical){this.arrow().css(isVertical?'left':'top',50*(1-delta/dimension)+'%').css(isVertical?'top':'left','')}
Tooltip.prototype.setContent=function(){var $tip=this.tip()
var title=this.getTitle()
$tip.find('.tooltip-inner')[this.options.html?'html':'text'](title)
$tip.removeClass('fade in top bottom left right')}
Tooltip.prototype.hide=function(callback){var that=this
var $tip=$(this.$tip)
var e=$.Event('hide.bs.'+this.type)
function complete(){if(that.hoverState!='in')$tip.detach()
if(that.$element){that.$element.removeAttr('aria-describedby').trigger('hidden.bs.'+that.type)}
callback&&callback()}
this.$element.trigger(e)
if(e.isDefaultPrevented())return
$tip.removeClass('in')
$.support.transition&&$tip.hasClass('fade')?$tip.one('bsTransitionEnd',complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete()
this.hoverState=null
return this}
Tooltip.prototype.fixTitle=function(){var $e=this.$element
if($e.attr('title')||typeof $e.attr('data-original-title')!='string'){$e.attr('data-original-title',$e.attr('title')||'').attr('title','')}}
Tooltip.prototype.hasContent=function(){return this.getTitle()}
Tooltip.prototype.getPosition=function($element){$element=$element||this.$element
var el=$element[0]
var isBody=el.tagName=='BODY'
var elRect=el.getBoundingClientRect()
if(elRect.width==null){elRect=$.extend({},elRect,{width:elRect.right-elRect.left,height:elRect.bottom-elRect.top})}
var isSvg=window.SVGElement&&el instanceof window.SVGElement
var elOffset=isBody?{top:0,left:0}:(isSvg?null:$element.offset())
var scroll={scroll:isBody?document.documentElement.scrollTop||document.body.scrollTop:$element.scrollTop()}
var outerDims=isBody?{width:$(window).width(),height:$(window).height()}:null
return $.extend({},elRect,scroll,outerDims,elOffset)}
Tooltip.prototype.getCalculatedOffset=function(placement,pos,actualWidth,actualHeight){return placement=='bottom'?{top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2}:placement=='top'?{top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2}:placement=='left'?{top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth}:{top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}}
Tooltip.prototype.getViewportAdjustedDelta=function(placement,pos,actualWidth,actualHeight){var delta={top:0,left:0}
if(!this.$viewport)return delta
var viewportPadding=this.options.viewport&&this.options.viewport.padding||0
var viewportDimensions=this.getPosition(this.$viewport)
if(/right|left/.test(placement)){var topEdgeOffset=pos.top-viewportPadding-viewportDimensions.scroll
var bottomEdgeOffset=pos.top+viewportPadding-viewportDimensions.scroll+actualHeight
if(topEdgeOffset<viewportDimensions.top){delta.top=viewportDimensions.top-topEdgeOffset}else if(bottomEdgeOffset>viewportDimensions.top+viewportDimensions.height){delta.top=viewportDimensions.top+viewportDimensions.height-bottomEdgeOffset}}else{var leftEdgeOffset=pos.left-viewportPadding
var rightEdgeOffset=pos.left+viewportPadding+actualWidth
if(leftEdgeOffset<viewportDimensions.left){delta.left=viewportDimensions.left-leftEdgeOffset}else if(rightEdgeOffset>viewportDimensions.right){delta.left=viewportDimensions.left+viewportDimensions.width-rightEdgeOffset}}
return delta}
Tooltip.prototype.getTitle=function(){var title
var $e=this.$element
var o=this.options
title=$e.attr('data-original-title')||(typeof o.title=='function'?o.title.call($e[0]):o.title)
return title}
Tooltip.prototype.getUID=function(prefix){do prefix+=~~(Math.random()*1000000)
while(document.getElementById(prefix))
return prefix}
Tooltip.prototype.tip=function(){if(!this.$tip){this.$tip=$(this.options.template)
if(this.$tip.length!=1){throw new Error(this.type+' `template` option must consist of exactly 1 top-level element!')}}
return this.$tip}
Tooltip.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find('.tooltip-arrow'))}
Tooltip.prototype.enable=function(){this.enabled=!0}
Tooltip.prototype.disable=function(){this.enabled=!1}
Tooltip.prototype.toggleEnabled=function(){this.enabled=!this.enabled}
Tooltip.prototype.toggle=function(e){var self=this
if(e){self=$(e.currentTarget).data('bs.'+this.type)
if(!self){self=new this.constructor(e.currentTarget,this.getDelegateOptions())
$(e.currentTarget).data('bs.'+this.type,self)}}
if(e){self.inState.click=!self.inState.click
if(self.isInStateTrue())self.enter(self)
else self.leave(self)}else{self.tip().hasClass('in')?self.leave(self):self.enter(self)}}
Tooltip.prototype.destroy=function(){var that=this
clearTimeout(this.timeout)
this.hide(function(){that.$element.off('.'+that.type).removeData('bs.'+that.type)
if(that.$tip){that.$tip.detach()}
that.$tip=null
that.$arrow=null
that.$viewport=null
that.$element=null})}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.tooltip')
var options=typeof option=='object'&&option
if(!data&&/destroy|hide/.test(option))return
if(!data)$this.data('bs.tooltip',(data=new Tooltip(this,options)))
if(typeof option=='string')data[option]()})}
var old=$.fn.tooltip
$.fn.tooltip=Plugin
$.fn.tooltip.Constructor=Tooltip
$.fn.tooltip.noConflict=function(){$.fn.tooltip=old
return this}}(jQuery);+function($){'use strict';var Popover=function(element,options){this.init('popover',element,options)}
if(!$.fn.tooltip)throw new Error('Popover requires tooltip.js')
Popover.VERSION='3.3.7'
Popover.DEFAULTS=$.extend({},$.fn.tooltip.Constructor.DEFAULTS,{placement:'right',trigger:'click',content:'',template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'})
Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype)
Popover.prototype.constructor=Popover
Popover.prototype.getDefaults=function(){return Popover.DEFAULTS}
Popover.prototype.setContent=function(){var $tip=this.tip()
var title=this.getTitle()
var content=this.getContent()
$tip.find('.popover-title')[this.options.html?'html':'text'](title)
$tip.find('.popover-content').children().detach().end()[this.options.html?(typeof content=='string'?'html':'append'):'text'](content)
$tip.removeClass('fade top bottom left right in')
if(!$tip.find('.popover-title').html())$tip.find('.popover-title').hide()}
Popover.prototype.hasContent=function(){return this.getTitle()||this.getContent()}
Popover.prototype.getContent=function(){var $e=this.$element
var o=this.options
return $e.attr('data-content')||(typeof o.content=='function'?o.content.call($e[0]):o.content)}
Popover.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find('.arrow'))}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.popover')
var options=typeof option=='object'&&option
if(!data&&/destroy|hide/.test(option))return
if(!data)$this.data('bs.popover',(data=new Popover(this,options)))
if(typeof option=='string')data[option]()})}
var old=$.fn.popover
$.fn.popover=Plugin
$.fn.popover.Constructor=Popover
$.fn.popover.noConflict=function(){$.fn.popover=old
return this}}(jQuery);+function($){'use strict';function ScrollSpy(element,options){this.$body=$(document.body)
this.$scrollElement=$(element).is(document.body)?$(window):$(element)
this.options=$.extend({},ScrollSpy.DEFAULTS,options)
this.selector=(this.options.target||'')+' .nav li > a'
this.offsets=[]
this.targets=[]
this.activeTarget=null
this.scrollHeight=0
this.$scrollElement.on('scroll.bs.scrollspy',$.proxy(this.process,this))
this.refresh()
this.process()}
ScrollSpy.VERSION='3.3.7'
ScrollSpy.DEFAULTS={offset:10}
ScrollSpy.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)}
ScrollSpy.prototype.refresh=function(){var that=this
var offsetMethod='offset'
var offsetBase=0
this.offsets=[]
this.targets=[]
this.scrollHeight=this.getScrollHeight()
if(!$.isWindow(this.$scrollElement[0])){offsetMethod='position'
offsetBase=this.$scrollElement.scrollTop()}
this.$body.find(this.selector).map(function(){var $el=$(this)
var href=$el.data('target')||$el.attr('href')
var $href=/^#./.test(href)&&$(href)
return($href&&$href.length&&$href.is(':visible')&&[[$href[offsetMethod]().top+offsetBase,href]])||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){that.offsets.push(this[0])
that.targets.push(this[1])})}
ScrollSpy.prototype.process=function(){var scrollTop=this.$scrollElement.scrollTop()+this.options.offset
var scrollHeight=this.getScrollHeight()
var maxScroll=this.options.offset+scrollHeight-this.$scrollElement.height()
var offsets=this.offsets
var targets=this.targets
var activeTarget=this.activeTarget
var i
if(this.scrollHeight!=scrollHeight){this.refresh()}
if(scrollTop>=maxScroll){return activeTarget!=(i=targets[targets.length-1])&&this.activate(i)}
if(activeTarget&&scrollTop<offsets[0]){this.activeTarget=null
return this.clear()}
for(i=offsets.length;i--;){activeTarget!=targets[i]&&scrollTop>=offsets[i]&&(offsets[i+1]===undefined||scrollTop<offsets[i+1])&&this.activate(targets[i])}}
ScrollSpy.prototype.activate=function(target){this.activeTarget=target
this.clear()
var selector=this.selector+'[data-target="'+target+'"],'+this.selector+'[href="'+target+'"]'
var active=$(selector).parents('li').addClass('active')
if(active.parent('.dropdown-menu').length){active=active.closest('li.dropdown').addClass('active')}
active.trigger('activate.bs.scrollspy')}
ScrollSpy.prototype.clear=function(){$(this.selector).parentsUntil(this.options.target,'.active').removeClass('active')}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.scrollspy')
var options=typeof option=='object'&&option
if(!data)$this.data('bs.scrollspy',(data=new ScrollSpy(this,options)))
if(typeof option=='string')data[option]()})}
var old=$.fn.scrollspy
$.fn.scrollspy=Plugin
$.fn.scrollspy.Constructor=ScrollSpy
$.fn.scrollspy.noConflict=function(){$.fn.scrollspy=old
return this}
$(window).on('load.bs.scrollspy.data-api',function(){$('[data-spy="scroll"]').each(function(){var $spy=$(this)
Plugin.call($spy,$spy.data())})})}(jQuery);+function($){'use strict';var Tab=function(element){this.element=$(element)}
Tab.VERSION='3.3.7'
Tab.TRANSITION_DURATION=150
Tab.prototype.show=function(){var $this=this.element
var $ul=$this.closest('ul:not(.dropdown-menu)')
var selector=$this.data('target')
if(!selector){selector=$this.attr('href')
selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')}
if($this.parent('li').hasClass('active'))return
var $previous=$ul.find('.active:last a')
var hideEvent=$.Event('hide.bs.tab',{relatedTarget:$this[0]})
var showEvent=$.Event('show.bs.tab',{relatedTarget:$previous[0]})
$previous.trigger(hideEvent)
$this.trigger(showEvent)
if(showEvent.isDefaultPrevented()||hideEvent.isDefaultPrevented())return
var $target=$(selector)
this.activate($this.closest('li'),$ul)
this.activate($target,$target.parent(),function(){$previous.trigger({type:'hidden.bs.tab',relatedTarget:$this[0]})
$this.trigger({type:'shown.bs.tab',relatedTarget:$previous[0]})})}
Tab.prototype.activate=function(element,container,callback){var $active=container.find('> .active')
var transition=callback&&$.support.transition&&($active.length&&$active.hasClass('fade')||!!container.find('> .fade').length)
function next(){$active.removeClass('active').find('> .dropdown-menu > .active').removeClass('active').end().find('[data-toggle="tab"]').attr('aria-expanded',!1)
element.addClass('active').find('[data-toggle="tab"]').attr('aria-expanded',!0)
if(transition){element[0].offsetWidth
element.addClass('in')}else{element.removeClass('fade')}
if(element.parent('.dropdown-menu').length){element.closest('li.dropdown').addClass('active').end().find('[data-toggle="tab"]').attr('aria-expanded',!0)}
callback&&callback()}
$active.length&&transition?$active.one('bsTransitionEnd',next).emulateTransitionEnd(Tab.TRANSITION_DURATION):next()
$active.removeClass('in')}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.tab')
if(!data)$this.data('bs.tab',(data=new Tab(this)))
if(typeof option=='string')data[option]()})}
var old=$.fn.tab
$.fn.tab=Plugin
$.fn.tab.Constructor=Tab
$.fn.tab.noConflict=function(){$.fn.tab=old
return this}
var clickHandler=function(e){e.preventDefault()
Plugin.call($(this),'show')}
$(document).on('click.bs.tab.data-api','[data-toggle="tab"]',clickHandler).on('click.bs.tab.data-api','[data-toggle="pill"]',clickHandler)}(jQuery);+function($){'use strict';var Affix=function(element,options){this.options=$.extend({},Affix.DEFAULTS,options)
this.$target=$(this.options.target).on('scroll.bs.affix.data-api',$.proxy(this.checkPosition,this)).on('click.bs.affix.data-api',$.proxy(this.checkPositionWithEventLoop,this))
this.$element=$(element)
this.affixed=null
this.unpin=null
this.pinnedOffset=null
this.checkPosition()}
Affix.VERSION='3.3.7'
Affix.RESET='affix affix-top affix-bottom'
Affix.DEFAULTS={offset:0,target:window}
Affix.prototype.getState=function(scrollHeight,height,offsetTop,offsetBottom){var scrollTop=this.$target.scrollTop()
var position=this.$element.offset()
var targetHeight=this.$target.height()
if(offsetTop!=null&&this.affixed=='top')return scrollTop<offsetTop?'top':!1
if(this.affixed=='bottom'){if(offsetTop!=null)return(scrollTop+this.unpin<=position.top)?!1:'bottom'
return(scrollTop+targetHeight<=scrollHeight-offsetBottom)?!1:'bottom'}
var initializing=this.affixed==null
var colliderTop=initializing?scrollTop:position.top
var colliderHeight=initializing?targetHeight:height
if(offsetTop!=null&&scrollTop<=offsetTop)return 'top'
if(offsetBottom!=null&&(colliderTop+colliderHeight>=scrollHeight-offsetBottom))return 'bottom'
return!1}
Affix.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset
this.$element.removeClass(Affix.RESET).addClass('affix')
var scrollTop=this.$target.scrollTop()
var position=this.$element.offset()
return(this.pinnedOffset=position.top-scrollTop)}
Affix.prototype.checkPositionWithEventLoop=function(){setTimeout($.proxy(this.checkPosition,this),1)}
Affix.prototype.checkPosition=function(){if(!this.$element.is(':visible'))return
var height=this.$element.height()
var offset=this.options.offset
var offsetTop=offset.top
var offsetBottom=offset.bottom
var scrollHeight=Math.max($(document).height(),$(document.body).height())
if(typeof offset!='object')offsetBottom=offsetTop=offset
if(typeof offsetTop=='function')offsetTop=offset.top(this.$element)
if(typeof offsetBottom=='function')offsetBottom=offset.bottom(this.$element)
var affix=this.getState(scrollHeight,height,offsetTop,offsetBottom)
if(this.affixed!=affix){if(this.unpin!=null)this.$element.css('top','')
var affixType='affix'+(affix?'-'+affix:'')
var e=$.Event(affixType+'.bs.affix')
this.$element.trigger(e)
if(e.isDefaultPrevented())return
this.affixed=affix
this.unpin=affix=='bottom'?this.getPinnedOffset():null
this.$element.removeClass(Affix.RESET).addClass(affixType).trigger(affixType.replace('affix','affixed')+'.bs.affix')}
if(affix=='bottom'){this.$element.offset({top:scrollHeight-height-offsetBottom})}}
function Plugin(option){return this.each(function(){var $this=$(this)
var data=$this.data('bs.affix')
var options=typeof option=='object'&&option
if(!data)$this.data('bs.affix',(data=new Affix(this,options)))
if(typeof option=='string')data[option]()})}
var old=$.fn.affix
$.fn.affix=Plugin
$.fn.affix.Constructor=Affix
$.fn.affix.noConflict=function(){$.fn.affix=old
return this}
$(window).on('load',function(){$('[data-spy="affix"]').each(function(){var $spy=$(this)
var data=$spy.data()
data.offset=data.offset||{}
if(data.offsetBottom!=null)data.offset.bottom=data.offsetBottom
if(data.offsetTop!=null)data.offset.top=data.offsetTop
Plugin.call($spy,data)})})}(jQuery);
/* rank:50standard - minify:ok. lib/jquery_tiki/tiki-bootstrapmodalfix.js */
$.fn.modal.Constructor.prototype.enforceFocus=function(){$(document).off('focusin.bs.modal').on('focusin.bs.modal',$.proxy(function(e){if(this.$element[0]!==e.target&&!this.$element.has(e.target).length&&!$(e.target.parentNode).hasClass('cke_dialog_ui_input_select')&&!$(e.target.parentNode).hasClass('cke_dialog_ui_input_text')&&!$(e.target).hasClass('ui-datepicker-month')&&!$(e.target).hasClass('ui-datepicker-year')){this.$element.trigger('focus')}},this))};
/* rank:50standard - minify:ok. lib/jquery_tiki/iconsets.js */
(function($){$.fn.getIcon=function(name){var icon=jqueryTiki.iconset.icons[name],$output=$(),attr="";if(!icon){if(jqueryTiki.iconset.defaults.indexOf(name)>-1){icon={id:name}}}
if(icon){icon.tag=icon.tag||jqueryTiki.iconset.tag;icon.prepend=icon.prepend||jqueryTiki.iconset.prepend;icon.append=icon.append||jqueryTiki.iconset.append;$output=$("<"+icon.tag+">");attr=icon.prepend+icon.id+icon.append;if(icon.tag==="img"){$output.attr("src",attr);$output=$("<span>").addClass("icon").addClass("icon-"+name).append($output)}else{$output.addClass(attr).addClass("icon").addClass("icon-"+name)}}else{$output=$().getIcon("warning");console.log("iconset: icon not found:"+name)}
return $output};$.fn.setIcon=function(name){return $(this).replaceWith($(this).getIcon(name))}})(jQuery);
/* rank:50standard - minify:ok. lib/tiki-js.js */
function tr(str){if(typeof lang[str]=='string'){return lang[str]}else{return str}}
var lang={};function browser(){var b=navigator.appName;if(b=="Netscape"){this.b="ns"}
else{this.b=b}
this.version=navigator.appVersion;this.v=parseInt(this.version,10);this.ns=(this.b=="ns"&&this.v>=5);this.op=(navigator.userAgent.indexOf('Opera')>-1);this.safari=(navigator.userAgent.indexOf('Safari')>-1);this.op7=(navigator.userAgent.indexOf('Opera')>-1&&this.v>=7);this.ie56=(this.version.indexOf('MSIE 5')>-1||this.version.indexOf('MSIE 6')>-1);this.ie567=(this.version.indexOf('MSIE 5')>-1||this.version.indexOf('MSIE 6')>-1||this.version.indexOf('MSIE 7')>-1);this.iewin=(this.ie56&&navigator.userAgent.indexOf('Windows')>-1);this.iewin7=(this.ie567&&navigator.userAgent.indexOf('Windows')>-1);this.iemac=(this.ie56&&navigator.userAgent.indexOf('Mac')>-1);this.moz=(navigator.userAgent.indexOf('Mozilla')>-1);this.moz13=(navigator.userAgent.indexOf('Mozilla')>-1&&navigator.userAgent.indexOf('1.3')>-1);this.oldmoz=(navigator.userAgent.indexOf('Mozilla')>-1&&navigator.userAgent.indexOf('1.4')>-1||navigator.userAgent.indexOf('Mozilla')>-1&&navigator.userAgent.indexOf('1.5')>-1||navigator.userAgent.indexOf('Mozilla')>-1&&navigator.userAgent.indexOf('1.6')>-1);this.ns6=(navigator.userAgent.indexOf('Netscape6')>-1);this.docom=(this.ie56||this.ns||this.iewin||this.op||this.iemac||this.safari||this.moz||this.oldmoz||this.ns6)}
function toggle_dynamic_var(name){var displayContainer=document.getElementById('dyn_'+name+'_display');var editContainer=document.getElementById('dyn_'+name+'_edit');var form=document.createElement('form');form.setAttribute('method','post');form.setAttribute('name','dyn_vars');form.style.display="inline";editContainer.parentNode.insertBefore(form,editContainer);form.appendChild(editContainer);if(displayContainer.style.display=="none"){editContainer.style.display="none";displayContainer.style.display="inline"}else{displayContainer.style.display="none";editContainer.style.display="inline"}}
function chgArtType(){var articleType=document.getElementById('articletype').value;var typeProperties=articleTypes[articleType];var propertyList=['show_topline','y','show_subtitle','y','show_linkto','y','show_author','y','use_ratings','y','heading_only','n','show_image_caption','y','show_pre_publ','y','show_post_expire','y','show_image','y','show_expdate','y'];if(typeof articleCustomAttributes!='undefined'){propertyList=propertyList.concat(articleCustomAttributes)}
var l=propertyList.length,property,value,display;for(var i=0;i<l;i++){property=propertyList[i++];value=propertyList[i];if(typeProperties[property]==value||(!typeProperties[property]&&value=="n")){display=""}else{display="none"}
if(document.getElementById(property)){document.getElementById(property).style.display=display}else{var j=1;while(document.getElementById(property+'_'+j)){document.getElementById(property+'_'+j).style.display=display;j++}}}}
function toggleSpan(id){$("#"+id).toggle()}
function toggleBlock(id){$("#"+id).toggle()}
function toggleTrTd(id){$("#"+id).toggle()}
function changeText(el,newText){if(el.innerText){el.innerText=newText}else if(el.firstChild&&el.firstChild.nodeValue){el.firstChild.nodeValue=newText}}
function toggleToc(){var toc=document.getElementById('toc').getElementsByTagName('ul')[0];if(toc&&toc.style.display=='none'){toc.style.display='block'}else{toc.style.display='none'}}
function chgTrkFld(f,o){var opt=0;document.getElementById('z').style.display="none";document.getElementById('zDescription').style.display="";document.getElementById('zStaticText').style.display="none";document.getElementById('zStaticTextToolbars').style.display="none";for(var i=0;i<f.length;i++){var c=f.charAt(i);if(document.getElementById(c)){var ichoiceParent=document.getElementById('itemChoicesRow');var ichoice=document.getElementById(c+'itemChoices');if(c==o){document.getElementById(c).style.display="";document.getElementById('z').style.display="block";if(c=='S'){document.getElementById('zDescription').style.display="none";document.getElementById('zStaticText').style.display="";document.getElementById('zStaticTextToolbars').style.display=""}
if(ichoice){ichoice.style.display="";ichoiceParent.style.display=""}else{ichoiceParent.style.display="none"}}else{document.getElementById(c).style.display="none";if(ichoice){ichoice.style.display="none"}}}}}
function chgTrkLingual(item){document.getElementById("multilabelRow").style.display=(item=='t'||item=='a')?'':'none'}
function multitoggle(f,o){for(var i=0;i<f.length;i++){if(document.getElementById('fid'+f[i])){if(f[i]==o){document.getElementById('fid'+f[i]).style.display="block"}else{document.getElementById('fid'+f[i]).style.display="none"}}}}
function setMenuCon(foo){var it=foo.split(",");document.getElementById('menu_url').value=it[0];document.getElementById('menu_name').value=it[1];if(it[2]){document.getElementById('menu_section').value=it[2]}else{document.getElementById('menu_section').value=''}
if(it[3]){document.getElementById('menu_perm').value=it[3]}else{document.getElementById('menu_perm').value=''}}
function genPass(w1){var lower,upper,num,other,l,p,pstr,i,letter,j,temp;lower='abcdefghijklmnopqrstuvwxyz';upper='ABCDEFGHIJKLMNOPQRSTUVWXYZ';num='0123456789';other='_$%#!@*+';l=8;p=[];for(i=0;i<l;i++){if(i<2){letter=lower.charAt(Math.round(Math.random()*(lower.length-1)))}else if(i<4){letter=upper.charAt(Math.round(Math.random()*(upper.length-1)))}else if(i<6){letter=num.charAt(Math.round(Math.random()*(num.length-1)))}else{letter=other.charAt(Math.round(Math.random()*(other.length-1)))}
p[i]=letter}
for(i=p.length-1;i>0;i--){j=Math.floor(Math.random()*(i+1));temp=p[i];p[i]=p[j];p[j]=temp}
pstr=p.join('');document.getElementById(w1).value=pstr}
function setUserModule(foo1){document.getElementById('usermoduledata').value=foo1}
function replaceLimon(vec){document.getElementById(vec[0]).value=document.getElementById(vec[0]).value.replace(vec[1],vec[2])}
function setSelectionRange(textarea,selectionStart,selectionEnd){var $textareaEditor=syntaxHighlighter.get($(textarea));if($textareaEditor){syntaxHighlighter.setSelection($textareaEditor,selectionStart,selectionEnd);return}
$(textarea).selection(selectionStart,selectionEnd)}
function getTASelection(textarea){var $textareaEditor=syntaxHighlighter.get($(textarea));if($textareaEditor){return $textareaEditor.getSelection()}
var ta_id=$(textarea).attr("id"),r,cked,output;if(cked=typeof CKEDITOR!=='undefined'?CKEDITOR.instances[ta_id]:null){return cked.getSelection().getSelectedText()}else{if(typeof $(textarea).attr("selectionStartSaved")!='undefined'&&$(textarea).attr("selectionStartSaved")){return textarea.value.substring($(textarea).attr("selectionStartSaved"),$(textarea).attr("selectionEndSaved"))}else if((typeof textarea!='undefined')&&(typeof textarea.selectionStart!='undefined')){return textarea.value.substring(textarea.selectionStart,textarea.selectionEnd)}else{r=document.selection.createRange();return r.text}}}
var ieFirstTimeInsertKludge=null;function storeTASelection(area_id){if(typeof CKEDITOR==='undefined'||typeof CKEDITOR.instances[area_id]==='undefined'){var $el=$("#"+area_id);var sel=$el.selection();$el.attr("selectionStartSaved",sel.start).attr("selectionEndSaved",sel.end).attr("scrollTopSaved",$el.attr("scrollTop"))}
if(ieFirstTimeInsertKludge===null){ieFirstTimeInsertKludge=!0}}
function setCaretToPos(textarea,pos){setSelectionRange(textarea,pos,pos)}
function getCaretPos(textarea){var $textareaEditor=syntaxHighlighter.get($(textarea));if($textareaEditor){var endPoint=$textareaEditor.cursorCoords();return(endPoint.x?endPoint.x:0)}
if(typeof textarea.selectionEnd!='undefined'){return textarea.selectionEnd}else if(document.selection){textarea.focus();var range=document.selection.createRange();if(range===null){return 0}
var re=textarea.createTextRange();var rc=re.duplicate();re.moveToBookmark(range.getBookmark());rc.setEndPoint('EndToStart',re);return rc.text.length?rc.text.length:0}else{return 0}}
function insertAt(elementId,replaceString,blockLevel,perLine,replaceSelection){var $textarea=$('#'+elementId);var $textareaEditor=syntaxHighlighter.get($textarea);var toBeReplaced=/text|page|area_id/g;var hiddenParents=$textarea.parents('fieldset:hidden:last');if(hiddenParents.length){hiddenParents.show()}
if($textareaEditor){syntaxHighlighter.insertAt($textareaEditor,replaceString,perLine,blockLevel,replaceSelection);return}else if(typeof CKEDITOR!=='undefined'&&CKEDITOR.instances[elementId]){var cked=CKEDITOR.instances[elementId];if(cked){var isPlugin=replaceString.match(/^\s?\{/m);if(isPlugin){isPlugin=replaceString.match(/\}\s?$/m)}
isPlugin=isPlugin&&isPlugin.length>0;var sel=cked.getSelection(),rng;if(sel){rng=sel.getRanges();if(rng.length){rng=rng[0]}}
var plugin_el,com;if(isPlugin&&rng&&!rng.collapsed){com=cked.getSelection().getStartElement();if(typeof com!=='undefined'&&com&&com.$){while(!$(com.$).hasClass("tiki_plugin")&&com.$.nextSibling&&com.$!==rng.endContainer.$){com=new CKEDITOR.dom.element(com.$.nextSibling);if($(com.$).hasClass("tiki_plugin")||$(com.$).find(".tiki_plugin").length===0){break}}
if(!$(com.$).hasClass("tiki_plugin")){plugin_el=$(com.$).find(".tiki_plugin");if(plugin_el.length==1){com=new CKEDITOR.dom.element(plugin_el[0])}else{plugin_el=$(com.$).parents(".tiki_plugin:last");if(plugin_el.length==1){com=new CKEDITOR.dom.element(plugin_el[0])}else{var plugin_type=replaceString.match(/^\s?\{([\w]+)/);if(plugin_type.length>1){plugin_type=plugin_type[1].toLowerCase()}
plugin_el=$(com.$).find("[plugin="+plugin_type+"].tiki_plugin");if(plugin_el.length==1){com=new CKEDITOR.dom.element(plugin_el[0])}else{}}}}}
if(com&&com.hasClass("tiki_plugin")){var html=cked.getData().replace(com.data("syntax"),replaceString);cked.setData(html);return}}
try{cked.insertText(replaceString)}catch(e){prompt(tr("Development notice: The editor selection has been lost, here is the text to insert."),replaceString);return}
if(typeof cked.reParse==="function"&&(isPlugin||replaceString.match(/^\s?\(\(.*?\)\)\s?$/)||replaceString.match(/^||.*||$/))){var bookmarks=cked.getSelection().createBookmarks2();cked.reParse();cked.getSelection().selectBookmarks(bookmarks)}}
return}
if(!$textarea.length&&elementId==="fgal_picker"){$(".cke_dialog_contents").find("input:first").val(replaceString.replace("&amp;","&"));return}else if($textarea.is(":input")&&elementId==="fgal_picker_id"){$textarea.val(replaceString);return}
$textarea.focus();var val=$textarea.val();var selection=$textarea.selection();var scrollTop=$textarea[0].scrollTop;if(selection.start===0&&selection.end===0&&typeof $textarea.attr("selectionStartSaved")!='undefined'){if($textarea.attr("selectionStartSaved")){selection.start=$textarea.attr("selectionStartSaved");selection.end=$textarea.attr("selectionEndSaved");if($textarea.attr("scrollTopSaved")){scrollTop=$textarea.attr("scrollTopSaved");$textarea.attr("scrollTopSaved","")}
$textarea.attr("selectionStartSaved","").attr("selectionEndSaved","")}else{selection.start=getCaretPos($textarea[0]);selection.end=selection.start}}
var lines,startoff=0,endoff=0;if($textarea[0].createTextRange&&$textarea[0].value!==val){val=$textarea[0].value;if(val.substring(selection.start,selection.start+1)==="\n"){selection.start++}
lines=val.substring(0,selection.start).match(/\r\n/g);if(lines){startoff-=lines.length}}
var selectionStart=selection.start;var selectionEnd=selection.end;if(blockLevel){selectionStart=val.lastIndexOf("\n",selectionStart-1)+1;var blockEnd=val.indexOf("\r",selectionEnd);if(blockEnd<0){selectionEnd=val.indexOf("\n",selectionEnd)}else{selectionEnd=blockEnd}
if(selectionEnd<0){selectionEnd=val.length}}
var newString='';if((selectionStart!=selectionEnd)&&!$textareaEditor){if(perLine){lines=val.substring(selectionStart,selectionEnd).split("\n");for(var k=0;lines.length>k;++k){if(lines[k].length!==0){newString+=replaceString.replace(toBeReplaced,lines[k])}
if(k!=lines.length-1){newString+="\n"}}}else{if(replaceSelection){newString=replaceString}else if(replaceString.match(toBeReplaced)){newString=replaceString.replace(toBeReplaced,val.substring(selectionStart,selectionEnd))}else{newString=replaceString+'\n'+val.substring(selectionStart,selectionEnd)}}
$textarea.val(val.substring(0,selectionStart)+newString+val.substring(selectionEnd));lines=newString.match(/\r\n/g);if(lines){endoff-=lines.length}
setSelectionRange($textarea[0],selectionStart+startoff,selectionStart+startoff+newString.length+endoff)}else{$textarea.val(val.substring(0,selectionStart)+replaceString+val.substring(selectionEnd));lines=replaceString.match(/\r\n/g);if(lines){endoff-=lines.length}
setCaretToPos($textarea[0],selectionStart+startoff+replaceString.length+endoff)}
$textarea.attr("scrollTop",scrollTop);if(this.iewin&&ieFirstTimeInsertKludge){setTimeout(function(){if(newString.length){setSelectionRange($textarea[0],parseInt(selectionStart,10)+parseInt(startoff,10),parseInt(selectionStart,10)+parseInt(startoff,10)+newString.length+parseInt(endoff,10))}
$textarea.attr("scrollTop",scrollTop)},1000);ieFirstTimeInsertKludge=!1}
if(hiddenParents.length){hiddenParents.hide()}
if(typeof auto_save==="function"){auto_save(elementId)}}
function setUserModuleFromCombo(id,textarea){document.getElementById(textarea).value=document.getElementById(textarea).value+document.getElementById(id).options[document.getElementById(id).selectedIndex].value}
function toggle(foo){var display=$("#"+foo).css('display');if(display=="none"){show(foo,!0,"menu")}else{if(display=="block"){hide(foo,!0,"menu")}else{show(foo,!0,"menu")}}}
function flip_thumbnail_status(id){var elem=document.getElementById(id);if(elem.className=='thumbnailcontener'){elem.className+=' thumbnailcontenerchecked'}else{elem.className='thumbnailcontener'}}
function flip_class(itemid,class1,class2){var elem=document.getElementById(itemid);if(elem&&typeof elem!='undefined'){elem.className=elem.className==class1?class2:class1;setCookie('flip_class_'+itemid,elem.className)}}
function tikitabs(focus,tabElement){var container,ofocus=focus;if(typeof tabElement==="undefined"){container=$(".tabset:first")}else{container=$(tabElement).parents(".tabset:first")}
if(focus>$("> .tabs .tabmark",container).length){focus=1}
while($("> .tabs .tabmark.tab"+focus+":first",container).is(":hidden")){focus++}
if($("> .tabs .tabmark.tab"+focus+":first",container).length===0){focus=ofocus}
$("> .tabs .tabmark:not(.tab"+focus+":first)",container).removeClass("tabactive");$("> .tabs .tabmark.tab"+focus+":first",container).addClass("tabactive");$("> .tabcontent:not(.content"+focus+":first)",container).hide();$("> .tabcontent.content"+focus+":first",container).show();setCookie($(".tabs:first",container).data("name"),focus,"tabs","session")}
function setfolderstate(foo,def,img,status){if(!status){status=getCookie(foo,"menu","o")}
if(!img){if(document.getElementsByName('icn'+foo)[0].src.search(/[\\\/]/)){img=document.getElementsByName('icn'+foo)[0].src.replace(/.*[\\\/]([^\\\/]*)$/,"$1")}else{img='folder.png'}}
var src=img;if(status=='c'){hide(foo,!1,"menu")}else{show(foo,!1,"menu")}
if(status=='c'&&def!='d'){src=src.replace(/^o/,'')}else if(status!='c'&&def=='d'&&src.indexOf('o')!==0){src='o'+img}
document.getElementsByName('icn'+foo)[0].src=document.getElementsByName('icn'+foo)[0].src.replace(/[^\\\/]*$/,src)}
function setheadingstate(foo){var status=getCookie(foo,"showhide_headings");var $foo=$("#"+foo);if(status=="o"){$foo.show();collapseSign("flipper"+foo)}else if(status=="c"){$foo.hide();expandSign("flipper"+foo)}}
function setsectionstate(foo,def,img,status){var src;if(!status){status=getCookie(foo,"menu","o")}
if(status=="o"){show(foo);if(img){src="o"+img}}else if(status!="c"&&def!='d'){show(foo);if(img){src="o"+img}}else{hide(foo);if(img){src=img}}
if(img&&document.getElementsByName('icn'+foo).length){document.getElementsByName('icn'+foo)[0].src=document.getElementsByName('icn'+foo)[0].src.replace(/[^\\\/]*$/,src)}}
function icntoggle(foo,img){var $icn=$("#icn"+foo);var src=$icn.attr("src");if(!src){src=""}
if(!img){if(src.search(/[\\\/]/)){img=src.replace(/.*[\\\/]([^\\\/]*)$/,"$1")}else{img='folder.png'}}
if($("#"+foo+":hidden").length){show(foo,!0,"menu");$icn.attr("src",src.replace(/[^\\\/]*$/,'o'+img))}else{hide(foo,!0,"menu");img=img.replace(/(^|\/|\\)o(.*)$/,'$1$2');$icn.attr("src",src.replace(/[^\\\/]*$/,img))}}
function icontoggle(foo,clicked){if($("#"+foo+":hidden").length){show(foo,!0,"menu")}else{hide(foo,!0,"menu")}
var id=clicked.id;$('#'+id+' .toggle-open').toggle();$('#'+id+' .toggle-closed').toggle();return!1}
function getHttpRequest(method,url,async)
{if(async===undefined){async=!1}
var request;if(window.XMLHttpRequest){request=new XMLHttpRequest()}else if(window.ActiveXObject)
{try
{request=new ActiveXObject("Microsoft.XMLHTTP")}
catch(ex)
{request=new ActiveXObject("MSXML2.XMLHTTP")}}
else{return!1}
if(!request){return!1}
request.open(method,url,async);return request}
function setSessionVar(name,value){var request=getHttpRequest("GET","tiki-cookie-jar.php?"+name+"="+tiki_encodeURIComponent(value));request.send('');if(tiki_cookie_jar){tiki_cookie_jar[name]=value}}
function setCookie(name,value,section,expires,path,domain,secure){if(getCookie(name,section)==value){return!0}
if(!expires){expires=new Date();expires.setFullYear(expires.getFullYear()+1)}
if(expires==="session"){expires=""}
if(typeof jqueryTiki!="undefined"&&jqueryTiki.no_cookie){var request=getHttpRequest("GET","tiki-cookie-jar.php?"+name+"="+encodeURIComponent(value));try{request.send('');tiki_cookie_jar[name]=value;return!0}
catch(ex){setCookieBrowser(name,value,section,expires,path,domain,secure);return!1}}
else{setCookieBrowser(name,value,section,expires,path,domain,secure);return!0}}
function setCookieBrowser(name,value,section,expires,path,domain,secure){if(section){var valSection=getCookie(section);var name2="@"+name+":";if(valSection){if(new RegExp(name2).test(valSection)){valSection=valSection.replace(new RegExp(name2+"[^@;]*"),name2+value)}else{valSection=valSection+name2+value}
setCookieBrowser(section,valSection,null,expires,path,domain,secure)}
else{valSection=name2+value;setCookieBrowser(section,valSection,null,expires,path,domain,secure)}}
else{var curCookie=name+"="+encodeURIComponent(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");document.cookie=curCookie}}
function getCookie(name,section,defval){if(typeof jqueryTiki!="undefined"&&jqueryTiki.no_cookie&&(window.XMLHttpRequest||window.ActiveXObject)&&typeof tiki_cookie_jar!="undefined"&&tiki_cookie_jar.length>0){if(typeof tiki_cookie_jar[name]=="undefined"){return defval}
return tiki_cookie_jar[name]}
else{return getCookieBrowser(name,section,defval)}}
function getCookieBrowser(name,section,defval){if(typeof defval==="undefined"){defval=null}
if(section){var valSection=getCookieBrowser(section);if(valSection){var name2="@"+name+":";var val=valSection.match(new RegExp(name2+"([^@;]*)"));if(val){return decodeURIComponent(val[1])}else{return defval}}else{return defval}}else{var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!==0){return defval}}else{begin+=2}
var end=document.cookie.indexOf(";",begin);if(end==-1){end=dc.length}
return decodeURIComponent(dc.substring(begin+prefix.length,end))}}
function deleteCookie(name,section,expires,path,domain,secure){if(section){var valSection=getCookieBrowser(section);var name2="@"+name+":";if(valSection){if(new RegExp(name2).test(valSection)){valSection=valSection.replace(new RegExp(name2+"[^@;]*"),"");setCookieBrowser(section,valSection,null,expires,path,domain,secure)}}}
else{document.cookie=name+"="+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT"}}
function fixDate(date){var base=new Date(0);var skew=base.getTime();if(skew>0){date.setTime(date.getTime()-skew)}}
function flipWithSign(foo){if(document.getElementById(foo).style.display=="none"){show(foo,!0,"showhide_headings");collapseSign("flipper"+foo)}else{hide(foo,!0,"showhide_headings");expandSign("flipper"+foo)}}
function setFlipWithSign(foo){if(getCookie(foo,"showhide_headings","o")=="o"){collapseSign("flipper"+foo);show(foo)}else{expandSign("flipper"+foo);hide(foo)}}
function expandSign(foo){if(document.getElementById(foo)){document.getElementById(foo).firstChild.nodeValue="[+]"}}
function collapseSign(foo){if(document.getElementById(foo)){document.getElementById(foo).firstChild.nodeValue="[-]"}}
function go(o){if(o.options[o.selectedIndex].value!==""){location.replace(o.options[o.selectedIndex].value);o.options[o.selectedIndex]=1}
return!1}
function targetBlank(url,mode){var features='menubar=yes,toolbar=yes,location=yes,directories=yes,fullscreen=no,titlebar=yes,hotkeys=yes,status=yes,scrollbars=yes,resizable=yes';switch(mode){case 'nw':break;case 'popup':features='menubar=no,toolbar=no,location=no,directories=no,fullscreen=no,titlebar=no,hotkeys=no,status=no,scrollbars=yes,resizable=yes';break;default:break}
window.open(url,'_blank',features)}
function confirmTheLink(theLink,theMsg)
{if(typeof(window.opera)!='undefined'){return!0}
var is_confirmed=confirm(theMsg);return is_confirmed}
function insertImgFile(elementId,fileId,oldfileId,type,page,attach_comment){var textarea=$('#'+elementId)[0];var fileup=$('input[name='+fileId+']')[0];var oldfile=$('input[name='+oldfileId+']')[0];var prefixEl=$('input[name=prefix]')[0];var prefix="img/wiki_up/";if(!textarea||!fileup){return}
if(prefixEl){prefix=prefixEl.value}
var filename=fileup.value,dirs,str;var oldfilename=oldfile.value;if(filename==oldfilename||filename===""){return}
oldfile.value=filename;if(filename.indexOf("/")>=0){dirs=filename.split("/");filename=dirs[dirs.length-1]}
if(filename.indexOf("\\")>=0){dirs=filename.split("\\");filename=dirs[dirs.length-1]}
if(filename.indexOf(":")>=0){dirs=filename.split(":");filename=dirs[dirs.length-1]}
if(type=="file"){str="{file name=\""+filename+"\"";var desc=$('#'+attach_comment).val();if(desc){str=str+" desc=\""+desc+"\""}
str=str+"}"}else{str="{img src=\"img/wiki_up/"+filename+"\" }\n"}
insertAt(elementId,str)}
var img_form_count=2,needToConfirm=!1;function addImgForm(){var new_text=document.createElement('span');new_text.setAttribute('id','picfile'+img_form_count);new_text.innerHTML='<input name=\'picfile'+img_form_count+'\' type=\'file\' onchange=\'insertImgFile("editwiki","picfile'+img_form_count+'","hasAlreadyInserted","img")\'/><br />';document.getElementById('new_img_form').appendChild(new_text);needToConfirm=!0;img_form_count ++}
function protectEmail(nom,domain,sep){return '<a class="wiki" href="mailto:'+nom+'@'+domain+'">'+nom+sep+domain+'</a>'}
browser();window.name='tiki';var fgals_window=null;function openFgalsWindow(filegal_manager_url,reload){if(fgals_window&&typeof fgals_window.document!="undefined"&&!fgals_window.closed){if(reload){fgals_window.location.replace(filegal_manager_url)}
fgals_window.focus()}else{fgals_window=window.open(filegal_manager_url,'_blank','menubar=1,scrollbars=1,resizable=1,height=500,width=800,left=50,top=50')}
$(window).on("unload",function(){fgals_window.close()})}
function wordCount(maxSize,source,cpt,message){var formcontent=source.value;var str=formcontent.replace(/^\s+|\s+$/g,'');formcontent=str.split(/[^\S]+/);if(maxSize>0&&formcontent.length>maxSize){alert(message);source.value=source.value.substr(0,source.value.length-1)}else{document.getElementById(cpt).value=formcontent.length}}
function charCount(maxSize,source,cpt,message){var formcontent=source.value;if(maxSize>0&&formcontent.length>maxSize){alert(message);source.value=source.value.substr(0,maxSize)}else{document.getElementById(cpt).value=formcontent.length}}
var m_strUpperCase="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var m_strLowerCase="abcdefghijklmnopqrstuvwxyz";var m_strNumber="0123456789";var m_strCharacters="!@#$%^&*?_~";function checkPassword(strPassword)
{var nScore=0;if(strPassword.length<5)
{nScore+=5}
else if(strPassword.length>4&&strPassword.length<8)
{nScore+=10}
else if(strPassword.length>7)
{nScore+=25}
var nUpperCount=countContain(strPassword,m_strUpperCase);var nLowerCount=countContain(strPassword,m_strLowerCase);var nLowerUpperCount=nUpperCount+nLowerCount;if(nUpperCount===0&&nLowerCount!==0)
{nScore+=10}
else if(nUpperCount!==0&&nLowerCount!==0)
{nScore+=20}
var nNumberCount=countContain(strPassword,m_strNumber);if(nNumberCount==1)
{nScore+=10}
if(nNumberCount>=3)
{nScore+=20}
var nCharacterCount=countContain(strPassword,m_strCharacters);if(nCharacterCount==1)
{nScore+=10}
if(nCharacterCount>1)
{nScore+=25}
if(nNumberCount!==0&&nLowerUpperCount!==0)
{nScore+=2}
if(nNumberCount!==0&&nLowerUpperCount!==0&&nCharacterCount!==0)
{nScore+=3}
if(nNumberCount!==0&&nUpperCount!==0&&nLowerCount!==0&&nCharacterCount!==0)
{nScore+=5}
return nScore}
function runPassword(strPassword,strFieldID)
{var ctlBar=document.getElementById(strFieldID+"_bar");var ctlText=document.getElementById(strFieldID+"_text");var ctlTextInner=document.getElementById(strFieldID+"_text_inner");if(!ctlBar||!ctlText||!ctlTextInner){return}
if(strPassword.length>0){var nScore=checkPassword(strPassword);ctlBar.style.width=nScore+"%";var icon,strText,strColor;if(nScore>=90)
{icon='ok';strText=tr("Very Secure");strColor="#0ca908"}
else if(nScore>=80)
{icon='ok';strText=tr("Secure");strColor="#0ca908"}
else if(nScore>=70)
{icon='ok';strText=tr("Very Strong");strColor="#0ca908"}
else if(nScore>=60)
{icon='ok';strText=tr("Strong");strColor="#0ca908"}
else if(nScore>=40)
{icon='none';strText=tr("Average");strColor="#e3cb00"}
else if(nScore>=25)
{icon='error';strText=tr("Weak");strColor="#ff0000"}
else{icon='error';strText=tr("Very Weak");strColor="#ff0000"}
ctlBar.style.backgroundColor=strColor;$(ctlBar).show();if(icon==='none'){$(ctlText).children('span.icon').hide()}else if(icon==='ok'){$(ctlText).children('span.icon-ok').css('color',strColor).show();$(ctlText).children('span.icon-error').hide()}else if(icon==='error'){$(ctlText).children('span.icon-ok').hide();$(ctlText).children('span.icon-error').css('color',strColor).show()}
$(ctlTextInner).text(tr('Strength')+': '+strText).show()}else{$(ctlText).children().hide();$(ctlTextInner).hide();$(ctlBar).hide()}}
function countContain(strPassword,strCheck)
{var nCount=0,i;for(i=0;i<strPassword.length;i++)
{if(strCheck.indexOf(strPassword.charAt(i))>-1)
{nCount++}}
return nCount}
function checkPasswordsMatch(in1,in2,el){if($(in1).val().length){if($(in1).val()==$(in2).val()){$(el).children('#match').show();$(el).children('#nomatch').hide();return!0}else{$(el).children('#match').hide();$(el).children('#nomatch').show();return!1}}else{$(el).children().hide()}}
function pollsAddOption()
{var newOption=$('<input />').attr('type','text').attr('name','options[]').addClass('form-control');$('#tikiPollsOptions').append($('<div class="col-sm-7 col-sm-offset-3 margin-bottom-sm"></div>').append(newOption))}
function pollsToggleQuickOptions()
{$('#tikiPollsQuickOptions').toggle()}
function hidedisabled(divid,value){if(value=='disabled'){document.getElementById(divid).style.display='none'}else{document.getElementById(divid).style.display='block'}}
function adjustThumbnails(){var i,j,h=0;var t=document.getElementById("thumbnails").childNodes;for(i=0;i<t.length;i++){if(t[i].className=="thumbnailcontener"){var t2=t[i].childNodes;for(j=0;j<t2.length;j++){if(t2[j].className=="thumbnail"){t2[j].style.height="100%";t2[j].style.overflow="visible"}}
if(t[i].offsetHeight>=h){h=t[i].offsetHeight;t[i].style.height=h+"px"}else if(t[i].offsetHeight<h){t[i].style.height=h+"px"}}}
for(i=0;i<t.length;i++){if(t[i].className=="thumbnailcontener"){if(t[i].offsetHeight<=h){t[i].style.height=h+"px"}else{break}}}}
function open_webdav(url){if(typeof ActiveXObject!='undefined'){var EditDocumentButton=new ActiveXObject("SharePoint.OpenDocuments.1");EditDocumentButton.EditDocument(url)}else{prompt(tr('URL to open this file with WebDAV'),url)}}
function ccsValueToInteger(str){var v=str.replace(/[^\d]*$/,"");if(v){v=parseInt(v,10)}
if(isNaN(v)){return 0}else{return v}}
function checkbox_list_check_all(form,list,checking){for(var checkbox in list){document.forms[form].elements[list[checkbox]].checked=checking}}
if(!window.syntaxHighlighter){window.syntaxHighlighter={get:function(){return null}}}
function tiki_encodeURI(rawstr)
{return encodeURI(rawstr)}
function tiki_decodeURI(encstr)
{return decodeURI(encstr.replace(/\+/g," "))}
function tiki_encodeURIComponent(rawstr)
{var str=encodeURIComponent(rawstr);return str}
function tiki_decodeURIComponent(encstr)
{var str=decodeURIComponent(encstr.replace(/\+/g," "));return str}
Date.prototype.toUnix=function(){return Math.round(this.getTime()/1000.0)};var UnixDate=function(unixDate){return new Date(unixDate*1000)};Date.parseUnix=function(date){date=new Date(Date.parse(date));return date.toUnix()};function adjustRating(element,data,vote){var $sibs,$help,$unvote;if(vote==="NULL"){$sibs=$("span > a",$(element).parent());$help=$(element).prev().prev();$unvote=$(element)}else{$sibs=$(element).siblings().addBack();$help=$(element).parent().next();$unvote=$help.nextAll("a")}
for(var i=0;i<$sibs.length;i++){var v=$($sibs[i]).data("vote"),icon="";if(v<=data[0].voteavg&&data[0].numvotes>0){if(data[0].result&&data[0].my_rate==v){icon='star-selected'}else{icon='star'}}else if(v-data[0].voteavg<=0.5&&data[0].numvotes>0){if(data[0].result&&data[0].my_rate==v){icon='star-half-selected'}else{icon='star-half-rating'}}else{if(data[0].result&&data[0].my_rate==v){icon='star-empty-selected'}else{icon='star-empty'}}
$($sibs[i]).find('.icon-'+icon).css('display','inline');$($sibs[i]).find('.icon').not('.icon-'+icon).css('display','none')}
var t=tr("Number of votes:")+" "+data[0].numvotes+", "+tr("Average:")+" "+data[0].voteavg;if(data[0].result){if(data[0].my_rate!="NULL"){t=t+", "+tr("Your rating:")+" "+data[0].my_rate;$unvote.show()}else{$unvote.hide()}}else{t=t+", "+tr("Vote not accepted")}
$help.text("("+data[0].numvotes+")").next().attr("title",t)}
function sendVote(element,itemId,fieldId,vote){$(element).parent().tikiModal(" ");$.getJSON($.service('tracker','vote',{i:itemId,f:fieldId,v:vote}),function(data){$(element).parent().tikiModal();adjustRating(element,data,vote)})}
function parseQuery(str){var arr,pair,key,val,out={},b1,b2,key2;if(str.substr(0,1)==="?"||str.substr(0,1)==="#"){str=str.substr(1)}
arr=str.split("&");for(var i=0;i<arr.length;i++){pair=arr[i].split("=");key=tiki_decodeURIComponent(pair[0]);val=pair.length>1?tiki_decodeURIComponent(pair[1]):"";if((b1=key.indexOf("["))>-1&&(b2=key.substr(b1+1).indexOf("]"))>-1){key2=key.substr(b1+1,b2);key=key.substr(0,b1);if(key2){if(typeof out[key]!="object"){out[key]={}}
out[key][key2]=val}else{if(typeof out[key]!="object"){out[key]=[]}
out[key].push(val)}}else{out[key]=val}}
return out};
/* rank:50standard - minify:ok. lib/jquery_tiki/tiki-jquery.js */
var $jq=$,$window=$(window),$document=$(document);function switchCheckboxes(tform,elements_name,state,hiddenToo){if(hiddenToo==undefined){hiddenToo=!1}
var closeTag;if(hiddenToo){closeTag='"]'}else{closeTag='"]:visible'}
$(tform).contents().find('input[name="'+jQuery.escapeSelector(elements_name)+closeTag).prop('checked',state).change()}
var jqNoAnimElements=['help_sections','ajaxLoading'];function show(foo,f,section){if($.inArray(foo,jqNoAnimElements)>-1||typeof jqueryTiki==='undefined'){$("#"+foo).show()}else if($("#"+foo).hasClass("tabcontent")){showJQ("#"+foo,jqueryTiki.effect_tabs,jqueryTiki.effect_tabs_speed,jqueryTiki.effect_tabs_direction)}else{showJQ("#"+foo,jqueryTiki.effect,jqueryTiki.effect_speed,jqueryTiki.effect_direction)}
if(f){setCookie(foo,"o",section)}}
function hide(foo,f,section){if($.inArray(foo,jqNoAnimElements)>-1||typeof jqueryTiki==='undefined'){$("#"+foo).hide()}else if($("#"+foo).hasClass("tabcontent")){hideJQ("#"+foo,jqueryTiki.effect_tabs,jqueryTiki.effect_tabs_speed,jqueryTiki.effect_tabs_direction)}else{hideJQ("#"+foo,jqueryTiki.effect,jqueryTiki.effect_speed,jqueryTiki.effect_direction)}
if(f){setCookie(foo,"c",section)}}
function flip(foo,style){var $foo=$("#"+foo);if(style&&style!=='block'||foo==='help_sections'||foo==='fgalexplorer'||typeof jqueryTiki==='undefined'){$foo.toggle();if($foo.css('display')==='none'){setSessionVar('show_'+tiki_encodeURIComponent(foo),'n')}else{setSessionVar('show_'+tiki_encodeURIComponent(foo),'y')}}else{if($foo.css("display")==="none"){setSessionVar('show_'+tiki_encodeURIComponent(foo),'y');show(foo)}
else{setSessionVar('show_'+tiki_encodeURIComponent(foo),'n');hide(foo)}}}
function showJQ(selector,effect,speed,dir){if(effect==='none'){$(selector).show()}else if(effect===''||effect==='normal'){$(selector).show(400)}else if(effect=='slide'){$(selector).slideDown(speed)}else if(effect==='fade'){$(selector).fadeIn(speed)}else if(effect.match(/(.*)_ui$/).length>1){$(selector).show(effect.match(/(.*)_ui$/)[1],{direction:dir},speed)}else{$(selector).show()}}
function hideJQ(selector,effect,speed,dir){if(effect==='none'){$(selector).hide()}else if(effect===''||effect==='normal'){$(selector).hide(400)}else if(effect==='slide'){$(selector).slideUp(speed)}else if(effect==='fade'){$(selector).fadeOut(speed)}else if(effect.match(/(.*)_ui$/).length>1){$(selector).hide(effect.match(/(.*)_ui$/)[1],{direction:dir},speed)}else{$(selector).hide()}}
function ajaxLoadingShow(destName){var $dest,$loading,pos,x,y,w,h;if(typeof destName==='string'){$dest=$('#'+destName)}else{$dest=$(destName)}
if($dest.length===0||$dest.parents(":hidden").length>0){return}
$loading=$('#ajaxLoading');pos=$dest.offset();if(pos.left+$dest.width()>$window.width()){w=$window.width()-pos.left}else{w=$dest.width()}
if(pos.top+$dest.height()>$window.height()){h=$window.height()-pos.top}else{h=$dest.height()}
x=pos.left+(w/2)-($loading.width()/2);y=pos.top+(h/2)-($loading.height()/2);$loading.css('left',x).css('top',y);x=pos.left+ccsValueToInteger($dest.css("margin-left"));y=pos.top+ccsValueToInteger($dest.css("margin-top"));w=ccsValueToInteger($dest.css("padding-left"))+$dest.width()+ccsValueToInteger($dest.css("padding-right"));h=ccsValueToInteger($dest.css("padding-top"))+$dest.height()+ccsValueToInteger($dest.css("padding-bottom"));$('#ajaxLoadingBG').css('left',pos.left).css('top',pos.top).width(w).height(h).fadeIn("fast");show('ajaxLoading')}
function ajaxLoadingHide(){hide('ajaxLoading');$('#ajaxLoadingBG').fadeOut("fast")}
function ajaxSubmitEventHandler(successCallback){return function(e){e.preventDefault();var form=this,act;act=$(form).attr('action');var modal=$(form).closest('.modal-dialog');if(!act){act=url}
if($(form).hasClass("confirm-action")){confirmAction(this);return!1}
if(typeof $(form).valid==="function"){if(!$(form).valid()){return!1}else if($(form).validate().pendingRequest>0){$(form).validate();setTimeout(function(){$(form).submit()},500);return!1}}
modal.tikiModal(tr('Loading...'));if($(form).find("input[type=file]").length){var formData=new FormData(form)}else{var formData=$(form).serialize()}
var formSubmission={type:'POST',data:formData,dataType:'json',success:function(data){successCallback.apply(form,[data])},error:function(jqxhr){modal.tikiModal();$(form).showError(jqxhr)},complete:function(){modal.tikiModal()}};if(form.enctype=="multipart/form-data"){formSubmission.contentType=!1;formSubmission.processData=!1}
$.ajax(act,formSubmission);return!1}}
function checkDuplicateRows(button,columnSelector,rowSelector,parentSelector){if(typeof columnSelector==='undefined'){columnSelector="td"}
if(typeof rowSelector==='undefined'){rowSelector="tr:not(:first)"}
if(typeof parentSelector==='undefined'){parentSelector="table:first"}
var $rows=$(button).parents(parentSelector).find(rowSelector);$rows.each(function(ix,el){if($("input:checked",el).length===0){var $el=$(el);var line=$el.find(columnSelector).text();$rows.each(function(ix,el){if($el[0]!==el&&$("input:checked",el).length===0){if(line===$(el).find(columnSelector).text()){$(":checkbox:first",el).prop("checked",!0)}}})}})}
$.fn.tiki_popover=function(){var list,$container=this;list=$container.find('.tips[title!=""], .tikihelp[title!=""]').each(function(){var $element=$(this);if($element.attr('title')){$.each(['|',':','<br/>','<br>'],function(key,sep){var parts=$element.attr('title').split(sep);if(parts.length>1){$element.attr('title',parts.shift());$element.data('content',parts.join(sep))}})}else{$element.attr('title','')}
if(!$element.data('trigger')){$element.data('trigger','hover')}
$element.data('delay',{"show":0,"hide":10})});$.merge(list,$container.find("a[data-toggle=popover]:not(.tips[title!='']):not(.tikihelp[title!=''])"));list.filter('.bottom').data('placement','bottom');list.filter('.left').data('placement','left');list.filter('.slow').data('delay',{"show":500,"hide":0});list.find('img').attr('title','');list.filter('[data-trigger="click"]').click(function(e){e.preventDefault()});list.popover({container:'body',html:!0,placement:$.tikiPopoverWhereToPlace});$container.find('.ajaxtips').each(function(){var me=$(this),trigger=me.data('trigger')||'hover';$(this).popover({trigger:trigger,html:!0,delay:{"show":0,"hide":10},placement:$.tikiPopoverWhereToPlace,content:function(){var link=this,content=$(this).data('content');if(!content){$.get($(this).data('ajaxtips'),function(data){content=data;$(link).data('content',content);$(link).popover('show')})}
return content}})});$document.on("show.bs.popover",function(e){var event=e;$('.popover:visible:not(.tour-tour)').each(function(){if(this.previousElementSibling!==event.target){$(this).hide()}})});return $container};$.tikiPopoverWhereToPlace=function(pop,el){var pxNum=function(str){return(str||'').replace('px','')*1},$win=$(window),width=$win.width(),height=$win.height(),$pop=$(pop),$el=$(el),allowedImgWidth=width*0.60,allowedImgHeight=height*0.60,leftPos=$el.offset().left,$img=$pop.find('div[style*="background-image"],img').first(),$imgContainer=$img.parent(),$imgPopover=$imgContainer.parent(),imgWidth=pxNum($img.css('width')),imgHeight=pxNum($img.css('height')),newImgWidth,newImgHeight,widthBuffer,heightBuffer;if($el.data("placement")){return $el.data("placement")}
if(imgWidth>allowedImgWidth||imgHeight>allowedImgHeight){widthBuffer=(pxNum($imgContainer.css('padding-left'))+pxNum($imgContainer.css('margin-left'))+pxNum($imgContainer.css('border-left-width')))*2;heightBuffer=(pxNum($imgContainer.css('padding-top'))+pxNum($imgContainer.css('margin-top'))+pxNum($imgContainer.css('border-top-width')))*2;if(allowedImgWidth/imgWidth>allowedImgHeight/imgHeight){newImgWidth=allowedImgWidth;newImgHeight=imgHeight*(allowedImgWidth/imgWidth)}else{newImgWidth=imgWidth*(allowedImgHeight/imgHeight);newImgHeight=allowedImgHeight}
$img.css({backgroundSize:newImgWidth+'px '+newImgHeight+'px',width:newImgWidth+'px',height:newImgHeight+'px'});$imgPopover.css({maxWidth:(newImgWidth+widthBuffer)+'px',maxHeight:(newImgHeight+heightBuffer)+'px'})}
if(width<500||((width-leftPos)+imgWidth)>width)return 'bottom';if(width-leftPos>400)return 'right';return 'left'};if($.fn.popover){var originalLeave=$.fn.popover.Constructor.prototype.leave;$.fn.popover.Constructor.prototype.leave=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.'+this.type);var container,timeout;originalLeave.call(this,obj);if(self.$tip){container=self.$tip;timeout=self.timeout;container.one('mouseenter',function(){clearTimeout(timeout);container.one('mouseleave',function(){$.fn.popover.Constructor.prototype.leave.call(self,self)})})}}}
$(function(){if(!window.jqueryTiki)window.jqueryTiki={};if(jqueryTiki.reflection){$("img.reflect").reflect({})}
if(jqueryTiki.tooltips){$(document).tiki_popover()}
if(jqueryTiki.superfish){$('ul.cssmenu_horiz').supersubs({minWidth:11,maxWidth:20,extraWidth:1});$('ul.cssmenu_vert').supersubs({minWidth:11,maxWidth:20,extraWidth:1});$('ul.cssmenu_horiz').superfish({animation:{opacity:'show',height:'show'},speed:'fast',onShow:function(){if($(this).data('active'))return;$(this).data('active',!0).moveToWithinWindow()},onHide:function(){$(this).removeData('active')}});$('ul.cssmenu_vert').superfish({animation:{opacity:'show',height:'show'},speed:'fast',onShow:function(){if($(this).data('active'))return;$(this).data('active',!0).moveToWithinWindow()},onHide:function(){$(this).removeData('active')}})}
if(jqueryTiki.tablesorter){$('.sortable').tablesorter({widthFixed:!0})}
if(jqueryTiki.colorbox&&!jqueryTiki.mobile){$().on('cbox_complete',function(){$("#cboxTitle").wrapInner("<div></div>")});$("a[data-box*='box']").colorbox({rel:function(){return $(this).attr('data-box')},transition:"elastic",maxHeight:"95%",maxWidth:"95%",overlayClose:!0,current:jqueryTiki.cboxCurrent});$("a[data-box*='box'][data-box*='type=img'], a[data-box*='box'][data-box!='type=']").colorbox({photo:!0});$("a[data-box*='box'][data-box*='slideshow']").colorbox({photo:!0,slideshow:!0,slideshowSpeed:3500,preloading:!1,width:"100%",height:"100%"});$("#col1 a[data-box*='box']:not([data-box*='type=img']):not([href*='display']):not([href*='preview']):not([href*='thumb']):not([data-box*='slideshow']):not([href*='image']):not([href$='\.jpg']):not([href$='\.jpeg']):not([href$='\.png']):not([href$='\.gif'])").colorbox({iframe:!0,width:"95%",height:"95%"});$("#col1 a[data-box*='box'][href^='ftp://'], #col1 a[data-box*='box'][href^='ftps://']").colorbox({iframe:!0,width:"95%",height:"95%"});$("#col1 a[data-box*='box'][data-box*='type=flash']").colorbox({inline:!0,width:"60%",height:"60%",href:function(){var $el=$("#cb_swf_player");if($el.length===0){$el=$("<div id='cb_swf_player' />");$(document.body).append($("<div />").hide().append($el))}
swfobject.embedSWF($(this).attr("href"),"cb_swf_player","100%","90%","9.0.0","lib/swfobject/expressInstall.swf");return $("#cb_swf_player")}});$("#col1 a[data-box*='box'][data-box*='type=iframe']").colorbox({iframe:!0});$("#col1 a[data-box*='box'][href^='#']").colorbox({inline:!0,width:"50%",height:"50%",href:function(){return $(this).attr('href')}});$("a[data-box*='box'][title]").colorbox({title:function(){return $(this).attr('title')}});$("a[data-box*='box'] img[title]").colorbox({title:function(){return $(this).attr('title')},photo:!0,href:function(){return $(this).parent().attr("href")}});var re,ret;$("#col1 a[data-box*='box'][data-box*='title=']").colorbox({title:function(){re=/(title=([^;\"]+))/i;ret=$(this).attr("data-box").match(re);return ret[2]}});$("#col1 a[data-box*='box'][data-box*='height=']").colorbox({height:function(){re=/(height=([^;\"]+))/i;ret=$(this).attr("data-box").match(re);return ret[2]}});$("#col1 a[data-box*='box'][data-box*='width=']").colorbox({width:function(){re=/(width=([^;\"]+))/i;ret=$(this).attr("data-box").match(re);return ret[2]}});if(jqueryTiki.colorbox){$("a[data-box^='shadowbox[colorbox']").each(function(){$(this).attr('savedTitle',$(this).attr('title'))});$("a[data-box^='shadowbox[colorbox']").colorbox({title:function(){return $(this).attr('savedTitle')}})}}
if(jqueryTiki.zoom){$("a[data-box*=zoom]").each(function(){$(this).wrap('<span class="img_zoom"></span>').parent().zoom({url:$(this).attr("href")})})}
$.fn.applyChosen=function(){if(jqueryTiki.chosen){$("select:not(.allow_single_deselect):not(.nochosen)").tiki("chosen")}};$.applyChosen=function(){return $('body').applyChosen()};if(jqueryTiki.chosen){$.applyChosen()}
$(function(){$("#keepOpenCbx").click(function(){if(this.checked){setCookie("fgalKeepOpen","1")}else{setCookie("fgalKeepOpen","")}});var keepopen=getCookie("fgalKeepOpen");$("#keepOpenCbx").prop("checked",!!keepopen)});$.paginationHelper()});$document.on('pageSearchReady',function(){$.paginationHelper()});function checkClose(){if(!$("#keepOpenCbx").prop("checked")){window.close()}else{window.blur();if(window.opener){window.opener.focus()}}}
$(function(){if($("#diff_outer").length&&!$.trim($(".wikipreview .wikitext").html()).length){toggleFullScreen("editwiki")}});function sideBySideDiff(){if($('.side-by-side-fullscreen').size()){$('.side-by-side-fullscreen').remove();return}
var $diff=$('#diff_outer').remove(),$zone=$('.edit-zone');$zone.after($diff.addClass('side-by-side-fullscreen'));$diff.find('#diff_history').height('')}
function toggleFullScreen(area_id){if($("input[name=wysiwyg]").val()==="y"){$("#diff_outer").css({position:"inherit",height:"400px",overflowX:"auto"});return}
var textarea=$("#"+area_id);var textareaEditor=syntaxHighlighter.get(textarea);if(textareaEditor){syntaxHighlighter.fullscreen(textarea);sideBySideDiff();return}
var toolbar=$('#editwiki_toolbar'),preview=$("#autosave_preview"),comment=$("#comment").parents("fieldset:first"),screen=$('.TextArea-fullscreen'),zone=$('.edit-zone',screen);screen.add(textarea).css('height','');$('.TextArea-fullscreen .actions').remove();if(textarea.parent().hasClass("ui-wrapper")){textarea.resizable("destroy")}
var textareaParent=textarea.parents(".tab-content:first").toggleClass('TextArea-fullscreen');if(textareaParent.hasClass('TextArea-fullscreen')){$('body').css('overflow','hidden');$('.tabs,.rbox-title').toggle();var win=$window.data('cm-resize',!0),diff=$("#diff_outer"),msg=$(".translation_message"),actions=$('.actions',textarea.parents("form"));actions.clone().appendTo('.TextArea-fullscreen');actions=$('.actions',$('.TextArea-fullscreen'));comment.css({position:"absolute",bottom:actions.outerHeight()+"px",width:"100%"}).nextAll("fieldset").hide();preview.css({position:"absolute",top:0,left:0});win.resize(function(){screen=$('.TextArea-fullscreen');actions=$('.actions',screen);comment=$("#comment").parents("fieldset:first");if(win.data('cm-resize')&&screen){screen.css('height',win.height()+'px');var swidth=win.width()+"px";var commentMargin=parseInt(comment.css("marginBottom").replace("px",""))*2;commentMargin+=parseInt(comment.css("borderBottomWidth").replace("px",""))*2;var innerHeight=win.height()-comment.outerHeight()-commentMargin-actions.outerHeight();if(diff.length){swidth=(screen.width()/2)+"px";innerHeight-=msg.outerHeight();msg.css("width",(screen.width()/2-msg.css("paddingLeft").replace("px","")-msg.css("paddingRight").replace("px",""))+"px");diff.css({width:swidth,height:innerHeight+'px'});$('#diff_history').height(innerHeight+"px")}
textarea.css("width",swidth);toolbar.css('width',swidth);zone.css("width",swidth);preview.css("width",swidth);textarea.css('height',(innerHeight-toolbar.outerHeight())+"px")}});setTimeout(function(){$window.resize()},500)}else{textarea.css("width","");toolbar.css('width',"");zone.css({width:"",height:""});screen.css("width","");comment.css({position:"",bottom:"",width:""}).nextAll("fieldset").show();preview.css({position:"",top:"",left:""});$('body').css('overflow','');$('.tabs,.rbox-title').toggle();$window.removeData('cm-resize')}
sideBySideDiff()}
var xhrCache={},lastXhr;$.fn.tiki=function(func,type,options){var opts={},opt;switch(func){case "autocomplete":if(jqueryTiki.autocomplete&&jqueryTiki.ui){if(typeof type==='undefined'){return null}
options=options||{};var requestData={};var url="";switch(type){case "pagename":url="tiki-listpages.php?listonly&initial="+(options.initial?options.initial+"&nonamespace":"");break;case "groupname":url="tiki-ajax_services.php?listonly=groups";break;case "username":url="tiki-ajax_services.php?listonly=users";break;case "usersandcontacts":url="tiki-ajax_services.php?listonly=usersandcontacts";break;case "userrealname":url="tiki-ajax_services.php?listonly=userrealnames";break;case "tag":url="tiki-ajax_services.php?listonly=tags&separator=+";break;case "icon":url="tiki-ajax_services.php?listonly=icons&max="+(opts.max?opts.max:10);opts.formatItem=function(data,i,n,value){var ps=value.lastIndexOf("/");var pd=value.lastIndexOf(".");return "<img src='"+value+"' /> "+value.substring(ps+1,pd).replace(/_/m," ")};opts.formatResult=function(data,value){return value};break;case 'trackername':url="tiki-ajax_services.php?listonly=trackername";break;case 'trackervalue':if(typeof options.fieldId==="undefined"){return null}
$.extend(requestData,options);options={};url="list-tracker_field_values_ajax.php";break}
var multiple=options.multiple&&(type=='usersandcontacts'||type=='userrealname'||type=='username');$.extend(opts,{minLength:2,source:function(request,response){if(multiple){request.term=(''+request.term).split(/,\s*/).pop()}
if(options.tiki_replace_term){request.term=options.tiki_replace_term.apply(null,[request.term])}
var cacheKey="ac."+type+"."+request.term;if(cacheKey in xhrCache){response(xhrCache[cacheKey]);return}
request.q=request.term;$.extend(request,requestData);lastXhr=$.getJSON(url,request,function(data,status,xhr){xhrCache[cacheKey]=data;if(xhr===lastXhr){response(data,function(item){return item})}})},search:function(){if(multiple){var term=(''+this.value).split(/,\s*/).pop();if(term.length<2){return!1}}},select:function(e,ui){if(multiple){var terms=''+this.value;terms=terms.replace(';',',');terms=terms.split(/,\s*/);terms.pop();terms.push(ui.item.value);terms.push("");this.value=terms.join(", ");return!1}}});$.extend(opts,options);return this.each(function(){$(this).autocomplete(opts).blur(function(){$(this).removeClass("ui-autocomplete-loading").change()})})}
break;case "carousel":if(jqueryTiki.carousel){opts={imagePath:"vendor_bundled/vendor/jquery/plugins/infinitecarousel/images/",autoPilot:!0};$.extend(opts,options);return this.each(function(){$(this).infiniteCarousel(opts)})}
break;case "datepicker":case "datetimepicker":if(jqueryTiki.ui){switch(type){case "jscalendar":if(typeof options.altField==="undefined"){alert("jQuery.ui datepicker jscalendar replacement setup error: options.altField not set for "+$(this).attr("id"));debugger}
opts={showOn:"both",buttonText:'',dateFormat:jqueryTiki.shortDateFormat,timeFormat:jqueryTiki.shortTimeFormat,showButtonPanel:!0,altFormat:"@",altFieldTimeOnly:!1,onClose:function(dateText,inst){$.datepickerAdjustAltField(func,inst)}};break;default:opts={showOn:"both",buttonText:'',dateFormat:jqueryTiki.shortDateFormat,showButtonPanel:!0,firstDay:jqueryTiki.firstDayofWeek};break}
$.extend(opts,options);if(func==="datetimepicker"){return this.each(function(){$(this).datetimepicker(opts)})}else{return this.each(function(){$(this).datepicker(opts)})}}
break;case "accordion":if(jqueryTiki.ui){opts={autoHeight:!1,collapsible:!0,navigation:!0};$.extend(opts,options);return this.each(function(){$(this).accordion(opts)})}
break;case "chosen":if(jqueryTiki.chosen){opts={allow_single_deselect:!0,search_contains:!0};if($("html").attr("dir")==="rtl"){$(this).addClass("chosen-rtl")}
$.map({placeholder_text_multiple:"Select Some Options",placeholder_text_single:"Select an Option",no_results_text:"No results match"},function(v,k){opts[k]=tr(v)});$.extend(opts,options);return this.each(function(){var opts2=$.extend({},opts);if($(this).is(":hidden")&&!opts.width){var $hiddenElement=$(this).clone().appendTo("body");if($(this).is('.form-control')){opts2.width='100%'}else{opts2.width=$hiddenElement.outerWidth()}
$hiddenElement.remove()}
$(this).chosen(opts2)})}
break}};(function($){$.datepickerAdjustAltField=function(func,inst){$.datepicker._updateAlternate(inst);var val=$(inst.settings.altField).val(),timestamp;if(func==="datetimepicker"){val=val.substring(0,val.indexOf(" "));timestamp=parseInt(val/1000,10);if(!timestamp||isNaN(timestamp)){$.datepicker._setDateFromField(inst);$.datepicker._updateAlternate(inst);val=$(inst.settings.altField).val();val=val.substring(0,val.indexOf(" "));timestamp=parseInt(val/1000,10)}
if(timestamp&&inst.settings&&inst.settings.timepicker){var time=inst.settings.timepicker.hour*3600+inst.settings.timepicker.minute*60+inst.settings.timepicker.second;timestamp+=time}}else{timestamp=parseInt(val/1000,10)}
$(inst.settings.altField).val(timestamp?timestamp:"").change()};$.fn.browse_tree=function(){this.each(function(){$('.treenode:not(.done)',this).addClass('done').each(function(){if(getCookie($('ul:first',this).attr('data-id'),$('ul:first',this).attr('data-prefix'))!=='o'){$('ul:first',this).css('display','none')}
var $placeholder=$('span.ui-icon:first',this);if($('ul:first',this).length){var dir=$('ul:first',this).css('display')==='block'?'s':'e';if($placeholder.length){$placeholder.replaceWith('<span class="flipper ui-icon ui-icon-triangle-1-'+dir+'" style="float: left;margin-top:.2em;"/>')}else{$(this).prepend('<span class="flipper ui-icon ui-icon-triangle-1-'+dir+'" style="float: left;margin-top:.2em;"/>')}}else{if($placeholder.length){$placeholder.replaceWith('<span style="float:left;width:16px;height:16px;margin-top:.2em;"/>')}else{$(this).prepend('<span style="float:left;width:16px;height:16px;margin-top:.2em;"/>')}}
if($('div.checkbox',this).length){$('div.checkbox',this).css("margin-left","16px")}});$('.flipper:not(.done)').addClass('done').css('cursor','pointer').click(function(){var body=$(this).parent().find('ul:first');if('block'===body.css('display')){$(this).removeClass('ui-icon-triangle-1-s').addClass('ui-icon-triangle-1-e');body.hide('fast');setCookie(body.data("id"),"",body.data("prefix"))}else{$(this).removeClass('ui-icon-triangle-1-e').addClass('ui-icon-triangle-1-s');body.show('fast');setCookie(body.data("id"),"o",body.data("prefix"))}})});return this};var fancy_filter_create_token=function(value,label){var close,token;close=$('<span class="ui-icon ui-icon-close"/>').click(function(){var ed=$(this).parent().parent();$(this).parent().remove();ed.change();return!1});token=$('<span class="token"/>').attr('data-value',value).text(label).attr('contenteditable',!1).disableSelection().append(close);return token[0]};var fancy_filter_build_init=function(editable,str,options){if(str===''){str='&nbsp;'}
editable.html(str.replace(/(\d+)/g,'<span>$1</span>'));if(options&&options.map){editable.find('span').each(function(){var val=$(this).text();$(this).replaceWith(fancy_filter_create_token(val,options.map[val]?options.map[val]:val))})}};$.fn.fancy_filter=function(operation,options){this.each(function(){switch(operation){case 'init':var editable=$('<div class="fancyfilter form-control"/>'),input=this;if(editable[0].contentEditable!==null){fancy_filter_build_init(editable,$(this).val(),options);editable.attr('contenteditable',!0);$(this).after(editable).hide()}
editable.keyup(function(){$(this).change();$(this).mouseup()}).change(function(){$(input).val($('<span/>').html(editable.html()).find('span').each(function(){$(this).replaceWith(' '+$(this).attr('data-value')+' ')}).end().text().replace(/\s+/g,' '))}).mouseup(function(){input.lastRange=window.getSelection().getRangeAt(0)});break;case 'add':var node=fancy_filter_create_token(options.token,options.label);if(this.lastRange){this.lastRange.deleteContents();this.lastRange.insertNode(node);this.lastRange.insertNode(document.createTextNode(options.join))}else{$(this).next().append(options.join).append(node)}
$(this).next().change();break}});return this};$.fn.drawGraph=function(){this.each(function(){var $this=$(this);var width=$this.width();var height=$this.height()?$this.height():Math.ceil(width*9/16);var nodes=$this.data('graph-nodes');var edges=$this.data('graph-edges');var g=new Graph;$.each(nodes,function(k,i){g.addNode(i)});$.each(edges,function(k,i){var style={directed:!0};if(i.preserve){style.color='red'}
g.addEdge(i.from,i.to,style)});var layouter=new Graph.Layout.Spring(g);layouter.layout();var renderer=new Graph.Renderer.Raphael($this.attr('id'),g,width,height);renderer.draw()});return this};$.fn.selection=function(start,end){if(start!==undefined){if(end===undefined){end=start}
return this.each(function(){if(this.selectionStart){this.selectionStart=start;this.selectionEnd=end}else if(this.setSelectionRange){this.setSelectionRange(start,end)}else if(this.createTextRange){var selRange=this.createTextRange();if(start==end){selRange.move("character",start);selRange.select()}else{selRange.collapse(!0);selRange.moveStart("character",start);selRange.moveEnd("character",end-start);selRange.select()}}})}
var field=this[0];if(field.selectionStart!==undefined){return{start:field.selectionStart,end:field.selectionEnd}}else if(field.createTextRange){var range=document.selection.createRange();var stored_range=range.duplicate();stored_range.moveToElementText(field);stored_range.setEndPoint('EndToEnd',range);var textProperty=range.htmlText?"htmlText":"text";var selectionStart=stored_range[textProperty].length-range[textProperty].length;var selectionEnd=selectionStart+range[textProperty].length;return{start:selectionStart,end:selectionEnd}}};$.fn.comment_toggle=function(){this.each(function(){var $target=$(this.hash);$target.hide();$(this).click(function(){if($target.is(':visible')){$target.hide(function(){$(this).empty()})}else{$target.comment_load($(this).attr('href'))}
return!1});if(location.search.indexOf("comzone=show")>-1){var comButton=this;setTimeout(function(){$(comButton).click()},500)}});return this};$.fn.comment_load=function(url){$('#top .note-list').remove();this.each(function(){var comment_container=this;if(!comment_container.reload){comment_container.reload=function(){$(comment_container).empty().comment_load(url)}}
$(this).addClass('comment-container');$(this).load(url,function(response,status){$(this).show();$('.button.comment-form.autoshow a').addClass('autoshown').click().removeClass('autoshown');var match=location.hash.match(/threadId=?(\d+)/);if(match){var $tab=$(this).parents(".tab-pane"),$tabContent=$(this).parents(".tab-content");if($tab.length&&!$tab.is(".active")){$tabContent.find(".tab-pane").each(function(index){if(this===$tab[0]){$(".nav-tabs li:nth("+index+") a",$tabContent.parent()).tab("show")}})}
var $comment=$(".comment[data-comment-thread-id="+match[1]+"]");var top=$comment.offset().top+$comment.height()-($window.height()/2);$('html, body').animate({scrollTop:top},2000,function(){$comment.animate({backgroundColor:"#ff8"},250,function(){$comment.animate({backgroundColor:""},1000)})})}})});return this};$(document).on('click','.comment-form.buttons a',function(){var comment_container=$(this).closest('.comment-container, .ui-dialog-content')[0];$('.comment-form form:not(.commentRatingForm)',comment_container).each(function(){var $p=$(this).parent();$p.empty().addClass('button').append($p.data('previous'))});if(!$(this).hasClass('autoshown')){$(".comment").each(function(){$("article > *:not(ol)",this).each(function(){$(this).css("opacity",0.6)})})}
$(this).parents('.comment:first').find("*").css("opacity",1);var $formContainer=null;if($(this).data('target')){$formContainer=$($(this).data('target'))}else{$formContainer=$(this).parents('.buttons')}
$(this).parents('.buttons').data('previous',$(this)).empty().removeClass('buttons').removeClass('button');$('.modal.fade.in').trigger('tiki.modal.redraw');$formContainer.load($(this).attr('href'),function(){var form=$('form',this).submit(function(){var errors,current=this;$(current).tikiModal(tr("Saving..."));if(typeof syntaxHighlighter.sync==='function'){syntaxHighlighter.sync($(current).find("textarea.wikiedit"))}
$.post($(current).attr('action'),$(current).serialize(),function(data,st){$(current).tikiModal();if(data.threadId){$(current).closest('.comment-container').reload();$('span.count_comments').each(function(){var action=$(current).attr('action').match(/tiki-comment-(\w*)/),count=parseInt($(this).text());if(action){switch(action[1]){case "post":count++;break;case "remove":count--;break;case "edit":case "moderate":break}
$(this).text(count)}});if(data.feedback&&data.feedback[0]){alert(data.feedback.join("\n"))}}else{errors=$('ol.errors',form).empty();if(!errors.length){$(':submit',current).after(errors=$('<ol class="alert-warning"/>'))}
$.each(data.errors,function(k,v){errors.append($('<li/>').text(v))})}},'json');return!1});if($.fn.flexibleSyntaxHighlighter){window.codeMirrorEditor=[];form.find('textarea.wikiedit').flexibleSyntaxHighlighter()}});return!1});$.fn.input_csv=function(operation,separator,value){this.each(function(){var values=$(this).val().split(separator);if(values[0]===''){values.shift()}
if(operation==='add'&&-1===values.indexOf(""+value)){values.push(value)}else if(operation==='delete'){value=String(value);while(-1!==$.inArray(value,values)){values.splice($.inArray(value,values),1)}}
$(this).val(values.join(separator))});return this};$.service=function(controller,action,query){var append='';if(query){append='?'+$.buildParams(query)}
if(action){return 'tiki-'+controller+'-'+action+append}else{return 'tiki-'+controller+'-x'+append}};$.serviceUrl=function(options){var o=$.extend({},options),controller=options.controller,action=options.action;delete(o.controller);delete(o.action);return $.service(controller,action,o)};$.buildParams=function(query,prefix,suffix){prefix=prefix||'';suffix=suffix||'';return $.map(query,function(v,k){if($.isPlainObject(v)){return $.buildParams(v,k+'[',']')}else{return prefix+k+suffix+'='+tiki_encodeURIComponent(v)}}).join('&')};$.fn.serviceDialog=function(options){this.each(function(){var $dialog=$('<div/>'),origin=this,buttons={};$(this).append($dialog).data('serviceDialog',$dialog);if(!options.hideButtons){buttons[tr('OK')]=function(){$dialog.find('form:visible').submit()};buttons[tr('Cancel')]=function(){$dialog.dialog('close');if($dialog.data('ui-dialog')){$dialog.dialog('destroy')}}}
$dialog.dialog({title:options.title,minWidth:options.width?options.width:500,height:(options.fullscreen?$window.height()-20:(options.height?options.height:600)),width:(options.fullscreen?$window.width()-20:null),close:function(){if(options.close){options.close.apply([],this)}
if($(this).data('ui-dialog')){$(this).dialog('destroy').remove()}},buttons:buttons,modal:options.modal,zIndex:options.zIndex});$dialog.loadService(options.data,$.extend(options,{origin:origin}))});return this};$.fn.loadService=function(data,options){var $dialog=this,controller=options.controller,action=options.action,url;this.each(function(){if(!this.reload){this.reload=function(){$(this).loadService(data,options)}}});if(typeof data==="string"){data=parseQuery(data)}
if(data&&data.controller){controller=data.controller}
if(data&&data.action){action=data.action}
if(options.origin&&$(options.origin).is('a')){url=$(options.origin).attr('href')}else if(options.url){url=options.url}else{url=$.service(controller,action)}
$dialog.tikiModal(tr("Loading..."));$.ajax(url,{data:data,error:function(jqxhr){$dialog.html(jqxhr.responseText)},success:function(data){$dialog.html(data);$dialog.find('.ajax').click(function(e){$dialog.loadService(null,{origin:this});return!1});$dialog.find('.service-dialog').click(function(e){if($dialog.data('ui-dialog')){$dialog.dialog('close')}
return!0});$dialog.find('form .submit').hide();$dialog.find('form:not(.no-ajax)').off("submit").submit(ajaxSubmitEventHandler(function(data){data=(data?data:{});if(data.FORWARD){$dialog.loadService(data.FORWARD,options)}else if($dialog.data('ui-dialog')){$dialog.dialog('destroy').remove()}
if(options.success){options.success.apply(options.origin,[data])}}));if(options.load){options.load.apply($dialog[0],[data])}
$('.confirm-prompt',this).requireConfirm({success:function(data){if(data.FORWARD){$dialog.loadService(data.FORWARD,options)}else{$dialog.loadService(options.data,options)}}})},complete:function(){$dialog.tikiModal();if($dialog.find('form').size()==0&&$dialog.data('ui-dialog')){var buttons=$dialog.dialog('option','buttons'),n={};if(buttons[tr('Cancel')]){n[tr('OK')]=buttons[tr('Cancel')];$dialog.dialog('option','buttons',n)}}}})};$.fn.requireConfirm=function(options){this.click(function(e){e.preventDefault();$(this).doConfirm(options);return!1});return this};$.fn.doConfirm=function(options){var message=options.message,link=this;if(!message){message=$(this).data('confirm')}
if(confirm(message)){var $this=$(this);$this.tikiModal(" ");$.ajax($(this).attr('href'),{type:'POST',dataType:'json',data:{'confirm':1},success:function(data){$this.tikiModal();options.success.apply(link,[data])},error:function(jqxhr){$this.tikiModal();$(link).closest('form').showError(jqxhr)}})}};$.fn.showError=function(message){if(message.responseText){if(message.getResponseHeader("Content-Type").indexOf("text/html")===-1){var data=$.parseJSON(message.responseText);message=data.message}else{message=$(message.responseText).text()}}else if(typeof message!=='string'){message=""}
this.each(function(){var parts,that=this;if(parts=message.match(/^<!--field\[([^\]]+)\]-->(.*)$/)){field=parts[1];message=parts[2];if(that[field]){that=that[field]}}
var validate=!1,errors={},field,$additional=$('<ul>');if(jqueryTiki.validate){validate=$(that).closest('form').validate()}
if(validate){if(!$(that).attr('name')){$(that).attr('name',$(that).attr('id'))}
if(that!==validate.currentForm){field=$(that).attr('name')}
if(field){errors[field]=message;validate.showErrors(errors)}else{$additional.append($('<li>').text(message))}
setTimeout(function(){$('#tikifeedback li').filter(function(){return $(this).text()===message}).remove();if($('#tikifeedback ul').is(':empty')){$('#tikifeedback').empty()}},100)}else{$additional.append($('<li>').text(message))}
if(!$additional.is(':empty')){$('.ajax-errors',this).remove();$('<div class="ajax-errors alert alert-danger alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button></div>').prependTo(this).append($additional)}
$('.form-group').removeClass('has-error').find('label.error:visible').addClass('help-block').prepend('<span class="fa fa-flag"/> ').closest('.form-group').addClass('has-error')});return this};$.fn.clearError=function(){this.each(function(){$(this).closest('form').find('label.error[for="'+$(this).attr('name')+'"]').remove();$(this).closest('form').find('.form-group.has-error').removeClass('has-error')});return this};function loadSelectorData(filter,args,success){if(!$.object_selector_cache){$.object_selector_cache={}}
if($.isFunction(args)){success=args;args={}}
var item,url;url=$.service('search','lookup',$.extend(args,{filter:filter}));if(item=$.object_selector_cache[url]){if(item.data){success(item.data)}else{item.queue.push(success)}}else{item=$.object_selector_cache[url]={data:null,queue:[success]};$.getJSON(url,function(data){item.data=data;$.each(item.queue,function(k,f){f(data)});item.queue=[]})}}
$._object_selector_add_item=function(type,$select,$results,item,title,selected){var checkname=$select.closest('.object-selector, .object-selector-multi').find('.primary').attr('id')+'_sel';$('<option>').val(item).data('label',title).text(title.replace(/\n/g," / ")).prop('selected',selected).appendTo($select);$('<div class="'+type+'"><label><input type="'+type+'"> </label></div>').find('label').append(title).end().find(':radio, :checkbox').attr('name',checkname).prop('checked',selected).val(item).end().appendTo($results)};$.fn._object_selector_update_results=function(type,result,initial){var $container=this,$results=$container.find('.results'),$select=$container.find('select'),$noresults=$('.no-result',this),selection=[];this.find(':radio:checked, :checkbox:checked').not('.protected').each(function(){selection.push($(this).val())});this.find(':radio:not(:checked), :checkbox:not(:checked)').not('.protected').closest('.radio, .checkbox').remove();$select.find('option:not(:checked)').not('.protected').remove();$noresults.toggleClass('hidden',selection.length!==0);$.each(result,function(key,value){var current=value.object_type+':'+value.object_id;if(-1===selection.indexOf(current)){if(initial){$._object_selector_add_item(type,$select,$([]),current,value.title,!1)}else{$._object_selector_add_item(type,$select,$results,current,value.title,!1)}}else{$("option[value='"+current+"']",$select).text(value.title)}});$select.trigger('chosen:updated')};$.fn.object_selector=function(action,value,title){var args=arguments;this.each(function(){var input=this,$simple=$(this).prev(),filter=$(input).data('filters'),threshold=$(input).data('threshold'),format=$(input).data('format')||'',parentobject=$(input).data('parent'),parentkey=$(input).data('parentkey');$(input).addClass('primary').hide();$simple.hide();var $spinner=$(this).parent(),$container=$(input).closest('.object-selector'),$select=$container.find('select').first(),$filter=$container.find(':text.filter').first(),$search=$container.find('button.search').first(),$panel=$container.find('.panel').first();if(action==='set'){$select.val(value);if($select.val()!==value&&title){try
{var titleObj=JSON.parse(title);var titleArr=$.map(titleObj,function(el){return el});title=titleArr.join(" / ")}
catch(e)
{}
$._object_selector_add_item('radio',$select,$container.find('.results'),value,title,!0);$select.trigger('chosen:updated')}
$(input).val(value).data('label',title).change();return}
if(action==='setfilter'){filter[args[1]]=args[2];$(input).data('filters',filter);$container.find('.too-many').hide();$search.click();return}
if(parentobject&&parentkey){filter[parentkey]=$(parentobject).val();$(parentobject).on('change',function(){$(input).object_selector('setfilter',parentkey,$(this).val())})}
if(threshold!==-1){$spinner.tikiModal(" ");loadSelectorData(filter,{maxRecords:threshold,format:format},function(data){$container._object_selector_update_results('radio',data.resultset.result,!0);$spinner.tikiModal();if(data.resultset.count<=threshold){$select.parent().removeClass('hidden')}else{$panel.removeClass('hidden')}})}else{$panel.removeClass('hidden')}
$panel.on('click',':radio',function(){if($(this).is(':checked')){$(input).object_selector('set',$(this).val(),$(this).parent().text())}});$(input).change(function(){var val=$(this).val(),id=null;if(val){var splitarray=val.split(':');id=splitarray[1];if(splitarray.length>2){for(var i=2;i<splitarray.length;i++)
{id=id+':'+splitarray[i]}}}
if($simple.val()!=id){$simple.val(id).change()}});$simple.change(function(){var target=filter.type+':'+$(this).val();if(filter.type&&$(input).val()!=target){$(input).val(target).change()}});$select.change(function(){if($(input).val()!=$select.val()){$(input).data('label',$select.find('option:selected').text());$(input).val($select.val()).change()}});$search.click(function(e){e.preventDefault();$spinner=$filter.parent().tikiModal(" ");loadSelectorData($.extend(filter,{title:$filter.val()}),{format:format},function(data){$container._object_selector_update_results('radio',data.resultset.result,!1);$spinner.tikiModal()})});$filter.keypress(function(e){if(e.which===13){e.preventDefault();$search.click()}})});return this};$.fn.object_selector_multi=function(action){var args=arguments;this.each(function(){var $textarea=$(this).hide().addClass('primary'),$container=$(this).closest('.object-selector-multi'),$select=$container.find('select'),$simpleinput=$textarea.prev(':text').hide(),$basic=$container.find('.basic-selector'),$panel=$container.find('.panel'),$search=$container.find('button.search').first(),$filter=$container.find(':text.filter').first(),filter=$textarea.data('filters'),threshold=$textarea.data('threshold'),format=$textarea.data('format')||'',parentobject=$textarea.data('parent'),parentkey=$textarea.data('parentkey'),sort=$textarea.data('sort')||'',initialValues=$select.val(),separator=$simpleinput.data('separator');if(action==='setfilter'){filter[args[1]]=args[2];$textarea.data('filters',filter);$container.find('.too-many').hide();$search.click();return}
if(parentobject&&parentkey){filter[parentkey]=$(parentobject).val();$(parentobject).on('change',function(){$textarea.object_selector_multi('setfilter',parentkey,$(this).val())})}
if(threshold!==-1){$container.tikiModal(' ');loadSelectorData(filter,{maxRecords:threshold,format:format,sort_order:sort},function(data){$container.tikiModal('');$container._object_selector_update_results('checkbox',data.resultset.result,!0);if(data.resultset.count<=threshold){$basic.removeClass('hidden')}else{$panel.removeClass('hidden')}})}else{$panel.removeClass('hidden')}
$filter.keypress(function(e){if(e.which===13){e.preventDefault();$search.click()}});$search.click(function(e){e.preventDefault();var $spinner=$filter.parent().tikiModal(" ");loadSelectorData($.extend(filter,{title:$filter.val()}),{format:format,sort_order:sort},function(data){$container._object_selector_update_results('checkbox',data.resultset.result,!1);$spinner.tikiModal()})});$panel.on('click',':checkbox',function(){var list=$.makeArray($container.find(':checkbox:checked').map(function(){return $(this).val()}));$textarea.val(list.join("\n")).change()});$select.on('change',function(){var list=$(this).val()||[];$textarea.val(list.join("\n")).change()});if(separator){$textarea.on('change',function(){var lines=$(this).val().split("\n"),ids=[];$.each(lines,function(k,line){var parts=line.split(':');if(parts.length===2){ids.push(parts[1])}});$simpleinput.val(ids.join(separator)).change()})}})};$.fn.sortList=function(){var list=$(this),items=list.children('li').get();items.sort(function(a,b){var compA=$(a).text().toUpperCase();var compB=$(b).text().toUpperCase();return(compA<compB)?-1:(compA>compB)?1:0});$.each(items,function(idx,itm){list.append(itm)})};$.localStorage={store:function(key,value){var fullKey=this._build(key);if(window.localStorage){if(value){window.localStorage[fullKey]=$.toJSON({date:Date.now(),data:value})}else{delete window.localStorage[fullKey]}}},load:function(key,callback,fetch,duration){var payload,fullKey=this._build(key);if(window.localStorage&&window.localStorage[fullKey]){payload=JSON.parse(window.localStorage[fullKey]);if(duration){if(payload.date+duration*1000<Date.now()){fetch(function(data){$.localStorage.store(key,data);callback(data)});return}}
callback(payload.data)}else{fetch(function(data){$.localStorage.store(key,data);callback(data)})}},_build:function(key){return key+"_2"}};var favoriteList=[];$.fn.favoriteToggle=function(){this.each(function(){var type,obj,isFavorite,link=this;type=$(this).queryParam('type');obj=$(this).queryParam('object');isFavorite=function(){var ret=!1;$.each(favoriteList,function(k,v){if(v===type+':'+obj){ret=!0;return!1}});return ret};$(this).find('span').remove();$(this).prepend($('<span />').attr({'class':isFavorite()?'fa fa-star fa-fw':'fa fa-star-o fa-fw','title':isFavorite()?tr('Remove from favorites'):tr('Add to favorites')}));if(isFavorite()){$(this).addClass('favorite_selected');$(this).removeClass('favorite_unselected')}else{$(this).addClass('favorite_unselected');$(this).removeClass('favorite_selected')}
$(this).filter(':not(".register")').addClass('register').click(function(){$.post($(this).attr('href'),{target:isFavorite()?0:1},function(data){favoriteList=data.list;$.localStorage.store($(link).data('key'),favoriteList);$(link).favoriteToggle()},'json');return!1})});return this};$.fn.queryParam=function(name){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regex=new RegExp("[\\?&]"+name+"=([^&#]*)");var results=regex.exec(this[0].href);if(results==null){return ""}else{return decodeURIComponent(results[1].replace(/\+/g," "))}};$(function(){var list=$('.favorite-toggle');if(list.length>0){$.localStorage.load(list.data('key'),function(data){favoriteList=data;list.favoriteToggle().removeClass('favorite-toggle')},function(recv){$.getJSON($.service('favorite','list'),recv)},3600)}});$document.ajaxComplete(function(){$('.favorite-toggle').favoriteToggle().removeClass('favorite-toggle')});$document.ajaxError(function(event,jqxhr,settings,thrownError){$(".modal.fade.in").modal("hide");var message;if(!thrownError&&jqxhr.status!==200){if(jqxhr.status){message=jqxhr.status+" "+jqxhr.statusText}else{message="AJAX: "+jqxhr.statusText+" "+jqxhr.status+" ("+jqxhr.state()+") for URL: "+settings.url}}
if(message){$("#tikifeedback").showError(message)}});$.fn.showBusy=function($spinner){if(!$spinner){var pos=$(this).position();$spinner=$("<img src='img/spinner.gif' alt='"+tr("Wait")+"' class='ajax-spinner' />").css({"position":"absolute","top":pos.top+($(this).height()/2),"left":pos.left+($(this).width()/2)-8}).data("target",this);$(this).parent().find(".ajax-spinner").remove();$(this).parent().append($spinner);$(this).attr("disabled",!0).css("opacity",0.5);return $spinner}else{$($spinner.data("target")).attr("disabled",!1).css("opacity",1);$spinner.remove();return null}}})(jQuery);if(window.attachEvent&&!window.addEventListener){window.attachEvent("onunload",function(){for(var id in jQuery.cache){var item=jQuery.cache[id];if(item.handle){if(item.handle.elem===window){for(var type in item.events){if(type!=="unload"){try{jQuery.event.remove(item.handle.elem,type)}catch(e){}}}}else{try{jQuery.event.remove(item.handle.elem)}catch(e){}}}}})}
$.tikiModal=function(msg){return $('body').tikiModal(msg)};$.fn.tikiModal=function(msg){var obj=$(this);if(!obj.length){return null}
var lastModal=obj.data('lastModal');if(!lastModal){lastModal=Math.floor(Math.random()*1000);obj.data('lastModal',lastModal)}
var box={top:obj.offset().top,left:obj.offset().left,height:obj.outerHeight(),width:obj.outerWidth()};var modal=$('body').find('#modal_'+lastModal);var spinner=$('<img src="img/spinner.gif" style="vertical-align: top; margin-right: .5em;" />');if(!msg){modal.fadeOut(function(){$(this).remove()});obj.removeData('lastModal');return obj}
if(modal.length){modal.find('.dialog').empty().html(spinner).append(msg);return obj}
modal=$('<div id="modal_'+lastModal+'" class="tiki-modal">'+'<div class="mask" />'+'<div class="dialog"></div>'+'</div>').appendTo('body');var zIndex=0;if(obj.is("body")){zIndex=2147483646-1;box.top=obj.offset().top+$window.scrollTop();box.left=obj.offset().left+$window.scrollLeft()}else{obj.parents().addBack().each(function(){var z=$(this).css("z-index");if(z&&z!=='auto'&&z>zIndex){zIndex=Number(z)}})}
modal.width(box.width).height(box.height).css('top',box.top+'px').css('left',box.left+'px').find('.mask').height(box.height).fadeTo(1000,0.6).parent().find('.dialog').append(spinner).append(msg);var dialog=modal.find('.dialog');dialog.css({marginTop:(dialog.height()/-2)+"px",marginLeft:(dialog.width()/-2)+"px"});if(zIndex){modal.css("z-index",zIndex+1)}
return obj};$.fn.valWidth=function(){var me=$(this);return me.ready(function(){var h=me.height();if(!h){h=me.offsetParent().css("font-size");if(h){h=parseInt(h.replace("px",""))}}
me.keyup(function(){var width=me.val().length*h;me.stop().animate({width:(width>h?width:h)},200)}).keyup()})};$.paginationHelper=function(){$('.pagenums').each(function(){var me=$(this);var step=me.find('input.pagenumstep');var endOffset=(me.find('input.pagenumend').val()-1)*step.data('step');var url=step.data('url');var offset_jsvar=step.data('offset_jsvar');var offset_arg=step.data('offset_arg');me.find('span.pagenumstep').replaceWith($('<input type="text" style="font-size: inherit; " />').val(step.val()).change(function(){var newOffset=step.data('step')*($(this).val()-1);if(newOffset>=0){newOffset=(newOffset>endOffset?endOffset:newOffset);window[offset_jsvar]=newOffset;if(step[0]){if(step.attr('onclick')){step[0].onclick();return}}
document.location=url+offset_arg+"="+newOffset}}).keyup(function(e){switch(e.which){case 13:$(this).blur()}}).valWidth())})};$.fn.visible=function(fn,isOne){if(fn){$(this).each(function(){var me=$(this);if(isOne){me.one('visible',fn)}else{me.on('visible',fn)}
function visibilityHelper(){if(!me.is(':visible')){setTimeout(visibilityHelper,500)}else{me.trigger('visible')}}
visibilityHelper()})}else{$(this).trigger('visible')}
return this};$.download=function(url,data,method){if(url&&data){data=typeof data=='string'?data:jQuery.param(data);var inputs='';jQuery.each(data.split('&'),function(){var pair=this.split('=');inputs+='<input type="hidden" name="'+pair[0]+'" value="'+pair[1]+'" />'});jQuery('<form action="'+url+'" method="'+(method||'post')+'">'+inputs+'</form>').appendTo('body').submit().remove()}};$.uiIcon=function(type){return $('<div style="width: 1.4em; height: 1.4em; margin: .2em; display: inline-block; cursor: pointer;">'+'<span class="ui-icon ui-icon-'+type+'">&nbsp;</span>'+'</div>').hover(function(){$(this).addClass('ui-state-highlight')},function(){$(this).removeClass('ui-state-highlight')})};$.uiIconButton=function(type){return $.uiIcon(type).addClass('ui-state-default ui-corner-all')};$.rangySupported=function(fn){if(window.rangy){rangy.init();var cssClassApplierModule=rangy.modules.CssClassApplier;return fn()}};$.fn.rangy=function(fn){var me=$(this);$.rangySupported(function(){$document.mouseup(function(e){if(me.data('rangyBusy'))return;var selection=rangy.getSelection();var html=selection.toHtml();var text=selection.toString();if(text.length>3&&rangy.isUnique(me[0],text)){if(fn)
if($.isFunction(fn))
fn({text:text,x:e.pageX,y:e.pageY})}})});return this};$.fn.rangyRestore=function(phrase,fn){var me=$(this);$.rangySupported(function(){phrase=rangy.setPhrase(me[0],phrase);if(fn)
if($.isFunction(fn))
fn(phrase)});return this};$.fn.rangyRestoreSelection=function(phrase,fn){var me=$(this);$.rangySupported(function(){phrase=rangy.setPhraseSelection(me[0],phrase);if(fn)
if($.isFunction(fn))
fn(phrase)});return this};$.fn.realHighlight=function(){var o=$(this);$.rangySupported(function(){rangy.setPhraseBetweenNodes(o.first(),o.last(),document)});return this};$.fn.ajaxEditDraw=function(options){var me=$(this).attr('href','tiki-ajax_services.php');options=$.extend({saved:function(){},closed:function(){}},options);$.tikiModal(tr('Loading editor'));me.serviceDialog({title:me.attr('title'),data:{controller:'draw',action:'edit',fileId:me.data('fileid'),galleryId:me.data('galleryid'),imgParams:me.data('imgparams'),raw:!0},modal:!0,zIndex:9999,fullscreen:!0,load:function(data){if(me.data('drawLoaded'))return!1;me.data('drawLoaded',!0);me.drawing=$('#tiki_draw').loadDraw({fileId:me.data('fileid'),galleryId:me.data('galleryid'),name:me.data('name'),imgParams:me.data('imgparams'),data:$('#fileData').val()}).on('savedDraw',function(e,o){me.data('drawLoaded',!1);me.drawing.parent().dialog('destroy');me.drawing.remove();var img=$('.pluginImg'+me.data('fileid')).show();if(img.length<1)document.location=document.location+'';var w=img.width(),h=img.height();if(img.hasClass('regImage')){var replacement=$('<div />').attr('class',img.attr('class')).attr('style',img.attr('style')).attr('id',img.attr('id')).insertAfter(img);img.remove();img=replacement}
var src=me.data('src');$('<div class=\"svgImage\" />').load(src?src:'tiki-download_file.php?fileId='+o.fileId+'&display',function(){$(this).css('position','absolute').fadeTo(0,0.01).prependTo('body').find('img,svg').scaleImg({width:w,height:h});img.html($(this).children());$(this).remove()});if(!options.saved)return;options.saved(o.fileId);me.data('fileid',o.fileId);if(o.imgParams&&o.imgParams.fileId){o.imgParams.fileId=o.fileId;me.data('imgparams',o.imgParams)}}).submit(function(){me.drawing.saveDraw();return!1}).on('loadedDraw',function(){me.drawing.parent().css('padding','0px');var serviceDialog=me.data('serviceDialog');if(serviceDialog){var drawFrame=$('#svgedit');serviceDialog.on('dialogresize',function(){drawFrame.height(serviceDialog.height()-4)}).trigger('dialogresize')}
$.tikiModal()});me.drawing.find('#drawMenu').remove()},close:function(){if(me.data('drawLoaded')){me.data('drawLoaded',!1);me.drawing.remove();if(!options.closed)return;options.closed(me)}}});return!1};$.notify=function(msg,settings){settings=$.extend({speed:10000},settings);var notify=$('#notify');if(!notify.length){notify=$('<div id="notify" />').css('top','5px').css('right','5px').css('position','fixed').css('z-index',9999999).css('padding','5px').width($window.width()/5).prependTo('body')}
var note=$('<div class="notify ui-state-error ui-corner-all ui-widget ui-widget-content" />').append(msg).css('padding','5px').css('margin','5px').mousedown(function(){return!1}).hover(function(){$(this).stop().fadeTo(500,0.3)},function(){$(this).stop().fadeTo(500,1)}).prependTo(notify);setTimeout(function(){note.fadeOut().slideUp();setTimeout(function(){note.remove()},1000)},settings.speed)};function delayedExecutor(delay,callback)
{var timeout;return function(){var args=arguments;if(timeout){clearTimeout(timeout);timeout=null}
timeout=setTimeout(function(){callback.apply(this,args)},delay)}}
$(function(){$(".toggle_zone").click(function(){var $this=$(this),zone="",icon_left="toggle-left",icon_right="toggle-right";if($this.is(".right")){zone="right";icon_left="toggle-right";icon_right="toggle-left"}else if($this.is(".left")){zone="left"}
if($this.find(".icon-"+icon_left).length){$this.find(".icon").setIcon(icon_right);setCookie("hide_zone_"+zone,'y');$("body").addClass("hide_zone_"+zone)}else{$this.find(".icon").setIcon(icon_left);deleteCookie("hide_zone_"+zone);$("body").removeClass("hide_zone_"+zone)}
return!1})});$.fn.moveToWithinWindow=function(){var $el=$(this);var h=$el.height(),w=$el.width(),o=$el.offset(),po=$el.parent().offset(),st=$window.scrollTop(),sl=$window.scrollLeft(),wh=$window.height(),ww=$window.width();if(w+o.left>sl+ww){$el.animate({'left':sl+ww-w-po.left},'fast')}
if(h+o.top>st+wh){$el.animate({'top':st+wh-(h>wh?wh:h)-po.top},'fast')}else if(o.top<st){$el.animate({'top':st-po.top},'fast')}};$.fn.scaleImg=function(max){$(this).each(function(){var h,w,img=$(this),actual={height:img.height(),width:img.width()},original=$(this).clone(),parent=img.parent();var winner='';if(actual.height>max.height){winner='height'}else if(actual.width>max.width){winner='width'}
if(winner){var g=img.find('g');if(g.length){img.attr('preserveAspectRatio','xMinYMin meet');parent.css('overflow','hidden').width(max.width).height(max.height);g.attr('transform','scale( '+(100/(actual[winner]/max[winner])*0.01)+' )')}else{if(actual.height>actual.width){h=max.height;w=Math.ceil(actual.width/actual.height*max.height)}else{w=max.width;h=Math.ceil(actual.height/actual.width*max.width)}
img.css({height:h,width:w})}
img.css('cursor',"url(img/icons/zoom.gif),auto").click(function(){$('<div/>').append(original).dialog({modal:!0,width:Math.min($(window).width(),actual.width+20),height:Math.min($(window).height(),actual.height+50)});return!1})}});return this};$.curCSS=function(element,property){return $(element).css(property)};$.fn.registerFacet=function(){this.each(function(){var element=this,entries=$($(this).data('for')).val().split(" "+$(this).data('join')+" ").map(function(value){return(value.charAt(0)==='"')?value.substr(1,value.length-2):value});function applyFilter(value){if(value){value=$.makeArray(value);value=value.map(function(value){return(-1===value.indexOf(' '))?value:('"'+value+'"')}).join(" "+$(element).data('join')+" ")}
$($(element).data('for')).val(value).change()}
if($(element).is('select')){$(this).val(entries).trigger("chosen:updated").change(function(){var value=$(this).val();applyFilter(value)})}else if($(element).has(':checkbox').length){$(':checkbox',element).each(function(){if(-1!==$.inArray($(this).val(),entries)){$(this).prop('checked',!0)}}).on('click',function(){applyFilter($(':checked',element).map(function(){return $(this).val()}))})}
var selected=$('option:selected, :checkbox:checked',this).length,all=$('option, :checkbox',this).length;if(all===1&&selected===0){$(this).closest('.facet-hide-group').hide()}});return this};$.fn.reload=function(){this.each(function(){if(this.reload){this.reload()}else if($(this).data('reload')){$(this).loadService({},{url:$(this).data('reload')})}});return this};$(document).on('mouseover','.media[data-href]',function(){$(this).css('cursor','pointer')});$(document).on('mouseout','.media[data-href]',function(){$(this).css('cursor','default')});$(document).on('click','.media[data-href]',function(){document.location.href=$(this).data('href')});$(document).on('hidden.bs.modal','.footer-modal.fade',function(){$(this).removeData('bs.modal').find('.modal-content').empty();$('body').toggleClass('modal-open',$('.modal.fade.in').length>0)});$(document).on('submit','.modal-body form:not(.no-ajax)',ajaxSubmitEventHandler(function(data){if(data.FORWARD){$(this).children().remove();$(this).loadService(data.FORWARD,{origin:this});$(this).closest('.modal').trigger('tiki.modal.redraw')}else{document.location.href=document.location.href.replace(/#.*$/,"")}}));$(document).on('click','[data-toggle=modal][data-size]',function(){var target=$(this).data('target'),size=$(this).data('size');$(target).one('hidden.bs.modal',function(){$('.modal-dialog',this).removeClass(size)}).find('.modal-dialog').addClass(size)});$(document).on('click','[data-toggle=modal][data-modal-title]',function(){var target=$(this).data('target'),title=$(this).data('modal-title');$(target).one('loaded.bs.modal',function(){$('.modal-title',this).text(title)})});$(document).on('loaded.bs.modal','.modal.fade',function(){$(this).trigger('tiki.modal.redraw')});$(document).on('shown.bs.modal','.modal',function(){$('.modal-body :input',this).first().focus();$('.modal-backdrop',this).slice(1).remove();if($.applyChosen){$(this).applyChosen()}
if($("#timer-seconds",this).length){var $seconds=$("#timer-seconds"),counter=$seconds.text(),timer=setInterval(function(){$seconds.text(--counter);if(counter==0||counter<0){$.closeModal();window.location=window.location.href}},1000)}});$(document).on('tiki.modal.redraw','.modal.fade',function(){var modal=this,$button;$('.modal-footer .auto-btn',modal).remove();$('div.submit .btn',modal).each(function(){var $submit=$(this);if($submit.is('a:not(.custom-handling)')){$button=$submit}else{$submit.hide();$button=$('<button>').text($submit.val()||$submit.text()).attr('class',$submit.attr('class')).addClass('auto-btn').click(function(){$submit.click();if(typeof $submit.parents("form").validate!=="function"){$button.off("click").css("opacity",0.3)}})}
$('.modal-footer',modal).append($button)});if($.fn.flexibleSyntaxHighlighter){$('textarea',modal).flexibleSyntaxHighlighter()}
$(".nav-tabs",this).each(function(){if($(".active",this).length===0){$("li:first-child a",this).tab("show")}});if($.applyChosen){$(this).applyChosen()}});$(document).on("ready tiki.modal.redraw",function(){$(".depends").each(function(){var $depends=$(this),on=$depends.data("on");$("[name="+on+"]").change(function(){if($(this).is("input[type=checkbox]")&&$(this).is(":checked")){$depends.show()}else{$depends.hide()}}).change()})});$(function(){var $tabs=$('a[data-toggle=tab][href="'+document.location.hash+'"]'),tabShown=!1,notShown=[];if(document.location.search.match(/cookietab=/)){tabShown=!0}else if(document.location.hash&&$tabs.length){$tabs.tab('show');tabShown=!0}else{$(".tabs").each(function(){var name=$(this).data("name"),t=getCookie(name,"tabs","notfound");var $tab=$('.active > a[data-toggle=tab]',this);if(t&&$tab.length===0){$tab=$('a[data-toggle=tab][href="'+t+'"]')}
if($tab.length){$tab.tab('show');tabShown=!0}else if(name){notShown.push(name)}})}
if(typeof $().tab==="function"){if(!tabShown&&!notShown.length){$("a[data-toggle=tab]:first").tab("show")}else if(notShown.length){for(var i=0;i<notShown.length;i++){$(".tabs[data-name="+notShown[i]+"] a[data-toggle=tab]:first").tab("show")}}}
$('a[data-toggle="tab"]').on('show.bs.tab',function(e){if($(this).parents(".tab-content").length===0){document.location.hash=$(e.target).attr("href")}
setCookieBrowser($(this).parents(".tabs:first").data("name"),$(e.target).attr("href"),"tabs")}).click(function(){var scroll=$window.scrollTop();$(this).tab('show');$window.scrollTop(scroll)})});$.openModal=function(options){var href=options.remote,$target;var backdrop=options.backdrop?options.backdrop:!0;var keyboard=options.keyboard!='undefined'?options.keyboard:!0;if(-1===href.indexOf('?')){href+='?modal=1'}else{href+='&modal=1'}
$target=$('.modal.fade:not(.in)').first().one('loaded.bs.modal',options.open||function(){}).one('hidden.bs.modal',options.close||function(){}).modal({remote:href,backdrop:backdrop,keyboard:keyboard});if(options.title){$target.one('loaded.bs.modal',function(){$('.modal-title',this).text(options.title)})}
if(options.size){$target.find('.modal-dialog').addClass(options.size);$target.one('hidden.bs.modal',function(){$('.modal-dialog',this).removeClass(options.size)})}};$.closeModal=function(options){options=options||{};var done=options.done;if(done){done=function(){setTimeout(options.done,0)}}
$('.modal.fade.in').last().one('hidden.bs.modal',done||function(){}).modal('hide')};$.fn.clickModal=function(options){this.click($.clickModal(options));return this};$.clickModal=function(options,href){return function(e){var control=this,url;if(!href){url=$(this).attr('href')}else{url=href}
if($.isFunction(e.preventDefault)){e.preventDefault()}
$.openModal({title:options.title,size:options.size,remote:url,open:function(){if(options.open){options.open.apply(this,[])}
$('form:not(.no-ajax)',this).addClass('no-ajax').submit(ajaxSubmitEventHandler(function(data){if(options.success){options.success.apply(control,[data])}}))}})}};function showTab(tabNumber){var thisTabId=$('#col1').find('.tab-pane.active').attr('id'),tabNames=thisTabId.substr(0,thisTabId.indexOf('-')+1);$('a[href="#'+tabNames+tabNumber+'"]').tab('show')}
function feedback(mes,type,modal,title,icon,disablescroll,killall,custom)
{mes=mes||[];if(!$.isArray(mes)){mes=[mes]}
if(mes.length==1){var meshtml='<ul class="list-unstyled">'}else{var meshtml='<ul>'}
$.each(mes,function(i,val){meshtml+='<li>'+val+'</li>'});meshtml+='</ul>';type=type||'info';modal=modal||!1;disablescroll=disablescroll||!1;killall=killall||!1;custom=$(custom).length?$(custom).first():null;var target,map={'error':{title:tr('Error'),class:'danger',icon:'error'},'warning':{title:tr('Warning'),class:'warning',icon:'warning'},'success':{title:tr('Success'),class:'success',icon:'success'},'info':{title:tr('Note'),class:'info',icon:'information'}};var check=['error','warning','success','info'];type=$.inArray(type,check)>-1?type:'info';title=title||map[type].title;icon=icon||map[type].icon;icon=$.fn.getIcon(icon);if(modal){if(mes.length>0){meshtml='<div class="alert alert-dismissable alert-'+map[type]['class']+'">'+meshtml+'</div>'}else{meshtml=''}
target=$('.modal.fade:not(.in)').first();$('.modal-content',target).html('<div class="modal-header">'+'<button type="button" class="close" data-dismiss="modal">x</button>'+'<h4 class="text-'+map[type]['class']+'">'+icon[0].outerHTML+' '+title+'</h4>'+'</div>'+'<div class="modal-body">'+meshtml+'</div>');target.modal()}else{if(killall){$(custom?custom:'div#tikifeedback').find('div.alert.alert-dismissable').remove()}
if(mes.length==0){meshtml=''}
$(custom?custom:'div#tikifeedback').append('<div class="alert alert-dismissable alert-'+map[type]['class']+'">'+'<button type="button" class="close" data-dismiss="modal">x</button>'+'<h4 class="text-'+map[type]['class']+'">'+icon[0].outerHTML+' '+title+'</h4>'+meshtml+'</div>').on('click','button.close',function(){$(this).parent().remove()});if(!disablescroll){$('html, body').animate({scrollTop:$(custom?custom:'div#tikifeedback').offset().top},500)}}}
$.fn.clickInline=function(container,options){this.click($.clickInline(container,options));return this};$.clickInline=function(container,options,href){return function(e){var control=this,url;if(!href){url=$(this).attr('href')}else{url=href}
if($.isFunction(e.preventDefault)){e.preventDefault()}
var $this=$(this);$this.hide();$.get(url,function(data){if(container instanceof jQuery){container.html("");container.append(data);if(options.open){options.open.apply(this,[])}}
$this.parent().find('.inline.file-uploader').submit(function(e,data){e.preventDefault();if(options.success){options.success.apply(control,[data])}
return!1})})}};window.regCapsLock=function(){};$.ajaxPrefilter(function(options,originalOptions,jqXHR){if(options.dataType=='script'||originalOptions.dataType=='script'){options.cache=!0}});function readURL(input){if(input.files&&input.files[0]){$(".btn-upload-avatar").removeClass('disabled');var reader=new FileReader();reader.onload=function(e){$('.user-avatar-preview img').attr('src',e.target.result)}
reader.readAsDataURL(input.files[0])}}
$(document).on('change','#userfile',function(){readURL(this)});function objectLockToggle(icon){var $this=$(icon).tikiModal(" "),action=$this.data("is_locked")?"unlock":"lock";$.post($.service("object",action,{type:$this.data("type"),object:$this.data("object"),value:$this.data("is_locked")?"":jqueryTiki.username}),function(data){if(data&&data.locked){$this.find(".icon").setIcon("lock");$this.data("is_locked","1").attr("title",tr("Locked by "+jqueryTiki.userRealName)).parent().find("input[name=locked]").val(jqueryTiki.username)}else{$this.find(".icon").setIcon("unlock");$this.data("is_locked","").attr("title","").parent().find("input[name=locked]").val("")}},"json").done(function(){$this.tikiModal()});return!1}(function setup_removediacritics_function(){var 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\u014d','O':'\u00d3\u00d2\u00d4\u00d5\u00d6\u014c','ss':'\u00df','SS':'\u1e9e','u':'\u00fa\u00f9\u00fb\u00fc\u016f','U':'\u00da\u00d9\u00db\u00dc\u016e'};var characterRegex,characterRegexArray;function removeDiacritics(str){var chr,acc='[',eq=characterEquivalents;if(!characterRegex){characterRegexArray={};for(chr in eq){if(typeof chr==='string'){acc+=eq[chr];characterRegexArray[chr]=new RegExp('['+eq[chr]+']','g')}}
characterRegex=new RegExp(acc+']')}
if(characterRegex.test(str)){for(chr in eq){if(typeof chr==='string'){str=str.replace(characterRegexArray[chr],chr)}}}
return str}
window.removeDiacritics=removeDiacritics})();setTimeout(function(){$('.timeout').click(function(){feedback([tr('The security ticket for this form has timed out. Please copy any edits you do not want to lose and reload the page to try submitting again.')],'warning',!0,tr('Security ticket timed out'));target=$('.modal.fade:not(.in)').first();$('.modal-body',target).after('<div class="modal-footer">'+'<a href="#" onclick="$.closeModal();return false;" class="btn btn-default">'+tr('Close')+'</a>'+'<a href="'+location.href+'" onclick="location.reload();return false;" class="btn btn-primary">'+tr('Reload')+'</a>'+'</div>');return!1})},1000*60*15);$(document).ajaxComplete(function(e,jqxhr){var feedback=jqxhr.getResponseHeader('X-Tiki-Feedback'),tfb=$('#tikifeedback');if(feedback){feedback=decodeURIComponent(feedback);tfb.fadeIn(200,function(){tfb.html($($.parseHTML(feedback)).filter('#tikifeedback').html());var title=tfb.find('span.rboxtitle').text().trim(),content=tfb.find('div.rboxcontent').text().trim();tfb.find('span.rboxtitle').text(title);tfb.find('div.rboxcontent').text(content);if(tfb.offset().top<$(window).scrollTop()){tfb.find('div.rboxcontent').after('<div id="move-message" style="font-size:smaller;margin-top:10px"><em>'+tr('This message will move to the top of the page after a few seconds.')+'</em>');tfb.offset({'top':$(window).scrollTop()});tfb.css('z-index',3000);setTimeout(function(){tfb.fadeOut(1000,function(){$('div#col1').prepend(tfb);tfb.css({'z-index':'','position':'','top':''});tfb.find('div#move-message').css('visibility','hidden');tfb.fadeIn()})},5000)}})}
tfb.find('.clear').on('click',function(){$(tfb).empty();$('div#col1').prepend(tfb);tfb.css({'z-index':'','position':'','top':''});return!0})});
/* rank:50standard - minify:ok. lib/jquery_tiki/tiki-maps.js */
(function(){var mapNumber=0,currentProtocol=document.location.protocol;if(currentProtocol!='http:'&&currentProtocol!='https:'){currentProtocol='https:'}
function delayedExecutor(delay,callback)
{var timeout;return function(){if(timeout){clearTimeout(timeout);timeout=null}
timeout=setTimeout(callback,delay)}}
function getBaseLayers()
{var layers=[],tiles=jqueryTiki.mapTileSets,factories={openstreetmap:function(){return new OpenLayers.Layer.OSM()},mapquest_street:function(){return new OpenLayers.Layer.XYZ("MapQuest OpenStreetMap","http://otile1.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png",{sphericalMercator:!0})},mapquest_aerial:function(){return new OpenLayers.Layer.XYZ("MapQuest Open Aerial","http://oatile1.mqcdn.com/tiles/1.0.0/sat/${z}/${x}/${y}.png",{sphericalMercator:!0})},google_street:function(){return new OpenLayers.Layer.Google("Google Streets",{numZoomLevels:20})},google_satellite:function(){return new OpenLayers.Layer.Google("Google Satellite",{type:google.maps.MapTypeId.SATELLITE,numZoomLevels:22})},google_hybrid:function(){return new OpenLayers.Layer.Google("Google Hybrid",{type:google.maps.MapTypeId.HYBRID,numZoomLevels:20})},google_physical:function(){return new OpenLayers.Layer.Google("Google Physical",{type:google.maps.MapTypeId.TERRAIN})},blank:function(){var layer=new OpenLayers.Layer.OSM(tr('Blank'));layer.isBlank=!0;return layer}};if(tiles.length===0){tiles.push('openstreetmap')}
$.each(tiles,function(k,name){var f=factories[name];if(f){layers.push(f())}});return layers}
function parseCoordinates(value){var matching=value.match(/^(-?[0-9]*(\.[0-9]+)?),(-?[0-9]*(\.[0-9]+)?)(,(.*))?$/);if(matching){var lat=parseFloat(matching[3]);var lon=parseFloat(matching[1]);var zoom=matching[6]?parseInt(matching[6],10):0;return{lat:lat,lon:lon,zoom:zoom}}
return null}
function writeCoordinates(lonlat,map,fixProjection){var original=lonlat;if(fixProjection){lonlat=lonlat.transform(map.getProjectionObject(),new OpenLayers.Projection("EPSG:4326"));if(lonlat.lon<0.01&&lonlat.lat<0.01){lonlat=original}}
return formatLocation(lonlat.lat,lonlat.lon,map.getZoom())}
function formatLocation(lat,lon,zoom)
{var strLon=''+lon;strLon.replace(',','.');var strLat=''+lat;strLat.replace(',','.');return strLon+','+strLat+','+zoom}
$.fn.createMap=function(){this.each(function(){var id=$(this).attr('id'),container=this,desiredControls;$(container).css('background','white');desiredControls=$(this).data('map-controls');if(desiredControls===undefined){desiredControls='controls,layers,search_location,current_location,streetview,navigation'}
desiredControls=desiredControls.split(',');var setupHeight=function(){var height=$(container).height();if(0===height){height=$(container).width()/4.0*3.0}
$(container).closest('.height-size').each(function(){height=$(this).data('available-height');$(this).css('padding',0);$(this).css('margin',0)});$(container).height(height)};setupHeight();$(window).resize(setupHeight);if(!id){++mapNumber;id='openlayers'+mapNumber;$(this).attr('id',id)}
setTimeout(function(){OpenLayers.ImgPath="lib/openlayers/theme/dark/";var map=container.map=new OpenLayers.Map(id,{controls:[],theme:null});var layers=getBaseLayers();var getColor=function(feature,intent,type){return feature.attributes[intent+"-"+type+"-color"]||feature.attributes[intent+"-color"]||feature.attributes[type+"-color"]||feature.attributes.color||"#6699cc"};var getStyleAttribute=function(feature,intent,type,def){return feature.attributes[intent+"-"+type]||feature.attributes[type]||def};container.defaultStyleMap=new OpenLayers.StyleMap({"default":new OpenLayers.Style(OpenLayers.Util.applyDefaults({cursor:"pointer"},OpenLayers.Feature.Vector.style['default']),{context:{getFillColor:function(feature){return getColor(feature,"default","fill")},getStrokeColor:function(feature){return getColor(feature,"default","stroke")},getStrokeWidth:function(feature){return getStyleAttribute(feature,"default","stroke-width",3)},getStrokeDashstyle:function(feature){return getStyleAttribute(feature,"default","stroke-dashstyle","solid")},getPointRadius:function(feature){return getStyleAttribute(feature,"default","point-radius",5)},getFillOpacity:function(feature){return getStyleAttribute(feature,"default","fill-opacity",0.5)},getStrokeOpacity:function(feature){return getStyleAttribute(feature,"default","stroke-opacity",0.9)}}}),"select":new OpenLayers.Style(OpenLayers.Util.applyDefaults({cursor:"pointer"},OpenLayers.Feature.Vector.style.select),{context:{getFillColor:function(feature){return getColor(feature,"select","fill")},getStrokeColor:function(feature){return getColor(feature,"select","stroke")},getStrokeWidth:function(feature){return getStyleAttribute(feature,"select","stroke-width",3)},getStrokeDashstyle:function(feature){return getStyleAttribute(feature,"select","stroke-dashstyle","solid")},getPointRadius:function(feature){return getStyleAttribute(feature,"select","point-radius",5)},getFillOpacity:function(feature){return getStyleAttribute(feature,"select","fill-opacity",0.9)},getStrokeOpacity:function(feature){return getStyleAttribute(feature,"select","stroke-opacity",0.9)}}}),"temporary":new OpenLayers.Style(OpenLayers.Util.applyDefaults({cursor:"pointer"},OpenLayers.Feature.Vector.style.temporary),{context:{getFillColor:function(feature){return getColor(feature,"temporary","fill")},getStrokeColor:function(feature){return getColor(feature,"temporary","stroke")},getStrokeWidth:function(feature){return getStyleAttribute(feature,"temporary","stroke-width",4)},getStrokeDashstyle:function(feature){return getStyleAttribute(feature,"temporary","stroke-dashstyle","solid")},getPointRadius:function(feature){return getStyleAttribute(feature,"temporary","point-radius",5)},getFillOpacity:function(feature){return getStyleAttribute(feature,"temporary","fill-opacity",0.3)},getStrokeOpacity:function(feature){return getStyleAttribute(feature,"temporary","stroke-opacity",0.9)}}}),"vertex":new OpenLayers.Style(OpenLayers.Util.applyDefaults({fillColor:"#6699cc",strokeColor:"#6699cc",pointRadius:5,fillOpacity:".7",strokeDashstyle:"solid"},OpenLayers.Feature.Vector.style.temporary))});var markerStyle={externalGraphic:"${url}",graphicWidth:"${width}",graphicHeight:"${height}",graphicXOffset:"${offsetx}",graphicYOffset:"${offsety}",graphicOpacity:typeof window.chrome==="undefined"?0.9:1},vectorStyle={fillColor:"${getFillColor}",strokeColor:"${getStrokeColor}",strokeDashstyle:"${getStrokeDashstyle}",strokeWidth:"${getStrokeWidth}",pointRadius:"${getPointRadius}",fillOpacity:"${getFillOpacity}",strokeOpacity:"${getStrokeOpacity}"};container.defaultStyleMap.addUniqueValueRules("default","intent",{"marker":markerStyle,"vectors":vectorStyle});container.defaultStyleMap.addUniqueValueRules("select","intent",{"marker":markerStyle,"vectors":vectorStyle});container.defaultStyleMap.addUniqueValueRules("temporary","intent",{"marker":markerStyle,"vectors":vectorStyle});container.layer=layers[0];container.vectors=new OpenLayers.Layer.Vector(tr("Editable"),{styleMap:container.defaultStyleMap});container.uniqueMarkers={};container.layers={};try{map.addLayers(layers);map.addLayer(container.vectors)}catch(e){console.log("Map error: problem adding layer "+e.message)}
container.resetPosition=function(){map.setCenter(new OpenLayers.LonLat(0,0),3)};container.resetPosition();function setupLayerEvents(vectors){vectors.events.on({featureunselected:function(event){if(event.feature.executor){event.feature.executor()}
$(container).setMapPopup(null)},featuremodified:function(event){if(event.feature.executor){event.feature.executor()}},beforefeatureadded:function(event){if(!event.feature.attributes.color){event.feature.attributes.color='#6699cc'}
if(!event.feature.attributes.intent){event.feature.attributes.intent="vectors"}}})}
setupLayerEvents(container.vectors);container.modeManager={modes:[],activeMode:null,addMode:function(options){var mode=$.extend({name:tr('Default'),icon:null,events:{activate:[],deactivate:[]},controls:[],layers:[]},options);$.each(mode.layers,function(k,layer){layer.displayInLayerSwitcher=!1;layer.setVisibility(!1);map.addLayer(layer)});$.each(mode.controls,function(k,control){control.autoActivate=!1;map.addControl(control)});this.modes.push(mode);this.register('activate',mode.name,mode.activate);this.register('deactivate',mode.name,mode.deactivate);if(!this.activeMode){this.activate(mode)}
$(container).trigger('modechanged');return mode},switchTo:function(modeName){var manager=this;$.each(this.modes,function(k,mode){if(mode.name===modeName){manager.activate(mode)}})},register:function(eventName,modeName,callback){$.each(this.modes,function(k,mode){if(mode.name===modeName&&callback){mode.events[eventName].push(callback)}})},activate:function(mode){if(this.activeMode){this.deactivate()}
this.activeMode=mode;$.each(mode.controls,function(k,control){control.activate()});$.each(mode.layers,function(k,layer){layer.setVisibility(!0)});$.each(mode.events.activate,function(k,f){f.apply([],container)});$(container).trigger('modechanged')},deactivate:function(){if(!this.activeMode){return}
$.each(this.activeMode.controls,function(k,control){control.deactivate()});$.each(this.activeMode.layers,function(k,layer){layer.setVisibility(!1)});$.each(this.activeMode.events.deactivate,function(k,f){f.apply([],container)});this.activeMode=null}};var defaultMode={controls:[]};map.addControl(new OpenLayers.Control.Attribution());if(-1!==$.inArray('coordinates',desiredControls)){map.addControl(new OpenLayers.Control.MousePosition({displayProjection:new OpenLayers.Projection("EPSG:4326")}))}
if(layers.length>0&&-1!==$.inArray('scale',desiredControls)){map.addControl(new OpenLayers.Control.ScaleLine())}
if(layers.length>0&&-1!==$.inArray('navigation',desiredControls)){defaultMode.controls.push(new OpenLayers.Control.NavToolbar())}
if(layers.length>0&&-1!==$.inArray('controls',desiredControls)){if(-1!==$.inArray('levels',desiredControls)){map.addControl(new OpenLayers.Control.PanZoomBar())}else{map.addControl(new OpenLayers.Control.PanZoom())}}
if(layers.length>1&&-1!==$.inArray('layers',desiredControls)){map.addControl(new OpenLayers.Control.LayerSwitcher())}
var highlightControl,selectControl,vectorLayerList=[container.vectors];if($(container).data("tooltips")){defaultMode.controls.push(highlightControl=new OpenLayers.Control.SelectFeature(vectorLayerList,{hover:!0,highlightOnly:!0,renderIntent:"temporary",clickout:!0,eventListeners:{beforefeaturehighlighted:null,featurehighlighted:function(evt){if(container.tooltipPopup){map.removePopup(container.tooltipPopup);container.tooltipPopup=null}
if(evt.feature.layer.selectedFeatures.indexOf(evt.feature)>-1){return}
var lonlat=map.getLonLatFromPixel(this.handlers.feature.evt.xy);var popup=new OpenLayers.Popup.Anchored('myPopup',lonlat,new OpenLayers.Size(150,18),"<small>"+evt.feature.attributes.content+"</small>",{size:{w:14,h:14},offset:{x:-7,y:-7}},!1);container.tooltipPopup=popup;popup.autoSize=!0;popup.updateSize();map.addPopup(popup)},featureunhighlighted:function(evt){if(container.tooltipPopup){map.removePopup(container.tooltipPopup);container.tooltipPopup=null}}}}))}
defaultMode.controls.push(selectControl=new OpenLayers.Control.SelectFeature(vectorLayerList,{onSelect:function(feature){if(container.tooltipPopup){map.removePopup(container.tooltipPopup);container.tooltipPopup=null}
if(feature.attributes.url===container.markerIcons.loadedMarker["default"].url){feature.attributes.url=container.markerIcons.loadedMarker.selection.url;feature.layer.redraw()}
var type=feature.attributes.type,object=feature.attributes.object,lonlat=feature.geometry.getBounds().getCenterLonLat(),loaded=!1;if(feature.attributes.itemId){type='trackeritem';object=feature.attributes.itemId}
if(type&&object){loaded=$(container).loadInfoboxPopup({type:type,object:object,lonlat:lonlat,content:feature.attributes.content,close:function(){selectControl.unselect(feature)},feature:feature})}
if(!loaded&&feature.attributes.content){var popup=new OpenLayers.Popup.FramedCloud('feature',lonlat,null,feature.attributes.content,null,!0,function(){$(container).setMapPopup(null)});popup.autoSize=!0;$(container).setMapPopup(popup)}
if(feature.clickHandler){feature.clickHandler()}},onUnselect:function(feature){if(feature.attributes.url===container.markerIcons.loadedMarker.selection.url){feature.attributes.url=container.markerIcons.loadedMarker["default"].url;feature.layer.redraw()}}}));if(layers.length>0&&-1!==$.inArray('overview',desiredControls)){var overview=new OpenLayers.Control.OverviewMap({minRatio:128,maxRatio:256,maximized:!0});overview.desiredZoom=function(){return Math.min(Math.max(1,map.getZoom()-6),3)};overview.isSuitableOverview=function(){return this.ovmap.getZoom()===overview.desiredZoom()&&this.ovmap.getExtent().contains(map.getExtent())};overview.updateOverview=function(){overview.ovmap.setCenter(map.getCenter());overview.ovmap.zoomTo(overview.desiredZoom());this.updateRectToMap()};map.addControl(overview)}
container.markerIcons={loadedMarker:{},actionQueue:{},loadingMarker:[],loadMarker:function(name,src){this.loadingMarker.push(name);this.actionQueue[name]=[];var img=new Image(),me=this;img.onload=function(){var width=this.width,height=this.height,action;me.loadedMarker[name]={intent:'marker',url:src,width:width,height:height,offsetx:-width/2,offsety:-height};while(action=me.actionQueue[name].pop()){action()}};$(img).on("error",function(){console.log("Map error loading marker image "+src);var index=container.markerIcons.loadingMarker.indexOf(src),action;if(index>-1){container.markerIcons.loadingMarker.splice(index,1)}
while(action=me.actionQueue[name].pop()){action()}});img.src=src},createMarker:function(name,lonlat,callback){if(this.loadedMarker[name]){this._createMarker(name,lonlat,callback);return}
if(-1===$.inArray(name,this.loadingMarker)){this.loadMarker(name,name)}
var me=this;this.actionQueue[name].push(function(){me._createMarker(name,lonlat,callback)})},_createMarker:function(name,lonlat,callback){if(lonlat){var properties=$.extend(this.loadedMarker[name]||this.loadedMarker.default,{}),marker;marker=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat),properties);callback(marker)}}};container.getLayer=function(name){var vectors;if(name){if(!container.layers[name]){vectors=container.layers[name]=new OpenLayers.Layer.Vector(name,{styleMap:container.defaultStyleMap,rendererOptions:{zIndexing:!0}});container.map.addLayer(vectors);vectorLayerList.push(vectors);container.map.setLayerZIndex(vectors,vectorLayerList.length*1000);setupLayerEvents(vectors);if(highlightControl&&highlightControl.active){highlightControl.deactivate();highlightControl.activate()}
if(selectControl.active){selectControl.deactivate();selectControl.activate()}}
return container.layers[name]}
return container.vectors};container.clearLayer=function(name){var vectors=container.getLayer(name);var toRemove=[];$.each(vectors.features,function(k,f){if(f&&f.attributes.itemId){toRemove.push(f)}else if(f&&f.attributes.type&&f.attributes.object){toRemove.push(f)}});vectors.removeFeatures(toRemove)};container.markerIcons.loadMarker('default','lib/openlayers/img/marker.svg');container.markerIcons.loadMarker('selection','lib/openlayers/img/marker-gold.svg');if(navigator.geolocation&&navigator.geolocation.getCurrentPosition){container.toMyLocation=$('<a/>').css('display','block').attr('href','').click(function(){navigator.geolocation.getCurrentPosition(function(position){var lonlat=new OpenLayers.LonLat(position.coords.longitude,position.coords.latitude).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject());map.setCenter(lonlat);map.zoomToScale(position.coords.accuracy*OpenLayers.INCHES_PER_UNIT.m);$(container).addMapMarker({lat:position.coords.latitude,lon:position.coords.longitude,unique:'selection'})});return!1}).text(tr('To My Location'));if(-1!==$.inArray('current_location',desiredControls)){$(container).after(container.toMyLocation)}}
container.searchLocation=$('<a/>').css('display','block').attr('href','').click(function(){var address=prompt(tr('What address are you looking for?'),"");$(container).trigger('search',[{address:address}]);return!1}).text(tr('Search Location'));if(-1!==$.inArray('search_location',desiredControls)){$(container).after(container.searchLocation)}
var field=$(container).data('target-field');var central=null,useMarker=!0;if(field){field=$($(container).closest('form')[0][field]);$(container).setupMapSelection({field:field});var value=field.val();central=parseCoordinates(value);if(central){var geLayer;if(central.zoom>19){geLayer=map.getLayersByName("Google Satellite")}else if(central.zoom>18){geLayer=map.getLayersByName("Google Streets")}
if(geLayer){container.layer=geLayer[0];map.setBaseLayer(container.layer);map.baseLayer.setVisibility(!0)}}}
if($(container).data('marker-filter')){var filter=$(container).data('marker-filter');$(filter).each(function(){var lat=$(this).data('geo-lat'),lon=$(this).data('geo-lon'),zoom=$(this).data('geo-zoom'),extent=$(this).data('geo-extent'),icon=$(this).data('icon-src'),object=$(this).data('object'),type=$(this).data('type'),content=$(this).clone().data({}).wrap('<span/>').parent().html();if(!extent){if($(this).hasClass('primary')||this.href===document.location.href){central={lat:lat,lon:lon,zoom:zoom?zoom:0}}else{$(container).addMapMarker({type:type,object:object,lon:lon,lat:lat,content:content,icon:icon?icon:null})}}else if($(this).is('img')){var graphic=new OpenLayers.Layer.Image($(this).attr('alt'),$(this).attr('src'),OpenLayers.Bounds.fromString(extent),new OpenLayers.Size($(this).width(),$(this).height()));graphic.isBaseLayer=!1;graphic.alwaysInRange=!0;container.map.addLayer(graphic)}})}
var provided=$(container).data('geo-center');if(provided&&!central){central=parseCoordinates(provided);useMarker=!1}
if(central){container.resetPosition=function(){var lonlat=new OpenLayers.LonLat(central.lon,central.lat).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject());map.setCenter(lonlat,central.zoom)};container.resetPosition();if(useMarker){var icon=icon=$(container).data('icon-src')||'selection';$(container).addMapMarker({lon:central.lon,lat:central.lat,unique:icon})}}
container.modeManager.addMode(defaultMode);if(jqueryTiki.googleStreetView){container.streetview={buttons:[]};if(jqueryTiki.googleStreetViewOverlay){container.streetview.overlay=new OpenLayers.Layer.XYZ("StreetView Overlay",currentProtocol+"//mts1.google.com/vt?hl=en-US&lyrs=svv|cb_client:apiv3&style=40,18&x=${x}&y=${y}&z=${z}",{sphericalMercator:!0,displayInLayerSwitcher:!1});container.map.addLayer(container.streetview.overlay);container.map.events.on({move:function(){if(container.streetview.overlay.visibility){container.streetview.overlay.redraw()}}})}
var StreetViewHandler=OpenLayers.Class(OpenLayers.Control,{defaultHandlerOptions:{'single':!0,'double':!1,'pixelTolerance':0,'stopSingle':!1,'stopDouble':!1},initialize:function(options){this.handlerOptions=OpenLayers.Util.extend({},this.defaultHandlerOptions);OpenLayers.Control.prototype.initialize.apply(this,arguments);this.handler=new OpenLayers.Handler.Click(this,{'click':this.trigger},this.handlerOptions)},trigger:function(e){var width=600,height=500;var lonlat=map.getLonLatFromViewPortPx(e.xy).transform(map.getProjectionObject(),new OpenLayers.Projection("EPSG:4326"));var canvas=$('<div/>')[0];$(canvas).appendTo('body').dialog({title:tr('Panorama'),width:width,height:height+30,modal:!0,close:function(){$(canvas).dialog('destroy')},buttons:container.streetview.getButtons(canvas)});canvas.getImageUrl=function(){var pov=canvas.panorama.getPov();var pos=canvas.panorama.getPosition();var base=currentProtocol+'//maps.googleapis.com/maps/api/streetview?'+'size='+width+'x'+height+'&'+'location='+tiki_encodeURIComponent(pos.toUrlValue())+'&'+'heading='+tiki_encodeURIComponent(pov.heading)+'&'+'pitch='+tiki_encodeURIComponent(pov.pitch)+'&'+'sensor=false';return base};canvas.getPosition=function(){var pos=canvas.panorama.getPosition();return formatLocation(pos.lat(),pos.lng(),12)};canvas.panorama=new google.maps.StreetViewPanorama(canvas,{position:new google.maps.LatLng(lonlat.lat,lonlat.lon),zoomControl:!1,scrollwheel:!1,disableDoubleClickZoom:!0});var timeout=setTimeout(function(){alert(tr('StreetView is not available at this specific point on the map. Zoom in as needed and make sure to click on a blue line.'));$(canvas).dialog('close')},5000);google.maps.event.addListener(canvas.panorama,'pano_changed',function(){if(!canvas.panorama.getPano()){alert(tr('StreetView is not available at this specific point on the map. Zoom in as needed and make sure to click on a blue line.'));$(canvas).dialog('close')}
clearTimeout(timeout)})}});container.modeManager.addMode({name:'StreetView',controls:[new StreetViewHandler(),new OpenLayers.Control.NavToolbar()],activate:function(){if(container.streetview.overlay){container.streetview.overlay.setVisibility(!0)}},deactivate:function(){if(container.streetview.overlay){container.streetview.overlay.setVisibility(!1)}}});container.streetview.addButton=function(label,callback){container.streetview.buttons.unshift({label:label,callback:callback})};container.streetview.getButtons=function(canvas){var buttons={};$.each(container.streetview.buttons,function(k,b){buttons[b.label]=function(){b.callback(canvas)}});return buttons};container.streetview.addButton('Cancel',function(canvas){$(canvas).dialog('close')});container.streetViewToggle=$('<a/>').css('display','block').attr('href','').click(function(){if(container.modeManager.activeMode&&container.modeManager.activeMode.name=='StreetView'){container.modeManager.switchTo('Default');$(this).text(tr('Enable StreetView'))}else{container.modeManager.switchTo('StreetView');$(this).text(tr('Disable StreetView'))}
return!1}).text(tr('Enable StreetView'));if(-1!==$.inArray('streetview',desiredControls)){$(container).after(container.streetViewToggle)}}
var searchboxes=$(container).closest('.tab, #appframe, #tiki-center').find('form.search-box').filter(function(){return $(this).closest('.map-container').size()===0});searchboxes=searchboxes.add($('form.search-box',container));searchboxes.off('submit').submit(function(){$(container).trigger("start.map.search");var form=this;$.post('tiki-searchindex.php?filter~geo_located=y',$(this).serialize(),function(data){if(!form.autoLayers){form.autoLayers=[]}
$(form.autoLayers).each(function(k,name){container.clearLayer(name)});$.each(data.result,function(k,i){var layerName=$(form).data('result-layer'),suffix=$(form).data('result-suffix');if(!layerName){layerName=''}
if(suffix&&i[suffix]){layerName=layerName+i[suffix]}
if(-1===$.inArray(layerName,form.autoLayers)){form.autoLayers.push(layerName)}
var icon;$(i.link).each(function(){if($(this).is("a")){icon=$(this).data('icon-src')}});if(i.geo_location){$(container).addMapMarker({coordinates:i.geo_location,content:i.title,type:i.object_type,object:i.object_id,icon:icon?icon:null,layer:layerName,dataSource:i,form:form})}else if(i.geo_feature){var wkt=new OpenLayers.Format.WKT,features,layer=container.getLayer(layerName);format=new OpenLayers.Format.GeoJSON;try{features=format.read(i.geo_feature)}catch(e){features=null}
if(!features){$(container).addMapMarker({coordinates:$(container).getMapCenter(),content:i.title,type:i.object_type,object:i.object_id,icon:null,layer:layerName,dataSource:i});return}
$.each(features,function(k,feature){var initial;feature.attributes.itemId=i.object_id;feature.attributes.content=i.title;if(!feature.attributes.color){feature.attributes.color='#6699cc'}
if(!feature.attributes.intent){feature.attributes.intent="vectors"}
if(!feature.attributes.popup_config){feature.attributes.popup_config=$(form).data("popup-config")}
initial=wkt.write(feature)+feature.attributes.color;feature.executor=delayedExecutor(5000,function(){var fields={},current=wkt.write(feature)+feature.attributes.color;fields[i.geo_feature_field]=format.write(feature);if(current===initial||layer!==container.vectors){return}
$.post($.service('tracker','update_item'),{trackerId:i.tracker_id,itemId:i.object_id,fields:fields},function(){initial=current},'json').error(function(){$(container).trigger('changed')})})});layer.addFeatures(features);$.each(features,function(k,feature){$(container).trigger('add',[i,feature])})}else if(i.geo_file){var format,files=i.geo_file.split(","),proj4326=new OpenLayers.Projection("EPSG:4326"),proj900913=new OpenLayers.Projection("EPSG:900913");layer=container.getLayer(layerName);if(i.geo_file_format=="geojson"){format=new OpenLayers.Format.GeoJSON}else if(i.geo_file_format=="gpx"){format=new OpenLayers.Format.GPX}
for(var f=0;f<files.length;f++){OpenLayers.Request.GET({url:files[f],callback:function(request){try{features=format.read(request.responseText)}catch(e){$(container).addMapMarker({coordinates:$(container).getMapCenter(),content:i.title,type:i.object_type,object:i.object_id,icon:null,layer:layerName,dataSource:i});return}
$.each(features,function(k,feature){feature.attributes.itemId=i.object_id;feature.attributes.content=i.title;if(!feature.attributes.color){feature.attributes.color='#ffa500'}
if(!feature.attributes.intent){feature.attributes.intent="vectors"}
if(!feature.attributes.popup_config){feature.attributes.popup_config=$(form).data("popup-config")}
feature.geometry.transform(proj4326,proj900913)});layer.addFeatures(features);$.each(features,function(k,feature){$(container).trigger('add',[i,feature])})}})}}})},'json').complete(function(){$(container).trigger("complete.map.search")});return!1}).each(function(){if($(this).hasClass('onload')){var fm=this,layerLoadDelay=parseInt($(fm).data("load-delay"),10);if(layerLoadDelay){setTimeout(function(){$(fm).submit()},layerLoadDelay*1000)}else{$(fm).submit()}}
var skip=!1;if($(this).data('result-refresh')){var form=this,refresh=parseInt($(this).data('result-refresh'),10)*1000,interval;interval=setInterval(function(){if(skip){skip=!1}else{$(form).submit()}},refresh);$(container).on('unregister',function(){clearInterval(interval)})}
$(container).on('changed',function(){$(form).submit();skip=!0})});$(container).on('search',function(e,data){function markLocation(lat,lon,bounds){var lonlat=new OpenLayers.LonLat(lon,lat).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject()),toViewport;toViewport=function(){if(bounds){map.zoomToExtent(bounds)}else{map.setCenter(lonlat);map.zoomToScale(500*OpenLayers.INCHES_PER_UNIT.m)}};$(container).addMapMarker({lat:lat,lon:lon,unique:'selection',click:toViewport});if(typeof zoomToFoundLocation!='undefined'){var zoomFactor=-1;switch(zoomToFoundLocation){default:case 'street':zoomFactor=250;break;case 'town':zoomFactor=2500;break;case 'region':zoomFactor=25000;break;case 'country':zoomFactor=250000;break;case 'continent':zoomFactor=1500000;break;case 'world':zoomFactor=-1;break}
if(zoomFactor<0){toViewport()}else{map.setCenter(lonlat);map.zoomToScale(zoomFactor*OpenLayers.INCHES_PER_UNIT.m)}}else{if(!container.map.getExtent().containsLonLat(lonlat)){toViewport()}}}
function markGoogleLocation(result)
{var loc=result.geometry.location,sw=result.geometry.viewport.getSouthWest(),ne=result.geometry.viewport.getNorthEast(),osw,one,left,bottom,right,top;osw=new OpenLayers.LonLat(sw.lng(),sw.lat()).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject());one=new OpenLayers.LonLat(ne.lng(),ne.lat()).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject());left=osw.lon;bottom=osw.lat;right=one.lon;top=one.lat;markLocation(loc.lat(),loc.lng(),new OpenLayers.Bounds(left,bottom,right,top))}
function getBounds(bounds)
{var osw,one;osw=new OpenLayers.LonLat(bounds.left,bounds.bottom).transform(map.getProjectionObject(),new OpenLayers.Projection("EPSG:4326"));one=new OpenLayers.LonLat(bounds.right,bounds.top).transform(map.getProjectionObject(),new OpenLayers.Projection("EPSG:4326"));return new google.maps.LatLngBounds(new google.maps.LatLng(osw.lat,osw.lon),new google.maps.LatLng(one.lat,one.lon))}
if(data.address){if(window.google&&google.maps&&google.maps.Geocoder){var geocoder=new google.maps.Geocoder(),loc=$(container).getMapCenter().split(',');geocoder.geocode({bounds:getBounds(map.getExtent()),address:data.address},function(results,status){var $list=$('<ul/>');if(status==google.maps.GeocoderStatus.OK){if(results.length===1){markGoogleLocation(results[0]);return}else if(results.length>0){$.each(results,function(k,result){var $link=$('<a href="#"/>');$link.text(result.formatted_address);$link.click(function(){markGoogleLocation(result);return!1});$('<li/>').append($link).appendTo($list)})}}
$('<div/>').append($list).dialog({title:data.address})})}else{$.getJSON('tiki-ajax_services.php',{geocode:data.address},function(data){markLocation(data.lat,data.lon,500)})}}});$(container).trigger('initialized')},250)});return this};$.fn.addMapMarker=function(options){this.each(function(){var container=this,lonlat,iconModel="default";if(options.unique){iconModel=options.unique}
if(options.icon){iconModel=options.icon}
if(options.coordinates){var parts=options.coordinates.split(',');if(parts.length>=2){options.lon=parts[0];options.lat=parts[1]}}
if(options.lat&&options.lon){lonlat=new OpenLayers.LonLat(options.lon,options.lat).transform(new OpenLayers.Projection("EPSG:4326"),container.map.getProjectionObject())}
container.markerIcons.createMarker(iconModel,lonlat,function(feature){if(options.type&&options.object){feature.attributes.type=options.type;feature.attributes.object=options.object}
if(!feature.attributes.popup_config&&options.form){feature.attributes.popup_config=$(options.form).data("popup-config")}
var markerLayer=container.getLayer(options.layer),initial=writeCoordinates(lonlat.clone(),container.map,!0);markerLayer.addFeatures([feature]);if(options.unique){if(container.uniqueMarkers[options.unique]){markerLayer.removeFeatures([container.uniqueMarkers[options.unique]])}
container.uniqueMarkers[options.unique]=feature;$(container).trigger(options.unique+'Change',options)}
if(options.type==='trackeritem'&&options.object&&markerLayer===container.vectors){feature.executor=delayedExecutor(5000,function(){var current=writeCoordinates(feature.geometry.getBounds().getCenterLonLat().clone(),container.map,!0);if(current===initial){return}
$.post($.service('tracker','set_location'),{itemId:options.object,location:current},function(){initial=current},'json').error(function(){$(container).trigger('changed')})})}
if(options.content){feature.attributes.content=options.content}
if(options.click){feature.clickHandler=options.click}
if(options.dataSource){$(container).trigger('add',[options.dataSource,feature])}})});return this};$.fn.setupMapSelection=function(options){var control;this.each(function(){var container=this,field=options.field,map=this.map;if(!field.attr('disabled')){$(container).on('selectionChange',function(e,lonlat){if(lonlat){field.val(writeCoordinates(lonlat,map)).change()}else{field.val('').change()}});map.events.register('zoomend',map,function(e,lonlat){var coords=field.val().split(","),lon=0,lat=0;if(coords.length>1){lon=coords[0];lat=coords[1]}
field.val(formatLocation(lat,lon,map.getZoom())).change()});var ClickHandler=OpenLayers.Class(OpenLayers.Control,{defaultHandlerOptions:{'single':!0,'double':!1,'pixelTolerance':0,'stopSingle':!1,'stopDouble':!1},initialize:function(options){this.handlerOptions=OpenLayers.Util.extend({},this.defaultHandlerOptions);OpenLayers.Control.prototype.initialize.apply(this,arguments);this.handler=new OpenLayers.Handler.Click(this,{'click':this.trigger},this.handlerOptions)},trigger:function(e){var lonlat=map.getLonLatFromViewPortPx(e.xy).transform(map.getProjectionObject(),new OpenLayers.Projection("EPSG:4326"));$(container).addMapMarker({lat:lonlat.lat,lon:lonlat.lon,unique:'selection'});if(options.click){options.click()}}});control=new ClickHandler();map.addControl(control);control.activate()}});return control};$.fn.removeMapSelection=function(){this.each(function(){var container=this;if(container.uniqueMarkers.selection){container.vectors.removeFeatures([container.uniqueMarkers.selection])}
$(container).trigger('selectionChange',{})});return this};$.fn.getMapCenter=function(){var val;this.each(function(){var coordinates=this.map.getCenter();val=writeCoordinates(coordinates,this.map,!0)});return val};$.fn.setMapPopup=function(popup,old){this.each(function(){var handler=$(this).getMapPopupHandler();if(old&&old!==this.activePopup){return}
if(this.activePopup){if(this.activePopup.myclose){var f=this.activePopup.myclose;this.activePopup.myclose=null;f()}else{try{handler.remove(this.activePopup)}catch(e){}}
this.activePopup=null}
if(popup){this.activePopup=popup;handler.add(popup)}})};$.fn.loadInfoboxPopup=function(options){if(options.type&&options.object&&$.inArray(options.type,jqueryTiki.infoboxTypes)!==-1){if(!options.content){options.content=''}
this.each(function(){var container=this,popup;popup=new OpenLayers.Popup('marker',options.lonlat,null,options.content+'<img src="img/spinner.gif"/>');popup.autoSize=!0;$(container).setMapPopup(popup);$.get($.service('object','infobox',{type:options.type,object:options.object}),function(data){var newPopup,close=function(){$(container).setMapPopup(null);if(options.close){options.close.apply([],container)}},injectionId=('popupInjection'+Math.random()).replace('.',''),content,handler=$(container).getMapPopupHandler();content='<div id="'+injectionId+'"></div>';newPopup=handler.create(options.lonlat,content,options.hook,close,options.feature);newPopup.myclose=close;$(container).setMapPopup(newPopup,popup);content=$('#'+injectionId);content.html(data);handler.resize(newPopup);content.find('.svgImage').css('text-align','center').css('margin','auto');content.find('.service-dialog').click(function(){$(container).setMapPopup(null);$(this).serviceDialog({title:$(this).attr('title').replace(/^.*\:/,''),success:function(){$(container).trigger('changed')}});return!1});$("a[rel*='box'][rel*='type=img'], a[rel*='box'][rel!='type=']",content).colorbox({photo:!0})},'html')});return!0}else{return!1}};$.fn.getMapPopupHandler=function(){var handler;this.each(function(){var map=this.map;switch($(this).data('popup-style')){case 'dialog':handler={type:'dialog',add:function(popup){},create:function(lonlat,content,hook,close,feature){var dialog=$(content),w='80%',h=600;this.feature=feature;if(this.feature.attributes.popup_config){w=this.feature.attributes.popup_config.width;h=this.feature.attributes.popup_config.height}
dialog.dialog({modal:!0,width:w,height:h,close:close});return dialog[0]},remove:function(popup){$(popup).dialog('destroy')},resize:function(popup){$(popup).find('h1, h2, h3, h4, h5').first().each(function(){$(this).hide();$(popup).dialog('option','title',$(this).text())})}};break;case 'popup':default:handler={type:'popup',add:function(popup){map.addPopup(popup)},create:function(lonlat,content,hook,close,feature){this.feature=feature;return new OpenLayers.Popup.FramedCloud('marker',lonlat,null,content,hook,!0,close)},remove:function(popup){map.removePopup(popup)},resize:function(popup){var w=300,h=260;if(this.feature.attributes.popup_config){w=this.feature.attributes.popup_config.width;h=this.feature.attributes.popup_config.height}
popup.setSize(new OpenLayers.Size(w,h))}};break}});return handler};$.fn.finalMapRefresh=function(collector){this.each(function(){var container=this;$(container).trigger('unregister');$(container).on('add',function(e,data,feature){collector(data,$.extend({},feature))});$(container).trigger('changed')});return this}})();
/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/jquery-json/src/jquery.json.js */
(function($){'use strict';var escape=/["\\\x00-\x1f\x7f-\x9f]/g,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},hasOwn=Object.prototype.hasOwnProperty;$.toJSON=typeof JSON==='object'&&JSON.stringify?JSON.stringify:function(o){if(o===null){return 'null'}
var pairs,k,name,val,type=$.type(o);if(type==='undefined'){return undefined}
if(type==='number'||type==='boolean'){return String(o)}
if(type==='string'){return $.quoteString(o)}
if(typeof o.toJSON==='function'){return $.toJSON(o.toJSON())}
if(type==='date'){var month=o.getUTCMonth()+1,day=o.getUTCDate(),year=o.getUTCFullYear(),hours=o.getUTCHours(),minutes=o.getUTCMinutes(),seconds=o.getUTCSeconds(),milli=o.getUTCMilliseconds();if(month<10){month='0'+month}
if(day<10){day='0'+day}
if(hours<10){hours='0'+hours}
if(minutes<10){minutes='0'+minutes}
if(seconds<10){seconds='0'+seconds}
if(milli<100){milli='0'+milli}
if(milli<10){milli='0'+milli}
return '"'+year+'-'+month+'-'+day+'T'+hours+':'+minutes+':'+seconds+'.'+milli+'Z"'}
pairs=[];if($.isArray(o)){for(k=0;k<o.length;k++){pairs.push($.toJSON(o[k])||'null')}
return '['+pairs.join(',')+']'}
if(typeof o==='object'){for(k in o){if(hasOwn.call(o,k)){type=typeof k;if(type==='number'){name='"'+k+'"'}else if(type==='string'){name=$.quoteString(k)}else{continue}
type=typeof o[k];if(type!=='function'&&type!=='undefined'){val=$.toJSON(o[k]);pairs.push(name+':'+val)}}}
return '{'+pairs.join(',')+'}'}};$.evalJSON=typeof JSON==='object'&&JSON.parse?JSON.parse:function(str){return eval('('+str+')')};$.secureEvalJSON=typeof JSON==='object'&&JSON.parse?JSON.parse:function(str){var filtered=str.replace(/\\["\\\/bfnrtu]/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,'');if(/^[\],:{}\s]*$/.test(filtered)){return eval('('+str+')')}
throw new SyntaxError('Error parsing JSON, source is not valid.')};$.quoteString=function(str){if(str.match(escape)){return '"'+str.replace(escape,function(a){var c=meta[a];if(typeof c==='string'){return c}
c=a.charCodeAt();return '\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}
return '"'+str+'"'}}(jQuery));
/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/infinitecarousel/jquery.infinitecarousel3.js */
(function($){$.fn.extend({infiniteCarousel:function(options)
{var defaults={transitionSpeed:800,displayTime:6000,displayProgressRing:!0,progressRingColorOpacity:'0,0,0,.5',progressRingBackgroundOn:!0,progressRingBackgroundColorOpacity:'255,255,255,.5',thumbnailType:'none',easeLeft:'linear',easeRight:'linear',imagePath:'/js/infinitecarousel/images/',inView:1,margin:0,advance:1,customClass:null,showControls:!0,autoHideCaptions:!1,autoPilot:!1,prevNextInternal:!0,internalThumbnails:!1,enableKeyboardNav:!0,onSlideStart:function(){},onSlideEnd:function(){},onPauseClick:function(){},onPlayClick:function(){}};var options=$.extend(defaults,options);return this.each(function(){var o=options;var obj=$(this);var randID=Math.round(Math.random()*100000000);var numItems=$('li',obj).length;var captions=[];var links=[];var itemSources=[];var vidThumb=[];var widthSource,heightSource;var nextLeft,nextRight;var clrTimerInterval;var u,elapsedTime=0;var canvasSupported="HTMLCanvasElement" in window;$('li',obj).each(function(index){captions.push($('p',this).html());links.push($('a',this).attr('href'));vidThumb.push($(this).find('iframe').attr('longdesc'));itemSources.push($(this).find('img, iframe').attr('src'))});if(o.inView>numItems)o.inView=numItems;if(o.advance>o.inView)o.advance=o.inView;widthSource=$(this).find('img, iframe').width();heightSource=$(this).find('img, iframe').height();$(obj).replaceWith('<div class="infiniteCarousel" id="ic_'+randID+'">');obj=$('#ic_'+randID);$(obj).height(heightSource).width(widthSource*o.inView).css({'overflow':'hidden','position':'relative'});$(obj).append('<div class="ic_tray" style="position:relative;width:'+(numItems*2)*widthSource+'px;left:-'+widthSource+'px">');for(var i=0;i<numItems;i++)$('div.ic_tray',obj).append('<div style="overflow:hidden;background:url('+o.imagePath+'wait.gif) no-repeat scroll 50% 50% #ddd;float:left;position:relative;width:'+widthSource+'px;height:'+heightSource+'px;" class="infiniteCarousel_item">');$('.infiniteCarousel_item',obj).each(function(index){if(itemSources[index].indexOf('youtube.com')>0||itemSources[index].indexOf('vimeo.com')>0||itemSources[index].indexOf('funnyordie.com')>0)
{var querystring=itemSources[index].split("?");$(this).append('<iframe src="'+querystring[0]+"?wmode=opaque&"+querystring[1]+'" frameborder="0" allowfullscreen="" style="width: '+widthSource+'px; height: '+heightSource+'px">" />');if(links[index]!=undefined)$('iframe',this).wrap('<a class="ic_link" href="'+links[index]+'"></a>')}
else{$(this).append('<img src="'+itemSources[index]+'" />');if(links[index]!=undefined)$('img',this).wrap('<a class="ic_link" href="'+links[index]+'"></a>')}
if(captions[index]!=undefined)$(this).append('<div class="ic_caption" style="position:absolute;bottom:0;">'+captions[index]+'</div>')});$('.infiniteCarousel_item',obj).clone().appendTo($('div.ic_tray',obj));$('.infiniteCarousel_item',obj).each(function(index){$(this).attr('id','ic_'+randID+'_'+index)});$('.ic_tray',obj).prepend($('.infiniteCarousel_item:last',obj).remove());if(o.margin!=0)
{$(obj).width($(obj).width()+(o.inView+1)*o.margin).height($(obj).height()+2*o.margin);$('.infiniteCarousel_item',obj).css('margin',o.margin+'px 0px '+o.margin+'px '+o.margin+'px');$('.ic_tray',obj).css('left',parseInt($('.ic_tray',obj).css('left'))-o.margin+'px').width($('.ic_tray',obj).width()+o.margin*(numItems*2))}
$(obj).append('<div class="ic_left_nav" style="position:absolute;left:0;width:32px;top:'+(heightSource/2-16)+'px;">').append('<div class="ic_right_nav" style="position:absolute;width:32px;right:0;top:'+(heightSource/2-16)+'px;">');$('.ic_left_nav',obj).append('<img style="cursor:pointer;" src="'+o.imagePath+'left.png" />');$('.ic_right_nav',obj).append('<img style="cursor:pointer;" src="'+o.imagePath+'right.png" />');if(!o.prevNextInternal&&(parseInt($(obj).css('border-left-width'))+parseInt($(obj).css('border-right-width')))>0)$('.ic_right_nav',obj).css('right','-'+(parseInt($(obj).css('border-left-width'))+parseInt($(obj).css('border-right-width')))+'px');$('.ic_left_nav img',obj).on('click',function(event){if(!$('.ic_tray',obj).is(':animated'))
{stop();moveRight(o.advance)}});$('.ic_right_nav img',obj).on('click',function(event){if(!$('.ic_tray',obj).is(':animated'))
{stop();moveLeft(o.advance)}});if(o.inView==numItems){o.displayProgressRing=!1;o.thumbnailType='none';o.showControls=!1;o.autoPilot=!1;o.enableKeyboardNav=!1;$('.ic_left_nav,.ic_right_nav',obj).hide()}
if(!o.prevNextInternal)
{$(obj).wrap('<div id="ic_'+randID+'_wrapper" class="ic_wrapper" style="padding:0 32px;position:relative;">');$('#ic_'+randID+'_wrapper').width($(obj).width());$('#ic_'+randID+'_wrapper').prepend($('.ic_left_nav',obj).detach());$('#ic_'+randID+'_wrapper').prepend($('.ic_right_nav',obj).detach())}
else{$(obj).hover(function(){$('.ic_left_nav',obj).stop().animate({opacity:1,left:'0px'},300);$('.ic_right_nav',obj).stop().animate({opacity:1,right:'0px'},300)},function(){$('.ic_left_nav',obj).stop().animate({opacity:0,left:'-32px'},500);$('.ic_right_nav',obj).stop().animate({opacity:0,right:'-32px'},500)})}
$('#ic_'+randID).addClass('ic_peek_padding');$('#ic_'+randID+'_wrapper').width($(obj).width()+parseInt($('#ic_'+randID).css('padding-left'))+parseInt($('#ic_'+randID).css('padding-right')));if(o.thumbnailType!='none')
{$(obj).append('<div id="ic_'+randID+'_thumbnail_tray" class="ic_thumbnail_tray" style="position:absolute;bottom:0;padding:5px 0;width:100%;text-align:center;">');$('#ic_'+randID+'_thumbnail_tray').append('<div class="ic_thumbnails">');for(var i=0;i<numItems;i++)$('.ic_thumbnails',obj).append('<div class="ic_button" style="cursor:pointer">');for(var i=0;i<o.inView;i++)$('.ic_button:eq('+i+')',obj).addClass('ic_active');$('.ic_button').hover(function(){if(!$(this).hasClass('ic_active'))$(this).css('background','#699')},function(){$(this).css('background','')});if(o.thumbnailType=='images')
{$('.ic_button',obj).each(function(index){if(itemSources[index]!=undefined)thumbImage=itemSources[index];if(vidThumb[index]!=undefined)thumbImage=vidThumb[index];$(this).append('<img width="100%" height="100%" src="'+thumbImage+'" />')})}
if(o.thumbnailType=='numbers')
{$('.ic_button',obj).each(function(index){$(this).html(index+1)})}
if(o.thumbnailType=='count')
{$('.ic_button',obj).remove();$('.ic_thumbnails',obj).html('<span>1</span> of '+numItems);manageThumbButtons()}
if(!o.internalThumbnails)
{if(!$('#ic_'+randID+'_wrapper').length)
{$(obj).wrap('<div id="ic_'+randID+'_wrapper" class="ic_wrapper" style="position:relative;">');$('#ic_'+randID+'_wrapper').width($(obj).width())}
$('#ic_'+randID+'_thumbnail_tray').css({'bottom':'','position':'relative'}).appendTo($('#ic_'+randID+'_wrapper'))}
var thumbTopParent=($('#ic_'+randID+'_wrapper').length)?$('#ic_'+randID+'_wrapper'):obj;$('.ic_button',thumbTopParent).on('click',function(){if(!$('.ic_tray',obj).is(':animated'))
{stop();var jumpStart=parseInt($('.infiniteCarousel_item:eq(1)',obj).attr('id').split('_').pop());var jumpFinish=$(this).index();if(jumpStart>(numItems-1))jumpStart-=numItems;var a=Math.abs(jumpStart-jumpFinish);var b=numItems-a;var jumpDist=Math.min(a,b);if(jumpStart<jumpFinish)
{if(a<b||a==b)moveLeft(jumpDist);if(a>b)moveRight(jumpDist)}
if(jumpStart>jumpFinish)
{if(a<b)moveRight(jumpDist);if(a>b||a==b)moveLeft(jumpDist)}}})}
if((!o.prevNextInternal||!o.internalThumbnails)&&o.customClass!==null){$('#ic_'+randID+'_wrapper').addClass('ic_'+o.customClass)}
else if(o.customClass!==null){$(obj).addClass('ic_'+o.customClass)}
if(o.enableKeyboardNav)
{$(document).keydown(function(event){if(event.keyCode==39)if(!$('.ic_tray',obj).is(':animated')){stop();moveLeft(o.advance)}
if(event.keyCode==37)if(!$('.ic_tray',obj).is(':animated')){stop();moveRight(o.advance)}
if(event.keyCode==80||event.keyCode==111)if(!$('.ic_tray',obj).is(':animated'))if(o.autoPilot)pause();if(event.keyCode==83||event.keyCode==115)if(!$('.ic_tray',obj).is(':animated'))play()})}
if(o.showControls)
{$(obj).append('<div id="ic_controls_'+randID+'" class="ic_controls" style="background:url('+o.imagePath+'controls.png) no-repeat -12px 0;opacity:.5;cursor:pointer;height:10px;position:absolute;right:9px;top:10px;width:10px;z-index:1">');if(!o.autoPilot)$('#ic_controls_'+randID).css('background-position','1px 0');$('.ic_controls',obj).on('click',function(){if(!$('.ic_tray',obj).is(':animated'))
{if(o.autoPilot)pause();else play()}})}
if(canvasSupported)
{$(obj).append('<canvas id="ic_canvas_'+randID+'" width="30" height="30" style="position:absolute;top:0;right:0;"></canvas>');var ctx=$('#ic_canvas_'+randID)[0].getContext('2d');ctx.lineWidth=3;ctx.strokeStyle="rgba("+o.progressRingColorOpacity+")";ctx.shadowOffsetX=0;ctx.shadowOffsetY=0;ctx.shadowBlur=3;ctx.shadowColor="#fff";if(!o.displayProgressRing)$('#ic_canvas_'+randID).hide()}else{$(obj).append('<div id="ic_ie_timer_'+randID+'" style="width:100%;height:6px;position:absolute;bottom:0;left:0;background:#ccc"></div>');$('#ic_ie_timer_'+randID).css('opacity','.25')}
function hideCaptions()
{if(o.autoHideCaptions)$('.ic_caption',obj).stop().animate({bottom:-heightSource+'px'})}
function showCaptions()
{if(o.autoHideCaptions)$('.ic_caption',obj).stop().animate({bottom:'0px'})}
function manageThumbButtons()
{thumbButtonStart=parseInt($('.infiniteCarousel_item',obj).attr('id').split('_').pop())+1;if(thumbButtonStart>(numItems-1))thumbButtonStart-=numItems;if(o.thumbnailType=='count')
{var ary=[];for(var i=thumbButtonStart;i<thumbButtonStart+o.inView;i++)ary.push(((i+1)>numItems)?(i+1)-numItems:(i+1));var last=ary.pop();var amp=(o.inView>1)?" & ":'';$('.ic_thumbnails span',thumbTopParent).text(ary.join(", ")+amp+last)}
for(var i=thumbButtonStart;i<thumbButtonStart+o.inView;i++)(i>numItems-1)?$('.ic_button:eq('+Math.abs(numItems-i)+')',thumbTopParent).addClass('ic_active'):$('.ic_button:eq('+i+')',thumbTopParent).addClass('ic_active');}
function moveRight(dist)
{o.onSlideStart.call(this);$('.ic_button',thumbTopParent).removeClass('ic_active');$('.infiniteCarousel_item',obj).slice(-dist).prependTo('#ic_'+randID+' .ic_tray',obj);$('.ic_tray',obj).css({left:'-='+(widthSource*dist)+'px'});$('.ic_tray',obj).stop().animate({left:"+="+widthSource*dist+"px"},o.transitionSpeed,o.easeRight,function(){showCaptions();manageThumbButtons();o.onSlideEnd.call(this)});hideCaptions()}
function moveLeft(dist)
{o.onSlideStart.call(this);$('.ic_button',thumbTopParent).removeClass('ic_active');$('.ic_tray',obj).stop().animate({left:"-="+(widthSource+o.margin)*dist+"px"},o.transitionSpeed,o.easeLeft,function(){$('.infiniteCarousel_item',obj).slice(0,dist).appendTo('#ic_'+randID+' .ic_tray',obj);$('.ic_tray',obj).css({left:'-'+(widthSource+o.margin)+'px'});showCaptions();manageThumbButtons();o.onSlideEnd.call(this);if(o.autoPilot)animatedTimer(o.displayTime)});hideCaptions()}
function pause()
{o.onPauseClick.call(this);o.autoPilot=!1;$('#ic_controls_'+randID).css('background-position','1px 0');clearInterval(clrTimerInterval);elapsedTime=u}
function play()
{o.autoPilot=!0;if(o.autoPilot&&!$('.ic_tray',obj).is(':animated'))animatedTimer(o.displayTime);$('#ic_controls_'+randID).css('background-position','-12px 0')}
function stop()
{o.onPlayClick.call(this);o.autoPilot=!1;resetTimer();$('#ic_controls_'+randID).css('background-position','1px 0');clearInterval(clrTimerInterval)}
function animatedTimer(delay)
{var startTime=new Date().getTime(),newTime,angle=0;clrTimerInterval=setInterval(function(){if(angle<359)
{newTime=new Date().getTime();u=(newTime-startTime)+elapsedTime;angle=Math.floor(u/delay*360);if(angle>359)angle=359;if(canvasSupported)
{ctx.clearRect(0,0,30,30);ctx.save();ctx.translate(15,15);ctx.rotate(-Math.PI/2);if(o.progressRingBackgroundOn)
{ctx.strokeStyle="rgba("+o.progressRingBackgroundColorOpacity+")";ctx.beginPath();ctx.arc(0,0,10,0,(360*(Math.PI/180)),!0);ctx.stroke();ctx.strokeStyle="rgba("+o.progressRingColorOpacity+")"}
ctx.beginPath();ctx.arc(0,0,10,0,(angle*(Math.PI/180)),!0);ctx.stroke();ctx.restore()}
else{$('#ic_ie_timer_'+randID,obj).css('width',99-Math.floor((u/delay)*100)+'%')}}
else{elapsedTime=0;clearInterval(clrTimerInterval);moveLeft(o.advance)}},20)}
function resetTimer()
{elapsedTime=0;if(canvasSupported)
{ctx.clearRect(0,0,30,30);ctx.save();ctx.translate(15,15);ctx.rotate(-Math.PI/2);ctx.beginPath();ctx.arc(0,0,10,0,(360*(Math.PI/180)),!0);ctx.stroke();ctx.restore()}}
if(o.autoPilot&&!$('.ic_tray',obj).is(':animated')){animatedTimer(o.displayTime)}else{resetTimer()}})}})})(jQuery);
/* rank:50standard - minify:ok. lib/jquery_tiki/tiki-ajax_services.js */
$('[type=submit].confirm-submit').click(function(){var target=$('.modal.fade:not(.in)').first();$.post($(this).attr('formaction'),$(this.form).serialize(),function(data){$('.modal-content',target).html(data);target.modal()});return!1});$('[type=submit].service-submit').click(function(){$.post($(this).attr('formaction'),$(this.form).serialize(),function(data){});return!1});function confirmAction(form){$.ajax({dataType:'json',url:$(form).attr('action'),type:'POST',data:$(form).serialize(),success:function(data){if(!data){$.closeModal();return}
var extra=data.extra||!1,dataurl=data.url||!1,dataError=data.error||!1;if(extra){if(extra==='close'){$.closeModal()}else if(extra==='refresh'){$.closeModal();document.location.href=document.location.href.replace(/#.*$/,"")}}
if(dataurl){$.closeModal();var $href=document.location.href.replace(/#.*$/,"");if(dataurl.indexOf($href)>-1||dataurl===$href){document.location.href=dataurl;location.reload()}else{document.location.assign(dataurl)}}
if(dataError){if(dataError==='CSRF'){dataError=tr('Potential cross-site request forgery (CSRF) detected. Operation blocked. The security ticket may have expired - reloading the page may help.')}
$.closeModal();feedback(dataError,'error')}
return!1}})};
/* rank:50standard - minify:ok. lib/ajax/autosave.js */
var auto_save_submit=!1;var sending_auto_save=!1;var auto_save_debug=!1;function remove_save(editorId,autoSaveId){if(typeof editorId!=='string'||!editorId||!autoSaveId||auto_save_submit){return}
if(sending_auto_save){setTimeout(function(){remove_save(editorId,autoSaveId)},100)}
auto_save_submit=!0;$.ajax({url:$.service("autosave","delete"),data:{editor_id:editorId,referer:autoSaveId},type:"POST",async:!1,success:function(data){},error:function(req,status,error){if(error&&auto_save_debug){alert(tr("Auto Save removal returned an error: ")+error)}}})}
function toggle_autosaved(editorId,autoSaveId){if(typeof autoSaveId==='undefined'){autoSaveId=''}
var output='',prefix='';var $textarea=$('#'+editorId);var textareaEditor=syntaxHighlighter.get($textarea);var cked=typeof CKEDITOR!=='undefined'?CKEDITOR.instances[editorId]:null;if(!$textarea.data("original")){if(cked){prefix='cke_contents_'}
ajaxLoadingShow(prefix+editorId);$.getJSON($.service("autosave","get"),{editor_id:editorId,referer:autoSaveId},function(data){output=data.data;$textarea.data("original",$textarea.val());if(cked){cked.setData(output)}else if(textareaEditor){textareaEditor.setValue(output)}else if($("#"+editorId).length){$textarea.val(output)}
ajaxLoadingHide()})}else{syntaxHighlighter.sync($textarea);output=$textarea.data("original");if(cked){cked.setData(output)}else if(textareaEditor){textareaEditor.setValue(output)}else if($("#"+editorId).length){$("#"+editorId).val(output)}
$textarea.data("original","")}
var msg=$(".autosave_message_2:first").text();$(".autosave_message_2:first").text($(".autosave_message:first").text());$(".autosave_message:first").text(msg);return output}
function auto_save_allowHtml(form){return $("input[name=allowhtml]:checked",form).length||($("input[name=allowhtml][type=hidden]",form).length&&$("input[name=allowhtml][type=hidden]",form).val()?1:0)}
function auto_save(editorId){if(!editorId&&auto_save_debug){alert(tr("Auto save: No editorId set"))}
if(!auto_save_submit&&!sending_auto_save){var $textarea=$('#'+editorId);var autoSaveId=$textarea.data("autoSaveId");syntaxHighlighter.sync($textarea);var data=$textarea.val();var allowHtml=auto_save_allowHtml($textarea.prop("form"));if(data!==$textarea.data("original")||$textarea.data("last")!==data||$textarea.data("old_allowhtml")!=allowHtml){$textarea.data("last",data);sending_auto_save=!0;$.ajax({url:$.service("autosave","save"),data:{editor_id:editorId,referer:autoSaveId,data:data},type:"POST",success:function(data){if(ajaxPreviewWindow&&typeof ajaxPreviewWindow.get_new_preview==='function'){ajaxPreviewWindow.get_new_preview()}else{ajax_preview(editorId,autoSaveId,!0)}
$textarea.data("old_allowhtml",allowHtml);sending_auto_save=!1},error:function(req,status,error){if(error){if(error=="Forbidden"){error=req.responseText.replace(/(<([^>]+)>)/ig,"")}
alert(tr("Auto Save error: ")+error)}
sending_auto_save=!1}})}else{}}}
function register_id(editorId,autoSaveId){var $textarea=$('#'+editorId);$textarea.data("autoSaveId",autoSaveId);if(typeof syntaxHighlighter.sync==='function'){syntaxHighlighter.sync($textarea)}
$textarea.parents('form').submit(function(){remove_save(editorId,autoSaveId)});$textarea.change(function(){auto_save(editorId)})}
var ajaxPreviewWindow;function ajax_preview(editorId,autoSaveId,inPage){if(editorId){var $textarea=$('#'+editorId);var $autosavepreview=$("#autosave_preview");syntaxHighlighter.sync($textarea);var allowHtml=auto_save_allowHtml($textarea.prop("form"));if(!ajaxPreviewWindow){if(inPage){var $prvw=$("#autosave_preview:visible");if($prvw.length){ajaxLoadingShow($autosavepreview);var h=location.search.match(/&hdr=(\d?)/);h=h&&h.length?h[1]:"";$.get($.service("edit","preview"),{editor_id:editorId,autoSaveId:autoSaveId,inPage:1,hdr:h,allowHtml:allowHtml},function(data){data=data.replace(/\shref/gi," tiki_href").replace(/\sonclick/gi," tiki_onclick").replace(/<script[.\s\S]*?<\/script>/mgi,"");$(".preview_contents",$autosavepreview).html(data);$("#preview_diff_style").val(function(){return getCookie("preview_diff_style","preview","")});ajaxLoadingHide()})}}else{initPreviewWindow(editorId,autoSaveId,allowHtml)}}else{if(typeof ajaxPreviewWindow.get_new_preview==='function'){ajaxPreviewWindow.get_new_preview();ajaxPreviewWindow.focus()}else{initPreviewWindow(editorId,autoSaveId,allowHtml)}}}else{if(auto_save_debug){alert("Auto save data not found")}}}
function initPreviewWindow(editorId,autoSaveId,allowHtml){var features='menubar=no,toolbar=no,fullscreen=no,titlebar=no,status=no,width=600';var url=$.service("edit","preview",{editor_id:editorId,autoSaveId:autoSaveId,allowHtml:allowHtml});window.open(url,"_blank",features)}
$(window).on("unload",function(){if(ajaxPreviewWindow&&typeof ajaxPreviewWindow.get_new_preview==='function'){ajaxPreviewWindow.close()}});
/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/jquery-timepicker-addon/dist/jquery-ui-timepicker-addon.js */
(function(factory){if(typeof define==='function'&&define.amd){define(['jquery','jquery-ui'],factory)}else{factory(jQuery)}}(function($){$.ui.timepicker=$.ui.timepicker||{};if($.ui.timepicker.version){return}
$.extend($.ui,{timepicker:{version:"1.6.1"}});var Timepicker=function(){this.regional=[];this.regional['']={currentText:'Now',closeText:'Done',amNames:['AM','A'],pmNames:['PM','P'],timeFormat:'HH:mm',timeSuffix:'',timeOnlyTitle:'Choose Time',timeText:'Time',hourText:'Hour',minuteText:'Minute',secondText:'Second',millisecText:'Millisecond',microsecText:'Microsecond',timezoneText:'Time Zone',isRTL:!1};this._defaults={showButtonPanel:!0,timeOnly:!1,timeOnlyShowDate:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,maxTime:null,minTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:!0,separator:' ',altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,altRedirectFocus:!0,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:'slider',oneLine:!1,defaultValue:null,parse:'strict',afterInject:null};$.extend(this._defaults,this.regional[''])};$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,maxTime:null,minTime:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:'',formattedDate:'',formattedTime:'',formattedDateTime:'',timezoneList:null,units:['hour','minute','second','millisec','microsec'],support:{},control:null,setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_newInst:function($input,opts){var tp_inst=new Timepicker(),inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults){if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr('time:'+attrName);if(attrValue){try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}}
overrides={beforeShow:function(input,dp_inst){if($.isFunction(tp_inst._defaults.evnts.beforeShow)){return tp_inst._defaults.evnts.beforeShow.call($input[0],input,dp_inst,tp_inst)}},onChangeMonthYear:function(year,month,dp_inst){if($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)){tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],year,month,dp_inst,tp_inst)}},onClose:function(dateText,dp_inst){if(tp_inst.timeDefined===!0&&$input.val()!==''){tp_inst._updateDateTime(dp_inst)}
if($.isFunction(tp_inst._defaults.evnts.onClose)){tp_inst._defaults.evnts.onClose.call($input[0],dateText,dp_inst,tp_inst)}}};for(i in overrides){if(overrides.hasOwnProperty(i)){fns[i]=opts[i]||this._defaults[i]||null}}
tp_inst._defaults=$.extend({},this._defaults,inlineSettings,opts,overrides,{evnts:fns,timepicker:tp_inst});tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(val){return val.toUpperCase()});tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(val){return val.toUpperCase()});tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:'')+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:''));if(typeof(tp_inst._defaults.controlType)==='string'){if(tp_inst._defaults.controlType==='slider'&&typeof($.ui.slider)==='undefined'){tp_inst._defaults.controlType='select'}
tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]}
else{tp_inst.control=tp_inst._defaults.controlType}
var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];if(tp_inst._defaults.timezoneList!==null){timezoneList=tp_inst._defaults.timezoneList}
var tzl=timezoneList.length,tzi=0,tzv=null;if(tzl>0&&typeof timezoneList[0]!=='object'){for(;tzi<tzl;tzi++){tzv=timezoneList[tzi];timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)}}}
tp_inst._defaults.timezoneList=timezoneList;tp_inst.timezone=tp_inst._defaults.timezone!==null?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):((new Date()).getTimezoneOffset()*-1);tp_inst.hour=tp_inst._defaults.hour<tp_inst._defaults.hourMin?tp_inst._defaults.hourMin:tp_inst._defaults.hour>tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour;tp_inst.minute=tp_inst._defaults.minute<tp_inst._defaults.minuteMin?tp_inst._defaults.minuteMin:tp_inst._defaults.minute>tp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute;tp_inst.second=tp_inst._defaults.second<tp_inst._defaults.secondMin?tp_inst._defaults.secondMin:tp_inst._defaults.second>tp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second;tp_inst.millisec=tp_inst._defaults.millisec<tp_inst._defaults.millisecMin?tp_inst._defaults.millisecMin:tp_inst._defaults.millisec>tp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec;tp_inst.microsec=tp_inst._defaults.microsec<tp_inst._defaults.microsecMin?tp_inst._defaults.microsecMin:tp_inst._defaults.microsec>tp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:tp_inst._defaults.microsec;tp_inst.ampm='';tp_inst.$input=$input;if(tp_inst._defaults.altField){tp_inst.$altInput=$(tp_inst._defaults.altField);if(tp_inst._defaults.altRedirectFocus===!0){tp_inst.$altInput.css({cursor:'pointer'}).focus(function(){$input.trigger("focus")})}}
if(tp_inst._defaults.minDate===0||tp_inst._defaults.minDateTime===0){tp_inst._defaults.minDate=new Date()}
if(tp_inst._defaults.maxDate===0||tp_inst._defaults.maxDateTime===0){tp_inst._defaults.maxDate=new Date()}
if(tp_inst._defaults.minDate!==undefined&&tp_inst._defaults.minDate instanceof Date){tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())}
if(tp_inst._defaults.minDateTime!==undefined&&tp_inst._defaults.minDateTime instanceof Date){tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())}
if(tp_inst._defaults.maxDate!==undefined&&tp_inst._defaults.maxDate instanceof Date){tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())}
if(tp_inst._defaults.maxDateTime!==undefined&&tp_inst._defaults.maxDateTime instanceof Date){tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())}
tp_inst.$input.bind('focus',function(){tp_inst._onFocus()});return tp_inst},_addTimePicker:function(dp_inst){var currDT=$.trim((this.$altInput&&this._defaults.altFieldTimeOnly)?this.$input.val()+' '+this.$altInput.val():this.$input.val());this.timeDefined=this._parseTime(currDT);this._limitMinMaxDateTime(dp_inst,!1);this._injectTimePicker();this._afterInject()},_parseTime:function(timeString,withDate){if(!this.inst){this.inst=$.datepicker._getInst(this.$input[0])}
if(withDate||!this._defaults.timeOnly){var dp_dateFormat=$.datepicker._get(this.inst,'dateFormat');try{var parseRes=parseDateTimeInternal(dp_dateFormat,this._defaults.timeFormat,timeString,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!parseRes.timeObj){return!1}
$.extend(this,parseRes.timeObj)}catch(err){$.timepicker.log("Error parsing the date/time string: "+err+"\ndate/time string = "+timeString+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+dp_dateFormat);return!1}
return!0}else{var timeObj=$.datepicker.parseTime(this._defaults.timeFormat,timeString,this._defaults);if(!timeObj){return!1}
$.extend(this,timeObj);return!0}},_afterInject:function(){var o=this.inst.settings;if($.isFunction(o.afterInject)){o.afterInject.call(this)}},_injectTimePicker:function(){var $dp=this.inst.dpDiv,o=this.inst.settings,tp_inst=this,litem='',uitem='',show=null,max={},gridSize={},size=null,i=0,l=0;if($dp.find("div.ui-timepicker-div").length===0&&o.showTimepicker){var noDisplay=' ui_tpicker_unit_hide',html='<div class="ui-timepicker-div'+(o.isRTL?' ui-timepicker-rtl':'')+(o.oneLine&&o.controlType==='select'?' ui-timepicker-oneLine':'')+'"><dl>'+'<dt class="ui_tpicker_time_label'+((o.showTime)?'':noDisplay)+'">'+o.timeText+'</dt>'+'<dd class="ui_tpicker_time '+((o.showTime)?'':noDisplay)+'"><input class="ui_tpicker_time_input" '+(o.timeInput?'':'disabled')+'/></dd>';for(i=0,l=this.units.length;i<l;i++){litem=this.units[i];uitem=litem.substr(0,1).toUpperCase()+litem.substr(1);show=o['show'+uitem]!==null?o['show'+uitem]:this.support[litem];max[litem]=parseInt((o[litem+'Max']-((o[litem+'Max']-o[litem+'Min'])%o['step'+uitem])),10);gridSize[litem]=0;html+='<dt class="ui_tpicker_'+litem+'_label'+(show?'':noDisplay)+'">'+o[litem+'Text']+'</dt>'+'<dd class="ui_tpicker_'+litem+(show?'':noDisplay)+'"><div class="ui_tpicker_'+litem+'_slider'+(show?'':noDisplay)+'"></div>';if(show&&o[litem+'Grid']>0){html+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';if(litem==='hour'){for(var h=o[litem+'Min'];h<=max[litem];h+=parseInt(o[litem+'Grid'],10)){gridSize[litem]++;var tmph=$.datepicker.formatTime(this.support.ampm?'hht':'HH',{hour:h},o);html+='<td data-for="'+litem+'">'+tmph+'</td>'}}
else{for(var m=o[litem+'Min'];m<=max[litem];m+=parseInt(o[litem+'Grid'],10)){gridSize[litem]++;html+='<td data-for="'+litem+'">'+((m<10)?'0':'')+m+'</td>'}}
html+='</tr></table></div>'}
html+='</dd>'}
var showTz=o.showTimezone!==null?o.showTimezone:this.support.timezone;html+='<dt class="ui_tpicker_timezone_label'+(showTz?'':noDisplay)+'">'+o.timezoneText+'</dt>';html+='<dd class="ui_tpicker_timezone'+(showTz?'':noDisplay)+'"></dd>';html+='</dl></div>';var $tp=$(html);if(o.timeOnly===!0){$tp.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all">'+'<div class="ui-datepicker-title">'+o.timeOnlyTitle+'</div>'+'</div>');$dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide()}
for(i=0,l=tp_inst.units.length;i<l;i++){litem=tp_inst.units[i];uitem=litem.substr(0,1).toUpperCase()+litem.substr(1);show=o['show'+uitem]!==null?o['show'+uitem]:this.support[litem];tp_inst[litem+'_slider']=tp_inst.control.create(tp_inst,$tp.find('.ui_tpicker_'+litem+'_slider'),litem,tp_inst[litem],o[litem+'Min'],max[litem],o['step'+uitem]);if(show&&o[litem+'Grid']>0){size=100*gridSize[litem]*o[litem+'Grid']/(max[litem]-o[litem+'Min']);$tp.find('.ui_tpicker_'+litem+' table').css({width:size+"%",marginLeft:o.isRTL?'0':((size/(-2*gridSize[litem]))+"%"),marginRight:o.isRTL?((size/(-2*gridSize[litem]))+"%"):'0',borderCollapse:'collapse'}).find("td").click(function(e){var $t=$(this),h=$t.html(),n=parseInt(h.replace(/[^0-9]/g),10),ap=h.replace(/[^apm]/ig),f=$t.data('for');if(f==='hour'){if(ap.indexOf('p')!==-1&&n<12){n+=12}
else{if(ap.indexOf('a')!==-1&&n===12){n=0}}}
tp_inst.control.value(tp_inst,tp_inst[f+'_slider'],litem,n);tp_inst._onTimeChange();tp_inst._onSelectHandler()}).css({cursor:'pointer',width:(100/gridSize[litem])+'%',textAlign:'center',overflow:'hidden'})}}
this.timezone_select=$tp.find('.ui_tpicker_timezone').append('<select></select>').find("select");$.fn.append.apply(this.timezone_select,$.map(o.timezoneList,function(val,idx){return $("<option />").val(typeof val==="object"?val.value:val).text(typeof val==="object"?val.label:val)}));if(typeof(this.timezone)!=="undefined"&&this.timezone!==null&&this.timezone!==""){var local_timezone=(new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12)).getTimezoneOffset()*-1;if(local_timezone===this.timezone){selectLocalTimezone(tp_inst)}else{this.timezone_select.val(this.timezone)}}else{if(typeof(this.hour)!=="undefined"&&this.hour!==null&&this.hour!==""){this.timezone_select.val(o.timezone)}else{selectLocalTimezone(tp_inst)}}
this.timezone_select.change(function(){tp_inst._onTimeChange();tp_inst._onSelectHandler();tp_inst._afterInject()});var $buttonPanel=$dp.find('.ui-datepicker-buttonpane');if($buttonPanel.length){$buttonPanel.before($tp)}else{$dp.append($tp)}
this.$timeObj=$tp.find('.ui_tpicker_time_input');this.$timeObj.change(function(){var timeFormat=tp_inst.inst.settings.timeFormat;var parsedTime=$.datepicker.parseTime(timeFormat,this.value);var update=new Date();if(parsedTime){update.setHours(parsedTime.hour);update.setMinutes(parsedTime.minute);update.setSeconds(parsedTime.second);$.datepicker._setTime(tp_inst.inst,update)}else{this.value=tp_inst.formattedTime;this.blur()}});if(this.inst!==null){var timeDefined=this.timeDefined;this._onTimeChange();this.timeDefined=timeDefined}
if(this._defaults.addSliderAccess){var sliderAccessArgs=this._defaults.sliderAccessArgs,rtl=this._defaults.isRTL;sliderAccessArgs.isRTL=rtl;setTimeout(function(){if($tp.find('.ui-slider-access').length===0){$tp.find('.ui-slider:visible').sliderAccess(sliderAccessArgs);var sliderAccessWidth=$tp.find('.ui-slider-access:eq(0)').outerWidth(!0);if(sliderAccessWidth){$tp.find('table:visible').each(function(){var $g=$(this),oldWidth=$g.outerWidth(),oldMarginLeft=$g.css(rtl?'marginRight':'marginLeft').toString().replace('%',''),newWidth=oldWidth-sliderAccessWidth,newMarginLeft=((oldMarginLeft*newWidth)/oldWidth)+'%',css={width:newWidth,marginRight:0,marginLeft:0};css[rtl?'marginRight':'marginLeft']=newMarginLeft;$g.css(css)})}}},10)}
tp_inst._limitMinMaxDateTime(this.inst,!0)}},_limitMinMaxDateTime:function(dp_inst,adjustSliders){var o=this._defaults,dp_date=new Date(dp_inst.selectedYear,dp_inst.selectedMonth,dp_inst.selectedDay);if(!this._defaults.showTimepicker){return}
if($.datepicker._get(dp_inst,'minDateTime')!==null&&$.datepicker._get(dp_inst,'minDateTime')!==undefined&&dp_date){var minDateTime=$.datepicker._get(dp_inst,'minDateTime'),minDateTimeDate=new Date(minDateTime.getFullYear(),minDateTime.getMonth(),minDateTime.getDate(),0,0,0,0);if(this.hourMinOriginal===null||this.minuteMinOriginal===null||this.secondMinOriginal===null||this.millisecMinOriginal===null||this.microsecMinOriginal===null){this.hourMinOriginal=o.hourMin;this.minuteMinOriginal=o.minuteMin;this.secondMinOriginal=o.secondMin;this.millisecMinOriginal=o.millisecMin;this.microsecMinOriginal=o.microsecMin}
if(dp_inst.settings.timeOnly||minDateTimeDate.getTime()===dp_date.getTime()){this._defaults.hourMin=minDateTime.getHours();if(this.hour<=this._defaults.hourMin){this.hour=this._defaults.hourMin;this._defaults.minuteMin=minDateTime.getMinutes();if(this.minute<=this._defaults.minuteMin){this.minute=this._defaults.minuteMin;this._defaults.secondMin=minDateTime.getSeconds();if(this.second<=this._defaults.secondMin){this.second=this._defaults.secondMin;this._defaults.millisecMin=minDateTime.getMilliseconds();if(this.millisec<=this._defaults.millisecMin){this.millisec=this._defaults.millisecMin;this._defaults.microsecMin=minDateTime.getMicroseconds()}else{if(this.microsec<this._defaults.microsecMin){this.microsec=this._defaults.microsecMin}
this._defaults.microsecMin=this.microsecMinOriginal}}else{this._defaults.millisecMin=this.millisecMinOriginal;this._defaults.microsecMin=this.microsecMinOriginal}}else{this._defaults.secondMin=this.secondMinOriginal;this._defaults.millisecMin=this.millisecMinOriginal;this._defaults.microsecMin=this.microsecMinOriginal}}else{this._defaults.minuteMin=this.minuteMinOriginal;this._defaults.secondMin=this.secondMinOriginal;this._defaults.millisecMin=this.millisecMinOriginal;this._defaults.microsecMin=this.microsecMinOriginal}}else{this._defaults.hourMin=this.hourMinOriginal;this._defaults.minuteMin=this.minuteMinOriginal;this._defaults.secondMin=this.secondMinOriginal;this._defaults.millisecMin=this.millisecMinOriginal;this._defaults.microsecMin=this.microsecMinOriginal}}
if($.datepicker._get(dp_inst,'maxDateTime')!==null&&$.datepicker._get(dp_inst,'maxDateTime')!==undefined&&dp_date){var maxDateTime=$.datepicker._get(dp_inst,'maxDateTime'),maxDateTimeDate=new Date(maxDateTime.getFullYear(),maxDateTime.getMonth(),maxDateTime.getDate(),0,0,0,0);if(this.hourMaxOriginal===null||this.minuteMaxOriginal===null||this.secondMaxOriginal===null||this.millisecMaxOriginal===null){this.hourMaxOriginal=o.hourMax;this.minuteMaxOriginal=o.minuteMax;this.secondMaxOriginal=o.secondMax;this.millisecMaxOriginal=o.millisecMax;this.microsecMaxOriginal=o.microsecMax}
if(dp_inst.settings.timeOnly||maxDateTimeDate.getTime()===dp_date.getTime()){this._defaults.hourMax=maxDateTime.getHours();if(this.hour>=this._defaults.hourMax){this.hour=this._defaults.hourMax;this._defaults.minuteMax=maxDateTime.getMinutes();if(this.minute>=this._defaults.minuteMax){this.minute=this._defaults.minuteMax;this._defaults.secondMax=maxDateTime.getSeconds();if(this.second>=this._defaults.secondMax){this.second=this._defaults.secondMax;this._defaults.millisecMax=maxDateTime.getMilliseconds();if(this.millisec>=this._defaults.millisecMax){this.millisec=this._defaults.millisecMax;this._defaults.microsecMax=maxDateTime.getMicroseconds()}else{if(this.microsec>this._defaults.microsecMax){this.microsec=this._defaults.microsecMax}
this._defaults.microsecMax=this.microsecMaxOriginal}}else{this._defaults.millisecMax=this.millisecMaxOriginal;this._defaults.microsecMax=this.microsecMaxOriginal}}else{this._defaults.secondMax=this.secondMaxOriginal;this._defaults.millisecMax=this.millisecMaxOriginal;this._defaults.microsecMax=this.microsecMaxOriginal}}else{this._defaults.minuteMax=this.minuteMaxOriginal;this._defaults.secondMax=this.secondMaxOriginal;this._defaults.millisecMax=this.millisecMaxOriginal;this._defaults.microsecMax=this.microsecMaxOriginal}}else{this._defaults.hourMax=this.hourMaxOriginal;this._defaults.minuteMax=this.minuteMaxOriginal;this._defaults.secondMax=this.secondMaxOriginal;this._defaults.millisecMax=this.millisecMaxOriginal;this._defaults.microsecMax=this.microsecMaxOriginal}}
if(dp_inst.settings.minTime!==null){var tempMinTime=new Date("01/01/1970 "+dp_inst.settings.minTime);if(this.hour<tempMinTime.getHours()){this.hour=this._defaults.hourMin=tempMinTime.getHours();this.minute=this._defaults.minuteMin=tempMinTime.getMinutes()}else if(this.hour===tempMinTime.getHours()&&this.minute<tempMinTime.getMinutes()){this.minute=this._defaults.minuteMin=tempMinTime.getMinutes()}else{if(this._defaults.hourMin<tempMinTime.getHours()){this._defaults.hourMin=tempMinTime.getHours();this._defaults.minuteMin=tempMinTime.getMinutes()}else if(this._defaults.hourMin===tempMinTime.getHours()===this.hour&&this._defaults.minuteMin<tempMinTime.getMinutes()){this._defaults.minuteMin=tempMinTime.getMinutes()}else{this._defaults.minuteMin=0}}}
if(dp_inst.settings.maxTime!==null){var tempMaxTime=new Date("01/01/1970 "+dp_inst.settings.maxTime);if(this.hour>tempMaxTime.getHours()){this.hour=this._defaults.hourMax=tempMaxTime.getHours();this.minute=this._defaults.minuteMax=tempMaxTime.getMinutes()}else if(this.hour===tempMaxTime.getHours()&&this.minute>tempMaxTime.getMinutes()){this.minute=this._defaults.minuteMax=tempMaxTime.getMinutes()}else{if(this._defaults.hourMax>tempMaxTime.getHours()){this._defaults.hourMax=tempMaxTime.getHours();this._defaults.minuteMax=tempMaxTime.getMinutes()}else if(this._defaults.hourMax===tempMaxTime.getHours()===this.hour&&this._defaults.minuteMax>tempMaxTime.getMinutes()){this._defaults.minuteMax=tempMaxTime.getMinutes()}else{this._defaults.minuteMax=59}}}
if(adjustSliders!==undefined&&adjustSliders===!0){var hourMax=parseInt((this._defaults.hourMax-((this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour)),10),minMax=parseInt((this._defaults.minuteMax-((this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute)),10),secMax=parseInt((this._defaults.secondMax-((this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond)),10),millisecMax=parseInt((this._defaults.millisecMax-((this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec)),10),microsecMax=parseInt((this._defaults.microsecMax-((this._defaults.microsecMax-this._defaults.microsecMin)%this._defaults.stepMicrosec)),10);if(this.hour_slider){this.control.options(this,this.hour_slider,'hour',{min:this._defaults.hourMin,max:hourMax,step:this._defaults.stepHour});this.control.value(this,this.hour_slider,'hour',this.hour-(this.hour%this._defaults.stepHour))}
if(this.minute_slider){this.control.options(this,this.minute_slider,'minute',{min:this._defaults.minuteMin,max:minMax,step:this._defaults.stepMinute});this.control.value(this,this.minute_slider,'minute',this.minute-(this.minute%this._defaults.stepMinute))}
if(this.second_slider){this.control.options(this,this.second_slider,'second',{min:this._defaults.secondMin,max:secMax,step:this._defaults.stepSecond});this.control.value(this,this.second_slider,'second',this.second-(this.second%this._defaults.stepSecond))}
if(this.millisec_slider){this.control.options(this,this.millisec_slider,'millisec',{min:this._defaults.millisecMin,max:millisecMax,step:this._defaults.stepMillisec});this.control.value(this,this.millisec_slider,'millisec',this.millisec-(this.millisec%this._defaults.stepMillisec))}
if(this.microsec_slider){this.control.options(this,this.microsec_slider,'microsec',{min:this._defaults.microsecMin,max:microsecMax,step:this._defaults.stepMicrosec});this.control.value(this,this.microsec_slider,'microsec',this.microsec-(this.microsec%this._defaults.stepMicrosec))}}},_onTimeChange:function(){if(!this._defaults.showTimepicker){return}
var hour=(this.hour_slider)?this.control.value(this,this.hour_slider,'hour'):!1,minute=(this.minute_slider)?this.control.value(this,this.minute_slider,'minute'):!1,second=(this.second_slider)?this.control.value(this,this.second_slider,'second'):!1,millisec=(this.millisec_slider)?this.control.value(this,this.millisec_slider,'millisec'):!1,microsec=(this.microsec_slider)?this.control.value(this,this.microsec_slider,'microsec'):!1,timezone=(this.timezone_select)?this.timezone_select.val():!1,o=this._defaults,pickerTimeFormat=o.pickerTimeFormat||o.timeFormat,pickerTimeSuffix=o.pickerTimeSuffix||o.timeSuffix;if(typeof(hour)==='object'){hour=!1}
if(typeof(minute)==='object'){minute=!1}
if(typeof(second)==='object'){second=!1}
if(typeof(millisec)==='object'){millisec=!1}
if(typeof(microsec)==='object'){microsec=!1}
if(typeof(timezone)==='object'){timezone=!1}
if(hour!==!1){hour=parseInt(hour,10)}
if(minute!==!1){minute=parseInt(minute,10)}
if(second!==!1){second=parseInt(second,10)}
if(millisec!==!1){millisec=parseInt(millisec,10)}
if(microsec!==!1){microsec=parseInt(microsec,10)}
if(timezone!==!1){timezone=timezone.toString()}
var ampm=o[hour<12?'amNames':'pmNames'][0];var hasChanged=(hour!==parseInt(this.hour,10)||minute!==parseInt(this.minute,10)||second!==parseInt(this.second,10)||millisec!==parseInt(this.millisec,10)||microsec!==parseInt(this.microsec,10)||(this.ampm.length>0&&(hour<12)!==($.inArray(this.ampm.toUpperCase(),this.amNames)!==-1))||(this.timezone!==null&&timezone!==this.timezone.toString()));if(hasChanged){if(hour!==!1){this.hour=hour}
if(minute!==!1){this.minute=minute}
if(second!==!1){this.second=second}
if(millisec!==!1){this.millisec=millisec}
if(microsec!==!1){this.microsec=microsec}
if(timezone!==!1){this.timezone=timezone}
if(!this.inst){this.inst=$.datepicker._getInst(this.$input[0])}
this._limitMinMaxDateTime(this.inst,!0)}
if(this.support.ampm){this.ampm=ampm}
this.formattedTime=$.datepicker.formatTime(o.timeFormat,this,o);if(this.$timeObj){var sPos=this.$timeObj[0].selectionStart;var ePos=this.$timeObj[0].selectionEnd;if(pickerTimeFormat===o.timeFormat){this.$timeObj.val(this.formattedTime+pickerTimeSuffix)}
else{this.$timeObj.val($.datepicker.formatTime(pickerTimeFormat,this,o)+pickerTimeSuffix)}
this.$timeObj[0].setSelectionRange(sPos,ePos)}
this.timeDefined=!0;if(hasChanged){this._updateDateTime()}},_onSelectHandler:function(){var onSelect=this._defaults.onSelect||this.inst.settings.onSelect;var inputEl=this.$input?this.$input[0]:null;if(onSelect&&inputEl){onSelect.apply(inputEl,[this.formattedDateTime,this])}},_updateDateTime:function(dp_inst){dp_inst=this.inst||dp_inst;var dtTmp=(dp_inst.currentYear>0?new Date(dp_inst.currentYear,dp_inst.currentMonth,dp_inst.currentDay):new Date(dp_inst.selectedYear,dp_inst.selectedMonth,dp_inst.selectedDay)),dt=$.datepicker._daylightSavingAdjust(dtTmp),dateFmt=$.datepicker._get(dp_inst,'dateFormat'),formatCfg=$.datepicker._getFormatConfig(dp_inst),timeAvailable=dt!==null&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(dateFmt,(dt===null?new Date():dt),formatCfg);var formattedDateTime=this.formattedDate;if(dp_inst.lastVal===""){dp_inst.currentYear=dp_inst.selectedYear;dp_inst.currentMonth=dp_inst.selectedMonth;dp_inst.currentDay=dp_inst.selectedDay}
if(this._defaults.timeOnly===!0&&this._defaults.timeOnlyShowDate===!1){formattedDateTime=this.formattedTime}else if((this._defaults.timeOnly!==!0&&(this._defaults.alwaysSetTime||timeAvailable))||(this._defaults.timeOnly===!0&&this._defaults.timeOnlyShowDate===!0)){formattedDateTime+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix}
this.formattedDateTime=formattedDateTime;if(!this._defaults.showTimepicker){this.$input.val(this.formattedDate)}else if(this.$altInput&&this._defaults.timeOnly===!1&&this._defaults.altFieldTimeOnly===!0){this.$altInput.val(this.formattedTime);this.$input.val(this.formattedDate)}else if(this.$altInput){this.$input.val(formattedDateTime);var altFormattedDateTime='',altSeparator=this._defaults.altSeparator!==null?this._defaults.altSeparator:this._defaults.separator,altTimeSuffix=this._defaults.altTimeSuffix!==null?this._defaults.altTimeSuffix:this._defaults.timeSuffix;if(!this._defaults.timeOnly){if(this._defaults.altFormat){altFormattedDateTime=$.datepicker.formatDate(this._defaults.altFormat,(dt===null?new Date():dt),formatCfg)}
else{altFormattedDateTime=this.formattedDate}
if(altFormattedDateTime){altFormattedDateTime+=altSeparator}}
if(this._defaults.altTimeFormat!==null){altFormattedDateTime+=$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+altTimeSuffix}
else{altFormattedDateTime+=this.formattedTime+altTimeSuffix}
this.$altInput.val(altFormattedDateTime)}else{this.$input.val(formattedDateTime)}
this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var inst=$.datepicker._getInst(this.$input.get(0)),tp_inst=$.datepicker._get(inst,'timepicker');if(tp_inst){if(tp_inst._defaults.timeOnly&&(inst.input.val()!==inst.lastVal)){try{$.datepicker._updateDatepicker(inst)}catch(err){$.timepicker.log(err)}}}}},_controls:{slider:{create:function(tp_inst,obj,unit,val,min,max,step){var rtl=tp_inst._defaults.isRTL;return obj.prop('slide',null).slider({orientation:"horizontal",value:rtl?val*-1:val,min:rtl?max*-1:min,max:rtl?min*-1:max,step:step,slide:function(event,ui){tp_inst.control.value(tp_inst,$(this),unit,rtl?ui.value*-1:ui.value);tp_inst._onTimeChange()},stop:function(event,ui){tp_inst._onSelectHandler()}})},options:function(tp_inst,obj,unit,opts,val){if(tp_inst._defaults.isRTL){if(typeof(opts)==='string'){if(opts==='min'||opts==='max'){if(val!==undefined){return obj.slider(opts,val*-1)}
return Math.abs(obj.slider(opts))}
return obj.slider(opts)}
var min=opts.min,max=opts.max;opts.min=opts.max=null;if(min!==undefined){opts.max=min*-1}
if(max!==undefined){opts.min=max*-1}
return obj.slider(opts)}
if(typeof(opts)==='string'&&val!==undefined){return obj.slider(opts,val)}
return obj.slider(opts)},value:function(tp_inst,obj,unit,val){if(tp_inst._defaults.isRTL){if(val!==undefined){return obj.slider('value',val*-1)}
return Math.abs(obj.slider('value'))}
if(val!==undefined){return obj.slider('value',val)}
return obj.slider('value')}},select:{create:function(tp_inst,obj,unit,val,min,max,step){var sel='<select class="ui-timepicker-select ui-state-default ui-corner-all" data-unit="'+unit+'" data-min="'+min+'" data-max="'+max+'" data-step="'+step+'">',format=tp_inst._defaults.pickerTimeFormat||tp_inst._defaults.timeFormat;for(var i=min;i<=max;i+=step){sel+='<option value="'+i+'"'+(i===val?' selected':'')+'>';if(unit==='hour'){sel+=$.datepicker.formatTime($.trim(format.replace(/[^ht ]/ig,'')),{hour:i},tp_inst._defaults)}
else if(unit==='millisec'||unit==='microsec'||i>=10){sel+=i}
else{sel+='0'+i.toString()}
sel+='</option>'}
sel+='</select>';obj.children('select').remove();$(sel).appendTo(obj).change(function(e){tp_inst._onTimeChange();tp_inst._onSelectHandler();tp_inst._afterInject()});return obj},options:function(tp_inst,obj,unit,opts,val){var o={},$t=obj.children('select');if(typeof(opts)==='string'){if(val===undefined){return $t.data(opts)}
o[opts]=val}
else{o=opts}
return tp_inst.control.create(tp_inst,obj,$t.data('unit'),$t.val(),o.min>=0?o.min:$t.data('min'),o.max||$t.data('max'),o.step||$t.data('step'))},value:function(tp_inst,obj,unit,val){var $t=obj.children('select');if(val!==undefined){return $t.val(val)}
return $t.val()}}}});$.fn.extend({timepicker:function(o){o=o||{};var tmp_args=Array.prototype.slice.call(arguments);if(typeof o==='object'){tmp_args[0]=$.extend(o,{timeOnly:!0})}
return $(this).each(function(){$.fn.datetimepicker.apply($(this),tmp_args)})},datetimepicker:function(o){o=o||{};var tmp_args=arguments;if(typeof(o)==='string'){if(o==='getDate'||(o==='option'&&tmp_args.length===2&&typeof(tmp_args[1])==='string')){return $.fn.datepicker.apply($(this[0]),tmp_args)}else{return this.each(function(){var $t=$(this);$t.datepicker.apply($t,tmp_args)})}}else{return this.each(function(){var $t=$(this);$t.datepicker($.timepicker._newInst($t,o)._defaults)})}}});$.datepicker.parseDateTime=function(dateFormat,timeFormat,dateTimeString,dateSettings,timeSettings){var parseRes=parseDateTimeInternal(dateFormat,timeFormat,dateTimeString,dateSettings,timeSettings);if(parseRes.timeObj){var t=parseRes.timeObj;parseRes.date.setHours(t.hour,t.minute,t.second,t.millisec);parseRes.date.setMicroseconds(t.microsec)}
return parseRes.date};$.datepicker.parseTime=function(timeFormat,timeString,options){var o=extendRemove(extendRemove({},$.timepicker._defaults),options||{}),iso8601=(timeFormat.replace(/\'.*?\'/g,'').indexOf('Z')!==-1);var strictParse=function(f,s,o){var getPatternAmpm=function(amNames,pmNames){var markers=[];if(amNames){$.merge(markers,amNames)}
if(pmNames){$.merge(markers,pmNames)}
markers=$.map(markers,function(val){return val.replace(/[.*+?|()\[\]{}\\]/g,'\\$&')});return '('+markers.join('|')+')?'};var getFormatPositions=function(timeFormat){var finds=timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),orders={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(finds){for(var i=0;i<finds.length;i++){if(orders[finds[i].toString().charAt(0)]===-1){orders[finds[i].toString().charAt(0)]=i+1}}}
return orders};var regstr='^'+f.toString().replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(match){var ml=match.length;switch(match.charAt(0).toLowerCase()){case 'h':return ml===1?'(\\d?\\d)':'(\\d{'+ml+'})';case 'm':return ml===1?'(\\d?\\d)':'(\\d{'+ml+'})';case 's':return ml===1?'(\\d?\\d)':'(\\d{'+ml+'})';case 'l':return '(\\d?\\d?\\d)';case 'c':return '(\\d?\\d?\\d)';case 'z':return '(z|[-+]\\d\\d:?\\d\\d|\\S+)?';case 't':return getPatternAmpm(o.amNames,o.pmNames);default:return '('+match.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(m){return "\\"+m})+')?'}}).replace(/\s/g,'\\s?')+o.timeSuffix+'$',order=getFormatPositions(f),ampm='',treg;treg=s.match(new RegExp(regstr,'i'));var resTime={hour:0,minute:0,second:0,millisec:0,microsec:0};if(treg){if(order.t!==-1){if(treg[order.t]===undefined||treg[order.t].length===0){ampm='';resTime.ampm=''}else{ampm=$.inArray(treg[order.t].toUpperCase(),$.map(o.amNames,function(x,i){return x.toUpperCase()}))!==-1?'AM':'PM';resTime.ampm=o[ampm==='AM'?'amNames':'pmNames'][0]}}
if(order.h!==-1){if(ampm==='AM'&&treg[order.h]==='12'){resTime.hour=0}else{if(ampm==='PM'&&treg[order.h]!=='12'){resTime.hour=parseInt(treg[order.h],10)+12}else{resTime.hour=Number(treg[order.h])}}}
if(order.m!==-1){resTime.minute=Number(treg[order.m])}
if(order.s!==-1){resTime.second=Number(treg[order.s])}
if(order.l!==-1){resTime.millisec=Number(treg[order.l])}
if(order.c!==-1){resTime.microsec=Number(treg[order.c])}
if(order.z!==-1&&treg[order.z]!==undefined){resTime.timezone=$.timepicker.timezoneOffsetNumber(treg[order.z])}
return resTime}
return!1};var looseParse=function(f,s,o){try{var d=new Date('2012-01-01 '+s);if(isNaN(d.getTime())){d=new Date('2012-01-01T'+s);if(isNaN(d.getTime())){d=new Date('01/01/2012 '+s);if(isNaN(d.getTime())){throw "Unable to parse time with native Date: "+s}}}
return{hour:d.getHours(),minute:d.getMinutes(),second:d.getSeconds(),millisec:d.getMilliseconds(),microsec:d.getMicroseconds(),timezone:d.getTimezoneOffset()*-1}}
catch(err){try{return strictParse(f,s,o)}
catch(err2){$.timepicker.log("Unable to parse \ntimeString: "+s+"\ntimeFormat: "+f)}}
return!1};if(typeof o.parse==="function"){return o.parse(timeFormat,timeString,o)}
if(o.parse==='loose'){return looseParse(timeFormat,timeString,o)}
return strictParse(timeFormat,timeString,o)};$.datepicker.formatTime=function(format,time,options){options=options||{};options=$.extend({},$.timepicker._defaults,options);time=$.extend({hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null},time);var tmptime=format,ampmName=options.amNames[0],hour=parseInt(time.hour,10);if(hour>11){ampmName=options.pmNames[0]}
tmptime=tmptime.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(match){switch(match){case 'HH':return('0'+hour).slice(-2);case 'H':return hour;case 'hh':return('0'+convert24to12(hour)).slice(-2);case 'h':return convert24to12(hour);case 'mm':return('0'+time.minute).slice(-2);case 'm':return time.minute;case 'ss':return('0'+time.second).slice(-2);case 's':return time.second;case 'l':return('00'+time.millisec).slice(-3);case 'c':return('00'+time.microsec).slice(-3);case 'z':return $.timepicker.timezoneOffsetString(time.timezone===null?options.timezone:time.timezone,!1);case 'Z':return $.timepicker.timezoneOffsetString(time.timezone===null?options.timezone:time.timezone,!0);case 'T':return ampmName.charAt(0).toUpperCase();case 'TT':return ampmName.toUpperCase();case 't':return ampmName.charAt(0).toLowerCase();case 'tt':return ampmName.toLowerCase();default:return match.replace(/'/g,"")}});return tmptime};$.datepicker._base_selectDate=$.datepicker._selectDate;$.datepicker._selectDate=function(id,dateStr){var inst=this._getInst($(id)[0]),tp_inst=this._get(inst,'timepicker'),was_inline;if(tp_inst&&inst.settings.showTimepicker){tp_inst._limitMinMaxDateTime(inst,!0);was_inline=inst.inline;inst.inline=inst.stay_open=!0;this._base_selectDate(id,dateStr);inst.inline=was_inline;inst.stay_open=!1;this._notifyChange(inst);this._updateDatepicker(inst)}else{this._base_selectDate(id,dateStr)}};$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker;$.datepicker._updateDatepicker=function(inst){var input=inst.input[0];if($.datepicker._curInst&&$.datepicker._curInst!==inst&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!==input){return}
if(typeof(inst.stay_open)!=='boolean'||inst.stay_open===!1){this._base_updateDatepicker(inst);var tp_inst=this._get(inst,'timepicker');if(tp_inst){tp_inst._addTimePicker(inst)}}};$.datepicker._base_doKeyPress=$.datepicker._doKeyPress;$.datepicker._doKeyPress=function(event){var inst=$.datepicker._getInst(event.target),tp_inst=$.datepicker._get(inst,'timepicker');if(tp_inst){if($.datepicker._get(inst,'constrainInput')){var ampm=tp_inst.support.ampm,tz=tp_inst._defaults.showTimezone!==null?tp_inst._defaults.showTimezone:tp_inst.support.timezone,dateChars=$.datepicker._possibleChars($.datepicker._get(inst,'dateFormat')),datetimeChars=tp_inst._defaults.timeFormat.toString().replace(/[hms]/g,'').replace(/TT/g,ampm?'APM':'').replace(/Tt/g,ampm?'AaPpMm':'').replace(/tT/g,ampm?'AaPpMm':'').replace(/T/g,ampm?'AP':'').replace(/tt/g,ampm?'apm':'').replace(/t/g,ampm?'ap':'')+" "+tp_inst._defaults.separator+tp_inst._defaults.timeSuffix+(tz?tp_inst._defaults.timezoneList.join(''):'')+(tp_inst._defaults.amNames.join(''))+(tp_inst._defaults.pmNames.join(''))+dateChars,chr=String.fromCharCode(event.charCode===undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<' '||!dateChars||datetimeChars.indexOf(chr)>-1)}}
return $.datepicker._base_doKeyPress(event)};$.datepicker._base_updateAlternate=$.datepicker._updateAlternate;$.datepicker._updateAlternate=function(inst){var tp_inst=this._get(inst,'timepicker');if(tp_inst){var altField=tp_inst._defaults.altField;if(altField){var altFormat=tp_inst._defaults.altFormat||tp_inst._defaults.dateFormat,date=this._getDate(inst),formatCfg=$.datepicker._getFormatConfig(inst),altFormattedDateTime='',altSeparator=tp_inst._defaults.altSeparator?tp_inst._defaults.altSeparator:tp_inst._defaults.separator,altTimeSuffix=tp_inst._defaults.altTimeSuffix?tp_inst._defaults.altTimeSuffix:tp_inst._defaults.timeSuffix,altTimeFormat=tp_inst._defaults.altTimeFormat!==null?tp_inst._defaults.altTimeFormat:tp_inst._defaults.timeFormat;altFormattedDateTime+=$.datepicker.formatTime(altTimeFormat,tp_inst,tp_inst._defaults)+altTimeSuffix;if(!tp_inst._defaults.timeOnly&&!tp_inst._defaults.altFieldTimeOnly&&date!==null){if(tp_inst._defaults.altFormat){altFormattedDateTime=$.datepicker.formatDate(tp_inst._defaults.altFormat,date,formatCfg)+altSeparator+altFormattedDateTime}
else{altFormattedDateTime=tp_inst.formattedDate+altSeparator+altFormattedDateTime}}
$(altField).val(inst.input.val()?altFormattedDateTime:"")}}
else{$.datepicker._base_updateAlternate(inst)}};$.datepicker._base_doKeyUp=$.datepicker._doKeyUp;$.datepicker._doKeyUp=function(event){var inst=$.datepicker._getInst(event.target),tp_inst=$.datepicker._get(inst,'timepicker');if(tp_inst){if(tp_inst._defaults.timeOnly&&(inst.input.val()!==inst.lastVal)){try{$.datepicker._updateDatepicker(inst)}catch(err){$.timepicker.log(err)}}}
return $.datepicker._base_doKeyUp(event)};$.datepicker._base_gotoToday=$.datepicker._gotoToday;$.datepicker._gotoToday=function(id){var inst=this._getInst($(id)[0]);this._base_gotoToday(id);var tp_inst=this._get(inst,'timepicker');var tzoffset=$.timepicker.timezoneOffsetNumber(tp_inst.timezone);var now=new Date();now.setMinutes(now.getMinutes()+now.getTimezoneOffset()+tzoffset);this._setTime(inst,now);this._setDate(inst,now);tp_inst._onSelectHandler()};$.datepicker._disableTimepickerDatepicker=function(target){var inst=this._getInst(target);if(!inst){return}
var tp_inst=this._get(inst,'timepicker');$(target).datepicker('getDate');if(tp_inst){inst.settings.showTimepicker=!1;tp_inst._defaults.showTimepicker=!1;tp_inst._updateDateTime(inst)}};$.datepicker._enableTimepickerDatepicker=function(target){var inst=this._getInst(target);if(!inst){return}
var tp_inst=this._get(inst,'timepicker');$(target).datepicker('getDate');if(tp_inst){inst.settings.showTimepicker=!0;tp_inst._defaults.showTimepicker=!0;tp_inst._addTimePicker(inst);tp_inst._updateDateTime(inst)}};$.datepicker._setTime=function(inst,date){var tp_inst=this._get(inst,'timepicker');if(tp_inst){var defaults=tp_inst._defaults;tp_inst.hour=date?date.getHours():defaults.hour;tp_inst.minute=date?date.getMinutes():defaults.minute;tp_inst.second=date?date.getSeconds():defaults.second;tp_inst.millisec=date?date.getMilliseconds():defaults.millisec;tp_inst.microsec=date?date.getMicroseconds():defaults.microsec;tp_inst._limitMinMaxDateTime(inst,!0);tp_inst._onTimeChange();tp_inst._updateDateTime(inst)}};$.datepicker._setTimeDatepicker=function(target,date,withDate){var inst=this._getInst(target);if(!inst){return}
var tp_inst=this._get(inst,'timepicker');if(tp_inst){this._setDateFromField(inst);var tp_date;if(date){if(typeof date==="string"){tp_inst._parseTime(date,withDate);tp_date=new Date();tp_date.setHours(tp_inst.hour,tp_inst.minute,tp_inst.second,tp_inst.millisec);tp_date.setMicroseconds(tp_inst.microsec)}else{tp_date=new Date(date.getTime());tp_date.setMicroseconds(date.getMicroseconds())}
if(tp_date.toString()==='Invalid Date'){tp_date=undefined}
this._setTime(inst,tp_date)}}};$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker;$.datepicker._setDateDatepicker=function(target,_date){var inst=this._getInst(target);var date=_date;if(!inst){return}
if(typeof(_date)==='string'){date=new Date(_date);if(!date.getTime()){this._base_setDateDatepicker.apply(this,arguments);date=$(target).datepicker('getDate')}}
var tp_inst=this._get(inst,'timepicker');var tp_date;if(date instanceof Date){tp_date=new Date(date.getTime());tp_date.setMicroseconds(date.getMicroseconds())}else{tp_date=date}
if(tp_inst&&tp_date){if(!tp_inst.support.timezone&&tp_inst._defaults.timezone===null){tp_inst.timezone=tp_date.getTimezoneOffset()*-1}
date=$.timepicker.timezoneAdjust(date,tp_inst.timezone);tp_date=$.timepicker.timezoneAdjust(tp_date,tp_inst.timezone)}
this._updateDatepicker(inst);this._base_setDateDatepicker.apply(this,arguments);this._setTimeDatepicker(target,tp_date,!0)};$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker;$.datepicker._getDateDatepicker=function(target,noDefault){var inst=this._getInst(target);if(!inst){return}
var tp_inst=this._get(inst,'timepicker');if(tp_inst){if(inst.lastVal===undefined){this._setDateFromField(inst,noDefault)}
var date=this._getDate(inst);var currDT=$.trim((tp_inst.$altInput&&tp_inst._defaults.altFieldTimeOnly)?tp_inst.$input.val()+' '+tp_inst.$altInput.val():tp_inst.$input.val());if(date&&tp_inst._parseTime(currDT,!inst.settings.timeOnly)){date.setHours(tp_inst.hour,tp_inst.minute,tp_inst.second,tp_inst.millisec);date.setMicroseconds(tp_inst.microsec);if(tp_inst.timezone!=null){if(!tp_inst.support.timezone&&tp_inst._defaults.timezone===null){tp_inst.timezone=date.getTimezoneOffset()*-1}
date=$.timepicker.timezoneAdjust(date,tp_inst.timezone)}}
return date}
return this._base_getDateDatepicker(target,noDefault)};$.datepicker._base_parseDate=$.datepicker.parseDate;$.datepicker.parseDate=function(format,value,settings){var date;try{date=this._base_parseDate(format,value,settings)}catch(err){if(err.indexOf(":")>=0){date=this._base_parseDate(format,value.substring(0,value.length-(err.length-err.indexOf(':')-2)),settings);$.timepicker.log("Error parsing the date string: "+err+"\ndate string = "+value+"\ndate format = "+format)}else{throw err}}
return date};$.datepicker._base_formatDate=$.datepicker._formatDate;$.datepicker._formatDate=function(inst,day,month,year){var tp_inst=this._get(inst,'timepicker');if(tp_inst){tp_inst._updateDateTime(inst);return tp_inst.$input.val()}
return this._base_formatDate(inst)};$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker;$.datepicker._optionDatepicker=function(target,name,value){var inst=this._getInst(target),name_clone;if(!inst){return null}
var tp_inst=this._get(inst,'timepicker');if(tp_inst){var min=null,max=null,onselect=null,overrides=tp_inst._defaults.evnts,fns={},prop,ret,oldVal,$target;if(typeof name==='string'){if(name==='minDate'||name==='minDateTime'){min=value}else if(name==='maxDate'||name==='maxDateTime'){max=value}else if(name==='onSelect'){onselect=value}else if(overrides.hasOwnProperty(name)){if(typeof(value)==='undefined'){return overrides[name]}
fns[name]=value;name_clone={}}}else if(typeof name==='object'){if(name.minDate){min=name.minDate}else if(name.minDateTime){min=name.minDateTime}else if(name.maxDate){max=name.maxDate}else if(name.maxDateTime){max=name.maxDateTime}
for(prop in overrides){if(overrides.hasOwnProperty(prop)&&name[prop]){fns[prop]=name[prop]}}}
for(prop in fns){if(fns.hasOwnProperty(prop)){overrides[prop]=fns[prop];if(!name_clone){name_clone=$.extend({},name)}
delete name_clone[prop]}}
if(name_clone&&isEmptyObject(name_clone)){return}
if(min){if(min===0){min=new Date()}else{min=new Date(min)}
tp_inst._defaults.minDate=min;tp_inst._defaults.minDateTime=min}else if(max){if(max===0){max=new Date()}else{max=new Date(max)}
tp_inst._defaults.maxDate=max;tp_inst._defaults.maxDateTime=max}else if(onselect){tp_inst._defaults.onSelect=onselect}
if(min||max){$target=$(target);oldVal=$target.datetimepicker('getDate');ret=this._base_optionDatepicker.call($.datepicker,target,name_clone||name,value);$target.datetimepicker('setDate',oldVal);return ret}}
if(value===undefined){return this._base_optionDatepicker.call($.datepicker,target,name)}
return this._base_optionDatepicker.call($.datepicker,target,name_clone||name,value)};var isEmptyObject=function(obj){var prop;for(prop in obj){if(obj.hasOwnProperty(prop)){return!1}}
return!0};var extendRemove=function(target,props){$.extend(target,props);for(var name in props){if(props[name]===null||props[name]===undefined){target[name]=props[name]}}
return target};var detectSupport=function(timeFormat){var tf=timeFormat.replace(/'.*?'/g,'').toLowerCase(),isIn=function(f,t){return f.indexOf(t)!==-1?!0:!1};return{hour:isIn(tf,'h'),minute:isIn(tf,'m'),second:isIn(tf,'s'),millisec:isIn(tf,'l'),microsec:isIn(tf,'c'),timezone:isIn(tf,'z'),ampm:isIn(tf,'t')&&isIn(timeFormat,'h'),iso8601:isIn(timeFormat,'Z')}};var convert24to12=function(hour){hour%=12;if(hour===0){hour=12}
return String(hour)};var computeEffectiveSetting=function(settings,property){return settings&&settings[property]?settings[property]:$.timepicker._defaults[property]};var splitDateTime=function(dateTimeString,timeSettings){var separator=computeEffectiveSetting(timeSettings,'separator'),format=computeEffectiveSetting(timeSettings,'timeFormat'),timeParts=format.split(separator),timePartsLen=timeParts.length,allParts=dateTimeString.split(separator),allPartsLen=allParts.length;if(allPartsLen>1){return{dateString:allParts.splice(0,allPartsLen-timePartsLen).join(separator),timeString:allParts.splice(0,timePartsLen).join(separator)}}
return{dateString:dateTimeString,timeString:''}};var parseDateTimeInternal=function(dateFormat,timeFormat,dateTimeString,dateSettings,timeSettings){var date,parts,parsedTime;parts=splitDateTime(dateTimeString,timeSettings);date=$.datepicker._base_parseDate(dateFormat,parts.dateString,dateSettings);if(parts.timeString===''){return{date:date}}
parsedTime=$.datepicker.parseTime(timeFormat,parts.timeString,timeSettings);if(!parsedTime){throw 'Wrong time format'}
return{date:date,timeObj:parsedTime}};var selectLocalTimezone=function(tp_inst,date){if(tp_inst&&tp_inst.timezone_select){var now=date||new Date();tp_inst.timezone_select.val(-now.getTimezoneOffset())}};$.timepicker=new Timepicker();$.timepicker.timezoneOffsetString=function(tzMinutes,iso8601){if(isNaN(tzMinutes)||tzMinutes>840||tzMinutes<-720){return tzMinutes}
var off=tzMinutes,minutes=off%60,hours=(off-minutes)/60,iso=iso8601?':':'',tz=(off>=0?'+':'-')+('0'+Math.abs(hours)).slice(-2)+iso+('0'+Math.abs(minutes)).slice(-2);if(tz==='+00:00'){return 'Z'}
return tz};$.timepicker.timezoneOffsetNumber=function(tzString){var normalized=tzString.toString().replace(':','');if(normalized.toUpperCase()==='Z'){return 0}
if(!/^(\-|\+)\d{4}$/.test(normalized)){return tzString}
return((normalized.substr(0,1)==='-'?-1:1)*((parseInt(normalized.substr(1,2),10)*60)+parseInt(normalized.substr(3,2),10)))};$.timepicker.timezoneAdjust=function(date,toTimezone){var toTz=$.timepicker.timezoneOffsetNumber(toTimezone);if(!isNaN(toTz)){date.setMinutes(date.getMinutes()+ -date.getTimezoneOffset()-toTz)}
return date};$.timepicker.timeRange=function(startTime,endTime,options){return $.timepicker.handleRange('timepicker',startTime,endTime,options)};$.timepicker.datetimeRange=function(startTime,endTime,options){$.timepicker.handleRange('datetimepicker',startTime,endTime,options)};$.timepicker.dateRange=function(startTime,endTime,options){$.timepicker.handleRange('datepicker',startTime,endTime,options)};$.timepicker.handleRange=function(method,startTime,endTime,options){options=$.extend({},{minInterval:0,maxInterval:0,start:{},end:{}},options);var timeOnly=!1;if(method==='timepicker'){timeOnly=!0;method='datetimepicker'}
function checkDates(changed,other){var startdt=startTime[method]('getDate'),enddt=endTime[method]('getDate'),changeddt=changed[method]('getDate');if(startdt!==null){var minDate=new Date(startdt.getTime()),maxDate=new Date(startdt.getTime());minDate.setMilliseconds(minDate.getMilliseconds()+options.minInterval);maxDate.setMilliseconds(maxDate.getMilliseconds()+options.maxInterval);if(options.minInterval>0&&minDate>enddt){endTime[method]('setDate',minDate)}
else if(options.maxInterval>0&&maxDate<enddt){endTime[method]('setDate',maxDate)}
else if(startdt>enddt){other[method]('setDate',changeddt)}}}
function selected(changed,other,option){if(!changed.val()){return}
var date=changed[method].call(changed,'getDate');if(date!==null&&options.minInterval>0){if(option==='minDate'){date.setMilliseconds(date.getMilliseconds()+options.minInterval)}
if(option==='maxDate'){date.setMilliseconds(date.getMilliseconds()-options.minInterval)}}
if(date.getTime){other[method].call(other,'option',option,date)}}
$.fn[method].call(startTime,$.extend({timeOnly:timeOnly,onClose:function(dateText,inst){checkDates($(this),endTime)},onSelect:function(selectedDateTime){selected($(this),endTime,'minDate')}},options,options.start));$.fn[method].call(endTime,$.extend({timeOnly:timeOnly,onClose:function(dateText,inst){checkDates($(this),startTime)},onSelect:function(selectedDateTime){selected($(this),startTime,'maxDate')}},options,options.end));checkDates(startTime,endTime);selected(startTime,endTime,'minDate');selected(endTime,startTime,'maxDate');return $([startTime.get(0),endTime.get(0)])};$.timepicker.log=function(){if(window.console){window.console.log.apply(window.console,Array.prototype.slice.call(arguments))}};$.timepicker._util={_extendRemove:extendRemove,_isEmptyObject:isEmptyObject,_convert24to12:convert24to12,_detectSupport:detectSupport,_selectLocalTimezone:selectLocalTimezone,_computeEffectiveSetting:computeEffectiveSetting,_splitDateTime:splitDateTime,_parseDateTimeInternal:parseDateTimeInternal};if(!Date.prototype.getMicroseconds){Date.prototype.microseconds=0;Date.prototype.getMicroseconds=function(){return this.microseconds};Date.prototype.setMicroseconds=function(m){this.setMilliseconds(this.getMilliseconds()+Math.floor(m/1000));this.microseconds=m%1000;return this}}
$.timepicker.version="1.6.1"}));
/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/superfish/dist/js/superfish.js */
(function($,w){"use strict";var methods=(function(){var c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',menuArrowClass:'sf-arrows'},ios=(function(){var ios=/iPhone|iPad|iPod/i.test(navigator.userAgent);if(ios){$(w).load(function(){$('body').children().on('click',$.noop)})}
return ios})(),wp7=(function(){var style=document.documentElement.style;return('behavior' in style&&'fill' in style&&/iemobile/i.test(navigator.userAgent))})(),unprefixedPointerEvents=(function(){return(!!w.PointerEvent)})(),toggleMenuClasses=function($menu,o){var classes=c.menuClass;if(o.cssArrows){classes+=' '+c.menuArrowClass}
$menu.toggleClass(classes)},setPathToCurrent=function($menu,o){return $menu.find('li.'+o.pathClass).slice(0,o.pathLevels).addClass(o.hoverClass+' '+c.bcClass).filter(function(){return($(this).children(o.popUpSelector).hide().show().length)}).removeClass(o.pathClass)},toggleAnchorClass=function($li){$li.children('a').toggleClass(c.anchorClass)},toggleTouchAction=function($menu){var msTouchAction=$menu.css('ms-touch-action');var touchAction=$menu.css('touch-action');touchAction=touchAction||msTouchAction;touchAction=(touchAction==='pan-y')?'auto':'pan-y';$menu.css({'ms-touch-action':touchAction,'touch-action':touchAction})},applyHandlers=function($menu,o){var targets='li:has('+o.popUpSelector+')';if($.fn.hoverIntent&&!o.disableHI){$menu.hoverIntent(over,out,targets)}
else{$menu.on('mouseenter.superfish',targets,over).on('mouseleave.superfish',targets,out)}
var touchevent='MSPointerDown.superfish';if(unprefixedPointerEvents){touchevent='pointerdown.superfish'}
if(!ios){touchevent+=' touchend.superfish'}
if(wp7){touchevent+=' mousedown.superfish'}
$menu.on('focusin.superfish','li',over).on('focusout.superfish','li',out).on(touchevent,'a',o,touchHandler)},touchHandler=function(e){var $this=$(this),$ul=$this.siblings(e.data.popUpSelector);if($ul.length>0&&$ul.is(':hidden')){$this.one('click.superfish',!1);if(e.type==='MSPointerDown'||e.type==='pointerdown'){$this.trigger('focus')}else{$.proxy(over,$this.parent('li'))()}}},over=function(){var $this=$(this),o=getOptions($this);clearTimeout(o.sfTimer);$this.siblings().superfish('hide').end().superfish('show')},out=function(){var $this=$(this),o=getOptions($this);if(ios){$.proxy(close,$this,o)()}
else{clearTimeout(o.sfTimer);o.sfTimer=setTimeout($.proxy(close,$this,o),o.delay)}},close=function(o){o.retainPath=($.inArray(this[0],o.$path)>-1);this.superfish('hide');if(!this.parents('.'+o.hoverClass).length){o.onIdle.call(getMenu(this));if(o.$path.length){$.proxy(over,o.$path)()}}},getMenu=function($el){return $el.closest('.'+c.menuClass)},getOptions=function($el){return getMenu($el).data('sf-options')};return{hide:function(instant){if(this.length){var $this=this,o=getOptions($this);if(!o){return this}
var not=(o.retainPath===!0)?o.$path:'',$ul=$this.find('li.'+o.hoverClass).add(this).not(not).removeClass(o.hoverClass).children(o.popUpSelector),speed=o.speedOut;if(instant){$ul.show();speed=0}
o.retainPath=!1;o.onBeforeHide.call($ul);$ul.stop(!0,!0).animate(o.animationOut,speed,function(){var $this=$(this);o.onHide.call($this)})}
return this},show:function(){var o=getOptions(this);if(!o){return this}
var $this=this.addClass(o.hoverClass),$ul=$this.children(o.popUpSelector);o.onBeforeShow.call($ul);$ul.stop(!0,!0).animate(o.animation,o.speed,function(){o.onShow.call($ul)});return this},destroy:function(){return this.each(function(){var $this=$(this),o=$this.data('sf-options'),$hasPopUp;if(!o){return!1}
$hasPopUp=$this.find(o.popUpSelector).parent('li');clearTimeout(o.sfTimer);toggleMenuClasses($this,o);toggleAnchorClass($hasPopUp);toggleTouchAction($this);$this.off('.superfish').off('.hoverIntent');$hasPopUp.children(o.popUpSelector).attr('style',function(i,style){return style.replace(/display[^;]+;?/g,'')});o.$path.removeClass(o.hoverClass+' '+c.bcClass).addClass(o.pathClass);$this.find('.'+o.hoverClass).removeClass(o.hoverClass);o.onDestroy.call($this);$this.removeData('sf-options')})},init:function(op){return this.each(function(){var $this=$(this);if($this.data('sf-options')){return!1}
var o=$.extend({},$.fn.superfish.defaults,op),$hasPopUp=$this.find(o.popUpSelector).parent('li');o.$path=setPathToCurrent($this,o);$this.data('sf-options',o);toggleMenuClasses($this,o);toggleAnchorClass($hasPopUp);toggleTouchAction($this);applyHandlers($this,o);$hasPopUp.not('.'+c.bcClass).superfish('hide',!0);o.onInit.call(this)})}}})();$.fn.superfish=function(method,args){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1))}
else if(typeof method==='object'||!method){return methods.init.apply(this,arguments)}
else{return $.error('Method '+method+' does not exist on jQuery.fn.superfish')}};$.fn.superfish.defaults={popUpSelector:'ul,.sf-mega',hoverClass:'sfHover',pathClass:'overrideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},animationOut:{opacity:'hide'},speed:'normal',speedOut:'fast',cssArrows:!0,disableHI:!1,onInit:$.noop,onBeforeShow:$.noop,onShow:$.noop,onBeforeHide:$.noop,onHide:$.noop,onIdle:$.noop,onDestroy:$.noop}})(jQuery,window);
/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/superfish/dist/js/supersubs.js */
(function($){$.fn.supersubs=function(options){var opts=$.extend({},$.fn.supersubs.defaults,options);return this.each(function(){var $$=$(this);var o=$.meta?$.extend({},opts,$$.data()):opts;var $ULs=$$.find('ul').show();var fontsize=$('<li id="menu-fontsize">&#8212;</li>').css({'padding':0,'position':'absolute','top':'-999em','width':'auto'}).appendTo($$)[0].clientWidth;$('#menu-fontsize').remove();$ULs.each(function(i){var $ul=$(this);var $LIs=$ul.children();var $As=$LIs.children('a');var liFloat=$LIs.css('white-space','nowrap').css('float');$ul.add($LIs).add($As).css({'float':'none','width':'auto'});var emWidth=$ul[0].clientWidth/fontsize;emWidth+=o.extraWidth;if(emWidth>o.maxWidth){emWidth=o.maxWidth}
else if(emWidth<o.minWidth){emWidth=o.minWidth}
emWidth+='em';$ul.css('width',emWidth);$LIs.css({'float':liFloat,'width':'100%','white-space':'normal'}).each(function(){var $childUl=$(this).children('ul');var offsetDirection=$childUl.css('left')!==undefined?'left':'right';$childUl.css(offsetDirection,'100%')})}).hide()})};$.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0}})(jQuery);
/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/superfish/dist/js/hoverIntent.js */
(function($){$.fn.hoverIntent=function(handlerIn,handlerOut,selector){var cfg={interval:100,sensitivity:7,timeout:0};if(typeof handlerIn==="object"){cfg=$.extend(cfg,handlerIn)}else if($.isFunction(handlerOut)){cfg=$.extend(cfg,{over:handlerIn,out:handlerOut,selector:selector})}else{cfg=$.extend(cfg,{over:handlerIn,out:handlerIn,selector:handlerOut})}
var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).off("mousemove.hoverIntent",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}
if(e.type=="mouseenter"){pX=ev.pageX;pY=ev.pageY;$(ob).on("mousemove.hoverIntent",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).off("mousemove.hoverIntent",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.on({'mouseenter.hoverIntent':handleHover,'mouseleave.hoverIntent':handleHover},cfg.selector)}})(jQuery);
/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/reflection-jquery/js/reflection.js */
(function(a){a.fn.extend({reflect:function(b){b=a.extend({height:1/3,opacity:0.5},b);return this.unreflect().each(function(){var c=this;if(/^img$/i.test(c.tagName)){function d(){var g=c.width,f=c.height,l,i,m,h,k;i=Math.floor((b.height>1)?Math.min(f,b.height):f*b.height);l=a("<canvas />")[0];if(l.getContext){h=l.getContext("2d");try{a(l).attr({width:g,height:i});h.save();h.translate(0,f-1);h.scale(1,-1);h.drawImage(c,0,0,g,f);h.restore();h.globalCompositeOperation="destination-out";k=h.createLinearGradient(0,0,0,i);k.addColorStop(0,"rgba(255, 255, 255, "+(1-b.opacity)+")");k.addColorStop(1,"rgba(255, 255, 255, 1.0)");h.fillStyle=k;h.rect(0,0,g,i);h.fill()}catch(j){return}}else{if(!window.ActiveXObject){return}l=a("<img />").attr("src",c.src).css({width:g,height:f,marginBottom:i-f,filter:"FlipV progid:DXImageTransform.Microsoft.Alpha(Opacity="+(b.opacity*100)+", FinishOpacity=0, Style=1, StartX=0, StartY=0, FinishX=0, FinishY="+(i/f*100)+")"})[0]}a(l).css({display:"block",border:0});m=a(/^a$/i.test(c.parentNode.tagName)?"<span />":"<div />").insertAfter(c).append([c,l])[0];m.className=c.className;a.data(c,"reflected",m.style.cssText=c.style.cssText);a(m).css({width:g,height:f+i,overflow:"hidden"});c.style.cssText="display: block; border: 0px";c.className="reflected"}if(c.complete){d()}else{a(c).load(d)}}})},unreflect:function(){return this.unbind("load").each(function(){var c=this,b=a.data(this,"reflected"),d;if(b!==undefined){d=c.parentNode;c.className=d.className;c.style.cssText=b;a.removeData(c,"reflected");d.parentNode.replaceChild(c,d)}})}})})(jQuery);jQuery(function($){$("img.reflect").reflect({})});
/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/media/jquery.media.js */
(function($){"use strict";var mode=document.documentMode||0;var msie=/MSIE/.test(navigator.userAgent);var lameIE=msie&&(/MSIE (6|7|8)\.0/.test(navigator.userAgent)||mode<9);$.fn.media=function(options,f1,f2){if(options=='undo'){return this.each(function(){var $this=$(this);var html=$this.data('media.origHTML');if(html)
$this.replaceWith(html)})}
return this.each(function(){if(typeof options=='function'){f2=f1;f1=options;options={}}
var o=getSettings(this,options);if(typeof f1=='function')f1(this,o);var r=getTypesRegExp();var m=r.exec(o.src.toLowerCase())||[''];var fn;if(o.type)
m[0]=o.type;else m.shift();for(var i=0;i<m.length;i++){fn=m[i].toLowerCase();if(isDigit(fn[0]))fn='fn'+fn;if(!$.fn.media[fn])
continue;var player=$.fn.media[fn+'_player'];if(!o.params)o.params={};if(player){var num=player.autoplayAttr=='autostart';o.params[player.autoplayAttr||'autoplay']=num?(o.autoplay?1:0):o.autoplay?!0:!1}
var $div=$.fn.media[fn](this,o);$div.css('backgroundColor',o.bgColor).width(o.width);if(o.canUndo){var $temp=$('<div></div>').append(this);$div.data('media.origHTML',$temp.html())}
if(typeof f2=='function')f2(this,$div[0],o,player.name);break}})};$.fn.media.mapFormat=function(format,player){if(!format||!player||!$.fn.media.defaults.players[player])return;format=format.toLowerCase();if(isDigit(format[0]))format='fn'+format;$.fn.media[format]=$.fn.media[player];$.fn.media[format+'_player']=$.fn.media.defaults.players[player]};$.fn.media.defaults={standards:!0,canUndo:!0,width:400,height:400,autoplay:0,bgColor:'#ffffff',params:{wmode:'transparent'},attrs:{},flvKeyName:'file',flashvars:{},flashVersion:'7',expressInstaller:null,flvPlayer:'mediaplayer.swf',mp3Player:'mediaplayer.swf',silverlight:{inplaceInstallPrompt:'true',isWindowless:'true',framerate:'24',version:'0.9',onError:null,onLoad:null,initParams:null,userContext:null}};$.fn.media.defaults.players={flash:{name:'flash',title:'Flash',types:'flv,mp3,swf',mimetype:'application/x-shockwave-flash',pluginspage:'http://www.adobe.com/go/getflashplayer',ieAttrs:{classid:'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',type:'application/x-oleobject',codebase:'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+$.fn.media.defaults.flashVersion}},quicktime:{name:'quicktime',title:'QuickTime',mimetype:'video/quicktime',pluginspage:'http://www.apple.com/quicktime/download/',types:'aif,aiff,aac,au,bmp,gsm,mov,mid,midi,mpg,mpeg,mp4,m4a,psd,qt,qtif,qif,qti,snd,tif,tiff,wav,3g2,3gp',ieAttrs:{classid:'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',codebase:'http://www.apple.com/qtactivex/qtplugin.cab'}},realplayer:{name:'real',title:'RealPlayer',types:'ra,ram,rm,rpm,rv,smi,smil',mimetype:'audio/x-pn-realaudio-plugin',pluginspage:'http://www.real.com/player/',autoplayAttr:'autostart',ieAttrs:{classid:'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'}},winmedia:{name:'winmedia',title:'Windows Media',types:'asx,asf,avi,wma,wmv',mimetype:isFirefoxWMPPluginInstalled()?'application/x-ms-wmp':'application/x-mplayer2',pluginspage:'http://www.microsoft.com/Windows/MediaPlayer/',autoplayAttr:'autostart',oUrl:'url',ieAttrs:{classid:'clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6',type:'application/x-oleobject'}},img:{name:'img',title:'Image',types:'gif,png,jpg'},iframe:{name:'iframe',types:'html,pdf'},silverlight:{name:'silverlight',types:'xaml'}};function isFirefoxWMPPluginInstalled(){var plugs=navigator.plugins||[];for(var i=0;i<plugs.length;i++){var plugin=plugs[i];if(plugin['filename']=='np-mswmp.dll')
return!0}
return!1}
var counter=1;for(var player in $.fn.media.defaults.players){var types=$.fn.media.defaults.players[player].types;$.each(types.split(','),function(i,o){if(isDigit(o[0]))o='fn'+o;$.fn.media[o]=$.fn.media[player]=getGenerator(player);$.fn.media[o+'_player']=$.fn.media.defaults.players[player]})}
function getTypesRegExp(){var types='';for(var player in $.fn.media.defaults.players){if(types.length)types+=',';types+=$.fn.media.defaults.players[player].types}
return new RegExp('\\.('+types.replace(/,/ig,'|')+')\\b')}
function getGenerator(player){return function(el,options){return generate(el,options,player)}}
function isDigit(c){return '0123456789'.indexOf(c)>-1}
function getSettings(el,options){options=options||{};var a,n;var $el=$(el);var cls=el.className||'';var meta=$.metadata?$el.metadata():$.meta?$el.data():{};meta=meta||{};var w=meta.width||parseInt(((cls.match(/\bw:(\d+)/)||[])[1]||0),10)||parseInt(((cls.match(/\bwidth:(\d+)/)||[])[1]||0),10);var h=meta.height||parseInt(((cls.match(/\bh:(\d+)/)||[])[1]||0),10)||parseInt(((cls.match(/\bheight:(\d+)/)||[])[1]||0),10);if(w)meta.width=w;if(h)meta.height=h;if(cls)meta.cls=cls;var dataName='data-';for(var i=0;i<el.attributes.length;i++){a=el.attributes[i],n=$.trim(a.name);var index=n.indexOf(dataName);if(index===0){n=n.substring(dataName.length);meta[n]=a.value}}
a=$.fn.media.defaults;var b=options;var c=meta;var p={params:{bgColor:options.bgColor||$.fn.media.defaults.bgColor}};var opts=$.extend({},a,b,c);$.each(['attrs','params','flashvars','silverlight'],function(i,o){opts[o]=$.extend({},p[o]||{},a[o]||{},b[o]||{},c[o]||{})});if(typeof opts.caption=='undefined')opts.caption=$el.text();opts.src=opts.src||$el.attr('href')||$el.attr('src')||'unknown';return opts}
$.fn.media.swf=function(el,opts){var f,p;if(!window.SWFObject&&!window.swfobject){if(opts.flashvars){var a=[];for(f in opts.flashvars)
a.push(f+'='+opts.flashvars[f]);if(!opts.params)opts.params={};opts.params.flashvars=a.join('&')}
return generate(el,opts,'flash')}
var id=el.id?(' id="'+el.id+'"'):'';var cls=opts.cls?(' class="'+opts.cls+'"'):'';var $div=$('<div'+id+cls+'>');if(window.swfobject){$(el).after($div).appendTo($div);if(!el.id)el.id='movie_player_'+counter++;window.swfobject.embedSWF(opts.src,el.id,opts.width,opts.height,opts.flashVersion,opts.expressInstaller,opts.flashvars,opts.params,opts.attrs)}
else{$(el).after($div).remove();var so=new SWFObject(opts.src,'movie_player_'+counter++,opts.width,opts.height,opts.flashVersion,opts.bgColor);if(opts.expressInstaller)so.useExpressInstall(opts.expressInstaller);for(p in opts.params)
if(p!='bgColor')so.addParam(p,opts.params[p]);for(f in opts.flashvars)
so.addVariable(f,opts.flashvars[f]);so.write($div[0]);}
if(opts.caption)$('<div>').appendTo($div).html(opts.caption);return $div};$.fn.media.flv=$.fn.media.mp3=function(el,opts){var src=opts.src;var player=/\.mp3\b/i.test(src)?opts.mp3Player:opts.flvPlayer;var key=opts.flvKeyName;src=encodeURIComponent(src);opts.src=player;opts.src=opts.src+'?'+key+'='+(src);var srcObj={};srcObj[key]=src;opts.flashvars=$.extend({},srcObj,opts.flashvars);return $.fn.media.swf(el,opts)};$.fn.media.xaml=function(el,opts){if(!window.Sys||!window.Sys.Silverlight){if($.fn.media.xaml.warning)return;$.fn.media.xaml.warning=1;alert('You must include the Silverlight.js script.');return}
var props={width:opts.width,height:opts.height,background:opts.bgColor,inplaceInstallPrompt:opts.silverlight.inplaceInstallPrompt,isWindowless:opts.silverlight.isWindowless,framerate:opts.silverlight.framerate,version:opts.silverlight.version};var events={onError:opts.silverlight.onError,onLoad:opts.silverlight.onLoad};var id1=el.id?(' id="'+el.id+'"'):'';var id2=opts.id||'AG'+counter++;var cls=opts.cls?(' class="'+opts.cls+'"'):'';var $div=$('<div'+id1+cls+'>');$(el).after($div).remove();Sys.Silverlight.createObjectEx({source:opts.src,initParams:opts.silverlight.initParams,userContext:opts.silverlight.userContext,id:id2,parentElement:$div[0],properties:props,events:events});if(opts.caption)$('<div>').appendTo($div).html(opts.caption);return $div};function generate(el,opts,player){var $el=$(el);var o=$.fn.media.defaults.players[player];var a,key,v;if(player=='iframe'){o=$('<iframe'+' width="'+opts.width+'" height="'+opts.height+'" >');o.attr('src',opts.src);o.css('backgroundColor',o.bgColor)}
else if(player=='img'){o=$('<img>');o.attr('src',opts.src);if(opts.width)
o.attr('width',opts.width);if(opts.height)
o.attr('height',opts.height);o.css('backgroundColor',o.bgColor)}
else if(lameIE){a=['<object width="'+opts.width+'" height="'+opts.height+'" '];for(key in opts.attrs)
a.push(key+'="'+opts.attrs[key]+'" ');for(key in o.ieAttrs||{}){v=o.ieAttrs[key];if(key=='codebase'&&window.location.protocol=='https:')
v=v.replace('http','https');a.push(key+'="'+v+'" ')}
a.push('></ob'+'ject'+'>');var p=['<param name="'+(o.oUrl||'src')+'" value="'+opts.src+'">'];for(key in opts.params)
p.push('<param name="'+key+'" value="'+opts.params[key]+'">');o=document.createElement(a.join(''));for(var i=0;i<p.length;i++)
o.appendChild(document.createElement(p[i]));}
else if(opts.standards){a=['<object type="'+o.mimetype+'" width="'+opts.width+'" height="'+opts.height+'"'];if(opts.src)a.push(' data="'+opts.src+'" ');if(msie){for(key in o.ieAttrs||{}){v=o.ieAttrs[key];if(key=='codebase'&&window.location.protocol=='https:')
v=v.replace('http','https');a.push(key+'="'+v+'" ')}}
a.push('>');a.push('<param name="'+(o.oUrl||'src')+'" value="'+opts.src+'">');for(key in opts.params){if(key=='wmode'&&player!='flash')
continue;a.push('<param name="'+key+'" value="'+opts.params[key]+'">')}
a.push('<div><p><strong>'+o.title+' Required</strong></p><p>'+o.title+' is required to view this media. <a href="'+o.pluginspage+'">Download Here</a>.</p></div>');a.push('</ob'+'ject'+'>')}
else{a=['<embed width="'+opts.width+'" height="'+opts.height+'" style="display:block"'];if(opts.src)a.push(' src="'+opts.src+'" ');for(key in opts.attrs)
a.push(key+'="'+opts.attrs[key]+'" ');for(key in o.eAttrs||{})
a.push(key+'="'+o.eAttrs[key]+'" ');for(key in opts.params){if(key=='wmode'&&player!='flash')
continue;a.push(key+'="'+opts.params[key]+'" ')}
a.push('></em'+'bed'+'>')}
var id=el.id?(' id="'+el.id+'"'):'';var cls=opts.cls?(' class="'+opts.cls+'"'):'';var $div=$('<div'+id+cls+'>');$el.after($div).remove();if(lameIE||player=='iframe'||player=='img')
$div.append(o);else $div.html(a.join(''));if(opts.caption)
$('<div>').appendTo($div).html(opts.caption);return $div}})(jQuery);
/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/tagcanvas/jquery.tagcanvas.js */
(function($){"use strict";var i,j,abs=Math.abs,sin=Math.sin,cos=Math.cos,max=Math.max,min=Math.min,ceil=Math.ceil,sqrt=Math.sqrt,pow=Math.pow,hexlookup3={},hexlookup2={},hexlookup1={0:"0,",1:"17,",2:"34,",3:"51,",4:"68,",5:"85,",6:"102,",7:"119,",8:"136,",9:"153,",a:"170,",A:"170,",b:"187,",B:"187,",c:"204,",C:"204,",d:"221,",D:"221,",e:"238,",E:"238,",f:"255,",F:"255,"},Oproto,Tproto,TCproto,Mproto,Vproto,TSproto,TCVproto,doc=document,ocanvas,handlers={};for(i=0;i<256;++i){j=i.toString(16);if(i<16)
j='0'+j;hexlookup2[j]=hexlookup2[j.toUpperCase()]=i.toString()+','}
function Defined(d){return typeof d!='undefined'}
function IsObject(o){return typeof o=='object'&&o!=null}
function Clamp(v,mn,mx){return isNaN(v)?mx:min(mx,max(mn,v))}
function Nop(){return!1}
function TimeNow(){return new Date().valueOf()}
function SortList(l,f){var nl=[],tl=l.length,i;for(i=0;i<tl;++i)
nl.push(l[i]);nl.sort(f);return nl}
function Shuffle(a){var i=a.length-1,t,p;while(i){p=~~(Math.random()*i);t=a[i];a[i]=a[p];a[p]=t;--i}}
function Vector(x,y,z){this.x=x;this.y=y;this.z=z}
Vproto=Vector.prototype;Vproto.length=function(){return sqrt(this.x*this.x+this.y*this.y+this.z*this.z)};Vproto.dot=function(v){return this.x*v.x+this.y*v.y+this.z*v.z};Vproto.cross=function(v){var x=this.y*v.z-this.z*v.y,y=this.z*v.x-this.x*v.z,z=this.x*v.y-this.y*v.x;return new Vector(x,y,z)};Vproto.angle=function(v){var dot=this.dot(v),ac;if(dot==0)
return Math.PI/2.0;ac=dot/(this.length()*v.length());if(ac>=1)
return 0;if(ac<=-1)
return Math.PI;return Math.acos(ac)};Vproto.unit=function(){var l=this.length();return new Vector(this.x/l,this.y/l,this.z/l)};function MakeVector(lg,lt){lt=lt*Math.PI/180;lg=lg*Math.PI/180;var x=sin(lg)*cos(lt),y=-sin(lt),z=-cos(lg)*cos(lt);return new Vector(x,y,z)}
function Matrix(a){this[1]={1:a[0],2:a[1],3:a[2]};this[2]={1:a[3],2:a[4],3:a[5]};this[3]={1:a[6],2:a[7],3:a[8]}}
Mproto=Matrix.prototype;Matrix.Identity=function(){return new Matrix([1,0,0,0,1,0,0,0,1])};Matrix.Rotation=function(angle,u){var sina=sin(angle),cosa=cos(angle),mcos=1-cosa;return new Matrix([cosa+pow(u.x,2)*mcos,u.x*u.y*mcos-u.z*sina,u.x*u.z*mcos+u.y*sina,u.y*u.x*mcos+u.z*sina,cosa+pow(u.y,2)*mcos,u.y*u.z*mcos-u.x*sina,u.z*u.x*mcos-u.y*sina,u.z*u.y*mcos+u.x*sina,cosa+pow(u.z,2)*mcos])}
Mproto.mul=function(m){var a=[],i,j,mmatrix=(m.xform?1:0);for(i=1;i<=3;++i)
for(j=1;j<=3;++j){if(mmatrix)
a.push(this[i][1]*m[1][j]+this[i][2]*m[2][j]+this[i][3]*m[3][j]);else a.push(this[i][j]*m)}
return new Matrix(a)};Mproto.xform=function(p){var a={},x=p.x,y=p.y,z=p.z;a.x=x*this[1][1]+y*this[2][1]+z*this[3][1];a.y=x*this[1][2]+y*this[2][2]+z*this[3][2];a.z=x*this[1][3]+y*this[2][3]+z*this[3][3];return a};function PointsOnSphere(n,xr,yr,zr,magic){var i,y,r,phi,pts=[],off=2/n,inc;inc=Math.PI*(3-sqrt(5)+(parseFloat(magic)?parseFloat(magic):0));for(i=0;i<n;++i){y=i*off-1+(off/2);r=sqrt(1-y*y);phi=i*inc;pts.push([cos(phi)*r*xr,y*yr,sin(phi)*r*zr])}
return pts}
function Cylinder(n,o,xr,yr,zr,magic){var phi,pts=[],off=2/n,inc,i,j,k,l;inc=Math.PI*(3-sqrt(5)+(parseFloat(magic)?parseFloat(magic):0));for(i=0;i<n;++i){j=i*off-1+(off/2);phi=i*inc;k=cos(phi);l=sin(phi);pts.push(o?[j*xr,k*yr,l*zr]:[k*xr,j*yr,l*zr])}
return pts}
function Ring(o,n,xr,yr,zr,j){var phi,pts=[],inc=Math.PI*2/n,i,k,l;for(i=0;i<n;++i){phi=i*inc;k=cos(phi);l=sin(phi);pts.push(o?[j*xr,k*yr,l*zr]:[k*xr,j*yr,l*zr])}
return pts}
function PointsOnCylinderV(n,xr,yr,zr,m){return Cylinder(n,0,xr,yr,zr,m)}
function PointsOnCylinderH(n,xr,yr,zr,m){return Cylinder(n,1,xr,yr,zr,m)}
function PointsOnRingV(n,xr,yr,zr,offset){offset=isNaN(offset)?0:offset*1;return Ring(0,n,xr,yr,zr,offset)}
function PointsOnRingH(n,xr,yr,zr,offset){offset=isNaN(offset)?0:offset*1;return Ring(1,n,xr,yr,zr,offset)}
function CentreImage(t){var i=new Image;i.onload=function(){var dx=i.width/2,dy=i.height/2;t.centreFunc=function(c,w,h,cx,cy){c.setTransform(1,0,0,1,0,0);c.globalAlpha=1;c.drawImage(i,cx-dx,cy-dy)}};i.src=t.centreImage}
function SetAlpha(c,a){var d=c,p1,p2,ae=(a*1).toPrecision(3)+')';if(c[0]==='#'){if(!hexlookup3[c])
if(c.length===4)
hexlookup3[c]='rgba('+hexlookup1[c[1]]+hexlookup1[c[2]]+hexlookup1[c[3]];else hexlookup3[c]='rgba('+hexlookup2[c.substr(1,2)]+hexlookup2[c.substr(3,2)]+hexlookup2[c.substr(5,2)];d=hexlookup3[c]+ae}else if(c.substr(0,4)==='rgb('||c.substr(0,4)==='hsl('){d=(c.replace('(','a(').replace(')',','+ae))}else if(c.substr(0,5)==='rgba('||c.substr(0,5)==='hsla('){p1=c.lastIndexOf(',')+1,p2=c.indexOf(')');a*=parseFloat(c.substring(p1,p2));d=c.substr(0,p1)+a.toPrecision(3)+')'}
return d}
function NewCanvas(w,h){if(window.G_vmlCanvasManager)
return null;var c=doc.createElement('canvas');c.width=w;c.height=h;return c}
function ShadowAlphaBroken(){var cv=NewCanvas(3,3),c,i;if(!cv)
return!1;c=cv.getContext('2d');c.strokeStyle='#000';c.shadowColor='#fff';c.shadowBlur=3;c.globalAlpha=0;c.strokeRect(2,2,2,2);c.globalAlpha=1;i=c.getImageData(2,2,1,1);cv=null;return(i.data[0]>0)}
function SetGradient(c,l,o,g){var gd=c.createLinearGradient(0,0,l,0),i;for(i in g)
gd.addColorStop(1-i,g[i]);c.fillStyle=gd;c.fillRect(0,o,l,1);}
function FindGradientColour(tc,p,r){var l=1024,h=1,gl=tc.weightGradient,cv,c,i,d;if(tc.gCanvas){c=tc.gCanvas.getContext('2d');h=tc.gCanvas.height}else{if(IsObject(gl[0]))
h=gl.length;else gl=[gl];tc.gCanvas=cv=NewCanvas(l,h);if(!cv)
return null;c=cv.getContext('2d');for(i=0;i<h;++i)
SetGradient(c,l,i,gl[i]);}
r=max(min(r||0,h-1),0);d=c.getImageData(~~((l-1)*p),r,1,1).data;return 'rgba('+d[0]+','+d[1]+','+d[2]+','+(d[3]/255)+')'}
function TextSet(ctxt,font,colour,strings,padx,pady,shadowColour,shadowBlur,shadowOffsets,maxWidth,widths,align){var xo=padx+(shadowBlur||0)+(shadowOffsets.length&&shadowOffsets[0]<0?abs(shadowOffsets[0]):0),yo=pady+(shadowBlur||0)+(shadowOffsets.length&&shadowOffsets[1]<0?abs(shadowOffsets[1]):0),i,xc;ctxt.font=font;ctxt.textBaseline='top';ctxt.fillStyle=colour;shadowColour&&(ctxt.shadowColor=shadowColour);shadowBlur&&(ctxt.shadowBlur=shadowBlur);shadowOffsets.length&&(ctxt.shadowOffsetX=shadowOffsets[0],ctxt.shadowOffsetY=shadowOffsets[1]);for(i=0;i<strings.length;++i){xc=0;if(widths){if('right'==align){xc=maxWidth-widths[i]}else if('centre'==align){xc=(maxWidth-widths[i])/2}}
ctxt.fillText(strings[i],xo+xc,yo);yo+=parseInt(font)}}
function RRect(c,x,y,w,h,r,s){if(r){c.beginPath();c.moveTo(x,y+h-r);c.arcTo(x,y,x+r,y,r);c.arcTo(x+w,y,x+w,y+r,r);c.arcTo(x+w,y+h,x+w-r,y+h,r);c.arcTo(x,y+h,x,y+h-r,r);c.closePath();c[s?'stroke':'fill']()}else{c[s?'strokeRect':'fillRect'](x,y,w,h)}}
function TextCanvas(strings,font,w,h,maxWidth,stringWidths,align,valign,scale){this.strings=strings;this.font=font;this.width=w;this.height=h;this.maxWidth=maxWidth;this.stringWidths=stringWidths;this.align=align;this.valign=valign;this.scale=scale}
TCVproto=TextCanvas.prototype;TCVproto.SetImage=function(image,w,h,position,padding,align,valign,scale){this.image=image;this.iwidth=w*this.scale;this.iheight=h*this.scale;this.ipos=position;this.ipad=padding*this.scale;this.iscale=scale;this.ialign=align;this.ivalign=valign};TCVproto.Align=function(size,space,a){var pos=0;if(a=='right'||a=='bottom')
pos=space-size;else if(a!='left'&&a!='top')
pos=(space-size)/2;return pos};TCVproto.Create=function(colour,bgColour,bgOutline,bgOutlineThickness,shadowColour,shadowBlur,shadowOffsets,padding,radius){var cv,cw,ch,c,x1,x2,y1,y2,offx,offy,ix,iy,iw,ih,rr,sox=abs(shadowOffsets[0]),soy=abs(shadowOffsets[1]),shadowcv,shadowc;padding=max(padding,sox+shadowBlur,soy+shadowBlur);x1=2*(padding+bgOutlineThickness);y1=2*(padding+bgOutlineThickness);cw=this.width+x1;ch=this.height+y1;offx=offy=padding+bgOutlineThickness;if(this.image){ix=iy=padding+bgOutlineThickness;iw=this.iwidth;ih=this.iheight;if(this.ipos=='top'||this.ipos=='bottom'){if(iw<this.width)
ix+=this.Align(iw,this.width,this.ialign);else offx+=this.Align(this.width,iw,this.align);if(this.ipos=='top')
offy+=ih+this.ipad;else iy+=this.height+this.ipad;cw=max(cw,iw+x1);ch+=ih+this.ipad}else{if(ih<this.height)
iy+=this.Align(ih,this.height,this.ivalign);else offy+=this.Align(this.height,ih,this.valign);if(this.ipos=='right')
ix+=this.width+this.ipad;else offx+=iw+this.ipad;cw+=iw+this.ipad;ch=max(ch,ih+y1)}}
cv=NewCanvas(cw,ch);if(!cv)
return null;x1=y1=bgOutlineThickness/2;x2=cw-bgOutlineThickness;y2=ch-bgOutlineThickness;rr=min(radius,x2/2,y2/2);c=cv.getContext('2d');if(bgColour){c.fillStyle=bgColour;RRect(c,x1,y1,x2,y2,rr)}
if(bgOutlineThickness){c.strokeStyle=bgOutline;c.lineWidth=bgOutlineThickness;RRect(c,x1,y1,x2,y2,rr,!0)}
if(shadowBlur||sox||soy){shadowcv=NewCanvas(cw,ch);if(shadowcv){shadowc=c;c=shadowcv.getContext('2d')}}
TextSet(c,this.font,colour,this.strings,offx,offy,0,0,[],this.maxWidth,this.stringWidths,this.align);if(this.image)
c.drawImage(this.image,ix,iy,iw,ih);if(shadowc){c=shadowc;shadowColour&&(c.shadowColor=shadowColour);shadowBlur&&(c.shadowBlur=shadowBlur);c.shadowOffsetX=shadowOffsets[0];c.shadowOffsetY=shadowOffsets[1];c.drawImage(shadowcv,0,0)}
return cv};function ExpandImage(i,w,h){var cv=NewCanvas(w,h),c;if(!cv)
return null;c=cv.getContext('2d');c.drawImage(i,(w-i.width)/2,(h-i.height)/2);return cv}
function ScaleImage(i,w,h){var cv=NewCanvas(w,h),c;if(!cv)
return null;c=cv.getContext('2d');c.drawImage(i,0,0,w,h);return cv}
function AddBackgroundToImage(i,w,h,scale,colour,othickness,ocolour,padding,radius,ofill){var cw=w+((2*padding)+othickness)*scale,ch=h+((2*padding)+othickness)*scale,cv=NewCanvas(cw,ch),c,x1,y1,x2,y2,ocanvas,cc,rr;if(!cv)
return null;othickness*=scale;radius*=scale;x1=y1=othickness/2;x2=cw-othickness;y2=ch-othickness;padding=(padding*scale)+x1;c=cv.getContext('2d');rr=min(radius,x2/2,y2/2);if(colour){c.fillStyle=colour;RRect(c,x1,y1,x2,y2,rr)}
if(othickness){c.strokeStyle=ocolour;c.lineWidth=othickness;RRect(c,x1,y1,x2,y2,rr,!0)}
if(ofill){ocanvas=NewCanvas(cw,ch);cc=ocanvas.getContext('2d');cc.drawImage(i,padding,padding,w,h);cc.globalCompositeOperation='source-in';cc.fillStyle=ocolour;cc.fillRect(0,0,cw,ch);cc.globalCompositeOperation='destination-over';cc.drawImage(cv,0,0);cc.globalCompositeOperation='source-over';c.drawImage(ocanvas,0,0)}else{c.drawImage(i,padding,padding,i.width,i.height)}
return{image:cv,width:cw/scale,height:ch/scale}}
function RoundImage(i,r,iw,ih,s){var cv,c,r1=parseFloat(r),l=max(iw,ih);cv=NewCanvas(iw,ih);if(!cv)
return null;if(r.indexOf('%')>0)
r1=l*r1/100;else r1=r1*s;c=cv.getContext('2d');c.globalCompositeOperation='source-over';c.fillStyle='#fff';if(r1>=l/2){r1=min(iw,ih)/2;c.beginPath();c.moveTo(iw/2,ih/2);c.arc(iw/2,ih/2,r1,0,2*Math.PI,!1);c.fill();c.closePath()}else{r1=min(iw/2,ih/2,r1);RRect(c,0,0,iw,ih,r1,!0);c.fill()}
c.globalCompositeOperation='source-in';c.drawImage(i,0,0,iw,ih);return cv}
function AddShadowToImage(i,w,h,scale,sc,sb,so){var sw=abs(so[0]),sh=abs(so[1]),cw=w+(sw>sb?sw+sb:sb*2)*scale,ch=h+(sh>sb?sh+sb:sb*2)*scale,xo=scale*((sb||0)+(so[0]<0?sw:0)),yo=scale*((sb||0)+(so[1]<0?sh:0)),cv,c;cv=NewCanvas(cw,ch);if(!cv)
return null;c=cv.getContext('2d');sc&&(c.shadowColor=sc);sb&&(c.shadowBlur=sb*scale);so&&(c.shadowOffsetX=so[0]*scale,c.shadowOffsetY=so[1]*scale);c.drawImage(i,xo,yo,w,h);return{image:cv,width:cw/scale,height:ch/scale}}
function FindTextBoundingBox(s,f,ht){var w=parseInt(s.toString().length*ht),h=parseInt(ht*2*s.length),cv=NewCanvas(w,h),c,idata,w1,h1,x,y,i,ex;if(!cv)
return null;c=cv.getContext('2d');c.fillStyle='#000';c.fillRect(0,0,w,h);TextSet(c,ht+'px '+f,'#fff',s,0,0,0,0,[],'centre')
idata=c.getImageData(0,0,w,h);w1=idata.width;h1=idata.height;ex={min:{x:w1,y:h1},max:{x:-1,y:-1}};for(y=0;y<h1;++y){for(x=0;x<w1;++x){i=(y*w1+x)*4;if(idata.data[i+1]>0){if(x<ex.min.x)ex.min.x=x;if(x>ex.max.x)ex.max.x=x;if(y<ex.min.y)ex.min.y=y;if(y>ex.max.y)ex.max.y=y}}}
if(w1!=w){ex.min.x*=(w/w1);ex.max.x*=(w/w1)}
if(h1!=h){ex.min.y*=(w/h1);ex.max.y*=(w/h1)}
cv=null;return ex}
function FixFont(f){return "'"+f.replace(/(\'|\")/g,'').replace(/\s*,\s*/g,"', '")+"'"}
function AddHandler(h,f,e){e=e||doc;if(e.addEventListener)
e.addEventListener(h,f,!1);else e.attachEvent('on'+h,f)}
function RemoveHandler(h,f,e){e=e||doc;if(e.removeEventListener)
e.removeEventListener(h,f);else e.detachEvent('on'+h,f)}
function AddImage(i,o,t,tc){var s=tc.imageScale,mscale,ic,bc,oc,iw,ih;if(!o.complete)
return AddHandler('load',function(){AddImage(i,o,t,tc)},o);if(!i.complete)
return AddHandler('load',function(){AddImage(i,o,t,tc)},i);o.width=o.width;o.height=o.height;if(s){i.width=o.width*s;i.height=o.height*s}
t.iw=i.width;t.ih=i.height;if(tc.txtOpt){ic=i;mscale=tc.zoomMax*tc.txtScale;iw=t.iw*mscale;ih=t.ih*mscale;if(iw<o.naturalWidth||ih<o.naturalHeight){ic=ScaleImage(i,iw,ih);if(ic)
t.fimage=ic}else{iw=t.iw;ih=t.ih;mscale=1}
if(parseFloat(tc.imageRadius))
t.image=t.fimage=i=RoundImage(t.image,tc.imageRadius,iw,ih,mscale);if(!t.HasText()){if(tc.shadow){ic=AddShadowToImage(t.image,iw,ih,mscale,tc.shadow,tc.shadowBlur,tc.shadowOffset);if(ic){t.fimage=ic.image;t.w=ic.width;t.h=ic.height}}
if(tc.bgColour||tc.bgOutlineThickness){bc=tc.bgColour=='tag'?GetProperty(t.a,'background-color'):tc.bgColour;oc=tc.bgOutline=='tag'?GetProperty(t.a,'color'):(tc.bgOutline||tc.textColour);iw=t.fimage.width;ih=t.fimage.height;if(tc.outlineMethod=='colour'){ic=AddBackgroundToImage(t.fimage,iw,ih,mscale,bc,tc.bgOutlineThickness,t.outline.colour,tc.padding,tc.bgRadius,1);if(ic)
t.oimage=ic.image}
ic=AddBackgroundToImage(t.fimage,iw,ih,mscale,bc,tc.bgOutlineThickness,oc,tc.padding,tc.bgRadius);if(ic){t.fimage=ic.image;t.w=ic.width;t.h=ic.height}}
if(tc.outlineMethod=='size'){if(tc.outlineIncrease>0){t.iw+=2*tc.outlineIncrease;t.ih+=2*tc.outlineIncrease;iw=mscale*t.iw;ih=mscale*t.ih;ic=ScaleImage(t.fimage,iw,ih);t.oimage=ic;t.fimage=ExpandImage(t.fimage,t.oimage.width,t.oimage.height)}else{iw=mscale*(t.iw+(2*tc.outlineIncrease));ih=mscale*(t.ih+(2*tc.outlineIncrease));ic=ScaleImage(t.fimage,iw,ih);t.oimage=ExpandImage(ic,t.fimage.width,t.fimage.height)}}}}
t.Init()}
function GetProperty(e,p){var dv=doc.defaultView,pc=p.replace(/\-([a-z])/g,function(a){return a.charAt(1).toUpperCase()});return(dv&&dv.getComputedStyle&&dv.getComputedStyle(e,null).getPropertyValue(p))||(e.currentStyle&&e.currentStyle[pc])}
function FindWeight(a,wFrom,tHeight){var w=1,p;if(wFrom){w=1*(a.getAttribute(wFrom)||tHeight)}else if(p=GetProperty(a,'font-size')){w=(p.indexOf('px')>-1&&p.replace('px','')*1)||(p.indexOf('pt')>-1&&p.replace('pt','')*1.25)||p*3.3}
return w}
function EventToCanvasId(e){return e.target&&Defined(e.target.id)?e.target.id:e.srcElement.parentNode.id}
function EventXY(e,c){var xy,p,xmul=parseInt(GetProperty(c,'width'))/c.width,ymul=parseInt(GetProperty(c,'height'))/c.height;if(Defined(e.offsetX)){xy={x:e.offsetX,y:e.offsetY}}else{p=AbsPos(c.id);if(Defined(e.changedTouches))
e=e.changedTouches[0];if(e.pageX)
xy={x:e.pageX-p.x,y:e.pageY-p.y}}
if(xy&&xmul&&ymul){xy.x/=xmul;xy.y/=ymul}
return xy}
function MouseOut(e){var cv=e.target||e.fromElement.parentNode,tc=TagCanvas.tc[cv.id];if(tc){tc.mx=tc.my=-1;tc.UnFreeze();tc.EndDrag()}}
function MouseMove(e){var i,t=TagCanvas,tc,p,tg=EventToCanvasId(e);for(i in t.tc){tc=t.tc[i];if(tc.tttimer){clearTimeout(tc.tttimer);tc.tttimer=null}}
if(tg&&t.tc[tg]){tc=t.tc[tg];if(p=EventXY(e,tc.canvas)){tc.mx=p.x;tc.my=p.y;tc.Drag(e,p)}
tc.drawn=0}}
function MouseDown(e){var t=TagCanvas,cb=doc.addEventListener?0:1,tg=EventToCanvasId(e);if(tg&&e.button==cb&&t.tc[tg]){t.tc[tg].BeginDrag(e)}}
function MouseUp(e){var t=TagCanvas,cb=doc.addEventListener?0:1,tg=EventToCanvasId(e),tc;if(tg&&e.button==cb&&t.tc[tg]){tc=t.tc[tg];MouseMove(e);if(!tc.EndDrag()&&!tc.touchState)
tc.Clicked(e)}}
function TouchDown(e){var tg=EventToCanvasId(e),tc=(tg&&TagCanvas.tc[tg]),p;if(tc&&e.changedTouches){if(e.touches.length==1&&tc.touchState==0){tc.touchState=1;tc.BeginDrag(e);if(p=EventXY(e,tc.canvas)){tc.mx=p.x;tc.my=p.y;tc.drawn=0}}else if(e.targetTouches.length==2&&tc.pinchZoom){tc.touchState=3;tc.EndDrag();tc.BeginPinch(e)}else{tc.EndDrag();tc.EndPinch();tc.touchState=0}}}
function TouchUp(e){var tg=EventToCanvasId(e),tc=(tg&&TagCanvas.tc[tg]);if(tc&&e.changedTouches){switch(tc.touchState){case 1:tc.Draw();tc.Clicked();break;case 2:tc.EndDrag();break;case 3:tc.EndPinch()}
tc.touchState=0}}
function TouchMove(e){var i,t=TagCanvas,tc,p,tg=EventToCanvasId(e);for(i in t.tc){tc=t.tc[i];if(tc.tttimer){clearTimeout(tc.tttimer);tc.tttimer=null}}
tc=(tg&&t.tc[tg]);if(tc&&e.changedTouches&&tc.touchState){switch(tc.touchState){case 1:case 2:if(p=EventXY(e,tc.canvas)){tc.mx=p.x;tc.my=p.y;if(tc.Drag(e,p))
tc.touchState=2}
break;case 3:tc.Pinch(e)}
tc.drawn=0}}
function MouseWheel(e){var t=TagCanvas,tg=EventToCanvasId(e);if(tg&&t.tc[tg]){e.cancelBubble=!0;e.returnValue=!1;e.preventDefault&&e.preventDefault();t.tc[tg].Wheel((e.wheelDelta||e.detail)>0)}}
function Scroll(e){var i,t=TagCanvas;clearTimeout(t.scrollTimer);for(i in t.tc){t.tc[i].Pause()}
t.scrollTimer=setTimeout(function(){var i,t=TagCanvas;for(i in t.tc){t.tc[i].Resume()}},t.scrollPause)}
function DrawCanvas(){DrawCanvasRAF(TimeNow())}
function DrawCanvasRAF(t){var tc=TagCanvas.tc,i;TagCanvas.NextFrame(TagCanvas.interval);t=t||TimeNow();for(i in tc)
tc[i].Draw(t);}
function AbsPos(id){var e=doc.getElementById(id),r=e.getBoundingClientRect(),dd=doc.documentElement,b=doc.body,w=window,xs=w.pageXOffset||dd.scrollLeft,ys=w.pageYOffset||dd.scrollTop,xo=dd.clientLeft||b.clientLeft,yo=dd.clientTop||b.clientTop;return{x:r.left+xs-xo,y:r.top+ys-yo}}
function Project(tc,p1,sx,sy){var m=tc.radius*tc.z1/(tc.z1+tc.z2+p1.z);return{x:p1.x*m*sx,y:p1.y*m*sy,z:p1.z,w:(tc.z1-p1.z)/tc.z2}}
function TextSplitter(e){this.e=e;this.br=0;this.line=[];this.text=[];this.original=e.innerText||e.textContent}
TSproto=TextSplitter.prototype;TSproto.Empty=function(){for(var i=0;i<this.text.length;++i)
if(this.text[i].length)
return!1;return!0};TSproto.Lines=function(e){var r=e?1:0,cn,cl,i;e=e||this.e;cn=e.childNodes;cl=cn.length;for(i=0;i<cl;++i){if(cn[i].nodeName=='BR'){this.text.push(this.line.join(' '));this.br=1}else if(cn[i].nodeType==3){if(this.br){this.line=[cn[i].nodeValue];this.br=0}else{this.line.push(cn[i].nodeValue)}}else{this.Lines(cn[i])}}
r||this.br||this.text.push(this.line.join(' '));return this.text};TSproto.SplitWidth=function(w,c,f,h){var i,j,words,text=[];c.font=h+'px '+f;for(i=0;i<this.text.length;++i){words=this.text[i].split(/\s+/);this.line=[words[0]];for(j=1;j<words.length;++j){if(c.measureText(this.line.join(' ')+' '+words[j]).width>w){text.push(this.line.join(' '));this.line=[words[j]]}else{this.line.push(words[j])}}
text.push(this.line.join(' '))}
return this.text=text};function Outline(tc,t){this.ts=null;this.tc=tc;this.tag=t;this.x=this.y=this.w=this.h=this.sc=1;this.z=0;this.pulse=1;this.pulsate=tc.pulsateTo<1;this.colour=tc.outlineColour;this.adash=~~tc.outlineDash;this.agap=~~tc.outlineDashSpace||this.adash;this.aspeed=tc.outlineDashSpeed*1;if(this.colour=='tag')
this.colour=GetProperty(t.a,'color');else if(this.colour=='tagbg')
this.colour=GetProperty(t.a,'background-color');this.Draw=this.pulsate?this.DrawPulsate:this.DrawSimple;this.radius=tc.outlineRadius|0;this.SetMethod(tc.outlineMethod)}
Oproto=Outline.prototype;Oproto.SetMethod=function(om){var methods={block:['PreDraw','DrawBlock'],colour:['PreDraw','DrawColour'],outline:['PostDraw','DrawOutline'],classic:['LastDraw','DrawOutline'],size:['PreDraw','DrawSize'],none:['LastDraw']},funcs=methods[om]||methods.outline;if(om=='none'){this.Draw=function(){return 1}}else{this.drawFunc=this[funcs[1]]}
this[funcs[0]]=this.Draw};Oproto.Update=function(x,y,w,h,sc,z,xo,yo){var o=this.tc.outlineOffset,o2=2*o;this.x=sc*x+xo-o;this.y=sc*y+yo-o;this.w=sc*w+o2;this.h=sc*h+o2;this.sc=sc;this.z=z};Oproto.Ants=function(c){if(!this.adash)
return;var l=this.adash,g=this.agap,s=this.aspeed,length=l+g,l1=0,l2=l,g1=g,g2=0,seq=0,ants;if(s){seq=abs(s)*(TimeNow()-this.ts)/50;if(s<0)
seq=8.64e6-seq;s=~~seq%length}
if(s){if(l>=s){l1=l-s;l2=s}else{g1=length-s;g2=g-g1}
ants=[l1,g1,l2,g2]}else{ants=[l,g]}
c.setLineDash(ants)}
Oproto.DrawOutline=function(c,x,y,w,h,colour){var r=min(this.radius,h/2,w/2);c.strokeStyle=colour;this.Ants(c);RRect(c,x,y,w,h,r,!0)};Oproto.DrawSize=function(c,x,y,w,h,colour,tag,x1,y1){var tw=tag.w,th=tag.h,m,i,sc;if(this.pulsate){if(tag.image)
sc=(tag.image.height+this.tc.outlineIncrease)/tag.image.height;else sc=tag.oscale;i=tag.fimage||tag.image;m=1+((sc-1)*(1-this.pulse));tag.h*=m;tag.w*=m}else{i=tag.oimage}
tag.alpha=1;tag.Draw(c,x1,y1,i);tag.h=th;tag.w=tw;return 1};Oproto.DrawColour=function(c,x,y,w,h,colour,tag,x1,y1){if(tag.oimage){if(this.pulse<1){tag.alpha=1-pow(this.pulse,2);tag.Draw(c,x1,y1,tag.fimage);tag.alpha=this.pulse}else{tag.alpha=1}
tag.Draw(c,x1,y1,tag.oimage);return 1}
return this[tag.image?'DrawColourImage':'DrawColourText'](c,x,y,w,h,colour,tag,x1,y1)};Oproto.DrawColourText=function(c,x,y,w,h,colour,tag,x1,y1){var normal=tag.colour;tag.colour=colour;tag.alpha=1;tag.Draw(c,x1,y1);tag.colour=normal;return 1};Oproto.DrawColourImage=function(c,x,y,w,h,colour,tag,x1,y1){var ccanvas=c.canvas,fx=~~max(x,0),fy=~~max(y,0),fw=min(ccanvas.width-fx,w)+.5|0,fh=min(ccanvas.height-fy,h)+.5|0,cc;if(ocanvas)
ocanvas.width=fw,ocanvas.height=fh;else ocanvas=NewCanvas(fw,fh);if(!ocanvas)
return this.SetMethod('outline');cc=ocanvas.getContext('2d');cc.drawImage(ccanvas,fx,fy,fw,fh,0,0,fw,fh);c.clearRect(fx,fy,fw,fh);if(this.pulsate){tag.alpha=1-pow(this.pulse,2)}else{tag.alpha=1}
tag.Draw(c,x1,y1);c.setTransform(1,0,0,1,0,0);c.save();c.beginPath();c.rect(fx,fy,fw,fh);c.clip();c.globalCompositeOperation='source-in';c.fillStyle=colour;c.fillRect(fx,fy,fw,fh);c.restore();c.globalAlpha=1;c.globalCompositeOperation='destination-over';c.drawImage(ocanvas,0,0,fw,fh,fx,fy,fw,fh);c.globalCompositeOperation='source-over';return 1};Oproto.DrawBlock=function(c,x,y,w,h,colour){var r=min(this.radius,h/2,w/2);c.fillStyle=colour;RRect(c,x,y,w,h,r)};Oproto.DrawSimple=function(c,tag,x1,y1,ga,useGa){var t=this.tc;c.setTransform(1,0,0,1,0,0);c.strokeStyle=this.colour;c.lineWidth=t.outlineThickness;c.shadowBlur=c.shadowOffsetX=c.shadowOffsetY=0;c.globalAlpha=useGa?ga:1;return this.drawFunc(c,this.x,this.y,this.w,this.h,this.colour,tag,x1,y1)};Oproto.DrawPulsate=function(c,tag,x1,y1){var diff=TimeNow()-this.ts,t=this.tc,ga=t.pulsateTo+((1-t.pulsateTo)*(0.5+(cos(2*Math.PI*diff/(1000*t.pulsateTime))/2)));this.pulse=ga=TagCanvas.Smooth(1,ga);return this.DrawSimple(c,tag,x1,y1,ga,1)};Oproto.Active=function(c,x,y){var a=(x>=this.x&&y>=this.y&&x<=this.x+this.w&&y<=this.y+this.h);if(a){this.ts=this.ts||TimeNow()}else{this.ts=null}
return a};Oproto.PreDraw=Oproto.PostDraw=Oproto.LastDraw=Nop;function Tag(tc,text,a,v,w,h,col,bcol,bradius,boutline,bothickness,font,padding,original){this.tc=tc;this.image=null;this.text=text;this.text_original=original;this.line_widths=[];this.title=a.title||null;this.a=a;this.position=new Vector(v[0],v[1],v[2]);this.x=this.y=this.z=0;this.w=w;this.h=h;this.colour=col||tc.textColour;this.bgColour=bcol||tc.bgColour;this.bgRadius=bradius|0;this.bgOutline=boutline||this.colour;this.bgOutlineThickness=bothickness|0;this.textFont=font||tc.textFont;this.padding=padding|0;this.sc=this.alpha=1;this.weighted=!tc.weight;this.outline=new Outline(tc,this)}
Tproto=Tag.prototype;Tproto.Init=function(e){var tc=this.tc;this.textHeight=tc.textHeight;if(this.HasText()){this.Measure(tc.ctxt,tc)}else{this.w=this.iw;this.h=this.ih}
this.SetShadowColour=tc.shadowAlpha?this.SetShadowColourAlpha:this.SetShadowColourFixed;this.SetDraw(tc)};Tproto.Draw=Nop;Tproto.HasText=function(){return this.text&&this.text[0].length>0};Tproto.EqualTo=function(e){var i=e.getElementsByTagName('img');if(this.a.href!=e.href)
return 0;if(i.length)
return this.image.src==i[0].src;return(e.innerText||e.textContent)==this.text_original};Tproto.SetImage=function(i){this.image=this.fimage=i};Tproto.SetDraw=function(t){this.Draw=this.fimage?(t.ie>7?this.DrawImageIE:this.DrawImage):this.DrawText;t.noSelect&&(this.CheckActive=Nop)};Tproto.MeasureText=function(c){var i,l=this.text.length,w=0,wl;for(i=0;i<l;++i){this.line_widths[i]=wl=c.measureText(this.text[i]).width;w=max(w,wl)}
return w};Tproto.Measure=function(c,t){var extents=FindTextBoundingBox(this.text,this.textFont,this.textHeight),s,th,f,soff,cw,twidth,theight,img,tcv;theight=extents?extents.max.y+extents.min.y:this.textHeight;c.font=this.font=this.textHeight+'px '+this.textFont;twidth=this.MeasureText(c);if(t.txtOpt){s=t.txtScale;th=s*this.textHeight;f=th+'px '+this.textFont;soff=[s*t.shadowOffset[0],s*t.shadowOffset[1]];c.font=f;cw=this.MeasureText(c);tcv=new TextCanvas(this.text,f,cw+s,(s*theight)+s,cw,this.line_widths,t.textAlign,t.textVAlign,s);if(this.image)
tcv.SetImage(this.image,this.iw,this.ih,t.imagePosition,t.imagePadding,t.imageAlign,t.imageVAlign,t.imageScale);img=tcv.Create(this.colour,this.bgColour,this.bgOutline,s*this.bgOutlineThickness,t.shadow,s*t.shadowBlur,soff,s*this.padding,s*this.bgRadius);if(t.outlineMethod=='colour'){this.oimage=tcv.Create(this.outline.colour,this.bgColour,this.outline.colour,s*this.bgOutlineThickness,t.shadow,s*t.shadowBlur,soff,s*this.padding,s*this.bgRadius)}else if(t.outlineMethod=='size'){extents=FindTextBoundingBox(this.text,this.textFont,this.textHeight+t.outlineIncrease);th=extents.max.y+extents.min.y;f=(s*(this.textHeight+t.outlineIncrease))+'px '+this.textFont;c.font=f;cw=this.MeasureText(c);tcv=new TextCanvas(this.text,f,cw+s,(s*th)+s,cw,this.line_widths,t.textAlign,t.textVAlign,s);if(this.image)
tcv.SetImage(this.image,this.iw+t.outlineIncrease,this.ih+t.outlineIncrease,t.imagePosition,t.imagePadding,t.imageAlign,t.imageVAlign,t.imageScale);this.oimage=tcv.Create(this.colour,this.bgColour,this.bgOutline,s*this.bgOutlineThickness,t.shadow,s*t.shadowBlur,soff,s*this.padding,s*this.bgRadius);this.oscale=this.oimage.width/img.width;if(t.outlineIncrease>0)
img=ExpandImage(img,this.oimage.width,this.oimage.height);else this.oimage=ExpandImage(this.oimage,img.width,img.height)}
if(img){this.fimage=img;twidth=this.fimage.width/s;theight=this.fimage.height/s}
this.SetDraw(t);t.txtOpt=!!this.fimage}
this.h=theight;this.w=twidth};Tproto.SetFont=function(f,c,bc,boc){this.textFont=f;this.colour=c;this.bgColour=bc;this.bgOutline=boc;this.Measure(this.tc.ctxt,this.tc)};Tproto.SetWeight=function(w){var tc=this.tc,modes=tc.weightMode.split(/[, ]/),m,s,wl=w.length;if(!this.HasText())
return;this.weighted=!0;for(s=0;s<wl;++s){m=modes[s]||'size';if('both'==m){this.Weight(w[s],tc.ctxt,tc,'size',tc.min_weight[s],tc.max_weight[s],s);this.Weight(w[s],tc.ctxt,tc,'colour',tc.min_weight[s],tc.max_weight[s],s)}else{this.Weight(w[s],tc.ctxt,tc,m,tc.min_weight[s],tc.max_weight[s],s)}}
this.Measure(tc.ctxt,tc)};Tproto.Weight=function(w,c,t,m,wmin,wmax,wnum){w=isNaN(w)?1:w;var nweight=(w-wmin)/(wmax-wmin);if('colour'==m)
this.colour=FindGradientColour(t,nweight,wnum);else if('bgcolour'==m)
this.bgColour=FindGradientColour(t,nweight,wnum);else if('bgoutline'==m)
this.bgOutline=FindGradientColour(t,nweight,wnum);else if('outline'==m)
this.outline.colour=FindGradientColour(t,nweight,wnum);else if('size'==m){if(t.weightSizeMin>0&&t.weightSizeMax>t.weightSizeMin){this.textHeight=t.weightSize*(t.weightSizeMin+(t.weightSizeMax-t.weightSizeMin)*nweight)}else{this.textHeight=max(1,w*t.weightSize)}}};Tproto.SetShadowColourFixed=function(c,s,a){c.shadowColor=s};Tproto.SetShadowColourAlpha=function(c,s,a){c.shadowColor=SetAlpha(s,a)};Tproto.DrawText=function(c,xoff,yoff){var t=this.tc,x=this.x,y=this.y,s=this.sc,i,xl;c.globalAlpha=this.alpha;c.fillStyle=this.colour;t.shadow&&this.SetShadowColour(c,t.shadow,this.alpha);c.font=this.font;x+=xoff/s;y+=(yoff/s)-(this.h/2);for(i=0;i<this.text.length;++i){xl=x;if('right'==t.textAlign){xl+=this.w/2-this.line_widths[i]}else if('centre'==t.textAlign){xl-=this.line_widths[i]/2}else{xl-=this.w/2}
c.setTransform(s,0,0,s,s*xl,s*y);c.fillText(this.text[i],0,0);y+=this.textHeight}};Tproto.DrawImage=function(c,xoff,yoff,im){var x=this.x,y=this.y,s=this.sc,i=im||this.fimage,w=this.w,h=this.h,a=this.alpha,shadow=this.shadow;c.globalAlpha=a;shadow&&this.SetShadowColour(c,shadow,a);x+=(xoff/s)-(w/2);y+=(yoff/s)-(h/2);c.setTransform(s,0,0,s,s*x,s*y);c.drawImage(i,0,0,w,h)};Tproto.DrawImageIE=function(c,xoff,yoff){var i=this.fimage,s=this.sc,w=i.width=this.w*s,h=i.height=this.h*s,x=(this.x*s)+xoff-(w/2),y=(this.y*s)+yoff-(h/2);c.setTransform(1,0,0,1,0,0);c.globalAlpha=this.alpha;c.drawImage(i,x,y)};Tproto.Calc=function(m,a){var pp,t=this.tc,mnb=t.minBrightness,mxb=t.maxBrightness,r=t.max_radius;pp=m.xform(this.position);this.xformed=pp;pp=Project(t,pp,t.stretchX,t.stretchY);this.x=pp.x;this.y=pp.y;this.z=pp.z;this.sc=pp.w;this.alpha=a*Clamp(mnb+(mxb-mnb)*(r-this.z)/(2*r),0,1);return this.xformed};Tproto.UpdateActive=function(c,xoff,yoff){var o=this.outline,w=this.w,h=this.h,x=this.x-w/2,y=this.y-h/2;o.Update(x,y,w,h,this.sc,this.z,xoff,yoff);return o};Tproto.CheckActive=function(c,xoff,yoff){var t=this.tc,o=this.UpdateActive(c,xoff,yoff);return o.Active(c,t.mx,t.my)?o:null};Tproto.Clicked=function(e){var a=this.a,t=a.target,h=a.href,evt;if(t!=''&&t!='_self'){if(self.frames[t]){self.frames[t].document.location=h}else{try{if(top.frames[t]){top.frames[t].document.location=h;return}}catch(err){}
window.open(h,t)}
return}
if(doc.createEvent){evt=doc.createEvent('MouseEvents');evt.initMouseEvent('click',1,1,window,0,0,0,0,0,0,0,0,0,0,null);if(!a.dispatchEvent(evt))
return}else if(a.fireEvent){if(!a.fireEvent('onclick'))
return}
doc.location=h};function TagCanvas(cid,lctr,opt){var i,p,c=doc.getElementById(cid),cp=['id','class','innerHTML'],raf;if(!c)throw 0;if(Defined(window.G_vmlCanvasManager)){c=window.G_vmlCanvasManager.initElement(c);this.ie=parseFloat(navigator.appVersion.split('MSIE')[1])}
if(c&&(!c.getContext||!c.getContext('2d').fillText)){p=doc.createElement('DIV');for(i=0;i<cp.length;++i)
p[cp[i]]=c[cp[i]];c.parentNode.insertBefore(p,c);c.parentNode.removeChild(c);throw 0}
for(i in TagCanvas.options)
this[i]=opt&&Defined(opt[i])?opt[i]:(Defined(TagCanvas[i])?TagCanvas[i]:TagCanvas.options[i]);this.canvas=c;this.ctxt=c.getContext('2d');this.z1=250/max(this.depth,0.001);this.z2=this.z1/this.zoom;this.radius=min(c.height,c.width)*0.0075;this.max_radius=100;this.max_weight=[];this.min_weight=[];this.textFont=this.textFont&&FixFont(this.textFont);this.textHeight*=1;this.imageRadius=this.imageRadius.toString();this.pulsateTo=Clamp(this.pulsateTo,0,1);this.minBrightness=Clamp(this.minBrightness,0,1);this.maxBrightness=Clamp(this.maxBrightness,this.minBrightness,1);this.ctxt.textBaseline='top';this.lx=(this.lock+'').indexOf('x')+1;this.ly=(this.lock+'').indexOf('y')+1;this.frozen=this.dx=this.dy=this.fixedAnim=this.touchState=0;this.fixedAlpha=1;this.source=lctr||cid;this.repeatTags=min(64,~~this.repeatTags);this.minTags=min(200,~~this.minTags);if(~~this.scrollPause>0)
TagCanvas.scrollPause=~~this.scrollPause;else this.scrollPause=0;if(this.minTags>0&&this.repeatTags<1&&(i=this.GetTags().length))
this.repeatTags=ceil(this.minTags/i)-1;this.transform=Matrix.Identity();this.startTime=this.time=TimeNow();this.mx=this.my=-1;this.centreImage&&CentreImage(this);this.Animate=this.dragControl?this.AnimateDrag:this.AnimatePosition;this.animTiming=(typeof TagCanvas[this.animTiming]=='function'?TagCanvas[this.animTiming]:TagCanvas.Smooth);if(this.shadowBlur||this.shadowOffset[0]||this.shadowOffset[1]){this.ctxt.shadowColor=this.shadow;this.shadow=this.ctxt.shadowColor;this.shadowAlpha=ShadowAlphaBroken()}else{delete this.shadow}
this.Load();if(lctr&&this.hideTags){(function(t){if(TagCanvas.loaded)
t.HideTags();else AddHandler('load',function(){t.HideTags()},window)})(this)}
this.yaw=this.initial?this.initial[0]*this.maxSpeed:0;this.pitch=this.initial?this.initial[1]*this.maxSpeed:0;if(this.tooltip){this.ctitle=c.title;c.title='';if(this.tooltip=='native'){this.Tooltip=this.TooltipNative}else{this.Tooltip=this.TooltipDiv;if(!this.ttdiv){this.ttdiv=doc.createElement('div');this.ttdiv.className=this.tooltipClass;this.ttdiv.style.position='absolute';this.ttdiv.style.zIndex=c.style.zIndex+1;AddHandler('mouseover',function(e){e.target.style.display='none'},this.ttdiv);doc.body.appendChild(this.ttdiv)}}}else{this.Tooltip=this.TooltipNone}
if(!this.noMouse&&!handlers[cid]){handlers[cid]=[['mousemove',MouseMove],['mouseout',MouseOut],['mouseup',MouseUp],['touchstart',TouchDown],['touchend',TouchUp],['touchcancel',TouchUp],['touchmove',TouchMove]];if(this.dragControl){handlers[cid].push(['mousedown',MouseDown]);handlers[cid].push(['selectstart',Nop])}
if(this.wheelZoom){handlers[cid].push(['mousewheel',MouseWheel]);handlers[cid].push(['DOMMouseScroll',MouseWheel])}
if(this.scrollPause){handlers[cid].push(['scroll',Scroll,window])}
for(i=0;i<handlers[cid].length;++i){p=handlers[cid][i];AddHandler(p[0],p[1],p[2]?p[2]:c)}}
if(!TagCanvas.started){raf=window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;TagCanvas.NextFrame=raf?TagCanvas.NextFrameRAF:TagCanvas.NextFrameTimeout;TagCanvas.interval=this.interval;TagCanvas.NextFrame(this.interval);TagCanvas.started=1}}
TCproto=TagCanvas.prototype;TCproto.SourceElements=function(){if(doc.querySelectorAll)
return doc.querySelectorAll('#'+this.source);return[doc.getElementById(this.source)]};TCproto.HideTags=function(){var el=this.SourceElements(),i;for(i=0;i<el.length;++i)
el[i].style.display='none'};TCproto.GetTags=function(){var el=this.SourceElements(),etl,tl=[],i,j,k;for(k=0;k<=this.repeatTags;++k){for(i=0;i<el.length;++i){etl=el[i].getElementsByTagName('a');for(j=0;j<etl.length;++j){tl.push(etl[j])}}}
return tl};TCproto.Message=function(text){var tl=[],i,p,tc=text.split(''),a,t,x,z;for(i=0;i<tc.length;++i){if(tc[i]!=' '){p=i-tc.length/2;a=doc.createElement('A');a.href='#';a.innerText=tc[i];x=100*sin(p/9);z=-100*cos(p/9);t=new Tag(this,tc[i],a,[x,0,z],2,18,'#000','#fff',0,0,0,'monospace',2,tc[i]);t.Init();tl.push(t)}}
return tl};TCproto.CreateTag=function(e){var im,i,t,txt,ts,font,bc,boc,p=[0,0,0];if('text'!=this.imageMode){im=e.getElementsByTagName('img');if(im.length){i=new Image;i.src=im[0].src;if(!this.imageMode){t=new Tag(this,"",e,p,0,0);t.SetImage(i);AddImage(i,im[0],t,this);return t}}}
if('image'!=this.imageMode){ts=new TextSplitter(e);txt=ts.Lines();if(!ts.Empty()){font=this.textFont||FixFont(GetProperty(e,'font-family'));if(this.splitWidth)
txt=ts.SplitWidth(this.splitWidth,this.ctxt,font,this.textHeight);bc=this.bgColour=='tag'?GetProperty(e,'background-color'):this.bgColour;boc=this.bgOutline=='tag'?GetProperty(e,'color'):this.bgOutline}else{ts=null}}
if(ts||i){t=new Tag(this,txt,e,p,2,this.textHeight+2,this.textColour||GetProperty(e,'color'),bc,this.bgRadius,boc,this.bgOutlineThickness,font,this.padding,ts&&ts.original);if(i){t.SetImage(i);AddImage(i,im[0],t,this)}else{t.Init()}
return t}};TCproto.UpdateTag=function(t,a){var colour=this.textColour||GetProperty(a,'color'),font=this.textFont||FixFont(GetProperty(a,'font-family')),bc=this.bgColour=='tag'?GetProperty(a,'background-color'):this.bgColour,boc=this.bgOutline=='tag'?GetProperty(a,'color'):this.bgOutline;t.a=a;t.title=a.title;if(t.colour!=colour||t.textFont!=font||t.bgColour!=bc||t.bgOutline!=boc)
t.SetFont(font,colour,bc,boc)};TCproto.Weight=function(tl){var ll=tl.length,w,i,s,weights=[],valid,wfrom=this.weightFrom?this.weightFrom.split(/[, ]/):[null],wl=wfrom.length;for(i=0;i<ll;++i){weights[i]=[];for(s=0;s<wl;++s){w=FindWeight(tl[i].a,wfrom[s],this.textHeight);if(!this.max_weight[s]||w>this.max_weight[s])
this.max_weight[s]=w;if(!this.min_weight[s]||w<this.min_weight[s])
this.min_weight[s]=w;weights[i][s]=w}}
for(s=0;s<wl;++s){if(this.max_weight[s]>this.min_weight[s])
valid=1}
if(valid){for(i=0;i<ll;++i){tl[i].SetWeight(weights[i])}}};TCproto.Load=function(){var tl=this.GetTags(),taglist=[],shape,t,shapeArgs,rx,ry,rz,vl,i,tagmap=[],pfuncs={sphere:PointsOnSphere,vcylinder:PointsOnCylinderV,hcylinder:PointsOnCylinderH,vring:PointsOnRingV,hring:PointsOnRingH};if(tl.length){tagmap.length=tl.length;for(i=0;i<tl.length;++i)
tagmap[i]=i;this.shuffleTags&&Shuffle(tagmap);rx=100*this.radiusX;ry=100*this.radiusY;rz=100*this.radiusZ;this.max_radius=max(rx,max(ry,rz));for(i=0;i<tl.length;++i){t=this.CreateTag(tl[tagmap[i]]);if(t)
taglist.push(t)}
this.weight&&this.Weight(taglist,!0);if(this.shapeArgs){this.shapeArgs[0]=taglist.length}else{shapeArgs=this.shape.toString().split(/[(),]/);shape=shapeArgs.shift();if(typeof window[shape]==='function')
this.shape=window[shape];else this.shape=pfuncs[shape]||pfuncs.sphere;this.shapeArgs=[taglist.length,rx,ry,rz].concat(shapeArgs)}
vl=this.shape.apply(this,this.shapeArgs);this.listLength=taglist.length;for(i=0;i<taglist.length;++i)
taglist[i].position=new Vector(vl[i][0],vl[i][1],vl[i][2]);}
if(this.noTagsMessage&&!taglist.length){i=(this.imageMode&&this.imageMode!='both'?this.imageMode+' ':'');taglist=this.Message('No '+i+'tags')}
this.taglist=taglist};TCproto.Update=function(){var tl=this.GetTags(),newlist=[],taglist=this.taglist,found,added=[],removed=[],vl,ol,nl,i,j;if(!this.shapeArgs)
return this.Load();if(tl.length){nl=this.listLength=tl.length;ol=taglist.length;for(i=0;i<ol;++i){newlist.push(taglist[i]);removed.push(i)}
for(i=0;i<nl;++i){for(j=0,found=0;j<ol;++j){if(taglist[j].EqualTo(tl[i])){this.UpdateTag(newlist[j],tl[i]);found=removed[j]=-1}}
if(!found)
added.push(i)}
for(i=0,j=0;i<ol;++i){if(removed[j]==-1)
removed.splice(j,1);else ++j}
if(removed.length){Shuffle(removed);while(removed.length&&added.length){i=removed.shift();j=added.shift();newlist[i]=this.CreateTag(tl[j])}
removed.sort(function(a,b){return a-b});while(removed.length){newlist.splice(removed.pop(),1)}}
j=newlist.length/(added.length+1);i=0;while(added.length){newlist.splice(ceil(++i*j),0,this.CreateTag(tl[added.shift()]))}
this.shapeArgs[0]=nl=newlist.length;vl=this.shape.apply(this,this.shapeArgs);for(i=0;i<nl;++i)
newlist[i].position=new Vector(vl[i][0],vl[i][1],vl[i][2]);this.weight&&this.Weight(newlist)}
this.taglist=newlist};TCproto.SetShadow=function(c){c.shadowBlur=this.shadowBlur;c.shadowOffsetX=this.shadowOffset[0];c.shadowOffsetY=this.shadowOffset[1]};TCproto.Draw=function(t){if(this.paused)
return;var cv=this.canvas,cw=cv.width,ch=cv.height,max_sc=0,tdelta=(t-this.time)*TagCanvas.interval/1000,x=cw/2+this.offsetX,y=ch/2+this.offsetY,c=this.ctxt,active,a,i,aindex=-1,tl=this.taglist,l=tl.length,frontsel=this.frontSelect,centreDrawn=(this.centreFunc==Nop),fixed;this.time=t;if(this.frozen&&this.drawn)
return this.Animate(cw,ch,tdelta);fixed=this.AnimateFixed();c.setTransform(1,0,0,1,0,0);for(i=0;i<l;++i)
tl[i].Calc(this.transform,this.fixedAlpha);tl=SortList(tl,function(a,b){return b.z-a.z});if(fixed&&this.fixedAnim.active){active=this.fixedAnim.tag.UpdateActive(c,x,y)}else{this.active=null;for(i=0;i<l;++i){a=this.mx>=0&&this.my>=0&&this.taglist[i].CheckActive(c,x,y);if(a&&a.sc>max_sc&&(!frontsel||a.z<=0)){active=a;aindex=i;active.tag=this.taglist[i];max_sc=a.sc}}
this.active=active}
this.txtOpt||(this.shadow&&this.SetShadow(c));c.clearRect(0,0,cw,ch);for(i=0;i<l;++i){if(!centreDrawn&&tl[i].z<=0){try{this.centreFunc(c,cw,ch,x,y)}
catch(e){alert(e);this.centreFunc=Nop}
centreDrawn=!0}
if(!(active&&active.tag==tl[i]&&active.PreDraw(c,tl[i],x,y)))
tl[i].Draw(c,x,y);active&&active.tag==tl[i]&&active.PostDraw(c)}
if(this.freezeActive&&active){this.Freeze()}else{this.UnFreeze();this.drawn=(l==this.listLength)}
if(this.fixedCallback){this.fixedCallback(this,this.fixedCallbackTag);this.fixedCallback=null}
fixed||this.Animate(cw,ch,tdelta);active&&active.LastDraw(c);cv.style.cursor=active?this.activeCursor:'';this.Tooltip(active,this.taglist[aindex])};TCproto.TooltipNone=function(){};TCproto.TooltipNative=function(active,tag){if(active)
this.canvas.title=tag&&tag.title?tag.title:'';else this.canvas.title=this.ctitle};TCproto.SetTTDiv=function(title,tag){var tc=this,s=tc.ttdiv.style;if(title!=tc.ttdiv.innerHTML)
s.display='none';tc.ttdiv.innerHTML=title;tag&&(tag.title=tc.ttdiv.innerHTML);if(s.display=='none'&&!tc.tttimer){tc.tttimer=setTimeout(function(){var p=AbsPos(tc.canvas.id);s.display='block';s.left=p.x+tc.mx+'px';s.top=p.y+tc.my+24+'px';tc.tttimer=null},tc.tooltipDelay)}};TCproto.TooltipDiv=function(active,tag){if(active&&tag&&tag.title){this.SetTTDiv(tag.title,tag)}else if(!active&&this.mx!=-1&&this.my!=-1&&this.ctitle.length){this.SetTTDiv(this.ctitle)}else{this.ttdiv.style.display='none'}};TCproto.Transform=function(tc,p,y){if(p||y){var sp=sin(p),cp=cos(p),sy=sin(y),cy=cos(y),ym=new Matrix([cy,0,sy,0,1,0,-sy,0,cy]),pm=new Matrix([1,0,0,0,cp,-sp,0,sp,cp]);tc.transform=tc.transform.mul(ym.mul(pm))}};TCproto.AnimateFixed=function(){var fa,t1,angle,m,d;if(this.fadeIn){t1=TimeNow()-this.startTime;if(t1>=this.fadeIn){this.fadeIn=0;this.fixedAlpha=1}else{this.fixedAlpha=t1/this.fadeIn}}
if(this.fixedAnim){if(!this.fixedAnim.transform)
this.fixedAnim.transform=this.transform;fa=this.fixedAnim,t1=TimeNow()-fa.t0,angle=fa.angle,m,d=this.animTiming(fa.t,t1);this.transform=fa.transform;if(t1>=fa.t){this.fixedCallbackTag=fa.tag;this.fixedCallback=fa.cb;this.fixedAnim=this.yaw=this.pitch=0}else{angle*=d}
m=Matrix.Rotation(angle,fa.axis);this.transform=this.transform.mul(m);return(this.fixedAnim!=0)}
return!1};TCproto.AnimatePosition=function(w,h,t){var tc=this,x=tc.mx,y=tc.my,s,r;if(!tc.frozen&&x>=0&&y>=0&&x<w&&y<h){s=tc.maxSpeed,r=tc.reverse?-1:1;tc.lx||(tc.yaw=((x*2*s/w)-s)*r*t);tc.ly||(tc.pitch=((y*2*s/h)-s)*-r*t);tc.initial=null}else if(!tc.initial){if(tc.frozen&&!tc.freezeDecel)
tc.yaw=tc.pitch=0;else tc.Decel(tc)}
this.Transform(tc,tc.pitch,tc.yaw)};TCproto.AnimateDrag=function(w,h,t){var tc=this,rs=100*t*tc.maxSpeed/tc.max_radius/tc.zoom;if(tc.dx||tc.dy){tc.lx||(tc.yaw=tc.dx*rs/tc.stretchX);tc.ly||(tc.pitch=tc.dy*-rs/tc.stretchY);tc.dx=tc.dy=0;tc.initial=null}else if(!tc.initial){tc.Decel(tc)}
this.Transform(tc,tc.pitch,tc.yaw)};TCproto.Freeze=function(){if(!this.frozen){this.preFreeze=[this.yaw,this.pitch];this.frozen=1;this.drawn=0}};TCproto.UnFreeze=function(){if(this.frozen){this.yaw=this.preFreeze[0];this.pitch=this.preFreeze[1];this.frozen=0}};TCproto.Decel=function(tc){var s=tc.minSpeed,ay=abs(tc.yaw),ap=abs(tc.pitch);if(!tc.lx&&ay>s)
tc.yaw=ay>tc.z0?tc.yaw*tc.decel:0;if(!tc.ly&&ap>s)
tc.pitch=ap>tc.z0?tc.pitch*tc.decel:0};TCproto.Zoom=function(r){this.z2=this.z1*(1/r);this.drawn=0};TCproto.Clicked=function(e){var a=this.active;try{if(a&&a.tag)
if(this.clickToFront===!1||this.clickToFront===null)
a.tag.Clicked(e);else this.TagToFront(a.tag,this.clickToFront,function(){a.tag.Clicked(e)},!0)}catch(ex){}};TCproto.Wheel=function(i){var z=this.zoom+this.zoomStep*(i?1:-1);this.zoom=min(this.zoomMax,max(this.zoomMin,z));this.Zoom(this.zoom)};TCproto.BeginDrag=function(e){this.down=EventXY(e,this.canvas);e.cancelBubble=!0;e.returnValue=!1;e.preventDefault&&e.preventDefault()};TCproto.Drag=function(e,p){if(this.dragControl&&this.down){var t2=this.dragThreshold*this.dragThreshold,dx=p.x-this.down.x,dy=p.y-this.down.y;if(this.dragging||dx*dx+dy*dy>t2){this.dx=dx;this.dy=dy;this.dragging=1;this.down=p}}
return this.dragging};TCproto.EndDrag=function(){var res=this.dragging;this.dragging=this.down=null;return res};function PinchDistance(e){var t1=e.targetTouches[0],t2=e.targetTouches[1];return sqrt(pow(t2.pageX-t1.pageX,2)+pow(t2.pageY-t1.pageY,2))}
TCproto.BeginPinch=function(e){this.pinched=[PinchDistance(e),this.zoom];e.preventDefault&&e.preventDefault()};TCproto.Pinch=function(e){var z,d,p=this.pinched;if(!p)
return;d=PinchDistance(e);z=p[1]*d/p[0];this.zoom=min(this.zoomMax,max(this.zoomMin,z));this.Zoom(this.zoom)};TCproto.EndPinch=function(e){this.pinched=null};TCproto.Pause=function(){this.paused=!0};TCproto.Resume=function(){this.paused=!1};TCproto.SetSpeed=function(i){this.initial=i;this.yaw=i[0]*this.maxSpeed;this.pitch=i[1]*this.maxSpeed};TCproto.FindTag=function(t){if(!Defined(t))
return null;Defined(t.index)&&(t=t.index);if(!IsObject(t))
return this.taglist[t];var srch,tgt,i;if(Defined(t.id))
srch='id',tgt=t.id;else if(Defined(t.text))
srch='innerText',tgt=t.text;for(i=0;i<this.taglist.length;++i)
if(this.taglist[i].a[srch]==tgt)
return this.taglist[i]};TCproto.RotateTag=function(tag,lt,lg,time,callback,active){var t=tag.Calc(this.transform,1),v1=new Vector(t.x,t.y,t.z),v2=MakeVector(lg,lt),angle=v1.angle(v2),u=v1.cross(v2).unit();if(angle==0){this.fixedCallbackTag=tag;this.fixedCallback=callback}else{this.fixedAnim={angle:-angle,axis:u,t:time,t0:TimeNow(),cb:callback,tag:tag,active:active}}};TCproto.TagToFront=function(tag,time,callback,active){this.RotateTag(tag,0,0,time,callback,active)};TagCanvas.Start=function(id,l,o){TagCanvas.Delete(id);TagCanvas.tc[id]=new TagCanvas(id,l,o)};function tccall(f,id){TagCanvas.tc[id]&&TagCanvas.tc[id][f]()}
TagCanvas.Linear=function(t,t0){return t0/t}
TagCanvas.Smooth=function(t,t0){return 0.5-cos(t0*Math.PI/t)/2}
TagCanvas.Pause=function(id){tccall('Pause',id)};TagCanvas.Resume=function(id){tccall('Resume',id)};TagCanvas.Reload=function(id){tccall('Load',id)};TagCanvas.Update=function(id){tccall('Update',id)};TagCanvas.SetSpeed=function(id,speed){if(IsObject(speed)&&TagCanvas.tc[id]&&!isNaN(speed[0])&&!isNaN(speed[1])){TagCanvas.tc[id].SetSpeed(speed);return!0}
return!1};TagCanvas.TagToFront=function(id,options){if(!IsObject(options))
return!1;options.lat=options.lng=0;return TagCanvas.RotateTag(id,options)};TagCanvas.RotateTag=function(id,options){if(IsObject(options)&&TagCanvas.tc[id]){if(isNaN(options.time))
options.time=500;var tt=TagCanvas.tc[id].FindTag(options);if(tt){TagCanvas.tc[id].RotateTag(tt,options.lat,options.lng,options.time,options.callback,options.active);return!0}}
return!1};TagCanvas.Delete=function(id){var i,c;if(handlers[id]){c=doc.getElementById(id);if(c){for(i=0;i<handlers[id].length;++i)
RemoveHandler(handlers[id][i][0],handlers[id][i][1],c);}}
delete handlers[id];delete TagCanvas.tc[id]};TagCanvas.NextFrameRAF=function(){requestAnimationFrame(DrawCanvasRAF)};TagCanvas.NextFrameTimeout=function(iv){setTimeout(DrawCanvas,iv)};TagCanvas.tc={};TagCanvas.options={z1:20000,z2:20000,z0:0.0002,freezeActive:!1,freezeDecel:!1,activeCursor:'pointer',pulsateTo:1,pulsateTime:3,reverse:!1,depth:0.5,maxSpeed:0.05,minSpeed:0,decel:0.95,interval:20,minBrightness:0.1,maxBrightness:1,outlineColour:'#ffff99',outlineThickness:2,outlineOffset:5,outlineMethod:'outline',outlineRadius:0,textColour:'#ff99ff',textHeight:15,textFont:'Helvetica, Arial, sans-serif',shadow:'#000',shadowBlur:0,shadowOffset:[0,0],initial:null,hideTags:!0,zoom:1,weight:!1,weightMode:'size',weightFrom:null,weightSize:1,weightSizeMin:null,weightSizeMax:null,weightGradient:{0:'#f00',0.33:'#ff0',0.66:'#0f0',1:'#00f'},txtOpt:!0,txtScale:2,frontSelect:!1,wheelZoom:!0,zoomMin:0.3,zoomMax:3,zoomStep:0.05,shape:'sphere',lock:null,tooltip:null,tooltipDelay:300,tooltipClass:'tctooltip',radiusX:1,radiusY:1,radiusZ:1,stretchX:1,stretchY:1,offsetX:0,offsetY:0,shuffleTags:!1,noSelect:!1,noMouse:!1,imageScale:1,paused:!1,dragControl:!1,dragThreshold:4,centreFunc:Nop,splitWidth:0,animTiming:'Smooth',clickToFront:!1,fadeIn:0,padding:0,bgColour:null,bgRadius:0,bgOutline:null,bgOutlineThickness:0,outlineIncrease:4,textAlign:'centre',textVAlign:'middle',imageMode:null,imagePosition:null,imagePadding:2,imageAlign:'centre',imageVAlign:'middle',noTagsMessage:!0,centreImage:null,pinchZoom:!1,repeatTags:0,minTags:0,imageRadius:0,scrollPause:!1,outlineDash:0,outlineDashSpace:0,outlineDashSpeed:1};for(i in TagCanvas.options)TagCanvas[i]=TagCanvas.options[i];window.TagCanvas=TagCanvas;jQuery.fn.tagcanvas=function(options,lctr){var fn={pause:function(){$(this).each(function(){tccall('Pause',$(this)[0].id)})},resume:function(){$(this).each(function(){tccall('Resume',$(this)[0].id)})},reload:function(){$(this).each(function(){tccall('Load',$(this)[0].id)})},update:function(){$(this).each(function(){tccall('Update',$(this)[0].id)})},tagtofront:function(){$(this).each(function(){TagCanvas.TagToFront($(this)[0].id,lctr)})},rotatetag:function(){$(this).each(function(){TagCanvas.RotateTag($(this)[0].id,lctr)})},'delete':function(){$(this).each(function(){TagCanvas.Delete($(this)[0].id)})},setspeed:function(){$(this).each(function(){TagCanvas.SetSpeed($(this)[0].id,lctr)})}};if(typeof options=='string'&&fn[options]){fn[options].apply(this);return this}else{TagCanvas.jquery=1;$(this).each(function(){TagCanvas.Start($(this)[0].id,lctr,options)});return TagCanvas.started}};AddHandler('load',function(){TagCanvas.loaded=1},window)})(jQuery);
/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/colorbox/jquery.colorbox.js */
(function($,document,window){var
defaults={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:0.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:undefined,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:'@2x.$1',current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return $(this).attr('href')},title:function(){return this.title},createImg:function(){var img=new Image();var attrs=$(this).data('cbox-img-attrs');if(typeof attrs==='object'){$.each(attrs,function(key,val){img[key]=val})}
return img},createIframe:function(){var iframe=document.createElement('iframe');var attrs=$(this).data('cbox-iframe-attrs');if(typeof attrs==='object'){$.each(attrs,function(key,val){iframe[key]=val})}
if('frameBorder' in iframe){iframe.frameBorder=0}
if('allowTransparency' in iframe){iframe.allowTransparency="true"}
iframe.name=(new Date()).getTime();iframe.allowFullscreen=!0;return iframe}},colorbox='colorbox',prefix='cbox',boxElement=prefix+'Element',event_open=prefix+'_open',event_load=prefix+'_load',event_complete=prefix+'_complete',event_cleanup=prefix+'_cleanup',event_closed=prefix+'_closed',event_purge=prefix+'_purge',$overlay,$box,$wrap,$content,$topBorder,$leftBorder,$rightBorder,$bottomBorder,$related,$window,$loaded,$loadingBay,$loadingOverlay,$title,$current,$slideshow,$next,$prev,$close,$groupControls,$events=$('<a/>'),settings,interfaceHeight,interfaceWidth,loadedHeight,loadedWidth,index,photo,open,active,closing,loadingTimer,publicMethod,div="div",requests=0,previousCSS={},init;function $tag(tag,id,css){var element=document.createElement(tag);if(id){element.id=prefix+id}
if(css){element.style.cssText=css}
return $(element)}
function winheight(){return window.innerHeight?window.innerHeight:$(window).height()}
function Settings(element,options){if(options!==Object(options)){options={}}
this.cache={};this.el=element;this.value=function(key){var dataAttr;if(this.cache[key]===undefined){dataAttr=$(this.el).attr('data-cbox-'+key);if(dataAttr!==undefined){this.cache[key]=dataAttr}else if(options[key]!==undefined){this.cache[key]=options[key]}else if(defaults[key]!==undefined){this.cache[key]=defaults[key]}}
return this.cache[key]};this.get=function(key){var value=this.value(key);return $.isFunction(value)?value.call(this.el,this):value}}
function getIndex(increment){var
max=$related.length,newIndex=(index+increment)%max;return(newIndex<0)?max+newIndex:newIndex}
function setSize(size,dimension){return Math.round((/%/.test(size)?((dimension==='x'?$window.width():winheight())/100):1)*parseInt(size,10))}
function isImage(settings,url){return settings.get('photo')||settings.get('photoRegex').test(url)}
function retinaUrl(settings,url){return settings.get('retinaUrl')&&window.devicePixelRatio>1?url.replace(settings.get('photoRegex'),settings.get('retinaSuffix')):url}
function trapFocus(e){if('contains' in $box[0]&&!$box[0].contains(e.target)&&e.target!==$overlay[0]){e.stopPropagation();$box.focus()}}
function setClass(str){if(setClass.str!==str){$box.add($overlay).removeClass(setClass.str).addClass(str);setClass.str=str}}
function getRelated(rel){index=0;if(rel&&rel!==!1&&rel!=='nofollow'){$related=$('.'+boxElement).filter(function(){var options=$.data(this,colorbox);var settings=new Settings(this,options);return(settings.get('rel')===rel)});index=$related.index(settings.el);if(index===-1){$related=$related.add(settings.el);index=$related.length-1}}else{$related=$(settings.el)}}
function trigger(event){$(document).trigger(event);$events.triggerHandler(event)}
var slideshow=(function(){var active,className=prefix+"Slideshow_",click="click."+prefix,timeOut;function clear(){clearTimeout(timeOut)}
function set(){if(settings.get('loop')||$related[index+1]){clear();timeOut=setTimeout(publicMethod.next,settings.get('slideshowSpeed'))}}
function start(){$slideshow.html(settings.get('slideshowStop')).unbind(click).one(click,stop);$events.bind(event_complete,set).bind(event_load,clear);$box.removeClass(className+"off").addClass(className+"on")}
function stop(){clear();$events.unbind(event_complete,set).unbind(event_load,clear);$slideshow.html(settings.get('slideshowStart')).unbind(click).one(click,function(){publicMethod.next();start()});$box.removeClass(className+"on").addClass(className+"off")}
function reset(){active=!1;$slideshow.hide();clear();$events.unbind(event_complete,set).unbind(event_load,clear);$box.removeClass(className+"off "+className+"on")}
return function(){if(active){if(!settings.get('slideshow')){$events.unbind(event_cleanup,reset);reset()}}else{if(settings.get('slideshow')&&$related[1]){active=!0;$events.one(event_cleanup,reset);if(settings.get('slideshowAuto')){start()}else{stop()}
$slideshow.show()}}}}());function launch(element){var options;if(!closing){options=$(element).data(colorbox);settings=new Settings(element,options);getRelated(settings.get('rel'));if(!open){open=active=!0;setClass(settings.get('className'));$box.css({visibility:'hidden',display:'block',opacity:''});$loaded=$tag(div,'LoadedContent','width:0; height:0; overflow:hidden; visibility:hidden');$content.css({width:'',height:''}).append($loaded);interfaceHeight=$topBorder.height()+$bottomBorder.height()+$content.outerHeight(!0)-$content.height();interfaceWidth=$leftBorder.width()+$rightBorder.width()+$content.outerWidth(!0)-$content.width();loadedHeight=$loaded.outerHeight(!0);loadedWidth=$loaded.outerWidth(!0);var initialWidth=setSize(settings.get('initialWidth'),'x');var initialHeight=setSize(settings.get('initialHeight'),'y');var maxWidth=settings.get('maxWidth');var maxHeight=settings.get('maxHeight');settings.w=Math.max((maxWidth!==!1?Math.min(initialWidth,setSize(maxWidth,'x')):initialWidth)-loadedWidth-interfaceWidth,0);settings.h=Math.max((maxHeight!==!1?Math.min(initialHeight,setSize(maxHeight,'y')):initialHeight)-loadedHeight-interfaceHeight,0);$loaded.css({width:'',height:settings.h});publicMethod.position();trigger(event_open);settings.get('onOpen');$groupControls.add($title).hide();$box.focus();if(settings.get('trapFocus')){if(document.addEventListener){document.addEventListener('focus',trapFocus,!0);$events.one(event_closed,function(){document.removeEventListener('focus',trapFocus,!0)})}}
if(settings.get('returnFocus')){$events.one(event_closed,function(){$(settings.el).focus()})}}
var opacity=parseFloat(settings.get('opacity'));$overlay.css({opacity:opacity===opacity?opacity:'',cursor:settings.get('overlayClose')?'pointer':'',visibility:'visible'}).show();if(settings.get('closeButton')){$close.html(settings.get('close')).appendTo($content)}else{$close.appendTo('<div/>')}
load()}}
function appendHTML(){if(!$box){init=!1;$window=$(window);$box=$tag(div).attr({id:colorbox,'class':$.support.opacity===!1?prefix+'IE':'',role:'dialog',tabindex:'-1'}).hide();$overlay=$tag(div,"Overlay").hide();$loadingOverlay=$([$tag(div,"LoadingOverlay")[0],$tag(div,"LoadingGraphic")[0]]);$wrap=$tag(div,"Wrapper");$content=$tag(div,"Content").append($title=$tag(div,"Title"),$current=$tag(div,"Current"),$prev=$('<button type="button"/>').attr({id:prefix+'Previous'}),$next=$('<button type="button"/>').attr({id:prefix+'Next'}),$slideshow=$('<button type="button"/>').attr({id:prefix+'Slideshow'}),$loadingOverlay);$close=$('<button type="button"/>').attr({id:prefix+'Close'});$wrap.append($tag(div).append($tag(div,"TopLeft"),$topBorder=$tag(div,"TopCenter"),$tag(div,"TopRight")),$tag(div,!1,'clear:left').append($leftBorder=$tag(div,"MiddleLeft"),$content,$rightBorder=$tag(div,"MiddleRight")),$tag(div,!1,'clear:left').append($tag(div,"BottomLeft"),$bottomBorder=$tag(div,"BottomCenter"),$tag(div,"BottomRight"))).find('div div').css({'float':'left'});$loadingBay=$tag(div,!1,'position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;');$groupControls=$next.add($prev).add($current).add($slideshow)}
if(document.body&&!$box.parent().length){$(document.body).append($overlay,$box.append($wrap,$loadingBay))}}
function addBindings(){function clickHandler(e){if(!(e.which>1||e.shiftKey||e.altKey||e.metaKey||e.ctrlKey)){e.preventDefault();launch(this)}}
if($box){if(!init){init=!0;$next.click(function(){publicMethod.next()});$prev.click(function(){publicMethod.prev()});$close.click(function(){publicMethod.close()});$overlay.click(function(){if(settings.get('overlayClose')){publicMethod.close()}});$(document).bind('keydown.'+prefix,function(e){var key=e.keyCode;if(open&&settings.get('escKey')&&key===27){e.preventDefault();publicMethod.close()}
if(open&&settings.get('arrowKey')&&$related[1]&&!e.altKey){if(key===37){e.preventDefault();$prev.click()}else if(key===39){e.preventDefault();$next.click()}}});if($.isFunction($.fn.on)){$(document).on('click.'+prefix,'.'+boxElement,clickHandler)}else{$('.'+boxElement).live('click.'+prefix,clickHandler)}}
return!0}
return!1}
if($[colorbox]){return}
$(appendHTML);publicMethod=$.fn[colorbox]=$[colorbox]=function(options,callback){var settings;var $obj=this;options=options||{};if($.isFunction($obj)){$obj=$('<a/>');options.open=!0}
if(!$obj[0]){return $obj}
appendHTML();if(addBindings()){if(callback){options.onComplete=callback}
$obj.each(function(){var old=$.data(this,colorbox)||{};$.data(this,colorbox,$.extend(old,options))}).addClass(boxElement);settings=new Settings($obj[0],options);if(settings.get('open')){launch($obj[0])}}
return $obj};publicMethod.position=function(speed,loadedCallback){var
css,top=0,left=0,offset=$box.offset(),scrollTop,scrollLeft;$window.unbind('resize.'+prefix);$box.css({top:-9e4,left:-9e4});scrollTop=$window.scrollTop();scrollLeft=$window.scrollLeft();if(settings.get('fixed')){offset.top-=scrollTop;offset.left-=scrollLeft;$box.css({position:'fixed'})}else{top=scrollTop;left=scrollLeft;$box.css({position:'absolute'})}
if(settings.get('right')!==!1){left+=Math.max($window.width()-settings.w-loadedWidth-interfaceWidth-setSize(settings.get('right'),'x'),0)}else if(settings.get('left')!==!1){left+=setSize(settings.get('left'),'x')}else{left+=Math.round(Math.max($window.width()-settings.w-loadedWidth-interfaceWidth,0)/2)}
if(settings.get('bottom')!==!1){top+=Math.max(winheight()-settings.h-loadedHeight-interfaceHeight-setSize(settings.get('bottom'),'y'),0)}else if(settings.get('top')!==!1){top+=setSize(settings.get('top'),'y')}else{top+=Math.round(Math.max(winheight()-settings.h-loadedHeight-interfaceHeight,0)/2)}
$box.css({top:offset.top,left:offset.left,visibility:'visible'});$wrap[0].style.width=$wrap[0].style.height="9999px";function modalDimensions(){$topBorder[0].style.width=$bottomBorder[0].style.width=$content[0].style.width=(parseInt($box[0].style.width,10)-interfaceWidth)+'px';$content[0].style.height=$leftBorder[0].style.height=$rightBorder[0].style.height=(parseInt($box[0].style.height,10)-interfaceHeight)+'px'}
css={width:settings.w+loadedWidth+interfaceWidth,height:settings.h+loadedHeight+interfaceHeight,top:top,left:left};if(speed){var tempSpeed=0;$.each(css,function(i){if(css[i]!==previousCSS[i]){tempSpeed=speed;return}});speed=tempSpeed}
previousCSS=css;if(!speed){$box.css(css)}
$box.dequeue().animate(css,{duration:speed||0,complete:function(){modalDimensions();active=!1;$wrap[0].style.width=(settings.w+loadedWidth+interfaceWidth)+"px";$wrap[0].style.height=(settings.h+loadedHeight+interfaceHeight)+"px";if(settings.get('reposition')){setTimeout(function(){$window.bind('resize.'+prefix,publicMethod.position)},1)}
if($.isFunction(loadedCallback)){loadedCallback()}},step:modalDimensions})};publicMethod.resize=function(options){var scrolltop;if(open){options=options||{};if(options.width){settings.w=setSize(options.width,'x')-loadedWidth-interfaceWidth}
if(options.innerWidth){settings.w=setSize(options.innerWidth,'x')}
$loaded.css({width:settings.w});if(options.height){settings.h=setSize(options.height,'y')-loadedHeight-interfaceHeight}
if(options.innerHeight){settings.h=setSize(options.innerHeight,'y')}
if(!options.innerHeight&&!options.height){scrolltop=$loaded.scrollTop();$loaded.css({height:"auto"});settings.h=$loaded.height()}
$loaded.css({height:settings.h});if(scrolltop){$loaded.scrollTop(scrolltop)}
publicMethod.position(settings.get('transition')==="none"?0:settings.get('speed'))}};publicMethod.prep=function(object){if(!open){return}
var callback,speed=settings.get('transition')==="none"?0:settings.get('speed');$loaded.remove();$loaded=$tag(div,'LoadedContent').append(object);function getWidth(){settings.w=settings.w||$loaded.width();settings.w=settings.mw&&settings.mw<settings.w?settings.mw:settings.w;return settings.w}
function getHeight(){settings.h=settings.h||$loaded.height();settings.h=settings.mh&&settings.mh<settings.h?settings.mh:settings.h;return settings.h}
$loaded.hide().appendTo($loadingBay.show()).css({width:getWidth(),overflow:settings.get('scrolling')?'auto':'hidden'}).css({height:getHeight()}).prependTo($content);$loadingBay.hide();$(photo).css({'float':'none'});setClass(settings.get('className'));callback=function(){var total=$related.length,iframe,complete;if(!open){return}
function removeFilter(){if($.support.opacity===!1){$box[0].style.removeAttribute('filter')}}
complete=function(){clearTimeout(loadingTimer);$loadingOverlay.hide();trigger(event_complete);settings.get('onComplete')};$title.html(settings.get('title')).show();$loaded.show();if(total>1){if(typeof settings.get('current')==="string"){$current.html(settings.get('current').replace('{current}',index+1).replace('{total}',total)).show()}
$next[(settings.get('loop')||index<total-1)?"show":"hide"]().html(settings.get('next'));$prev[(settings.get('loop')||index)?"show":"hide"]().html(settings.get('previous'));slideshow();if(settings.get('preloading')){$.each([getIndex(-1),getIndex(1)],function(){var img,i=$related[this],settings=new Settings(i,$.data(i,colorbox)),src=settings.get('href');if(src&&isImage(settings,src)){src=retinaUrl(settings,src);img=document.createElement('img');img.src=src}})}}else{$groupControls.hide()}
if(settings.get('iframe')){iframe=settings.get('createIframe');if(!settings.get('scrolling')){iframe.scrolling="no"}
$(iframe).attr({src:settings.get('href'),'class':prefix+'Iframe'}).one('load',complete).appendTo($loaded);$events.one(event_purge,function(){iframe.src="//about:blank"});if(settings.get('fastIframe')){$(iframe).trigger('load')}}else{complete()}
if(settings.get('transition')==='fade'){$box.fadeTo(speed,1,removeFilter)}else{removeFilter()}};if(settings.get('transition')==='fade'){$box.fadeTo(speed,0,function(){publicMethod.position(0,callback)})}else{publicMethod.position(speed,callback)}};function load(){var href,setResize,prep=publicMethod.prep,$inline,request=++requests;active=!0;photo=!1;trigger(event_purge);trigger(event_load);settings.get('onLoad');settings.h=settings.get('height')?setSize(settings.get('height'),'y')-loadedHeight-interfaceHeight:settings.get('innerHeight')&&setSize(settings.get('innerHeight'),'y');settings.w=settings.get('width')?setSize(settings.get('width'),'x')-loadedWidth-interfaceWidth:settings.get('innerWidth')&&setSize(settings.get('innerWidth'),'x');settings.mw=settings.w;settings.mh=settings.h;if(settings.get('maxWidth')){settings.mw=setSize(settings.get('maxWidth'),'x')-loadedWidth-interfaceWidth;settings.mw=settings.w&&settings.w<settings.mw?settings.w:settings.mw}
if(settings.get('maxHeight')){settings.mh=setSize(settings.get('maxHeight'),'y')-loadedHeight-interfaceHeight;settings.mh=settings.h&&settings.h<settings.mh?settings.h:settings.mh}
href=settings.get('href');loadingTimer=setTimeout(function(){$loadingOverlay.show()},100);if(settings.get('inline')){var $target=$(href).eq(0);$inline=$('<div>').hide().insertBefore($target);$events.one(event_purge,function(){$inline.replaceWith($target)});prep($target)}else if(settings.get('iframe')){prep(" ")}else if(settings.get('html')){prep(settings.get('html'))}else if(isImage(settings,href)){href=retinaUrl(settings,href);photo=settings.get('createImg');$(photo).addClass(prefix+'Photo').bind('error.'+prefix,function(){prep($tag(div,'Error').html(settings.get('imgError')))}).one('load',function(){if(request!==requests){return}
setTimeout(function(){var percent;if(settings.get('retinaImage')&&window.devicePixelRatio>1){photo.height=photo.height/window.devicePixelRatio;photo.width=photo.width/window.devicePixelRatio}
if(settings.get('scalePhotos')){setResize=function(){photo.height-=photo.height*percent;photo.width-=photo.width*percent};if(settings.mw&&photo.width>settings.mw){percent=(photo.width-settings.mw)/photo.width;setResize()}
if(settings.mh&&photo.height>settings.mh){percent=(photo.height-settings.mh)/photo.height;setResize()}}
if(settings.h){photo.style.marginTop=Math.max(settings.mh-photo.height,0)/2+'px'}
if($related[1]&&(settings.get('loop')||$related[index+1])){photo.style.cursor='pointer';$(photo).bind('click.'+prefix,function(){publicMethod.next()})}
photo.style.width=photo.width+'px';photo.style.height=photo.height+'px';prep(photo)},1)});photo.src=href}else if(href){$loadingBay.load(href,settings.get('data'),function(data,status){if(request===requests){prep(status==='error'?$tag(div,'Error').html(settings.get('xhrError')):$(this).contents())}})}}
publicMethod.next=function(){if(!active&&$related[1]&&(settings.get('loop')||$related[index+1])){index=getIndex(1);launch($related[index])}};publicMethod.prev=function(){if(!active&&$related[1]&&(settings.get('loop')||index)){index=getIndex(-1);launch($related[index])}};publicMethod.close=function(){if(open&&!closing){closing=!0;open=!1;trigger(event_cleanup);settings.get('onCleanup');$window.unbind('.'+prefix);$overlay.fadeTo(settings.get('fadeOut')||0,0);$box.stop().fadeTo(settings.get('fadeOut')||0,0,function(){$box.hide();$overlay.hide();trigger(event_purge);$loaded.remove();setTimeout(function(){closing=!1;trigger(event_closed);settings.get('onClosed')},1)})}};publicMethod.remove=function(){if(!$box){return}
$box.stop();$[colorbox].close();$box.stop(!1,!0).remove();$overlay.remove();closing=!1;$box=null;$('.'+boxElement).removeData(colorbox).removeClass(boxElement);$(document).unbind('click.'+prefix).unbind('keydown.'+prefix)};publicMethod.element=function(){return $(settings.el)};publicMethod.settings=defaults}(jQuery,document,window));
/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/jquery-validation/dist/jquery.validate.js */
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else{factory(jQuery)}}(function($){$.extend($.fn,{validate:function(options){if(!this.length){if(options&&options.debug&&window.console){console.warn("Nothing selected, can't validate, returning nothing.")}
return}
var validator=$.data(this[0],"validator");if(validator){return validator}
this.attr("novalidate","novalidate");validator=new $.validator(options,this[0]);$.data(this[0],"validator",validator);if(validator.settings.onsubmit){this.validateDelegate(":submit","click",function(event){if(validator.settings.submitHandler){validator.submitButton=event.target}
if($(event.target).hasClass("cancel")){validator.cancelSubmit=!0}
if($(event.target).attr("formnovalidate")!==undefined){validator.cancelSubmit=!0}});this.submit(function(event){if(validator.settings.debug){event.preventDefault()}
function handle(){var hidden,result;if(validator.settings.submitHandler){if(validator.submitButton){hidden=$("<input type='hidden'/>").attr("name",validator.submitButton.name).val($(validator.submitButton).val()).appendTo(validator.currentForm)}
result=validator.settings.submitHandler.call(validator,validator.currentForm,event);if(validator.submitButton){hidden.remove()}
if(result!==undefined){return result}
return!1}
return!0}
if(validator.cancelSubmit){validator.cancelSubmit=!1;return handle()}
if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=!0;return!1}
return handle()}else{validator.focusInvalid();return!1}})}
return validator},valid:function(){var valid,validator;if($(this[0]).is("form")){valid=this.validate().form()}else{valid=!0;validator=$(this[0].form).validate();this.each(function(){valid=validator.element(this)&&valid})}
return valid},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value)});return result},rules:function(command,argument){var element=this[0],settings,staticRules,existingRules,data,param,filtered;if(command){settings=$.data(element.form,"validator").settings;staticRules=settings.rules;existingRules=$.validator.staticRules(element);switch(command){case "add":$.extend(existingRules,$.validator.normalizeRule(argument));delete existingRules.messages;staticRules[element.name]=existingRules;if(argument.messages){settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages)}
break;case "remove":if(!argument){delete staticRules[element.name];return existingRules}
filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method];if(method==="required"){$(element).removeAttr("aria-required")}});return filtered}}
data=$.validator.normalizeRules($.extend({},$.validator.classRules(element),$.validator.attributeRules(element),$.validator.dataRules(element),$.validator.staticRules(element)),element);if(data.required){param=data.required;delete data.required;data=$.extend({required:param},data);$(element).attr("aria-required","true")}
if(data.remote){param=data.remote;delete data.remote;data=$.extend(data,{remote:param})}
return data}});$.extend($.expr[":"],{blank:function(a){return!$.trim(""+$(a).val())},filled:function(a){return!!$.trim(""+$(a).val())},unchecked:function(a){return!$(a).prop("checked")}});$.validator=function(options,form){this.settings=$.extend(!0,{},$.validator.defaults,options);this.currentForm=form;this.init()};$.validator.format=function(source,params){if(arguments.length===1){return function(){var args=$.makeArray(arguments);args.unshift(source);return $.validator.format.apply(this,args)}}
if(arguments.length>2&&params.constructor!==Array){params=$.makeArray(arguments).slice(1)}
if(params.constructor!==Array){params=[params]}
$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),function(){return n})});return source};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(element){this.lastActive=element;if(this.settings.focusCleanup){if(this.settings.unhighlight){this.settings.unhighlight.call(this,element,this.settings.errorClass,this.settings.validClass)}
this.hideThese(this.errorsFor(element))}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element)}},onkeyup:function(element,event){if(event.which===9&&this.elementValue(element)===""){return}else if(element.name in this.submitted||element===this.lastElement){this.element(element)}},onclick:function(element){if(element.name in this.submitted){this.element(element)}else if(element.parentNode.name in this.submitted){this.element(element.parentNode)}},highlight:function(element,errorClass,validClass){if(element.type==="radio"){this.findByName(element.name).addClass(errorClass).removeClass(validClass)}else{$(element).addClass(errorClass).removeClass(validClass)}},unhighlight:function(element,errorClass,validClass){if(element.type==="radio"){this.findByName(element.name).removeClass(errorClass).addClass(validClass)}else{$(element).removeClass(errorClass).addClass(validClass)}}},setDefaults:function(settings){$.extend($.validator.defaults,settings)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:$.validator.format("Please enter no more than {0} characters."),minlength:$.validator.format("Please enter at least {0} characters."),rangelength:$.validator.format("Please enter a value between {0} and {1} characters long."),range:$.validator.format("Please enter a value between {0} and {1}."),max:$.validator.format("Please enter a value less than or equal to {0}."),min:$.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={}),rules;$.each(this.settings.groups,function(key,value){if(typeof value==="string"){value=value.split(/\s/)}
$.each(value,function(index,name){groups[name]=key})});rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value)});function delegate(event){var validator=$.data(this[0].form,"validator"),eventType="on"+event.type.replace(/^validate/,""),settings=validator.settings;if(settings[eventType]&&!this.is(settings.ignore)){settings[eventType].call(validator,this[0],event)}}
$(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, "+"[type='number'], [type='search'] ,[type='tel'], [type='url'], "+"[type='email'], [type='datetime'], [type='date'], [type='month'], "+"[type='week'], [type='time'], [type='datetime-local'], "+"[type='range'], [type='color'], [type='radio'], [type='checkbox']","focusin focusout keyup",delegate).validateDelegate("select, option, [type='radio'], [type='checkbox']","click",delegate);if(this.settings.invalidHandler){$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}
$(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid()){$(this.currentForm).triggerHandler("invalid-form",[this])}
this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i])}
return this.valid()},element:function(element){var cleanElement=this.clean(element),checkElement=this.validationTargetFor(cleanElement),result=!0;this.lastElement=checkElement;if(checkElement===undefined){delete this.invalid[cleanElement.name]}else{this.prepareElement(checkElement);this.currentElements=$(checkElement);result=this.check(checkElement)!==!1;if(result){delete this.invalid[checkElement.name]}else{this.invalid[checkElement.name]=!0}}
$(element).attr("aria-invalid",!result);if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}
this.showErrors();return result},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]})}
this.successList=$.grep(this.successList,function(element){return!(element.name in errors)})}
if(this.settings.showErrors){this.settings.showErrors.call(this,this.errorMap,this.errorList)}else{this.defaultShowErrors()}},resetForm:function(){if($.fn.resetForm){$(this.currentForm).resetForm()}
this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass).removeData("previousValue").removeAttr("aria-invalid")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(obj){var count=0,i;for(i in obj){count++}
return count},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(errors){errors.not(this.containers).text("");this.addWrapper(errors).hide()},valid:function(){return this.size()===0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name===lastActive.name}).length===1&&lastActive},elements:function(){var validator=this,rulesCache={};return $(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled], [readonly]").not(this.settings.ignore).filter(function(){if(!this.name&&validator.settings.debug&&window.console){console.error("%o has no name assigned",this)}
if(this.name in rulesCache||!validator.objectLength($(this).rules())){return!1}
rulesCache[this.name]=!0;return!0})},clean:function(selector){return $(selector)[0]},errors:function(){var errorClass=this.settings.errorClass.split(" ").join(".");return $(this.settings.errorElement+"."+errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.currentElements=$([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element)},elementValue:function(element){var val,$element=$(element),type=element.type;if(type==="radio"||type==="checkbox"){return $("input[name='"+element.name+"']:checked").val()}else if(type==="number"&&typeof element.validity!=="undefined"){return element.validity.badInput?!1:$element.val()}
val=$element.val();if(typeof val==="string"){return val.replace(/\r/g,"")}
return val},check:function(element){element=this.validationTargetFor(this.clean(element));var rules=$(element).rules(),rulesCount=$.map(rules,function(n,i){return i}).length,dependencyMismatch=!1,val=this.elementValue(element),result,method,rule;for(method in rules){rule={method:method,parameters:rules[method]};try{result=$.validator.methods[method].call(this,val,element,rule.parameters);if(result==="dependency-mismatch"&&rulesCount===1){dependencyMismatch=!0;continue}
dependencyMismatch=!1;if(result==="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return}
if(!result){this.formatAndAdd(element,rule);return!1}}catch(e){if(this.settings.debug&&window.console){console.log("Exception occurred when checking element "+element.id+", check the '"+rule.method+"' method.",e)}
throw e}}
if(dependencyMismatch){return}
if(this.objectLength(rules)){this.successList.push(element)}
return!0},customDataMessage:function(element,method){return $(element).data("msg"+method.charAt(0).toUpperCase()+method.substring(1).toLowerCase())||$(element).data("msg")},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor===String?m:m[method])},findDefined:function(){for(var i=0;i<arguments.length;i++){if(arguments[i]!==undefined){return arguments[i]}}
return undefined},defaultMessage:function(element,method){return this.findDefined(this.customMessage(element.name,method),this.customDataMessage(element,method),!this.settings.ignoreTitle&&element.title||undefined,$.validator.messages[method],"<strong>Warning: No message defined for "+element.name+"</strong>")},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method),theregex=/\$?\{(\d+)\}/g;if(typeof message==="function"){message=message.call(this,rule.parameters,element)}else if(theregex.test(message)){message=$.validator.format(message.replace(theregex,"{$1}"),rule.parameters)}
this.errorList.push({message:message,element:element,method:rule.method});this.errorMap[element.name]=message;this.submitted[element.name]=message},addWrapper:function(toToggle){if(this.settings.wrapper){toToggle=toToggle.add(toToggle.parent(this.settings.wrapper))}
return toToggle},defaultShowErrors:function(){var i,elements,error;for(i=0;this.errorList[i];i++){error=this.errorList[i];if(this.settings.highlight){this.settings.highlight.call(this,error.element,this.settings.errorClass,this.settings.validClass)}
this.showLabel(error.element,error.message)}
if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}
if(this.settings.success){for(i=0;this.successList[i];i++){this.showLabel(this.successList[i])}}
if(this.settings.unhighlight){for(i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass,this.settings.validClass)}}
this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return $(this.errorList).map(function(){return this.element})},showLabel:function(element,message){var place,group,errorID,error=this.errorsFor(element),elementID=this.idOrName(element),describedBy=$(element).attr("aria-describedby");if(error.length){error.removeClass(this.settings.validClass).addClass(this.settings.errorClass);error.html(message)}else{error=$("<"+this.settings.errorElement+">").attr("id",elementID+"-error").addClass(this.settings.errorClass).html(message||"");place=error;if(this.settings.wrapper){place=error.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}
if(this.labelContainer.length){this.labelContainer.append(place)}else if(this.settings.errorPlacement){this.settings.errorPlacement(place,$(element))}else{place.insertAfter(element)}
if(error.is("label")){error.attr("for",elementID)}else if(error.parents("label[for='"+elementID+"']").length===0){errorID=error.attr("id").replace(/(:|\.|\[|\])/g,"\\$1");if(!describedBy){describedBy=errorID}else if(!describedBy.match(new RegExp("\\b"+errorID+"\\b"))){describedBy+=" "+errorID}
$(element).attr("aria-describedby",describedBy);group=this.groups[element.name];if(group){$.each(this.groups,function(name,testgroup){if(testgroup===group){$("[name='"+name+"']",this.currentForm).attr("aria-describedby",error.attr("id"))}})}}}
if(!message&&this.settings.success){error.text("");if(typeof this.settings.success==="string"){error.addClass(this.settings.success)}else{this.settings.success(error,element)}}
this.toShow=this.toShow.add(error)},errorsFor:function(element){var name=this.idOrName(element),describer=$(element).attr("aria-describedby"),selector="label[for='"+name+"'], label[for='"+name+"'] *";if(describer){selector=selector+", #"+describer.replace(/\s+/g,", #")}
return this.errors().filter(selector)},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name)},validationTargetFor:function(element){if(this.checkable(element)){element=this.findByName(element.name)}
return $(element).not(this.settings.ignore)[0]},checkable:function(element){return(/radio|checkbox/i).test(element.type)},findByName:function(name){return $(this.currentForm).find("[name='"+name+"']")},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case "select":return $("option:selected",element).length;case "input":if(this.checkable(element)){return this.findByName(element.name).filter(":checked").length}}
return value.length},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):!0},dependTypes:{"boolean":function(param){return param},"string":function(param,element){return!!$(param,element.form).length},"function":function(param,element){return param(element)}},optional:function(element){var val=this.elementValue(element);return!$.validator.methods.required.call(this,val,element)&&"dependency-mismatch"},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=!0}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}
delete this.pending[element.name];if(valid&&this.pendingRequest===0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();this.formSubmitted=!1}else if(!valid&&this.pendingRequest===0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=!1}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",{old:null,valid:!0,message:this.defaultMessage(element,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(className,rules){if(className.constructor===String){this.classRuleSettings[className]=rules}else{$.extend(this.classRuleSettings,className)}},classRules:function(element){var rules={},classes=$(element).attr("class");if(classes){$.each(classes.split(" "),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this])}})}
return rules},attributeRules:function(element){var rules={},$element=$(element),type=element.getAttribute("type"),method,value;for(method in $.validator.methods){if(method==="required"){value=element.getAttribute(method);if(value===""){value=!0}
value=!!value}else{value=$element.attr(method)}
if(/min|max/.test(method)&&(type===null||/number|range|text/.test(type))){value=Number(value)}
if(value||value===0){rules[method]=value}else if(type===method&&type!=="range"){rules[method]=!0}}
if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength}
return rules},dataRules:function(element){var method,value,rules={},$element=$(element);for(method in $.validator.methods){value=$element.data("rule"+method.charAt(0).toUpperCase()+method.substring(1).toLowerCase());if(value!==undefined){rules[method]=value}}
return rules},staticRules:function(element){var rules={},validator=$.data(element.form,"validator");if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{}}
return rules},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===!1){delete rules[prop];return}
if(val.param||val.depends){var keepRule=!0;switch(typeof val.depends){case "string":keepRule=!!$(val.depends,element.form).length;break;case "function":keepRule=val.depends.call(element,element);break}
if(keepRule){rules[prop]=val.param!==undefined?val.param:!0}else{delete rules[prop]}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter});$.each(["minlength","maxlength"],function(){if(rules[this]){rules[this]=Number(rules[this])}});$.each(["rangelength","range"],function(){var parts;if(rules[this]){if($.isArray(rules[this])){rules[this]=[Number(rules[this][0]),Number(rules[this][1])]}else if(typeof rules[this]==="string"){parts=rules[this].replace(/[\[\]]/g,"").split(/[\s,]+/);rules[this]=[Number(parts[0]),Number(parts[1])]}}});if($.validator.autoCreateRanges){if(rules.min!=null&&rules.max!=null){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max}
if(rules.minlength!=null&&rules.maxlength!=null){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength}}
return rules},normalizeRule:function(data){if(typeof data==="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=!0});data=transformed}
return data},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message!==undefined?message:$.validator.messages[name];if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name))}},methods:{required:function(value,element,param){if(!this.depend(param,element)){return "dependency-mismatch"}
if(element.nodeName.toLowerCase()==="select"){var val=$(element).val();return val&&val.length>0}
if(this.checkable(element)){return this.getLength(value,element)>0}
return $.trim(value).length>0},email:function(value,element){return this.optional(element)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(value)},url:function(value,element){return this.optional(element)||/^(https?|s?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)},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value).toString())},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value)},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value)},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value)},creditcard:function(value,element){if(this.optional(element)){return "dependency-mismatch"}
if(/[^0-9 \-]+/.test(value)){return!1}
var nCheck=0,nDigit=0,bEven=!1,n,cDigit;value=value.replace(/\D/g,"");if(value.length<13||value.length>19){return!1}
for(n=value.length-1;n>=0;n--){cDigit=value.charAt(n);nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9){nDigit-=9}}
nCheck+=nDigit;bEven=!bEven}
return(nCheck%10)===0},minlength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength(value,element);return this.optional(element)||length>=param},maxlength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength(value,element);return this.optional(element)||length<=param},rangelength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength(value,element);return this.optional(element)||(length>=param[0]&&length<=param[1])},min:function(value,element,param){return this.optional(element)||value>=param},max:function(value,element,param){return this.optional(element)||value<=param},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1])},equalTo:function(value,element,param){var target=$(param);if(this.settings.onfocusout){target.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){$(element).valid()})}
return value===target.val()},remote:function(value,element,param){if(this.optional(element)){return "dependency-mismatch"}
var previous=this.previousValue(element),validator,data;if(!this.settings.messages[element.name]){this.settings.messages[element.name]={}}
previous.originalMessage=this.settings.messages[element.name].remote;this.settings.messages[element.name].remote=previous.message;param=typeof param==="string"&&{url:param}||param;if(previous.old===value){return previous.valid}
previous.old=value;validator=this;this.startRequest(element);data={};data[element.name]=value;$.ajax($.extend(!0,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,context:validator.currentForm,success:function(response){var valid=response===!0||response==="true",errors,message,submitted;validator.settings.messages[element.name].remote=previous.originalMessage;if(valid){submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);delete validator.invalid[element.name];validator.showErrors()}else{errors={};message=response||validator.defaultMessage(element,"remote");errors[element.name]=previous.message=$.isFunction(message)?message(value):message;validator.invalid[element.name]=!0;validator.showErrors(errors)}
previous.valid=valid;validator.stopRequest(element,valid)}},param));return "pending"}}});$.format=function deprecated(){throw "$.format has been deprecated. Please use $.validator.format instead."};var pendingRequests={},ajax;if($.ajaxPrefilter){$.ajaxPrefilter(function(settings,_,xhr){var port=settings.port;if(settings.mode==="abort"){if(pendingRequests[port]){pendingRequests[port].abort()}
pendingRequests[port]=xhr}})}else{ajax=$.ajax;$.ajax=function(settings){var mode=("mode" in settings?settings:$.ajaxSettings).mode,port=("port" in settings?settings:$.ajaxSettings).port;if(mode==="abort"){if(pendingRequests[port]){pendingRequests[port].abort()}
pendingRequests[port]=ajax.apply(this,arguments);return pendingRequests[port]}
return ajax.apply(this,arguments)}}
$.extend($.fn,{validateDelegate:function(delegate,type,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments)}})}})}));
/* rank:50standard - minify:ok. lib/validators/validator_tiki.js */
jQuery.validator.setDefaults({errorClass:'label label-warning',errorPlacement:function(error,element){if($(element).parents('.input-group').length>0){error.insertAfter($(element).parents('.input-group').first())}else if($(element).parents('.has-error').length>0){error.appendTo($(element).parents('.has-error').first())}else{error.insertAfter(element)}},highlight:function(element){$(element).parents('div, p').first().addClass('has-error')},unhighlight:function(element){$(element).parents('div, p').first().removeClass('has-error')},ignore:'.ignore'});jQuery.validator.addMethod("required_in_group",function(value,element,options){var numberRequired=options[0],excluded;var selector=options[1];if(typeof options[2]!='undefined'){excluded=options[2]}else{excluded=''}
var validOrNot=$(selector,element.form).filter(function(){if($(this).data('tiki_never_visited'))return 'dummy-value-for-validation';return($(this).val()&&$(this).val().toLowerCase()!=excluded)}).length>=numberRequired;var validator=this;if(!$(element).data('being_validated')){var fields=$(selector,element.form);fields.data('being_validated',!0);validator.valid();fields.data('being_validated',!1)}
return validOrNot},jQuery.validator.format(tr("Please fill out {0} of these fields.")));jQuery.validator.addMethod("required_tracker_file",function(value,element,options){var numberRequired=options[0];var selector=options[1];var validOrNot=$(selector,element.form).filter(function(){return $(this).val()}).length>=numberRequired;if(!$(element).data('being_validated')){var fields=$(selector,element.form);fields.data('being_validated',!0);fields.valid();fields.data('being_validated',!1)}
return validOrNot},jQuery.validator.format("File required"));jQuery.validator.addMethod("email_multi",function(value,element,options){var separator=options[0]||",";var emails=$(element).val().split(separator);for(var i=0;i<emails.length;i++){if(!$.validator.methods.email.call(this,$.trim(emails[i]),element)){return!1}}
return!0},jQuery.validator.format("Please enter valid email addresses separated by commas"));jQuery.validator.addClassRules("email_multi",{email_multi:!0});function process_submit(form){var $form=$(form);if(!$form.attr("is_validating")){$form.attr("is_validating",!0);$form.validate()}
if($form.validate().pendingRequest>0){$(form).data("resubmit",!0);setTimeout(function(){process_submit(form)},500);return!1}
$form.attr("is_validating",!1);if(!$form.valid()){return!1}
$form.find("input[type=submit]").off("click").css("opacity",0.3);$form.parents(".modal").find(".auto-btn").off("click").css("opacity",0.3);if($(form).hasClass("confirm-action")){$form.tikiModal(tr("Saving..."))}
if($form.data("resubmit")){$form.data("resubmit",!1);$form.submit()}
return!0}
jQuery.validator.addMethod("validate_cron_runtime",function(value,element,options){var cronTime=value.trim();var regex="^(\\*|((\\*\\/)?[1-5]?[0-9])|[1-5]?[0-9]-[1-5]?[0-9]|[1-5]?[0-9](,[1-5]?[0-9])*) (\\*|((\\*\\/)?(1?[0-9]|2[0-3]))|(1?[0-9]|2[0-3])-(1?[0-9]|2[0-3])|(1?[0-9]|2[0-3])(,(1?[0-9]|2[0-3]))*) (\\*|((\\*\\/)?([1-9]|[12][0-9]|3[0-1]))|([1-9]|[12][0-9]|3[0-1])-([1-9]|[12][0-9]|3[0-1])|([1-9]|[12][0-9]|3[0-1])(,([1-9]|[12][0-9]|3[0-1]))*) (\\*|((\\*\\/)?([1-9]|1[0-2])|([1-9]|1[0-2])-([1-9]|1[0-2])|([1-9]|1[0-2])(,([1-9]|1[0-2]))*)) (\\*|((\\*\\/)?[0-6])|[0-6](,[0-6])*|[0-6]-[0-6])$";if(cronTime.match(regex)===null){$(element).parents('.form-group').first().addClass('has-error');return!1}
$(element).parents('.form-group').first().removeClass('has-error');return!0},jQuery.validator.format(tr("Cron run time is not valid")));
/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/async/jquery.async.js */
(function($){$.whileAsync=function(opts)
{var delay=Math.abs(opts.delay)||10,bulk=isNaN(opts.bulk)?500:Math.abs(opts.bulk),test=opts.test||function(){return!0},loop=opts.loop||function(){},end=opts.end||function(){};(function(){var t=!1,begin=new Date();while(t=test())
{loop();if(bulk===0||(new Date()-begin)>bulk)
{break}}
if(t)
{setTimeout(arguments.callee,delay)}
else{end()}})()}
$.eachAsync=function(array,opts)
{var i=0,l=array.length,loop=opts.loop||function(){};$.whileAsync($.extend(opts,{test:function(){return i<l},loop:function()
{var val=array[i];return loop.call(val,i++,val)}}))}
$.fn.eachAsync=function(opts)
{$.eachAsync(this,opts);return this}})(jQuery);
/* rank:50standard - minify:ok. vendor_bundled/vendor/jquery/plugins/treetable/jquery.treetable.js */
(function($){var Node,Tree,methods;Node=(function(){function Node(row,tree,settings){var parentId;this.row=row;this.tree=tree;this.settings=settings;this.id=this.row.data(this.settings.nodeIdAttr);parentId=this.row.data(this.settings.parentIdAttr);if(parentId!=null&&parentId!==""){this.parentId=parentId}
this.treeCell=$(this.row.children(this.settings.columnElType)[this.settings.column]);this.expander=$(this.settings.expanderTemplate);this.indenter=$(this.settings.indenterTemplate);this.children=[];this.initialized=!1;this.treeCell.prepend(this.indenter)}
Node.prototype.addChild=function(child){return this.children.push(child)};Node.prototype.ancestors=function(){var ancestors,node;node=this;ancestors=[];while(node=node.parentNode()){ancestors.push(node)}
return ancestors};Node.prototype.collapse=function(){if(this.collapsed()){return this}
this.row.removeClass("expanded").addClass("collapsed");this._hideChildren();this.expander.attr("title",this.settings.stringExpand);if(this.initialized&&this.settings.onNodeCollapse!=null){this.settings.onNodeCollapse.apply(this)}
return this};Node.prototype.collapsed=function(){return this.row.hasClass("collapsed")};Node.prototype.expand=function(){if(this.expanded()){return this}
this.row.removeClass("collapsed").addClass("expanded");if(this.initialized&&this.settings.onNodeExpand!=null){this.settings.onNodeExpand.apply(this)}
if($(this.row).is(":visible")){this._showChildren()}
this.expander.attr("title",this.settings.stringCollapse);return this};Node.prototype.expanded=function(){return this.row.hasClass("expanded")};Node.prototype.hide=function(){this._hideChildren();this.row.hide();return this};Node.prototype.isBranchNode=function(){if(this.children.length>0||this.row.data(this.settings.branchAttr)===!0){return!0}else{return!1}};Node.prototype.updateBranchLeafClass=function(){this.row.removeClass('branch');this.row.removeClass('leaf');this.row.addClass(this.isBranchNode()?'branch':'leaf')};Node.prototype.level=function(){return this.ancestors().length};Node.prototype.parentNode=function(){if(this.parentId!=null){return this.tree[this.parentId]}else{return null}};Node.prototype.removeChild=function(child){var i=$.inArray(child,this.children);return this.children.splice(i,1)};Node.prototype.render=function(){var handler,settings=this.settings,target;if(settings.expandable===!0&&this.isBranchNode()){handler=function(e){$(this).parents("table").treetable("node",$(this).parents("tr").data(settings.nodeIdAttr)).toggle();return e.preventDefault()};this.indenter.html(this.expander);target=settings.clickableNodeNames===!0?this.treeCell:this.expander;target.off("click.treetable").on("click.treetable",handler);target.off("keydown.treetable").on("keydown.treetable",function(e){if(e.keyCode==13){handler.apply(this,[e])}})}
this.indenter[0].style.paddingLeft=""+(this.level()*settings.indent)+"px";return this};Node.prototype.reveal=function(){if(this.parentId!=null){this.parentNode().reveal()}
return this.expand()};Node.prototype.setParent=function(node){if(this.parentId!=null){this.tree[this.parentId].removeChild(this)}
this.parentId=node.id;this.row.data(this.settings.parentIdAttr,node.id);return node.addChild(this)};Node.prototype.show=function(){if(!this.initialized){this._initialize()}
this.row.show();if(this.expanded()){this._showChildren()}
return this};Node.prototype.toggle=function(){if(this.expanded()){this.collapse()}else{this.expand()}
return this};Node.prototype._hideChildren=function(){var child,_i,_len,_ref,_results;_ref=this.children;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){child=_ref[_i];_results.push(child.hide())}
return _results};Node.prototype._initialize=function(){var settings=this.settings;this.render();if(settings.expandable===!0&&settings.initialState==="collapsed"){this.collapse()}else{this.expand()}
if(settings.onNodeInitialized!=null){settings.onNodeInitialized.apply(this)}
return this.initialized=!0};Node.prototype._showChildren=function(){var child,_i,_len,_ref,_results;_ref=this.children;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){child=_ref[_i];_results.push(child.show())}
return _results};return Node})();Tree=(function(){function Tree(table,settings){this.table=table;this.settings=settings;this.tree={};this.nodes=[];this.roots=[]}
Tree.prototype.collapseAll=function(){var node,_i,_len,_ref,_results;_ref=this.nodes;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){node=_ref[_i];_results.push(node.collapse())}
return _results};Tree.prototype.expandAll=function(){var node,_i,_len,_ref,_results;_ref=this.nodes;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){node=_ref[_i];_results.push(node.expand())}
return _results};Tree.prototype.findLastNode=function(node){if(node.children.length>0){return this.findLastNode(node.children[node.children.length-1])}else{return node}};Tree.prototype.loadRows=function(rows){var node,row,i;if(rows!=null){for(i=0;i<rows.length;i++){row=$(rows[i]);if(row.data(this.settings.nodeIdAttr)!=null){node=new Node(row,this.tree,this.settings);this.nodes.push(node);this.tree[node.id]=node;if(node.parentId!=null&&this.tree[node.parentId]){this.tree[node.parentId].addChild(node)}else{this.roots.push(node)}}}}
for(i=0;i<this.nodes.length;i++){node=this.nodes[i].updateBranchLeafClass()}
return this};Tree.prototype.move=function(node,destination){var nodeParent=node.parentNode();if(node!==destination&&destination.id!==node.parentId&&$.inArray(node,destination.ancestors())===-1){node.setParent(destination);this._moveRows(node,destination);if(node.parentNode().children.length===1){node.parentNode().render()}}
if(nodeParent){nodeParent.updateBranchLeafClass()}
if(node.parentNode()){node.parentNode().updateBranchLeafClass()}
node.updateBranchLeafClass();return this};Tree.prototype.removeNode=function(node){this.unloadBranch(node);node.row.remove();if(node.parentId!=null){node.parentNode().removeChild(node)}
delete this.tree[node.id];this.nodes.splice($.inArray(node,this.nodes),1);return this}
Tree.prototype.render=function(){var root,_i,_len,_ref;_ref=this.roots;for(_i=0,_len=_ref.length;_i<_len;_i++){root=_ref[_i];root.show()}
return this};Tree.prototype.sortBranch=function(node,sortFun){node.children.sort(sortFun);this._sortChildRows(node);return this};Tree.prototype.unloadBranch=function(node){var children=node.children.slice(0),i;for(i=0;i<children.length;i++){this.removeNode(children[i])}
node.children=[];node.updateBranchLeafClass();return this};Tree.prototype._moveRows=function(node,destination){var children=node.children,i;node.row.insertAfter(destination.row);node.render();for(i=children.length-1;i>=0;i--){this._moveRows(children[i],node)}};Tree.prototype._sortChildRows=function(parentNode){return this._moveRows(parentNode,parentNode)};return Tree})();methods={init:function(options,force){var settings;settings=$.extend({branchAttr:"ttBranch",clickableNodeNames:!1,column:0,columnElType:"td",expandable:!1,expanderTemplate:"<a href='#'>&nbsp;</a>",indent:19,indenterTemplate:"<span class='indenter'></span>",initialState:"collapsed",nodeIdAttr:"ttId",parentIdAttr:"ttParentId",stringExpand:"Expand",stringCollapse:"Collapse",onInitialized:null,onNodeCollapse:null,onNodeExpand:null,onNodeInitialized:null},options);return this.each(function(){var el=$(this),tree;if(force||el.data("treetable")===undefined){tree=new Tree(this,settings);tree.loadRows(this.rows).render();el.addClass("treetable").data("treetable",tree);if(settings.onInitialized!=null){settings.onInitialized.apply(tree)}}
return el})},destroy:function(){return this.each(function(){return $(this).removeData("treetable").removeClass("treetable")})},collapseAll:function(){this.data("treetable").collapseAll();return this},collapseNode:function(id){var node=this.data("treetable").tree[id];if(node){node.collapse()}else{throw new Error("Unknown node '"+id+"'")}
return this},expandAll:function(){this.data("treetable").expandAll();return this},expandNode:function(id){var node=this.data("treetable").tree[id];if(node){if(!node.initialized){node._initialize()}
node.expand()}else{throw new Error("Unknown node '"+id+"'")}
return this},loadBranch:function(node,rows){var settings=this.data("treetable").settings,tree=this.data("treetable").tree;rows=$(rows);if(node==null){this.append(rows)}else{var lastNode=this.data("treetable").findLastNode(node);rows.insertAfter(lastNode.row)}
this.data("treetable").loadRows(rows);rows.filter("tr").each(function(){tree[$(this).data(settings.nodeIdAttr)].show()});if(node!=null){node.render().expand()}
return this},move:function(nodeId,destinationId){var destination,node;node=this.data("treetable").tree[nodeId];destination=this.data("treetable").tree[destinationId];this.data("treetable").move(node,destination);return this},node:function(id){return this.data("treetable").tree[id]},removeNode:function(id){var node=this.data("treetable").tree[id];if(node){this.data("treetable").removeNode(node)}else{throw new Error("Unknown node '"+id+"'")}
return this},reveal:function(id){var node=this.data("treetable").tree[id];if(node){node.reveal()}else{throw new Error("Unknown node '"+id+"'")}
return this},sortBranch:function(node,columnOrFunction){var settings=this.data("treetable").settings,prepValue,sortFun;columnOrFunction=columnOrFunction||settings.column;sortFun=columnOrFunction;if($.isNumeric(columnOrFunction)){sortFun=function(a,b){var extractValue,valA,valB;extractValue=function(node){var val=node.row.find("td:eq("+columnOrFunction+")").text();return $.trim(val).toUpperCase()}
valA=extractValue(a);valB=extractValue(b);if(valA<valB)return-1;if(valA>valB)return 1;return 0}}
this.data("treetable").sortBranch(node,sortFun);return this},unloadBranch:function(node){this.data("treetable").unloadBranch(node);return this}};$.fn.treetable=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1))}else if(typeof method==='object'||!method){return methods.init.apply(this,arguments)}else{return $.error("Method "+method+" does not exist on jQuery.treetable")}};this.TreeTable||(this.TreeTable={});this.TreeTable.Node=Node;this.TreeTable.Tree=Tree})(jQuery);
/* rank:50standard - minify:ok. vendor_bundled/vendor/cwspear/bootstrap-hover-dropdown/bootstrap-hover-dropdown.js */
(function($,window,undefined){var $allDropdowns=$();$.fn.dropdownHover=function(options){if('ontouchstart' in document)return this;$allDropdowns=$allDropdowns.add(this.parent());return this.each(function(){var $this=$(this),$parent=$this.parent(),defaults={delay:500,hoverDelay:0,instantlyCloseOthers:!0},data={delay:$(this).data('delay'),hoverDelay:$(this).data('hover-delay'),instantlyCloseOthers:$(this).data('close-others')},showEvent='show.bs.dropdown',hideEvent='hide.bs.dropdown',settings=$.extend(!0,{},defaults,options,data),timeout,timeoutHover;$parent.hover(function(event){if(!$parent.hasClass('open')&&!$this.is(event.target)){return!0}
openDropdown(event)},function(){window.clearTimeout(timeoutHover)
timeout=window.setTimeout(function(){$this.attr('aria-expanded','false');$parent.removeClass('open');$this.trigger(hideEvent)},settings.delay)});$this.hover(function(event){if(!$parent.hasClass('open')&&!$parent.is(event.target)){return!0}
openDropdown(event)});$parent.find('.dropdown-submenu').each(function(){var $this=$(this);var subTimeout;$this.hover(function(){window.clearTimeout(subTimeout);$this.children('.dropdown-menu').show();$this.siblings().children('.dropdown-menu').hide()},function(){var $submenu=$this.children('.dropdown-menu');subTimeout=window.setTimeout(function(){$submenu.hide()},settings.delay)})});function openDropdown(event){if($this.parents(".navbar").find(".navbar-toggle").is(":visible")){return}
window.clearTimeout(timeout);window.clearTimeout(timeoutHover);timeoutHover=window.setTimeout(function(){$allDropdowns.find(':focus').blur();if(settings.instantlyCloseOthers===!0)
$allDropdowns.removeClass('open');window.clearTimeout(timeoutHover);$this.attr('aria-expanded','true');$parent.addClass('open');$this.trigger(showEvent)},settings.hoverDelay)}})};$(document).ready(function(){$('[data-hover="dropdown"]').dropdownHover()})})(jQuery,window);
/* rank:50standard - minify:ok. lib/jquery_tiki/files.js */
(function($){var handleFiles,ProgressBar,FileList,FileListInline;$.fileTypeIcon=function(fileId,file){if(file.type.substring(0,6)=='image/'){return $('<img src="tiki-download_file.php?fileId='+fileId+'&display&height=24" height="24">')}else if(file.type=='application/pdf'){return $('<img height="16" width="16" title="application/pdf" alt="application/pdf" src="img/icons/mime/pdf.png">')}else if(file.type.indexOf("sheet")!=-1){return $('<img height="16" width="16" title="'+file.type+'" alt="'+file.type+'" src="img/icons/mime/xls.png">')}else if(file.type.indexOf("zip")!=-1){return $('<img height="16" width="16" title="'+file.type+'" alt="'+file.type+'" src="img/icons/mime/zip.png">')}else if(file.type.substring(0,6)=='video/'){return $('<img height="16" width="16" title="'+file.type+'" alt="'+file.type+'" src="img/icons/mime/flv.png">')}else if(file.type.indexOf("word")!=-1){return $('<img height="16" width="16" title="'+file.type+'" alt="'+file.type+'" src="img/icons/mime/doc.png">')}else{return $('<img height="16" width="16" title="'+file.type+'" alt="'+file.type+'" src="img/icons/mime/default.png">')}};ProgressBar=function(options){var bar=this;this.segments=[];this.updateSegment=function(number,current,total){bar.segments[number]=[current,total];bar.update()};this.update=function(){var total=0,current=0;$.each(bar.segments,function(k,item){current+=item[0];total+=item[1]});options.progress(current,total);if(current===total){options.done()}}};FileList=function(options){var $list=$(options.list);this.clearErrors=function(){$list.find('.text-danger').remove()};this.addError=function(file){var $li=$('<li>').appendTo($list);$li.text(file.name);$li.addClass('text-danger');$li.append(' ('+tr('uploading failed')+')')};this.addFile=function(fileId,file){var $li=$('<li>').appendTo($list);$li.text(file.name).prepend($.fileTypeIcon(fileId,file));$('<input type="hidden" name="file[]">').attr('value',fileId).appendTo($li)}};FileListInline=function(options){var $list=$(options.list),$form=$(options.form),$files=[];this.clearErrors=function(){$list.find('.text-danger').remove()};this.addError=function(file){var $li=$('<li>').appendTo($form);$li.text(file.name);$li.addClass('text-danger');$li.append(' ('+tr('uploading failed')+')')};this.success=function(data){$form.trigger('submit',[{files:$files}])};this.addFile=function(fileId,file){file.fileId=fileId;$files.push(file);var action=$form.attr('data-action');$.ajax(action,{type:'POST',dataType:'json',data:{files:[fileId]},success:this.success})}};handleFiles=function(input){var files=input.files,accept=input.accept,galleryId=input.galleryId,image_max_size_x=input.image_max_size_x,image_max_size_y=input.image_max_size_y,progressBar=input.progress,fileList=input.list;var uploadUrl=$.service('file','upload');var restoreExif=function(sourceImageData,newImageData){if(!sourceImageData.startsWith('data:image/jpeg;base64,')){return newImageData}
var sourceImageSegments=MinifyJpeg.slice2Segments(MinifyJpeg.decode64(sourceImageData.replace("data:image/jpeg;base64,","")));var exifInfo=MinifyJpeg.getExif(sourceImageSegments);var newImageBinArray=MinifyJpeg.insertExif(newImageData,exifInfo);return "data:image/jpeg;base64,"+MinifyJpeg.encode64(newImageBinArray)};$.each(files,function(k,file){var reader=new FileReader();progressBar.updateSegment(k,0,file.size);window.lastFile=file;$(window).queue('process-upload',function(){reader.onloadend=function(e){var xhr,provider,sendData,data,valid=!0;xhr=jQuery.ajaxSettings.xhr();if(xhr.upload){xhr.upload.addEventListener('progress',function(e){if(e.lengthComputable){progressBar.updateSegment(k,e.loaded,e.total)}},!1)}
provider=function(){return xhr};sendData={type:'POST',url:uploadUrl,xhr:provider,dataType:'json',success:function(data){var fileId=data.fileId;fileList.addFile(data.fileId,file)},error:function(jqxhr){progressBar.updateSegment(k,0,0);fileList.addError(file)},complete:function(){$(window).dequeue('process-upload')}};if(window.FormData){sendData.processData=!1;sendData.contentType=!1;sendData.cache=!1;sendData.data=new FormData;sendData.data.append('galleryId',galleryId);sendData.data.append('image_max_size_x',image_max_size_x);sendData.data.append('image_max_size_y',image_max_size_y);sendData.data.append('name',file.name);var waiting=!1;if(file.type.substring(0,6)=='image/'&&(image_max_size_x!=''||image_max_size_y!='')){waiting=!0;var imageData;var picFile=e.target;imageData=picFile.result;var img=new Image();var blobImage=null;img.src=imageData;img.onload=function(){var width=parseInt(image_max_size_x);var height=parseInt(image_max_size_y);var image_x=parseInt(image_max_size_x);var image_y=parseInt(image_max_size_y);if(img.width>image_x||img.height>image_y){if(img.width>image_x){width=image_x;var ration=image_x/img.width;height=Math.round(img.height*ration)}
if(height>image_y){height=image_y;var ration=image_y/img.height;width=Math.round(img.width*ration)}}
else{width=img.width;height=img.height}
var canvas=$("<canvas/>").get(0);canvas.width=width;canvas.height=height;var context=canvas.getContext('2d');context.drawImage(img,0,0,width,height);var resizedImage=restoreExif(imageData,canvas.toDataURL('image/jpeg'));blobImage=dataURItoBlob(resizedImage);sendData.data.append('data',blobImage,file.name);$.ajax(sendData)}}
else sendData.data.append('data',file)}else{data=e.target.result;sendData.data={name:file.name,size:file.size,type:file.type,data:data.substr(data.indexOf('base64')+7),galleryId:galleryId,image_max_size_x:image_max_size_x,image_max_size_y:image_max_size_y}}
if(accept){valid=file.type.match(new RegExp(".?("+accept.replace('*','.*')+")$","i"))}
if(valid&&!waiting){$.ajax(sendData)}else if(!valid){sendData.error(null)}};reader.readAsDataURL(file)})});$(window).dequeue('process-upload')};$(document).on('submit','form.file-uploader',function(e){e.preventDefault()});function doUpload($form,files){var progress,list;progress=new ProgressBar({progress:function(current,total){var percentage=Math.round(current/total*100);$form.find('.progress').removeClass('hidden');$form.find('.progress-bar').attr('aria-valuenow',percentage).width(percentage+'%');$form.find('.progress-bar .sr-only .count').text(percentage)},done:function(){$form.find('.progress').addClass('hidden');$form.find('.progress-bar').attr('aria-valuenow',0).width('0%');$form.find('.progress-bar .sr-only .count').text('0%')}});if($form.is(".inline")){list=new FileListInline({list:$form.parent().find('.file-uploader-result ul')[0],form:$form})}else{list=new FileList({list:$form.parent().find('.file-uploader-result ul')[0]})}
list.clearErrors();handleFiles({accept:$form.find(':file').attr('accept'),galleryId:$form.data('gallery-id'),image_max_size_x:$form.data('image_max_size_x'),image_max_size_y:$form.data('image_max_size_y'),files:files,progress:progress,list:list})}
$(document).on('change','.file-uploader input[type=file]',function(){var $clone,$form=$(this).closest('.file-uploader'),progress,list;if(this.files){doUpload($form,this.files);$(this).val('');$clone=$(this).clone(!0);$(this).replaceWith($clone)}});if(window.FileReader){$(document).ready(function(){$('.drop-message').show()});$(document).on('dragenter','.file-uploader',function(e){e.preventDefault();e.stopPropagation();$(this).css('border','2px dashed gray');return!1});$(document).on('dragexit','.file-uploader',function(e){e.preventDefault();e.stopPropagation();$(this).css('border','');return!1});$(document).on('dragover','.file-uploader',function(e){e.preventDefault();e.stopPropagation();return!1});$(document).on('drop','.file-uploader',function(e){var $form=$(this);e.preventDefault();e.stopPropagation();$(this).css('border','');var dataTransfer=e.dataTransfer;if(!dataTransfer){dataTransfer=e.originalEvent.dataTransfer}
if(dataTransfer&&dataTransfer.files){doUpload($form,dataTransfer.files)}
return!1})}
function browserRemoveFile(link)
{var list=$(link).closest('ul');$(link).closest('li').remove();list.closest('.file-browser').trigger('selection-update')}
function browserAddFile(link)
{var content=$(link).closest('.media-body').clone(!0),icon=$(link).closest('.media, .panel').find('.media-object, .panel-body a').children('img').clone(!0).width('16px'),nav=$(link).closest('.file-browser').find('.selection ul'),item=$('<li>'),a=$('<a>').text($(link).text()),id=$(link).data('object'),limit=nav.closest('form').data('limit'),current=nav.find('input[type=hidden]').filter(function(){return parseInt($(this).val(),10)===id});if(current.length>0){browserRemoveFile(current[0]);return}
if(limit===1){nav.empty()}else if(nav.children('li').length>=limit){alert(nav.closest('form').data('limit-reached-message'));return}
a.prepend(' ').prepend(icon);item.append(a);nav.append(item);item.append($('<input type="hidden" name="file[]">').attr('value',id));nav.closest('.file-browser').trigger('selection-update')}
$(document).on('selection-update','.file-browser',function(e){var selection=$('.selection input[type=hidden]',this).map(function(){return parseInt($(this).val(),10)});$('.gallery-list .media-heading a, .gallery-list .panel-body a',this).each(function(){var id=$(this).data('object');$(this).closest('.media').toggleClass('bg-info',-1!==$.inArray(id,selection));$(this).closest('.panel').toggleClass('panel-info',-1!==$.inArray(id,selection))});$('.selection',this).toggleClass('hidden',selection.length===0)});$(document).on('click','.file-browser .gallery-list .pagination a',function(e){e.preventDefault();$(this).closest('.modal').animate({scrollTop:0},'slow');$(this).closest('.gallery-list').tikiModal(tr('Loading...')).load($(this).attr('href'),function(){$(this).tikiModal('');$(this).closest('.file-browser').trigger('selection-update')})});$(document).on('click','.file-browser .gallery-list .media-heading a, .file-browser .gallery-list .panel-body a',function(e){e.preventDefault();e.stopPropagation();browserAddFile(this)});$(document).on('click','.file-browser .gallery-list .media, .file-browser .gallery-list .panel',function(e){e.preventDefault();$('.media-heading a, .panel-body a',this).click()});$(document).on('click','.file-browser .selection a',function(e){e.preventDefault();browserRemoveFile(this)});$(document).on('submit','.file-browser .form-inline',function(e){e.preventDefault();$(this).closest('.file-browser').find('.gallery-list').tikiModal(tr('Loading...')).load($(this).attr('action'),$(this).serialize(),function(){$(this).tikiModal('');$(this).closest('.file-browser').trigger('selection-update')})});$(document).on('click','.file-browser .submit .upload-files',function(e){var $list=$(this).closest('.file-browser').find('.selection ul'),handler=$.clickModal({success:function(data){$.each(data.files,function(k,file){$('<li>').append($('<a href="#">').data('object',file.fileId).data('type','file').text(file.label)).append($('<input type="hidden" name="file[]">').attr('value',file.fileId)).appendTo($list);$list.closest('.file-browser').trigger('selection-update')});$.closeModal()}});handler.apply(this,arguments)});$(document).on('click','.file-selector a',function(){if(!$(this).data('initial-href')){$(this).data('initial-href',$(this).attr('href'))}
$(this).attr('href',$(this).data('initial-href')+'&file='+$(this).parent().children('input').val())});$(document).on('click','.file-selector a',$.clickModal({size:'modal-lg',success:function(data){var files=[];$.each(data.files,function(k,f){files.push(f.fileId)});$(this).parent().children('input').val(files.join(','));$(this).text($(this).text().replace(/\d+/,files.length));$.closeModal()}}))})(jQuery);function resizeFile(e,imageData,image_x,image_y){return blobImage}
function dataURItoBlob(dataURI){var byteString;if(dataURI.split(',')[0].indexOf('base64')>=0)
byteString=atob(dataURI.split(',')[1]);else byteString=unescape(dataURI.split(',')[1]);var mimeString=dataURI.split(',')[0].split(':')[1].split(';')[0];var ia=new Uint8Array(byteString.length);for(var i=0;i<byteString.length;i++){ia[i]=byteString.charCodeAt(i)}
return new Blob([ia],{type:'image/jpeg'})}
var MinifyJpeg=(function()
{var that={};that.KEY_STR="ABCDEFGHIJKLMNOP"+"QRSTUVWXYZabcdef"+"ghijklmnopqrstuv"+"wxyz0123456789+/"+"=";that.SOF=[192,193,194,195,197,198,199,201,202,203,205,206,207];that.minify=function(image,new_size)
{if(image instanceof ArrayBuffer)
{if(image[0]==255&&image[1]==216)
{var rawImage=[];for(var i=0;i<image.byteLength;i++)
{rawImage[i]=image[i]}}
else{throw "MinifyJpeg.minify got a not JPEG data"}}
else if(typeof(image)=="string")
{if(!image.match("data:image/jpeg;base64,"))
{throw "MinifyJpeg.minify got a not JPEG data"}
else{var rawImage=that.decode64(image.replace("data:image/jpeg;base64,",""))}}
else{throw "First argument must be 'DataURL string' or ArrayBuffer."}
var segments=that.slice2Segments(rawImage);var NEW_SIZE=parseInt(new_size);var size=that.imageSizeFromSegments(segments);var chouhen=(size[0]>=size[1])?size[0]:size[1];if(chouhen<NEW_SIZE)
{return new Uint8Array(rawImage)}
var exif=that.getExif(segments);var resized=that.resizeImage(rawImage,segments,NEW_SIZE);if(exif.length)
{var newImage=that.insertExif(resized,exif)}
else{var newImage=new Uint8Array(that.decode64(resized.replace("data:image/jpeg;base64,","")))}
return newImage};that.getImageSize=function(imageArray)
{var segments=that.slice2Segments(imageArray);return that.imageSizeFromSegments(segments)};that.slice2Segments=function(rawImageArray)
{var head=0,segments=[];while(1)
{if(rawImageArray[head]==255&rawImageArray[head+1]==218)
{break}
if(rawImageArray[head]==255&rawImageArray[head+1]==216)
{head+=2}
else{var length=rawImageArray[head+2]*256+rawImageArray[head+3],endPoint=head+length+2,seg=rawImageArray.slice(head,endPoint);segments.push(seg);head=endPoint}
if(head>rawImageArray.length)
{break}}
return segments};that.imageSizeFromSegments=function(segments)
{for(var x=0;x<segments.length;x++)
{var seg=segments[x];if(that.SOF.indexOf(seg[1])>=0)
{var height=seg[5]*256+seg[6],width=seg[7]*256+seg[8];break}}
return[width,height]};that.encode64=function(input)
{var output="",chr1,chr2,chr3="",enc1,enc2,enc3,enc4="",i=0;do{chr1=input[i++];chr2=input[i++];chr3=input[i++];enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64}else if(isNaN(chr3)){enc4=64}
output+=that.KEY_STR.charAt(enc1)+that.KEY_STR.charAt(enc2)+that.KEY_STR.charAt(enc3)+that.KEY_STR.charAt(enc4);chr1=chr2=chr3="";enc1=enc2=enc3=enc4=""}while(i<input.length);return output};that.decode64=function(input){var output="",chr1,chr2,chr3="",enc1,enc2,enc3,enc4="",i=0,buf=[];var base64test=/[^A-Za-z0-9\+\/\=]/g;if(base64test.exec(input)){alert("There were invalid base64 characters in the input text.\n"+"Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\n"+"Expect errors in decoding.")}
input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=that.KEY_STR.indexOf(input.charAt(i++));enc2=that.KEY_STR.indexOf(input.charAt(i++));enc3=that.KEY_STR.indexOf(input.charAt(i++));enc4=that.KEY_STR.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;buf.push(chr1);if(enc3!=64){buf.push(chr2)}
if(enc4!=64){buf.push(chr3)}
chr1=chr2=chr3="";enc1=enc2=enc3=enc4=""}while(i<input.length);return buf};that.resizeImage=function(rawImage,segments,NEW_SIZE)
{var size=that.imageSizeFromSegments(segments),width=size[0],height=size[1],chouhen=(width>=height)?width:height,newSize=NEW_SIZE,resizing=1,scale=parseFloat(newSize)/chouhen,newWidth=parseInt(parseFloat(newSize)/chouhen*width),newHeight=parseInt(parseFloat(newSize)/chouhen*height);if(resizing==1)
{var canvas=document.createElement('canvas');canvas.width=width;canvas.height=height;var jpe=new JpegImage(),ctx=canvas.getContext("2d"),srcImg=ctx.getImageData(0,0,width,height);jpe.parse(new Uint8Array(rawImage));jpe.copyToImageData(srcImg);var newCanvas=document.createElement('canvas');newCanvas.width=newWidth;newCanvas.height=newHeight;var newCtx=newCanvas.getContext("2d");var destImg=newCtx.createImageData(newWidth,newHeight);that.bilinear(srcImg,destImg,scale);newCtx.putImageData(destImg,0,0);var resizedImage=newCanvas.toDataURL("image/jpeg")}
else{var canvas=document.createElement('canvas');canvas.width=newWidth;canvas.height=newHeight;var jpe=new JpegImage();ctx=canvas.getContext("2d");d=ctx.getImageData(0,0,newWidth,newHeight);jpe.parse(new Uint8Array(rawImage));jpe.copyToImageData(d);ctx.putImageData(d,0,0);var resizedImage=canvas.toDataURL("image/jpeg")}
return resizedImage};that.getExif=function(segments)
{var seg;for(var x=0;x<segments.length;x++)
{seg=segments[x];if(seg[0]==255&seg[1]==225)
{return seg}}
return[]}
that.insertExif=function(imageStr,exifArray)
{var buf=that.decode64(imageStr.replace("data:image/jpeg;base64,","")),separatePoint=buf.indexOf(255,3),mae=buf.slice(0,separatePoint),ato=buf.slice(separatePoint),array=mae.concat(exifArray,ato);aBuffer=new Uint8Array(array);return aBuffer};that.ivect=function(ix,iy,w){return((ix+w*iy)*4)};that.bilinear=function(srcImg,destImg,scale){function inner(f00,f10,f01,f11,x,y){var un_x=1.0-x;var un_y=1.0-y;return(f00*un_x*un_y+f10*x*un_y+f01*un_x*y+f11*x*y)}
var srcWidth=srcImg.width;var srcHeight=srcImg.height;var srcData=srcImg.data;var dstData=destImg.data;var i,j;var iyv,iy0,iy1,ixv,ix0,ix1;var idxD,idxS00,idxS10,idxS01,idxS11;var dx,dy;var r,g,b,a;for(i=0;i<destImg.height;++i){iyv=(i+0.5)/scale-0.5;iy0=Math.floor(iyv);iy1=(Math.ceil(iyv)>(srcHeight-1)?(srcHeight-1):Math.ceil(iyv));for(j=0;j<destImg.width;++j){ixv=(j+0.5)/scale-0.5;ix0=Math.floor(ixv);ix1=(Math.ceil(ixv)>(srcWidth-1)?(srcWidth-1):Math.ceil(ixv));idxD=that.ivect(j,i,destImg.width);idxS00=that.ivect(ix0,iy0,srcWidth);idxS10=that.ivect(ix1,iy0,srcWidth);idxS01=that.ivect(ix0,iy1,srcWidth);idxS11=that.ivect(ix1,iy1,srcWidth);dx=ixv-ix0;dy=iyv-iy0;dstData[idxD]=inner(srcData[idxS00],srcData[idxS10],srcData[idxS01],srcData[idxS11],dx,dy);dstData[idxD+1]=inner(srcData[idxS00+1],srcData[idxS10+1],srcData[idxS01+1],srcData[idxS11+1],dx,dy);dstData[idxD+2]=inner(srcData[idxS00+2],srcData[idxS10+2],srcData[idxS01+2],srcData[idxS11+2],dx,dy);dstData[idxD+3]=inner(srcData[idxS00+3],srcData[idxS10+3],srcData[idxS01+3],srcData[idxS11+3],dx,dy)}}};return that})();
/* rank:50standard - minify:ok. lib/jquery_tiki/tiki-trackers.js */
(function($){$.fn=$.extend($.fn,{tracker_add_field:function(options){var dialog=this;$('select',dialog).change(function(){var descriptions=$(this).closest('.form-group').find('.help-block').hide();if($(this).val()){descriptions.filter('.'+$(this).val()).show()}}).change();$('form',dialog).each(function(){var form=this;$(form.name).keyup(function(){var val=$("#fieldPrefix").val()+" "+$(this).val();val=removeDiacritics(val);val=val.replace(/[^\w]+/g,'_');val=val.replace(/_+([a-zA-Z])/g,function(parts){return parts[1].toUpperCase()});val=val.replace(/^[A-Z]/,function(parts){return parts[0].toLowerCase()});val=val.replace(/_+$/,'');$(form.permName).val(val)});$(form.submit_and_edit).click(function(){$(form.next).val('edit')})})},tracker_edit_field:function(options){this.serviceDialog({title:tr('Edit Field'),data:{controller:'tracker',action:'edit_field',trackerId:options.trackerId,fieldId:options.fieldId},load:function(){function split(val){return val.split(/,\s*/)}
function extractLast(term){return split(term).pop()}
$('.groupselector',this).tiki('autocomplete','groupname',{tiki_replace_term:function(term){return extractLast(term)},focus:function(){return!1},select:function(event,ui){var terms=split(this.value);terms.pop();terms.push(ui.item.value);terms.push("");this.value=terms.join(", ");return!1}})},success:options.success});return this},tracker_load_fields:function(trackerId){this.each(function(){var $container=$(this).empty();$.getJSON($.service('tracker','list_fields'),{trackerId:trackerId},function(data){$.each(data.fields,function(k,field){var $row=$('<tr/>').addClass("tracker-field-"+field.type);$row.append($('<td class="checkbox-cell"/>').append($('<input type="checkbox" name="fields[]"/>').val(field.fieldId)));$row.append($('<td class="id"/>').text(field.fieldId).append($('<input type="hidden" name="field~'+field.fieldId+'~position"/>').val(field.position)));$row.append($('<td/>').append($('<div class="small">').text(field.permName)).prepend($('<a/>').text(field.name==null?" ":field.name).attr('href',$.service('tracker','edit_field',{trackerId:trackerId,fieldId:field.fieldId})).clickModal({remote:$.service('controller','edit_field',{trackerId:trackerId,fieldId:field.fieldId}),success:function(){$container.tracker_load_fields(trackerId);$.closeModal()}})));if(data.types[field.type]){$row.append($('<td/>').text(data.types[field.type].name));var addCheckbox=function(name,title){$row.append($('<td class="checkbox-cell"/>').append($('<input type="checkbox" name="field~'+field.fieldId+'~'+name+'" value="1" title="'+title+'"/>').prop('checked',field[name]==='y')))};addCheckbox('isTblVisible',tr('List'));addCheckbox('isMain',tr('Main'));addCheckbox('isSearchable',tr('Searchable'));addCheckbox('isPublic',tr('Public'));addCheckbox('isMandatory',tr('Mandatory'));$row.append($('<td class="action"/>').append($('<a href="#" class="text-danger"><span class="icon fa fa-remove"/></a>').attr('href',$.service('tracker','remove_fields',{trackerId:trackerId,'fields~0':field.fieldId})).requireConfirm({message:tr('Removing the field will result in data loss. Are you sure?'),success:function(data){$(this).closest('tr').remove()}})))}else if(data.typesDisabled){if(data.typesDisabled[field.type]){$row.find('td:last').append(' - <a class="ui-state-error" href="tiki-admin.php?lm_criteria='+data.typesDisabled[field.type].prefs.join('+')+'&exact">'+tr('(Disabled, Click to Enable)')+'</a>')}}
$container.append($row);if(data.duplicates&&data.duplicates[field.fieldId]){$.each(data.duplicates[field.fieldId],function(k,v){$row=$('<tr class="bg-warning"/>');$row.append($('<td colspan="2"/>'));$row.append($('<td colspan="8"/>').append(v.message));$container.append($row)})}})})});return this},tracker_get_inputs_from_form:function(){var fields={};$.each($(this).serializeArray(),function(){fields[this.name]=this.value});return fields},tracker_insert_item:function(options,fn){options.fields=$(this).tracker_get_inputs_from_form();$.tracker_insert_item(options,fn);return this},tracker_remove_item:function(options,fn){$.tracker_remove_item(options,fn);return this},tracker_update_item:function(options,fn){options.fields=$(this).tracker_get_inputs_from_form();$.tracker_update_item(options,fn);return this},tracker_get_item_inputs:function(options,fn){$.tracker_get_item_inputs(options,fn);return this}});$=$.extend($,{tracker_insert_item:function(options,fn){options=$.extend({controller:'tracker',action:'insert_item',trackerId:0,trackerName:'',itemId:0,byName:!1,fields:{}},options);$.ajax({url:'tiki-ajax_services.php',dataType:'json',data:options,type:'post',success:(fn?fn:null)})},tracker_remove_item:function(options,fn){options=$.extend({controller:'tracker',action:'remove_item',trackerId:0,trackerName:'',itemId:0,byName:!1},options);$.ajax({url:'tiki-ajax_services.php',dataType:'json',data:options,type:'post',success:(fn?fn:null)})},tracker_update_item:function(options,fn){options=$.extend({controller:'tracker',action:'update_item',trackerId:0,trackerName:'',itemId:0,byName:!1,fields:{}},options);$.ajax({url:'tiki-ajax_services.php',dataType:'json',data:options,type:'post',success:(fn?fn:null)})},tracker_get_item_inputs:function(options,fn){options=$.extend({controller:'tracker',action:'get_item_inputs',trackerId:0,trackerName:'',itemId:0,byName:!1,defaults:{}},options);$.ajax({url:'tiki-ajax_services.php',dataType:'json',data:options,type:'post',success:(fn?fn:null)})}});$(document).on('mouseenter','.edit-tabular tbody:not(.ui-sortable) .icon-sort',function(){$(this).closest('tbody').filter(':not(.ui-sortable)').sortable({handle:'.icon-sort',stop:function(){$(this).closest('table').trigger('tabular-update')}})});$(document).on('change','.edit-tabular .selection',function(){var value=$(this).val(),$add=$(this).closest('table').find('.add-field, .add-filter');if(!$add.data('original-href')){$add.data('original-href',$add.attr('href'))}
$add.attr('href',$add.data('original-href')+'&permName='+value)});$(document).on('click','.edit-tabular .add-field',$.clickModal({success:function(data){var $row;if(typeof data.columnIndex!=="undefined"){$row=$(this).closest('table').find("tbody tr:not(.hidden):eq("+data.columnIndex+")")}else{$row=$(this).closest('table').find('tbody tr.hidden').clone().removeClass('hidden').appendTo($(this).closest('table').find('tbody'))}
$('.field-label',$row[0]).val(data.label);$('.field',$row[0]).text(data.field);$('.mode',$row[0]).text(data.mode);$('.read-only',$row[0]).prop('checked',data.isReadOnly);$('.export-only',$row[0]).prop('checked',data.isExportOnly);$(this).closest('table').trigger('tabular-update');$.closeModal()}}));$(document).on('click','.edit-tabular .add-filter',$.clickModal({success:function(data){var $row=$(this).closest('table').find('tbody tr.hidden').clone().removeClass('hidden').appendTo($(this).closest('table').find('tbody'));$('.filter-label',$row[0]).val(data.label);$('.field',$row[0]).text(data.field);$('.mode',$row[0]).text(data.mode);$(this).closest('table').trigger('tabular-update');$.closeModal()}}));$(document).on('click','.edit-tabular .align-option',function(e){e.preventDefault();var hash=this.href.substring(this.href.lastIndexOf('#')+1);$(this).closest('tr').find('.align').text($(this).text()).end().find('.display-align').val(hash).end();$(this).closest('table').trigger('tabular-update')});$(document).on('click','.edit-tabular .position-option',function(e){e.preventDefault();var hash=this.href.substring(this.href.lastIndexOf('#')+1);$(this).closest('tr').find('.position-label').text($(this).text()).end().find('.position').val(hash).end();$(this).closest('table').trigger('tabular-update')});$(document).on('click','.edit-tabular .remove',function(e){var $table=$(this).closest('table');e.preventDefault();$(this).closest('tr').remove();$table.trigger('tabular-update')});$(document).on('change','.edit-tabular table :input',function(e){$(this).closest('table').trigger('tabular-update')});$(document).on('tabular-update','.edit-tabular table.fields',function(){var data=[],count=0;$('tbody tr:not(.hidden)',this).each(function(){var $link=$(this).find("a.add-field");if($link.length){$link.attr("href",$link.attr("href").replace(/columnIndex=\d+/,"columnIndex="+count));count++}
data.push({label:$('.field-label',this).val(),field:$('.field',this).text(),mode:$('.mode',this).text(),displayAlign:$('.display-align',this).val(),isReadOnly:$('.read-only',this).is(':checked'),isExportOnly:$('.export-only',this).is(':checked'),isPrimary:$('.primary',this).is(':checked')})});$('textarea',this).val(JSON.stringify(data))});$(document).on('tabular-update','.edit-tabular table.filters',function(){var data=[];$('tbody tr:not(.hidden)',this).each(function(){data.push({label:$('.field-label',this).val(),field:$('.field',this).text(),mode:$('.mode',this).text(),position:$('.position',this).val()})});$('textarea',this).val(JSON.stringify(data))})}(jQuery));
/* rank:50standard - minify:ok. lib/jquery_tiki/inline_edit.js */
(function($){var executors={},obtainExecutor;obtainExecutor=function(container,delay){var url=$.serviceUrl($(container).data('object-store-url'));if(executors[url]){return executors[url]}
return executors[url]=delayedExecutor(delay||5000,function(cancelled){if(cancelled){return}
var parts=[];var containers=[];$('.editable-inline.modified :input, .editable-dialog.modified :input').each(function(){var container=$(this).closest('.editable-inline, .editable-dialog')[0];var ownership=$.serviceUrl($(container).data('object-store-url'));if(ownership===url){parts.push($(this).serialize());if(-1===containers.indexOf(container)){containers.push(container)}}});$(containers).each(function(){$(this).tikiModal($(this).width()>30?tr("Saving..."):" ")});$.post(url,parts.join('&'),'json').success(function(){$(containers).removeClass('modified').removeClass('unsaved').trigger('changed.inline.tiki').trigger('saved.tiki').filter(function(){return $(this).data('field-fetch-url')}).each(function(){var $this=$(this),obj=$.extend($(this).data('field-fetch-url'),{mode:"output"});$.get($.serviceUrl(obj)).success(function(data){$this.removeClass("loaded").tikiModal().html($.trim(data.replace("<!DOCTYPE html>",""))).attr("title",$(this).data("saved_title")||"").removeData("saved_title");if($this.data('saved_overflow')){$this.closest('td').css('overflow',$this.data('saved_overflow'))}})})}).error(function(){$(containers).filter('.modified').addClass('unsaved').trigger('changed.inline.tiki');$.getJSON($.service('object','report_error'))})})};$(document).on('click','.editable-inline:not(.loaded)',function(e){if($(e.target).is("a")){return!0}
var container=this,url=$.serviceUrl($(this).data('field-fetch-url')),overflow=$(container).closest('td').css('overflow');$(container).addClass('loaded').data("saved_html",$(container).parent().html()).data("saved_text",$(container).text()).data("saved_overflow",overflow).closest('td').css('overflow','visible');if($(container).data('group')){$('.editable-inline:not(.loaded)').filter(function(){return $(this).data('group')==$(container).data('group')}).not(container).click()}
if(url){url=url.replace(/mode=output/,"mode=input");$.get(url).success(function(data){var w=$(container).parent().width();$(container).html(data);$("input, select",container).each(function(){$(this).keydown(function(e){if(e.which===13){$(this).blur();return!1}else if(e.which===9){$(this).blur();if(e.shiftKey){$(this).parents("td:first").prev().find(".editable-inline:first").click()}else{$(this).parents("td:first").next().find(".editable-inline:first").click()}
return!1}else if(e.which===27){$(this).off('change');var url=$.serviceUrl($(container).data('object-store-url'));var executor=executors[url];executor.apply(document,[!0]);$(container).parent().html($(container).data("saved_html")).find(".editable-inline:first").removeClass("loaded");if($(container).data('saved_overflow')){$(container).closest('td').css('overflow',$(container).data('saved_overflow'))}}else{return!0}}).width(Math.min($(this).width(),w));$(this).focus()});var $select=$("select",container).css("width","auto");if(jqueryTiki.chosen){if($select.length){$select.tiki("chosen")}}
var $radios=$("input[type=radio]",container);if($radios.length){var itemId=$(container).data("field-fetch-url").itemId;$radios.each(function(){$(this).attr("name",$(this).attr("name")+"~item"+itemId)})}}).error(function(){$(container).addClass('failure')})}});$(document).on('change','.editable-inline.loaded :input:not(.isDatepicker)',function(){var container,executor;container=$(this).closest('.editable-inline')[0];executor=obtainExecutor(container);$(container).data("saved_title",$(container).attr("title")).attr("title",tr("Queued for saving")).addClass('modified').trigger('changed.inline.tiki');executor()});$(document).on('click','.editable-dialog:not(.loaded)',function(){var container=this,fields={};$('.editable-dialog:not(.loaded)').filter(function(){return $(this).data('group')==$(container).data('group')}).each(function(k){fields['fields['+k+'][label]']=$(this).data('label');fields['fields['+k+'][fetch]']=$(this).data('field-fetch-url');fields['fields['+k+'][store]']=$(this).data('object-store-url')});$('#bootstrap-modal').modal('show');$('#bootstrap-modal .modal-content').load($.service('edit','inline_dialog',{modal:1}),fields,function(){$('#bootstrap-modal').trigger('tiki.modal.redraw')})});$(document).on('submit','.inline-edit-dialog',function(e){e.preventDefault();var reload=delayedExecutor(500,function(){document.location.reload()});$('#boostrap-modal').tikiModal(tr('Loading...'));$('.editable-dialog.loaded',this).addClass('modified').one('saved.tiki',function(){if($('.editable-dialog.loaded.modified',this).size()===0){reload()}}).each(function(){var executor=obtainExecutor(this,100);executor()})});$(function(){if(jqueryTiki.ui){$('.inline-sort-handle').next().children().on('changed.inline.tiki',function(){$(this).parent().prev().toggleClass('text-warning',$(this).hasClass('modified')).toggleClass('text-danger',$(this).hasClass('unsaved'))}).closest('tbody, ul, ol').each(function(){var $list=$('.inline-sort-handle',this);var first=$list.eq(0).data('current-value')||1;var second=$list.eq(1).data('current-value')||2;this.first=first;this.increment=(second-first)||1}).sortable({handle:'.inline-sort-handle',stop:function(){var first=this.first,increment=this.increment;$('.inline-sort-handle',this).next().find(':input:first').each(function(position){var val=$(this).val(),target=first+position*increment;if(val!=target){$(this).val(target).change()}})}})}})})(jQuery);
/* rank:50standard - minify:ok. lib/jquery_tiki/pluginedit.js */
(function($){window.popupPluginForm=function(area_id,type,index,pageName,pluginArgs,bodyContent,edit_icon,selectedMod){var $textArea=$("#"+area_id);if($textArea.length&&$textArea[0].createTextRange){storeTASelection(area_id)}
var container=$('<div class="plugin"></div>');if(!index){index=0}
if(!pageName){pageName=''}
var textarea=$textArea[0];var replaceText=!1;if(!pluginArgs&&!bodyContent){pluginArgs={};bodyContent="";dialogSelectElement(area_id,'{'+type.toUpperCase(),'{'+type.toUpperCase()+'}');var sel=getTASelection(textarea);if(sel&&sel.length>0){sel=sel.replace(/^\s\s*/,"").replace(/\s\s*$/g,"");if(sel.length>0&&sel.substring(0,1)==='{'){var l=type.length,thisType=sel.match(/\{(\w+)/);thisType=thisType[1].toUpperCase();if(thisType===type.toUpperCase()){var rx=new RegExp("{"+type+"[\\(]?([\\s\\S^\\)]*?)[\\)]?}([\\s\\S]*){"+type+"}","mi");var m=sel.match(rx);if(!m){rx=new RegExp("{"+type+"[\\(]?([\\s\\S^\\)]*?)[\\)]?}([\\s\\S]*)","mi");m=sel.match(rx)}
if(m){var paramStr=m[1];bodyContent=m[2];var pm=paramStr.match(/([^=]*)=\"([^\"]*)\"\s?/gi);if(pm){for(var i=0;i<pm.length;i++){var ar=pm[i].split("=");if(ar.length){pluginArgs[ar[0].replace(/^[,\s\"\(\)]*/g,"")]=ar[1].replace(/^[,\s\"\(\)]*/g,"").replace(/[,\s\"\(\)]*$/g,"")}}}}
replaceText=sel}else{window.popupPluginForm(area_id,thisType,index,pageName,null,"",edit_icon,selectedMod);return}}else{if(type==='mouseover'){bodyContent='';pluginArgs={};pluginArgs.label=sel}else{bodyContent=sel}
replaceText=!0}}else{replaceText=!1}}
var $modal=$('.modal.fade:not(.in)').first();var url=$.service("plugin","edit",{area_id:area_id,type:type,index:index,page:pageName,pluginArgs:pluginArgs,bodyContent:bodyContent,edit_icon:!!edit_icon,selectedMod:selectedMod?selectedMod:"",modal:1});$modal.modal({remote:url,backdrop:"static",show:!1}).one('loaded.bs.modal',function(){handlePluginFieldsHierarchy();handleFormSubmit(this,type,edit_icon,area_id,replaceText);$document.trigger({type:'plugin_'+type+'_ready',container:container,arguments:arguments,modal:$modal}).trigger({type:'plugin_ready',container:container,arguments:arguments,modal:$modal})}).one("hidden.bs.modal",function(){if($("form",this).length&&edit_icon){$.getJSON($.service("semaphore","unset"),{object_id:pageName})}}).modal("show").find('.modal-dialog').addClass("modal-lg")};function handlePluginFieldsHierarchy(){var $container=$('#plugin_params');var parents={};$("[data-parent_name]",$container).each(function(){var parentName=$(this).data("parent_name"),parentValue=$(this).data("parent_value");if(parentName){var $parent=$('[name$="params['+parentName+']"]',$container);var $row=$(this).parents(".form-group");$row.addClass('parent_'+parentName+'_'+parentValue);if($parent.val()!==parentValue){if(!$parent.val()&&$("input, select",$row).val()){$parent.val(parentValue)}else{$row.hide()}}
if(!parents[parentName]){parents[parentName]={children:[],parentElement:$parent}}
parents[parentName].children.push($(this).attr("id"))}});$.each(parents,function(parentName,parent){parent.parentElement.change(function(){$.each(parent.children,function(index,id){$container.find('#'+id).parents(".form-group").hide()});$container.find('.parent_'+parentName+'_'+this.value).show()}).change().trigger("chosen:updated")})}
function handleFormSubmit(container,type,edit_icon,area_id,replaceText){var params=[],viewPageMode=!!edit_icon,bodyContent="";var $form=$("form",container);$form.submit(function(){if(!process_submit(this)){return!1}
$("[name^=params]",$form).each(function(){var name=$(this).attr("name"),matches=name.match(/params\[(.*)\]/),val=$(this).val();if(!matches){if(name==="content"){bodyContent=$(this).val()}
return}
if(val&&!viewPageMode){val=val.replace(/"/g,'\\"');params.push(matches[1]+'="'+val+'"')}});var blob,pluginContentTextarea=$("[name=content]",$form),pluginContentTextareaEditor=syntaxHighlighter.get(pluginContentTextarea);if(!viewPageMode){if(!bodyContent){bodyContent=(pluginContentTextareaEditor?pluginContentTextareaEditor.getValue():pluginContentTextarea.val())}
if(bodyContent){blob='{'+type.toUpperCase()+'('+params.join(' ')+')}'+bodyContent+'{'+type.toUpperCase()+'}'}else{blob='{'+type.toLowerCase()+' '+params.join(' ')+'}'}
insertAt(area_id,blob,!1,!1,replaceText);$(container).modal("hide");return!1}})}})(jQuery)