nextend-backend.min.js
462 KB
function n2Context(){this.window=["main"],this.mouseDownArea=!1,this.timeout=null,this.isPreventDblClick=!1,this.dblClickTimeout=null}"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(t){return 10>t?"0"+t:t}function quote(t){return escapable.lastIndex=0,escapable.test(t)?'"'+t.replace(escapable,function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function str(t,e){var i,n,s,o,a,r=gap,l=e[t];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(t)),"function"==typeof rep&&(l=rep.call(e,t,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(l)){for(o=l.length,i=0;o>i;i+=1)a[i]=str(i,l)||"null";return s=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+r+"]":"["+a.join(",")+"]",gap=r,s}if(rep&&"object"==typeof rep)for(o=rep.length,i=0;o>i;i+=1)"string"==typeof rep[i]&&(n=rep[i],s=str(n,l),s&&a.push(quote(n)+(gap?": ":":")+s));else for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(s=str(n,l),s&&a.push(quote(n)+(gap?": ":":")+s));return s=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+r+"}":"{"+a.join(",")+"}",gap=r,s}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(t){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(t){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(t,e,i){var n;if(gap="",indent="","number"==typeof i)for(n=0;i>n;n+=1)indent+=" ";else"string"==typeof i&&(indent=i);if(rep=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return str("",{"":t})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(t,e){var i,n,s=t[e];if(s&&"object"==typeof s)for(i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n=walk(s,i),void 0!==n?s[i]=n:delete s[i]);return reviver.call(t,e,s)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),n2.extend(window.nextend,{fontManager:null,styleManager:null,notificationCenter:null,animationManager:null,browse:null,askToSave:!0,cancel:function(t){return nextend.askToSave=!1,window.location.href=t,!1}}),n2Context.prototype.addWindow=function(t){this.window.push(t)},n2Context.prototype.removeWindow=function(){this.window.pop()},n2Context.prototype.getCurrentWindow=function(){return this.window[this.window.length-1]},n2Context.prototype.setMouseDownArea=function(t,e){this.mouseDownArea=t,this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(n2.proxy(function(){this.timeout=null,this.mouseDownArea=!1},this),50)},n2Context.prototype.preventDblClick=function(){this.isPreventDblClick=!0,this.dblClickTimeout&&clearTimeout(this.dblClickTimeout),this.dblClickTimeout=setTimeout(n2.proxy(function(){this.dblClickTimeout=null,this.isPreventDblClick=!1},this),200)},window.nextend.context=new n2Context,window.n2_=function(t){return"undefined"!=typeof nextend.localization[t]?nextend.localization[t]:t},window.n2_printf=function(t){var e=arguments,i=1;return t.replace(/%s/g,function(){return e[i++]})},window.nextendtime=n2.now(),window.nextend.roundTo=5,window.nextend.roundHelper=function(t){return window.nextend.roundTo<=1?t:Math.round(t/window.nextend.roundTo)*window.nextend.roundTo},function(t){function e(){o={left:"right",right:"left"}}function i(){o={left:"left",right:"right"}}function n(e,i){var n=0;return n=i==o.right?t(window).width()-(e.offset().left+e.outerWidth()):e.offset().left,0>n?0:n}var s=[],o={left:"left",right:"right"};t("html").on("changedir",function(n,a){for(var r=0;r<s.length;r++)s[r][0].css(o[s[r][2]],"auto");"rtl"===a?e():i(),t(document).trigger("scroll")});var a=0;nextend.ready(function(){var e=t("#wpadminbar, .navbar-fixed-top").height();e&&(a+=e),t(document).trigger("scroll")}),t(document).on("scroll",function(){for(var e=t(document).scrollTop()+a,i=0;i<s.length;i++)s[i][1]>e?s[i][0].removeClass("n2-static"):(s[i][0].addClass("n2-static"),s[i][0].css(o[s[i][2]],s[i][3]))}),t(window).on("resize",function(){for(var e=0;e<s.length;e++)s[e][1]=s[e][0].parent().offset().top,s[e][3]=n(s[e][0].parent(),s[e][2]);t(document).trigger("scroll")}),t.fn.staticonscroll=function(e){this.each(function(){var i=t(this);s.push([i,i.parent().offset().top,e,n(i.parent(),e)])}),t(document).trigger("scroll")}}(n2),function(t){var e={query:{}},i=null;e.addAjaxLoader=function(){i=t('<div class="n2-loader-overlay"><div class="n2-loader"></div></div>').appendTo("body")},e.addAjaxArray=function(t){for(var i in t)e.query[i]=t[i]},e.makeAjaxQuery=function(t,i){i&&(t.mode="ajax",t.nextendajax="1");for(var n in e.query)t[n]=e.query[n];return N2QueryString.stringify(t)},e.makeAjaxUrl=function(t,i){var n=t.split("?");n.length<2&&(n[1]="");var s=N2QueryString.parse(n[1]);if("undefined"!=typeof i)for(var o in i)s[o]=i[o];return n[0]+"?"+e.makeAjaxQuery(s,!0)},e.makeFallbackUrl=function(t,i){var n=t.split("?");n.length<2&&(n[1]="");var s=N2QueryString.parse(n[1]);if("undefined"!=typeof i)for(var o in i)s[o]=i[o];return n[0]+"?"+e.makeAjaxQuery(s,!1)},e.ajax=function(i){return e.startLoading(),t.ajax(i).always(function(t,i){e.stopLoading();try{if("success"!=i?t=JSON.parse(t.responseText):"string"==typeof t&&(t=JSON.parse(t)),"undefined"!=typeof t.redirect)return e.startLoading(),void(window.location.href=t.redirect);e.notification(t)}catch(n){var s=/<body[^>]*>((.|[\n\r])*)<\/body>/im,o=s.exec(t.responseText);o.length?NextendModalSafeHTML(t.status,o[1]):console.error(t.responseText,t)}})},e.notification=function(t){if("undefined"!=typeof t.notification&&t.notification)for(var e in t.notification)for(var i=0;i<t.notification[e].length;i++)nextend.notificationCenter[e](t.notification[e][i][0],t.notification[e][i][1])},e.getJSON=function(i){return e.startLoading(),t.getJSON(i).always(function(){e.stopLoading()})},e.startLoading=function(){i.addClass("n2-active")},e.stopLoading=function(){i.removeClass("n2-active")},window.NextendAjaxHelper=e,nextend.ready(function(){e.addAjaxLoader()})}(n2),function(t,e){function i(e,i,n,s){this.$node=e.data("pane",this),this.headings=i,this.contents=n,this.tabNames=[],this.headings.each(t.proxy(function(e,i){this.tabNames.push(t(i).data("tab"))},this)),this.identifier=s,this._active=i.index(i.filter(".n2-active"));for(var o=0;o<i.length;o++)i.eq(o).on("click",t.proxy(this.switchToPane,this,o));if(s){var a=t.jStorage.get(this.identifier+"-pane",-1);if(-1!=a)return void this.switchToPane(a)}this.hideAndShow()}function n(e,i,n){this.headings=e,this.contents=i,this.identifier=n;for(var s=0;s<e.length;s++)e.eq(s).on("click",t.proxy(this.scrollToPane,this,s))}i.prototype.switchToPane=function(t,e){e&&e.preventDefault(),this.headings.eq(this._active).removeClass("n2-active"),this.headings.eq(t).addClass("n2-active"),this._active=t,this.hideAndShow(),this.store(this._active),this.$node.triggerHandler("changetab")},i.prototype.hideAndShow=function(){t(this.contents[this._active]).css("display","block").trigger("activate");for(var e=0;e<this.contents.length;e++)e!=this._active&&t(this.contents[e]).css("display","none")},i.prototype.store=function(e){this.identifier&&t.jStorage.set(this.identifier+"-pane",e)},i.prototype.showTabs=function(e){for(var i=!1,n=0;n<this.tabNames.length;n++)"-1"!=t.inArray(this.tabNames[n],e)?(this.headings.eq(n).css("display",""),t(this.contents[n]).css("display",""),n==this._active?i=n:i===!1&&(i=n)):(this.headings.eq(n).css("display","none"),t(this.contents[n]).css("display","none"));this.switchToPane(i)},e.NextendHeadingPane=i,n.prototype.scrollToPane=function(e,i){i&&i.preventDefault(),t("html, body").animate({scrollTop:this.contents[e].offset().top-t(".n2-main-top-bar").height()-t("#wpadminbar, .navbar-fixed-top").height()-10},1e3)},e.NextendHeadingScrollToPane=n}(n2,window),function(t,e){var i=[],n=t(document),s=!1;e.NextendEsc={_listen:function(){s||(n.on("keydown.n2-esc",function(n){if(27==n.keyCode||8==n.keyCode)if(t(n.target).is("input, textarea"))27==n.keyCode&&(n.preventDefault(),t(n.target).blur());else{n.preventDefault();var s=i[i.length-1]();s&&e.NextendEsc.pop()}}),s=!0)},_stopListen:function(){n.off("keydown.n2-esc"),s=!1},add:function(t){i.push(t),e.NextendEsc._listen()},pop:function(){i.pop(),0===i.length&&e.NextendEsc._stopListen()}}}(n2,window),function(t,e){t.fn.n2opener=function(){return this.each(function(){var e=t(this).on("click",function(t){e.toggleClass("n2-active")});e.siblings("span").on("click",function(t){e.toggleClass("n2-active")}),e.parent().on("mouseleave",function(){e.removeClass("n2-active")}),e.find(".n2-button-menu").on("click",function(t){t.stopPropagation(),e.removeClass("n2-active")})})}}(n2,window),"undefined"!=typeof jQuery&&jQuery(document).on("wp-collapse-menu",function(){n2(window).trigger("resize")}),nextend.deepDiff=function(){return{map:function(t,e){if(this.isValue(t))return"undefined"!=typeof t&&t!=e?t:void 0;for(var i in e)this.isFunction(e[i])||(t[i]=this.map(t[i],e[i]),(void 0===t[i]||n2.isPlainObject(t[i])&&n2.isEmptyObject(t[i])||this.isArray(t[i])&&0==t[i].length)&&delete t[i]);return t},isFunction:function(t){return"[object Function]"==={}.toString.apply(t)},isArray:function(t){return"[object Array]"==={}.toString.apply(t)},isObject:function(t){return"[object Object]"==={}.toString.apply(t)},isValue:function(t){return!this.isObject(t)&&!this.isArray(t)}}}(),function(t,e){function i(){this.$element=t('<div class="n2 n2-tooltip n2-radius-m"></div>'),this.timeout=null,this.$tipFor=null,t(window).ready(t.proxy(this.ready,this))}function n(){this.isVisible=!1,this.$body=t("body"),this.$element=t('<div class="n2 n2-tooltip n2-radius-m"></div>').appendTo(this.$body)}i.prototype.ready=function(){this.$element.appendTo("body"),this.add(t("body"))},i.prototype.add=function(e){e.find("[data-n2tip]").off(".n2hastip").on({"mouseenter.n2hastip":t.proxy(this.onEnter,this)})},i.prototype.addElement=function(e,i,n,s){e.data({n2tip:i,n2tipv:s,n2tiph:n}).off(".n2hastip").on({"mouseenter.n2hastip":t.proxy(this.onEnter,this)})},i.prototype.onEnter=function(e){this.timeout&&clearTimeout(this.timeout),this.$tipFor=t(e.currentTarget).on({"mousemove.n2tip":t.proxy(this.onMove,this),"mouseleave.n2tip":t.proxy(this.onLeave,this)}),this.onMove(e),this.timeout=setTimeout(t.proxy(function(){var t=this.$tipFor.data("n2tipv"),e=this.$tipFor.data("n2tiph");"undefined"==typeof t&&(t=10),"undefined"==typeof e&&(e=10),this.$element.css({margin:t+"px "+e+"px"}).html(this.$tipFor.data("n2tip")).addClass("n2-active")},this),500)},i.prototype.onMove=function(t){this.$element.css({left:t.pageX,top:t.pageY})},i.prototype.onLeave=function(t){this.timeout&&clearTimeout(this.timeout),this.$tipFor&&(this.$tipFor.off(".n2tip"),this.$tipFor=null,this.$element.removeClass("n2-active").css("margin",""))},n.prototype.show=function(e,i){this.isVisible?this.$element.html(e):(this.isVisible=!0,this.$body.on("mousemove.tooltipMouse",t.proxy(this.mouseMove,this)),this.mouseMove(i),this.$element.html(e).addClass("n2-active"))},n.prototype.mouseMove=function(t){this.$element.css({left:t.pageX+10,top:t.pageY+10})},n.prototype.hide=function(){this.$body.off("mousemove.tooltipMouse"),this.$element.removeClass("n2-active").html(""),this.isVisible=!1},nextend.tooltip=new i,t(window).ready(function(){nextend.tooltipMouse=new n})}(n2,window),nextend.UnicodeToHTMLEntity=function(t){function e(t,e){return((1023&t)<<10)+(1023&e)+65536}function i(t){for(var i,n=[],s=0;s<t.length;)i=t.charCodeAt(s),55296==(63488&i)?n.push(e(i,t.charCodeAt(++s))):n.push(i),++s;return"&#"+n+";"}try{for(var n,s=/(?:[\uD800-\uDBFF][\uDC00-\uDFFF])/g;n=s.exec(t);)t=t.substr(0,n.index)+i(t.substr(n.index,s.lastIndex-n.index))+t.substr(s.lastIndex)}catch(o){return console.error(o),t}return t},window.N2Color={hex2rgba:function(t){var e=parseInt(t,16);return[e>>24&255,e>>16&255,e>>8&255,(255&e)/255]},hex2rgbaCSS:function(t){return"RGBA("+N2Color.hex2rgba(t).join(",")+")"},hexdec:function(t){return t=(t+"").replace(/[^a-f0-9]/gi,""),parseInt(t,16)},hex2alpha:function(t){var e=parseInt(t,16);return((255&e)/255).toFixed(3)},colorizeSVG:function(t,e){var i=t.split("base64,");return 1==i.length?t:(i[1]=Base64.encode(Base64.decode(i[1]).replace('fill="#FFF"','fill="#'+e.substr(0,6)+'"').replace('opacity="1"','opacity="'+N2Color.hex2alpha(e)+'"')),i.join("base64,"))},colorToSVG:function(t){var e=parseInt(t,16);return[t.substr(0,6),(255&e)/255]}},function(){"use strict";var t={};t.parse=function(t){return"string"!=typeof t?{}:(t=t.trim().replace(/^(\?|#)/,""),t?t.trim().split("&").reduce(function(t,e){var i=e.replace(/\+/g," ").split("="),n=i[0],s=i[1];return n=decodeURIComponent(n),s=void 0===s?null:decodeURIComponent(s),t.hasOwnProperty(n)?Array.isArray(t[n])?t[n].push(s):t[n]=[t[n],s]:t[n]=s,t},{}):{})},t.stringify=function(t){return t?Object.keys(t).map(function(e){var i=t[e];return Array.isArray(i)?i.map(function(t){return encodeURIComponent(e)+"="+encodeURIComponent(t)}).join("&"):encodeURIComponent(e)+"="+encodeURIComponent(i)}).join("&"):""},window.N2QueryString=t}(),!function(t){function e(t){for(var e=enc="",i=end=0,n=0,s=t.length;s>n;n++){var o=t.charCodeAt(n);128>o?end++:(o>127&&2048>o?enc=String.fromCharCode(o>>6|192,63&o|128):enc=String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),end>i&&(e+=t.slice(i,end)),e+=enc,i=end=n+1)}return end>i&&(e+=t.slice(i,s)),e}function i(t){var e,i;if(t+="",g=!1,v=_=t.length,_>63){for(n(t.substring(0,64)),a(u),g=!0,e=128;_>=e;e+=64)n(t.substring(e-64,e)),r(u);t=t.substring(e-64),_=t.length}for(c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=0,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=0,c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=0,e=0;_>e;e++)i=e%4,0===i?c[e>>2]=t.charCodeAt(e):c[e>>2]|=t.charCodeAt(e)<<f[i];return c[e>>2]|=d[e%4],e>55?(g?r(c):(a(c),g=!0),r([0,0,0,0,0,0,0,0,0,0,0,0,0,0,v<<3,0])):(c[14]=v<<3,void(g?r(c):a(c)))}function n(t){for(var e=16;e--;){var i=e<<2;u[e]=t.charCodeAt(i)+(t.charCodeAt(i+1)<<8)+(t.charCodeAt(i+2)<<16)+(t.charCodeAt(i+3)<<24)}}function s(t,n,s){i(n?t:e(t));var o=m[0];return h[1]=p[15&o],h[0]=p[15&(o>>=4)],h[3]=p[15&(o>>=4)],h[2]=p[15&(o>>=4)],h[5]=p[15&(o>>=4)],h[4]=p[15&(o>>=4)],h[7]=p[15&(o>>=4)],h[6]=p[15&(o>>=4)],o=m[1],h[9]=p[15&o],h[8]=p[15&(o>>=4)],h[11]=p[15&(o>>=4)],h[10]=p[15&(o>>=4)],h[13]=p[15&(o>>=4)],h[12]=p[15&(o>>=4)],h[15]=p[15&(o>>=4)],h[14]=p[15&(o>>=4)],o=m[2],h[17]=p[15&o],h[16]=p[15&(o>>=4)],h[19]=p[15&(o>>=4)],h[18]=p[15&(o>>=4)],h[21]=p[15&(o>>=4)],h[20]=p[15&(o>>=4)],h[23]=p[15&(o>>=4)],h[22]=p[15&(o>>=4)],o=m[3],h[25]=p[15&o],h[24]=p[15&(o>>=4)],h[27]=p[15&(o>>=4)],h[26]=p[15&(o>>=4)],h[29]=p[15&(o>>=4)],h[28]=p[15&(o>>=4)],h[31]=p[15&(o>>=4)],h[30]=p[15&(o>>=4)],s?h:h.join("")}function o(t,e,i,n,s,o,a){return e+=t+n+a,(e<<s|e>>>o)+i<<0}function a(t){l(0,0,0,0,t),m[0]=b[0]+1732584193<<0,m[1]=b[1]-271733879<<0,m[2]=b[2]-1732584194<<0,m[3]=b[3]+271733878<<0}function r(t){l(m[0],m[1],m[2],m[3],t),m[0]=b[0]+m[0]<<0,m[1]=b[1]+m[1]<<0,m[2]=b[2]+m[2]<<0,m[3]=b[3]+m[3]<<0}function l(t,e,i,n,s){var a,r;g?(t=o((i^n)&e^n,t,e,s[0],7,25,-680876936),n=o((e^i)&t^i,n,t,s[1],12,20,-389564586),i=o((t^e)&n^e,i,n,s[2],17,15,606105819),e=o((n^t)&i^t,e,i,s[3],22,10,-1044525330)):(t=s[0]-680876937,t=(t<<7|t>>>25)-271733879<<0,n=s[1]-117830708+(2004318071&t^-1732584194),n=(n<<12|n>>>20)+t<<0,i=s[2]-1126478375+((-271733879^t)&n^-271733879),i=(i<<17|i>>>15)+n<<0,e=s[3]-1316259209+((n^t)&i^t),e=(e<<22|e>>>10)+i<<0),t=o((i^n)&e^n,t,e,s[4],7,25,-176418897),n=o((e^i)&t^i,n,t,s[5],12,20,1200080426),i=o((t^e)&n^e,i,n,s[6],17,15,-1473231341),e=o((n^t)&i^t,e,i,s[7],22,10,-45705983),t=o((i^n)&e^n,t,e,s[8],7,25,1770035416),n=o((e^i)&t^i,n,t,s[9],12,20,-1958414417),i=o((t^e)&n^e,i,n,s[10],17,15,-42063),e=o((n^t)&i^t,e,i,s[11],22,10,-1990404162),t=o((i^n)&e^n,t,e,s[12],7,25,1804603682),n=o((e^i)&t^i,n,t,s[13],12,20,-40341101),i=o((t^e)&n^e,i,n,s[14],17,15,-1502002290),e=o((n^t)&i^t,e,i,s[15],22,10,1236535329),t=o((e^i)&n^i,t,e,s[1],5,27,-165796510),n=o((t^e)&i^e,n,t,s[6],9,23,-1069501632),i=o((n^t)&e^t,i,n,s[11],14,18,643717713),e=o((i^n)&t^n,e,i,s[0],20,12,-373897302),t=o((e^i)&n^i,t,e,s[5],5,27,-701558691),n=o((t^e)&i^e,n,t,s[10],9,23,38016083),i=o((n^t)&e^t,i,n,s[15],14,18,-660478335),e=o((i^n)&t^n,e,i,s[4],20,12,-405537848),t=o((e^i)&n^i,t,e,s[9],5,27,568446438),n=o((t^e)&i^e,n,t,s[14],9,23,-1019803690),i=o((n^t)&e^t,i,n,s[3],14,18,-187363961),e=o((i^n)&t^n,e,i,s[8],20,12,1163531501),t=o((e^i)&n^i,t,e,s[13],5,27,-1444681467),n=o((t^e)&i^e,n,t,s[2],9,23,-51403784),i=o((n^t)&e^t,i,n,s[7],14,18,1735328473),e=o((i^n)&t^n,e,i,s[12],20,12,-1926607734),a=e^i,t=o(a^n,t,e,s[5],4,28,-378558),n=o(a^t,n,t,s[8],11,21,-2022574463),r=n^t,i=o(r^e,i,n,s[11],16,16,1839030562),e=o(r^i,e,i,s[14],23,9,-35309556),a=e^i,t=o(a^n,t,e,s[1],4,28,-1530992060),n=o(a^t,n,t,s[4],11,21,1272893353),r=n^t,i=o(r^e,i,n,s[7],16,16,-155497632),e=o(r^i,e,i,s[10],23,9,-1094730640),a=e^i,t=o(a^n,t,e,s[13],4,28,681279174),n=o(a^t,n,t,s[0],11,21,-358537222),r=n^t,i=o(r^e,i,n,s[3],16,16,-722521979),e=o(r^i,e,i,s[6],23,9,76029189),a=e^i,t=o(a^n,t,e,s[9],4,28,-640364487),n=o(a^t,n,t,s[12],11,21,-421815835),r=n^t,i=o(r^e,i,n,s[15],16,16,530742520),e=o(r^i,e,i,s[2],23,9,-995338651),t=o(i^(e|~n),t,e,s[0],6,26,-198630844),n=o(e^(t|~i),n,t,s[7],10,22,1126891415),i=o(t^(n|~e),i,n,s[14],15,17,-1416354905),e=o(n^(i|~t),e,i,s[5],21,11,-57434055),t=o(i^(e|~n),t,e,s[12],6,26,1700485571),n=o(e^(t|~i),n,t,s[3],10,22,-1894986606),i=o(t^(n|~e),i,n,s[10],15,17,-1051523),e=o(n^(i|~t),e,i,s[1],21,11,-2054922799),t=o(i^(e|~n),t,e,s[8],6,26,1873313359),n=o(e^(t|~i),n,t,s[15],10,22,-30611744),i=o(t^(n|~e),i,n,s[6],15,17,-1560198380),e=o(n^(i|~t),e,i,s[13],21,11,1309151649),t=o(i^(e|~n),t,e,s[4],6,26,-145523070),n=o(e^(t|~i),n,t,s[11],10,22,-1120210379),i=o(t^(n|~e),i,n,s[2],15,17,718787259),e=o(n^(i|~t),e,i,s[9],21,11,-343485551),b[0]=t,b[1]=e,b[2]=i,b[3]=n}var h=[],c=[],u=[],d=[],p="0123456789abcdef".split(""),f=[],m=[],g=!1,v=0,_=0,b=[];if(t.Int32Array)c=new Int32Array(16),u=new Int32Array(16),d=new Int32Array(4),f=new Int32Array(4),m=new Int32Array(4),b=new Int32Array(4);else{var y;for(y=0;16>y;y++)c[y]=u[y]=0;for(y=0;4>y;y++)d[y]=f[y]=m[y]=b[y]=0}d[0]=128,d[1]=32768,d[2]=8388608,d[3]=-2147483648,f[0]=0,f[1]=8,f[2]=16,f[3]=24,t.md5=t.md5||s}(window),function(t,e){function i(){this.style=""}i.prototype.add=function(t){var e=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");e.appendChild(i),i.type="text/css",i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))},i.prototype.deleteRule=function(t){for(var e=t.toLowerCase(),i=e.replace(".","\\."),n=document.styleSheets.length-1;n>=0;n--)for(var s=this._getRulesArray(n),o=0;s&&o<s.length;o++)if(s[o].selectorText){var a=s[o].selectorText.toLowerCase();a!=e&&a!=i||(document.styleSheets[n].cssRules?document.styleSheets[n].deleteRule(o):document.styleSheets[n].removeRule(o))}return null},i.prototype._getRulesArray=function(t){var e=null;try{document.styleSheets[t].cssRules?e=document.styleSheets[t].cssRules:document.styleSheets[t].rules&&(e=document.styleSheets[t].rules)}catch(i){}return e},window.nextend.css=new i}(n2,window),function(t,e,i){function n(e,i,s,o){n.prototype.openLightbox=i,n.prototype.openMultipleLightbox=s,n.prototype.openFoldersLightbox=o,nextend.imageHelper=this,this.parameters=t.extend({siteKeywords:[],imageUrls:[],wordpressUrl:"",placeholderImage:"",placeholderRepeatedImage:"",protocolRelative:1},e)}n.prototype.protocolRelative=function(t){return this.parameters.protocolRelative?t.replace(/^http(s)?:\/\//,"//"):t},n.prototype.make=function(t){return this.dynamic(t)},n.prototype.dynamic=function(t){for(var e=this.parameters.imageUrls,i=this.parameters.siteKeywords,n=this.protocolRelative(t),s=0;s<i.length;s++)if(0===n.indexOf(e[s])){t=i[s]+n.slice(e[s].length);break}return t},n.prototype.fixed=function(t){for(var e=this.parameters.imageUrls,i=this.parameters.siteKeywords,n=0;n<i.length;n++)if(0===t.indexOf(i[n])){t=e[n]+t.slice(i[n].length);break}return t},n.prototype.openLightbox=function(t){},n.prototype.openMultipleLightbox=function(t){},n.prototype.openFoldersLightbox=function(t){},n.prototype.getPlaceholder=function(){return this.fixed(this.parameters.placeholderImage)},n.prototype.getRepeatedPlaceholder=function(){return this.fixed(this.parameters.placeholderRepeatedImage)},e.NextendImageHelper=n}(n2,window),function(t,e){function i(e,i,n){this.inited=!1,this.currentPane=null,this.customClass="",this.$=t(this),this.counter=a++,this.panes=e,i&&this.show(null,n)}function n(e,i){this.$=t(this),this.options=t.extend({"class":""},i),this.modal=t('<div class="n2-modal n2-modal-simple"/>').addClass(this.options["class"]).css({display:"none"}).appendTo("#n2-admin"),t('<i class="n2-i n2-i-a-deletes"/>').on("click",t.proxy(this.hide,this)).appendTo(this.modal),this.window=t('<div class="n2-modal-window"/>').on("click",function(t){t.stopPropagation()}).appendTo(this.modal),this.notificationStack=new NextendNotificationCenterStackModal(this.modal),this.content=t(e).appendTo(this.window)}function s(e,n,s){return t.jStorage.get("n2-delete-"+e,!1)?(s(),!0):(new i({zero:{size:[500,190],title:n2_("Delete"),back:!1,close:!0,content:"",controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-grey n2-uc n2-h4">'+n2_("Cancel")+"</a>",'<div class="n2-button n2-button-with-actions n2-button-l n2-radius-s n2-button-red"><a href="#" class="n2-button-inner n2-uc n2-h4">'+n2_("Delete")+'</a><div class="n2-button-menu-open"><i class="n2-i n2-i-buttonarrow"></i><div class="n2-button-menu"><div class="n2-button-menu-inner n2-border-radius"><a href="#" class="n2-h4">'+n2_("Delete and never ask for confirmation again")+"</a></div></div></div></div>"],fn:{show:function(){this.createCenteredSubHeading(n2_("Are you sure you want to delete?")).appendTo(this.content),this.controls.find(".n2-button-grey").on("click",t.proxy(function(t){t.preventDefault(),this.hide(t)},this)),this.controls.find(".n2-button-red a").on("click",t.proxy(function(t){t.preventDefault(),s(),this.hide(t)},this)),this.controls.find(".n2-button-red .n2-button-menu-inner a").on("click",t.proxy(function(i){i.preventDefault(),t.jStorage.set("n2-delete-"+e,!0)},this)),this.controls.find(".n2-button-menu-open").n2opener()},destroy:function(){this.destroy()}}}},!0),!1)}function o(e,i,n){return s(i,n,function(){window.location.href=t(e).attr("href")}),!1}var a=0;i.prototype.setCustomClass=function(t){this.customClass=t},i.prototype.lateInit=function(){if(!this.inited){for(var e in this.panes)this.panes[e]=t.extend({customClass:"",fit:!1,fitX:!0,overflow:"hidden",size:!1,back:!1,close:!0,controlsClass:"",controls:[],fn:{}},this.panes[e]);var i=!1;this.modal=t('<div class="n2-modal '+this.customClass+'"/>').css("opacity",0).on("click",t.proxy(function(e){0==i&&(this.close.hasClass("n2-hidden")||0!=t(e.target).closest(".n2-notification-center-modal").length||this.hide(e)),i=!1},this)),this.window=t('<div class="n2-modal-window n2-border-radius"/>').on("click",function(t){i=!0}).appendTo(this.modal),this.notificationStack=new NextendNotificationCenterStackModal(this.modal);var n=t('<div class="n2-modal-title n2-content-box-title-bg"/>').appendTo(this.window);this.title=t('<div class="n2-h2 n2-ucf"/>').appendTo(n),this.back=t('<i class="n2-i n2-i-a-back"/>').on("click",t.proxy(this.goBackButton,this)).appendTo(n),this.close=t('<i class="n2-i n2-i-a-deletes"/>').on("click",t.proxy(this.hide,this)).appendTo(n),this.content=t('<div class="n2-modal-content"/>').appendTo(this.window),this.controls=t('<div class="n2-table n2-table-fixed n2-table-auto"/>'),t('<div class="n2-modal-controls"/>').append(this.controls).appendTo(this.window),this.inited=!0}},i.prototype.show=function(e,i){this.lateInit(),this.notificationStack.enableStack(),"undefined"!=typeof e&&e||(e="zero"),nextend.context.addWindow("modal"),NextendEsc.add(t.proxy(function(){return this.close.hasClass("n2-hidden")?!1:(this.hide("esc"),!0)},this)),this.loadPane(e,!1,!0,i),NextendTween.fromTo(this.modal,.3,{opacity:0},{opacity:1,ease:"easeOutCubic"}).play()},i.prototype.hide=function(e){t(window).off(".n2-modal-"+this.counter),this.notificationStack.popStack(),nextend.context.removeWindow(),arguments.length>0&&"esc"!=e&&NextendEsc.pop(),this.apply("hide"),this.apply("destroy"),this.currentPane=null,this.modal.detach(),t(document).off("keyup.n2-esc-modal")},i.prototype.destroy=function(){this.modal.remove()},i.prototype.loadPane=function(e,i,n,s){var o=t.proxy(function(){var o=this.panes[e];this.currentPane=o,o.title!==!1&&this.title.html(o.title),o.back===!1?this.back.addClass("n2-hidden"):this.back.removeClass("n2-hidden"),o.close===!1?this.close.addClass("n2-hidden"):this.close.removeClass("n2-hidden"),this.content.find("> *").detach(),this.content.append(o.content);for(var a=!1,r=t('<div class="n2-tr" />'),l=0;l<o.controls.length;l++)t('<div class="n2-td"/>').addClass("n2-modal-controls-"+l).html(o.controls[l]).appendTo(r),a=!0;if(r.addClass("n2-modal-controls-"+l),this.controls.html(r),this.controls.attr("class","n2-table n2-table-fixed n2-table-auto "+o.controlsClass),"undefined"!=typeof n&&n||NextendTween.fromTo(this.window,.3,{x:i?-2e3:2e3},{x:0,ease:"easeOutCubic"}).play(),this.modal.appendTo("#n2-admin"),o.fit){var h=t(window),c=40,u=t.proxy(function(){var t=h.width()-2*c,e=h.height()-2*c;o.fitX||(t=o.size[0]),this.window.css({width:t,height:e,marginLeft:t/-2,marginTop:e/-2}),this.content.css({height:e-80-(a?this.controls.parent().outerHeight(!0):0),overflow:o.overflow})},this);u(),h.on("resize.n2-modal-"+this.counter,u)}else o.size!==!1&&(this.window.css({width:o.size[0],height:o.size[1],marginLeft:o.size[0]/-2,marginTop:o.size[1]/-2}),this.content.css({height:o.size[1]-80-(a?this.controls.parent().outerHeight(!0):0),overflow:o.overflow}));this.apply("show",s)},this);null!==this.currentPane?(this.apply("destroy"),NextendTween.to(this.window,.3,{x:i?2e3:-2e3,onComplete:o,ease:"easeOutCubic"}).play()):o()},i.prototype.trigger=function(t,e){this.$.trigger(t,e)},i.prototype.on=function(t,e){this.$.on(t,e)},i.prototype.one=function(t,e){this.$.one(t,e)},i.prototype.off=function(t,e){this.$.off(t,e)},i.prototype.goBackButton=function(){var t=null;null!==typeof this.goBackArgs&&(t=this.goBackArgs,this.goBackArgs=null),this.goBack(t)},i.prototype.goBack=function(t){this.apply("goBack",t)&&this.loadPane(this.currentPane.back,!0,!1,t)},i.prototype.apply=function(t,e){return"undefined"!=typeof this.currentPane.fn[t]?this.currentPane.fn[t].apply(this,e):!0},i.prototype.createInput=function(e,i){var n="";return 3==arguments.length&&(n=arguments[2]),t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+i+'" value="" class="n2-h5" autocomplete="off" style="'+n+'"></div></div></div></div>')},i.prototype.createInputUnit=function(e,i,n){var s="";return 4==arguments.length&&(s=arguments[3]),t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+i+'" value="" class="n2-h5" autocomplete="off" style="'+s+'"><div class="n2-text-unit n2-h5 n2-uc">'+n+"</div></div></div></div></div>")},i.prototype.createInputSub=function(e,i,n){var s="";return 4==arguments.length&&(s=arguments[3]),t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n+'</div><input type="text" id="'+i+'" value="" class="n2-h5" autocomplete="off" style="'+s+'"></div></div></div></div>')},i.prototype.createTextarea=function(e,i){var n="";return 3==arguments.length&&(n=arguments[2]),t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-textarea n2-border-radius"><textarea id="'+i+'" class="n2-h5" autocomplete="off" style="resize:none;'+n+'"></textarea></div></div></div></div>')},i.prototype.createSelect=function(e,i,n){var s="";4==arguments.length&&(s=arguments[3]),$group=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group "><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list" style=""><select id="'+i+'" autocomplete="off" style="'+s+'"></select></div></div></div></div>'),$select=$group.find("select");for(var o in n)$select.append('<option value="'+o+'">'+n[o]+"</option>");return $select.prop("selectedIndex",0),$group},i.prototype.createHeading=function(e){return t('<h3 class="n2-h3">'+e+"</h3>")},i.prototype.createSubHeading=function(e){return t('<h3 class="n2-h4">'+e+"</h3>")},i.prototype.createCenteredHeading=function(e){return t('<h3 class="n2-h3 n2-center">'+e+"</h3>")},i.prototype.createCenteredSubHeading=function(e){return t('<h3 class="n2-h4 n2-center">'+e+"</h3>")},i.prototype.createResult=function(){return t('<div class="n2-result"></div>')},i.prototype.createTable=function(e,i){for(var n=t('<table class="n2-table-fancy"/>'),s=0;s<e.length;s++)for(var o=t("<tr />").appendTo(n),a=0;a<e[s].length;a++)o.append(t('<td style="'+i[a]+'"/>').append(e[s][a]));return n},i.prototype.createTableWrap=function(){return t('<div class="n2-table-fancy-wrap" style="overflow:auto;height:196px;" />')},i.prototype.createImageRadio=function(e){for(var i=t('<div class="n2-modal-radio" />'),n=t('<input type="hidden" value="'+e[0].key+'"/>').appendTo(i),s=0;s<e.length;s++)i.append('<div class="n2-modal-radio-option" data-key="'+e[s].key+'" style="background-image: url(\''+nextend.imageHelper.fixed(e[s].image)+'\')"><div class="n2-h4">'+e[s].name+"</div></div>");var e=i.find(".n2-modal-radio-option");return e.eq(0).addClass("n2-active"),e.on("click",function(i){e.removeClass("n2-active");var s=t(i.currentTarget);s.addClass("n2-active"),n.val(s.data("key"))}),i},e.NextendModal=i,e.NextendModalSafeHTML=function(e,n){var s=new i({zero:{fit:!0,size:[1300,700],title:e,content:""}},!0);s.content.removeClass("n2-modal-content").css("padding","0 20px 20px");var o,a=t(n.replace(/document\.write/g,"n2Write"));window.n2Write=t.proxy(function(e){t("<span />").html(e).appendTo(s.content)},this),a.each(t.proxy(function(e,i){o=t(i),o.appendTo(s.content)},this)),delete window.n2Write},e.NextendModalSetting={show:function(t,e){new i({zero:{size:[1300,700],title:t,content:'<iframe src="'+e+'" width="1300" height="640" frameborder="0" style="margin:0 -20px -20px -20px;"></iframe>'}},!0)}},e.NextendModalDocumentation=function(t,e){
new i({zero:{size:[760,700],title:t,content:'<iframe src="'+e+'" width="760" height="640" frameborder="0" style="margin:0 -20px -20px -20px;"></iframe>'}},!0)},e.NextendNewFullWindow=function(t,e){var i=["height="+screen.height,"width="+screen.width,"fullscreen=yes"].join(","),n=window.open(t,e,i);return n.moveTo(0,0),n},n.prototype.resize=function(){this.window.width(this.modal.width()),this.window.height(this.modal.height())},n.prototype.show=function(){t("body").addClass("n2-modal-active"),this.modal.css("display","block"),this.resize(),t(window).on("resize.n2-simple-modal",t.proxy(this.resize,this)),this.notificationStack.enableStack(),NextendEsc.add(t.proxy(function(){return this.hide("esc"),!0},this))},n.prototype.hide=function(e){this.notificationStack.popStack(),arguments.length>0&&"esc"!=e&&NextendEsc.pop(),this.modal.css("display","none"),t("body").removeClass("n2-modal-active"),t(document).off("keyup.n2-esc-modal"),t(window).off(".n2-simple-modal"),this.modal.trigger("ModalHide")},e.NextendSimpleModal=n,e.NextendDeleteModal=s,e.NextendDeleteModalLink=o}(n2,window),function(t,e){function i(){this.stack=[],this.tween=null,nextend.ready(t.proxy(function(){var e=t("#n2-admin").find(".n2-main-top-bar");if(e.length>0){var i=new n(t("#n2-admin").find(".n2-main-top-bar"));i.enableStack()}else{var i=new s(t("#n2-admin"));i.enableStack()}},this))}function n(e){this.messages=[],this.isShow=!1,this.importantOnly=0,this.importantOnlyNode=t('<div class="n2-notification-important n2-h5 '+(this.importantOnly?"n2-active":"")+'"><span>'+n2_("Show only errors")+'</span><div class="n2-checkbox n2-light"><i class="n2-i n2-i-tick"></i></div></div>').on("click",t.proxy(this.changeImportant,this)),t.jStorage.listenKeyChange("ss-important-only",t.proxy(this.importantOnlyChanged,this)),this.importantOnlyChanged(),this._init(e),this.emptyMessage=t('<div class="n2-notification-empty n2-h4">'+n2_("There are no messages to display.")+"</div>")}function s(){n.prototype.constructor.apply(this,arguments)}i.prototype.add=function(t){this.stack.push(t)},i.prototype.popStack=function(){this.stack.pop()},i.prototype.getCurrentStack=function(){return this.stack[this.stack.length-1]},i.prototype.success=function(t,e){this.getCurrentStack().success(t,e)},i.prototype.error=function(t,e){this.getCurrentStack().error(t,e)},i.prototype.notice=function(t,e){this.getCurrentStack().notice(t,e)},window.nextend.notificationCenter=new i,n.prototype._init=function(e){this.showButton=e.find(".n2-notification-button").on("click",t.proxy(this.hideOrShow,this));var i=t('<div class="n2-notification-settings"></div>').append(t('<div class="n2-button n2-button-normal n2-button-s n2-button-blue n2-radius-s n2-h5 n2-uc n2-notification-clear">'+n2_("Got it!")+"</div>").on("click",t.proxy(this.clear,this))).append(this.importantOnlyNode);this.container=this.messageContainer=t('<div class="n2-notification-center n2-border-radius-br n2-border-radius-bl"></div>').append(i).appendTo(e)},n.prototype.enableStack=function(){nextend.notificationCenter.add(this)},n.prototype.popStack=function(){nextend.notificationCenter.popStack()},n.prototype.hideOrShow=function(t){t.preventDefault(),this.isShow?this.hide():this.show()},n.prototype.show=function(){this.isShow||(this.isShow=!0,0==this.messages.length&&this.showEmptyMessage(),this.showButton&&this.showButton.addClass("n2-active"),this.container.addClass("n2-active"),this.container.css("display","block"),this._animateShow())},n.prototype.hide=function(){this.isShow&&(this.showButton&&this.showButton.removeClass("n2-active"),this.container.removeClass("n2-active"),this._animateHide(),this.container.css("display","none"),this.isShow=!1)},n.prototype._animateShow=function(){this.tween&&this.tween.pause(),this.tween=NextendTween.fromTo(this.container,.4,{opacity:0},{opacity:1}).play()},n.prototype._animateHide=function(){this.tween&&this.tween.pause()},n.prototype.success=function(t,e){this._message("success",n2_("success"),t,e)},n.prototype.error=function(t,e){this._message("error",n2_("error"),t,e)},n.prototype.notice=function(t,e){this._message("notice",n2_("notice"),t,e)},n.prototype._message=function(e,i,n,s){this.hideEmptyMessage(),s=t.extend({timeout:!1,remove:!1},s);var o=t("<div></div>");return s.timeout&&setTimeout(t.proxy(function(){this.hideMessage(o,s.remove)},this),1e3*s.timeout),o.addClass("n2-table n2-table-fixed n2-h3 n2-border-radius n2-notification-message n2-notification-message-"+e).append(t('<div class="n2-tr"></div>').append('<div class="n2-td n2-first"><i class="n2-i n2-i-n-'+e+'"/></div>').append('<div class="n2-td n2-message"><h4 class="n2-h4 n2-uc">'+i+'</h4><p class="n2-h4">'+n+"</p></div>")).prependTo(this.messageContainer),this.messages.push(o),this.messages.length>3&&this.messages.shift().remove(),this.importantOnly&&"error"!=e&&"notice"!=e||this.show(),o},n.prototype.hideMessage=function(t,e){e?this.deleteMessage(t):this.hide()},n.prototype.deleteMessage=function(e){var i=t.inArray(e,this.messages);i>-1&&(this.messages.splice(i,1),e.remove()),0==this.messages.length&&this.hide()},n.prototype.clear=function(){for(var t=this.messages.length-1;t>=0;t--)this.messages.pop().remove();this.showEmptyMessage(),this.hide()},n.prototype.changeImportant=function(){this.importantOnly?t.jStorage.set("ss-important-only",0):t.jStorage.set("ss-important-only",1)},n.prototype.importantOnlyChanged=function(){this.importantOnly=parseInt(t.jStorage.get("ss-important-only",0)),this.importantOnly?this.importantOnlyNode.addClass("n2-active"):this.importantOnlyNode.removeClass("n2-active")},n.prototype.showEmptyMessage=function(){this.emptyMessage.prependTo(this.container)},n.prototype.hideEmptyMessage=function(){this.emptyMessage.detach()},e.NextendNotificationCenterStack=n,s.prototype=Object.create(n.prototype),s.prototype.constructor=s,s.prototype._init=function(e){var i=t('<div class="n2-notification-settings"></div>').append(t('<div class="n2-button n2-button-normal n2-button-s n2-button-blue n2-radius-s n2-h5 n2-uc n2-notification-clear">Got it!</div>').on("click",t.proxy(this.clear,this))).append(this.importantOnlyNode);this.messageContainer=t('<div class="n2-notification-center n2-border-radius"></div>').append(i),this.container=t('<div class="n2-notification-center-modal"></div>').append(this.messageContainer).appendTo(e)},s.prototype.show=function(){document.activeElement&&document.activeElement.blur(),NextendEsc.add(t.proxy(function(){return this.clear(),!1},this)),n.prototype.show.apply(this,arguments)},s.prototype.hide=function(){NextendEsc.pop(),n.prototype.hide.apply(this,arguments)},s.prototype._animateShow=function(){},s.prototype._animateHide=function(){},e.NextendNotificationCenterStackModal=s}(n2,window),function(t,e,i){function n(t,e,i){for(var n=[],s=0;s<t.length;s++){var o=p(t[s]),a=o.toHsl().l<.5?"n2-sp-thumb-el n2-sp-thumb-dark":"n2-sp-thumb-el n2-sp-thumb-light";a+=p.equals(e,t[s])?" n2-sp-thumb-active":"";var r=v?"background-color:"+o.toRgbString():"filter:"+o.toFilter();n.push('<span title="'+o.toRgbString()+'" data-color="'+o.toRgbString()+'" class="'+a+'"><span class="n2-sp-thumb-inner" style="'+r+';" /></span>')}return"<div class='n2-sp-cf "+i+"'>"+n.join("")+"</div>"}function s(){for(var t=0;t<m.length;t++)m[t]&&m[t].hide()}function o(t,i){var n=e.extend({},f,t);return n.callbacks={move:c(n.move,i),change:c(n.change,i),show:c(n.show,i),hide:c(n.hide,i),beforeShow:c(n.beforeShow,i)},n}function a(a,l){function c(t){vt.toggleClass("n2-sp-flat",q),vt.toggleClass("n2-sp-input-disabled",!Y.showInput),vt.toggleClass("n2-sp-alpha-enabled",Y.showAlpha),vt.toggleClass("n2-sp-buttons-disabled",!Y.showButtons||q),vt.toggleClass("n2-sp-palette-disabled",!Y.showPalette),vt.toggleClass("n2-sp-palette-only",Y.showPaletteOnly),vt.toggleClass("n2-sp-initial-disabled",!Y.showInitial),vt.addClass(Y.className),"undefined"==typeof t&&j()}function f(){function i(t){return t.data&&t.data.ignore?(O(e(this).data("color")),z()):(O(e(this).data("color")),E(!0),z(),P()),!1}g&&vt.find("*:not(input)").attr("unselectable","on");var n=mt.parent().find(".n2-sp-replacer");if(n.length?Ft=n:(Ft=Ot?e(_).addClass($):e([]),Ot&&mt.parent().after(Ft)),At=Ot?Ft:mt,zt=Ft.find(".n2-sp-preview-inner"),c(!0),q?mt.parent().after(vt).hide():e(ft).append(vt.hide()),U&&t.localStorage)try{ut=t.localStorage[U].split(";")}catch(s){}At.bind("click.spectrum touchstart.spectrum",function(t){gt||T(),t.stopPropagation(),e(t.target).is("input")||t.preventDefault()}),(mt.is(":disabled")||Y.disabled===!0)&&B(),vt.click(h),Dt.change(S),Dt.bind("paste",function(){setTimeout(S,1)}),Dt.keydown(function(t){13==t.keyCode&&S()}),Mt.text(Y.cancelText),Mt.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),P("cancel")}),Pt.text(Y.chooseText),Pt.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),A()&&(E(!0),P())}),u(kt,function(t,e,i){lt=t/it,i.shiftKey&&(lt=Math.round(10*lt)/10),z()}),u(yt,function(t,e){ot=parseFloat(e/tt),z()},C,D),u(_t,function(t,e){at=parseFloat(t/G),rt=parseFloat((Q-e)/Q),z()},C,D),Ht?(O(Ht),H(),jt=Et||p(Ht).format,y(Ht)):H(),q&&M();var o=g?"mousedown.spectrum":"click.spectrum touchstart.spectrum";St.delegate(".n2-sp-thumb-el",o,i),Tt.delegate(".n2-sp-thumb-el:nth-child(1)",o,{ignore:!0},i)}function y(i){if(V){var n=p(i).toRgbString();if(-1===e.inArray(n,ut)&&ut.push(n),U&&t.localStorage)try{t.localStorage[U]=ut.join(";")}catch(s){}}}function w(){var t,e=[],i=ut,n={};if(Y.showPalette){for(var s=0;s<ct.length;s++)for(var o=0;o<ct[s].length;o++)t=p(ct[s][o]).toRgbString(),n[t]=!0;for(s=0;s<i.length;s++)t=p(i[s]).toRgbString(),n.hasOwnProperty(t)||(e.push(i[s]),n[t]=!0)}return e.reverse().slice(0,Y.maxSelectionSize)}function x(){var t=F(),i=e.map(ct,function(e,i){return n(e,t,"n2-sp-palette-row n2-sp-palette-row-"+i)});ut&&i.push(n(w(),t,"n2-sp-palette-row n2-sp-palette-row-selection")),St.html(i.join(""))}function k(){if(Y.showInitial){var t=Nt,e=F();Tt.html(n([t,e],e,"n2-sp-palette-row-initial"))}}function C(){0!==Q&&0!==G&&0!==tt||j(),vt.addClass(dt)}function D(){vt.removeClass(dt)}function S(){var t=p(Dt.val());t.ok?O(t):Dt.addClass("n2-sp-validation-error")}function T(){K?P():M()}function M(){return K?void j():void(J.beforeShow(F())!==!1&&(s(),K=!0,e(pt).bind("click.spectrum",P),e(t).bind("resize.spectrum",X),Ft.addClass("n2-sp-active"),vt.show(),Y.showPalette&&x(),j(),H(),Nt=F(),k(),J.show(Nt)))}function P(i){if((!i||"click"!=i.type||2!=i.button)&&K&&!q){K=!1,e(pt).unbind("click.spectrum",P),e(t).unbind("resize.spectrum",X),Ft.removeClass("n2-sp-active"),vt.hide();var n=!p.equals(F(),Nt);n&&(Rt&&"cancel"!==i?E(!0):I()),J.hide(F())}}function I(){O(Nt,!0)}function O(t,e){if(!p.equals(t,F())){var i=p(t),n=i.toHsv();ot=n.h,at=n.s,rt=n.v,lt=n.a,H(),e||(jt=Et||i.format)}}function F(){return p.fromRatio({h:ot,s:at,v:rt,a:Math.round(100*lt)/100})}function A(){return!Dt.hasClass("n2-sp-validation-error")}function z(){H(),J.move(F())}function H(){Dt.removeClass("n2-sp-validation-error"),N();var t=p({h:ot,s:"1.0",v:"1.0"});_t.css("background-color","#"+t.toHexString());var e=jt;1>lt&&("hex"!==e&&"name"!==e||(e="rgb"));var i=F(),n=i.toHexString(),s=i.toRgbString();if(v||1===i.alpha?zt.css("background-color",s):(zt.css("background-color","transparent"),zt.css("filter",i.toFilter())),Y.showAlpha){var o=i.toRgb();o.a=0;var a=p(o).toRgbString(),r="linear-gradient(left, "+a+", "+n+")";g?xt.css("filter",p(a).toFilter({gradientType:1},n)):(xt.css("background","-webkit-"+r),xt.css("background","-moz-"+r),xt.css("background","-ms-"+r),xt.css("background",r))}Y.showInput&&(1>lt&&("hex"!==e&&"name"!==e||(e="rgb")),Dt.val(i.toString(e))),Y.showPalette&&x(),k()}function N(){var t=at,e=rt,i=t*G,n=Q-e*Q;i=Math.max(-Z,Math.min(G-Z,i-Z)),n=Math.max(-Z,Math.min(Q-Z,n-Z)),bt.css({top:n,left:i});var s=lt*it;Ct.css({left:s-nt/2});var o=ot*tt;wt.css({top:o-st})}function E(t){var e=F();It&&mt.val(e.toString(jt)).change();var i=1;Nt=e,y(e),t&&i&&J.change(e)}function j(){G=_t.width(),Q=_t.height(),Z=bt.height(),et=yt.width(),tt=yt.height(),st=wt.height(),it=kt.width(),nt=Ct.width(),q||vt.offset(r(vt,At.parent())),N()}function R(){mt.show(),At.unbind("click.spectrum touchstart.spectrum"),vt.remove(),Ft.remove(),m[Wt.id]=null}function W(t,n){return t===i?e.extend({},Y):n===i?Y[t]:(Y[t]=n,void c())}function L(){gt=!1,mt.attr("disabled",!1),At.removeClass("n2-sp-disabled")}function B(){P(),gt=!0,mt.attr("disabled",!0),At.addClass("n2-sp-disabled")}var Y=o(l,a),q=Y.flat,V=Y.showSelectionPalette,U=Y.localStorageKey,$=Y.theme,J=Y.callbacks,X=d(j,10),K=!1,G=0,Q=0,Z=0,tt=0,et=0,it=0,nt=0,st=0,ot=0,at=0,rt=0,lt=1,ht=Y.palette.slice(0),ct=e.isArray(ht[0])?ht:[ht],ut=Y.selectionPalette.slice(0),dt="n2-sp-dragging",pt=a.ownerDocument,ft=pt.body,mt=e(a),gt=!1,vt=e(b,pt).addClass($),_t=vt.find(".n2-sp-color"),bt=vt.find(".n2-sp-dragger"),yt=vt.find(".n2-sp-hue"),wt=vt.find(".n2-sp-slider"),xt=vt.find(".n2-sp-alpha-inner"),kt=vt.find(".n2-sp-alpha"),Ct=vt.find(".n2-sp-alpha-handle"),Dt=vt.find(".n2-sp-input"),St=vt.find(".n2-sp-palette"),Tt=vt.find(".n2-sp-initial"),Mt=vt.find(".n2-sp-cancel"),Pt=vt.find(".n2-sp-choose"),It=mt.is("input"),Ot=It&&!q,Ft=null,At=null,zt=null,Ht=Y.color||It&&mt.val(),Nt=!1,Et=Y.preferredFormat,jt=Et,Rt=!Y.showButtons||Y.clickoutFiresChange;vt.on("mousedown",function(t){nextend.context.setMouseDownArea("colorpicker",t)}),f();var Wt={show:M,hide:P,toggle:T,reflow:j,option:W,enable:L,disable:B,set:function(t){O(t),E()},get:F,destroy:R,container:vt};return Wt.id=m.push(Wt)-1,Wt}function r(t,i){var n=0,s=t.outerWidth(),o=t.outerHeight(),a=i.outerHeight(),r=t[0].ownerDocument,l=r.documentElement,h=l.clientWidth+e(r).scrollLeft(),c=l.clientHeight+e(r).scrollTop(),u=i.offset();return u.top+=a+3,u.left-=Math.min(u.left,u.left+s>h&&h>s?Math.abs(u.left+s-h):0),u.top-=Math.min(u.top,u.top+o>c&&c>o?Math.abs(o+a+6-n):n),u}function l(){}function h(t){t.stopPropagation()}function c(t,e){var i=Array.prototype.slice,n=i.call(arguments,2);return function(){return t.apply(e,n.concat(i.call(arguments)))}}function u(t,i,n,s){function o(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function a(e){if(c){if(g&&document.documentMode<9&&!e.button)return l();var n=e.originalEvent.touches,s=n?n[0].pageX:e.pageX,a=n?n[0].pageY:e.pageY,r=Math.max(0,Math.min(s-u.left,p)),h=Math.max(0,Math.min(a-u.top,d));f&&o(e),i.apply(t,[r,h,e])}}function r(i){var s=i.which?3==i.which:2==i.button;i.originalEvent.touches;s||c||n.apply(t,arguments)!==!1&&(c=!0,d=e(t).height(),p=e(t).width(),u=e(t).offset(),e(h).bind(m),e(h.body).addClass("n2-sp-dragging"),f||a(i),o(i))}function l(){c&&(e(h).unbind(m),e(h.body).removeClass("n2-sp-dragging"),s.apply(t,arguments)),c=!1}i=i||function(){},n=n||function(){},s=s||function(){};var h=t.ownerDocument||document,c=!1,u={},d=0,p=0,f=!1,m={};m.selectstart=o,m.dragstart=o,m[f?"touchmove":"mousemove"]=a,m[f?"touchend":"mouseup"]=l,e(t).bind(f?"touchstart":"mousedown",r)}function d(t,e,i){var n;return function(){var s=this,o=arguments,a=function(){n=null,t.apply(s,o)};i&&clearTimeout(n),!i&&n||(n=setTimeout(a,e))}}var p=null,f={beforeShow:l,move:l,change:l,show:l,hide:l,color:!1,flat:!1,showInput:!1,showButtons:!0,clickoutFiresChange:!1,showInitial:!1,showPalette:!1,showPaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",preferredFormat:!1,className:"",showAlpha:!1,theme:"n2-sp-light",palette:["fff","000"],selectionPalette:[],disabled:!1},m=[],g=!!/msie/i.exec(t.navigator.userAgent),v=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),i=e.style;return i.cssText="background-color:rgba(0,0,0,.5)",t(i.backgroundColor,"rgba")||t(i.backgroundColor,"hsla")}(),_=["<div class='n2-sp-replacer'>","<div class='n2-sp-preview'><div class='n2-sp-preview-inner'></div></div>","<div class='n2-sp-dd'>▲</div>","</div>"].join(""),b=function(){var t="";if(g)for(var e=1;6>=e;e++)t+="<div class='n2-sp-"+e+"'></div>";return["<div class='n2-sp-container'>","<div class='n2-sp-palette-container'>","<div class='n2-sp-palette n2-sp-thumb n2-sp-cf'></div>","</div>","<div class='n2-sp-picker-container'>","<div class='n2-sp-top n2-sp-cf'>","<div class='n2-sp-fill'></div>","<div class='n2-sp-top-inner'>","<div class='n2-sp-color'>","<div class='n2-sp-sat'>","<div class='n2-sp-val'>","<div class='n2-sp-dragger'></div>","</div>","</div>","</div>","<div class='n2-sp-hue'>","<div class='n2-sp-slider'></div>",t,"</div>","</div>","<div class='n2-sp-alpha'><div class='n2-sp-alpha-inner'><div class='n2-sp-alpha-handle'></div></div></div>","</div>","<div class='n2-sp-input-container n2-sp-cf'>","<input class='n2-sp-input' type='text' spellcheck='false' />","</div>","<div class='n2-sp-initial n2-sp-thumb n2-sp-cf'></div>","<div class='n2-sp-button-container n2-sp-cf'>","<a class='n2-sp-cancel' href='#'></a>","<button class='n2-sp-choose'></button>","</div>","</div>","</div>"].join("")}(),y="spectrum.id";e.fn.n2spectrum=function(t,i){if("string"==typeof t){var n=this,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var i=m[e(this).data(y)];if(i){var o=i[t];if(!o)throw new Error("Spectrum: no such method: '"+t+"'");"get"==t?n=i.get():"container"==t?n=i.container:"option"==t?n=i.option.apply(i,s):"destroy"==t?(i.destroy(),e(this).removeData(y)):o.apply(i,s)}}),n}return this.n2spectrum("destroy").each(function(){var i=a(this,t);e(this).data(y,i.id)})},e.fn.n2spectrum.load=!0,e.fn.n2spectrum.loadOpts={},e.fn.n2spectrum.draggable=u,e.fn.n2spectrum.defaults=f,e.n2spectrum={},e.n2spectrum.localization={},e.n2spectrum.palettes={},e.fn.n2spectrum.processNativeColorInputs=function(){var t=e("<input type='color' value='!' />")[0],i="color"===t.type&&"!"!=t.value;i||e("input[type=color]").n2spectrum({preferredFormat:"hex6"})},function(t){function e(t){var e={r:0,g:0,b:0},n=1,o=!1,r=!1;return"string"==typeof t&&(t=g(t)),"object"==typeof t&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(e=i(t.r,t.g,t.b),o=!0,r="rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(e=a(t.h,t.s,t.v),o=!0,r="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(e=s(t.h,t.s,t.l),o=!0,r="hsl"),t.hasOwnProperty("a")&&(n=t.a)),e.r=x(255,k(e.r,0)),e.g=x(255,k(e.g,0)),e.b=x(255,k(e.b,0)),e.r<1&&(e.r=w(e.r)),e.g<1&&(e.g=w(e.g)),e.b<1&&(e.b=w(e.b)),{ok:o,format:t&&t.format||r,r:e.r,g:e.g,b:e.b,a:n}}function i(t,e,i){return{r:255*h(t,255),g:255*h(e,255),b:255*h(i,255)}}function n(t,e,i){t=h(t,255),e=h(e,255),i=h(i,255);var n,s,o=k(t,e,i),a=x(t,e,i),r=(o+a)/2;if(o==a)n=s=0;else{var l=o-a;switch(s=r>.5?l/(2-o-a):l/(o+a),o){case t:n=(e-i)/l+(i>e?6:0);break;case e:n=(i-t)/l+2;break;case i:n=(t-e)/l+4}n/=6}return{h:n,s:s,l:r}}function s(t,e,i){function n(t,e,i){return 0>i&&(i+=1),i>1&&(i-=1),1/6>i?t+6*(e-t)*i:.5>i?e:2/3>i?t+(e-t)*(2/3-i)*6:t}var s,o,a;if(t=h(t,360),e=h(e,100),i=h(i,100),0===e)s=o=a=i;else{var r=.5>i?i*(1+e):i+e-i*e,l=2*i-r;s=n(l,r,t+1/3),o=n(l,r,t),a=n(l,r,t-1/3)}return{r:255*s,g:255*o,b:255*a}}function o(t,e,i){t=h(t,255),e=h(e,255),i=h(i,255);var n,s,o=k(t,e,i),a=x(t,e,i),r=o,l=o-a;if(s=0===o?0:l/o,o==a)n=0;else{switch(o){case t:n=(e-i)/l+(i>e?6:0);break;case e:n=(i-t)/l+2;break;case i:n=(t-e)/l+4}n/=6}return{h:n,s:s,v:r}}function a(t,e,i){t=6*h(t,360),e=h(e,100),i=h(i,100);var n=y.floor(t),s=t-n,o=i*(1-e),a=i*(1-s*e),r=i*(1-(1-s)*e),l=n%6,c=[i,a,o,o,r,i][l],u=[r,i,i,a,o,o][l],d=[o,o,r,i,i,a][l];return{r:255*c,g:255*u,b:255*d}}function r(t,e,i,n){var s=[m(w(t).toString(16)),m(w(e).toString(16)),m(w(i).toString(16))];return n||s[0].charAt(0)!=s[0].charAt(1)||s[1].charAt(0)!=s[1].charAt(1)||s[2].charAt(0)!=s[2].charAt(1)?s.join(""):s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)}function l(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[t[i]]=i);return e}function h(t,e){d(t)&&(t="100%");var i=f(t);return t=x(e,k(0,D(t))),i&&(t*=e/100),y.abs(t-e)<1e-6?1:t>=1?t%e/D(e):t}function c(t){return x(1,k(0,t))}function u(t){return parseInt(t,16)}function d(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===D(t)}function f(t){return"string"==typeof t&&-1!=t.indexOf("%")}function m(t){return 1==t.length?"0"+t:""+t}function g(t){t=t.replace(v,"").replace(_,"").toLowerCase();var e=!1;if(S[t])t=S[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0};var i;return(i=M.rgb.exec(t))?{r:i[1],g:i[2],b:i[3]}:(i=M.rgba.exec(t))?{r:i[1],g:i[2],b:i[3],a:i[4]}:(i=M.hsl.exec(t))?{h:i[1],s:i[2],l:i[3]}:(i=M.hsla.exec(t))?{h:i[1],s:i[2],l:i[3],a:i[4]}:(i=M.hsv.exec(t))?{h:i[1],s:i[2],v:i[3]}:(i=M.hex6.exec(t))?{r:u(i[1]),g:u(i[2]),b:u(i[3]),format:e?"name":"hex"}:(i=M.hex8.exec(t))?{r:u(i[1]),g:u(i[2]),b:u(i[3]),a:u(i[4])/255,format:e?"name":"hex"}:(i=M.hex3.exec(t))?{r:u(i[1]+""+i[1]),g:u(i[2]+""+i[2]),b:u(i[3]+""+i[3]),format:e?"name":"hex"}:!1}var v=/^[\s,#]+/,_=/\s+$/,b=0,y=Math,w=y.round,x=y.min,k=y.max,C=y.random,D=t.parseFloat;p=function(t,i){if("object"==typeof t&&t.hasOwnProperty("_tc_id"))return t;var s=e(t),a=s.r,l=s.g,h=s.b,c=D(s.a),u=s.format;return{ok:s.ok,format:u,_tc_id:b++,alpha:c,toHsv:function(){var t=o(a,l,h);return{h:t.h,s:t.s,v:t.v,a:c}},toHsvString:function(){var t=o(a,l,h),e=w(360*t.h),i=w(100*t.s),n=w(100*t.v);return 1==c?"hsv("+e+", "+i+"%, "+n+"%)":"hsva("+e+", "+i+"%, "+n+"%, "+c+")"},toHsl:function(){var t=n(a,l,h);return{h:t.h,s:t.s,l:t.l,a:c}},toHslString:function(){var t=n(a,l,h),e=w(360*t.h),i=w(100*t.s),s=w(100*t.l);return 1==c?"hsl("+e+", "+i+"%, "+s+"%)":"hsla("+e+", "+i+"%, "+s+"%, "+c+")"},toHex:function(){return r(a,l,h)},toHexString:function(t){return r(a,l,h,t)},toHexString8:function(){return r(a,l,h,!0)+m(w(255*c).toString(16))},toRgb:function(){return{r:w(a),g:w(l),b:w(h),a:c}},toRgbString:function(){return 1==c?"rgb("+w(a)+", "+w(l)+", "+w(h)+")":"rgba("+w(a)+", "+w(l)+", "+w(h)+", "+c+")"},toName:function(){return T[r(a,l,h)]||!1},toFilter:function(t,e){var i=r(a,l,h,!0),n=i,s=Math.round(255*D(c)).toString(16),o=s,u=t&&t.gradientType?"GradientType = 1, ":"";if(e){var d=p(e);n=d.toHex(),o=Math.round(255*D(d.alpha)).toString(16)}return"progid:DXImageTransform.Microsoft.gradient("+u+"startColorstr=#"+m(s)+i+",endColorstr=#"+m(o)+n+")"},toString:function(t){t=t||this.format;var e=!1;return"rgb"===t&&(e=this.toRgbString()),"hex"===t&&(e=this.toHexString()),"hex6"===t&&(e=this.toHexString(!0)),"hex8"===t&&(e=this.toHexString8()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString(!0)}}},p.fromRatio=function(t){if("object"==typeof t)for(var e in t)1===t[e]&&(t[e]="1.0");return p(t)},p.equals=function(t,e){return t&&e?p(t).toRgbString()==p(e).toRgbString():!1},p.random=function(){return p.fromRatio({r:C(),g:C(),b:C()})},p.desaturate=function(t,e){var i=p(t).toHsl();return i.s-=(e||10)/100,i.s=c(i.s),p(i)},p.saturate=function(t,e){var i=p(t).toHsl();return i.s+=(e||10)/100,i.s=c(i.s),p(i)},p.greyscale=function(t){return p.desaturate(t,100)},p.lighten=function(t,e){var i=p(t).toHsl();return i.l+=(e||10)/100,i.l=c(i.l),p(i)},p.darken=function(t,e){var i=p(t).toHsl();return i.l-=(e||10)/100,i.l=c(i.l),p(i)},p.complement=function(t){var e=p(t).toHsl();return e.h=(e.h+.5)%1,p(e)},p.triad=function(t){var e=p(t).toHsl(),i=360*e.h;return[p(t),p({h:(i+120)%360,s:e.s,l:e.l}),p({h:(i+240)%360,s:e.s,l:e.l})]},p.tetrad=function(t){var e=p(t).toHsl(),i=360*e.h;return[p(t),p({h:(i+90)%360,s:e.s,l:e.l}),p({h:(i+180)%360,s:e.s,l:e.l}),p({h:(i+270)%360,s:e.s,l:e.l})]},p.splitcomplement=function(t){var e=p(t).toHsl(),i=360*e.h;return[p(t),p({h:(i+72)%360,s:e.s,l:e.l}),p({h:(i+216)%360,s:e.s,l:e.l})]},p.analogous=function(t,e,i){e=e||6,i=i||30;var n=p(t).toHsl(),s=360/i,o=[p(t)];for(n.h*=360,n.h=(n.h-(s*e>>1)+720)%360;--e;)n.h=(n.h+s)%360,o.push(p(n));return o},p.monochromatic=function(t,e){e=e||6;for(var i=p(t).toHsv(),n=i.h,s=i.s,o=i.v,a=[],r=1/e;e--;)a.push(p({h:n,s:s,v:o})),o=(o+r)%1;return a},p.readable=function(t,e){var i=p(t).toRgb(),n=p(e).toRgb();return(n.r-i.r)*(n.r-i.r)+(n.g-i.g)*(n.g-i.g)+(n.b-i.b)*(n.b-i.b)>10404};var S=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},T=p.hexNames=l(S),M=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",i="(?:"+e+")|(?:"+t+")",n="[\\s|\\(]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?",s="[\\s|\\(]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?";return{rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+s),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+s),hsv:new RegExp("hsv"+n),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}()}(this),e(function(){e.fn.n2spectrum.load&&e.fn.n2spectrum.processNativeColorInputs()})}(window,n2),function(t,e){function i(e,i){this.app="system",this.key="IsExpert",this.isExpert=0,this.style=t('<div style="display: none;"></div>').appendTo("body"),i?(this.switches=t(".n2-expert-switch").on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"expertClicked"),click:t.proxy(this.switchExpert,this,!0)}),this.load(),this.isExpert||this.disable(!1),t.jStorage.listenKeyChange(this.app+this.key,t.proxy(this.load,this))):(this.switches=t(),this.disable(!1))}i.prototype.load=function(){var e=parseInt(t.jStorage.get(this.app+this.key,0));e!=this.isExpert&&this.switchExpert(!1,!1)},i.prototype.set=function(e,i){this.isExpert=e,i&&t.jStorage.set(this.app+this.key,e)},i.prototype.switchExpert=function(t,e){e&&e.preventDefault(),this.isExpert?this.disable(t):this.enable(t)},i.prototype.measureElement=function(){var e=null,i=t(window).scrollTop(),n=i+62,s=i+t(window).height()-100;t(".n2-content-area > .n2-heading-bar,.n2-content-area > .n2-form-tab ,#n2-admin .n2-content-area form > .n2-form > .n2-form-tab").each(function(){var i=t(this);return i.offset().top>n?(i.hasClass("n2-heading-bar")||(e=i),!1):i.offset().top+i.height()>s?(i.hasClass("n2-heading-bar")||(e=i),!1):void 0}),this.measuredElement=e},i.prototype.scrollToMeasured=function(){if(null!==this.measuredElement){for(;this.measuredElement.length&&!this.measuredElement.is(":VISIBLE");)this.measuredElement=this.measuredElement.prev();0!=this.measuredElement.length&&t("html,body").scrollTop(this.measuredElement.offset().top-102)}},i.prototype.enable=function(e){this.measureElement(),this.changeStyle(""),this.set(1,e),this.switches.addClass("n2-active"),t("html").addClass("n2-in-expert"),e&&this.scrollToMeasured()},i.prototype.disable=function(e){this.measureElement(),this.changeStyle(".n2-expert{display: none !important;}"),this.set(0,e),this.switches.removeClass("n2-active"),t("html").removeClass("n2-in-expert"),e&&this.scrollToMeasured()},i.prototype.changeStyle=function(t){this.style.html('<style type="text/css">'+t+"</style>")},e.NextendExpertMode=i}(n2,window),function(t){t(n2)}(function(t){function e(e){var a=e||window.event,r=l.call(arguments,1),h=0,u=0,d=0,p=0,f=0,m=0;if(e=t.event.fix(a),e.type="mousewheel","detail"in a&&(d=-1*a.detail),"wheelDelta"in a&&(d=a.wheelDelta),"wheelDeltaY"in a&&(d=a.wheelDeltaY),"wheelDeltaX"in a&&(u=-1*a.wheelDeltaX),"axis"in a&&a.axis===a.HORIZONTAL_AXIS&&(u=-1*d,d=0),h=0===d?u:d,"deltaY"in a&&(d=-1*a.deltaY,h=d),"deltaX"in a&&(u=a.deltaX,0===d&&(h=-1*u)),0!==d||0!==u){if(1===a.deltaMode){var g=t.data(this,"mousewheel-line-height");h*=g,d*=g,u*=g}else if(2===a.deltaMode){var v=t.data(this,"mousewheel-page-height");h*=v,d*=v,u*=v}if(p=Math.max(Math.abs(d),Math.abs(u)),(!o||o>p)&&(o=p,n(a,p)&&(o/=40)),n(a,p)&&(h/=40,u/=40,d/=40),h=Math[h>=1?"floor":"ceil"](h/o),u=Math[u>=1?"floor":"ceil"](u/o),d=Math[d>=1?"floor":"ceil"](d/o),c.settings.normalizeOffset&&this.getBoundingClientRect){var _=this.getBoundingClientRect();f=e.clientX-_.left,m=e.clientY-_.top}return e.deltaX=u,e.deltaY=d,e.deltaFactor=o,e.offsetX=f,e.offsetY=m,e.deltaMode=0,r.unshift(e,h,u,d),s&&clearTimeout(s),s=setTimeout(i,200),(t.event.dispatch||t.event.handle).apply(this,r)}}function i(){o=null}function n(t,e){return c.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120===0}var s,o,a=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(t.event.fixHooks)for(var h=a.length;h;)t.event.fixHooks[a[--h]]=t.event.mouseHooks;var c=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var i=r.length;i;)this.addEventListener(r[--i],e,!1);else this.onmousewheel=e;t.data(this,"mousewheel-line-height",c.getLineHeight(this)),t.data(this,"mousewheel-page-height",c.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var i=r.length;i;)this.removeEventListener(r[--i],e,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var i=t(e),n=i["offsetParent"in t.fn?"offsetParent":"parent"]();return n.length||(n=t("body")),parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel");
},unmousewheel:function(t){return this.unbind("mousewheel",t)}})}),function(t,e){function i(){s||(t(window).on("beforeunload",function(e){if(nextend.askToSave&&s+18e4<t.now()){var i={changed:!1};if(t(window).triggerHandler("n2-before-unload",i),i.changed){var n=n2_("The changes you made will be lost if you navigate away from this page.");return(e||window.event).returnValue=n,n}}}),s=t.now())}function n(e,n,s){this.form=t("#"+e).on("saved",t.proxy(this.onSaved,this)).data("form",this),this.onSaved(),this.url=n,this.values=s,"undefined"!=typeof document.formvalidator&&(document.formvalidator.isValid=function(){return!0}),t(window).on("n2-before-unload",t.proxy(this.onBeforeUnload,this)),i(),t("input, textarea").on("keyup",function(t){27==t.which&&(t.target.blur(),t.stopPropagation())})}var s=!1;n.prototype.onBeforeUnload=function(t,e){!e.changed&&this.isChanged()&&(e.changed=!0)},n.prototype.isChanged=function(){return this.form.triggerHandler("checkChanged"),this.serialized!=this.form.serialize()},n.prototype.onSaved=function(){this.serialized=this.form.serialize()},n.submit=function(t){return nextend.askToSave=!1,setTimeout(function(){n2(t).submit()},300),!1},e.NextendForm=n,t(window).ready(function(){t("input[data-disabled]").on("focus",function(){this.blur()})})}(n2,window),N2Require("FormElement",[],[],function(t,e,i){function n(){this.connectedField=null,this.element.data("field",this)}return n.prototype.triggerOutsideChange=function(){this.element.triggerHandler("outsideChange",this),this.element.triggerHandler("nextendChange",this)},n.prototype.triggerInsideChange=function(){this.element.triggerHandler("insideChange",this),this.element.triggerHandler("nextendChange",this)},n.prototype.focus=function(t){this.connectedField&&this.connectedField.focus(t)},n}),N2Require("FormElementText",["FormElement"],[],function(t,e,i){function n(i){this.element=t("#"+i).on({focus:t.proxy(this._focus,this),blur:t.proxy(this._blur,this),change:t.proxy(this.change,this)}),this.tagName=this.element.prop("tagName"),this.parent=this.element.parent(),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype._focus=function(){this.parent.addClass("focus"),"TEXTAREA"!=this.tagName&&this.element.on("keypress.n2-text",t.proxy(function(t){13==t.which&&(this.element.off("keypress.n2-text"),this.element.trigger("blur"))},this))},n.prototype._blur=function(){this.parent.removeClass("focus")},n.prototype.change=function(){this.triggerOutsideChange()},n.prototype.insideChange=function(t){this.element.val(t),this.triggerInsideChange()},n.prototype.focus=function(t){this.connectedField?this.connectedField.focus(t):t&&this.element.focus().select()},n}),N2Require("FormElementAutocompleteSimple",[],[],function(t,e,i){function n(e,i){this.element=t("#"+e).data("autocomplete",this),this.element.nextendAutocomplete({appendTo:"body",minLength:0,position:{my:"center top",at:"center bottom",collision:"flip"},source:function(t,e){e(i)},select:function(e,i){return t(this).val(i.item.value).trigger("change"),!1}}).click(function(){t(this).nextendAutocomplete("search","")})}return n}),N2Require("FormElementAutocompleteSlider",[],[],function(t,e,i){function n(e,i){this.localChange=!1,this.element=t("#"+e).data("autocomplete",this);var n=this.element.parent().on({"mouseenter.n2slider":t.proxy(this.startSlider,this,i)}),s=n.siblings(".n2-form-element-units").find("> input");if(i.units&&s.length){var o=i.units;s.on("nextendChange",t.proxy(function(){i.min=o[s.val()+"min"],i.max=o[s.val()+"max"],this.slider&&(this.slider.slider("option","min",i.min),this.slider.slider("option","max",i.max))},this))}}return n.prototype.startSlider=function(e,i){this.element.parent().off(".n2slider"),this.slider||(this.slider=t("<div></div>").appendTo(t('<div class="n2-ui-slider-container"></div>').insertAfter(this.element)).removeAttr("slide").prop("slide",!1).slider(t.extend({start:t.proxy(function(){this.element.parent().addClass("n2-active")},this),stop:t.proxy(function(){this.element.parent().removeClass("n2-active")},this),slide:t.proxy(function(t,e){this.localChange=!0,this.element.val(e.value).trigger("change"),this.localChange=!1},this)},e)),"undefined"!=typeof this.slider[0].slide&&(this.slider[0].slide=null),this.element.on("nextendChange",t.proxy(function(){if(!this.localChange){var t=this.element.val();t==parseFloat(t)&&this.slider.slider("value",parseFloat(this.element.val()))}},this))),this.slider.slider("value",parseFloat(this.element.val()))},n}),N2Require("FormElementAutocomplete",[],[],function(t,e,i){function n(e,i){this.tags=i,this.element=t("#"+e).data("autocomplete",this),this.element.on("keydown",function(e){e.keyCode===t.ui.keyCode.TAB&&t(this).nextendAutocomplete("instance").menu.active&&e.preventDefault()}).nextendAutocomplete({minLength:0,position:{my:"left top-2",of:this.element.parent(),collision:"flip"},source:t.proxy(function(e,i){var n=e.term.split(/,/),s=[];t.each(this.tags,function(t,e){-1===n.indexOf(e)&&s.push(e)}),i(s)},this),focus:function(){return!1},select:function(e,i){var n=this.value.split(/,/);return n.pop(),n.push(i.item.value),n.push(""),this.value=n.join(","),t(this).trigger("change").nextendAutocomplete("search"),!1}}).click(function(){t(this).nextendAutocomplete("search")}),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this))}return n.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.element.val("").trigger("change")},n.prototype.setTags=function(t){this.tags=t},n}),N2Require("BasicCSSFont",["BasicCSSSkeleton"],[],function(t,e,i){function n(){this._singular="font",this._prular="fonts",e.BasicCSSSkeleton.prototype.constructor.apply(this,arguments),this.form={afont:t("#layerfamily"),color:t("#layercolor"),size:t("#layersize"),bold:t("#layerweight"),weight:t("#layerweight"),lineheight:t("#layerlineheight"),align:t("#layertextalign").on("nextendChange",t.proxy(function(e){if(!this.manager.underActivate&&!this.manager.inPresetList)switch(t(e.currentTarget).val()){case"left":case"justify":nextend.smartSlider.canvasManager.mainContainer.getSelectedLayer().setProperty("align","left","layer");break;case"right":nextend.smartSlider.canvasManager.mainContainer.getSelectedLayer().setProperty("align","right","layer");break;default:nextend.smartSlider.canvasManager.mainContainer.getSelectedLayer().setProperty("align","center","layer")}},this)),underline:t("#layerdecoration"),italic:t("#layerdecoration")},this.loaded()}return n.prototype=Object.create(e.BasicCSSSkeleton.prototype),n.prototype.constructor=n,n.prototype._transformsize=function(t){return t.split("||").join("|*|")},n.prototype._setsize=function(t,e){t.size=e.replace("|*|","||")},n.prototype._transformweight=function(t){return parseInt(t)},n.prototype._setweight=function(t,e){t.weight=parseInt(e)},n.prototype._transformunderline=function(t){return[1==this.value[this.activeTab].italic?"italic":"",1==t?"underline":""].join("||")},n.prototype._setunderline=function(t,e){var i=e.split("||");t.underline="underline"==i[1]?1:0},n.prototype._transformitalic=function(t){return[1==t?"italic":"",1==this.value[this.activeTab].underline?"underline":""].join("||")},n.prototype._setitalic=function(t,e){var i=e.split("||");t.italic="italic"==i[0]?1:0},n}),N2Require("BasicCSSSkeleton",[],[],function(t,e,i){function n(e){this.hasVisuals=!1,this.isInsideChange=!1,this.isReload=!1,this.manager=e,this.$container=e.$container.find("#n2-tab-basiccss"+this._singular),this.$visuals=this.$container.find(".n2-css-name"),this.$visualsLabel=this.$visuals.find(".n2-css-name-label"),this.$visualsList=this.$visuals.find(".n2-css-name-list"),this.$tabsContainer=this.$container.find(".n2-css-tab"),this.$reset=this.$container.find(".n2-css-tab-reset").on("click",t.proxy(function(t){this.value[this.activeTab]={},this._lazySave(t),this.activateTab(this.activeTab)},this)),this.$more=this.$container.find(".n2-basiccss-more").on("click",t.proxy(function(t){t.preventDefault(),this.visuals[this.activeVisual].field.show(t)},this)),this.activeVisual=0,this.activeTab=0,this.tabs=[]}return n.prototype.loaded=function(){for(var e in this.form)this.form[e].on({nextendChange:t.proxy(this.changeValue,this,e)})},n.prototype.changeValue=function(t,e){this.isReload||("function"==typeof this["_set"+t]?this["_set"+t](this.value[this.activeTab],this.form[t].val()):this.value[this.activeTab][t]=this.form[t].val(),this._lazySave(e))},n.prototype._lazySave=NextendDeBounce(function(t){this.isInsideChange=!0;var e=this.getBase64();this.visuals[this.activeVisual].field.save(t,e),this.visuals[this.activeVisual].value=e,this.isInsideChange=!1},50),n.prototype.save=function(t){this.isInsideChange=!0;for(var e in t)this.visualsByName[e].field.save({},t[e]),this.visualsByName[e].value=t[e];this.isInsideChange=!1},n.prototype.getBase64=function(){return Base64.encode(JSON.stringify({name:n2_("Static"),data:this.value}))},n.prototype.load=function(e,i){if(this.hasVisuals=i.length>0,this.$container.toggleClass("n2-css-has-"+this._singular,this.hasVisuals),this.hasVisuals){this.visuals=[],this.visualsByName={},this.$visualsList.html(""),this.$visuals.toggleClass("n2-multiple",i.length>1);for(var n=0;n<i.length;n++){var s=i[n];this.visualsByName[s.name]={value:e[s.name],mode:s.mode,field:s.field},s.field.element.off(".basiccss").on("outsideChange.basiccss",t.proxy(this.loadSingleValue,this,n,s.name)),this.visuals.push(this.visualsByName[s.name]),t("<span>"+s.field.getLabel()+"</span>").on("click",t.proxy(function(t,e){this.activateVisual(t),this.activateTab(0)},this,n)).appendTo(this.$visualsList)}this.activateVisual(0),this.activateTab(0)}},n.prototype.loadSingleValue=function(t,e,i){this.isInsideChange||(this.visuals[t].value=this.visuals[t].field.element.val(),this.activeVisual==t&&(this.activateVisual(t),this.activateTab(this.activeTab)))},n.prototype.activateVisual=function(e){this.activeVisual=e,this.$visualsLabel.html(this.visuals[e].field.getLabel()),nextend[this._singular+"Manager"].getDataFromController(this.visuals[e].value,{previewMode:this.visuals[e].mode},t.proxy(function(t,e){this.value=t,this.setTabs(e)},this))},n.prototype.activateTab=function(e){this.isReload=!0,this.activeTab=e,this.$container.toggleClass("n2-css-show-reset",0!=e);var i=0==e?this.value[e]:t.extend({},this.value[0],this.value[e]);for(var n in i)"undefined"!=typeof this.form[n]&&("function"==typeof this["_transform"+n]?this.form[n].data("field").insideChange(this["_transform"+n](i[n])):this.form[n].data("field").insideChange(i[n]));this.$tabs.removeClass("n2-active").eq(e).addClass("n2-active"),this.isReload=!1},n.prototype.setTabs=function(e){this.tabs=e,this.$tabsContainer.html("");for(var i=0;i<e.length;i++)t("<span>"+e[i]+"</span>").on("click",t.proxy(function(t,e){this.activateTab(t)},this,i)).appendTo(this.$tabsContainer);this.$tabs=this.$tabsContainer.find("span")},n.prototype.serialize=function(){if(this.hasVisuals){var t={};for(var e in this.visualsByName)t[e]=this.visualsByName[e].value;return t}return{}},n.prototype.unSerialize=function(t){for(var e in t)this.visualsByName[e].field.save({},t[e]),this.visualsByName[e].value=t[e]},n}),N2Require("BasicCSSStyle",["BasicCSSSkeleton"],[],function(t,e,i){function n(){this._singular="style",this._prular="styles",e.BasicCSSSkeleton.prototype.constructor.apply(this,arguments),this.form={backgroundcolor:t("#layerbackgroundcolor"),opacity:t("#layeropacity"),padding:t("#layerpadding"),border:t("#layerborder"),borderradius:t("#layerborderradius")},this.loaded()}return n.prototype=Object.create(e.BasicCSSSkeleton.prototype),n.prototype.constructor=n,n}),N2Require("BasicCSS",[],[],function(t,e,i){function n(i,n){this.underActivate=!1,this.inPresetList=!1,this.$container=t("#"+i),this.ajaxUrl=n,this.throttleSetTimeout=null,this.throttleExitTimeout=null,this.storage={},this.assets={font:new e.BasicCSSFont(this),style:new e.BasicCSSStyle(this)},this.$preset=t('<div id="n2-tab-basiccsspreset"><div class="n2-editor-header n2-h2 n2-uc"><span class="n2-css-name n2-css-name-label">'+n2_("Preset")+"</span></div></div>").prependTo(this.$container),t('<div class="n2-ss-editor-window-notice n2-ss-responsive-helper n2-h5">'+n2_(window.n2_printf('NOTE: Layer design changes apply to each device. Watch <a href="%s" target="_blank">video tutorial</a> to learn responsive tools.',"https://www.youtube.com/watch?v=yGpVsrzwt1U&index=4&list=PLSawiBnEUNfvzcI3pBHs4iKcbtMCQU0dB"))+"</div>").prependTo(this.$container);var s=t('<div class="n2-ss-button-container"></div>').insertAfter(this.$preset.find(".n2-css-name"));t('<a class="n2-button n2-button-icon n2-button-s n2-radius-s n2-button-darker n2-h5 n2-uc" href="#" data-n2tip="'+n2_("Reset design to default")+'"><i class="n2-i n2-i-reset2"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.exitPresetList(this.defs,t)},this)).appendTo(s),t('<a class="n2-basiccss-save n2-button n2-button-icon n2-button-s n2-radius-s n2-button-darker n2-h5 n2-uc" href="#" data-n2tip="'+n2_("Save design as new preset")+'"><i class="n2-i n2-i-save"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.saveAsNew()},this)).appendTo(s),this.$presets=t('<div id="n2-tab-basiccsspresets"></div>').appendTo(this.$container),t('<a class="n2-basiccss-choose n2-button n2-button-icon n2-button-s n2-radius-s n2-button-green n2-h5 n2-uc" data-n2tip="'+n2_("Load design")+'" href="#"><i class="n2-i n2-i-addlayer2"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.showList()},this)).appendTo(s),t('<a class="n2-basiccss-back n2-button n2-button-icon n2-button-s n2-radius-s n2-button-grey n2-h5 n2-uc" href="#"><i class="n2-i n2-i-closewindow"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.exitPresetList(!1,t)},this)).appendTo(s),nextend.basicCSS=this}return n.prototype.showList=function(){this.inPresetList=!0,this.lastState=this.serialize(),t.when(this.loadType()).done(t.proxy(function(t){this.$presets.append(this.storage[this.type]),this.$container.addClass("n2-basiccss-show-preset-list")},this)),this.$presets.on("mouseleave",t.proxy(function(){this.throttledUnSerialize(this.lastState)},this))},n.prototype.activate=function(e,i,n){this.inPresetList&&this.exitPresetList(!1),this.underActivate=!0,this.type&&this.type!==e&&"undefined"!=typeof this.storage[this.type]&&this.storage[this.type].detach();var s=!1;this.defs={font:[],style:[]},this.type=e;for(var o in this.assets){for(var a=0;a<n[o].length;a++)this.defs[o][n[o][a].name]=n[o][a].def;this.assets[o].load(i,n[o]),s=s||this.assets[o].hasVisuals}t("#n2-ss-layer-window").toggleClass("n2-ss-has-design-option",s),s||t('#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td[data-tab="style"]').hasClass("n2-active")&&t('#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td[data-tab="item"]').trigger("click"),this.underActivate=!1},n.prototype.deActivate=function(){this.inPresetList&&this.exitPresetList(!1)},n.prototype.serialize=function(){var t={};for(var e in this.assets)t[e]=this.assets[e].serialize();return t},n.prototype.unSerialize=function(t){for(var e in this.assets)this.assets[e].unSerialize(t[e])},n.prototype.throttledUnSerialize=function(e){this._addThrottledRenderTimeout(t.proxy(this.unSerialize,this,e))},n.prototype.saveAsNew=function(e){if("undefined"==typeof this.saveAsModal){var i=this;this.saveAsModal=new NextendModal({zero:{size:[500,220],title:n2_("Save as"),close:!0,content:'<form class="n2-form"></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Save as new")+"</a>"],fn:{show:function(){var e=this.controls.find(".n2-button"),n=(this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),e.trigger("click")}).append(this.createInput(n2_("Name"),"n2-visual-name","width: 446px;")),this.content.find("#n2-visual-name").focus());e.on("click",t.proxy(function(e){e.preventDefault();var s=n.val();""==s?nextend.notificationCenter.error(n2_("Please fill the name field!")):NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(i.ajaxUrl,{nextendaction:"addVisual"}),data:{type:i.type,value:Base64.encode(JSON.stringify({name:s,data:i.serialize()}))},dataType:"json"}).done(t.proxy(function(n){t.when(i.loadType()).done(function(){i.addVisual(n.data.visual).prependTo(i.storage[i.type])}),this.hide(e)},this))},this))}}}},!1)}this.saveAsModal.show()},n.prototype.loadType=function(){if("undefined"==typeof this.storage[this.type]){var e=t.Deferred(),i=t.proxy(function(i){this.storage[this.type]=t('<ul class="n2-list n2-h4"></ul>');for(var n=0;n<i.length;n++)this.addVisual(i[n]);e.resolve()},this);"undefined"==typeof window[this.type]?(this.storage[this.type]=e,NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"loadVisuals"}),data:{type:this.type},dataType:"json"}).done(t.proxy(function(t){i(t.data.visuals)},this))):i(window[this.type])}return this.storage[this.type]},n.prototype.addVisual=function(e){var i=e.value;"{"!=i[0]&&(i=Base64.decode(i));var n=JSON.parse(i),s=t('<li><a href="#">'+n.name+"</a></li>").on({mouseenter:t.proxy(function(t,e){this.throttledUnSerialize(t.data)},this,n),click:t.proxy(function(t,e){e.preventDefault(),this.exitPresetList(t,e)},this,n.data)}).appendTo(this.storage[this.type]);if(e.id>1e4){var o=t('<span class="n2-actions"></span>').appendTo(s);t('<div class="n2-button n2-button-icon n2-button-s" data-n2tip="Overwrite preset"><i class="n2-i n2-i-save n2-i-grey-opacity"></i></div>').on("click",t.proxy(function(e,i,n){n.stopPropagation(),NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"changeVisual"}),data:{visualId:e,value:Base64.encode(JSON.stringify({name:i,data:this.lastState})),type:this.type},dataType:"json"}).done(t.proxy(function(t){s.replaceWith(this.addVisual(t.data.visual))},this))},this,e.id,n.name)).appendTo(o),t('<div class="n2-button n2-button-icon n2-button-s"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(function(e,i){i.preventDefault(),i.stopPropagation(),NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"deleteVisual"}),data:{visualId:e,type:this.type},dataType:"json"}).done(t.proxy(function(t){s.remove()},this))},this,e.id)).appendTo(o),nextend.tooltip.add(o)}return s},n.prototype.exitPresetList=function(t,e){this.throttleSetTimeout&&clearTimeout(this.throttleSetTimeout),this.$presets.off("mouseleave"),t?(this.inPresetList=!1,this.unSerialize(t)):this.unSerialize(this.lastState),this.$container.removeClass("n2-basiccss-show-preset-list"),this.inPresetList=!1},n.prototype._addThrottledRenderTimeout=function(t){this.throttleSetTimeout&&clearTimeout(this.throttleSetTimeout),this.throttleSetTimeout=setTimeout(t,100)},n.prototype._addThrottledExitTimeout=function(t){this.throttleExitTimeout&&clearTimeout(this.throttleExitTimeout),this.throttleExitTimeout=setTimeout(t,100)},n}),N2Require("FormElementCheckbox",["FormElement"],[],function(t,e,i){function n(i,n){this.separator="||",this.element=t("#"+i),this.values=n,this.checkboxes=this.element.parent().find(".n2-checkbox-option"),this.states=this.element.val().split(this.separator);for(var s=0;s<this.checkboxes.length;s++)"undefined"!=typeof this.states[s]&&this.states[s]==this.values[s]||(this.states[s]=""),this.checkboxes.eq(s).on("click",t.proxy(this.switchCheckbox,this,s));e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.switchCheckbox=function(t){this.states[t]==this.values[t]?(this.states[t]="",this.setSelected(t,0)):(this.states[t]=this.values[t],this.setSelected(t,1)),this.element.val(this.states.join(this.separator)),this.triggerOutsideChange()},n.prototype.insideChange=function(t){for(var e=t.split(this.separator),i=0;i<this.checkboxes.length;i++)"undefined"==typeof e[i]||e[i]!=this.values[i]?(this.states[i]="",this.setSelected(i,0)):(this.states[i]=this.values[i],this.setSelected(i,1));this.element.val(this.states.join(this.separator)),this.triggerInsideChange()},n.prototype.setSelected=function(t,e){e?this.checkboxes.eq(t).addClass("n2-active"):this.checkboxes.eq(t).removeClass("n2-active")},n}),N2Require("FormElementColor",["FormElement"],[],function(t,e,i){function n(i,n){this.element=t("#"+i),1==n?this.alpha=!0:this.alpha=!1,this.element.off("change").n2spectrum({showAlpha:this.alpha,preferredFormat:1==this.alpha?"hex8":"hex6",showInput:!1,showButtons:!1,move:t.proxy(this.onMove,this),showSelectionPalette:!0,showPalette:!0,maxSelectionSize:6,localStorageKey:"color",palette:[["000000","55aa39","357cbd","bb4a28","8757b2","000000CC"],["81898d","5cba3c","4594e1","d85935","9e74c2","00000080"],["ced3d5","27ae60","01add3","e79d19","e264af","FFFFFFCC"],["ffffff","2ecc71","00c1c4","ecc31f","ec87c0","FFFFFF80"]]}).on("change",t.proxy(this.onChange,this)),this.text=this.element.data("field"),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.onMove=function(){this.element.val(this.getCurrent()),this.triggerOutsideChange()},n.prototype.onChange=function(t){var e=this.getCurrent(),i=this.element.val();e!=i&&(i.length>0&&"{"!=i.charAt(0)&&this.element.n2spectrum("set",i),this.triggerInsideChange(),this.triggerOutsideChange()),t.stopImmediatePropagation()},n.prototype.insideChange=function(t){this.element.val(t),this.element.n2spectrum("set",t),this.triggerInsideChange()},n.prototype.getCurrent=function(){return this.alpha?this.element.n2spectrum("get").toHexString8():this.element.n2spectrum("get").toHexString(!0)},n}),N2Require("FormElementDevice",["FormElementOnoff"],[],function(t,e,i){function n(t){e.FormElementOnoff.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElementOnoff.prototype),n.prototype.constructor=n,n.prototype.detach=function(){this.onoff.detach()},n.prototype.setSelected=function(t){t?this.onoff.addClass("n2-active"):this.onoff.removeClass("n2-active")},n}),N2Require("FormElementDevices",["FormElementDevice"],[],function(t,e,i){function n(i,n){this.$el=t("#"+i).data("field",this),this.fields={};for(var s=0;s<n.length;s++)this.fields[n[s]]=new e.FormElementDevice(i+"-"+n[s])}return n.prototype.setAvailableDevices=function(t){for(var e in t){var i=this.fields[e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()];t[e]||i.detach()}this.$el.children().first().addClass("n2-first"),this.$el.children().last().addClass("n2-last")},n}),N2Require("FormElementEnabled",[],[],function(t,e,i){function n(e,i){this.element=t("#"+e).on("nextendChange",t.proxy(this.onChange,this)),this.hide=this.element.closest("tr").nextAll().add(i),this.onChange()}return n.prototype.onChange=function(){var t=parseInt(this.element.val());t?this.hide.css("display",""):this.hide.css("display","none")},n}),N2Require("FormElementFolders",["FormElement"],[],function(t,e,i){function n(i,n){this.element=t("#"+i),this.field=this.element.data("field"),this.parameters=n,this.editButton=t("#"+i+"_edit").on("click",t.proxy(this.edit,this)),this.button=t("#"+i+"_button").on("click",t.proxy(this.open,this)),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this)),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.val("")},n.prototype.val=function(t){this.element.val(t),this.triggerOutsideChange()},n.prototype.open=function(e){e.preventDefault(),nextend.imageHelper.openFoldersLightbox(t.proxy(this.val,this))},n}),N2Require("FormElementFont",["FormElement"],[],function(t,e,i){function n(i,n){this.element=t("#"+i),this.parameters=n,this.defaultSetId=n.set,this.element.parent().on("click",t.proxy(this.show,this)),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this)),this.name=this.element.siblings("input"),nextend.fontManager.$.on("visualDelete",t.proxy(this.fontDeleted,this)),this.updateName(this.element.val()),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.getLabel=function(){return this.parameters.label},n.prototype.show=function(e){e.preventDefault(),""!=this.parameters.style&&nextend.fontManager.setConnectedStyle(this.parameters.style),""!=this.parameters.style2&&nextend.fontManager.setConnectedStyle2(this.parameters.style2),this.defaultSetId&&nextend.fontManager.changeSetById(this.defaultSetId),nextend.fontManager.show(this.element.val(),t.proxy(this.save,this),{previewMode:this.parameters.previewmode,previewHTML:this.parameters.preview})},n.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.val("")},n.prototype.save=function(t,e){nextend.fontManager.addVisualUsage(this.parameters.previewmode,e,window.nextend.pre),this.val(e)},n.prototype.val=function(t){this.element.val(t),this.updateName(t),this.triggerOutsideChange()},n.prototype.insideChange=function(t){this.element.val(t),this.updateName(t),this.triggerInsideChange()},n.prototype.updateName=function(e){t.when(nextend.fontManager.getVisual(e)).done(t.proxy(function(t){this.name.val(t.name)},this))},n.prototype.fontDeleted=function(t,e){e==this.element.val()&&this.insideChange("")},n.prototype.renderFont=function(){var t=this.element.val();return nextend.fontManager.addVisualUsage(this.parameters.previewmode,t,""),nextend.fontManager.getClass(t,this.parameters.previewmode)},n}),N2Require("FormElementIcon2Manager",["FormElement"],[],function(t,e,i){function n(i){this.element=t("#"+i),this.button=t("#"+i+"_edit").on("click",t.proxy(this.openModal,this)),this.preview=this.element.parent().find(".n2-form-element-preview").on("click",t.proxy(this.openModal,this)),this.element.on("nextendChange",t.proxy(this.makePreview,this)),e.FormElement.prototype.constructor.apply(this,arguments),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this))}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.val("")},n.prototype.insideChange=function(t){this.element.val(t),this.triggerInsideChange()},n.prototype.openModal=function(i){i&&i.preventDefault(),e.Icons.showModal(t.proxy(this.setIcon,this))},n.prototype.val=function(t){this.element.val(t),this.triggerOutsideChange()},n.prototype.setIcon=function(t){this.val(t)},n.prototype.makePreview=function(){var t=e.Icons.render(this.element.val());t?this.preview.html('<i class="n2i '+t["class"]+'">'+t.ligature+"</i>"):this.preview.html("")},n.prototype.focus=function(t){t&&this.openModal()},n}),N2Require("FormElementIconManager",["FormElement"],[],function(t,e,i){function n(){if(!o){var e="";o=new NextendModal({zero:{size:[1200,600],title:"Icons",back:!1,close:!0,content:e,fn:{show:function(){var e=this.content.find(".n2-icon");e.on("click",t.proxy(function(e){var i=t(e.currentTarget).clone(),n=i.find("svg");if(n[0].hasChildNodes())for(var s=n[0].childNodes,o=0;o<s.length;o++)s[o].setAttribute("data-style","{style}");a(i.html()),this.hide(e)},this))}}}},!1),o.setCustomClass("n2-icons-modal")}return o}function s(i){this.element=t("#"+i),this.button=t("#"+i+"_edit").on("click",t.proxy(this.openModal,this)),this.preview=this.element.parent().find("img").on("click",t.proxy(this.openModal,this)),this.element.on("nextendChange",t.proxy(this.makePreview,this)),e.FormElement.prototype.constructor.apply(this,arguments)}var o=null,a=function(){};return s.prototype=Object.create(e.FormElement.prototype),s.prototype.constructor=s,s.prototype.insideChange=function(t){this.element.val(t),this.triggerInsideChange()},s.prototype.openModal=function(e){e&&e.preventDefault(),a=t.proxy(this.setIcon,this),n().show()},s.prototype.val=function(t){this.element.val(t),this.triggerOutsideChange()},s.prototype.setIcon=function(t){this.val(t)},s.prototype.makePreview=function(){this.preview.attr("src","data:image/svg+xml;base64,"+Base64.encode(this.element.val()))},s.prototype.focus=function(t){t&&this.openModal()},s}),N2Require("FormElementImage",["FormElement"],[],function(t,e,i){function n(e,i){this.element=t("#"+e),this.field=this.element.data("field"),this.field.connectedField=this,this.parameters=i,this.preview=t("#"+e+"_preview").on("click",t.proxy(this.open,this)),this.editButton=t("#"+e+"_edit").on("click",t.proxy(this.edit,this)),this.element.on("nextendChange",t.proxy(this.makePreview,this)),this.button=t("#"+e+"_button").on("click",t.proxy(this.open,this)),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this))}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.val("")},n.prototype.val=function(e,i){var i=t.extend({alt:!1},i);i.alt&&""!=i.alt&&this.parameters.alt&&""!=this.parameters.alt&&t("#"+this.parameters.alt).val(i.alt).trigger("change"),this.element.val(e),this.triggerOutsideChange()},n.prototype.makePreview=function(){var t=this.element.val();"{"==t.substr(0,1)?this.preview.css("background-image",""):this.preview.css("background-image","url("+nextend.imageHelper.fixed(t)+")")},n.prototype.open=function(e){e&&e.preventDefault(),nextend.imageHelper.openLightbox(t.proxy(this.val,this))},n.prototype.edit=function(e){e.preventDefault(),e.stopPropagation();var i=nextend.imageHelper.fixed(this.element.val()),n=t('<img src="'+i+'" />');"//"==i.substr(0,2)&&(i=location.protocol+i),window.nextend.getFeatherEditor().done(t.proxy(function(){nextend.featherEditor.launch({image:n.get(0),hiresUrl:i,onSave:t.proxy(this.aviarySave,this),onSaveHiRes:t.proxy(this.aviarySave,this)})},this))},n.prototype.aviarySave=function(e,i){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(window.nextend.featherEditor.ajaxUrl,{nextendaction:"saveImage"}),data:{aviaryUrl:i},dataType:"json"}).done(t.proxy(function(t){this.val(nextend.imageHelper.make(t.data.image)),nextend.featherEditor.close()},this))},n.prototype.focus=function(t){t&&this.open()},n}),N2Require("FormElementImageManager",["FormElement"],[],function(t,e,i){function n(i,n){this.element=t("#"+i),t("#"+i+"_manage").on("click",t.proxy(this.show,this)),this.parameters=n,this.imageField=this.element.data("field"),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.show=function(e){e.preventDefault(),nextend.imageManager.show(this.element.val(),t.proxy(this.save,this))},n.prototype.save=function(){},n.prototype.insideChange=function(t){this.element.val(t),this.triggerInsideChange()},n}),N2Require("FormElementList",["FormElement"],[],function(t,e,i){function n(i,n){this.separator="||",this.element=t("#"+i).on("change",t.proxy(this.onHiddenChange,this)),this.select=t("#"+i+"_select").on("change",t.proxy(this.onChange,this)),this.multiple=n,e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.onHiddenChange=function(){var t=this.element.val();t&&t!=this.select.val()&&this.insideChange(t)},n.prototype.onChange=function(){var t=this.select.val();null!==t&&"object"==typeof t&&(t=t.join(this.separator)),this.element.val(t),this.triggerOutsideChange()},n.prototype.insideChange=function(t){"object"==typeof t?this.select.val(t.split(this.separator)):this.select.val(t),this.element.val(t),this.select.val(t),this.triggerInsideChange()},n}),N2Require("FormElementMarginPadding",["FormElementMixed"],[],function(t,e,i){function n(i,n,s){this.linkedValues=!1,e.FormElementMixed.prototype.constructor.apply(this,arguments),
this.$field=this.element.parent(),this.$field.find(".n2-text-sub-label").on("click",t.proxy(function(t){t.preventDefault(),this.linkedValues=!this.linkedValues,this.$field.toggleClass("n2-values-linked",this.linkedValues),this.linkedValues&&this.elements[0].trigger("change")},this))}return n.prototype=Object.create(e.FormElementMixed.prototype),n.prototype.constructor=n,n.prototype.onFieldChange=function(){if(this.linkedValues)for(var t=this.elements[0].val(),e=1;4>e;e++)this.elements[e].data("field").insideChange(t);this.element.val(this.getValue()),this.triggerOutsideChange()},n.prototype.insideChange=function(t){e.FormElementMixed.prototype.insideChange.apply(this,arguments),this.linkedValues=!0;for(var t=this.elements[0].val(),i=1;4>i;i++)if(t!=this.elements[i].val()){this.linkedValues=!1;break}this.$field.toggleClass("n2-values-linked",this.linkedValues)},n}),N2Require("FormElementMirror",[],[],function(t,e,i){function n(e){this.element=t("#"+e).on("nextendChange",t.proxy(this.onChange,this)),this.tr=this.element.closest("tr").nextAll(),this.onChange()}return n.prototype.onChange=function(){var t=parseInt(this.element.val());t?this.tr.css("display","none"):this.tr.css("display","")},n}),N2Require("FormElementMixed",["FormElement"],[],function(t,e,i){function n(i,n,s){this.element=t("#"+i),this.elements=[];for(var o=0;o<n.length;o++)this.elements.push(t("#"+n[o]).on("outsideChange",t.proxy(this.onFieldChange,this)));this.separator=s,e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.onFieldChange=function(){this.element.val(this.getValue()),this.triggerOutsideChange()},n.prototype.insideChange=function(t){this.element.val(t);for(var e=t.split(this.separator),i=0;i<this.elements.length;i++)this.elements[i].data("field").insideChange(e[i]);this.triggerInsideChange()},n.prototype.getValue=function(){for(var t=[],e=0;e<this.elements.length;e++)t.push(this.elements[e].val());return t.join(this.separator)},n}),N2Require("FormElementNumber",["FormElement"],[],function(t,e,i){function n(i,n,s,o){this.min=n,this.max=s,this.element=t("#"+i).on({focus:t.proxy(this._focus,this),blur:t.proxy(this.blur,this),change:t.proxy(this.change,this)}),this.parent=this.element.parent();var a=this.parent.siblings(".n2-form-element-units").find("> input");o&&a.length&&a.on("nextendChange",t.proxy(function(){this.min=o[a.val()+"min"],this.max=o[a.val()+"max"]},this)),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype._focus=function(){this.parent.addClass("focus"),this.element.on("keypress.n2-text",t.proxy(function(t){13==t.which&&(this.element.off("keypress.n2-text"),this.element.trigger("blur"))},this))},n.prototype.blur=function(){this.parent.removeClass("focus")},n.prototype.change=function(){var t=this.validate(this.element.val());t===!0?this.triggerOutsideChange():this.element.val(t).trigger("change")},n.prototype.insideChange=function(t){var e=this.validate(t);e===!0?this.element.val(t):this.element.val(e),this.triggerInsideChange()},n.prototype.validate=function(t){var e=parseFloat(t);return isNaN(e)&&(e=0),e=Math.max(this.min,Math.min(this.max,e)),e!=t?e:!0},n}),N2Require("FormElementOnoff",["FormElement"],[],function(t,e,i){function n(i){this.element=t("#"+i),this.onoff=this.element.parent().on("click",t.proxy(this["switch"],this)),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype["switch"]=function(){var t=parseInt(this.element.val());t=t?0:1,this.element.val(t),this.setSelected(t),this.triggerOutsideChange()},n.prototype.insideChange=function(t){t=parseInt(t),this.element.val(t),this.setSelected(t),this.triggerInsideChange()},n.prototype.setSelected=function(t){t?this.onoff.addClass("n2-onoff-on"):this.onoff.removeClass("n2-onoff-on")},n}),N2Require("FormElementRadio",["FormElement"],[],function(t,e,i){function n(i,n){this.element=t("#"+i),this.values=n,this.parent=this.element.parent(),this.options=this.parent.find(".n2-radio-option");for(var s=0;s<this.options.length;s++)this.options.eq(s).on("click",t.proxy(this.click,this));e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.click=function(t){this.changeSelectedIndex(this.options.index(t.currentTarget))},n.prototype.changeSelectedIndex=function(t){var e=this.values[t];this.element.val(e),this.setSelected(t),this.triggerOutsideChange()},n.prototype.insideChange=function(e,i){var n=t.inArray(e,this.values);"-1"==n&&(n=this.partialSearch(e)),"-1"==n&&"undefined"!=typeof i&&(n=this.addOption(e,i)),"-1"!=n?(this.element.val(this.values[n]),this.setSelected(n),this.triggerInsideChange()):this.options.eq(0).trigger("click")},n.prototype.setSelected=function(t){this.options.removeClass("n2-active"),this.options.eq(t).addClass("n2-active")},n.prototype.partialSearch=function(t){t=t.replace(/^.*[\\\/]/,"");for(var e=0;e<this.values.length;e++)if(-1!=this.values[e].indexOf(t))return e;return-1},n.prototype.addOption=function(e,i){var n=this.values.push(e)-1;return i.appendTo(this.parent).on("click",t.proxy(this.click,this)),this.options=this.options.add(i),n},n.prototype.addTabOption=function(e,i){var n=this.values.push(e)-1,s=t('<div class="n2-radio-option n2-h4 n2-last">'+i+"</div>").insertAfter(this.options.last().removeClass("n2-last")).on("click",t.proxy(this.click,this));return this.options=this.options.add(s),n},n.prototype.removeTabOption=function(e){var i=t.inArray(e,this.values),n=this.options.eq(i);this.options=this.options.not(n),n.remove(),0==i&&this.options.eq(0).addClass("n2-first"),i==this.options.length&&this.options.eq(this.options.length-1).addClass("n2-last"),this.values.splice(i,1)},n.prototype.moveTab=function(t,e){},n}),N2Require("FormElementRichText",["FormElementText"],[],function(t,e,i){function n(i){e.FormElementText.prototype.constructor.apply(this,arguments),this.parent.find(".n2-textarea-rich-bold").on("click",t.proxy(this.bold,this)),this.parent.find(".n2-textarea-rich-italic").on("click",t.proxy(this.italic,this)),this.parent.find(".n2-textarea-rich-link").on("click",t.proxy(this.link,this))}return n.prototype=Object.create(e.FormElementText.prototype),n.prototype.constructor=n,n.prototype.bold=function(){this.wrapText("<b>","</b>")},n.prototype.italic=function(){this.wrapText("<i>","</i>")},n.prototype.link=function(){this.wrapText('<a href="">',"</a>")},n.prototype.list=function(){this.wrapText("","\n<ul>\n<li>#1 Item</li>\n<li>#2 Item</li>\n</ul>\n")},n.prototype.wrapText=function(t,e){var i=this.element,n=i.val().length,s=i[0].selectionStart,o=i[0].selectionEnd,a=i.val().substring(s,o),r=t+a+e;i.val(i.val().substring(0,s)+r+i.val().substring(o,n)),this.triggerOutsideChange(),this.element.focus()},n}),N2Require("FormElementSkin",["FormElement"],[],function(t,e,i){function n(i,n,s,o){this.element=t("#"+i),this.preId=n,this.skins=s,this.list=this.element.data("field"),this.fixedMode=o,this.firstOption=this.list.select.find("option").eq(0),this.originalText=this.firstOption.text(),this.element.on("nextendChange",t.proxy(this.onSkinSelect,this)),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.onSkinSelect=function(){var e=this.element.val();if("0"!=e){e=this.skins[e];for(var i in e)if(e.hasOwnProperty(i)){var n=t("#"+this.preId+i);if(n.length){var s=n.data("field");s.insideChange(e[i])}}this.fixedMode||(this.changeFirstOptionText(n2_("Done")),this.list.insideChange("0"),setTimeout(t.proxy(this.changeFirstOptionText,this,this.originalText),3e3))}},n.prototype.changeFirstOptionText=function(t){this.firstOption.text(t)},n.prototype.insideChange=function(t){this.element.val(t),this.list.select.val(t)},n}),N2Require("FormElementStyle",["FormElement"],[],function(t,e,i){function n(i,n){this.element=t("#"+i),this.parameters=n,this.defaultSetId=n.set,this.element.parent().on("click",t.proxy(this.show,this)),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this)),this.name=this.element.siblings("input"),nextend.styleManager.$.on("visualDelete",t.proxy(this.styleDeleted,this)),this.updateName(this.element.val()),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.getLabel=function(){return this.parameters.label},n.prototype.show=function(e){e.preventDefault(),""!=this.parameters.font&&nextend.styleManager.setConnectedFont(this.parameters.font),""!=this.parameters.font2&&nextend.styleManager.setConnectedFont2(this.parameters.font2),""!=this.parameters.style2&&nextend.styleManager.setConnectedStyle(this.parameters.style2),this.defaultSetId&&nextend.styleManager.changeSetById(this.defaultSetId),nextend.styleManager.show(this.element.val(),t.proxy(this.save,this),{previewMode:this.parameters.previewmode,previewHTML:this.parameters.preview})},n.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.val("")},n.prototype.save=function(t,e){nextend.styleManager.addVisualUsage(this.parameters.previewmode,e,window.nextend.pre),this.val(e)},n.prototype.val=function(t){this.element.val(t),this.updateName(t),this.triggerOutsideChange()},n.prototype.insideChange=function(t){this.element.val(t),this.updateName(t),this.triggerInsideChange()},n.prototype.updateName=function(e){t.when(nextend.styleManager.getVisual(e)).done(t.proxy(function(t){this.name.val(t.name)},this))},n.prototype.styleDeleted=function(t,e){e==this.element.val()&&this.insideChange("")},n.prototype.renderStyle=function(){var t=this.element.val();return nextend.styleManager.addVisualUsage(this.parameters.previewmode,t,""),nextend.styleManager.getClass(t,this.parameters.previewmode)},n}),N2Require("FormElementSubform",["FormElement"],[],function($,scope,undefined){function FormElementSubform(t,e,i,n){this.id=t,this.element=$("#"+t),this.target=$("#"+e),this.tab=i,this.originalValue=n,this.form=this.element.closest("form").data("form"),this.list=this.element.data("field"),this.element.on("nextendChange",$.proxy(this.loadSubform,this)),scope.FormElement.prototype.constructor.apply(this,arguments)}return FormElementSubform.prototype=Object.create(scope.FormElement.prototype),FormElementSubform.prototype.constructor=FormElementSubform,FormElementSubform.prototype.loadSubform=function(){var t=this.element.val();if("disabled"==t)this.target.html("");else{var e=[];t==this.originalValue&&(e=this.form.values);var i={id:this.id,values:e,tab:this.tab,value:t};NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.form.url),data:i,dataType:"json"}).done($.proxy(this.load,this))}},FormElementSubform.prototype.load=function(response){this.target.html(response.data.html),eval(response.data.scripts),nextend.tooltip.add(this.target)},FormElementSubform}),N2Require("FormElementSubformImage",["FormElement"],[],function(t,e,i){function n(i,n){this.element=t("#"+i),this.options=t("#"+n).find(".n2-subform-image-option"),this.subform=this.element.data("field"),this.active=this.getIndex(this.options.filter(".n2-active").get(0));for(var s=0;s<this.options.length;s++)this.options.eq(s).on("click",t.proxy(this.selectOption,this));e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.selectOption=function(t){var e=this.getIndex(t.currentTarget);if(e!=this.active){this.options.eq(e).addClass("n2-active"),this.options.eq(this.active).removeClass("n2-active"),this.active=e;var i=this.subform.list.select.find("option").eq(e).val();this.subform.list.insideChange(i)}},n.prototype.getIndex=function(e){return t.inArray(e,this.options)},n}),N2Require("FormElementSwitcher",["FormElement"],[],function(t,e,i){function n(i,n){this.element=t("#"+i),this.options=this.element.parent().find(".n2-switcher-unit"),this.active=this.options.index(this.options.filter(".n2-active")),this.values=n;for(var s=0;s<this.options.length;s++)this.options.eq(s).on("click",t.proxy(this["switch"],this,s));e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype["switch"]=function(t,e){this.element.val(this.values[t]),this.setSelected(t),this.triggerOutsideChange()},n.prototype.insideChange=function(e){var i=t.inArray(e,this.values);this.element.val(this.values[i]),this.setSelected(i),this.triggerInsideChange()},n.prototype.setSelected=function(t){this.options.eq(this.active).removeClass("n2-active"),this.options.eq(t).addClass("n2-active"),this.active=t},n}),N2Require("FormElementUnits",["FormElement"],[],function(t,e,i){function n(i,n){this.element=t("#"+i),this.options=this.element.parent().find(".n2-element-unit"),this.currentUnit=this.element.parent().find(".n2-element-current-unit"),this.values=n;for(var s=0;s<this.options.length;s++)this.options.eq(s).on("click",t.proxy(this["switch"],this,s));e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype["switch"]=function(t,e){this.element.val(this.values[t]),this.setSelected(t),this.triggerOutsideChange()},n.prototype.insideChange=function(e){var i=t.inArray(e,this.values);this.element.val(this.values[i]),this.setSelected(i),this.triggerInsideChange()},n.prototype.setSelected=function(t){this.currentUnit.html(this.options.eq(t).html())},n}),N2Require("FormElementUrl",["FormElement"],[],function(t,e,i){function n(e,i){this.element=t("#"+e),this.field=this.element.data("field"),this.parameters=i,s=this.parameters.url,this.button=t("#"+e+"_button").on("click",t.proxy(this.open,this)),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this))}var s="",o=null,a={},r=function(t){},l="";return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.val("#")},n.prototype.val=function(t){this.element.val(t),this.triggerOutsideChange()},n.prototype.open=function(e){e.preventDefault(),r=t.proxy(this.insert,this),l=this.element.val(),this.getModal().show()},n.prototype.insert=function(t){this.val(t)},n.prototype.getModal=function(){if(!o){var i=function(e){return"undefined"==typeof a[e]&&(a[e]=t.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(s),data:{keyword:e},dataType:"json"})),a[e]},n=this.parameters,h={size:[600,500],title:n2_("Link"),back:"zero",close:!0,content:'<div class="n2-form"></div>',fn:{show:function(){this.content.find(".n2-form").append(this.createInput(n2_("Keyword"),"n2-links-keyword","width:546px;"));var e=t("#n2-links-keyword"),n=this.createHeading("").appendTo(this.content),s=this.createResult().appendTo(this.content),a="";e.on("keyup",t.proxy(function(){a=e.val(),i(a).done(t.proxy(function(i){if(e.val()==a){var o=i.data;""==a?n.html(n2_("No search term specified. Showing recent items.")):n.html(n2_printf(n2_('Showing items match for "%s"'),a));for(var l=[],h=this,c=0;c<o.length;c++)l.push([o[c].title,o[c].info,t('<div class="n2-button n2-button-normal n2-button-xs n2-radius-s n2-button-green n2-uc n2-h5">'+n2_("Select")+"</div>").on("click",{permalink:o[c].link},function(t){r(t.data.permalink),h.hide()})]);s.html(""),this.createTable(l,["width:100%;","",""]).appendTo(this.createTableWrap().appendTo(s))}},this))},this)).trigger("keyup").focus(),this.content.append('<hr style="margin: 0 -20px;"/>');var h=t('<div class="n2-input-button"><input placeholder="External url" type="text" id="external-url" name="external-url" value="" /><a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">Insert</a></div>').css({display:"block",textAlign:"center"}).appendTo(this.content),c=h.find("input").val(l);h.find(".n2-button").on("click",function(t){t.preventDefault(),r(c.val()),o.hide()})}}};o=new NextendModal({zero:{size:[n.hasPosts?700:500,432],title:n2_("Link"),back:!1,close:!0,content:'<table class="n2-table-pane"><tr><td><img src="'+n.imageUrl+n.image+'"/><p style="min-height:36px;">'+n.labelDescription+'</p><a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-grey n2-h4 n2-uc">'+n.labelButton+'</a></td><td><img src="'+n.imageUrl+'/element/link_lightbox.png"/><p style="min-height:36px;">'+n2_("Create lightbox from image, video or iframe.")+'</p><a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-grey n2-h4 n2-uc">'+n2_("Lightbox")+'</a></td><td><img src="'+n.imageUrl+'/element/link_actions.png"/><p style="min-height:36px;">'+n2_("Create action for click or tap.")+'</p><a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-grey n2-h4 n2-uc">'+n2_("Actions")+"</a></td></tr></table>",fn:{show:function(){var e=this.content.find("td");n.hasPosts?e.eq(0).on("click",t.proxy(function(t){t.preventDefault(),this.loadPane("links")},this)):e.eq(0).css("display","none"),e.eq(1).on("click",t.proxy(function(t){t.preventDefault(),this.loadPane("lightbox")},this)),e.eq(2).on("click",t.proxy(function(t){t.preventDefault(),this.loadPane("actions")},this)),this.content.append('<hr style="margin: 0 -20px;"/>');var i=t('<div class="n2-input-button"><input placeholder="External url" type="text" id="external-url" name="external-url" value="" /><a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">Insert</a></div>').css({display:"block",textAlign:"center"}).appendTo(this.content),s=i.find("input").val(l);i.find(".n2-button").on("click",function(t){t.preventDefault(),r(s.val()),o.hide()})}}},lightbox:{size:[700,760],title:n2_("Lightbox"),back:"zero",close:!0,content:'<form class="n2-form"></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Insert")+"</a>"],fn:{show:function(){var e=this.controls.find(".n2-button"),i=t('<a href="#" class="n2-button n2-button-normal n2-button-m n2-radius-s n2-button-green n2-uc n2-h5" style="float:right; margin-right: 20px;">'+n2_("Choose images")+"</a>"),n=(this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),e.trigger("click")}).append(this.createTextarea(n2_("Content list")+" - "+n2_("One per line"),"n2-link-resource","width: 646px;height: 100px;white-space: pre;overflow-wrap: normal;overflow-x: scroll;")).append(i).append(this.createTextarea(n2_("Titles")+" - "+n2_("One per line"),"n2-link-resource-titles","width: 646px;height: 80px;white-space: pre;overflow-wrap: normal;overflow-x: scroll;")).append(this.createInputUnit(n2_("Autoplay duration"),"n2-link-autoplay","ms","width: 40px;")),this.content.find("#n2-link-resource").focus()),s=this.content.find("#n2-link-resource-titles"),o=this.content.find("#n2-link-autoplay").val(0);i.on("click",function(t){t.preventDefault(),nextend.imageHelper.openMultipleLightbox(function(t){for(var e=n.val().replace(/\n$/,""),i=0;i<t.length;i++)e+="\n"+t[i].image;n.val(e.replace(/^\n/,""))})});var a=l.match(/lightbox\[(.+)\]/);if(a&&2==a.length)if("{"==a[1][0])try{var h=JSON.parse(a[1]);n.val(h.urls.join("\n")),s.val(h.titles.join("\n")),o.val(h.autoplay)}catch(c){}else{var u=a[1].split(",");parseInt(u[u.length-1])>0&&(o.val(parseInt(u[u.length-1])),u.pop()),n.val(u.join("\n"))}this.content.append(this.createHeading(n2_("Examples"))),this.createTable([[n2_("Image"),"https://smartslider3.com/image.jpg"],["YouTube","https://www.youtube.com/watch?v=lsq09izc1H4"],["Vimeo","https://vimeo.com/144598279"],["Iframe","https://smartslider3.com"]],["",""]).appendTo(this.content),e.on("click",t.proxy(function(t){t.preventDefault();var e=n.val();if(""!=e){var i="";o.val()>0&&(i=","+o.val()),r("lightbox["+JSON.stringify({urls:n.val().split("\n"),titles:s.val().split("\n"),autoplay:Math.max(0,parseInt(o.val()))})+"]")}this.hide(t)},this))}}},links:h,actions:{size:[500,342],title:n2_("Actions"),back:"zero",close:!0,content:'<table class="n2-table-pane"><tr><td><a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-grey n2-h4 n2-uc">'+n2_("Scroll to")+'</a></td><td><a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-grey n2-h4 n2-uc">'+n2_("Go to slide")+'</a></td></tr><tr><td><a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-grey n2-h4 n2-uc">'+n2_("Previous slide")+'</a></td><td><a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-grey n2-h4 n2-uc">'+n2_("Next slide")+'</a></td></tr><tr><td><a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-grey n2-h4 n2-uc">'+n2_("Slide event")+'</a></td><td><a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-grey n2-h4 n2-uc">'+n2_("Go to slide ID")+"</a></td></tr></table>",fn:{show:function(){var e=this.content.find("td");e.eq(0).on("click",t.proxy(function(t){t.preventDefault(),this.loadPane("actionsScrollTo")},this)),e.eq(1).on("click",t.proxy(function(t){t.preventDefault(),this.loadPane("actionsGoTo")},this)),e.eq(2).on("click",t.proxy(function(t){t.preventDefault(),r("PreviousSlide[]"),o.hide()},this)),e.eq(3).on("click",t.proxy(function(t){t.preventDefault(),r("NextSlide[]"),o.hide()},this)),e.eq(4).on("click",t.proxy(function(t){t.preventDefault(),this.loadPane("actionsSlideEvent")},this)),e.eq(5).on("click",t.proxy(function(t){t.preventDefault(),this.loadPane("actionsGoToID")},this))}}},actionsSlideEvent:{size:[500,212],title:n2_("Actions")+" - "+n2_("Slide event"),back:"actions",close:!0,content:'<form class="n2-form" style="text-align: center;"></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Insert")+"</a>"],fn:{show:function(){var e=this.controls.find(".n2-button"),i=this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),e.trigger("click")});i.append(this.createInput(n2_("Event name"),"n2-slide-index","width:300px;"));var n=n2("#n2-slide-index").val("");e.on("click",t.proxy(function(t){t.preventDefault(),r("SlideEvent["+n.val()+"]"),this.hide(t)},this))}}},actionsGoTo:{size:[500,212],title:n2_("Actions")+" - "+n2_("Go to slide"),back:"actions",close:!0,content:'<form class="n2-form" style="text-align: center;"></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Insert")+"</a>"],fn:{show:function(){var e=this.controls.find(".n2-button"),i=this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),e.trigger("click")});i.append(this.createInput(n2_("Slide index"),"n2-slide-index","width:50px;")),i.append(this.createSelect(n2_("Direction"),"n2-slide-direction",{0:n2_("Auto"),1:n2_("Backward"),2:n2_("Forward")}));var n=n2("#n2-slide-index").val(0),s=n2("#n2-slide-direction").val(0);e.on("click",t.proxy(function(t){t.preventDefault();var e="",i=s.val()-1;i>=0&&(e=","+i),r("ToSlide["+n.val()+e+"]"),this.hide(t)},this))}}},actionsGoToID:{size:[500,212],title:n2_("Actions")+" - "+n2_("Go to slide ID"),back:"actions",close:!0,content:'<form class="n2-form" style="text-align: center;"></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Insert")+"</a>"],fn:{show:function(){var e=this.controls.find(".n2-button"),i=this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),e.trigger("click")});i.append(this.createInput(n2_("Slide ID"),"n2-slide-goto-id","width:50px;")),i.append(this.createSelect(n2_("Direction"),"n2-slide-direction",{0:"Auto",1:"Backward",2:"Forward"}));var n=n2("#n2-slide-goto-id").val(0),s=n2("#n2-slide-direction").val(0);e.on("click",t.proxy(function(t){t.preventDefault();var e="",i=s.val()-1;i>=0&&(e=","+i),r("ToSlideID["+n.val()+e+"]"),this.hide(t)},this))}}},actionsScrollTo:{size:[570,412],title:n2_("Actions")+" - "+n2_("Scroll to"),back:"actions",close:!0,content:'<form class="n2-form"></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Insert")+"</a>"],fn:{show:function(){var i=this.controls.find(".n2-button"),n=this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),i.trigger("click")});n.append(this.createInput(n2_("Scroll to"),"n2-scroll-to","width:516px;"));var s=n2("#n2-scroll-to").val("");new e.FormElementAutocompleteSimple("n2-scroll-to",["top","bottom","beforeSlider","afterSlider","previousSlider","nextSlider"]),s.parent().addClass("n2-form-element-autocomplete ui-front"),i.on("click",t.proxy(function(t){t.preventDefault(),r("ScrollTo["+s.val()+"]"),this.hide(t)},this)),this.content.append(this.createHeading(n2_("Examples"))),this.createTable([["top",n2_("Scrolls to the top of the page")],["bottom",n2_("Scrolls to the bottom of the page")],["jQuery selector",n2_('You can use any jQuery selector to scroll to a specific element on the page. Example: "#pricing" scrolls to the element with the id of "pricing".')]],["",""]).appendTo(this.content)}}}},!1),o.setCustomClass("n2-url-modal")}return o},n});var fixto=function(t,e,i){function n(){this._vendor=null}function s(){var t=!1;if(/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor))return!1;var e=i.createElement("div"),n=i.createElement("div");e.appendChild(n),e.style[p]="translate(0)",e.style.marginTop="10px",e.style.visibility="hidden",n.style.position="fixed",n.style.top=0,i.body.appendChild(e);var s=n.getBoundingClientRect();return s.top>0&&(t=!0),i.body.removeChild(e),t}function o(e,i,n){this.child=e,this._$child=t(e),this.parent=i,this.options={className:"fixto-fixed",top:0},this._setOptions(n)}function a(t,e,i){o.call(this,t,e,i),this._replacer=new h.MimicNode(t),this._ghostNode=this._replacer.replacer,this._saveStyles(),this._saveViewportHeight(),this._proxied_onscroll=this._bind(this._onscroll,this),this._proxied_onresize=this._bind(this._onresize,this),this.start()}function r(t,e,i){o.call(this,t,e,i),this.start()}var l=function(){var t={getAll:function(t){return i.defaultView.getComputedStyle(t)},get:function(t,e){return this.getAll(t)[e]},toFloat:function(t){return parseFloat(t,10)||0},getFloat:function(t,e){return this.toFloat(this.get(t,e))},_getAllCurrentStyle:function(t){return t.currentStyle}};return i.documentElement.currentStyle&&(t.getAll=t._getAllCurrentStyle),t}(),h=function(){function e(t){this.element=t,this.replacer=i.createElement("div"),this.replacer.style.visibility="hidden",this.hide(),t.parentNode.insertBefore(this.replacer,t)}e.prototype={replace:function(){var t=this.replacer.style,e=l.getAll(this.element);t.width=this._width(),t.height=this._height(),t.marginTop=e.marginTop,t.marginBottom=e.marginBottom,t.marginLeft=e.marginLeft,t.marginRight=e.marginRight,t.cssFloat=e.cssFloat,t.styleFloat=e.styleFloat,t.position=e.position,t.top=e.top,t.right=e.right,t.bottom=e.bottom,t.left=e.left,t.display=e.display},hide:function(){this.replacer.style.display="none"},_width:function(){return this.element.getBoundingClientRect().width+"px"},_widthOffset:function(){return this.element.offsetWidth+"px"},_height:function(){return this.element.getBoundingClientRect().height+"px"},_heightOffset:function(){return this.element.offsetHeight+"px"},destroy:function(){t(this.replacer).remove();for(var e in this)this.hasOwnProperty(e)&&(this[e]=null)}};var n=i.documentElement.getBoundingClientRect();return n.width||(e.prototype._width=e.prototype._widthOffset,e.prototype._height=e.prototype._heightOffset),{MimicNode:e,computedStyle:l}}();n.prototype={_vendors:{webkit:{cssPrefix:"-webkit-",jsPrefix:"Webkit"},moz:{cssPrefix:"-moz-",jsPrefix:"Moz"},ms:{cssPrefix:"-ms-",jsPrefix:"ms"},opera:{cssPrefix:"-o-",jsPrefix:"O"}},_prefixJsProperty:function(t,e){return t.jsPrefix+e[0].toUpperCase()+e.substr(1)},_prefixValue:function(t,e){return t.cssPrefix+e},_valueSupported:function(t,e,i){try{return i.style[t]=e,i.style[t]===e}catch(n){return!1}},propertySupported:function(t){return void 0!==i.documentElement.style[t]},getJsProperty:function(t){if(this.propertySupported(t))return t;if(this._vendor)return this._prefixJsProperty(this._vendor,t);var e;for(var i in this._vendors)if(e=this._prefixJsProperty(this._vendors[i],t),this.propertySupported(e))return this._vendor=this._vendors[i],e;return null},getCssValue:function(t,e){var n=i.createElement("div"),s=this.getJsProperty(t);if(this._valueSupported(s,e,n))return e;var o;if(this._vendor&&(o=this._prefixValue(this._vendor,e),this._valueSupported(s,o,n)))return o;for(var a in this._vendors)if(o=this._prefixValue(this._vendors[a],e),this._valueSupported(s,o,n))return this._vendor=this._vendors[a],o;return null}};var c,u,d=new n,p=d.getJsProperty("transform"),f=d.getCssValue("position","sticky"),m=d.getCssValue("position","fixed"),g="Microsoft Internet Explorer"===navigator.appName;g&&(u=parseFloat(navigator.appVersion.split("MSIE")[1])),o.prototype={_mindtop:function(){var t=0;if(this._$mind)for(var e,i,n=0,s=this._$mind.length;s>n;n++)if(e=this._$mind[n],i=e.getBoundingClientRect(),i.height)t+=i.height;else{var o=l.getAll(e);t+=e.offsetHeight+l.toFloat(o.marginTop)+l.toFloat(o.marginBottom)}return t},stop:function(){this._stop(),this._running=!1},start:function(){this._running||(this._start(),this._running=!0)},destroy:function(){this.stop(),this._destroy(),this._$child.removeData("fixto-instance");for(var t in this)this.hasOwnProperty(t)&&(this[t]=null)},_setOptions:function(e){t.extend(this.options,e),this.options.mind&&(this._$mind=t(this.options.mind)),this.options.zIndex&&(this.child.style.zIndex=this.options.zIndex)},setOptions:function(t){this._setOptions(t),this.refresh()},_stop:function(){},_start:function(){},_destroy:function(){},refresh:function(){}},a.prototype=new o,t.extend(a.prototype,{_bind:function(t,e){return function(){return t.call(e)}},_toresize:8===u?i.documentElement:e,_onscroll:function(){if(this._scrollTop=i.documentElement.scrollTop||i.body.scrollTop,this._parentBottom=this.parent.offsetHeight+this._fullOffset("offsetTop",this.parent)-l.getFloat(this.parent,"paddingBottom"),this.fixed){if(this._scrollTop>this._parentBottom||this._scrollTop<this._fullOffset("offsetTop",this._ghostNode)-this.options.top-this._mindtop())return void this._unfix();this._adjust()}else{var t=l.getAll(this.child);this._scrollTop<this._parentBottom&&this._scrollTop>this._fullOffset("offsetTop",this.child)-this.options.top-this._mindtop()&&this._viewportHeight>this.child.offsetHeight+l.toFloat(t.marginTop)+l.toFloat(t.marginBottom)&&(this._fix(),this._adjust())}},_adjust:function(){var t=0,e=this._mindtop(),i=0,n=l.getAll(this.child),s=null;c&&(s=this._getContext(),s&&(t=Math.abs(s.getBoundingClientRect().top))),i=this._parentBottom-this._scrollTop-(this.child.offsetHeight+l.toFloat(n.marginBottom)+e+this.options.top),i>0&&(i=0),this.child.style.top=i+e+t+this.options.top-l.toFloat(n.marginTop)+"px"},_fullOffset:function(t,e,i){for(var n=e[t],s=e.offsetParent;null!==s&&s!==i;)n+=s[t],s=s.offsetParent;return n},_getContext:function(){for(var t,e,n=this.child,s=null;!s;){if(t=n.parentNode,t===i.documentElement)return null;if(e=l.getAll(t),"none"!==e[p]){s=t;break}n=t}return s},_fix:function(){var t=this.child,e=t.style,n=l.getAll(t),s=t.getBoundingClientRect().left,o=n.width;if(this._saveStyles(),i.documentElement.currentStyle&&(o=t.offsetWidth-(l.toFloat(n.paddingLeft)+l.toFloat(n.paddingRight)+l.toFloat(n.borderLeftWidth)+l.toFloat(n.borderRightWidth))+"px"),c){var a=this._getContext();a&&(s=t.getBoundingClientRect().left-a.getBoundingClientRect().left)}this._replacer.replace(),e.left=s-l.toFloat(n.marginLeft)+"px",e.width=o,
e.position="fixed",e.top=this._mindtop()+this.options.top-l.toFloat(n.marginTop)+"px",this._$child.addClass(this.options.className),this.fixed=!0},_unfix:function(){var t=this.child.style;this._replacer.hide(),t.position=this._childOriginalPosition,t.top=this._childOriginalTop,t.width=this._childOriginalWidth,t.left=this._childOriginalLeft,this._$child.removeClass(this.options.className),this.fixed=!1},_saveStyles:function(){var t=this.child.style;this._childOriginalPosition=t.position,this._childOriginalTop=t.top,this._childOriginalWidth=t.width,this._childOriginalLeft=t.left},_onresize:function(){this.refresh()},_saveViewportHeight:function(){this._viewportHeight=e.innerHeight||i.documentElement.clientHeight},_stop:function(){this._unfix(),t(e).unbind("scroll",this._proxied_onscroll),t(this._toresize).unbind("resize",this._proxied_onresize)},_start:function(){this._onscroll(),t(e).bind("scroll",this._proxied_onscroll),t(this._toresize).bind("resize",this._proxied_onresize)},_destroy:function(){this._replacer.destroy()},refresh:function(){this._saveViewportHeight(),this._unfix(),this._onscroll()}}),r.prototype=new o,t.extend(r.prototype,{_start:function(){var t=l.getAll(this.child);this._childOriginalPosition=t.position,this._childOriginalTop=t.top,this.child.style.position=f,this.refresh()},_stop:function(){this.child.style.position=this._childOriginalPosition,this.child.style.top=this._childOriginalTop},refresh:function(){this.child.style.top=this._mindtop()+this.options.top+"px"}});var v=function(e,i,n){var o=f;return"-webkit-sticky"==o&&"table-cell"==t(i).css("display")&&(o=!1),/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)&&(o=!1),o&&!n||o&&n&&n.useNativeSticky!==!1?new r(e,i,n):m?(void 0===c&&(c=s()),new a(e,i,n)):"Neither fixed nor sticky positioning supported"};return 8>u&&(v=function(){return"not supported"}),t.fn.fixTo=function(e,i){var n=t(e),s=0;return this.each(function(){var o=t(this).data("fixto-instance");if(o){var a=e;o[a].call(o,i)}else t(this).data("fixto-instance",v(this,n[s],i));s++})},{FixToContainer:a,fixTo:v,computedStyle:l,mimicNode:h}}(n2,window,document);!function(){"use strict";function t(){var t=!1;if("localStorage"in window)try{window.localStorage.setItem("_tmptest","tmpval"),t=!0,window.localStorage.removeItem("_tmptest")}catch(e){}if(t)try{window.localStorage&&(w=window.localStorage,C="localStorage",T=w.jStorage_update)}catch(s){}else if("globalStorage"in window)try{window.globalStorage&&(w="localhost"==window.location.hostname?window.globalStorage["localhost.localdomain"]:window.globalStorage[window.location.hostname],C="globalStorage",T=w.jStorage_update)}catch(o){}else{if(x=document.createElement("link"),!x.addBehavior)return void(x=null);x.style.behavior="url(#default#userData)",document.getElementsByTagName("head")[0].appendChild(x);try{x.load("jStorage")}catch(a){x.setAttribute("jStorage","{}"),x.save("jStorage"),x.load("jStorage")}var l="{}";try{l=x.getAttribute("jStorage")}catch(h){}try{T=x.getAttribute("jStorage_update")}catch(d){}w.jStorage=l,C="userDataBehavior"}r(),c(),i(),u(),"addEventListener"in window&&window.addEventListener("pageshow",function(t){t.persisted&&n()},!1)}function e(){var t="{}";if("userDataBehavior"==C){x.load("jStorage");try{t=x.getAttribute("jStorage")}catch(e){}try{T=x.getAttribute("jStorage_update")}catch(i){}w.jStorage=t}r(),c(),u()}function i(){"localStorage"==C||"globalStorage"==C?"addEventListener"in window?window.addEventListener("storage",n,!1):document.attachEvent("onstorage",n):"userDataBehavior"==C&&setInterval(n,1e3)}function n(){var t;clearTimeout(S),S=setTimeout(function(){if("localStorage"==C||"globalStorage"==C)t=w.jStorage_update;else if("userDataBehavior"==C){x.load("jStorage");try{t=x.getAttribute("jStorage_update")}catch(e){}}t&&t!=T&&(T=t,s())},25)}function s(){var t,i=_.parse(_.stringify(y.__jstorage_meta.CRC32));e(),t=_.parse(_.stringify(y.__jstorage_meta.CRC32));var n,s=[],a=[];for(n in i)if(i.hasOwnProperty(n)){if(!t[n]){a.push(n);continue}i[n]!=t[n]&&"2."==String(i[n]).substr(0,2)&&s.push(n)}for(n in t)t.hasOwnProperty(n)&&(i[n]||s.push(n));o(s,"updated"),o(a,"deleted")}function o(t,e){t=[].concat(t||[]);var i,n,s,o;if("flushed"==e){t=[];for(var a in D)D.hasOwnProperty(a)&&t.push(a);e="deleted"}for(i=0,s=t.length;s>i;i++){if(D[t[i]])for(n=0,o=D[t[i]].length;o>n;n++)D[t[i]][n](t[i],e);if(D["*"])for(n=0,o=D["*"].length;o>n;n++)D["*"][n](t[i],e)}}function a(){var t=(+new Date).toString();if("localStorage"==C||"globalStorage"==C)try{w.jStorage_update=t}catch(e){C=!1}else"userDataBehavior"==C&&(x.setAttribute("jStorage_update",t),x.save("jStorage"));n()}function r(){if(w.jStorage)try{y=_.parse(String(w.jStorage))}catch(t){w.jStorage="{}"}else w.jStorage="{}";k=w.jStorage?String(w.jStorage).length:0,y.__jstorage_meta||(y.__jstorage_meta={}),y.__jstorage_meta.CRC32||(y.__jstorage_meta.CRC32={})}function l(){p();try{w.jStorage=_.stringify(y),x&&(x.setAttribute("jStorage",w.jStorage),x.save("jStorage")),k=w.jStorage?String(w.jStorage).length:0}catch(t){}}function h(t){if("string"!=typeof t&&"number"!=typeof t)throw new TypeError("Key name must be string or numeric");if("__jstorage_meta"==t)throw new TypeError("Reserved key name");return!0}function c(){var t,e,i,n,s=1/0,r=!1,h=[];if(clearTimeout(b),y.__jstorage_meta&&"object"==typeof y.__jstorage_meta.TTL){t=+new Date,i=y.__jstorage_meta.TTL,n=y.__jstorage_meta.CRC32;for(e in i)i.hasOwnProperty(e)&&(i[e]<=t?(delete i[e],delete n[e],delete y[e],r=!0,h.push(e)):i[e]<s&&(s=i[e]));s!=1/0&&(b=setTimeout(c,Math.min(s-t,2147483647))),r&&(l(),a(),o(h,"deleted"))}}function u(){var t,e;if(y.__jstorage_meta.PubSub){var i,n=P,s=[];for(t=e=y.__jstorage_meta.PubSub.length-1;t>=0;t--)i=y.__jstorage_meta.PubSub[t],i[0]>P&&(n=i[0],s.unshift(i));for(t=s.length-1;t>=0;t--)d(s[t][1],s[t][2]);P=n}}function d(t,e){if(M[t])for(var i=0,n=M[t].length;n>i;i++)try{M[t][i](t,_.parse(_.stringify(e)))}catch(s){}}function p(){if(y.__jstorage_meta.PubSub){for(var t=+new Date-2e3,e=0,i=y.__jstorage_meta.PubSub.length;i>e;e++)if(y.__jstorage_meta.PubSub[e][0]<=t){y.__jstorage_meta.PubSub.splice(e,y.__jstorage_meta.PubSub.length-e);break}y.__jstorage_meta.PubSub.length||delete y.__jstorage_meta.PubSub}}function f(t,e){y.__jstorage_meta||(y.__jstorage_meta={}),y.__jstorage_meta.PubSub||(y.__jstorage_meta.PubSub=[]),y.__jstorage_meta.PubSub.unshift([+new Date,t,e]),l(),a()}function m(t,e){for(var i,n=t.length,s=e^n,o=0;n>=4;)i=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24,i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16),i^=i>>>24,i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16),s=1540483477*(65535&s)+((1540483477*(s>>>16)&65535)<<16)^i,n-=4,++o;switch(n){case 3:s^=(255&t.charCodeAt(o+2))<<16;case 2:s^=(255&t.charCodeAt(o+1))<<8;case 1:s^=255&t.charCodeAt(o),s=1540483477*(65535&s)+((1540483477*(s>>>16)&65535)<<16)}return s^=s>>>13,s=1540483477*(65535&s)+((1540483477*(s>>>16)&65535)<<16),s^=s>>>15,s>>>0}var g="0.4.12",v=window.n2||window.$||(window.$={}),_={parse:window.JSON&&(window.JSON.parse||window.JSON.decode)||String.prototype.evalJSON&&function(t){return String(t).evalJSON()}||v.parseJSON||v.evalJSON,stringify:Object.toJSON||window.JSON&&(window.JSON.stringify||window.JSON.encode)||v.toJSON};if("function"!=typeof _.parse||"function"!=typeof _.stringify)throw new Error("No JSON support found, include //cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js to page");var b,y={__jstorage_meta:{CRC32:{}}},w={jStorage:"{}"},x=null,k=0,C=!1,D={},S=!1,T=0,M={},P=+new Date,I={isXML:function(t){var e=(t?t.ownerDocument||t:0).documentElement;return e?"HTML"!==e.nodeName:!1},encode:function(t){if(!this.isXML(t))return!1;try{return(new XMLSerializer).serializeToString(t)}catch(e){try{return t.xml}catch(i){}}return!1},decode:function(t){var e,i="DOMParser"in window&&(new DOMParser).parseFromString||window.ActiveXObject&&function(t){var e=new ActiveXObject("Microsoft.XMLDOM");return e.async="false",e.loadXML(t),e};return i?(e=i.call("DOMParser"in window&&new DOMParser||window,t,"text/xml"),this.isXML(e)?e:!1):!1}};v.jStorage={version:g,set:function(t,e,i){if(h(t),i=i||{},"undefined"==typeof e)return this.deleteKey(t),e;if(I.isXML(e))e={_is_xml:!0,xml:I.encode(e)};else{if("function"==typeof e)return;e&&"object"==typeof e&&(e=_.parse(_.stringify(e)))}return y[t]=e,y.__jstorage_meta.CRC32[t]="2."+m(_.stringify(e),2538058380),this.setTTL(t,i.TTL||0),o(t,"updated"),e},get:function(t,e){return h(t),t in y?y[t]&&"object"==typeof y[t]&&y[t]._is_xml?I.decode(y[t].xml):y[t]:"undefined"==typeof e?null:e},deleteKey:function(t){return h(t),t in y?(delete y[t],"object"==typeof y.__jstorage_meta.TTL&&t in y.__jstorage_meta.TTL&&delete y.__jstorage_meta.TTL[t],delete y.__jstorage_meta.CRC32[t],l(),a(),o(t,"deleted"),!0):!1},setTTL:function(t,e){var i=+new Date;return h(t),e=Number(e)||0,t in y?(y.__jstorage_meta.TTL||(y.__jstorage_meta.TTL={}),e>0?y.__jstorage_meta.TTL[t]=i+e:delete y.__jstorage_meta.TTL[t],l(),c(),a(),!0):!1},getTTL:function(t){var e,i=+new Date;return h(t),t in y&&y.__jstorage_meta.TTL&&y.__jstorage_meta.TTL[t]?(e=y.__jstorage_meta.TTL[t]-i,e||0):0},flush:function(){return y={__jstorage_meta:{CRC32:{}}},l(),a(),o(null,"flushed"),!0},storageObj:function(){function t(){}return t.prototype=y,new t},index:function(){var t,e=[];for(t in y)y.hasOwnProperty(t)&&"__jstorage_meta"!=t&&e.push(t);return e},storageSize:function(){return k},currentBackend:function(){return C},storageAvailable:function(){return!!C},listenKeyChange:function(t,e){h(t),D[t]||(D[t]=[]),D[t].push(e)},stopListening:function(t,e){if(h(t),D[t]){if(!e)return void delete D[t];for(var i=D[t].length-1;i>=0;i--)D[t][i]==e&&D[t].splice(i,1)}},subscribe:function(t,e){if(t=(t||"").toString(),!t)throw new TypeError("Channel not defined");M[t]||(M[t]=[]),M[t].push(e)},publish:function(t,e){if(t=(t||"").toString(),!t)throw new TypeError("Channel not defined");f(t,e)},reInit:function(){e()},noConflict:function(t){return delete window.$.jStorage,t&&(window.jStorage=this),this}},t()}(),function(jQuery){var module,define;!function(t){"use strict";var e={i18n:{ar:{months:["كانون الثاني","شباط","آذار","نيسان","مايو","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],dayOfWeek:["ن","ث","ع","خ","ج","س","ح"]},ro:{months:["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie"],dayOfWeek:["l","ma","mi","j","v","s","d"]},id:{months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],dayOfWeek:["Sen","Sel","Rab","Kam","Jum","Sab","Min"]},bg:{months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],dayOfWeek:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"]},fa:{months:["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],dayOfWeek:["یکشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"]},ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],dayOfWeek:["Вск","Пн","Вт","Ср","Чт","Пт","Сб"]},uk:{months:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],dayOfWeek:["Ндл","Пнд","Втр","Срд","Чтв","Птн","Сбт"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},el:{months:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],dayOfWeek:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeek:["So","Mo","Di","Mi","Do","Fr","Sa"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeek:["zo","ma","di","wo","do","vr","za"]},tr:{months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeek:["Paz","Pts","Sal","Çar","Per","Cum","Cts"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeek:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeek:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"]},th:{months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],dayOfWeek:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."]},pl:{months:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],dayOfWeek:["nd","pn","wt","śr","cz","pt","sb"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeek:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"]},ch:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeek:["日","一","二","三","四","五","六"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeek:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},kr:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeek:["일","월","화","수","목","금","토"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeek:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"]},da:{months:["January","Februar","Marts","April","Maj","Juni","July","August","September","Oktober","November","December"],dayOfWeek:["Søn","Man","Tir","Ons","Tor","Fre","Lør"]},no:{months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],dayOfWeek:["Søn","Man","Tir","Ons","Tor","Fre","Lør"]},ja:{months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["日","月","火","水","木","金","土"]},vi:{months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayOfWeek:["CN","T2","T3","T4","T5","T6","T7"]},sl:{months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],dayOfWeek:["Ned","Pon","Tor","Sre","Čet","Pet","Sob"]},cs:{months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],dayOfWeek:["Ne","Po","Út","St","Čt","Pá","So"]},hu:{months:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],dayOfWeek:["Va","Hé","Ke","Sze","Cs","Pé","Szo"]},az:{months:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"],dayOfWeek:["B","Be","Ça","Ç","Ca","C","Ş"]},bs:{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeek:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"]},ca:{months:["Gener","Febrer","Març","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],dayOfWeek:["Dg","Dl","Dt","Dc","Dj","Dv","Ds"]},"en-GB":{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},et:{months:["Jaanuar","Veebruar","Märts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"],dayOfWeek:["P","E","T","K","N","R","L"]},eu:{months:["Urtarrila","Otsaila","Martxoa","Apirila","Maiatza","Ekaina","Uztaila","Abuztua","Iraila","Urria","Azaroa","Abendua"],dayOfWeek:["Ig.","Al.","Ar.","Az.","Og.","Or.","La."]},fi:{months:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],dayOfWeek:["Su","Ma","Ti","Ke","To","Pe","La"]},gl:{months:["Xan","Feb","Maz","Abr","Mai","Xun","Xul","Ago","Set","Out","Nov","Dec"],dayOfWeek:["Dom","Lun","Mar","Mer","Xov","Ven","Sab"]},hr:{months:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],dayOfWeek:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"]},ko:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeek:["일","월","화","수","목","금","토"]},lt:{months:["Sausio","Vasario","Kovo","Balandžio","Gegužės","Birželio","Liepos","Rugpjūčio","Rugsėjo","Spalio","Lapkričio","Gruodžio"],dayOfWeek:["Sek","Pir","Ant","Tre","Ket","Pen","Šeš"]},lv:{months:["Janvāris","Februāris","Marts","Aprīlis ","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],dayOfWeek:["Sv","Pr","Ot","Tr","Ct","Pk","St"]},mk:{months:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],dayOfWeek:["нед","пон","вто","сре","чет","пет","саб"]},mn:{months:["1-р сар","2-р сар","3-р сар","4-р сар","5-р сар","6-р сар","7-р сар","8-р сар","9-р сар","10-р сар","11-р сар","12-р сар"],dayOfWeek:["Дав","Мяг","Лха","Пүр","Бсн","Бям","Ням"]},"pt-BR":{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeek:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"]},sk:{months:["Január","Február","Marec","Apríl","Máj","Jún","Júl","August","September","Október","November","December"],dayOfWeek:["Ne","Po","Ut","St","Št","Pi","So"]},sq:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"sr-YU":{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeek:["Ned","Pon","Uto","Sre","čet","Pet","Sub"]},sr:{months:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"],dayOfWeek:["нед","пон","уто","сре","чет","пет","суб"]},sv:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeek:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},"zh-TW":{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeek:["日","一","二","三","四","五","六"]},zh:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeek:["日","一","二","三","四","五","六"]},he:{months:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],dayOfWeek:["א'","ב'","ג'","ד'","ה'","ו'","שבת"]}},value:"",lang:"en",format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,monthChangeSpinner:!0,closeOnDateSelect:!1,closeOnWithoutClick:!0,closeOnInputClick:!0,timepicker:!0,datepicker:!0,weeks:!1,defaultTime:!1,defaultDate:!1,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,theme:"",onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onChangeYear:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,parentID:"body",timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,style:"",id:"",fixed:!1,roundTime:"round",className:"",weekends:[],disabledDates:[],yearOffset:0,beforeShowDay:null,enterLikeTab:!0};Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){var i,n;for(i=e||0,n=this.length;n>i;i+=1)if(this[i]===t)return i;return-1}),Date.prototype.countDaysInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0).getDate()},t.fn.xdsoftScroller=function(e){return this.each(function(){var i,n,s,o,a,r=t(this),l=function(t){var e,i={x:0,y:0};return"touchstart"===t.type||"touchmove"===t.type||"touchend"===t.type||"touchcancel"===t.type?(e=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],i.x=e.clientX,i.y=e.clientY):"mousedown"!==t.type&&"mouseup"!==t.type&&"mousemove"!==t.type&&"mouseover"!==t.type&&"mouseout"!==t.type&&"mouseenter"!==t.type&&"mouseleave"!==t.type||(i.x=t.clientX,i.y=t.clientY),i},h=100,c=!1,u=0,d=0,p=0,f=!1,m=0,g=function(){};return"hide"===e?void r.find(".xdsoft_scrollbar").hide():(t(this).hasClass("xdsoft_scroller_box")||(i=r.children().eq(0),n=r[0].clientHeight,s=i[0].offsetHeight,o=t('<div class="xdsoft_scrollbar"></div>'),a=t('<div class="xdsoft_scroller"></div>'),o.append(a),r.addClass("xdsoft_scroller_box").append(o),g=function(t){var e=l(t).y-u+m;0>e&&(e=0),e+a[0].offsetHeight>p&&(e=p-a[0].offsetHeight),r.trigger("scroll_element.xdsoft_scroller",[h?e/h:0])},a.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",function(i){n||r.trigger("resize_scroll.xdsoft_scroller",[e]),u=l(i).y,m=parseInt(a.css("margin-top"),10),p=o[0].offsetHeight,"mousedown"===i.type?(document&&t(document.body).addClass("xdsoft_noselect"),t([document.body,window]).on("mouseup.xdsoft_scroller",function s(){t([document.body,window]).off("mouseup.xdsoft_scroller",s).off("mousemove.xdsoft_scroller",g).removeClass("xdsoft_noselect")}),t(document.body).on("mousemove.xdsoft_scroller",g)):(f=!0,i.stopPropagation(),i.preventDefault())}).on("touchmove",function(t){f&&(t.preventDefault(),g(t))}).on("touchend touchcancel",function(t){f=!1,m=0}),r.on("scroll_element.xdsoft_scroller",function(t,e){n||r.trigger("resize_scroll.xdsoft_scroller",[e,!0]),e=e>1?1:0>e||isNaN(e)?0:e,a.css("margin-top",h*e),setTimeout(function(){i.css("marginTop",-parseInt((i[0].offsetHeight-n)*e,10))},10)}).on("resize_scroll.xdsoft_scroller",function(t,e,l){var c,u;n=r[0].clientHeight,s=i[0].offsetHeight,c=n/s,u=c*o[0].offsetHeight,c>1?a.hide():(a.show(),a.css("height",parseInt(u>10?u:10,10)),h=o[0].offsetHeight-a[0].offsetHeight,l!==!0&&r.trigger("scroll_element.xdsoft_scroller",[e||Math.abs(parseInt(i.css("marginTop"),10))/(s-n)]))}),r.on("mousewheel",function(t){var e=Math.abs(parseInt(i.css("marginTop"),10));return e-=20*t.deltaY,0>e&&(e=0),r.trigger("scroll_element.xdsoft_scroller",[e/(s-n)]),t.stopPropagation(),!1}),r.on("touchstart",function(t){c=l(t),d=Math.abs(parseInt(i.css("marginTop"),10))}),r.on("touchmove",function(t){if(c){t.preventDefault();var e=l(t);r.trigger("scroll_element.xdsoft_scroller",[(d-(e.y-c.y))/(s-n)])}}),r.on("touchend touchcancel",function(t){c=!1,d=0})),void r.trigger("resize_scroll.xdsoft_scroller",[e]))})},t.fn.datetimepicker=function(i){var n,s,o=48,a=57,r=96,l=105,h=17,c=46,u=13,d=27,p=8,f=37,m=38,g=39,v=40,_=9,b=116,y=65,w=67,x=86,k=90,C=89,D=!1,S=t.isPlainObject(i)||!i?t.extend(!0,{},e,i):t.extend(!0,{},e),T=0,M=function(t){"undefined"==typeof S.i18n[S.lang]&&(S.lang="en"),t.on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function e(i){t.is(":disabled")||t.data("xdsoft_datetimepicker")||(clearTimeout(T),T=setTimeout(function(){t.data("xdsoft_datetimepicker")||n(t),t.off("open.xdsoft focusin.xdsoft mousedown.xdsoft",e).trigger("open.xdsoft")},100))})};return n=function(e){function n(){var t,i=!1;return S.startDate?i=O.strToDate(S.startDate):(i=S.value||(e&&e.val&&e.val()?e.val():""),i?i=O.strToDateTime(i):S.defaultDate&&(i=O.strToDate(S.defaultDate),S.defaultTime&&(t=O.strtotime(S.defaultTime),i.setHours(t.getHours()),i.setMinutes(t.getMinutes())))),i&&O.isValidDate(i)?F.data("changed",!0):i="",i||0}var s,T,M,P,I,O,F=t("<div "+(S.id?'id="'+S.id+'"':"")+" "+(S.style?'style="'+S.style+'"':"")+' class="xdsoft_datetimepicker xdsoft_'+S.theme+" xdsoft_noselect "+(S.weeks?" xdsoft_showweeks":"")+S.className+'"></div>'),A=t('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),z=t('<div class="xdsoft_datepicker active"></div>'),H=t('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button><div class="xdsoft_label xdsoft_month"><span></span><i></i></div><div class="xdsoft_label xdsoft_year"><span></span><i></i></div><button type="button" class="xdsoft_next"></button></div>'),N=t('<div class="xdsoft_calendar"></div>'),E=t('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),j=E.find(".xdsoft_time_box").eq(0),R=t('<div class="xdsoft_time_variant"></div>'),W=t('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),L=t('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),B=!1,Y=0,q=0;H.find(".xdsoft_month span").after(W),H.find(".xdsoft_year span").after(L),H.find(".xdsoft_month,.xdsoft_year").on("mousedown.xdsoft",function(e){var i,n,s=t(this).find(".xdsoft_select").eq(0),o=0,a=0,r=s.is(":visible");for(H.find(".xdsoft_select").hide(),O.currentTime&&(o=O.currentTime[t(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),s[r?"hide":"show"](),i=s.find("div.xdsoft_option"),n=0;n<i.length&&i.eq(n).data("value")!==o;n+=1)a+=i[0].offsetHeight;return s.xdsoftScroller(a/(s.children()[0].offsetHeight-s[0].clientHeight)),e.stopPropagation(),!1}),H.find(".xdsoft_select").xdsoftScroller().on("mousedown.xdsoft",function(t){t.stopPropagation(),t.preventDefault()}).on("mousedown.xdsoft",".xdsoft_option",function(e){var i=O.currentTime.getFullYear();O&&O.currentTime&&O.currentTime[t(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](t(this).data("value")),t(this).parent().parent().hide(),F.trigger("xchange.xdsoft"),S.onChangeMonth&&t.isFunction(S.onChangeMonth)&&S.onChangeMonth.call(F,O.currentTime,F.data("input")),i!==O.currentTime.getFullYear()&&t.isFunction(S.onChangeYear)&&S.onChangeYear.call(F,O.currentTime,F.data("input"))}),F.setOptions=function(i){if(S=t.extend(!0,{},S,i),i.allowTimes&&t.isArray(i.allowTimes)&&i.allowTimes.length&&(S.allowTimes=t.extend(!0,[],i.allowTimes)),i.weekends&&t.isArray(i.weekends)&&i.weekends.length&&(S.weekends=t.extend(!0,[],i.weekends)),i.disabledDates&&t.isArray(i.disabledDates)&&i.disabledDates.length&&(S.disabledDates=t.extend(!0,[],i.disabledDates)),!S.open&&!S.opened||S.inline||e.trigger("open.xdsoft"),S.inline&&(B=!0,F.addClass("xdsoft_inline"),e.after(F).hide()),S.inverseButton&&(S.next="xdsoft_prev",S.prev="xdsoft_next"),S.datepicker?z.addClass("active"):z.removeClass("active"),S.timepicker?E.addClass("active"):E.removeClass("active"),S.value&&(e&&e.val&&e.val(S.value),O.setCurrentTime(S.value)),isNaN(S.dayOfWeekStart)?S.dayOfWeekStart=0:S.dayOfWeekStart=parseInt(S.dayOfWeekStart,10)%7,S.timepickerScrollbar||j.xdsoftScroller("hide"),S.minDate&&/^-(.*)$/.test(S.minDate)&&(S.minDate=O.strToDateTime(S.minDate).dateFormat(S.formatDate)),S.maxDate&&/^\+(.*)$/.test(S.maxDate)&&(S.maxDate=O.strToDateTime(S.maxDate).dateFormat(S.formatDate)),H.find(".xdsoft_today_button").css("visibility",S.todayButton?"visible":"hidden"),S.mask){var n=function(t){try{if(document.selection&&document.selection.createRange){var e=document.selection.createRange();return e.getBookmark().charCodeAt(2)-2}if(t.setSelectionRange)return t.selectionStart}catch(i){return 0}},s=function(t,e){if(t="string"==typeof t||t instanceof String?document.getElementById(t):t,!t)return!1;if(t.createTextRange){var i=t.createTextRange();return i.collapse(!0),i.moveEnd("character",e),i.moveStart("character",e),i.select(),!0}return t.setSelectionRange?(t.setSelectionRange(e,e),!0):!1},T=function(t,e){var i=t.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return new RegExp(i).test(e)};e.off("keydown.xdsoft"),S.mask===!0&&(S.mask=S.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59")),"string"===t.type(S.mask)&&(T(S.mask,e.val())||e.val(S.mask.replace(/[0-9]/g,"_")),e.on("keydown.xdsoft",function(i){var M,P,I=this.value,O=i.which;if(O>=o&&a>=O||O>=r&&l>=O||O===p||O===c){for(M=n(this),P=O!==p&&O!==c?String.fromCharCode(O>=r&&l>=O?O-o:O):"_",O!==p&&O!==c||!M||(M-=1,P="_");/[^0-9_]/.test(S.mask.substr(M,1))&&M<S.mask.length&&M>0;)M+=O===p||O===c?-1:1;if(I=I.substr(0,M)+P+I.substr(M+1),""===t.trim(I))I=S.mask.replace(/[0-9]/g,"_");else if(M===S.mask.length)return i.preventDefault(),!1;for(M+=O===p||O===c?0:1;/[^0-9_]/.test(S.mask.substr(M,1))&&M<S.mask.length&&M>0;)M+=O===p||O===c?-1:1;T(S.mask,I)?(this.value=I,s(this,M)):""===t.trim(I)?this.value=S.mask.replace(/[0-9]/g,"_"):e.trigger("error_input.xdsoft")}else if(-1!==[y,w,x,k,C].indexOf(O)&&D||-1!==[d,m,v,f,g,b,h,_,u].indexOf(O))return!0;return i.preventDefault(),!1}))}S.validateOnBlur&&e.off("blur.xdsoft").on("blur.xdsoft",function(){S.allowBlank&&!t.trim(t(this).val()).length?(t(this).val(null),F.data("xdsoft_datetime").empty()):Date.parseDate(t(this).val(),S.format)?F.data("xdsoft_datetime").setCurrentTime(t(this).val()):(t(this).val(O.now().dateFormat(S.format)),F.data("xdsoft_datetime").setCurrentTime(t(this).val())),F.trigger("changedatetime.xdsoft")}),S.dayOfWeekStartPrev=0===S.dayOfWeekStart?6:S.dayOfWeekStart-1,F.trigger("xchange.xdsoft").trigger("afterOpen.xdsoft")},F.data("options",S).on("mousedown.xdsoft",function(t){return t.stopPropagation(),t.preventDefault(),L.hide(),W.hide(),!1}),j.append(R),j.xdsoftScroller(),F.on("afterOpen.xdsoft",function(){j.xdsoftScroller()}),F.append(z).append(E),S.withoutCopyright!==!0&&F.append(A),z.append(H).append(N),t(S.parentID).append(F),s=function(){var e=this;e.now=function(t){var i,n,s=new Date;return!t&&S.defaultDate&&(i=e.strToDate(S.defaultDate),s.setFullYear(i.getFullYear()),s.setMonth(i.getMonth()),s.setDate(i.getDate())),S.yearOffset&&s.setFullYear(s.getFullYear()+S.yearOffset),!t&&S.defaultTime&&(n=e.strtotime(S.defaultTime),s.setHours(n.getHours()),s.setMinutes(n.getMinutes())),s},e.isValidDate=function(t){return"[object Date]"!==Object.prototype.toString.call(t)?!1:!isNaN(t.getTime())},e.setCurrentTime=function(t){e.currentTime="string"==typeof t?e.strToDateTime(t):e.isValidDate(t)?t:e.now(),F.trigger("xchange.xdsoft")},e.empty=function(){e.currentTime=null},e.getCurrentTime=function(t){return e.currentTime},e.nextMonth=function(){var i,n=e.currentTime.getMonth()+1;return 12===n&&(e.currentTime.setFullYear(e.currentTime.getFullYear()+1),n=0),i=e.currentTime.getFullYear(),e.currentTime.setDate(Math.min(new Date(e.currentTime.getFullYear(),n+1,0).getDate(),e.currentTime.getDate())),e.currentTime.setMonth(n),S.onChangeMonth&&t.isFunction(S.onChangeMonth)&&S.onChangeMonth.call(F,O.currentTime,F.data("input")),i!==e.currentTime.getFullYear()&&t.isFunction(S.onChangeYear)&&S.onChangeYear.call(F,O.currentTime,F.data("input")),F.trigger("xchange.xdsoft"),n},e.prevMonth=function(){var i=e.currentTime.getMonth()-1;return-1===i&&(e.currentTime.setFullYear(e.currentTime.getFullYear()-1),i=11),e.currentTime.setDate(Math.min(new Date(e.currentTime.getFullYear(),i+1,0).getDate(),e.currentTime.getDate())),e.currentTime.setMonth(i),S.onChangeMonth&&t.isFunction(S.onChangeMonth)&&S.onChangeMonth.call(F,O.currentTime,F.data("input")),F.trigger("xchange.xdsoft"),i},e.getWeekOfYear=function(t){var e=new Date(t.getFullYear(),0,1);return Math.ceil(((t-e)/864e5+e.getDay()+1)/7)},e.strToDateTime=function(t){var i,n,s=[];return t&&t instanceof Date&&e.isValidDate(t)?t:(s=/^(\+|\-)(.*)$/.exec(t),s&&(s[2]=Date.parseDate(s[2],S.formatDate)),s&&s[2]?(i=s[2].getTime()-6e4*s[2].getTimezoneOffset(),n=new Date(O.now().getTime()+parseInt(s[1]+"1",10)*i)):n=t?Date.parseDate(t,S.format):e.now(),
e.isValidDate(n)||(n=e.now()),n)},e.strToDate=function(t){if(t&&t instanceof Date&&e.isValidDate(t))return t;var i=t?Date.parseDate(t,S.formatDate):e.now(!0);return e.isValidDate(i)||(i=e.now(!0)),i},e.strtotime=function(t){if(t&&t instanceof Date&&e.isValidDate(t))return t;var i=t?Date.parseDate(t,S.formatTime):e.now(!0);return e.isValidDate(i)||(i=e.now(!0)),i},e.str=function(){return e.currentTime.dateFormat(S.format)},e.currentTime=this.now()},O=new s,H.find(".xdsoft_today_button").on("mousedown.xdsoft",function(){F.data("changed",!0),O.setCurrentTime(0),F.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){e.val(O.str()),F.trigger("close.xdsoft")}),H.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var e=t(this),i=0,n=!1;!function s(t){O.currentTime.getMonth();e.hasClass(S.next)?O.nextMonth():e.hasClass(S.prev)&&O.prevMonth(),S.monthChangeSpinner&&(n||(i=setTimeout(s,t||100)))}(500),t([document.body,window]).on("mouseup.xdsoft",function o(){clearTimeout(i),n=!0,t([document.body,window]).off("mouseup.xdsoft",o)})}),E.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var e=t(this),i=0,n=!1,s=110;!function o(t){var a=j[0].clientHeight,r=R[0].offsetHeight,l=Math.abs(parseInt(R.css("marginTop"),10));e.hasClass(S.next)&&r-a-S.timeHeightInTimePicker>=l?R.css("marginTop","-"+(l+S.timeHeightInTimePicker)+"px"):e.hasClass(S.prev)&&l-S.timeHeightInTimePicker>=0&&R.css("marginTop","-"+(l-S.timeHeightInTimePicker)+"px"),j.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(R.css("marginTop"),10)/(r-a))]),s=s>10?10:s-10,n||(i=setTimeout(o,t||s))}(500),t([document.body,window]).on("mouseup.xdsoft",function a(){clearTimeout(i),n=!0,t([document.body,window]).off("mouseup.xdsoft",a)})}),T=0,F.on("xchange.xdsoft",function(e){clearTimeout(T),T=setTimeout(function(){for(var e,n,s,o,a,r,l,h="",c=new Date(O.currentTime.getFullYear(),O.currentTime.getMonth(),1,12,0,0),u=0,d=O.now(),p=!1,f=!1,m=[],g=!0,v="",_="";c.getDay()!==S.dayOfWeekStart;)c.setDate(c.getDate()-1);for(h+="<table><thead><tr>",S.weeks&&(h+="<th></th>"),e=0;7>e;e+=1)h+="<th>"+S.i18n[S.lang].dayOfWeek[(e+S.dayOfWeekStart)%7]+"</th>";for(h+="</tr></thead>",h+="<tbody>",S.maxDate!==!1&&(p=O.strToDate(S.maxDate),p=new Date(p.getFullYear(),p.getMonth(),p.getDate(),23,59,59,999)),S.minDate!==!1&&(f=O.strToDate(S.minDate),f=new Date(f.getFullYear(),f.getMonth(),f.getDate()));u<O.currentTime.countDaysInMonth()||c.getDay()!==S.dayOfWeekStart||O.currentTime.getMonth()===c.getMonth();)m=[],u+=1,n=c.getDate(),s=c.getFullYear(),o=c.getMonth(),a=O.getWeekOfYear(c),m.push("xdsoft_date"),r=S.beforeShowDay&&t.isFunction(S.beforeShowDay.call)?S.beforeShowDay.call(F,c):null,p!==!1&&c>p||f!==!1&&f>c||r&&r[0]===!1?m.push("xdsoft_disabled"):-1!==S.disabledDates.indexOf(c.dateFormat(S.formatDate))&&m.push("xdsoft_disabled"),r&&""!==r[1]&&m.push(r[1]),O.currentTime.getMonth()!==o&&m.push("xdsoft_other_month"),(S.defaultSelect||F.data("changed"))&&O.currentTime.dateFormat(S.formatDate)===c.dateFormat(S.formatDate)&&m.push("xdsoft_current"),d.dateFormat(S.formatDate)===c.dateFormat(S.formatDate)&&m.push("xdsoft_today"),(0===c.getDay()||6===c.getDay()||~S.weekends.indexOf(c.dateFormat(S.formatDate)))&&m.push("xdsoft_weekend"),S.beforeShowDay&&t.isFunction(S.beforeShowDay)&&m.push(S.beforeShowDay(c)),g&&(h+="<tr>",g=!1,S.weeks&&(h+="<th>"+a+"</th>")),h+='<td data-date="'+n+'" data-month="'+o+'" data-year="'+s+'" class="xdsoft_date xdsoft_day_of_week'+c.getDay()+" "+m.join(" ")+'"><div>'+n+"</div></td>",c.getDay()===S.dayOfWeekStartPrev&&(h+="</tr>",g=!0),c.setDate(n+1);if(h+="</tbody></table>",N.html(h),H.find(".xdsoft_label span").eq(0).text(S.i18n[S.lang].months[O.currentTime.getMonth()]),H.find(".xdsoft_label span").eq(1).text(O.currentTime.getFullYear()),v="",_="",o="",l=function(t,e){var i=O.now();i.setHours(t),t=parseInt(i.getHours(),10),i.setMinutes(e),e=parseInt(i.getMinutes(),10);var n=new Date(O.currentTime);n.setHours(t),n.setMinutes(e),m=[],(S.minDateTime!==!1&&S.minDateTime>n||S.maxTime!==!1&&O.strtotime(S.maxTime).getTime()<i.getTime()||S.minTime!==!1&&O.strtotime(S.minTime).getTime()>i.getTime())&&m.push("xdsoft_disabled"),(S.initTime||S.defaultSelect||F.data("changed"))&&parseInt(O.currentTime.getHours(),10)===parseInt(t,10)&&(S.step>59||Math[S.roundTime](O.currentTime.getMinutes()/S.step)*S.step===parseInt(e,10))&&(S.defaultSelect||F.data("changed")?m.push("xdsoft_current"):S.initTime&&m.push("xdsoft_init_time")),parseInt(d.getHours(),10)===parseInt(t,10)&&parseInt(d.getMinutes(),10)===parseInt(e,10)&&m.push("xdsoft_today"),v+='<div class="xdsoft_time '+m.join(" ")+'" data-hour="'+t+'" data-minute="'+e+'">'+i.dateFormat(S.formatTime)+"</div>"},S.allowTimes&&t.isArray(S.allowTimes)&&S.allowTimes.length)for(u=0;u<S.allowTimes.length;u+=1)_=O.strtotime(S.allowTimes[u]).getHours(),o=O.strtotime(S.allowTimes[u]).getMinutes(),l(_,o);else for(u=0,e=0;u<(S.hours12?12:24);u+=1)for(e=0;60>e;e+=S.step)_=(10>u?"0":"")+u,o=(10>e?"0":"")+e,l(_,o);for(R.html(v),i="",u=0,u=parseInt(S.yearStart,10)+S.yearOffset;u<=parseInt(S.yearEnd,10)+S.yearOffset;u+=1)i+='<div class="xdsoft_option '+(O.currentTime.getFullYear()===u?"xdsoft_current":"")+'" data-value="'+u+'">'+u+"</div>";for(L.children().eq(0).html(i),u=0,i="";11>=u;u+=1)i+='<div class="xdsoft_option '+(O.currentTime.getMonth()===u?"xdsoft_current":"")+'" data-value="'+u+'">'+S.i18n[S.lang].months[u]+"</div>";W.children().eq(0).html(i),t(F).trigger("generate.xdsoft")},10),e.stopPropagation()}).on("afterOpen.xdsoft",function(){if(S.timepicker){var t,e,i,n;R.find(".xdsoft_current").length?t=".xdsoft_current":R.find(".xdsoft_init_time").length&&(t=".xdsoft_init_time"),t?(e=j[0].clientHeight,i=R[0].offsetHeight,n=R.find(t).index()*S.timeHeightInTimePicker+1,n>i-e&&(n=i-e),j.trigger("scroll_element.xdsoft_scroller",[parseInt(n,10)/(i-e)])):j.trigger("scroll_element.xdsoft_scroller",[0])}}),M=0,N.on("click.xdsoft","td",function(i){i.stopPropagation(),M+=1;var n=t(this),s=O.currentTime;return void 0!==s&&null!==s||(O.currentTime=O.now(),s=O.currentTime),n.hasClass("xdsoft_disabled")?!1:(s.setDate(1),s.setFullYear(n.data("year")),s.setMonth(n.data("month")),s.setDate(n.data("date")),F.trigger("select.xdsoft",[s]),e.val(O.str()),(M>1||S.closeOnDateSelect===!0||0===S.closeOnDateSelect&&!S.timepicker)&&!S.inline&&F.trigger("close.xdsoft"),S.onSelectDate&&t.isFunction(S.onSelectDate)&&S.onSelectDate.call(F,O.currentTime,F.data("input"),i),F.data("changed",!0),F.trigger("xchange.xdsoft"),F.trigger("changedatetime.xdsoft"),void setTimeout(function(){M=0},200))}),R.on("click.xdsoft","div",function(e){e.stopPropagation();var i=t(this),n=O.currentTime;return void 0!==n&&null!==n||(O.currentTime=O.now(),n=O.currentTime),i.hasClass("xdsoft_disabled")?!1:(n.setHours(i.data("hour")),n.setMinutes(i.data("minute")),F.trigger("select.xdsoft",[n]),F.data("input").val(O.str()),S.inline||F.trigger("close.xdsoft"),S.onSelectTime&&t.isFunction(S.onSelectTime)&&S.onSelectTime.call(F,O.currentTime,F.data("input"),e),F.data("changed",!0),F.trigger("xchange.xdsoft"),void F.trigger("changedatetime.xdsoft"))}),z.on("mousewheel.xdsoft",function(t){return S.scrollMonth?(t.deltaY<0?O.nextMonth():O.prevMonth(),!1):!0}),e.on("mousewheel.xdsoft",function(t){return S.scrollInput?!S.datepicker&&S.timepicker?(P=R.find(".xdsoft_current").length?R.find(".xdsoft_current").eq(0).index():0,P+t.deltaY>=0&&P+t.deltaY<R.children().length&&(P+=t.deltaY),R.children().eq(P).length&&R.children().eq(P).trigger("mousedown"),!1):S.datepicker&&!S.timepicker?(z.trigger(t,[t.deltaY,t.deltaX,t.deltaY]),e.val&&e.val(O.str()),F.trigger("changedatetime.xdsoft"),!1):void 0:!0}),F.on("changedatetime.xdsoft",function(e){if(S.onChangeDateTime&&t.isFunction(S.onChangeDateTime)){var i=F.data("input");S.onChangeDateTime.call(F,O.currentTime,i,e),delete S.value,i.trigger("change")}}).on("generate.xdsoft",function(){S.onGenerate&&t.isFunction(S.onGenerate)&&S.onGenerate.call(F,O.currentTime,F.data("input")),B&&(F.trigger("afterOpen.xdsoft"),B=!1)}).on("click.xdsoft",function(t){t.stopPropagation()}),P=0,I=function(){var e=F.data("input").offset(),i=e.top+F.data("input")[0].offsetHeight-1,n=e.left,s="absolute";S.fixed?(i-=t(window).scrollTop(),n-=t(window).scrollLeft(),s="fixed"):(i+F[0].offsetHeight>t(window).height()+t(window).scrollTop()&&(i=e.top-F[0].offsetHeight+1),0>i&&(i=0),n+F[0].offsetWidth>t(window).width()&&(n=t(window).width()-F[0].offsetWidth)),F.css({left:n,top:i,position:s})},F.on("open.xdsoft",function(e){var i=!0;S.onShow&&t.isFunction(S.onShow)&&(i=S.onShow.call(F,O.currentTime,F.data("input"),e)),i!==!1&&(F.show(),I(),t(window).off("resize.xdsoft",I).on("resize.xdsoft",I),S.closeOnWithoutClick&&t([document.body,window]).on("mousedown.xdsoft",function n(){F.trigger("close.xdsoft"),t([document.body,window]).off("mousedown.xdsoft",n)}))}).on("close.xdsoft",function(e){var i=!0;H.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide(),S.onClose&&t.isFunction(S.onClose)&&(i=S.onClose.call(F,O.currentTime,F.data("input"),e)),i===!1||S.opened||S.inline||F.hide(),e.stopPropagation()}).on("toggle.xdsoft",function(t){F.is(":visible")?F.trigger("close.xdsoft"):F.trigger("open.xdsoft")}).data("input",e),Y=0,q=0,F.data("xdsoft_datetime",O),F.setOptions(S),O.setCurrentTime(n()),e.data("xdsoft_datetimepicker",F).on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function(t){e.is(":disabled")||e.data("xdsoft_datetimepicker").is(":visible")&&S.closeOnInputClick||(clearTimeout(Y),Y=setTimeout(function(){e.is(":disabled")||(B=!0,O.setCurrentTime(n()),F.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(e){var i,n=(this.value,e.which);return-1!==[u].indexOf(n)&&S.enterLikeTab?(i=t("input:visible,textarea:visible"),F.trigger("close.xdsoft"),i.eq(i.index(this)+1).focus(),!1):-1!==[_].indexOf(n)?(F.trigger("close.xdsoft"),!0):void 0})},s=function(e){var i=e.data("xdsoft_datetimepicker");i&&(i.data("xdsoft_datetime",null),i.remove(),e.data("xdsoft_datetimepicker",null).off(".xdsoft"),t(window).off("resize.xdsoft"),t([window,document.body]).off("mousedown.xdsoft"),e.unmousewheel&&e.unmousewheel())},t(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(t){t.keyCode===h&&(D=!0)}).on("keyup.xdsoftctrl",function(t){t.keyCode===h&&(D=!1)}),this.each(function(){var e=t(this).data("xdsoft_datetimepicker");if(e){if("string"===t.type(i))switch(i){case"show":t(this).select().focus(),e.trigger("open.xdsoft");break;case"hide":e.trigger("close.xdsoft");break;case"toggle":e.trigger("toggle.xdsoft");break;case"destroy":s(t(this));break;case"reset":this.value=this.defaultValue,this.value&&e.data("xdsoft_datetime").isValidDate(Date.parseDate(this.value,S.format))||e.data("changed",!1),e.data("xdsoft_datetime").setCurrentTime(this.value)}else e.setOptions(i);return 0}"string"!==t.type(i)&&(!S.lazyInit||S.open||S.inline?n(t(this)):M(t(this)))})},t.fn.datetimepicker.defaults=e}(jQuery),function(){!function(t){"function"==typeof define&&define.amd?define(["jQuery"],t):"object"==typeof exports?module.exports=t:t(jQuery)}(function(t){function e(e){var a=e||window.event,r=l.call(arguments,1),h=0,u=0,d=0,p=0,f=0,m=0;if(e=t.event.fix(a),e.type="mousewheel","detail"in a&&(d=-1*a.detail),"wheelDelta"in a&&(d=a.wheelDelta),"wheelDeltaY"in a&&(d=a.wheelDeltaY),"wheelDeltaX"in a&&(u=-1*a.wheelDeltaX),"axis"in a&&a.axis===a.HORIZONTAL_AXIS&&(u=-1*d,d=0),h=0===d?u:d,"deltaY"in a&&(d=-1*a.deltaY,h=d),"deltaX"in a&&(u=a.deltaX,0===d&&(h=-1*u)),0!==d||0!==u){if(1===a.deltaMode){var g=t.data(this,"mousewheel-line-height");h*=g,d*=g,u*=g}else if(2===a.deltaMode){var v=t.data(this,"mousewheel-page-height");h*=v,d*=v,u*=v}if(p=Math.max(Math.abs(d),Math.abs(u)),(!o||o>p)&&(o=p,n(a,p)&&(o/=40)),n(a,p)&&(h/=40,u/=40,d/=40),h=Math[h>=1?"floor":"ceil"](h/o),u=Math[u>=1?"floor":"ceil"](u/o),d=Math[d>=1?"floor":"ceil"](d/o),c.settings.normalizeOffset&&this.getBoundingClientRect){var _=this.getBoundingClientRect();f=e.clientX-_.left,m=e.clientY-_.top}return e.deltaX=u,e.deltaY=d,e.deltaFactor=o,e.offsetX=f,e.offsetY=m,e.deltaMode=0,r.unshift(e,h,u,d),s&&clearTimeout(s),s=setTimeout(i,200),(t.event.dispatch||t.event.handle).apply(this,r)}}function i(){o=null}function n(t,e){return c.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120===0}var s,o,a=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(t.event.fixHooks)for(var h=a.length;h;)t.event.fixHooks[a[--h]]=t.event.mouseHooks;var c=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var i=r.length;i;)this.addEventListener(r[--i],e,!1);else this.onmousewheel=e;t.data(this,"mousewheel-line-height",c.getLineHeight(this)),t.data(this,"mousewheel-page-height",c.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var i=r.length;i;)this.removeEventListener(r[--i],e,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var i=t(e),n=i["offsetParent"in t.fn?"offsetParent":"parent"]();return n.length||(n=t("body")),parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})}),Date.parseFunctions={count:0},Date.parseRegexes=[],Date.formatFunctions={count:0},Date.prototype.dateFormat=function(t){if("unixtime"==t)return parseInt(this.getTime()/1e3);null==Date.formatFunctions[t]&&Date.createNewFormat(t);var e=Date.formatFunctions[t];return this[e]()},Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;for(var code="Date.prototype."+funcName+" = function() {return ",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,code+="'"+String.escape(ch)+"' + "):code+=Date.getFormatCode(ch):special=!0;eval(code.substring(0,code.length-3)+";}")},Date.getFormatCode=function(t){switch(t){case"d":return"String.leftPad(this.getDate(), 2, '0') + ";case"D":return"Date.dayNames[this.getDay()].substring(0, 3) + ";case"j":return"this.getDate() + ";case"l":return"Date.dayNames[this.getDay()] + ";case"S":return"this.getSuffix() + ";case"w":return"this.getDay() + ";case"z":return"this.getDayOfYear() + ";case"W":return"this.getWeekOfYear() + ";case"F":return"Date.monthNames[this.getMonth()] + ";case"m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";case"M":return"Date.monthNames[this.getMonth()].substring(0, 3) + ";case"n":return"(this.getMonth() + 1) + ";case"t":return"this.getDaysInMonth() + ";case"L":return"(this.isLeapYear() ? 1 : 0) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() %12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"O":return"this.getGMTOffset() + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";default:return"'"+String.escape(t)+"' + "}},Date.parseDate=function(t,e){if("unixtime"==e)return new Date(isNaN(parseInt(t))?0:1e3*parseInt(t));null==Date.parseFunctions[e]&&Date.createParser(e);var i=Date.parseFunctions[e];return Date[i](t)},Date.createParser=function(format){var funcName="parse"+Date.parseFunctions.count++,regexNum=Date.parseRegexes.length,currentGroup=1;Date.parseFunctions[format]=funcName;for(var code="Date."+funcName+" = function(input) {\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, z = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+regexNum+"]);\nif (results && results.length > 0) {",regex="",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,regex+=String.escape(ch)):(obj=Date.formatCodeToRegex(ch,currentGroup),currentGroup+=obj.g,regex+=obj.s,obj.g&&obj.c&&(code+=obj.c)):special=!0;code+="if (y > 0 && z > 0){\nvar doyDate = new Date(y,0);\ndoyDate.setDate(z);\nm = doyDate.getMonth();\nd = doyDate.getDate();\n}",code+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}",Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$"),eval(code)},Date.formatCodeToRegex=function(t,e){switch(t){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+e+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:1,c:"z = parseInt(results["+e+"], 10);\n",s:"(\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+e+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+e+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+e+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+e+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+e+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+e+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+e+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+e+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+e+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+e+"], 10);\n",s:"(\\d{2})"};case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(t)}}},Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3")},Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+String.leftPad(Math.abs(this.getTimezoneOffset())%60,2,"0")},Date.prototype.getDayOfYear=function(){var t=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var e=0;e<this.getMonth();++e)t+=Date.daysInMonth[e];return t+this.getDate()},Date.prototype.getWeekOfYear=function(){var t=this.getDayOfYear()+(4-this.getDay()),e=new Date(this.getFullYear(),0,1),i=7-e.getDay()+4;return String.leftPad(Math.ceil((t-i)/7)+1,2,"0")},Date.prototype.isLeapYear=function(){var t=this.getFullYear();return 0==(3&t)&&(t%100||t%400==0&&t)},Date.prototype.getFirstDayOfMonth=function(){var t=(this.getDay()-(this.getDate()-1))%7;return 0>t?t+7:t},Date.prototype.getLastDayOfMonth=function(){var t=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return 0>t?t+7:t},Date.prototype.getDaysInMonth=function(){return Date.daysInMonth[1]=this.isLeapYear()?29:28,Date.daysInMonth[this.getMonth()]},Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},String.escape=function(t){return t.replace(/('|\\)/g,"\\$1")},String.leftPad=function(t,e,i){var n=new String(t);for(null==i&&(i=" ");n.length<e;)n=i+n;return n},Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31],Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Date.y2kYear=50,Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},Date.patterns={ISO8601LongPattern:"Y-m-d H:i:s",ISO8601ShortPattern:"Y-m-d",ShortDatePattern:"n/j/Y",LongDatePattern:"l, F d, Y",FullDateTimePattern:"l, F d, Y g:i:s A",MonthDayPattern:"F d",ShortTimePattern:"g:i A",LongTimePattern:"g:i:s A",SortableDateTimePattern:"Y-m-d\\TH:i:s",UniversalSortableDateTimePattern:"Y-m-d H:i:sO",YearMonthPattern:"F, Y"}}()}(n2),function(t){t(n2)}(function(t){"use strict";function e(e,s){function o(){return d.update(),r(),d}function a(){v.css(x,d.contentPosition/d.trackRatio),f.css(x,-d.contentPosition),m.css(w,d.trackSize),g.css(w,d.trackSize),v.css(w,d.thumbSize)}function r(){y?p[0].ontouchstart=function(t){1===t.touches.length&&(t.stopPropagation(),l(t.touches[0]))}:(v.bind("mousedown",l),g.bind("mousedown",c)),t(window).resize(function(){d.update("relative")}),d.options.wheel&&e.on("mousewheel",h)}function l(e){t("body").addClass("noSelect"),_=b?e.pageX:e.pageY,d.thumbPosition=parseInt(v.css(x),10)||0,y?(document.ontouchmove=function(t){t.preventDefault(),c(t.touches[0])},document.ontouchend=u):(t(document).bind("mousemove",c),t(document).bind("mouseup",u),v.bind("mouseup",u))}function h(i){if(d.contentRatio<1){var n=i,s=("delta"+d.options.axis.toUpperCase(),n.deltaY);d.contentPosition-=s*d.options.wheelSpeed,d.contentPosition=Math.min(d.contentSize-d.viewportSize,Math.max(0,d.contentPosition)),e.trigger("move"),v.css(x,d.contentPosition/d.trackRatio),f.css(x,-d.contentPosition),(d.options.wheelLock||d.contentPosition!==d.contentSize-d.viewportSize&&0!==d.contentPosition)&&(n=t.event.fix(n),n.preventDefault())}}function c(t){if(d.contentRatio<1){var i=b?t.pageX:t.pageY,n=i-_;d.options.scrollInvert&&y&&(n=_-i),nextend.isRTL()&&(n*=-1);var s=Math.min(d.trackSize-d.thumbSize,Math.max(0,d.thumbPosition+n));d.contentPosition=s*d.trackRatio,e.trigger("move"),v.css(x,s),f.css(x,-d.contentPosition)}}function u(){t("body").removeClass("noSelect"),t(document).unbind("mousemove",c),t(document).unbind("mouseup",u),v.unbind("mouseup",u),document.ontouchmove=document.ontouchend=null}this.options=t.extend({},n,s),this._defaults=n,this._name=i;var d=this,p=e.find(".viewport"),f=e.find(".overview"),m=e.find(".scrollbar"),g=m.find(".track"),v=m.find(".thumb"),_=0,b="x"===this.options.axis,y=!1,w=("onwheel"in document||document.documentMode>=9?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",b?"width":"height"),x=b?nextend.isRTL()?"right":"left":"top";return this.contentPosition=0,this.viewportSize=0,this.contentSize=0,this.contentRatio=0,this.trackSize=0,this.trackRatio=0,this.thumbSize=0,this.thumbPosition=0,this.update=function(t){var i=w.charAt(0).toUpperCase()+w.slice(1).toLowerCase();switch(this.viewportSize=p[0]["offset"+i],this.contentSize=f.width(),this.contentRatio=this.viewportSize/this.contentSize,this.trackSize=m.parent().width()||this.viewportSize,this.thumbSize=Math.min(this.trackSize,Math.max(0,this.options.thumbSize||this.trackSize*this.contentRatio)),this.trackRatio=this.options.thumbSize?(this.contentSize-this.viewportSize)/(this.trackSize-this.thumbSize):this.contentSize/this.trackSize,_=g.offset().top,e.toggleClass("n2-scroll-disable",this.contentRatio>=1),m.toggleClass("disable",this.contentRatio>=1),t){case"bottom":this.contentPosition=this.contentSize-this.viewportSize;break;case"relative":this.contentPosition=Math.min(Math.max(this.contentSize-this.viewportSize,0),Math.max(0,this.contentPosition));break;default:this.contentPosition=parseInt(t,10)||0}return a(),e.trigger("scrollUpdate"),d},this.wheel=h,o()}var i="tinyscrollbar",n={axis:"y",wheel:!0,wheelSpeed:40,wheelLock:!0,scrollInvert:!1,trackSize:!1,thumbSize:!1};t.fn[i]=function(n){return this.each(function(){t.data(this,"plugin_"+i)||t.data(this,"plugin_"+i,new e(t(this),n))})}}),function(t){function e(){return"n"+Math.floor(281474976710656*(1+Math.random())).toString(16)}t.fn.uid=function(){var i=null;do i=e();while(t("#"+i).length>0);return i}}(n2),function(t,e,i,n){function s(t,i){this.loadDefaults(),this.topOffset=e("#wpadminbar, .navbar-fixed-top").height(),this.tab=t,this.mainPane=i}function o(t,i,n){s.prototype.constructor.apply(this,arguments),this.key&&(this.ratio=e.jStorage.get(this.key,this.ratio)),this.bottomPane=n}s.prototype.loadDefaults=function(){this.ratio=1,this.excludedHeight=0},s.prototype.lateInit=function(){this.calibrate(),e(window).on("resize",e.proxy(this.resize,this)),e(window).one("load",e.proxy(this.calibrate,this))},s.prototype.calibrate=function(){this.excludedHeight=this.getExcludedHeight(),this.resize()},s.prototype.getExcludedHeight=function(){return 0},s.prototype.resize=function(){this.targetHeight=window.innerHeight-this.topOffset-this.excludedHeight,this.changeRatio(this.ratio)},s.prototype.changeRatio=function(t){this.mainPane.height(this.targetHeight)},i.NextendAdminSinglePane=s,o.prototype=Object.create(s.prototype),o.prototype.constructor=o,o.prototype.loadDefaults=function(){s.prototype.loadDefaults.apply(this,arguments),this.key=!1,this.ratio=.5,this.originalRatio=.5},o.prototype.lateInit=function(){s.prototype.lateInit.apply(this,arguments),this.tab.find(".n2-sidebar-pane-sizer").draggable({axis:"y",scroll:!1,start:e.proxy(this.start,this),drag:e.proxy(this.drag,this)})},o.prototype.start=function(t,e){this.originalRatio=this.ratio},o.prototype.drag=function(t,e){var i=this.originalRatio+e.position.top/this.targetHeight;.1>i?(i=.1,e.position.top=(i-this.originalRatio)*this.targetHeight):i>.9&&(i=.9,e.position.top=(i-this.originalRatio)*this.targetHeight),this.changeRatio(i),e.position.top=0},o.prototype.changeRatio=function(t){var i=parseInt(this.targetHeight*this.ratio);this.mainPane.height(i),this.bottomPane.height(this.targetHeight-i-1),this.ratio=t,this.key&&e.jStorage.set(this.key,t)},i.NextendAdminVerticalPane=o}(nextend.smartSlider,n2,window),function(t,e){var i;!function(t){"function"==typeof i&&i.amd?i(["jquery"],t):t(e)}(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 n(){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=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(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(g.inline?g.dpDiv.parent()[0]:g.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 n in i)null==i[n]&&(e[n]=i[n]);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||{};var l=(t.ui.version="1.12.1",0),h=Array.prototype.slice;t.cleanData=function(e){return function(i){var n,s,o;for(o=0;null!=(s=i[o]);o++)try{n=t._data(s,"events"),n&&n.remove&&t(s).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,n){var s,o,a,r={},l=e.split(".")[0];e=e.split(".")[1];var h=l+"-"+e;return n||(n=i,i=t.Widget),t.isArray(n)&&(n=t.extend.apply(null,[{}].concat(n))),t.expr[":"][h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},s=t[l][e],o=t[l][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new o(t,e)},t.extend(o,s,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(n,function(e,n){return t.isFunction(n)?void(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=s,e=n.apply(this,arguments),this._super=i,this._superApply=o,e}}()):void(r[e]=n)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:s?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:l,widgetName:e,widgetFullName:h}),s?(t.each(s._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,o,i._proto)}),delete s._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,n,s=h.call(arguments,1),o=0,a=s.length;a>o;o++)for(i in s[o])n=s[o][i],s[o].hasOwnProperty(i)&&void 0!==n&&(t.isPlainObject(n)?e[i]=t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):e[i]=n);return e},t.widget.bridge=function(e,i){
var n=i.prototype.widgetFullName||e;t.fn[e]=function(s){var o="string"==typeof s,a=h.call(arguments,1),r=this;return o?this.length||"instance"!==s?this.each(function(){var i,o=t.data(this,n);return"instance"===s?(r=o,!1):o?t.isFunction(o[s])&&"_"!==s.charAt(0)?(i=o[s].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 '"+s+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+s+"'")}):r=void 0:(a.length&&(s=t.widget.extend.apply(null,[s].concat(a))),this.each(function(){var e=t.data(this,n);e?(e.option(s||{}),e._init&&e._init()):t.data(this,n,new i(s,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=l++,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 n,s,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},n=e.split("."),e=n.shift(),n.length){for(s=a[e]=t.widget.extend({},this.options[e]),o=0;o<n.length-1;o++)s[n[o]]=s[n[o]]||{},s=s[n[o]];if(e=n.pop(),1===arguments.length)return void 0===s[e]?null:s[e];s[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,n,s;for(i in e)s=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&s&&s.length&&(n=t(s.get()),this._removeClass(s,i),n.addClass(this._classes({element:n,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;r<i.length;r++)a=s.classesElementLookup[i[r]]||t(),a=t(e.add?t.unique(a.get().concat(e.element.get())):a.not(e.element).get()),s.classesElementLookup[i[r]]=a,n.push(i[r]),o&&e.classes[i[r]]&&n.push(e.classes[i[r]])}var n=[],s=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)||[]),n.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(n,s){-1!==t.inArray(e.target,s)&&(i.classesElementLookup[n]=t(s.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,n){n="boolean"==typeof n?n:i;var s="string"==typeof t||null===t,o={extra:s?e:i,keys:s?t:e,element:s?this.element:t,add:n};return o.element.toggleClass(this._classes(o),n),this},_on:function(e,i,n){var s,o=this;"boolean"!=typeof e&&(n=i,i=e,e=!1),n?(i=s=t(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,s=this.widget()),t.each(n,function(n,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 l=n.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?s.on(h,c,r):i.on(h,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?n[t]:t).apply(n,arguments)}var n=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,n){var s,o,a=this.options[e];if(n=n||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(s in o)s in i||(i[s]=o[s]);return this.element.trigger(i,n),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(n))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(n,s,o){"string"==typeof s&&(s={effect:s});var a,r=s?s===!0||"number"==typeof s?i:s.effect||i:e;s=s||{},"number"==typeof s&&(s={duration:s}),a=!t.isEmptyObject(s),s.complete=o,s.delay&&n.delay(s.delay),a&&t.effects&&t.effects.effect[r]?n[e](s):r!==e&&n[r]?n[r](s.duration,s.easing,o):n.queue(function(i){t(this)[e](),o&&o.call(n[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 n(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 s,o=Math.max,a=Math.abs,r=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==s)return s;var e,i,n=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),e=o.offsetWidth,n.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=n[0].clientWidth),n.remove(),s=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),s="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:s?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),n=t.isWindow(i[0]),s=!!i[0]&&9===i[0].nodeType,o=!n&&!s;return{element:i,isWindow:n,isDocument:s,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(s){if(!s||!s.of)return d.apply(this,arguments);s=t.extend({},s);var u,p,f,m,g,v,_=t(s.of),b=t.position.getWithinInfo(s.within),y=t.position.getScrollInfo(b),w=(s.collision||"flip").split(" "),x={};return v=n(_),_[0].preventDefault&&(s.at="left top"),p=v.width,f=v.height,m=v.offset,g=t.extend({},m),t.each(["my","at"],function(){var t,e,i=(s[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):l.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=l.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),x[this]=[t?t[0]:0,e?e[0]:0],s[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===s.at[0]?g.left+=p:"center"===s.at[0]&&(g.left+=p/2),"bottom"===s.at[1]?g.top+=f:"center"===s.at[1]&&(g.top+=f/2),u=e(x.at,p,f),g.left+=u[0],g.top+=u[1],this.each(function(){var n,r,l=t(this),h=l.outerWidth(),c=l.outerHeight(),d=i(this,"marginLeft"),v=i(this,"marginTop"),k=h+d+i(this,"marginRight")+y.width,C=c+v+i(this,"marginBottom")+y.height,D=t.extend({},g),S=e(x.my,l.outerWidth(),l.outerHeight());"right"===s.my[0]?D.left-=h:"center"===s.my[0]&&(D.left-=h/2),"bottom"===s.my[1]?D.top-=c:"center"===s.my[1]&&(D.top-=c/2),D.left+=S[0],D.top+=S[1],n={marginLeft:d,marginTop:v},t.each(["left","top"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:h,elemHeight:c,collisionPosition:n,collisionWidth:k,collisionHeight:C,offset:[u[0]+S[0],u[1]+S[1]],my:s.my,at:s.at,within:b,elem:l})}),s.using&&(r=function(t){var e=m.left-D.left,i=e+p-h,n=m.top-D.top,r=n+f-c,u={target:{element:_,left:m.left,top:m.top,width:p,height:f},element:{element:l,left:D.left,top:D.top,width:h,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":n>0?"bottom":"middle"};h>p&&a(e+i)<p&&(u.horizontal="center"),c>f&&a(n+r)<f&&(u.vertical="middle"),o(a(e),a(i))>o(a(n),a(r))?u.important="horizontal":u.important="vertical",s.using.call(this,t,u)}),l.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollLeft:n.offset.left,a=n.width,r=t.left-e.collisionPosition.marginLeft,l=s-r,h=r+e.collisionWidth-a-s;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-s,t.left+=l-i):h>0&&0>=l?t.left=s:l>h?t.left=s+a-e.collisionWidth:t.left=s:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollTop:n.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=s-r,h=r+e.collisionHeight-a-s;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-s,t.top+=l-i):h>0&&0>=l?t.top=s:l>h?t.top=s+a-e.collisionHeight:t.top=s:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,n,s=e.within,o=s.offset.left+s.scrollLeft,r=s.width,l=s.isWindow?s.scrollLeft:s.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,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||i<a(c))&&(t.left+=d+p+f)):u>0&&(n=t.left-e.collisionPosition.marginLeft+d+p+f-l,(n>0||a(n)<u)&&(t.left+=d+p+f))},top:function(t,e){var i,n,s=e.within,o=s.offset.top+s.scrollTop,r=s.height,l=s.isWindow?s.scrollTop:s.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,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,m=-2*e.offset[1];0>c?(n=t.top+p+f+m+e.collisionHeight-r-o,(0>n||n<a(c))&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-l,(i>0||a(i)<u)&&(t.top+=p+f+m))}},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)}}}}();var c=(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,n){return!!t.data(e,n[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")}}),"ui-effects-"),u="ui-effects-style",d="ui-effects-animated",p=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var n=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=n.floor?~~t:parseFloat(t),isNaN(t)?e.def:n.mod?(t+n.mod)%n.mod:0>t?0:n.max<t?n.max:t)}function n(e){var i=h(),n=i._rgba=[];return e=e.toLowerCase(),f(l,function(t,s){var o,a=s.re.exec(e),r=a&&s.parse(a),l=s.space||"rgba";return r?(o=i[l](r),i[c[l].cache]=o[c[l].cache],n=i._rgba=o._rgba,!1):void 0}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),i):o[e]}function s(t,e,i){return i=(i+1)%1,1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,l=[{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]]}}],h=t.Color=function(e,i,n,s){return new t.Color.fn.parse(e,i,n,s)},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=h.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}}),h.fn=t.extend(h.prototype,{parse:function(s,a,r,l){if(s===e)return this._rgba=[null,null,null,null],this;(s.jquery||s.nodeType)&&(s=t(s).css(a),a=e);var u=this,d=t.type(s),p=this._rgba=[];return a!==e&&(s=[s,a,r,l],d="array"),"string"===d?this.parse(n(s)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(s[e.idx],e)}),this):"object"===d?(s instanceof h?f(c,function(t,e){s[e.cache]&&(u[e.cache]=s[e.cache].slice())}):f(c,function(e,n){var o=n.cache;f(n.props,function(t,e){if(!u[o]&&n.to){if("alpha"===t||null==s[t])return;u[o]=n.to(u._rgba)}u[o][e.idx]=i(s[t],e,!0)}),u[o]&&t.inArray(null,u[o].slice(0,3))<0&&(u[o][3]=1,n.from&&(u._rgba=n.from(u[o])))}),this):void 0},is:function(t){var e=h(t),i=!0,n=this;return f(c,function(t,s){var o,a=e[s.cache];return a&&(o=n[s.cache]||s.to&&s.to(n._rgba)||[],f(s.props,function(t,e){return null!=a[e.idx]?i=a[e.idx]===o[e.idx]:void 0})),i}),i},_space:function(){var t=[],e=this;return f(c,function(i,n){e[n.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var n=h(t),s=n._space(),o=c[s],a=0===this.alpha()?h("transparent"):this,r=a[o.cache]||o.to(a._rgba),l=r.slice();return n=n[o.cache],f(o.props,function(t,s){var o=s.idx,a=r[o],h=n[o],c=u[s.type]||{};null!==h&&(null===a?l[o]=h:(c.mod&&(h-a>c.mod/2?a+=c.mod:a-h>c.mod/2&&(a-=c.mod)),l[o]=i((h-a)*e+a,s)))}),this[s](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),s=h(e)._rgba;return h(t.map(i,function(t,e){return(1-n)*s[e]+n*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(),n=i.pop();return e&&i.push(~~(255*n)),"#"+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()}}),h.fn.parse.prototype=h.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,n=t[0]/255,s=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(n,s,o),l=Math.min(n,s,o),h=r-l,c=r+l,u=.5*c;return e=l===r?0:n===r?60*(s-o)/h+360:s===r?60*(o-n)/h+120:60*(n-s)/h+240,i=0===h?0:.5>=u?h/c:h/(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],n=t[2],o=t[3],a=.5>=n?n*(1+i):n+i-n*i,r=2*n-a;return[Math.round(255*s(r,a,e+1/3)),Math.round(255*s(r,a,e)),Math.round(255*s(r,a,e-1/3)),o]},f(c,function(n,s){var o=s.props,a=s.cache,l=s.to,c=s.from;h.fn[n]=function(n){if(l&&!this[a]&&(this[a]=l(this._rgba)),n===e)return this[a].slice();var s,r=t.type(n),u="array"===r||"object"===r?n:arguments,d=this[a].slice();return f(o,function(t,e){var n=u["object"===r?t:e.idx];null==n&&(n=d[e.idx]),d[e.idx]=i(n,e)}),c?(s=h(c(d)),s[a]=d,s):h(d)},f(o,function(e,i){h.fn[e]||(h.fn[e]=function(s){var o,a=t.type(s),l="alpha"===e?this._hsla?"hsla":"rgba":n,h=this[l](),c=h[i.idx];return"undefined"===a?c:("function"===a&&(s=s.call(this,c),a=t.type(s)),null==s&&i.empty?this:("string"===a&&(o=r.exec(s),o&&(s=c+parseFloat(o[2])*("+"===o[1]?1:-1))),h[i.idx]=s,this[l](h)))})})}),h.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,s){var o,a,r="";if("transparent"!==s&&("string"!==t.type(s)||(o=n(s)))){if(s=h(o||s),!d.rgba&&1!==s._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(l){}s=s.blend(r&&"transparent"!==r?r:"_default")}s=s.toRgbaString()}try{e.style[i]=s}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,n){e["border"+n+"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,n,s=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(s&&s.length&&s[0]&&s[s[0]])for(n=s.length;n--;)i=s[n],"string"==typeof s[i]&&(o[t.camelCase(i)]=s[i]);else for(i in s)"string"==typeof s[i]&&(o[i]=s[i]);return o}function i(e,i){var n,o,a={};for(n in i)o=i[n],e[n]!==o&&(s[n]||!t.fx.step[n]&&isNaN(parseFloat(o))||(a[n]=o));return a}var n=["add","remove","toggle"],s={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(s,o,a,r){var l=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",h=l.children?a.find("*").addBack():a;h=h.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(n,function(t,e){s[e]&&a[e+"Class"](s[e])})},o(),h=h.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",r),h=h.map(function(){var e=this,i=t.Deferred(),n=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,n),i.promise()}),t.when.apply(t,h.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,n,s,o){return n?t.effects.animateClass.call(this,{add:i},n,s,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,n,s,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},n,s,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,n,s,o,a){return"boolean"==typeof n||void 0===n?s?t.effects.animateClass.call(this,n?{add:i}:{remove:i},s,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},n,s,o)}}(t.fn.toggleClass),switchClass:function(e,i,n,s,o){return t.effects.animateClass.call(this,{add:i,remove:e},n,s,o)}})}(),function(){function e(e,i,n,s){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(s=i,n=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(s=n,n=i,i={}),t.isFunction(n)&&(s=n,n=null),i&&t.extend(e,i),n=n||i.duration,e.duration=t.fx.off?0:"number"==typeof n?n:n in t.fx.speeds?t.fx.speeds[n]:t.fx.speeds._default,e.complete=s||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:!0}function n(t,e){var i=e.outerWidth(),n=e.outerHeight(),s=/^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=s.exec(t)||["",0,i,n,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?n: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,n=e.length;n>i;i++)null!==e[i]&&t.data(c+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,n=0,s=e.length;s>n;n++)null!==e[n]&&(i=t.data(c+e[n]),t.css(e[n],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")},n=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),s={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(n),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),n=e.parent(),"static"===e.css("position")?(n.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,n){i[n]=e.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(s),n.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,n){return n||(n=i,i="effect"),t.effects.effect[e]=n,t.effects.effect[e].mode=i,n},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(e||100)/100:1,s="vertical"!==i?(e||100)/100:1;return{height:t.height()*s,width:t.width()*n,outerHeight:t.outerHeight()*s,outerWidth:t.outerWidth()*n}},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 n=t.queue();e>1&&n.splice.apply(n,[1,0].concat(n.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,n;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":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=t[1]/e.width}return{x:n,y:i}},createPlaceholder:function(e){var i,n=e.css("position"),s=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(n)&&(n="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:n,left:s.left,top:s.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,n,s){return s=s||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(s[i]=o[0]*n+o[1])}),s}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(d),t.effects.cleanUp(r),"hide"===n.mode&&r.hide(),a()}function a(){t.isFunction(l)&&l.call(r[0]),t.isFunction(e)&&e()}var r=t(this);n.mode=c.shift(),t.uiBackCompat===!1||o?"none"===n.mode?(r[h](),a()):s.call(r[0],n,i):(r.is(":hidden")?"hide"===h:"show"===h)?(r[h](),a()):s.call(r[0],n,a)}var n=e.apply(this,arguments),s=t.effects.effect[n.effect],o=s.mode,a=n.queue,r=a||"fx",l=n.complete,h=n.mode,c=[],u=function(e){var i=t(this),n=t.effects.mode(i,h)||o;i.data(d,!0),c.push(n),o&&("show"===n||n===o&&"hide"===n)&&i.show(),o&&"none"===n||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!s?h?this[h](n.duration,l):this.each(function(){l&&l.call(this)}):a===!1?this.each(u).each(i):this.queue(r,u).queue(r,i)},show:function(t){return function(n){if(i(n))return t.apply(this,arguments);var s=e.apply(this,arguments);return s.mode="show",this.effect.call(this,s)}}(t.fn.show),hide:function(t){return function(n){if(i(n))return t.apply(this,arguments);var s=e.apply(this,arguments);return s.mode="hide",this.effect.call(this,s)}}(t.fn.hide),toggle:function(t){return function(n){if(i(n)||"boolean"==typeof n)return t.apply(this,arguments);var s=e.apply(this,arguments);return s.mode="toggle",this.effect.call(this,s)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),n=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(n=[parseFloat(i),e])}),n},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):n(this.css("clip"),this)},transfer:function(e,i){var n=t(this),s=t(e.to),o="fixed"===s.css("position"),a=t("body"),r=o?a.scrollTop():0,l=o?a.scrollLeft():0,h=s.offset(),c={top:h.top-r,left:h.left-l,height:s.innerHeight(),width:s.innerWidth()},u=n.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-l,height:n.innerHeight(),width:n.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=n(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;t<((e=Math.pow(2,--i))-1)/11;);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,f=t.effects;t.effects.define("blind","hide",function(e,i){var n={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},s=t(this),o=e.direction||"up",a=s.cssClip(),r={clip:t.extend({},a)},l=t.effects.createPlaceholder(s);r.clip[n[o][0]]=r.clip[n[o][1]],"show"===e.mode&&(s.cssClip(r.clip),l&&l.css(t.effects.clipToBox(r)),r.clip=a),l&&l.animate(t.effects.clipToBox(r),e.duration,e.easing),s.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var n,s,o,a=t(this),r=e.mode,l="hide"===r,h="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(h||l?1:0),f=e.duration/p,m=e.easing,g="up"===c||"down"===c?"top":"left",v="up"===c||"left"===c,_=0,b=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(g),u||(u=a["top"===g?"outerHeight":"outerWidth"]()/3),h&&(s={opacity:1},s[g]=o,a.css("opacity",0).css(g,v?2*-u:2*u).animate(s,f,m)),l&&(u/=Math.pow(2,d-1)),s={},s[g]=o;d>_;_++)n={},n[g]=(v?"-=":"+=")+u,a.animate(n,f,m).animate(s,f,m),u=l?2*u:u/2;l&&(n={opacity:0},n[g]=(v?"-=":"+=")+u,a.animate(n,f,m)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define("clip","hide",function(e,i){var n,s={},o=t(this),a=e.direction||"vertical",r="both"===a,l=r||"horizontal"===a,h=r||"vertical"===a;n=o.cssClip(),s.clip={top:h?(n.bottom-n.top)/2:n.top,right:l?(n.right-n.left)/2:n.right,bottom:h?(n.bottom-n.top)/2:n.bottom,left:l?(n.right-n.left)/2:n.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(s.clip),s.clip=n),o.animate(s,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var n,s=t(this),o=e.mode,a="show"===o,r=e.direction||"left",l="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r?"-=":"+=",c="+="===h?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(s),n=e.distance||s["top"===l?"outerHeight":"outerWidth"](!0)/2,u[l]=h+n,a&&(s.css(u),u[l]=c+n,u.opacity=1),s.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function n(){b.push(this),b.length===u*d&&s()}function s(){p.css({visibility:"visible"}),t(b).remove(),i()}var o,a,r,l,h,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(l=g.top+o*_,c=o-(u-1)/2,a=0;d>a;a++)r=g.left+a*v,h=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*v,top:-o*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(m?h*v:0),top:l+(m?c*_:0),opacity:m?0:1}).animate({left:r+(m?0:h*v),top:l+(m?0:c*_),opacity:m?1:0},e.duration||500,e.easing,n)}),t.effects.define("fade","toggle",function(e,i){var n="show"===e.mode;t(this).css("opacity",n?0:1).animate({opacity:n?1:0
},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var n=t(this),s=e.mode,o="show"===s,a="hide"===s,r=e.size||15,l=/([0-9]+)%/.exec(r),h=!!e.horizFirst,c=h?["right","bottom"]:["bottom","right"],u=e.duration/2,d=t.effects.createPlaceholder(n),p=n.cssClip(),f={clip:t.extend({},p)},m={clip:t.extend({},p)},g=[p[c[0]],p[c[1]]],v=n.queue().length;l&&(r=parseInt(l[1],10)/100*g[a?0:1]),f.clip[c[0]]=r,m.clip[c[0]]=r,m.clip[c[1]]=0,o&&(n.cssClip(m.clip),d&&d.css(t.effects.clipToBox(m)),m.clip=p),n.queue(function(i){d&&d.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(m),u,e.easing),i()}).animate(f,u,e.easing).animate(m,u,e.easing).queue(i),t.effects.unshift(n,v,4)}),t.effects.define("highlight","show",function(e,i){var n=t(this),s={backgroundColor:n.css("backgroundColor")};"hide"===e.mode&&(s.opacity=0),t.effects.saveStyle(n),n.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(s,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var n,s,o,a=t(this),r=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=a.css("position"),m=a.position(),g=t.effects.scaledDimensions(a),v=e.from||g,_=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===c&&(o=v,v=_,_=o),s={from:{y:v.height/g.height,x:v.width/g.width},to:{y:_.height/g.height,x:_.width/g.width}},"box"!==d&&"both"!==d||(s.from.y!==s.to.y&&(v=t.effects.setTransition(a,l,s.from.y,v),_=t.effects.setTransition(a,l,s.to.y,_)),s.from.x!==s.to.x&&(v=t.effects.setTransition(a,h,s.from.x,v),_=t.effects.setTransition(a,h,s.to.x,_))),"content"!==d&&"both"!==d||s.from.y!==s.to.y&&(v=t.effects.setTransition(a,r,s.from.y,v),_=t.effects.setTransition(a,r,s.to.y,_)),p&&(n=t.effects.getBaseline(p,g),v.top=(g.outerHeight-v.outerHeight)*n.y+m.top,v.left=(g.outerWidth-v.outerWidth)*n.x+m.left,_.top=(g.outerHeight-_.outerHeight)*n.y+m.top,_.left=(g.outerWidth-_.outerWidth)*n.x+m.left),a.css(v),"content"!==d&&"both"!==d||(l=l.concat(["marginTop","marginBottom"]).concat(r),h=h.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),n=t.effects.scaledDimensions(i),o={height:n.height*s.from.y,width:n.width*s.from.x,outerHeight:n.outerHeight*s.from.y,outerWidth:n.outerWidth*s.from.x},a={height:n.height*s.to.y,width:n.width*s.to.x,outerHeight:n.height*s.to.y,outerWidth:n.width*s.to.x};s.from.y!==s.to.y&&(o=t.effects.setTransition(i,l,s.from.y,o),a=t.effects.setTransition(i,l,s.to.y,a)),s.from.x!==s.to.x&&(o=t.effects.setTransition(i,h,s.from.x,o),a=t.effects.setTransition(i,h,s.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(_,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===_.opacity&&a.css("opacity",v.opacity),u||(a.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var n=t(this),s=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==s?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(n),to:t.effects.scaledDimensions(n,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 n=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,n,i)}),t.effects.define("pulsate","show",function(e,i){var n=t(this),s=e.mode,o="show"===s,a="hide"===s,r=o||a,l=2*(e.times||5)+(r?1:0),h=e.duration/l,c=0,u=1,d=n.queue().length;for(!o&&n.is(":visible")||(n.css("opacity",0).show(),c=1);l>u;u++)n.animate({opacity:c},h,e.easing),c=1-c;n.animate({opacity:c},h,e.easing),n.queue(i),t.effects.unshift(n,d,l+1)}),t.effects.define("shake",function(e,i){var n=1,s=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,l=2*r+1,h=Math.round(e.duration/l),c="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,d={},p={},f={},m=s.queue().length;for(t.effects.createPlaceholder(s),d[c]=(u?"-=":"+=")+a,p[c]=(u?"+=":"-=")+2*a,f[c]=(u?"-=":"+=")+2*a,s.animate(d,h,e.easing);r>n;n++)s.animate(p,h,e.easing).animate(f,h,e.easing);s.animate(p,h,e.easing).animate(d,h/2,e.easing).queue(i),t.effects.unshift(s,m,l+1)}),t.effects.define("slide","show",function(e,i){var n,s,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,u=e.distance||o["top"===h?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),n=o.cssClip(),s=o.position()[h],d[h]=(c?-1:1)*u+s,d.clip=o.cssClip(),d.clip[a[l][1]]=d.clip[a[l][0]],"show"===r&&(o.cssClip(d.clip),o.css(h,d[h]),d.clip=n,d[h]=s),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});t.uiBackCompat!==!1&&(f=t.effects.define("transfer",function(e,i){t(this).transfer(e,i)}));t.ui.focusable=function(i,n){var s,o,a,r,l,h=i.nodeName.toLowerCase();return"area"===h?(s=i.parentNode,o=s.name,i.href&&o&&"map"===s.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(h)?(r=!i.disabled,r&&(l=t(i).closest("fieldset")[0],l&&(r=!l.disabled))):r="a"===h?i.href||n:n,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 n(e,i,n,o){return t.each(s,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var s="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,n(this,e)+"px")})},t.fn["outer"+i]=function(e,s){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,n(this,e,!0,s)+"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,n,s,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(s=this.eq(0).parents("label"),n=this.attr("id"),n&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(n)+"']",s=s.add(o.find(i).addBack(i))),this.pushStack(s))},t.fn.scrollParent=function(e){var i=this.css("position"),n="absolute"===i,s=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return n&&"static"===e.css("position")?!1:s.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"),n=null!=i;return(!n||i>=0)&&t.ui.focusable(e,n)}}),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(),e.active<0&&(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,n=this.options.icons;n&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+n.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,n.header)._addClass(i,null,n.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?void this._activate(e):("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),void("icons"===t&&(this._destroyIcons(),e&&this._createIcons())))},_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,n=this.headers.length,s=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(s+1)%n];break;case i.LEFT:case i.UP:o=this.headers[(s-1+n)%n];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[n-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,n=i.heightStyle,s=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"),n=e.next(),s=n.uniqueId().attr("id");e.attr("aria-controls",s),n.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"===n?(e=s.height(),this.element.siblings(":visible").each(function(){var i=t(this),n=i.css("position");"absolute"!==n&&"fixed"!==n&&(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"===n&&(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,n,s=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],l=r&&s.collapsible,h=l?t():a.next(),c=o.next(),u={oldHeader:o,oldPanel:c,newHeader:l?t():a,newPanel:h};e.preventDefault(),r&&!s.collapsible||this._trigger("beforeActivate",e,u)===!1||(s.active=l?!1:this.headers.index(a),this.active=r?t():a,this._toggle(u),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),s.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,s.icons.activeHeader)._addClass(i,null,s.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),s.icons&&(n=a.children(".ui-accordion-header-icon"),this._removeClass(n,null,s.icons.header)._addClass(n,null,s.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,n=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=n,this.options.animate?this._animate(i,n,e):(n.hide(),i.show(),this._toggleComplete(e)),n.attr({"aria-hidden":"true"}),n.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&n.length?n.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 n,s,o,a=this,r=0,l=t.css("box-sizing"),h=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},u=h&&c.down||c,d=function(){a._toggleComplete(i)};return"number"==typeof u&&(o=u),"string"==typeof u&&(s=u),s=s||u.easing||c.easing,o=o||u.duration||c.duration,e.length?t.length?(n=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:s,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:o,easing:s,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===l&&(r+=i.now):"content"!==a.options.heightStyle&&(i.now=Math.round(n-e.outerHeight()-r),r=0)}})):e.animate(this.hideProps,o,s,d):t.animate(this.showProps,o,s,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),n=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")&&n.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"),n=t(e.currentTarget);i[0]===n[0]&&(this._removeClass(n.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,n))}},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,n,s,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,n=this.previousFilter||"",o=!1,s=e.keyCode>=96&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),s===n?o=!0:s=n+s,i=this._filterMenuItems(s),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(s=String.fromCharCode(e.keyCode),i=this._filterMenuItems(s)),i.length?(this.focus(e,i),this.previousFilter=s,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,n,s,o,a=this,r=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),n=l.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(),n=t("<span>").data("ui-menu-submenu-caret",!0);a._addClass(n,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(n,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.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")}),s=i.not(".ui-menu-item, .ui-menu-divider"),o=s.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(s,"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",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,n,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),n=this.active.children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),s=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(s,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,n,s,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,s=e.offset().top-this.activeMenu.offset().top-i-n,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>s?this.activeMenu.scrollTop(o+s):s+r>a&&this.activeMenu.scrollTop(o+s-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 n=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(e),this._removeClass(n.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=n},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 n;this.active&&(n="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.find(this.options.items)[e]()),this.focus(i,n)},nextPage:function(e){var i,n,s;return this.active?void(this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n-s<0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var i,n,s;return this.active?void(this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n+s>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first()))):void this.next(e)},_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,"\\$&"),n=new RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return n.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,n,s=this.element[0].nodeName.toLowerCase(),o="textarea"===s,a="input"===s;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(s){if(this.element.prop("readOnly"))return e=!0,n=!0,void(i=!0);e=!1,n=!1,i=!1;var o=t.ui.keyCode;switch(s.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",s);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",s);break;case o.UP:e=!0,this._keyEvent("previous",s);break;case o.DOWN:e=!0,this._keyEvent("next",s);break;case o.ENTER:this.menu.active&&(e=!0,s.preventDefault(),this.menu.select(s));break;case o.TAB:this.menu.active&&this.menu.select(s);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(s),s.preventDefault());break;default:i=!0,this._searchTimeout(s)}},keypress:function(n){if(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||n.preventDefault());if(!i){var s=t.ui.keyCode;switch(n.keyCode){case s.PAGE_UP:this._move("previousPage",n);break;case s.PAGE_DOWN:this._move("nextPage",n);break;case s.UP:this._keyEvent("previous",n);break;case s.DOWN:this._keyEvent("next",n)}}},input:function(t){return n?(n=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),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 n,s;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)})):(s=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:s})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value),n=i.item.attr("aria-label")||s.value,void(n&&t.trim(n).length&&(this.liveRegion.children().hide(),t("<div>").text(n).appendTo(this.liveRegion))))},menuselect:function(e,i){var n=i.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=n})),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),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,n=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,n){n(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,s){n.xhr&&n.xhr.abort(),n.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){s(t)},error:function(){s([])}})}):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"),n=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;e&&(!e||i||n)||(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 n=this;t.each(i,function(t,i){n._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),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},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 n=new RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return n.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))}});var m=(t.ui.autocomplete,/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(n,s){var o,a={};return s?"controlgroupLabel"===n?(o=e.element.find(s),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"),void(i=i.concat(o.get()))):void(t.fn[n]&&(a=e["_"+n+"Options"]?e["_"+n+"Options"]("middle"):{classes:{}},e.element.find(s).each(function(){var s=t(this),o=s[n]("instance"),r=t.widget.extend({},a);if("button"!==n||!s.parent(".ui-spinner").length){o||(o=s[n]()[n]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),s[n](r);var l=s[n]("widget");t.data(l[0],"ui-controlgroup-data",o?o:s[n]("instance")),i.push(l[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),n=i.data("ui-controlgroup-data");n&&n[e]&&n[e]()})},_updateCornerClass:function(t,e){var i="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",n=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,i),this._addClass(t,null,n)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,n={classes:{}};return n.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],n},_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 n={};return t.each(e,function(s){var o=i.options.classes[s]||"";o=t.trim(o.replace(m,"")),n[s]=(o+" "+e[s]).replace(/\s+/g," ")}),n},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?void this._callChildMethod(e?"disable":"enable"):void this.refresh()},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,n){var s=e[n]().data("ui-controlgroup-data");if(s&&i["_"+s.widgetName+"Options"]){var o=i["_"+s.widgetName+"Options"](1===e.length?"only":n);o.classes=i._resolveClassesValues(o.classes,s),s.element[s.widgetName](o)}else i._updateCornerClass(e[n](),n)}),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,n=this,s=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(){n.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(s.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(s.disabled=e),s},_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,n="input[name='"+t.ui.escapeSelector(i)+"']";return i?(e=this.form.length?t(this.form[0].elements).filter(n):t(n).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),void(this.element[0].disabled=e)):void this.refresh()):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 n="iconPosition"!==e,s=n?this.options.iconPosition:i,o="top"===s||"bottom"===s;this.icon?n&&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")),n&&this._addClass(this.icon,null,i),this._attachIcon(s),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(s))},_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?void this._super("showLabel",e):("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"))),void this._superApply(arguments))}}),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 g;t.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return a(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var n,s,o;n=e.nodeName.toLowerCase(),s="div"===n||"span"===n,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),s),o.settings=t.extend({},i||{}),"input"===n?this._connectDatepicker(e,o):s&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(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 n=t(e);i.append=t([]),i.trigger=t([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.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 n,s,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(),n=this._get(i,"showOn"),"focus"!==n&&"both"!==n||e.on("focus",this._showDatepicker),"button"!==n&&"both"!==n||(s=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:s,title:s}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:s,title:s}):s)),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,n,s,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,n=0,s=0;s<t.length;s++)t[s].length>i&&(i=t[s].length,n=s);return n},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 n=t(e);n.hasClass(this.markerClassName)||(n.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,n,s,o){var r,l,h,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,s||{}),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||(l=document.documentElement.clientWidth,h=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+c,h/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=n,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,n=t(e),s=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(s.append.remove(),s.trigger.remove(),n.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==i&&"span"!==i||n.removeClass(this.markerClassName).empty(),g===s&&(g=null))},_enableDatepicker:function(e){var i,n,s=t(e),o=t.data(e,"datepicker");s.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||(n=s.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.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,n,s=t(e),o=t.data(e,"datepicker");s.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||(n=s.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.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;e<this._disabledInputs.length;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,n){var s,o,r,l,h=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):h?"all"===i?t.extend({},h.settings):this._get(h,i):null:(s=i||{},"string"==typeof i&&(s={},s[i]=n),void(h&&(this._curInst===h&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(h,"min"),l=this._getMinMaxDate(h,"max"),a(h.settings,s),null!==r&&void 0!==s.dateFormat&&void 0===s.minDate&&(h.settings.minDate=this._formatDate(h,r)),null!==l&&void 0!==s.dateFormat&&void 0===s.maxDate&&(h.settings.maxDate=this._formatDate(h,l)),"disabled"in s&&(s.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),h),this._autoSize(h),this._setDate(h,o),this._updateAlternate(h),this._updateDatepicker(h))))},_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,n,s,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 s=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),s[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,s[0]),i=t.datepicker._get(o,"onSelect"),i?(n=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[n,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,n,s=t.datepicker._getInst(e.target);return t.datepicker._get(s,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(s,"dateFormat")),n=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">n||!i||i.indexOf(n)>-1):void 0},_doKeyUp:function(e){var i,n=t.datepicker._getInst(e.target);if(n.input.val()!==n.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,t.datepicker._getFormatConfig(n)),i&&(t.datepicker._setDateFromField(n),t.datepicker._updateAlternate(n),t.datepicker._updateDatepicker(n))}catch(s){}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 n,s,o,r,l,h,c;n=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==n&&(t.datepicker._curInst.dpDiv.stop(!0,!0),n&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),s=t.datepicker._get(n,"beforeShow"),o=s?s.apply(e,[e,n]):{},o!==!1&&(a(n.settings,o),n.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(n),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}),l={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(n),l=t.datepicker._checkOffset(n,l,r),n.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),n.inline||(h=t.datepicker._get(n,"showAnim"),c=t.datepicker._get(n,"duration"),n.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?n.dpDiv.show(h,t.datepicker._get(n,"showOptions"),c):n.dpDiv[h||"show"](h?c:null),t.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),t.datepicker._curInst=n))}},_updateDatepicker:function(e){this.maxRows=4,g=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,n=this._getNumberOfMonths(e),s=n[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(""),s>1&&e.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",a*s+"em"),e.dpDiv[(1!==n[0]||1!==n[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,n){var s=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:t(document).scrollLeft()),h=document.documentElement.clientHeight+(n?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?s-a:0,i.left-=n&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=n&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>l&&l>s?Math.abs(i.left+s-l):0),i.top-=Math.min(i.top,i.top+o>h&&h>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,n=this._getInst(e),s=this._get(n,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[s?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,n,s,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),n=this._get(a,"duration"),s=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),n,s):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,s),i||s(),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),n=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===n)||t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,n){var s=t(e),o=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(o,i+("M"===n?this._get(o,"showCurrentAtPos"):0),n),this._updateDatepicker(o))},_gotoToday:function(e){var i,n=t(e),s=this._getInst(n[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(n)},_selectMonthYear:function(e,i,n){var s=t(e),o=this._getInst(s[0]);o["selected"+("M"===n?"Month":"Year")]=o["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(s)},_selectDay:function(e,i,n,s){var o,a=t(e);t(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",s).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=n,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 n,s=t(e),o=this._getInst(s[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),n=this._get(o,"onSelect"),n?n.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,n,s,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),n=this._getDate(e),s=this.formatDate(i,n,this._getFormatConfig(e)),t(o).val(s))},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,n){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?i.toString():i+"",""===i)return null;var s,o,a,r,l=0,h=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),u=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,d=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,_=-1,b=!1,y=function(t){var i=s+1<e.length&&e.charAt(s+1)===t;return i&&s++,i},w=function(t){var e=y(t),n="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,s="y"===t?n:1,o=new RegExp("^\\d{"+s+","+n+"}"),a=i.substring(l).match(o);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},x=function(e,n,s){var o=-1,a=t.map(y(e)?s:n,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 n=e[1];return i.substr(l,n.length).toLowerCase()===n.toLowerCase()?(o=e[0],l+=n.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},k=function(){if(i.charAt(l)!==e.charAt(s))throw"Unexpected literal at position "+l;l++};for(s=0;s<e.length;s++)if(b)"'"!==e.charAt(s)||y("'")?k():b=!1;else switch(e.charAt(s)){case"d":v=w("d");break;case"D":x("D",u,d);break;case"o":_=w("o");break;case"m":g=w("m");break;case"M":g=x("M",p,f);break;case"y":m=w("y");break;case"@":r=new Date(w("@")),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"'":y("'")?k():b=!0;break;default:k()}if(l<i.length&&(a=i.substr(l),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=m?0:-100)),_>-1)for(g=1,v=_;;){if(o=this._getDaysInMonth(m,g-1),o>=v)break;g++,v-=o}if(r=this._daylightSavingAdjust(new Date(m,g-1,v)),r.getFullYear()!==m||r.getMonth()+1!==g||r.getDate()!==v)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:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";var n,s=(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,l=function(e){var i=n+1<t.length&&t.charAt(n+1)===e;return i&&n++,i},h=function(t,e,i){var n=""+e;if(l(t))for(;n.length<i;)n="0"+n;return n},c=function(t,e,i,n){return l(t)?n[e]:i[e]},u="",d=!1;if(e)for(n=0;n<t.length;n++)if(d)"'"!==t.charAt(n)||l("'")?u+=t.charAt(n):d=!1;else switch(t.charAt(n)){case"d":u+=h("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),s,o);break;case"o":u+=h("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+=h("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=l("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":d=!0;break;default:u+=t.charAt(n)}return u},_possibleChars:function(t){var e,i="",n=!1,s=function(i){var n=e+1<t.length&&t.charAt(e+1)===i;return n&&e++,n};for(e=0;e<t.length;e++)if(n)"'"!==t.charAt(e)||s("'")?i+=t.charAt(e):n=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":n=!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"),n=t.lastVal=t.input?t.input.val():null,s=this._getDefaultDate(t),o=s,a=this._getFormatConfig(t);try{o=this.parseDate(i,n,a)||s}catch(r){n=e?"":n}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=n?o.getDate():0,t.currentMonth=n?o.getMonth():0,t.currentYear=n?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,n){var s=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(n){}for(var s=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=s.getFullYear(),a=s.getMonth(),r=s.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,h=l.exec(i);h;){switch(h[2]||"d"){case"d":case"D":r+=parseInt(h[1],10);break;case"w":case"W":r+=7*parseInt(h[1],10);break;case"m":case"M":a+=parseInt(h[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(h[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}h=l.exec(i)}return new Date(o,a,r)},a=null==i||""===i?n:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?n:s(i):new Date(i.getTime());return a=a&&"Invalid Date"===a.toString()?n: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 n=!e,s=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(),s===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(n?"":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"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(n,-i,"M")},next:function(){t.datepicker._adjustDate(n,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(n)},selectDay:function(){return t.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(n,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,n,s,o,a,r,l,h,c,u,d,p,f,m,g,v,_,b,y,w,x,k,C,D,S,T,M,P,I,O,F,A,z,H,N,E,j,R,W=new Date,L=this._daylightSavingAdjust(new Date(W.getFullYear(),W.getMonth(),W.getDate())),B=this._get(t,"isRTL"),Y=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),V=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),$=this._get(t,"showCurrentAtPos"),J=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],K=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),Q=this._getMinMaxDate(t,"max"),Z=t.drawMonth-$,tt=t.drawYear;if(0>Z&&(Z+=12,tt--),Q)for(e=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-U[0]*U[1]+1,Q.getDate())),e=G&&G>e?G:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)Z--,0>Z&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,i=this._get(t,"prevText"),i=V?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,Z-J,1)),this._getFormatConfig(t)):i,n=this._canAdjustMonth(t,-1,tt,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-"+(B?"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-"+(B?"e":"w")+"'>"+i+"</span></a>",s=this._get(t,"nextText"),s=V?this.formatDate(s,this._daylightSavingAdjust(new Date(tt,Z+J,1)),this._getFormatConfig(t)):s,o=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+s+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+s+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?K:L,a=V?this.formatDate(a,r,this._getFormatConfig(t)):a,l=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>",h=Y?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(B?l:"")+(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>":"")+(B?"":l)+"</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"),m=this._get(t,"monthNamesShort"),g=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",x=0;x<U[0];x++){for(k="",this.maxRows=4,C=0;C<U[1];C++){if(D=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),S=" ui-corner-all",T="",X){if(T+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:T+=" ui-datepicker-group-first",S=" ui-corner-"+(B?"right":"left");break;case U[1]-1:T+=" ui-datepicker-group-last",S=" ui-corner-"+(B?"left":"right");break;default:T+=" ui-datepicker-group-middle",S=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+S+"'>"+(/all|left/.test(S)&&0===x?B?o:n:"")+(/all|right/.test(S)&&0===x?B?n:o:"")+this._generateMonthYearHeader(t,Z,tt,G,Q,x>0||C>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",M=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)P=(w+c)%7,M+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[P]+"'>"+p[P]+"</span></th>";for(T+=M+"</tr></thead><tbody>",I=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,I)),O=(this._getFirstDayOfMonth(tt,Z)-c+7)%7,F=Math.ceil((O+I)/7),A=X&&this.maxRows>F?this.maxRows:F,this.maxRows=A,z=this._daylightSavingAdjust(new Date(tt,Z,1-O)),H=0;A>H;H++){for(T+="<tr>",N=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(z)+"</td>":"",w=0;7>w;w++)E=g?g.apply(t.input?t.input[0]:null,[z]):[!0,""],j=z.getMonth()!==Z,R=j&&!_||!E[0]||G&&G>z||Q&&z>Q,N+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(j?" ui-datepicker-other-month":"")+(z.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===z.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(j&&!v?"":" "+E[1]+(z.getTime()===K.getTime()?" "+this._currentClass:"")+(z.getTime()===L.getTime()?" ui-datepicker-today":""))+"'"+(j&&!v||!E[2]?"":" title='"+E[2].replace(/'/g,"'")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+z.getMonth()+"' data-year='"+z.getFullYear()+"'")+">"+(j&&!v?" ":R?"<span class='ui-state-default'>"+z.getDate()+"</span>":"<a class='ui-state-default"+(z.getTime()===L.getTime()?" ui-state-highlight":"")+(z.getTime()===K.getTime()?" ui-state-active":"")+(j?" ui-priority-secondary":"")+"' href='#'>"+z.getDate()+"</a>")+"</td>",z.setDate(z.getDate()+1),z=this._daylightSavingAdjust(z);T+=N+"</tr>"}Z++,Z>11&&(Z=0,tt++),T+="</tbody></table>"+(X?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),k+=T}y+=k}return y+=h,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,n,s,o,a,r){var l,h,c,u,d,p,f,m,g=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!g)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=n&&n.getFullYear()===i,h=s&&s.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!l||c>=n.getMonth())&&(!h||c<=s.getMonth())&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(_||(b+=y+(!o&&g&&v?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!v)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]),m=Math.max(f,p(u[1]||"")),f=n?Math.max(f,n.getFullYear()):f,m=s?Math.min(m,s.getFullYear()):m,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=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"),_&&(b+=(!o&&g&&v?"":" ")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var n=t.selectedYear+("Y"===i?e:0),s=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(n,s))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(n,s,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"),n=this._getMinMaxDate(t,"max"),s=i&&i>e?i:e;return n&&s>n?n:s},_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,n){var s=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,n+(0>e?e:s[0]*s[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,n,s=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=n),i[1].match(/[+\-].*/)&&(r+=n)),(!s||e.getTime()>=s.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||e.getFullYear()<=r)},_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,n){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var s=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(n,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),s,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 n,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1";var v=(t.datepicker,t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),!1);t(document).on("mouseup",function(){v=!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(!v){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,n=1===e.which,s="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return n&&!s&&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(),v=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!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,v=!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,n){var s,o=t.ui[e].prototype;for(s in n)o.plugins[s]=o.plugins[s]||[],o.plugins[s].push([i,n[s]])},call:function(t,e,i,n){var s,o=t.plugins[e];if(o&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(s=0;s<o.length;s++)t.options[o[s][0]]&&o[s][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")?void(this.destroyOnClear=!0):(this._removeHandleClassName(),void this._mouseDestroy())},_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]),n=t(e.target);n.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 n=this._uiHash();if(this._trigger("drag",e,n)===!1)return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=n.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,n=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(n=t.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?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,n=t.isFunction(i.helper),s=n?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n&&s[0]===this.element[0]&&this._setPositionRelative(),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_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,n,s=this.options,o=this.document[0];return this.relativeContainer=null,s.containment?"window"===s.containment?void(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]):"document"===s.containment?void(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]):s.containment.constructor===Array?void(this.containment=s.containment):("parent"===s.containment&&(s.containment=this.helper[0].parentNode),i=t(s.containment),n=i[0],void(n&&(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(n.scrollWidth,n.offsetWidth):n.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(n.scrollHeight,n.offsetHeight):n.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(this.containment=null)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,n=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:n?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:n?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,n,s,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),l=t.pageX,h=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(n=this.relativeContainer.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(h=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),a.grid&&(s=a.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,h=i?s-this.offset.click.top>=i[1]||s-this.offset.click.top>i[3]?s:s-this.offset.click.top>=i[1]?s-a.grid[1]:s+a.grid[1]:s,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=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&&(l=this.originalPageX),"x"===a.axis&&(h=this.originalPageY)),{top:h-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:l-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,n){return n=n||this._uiHash(),t.ui.plugin.call(this,e,[i,n,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,n)},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,n){var s=t.extend({},i,{item:n.element});n.sortables=[],t(n.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(n.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,s))})},stop:function(e,i,n){var s=t.extend({},i,{item:n.element});n.cancelHelperRemoval=!1,t.each(n.sortables,function(){var t=this;t.isOver?(t.isOver=0,n.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,s))})},drag:function(e,i,n){t.each(n.sortables,function(){var s=!1,o=this;o.positionAbs=n.positionAbs,o.helperProportions=n.helperProportions,o.offset.click=n.offset.click,o._intersectsWith(o.containerCache)&&(s=!0,t.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(s=!1),s})),s?(o.isOver||(o.isOver=1,n._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=n.offset.click.top,o.offset.click.left=n.offset.click.left,o.offset.parent.left-=n.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=n.offset.parent.top-o.offset.parent.top,n._trigger("toSortable",e),n.dropped=o.element,t.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,o.fromOutside=n),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(n._parent),n._refreshOffsets(e),i.position=n._generatePosition(e,!0),n._trigger("fromSortable",e),n.dropped=!1,t.each(n.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,n){var s=t("body"),o=n.options;s.css("cursor")&&(o._cursor=s.css("cursor")),s.css("cursor",o.cursor)},stop:function(e,i,n){var s=n.options;s._cursor&&t("body").css("cursor",s._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,n){var s=t(i.helper),o=n.options;s.css("opacity")&&(o._opacity=s.css("opacity")),s.css("opacity",o.opacity)},stop:function(e,i,n){var s=n.options;s._opacity&&t(i.helper).css("opacity",s._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,n){var s=n.options,o=!1,a=n.scrollParentNotHidden[0],r=n.document[0];a!==r&&"HTML"!==a.tagName?(s.axis&&"x"===s.axis||(n.overflowOffset.top+a.offsetHeight-e.pageY<s.scrollSensitivity?a.scrollTop=o=a.scrollTop+s.scrollSpeed:e.pageY-n.overflowOffset.top<s.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(n.overflowOffset.left+a.offsetWidth-e.pageX<s.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+s.scrollSpeed:e.pageX-n.overflowOffset.left<s.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(r).scrollTop()<s.scrollSensitivity?o=t(r).scrollTop(t(r).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<s.scrollSensitivity&&(o=t(r).scrollTop(t(r).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(r).scrollLeft()<s.scrollSensitivity?o=t(r).scrollLeft(t(r).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<s.scrollSensitivity&&(o=t(r).scrollLeft(t(r).scrollLeft()+s.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(n,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,n){var s=n.options;n.snapElements=[],t(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var e=t(this),i=e.offset();this!==n.element[0]&&n.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,n){var s,o,a,r,l,h,c,u,d,p,f=n.options,m=f.snapTolerance,g=i.offset.left,v=g+n.helperProportions.width,_=i.offset.top,b=_+n.helperProportions.height;for(d=n.snapElements.length-1;d>=0;d--)l=n.snapElements[d].left-n.margins.left,h=l+n.snapElements[d].width,c=n.snapElements[d].top-n.margins.top,u=c+n.snapElements[d].height,l-m>v||g>h+m||c-m>b||_>u+m||!t.contains(n.snapElements[d].item.ownerDocument,n.snapElements[d].item)?(n.snapElements[d].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(s=Math.abs(c-b)<=m,o=Math.abs(u-_)<=m,a=Math.abs(l-v)<=m,r=Math.abs(h-g)<=m,s&&(i.position.top=n._convertPositionTo("relative",{top:c-n.helperProportions.height,left:0}).top),o&&(i.position.top=n._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left),r&&(i.position.left=n._convertPositionTo("relative",{top:0,left:h}).left)),p=s||o||a||r,"outer"!==f.snapMode&&(s=Math.abs(c-_)<=m,o=Math.abs(u-b)<=m,a=Math.abs(l-g)<=m,r=Math.abs(h-v)<=m,s&&(i.position.top=n._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=n._convertPositionTo("relative",{top:u-n.helperProportions.height,left:0}).top),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l}).left),r&&(i.position.left=n._convertPositionTo("relative",{top:0,left:h-n.helperProportions.width}).left)),!n.snapElements[d].snapping&&(s||o||a||r||p)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=s||o||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,n){var s,o=n.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&&(s=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",s+e)}),this.css("zIndex",s+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,n){var s=t(i.helper),o=n.options;s.css("zIndex")&&(o._zIndex=s.css("zIndex")),s.css("zIndex",o.zIndex)},stop:function(e,i,n){var s=n.options;s._zIndex&&t(i.helper).css("zIndex",s._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 n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return e[n]>0?!0:(e[n]=1,s=e[n]>0,e[n]=0,s)},_create:function(){var e,i=this.options,n=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||(n._removeClass("ui-resizable-autohide"),n._handles.show())}).on("mouseleave",function(){i.disabled||n.resizing||(n._addClass("ui-resizable-autohide"),n._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()}},_setupHandles:function(){var e,i,n,s,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"),n=this.handles.split(","),this.handles={},i=0;i<n.length;i++)e=t.trim(n[i]),s="ui-resizable-"+e,o=t("<div>"),this._addClass(o,"ui-resizable-handle "+s),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,n,s,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)&&(n=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),s=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(s,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,n,s=!1;for(i in this.handles)n=t(this.handles[i])[0],(n===e.target||t.contains(n,e.target))&&(s=!0);return!this.options.disabled&&s},_mouseStart:function(e){var i,n,s,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),n=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,n+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:n},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:n},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,n,s=this.originalMousePosition,o=this.axis,a=e.pageX-s.left||0,r=e.pageY-s.top||0,l=this._change[o];return this._updatePrevProperties(),l?(i=l.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),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,n,s,o,a,r,l,h=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,n=i.length&&/textarea/i.test(i[0].nodeName),s=n&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=n?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-s},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,l=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,h.animate||this.element.css(t.extend(a,{top:l,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!h.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,n,s,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,n=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,s=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),n>o.minHeight&&(o.minHeight=n),i<o.maxWidth&&(o.maxWidth=i),s<o.maxHeight&&(o.maxHeight=s)),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,n=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===n&&(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,n=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,s=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,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),s&&(t.height=e.maxHeight),o&&h&&(t.left=r-e.minWidth),n&&h&&(t.left=r-e.maxWidth),a&&c&&(t.top=l-e.minHeight),s&&c&&(t.top=l-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=[],n=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],s=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(n[e])||0,i[e]+=parseFloat(s[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;e<this._proportionallyResizeElements.length;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,n=this.originalPosition;return{left:n.left+e,width:i.width-e}},n:function(t,e,i){var n=this.originalSize,s=this.originalPosition;return{top:s.top+i,height:n.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},sw:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,n]))},ne:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},nw:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,n]))}},_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"),n=i.options,s=i._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),a=o&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,l={width:i.size.width-r,height:i.size.height-a},h=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(l,c&&h?{top:c,left:h}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&t(s[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,n,s,o,a,r,l=t(this).resizable("instance"),h=l.options,c=l.element,u=h.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(l.containerElement=t(d),/document/.test(u)||u===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.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,n){i[t]=l._num(e.css("padding"+n))}),l.containerOffset=e.offset(),l.containerPosition=e.position(),l.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},n=l.containerOffset,s=l.containerSize.height,o=l.containerSize.width,a=l._hasScroll(d,"left")?d.scrollWidth:o,r=l._hasScroll(d)?d.scrollHeight:s,l.parentData={element:d,left:n.left,top:n.top,width:a,height:r}))},resize:function(e){var i,n,s,o,a=t(this).resizable("instance"),r=a.options,l=a.containerOffset,h=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=l),h.left<(a._helper?l.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-l.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?l.left:0),h.top<(a._helper?l.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-l.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?l.top:0),s=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),s&&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-l.left)),n=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-l.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)),n+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-n,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,n=e.containerOffset,s=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),l=a.outerWidth()-e.sizeDiff.width,h=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-s.left-n.left,width:l,height:h}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-s.left-n.left,width:l,height:h})}}),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 n=t(this).resizable("instance"),s=n.options,o=n.originalSize,a=n.originalPosition,r={height:n.size.height-o.height||0,width:n.size.width-o.width||0,top:n.position.top-a.top||0,left:n.position.left-a.left||0};t(s.alsoResize).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),s={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(s[e]=i||null)}),e.css(s)})},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"),n=i.options,s=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,l="number"==typeof n.grid?[n.grid,n.grid]:n.grid,h=l[0]||1,c=l[1]||1,u=Math.round((s.width-o.width)/h)*h,d=Math.round((s.height-o.height)/c)*c,p=o.width+u,f=o.height+d,m=n.maxWidth&&n.maxWidth<p,g=n.maxHeight&&n.maxHeight<f,v=n.minWidth&&n.minWidth>p,_=n.minHeight&&n.minHeight>f;n.grid=l,v&&(p+=h),_&&(f+=c),m&&(p-=h),g&&(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-h)&&(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-h>0?(i.size.width=p,i.position.left=a.left-u):(p=h-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 n=!1,s=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,s);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),n=!0),n&&!i&&this._trigger("focus",e),n},open:function(){var e=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(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(),void this._trigger("open"))},_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(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),n=i.filter(":first"),s=i.filter(":last");e.target!==s[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==n[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){s.trigger("focus")}),e.preventDefault()):(this._delay(function(){n.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(" ")},_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?void this._removeClass(this.uiDialog,"ui-dialog-buttons"):(t.each(i,function(i,n){var s,o;n=t.isFunction(n)?{click:n,text:i}:n,n=t.extend({type:"button"},n),s=n.click,o={icon:n.icon,iconPosition:n.iconPosition,showLabel:n.showLabel,icons:n.icons,text:n.text},delete n.click,delete n.icon,delete n.iconPosition,delete n.showLabel,delete n.icons,"boolean"==typeof n.text&&delete n.text,t("<button></button>",n).button(o).appendTo(e.uiButtonSet).on("click",function(){
s.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,s){i._addClass(t(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",n,e(s))},drag:function(t,n){i._trigger("drag",t,e(n))},stop:function(s,o){var a=o.offset.left-i.document.scrollLeft(),r=o.offset.top-i.document.scrollTop();n.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",s,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,n=this.options,s=n.resizable,o=this.uiDialog.css("position"),a="string"==typeof s?s:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:a,start:function(n,s){i._addClass(t(this),"ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",n,e(s))},resize:function(t,n){i._trigger("resize",t,e(n))},stop:function(s,o){var a=i.uiDialog.offset(),r=a.left-i.document.scrollLeft(),l=a.top-i.document.scrollTop();n.height=i.uiDialog.height(),n.width=i.uiDialog.width(),n.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" top"+(l>=0?"+":"")+l,of:i.window},i._removeClass(t(this),"ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",s,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,n=!1,s={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(n=!0),t in i.resizableRelatedOptions&&(s[t]=e)}),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(e,i){var n,s,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&&(n=o.is(":data(ui-draggable)"),n&&!i&&o.draggable("destroy"),!n&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(s=o.is(":data(ui-resizable)"),s&&!i&&o.resizable("destroy"),s&&"string"==typeof i&&o.resizable("option","handles",i),s||i===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),e=Math.max(0,n.minHeight-t),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-t):"none","auto"===n.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.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,n=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(n)?n:function(t){return t.is(n)},this.proportions=function(){return arguments.length?void(e=arguments[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;e<t.length;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 n=t.ui.ddmanager.droppables[this.options.scope];this._splice(n),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 n=i||t.ui.ddmanager.current,s=!1;return n&&(n.currentItem||n.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===n.options.scope&&i.accept.call(i.element[0],n.currentItem||n.element)&&_(n,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(s=!0,!1):void 0}),s?!1:this.accept.call(this.element[0],n.currentItem||n.element)?(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(n)),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 _=t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,n,s){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,l=a+e.helperProportions.height,h=i.offset.left,c=i.offset.top,u=h+i.proportions().width,d=c+i.proportions().height;switch(n){case"fit":return o>=h&&u>=r&&a>=c&&d>=l;case"intersect":return h<o+e.helperProportions.width/2&&r-e.helperProportions.width/2<u&&c<a+e.helperProportions.height/2&&l-e.helperProportions.height/2<d;case"pointer":return t(s.pageY,c,i.proportions().height)&&t(s.pageX,h,i.proportions().width);case"touch":return(a>=c&&d>=a||l>=c&&d>=l||c>a&&l>d)&&(o>=h&&u>=o||r>=h&&u>=r||h>o&&r>u);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var n,s,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(n=0;n<o.length;n++)if(!(o[n].options.disabled||e&&!o[n].accept.call(o[n].element[0],e.currentItem||e.element))){for(s=0;s<r.length;s++)if(r[s]===o[n].element[0]){o[n].proportions().height=0;continue t}o[n].visible="none"!==o[n].element.css("display"),o[n].visible&&("mousedown"===a&&o[n]._activate.call(o[n],i),o[n].offset=o[n].element.offset(),o[n].proportions({width:o[n].element[0].offsetWidth,height:o[n].element[0].offsetHeight}))}},drop:function(e,i){var n=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&_(e,this,this.options.tolerance,i)&&(n=this._drop.call(this,i)||n),!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)))}),n},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 n,s,o,a=_(e,this,this.options.tolerance,i),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(s=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===s}),o.length&&(n=t(o[0]).droppable("instance"),n.greedyChild="isover"===r)),n&&"isover"===r&&(n.isover=!1,n.isout=!0,n._out.call(n,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),n&&"isout"===r&&(n.isout=!1,n.isover=!0,n._over.call(n,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),void this._refreshValue())},_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),n=i.offset(),s={left:n.left-e.elementPos.left,top:n.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:s.left,top:s.top,right:s.left+i.outerWidth(),bottom:s.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,n=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(n.filter,this.element[0]),this._trigger("start",e),t(n.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),n.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var n=t.data(this,"selectable-item");n.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(n.$element,"ui-selected"),n.selected=!1,i._addClass(n.$element,"ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",e,{unselecting:n.element}))}),t(e.target).parents().addBack().each(function(){var n,s=t.data(this,"selectable-item");return s?(n=!e.metaKey&&!e.ctrlKey||!s.$element.hasClass("ui-selected"),i._removeClass(s.$element,n?"ui-unselecting":"ui-selected")._addClass(s.$element,n?"ui-selecting":"ui-unselecting"),s.unselecting=!n,s.selecting=n,s.selected=n,n?i._trigger("selecting",e,{selecting:s.element}):i._trigger("unselecting",e,{unselecting:s.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,n=this,s=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,l=e.pageY;return o>r&&(i=r,r=o,o=i),a>l&&(i=l,l=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:l-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),h=!1,c={};i&&i.element!==n.element[0]&&(c.left=i.left+n.elementPos.left,c.right=i.right+n.elementPos.left,c.top=i.top+n.elementPos.top,c.bottom=i.bottom+n.elementPos.top,"touch"===s.tolerance?h=!(c.left>r||c.right<o||c.top>l||c.bottom<a):"fit"===s.tolerance&&(h=c.left>o&&c.right<r&&c.top>a&&c.bottom<l),h?(i.selected&&(n._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(n._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(n._addClass(i.$element,"ui-selecting"),i.selecting=!0,n._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(n._removeClass(i.$element,"ui-selecting"),i.selecting=!1,n._addClass(i.$element,"ui-selected"),i.selected=!0):(n._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),n._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(n._removeClass(i.$element,"ui-selected"),i.selected=!1,n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,n._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 n=t.data(this,"selectable-item");i._removeClass(n.$element,"ui-unselecting"),n.unselecting=!1,n.startselected=!1,i._trigger("unselected",e,{unselected:n.element})}),t(".ui-selecting",this.element[0]).each(function(){var n=t.data(this,"selectable-item");i._removeClass(n.$element,"ui-selecting")._addClass(n.$element,"ui-selected"),n.selecting=!1,n.selected=!0,n.startselected=!0,i._trigger("selected",e,{selected:n.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,n=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(n).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 n=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&n.index!==e.focusIndex&&(e._trigger("focus",t,{item:n}),e.isOpen||e._select(n,t)),e.focusIndex=n.index,e.button.attr("aria-activedescendant",e.menuItems.eq(n.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 n=this,s="";t.each(i,function(i,o){var a;o.optgroup!==s&&(a=t("<li>",{text:o.optgroup}),n._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),s=o.optgroup),n._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var n=t("<li>"),s=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(n,null,"ui-state-disabled"),this._setText(s,i.label),n.append(s).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html(" ")},_move:function(t,e){var i,n,s=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),s+=":not(.ui-state-disabled)"),n="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](s).eq(-1):i[t+"All"](s).eq(0),n.length&&this.menuInstance.focus(e,n)},_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?void this.button.css("width",""):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),void this.button.outerWidth(t))},_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,n=[];e.each(function(e,s){n.push(i._parseOption(t(s),e))}),this.items=n},_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,n=this.options,s=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(i=n.values&&n.values.length||1,s.length>i&&(s.slice(i).remove(),s=s.slice(0,i)),e=s.length;i>e;e++)a.push(o);this.handles=s.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,n,s,o,a,r,l,h,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},n=this._normValueFromMouse(i),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(n-c.values(e));(s>i||s===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(s=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"),l=o.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.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,n),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,n,s,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)),n=i/e,n>1&&(n=1),0>n&&(n=0),"vertical"===this.orientation&&(n=1-n),s=this._valueMax()-this._valueMin(),o=this._valueMin()+n*s,this._trimAlignValue(o)},_uiHash:function(t,e,i){var n={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(n.value=void 0!==e?e:this.values(t),n.values=i||this.values()),n},_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 n,s,o=this.value(),a=this.values();this._hasMultipleValues()&&(s=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(s,i):Math.max(s,i)),a[e]=i),i!==o&&(n=this._trigger("slide",t,this._uiHash(e,i,a)),
n!==!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(),void this._change(null,0)):this._value()},values:function(e,i){var n,s,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(n=this.options.values,s=arguments[0],o=0;o<n.length;o+=1)n[o]=this._trimAlignValue(s[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var n,s=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)&&(s=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(),n=s-1;n>=0;n--)this._change(null,n);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,n;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())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,n=t-i;return 2*Math.abs(i)>=e&&(n+=i>0?e:-e),parseFloat(n.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,n=Math.round((t-e)/i)*i;t=n+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.toString(),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,n,s,o,a=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,c={};this._hasMultipleValues()?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](c,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===n&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===n&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===n&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(n=this.value(),s=this._valueMin(),o=this._valueMax(),i=o!==s?(n-s)/(o-s)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,n,s,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,n=s=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:s=this._valueMin();break;case t.ui.keyCode.END:s=this._valueMax();break;case t.ui.keyCode.PAGE_UP:s=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;s=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;s=this._trimAlignValue(n-o)}this._slide(e,a,s)},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 n=null,s=!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?(n=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(n=t(e.target)),n&&(!this.options.handle||i||(t(this.options.handle,n).find("*").addBack().each(function(){this===e.target&&(s=!0)}),s))?(this.currentItem=n,this._removeCurrentsFromItems(),!0):!1)},_mouseStart:function(e,i,n){var s,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(),!n)for(s=this.containers.length-1;s>=0;s--)this.containers[s]._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,n,s,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(n=this.items[i],s=n.item[0],o=this._intersectsWithPointer(n),o&&n.instance===this.currentContainer&&s!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==s&&!t.contains(this.placeholder[0],s)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],s):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),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 n=this,s=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=s.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=s.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(){n._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),n=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&n.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!n.length&&e.key&&n.push(e.key+"="),n.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},i.each(function(){n.push(t(e.item||this).attr(e.attribute||"id")||"")}),n},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,n=this.positionAbs.top,s=n+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,l=r+t.height,h=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||n+h>r&&l>n+h,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:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<a&&r<n+this.helperProportions.height/2&&s-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e,i,n="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),o=n&&s;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),n=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return this.floating&&s?"right"===s&&i||"left"===s&&!i:n&&("down"===n&&e||"up"===n&&!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 n,s,o,a,r=[],l=[],h=this._connectWith();if(h&&e)for(n=h.length-1;n>=0;n--)for(o=t(h[n],this.document[0]),s=o.length-1;s>=0;s--)a=t.data(o[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&l.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(l.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]),n=l.length-1;n>=0;n--)l[n][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;i<e.length;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,n,s,o,a,r,l,h,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(s=t(d[i],this.document[0]),n=s.length-1;n>=0;n--)o=t.data(s[n],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],n=0,h=r.length;h>n;n++)l=t(r[n]),l.data(this.widgetName+"-item",a),c.push({item:l,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,n,s,o;for(i=this.items.length-1;i>=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(s=this.options.toleranceElement?t(this.options.toleranceElement,n.item):n.item,e||(n.width=s.outerWidth(),n.height=s.outerHeight()),o=s.offset(),n.left=o.left,n.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,n=e.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=e.currentItem[0].nodeName.toLowerCase(),s=t("<"+n+">",e.document[0]);return e._addClass(s,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(s,"ui-sortable-helper"),"tbody"===n?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(s)):"tr"===n?e._createTrPlaceholder(e.currentItem,s):"img"===n&&s.attr("src",e.currentItem.attr("src")),i||s.css("visibility","hidden"),s},update:function(t,s){i&&!n.forcePlaceholderSize||(s.height()||s.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),s.width()||s.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(n.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),n.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var n=this;e.children().each(function(){t("<td> </td>",n.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,n,s,o,a,r,l,h,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(s=1e4,o=null,c=d.floating||this._isFloating(this.currentItem),a=c?"left":"top",r=c?"width":"height",u=c?"pageX":"pageY",n=this.items.length-1;n>=0;n--)t.contains(this.containers[p].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(l=this.items[n].item.offset()[a],h=!1,e[u]-l>this.items[n][r]/2&&(h=!0),Math.abs(e[u]-l)<s&&(s=Math.abs(e[u]-l),o=this.items[n],this.direction=h?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));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,n=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[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")}),n[0].style.width&&!i.forceHelperSize||n.width(this.currentItem.width()),n[0].style.height&&!i.forceHelperSize||n.height(this.currentItem.height()),n},_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,n,s=this.options;"parent"===s.containment&&(s.containment=this.helper[0].parentNode),"document"!==s.containment&&"window"!==s.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===s.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===s.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(s.containment)||(e=t(s.containment)[0],i=t(s.containment).offset(),n="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+(n?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+(n?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 n="absolute"===e?1:-1,s="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(s[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:s.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*n}},_generatePosition:function(e){var i,n,s=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,l=/(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)),s.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/s.grid[1])*s.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-s.grid[1]:i+s.grid[1]:i,n=this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0],o=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-s.grid[0]:n+s.grid[0]:n)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:r.scrollLeft())}},_rearrange:function(t,e,i,n){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 s=this.counter;this._delay(function(){s===this.counter&&this.refreshPositions(!n)})},_clear:function(t,e){function i(t,e,i){return function(n){i._trigger(t,n,e._uiHash(e))}}this.reverting=!1;var n,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&s.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||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)e||s.push(i("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(s.push(i("out",this,this.containers[n])),this.containers[n].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(n=0;n<s.length;n++)s[n].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,n){var s=i.attr(n);null!=s&&s.length&&(e[n]=s)}),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?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",t)))},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=n,
this._delay(function(){this.previous=n}))}var n;n=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:void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e):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,n=t.ui.keyCode;switch(e.keyCode){case n.UP:return this._repeat(null,1,e),!0;case n.DOWN:return this._repeat(null,-1,e),!0;case n.PAGE_UP:return this._repeat(null,i.page,e),!0;case n.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.toString(),i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,n=this.options;return e=null!==n.min?n.min:0,i=t-e,i=Math.round(i/n.step)*n.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==n.max&&t>n.max?n.max:null!==n.min&&t<n.min?n.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,n,s;return"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,void this.element.val(this._format(i))):("max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(n=this.buttons.first().find(".ui-icon"),this._removeClass(n,null,this.options.icons.up),this._addClass(n,null,e.up),s=this.buttons.last().find(".ui-icon"),this._removeClass(s,null,this.options.icons.down),this._addClass(s,null,e.down)),void this._super(t,e))},_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?void r(this._value).call(this,t):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,n;i=e.href.replace(t,""),n=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(s){}try{n=decodeURIComponent(n)}catch(s){}return e.hash.length>1&&i===n}}(),_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.options.active!==!1&&this.anchors.length?this.active=this._findActive(i.active):this.active=t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,n=location.hash.substring(1);return null===e&&(n&&this.tabs.each(function(i,s){return t(s).attr("aria-controls")===n?(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"),n=this.tabs.index(i),s=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:s=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n);case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n===this.options.active?!1:n);default:return}e.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,s),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},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 n(){return e>s&&(e=0),0>e&&(e=s),e}for(var s=this.tabs.length-1;-1!==t.inArray(n(),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?void this._activate(e):(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),void("heightStyle"===t&&this._setupHeightStyle(e)))},_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,n=this.anchors,s=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,n){var s,o,a,r=t(n).uniqueId().attr("id"),l=t(n).closest("li"),h=l.attr("aria-controls");e._isLocal(n)?(s=n.hash,a=s.substring(1),o=e.element.find(e._sanitizeSelector(s))):(a=l.attr("aria-controls")||t({}).uniqueId()[0].id,s="#"+a,o=e.element.find(s),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)),h&&l.data("ui-tabs-aria-controls",h),l.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(n.not(this.anchors)),this._off(s.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,n,s;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),s=0;n=this.tabs[s];s++)i=t(n),e===!0||-1!==t.inArray(s,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,n=this.element.parent();"fill"===e?(i=n.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),n=e.css("position");"absolute"!==n&&"fixed"!==n&&(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,n=this.active,s=t(e.currentTarget),o=s.closest("li"),a=o[0]===n[0],r=a&&i.collapsible,l=r?t():this._getPanelForTab(o),h=n.length?this._getPanelForTab(n):t(),c={oldTab:n,oldPanel:h,newTab:r?t():o,newPanel:l};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(),h.length||l.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function n(){o.running=!1,o._trigger("activate",e,i)}function s(){o._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,n):(a.show(),n())}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"),s()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),s()),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,n=this._findActive(e);n[0]!==this.active[0]&&(n.length||(n=this.active),i=n.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 n=this,s=this.tabs.eq(e),o=s.find(".ui-tabs-anchor"),a=this._getPanelForTab(s),r={tab:s,panel:a},l=function(t,e){"abort"===e&&n.panels.stop(!1,!0),n._removeClass(s,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(s,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,s){setTimeout(function(){a.html(t),n._trigger("load",i,r),l(s,e)},1)}).fail(function(t,e){setTimeout(function(){l(t,e)},1)})))},_ajaxSettings:function(e,i,n){var s=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return s._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},n))}}},_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 n=(e.attr("aria-describedby")||"").split(/\s+/);n.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(n.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),n=(e.attr("aria-describedby")||"").split(/\s+/),s=t.inArray(i,n);-1!==s&&n.splice(s,1),e.removeData("ui-tooltip-id"),n=t.trim(n.join(" ")),n?e.attr("aria-describedby",n):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 n=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){n._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,n){var s=t.Event("blur");s.target=s.currentTarget=n.element[0],e.close(s,!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,n=t(e?e.target:this.element).closest(this.options.items);n.length&&!n.data("ui-tooltip-id")&&(n.attr("title")&&n.data("ui-tooltip-title",n.attr("title")),n.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&n.parents().each(function(){var e,n=t(this);n.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),n.attr("title")&&(n.uniqueId(),i.parents[this.id]={element:this,title:n.attr("title")},n.attr("title",""))}),this._registerCloseHandlers(e,n),this._updateContent(n,e))},_updateContent:function(t,e){var i,n=this.options.content,s=this,o=e?e.type:null;return"string"==typeof n||n.nodeType||n.jquery?this._open(e,t,n):(i=n.call(t[0],function(i){s._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),void(i&&this._open(e,t,i)))},_open:function(e,i,n){function s(t){h.of=t,a.is(":hidden")||a.position(h)}var o,a,r,l,h=t.extend({},this.options.position);if(n){if(o=this._find(i))return void o.tooltip.find(".ui-tooltip-content").html(n);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(n),this.liveRegion.children().hide(),l=t("<div>").html(a.find(".ui-tooltip-content").html()),l.removeAttr("name").find("[name]").removeAttr("name"),l.removeAttr("id").find("[id]").removeAttr("id"),l.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:s}),s(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")&&(s(h.of),clearInterval(r))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,i){var n={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var n=t.Event(e);n.currentTarget=i[0],this.close(n,!0)}}};i[0]!==this.element[0]&&(n.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(n.mouseleave="close"),e&&"focusin"!==e.type||(n.focusout="close"),this._on(!0,i,n)},close:function(e){var i,n=this,s=t(e?e.currentTarget:this.element),o=this._find(s);return o?(i=o.tooltip,void(o.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&!s.attr("title")&&s.attr("title",s.data("ui-tooltip-title")),this._removeDescribedBy(s),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){n._removeTooltip(t(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"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 n.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)))):void s.removeData("ui-tooltip-open")},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),n=t("<div>").appendTo(i),s=i.uniqueId().attr("id");return this._addClass(n,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[s]={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,n){var s=t.Event("blur"),o=n.element;s.target=s.currentTarget=o[0],e.close(s,!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})}(n2,n2),function(t){t.widget("ui.nextendAutocomplete",t.ui.autocomplete,{_renderMenu:function(e,i){e.removeAttr("tabindex").addClass("n2 n2-ui-autocomplete"),e.on("mousedown",t.proxy(nextend.context.setMouseDownArea,nextend.context,"nextendAutocomplete")).on("DOMMouseScroll mousewheel",function(t){t.stopPropagation()}),t(window).add(".n2-scrollable").on("scroll.n2-autocomplete",t.proxy(function(){e.position(t.extend({of:this.element},this.options.position))},this));var n=this;t.each(i,function(t,i){n._renderItemData(e,i)})},_resizeMenu:function(){this.menu.element.outerWidth(this.element.outerWidth(!0))},close:function(){t(window).add(".n2-scrollable").off(".n2-autocomplete"),this._superApply(arguments)}})}(n2),function(t){"use strict";t(window.n2)}(function(t){"use strict";var e=0;t.ajaxTransport("iframe",function(i){if(i.async){var n,s,o,a=i.initialIframeSrc||"javascript:false;";return{send:function(r,l){n=t('<form style="display:none;"></form>'),n.attr("accept-charset",i.formAcceptCharset),o=/\?/.test(i.url)?"&":"?","DELETE"===i.type?(i.url=i.url+o+"_method=DELETE",i.type="POST"):"PUT"===i.type?(i.url=i.url+o+"_method=PUT",i.type="POST"):"PATCH"===i.type&&(i.url=i.url+o+"_method=PATCH",i.type="POST"),e+=1,s=t('<iframe src="'+a+'" name="iframe-transport-'+e+'"></iframe>').bind("load",function(){var e,o=t.isArray(i.paramName)?i.paramName:[i.paramName];s.unbind("load").bind("load",function(){var e;try{if(e=s.contents(),!e.length||!e[0].firstChild)throw new Error}catch(i){e=void 0}l(200,"success",{iframe:e}),t('<iframe src="'+a+'"></iframe>').appendTo(n),window.setTimeout(function(){n.remove()},0)}),n.prop("target",s.prop("name")).prop("action",i.url).prop("method",i.type),i.formData&&t.each(i.formData,function(e,i){t('<input type="hidden"/>').prop("name",i.name).val(i.value).appendTo(n)}),i.fileInput&&i.fileInput.length&&"POST"===i.type&&(e=i.fileInput.clone(),i.fileInput.after(function(t){return e[t]}),i.paramName&&i.fileInput.each(function(e){t(this).prop("name",o[e]||i.paramName)}),n.append(i.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data"),i.fileInput.removeAttr("form")),n.submit(),e&&e.length&&i.fileInput.each(function(i,n){var s=t(e[i]);t(n).prop("name",s.prop("name")).attr("form",s.attr("form")),s.replaceWith(n)})}),n.append(s).appendTo(document.body)},abort:function(){s&&s.unbind("load").prop("src",a),n&&n.remove()}}}}),t.ajaxSetup({converters:{"iframe text":function(e){return e&&t(e[0].body).text()},"iframe json":function(e){return e&&t.parseJSON(t(e[0].body).text())},"iframe html":function(e){return e&&t(e[0].body).html()},"iframe xml":function(e){var i=e&&e[0];return i&&t.isXMLDoc(i)?i:t.parseXML(i.XMLDocument&&i.XMLDocument.xml||t(i.body).html())},"iframe script":function(e){return e&&t.globalEval(t(e[0].body).text())}}})}),function(t){"use strict";t(window.n2)}(function(t){"use strict";function e(e){var i="dragover"===e;return function(n){n.dataTransfer=n.originalEvent&&n.originalEvent.dataTransfer;var s=n.dataTransfer;s&&-1!==t.inArray("Files",s.types)&&this._trigger(e,t.Event(e,{delegatedEvent:n}))!==!1&&(n.preventDefault(),i&&(s.dropEffect="copy"))}}t.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||t('<input type="file">').prop("disabled")),t.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),t.support.xhrFormDataFileUpload=!!window.FormData,t.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),t.widget("blueimp.fileupload",{options:{dropZone:t(document),pasteZone:void 0,fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,limitMultiFileUploadSize:void 0,limitMultiFileUploadSizeOverhead:512,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(e,i){return e=this.messages[e]||e.toString(),i&&t.each(i,function(t,i){e=e.replace("{"+t+"}",i)}),e},formData:function(t){return t.serializeArray()},add:function(e,i){return e.isDefaultPrevented()?!1:void((i.autoUpload||i.autoUpload!==!1&&t(this).fileupload("option","autoUpload"))&&i.process().done(function(){i.submit()}))},processData:!1,contentType:!1,cache:!1},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:t.support.blobSlice&&function(){var t=this.slice||this.webkitSlice||this.mozSlice;return t.apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(t,e,i){var n=t-this.timestamp;return(!this.bitrate||!i||n>i)&&(this.bitrate=(e-this.loaded)*(1e3/n)*8,this.loaded=e,this.timestamp=t),this.bitrate}},_isXHRUpload:function(e){return!e.forceIframeTransport&&(!e.multipart&&t.support.xhrFileUpload||t.support.xhrFormDataFileUpload)},_getFormData:function(e){var i;return"function"===t.type(e.formData)?e.formData(e.form):t.isArray(e.formData)?e.formData:"object"===t.type(e.formData)?(i=[],t.each(e.formData,function(t,e){i.push({name:t,value:e})}),i):[]},_getTotal:function(e){var i=0;return t.each(e,function(t,e){i+=e.size||1}),i},_initProgressObject:function(e){var i={loaded:0,total:0,bitrate:0};e._progress?t.extend(e._progress,i):e._progress=i},_initResponseObject:function(t){var e;if(t._response)for(e in t._response)t._response.hasOwnProperty(e)&&delete t._response[e];else t._response={}},_onProgress:function(e,i){if(e.lengthComputable){var n,s=Date.now?Date.now():(new Date).getTime();if(i._time&&i.progressInterval&&s-i._time<i.progressInterval&&e.loaded!==e.total)return;i._time=s,n=Math.floor(e.loaded/e.total*(i.chunkSize||i._progress.total))+(i.uploadedBytes||0),this._progress.loaded+=n-i._progress.loaded,this._progress.bitrate=this._bitrateTimer.getBitrate(s,this._progress.loaded,i.bitrateInterval),i._progress.loaded=i.loaded=n,i._progress.bitrate=i.bitrate=i._bitrateTimer.getBitrate(s,n,i.bitrateInterval),this._trigger("progress",t.Event("progress",{delegatedEvent:e}),i),this._trigger("progressall",t.Event("progressall",{delegatedEvent:e}),this._progress)}},_initProgressListener:function(e){var i=this,n=e.xhr?e.xhr():t.ajaxSettings.xhr();n.upload&&(t(n.upload).bind("progress",function(t){var n=t.originalEvent;t.lengthComputable=n.lengthComputable,t.loaded=n.loaded,t.total=n.total,i._onProgress(t,e)}),e.xhr=function(){return n})},_isInstanceOf:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"},_initXHRData:function(e){var i,n=this,s=e.files[0],o=e.multipart||!t.support.xhrFileUpload,a="array"===t.type(e.paramName)?e.paramName[0]:e.paramName;e.headers=t.extend({},e.headers),e.contentRange&&(e.headers["Content-Range"]=e.contentRange),o&&!e.blob&&this._isInstanceOf("File",s)||(e.headers["Content-Disposition"]='attachment; filename="'+encodeURI(s.name)+'"'),o?t.support.xhrFormDataFileUpload&&(e.postMessage?(i=this._getFormData(e),e.blob?i.push({name:a,value:e.blob}):t.each(e.files,function(n,s){i.push({name:"array"===t.type(e.paramName)&&e.paramName[n]||a,value:s})})):(n._isInstanceOf("FormData",e.formData)?i=e.formData:(i=new FormData,t.each(this._getFormData(e),function(t,e){i.append(e.name,e.value)})),e.blob?i.append(a,e.blob,s.name):t.each(e.files,function(s,o){(n._isInstanceOf("File",o)||n._isInstanceOf("Blob",o))&&i.append("array"===t.type(e.paramName)&&e.paramName[s]||a,o,o.uploadName||o.name)})),e.data=i):(e.contentType=s.type||"application/octet-stream",e.data=e.blob||s),e.blob=null},_initIframeSettings:function(e){var i=t("<a></a>").prop("href",e.url).prop("host");e.dataType="iframe "+(e.dataType||""),e.formData=this._getFormData(e),e.redirect&&i&&i!==location.host&&e.formData.push({name:e.redirectParamName||"redirect",value:e.redirect})},_initDataSettings:function(t){this._isXHRUpload(t)?(this._chunkedUpload(t,!0)||(t.data||this._initXHRData(t),this._initProgressListener(t)),t.postMessage&&(t.dataType="postmessage "+(t.dataType||""))):this._initIframeSettings(t)},_getParamName:function(e){var i=t(e.fileInput),n=e.paramName;return n?t.isArray(n)||(n=[n]):(n=[],i.each(function(){for(var e=t(this),i=e.prop("name")||"files[]",s=(e.prop("files")||[1]).length;s;)n.push(i),s-=1}),n.length||(n=[i.prop("name")||"files[]"])),n},_initFormSettings:function(e){e.form&&e.form.length||(e.form=t(e.fileInput.prop("form")),e.form.length||(e.form=t(this.options.fileInput.prop("form")))),e.paramName=this._getParamName(e),e.url||(e.url=e.form.prop("action")||location.href),e.type=(e.type||"string"===t.type(e.form.prop("method"))&&e.form.prop("method")||"").toUpperCase(),
"POST"!==e.type&&"PUT"!==e.type&&"PATCH"!==e.type&&(e.type="POST"),e.formAcceptCharset||(e.formAcceptCharset=e.form.attr("accept-charset"))},_getAJAXSettings:function(e){var i=t.extend({},this.options,e);return this._initFormSettings(i),this._initDataSettings(i),i},_getDeferredState:function(t){return t.state?t.state():t.isResolved()?"resolved":t.isRejected()?"rejected":"pending"},_enhancePromise:function(t){return t.success=t.done,t.error=t.fail,t.complete=t.always,t},_getXHRPromise:function(e,i,n){var s=t.Deferred(),o=s.promise();return i=i||this.options.context||o,e===!0?s.resolveWith(i,n):e===!1&&s.rejectWith(i,n),o.abort=s.promise,this._enhancePromise(o)},_addConvenienceMethods:function(e,i){var n=this,s=function(e){return t.Deferred().resolveWith(n,e).promise()};i.process=function(e,o){return(e||o)&&(i._processQueue=this._processQueue=(this._processQueue||s([this])).pipe(function(){return i.errorThrown?t.Deferred().rejectWith(n,[i]).promise():s(arguments)}).pipe(e,o)),this._processQueue||s([this])},i.submit=function(){return"pending"!==this.state()&&(i.jqXHR=this.jqXHR=n._trigger("submit",t.Event("submit",{delegatedEvent:e}),this)!==!1&&n._onSend(e,this)),this.jqXHR||n._getXHRPromise()},i.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",n._trigger("fail",null,this),n._getXHRPromise(!1))},i.state=function(){return this.jqXHR?n._getDeferredState(this.jqXHR):this._processQueue?n._getDeferredState(this._processQueue):void 0},i.processing=function(){return!this.jqXHR&&this._processQueue&&"pending"===n._getDeferredState(this._processQueue)},i.progress=function(){return this._progress},i.response=function(){return this._response}},_getUploadedBytes:function(t){var e=t.getResponseHeader("Range"),i=e&&e.split("-"),n=i&&i.length>1&&parseInt(i[1],10);return n&&n+1},_chunkedUpload:function(e,i){e.uploadedBytes=e.uploadedBytes||0;var n,s,o=this,a=e.files[0],r=a.size,l=e.uploadedBytes,h=e.maxChunkSize||r,c=this._blobSlice,u=t.Deferred(),d=u.promise();return this._isXHRUpload(e)&&c&&(l||r>h)&&!e.data?i?!0:l>=r?(a.error=e.i18n("uploadedBytes"),this._getXHRPromise(!1,e.context,[null,"error",a.error])):(s=function(){var i=t.extend({},e),d=i._progress.loaded;i.blob=c.call(a,l,l+h,a.type),i.chunkSize=i.blob.size,i.contentRange="bytes "+l+"-"+(l+i.chunkSize-1)+"/"+r,o._initXHRData(i),o._initProgressListener(i),n=(o._trigger("chunksend",null,i)!==!1&&t.ajax(i)||o._getXHRPromise(!1,i.context)).done(function(n,a,h){l=o._getUploadedBytes(h)||l+i.chunkSize,d+i.chunkSize-i._progress.loaded&&o._onProgress(t.Event("progress",{lengthComputable:!0,loaded:l-i.uploadedBytes,total:l-i.uploadedBytes}),i),e.uploadedBytes=i.uploadedBytes=l,i.result=n,i.textStatus=a,i.jqXHR=h,o._trigger("chunkdone",null,i),o._trigger("chunkalways",null,i),r>l?s():u.resolveWith(i.context,[n,a,h])}).fail(function(t,e,n){i.jqXHR=t,i.textStatus=e,i.errorThrown=n,o._trigger("chunkfail",null,i),o._trigger("chunkalways",null,i),u.rejectWith(i.context,[t,e,n])})},this._enhancePromise(d),d.abort=function(){return n.abort()},s(),d):!1},_beforeSend:function(t,e){0===this._active&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer,this._progress.loaded=this._progress.total=0,this._progress.bitrate=0),this._initResponseObject(e),this._initProgressObject(e),e._progress.loaded=e.loaded=e.uploadedBytes||0,e._progress.total=e.total=this._getTotal(e.files)||1,e._progress.bitrate=e.bitrate=0,this._active+=1,this._progress.loaded+=e.loaded,this._progress.total+=e.total},_onDone:function(e,i,n,s){var o=s._progress.total,a=s._response;s._progress.loaded<o&&this._onProgress(t.Event("progress",{lengthComputable:!0,loaded:o,total:o}),s),a.result=s.result=e,a.textStatus=s.textStatus=i,a.jqXHR=s.jqXHR=n,this._trigger("done",null,s)},_onFail:function(t,e,i,n){var s=n._response;n.recalculateProgress&&(this._progress.loaded-=n._progress.loaded,this._progress.total-=n._progress.total),s.jqXHR=n.jqXHR=t,s.textStatus=n.textStatus=e,s.errorThrown=n.errorThrown=i,this._trigger("fail",null,n)},_onAlways:function(t,e,i,n){this._trigger("always",null,n)},_onSend:function(e,i){i.submit||this._addConvenienceMethods(e,i);var n,s,o,a,r=this,l=r._getAJAXSettings(i),h=function(){return r._sending+=1,l._bitrateTimer=new r._BitrateTimer,n=n||((s||r._trigger("send",t.Event("send",{delegatedEvent:e}),l)===!1)&&r._getXHRPromise(!1,l.context,s)||r._chunkedUpload(l)||t.ajax(l)).done(function(t,e,i){r._onDone(t,e,i,l)}).fail(function(t,e,i){r._onFail(t,e,i,l)}).always(function(t,e,i){if(r._onAlways(t,e,i,l),r._sending-=1,r._active-=1,l.limitConcurrentUploads&&l.limitConcurrentUploads>r._sending)for(var n=r._slots.shift();n;){if("pending"===r._getDeferredState(n)){n.resolve();break}n=r._slots.shift()}0===r._active&&r._trigger("stop")})};return this._beforeSend(e,l),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(o=t.Deferred(),this._slots.push(o),a=o.pipe(h)):(this._sequence=this._sequence.pipe(h,h),a=this._sequence),a.abort=function(){return s=[void 0,"abort","abort"],n?n.abort():(o&&o.rejectWith(l.context,s),h())},this._enhancePromise(a)):h()},_onAdd:function(e,i){var n,s,o,a,r=this,l=!0,h=t.extend({},this.options,i),c=i.files,u=c.length,d=h.limitMultiFileUploads,p=h.limitMultiFileUploadSize,f=h.limitMultiFileUploadSizeOverhead,m=0,g=this._getParamName(h),v=0;if(!p||u&&void 0!==c[0].size||(p=void 0),(h.singleFileUploads||d||p)&&this._isXHRUpload(h))if(h.singleFileUploads||p||!d)if(!h.singleFileUploads&&p)for(o=[],n=[],a=0;u>a;a+=1)m+=c[a].size+f,(a+1===u||m+c[a+1].size+f>p||d&&a+1-v>=d)&&(o.push(c.slice(v,a+1)),s=g.slice(v,a+1),s.length||(s=g),n.push(s),v=a+1,m=0);else n=g;else for(o=[],n=[],a=0;u>a;a+=d)o.push(c.slice(a,a+d)),s=g.slice(a,a+d),s.length||(s=g),n.push(s);else o=[c],n=[g];return i.originalFiles=c,t.each(o||c,function(s,a){var h=t.extend({},i);return h.files=o?a:[a],h.paramName=n[s],r._initResponseObject(h),r._initProgressObject(h),r._addConvenienceMethods(e,h),l=r._trigger("add",t.Event("add",{delegatedEvent:e}),h)}),l},_replaceFileInput:function(e){var i=e.fileInput,n=i.clone(!0);e.fileInputClone=n,t("<form></form>").append(n)[0].reset(),i.after(n).detach(),t.cleanData(i.unbind("remove")),this.options.fileInput=this.options.fileInput.map(function(t,e){return e===i[0]?n[0]:e}),i[0]===this.element[0]&&(this.element=n)},_handleFileTreeEntry:function(e,i){var n,s=this,o=t.Deferred(),a=function(t){t&&!t.entry&&(t.entry=e),o.resolve([t])},r=function(t){s._handleFileTreeEntries(t,i+e.name+"/").done(function(t){o.resolve(t)}).fail(a)},l=function(){n.readEntries(function(t){t.length?(h=h.concat(t),l()):r(h)},a)},h=[];return i=i||"",e.isFile?e._file?(e._file.relativePath=i,o.resolve(e._file)):e.file(function(t){t.relativePath=i,o.resolve(t)},a):e.isDirectory?(n=e.createReader(),l()):o.resolve([]),o.promise()},_handleFileTreeEntries:function(e,i){var n=this;return t.when.apply(t,t.map(e,function(t){return n._handleFileTreeEntry(t,i)})).pipe(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(e){e=e||{};var i=e.items;return i&&i.length&&(i[0].webkitGetAsEntry||i[0].getAsEntry)?this._handleFileTreeEntries(t.map(i,function(t){var e;return t.webkitGetAsEntry?(e=t.webkitGetAsEntry(),e&&(e._file=t.getAsFile()),e):t.getAsEntry()})):t.Deferred().resolve(t.makeArray(e.files)).promise()},_getSingleFileInputFiles:function(e){e=t(e);var i,n,s=e.prop("webkitEntries")||e.prop("entries");if(s&&s.length)return this._handleFileTreeEntries(s);if(i=t.makeArray(e.prop("files")),i.length)void 0===i[0].name&&i[0].fileName&&t.each(i,function(t,e){e.name=e.fileName,e.size=e.fileSize});else{if(n=e.prop("value"),!n)return t.Deferred().resolve([]).promise();i=[{name:n.replace(/^.*\\/,"")}]}return t.Deferred().resolve(i).promise()},_getFileInputFiles:function(e){return e instanceof t&&1!==e.length?t.when.apply(t,t.map(e,this._getSingleFileInputFiles)).pipe(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(e)},_onChange:function(e){var i=this,n={fileInput:t(e.target),form:t(e.target.form)};this._getFileInputFiles(n.fileInput).always(function(s){n.files=s,i.options.replaceFileInput&&i._replaceFileInput(n),i._trigger("change",t.Event("change",{delegatedEvent:e}),n)!==!1&&i._onAdd(e,n)})},_onPaste:function(e){var i=e.originalEvent&&e.originalEvent.clipboardData&&e.originalEvent.clipboardData.items,n={files:[]};i&&i.length&&(t.each(i,function(t,e){var i=e.getAsFile&&e.getAsFile();i&&n.files.push(i)}),this._trigger("paste",t.Event("paste",{delegatedEvent:e}),n)!==!1&&this._onAdd(e,n))},_onDrop:function(e){e.dataTransfer=e.originalEvent&&e.originalEvent.dataTransfer;var i=this,n=e.dataTransfer,s={};n&&n.files&&n.files.length&&(e.preventDefault(),this._getDroppedFiles(n).always(function(n){s.files=n,i._trigger("drop",t.Event("drop",{delegatedEvent:e}),s)!==!1&&i._onAdd(e,s)}))},_onDragOver:e("dragover"),_onDragEnter:e("dragenter"),_onDragLeave:e("dragleave"),_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop,dragenter:this._onDragEnter,dragleave:this._onDragLeave}),this._on(this.options.pasteZone,{paste:this._onPaste})),t.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragenter dragleave dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_setOption:function(e,i){var n=-1!==t.inArray(e,this._specialOptions);n&&this._destroyEventHandlers(),this._super(e,i),n&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var e=this.options;void 0===e.fileInput?e.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):e.fileInput instanceof t||(e.fileInput=t(e.fileInput)),e.dropZone instanceof t||(e.dropZone=t(e.dropZone)),e.pasteZone instanceof t||(e.pasteZone=t(e.pasteZone))},_getRegExp:function(t){var e=t.split("/"),i=e.pop();return e.shift(),new RegExp(e.join("/"),i)},_isRegExpOption:function(e,i){return"url"!==e&&"string"===t.type(i)&&/^\/.*\/[igm]{0,3}$/.test(i)},_initDataAttributes:function(){var e=this,i=this.options,n=this.element.data();t.each(this.element[0].attributes,function(t,s){var o,a=s.name.toLowerCase();/^data-/.test(a)&&(a=a.slice(5).replace(/-[a-z]/g,function(t){return t.charAt(1).toUpperCase()}),o=n[a],e._isRegExpOption(a,o)&&(o=e._getRegExp(o)),i[a]=o)})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(e){var i=this;e&&!this.options.disabled&&(e.fileInput&&!e.files?this._getFileInputFiles(e.fileInput).always(function(t){e.files=t,i._onAdd(null,e)}):(e.files=t.makeArray(e.files),this._onAdd(null,e)))},send:function(e){if(e&&!this.options.disabled){if(e.fileInput&&!e.files){var i,n,s=this,o=t.Deferred(),a=o.promise();return a.abort=function(){return n=!0,i?i.abort():(o.reject(null,"abort","abort"),a)},this._getFileInputFiles(e.fileInput).always(function(t){if(!n){if(!t.length)return void o.reject();e.files=t,i=s._onSend(null,e),i.then(function(t,e,i){o.resolve(t,e,i)},function(t,e,i){o.reject(t,e,i)})}}),this._enhancePromise(a)}if(e.files=t.makeArray(e.files),e.files.length)return this._onSend(null,e)}return this._getXHRPromise(!1,e&&e.context)}})}),function(t){t.widget("ui.nextendSpacing",t.ui.mouse,{version:"1.0.0",widgetEventPrefix:"spacing",options:{handles:"",mode:"padding",sync:{n:"padding-top",e:"padding-right",s:"padding-bottom",w:"padding-left"},syncInv:{n:"s",e:"w",s:"n",w:"e"},side:{n:"top",e:"right",s:"bottom",w:"left"},size:{n:"height",e:"width",s:"height",w:"width"},drag:null,start:null,stop:null},_create:function(){this._setupHandles(),this._mouseInit()},_destroy:function(){return this._mouseDestroy(),this.element.removeData("uiNextendSpacing").off(".spacing").find("> .ui-spacing-handle").remove(),this},_setupHandles:function(){var e,i,n,s,o,a=this.options;for(n="n,e,s,w".split(","),this.handles={},i=0;i<n.length;i++)e=t.trim(n[i]),s="ui-spacing-"+e,this.handles[e]=o=t("<div>").addClass("ui-spacing-handle ui-spacing-handle-"+a.mode+" ui-spacing-handle "+s).on("mousedown",t.proxy(this._mouseDown,this)).appendTo(this.element).disableSelection(),nextend.tooltip.addElement(this.handles[e],a.mode.capitalize()+" "+a.side[e])},_removeHandles:function(){this.element.find("> .ui-spacing-handle").remove()},_parse_movement_n:function(t){return t.pageY-this.originalMousePosition.top},_parse_movement_w:function(t){return t.pageX-this.originalMousePosition.left},_parse_movement_s:function(t){return t.pageY-this.originalMousePosition.top},_parse_movement_e:function(t){return this.originalMousePosition.left-t.pageX},_mouseCapture:function(e){var i,n,s=!1;for(i in this.handles)n=t(this.handles[i])[0],(n===e.target||t.contains(n,e.target))&&(s=!0);return!this.options.disabled&&s},_mouseStart:function(e){this.wasShiftPressed=!1;this.options,this.element;for(var i in this.handles)if(handle=this.handles[i][0],handle===e.target||t.contains(handle,e.target)){this.direction=i;break}return this.syncProperty=this.options.sync[this.direction],this.originalValue=parseInt(this.element.css(this.syncProperty)),this.invSyncProperty=this.options.sync[this.options.syncInv[this.direction]],this.invOriginalValue=parseInt(this.element.css(this.invSyncProperty)),this.resizing=!0,this.originalMousePosition={left:e.pageX,top:e.pageY},this.currentValue=this.originalValue,this.handles[this.direction].addClass("ui-spacing-under-spacing"),this.element.addClass("ui-spacing-resizing"),t("body").on({"keydown.uiSpacing":t.proxy(this._keyDown,this),"keyup.uiSpacing":t.proxy(this._keyUp,this)}).addClass("n2-ss-spacing-element"),this._trigger("start",e,this.ui()),!0},_keyDown:function(t){t.shiftKey&&!this.wasShiftPressed&&(this.wasShiftPressed=!0,this.element.css(this.invSyncProperty,this.currentValue),this.handles[this.options.syncInv[this.direction]].css(this.options.size[this.options.syncInv[this.direction]],this.currentValue),this._trigger("spacing",t,this.ui()))},_keyUp:function(t){!t.shiftKey&&this.wasShiftPressed&&(this.wasShiftPressed=!1,this.element.css(this.invSyncProperty,this.invOriginalValue),this.handles[this.options.syncInv[this.direction]].css(this.options.size[this.options.syncInv[this.direction]],""),this._trigger("spacing",t,this.ui()))},_mouseDrag:function(t){this.movement=this["_parse_movement_"+this.direction].call(this,t),this.currentValue=nextend.roundHelper(this.originalValue+this.movement),"padding"==this.options.mode&&(this.currentValue=Math.max(0,this.currentValue)),this.element.css(this.syncProperty,this.currentValue),this.handles[this.direction].css(this.options.size[this.direction],this.currentValue),t.shiftKey?(this.wasShiftPressed=!0,this.element.css(this.invSyncProperty,this.currentValue),this.handles[this.options.syncInv[this.direction]].css(this.options.size[this.options.syncInv[this.direction]],this.currentValue)):this.wasShiftPressed&&(this.wasShiftPressed=!1,this.element.css(this.invSyncProperty,this.invOriginalValue),this.handles[this.options.syncInv[this.direction]].css(this.options.size[this.options.syncInv[this.direction]],"")),this._trigger("spacing",t,this.ui())},_mouseStop:function(e){return this.movement=this["_parse_movement_"+this.direction].call(this,e),this.currentValue=nextend.roundHelper(this.originalValue+this.movement),"padding"==this.options.mode&&(this.currentValue=Math.max(0,this.currentValue)),this.element.css(this.syncProperty,this.currentValue),e.shiftKey?this.element.css(this.invSyncProperty,this.currentValue):this.wasShiftPressed&&this.element.css(this.invSyncProperty,this.invOriginalValue),this.resizing=!1,t("body").off(".uiSpacing").removeClass("n2-ss-spacing-element"),this.handles[this.direction].removeClass("ui-spacing-under-spacing"),this.element.removeClass("ui-spacing-resizing"),this._trigger("stop",e,this.ui()),nextend.preventMouseUp(),!1},plugins:{},ui:function(){var t={};return t[this.options.side[this.direction]]=this.currentValue,this.wasShiftPressed&&(t[this.options.side[this.options.syncInv[this.direction]]]=this.currentValue),{element:this.element,changed:t}},_setOption:function(t,e){if(this._super(t,e),"current"===t){var i=e.split(" ");this.handles.n.css("height",i[0]),this.handles.e.css("width",i[1]),this.handles.s.css("height",i[2]),this.handles.w.css("width",i[3])}}})}(n2),function(t){t.widget("ui.nextendNormalSizing",t.ui.mouse,{version:"1.0.0",widgetEventPrefix:"normalsizing",multiplier:1,options:{maxWidth:!0,height:!1,syncWidth:!1,start:null,resizeMaxWidth:null,resizeHeight:null,stopMaxWidth:null,stopHeight:null},_create:function(){this._setupHandles(),this._mouseInit()},_destroy:function(){return this._mouseDestroy(),this.element.removeData("uiNextendNormalSizing").off(".normalsizing").find("> .ui-customresizable-handle").remove(),this},_setupHandles:function(){var e,i,n=this.options,s=[];for(n.maxWidth&&(s.push("w"),s.push("e")),n.height&&s.push("s"),this.handles={},e=0;e<s.length;e++){var o=s[e];i=t('<div class="ui-customresizable-handle ui-customresizable-handle ui-customresizable-'+o+'">').css("zIndex",90),this.handles[o]=i,this.element.append(i)}n.maxWidth&&(nextend.tooltip.addElement(this.handles.e,"Max width"),nextend.tooltip.addElement(this.handles.w,"Max width")),n.height&&nextend.tooltip.addElement(this.handles.s,"Height"),this._handles=this.element.find("> .ui-customresizable-handle"),this._handles.disableSelection()},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(t){var e;for(e in this.handles)if(this.handles[e][0]===t.target)return this.currentHandle=e,!this.options.disabled;return!1},_mouseStart:function(e){this.options,this.element;switch(this.resizing=!0,this.originalMousePosition={left:e.pageX,top:e.pageY},this.currentHandle){case"w":case"e":this.originalValue=this.element.width(),this.maxWidth=this.element.parent().width(),this._trigger("start",e,"maxwidth"),"center"==this.element.css("align-self")?this.multiplier=2:this.multiplier=1;break;case"s":this.originalValue=this.element.height(),this._trigger("start",e,"height")}return this.element.addClass("ui-resizable-resizing"),t("body").addClass("n2-ss-normal-sizing-element"),!0},_parse_movement_s:function(t){return t.pageY-this.originalMousePosition.top},_parse_movement_e:function(t){return(t.pageX-this.originalMousePosition.left)*this.multiplier},_parse_movement_w:function(t){return(this.originalMousePosition.left-t.pageX)*this.multiplier},_mouseDrag:function(t){var e=this.options;switch(this.currentValue=nextend.roundHelper(this.originalValue+this["_parse_movement_"+this.currentHandle].call(this,t)),this.currentHandle){case"w":case"e":this.currentValue<=this.maxWidth?(this.element.css("maxWidth",this.currentValue+"px"),e.syncWidth&&this.element.css("width",this.currentValue+"px")):(this.element.css("maxWidth","none"),e.syncWidth&&this.element.css("width",""),this.currentValue=0),this._trigger("resizeMaxWidth",t,{value:this.currentValue});break;case"s":this.currentValue=Math.max(1,this.currentValue),this.element.height(this.currentValue),this._trigger("resizeHeight",t,{value:this.currentValue})}},_mouseStop:function(e){var i=this.options;switch(this.currentValue=nextend.roundHelper(this.originalValue+this["_parse_movement_"+this.currentHandle].call(this,e)),this.currentHandle){case"w":case"e":this.currentValue<=this.maxWidth?(this.element.css("maxWidth",this.currentValue+"px"),i.syncWidth&&this.element.css("width","")):(this.element.css("maxWidth","none"),i.syncWidth&&this.element.css("width",""),this.currentValue=0),this._trigger("stopMaxWidth",e,{value:this.currentValue});break;case"s":this.currentValue=Math.max(1,this.currentValue),this.element.height(this.currentValue),this._trigger("stopHeight",e,{value:this.currentValue})}return this.resizing=!1,t("body").off(".uiNextendNormalSizing").removeClass("n2-ss-normal-sizing-element"),this.element.removeClass("ui-resizable-resizing"),nextend.preventMouseUp(),!1}})}(n2),function(t){t.widget("ui.nextendResizable",t.ui.resizable,{_mouseStart:function(t){var e=this.element.position();return this.element.css({left:e.left,top:e.top,right:"auto",bottom:"auto"}),this._superApply(arguments)},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition,axis:this.axis}}}),t.ui.plugin.add("nextendResizable","smartguides",{start:function(e,i){var n=t(this).data("uiNextendResizable"),s=n.options;if(n.gridH=t('<div class="n2-grid n2-grid-h"></div>').appendTo(s._containment),n.gridV=t('<div class="n2-grid n2-grid-v"></div>').appendTo(s._containment),n.gridH2=t('<div class="n2-grid n2-grid-h"></div>').appendTo(s._containment),n.gridV2=t('<div class="n2-grid n2-grid-v"></div>').appendTo(s._containment),n.elements=[],"function"==typeof s.smartguides){var o=s.smartguides();if(o){var a=s._containment.offset();o.each(function(){var e=t(this),i=e.offset();this!=n.element[0]&&n.elements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:Math.round(i.top-a.top),left:Math.round(i.left-a.left)})}),n.elements.push({item:s._containment,width:s._containment.width(),height:s._containment.height(),top:0,left:0})}}},stop:function(e,i){var n=t(this).data("uiNextendResizable");n.gridH.remove(),n.gridV.remove(),n.gridH2.remove(),n.gridV2.remove()},resize:function(e,i){function n(t){r.gridV.css({left:Math.min(t,c.width-1),display:"block"})}function s(t){r.gridV2.css({left:Math.min(t,c.width-1),display:"block"})}function o(t){r.gridH.css({top:Math.min(t,c.height-1),display:"block"})}function a(t){r.gridH2.css({top:Math.min(t,c.height-1),display:"block"})}var r=t(this).data("uiNextendResizable"),l=r.options,h=l.tolerance;r.gridV.css({display:"none"}),r.gridH.css({display:"none"}),r.gridV2.css({display:"none"}),r.gridH2.css({display:"none"});var c=r.elements[r.elements.length-1],u=e.ctrlKey||e.metaKey,d=e.altKey;if(!u||!d)for(var p=i.position.left,f=p+i.size.width,m=i.position.top,g=m+i.size.height,v=r.elements.length-1;v>=0;v--){var _=r.elements[v].left,b=_+r.elements[v].width,y=r.elements[v].top,w=y+r.elements[v].height;if(!u){var x=(_+b)/2;if(Math.abs(_-f)<=h)i.size.width=_-i.position.left,n(i.position.left+i.size.width);else if(Math.abs(_-p)<=h){var k=i.position.left-_;i.position.left=_,i.size.width+=k,n(i.position.left)}else if(Math.abs(x-p)<=h){var k=i.position.left-x;i.position.left=x,i.size.width+=k,n(i.position.left)}if(Math.abs(b-p)<=h){var k=i.position.left-b;i.position.left=b,i.size.width+=k,s(i.position.left)}else Math.abs(b-f)<=h?(i.size.width=b-i.position.left,s(i.position.left+i.size.width)):Math.abs(x-f)<=h&&(i.size.width=x-i.position.left,s(i.position.left+i.size.width))}if(!d){var C=(y+w)/2;if(Math.abs(y-g)<=h)i.size.height=y-i.position.top,o(y);else if(Math.abs(y-m)<=h){var k=i.position.top-y;i.position.top=y,i.size.height+=k,o(i.position.top)}else if(Math.abs(C-m)<=h){var k=i.position.top-C;i.position.top=C,i.size.height+=k,o(i.position.top)}if(Math.abs(w-m)<=h){var k=i.position.top-w;i.position.top=w,i.size.height+=k,a(i.position.top)}else Math.abs(w-g)<=h?(i.size.height=w-i.position.top,a(i.position.top+i.size.height)):Math.abs(C-g)<=h&&(i.size.height=C-i.position.top,a(i.position.top+i.size.height))}}}})}(n2);