//script: jquery /*! * jQuery JavaScript Library v3.3.1 * https://jquery.com/ * * Includes Sizzle.js * https://sizzlejs.com/ * * Copyright JS Foundation and other contributors * Released under the MIT license * https://jquery.org/license * * Date: 2018-01-20T17:24Z */ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(E,e){"use strict";function m(e,t,n){var r,i=(t=t||ae).createElement("script");if(i.text=e,n)for(r in xe)n[r]&&(i[r]=n[r]);t.head.appendChild(i).parentNode.removeChild(i)}function g(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?de[pe.call(e)]||"object":typeof e}function s(e){var t=!!e&&"length"in e&&e.length,n=g(e);return!ve(e)&&!be(e)&&("array"===n||0===t||"number"==typeof t&&0C.cacheLength&&delete n[r.shift()],n[e+" "]=t}var r=[];return n}function u(e){return e[W]=!0,e}function i(e){var t=H.createElement("fieldset");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function t(e,t){for(var n=e.split("|"),r=n.length;r--;)C.attrHandle[n[r]]=t}function l(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function r(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function o(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function a(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&Ee(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function s(a){return u(function(o){return o=+o,u(function(e,t){for(var n,r=a([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function h(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function c(){}function m(e){for(var t=0,n=e.length,r="";t+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),xe=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Te=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Ce=function(){L()},Ee=f(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{K.apply(Y=Z.call(B.childNodes),B.childNodes),Y[B.childNodes.length].nodeType}catch(Se){K={apply:Y.length?function(e,t){J.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}for(y in T=x.support={},S=x.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=x.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==H&&9===r.nodeType&&r.documentElement&&(O=(H=r).documentElement,P=!S(H),B!==H&&(n=H.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),T.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),T.getElementsByTagName=i(function(e){return e.appendChild(H.createComment("")),!e.getElementsByTagName("*").length}),T.getElementsByClassName=ge.test(H.getElementsByClassName),T.getById=i(function(e){return O.appendChild(e).id=W,!H.getElementsByName||!H.getElementsByName(W).length}),T.getById?(C.filter.ID=function(e){var t=e.replace(be,xe);return function(e){return e.getAttribute("id")===t}},C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&P){var n=t.getElementById(e);return n?[n]:[]}}):(C.filter.ID=function(e){var n=e.replace(be,xe);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&P){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),C.find.TAG=T.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):T.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[i++];)1===n.nodeType&&r.push(n);return r},C.find.CLASS=T.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&P)return t.getElementsByClassName(e)},F=[],R=[],(T.qsa=ge.test(H.querySelectorAll))&&(i(function(e){O.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&R.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||R.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+W+"-]").length||R.push("~="),e.querySelectorAll(":checked").length||R.push(":checked"),e.querySelectorAll("a#"+W+"+*").length||R.push(".#.+[+~]")}),i(function(e){e.innerHTML="";var t=H.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&R.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&R.push(":enabled",":disabled"),O.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&R.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),R.push(",.*:")})),(T.matchesSelector=ge.test(I=O.matches||O.webkitMatchesSelector||O.mozMatchesSelector||O.oMatchesSelector||O.msMatchesSelector))&&i(function(e){T.disconnectedMatch=I.call(e,"*"),I.call(e,"[s!='']:x"),F.push("!=",oe)}),R=R.length&&new RegExp(R.join("|")),F=F.length&&new RegExp(F.join("|")),t=ge.test(O.compareDocumentPosition),M=t||ge.test(O.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},V=t?function(e,t){if(e===t)return q=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!T.sortDetached&&t.compareDocumentPosition(e)===n?e===H||e.ownerDocument===B&&M(B,e)?-1:t===H||t.ownerDocument===B&&M(B,t)?1:N?ee(N,e)-ee(N,t):0:4&n?-1:1)}:function(e,t){if(e===t)return q=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===H?-1:t===H?1:i?-1:o?1:N?ee(N,e)-ee(N,t):0;if(i===o)return l(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?l(a[r],s[r]):a[r]===B?-1:s[r]===B?1:0}),H},x.matches=function(e,t){return x(e,null,null,t)},x.matchesSelector=function(e,t){if((e.ownerDocument||e)!==H&&L(e),t=t.replace(ce,"='$1']"),T.matchesSelector&&P&&!U[t+" "]&&(!F||!F.test(t))&&(!R||!R.test(t)))try{var n=I.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(Se){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(be,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||x.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&x.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&z(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=x.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;Te.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?Te.find.matchesSelector(r,e)?[r]:[]:Te.find.matches(e,Te.grep(t,function(e){return 1===e.nodeType}))},Te.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(Te(e).filter(function(){for(t=0;t)[^>]*|#([\w-]+))$/;(Te.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ae,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):ve(e)?n.ready!==undefined?n.ready(e):e(Te):Te.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:Ne.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof Te?t[0]:t,Te.merge(this,Te.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:ae,!0)),De.test(r[1])&&Te.isPlainObject(t))for(r in t)ve(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=ae.getElementById(r[2]))&&(this[0]=i,this.length=1),this}).prototype=Te.fn,Ae=Te(ae);var qe=/^(?:parents|prev(?:Until|All))/,Le={children:!0,contents:!0,next:!0,prev:!0};Te.fn.extend({has:function(e){var t=Te(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]+)/i,Ke=/^$|^module$|\/(?:java|ecma)script/i,Ze={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Ze.optgroup=Ze.option,Ze.tbody=Ze.tfoot=Ze.colgroup=Ze.caption=Ze.thead,Ze.th=Ze.td;var et,tt,nt=/<|&#?\w+;/;et=ae.createDocumentFragment().appendChild(ae.createElement("div")),(tt=ae.createElement("input")).setAttribute("type","radio"),tt.setAttribute("checked","checked"),tt.setAttribute("name","t"),et.appendChild(tt),ye.checkClone=et.cloneNode(!0).cloneNode(!0).lastChild.checked,et.innerHTML="",ye.noCloneChecked=!!et.cloneNode(!0).lastChild.defaultValue;var rt=ae.documentElement,it=/^key/,ot=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,at=/^([^.]*)(?:\.(.+)|)/;Te.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,d,p,h,m,g=We.get(t);if(g)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&Te.find.matchesSelector(rt,i),n.guid||(n.guid=Te.guid++),(u=g.events)||(u=g.events={}),(a=g.handle)||(a=g.handle=function(e){return void 0!==Te&&Te.event.triggered!==e.type?Te.event.dispatch.apply(t,arguments):undefined}),l=(e=( e||"").match(He)||[""]).length;l--;)p=m=(s=at.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),p&&(f=Te.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=Te.event.special[p]||{},c=Te.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&Te.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=u[p])||((d=u[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(p,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),Te.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,m,g=We.hasData(e)&&We.get(e);if(g&&(u=g.events)){for(l=(t=(t||"").match(He)||[""]).length;l--;)if(p=m=(s=at.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),p){for(f=Te.event.special[p]||{},d=u[p=(r?f.delegateType:f.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)c=d[o],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,g.handle)||Te.removeEvent(e,p,g.handle),delete u[p])}else for(p in u)Te.event.remove(e,p+t[l],n,r,!0);Te.isEmptyObject(u)&&We.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=Te.event.fix(e),u=new Array(arguments.length),l=(We.get(this,"events")||{})[s.type]||[],c=Te.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,ut=/\s*$/g;Te.extend({htmlPrefilter:function(e){return e.replace(st,"<$1>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=Te.contains(e.ownerDocument,e);if(!(ye.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Te.isXMLDoc(e)))for(a=x(s),r=0,i=(o=x(e)).length;r" ).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),ae.head.appendChild(r[0])},abort:function(){i&&i()}}});var Zt,en=[],tn=/(=)\?(?=&|$)|\?\?/;Te.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=en.pop()||Te.expando+"_"+Ot++;return this[e]=!0,e}}),Te.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(tn.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&tn.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=ve(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(tn,"$1"+r):!1!==e.jsonp&&(e.url+=(Pt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||Te.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=E[r],E[r]=function(){o=arguments},n.always(function(){i===undefined?Te(E).removeProp(r):E[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,en.push(r)),o&&ve(i)&&i(o[0]),o=i=undefined}),"script"}),ye.createHTMLDocument=((Zt=ae.implementation.createHTMLDocument("").body).innerHTML="
",2===Zt.childNodes.length),Te.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(ye.createHTMLDocument?((r=(t=ae.implementation.createHTMLDocument("")).createElement("base")).href=ae.location.href,t.head.appendChild(r)):t=ae),o=!n&&[],(i=De.exec(e))?[t.createElement(i[1])]:(i=T([e],t,o),o&&o.length&&Te(o).remove(),Te.merge([],i.childNodes)));var r,i,o},Te.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(Te.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},Te.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){Te.fn[t]=function(e){return this.on(t,e)}}),Te.expr.pseudos.animated=function(t){return Te.grep(Te.timers,function(e){return t===e.elem}).length},Te.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=Te.css(e,"position"),c=Te(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=Te.css(e,"top"),u=Te.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),ve(t)&&(t=t.call(e,n,Te.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},Te.fn.extend({offset:function(t){if(arguments.length)return t===undefined?this:this.each(function(e){Te.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===Te.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===Te.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=Te(e).offset()).top+=Te.css(e,"borderTopWidth",!0),i.left+=Te.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-Te.css(r,"marginTop",!0),left:t.left-i.left-Te.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===Te.css(e,"position");)e=e.offsetParent;return e||rt})}}),Te.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;Te.fn[t]=function(e){return Re(this,function(e,t,n){var r;if(be(e)?r=e:9===e.nodeType&&(r=e.defaultView),n===undefined)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),Te.each(["top","left"],function(e,n){Te.cssHooks[n]=R(ye.pixelPosition,function(e,t){if(t)return t=P(e,n),ft.test(t)?Te(e).position()[n]+"px":t})}),Te.each({Height:"height",Width:"width"},function(a,s){Te.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){Te.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return Re(this,function(e,t,n){var r;return be(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):n===undefined?Te.css(e,t,i):Te.style(e,t,n,i)},s,n?e:undefined,n)}})}),Te.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){Te.fn[n]=function(e,t){return 0'),s='';o===u||i===u||l.isCrossDomain(t)||(s+=''),r&&a.attr("target",r),a.hide().append(s).appendTo("body"),a.submit()},formElements:function(e,t){return e.is("form")?c(e[0].elements).filter(t):e.find(t)},disableFormElements:function(e){l.formElements(e,l.disableSelector).each(function(){l.disableFormElement(c(this))})},disableFormElement:function(e){var t,n;t=e.is("button")?"html":"val",(n=e.data("disable-with"))!==u&&(e.data("ujs:enable-with",e[t]()),e[t](n)),e.prop("disabled",!0),e.data("ujs:disabled",!0)},enableFormElements:function(e){l.formElements(e,l.enableSelector).each(function(){l.enableFormElement(c(this))})},enableFormElement:function(e){var t=e.is("button")?"html":"val";e.data("ujs:enable-with")!==u&&(e[t](e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.prop("disabled",!1),e.removeData("ujs:disabled")},allowAction:function(e){var t,n=e.data("confirm"),r=!1;if(!n)return!0;if(l.fire(e,"confirm")){try{r=l.confirm(n)}catch(i){(console.error||console.log).call(console,i.stack||i)}t=l.fire(e,"confirm:complete",[r])}return r&&t},blankInputs:function(e,t,n){var r,i,o,a=c(),s=t||"input,textarea",u=e.find(s),l={};return u.each(function(){(r=c(this)).is("input[type=radio]")?(o=r.attr("name"),l[o]||(0===e.find('input[type=radio]:checked[name="'+o+'"]').length&&(i=e.find('input[type=radio][name="'+o+'"]'),a=a.add(i)),l[o]=o)):(r.is("input[type=checkbox],input[type=radio]")?r.is(":checked"):!!r.val())===n&&(a=a.add(r))}),!!a.length&&a},nonBlankInputs:function(e,t){return l.blankInputs(e,t,!0)},stopEverything:function(e){return c(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(e){var t=e.data("disable-with");t!==u&&(e.data("ujs:enable-with",e.html()),e.html(t)),e.bind("click.railsDisable",function(e){return l.stopEverything(e)}),e.data("ujs:disabled",!0)},enableElement:function(e){e.data("ujs:enable-with")!==u&&(e.html(e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.unbind("click.railsDisable"),e.removeData("ujs:disabled")}},l.fire(e,"rails:attachBindings")&&(c.ajaxPrefilter(function(e,t,n){e.crossDomain||l.CSRFProtection(n)}),c(window).on("pageshow.rails",function(){c(c.rails.enableSelector).each(function(){var e=c(this);e.data("ujs:disabled")&&c.rails.enableFormElement(e)}),c(c.rails.linkDisableSelector).each(function(){var e=c(this);e.data("ujs:disabled")&&c.rails.enableElement(e)})}),e.on("ajax:complete",l.linkDisableSelector,function(){l.enableElement(c(this))}),e.on("ajax:complete",l.buttonDisableSelector,function(){l.enableFormElement(c(this))}),e.on("click.rails",l.linkClickSelector,function(e){var t=c(this),n=t.data("method"),r=t.data("params"),i=e.metaKey||e.ctrlKey;if(!l.allowAction(t))return l.stopEverything(e);if(!i&&t.is(l.linkDisableSelector)&&l.disableElement(t),l.isRemote(t)){if(i&&(!n||"GET"===n)&&!r)return!0;var o=l.handleRemote(t);return!1===o?l.enableElement(t):o.fail(function(){l.enableElement(t)}),!1}return n?(l.handleMethod(t),!1):void 0}),e.on("click.rails",l.buttonClickSelector,function(e){var t=c(this);if(!l.allowAction(t)||!l.isRemote(t))return l.stopEverything(e);t.is(l.buttonDisableSelector)&&l.disableFormElement(t);var n=l.handleRemote(t);return!1===n?l.enableFormElement(t):n.fail(function(){l.enableFormElement(t)}),!1}),e.on("change.rails",l.inputChangeSelector,function(e){var t=c(this);return l.allowAction(t)&&l.isRemote(t)?(l.handleRemote(t),!1):l.stopEverything(e)}),e.on("submit.rails",l.formSubmitSelector,function(e){var t,n,r=c(this),i=l.isRemote(r);if(!l.allowAction(r))return l.stopEverything(e);if(r.attr("novalidate")===u)if(r.data("ujs:formnovalidate-button")===u){if((t=l.blankInputs(r,l.requiredInputSelector,!1))&&l.fire(r,"ajax:aborted:required",[t]))return l.stopEverything(e)}else r.data("ujs:formnovalidate-button",u);if(i){if(n=l.nonBlankInputs(r,l.fileInputSelector)){setTimeout(function(){l.disableFormElements(r)},13);var o=l.fire(r,"ajax:aborted:file",[n]);return o||setTimeout(function(){l.enableFormElements(r)},13),o}return l.handleRemote(r),!1}setTimeout(function(){l.disableFormElements(r)},13)}),e.on("click.rails",l.formInputClickSelector,function(e){var t=c(this);if(!l.allowAction(t))return l.stopEverything(e);var n=t.attr("name"),r=n?{name:n,value:t.val()}:null,i=t.closest("form");0===i.length&&(i=c("#"+t.attr("form"))),i.data("ujs:submit-button",r),i.data("ujs:formnovalidate-button",t.attr("formnovalidate")),i.data("ujs:submit-button-formaction",t.attr("formaction")),i.data("ujs:submit-button-formmethod",t.attr("formmethod"))}),e.on("ajax:send.rails",l.formSubmitSelector,function(e){this===e.target&&l.disableFormElements(c(this))}),e.on("ajax:complete.rails",l.formSubmitSelector,function(e){this===e.target&&l.enableFormElements(c(this))}),c(function(){l.refreshCSRFTokens()}))}(jQuery); //script: decko (function(){var n,o,i,r,a,s,e,l,t,d,c,u,f,h,p,m,v,g,b,y,w,_,k,x,C,S,F,O,T,P,R,I,N,M,A,j,D,E,L,z,V,B;window.decko||(window.decko={}),$(window).ready(function(){var t;return $("body").on("click","._stop_propagation",function(t){return t.stopPropagation()}),$("body").on("click","._prevent_default",function(t){return t.preventDefault()}),$("body").on("mouseenter","a[data-hover-text]",function(){var t;return t=$(this).text(),$(this).data("original-text",t),$(this).text($(this).data("hover-text"))}),$("body").on("mouseleave","a[data-hover-text]",function(){return $(this).text($(this).data("original-text"))}),$("body").on("click",".shade-view h1",function(){var t;if(t=$(this).slot().find(".shade-content").is(":hidden"),decko.toggleShade($(this).closest(".pointer-list").find(".shade-content:visible").parent()),t)return decko.toggleShade($(this).slot())}),(t=$(".shade-view h1")[0])&&$(t).trigger("click"),$("body").on("click",".open-slow-items",function(){var t;return(t=$(this).closest(".panel-group")).find(".open-slow-items").removeClass("open-slow-items").addClass("close-slow-items"),t.find(".toggle-fast-items").text("show < 100ms"),t.find(".duration-ok").hide(),t.find(".panel-danger > .panel-collapse").collapse("show").find("a > span").addClass("show-fast-items")}),$("body").on("click",".close-slow-items",function(){var t;return(t=$(this).closest(".panel-group")).find(".close-slow-items").removeClass("close-slow-items").addClass("open-slow-items"),t.find(".toggle-fast-items").text("hide < 100ms"),t.find(".panel-danger > .panel-collapse").collapse("hide").removeClass("show-fast-items"),t.find(".duration-ok").show()}),$("body").on("click",".toggle-fast-items",function(){var t;return t=$(this).closest(".panel-group"),"hide < 100ms"===$(this).text()?(t.find(".duration-ok").hide(),$(this).text("show < 100ms")):(t.find(".duration-ok").show(),$(this).text("hide < 100ms"))}),$("body").on("click",".show-fast-items",function(t){var e;return $(this).removeClass("show-fast-items"),(e=$(this).closest(".panel-group")).find(".duration-ok").show(),e.find(".show-fast-items").removeClass("show-fast-items"),e.find(".panel-collapse").collapse("show"),t.stopPropagation()})}),$.extend(decko,{toggleShade:function(t){return t.find(".shade-content").slideToggle(1e3),t.find(".glyphicon").toggleClass("glyphicon-triangle-right glpyphicon-triangle-bottom")}}),$.extend(decko,{initializeEditors:function(n,t){return null==t&&(t=decko.editorInitFunctionMap),$.each(t,function(t,e){return $.each(n.find(t),function(){return e.call($(this))})})},editorContentFunctionMap:{},editorInitFunctionMap:{textarea:function(){return $(this).autosize()},".file-upload":function(){return decko.upload_file(this)},".etherpad-textarea":function(){return $(this).closest("form").find(".edit-submit-button").attr("class","etherpad-submit-button")}},addEditor:function(t,e,n){return decko.editorContentFunctionMap[t]=n,decko.editorInitFunctionMap[t]=e}}),jQuery.fn.extend({setContentFieldsFromMap:function(t){var n;return null==t&&(t=decko.editorContentFunctionMap),n=$(this),$.each(t,function(t,e){return n.setContentFields(t,e)})},setContentFields:function(t,e){return $.each(this.find(t),function(){return $(this).setContentField(e)})},setContentField:function(t){var e,n,i;if(n=(e=this.closest(".card-editor").find(".d0-card-content")).val(),i=t.call(this),e.val(i),n!==i)return e.change()}}),$(window).ready(function(){return setTimeout(function(){return decko.initializeEditors($("body > :not(.modal)"))},10),$("body").on("submit",".card-form",function(){return $(this).setContentFieldsFromMap(),$(this).find(".d0-card-content").attr("no-autosave","true"),!0})}),setInterval(function(){return $(".card-form").setContentFieldsFromMap()},2e4),s=null,$(window).ready(function(){return $("body").on("click",".renamer-updater",function(){return $(this).closest("form").find("#card_update_referers").val("true")}),$("body").on("submit",".edit_name-view .card-form, .name_form-view .card-form",function(){var t;if((t=$(this).find(".alert")).is(":hidden"))return 0<$(this).find("#referers").val()&&$(this).find(".renamer-updater").show(),t.show("blind"),!1}),$("body").on("keyup",".name-editor input",function(t){var e;return s&&clearTimeout(s),e=$(this),13===t.which?(a(e),s=null):s=setTimeout(function(){return a(e),s=null},400)})}),a=function(l){var d;return d=l.val(),decko.pingName(d,function(t){var e,n,i,o,r,a,s;return l.val()!==d?null:(s=t.status)?(e=l.parent(),(o=(i=l.closest("fieldset").find("legend")).find(".name-messages"))[0]||(o=$(''),i.append(null!=o)),e.removeClass("real-name virtual-name known-name"),a=l.slot().data("cardId"),"unknown"===s||a&&parseInt(a)===t.id?o.html(""):(e.addClass(s+"-name known-name"),r="virtual"===s?"in virtual":"already in",n=decko.path(t.url_key),o.html("\""+d+'" '+r+" use"))):void 0})},jQuery.fn.extend({autosave:function(){var t,e,n,i,o;if(i=this.slot(),!this.attr("no-autosave")){if((n=this.closest(".form-group"))[0]){if(!(e=n.data("cardId")))return;": "+n.data("cardName")}else e=i.data("cardId"),"";if(e)return o=decko.path("update/~"+e),t=$("#edit_card_"+e).serializeArray().reduce(function(t,e){return t[e.name]=e.value,t},{draft:"true","success[view]":"blank"}),$.ajax(o,{data:t,type:"POST"})}}}),$(window).ready(function(){return $("body").on("change",".autosave .d0-card-content",function(){var t;return t=$(this),setTimeout(function(){return t.autosave()},500)})}),c={off:!1,on:!0,signed_in:decko.currentUserId},d=function(){return c[decko.doubleClick]},u=function(e){return![".nodblclick",".d0-card-header",".card-editor"].some(function(t){return e.closest(t)[0]})&&null==e.slot().find(".card-editor")[0]},j=function(t){var e,n,i,o;return i=t.slot(),(e=decko.slotEditLink(i))?e.click():(n=decko.slotEditView(i),o=decko.path("~"+i.data("cardId")+"?view="+n),i.reloadSlot(o))},$(window).ready(function(){if(d())return $("body").on("dblclick","div",function(){return u($(this))&&j($(this)),!1})}),V=function(){var t;if(t=$("body > footer").first(),$("body > article, body > aside").wrapAll("
"),$("body > div > article, body > div > aside").wrapAll('
'),t)return $("body").append(t)},B=function(t,e){return"
"+t+"
"},e=function(){return $("body").hasClass("fluid")?"container-fluid":"container"},M=function(t){return""},P=function(t){return"both"===t?B(M("left")+M("right"),"flex-row justify-content-between"):"left"===t?B(M("left"),"flex-row"):B(M("right"),"flex-row-reverse")},R=function(t){var e,n;return e=$("body > article").first(),n=$("body > aside").first(),e.addClass("col-xs-12 col-sm-9"),n.addClass("col-xs-6 col-sm-3 sidebar-offcanvas sidebar-offcanvas-"+t),"left"===t?$("body").append(n).append(e):$("body").append(e).append(n),V(),e.prepend(P(t))},f=function(){var t,e,n,i,o;return t=$("body > article").first(),e=$("body > aside").first(),n=$($("body > aside")[1]),t.addClass("col-xs-12 col-sm-6"),i="col-xs-6 col-sm-3 sidebar-offcanvas",e.addClass(i+" sidebar-offcanvas-left"),n.addClass(i+" sidebar-offcanvas-right"),$("body").append(e).append(t).append(n),V(),o=P("both"),t.prepend(o)},$.fn.extend({toggleText:function(t,e){return this.text(this.text()===e?t:e),this}}),$(window).ready(function(){switch(!1){case!$("body").hasClass("right-sidebar"):R("right");break;case!$("body").hasClass("left-sidebar"):R("left");break;case!$("body").hasClass("two-sidebar"):f()}return $('[data-toggle="offcanvas-left"]').click(function(){return $(".row-offcanvas").removeClass("right-active").toggleClass("left-active"),$(this).find("i.material-icons").toggleText("chevron_left","chevron_right")}),$('[data-toggle="offcanvas-right"]').click(function(){return $(".row-offcanvas").removeClass("left-active").toggleClass("right-active"),$(this).find("i.material-icons").toggleText("chevron_left","chevron_right")})}),$(window).ready(function(){var t;return(t=$("._navbox")).select2({placeholder:t.attr("placeholder"),escapeMarkup:function(t){return t},minimumInputLength:1,maximumSelectionSize:1,ajax:{delay:200,url:decko.path(":search.json"),data:function(t){return{query:{keyword:t.term},view:"complete"}},processResults:function(t){return{results:b(t)}},cache:!0},templateResult:p,templateSelection:m,multiple:!0,containerCssClass:"select2-navbox-autocomplete",dropdownCssClass:"select2-navbox-dropdown",width:"100%!important"}),t.on("select2:select",function(t){return g(t)})}),p=function(t){return t.loading?t.text:''+t.icon+''+t.prefix+': '+t.label+""},m=function(t){return t.icon?''+t.icon+''+t.label+"":t.text},b=function(i){var o,t;return o=[],t=i.term,i.search&&o.push(v({prefix:"search",id:t,text:t})),$.each(["add","new"],function(t,e){var n;if(n=i[e])return o.push(v({prefix:e,icon:"add",text:n[0],href:n[1]}))}),$.each(i["goto"],function(t,e){var n;return n=v({prefix:"go to",id:t,icon:"arrow_forward",text:e[0],href:e[1],label:e[2]}),o.push(n)}),o},v=function(t){return t.id||(t.id=t.prefix),t.icon||(t.icon=t.prefix),t.label||(t.label=''+t.text+""),t},g=function(t){var e;return(e=t.params.data).href?window.location=decko.path(e.href):$(t.target).closest("form").submit(),$(t.target).attr("disabled","disabled")},$.extend(decko,{upload_file:function(t){var e;return $(t).on("fileuploadsubmit",function(t,e){var n,i,o;return i=(n=$(this)).siblings(".attachment_card_name:first").attr("name"),o=n.siblings("#attachment_type_id").val(),e.formData={"card[type_id]":o,attachment_upload:i}}),e=-1<$(t).closest("form").attr("action").indexOf("update")?"card/update/"+$(t).siblings("#file_card_name").val():"card/create",$(t).fileupload({url:decko.path(e),dataType:"html",done:decko.doneFile,add:decko.chooseFile,progressall:decko.progressallFile})},chooseFile:function(t,e){var n;return e.form.find("button[type=submit]").attr("disabled",!0),n=$(this).closest(".card-editor"),$("#progress").show(),n.append(''),n.append(''),e.submit(),n.find(".choose-file").hide(),n.find(".extra_upload_param").remove()},progressallFile:function(t,e){var n;return n=parseInt(e.loaded/e.total*100,10),$("#progress .progress-bar").css("width",n+"%")},doneFile:function(t,e){return $(this).closest(".card-editor").find(".chosen-file").replaceWith(e.result),e.form.find("button[type=submit]").attr("disabled",!1)}}),$(window).ready(function(){return $("body").on("click",".cancel-upload",function(){var t;return(t=$(this).closest(".card-editor")).find(".choose-file").show(),t.find(".chosen-file").empty(),t.find(".progress").show(),t.find("#progress .progress-bar").css("width","0%"),t.find("#progress").hide()})}),$.extend(decko,{slotPath:function(t,e){var n;return n=decko.slotData(e),decko.path(t)+(t.match(/\?/)?"&":"?")+$.param(n)},slotData:function(t){var e,n,i;return i={},null!=(e=$("#main").children(".card-slot").data("cardName"))&&(i.main=e),t&&(t.isMain()&&(i.is_main=!0),null!=(n=t.data("slot"))&&(decko.slotParams(n,i,"slot"),n.type&&(i.type=n.type))),i},slotEditView:function(t){switch(decko.slotData(t)["slot[edit]"]){case"inline":return"edit_inline";case"full":return"bridge";default:return"edit"}},slotEditLink:function(n){var t;return!!(t=n.find(".edit-link").filter(function(t,e){return $(e).slot().data("slotId")===n.data("slotId")}))[0]&&$(t[0])},slotParams:function(t,i,o){return $.each(t,function(t,e){var n;return n=o+"["+I(t)+"]","items"===t?decko.slotParams(e,i,n):i[n]=e})},contentLoaded:function(t,e){var n;return decko.initializeEditors(t),null!=(n=e.attr("notify-success"))&&t.notify(n,"success"),t.triggerSlotReady(e)},slotReady:function(n){return $("document").ready(function(){return $("body").on("slotReady",".card-slot",function(t,e){return t.stopPropagation(),null!=e?n.call(this,$(this),$(e)):n.call(this,$(this))})})},slotDestroy:function(e){return $("document").ready(function(){return $("body").on("slotDestroy",".card-slot, ._modal-slot",function(t){return t.stopPropagation(),e.call(this,$(this))})})}}),jQuery.fn.extend({slot:function(t,e){return null==t&&(t="success"),null==e&&(e="replace"),"modal"===e?this.modalSlot():this.selectSlot("slot-"+t+"-selector")||this.selectSlot("slot-selector")||this.closest(".card-slot")},selectSlot:function(t){var e,n;if(e=this.data(t))return(n=this.findSlot(e))&&n[0]&&n},isSlot:function(){return $(this).hasClass("card-slot")},isMain:function(){return this.slot().parent("#main")[0]},isMainOrMainModal:function(){var t;return(t=$(this)).closest(".modal")[0]&&(t=t.findOriginSlot("modal")),t.isMain()},findSlot:function(t){var e,n;if("modal-origin"===t)return this.findOriginSlot("modal");if("overlay-origin"===t)return this.findOriginSlot("overlay");for(n=this.closest(t),e=this.closest(".card-slot");0===n.length&&0 .card-slot").registerAsOrigin("modal",t),t.modal("show")},n=function(t,e){var n,i;if(i=t.find(".modal-dialog"),null!=(n=null!=e?e.data("modal-class"):t.data("modal-class"))&&null!=i)return i.addClass(n)},jQuery.fn.extend({showAsModal:function(t){var e;return null!=t&&(e=this.modalify(t)),$("body > ._modal-slot").is(":visible")?this.addModal(e,t):($("body > ._modal-slot")[0]?($("._modal-slot").trigger("slotDestroy"),$("body > ._modal-slot").replaceWith(e)):$("body").append(e),t.registerAsOrigin("modal",e),e.modal("show",t))},addModal:function(t,e){var n;return"modal-replace"===e.data("slotter-mode")?(n=t.find(".modal-dialog"),t.adoptModalOrigin(),$("._modal-slot").trigger("slotDestroy"),$("body > ._modal-slot > .modal-dialog").replaceWith(n),decko.contentLoaded(n,e)):(decko.pushModal(t),e.registerAsOrigin("modal",t),t.modal("show",e))},adoptModalOrigin:function(){var t;return t=$("body > ._modal-slot .card-slot[data-modal-origin-slot-id]").data("modal-origin-slot-id"),this.find(".modal-body .card-slot").attr("data-modal-origin-slot-id",t)},modalOriginSlot:function(){},modalSlot:function(){var t;return 0<(t=$("#modal-container")).length?t:decko.createModalSlot()},modalify:function(t){var e;return null!=t.data("modal-body")&&this.find(".modal-body").append(t.data("modal-body")),this.hasClass("_modal-slot")?this:((e=$("
",{id:"modal-container","class":"modal fade _modal-slot"})).append($("
",{"class":"modal-dialog"}).append($("
",{"class":"modal-content"}).append(this))),e)}}),$.extend(decko,{createModalSlot:function(){var t;return t=$("
",{id:"modal-container","class":"modal fade _modal-slot"}),$("body").append(t),t},removeModal:function(){return $("._modal-stack")[0]?decko.popModal():($("._modal-slot").trigger("slotDestroy"),$(".modal-dialog").empty())},pushModal:function(t){var e;return(e=$("body > ._modal-slot")).removeAttr("id"),e.removeClass("_modal-slot").addClass("_modal-stack").removeClass("modal").addClass("background-modal"),t.insertBefore(e),$(".modal-backdrop").removeClass("show")},popModal:function(){return $(".modal-backdrop").addClass("show"),$("body > ._modal-slot").trigger("slotDestroy"),$("body > ._modal-slot").remove(),$($("._modal-stack")[0]).addClass("_modal-slot").removeClass("_modal-stack").attr("id","modal-container").addClass("modal").removeClass("background-modal"),$(document.body).addClass("modal-open")}}),jQuery.fn.extend({overlaySlot:function(){var t;return null!=(t=this.closest(".card-slot._overlay"))[0]?t:null!=(t=this.closest(".overlay-container").find("._overlay"))[0]&&$(t[0])},addOverlay:function(t,e){return this.parent().hasClass("overlay-container")?$(t).hasClass("_stack-overlay")?this.before(t):($("._overlay-origin").removeClass("_overlay-origin"),this.replaceOverlay(t)):(this.parent().hasClass("_overlay-container-placeholder")?this.parent().addClass("overlay-container"):this.wrapAll('
'),this.addClass("_bottomlay-slot"),this.before(t)),e.registerAsOrigin("overlay",t),decko.contentLoaded(t,e)},replaceOverlay:function(t){return this.overlaySlot().trigger("slotDestroy"),this.overlaySlot().replaceWith(t),$(".bridge-sidebar .tab-pane:not(.active) .bridge-pills > .nav-item > .nav-link.active").removeClass("active")},isInOverlay:function(){return this.closest(".card-slot._overlay").length},removeOverlay:function(){var t;if(t=this.overlaySlot())return t.removeOverlaySlot()},removeOverlaySlot:function(){var t;return this.trigger("slotDestroy"),1===this.siblings().length&&(t=$(this.siblings()[0])).hasClass("_bottomlay-slot")&&(t.parent().hasClass("_overlay-container-placeholder")?t.parent().removeClass("overlay-container"):t.unwrap(),t.removeClass("_bottomlay-slot").updateBridge(!0,t)),this.remove()}}),jQuery.fn.extend({updateRecaptchaToken:function(e){var n,i;return null==(i=this.find("input._recaptcha-token"))[0]?i.val("recaptcha-token-field-missing"):"undefined"==typeof grecaptcha||null===grecaptcha?i.val("grecaptcha-undefined"):(n=$(this),e&&e.stopPropagation(),grecaptcha.execute(i.data("site-key"),{action:i.data("action")}).then(function(t){if(i.val(t),i.addClass("_token-updated"),e)return n.submit()}),!1)}}),$(window).ready(function(){return $("body").on("ajax:success",".slotter",function(t,e){return $(this).slotterSuccess(t,e)}),$("body").on("ajax:error",".slotter",function(t,e){return $(this).showErrorResponse(e.status,e.responseText)}),$("body").on("click","button.slotter",function(){return!!$.rails.allowAction($(this))&&$.rails.handleRemote($(this))}),$("body").on("click","._clickable.slotter",function(){return $(this)[0].href=$(this).attr("href"),$.rails.handleRemote($(this))}),$("body").on("click",'[data-dismiss="overlay"]',function(){return $(this).findSlot(".card-slot._overlay").removeOverlay()}),$("body").on("click","._close-overlay-on-success",function(){return $(this).closeOnSuccess("overlay")}),$("body").on("click","._close-modal-on-success",function(){return $(this).closeOnSuccess("modal")}),$("body").on("click","._close-on-success",function(){return $(this).closeOnSuccess()}),$("body").on("click","._update-origin",function(){return $(this).closest(".slotter").data("slotter-mode","update-origin")}),$("body").on("submit","form.slotter",function(t){var e;if((e=$(this)).data("main-success")&&e.isMainOrMainModal()&&e.mainSuccess(),"on"===e.data("recaptcha"))return e.handleRecaptchaBeforeSubmit(t)}),$("body").on("ajax:beforeSend",".slotter",function(t,e,n){return $(this).slotterBeforeSend(n)})}),jQuery.fn.extend({mainSuccess:function(){var o;return o=$(this),$.each(o.data("main-success"),function(t,e){var n,i;return i="[name=success\\["+t+"\\]]",(n=o.find(i))[0]||(n=$(''),o.append(n)),n.val(e)})},slotterSuccess:function(t,e){var n,i,o,r;if(this.hasClass("slotter")){if(!t.slotSuccessful)return this.data("reload")&&window.location.reload(!0),this.data("update-modal-origin")&&this.updateModalOrigin(),this.data("update-origin")&&this.updateOrigin(),this.data("original-slotter-mode")&&this.attr("data-slotter-mode",this.data("original-slotter-mode")),i=this.data("slotter-mode"),this.showSuccessResponse(e,i),this.hasClass("_close-overlay")&&this.removeOverlay(),this.hasClass("_close-modal")&&this.closest(".modal").modal("hide"),this.hasClass("card-paging-link")&&(r=this.slot().offset().top,$("body").scrollTop(r)),this.data("update-foreign-slot")&&(n=this.findSlot(this.data("update-foreign-slot")),o=this.data("update-foreign-slot-url"),n.reloadSlot(o)),t.slotSuccessful=!0}else console.log("warning: slotterSuccess called on non-slotter element "+this)},showSuccessResponse:function(t,e){if("silent-success"!==e)return"update-modal-origin"===e?this.updateModalOrigin():"update-origin"===e?this.updateOrigin():t.redirect?window.location=t.redirect:t.reload?window.location.reload(!0):this.updateSlot(t,e)},showErrorResponse:function(t,e){return 403===t?$(e).showAsModal($(this)):900===t?$(e).showAsModal($(this)):(this.notify(e,"error"),409===t?this.slot().find(".current_revision_id").val(this.slot().find(".new-current-revision-id").text()):void 0)},updateModalOrigin:function(){return this.overlaySlot()?this.findOriginSlot("overlay").updateOrigin():this.closest("#modal-container")[0]?this.updateOrigin():void 0},updateOrigin:function(){var t,e;if(null!=(e=this.overlaySlot()?"overlay":this.closest("#modal-container")[0]?"modal":void 0))return(t=this.findOriginSlot(e))&&null!=t[0]?t.reloadSlot():void 0},registerAsOrigin:function(t,e){return e.hasClass("_modal-slot")&&(e=e.find(".modal-body .card-slot")),e.attr("data-"+t+"-origin-slot-id",this.closest(".card-slot").data("slot-id"))},updateSlot:function(t,e){return e||(e="replace"),this.setSlotContent(t,e,$(this))},closeOnSuccess:function(t){var e;return e=this.closest(".slotter"),null==t&&(t=this.isInOverlay()?"overlay":"modal"),e.addClass("_close-"+t)},slotterBeforeSend:function(t){var e;if(!t.skip_before_send)return t.url.match(/home_view/)||"modal"===this.data("slotter-mode")||(t.url=decko.slotPath(t.url,this.slot())),this.is("form")&&(e=this.data("file-data"))?(this.uploadWithBlueimp(e,t),!1):void 0},uploadWithBlueimp:function(t,e){var n,i,o,r;return(o=this.find(".file-upload"))[1]?(this.notify("Decko does not yet support multiple files in a single form.","error"),!1):((r=o.data("blueimpFileupload"))._isXHRUpload(r.options)||(this.find("[name=success]").val("_self"),e.url+="&simulate_xhr=true",i=function(t){return t.find("body").html()},e.dataFilter=i),(n=$.extend(e,r._getAJAXSettings(t),{url:e.url})).skip_before_send=!0,$.ajax(n))},handleRecaptchaBeforeSubmit:function(t){var e;return null==(e=this.find("input._recaptcha-token"))[0]?e.val("recaptcha-token-field-missing"):e.hasClass("_token-updated")?e.removeClass("_token-updated"):"undefined"==typeof grecaptcha||null===grecaptcha?e.val("grecaptcha-undefined"):this.updateRecaptchaToken(t)}}),decko.slotReady(function(t,e){var n;if(t.updateBridge(!1,e),1===(n=t.find("ul._auto-single-select > li.nav-item > a.nav-link")).length)return $(n[0]).click()}),jQuery.fn.extend({updateBridge:function(t,e){if(null==t&&(t=!1),0 .nav-item > .nav-link.active").removeClass("active"):void 0},updateBreadcrumb:function(){var t;return(t=$(".modal-header ._bridge-breadcrumb li:last-child")).text(this.data("breadcrumb")),t.attr("class","breadcrumb-item active "+this.data("breadcrumb-class"))}}),$(window).ready(function(){return $("body").on("select2:select","._close-rule-overlay-on-select",function(){return $(".overlay-container > ._overlay.card-slot.overlay_rule-view.RULE").removeOverlay()}),$("body").on("click","._update-history-pills",function(){return $(this).closest(".slotter").data("update-foreign-slot",".card-slot.history_tab-view")})}),$(document).ready(function(){return $("body").on("click","button._nest-apply",function(){return null!=$(this).data("index")?nest.applyNestToNestListEditor($(this).data("index")):nest.applyNestToTinymceEditor($(this).data("tinymce-id"),$(this).data("tm-snippet-start"),$(this).data("tm-snippet-size"))}),$("body").on("click","button._change-create-to-update",function(){var t;return t=$(this).closest("form").find("#success_tinymce_id").val(),nest.changeCreateToUpdate(t)}),$("body").on("click","button._open-nest-editor",function(){var t,e,n,i;return i=(e=$(this).closest("._nest-form")).find("._reference").val(),n=e.find("._nest-options").val(),t=encodeURIComponent("{{"+i+"|"+n+"}}"),nest.openNestEditorForSlot($(this).closest(".card-slot"),$(this).closest(".slotter"),"index="+e.data("index")+"&tm_snippet_raw="+t)})}),window.nest||(window.nest={}),$.extend(nest,{openNestEditor:function(t,e){return null==e&&(e=nest.editParams(t)),this.openEditorForTm(t,e,"nest_editor","modal_nest_editor")},openNestEditorForSlot:function(t,e,n){var i;return i=t[0]?$(t[0]).attr("data-card-name"):":update",nest.request(i,"nest_editor","modal_nest_editor",e,n)},openEditorForTm:function(t,e,n,i){var o,r,a;return e+="&tinymce_id="+t.id,r=$("#"+t.id).closest(".card-slot"),a=$("#"+t.id),o=r[0]?$(r[0]).attr("data-card-name"):":update",nest.request(o,n,i,a,e)},openImageEditor:function(t){var e;return null==e&&(e=nest.editParams(t,"{{","}}",!1)),this.openEditorForTm(t,e,"nest_image","modal_nest_image")},changeCreateToUpdate:function(t){var e,n;return n=(e=$("#"+t).closest("form")).attr("action").replace("card/create","card/update"),e.attr("action",n)},insertNest:function(t,e){return t.insertContent(e)},request:function(t,e,n,i,o){var r,a,s;return(a=$(".bridge-sidebar > ._overlay-container-placeholder > .card-slot"))[0]?(s=e,r="overlay"):(a=$($(".card-slot")[0]),s=n,r="modal"),nest.sendRequest(i,a,r,t,s,o)},sendRequest:function(e,n,i,t,o,r){var a;return null==r&&(r=""),a="/"+t+"?view="+o+"&"+r,$.ajax({url:a,type:"GET",success:function(t){return n.setSlotContent(t,i,e)}})},editParams:function(t,e,n,i){var o,r,a,s,l,d,c,u,f;return null==e&&(e="{{"),null==n&&(n="}}"),null==i&&(i=!0),null==(u=t.selection.getSel())||null==u.anchorNode?nest.paramsStr(0):(f=u.anchorNode.data)?(c=u.anchorOffset,r=f.substr(0,c),o=f.substr(c),(a={before:{close:r.lastIndexOf(n),open:r.lastIndexOf(e)},after:{close:o.indexOf(n),open:o.indexOf(e)}}).before.open>a.before.close&&-1!==a.after.close&&(-1===a.after.open||a.after.close"+i.substr(9)+"
")),nest.showTemplate(e.find("._options-select._template")),n.find("._configure-items-button").text(i.replace("items","subitems")),e.after(n),nest.updatePreview()},options:function(){var t,e,n,i,o;for(i=[],e=0,n=(o=$("._options-select:not(._template")).length;e .card-slot")},contentTabSlot:function(){return $("._nest-editor .tab-pane-content > .card-slot")},emptyNameAlert:function(t){return t?$("._empty-nest-name-alert").removeClass("d-none"):$("._empty-nest-name-alert:not(.d-none)").addClass("d-none")},updateNameRelatedTabs:function(){return nest.updateRulesTab(),nest.updateContentTab()},updateContentTab:function(){var t,e;if(0<(t=nest.contentTabSlot()).length)return e=decko.path(nest.fullName()+"?view=nest_content"),nest.updateNameDependentSlot(t,e)},updateRulesTab:function(){var t,e;return t=nest.rulesTabSlot(),e=decko.path(nest.setNameForRules()+"?view=nest_rules"),nest.updateNameDependentSlot(t,e)},updateNameDependentSlot:function(t,e){var n;return null!=(n=$("input._nest-name").val())&&0
'),(n=o.find(".card-form"))[0]?$(n[0]).append(i):o.append(i)),i.html(t),i.show("blind")},report:function(t){var e;return!!(e=this.slot().find(".card-report"))[0]&&(e.hide(),e.html(t),e.show("drop",750),setTimeout(function(){return e.hide("drop",750)},3e3))}}),$(window).ready(function(){return $.ajaxSetup({cache:!1}),$("body").on("click",".submitter",function(){return $(this).closest("form").submit()}),$("body").on("click","button.redirecter",function(){return window.location=$(this).attr("href")}),$("body").on("change",".live-type-field",function(){var t;return t=$(this),T(t),t.data("params",$(this).closest("form").serialize()),t.data("url",$(this).attr("href"))}),$("body").on("change",".edit-type-field",function(){return $(this).closest("form").submit()}),$("body").on("mouseenter","[hover_content]",function(){return $(this).attr("hover_restore",$(this).html()),$(this).html($(this).attr("hover_content"))}),$("body").on("mouseleave","[hover_content]",function(){return $(this).html($(this).attr("hover_restore"))}),$("body").on("click",".render-error-link",function(t){return $(this).closest(".render-error").find(".render-error-message").show(),t.preventDefault()})}),decko.slotReady(function(t){return t.find("card-view-placeholder").each(function(){var e;if(!(e=$(this)).data("loading"))return e.data("loading",!0),$.get(e.data("url"),function(t){return e.replaceWith(t)})})}),T=function(t,e){var n;if(null==e&&(e=null),(n=t.closest(".slotter")).length&&n.attr("data-slotter-mode"))return n.attr("data-original-slotter-mode",n.attr("slotter-mode")),n.attr("data-slotter-mode",e)},I=function(t){return t.replace(/([a-z])([A-Z])/g,function(t){return t[0]+"_"+t[1].toLowerCase()})},$(window).ready(function(){return $("body").on("click",".btn-item",function(){return $(this).find("i").html("hourglass_full")}),$("body").on("mouseenter",".btn-item-delete",function(){return $(this).find("i").html("remove"),$(this).addClass("btn-danger").removeClass("btn-primary")}),$("body").on("mouseleave",".btn-item-delete",function(){return $(this).find("i").html("check"),$(this).addClass("btn-primary").removeClass("btn-danger")}),$("body").on("click",".follow-updater",function(){return $(this).closest("form").find("#card_update_all_users").val("true")}),$("body").on("submit",".edit-view.SELF-Xfollow_default .card-form",function(){var t;if((t=$(this).find(".confirm_update_all-view")).is(":hidden"))return $(this).find(".follow-updater").show(),t.show("blind"),!1})}),decko.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)||t()},t=function(t){return t=navigator.userAgent||navigator.vendor||window.opera,/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))},decko.slotReady(function(t){if(decko.isTouchDevice())return t.find("._show-on-hover").removeClass("_show-on-hover")}),$(window).ready(function(){return $("body").on("show.bs.popover","._card-menu-popover",function(){return $(this).closest(".card-menu._show-on-hover").removeClass("_show-on-hover").addClass("_show-on-hover-disabled")}),$("body").on("hide.bs.popover","._card-menu-popover",function(){return $(this).closest(".card-menu._show-on-hover-disabled").removeClass("_show-on-hover-disabled").addClass("_show-on-hover")})}),decko.slotReady(function(t){if(t.find("._disappear").delay(5e3).animate({height:0},1e3,function(){return $(this).hide()}),t.hasClass("_refresh-timer"))return setTimeout(function(){return t.reloadSlot(t.data("refresh-url"))},2e3)}),decko.filter=function(t){var e;return e=$(t).closest("._filter-widget"),this.widget=e.length?e:$(t).closest("._filtered-content").find("._filter-widget"),this.activeContainer=this.widget.find("._filter-container"),this.dropdown=this.widget.find("._add-filter-dropdown"),this.dropdownItems=this.widget.find("._filter-category-select"),this.form=this.widget.find("._filter-form"),this.quickFilter=this.widget.find("._quick-filter"),this.showWithStatus=function(e){var n;return n=this,$.each(this.dropdownItems,function(){var t;if((t=$(this)).data(e))return n.activate(t.data("category"))})},this.reset=function(){return this.dropdownItems.show(),this.restrict(this.form.find("._reset-filter").data("reset"))},this.clear=function(){return this.activeContainer.find(".input-group").remove()},this.activate=function(t,e){return this.activateField(t,e),this.hideOption(t)},this.showOption=function(t){return this.dropdown.show(),this.option(t).show()},this.hideOption=function(t){if(this.option(t).hide(),this.dropdownItems.length<=this.activeFields().length)return this.dropdown.hide()},this.activeFields=function(){return this.activeContainer.find("._filter-input")},this.option=function(t){return this.dropdownItems.filter("[data-category='"+t+"']")},this.findPrototype=function(t){return this.widget.find("._filter-input-field-prototypes ._filter-input-"+t)},this.activateField=function(t,e){var n;return n=this.findPrototype(t).clone(),this.fieldValue(n,e),this.dropdown.before(n),this.initField(n),n.find("input, select").first().focus()},this.fieldValue=function(t,e){return"object"==typeof e?this.compoundFieldValue(t,e):this.simpleFieldValue(t,e)},this.simpleFieldValue=function(t,e){var n;if(n=t.find("input, select"),void 0!==e)return n.val(e)},this.compoundFieldValue=function(t,e){var n,i,o;for(i in o=[],e)n=t.find("#filter_value_"+i),o.push(n.val(e[i]));return o},this.removeField=function(t){return this.activeField(t).remove(),this.showOption(t)},this.initField=function(t){return this.initSelectField(t),decko.initAutoCardPlete(t.find("input"))},this.initSelectField=function(t){return t.find("select").select2({containerCssClass:":all:",width:"auto",dropdownAutoWidth:"true"})},this.activeField=function(t){return this.activeContainer.find("._filter-input-"+t)},this.isActive=function(t){return this.activeField(t).length},this.restrict=function(t){var e;for(e in this.clear(),t)this.activateField(e,t[e]);return this.update()},this.addRestrictions=function(t){var e;for(e in t)this.removeField(e),this.activate(e,t[e]);return this.update()},this.removeRestrictions=function(t){var e;for(e in t)this.removeField(e);return this.update()},this.setInputVal=function(t,e){var n;return(n=t.find("select")).length?this.setSelect2Val(n,e):this.setTextInputVal(t.find("input"),e)},this.setSelect2Val=function(t,e){return t.attr("multiple")&&!Array.isArray(e)&&(e=[e]),t.select2("val",e)},this.setTextInputVal=function(t,e){return t.val(e),this.update()},this.updateLastVals=function(){return this.activeFields().find("input, select").each(function(){return $(this).data("lastVal",$(this).val())})},this.updateUrlBar=function(){if(!this.widget.closest("._noFilterUrlUpdates")[0])return window.history.pushState("filter","filter","?"+this.form.serialize())},this.update=function(){return this.updateLastVals(),this.updateQuickLinks(),this.form.submit(),this.updateUrlBar()},this.updateQuickLinks=function(){var t,o;return(t=(o=this).quickFilter.find("._filter-link")).addClass("active"),t.each(function(){var t,e,n,i;for(t in i=[],n=(e=$(this)).data("filter"))i.push(o.deactivateQuickLink(e,t,n[t]));return i})},this.deactivateQuickLink=function(e,t,n){var i;return i="._filter-input-"+t,$.map([this.form.find(i+" input, "+i+" select").val()],function(t){if(t=[t].flat(),-1<$.inArray(n,t))return e.removeClass("active")})},this.updateIfChanged=function(){if(this.changedSinceLastVal())return this.update()},this.updateIfPresent=function(t){var e;if((e=this.activeField(t).find("input, select").val())&&0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=T(e||this.defaultElement||this)[0],this.element=T(e),this.uuid=s++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=T(),this.hoverable=T(),this.focusable=T(),this.classesElementLookup={},e!==this&&(T.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=T(e.style?e.ownerDocument:e.document||e),this.window=T(this.document[0].defaultView||this.document[0].parentWindow)),this.options=T.widget.extend({},this.options,this._getCreateOptions(),t),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 i=this;this._destroy(),T.each(this.classesElementLookup,function(t,e){i._removeClass(e,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(t,e){var i,s,n,o=t;if(0===arguments.length)return T.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=T.widget.extend({},this.options[t]),n=0;i.length-1>n;n++)s[i[n]]=s[i[n]]||{},s=s[i[n]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=e}return this._setOptions(o),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(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=T(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,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(n){function t(t,e){var i,s;for(s=0;t.length>s;s++)i=r.classesElementLookup[t[s]]||T(),i=n.add?T(T.unique(i.get().concat(n.element.get()))):T(i.not(n.element).get()),r.classesElementLookup[t[s]]=i,o.push(t[s]),e&&n.classes[t[s]]&&o.push(n.classes[t[s]])}var o=[],r=this;return n=T.extend({element:this.element,classes:this.options.classes||{}},n),this._on(n.element,{remove:"_untrackClassesElement"}),n.keys&&t(n.keys.match(/\S+/g)||[],!0),n.extra&&t(n.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(i){var s=this;T.each(s.classesElementLookup,function(t,e){-1!==T.inArray(i.target,e)&&(s.classesElementLookup[t]=T(e.not(i.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(r,a,t){var l,h=this;"boolean"!=typeof r&&(t=a,a=r,r=!1),t?(a=l=T(a),this.bindings=this.bindings.add(a)):(t=a,a=this.element,l=this.widget()),T.each(t,function(t,e){function i(){return r||!0!==h.options.disabled&&!T(this).hasClass("ui-state-disabled")?("string"==typeof e?h[e]:e).apply(h,arguments):void 0}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||T.guid++);var s=t.match(/^([\w:-]*)\s*(.*)$/),n=s[1]+h.eventNamespace,o=s[2];o?l.on(n,o,i):a.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e).off(e),this.bindings=T(this.bindings.not(t).get()),this.focusable=T(this.focusable.not(t).get()),this.hoverable=T(this.hoverable.not(t).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(T(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(T(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(T(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(T(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,n,o=this.options[t];if(i=i||{},(e=T.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],n=e.originalEvent)for(s in n)s in e||(e[s]=n[s]);return this.element.trigger(e,i),!(T.isFunction(o)&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},T.each({show:"fadeIn",hide:"fadeOut"},function(o,r){T.Widget.prototype["_"+o]=function(e,t,i){"string"==typeof t&&(t={effect:t});var s,n=t?!0===t||"number"==typeof t?r:t.effect||r:o;"number"==typeof(t=t||{})&&(t={duration:t}),s=!T.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&T.effects&&T.effects.effect[n]?e[o](t):n!==o&&e[n]?e[n](t.duration,t.easing,i):e.queue(function(t){T(this)[o](),i&&i.call(e[0]),t()})}}),T.widget,function(){function x(t,e,i){return[parseFloat(t[0])*(l.test(t[0])?e/100:1),parseFloat(t[1])*(l.test(t[1])?i/100:1)]}function P(t,e){return parseInt(T.css(t,e),10)||0}function e(t){var e=t[0];return 9===e.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:T.isWindow(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}var n,C=Math.max,z=Math.abs,s=/left|center|right/,o=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,a=/^\w+/,l=/%$/,i=T.fn.position;T.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,e,i=T("
"),s=i.children()[0];return T("body").append(i),t=s.offsetWidth,i.css("overflow","scroll"),t===(e=s.offsetWidth)&&(e=i[0].clientWidth),i.remove(),n=t-e},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),s="scroll"===e||"auto"===e&&t.widthz(e+i)&&(o.horizontal="center"),fz(s+n)&&(o.vertical="middle"),o.important=C(z(e),z(i))>C(z(s),z(n))?"horizontal":"vertical",u.using.call(this,t,o)}),r.offset(T.extend(h,{using:t}))})},T.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,r=t.left-e.collisionPosition.marginLeft,a=n-r,l=r+e.collisionWidth-o-n;e.collisionWidth>o?0o?0i)&&(t.left+=u+p+d):0z(s))&&(t.left+=u+p+d))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,a=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,h=l-a,c=l+e.collisionHeight-r-a,u="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,p="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,d=-2*e.offset[1];h<0?((s=t.top+u+p+d+e.collisionHeight-r-o)<0||z(h)>s)&&(t.top+=u+p+d):0z(i))&&(t.top+=u+p+d))}},flipfit:{left:function(){T.ui.position.flip.left.apply(this,arguments),T.ui.position.fit.left.apply(this,arguments)},top:function(){T.ui.position.flip.top.apply(this,arguments),T.ui.position.fit.top.apply(this,arguments)}}}}(),T.ui.position,T.extend(T.expr[":"],{data:T.expr.createPseudo?T.expr.createPseudo(function(e){return function(t){return!!T.data(t,e)}}):function(t,e,i){return!!T.data(t,i[3])}}),T.fn.extend({disableSelection:(i="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(i+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),T.ui.focusable=function(t,e){var i,s,n,o,r,a=t.nodeName.toLowerCase();return"area"===a?(s=(i=t.parentNode).name,!(!t.href||!s||"map"!==i.nodeName.toLowerCase())&&(0<(n=T("img[usemap='#"+s+"']")).length&&n.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(a)?(o=!t.disabled)&&((r=T(t).closest("fieldset")[0])&&(o=!r.disabled)):o="a"===a&&t.href||e,o&&T(t).is(":visible")&&l(T(t)))},T.extend(T.expr[":"],{focusable:function(t){return T.ui.focusable(t,null!=T.attr(t,"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 t=e.data("ui-form-reset-instances");T.each(t,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 t=this.form.data("ui-form-reset-instances");t.splice(T.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},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=(e=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,function(t){return t.replace(e,"\\$1")}),T.fn.labels=function(){var t,e,i,s,n;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(s=this.eq(0).parents("label"),(i=this.attr("id"))&&(n=(t=this.eq(0).parents().last()).add(t.length?t.siblings():this.siblings()),e="label[for='"+T.ui.escapeSelector(i)+"']",s=s.add(n.find(e).addBack(e))),this.pushStack(s))},T.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,n=this.parents().filter(function(){var t=T(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&n.length?n:T(this[0].ownerDocument||document)},T.extend(T.expr[":"],{tabbable:function(t){var e=T.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&T.ui.focusable(t,i)}}),T.fn.extend({uniqueId:(t=0,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.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var o=!1;T(document).on("mouseup",function(){o=!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(t){return!0===T.data(t.target,e.widgetName+".preventClickEvent")?(T.removeData(t.target,e.widgetName+".preventClickEvent"),t.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(t){if(!o){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,i=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&T(t.target).closest(this.options.cancel).length;return i&&!s&&this._mouseCapture(t)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?t.preventDefault():(!0===T.data(t.target,this.widgetName+".preventClickEvent")&&T.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),o=!0)),!0}},_mouseMove:function(t){if(this._mouseMoved){if(T.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&T.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,o=!1,t.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(t,e,i){var s,n=T.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},T.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(s){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},T.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&T(t).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(t){var e=this.options;return!(this.helper||e.disabled||0").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=T.ui.safeActiveElement(this.document[0]);T(t.target).closest(e).length||T.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),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=0i[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),r.grid&&(n=r.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-r.grid[1]:n+r.grid[1]:n,o=r.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/r.grid[0])*r.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-r.grid[0]:o+r.grid[0]:o),"y"===r.axis&&(l=this.originalPageX),"x"===r.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:a?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:a?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(t,e,i){return i=i||this._uiHash(),T.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),T.Widget.prototype._trigger.call(this,t,e,i)},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,t,i){var s=T.extend({},t,{item:i.element});i.sortables=[],T(i.options.connectToSortable).each(function(){var t=T(this).sortable("instance");t&&!t.options.disabled&&(i.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,s))})},stop:function(e,t,i){var s=T.extend({},t,{item:i.element});i.cancelHelperRemoval=!1,T.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.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(i,s,n){T.each(n.sortables,function(){var t=!1,e=this;e.positionAbs=n.positionAbs,e.helperProportions=n.helperProportions,e.offset.click=n.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,T.each(n.sortables,function(){return this.positionAbs=n.positionAbs, this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,this!==e&&this._intersectsWith(this.containerCache)&&T.contains(e.element[0],this.element[0])&&(t=!1),t})),t?(e.isOver||(e.isOver=1,n._parent=s.helper.parent(),e.currentItem=s.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return s.helper[0]},i.target=e.currentItem[0],e._mouseCapture(i,!0),e._mouseStart(i,!0,!0),e.offset.click.top=n.offset.click.top,e.offset.click.left=n.offset.click.left,e.offset.parent.left-=n.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=n.offset.parent.top-e.offset.parent.top,n._trigger("toSortable",i),n.dropped=e.element,T.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,e.fromOutside=n),e.currentItem&&(e._mouseDrag(i),s.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",i,e._uiHash(e)),e._mouseStop(i,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),s.helper.appendTo(n._parent),n._refreshOffsets(i),s.position=n._generatePosition(i,!0),n._trigger("fromSortable",i),n.dropped=!1,T.each(n.sortables,function(){this.refreshPositions()}))})}}),T.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var s=T("body"),n=i.options;s.css("cursor")&&(n._cursor=s.css("cursor")),s.css("cursor",n.cursor)},stop:function(t,e,i){var s=i.options;s._cursor&&T("body").css("cursor",s._cursor)}}),T.ui.plugin.add("draggable","opacity",{start:function(t,e,i){var s=T(e.helper),n=i.options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(t,e,i){var s=i.options;s._opacity&&T(e.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(t,e,i){var s=i.options,n=!1,o=i.scrollParentNotHidden[0],r=i.document[0];o!==r&&"HTML"!==o.tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+o.offsetHeight-t.pageY=Math.abs(h-v),n=f>=Math.abs(c-_),o=f>=Math.abs(a-g),r=f>=Math.abs(l-m),s&&(e.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:a-i.helperProportions.width}).left),r&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l}).left)),p=s||n||o||r,"outer"!==d.snapMode&&(s=f>=Math.abs(h-_),n=f>=Math.abs(c-v),o=f>=Math.abs(a-m),r=f>=Math.abs(l-g),s&&(e.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:a}).left),r&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left)),!i.snapElements[u].snapping&&(s||n||o||r||p)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,T.extend(i._uiHash(),{snapItem:i.snapElements[u].item})),i.snapElements[u].snapping=s||n||o||r||p)}}),T.ui.plugin.add("draggable","stack",{start:function(t,e,i){var s,n=i.options,o=T.makeArray(T(n.stack)).sort(function(t,e){return(parseInt(T(t).css("zIndex"),10)||0)-(parseInt(T(e).css("zIndex"),10)||0)});o.length&&(s=parseInt(T(o[0]).css("zIndex"),10)||0,T(o).each(function(t){T(this).css("zIndex",s+t)}),this.css("zIndex",s+o.length))}}),T.ui.plugin.add("draggable","zIndex",{start:function(t,e,i){var s=T(e.helper),n=i.options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(t,e,i){var s=i.options;s._zIndex&&T(e.helper).css("zIndex",s._zIndex)}}),T.ui.draggable,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,t=this.options,i=t.accept;this.isover=!1,this.isout=!0,this.accept=T.isFunction(i)?i:function(t){return t.is(i)},this.proportions=function(t){return arguments.length?void(e=t):e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight})},this._addToManager(t.scope),t.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){T.ui.ddmanager.droppables[t]=T.ui.ddmanager.droppables[t]||[],T.ui.ddmanager.droppables[t].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var t=T.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,e){if("accept"===t)this.accept=T.isFunction(e)?e:function(t){return t.is(e)};else if("scope"===t){var i=T.ui.ddmanager.droppables[this.options.scope];this._splice(i),this._addToManager(e)}this._super(t,e)},_activate:function(t){var e=T.ui.ddmanager.current;this._addActiveClass(),e&&this._trigger("activate",t,this.ui(e))},_deactivate:function(t){var e=T.ui.ddmanager.current;this._removeActiveClass(),e&&this._trigger("deactivate",t,this.ui(e))},_over:function(t){var e=T.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(e)))},_out:function(t){var e=T.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(e)))},_drop:function(e,t){var i=t||T.ui.ddmanager.current,s=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=T(this).droppable("instance");return t.options.greedy&&!t.options.disabled&&t.options.scope===i.options.scope&&t.accept.call(t.element[0],i.currentItem||i.element)&&h(i,T.extend(t,{offset:t.element.offset()}),t.options.tolerance,e)?!(s=!0):void 0}),!s&&(!!this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(i)),this.element)))},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 h=T.ui.intersect=function(){function p(t,e,i){return e<=t&&tl&&c>r-t.helperProportions.width/2&&o+t.helperProportions.height/2>h&&u>a-t.helperProportions.height/2;case"pointer":return p(s.pageY,h,e.proportions().height)&&p(s.pageX,l,e.proportions().width);case"touch":return(h<=o&&o<=u||h<=a&&a<=u||oi;i++)if(!(n[i].options.disabled||t&&!n[i].accept.call(n[i].element[0],t.currentItem||t.element))){for(s=0;r.length>s;s++)if(r[s]===n[i].element[0]){n[i].proportions().height=0;continue t}n[i].visible="none"!==n[i].element.css("display"),n[i].visible&&("mousedown"===o&&n[i]._activate.call(n[i],e),n[i].offset=n[i].element.offset(),n[i].proportions({width:n[i].element[0].offsetWidth,height:n[i].element[0].offsetHeight}))}},drop:function(t,e){var i=!1;return T.each((T.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&h(t,this,this.options.tolerance,e)&&(i=this._drop.call(this,e)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,e)))}),i},dragStart:function(t,e){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||T.ui.ddmanager.prepareOffsets(t,e)})},drag:function(o,r){o.options.refreshPositions&&T.ui.ddmanager.prepareOffsets(o,r),T.each(T.ui.ddmanager.droppables[o.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var t,e,i,s=h(o,this,this.options.tolerance,r),n=!s&&this.isover?"isout":s&&!this.isover?"isover":null;n&&(this.options.greedy&&(e=this.options.scope,(i=this.element.parents(":data(ui-droppable)").filter(function(){return T(this).droppable("instance").options.scope===e})).length&&((t=T(i[0]).droppable("instance")).greedyChild="isover"===n)),t&&"isover"===n&&(t.isover=!1,t.isout=!0,t._out.call(t,r)),this[n]=!0,this["isout"===n?"isover":"isout"]=!1,this["isover"===n?"_over":"_out"].call(this,r),t&&"isout"===n&&(t.isout=!1,t.isover=!0,t._over.call(t,r)))}})},dragStop:function(t,e){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||T.ui.ddmanager.prepareOffsets(t,e)}})!==T.uiBackCompat&&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.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(t,e){if("hidden"===T(t).css("overflow"))return!1;var i=e&&"left"===e?"scrollLeft":"scrollTop",s=!1;return 0
").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,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),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(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&T(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,e=function(t){T(t).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(e(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),e(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var t,e,i,s,n,o=this.options,r=this;if(this.handles=o.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"),i=this.handles.split(","),this.handles={},e=0;i.length>e;e++)s="ui-resizable-"+(t=T.trim(i[e])),n=T("
"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.append(n);this._renderAxis=function(t){var e,i,s,n;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=T(this.handles[e]),this._on(this.handles[e],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=T(this.handles[e],this.element),n=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),s=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(s,n),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},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&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)((i=T(this.handles[e])[0])===t.target||T.contains(i,t.target))&&(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s,n=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),n.containment&&(e+=T(n.containment).scrollLeft()||0,i+=T(n.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof n.aspectRatio?n.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",t),!0},_mouseDrag:function(t){var e,i,s=this.originalMousePosition,n=this.axis,o=t.pageX-s.left||0,r=t.pageY-s.top||0,a=this._change[n];return this._updatePrevProperties(),a&&(e=a.apply(this,[t,o,r]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),T.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n,o,r,a,l=this.options,h=this;return this._helper&&(s=(i=(e=this._proportionallyResizeElements).length&&/textarea/i.test(e[0].nodeName))&&this._hasScroll(e[0],"left")?0:h.sizeDiff.height,n=i?0:h.sizeDiff.width,o={width:h.helper.width()-n,height:h.helper.height()-s},r=parseFloat(h.element.css("left"))+(h.position.left-h.originalPosition.left)||null,a=parseFloat(h.element.css("top"))+(h.position.top-h.originalPosition.top)||null,l.animate||this.element.css(T.extend(o,{top:a,left:r})),h.helper.height(h.size.height),h.helper.width(h.size.width),this._helper&&!l.animate&&this._proportionallyResize()),T("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,r=this.options;o={minWidth:this._isNumber(r.minWidth)?r.minWidth:0,maxWidth:this._isNumber(r.maxWidth)?r.maxWidth:1/0,minHeight:this._isNumber(r.minHeight)?r.minHeight:0,maxHeight:this._isNumber(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidtht.width,r=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=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),r&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=a-e.minWidth),s&&h&&(t.left=a-e.maxWidth),r&&c&&(t.top=l-e.minHeight),n&&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=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||T("
"),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:++e.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;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return T.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return T.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return T.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return T.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){T.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,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"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,r=n?0:i.sizeDiff.width,a={width:i.size.width-r,height:i.size.height-o},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,h=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(T.extend(a,h&&l?{top:h,left:l}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={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:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),T.ui.plugin.add("resizable","containment",{start:function(){var i,s,t,e,n,o,r,a=T(this).resizable("instance"),l=a.options,h=a.element,c=l.containment,u=c instanceof T?c.get(0):/parent/.test(c)?h.parent().get(0):c;u&&(a.containerElement=T(u),/document/.test(c)||c===document?(a.containerOffset={left:0,top:0},a.containerPosition={left:0,top:0},a.parentData={element:T(document),left:0,top:0,width:T(document).width(),height:T(document).height()||document.body.parentNode.scrollHeight}):(i=T(u),s=[],T(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=a._num(i.css("padding"+e))}),a.containerOffset=i.offset(),a.containerPosition=i.position(),a.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=a.containerOffset,e=a.containerSize.height,n=a.containerSize.width,o=a._hasScroll(u,"left")?u.scrollWidth:n,r=a._hasScroll(u)?u.scrollHeight:e,a.parentData={element:u,left:t.left,top:t.top,width:o,height:r}))},resize:function(t){var e,i,s,n,o=T(this).resizable("instance"),r=o.options,a=o.containerOffset,l=o.position,h=o._aspectRatio||t.shiftKey,c={top:0,left:0},u=o.containerElement,p=!0;u[0]!==document&&/static/.test(u.css("position"))&&(c=a),l.left<(o._helper?a.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-a.left:o.position.left-c.left),h&&(o.size.height=o.size.width/o.aspectRatio,p=!1),o.position.left=r.helper?a.left:0),l.top<(o._helper?a.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-a.top:o.position.top),h&&(o.size.width=o.size.height*o.aspectRatio,p=!1),o.position.top=o._helper?a.top:0),s=o.containerElement.get(0)===o.element.parent().get(0),n=/relative|absolute/.test(o.containerElement.css("position")),s&&n?(o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.offset.top=o.element.offset().top),e=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-c.left:o.offset.left-a.left)),i=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-c.top:o.offset.top-a.top)),e+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-e,h&&(o.size.height=o.size.width/o.aspectRatio,p=!1)),i+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-i,h&&(o.size.width=o.size.height*o.aspectRatio,p=!1)),p||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var t=T(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=T(t.helper),r=o.offset(),a=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&T(this).css({left:r.left-s.left-i.left,width:a,height:l}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&T(this).css({left:r.left-s.left-i.left,width:a,height:l})}}),T.ui.plugin.add("resizable","alsoResize",{start:function(){var t=T(this).resizable("instance").options;T(t.alsoResize).each(function(){var t=T(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=T(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,r={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};T(s.alsoResize).each(function(){var t=T(this),s=T(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];T.each(e,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){T(this).removeData("ui-resizable-alsoresize")}}),T.ui.plugin.add("resizable","ghost",{start:function(){var t=T(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==T.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=T(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=T(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),T.ui.plugin.add("resizable","grid",{resize:function(){var t,e=T(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,r=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=a[0]||1,h=a[1]||1,c=Math.round((s.width-n.width)/l)*l,u=Math.round((s.height-n.height)/h)*h,p=n.width+c,d=n.height+u,f=i.maxWidth&&p>i.maxWidth,m=i.maxHeight&&d>i.maxHeight,g=i.minWidth&&i.minWidth>p,_=i.minHeight&&i.minHeight>d;i.grid=a,g&&(p+=l),_&&(d+=h),f&&(p-=l),m&&(d-=h),/^(se|s|e)$/.test(r)?(e.size.width=p,e.size.height=d):/^(ne)$/.test(r)?(e.size.width=p,e.size.height=d,e.position.top=o.top-u):/^(sw)$/.test(r)?(e.size.width=p,e.size.height=d,e.position.left=o.left-c):((d-h<=0||p-l<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(i){var s=this,t=this.options;this.opos=[i.pageX,i.pageY],this.elementPos=T(this.element[0]).offset(),this.options.disabled||(this.selectees=T(t.filter,this.element[0]),this._trigger("start",i),T(t.appendTo).append(this.helper),this.helper.css({left:i.pageX,top:i.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=T.data(this,"selectable-item");t.startselected=!0,i.metaKey||i.ctrlKey||(s._removeClass(t.$element,"ui-selected"),t.selected=!1,s._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,s._trigger("unselecting",i,{unselecting:t.element}))}),T(i.target).parents().addBack().each(function(){var t,e=T.data(this,"selectable-item");return e?(t=!i.metaKey&&!i.ctrlKey||!e.$element.hasClass("ui-selected"),s._removeClass(e.$element,t?"ui-unselecting":"ui-selected")._addClass(e.$element,t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?s._trigger("selecting",i,{selecting:e.element}):s._trigger("unselecting",i,{unselecting:e.element}),!1):void 0}))},_mouseDrag:function(s){if(this.dragged=!0,!this.options.disabled){var t,n=this,o=this.options,r=this.opos[0],a=this.opos[1],l=s.pageX,h=s.pageY;return ll||r>i.right||i.top>h||a>i.bottom):"fit"===o.tolerance&&(e=i.left>r&&l>i.right&&i.top>a&&h>i.bottom),e?(t.selected&&(n._removeClass(t.$element,"ui-selected"),t.selected=!1),t.unselecting&&(n._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1),t.selecting||(n._addClass(t.$element,"ui-selecting"),t.selecting=!0,n._trigger("selecting",s,{selecting:t.element}))):(t.selecting&&((s.metaKey||s.ctrlKey)&&t.startselected?(n._removeClass(t.$element,"ui-selecting"),t.selecting=!1,n._addClass(t.$element,"ui-selected"),t.selected=!0):(n._removeClass(t.$element,"ui-selecting"),t.selecting=!1,t.startselected&&(n._addClass(t.$element,"ui-unselecting"),t.unselecting=!0),n._trigger("unselecting",s,{unselecting:t.element}))),t.selected&&(s.metaKey||s.ctrlKey||t.startselected||(n._removeClass(t.$element,"ui-selected"),t.selected=!1,n._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,n._trigger("unselecting",s,{unselecting:t.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,T(".ui-unselecting",this.element[0]).each(function(){var t=T.data(this,"selectable-item");i._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1,t.startselected=!1,i._trigger("unselected",e,{unselected:t.element})}),T(".ui-selecting",this.element[0]).each(function(){var t=T.data(this,"selectable-item");i._removeClass(t.$element,"ui-selecting")._addClass(t.$element,"ui-selected"),t.selecting=!1,t.selected=!0,t.startselected=!0,i._trigger("selected",e,{selected:t.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),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 e<=t&&t*{ cursor: "+o.cursor+" !important; }").appendTo(n)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return T.ui.ddmanager&&(T.ui.ddmanager.current=this),T.ui.ddmanager&&!o.dropBehaviour&&T.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var e,i,s,n,o=this.options,r=!1;for(this.position=this._generatePosition(t),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-t.pageYt[this.floating?"width":"height"]?d:e+this.helperProportions.width/2>o&&r>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>a&&l>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!!(s&&n)&&(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(0e;e++)if(i[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,i,s,n,o,r,a,l,h=this.items,c=[[T.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):T(this.options.items,this.element),this]],u=this._connectWith();if(u&&this.ready)for(e=u.length-1;0<=e;e--)for(i=(s=T(u[e],this.document[0])).length-1;0<=i;i--)(n=T.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&(c.push([T.isFunction(n.options.items)?n.options.items.call(n.element[0],t,{item:this.currentItem}):T(n.options.items,n.element),n]),this.containers.push(n));for(e=c.length-1;0<=e;e--)for(o=c[e][1],i=0,l=(r=c[e][0]).length;i",i.document[0]);return i._addClass(e,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(e,"ui-sortable-helper"),"tbody"===t?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),T("",i.document[0]).appendTo(e)):"tr"===t?i._createTrPlaceholder(i.currentItem,e):"img"===t&&e.attr("src",i.currentItem.attr("src")),s||e.css("visibility","hidden"),e},update:function(t,e){(!s||n.forcePlaceholderSize)&&(e.height()||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=T(n.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),n.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){T(" ",i.document[0]).attr("colspan",T(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){var e,i,s,n,o,r,a,l,h,c,u=null,p=null;for(e=this.containers.length-1;0<=e;e--)if(!T.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(u&&T.contains(this.containers[e].element[0],u.element[0]))continue;u=this.containers[e],p=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",t,this._uiHash(this)),this.containers[e].containerCache.over=0);if(u)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(s=1e4,n=null,o=(h=u.floating||this._isFloating(this.currentItem))?"left":"top",r=h?"width":"height",c=h?"pageX":"pageY",i=this.items.length-1;0<=i;i--)T.contains(this.containers[p].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(a=this.items[i].item.offset()[o],l=!1,t[c]-a>this.items[i][r]/2&&(l=!0),s>Math.abs(t[c]-a)&&(s=Math.abs(t[c]-a),n=this.items[i],this.direction=l?"up":"down"));if(!n&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));n?this._rearrange(t,n,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var e=this.options,i=T.isFunction(e.helper)?T(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||T("parent"!==e.appendTo?e.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[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")}),(!i[0].style.width||e.forceHelperSize)&&i.width(this.currentItem.width()),(!i[0].style.height||e.forceHelperSize)&&i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),T.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&T.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&T.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};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()}},_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 t,e,i,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)||(t=T(s.containment)[0],e=T(s.containment).offset(),i="hidden"!==T(t).css("overflow"),this.containment=[e.left+(parseInt(T(t).css("borderLeftWidth"),10)||0)+(parseInt(T(t).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(T(t).css("borderTopWidth"),10)||0)+(parseInt(T(t).css("paddingTop"),10)||0)-this.margins.top,e.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(T(t).css("borderLeftWidth"),10)||0)-(parseInt(T(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(T(t).css("borderTopWidth"),10)||0)-(parseInt(T(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&T.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,n=/(html|body)/i.test(s[0].tagName);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():n?0:s.scrollTop())*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():n?0:s.scrollLeft())*i}},_generatePosition:function(t){var e,i,s=this.options,n=t.pageX,o=t.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&T.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(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&&(t.pageX-this.offset.click.leftthis.containment[2]&&(n=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),s.grid&&(e=this.originalPageY+Math.round((o-this.originalPageY)/s.grid[1])*s.grid[1],o=this.containment?e-this.offset.click.top>=this.containment[1]&&e-this.offset.click.top<=this.containment[3]?e:e-this.offset.click.top>=this.containment[1]?e-s.grid[1]:e+s.grid[1]:e,i=this.originalPageX+Math.round((n-this.originalPageX)/s.grid[0])*s.grid[0],n=this.containment?i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-s.grid[0]:i+s.grid[0]:i)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:r.scrollTop()),left:n-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;0<=s;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===T.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||T([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}}),T.widget("ui.menu",{version:"1.12.1",defaultElement:"