|
-if(function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){"use strict";var n=[],i=t.document,o=Object.getPrototypeOf,r=n.slice,s=n.concat,a=n.push,l=n.indexOf,c={},u=c.toString,h=c.hasOwnProperty,d=h.toString,p=d.call(Object),f={};function g(t,e){var n=(e=e||i).createElement("script");n.text=t,e.head.appendChild(n).parentNode.removeChild(n)}var m=function(t,e){return new m.fn.init(t,e)},v=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,y=/^-ms-/,b=/-([a-z])/g,x=function(t,e){return e.toUpperCase()};function w(t){var e=!!t&&"length"in t&&t.length,n=m.type(t);return"function"!==n&&!m.isWindow(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}m.fn=m.prototype={jquery:"3.2.1",constructor:m,length:0,toArray:function(){return r.call(this)},get:function(t){return null==t?r.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=m.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return m.each(this,t)},map:function(t){return this.pushStack(m.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(r.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:n.sort,splice:n.splice},m.extend=m.fn.extend=function(){var t,e,n,i,o,r,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||m.isFunction(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)n=s[e],i=t[e],s!==i&&(c&&i&&(m.isPlainObject(i)||(o=Array.isArray(i)))?(o?(o=!1,r=n&&Array.isArray(n)?n:[]):r=n&&m.isPlainObject(n)?n:{},s[e]=m.extend(c,r,i)):void 0!==i&&(s[e]=i));return s},m.extend({expando:"jQuery"+("3.2.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===m.type(t)},isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){var e=m.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==u.call(t)||(e=o(t))&&(n=h.call(e,"constructor")&&e.constructor,"function"!=typeof n||d.call(n)!==p))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?c[u.call(t)]||"object":typeof t},globalEval:function(t){g(t)},camelCase:function(t){return t.replace(y,"ms-").replace(b,x)},each:function(t,e){var n,i=0;if(w(t))for(n=t.length;i<n&&!1!==e.call(t[i],i,t[i]);i++);else for(i in t)if(!1===e.call(t[i],i,t[i]))break;return t},trim:function(t){return null==t?"":(t+"").replace(v,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(w(Object(t))?m.merge(n,"string"==typeof t?[t]:t):a.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:l.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,o=t.length;i<n;i++)t[o++]=e[i];return t.length=o,t},grep:function(t,e,n){for(var i,o=[],r=0,s=t.length,a=!n;r<s;r++)i=!e(t[r],r),i!==a&&o.push(t[r]);return o},map:function(t,e,n){var i,o,r=0,a=[];if(w(t))for(i=t.length;r<i;r++)o=e(t[r],r,n),null!=o&&a.push(o);else for(r in t)o=e(t[r],r,n),null!=o&&a.push(o);return s.apply([],a)},guid:1,proxy:function(t,e){var n,i,o;if("string"==typeof e&&(n=t[e],e=t,t=n),m.isFunction(t))return i=r.call(arguments,2),o=function(){return t.apply(e||this,i.concat(r.call(arguments)))},o.guid=t.guid=t.guid||m.guid++,o},now:Date.now,support:f}),"function"==typeof Symbol&&(m.fn[Symbol.iterator]=n[Symbol.iterator]),m.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){c["[object "+e+"]"]=e.toLowerCase()});var _=function(t){var e,n,i,o,r,s,a,l,c,u,h,d,p,f,g,m,v,y,b,x="sizzle"+1*new Date,w=t.document,_=0,k=0,C=st(),$=st(),T=st(),S=function(t,e){return t===e&&(h=!0),0},E={}.hasOwnProperty,N=[],D=N.pop,A=N.push,j=N.push,I=N.slice,O=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",q="\\["+P+"*("+R+")(?:"+P+"*([*^$|!~]?=)"+P+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+P+"*\\]",H=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+q+")*)|.*)\\)|)",F=new RegExp(P+"+","g"),B=new RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),z=new RegExp("^"+P+"*,"+P+"*"),M=new RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),W=new RegExp("="+P+"*([^\\]'\"]*?)"+P+"*\\]","g"),U=new RegExp(H),K=new RegExp("^"+R+"$"),Q={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+q),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},V=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,G=/^[^{]+\{\s*\[native \w/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),tt=function(t,e,n){var i="0x"+e-65536;return i!=i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},et=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,nt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},it=function(){d()},ot=yt(function(t){return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{j.apply(N=I.call(w.childNodes),w.childNodes),N[w.childNodes.length].nodeType}catch(t){j={apply:N.length?function(t,e){A.apply(t,I.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}function rt(t,e,i,o){var r,a,c,u,h,f,v,y=e&&e.ownerDocument,_=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==_&&9!==_&&11!==_)return i;if(!o&&((e?e.ownerDocument||e:w)!==p&&d(e),e=e||p,g)){if(11!==_&&(h=X.exec(t)))if(r=h[1]){if(9===_){if(!(c=e.getElementById(r)))return i;if(c.id===r)return i.push(c),i}else if(y&&(c=y.getElementById(r))&&b(e,c)&&c.id===r)return i.push(c),i}else{if(h[2])return j.apply(i,e.getElementsByTagName(t)),i;if((r=h[3])&&n.getElementsByClassName&&e.getElementsByClassName)return j.apply(i,e.getElementsByClassName(r)),i}if(n.qsa&&!T[t+" "]&&(!m||!m.test(t))){if(1!==_)y=e,v=t;else if("object"!==e.nodeName.toLowerCase()){for((u=e.getAttribute("id"))?u=u.replace(et,nt):e.setAttribute("id",u=x),a=(f=s(t)).length;a--;)f[a]="#"+u+" "+vt(f[a]);v=f.join(","),y=J.test(t)&>(e.parentNode)||e}if(v)try{return j.apply(i,y.querySelectorAll(v)),i}catch(t){}finally{u===x&&e.removeAttribute("id")}}}return l(t.replace(B,"$1"),e,i,o)}function st(){var t=[];return function e(n,o){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=o}}function at(t){return t[x]=!0,t}function lt(t){var e=p.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ct(t,e){for(var n=t.split("|"),o=n.length;o--;)i.attrHandle[n[o]]=e}function ut(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ht(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function dt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function pt(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&&ot(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ft(t){return at(function(e){return e=+e,at(function(n,i){for(var o,r=t([],n.length,e),s=r.length;s--;)n[o=r[s]]&&(n[o]=!(i[o]=n[o]))})})}function gt(t){return t&&void 0!==t.getElementsByTagName&&t}n=rt.support={},r=rt.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},d=rt.setDocument=function(t){var e,o,s=t?t.ownerDocument||t:w;return s!==p&&9===s.nodeType&&s.documentElement?(f=(p=s).documentElement,g=!r(p),w!==p&&(o=p.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",it,!1):o.attachEvent&&o.attachEvent("onunload",it)),n.attributes=lt(function(t){return t.className="i",!t.getAttribute("className")}),n.getElementsByTagName=lt(function(t){return t.appendChild(p.createComment("")),!t.getElementsByTagName("*").length}),n.getElementsByClassName=G.test(p.getElementsByClassName),n.getById=lt(function(t){return f.appendChild(t).id=x,!p.getElementsByName||!p.getElementsByName(x).length}),n.getById?(i.filter.ID=function(t){var e=t.replace(Z,tt);return function(t){return t.getAttribute("id")===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var n=e.getElementById(t);return n?[n]:[]}}):(i.filter.ID=function(t){var e=t.replace(Z,tt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var n,i,o,r=e.getElementById(t);if(r){if((n=r.getAttributeNode("id"))&&n.value===t)return[r];for(o=e.getElementsByName(t),i=0;r=o[i++];)if(n=r.getAttributeNode("id"),n&&n.value===t)return[r]}return[]}}),i.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],o=0,r=e.getElementsByTagName(t);if("*"===t){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},i.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&g)return e.getElementsByClassName(t)},v=[],m=[],(n.qsa=G.test(p.querySelectorAll))&&(lt(function(t){f.appendChild(t).innerHTML="<a id='"+x+"'></a><select id='"+x+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+P+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\["+P+"*(?:value|"+L+")"),t.querySelectorAll("[id~="+x+"-]").length||m.push("~="),t.querySelectorAll(":checked").length||m.push(":checked"),t.querySelectorAll("a#"+x+"+*").length||m.push(".#.+[+~]")}),lt(function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=p.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&m.push("name"+P+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),f.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=G.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&<(function(t){n.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),v.push("!=",H)}),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),e=G.test(f.compareDocumentPosition),b=e||G.test(f.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},S=e?function(t,e){if(t===e)return h=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===i?t===p||t.ownerDocument===w&&b(w,t)?-1:e===p||e.ownerDocument===w&&b(w,e)?1:u?O(u,t)-O(u,e):0:4&i?-1:1)}:function(t,e){if(t===e)return h=!0,0;var n,i=0,o=t.parentNode,r=e.parentNode,s=[t],a=[e];if(!o||!r)return t===p?-1:e===p?1:o?-1:r?1:u?O(u,t)-O(u,e):0;if(o===r)return ut(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?ut(s[i],a[i]):s[i]===w?-1:a[i]===w?1:0},p):p},rt.matches=function(t,e){return rt(t,null,null,e)},rt.matchesSelector=function(t,e){if((t.ownerDocument||t)!==p&&d(t),e=e.replace(W,"='$1']"),n.matchesSelector&&g&&!T[e+" "]&&(!v||!v.test(e))&&(!m||!m.test(e)))try{var i=y.call(t,e);if(i||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return rt(e,p,null,[t]).length>0},rt.contains=function(t,e){return(t.ownerDocument||t)!==p&&d(t),b(t,e)},rt.attr=function(t,e){(t.ownerDocument||t)!==p&&d(t);var o=i.attrHandle[e.toLowerCase()],r=o&&E.call(i.attrHandle,e.toLowerCase())?o(t,e,!g):void 0;return void 0!==r?r:n.attributes||!g?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},rt.escape=function(t){return(t+"").replace(et,nt)},rt.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},rt.uniqueSort=function(t){var e,i=[],o=0,r=0;if(h=!n.detectDuplicates,u=!n.sortStable&&t.slice(0),t.sort(S),h){for(;e=t[r++];)e===t[r]&&(o=i.push(r));for(;o--;)t.splice(i[o],1)}return u=null,t},o=rt.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=o(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=o(e);return n},(i=rt.selectors={cacheLength:50,createPseudo:at,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(Z,tt),t[3]=(t[3]||t[4]||t[5]||"").replace(Z,tt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||rt.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&rt.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return Q.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&U.test(n)&&(e=s(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(Z,tt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=C[t+" "];return e||(e=new RegExp("(^|"+P+")"+t+"("+P+"|$)"))&&C(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(i){var o=rt.attr(i,t);return null==o?"!="===e:!e||(o+="","="===e?o===n:"!="===e?o!==n:"^="===e?n&&0===o.indexOf(n):"*="===e?n&&o.indexOf(n)>-1:"$="===e?n&&o.slice(-n.length)===n:"~="===e?(" "+o.replace(F," ")+" ").indexOf(n)>-1:"|="===e&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,i,o){var r="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===o?function(t){return!!t.parentNode}:function(e,n,l){var c,u,h,d,p,f,g=r!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(r){for(;g;){for(d=e;d=d[g];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?m.firstChild:m.lastChild],s&&y){for(b=(p=(c=(u=(h=(d=m)[x]||(d[x]={}))[d.uniqueID]||(h[d.uniqueID]={}))[t]||[])[0]===_&&c[1])&&c[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(b=p=0)||f.pop();)if(1===d.nodeType&&++b&&d===e){u[t]=[_,p,b];break}}else if(y&&(d=e,h=d[x]||(d[x]={}),u=h[d.uniqueID]||(h[d.uniqueID]={}),c=u[t]||[],p=c[0]===_&&c[1],b=p),!1===b)for(;(d=++p&&d&&d[g]||(b=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&(h=d[x]||(d[x]={}),u=h[d.uniqueID]||(h[d.uniqueID]={}),u[t]=[_,b]),d!==e)););return(b-=o)===i||b%i==0&&b/i>=0}}},PSEUDO:function(t,e){var n,o=i.pseudos[t]||i.setFilters[t.toLowerCase()]||rt.error("unsupported pseudo: "+t);return o[x]?o(e):o.length>1?(n=[t,t,"",e],i.setFilters.hasOwnProperty(t.toLowerCase())?at(function(t,n){for(var i,r=o(t,e),s=r.length;s--;)i=O(t,r[s]),t[i]=!(n[i]=r[s])}):function(t){return o(t,0,n)}):o}},pseudos:{not:at(function(t){var e=[],n=[],i=a(t.replace(B,"$1"));return i[x]?at(function(t,e,n,o){for(var r,s=i(t,null,o,[]),a=t.length;a--;)(r=s[a])&&(t[a]=!(e[a]=r))}):function(t,o,r){return e[0]=t,i(e,null,r,n),e[0]=null,!n.pop()}}),has:at(function(t){return function(e){return rt(t,e).length>0}}),contains:at(function(t){return t=t.replace(Z,tt),function(e){return(e.textContent||e.innerText||o(e)).indexOf(t)>-1}}),lang:at(function(t){return K.test(t||"")||rt.error("unsupported lang: "+t),t=t.replace(Z,tt).toLowerCase(),function(e){var n;do{if(n=g?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===f},focus:function(t){return t===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:pt(!1),disabled:pt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!i.pseudos.empty(t)},header:function(t){return Y.test(t.nodeName)},input:function(t){return V.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:ft(function(){return[0]}),last:ft(function(t,e){return[e-1]}),eq:ft(function(t,e,n){return[n<0?n+e:n]}),even:ft(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:ft(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:ft(function(t,e,n){for(var i=n<0?n+e:n;--i>=0;)t.push(i);return t}),gt:ft(function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t})}}).pseudos.nth=i.pseudos.eq;for(e in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[e]=ht(e);for(e in{submit:!0,reset:!0})i.pseudos[e]=dt(e);function mt(){}function vt(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function yt(t,e,n){var i=e.dir,o=e.next,r=o||i,s=n&&"parentNode"===r,a=k++;return e.first?function(e,n,o){for(;e=e[i];)if(1===e.nodeType||s)return t(e,n,o);return!1}:function(e,n,l){var c,u,h,d=[_,a];if(l){for(;e=e[i];)if((1===e.nodeType||s)&&t(e,n,l))return!0}else for(;e=e[i];)if(1===e.nodeType||s)if(h=e[x]||(e[x]={}),u=h[e.uniqueID]||(h[e.uniqueID]={}),o&&o===e.nodeName.toLowerCase())e=e[i]||e;else{if((c=u[r])&&c[0]===_&&c[1]===a)return d[2]=c[2];if(u[r]=d,d[2]=t(e,n,l))return!0}return!1}}function bt(t){return t.length>1?function(e,n,i){for(var o=t.length;o--;)if(!t[o](e,n,i))return!1;return!0}:t[0]}function xt(t,e,n,i,o){for(var r,s=[],a=0,l=t.length,c=null!=e;a<l;a++)(r=t[a])&&(n&&!n(r,i,o)||(s.push(r),c&&e.push(a)));return s}function wt(t,e,n,i,o,r){return i&&!i[x]&&(i=wt(i)),o&&!o[x]&&(o=wt(o,r)),at(function(r,s,a,l){var c,u,h,d=[],p=[],f=s.length,g=r||function(t,e,n){for(var i=0,o=e.length;i<o;i++)rt(t,e[i],n);return n}(e||"*",a.nodeType?[a]:a,[]),m=!t||!r&&e?g:xt(g,d,t,a,l),v=n?o||(r?t:f||i)?[]:s:m;if(n&&n(m,v,a,l),i)for(c=xt(v,p),i(c,[],a,l),u=c.length;u--;)(h=c[u])&&(v[p[u]]=!(m[p[u]]=h));if(r){if(o||t){if(o){for(c=[],u=v.length;u--;)(h=v[u])&&c.push(m[u]=h);o(null,v=[],c,l)}for(u=v.length;u--;)(h=v[u])&&(c=o?O(r,h):d[u])>-1&&(r[c]=!(s[c]=h))}}else v=xt(v===s?v.splice(f,v.length):v),o?o(null,s,v,l):j.apply(s,v)})}function _t(t){for(var e,n,o,r=t.length,s=i.relative[t[0].type],a=s||i.relative[" "],l=s?1:0,u=yt(function(t){return t===e},a,!0),h=yt(function(t){return O(e,t)>-1},a,!0),d=[function(t,n,i){var o=!s&&(i||n!==c)||((e=n).nodeType?u(t,n,i):h(t,n,i));return e=null,o}];l<r;l++)if(n=i.relative[t[l].type])d=[yt(bt(d),n)];else{if((n=i.filter[t[l].type].apply(null,t[l].matches))[x]){for(o=++l;o<r&&!i.relative[t[o].type];o++);return wt(l>1&&bt(d),l>1&&vt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(B,"$1"),n,l<o&&_t(t.slice(l,o)),o<r&&_t(t=t.slice(o)),o<r&&vt(t))}d.push(n)}return bt(d)}return mt.prototype=i.filters=i.pseudos,i.setFilters=new mt,s=rt.tokenize=function(t,e){var n,o,r,s,a,l,c,u=$[t+" "];if(u)return e?0:u.slice(0);for(a=t,l=[],c=i.preFilter;a;){n&&!(o=z.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(r=[])),n=!1,(o=M.exec(a))&&(n=o.shift(),r.push({value:n,type:o[0].replace(B," ")}),a=a.slice(n.length));for(s in i.filter)!(o=Q[s].exec(a))||c[s]&&!(o=c[s](o))||(n=o.shift(),r.push({value:n,type:s,matches:o}),a=a.slice(n.length));if(!n)break}return e?a.length:a?rt.error(t):$(t,l).slice(0)},a=rt.compile=function(t,e){var n,o,r,a,l,u,h=[],f=[],m=T[t+" "];if(!m){for(e||(e=s(t)),n=e.length;n--;)m=_t(e[n]),m[x]?h.push(m):f.push(m);(m=T(t,(o=f,a=(r=h).length>0,l=o.length>0,u=function(t,e,n,s,u){var h,f,m,v=0,y="0",b=t&&[],x=[],w=c,k=t||l&&i.find.TAG("*",u),C=_+=null==w?1:Math.random()||.1,$=k.length;for(u&&(c=e===p||e||u);y!==$&&null!=(h=k[y]);y++){if(l&&h){for(f=0,e||h.ownerDocument===p||(d(h),n=!g);m=o[f++];)if(m(h,e||p,n)){s.push(h);break}u&&(_=C)}a&&((h=!m&&h)&&v--,t&&b.push(h))}if(v+=y,a&&y!==v){for(f=0;m=r[f++];)m(b,x,e,n);if(t){if(v>0)for(;y--;)b[y]||x[y]||(x[y]=D.call(s));x=xt(x)}j.apply(s,x),u&&!t&&x.length>0&&v+r.length>1&&rt.uniqueSort(s)}return u&&(_=C,c=w),b},a?at(u):u))).selector=t}return m},l=rt.select=function(t,e,n,o){var r,l,c,u,h,d="function"==typeof t&&t,p=!o&&s(t=d.selector||t);if(n=n||[],1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&9===e.nodeType&&g&&i.relative[l[1].type]){if(!(e=(i.find.ID(c.matches[0].replace(Z,tt),e)||[])[0]))return n;d&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(r=Q.needsContext.test(t)?0:l.length;r--&&(c=l[r],!i.relative[u=c.type]);)if((h=i.find[u])&&(o=h(c.matches[0].replace(Z,tt),J.test(l[0].type)&>(e.parentNode)||e))){if(l.splice(r,1),!(t=o.length&&vt(l)))return j.apply(n,o),n;break}}return(d||a(t,p))(o,e,!g,n,!e||J.test(t)&>(e.parentNode)||e),n},n.sortStable=x.split("").sort(S).join("")===x,n.detectDuplicates=!!h,d(),n.sortDetached=lt(function(t){return 1&t.compareDocumentPosition(p.createElement("fieldset"))}),lt(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||ct("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),n.attributes&<(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||ct("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),lt(function(t){return null==t.getAttribute("disabled")})||ct(L,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),rt}(t);m.find=_,m.expr=_.selectors,m.expr[":"]=m.expr.pseudos,m.uniqueSort=m.unique=_.uniqueSort,m.text=_.getText,m.isXMLDoc=_.isXML,m.contains=_.contains,m.escapeSelector=_.escape;var k=function(t,e,n){for(var i=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&m(t).is(n))break;i.push(t)}return i},C=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},$=m.expr.match.needsContext;function T(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var S=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,E=/^.[^:#\[\.,]*$/;function N(t,e,n){return m.isFunction(e)?m.grep(t,function(t,i){return!!e.call(t,i,t)!==n}):e.nodeType?m.grep(t,function(t){return t===e!==n}):"string"!=typeof e?m.grep(t,function(t){return l.call(e,t)>-1!==n}):E.test(e)?m.filter(e,t,n):(e=m.filter(e,t),m.grep(t,function(t){return l.call(e,t)>-1!==n&&1===t.nodeType}))}m.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?m.find.matchesSelector(i,t)?[i]:[]:m.find.matches(t,m.grep(e,function(t){return 1===t.nodeType}))},m.fn.extend({find:function(t){var e,n,i=this.length,o=this;if("string"!=typeof t)return this.pushStack(m(t).filter(function(){for(e=0;e<i;e++)if(m.contains(o[e],this))return!0}));for(n=this.pushStack([]),e=0;e<i;e++)m.find(t,o[e],n);return i>1?m.uniqueSort(n):n},filter:function(t){return this.pushStack(N(this,t||[],!1))},not:function(t){return this.pushStack(N(this,t||[],!0))},is:function(t){return!!N(this,"string"==typeof t&&$.test(t)?m(t):t||[],!1).length}});var D,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(m.fn.init=function(t,e,n){var o,r;if(!t)return this;if(n=n||D,"string"==typeof t){if(!(o="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:A.exec(t))||!o[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(o[1]){if(e=e instanceof m?e[0]:e,m.merge(this,m.parseHTML(o[1],e&&e.nodeType?e.ownerDocument||e:i,!0)),S.test(o[1])&&m.isPlainObject(e))for(o in e)m.isFunction(this[o])?this[o](e[o]):this.attr(o,e[o]);return this}return(r=i.getElementById(o[2]))&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):m.isFunction(t)?void 0!==n.ready?n.ready(t):t(m):m.makeArray(t,this)}).prototype=m.fn,D=m(i);var j=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};function O(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}m.fn.extend({has:function(t){var e=m(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if(m.contains(this,e[t]))return!0})},closest:function(t,e){var n,i=0,o=this.length,r=[],s="string"!=typeof t&&m(t);if(!$.test(t))for(;i<o;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&m.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(r.length>1?m.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?l.call(m(t),this[0]):l.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(m.uniqueSort(m.merge(this.get(),m(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),m.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return k(t,"parentNode")},parentsUntil:function(t,e,n){return k(t,"parentNode",n)},next:function(t){return O(t,"nextSibling")},prev:function(t){return O(t,"previousSibling")},nextAll:function(t){return k(t,"nextSibling")},prevAll:function(t){return k(t,"previousSibling")},nextUntil:function(t,e,n){return k(t,"nextSibling",n)},prevUntil:function(t,e,n){return k(t,"previousSibling",n)},siblings:function(t){return C((t.parentNode||{}).firstChild,t)},children:function(t){return C(t.firstChild)},contents:function(t){return T(t,"iframe")?t.contentDocument:(T(t,"template")&&(t=t.content||t),m.merge([],t.childNodes))}},function(t,e){m.fn[t]=function(n,i){var o=m.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=m.filter(i,o)),this.length>1&&(I[t]||m.uniqueSort(o),j.test(t)&&o.reverse()),this.pushStack(o)}});var L=/[^\x20\t\r\n\f]+/g;function P(t){return t}function R(t){throw t}function q(t,e,n,i){var o;try{t&&m.isFunction(o=t.promise)?o.call(t).done(e).fail(n):t&&m.isFunction(o=t.then)?o.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}m.Callbacks=function(t){var e,n;t="string"==typeof t?(e=t,n={},m.each(e.match(L)||[],function(t,e){n[e]=!0}),n):m.extend({},t);var i,o,r,s,a=[],l=[],c=-1,u=function(){for(s=s||t.once,r=i=!0;l.length;c=-1)for(o=l.shift();++c<a.length;)!1===a[c].apply(o[0],o[1])&&t.stopOnFalse&&(c=a.length,o=!1);t.memory||(o=!1),i=!1,s&&(a=o?[]:"")},h={add:function(){return a&&(o&&!i&&(c=a.length-1,l.push(o)),function e(n){m.each(n,function(n,i){m.isFunction(i)?t.unique&&h.has(i)||a.push(i):i&&i.length&&"string"!==m.type(i)&&e(i)})}(arguments),o&&!i&&u()),this},remove:function(){return m.each(arguments,function(t,e){for(var n;(n=m.inArray(e,a,n))>-1;)a.splice(n,1),n<=c&&c--}),this},has:function(t){return t?m.inArray(t,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return s=l=[],a=o="",this},disabled:function(){return!a},lock:function(){return s=l=[],o||i||(a=o=""),this},locked:function(){return!!s},fireWith:function(t,e){return s||(e=[t,(e=e||[]).slice?e.slice():e],l.push(e),i||u()),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!r}};return h},m.extend({Deferred:function(e){var n=[["notify","progress",m.Callbacks("memory"),m.Callbacks("memory"),2],["resolve","done",m.Callbacks("once memory"),m.Callbacks("once memory"),0,"resolved"],["reject","fail",m.Callbacks("once memory"),m.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},catch:function(t){return o.then(null,t)},pipe:function(){var t=arguments;return m.Deferred(function(e){m.each(n,function(n,i){var o=m.isFunction(t[i[4]])&&t[i[4]];r[i[1]](function(){var t=o&&o.apply(this,arguments);t&&m.isFunction(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[i[0]+"With"](this,o?[t]:arguments)})}),t=null}).promise()},then:function(e,i,o){var r=0;function s(e,n,i,o){return function(){var a=this,l=arguments,c=function(){var t,c;if(!(e<r)){if((t=i.apply(a,l))===n.promise())throw new TypeError("Thenable self-resolution");c=t&&("object"==typeof t||"function"==typeof t)&&t.then,m.isFunction(c)?o?c.call(t,s(r,n,P,o),s(r,n,R,o)):(r++,c.call(t,s(r,n,P,o),s(r,n,R,o),s(r,n,P,n.notifyWith))):(i!==P&&(a=void 0,l=[t]),(o||n.resolveWith)(a,l))}},u=o?c:function(){try{c()}catch(t){m.Deferred.exceptionHook&&m.Deferred.exceptionHook(t,u.stackTrace),e+1>=r&&(i!==R&&(a=void 0,l=[t]),n.rejectWith(a,l))}};e?u():(m.Deferred.getStackHook&&(u.stackTrace=m.Deferred.getStackHook()),t.setTimeout(u))}}return m.Deferred(function(t){n[0][3].add(s(0,t,m.isFunction(o)?o:P,t.notifyWith)),n[1][3].add(s(0,t,m.isFunction(e)?e:P)),n[2][3].add(s(0,t,m.isFunction(i)?i:R))}).promise()},promise:function(t){return null!=t?m.extend(t,o):o}},r={};return m.each(n,function(t,e){var s=e[2],a=e[5];o[e[1]]=s.add,a&&s.add(function(){i=a},n[3-t][2].disable,n[0][2].lock),s.add(e[3].fire),r[e[0]]=function(){return r[e[0]+"With"](this===r?void 0:this,arguments),this},r[e[0]+"With"]=s.fireWith}),o.promise(r),e&&e.call(r,r),r},when:function(t){var e=arguments.length,n=e,i=Array(n),o=r.call(arguments),s=m.Deferred(),a=function(t){return function(n){i[t]=this,o[t]=arguments.length>1?r.call(arguments):n,--e||s.resolveWith(i,o)}};if(e<=1&&(q(t,s.done(a(n)).resolve,s.reject,!e),"pending"===s.state()||m.isFunction(o[n]&&o[n].then)))return s.then();for(;n--;)q(o[n],a(n),s.reject);return s.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;m.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&H.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)},m.readyException=function(e){t.setTimeout(function(){throw e})};var F=m.Deferred();function B(){i.removeEventListener("DOMContentLoaded",B),t.removeEventListener("load",B),m.ready()}m.fn.ready=function(t){return F.then(t).catch(function(t){m.readyException(t)}),this},m.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--m.readyWait:m.isReady)||(m.isReady=!0,!0!==t&&--m.readyWait>0||F.resolveWith(i,[m]))}}),m.ready.then=F.then,"complete"===i.readyState||"loading"!==i.readyState&&!i.documentElement.doScroll?t.setTimeout(m.ready):(i.addEventListener("DOMContentLoaded",B),t.addEventListener("load",B));var z=function(t,e,n,i,o,r,s){var a=0,l=t.length,c=null==n;if("object"===m.type(n)){o=!0;for(a in n)z(t,e,a,n[a],!0,r,s)}else if(void 0!==i&&(o=!0,m.isFunction(i)||(s=!0),c&&(s?(e.call(t,i),e=null):(c=e,e=function(t,e,n){return c.call(m(t),n)})),e))for(;a<l;a++)e(t[a],n,s?i:i.call(t[a],a,e(t[a],n)));return o?t:c?e.call(t):l?e(t[0],n):r},M=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function W(){this.expando=m.expando+W.uid++}W.uid=1,W.prototype={cache:function(t){var e=t[this.expando];return e||(e={},M(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,o=this.cache(t);if("string"==typeof e)o[m.camelCase(e)]=n;else for(i in e)o[m.camelCase(i)]=e[i];return o},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][m.camelCase(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,i=t[this.expando];if(void 0!==i){if(void 0!==e){Array.isArray(e)?e=e.map(m.camelCase):e=(e=m.camelCase(e))in i?[e]:e.match(L)||[],n=e.length;for(;n--;)delete i[e[n]]}(void 0===e||m.isEmptyObject(i))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!m.isEmptyObject(e)}};var U=new W,K=new W,Q=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,V=/[A-Z]/g;function Y(t,e,n){var i,o;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(V,"-$&").toLowerCase(),n=t.getAttribute(i),"string"==typeof n){try{n="true"===(o=n)||"false"!==o&&("null"===o?null:o===+o+""?+o:Q.test(o)?JSON.parse(o):o)}catch(t){}K.set(t,e,n)}else n=void 0;return n}m.extend({hasData:function(t){return K.hasData(t)||U.hasData(t)},data:function(t,e,n){return K.access(t,e,n)},removeData:function(t,e){K.remove(t,e)},_data:function(t,e,n){return U.access(t,e,n)},_removeData:function(t,e){U.remove(t,e)}}),m.fn.extend({data:function(t,e){var n,i,o,r=this[0],s=r&&r.attributes;if(void 0===t){if(this.length&&(o=K.get(r),1===r.nodeType&&!U.get(r,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(i=s[n].name,0===i.indexOf("data-")&&(i=m.camelCase(i.slice(5)),Y(r,i,o[i])));U.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof t?this.each(function(){K.set(this,t)}):z(this,function(e){var n;if(r&&void 0===e){if(void 0!==(n=K.get(r,t)))return n;if(void 0!==(n=Y(r,t)))return n}else this.each(function(){K.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){K.remove(this,t)})}}),m.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=U.get(t,e),n&&(!i||Array.isArray(n)?i=U.access(t,e,m.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=m.queue(t,e),i=n.length,o=n.shift(),r=m._queueHooks(t,e);"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete r.stop,o.call(t,function(){m.dequeue(t,e)},r)),!i&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return U.get(t,n)||U.access(t,n,{empty:m.Callbacks("once memory").add(function(){U.remove(t,[e+"queue",n])})})}}),m.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?m.queue(this[0],t):void 0===e?this:this.each(function(){var n=m.queue(this,t,e);m._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&m.dequeue(this,t)})},dequeue:function(t){return this.each(function(){m.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,o=m.Deferred(),r=this,s=this.length,a=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)n=U.get(r[s],t+"queueHooks"),n&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(e)}});var G=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,X=new RegExp("^(?:([+-])=|)("+G+")([a-z%]*)$","i"),J=["Top","Right","Bottom","Left"],Z=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&m.contains(t.ownerDocument,t)&&"none"===m.css(t,"display")},tt=function(t,e,n,i){var o,r,s={};for(r in e)s[r]=t.style[r],t.style[r]=e[r];o=n.apply(t,i||[]);for(r in e)t.style[r]=s[r];return o};function et(t,e,n,i){var o,r=1,s=20,a=i?function(){return i.cur()}:function(){return m.css(t,e,"")},l=a(),c=n&&n[3]||(m.cssNumber[e]?"":"px"),u=(m.cssNumber[e]||"px"!==c&&+l)&&X.exec(m.css(t,e));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+l||1;do{r=r||".5",u/=r,m.style(t,e,u+c)}while(r!==(r=a()/l)&&1!==r&&--s)}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=o)),o}var nt={};function it(t,e){for(var n,i,o=[],r=0,s=t.length;r<s;r++)i=t[r],i.style&&(n=i.style.display,e?("none"===n&&(o[r]=U.get(i,"display")||null,o[r]||(i.style.display="")),""===i.style.display&&Z(i)&&(o[r]=(a=i,l=void 0,c=void 0,void 0,h=void 0,c=a.ownerDocument,u=a.nodeName,h=nt[u],h||(l=c.body.appendChild(c.createElement(u)),h=m.css(l,"display"),l.parentNode.removeChild(l),"none"===h&&(h="block"),nt[u]=h,h)))):"none"!==n&&(o[r]="none",U.set(i,"display",n)));var a,l,c,u,h;for(r=0;r<s;r++)null!=o[r]&&(t[r].style.display=o[r]);return t}m.fn.extend({show:function(){return it(this,!0)},hide:function(){return it(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Z(this)?m(this).show():m(this).hide()})}});var ot=/^(?:checkbox|radio)$/i,rt=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,st=/^$|\/(?:java|ecma)script/i,at={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function lt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&T(t,e)?m.merge([t],n):n}function ct(t,e){for(var n=0,i=t.length;n<i;n++)U.set(t[n],"globalEval",!e||U.get(e[n],"globalEval"))}at.optgroup=at.option,at.tbody=at.tfoot=at.colgroup=at.caption=at.thead,at.th=at.td;var ut,ht,dt=/<|&#?\w+;/;function pt(t,e,n,i,o){for(var r,s,a,l,c,u,h=e.createDocumentFragment(),d=[],p=0,f=t.length;p<f;p++)if(r=t[p],r||0===r)if("object"===m.type(r))m.merge(d,r.nodeType?[r]:r);else if(dt.test(r)){for(s=s||h.appendChild(e.createElement("div")),a=(rt.exec(r)||["",""])[1].toLowerCase(),l=at[a]||at._default,s.innerHTML=l[1]+m.htmlPrefilter(r)+l[2],u=l[0];u--;)s=s.lastChild;m.merge(d,s.childNodes),(s=h.firstChild).textContent=""}else d.push(e.createTextNode(r));for(h.textContent="",p=0;r=d[p++];)if(i&&m.inArray(r,i)>-1)o&&o.push(r);else if(c=m.contains(r.ownerDocument,r),s=lt(h.appendChild(r),"script"),c&&ct(s),n)for(u=0;r=s[u++];)st.test(r.type||"")&&n.push(r);return h}ut=i.createDocumentFragment().appendChild(i.createElement("div")),(ht=i.createElement("input")).setAttribute("type","radio"),ht.setAttribute("checked","checked"),ht.setAttribute("name","t"),ut.appendChild(ht),f.checkClone=ut.cloneNode(!0).cloneNode(!0).lastChild.checked,ut.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!ut.cloneNode(!0).lastChild.defaultValue;var ft=i.documentElement,gt=/^key/,mt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,vt=/^([^.]*)(?:\.(.+)|)/;function yt(){return!0}function bt(){return!1}function xt(){try{return i.activeElement}catch(t){}}function wt(t,e,n,i,o,r){var s,a;if("object"==typeof e){"string"!=typeof n&&(i=i||n,n=void 0);for(a in e)wt(t,a,n,i,e[a],r);return t}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=bt;else if(!o)return t;return 1===r&&(s=o,(o=function(t){return m().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=m.guid++)),t.each(function(){m.event.add(this,e,o,i,n)})}m.event={global:{},add:function(t,e,n,i,o){var r,s,a,l,c,u,h,d,p,f,g,v=U.get(t);if(v)for(n.handler&&(n=(r=n).handler,o=r.selector),o&&m.find.matchesSelector(ft,o),n.guid||(n.guid=m.guid++),(l=v.events)||(l=v.events={}),(s=v.handle)||(s=v.handle=function(e){return void 0!==m&&m.event.triggered!==e.type?m.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(L)||[""]).length;c--;)a=vt.exec(e[c])||[],p=g=a[1],f=(a[2]||"").split(".").sort(),p&&(h=m.event.special[p]||{},p=(o?h.delegateType:h.bindType)||p,h=m.event.special[p]||{},u=m.extend({type:p,origType:g,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&m.expr.match.needsContext.test(o),namespace:f.join(".")},r),(d=l[p])||(d=l[p]=[],d.delegateCount=0,h.setup&&!1!==h.setup.call(t,i,f,s)||t.addEventListener&&t.addEventListener(p,s)),h.add&&(h.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,u):d.push(u),m.event.global[p]=!0)},remove:function(t,e,n,i,o){var r,s,a,l,c,u,h,d,p,f,g,v=U.hasData(t)&&U.get(t);if(v&&(l=v.events)){for(c=(e=(e||"").match(L)||[""]).length;c--;)if(a=vt.exec(e[c])||[],p=g=a[1],f=(a[2]||"").split(".").sort(),p){for(h=m.event.special[p]||{},d=l[p=(i?h.delegateType:h.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=d.length;r--;)u=d[r],!o&&g!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(d.splice(r,1),u.selector&&d.delegateCount--,h.remove&&h.remove.call(t,u));s&&!d.length&&(h.teardown&&!1!==h.teardown.call(t,f,v.handle)||m.removeEvent(t,p,v.handle),delete l[p])}else for(p in l)m.event.remove(t,p+e[c],n,i,!0);m.isEmptyObject(l)&&U.remove(t,"handle events")}},dispatch:function(t){var e,n,i,o,r,s,a=m.event.fix(t),l=new Array(arguments.length),c=(U.get(this,"events")||{})[a.type]||[],u=m.event.special[a.type]||{};for(l[0]=a,e=1;e<arguments.length;e++)l[e]=arguments[e];if(a.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,a)){for(s=m.event.handlers.call(this,a,c),e=0;(o=s[e++])&&!a.isPropagationStopped();)for(a.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(r.namespace)||(a.handleObj=r,a.data=r.data,i=((m.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,l),void 0!==i&&!1===(a.result=i)&&(a.preventDefault(),a.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,a),a.result}},handlers:function(t,e){var n,i,o,r,s,a=[],l=e.delegateCount,c=t.target;if(l&&c.nodeType&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(r=[],s={},n=0;n<l;n++)i=e[n],o=i.selector+" ",void 0===s[o]&&(s[o]=i.needsContext?m(o,this).index(c)>-1:m.find(o,this,null,[c]).length),s[o]&&r.push(i);r.length&&a.push({elem:c,handlers:r})}return c=this,l<e.length&&a.push({elem:c,handlers:e.slice(l)}),a},addProp:function(t,e){Object.defineProperty(m.Event.prototype,t,{enumerable:!0,configurable:!0,get:m.isFunction(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[m.expando]?t:new m.Event(t)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==xt()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===xt()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&T(this,"input"))return this.click(),!1},_default:function(t){return T(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},m.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},m.Event=function(t,e){return this instanceof m.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?yt:bt,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&m.extend(this,e),this.timeStamp=t&&t.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(t,e)},m.Event.prototype={constructor:m.Event,isDefaultPrevented:bt,isPropagationStopped:bt,isImmediatePropagationStopped:bt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=yt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=yt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=yt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},m.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(t){var e=t.button;return null==t.which&>.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&void 0!==e&&mt.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},m.event.addProp),m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){m.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=t.relatedTarget,o=t.handleObj;return i&&(i===this||m.contains(this,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),m.fn.extend({on:function(t,e,n,i){return wt(this,t,e,n,i)},one:function(t,e,n,i){return wt(this,t,e,n,i,1)},off:function(t,e,n){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,m(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(o in t)this.off(o,e,t[o]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=bt),this.each(function(){m.event.remove(this,t,n,e)})}});var _t=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,kt=/<script|<style|<link/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,$t=/^true\/(.*)/,Tt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function St(t,e){return T(t,"table")&&T(11!==e.nodeType?e:e.firstChild,"tr")?m(">tbody",t)[0]||t:t}function Et(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Nt(t){var e=$t.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function Dt(t,e){var n,i,o,r,s,a,l,c;if(1===e.nodeType){if(U.hasData(t)&&(r=U.access(t),s=U.set(e,r),c=r.events)){delete s.handle,s.events={};for(o in c)for(n=0,i=c[o].length;n<i;n++)m.event.add(e,o,c[o][n])}K.hasData(t)&&(a=K.access(t),l=m.extend({},a),K.set(e,l))}}function At(t,e,n,i){e=s.apply([],e);var o,r,a,l,c,u,h=0,d=t.length,p=d-1,v=e[0],y=m.isFunction(v);if(y||d>1&&"string"==typeof v&&!f.checkClone&&Ct.test(v))return t.each(function(o){var r=t.eq(o);y&&(e[0]=v.call(this,o,r.html())),At(r,e,n,i)});if(d&&(r=(o=pt(e,t[0].ownerDocument,!1,t,i)).firstChild,1===o.childNodes.length&&(o=r),r||i)){for(l=(a=m.map(lt(o,"script"),Et)).length;h<d;h++)c=o,h!==p&&(c=m.clone(c,!0,!0),l&&m.merge(a,lt(c,"script"))),n.call(t[h],c,h);if(l)for(u=a[a.length-1].ownerDocument,m.map(a,Nt),h=0;h<l;h++)c=a[h],st.test(c.type||"")&&!U.access(c,"globalEval")&&m.contains(u,c)&&(c.src?m._evalUrl&&m._evalUrl(c.src):g(c.textContent.replace(Tt,""),u))}return t}function jt(t,e,n){for(var i,o=e?m.filter(e,t):t,r=0;null!=(i=o[r]);r++)n||1!==i.nodeType||m.cleanData(lt(i)),i.parentNode&&(n&&m.contains(i.ownerDocument,i)&&ct(lt(i,"script")),i.parentNode.removeChild(i));return t}m.extend({htmlPrefilter:function(t){return t.replace(_t,"<$1></$2>")},clone:function(t,e,n){var i,o,r,s,a,l,c,u=t.cloneNode(!0),h=m.contains(t.ownerDocument,t);if(!(f.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||m.isXMLDoc(t)))for(s=lt(u),r=lt(t),i=0,o=r.length;i<o;i++)a=r[i],l=s[i],void 0,c=l.nodeName.toLowerCase(),"input"===c&&ot.test(a.type)?l.checked=a.checked:"input"!==c&&"textarea"!==c||(l.defaultValue=a.defaultValue);if(e)if(n)for(r=r||lt(t),s=s||lt(u),i=0,o=r.length;i<o;i++)Dt(r[i],s[i]);else Dt(t,u);return(s=lt(u,"script")).length>0&&ct(s,!h&<(t,"script")),u},cleanData:function(t){for(var e,n,i,o=m.event.special,r=0;void 0!==(n=t[r]);r++)if(M(n)){if(e=n[U.expando]){if(e.events)for(i in e.events)o[i]?m.event.remove(n,i):m.removeEvent(n,i,e.handle);n[U.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),m.fn.extend({detach:function(t){return jt(this,t,!0)},remove:function(t){return jt(this,t)},text:function(t){return z(this,function(t){return void 0===t?m.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return At(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||St(this,t).appendChild(t)})},prepend:function(){return At(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=St(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return At(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return At(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(m.cleanData(lt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return m.clone(this,t,e)})},html:function(t){return z(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!kt.test(t)&&!at[(rt.exec(t)||["",""])[1].toLowerCase()]){t=m.htmlPrefilter(t);try{for(;n<i;n++)e=this[n]||{},1===e.nodeType&&(m.cleanData(lt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return At(this,arguments,function(e){var n=this.parentNode;m.inArray(this,t)<0&&(m.cleanData(lt(this)),n&&n.replaceChild(e,this))},t)}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){m.fn[t]=function(t){for(var n,i=[],o=m(t),r=o.length-1,s=0;s<=r;s++)n=s===r?this:this.clone(!0),m(o[s])[e](n),a.apply(i,n.get());return this.pushStack(i)}});var It=/^margin/,Ot=new RegExp("^("+G+")(?!px)[a-z%]+$","i"),Lt=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)};function Pt(t,e,n){var i,o,r,s,a=t.style;return(n=n||Lt(t))&&(""!==(s=n.getPropertyValue(e)||n[e])||m.contains(t.ownerDocument,t)||(s=m.style(t,e)),!f.pixelMarginRight()&&Ot.test(s)&&It.test(e)&&(i=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=o,a.maxWidth=r)),void 0!==s?s+"":s}function Rt(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}!function(){function e(){if(l){l.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",l.innerHTML="",ft.appendChild(a);var e=t.getComputedStyle(l);n="1%"!==e.top,s="2px"===e.marginLeft,o="4px"===e.width,l.style.marginRight="50%",r="4px"===e.marginRight,ft.removeChild(a),l=null}}var n,o,r,s,a=i.createElement("div"),l=i.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===l.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(l),m.extend(f,{pixelPosition:function(){return e(),n},boxSizingReliable:function(){return e(),o},pixelMarginRight:function(){return e(),r},reliableMarginLeft:function(){return e(),s}}))}();var qt=/^(none|table(?!-c[ea]).+)/,Ht=/^--/,Ft={position:"absolute",visibility:"hidden",display:"block"},Bt={letterSpacing:"0",fontWeight:"400"},zt=["Webkit","Moz","ms"],Mt=i.createElement("div").style;function Wt(t){var e=m.cssProps[t];return e||(e=m.cssProps[t]=function(t){if(t in Mt)return t;for(var e=t[0].toUpperCase()+t.slice(1),n=zt.length;n--;)if(t=zt[n]+e,t in Mt)return t}(t)||t),e}function Ut(t,e,n){var i=X.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function Kt(t,e,n,i,o){var r,s=0;for(r=n===(i?"border":"content")?4:"width"===e?1:0;r<4;r+=2)"margin"===n&&(s+=m.css(t,n+J[r],!0,o)),i?("content"===n&&(s-=m.css(t,"padding"+J[r],!0,o)),"margin"!==n&&(s-=m.css(t,"border"+J[r]+"Width",!0,o))):(s+=m.css(t,"padding"+J[r],!0,o),"padding"!==n&&(s+=m.css(t,"border"+J[r]+"Width",!0,o)));return s}function Qt(t,e,n){var i,o=Lt(t),r=Pt(t,e,o),s="border-box"===m.css(t,"boxSizing",!1,o);return Ot.test(r)?r:(i=s&&(f.boxSizingReliable()||r===t.style[e]),"auto"===r&&(r=t["offset"+e[0].toUpperCase()+e.slice(1)]),(r=parseFloat(r)||0)+Kt(t,e,n||(s?"border":"content"),i,o)+"px")}function Vt(t,e,n,i,o){return new Vt.prototype.init(t,e,n,i,o)}m.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Pt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,r,s,a=m.camelCase(e),l=Ht.test(e),c=t.style;return l||(e=Wt(a)),s=m.cssHooks[e]||m.cssHooks[a],void 0===n?s&&"get"in s&&void 0!==(o=s.get(t,!1,i))?o:c[e]:("string"===(r=typeof n)&&(o=X.exec(n))&&o[1]&&(n=et(t,e,o),r="number"),void(null!=n&&n==n&&("number"===r&&(n+=o&&o[3]||(m.cssNumber[a]?"":"px")),f.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,i))||(l?c.setProperty(e,n):c[e]=n))))}},css:function(t,e,n,i){var o,r,s,a=m.camelCase(e);return Ht.test(e)||(e=Wt(a)),(s=m.cssHooks[e]||m.cssHooks[a])&&"get"in s&&(o=s.get(t,!0,n)),void 0===o&&(o=Pt(t,e,i)),"normal"===o&&e in Bt&&(o=Bt[e]),""===n||n?(r=parseFloat(o),!0===n||isFinite(r)?r||0:o):o}}),m.each(["height","width"],function(t,e){m.cssHooks[e]={get:function(t,n,i){if(n)return!qt.test(m.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?Qt(t,e,i):tt(t,Ft,function(){return Qt(t,e,i)})},set:function(t,n,i){var o,r=i&&Lt(t),s=i&&Kt(t,e,i,"border-box"===m.css(t,"boxSizing",!1,r),r);return s&&(o=X.exec(n))&&"px"!==(o[3]||"px")&&(t.style[e]=n,n=m.css(t,e)),Ut(0,n,s)}}}),m.cssHooks.marginLeft=Rt(f.reliableMarginLeft,function(t,e){if(e)return(parseFloat(Pt(t,"marginLeft"))||t.getBoundingClientRect().left-tt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),m.each({margin:"",padding:"",border:"Width"},function(t,e){m.cssHooks[t+e]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[t+J[i]+e]=r[i]||r[i-2]||r[0];return o}},It.test(t)||(m.cssHooks[t+e].set=Ut)}),m.fn.extend({css:function(t,e){return z(this,function(t,e,n){var i,o,r={},s=0;if(Array.isArray(e)){for(i=Lt(t),o=e.length;s<o;s++)r[e[s]]=m.css(t,e[s],!1,i);return r}return void 0!==n?m.style(t,e,n):m.css(t,e)},t,e,arguments.length>1)}}),m.Tween=Vt,Vt.prototype={constructor:Vt,init:function(t,e,n,i,o,r){this.elem=t,this.prop=n,this.easing=o||m.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=r||(m.cssNumber[n]?"":"px")},cur:function(){var t=Vt.propHooks[this.prop];return t&&t.get?t.get(this):Vt.propHooks._default.get(this)},run:function(t){var e,n=Vt.propHooks[this.prop];return this.options.duration?this.pos=e=m.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Vt.propHooks._default.set(this),this}},Vt.prototype.init.prototype=Vt.prototype,Vt.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=m.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){m.fx.step[t.prop]?m.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[m.cssProps[t.prop]]&&!m.cssHooks[t.prop]?t.elem[t.prop]=t.now:m.style(t.elem,t.prop,t.now+t.unit)}}},Vt.propHooks.scrollTop=Vt.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},m.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},m.fx=Vt.prototype.init,m.fx.step={};var Yt,Gt,Xt,Jt,Zt=/^(?:toggle|show|hide)$/,te=/queueHooks$/;function ee(){Gt&&(!1===i.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(ee):t.setTimeout(ee,m.fx.interval),m.fx.tick())}function ne(){return t.setTimeout(function(){Yt=void 0}),Yt=m.now()}function ie(t,e){var n,i=0,o={height:t};for(e=e?1:0;i<4;i+=2-e)n=J[i],o["margin"+n]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function oe(t,e,n){for(var i,o=(re.tweeners[e]||[]).concat(re.tweeners["*"]),r=0,s=o.length;r<s;r++)if(i=o[r].call(n,e,t))return i}function re(t,e,n){var i,o,r=0,s=re.prefilters.length,a=m.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var e=Yt||ne(),n=Math.max(0,c.startTime+c.duration-e),i=1-(n/c.duration||0),r=0,s=c.tweens.length;r<s;r++)c.tweens[r].run(i);return a.notifyWith(t,[c,i,n]),i<1&&s?n:(s||a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:m.extend({},e),opts:m.extend(!0,{specialEasing:{},easing:m.easing._default},n),originalProperties:e,originalOptions:n,startTime:Yt||ne(),duration:n.duration,tweens:[],createTween:function(e,n){var i=m.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(i),i},stop:function(e){var n=0,i=e?c.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)c.tweens[n].run(1);return e?(a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c,e])):a.rejectWith(t,[c,e]),this}}),u=c.props;for(function(t,e){var n,i,o,r,s;for(n in t)if(i=m.camelCase(n),o=e[i],r=t[n],Array.isArray(r)&&(o=r[1],r=t[n]=r[0]),n!==i&&(t[i]=r,delete t[n]),s=m.cssHooks[i],s&&"expand"in s){r=s.expand(r),delete t[i];for(n in r)n in t||(t[n]=r[n],e[n]=o)}else e[i]=o}(u,c.opts.specialEasing);r<s;r++)if(i=re.prefilters[r].call(c,t,u,c.opts))return m.isFunction(i.stop)&&(m._queueHooks(c.elem,c.opts.queue).stop=m.proxy(i.stop,i)),i;return m.map(u,oe,c),m.isFunction(c.opts.start)&&c.opts.start.call(t,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),m.fx.timer(m.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c}m.Animation=m.extend(re,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return et(n.elem,t,X.exec(e),n),n}]},tweener:function(t,e){m.isFunction(t)?(e=t,t=["*"]):t=t.match(L);for(var n,i=0,o=t.length;i<o;i++)n=t[i],re.tweeners[n]=re.tweeners[n]||[],re.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var i,o,r,s,a,l,c,u,h="width"in e||"height"in e,d=this,p={},f=t.style,g=t.nodeType&&Z(t),v=U.get(t,"fxshow");n.queue||(null==(s=m._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,m.queue(t,"fx").length||s.empty.fire()})}));for(i in e)if(o=e[i],Zt.test(o)){if(delete e[i],r=r||"toggle"===o,o===(g?"hide":"show")){if("show"!==o||!v||void 0===v[i])continue;g=!0}p[i]=v&&v[i]||m.style(t,i)}if((l=!m.isEmptyObject(e))||!m.isEmptyObject(p)){h&&1===t.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=v&&v.display)&&(c=U.get(t,"display")),"none"===(u=m.css(t,"display"))&&(c?u=c:(it([t],!0),c=t.style.display||c,u=m.css(t,"display"),it([t]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===m.css(t,"float")&&(l||(d.done(function(){f.display=c}),null==c&&(u=f.display,c="none"===u?"":u)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",d.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]})),l=!1;for(i in p)l||(v?"hidden"in v&&(g=v.hidden):v=U.access(t,"fxshow",{display:c}),r&&(v.hidden=!g),g&&it([t],!0),d.done(function(){g||it([t]),U.remove(t,"fxshow");for(i in p)m.style(t,i,p[i])})),l=oe(g?v[i]:0,i,d),i in v||(v[i]=l.start,g&&(l.end=l.start,l.start=0))}}],prefilter:function(t,e){e?re.prefilters.unshift(t):re.prefilters.push(t)}}),m.speed=function(t,e,n){var i=t&&"object"==typeof t?m.extend({},t):{complete:n||!n&&e||m.isFunction(t)&&t,duration:t,easing:n&&e||e&&!m.isFunction(e)&&e};return m.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in m.fx.speeds?i.duration=m.fx.speeds[i.duration]:i.duration=m.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){m.isFunction(i.old)&&i.old.call(this),i.queue&&m.dequeue(this,i.queue)},i},m.fn.extend({fadeTo:function(t,e,n,i){return this.filter(Z).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var o=m.isEmptyObject(t),r=m.speed(e,n,i),s=function(){var e=re(this,m.extend({},t),r);(o||U.get(this,"finish"))&&e.stop(!0)};return s.finish=s,o||!1===r.queue?this.each(s):this.queue(r.queue,s)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each(function(){var e=!0,o=null!=t&&t+"queueHooks",r=m.timers,s=U.get(this);if(o)s[o]&&s[o].stop&&i(s[o]);else for(o in s)s[o]&&s[o].stop&&te.test(o)&&i(s[o]);for(o=r.length;o--;)r[o].elem!==this||null!=t&&r[o].queue!==t||(r[o].anim.stop(n),e=!1,r.splice(o,1));!e&&n||m.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,n=U.get(this),i=n[t+"queue"],o=n[t+"queueHooks"],r=m.timers,s=i?i.length:0;for(n.finish=!0,m.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===t&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<s;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish})}}),m.each(["toggle","show","hide"],function(t,e){var n=m.fn[e];m.fn[e]=function(t,i,o){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(ie(e,!0),t,i,o)}}),m.each({slideDown:ie("show"),slideUp:ie("hide"),slideToggle:ie("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){m.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}}),m.timers=[],m.fx.tick=function(){var t,e=0,n=m.timers;for(Yt=m.now();e<n.length;e++)t=n[e],t()||n[e]!==t||n.splice(e--,1);n.length||m.fx.stop(),Yt=void 0},m.fx.timer=function(t){m.timers.push(t),m.fx.start()},m.fx.interval=13,m.fx.start=function(){Gt||(Gt=!0,ee())},m.fx.stop=function(){Gt=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(e,n){return e=m.fx?m.fx.speeds[e]||e:e,n=n||"fx",this.queue(n,function(n,i){var o=t.setTimeout(n,e);i.stop=function(){t.clearTimeout(o)}})},Xt=i.createElement("input"),Jt=i.createElement("select").appendChild(i.createElement("option")),Xt.type="checkbox",f.checkOn=""!==Xt.value,f.optSelected=Jt.selected,(Xt=i.createElement("input")).value="t",Xt.type="radio",f.radioValue="t"===Xt.value;var se,ae=m.expr.attrHandle;m.fn.extend({attr:function(t,e){return z(this,m.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){m.removeAttr(this,t)})}}),m.extend({attr:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===t.getAttribute?m.prop(t,e,n):(1===r&&m.isXMLDoc(t)||(o=m.attrHooks[e.toLowerCase()]||(m.expr.match.bool.test(e)?se:void 0)),void 0!==n?null===n?void m.removeAttr(t,e):o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:(t.setAttribute(e,n+""),n):o&&"get"in o&&null!==(i=o.get(t,e))?i:(i=m.find.attr(t,e),null==i?void 0:i))},attrHooks:{type:{set:function(t,e){if(!f.radioValue&&"radio"===e&&T(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,o=e&&e.match(L);if(o&&1===t.nodeType)for(;n=o[i++];)t.removeAttribute(n)}}),se={set:function(t,e,n){return!1===e?m.removeAttr(t,n):t.setAttribute(n,n),n}},m.each(m.expr.match.bool.source.match(/\w+/g),function(t,e){var n=ae[e]||m.find.attr;ae[e]=function(t,e,i){var o,r,s=e.toLowerCase();return i||(r=ae[s],ae[s]=o,o=null!=n(t,e,i)?s:null,ae[s]=r),o}});var le=/^(?:input|select|textarea|button)$/i,ce=/^(?:a|area)$/i;function ue(t){return(t.match(L)||[]).join(" ")}function he(t){return t.getAttribute&&t.getAttribute("class")||""}m.fn.extend({prop:function(t,e){return z(this,m.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[m.propFix[t]||t]})}}),m.extend({prop:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&m.isXMLDoc(t)||(e=m.propFix[e]||e,o=m.propHooks[e]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:t[e]=n:o&&"get"in o&&null!==(i=o.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=m.find.attr(t,"tabindex");return e?parseInt(e,10):le.test(t.nodeName)||ce.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(m.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),m.fn.extend({addClass:function(t){var e,n,i,o,r,s,a,l=0;if(m.isFunction(t))return this.each(function(e){m(this).addClass(t.call(this,e,he(this)))});if("string"==typeof t&&t)for(e=t.match(L)||[];n=this[l++];)if(o=he(n),i=1===n.nodeType&&" "+ue(o)+" "){for(s=0;r=e[s++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");o!==(a=ue(i))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,i,o,r,s,a,l=0;if(m.isFunction(t))return this.each(function(e){m(this).removeClass(t.call(this,e,he(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(L)||[];n=this[l++];)if(o=he(n),i=1===n.nodeType&&" "+ue(o)+" "){for(s=0;r=e[s++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");o!==(a=ue(i))&&n.setAttribute("class",a)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):m.isFunction(t)?this.each(function(n){m(this).toggleClass(t.call(this,n,he(this),e),e)}):this.each(function(){var e,i,o,r;if("string"===n)for(i=0,o=m(this),r=t.match(L)||[];e=r[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||(e=he(this),e&&U.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":U.get(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+ue(he(n))+" ").indexOf(e)>-1)return!0;return!1}});var de=/\r/g;m.fn.extend({val:function(t){var e,n,i,o=this[0];return arguments.length?(i=m.isFunction(t),this.each(function(n){var o;1===this.nodeType&&(null==(o=i?t.call(this,n,m(this).val()):t)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=m.map(o,function(t){return null==t?"":t+""})),(e=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))})):o?(e=m.valHooks[o.type]||m.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(de,""):null==n?"":n:void 0}}),m.extend({valHooks:{option:{get:function(t){var e=m.find.attr(t,"value");return null!=e?e:ue(m.text(t))}},select:{get:function(t){var e,n,i,o=t.options,r=t.selectedIndex,s="select-one"===t.type,a=s?null:[],l=s?r+1:o.length;for(i=r<0?l:s?r:0;i<l;i++)if(n=o[i],(n.selected||i===r)&&!n.disabled&&(!n.parentNode.disabled||!T(n.parentNode,"optgroup"))){if(e=m(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,i,o=t.options,r=m.makeArray(e),s=o.length;s--;)i=o[s],(i.selected=m.inArray(m.valHooks.option.get(i),r)>-1)&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=m.inArray(m(t).val(),e)>-1}},f.checkOn||(m.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var pe=/^(?:focusinfocus|focusoutblur)$/;m.extend(m.event,{trigger:function(e,n,o,r){var s,a,l,c,u,d,p,f=[o||i],g=h.call(e,"type")?e.type:e,v=h.call(e,"namespace")?e.namespace.split("."):[];if(a=l=o=o||i,3!==o.nodeType&&8!==o.nodeType&&!pe.test(g+m.event.triggered)&&(g.indexOf(".")>-1&&(g=(v=g.split(".")).shift(),v.sort()),u=g.indexOf(":")<0&&"on"+g,(e=e[m.expando]?e:new m.Event(g,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=v.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=o),n=null==n?[e]:m.makeArray(n,[e]),p=m.event.special[g]||{},r||!p.trigger||!1!==p.trigger.apply(o,n))){if(!r&&!p.noBubble&&!m.isWindow(o)){for(c=p.delegateType||g,pe.test(c+g)||(a=a.parentNode);a;a=a.parentNode)f.push(a),l=a;l===(o.ownerDocument||i)&&f.push(l.defaultView||l.parentWindow||t)}for(s=0;(a=f[s++])&&!e.isPropagationStopped();)e.type=s>1?c:p.bindType||g,d=(U.get(a,"events")||{})[e.type]&&U.get(a,"handle"),d&&d.apply(a,n),d=u&&a[u],d&&d.apply&&M(a)&&(e.result=d.apply(a,n),!1===e.result&&e.preventDefault());return e.type=g,r||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(f.pop(),n)||!M(o)||u&&m.isFunction(o[g])&&!m.isWindow(o)&&((l=o[u])&&(o[u]=null),m.event.triggered=g,o[g](),m.event.triggered=void 0,l&&(o[u]=l)),e.result}},simulate:function(t,e,n){var i=m.extend(new m.Event,n,{type:t,isSimulated:!0});m.event.trigger(i,null,e)}}),m.fn.extend({trigger:function(t,e){return this.each(function(){m.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return m.event.trigger(t,e,n,!0)}}),m.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(t,e){m.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),m.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),f.focusin="onfocusin"in t,f.focusin||m.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){m.event.simulate(e,t.target,m.event.fix(t))};m.event.special[e]={setup:function(){var i=this.ownerDocument||this,o=U.access(i,e);o||i.addEventListener(t,n,!0),U.access(i,e,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=U.access(i,e)-1;o?U.access(i,e,o):(i.removeEventListener(t,n,!0),U.remove(i,e))}}});var fe=t.location,ge=m.now(),me=/\?/;m.parseXML=function(e){var n;if(!e||"string"!=typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(t){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+e),n};var ve=/\[\]$/,ye=/\r?\n/g,be=/^(?:submit|button|image|reset|file)$/i,xe=/^(?:input|select|textarea|keygen)/i;function we(t,e,n,i){var o;if(Array.isArray(e))m.each(e,function(e,o){n||ve.test(t)?i(t,o):we(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,n,i)});else if(n||"object"!==m.type(e))i(t,e);else for(o in e)we(t+"["+o+"]",e[o],n,i)}m.param=function(t,e){var n,i=[],o=function(t,e){var n=m.isFunction(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(t)||t.jquery&&!m.isPlainObject(t))m.each(t,function(){o(this.name,this.value)});else for(n in t)we(n,t[n],e,o);return i.join("&")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=m.prop(this,"elements");return t?m.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!m(this).is(":disabled")&&xe.test(this.nodeName)&&!be.test(t)&&(this.checked||!ot.test(t))}).map(function(t,e){var n=m(this).val();return null==n?null:Array.isArray(n)?m.map(n,function(t){return{name:e.name,value:t.replace(ye,"\r\n")}}):{name:e.name,value:n.replace(ye,"\r\n")}}).get()}});var _e=/%20/g,ke=/#.*$/,Ce=/([?&])_=[^&]*/,$e=/^(.*?):[ \t]*([^\r\n]*)$/gm,Te=/^(?:GET|HEAD)$/,Se=/^\/\//,Ee={},Ne={},De="*/".concat("*"),Ae=i.createElement("a");function je(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,o=0,r=e.toLowerCase().match(L)||[];if(m.isFunction(n))for(;i=r[o++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function Ie(t,e,n,i){var o={},r=t===Ne;function s(a){var l;return o[a]=!0,m.each(t[a]||[],function(t,a){var c=a(e,n,i);return"string"!=typeof c||r||o[c]?r?!(l=c):void 0:(e.dataTypes.unshift(c),s(c),!1)}),l}return s(e.dataTypes[0])||!o["*"]&&s("*")}function Oe(t,e){var n,i,o=m.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:i||(i={}))[n]=e[n]);return i&&m.extend(!0,t,i),t}Ae.href=fe.href,m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fe.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(fe.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":De,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Oe(Oe(t,m.ajaxSettings),e):Oe(m.ajaxSettings,t)},ajaxPrefilter:je(Ee),ajaxTransport:je(Ne),ajax:function(e,n){"object"==typeof e&&(n=e,e=void 0),n=n||{};var o,r,s,a,l,c,u,h,d,p,f=m.ajaxSetup({},n),g=f.context||f,v=f.context&&(g.nodeType||g.jquery)?m(g):m.event,y=m.Deferred(),b=m.Callbacks("once memory"),x=f.statusCode||{},w={},_={},k="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(u){if(!a)for(a={};e=$e.exec(s);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return u?s:null},setRequestHeader:function(t,e){return null==u&&(t=_[t.toLowerCase()]=_[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==u&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(u)C.always(t[C.status]);else for(e in t)x[e]=[x[e],t[e]];return this},abort:function(t){var e=t||k;return o&&o.abort(e),$(0,e),this}};if(y.promise(C),f.url=((e||f.url||fe.href)+"").replace(Se,fe.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(L)||[""],null==f.crossDomain){c=i.createElement("a");try{c.href=f.url,c.href=c.href,f.crossDomain=Ae.protocol+"//"+Ae.host!=c.protocol+"//"+c.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=m.param(f.data,f.traditional)),Ie(Ee,f,n,C),u)return C;(h=m.event&&f.global)&&0==m.active++&&m.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Te.test(f.type),r=f.url.replace(ke,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(_e,"+")):(p=f.url.slice(r.length),f.data&&(r+=(me.test(r)?"&":"?")+f.data,delete f.data),!1===f.cache&&(r=r.replace(Ce,"$1"),p=(me.test(r)?"&":"?")+"_="+ge+++p),f.url=r+p),f.ifModified&&(m.lastModified[r]&&C.setRequestHeader("If-Modified-Since",m.lastModified[r]),m.etag[r]&&C.setRequestHeader("If-None-Match",m.etag[r])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+De+"; q=0.01":""):f.accepts["*"]);for(d in f.headers)C.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(g,C,f)||u))return C.abort();if(k="abort",b.add(f.complete),C.done(f.success),C.fail(f.error),o=Ie(Ne,f,n,C)){if(C.readyState=1,h&&v.trigger("ajaxSend",[C,f]),u)return C;f.async&&f.timeout>0&&(l=t.setTimeout(function(){C.abort("timeout")},f.timeout));try{u=!1,o.send(w,$)}catch(t){if(u)throw t;$(-1,t)}}else $(-1,"No Transport");function $(e,n,i,a){var c,d,p,w,_,k=n;u||(u=!0,l&&t.clearTimeout(l),o=void 0,s=a||"",C.readyState=e>0?4:0,c=e>=200&&e<300||304===e,i&&(w=function(t,e,n){for(var i,o,r,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(o in a)if(a[o]&&a[o].test(i)){l.unshift(o);break}if(l[0]in n)r=l[0];else{for(o in n){if(!l[0]||t.converters[o+" "+l[0]]){r=o;break}s||(s=o)}r=r||s}if(r)return r!==l[0]&&l.unshift(r),n[r]}(f,C,i)),w=function(t,e,n,i){var o,r,s,a,l,c={},u=t.dataTypes.slice();if(u[1])for(s in t.converters)c[s.toLowerCase()]=t.converters[s];for(r=u.shift();r;)if(t.responseFields[r]&&(n[t.responseFields[r]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(s=c[l+" "+r]||c["* "+r]))for(o in c)if(a=o.split(" "),a[1]===r&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[o]:!0!==c[o]&&(r=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+l+" to "+r}}}return{state:"success",data:e}}(f,w,C,c),c?(f.ifModified&&((_=C.getResponseHeader("Last-Modified"))&&(m.lastModified[r]=_),(_=C.getResponseHeader("etag"))&&(m.etag[r]=_)),204===e||"HEAD"===f.type?k="nocontent":304===e?k="notmodified":(k=w.state,d=w.data,c=!(p=w.error))):(p=k,!e&&k||(k="error",e<0&&(e=0))),C.status=e,C.statusText=(n||k)+"",c?y.resolveWith(g,[d,k,C]):y.rejectWith(g,[C,k,p]),C.statusCode(x),x=void 0,h&&v.trigger(c?"ajaxSuccess":"ajaxError",[C,f,c?d:p]),b.fireWith(g,[C,k]),h&&(v.trigger("ajaxComplete",[C,f]),--m.active||m.event.trigger("ajaxStop")))}return C},getJSON:function(t,e,n){return m.get(t,e,n,"json")},getScript:function(t,e){return m.get(t,void 0,e,"script")}}),m.each(["get","post"],function(t,e){m[e]=function(t,n,i,o){return m.isFunction(n)&&(o=o||i,i=n,n=void 0),m.ajax(m.extend({url:t,type:e,dataType:o,data:n,success:i},m.isPlainObject(t)&&t))}}),m._evalUrl=function(t){return m.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},m.fn.extend({wrapAll:function(t){var e;return this[0]&&(m.isFunction(t)&&(t=t.call(this[0])),e=m(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return m.isFunction(t)?this.each(function(e){m(this).wrapInner(t.call(this,e))}):this.each(function(){var e=m(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=m.isFunction(t);return this.each(function(n){m(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){m(this).replaceWith(this.childNodes)}),this}}),m.expr.pseudos.hidden=function(t){return!m.expr.pseudos.visible(t)},m.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},m.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(t){}};var Le={0:200,1223:204},Pe=m.ajaxSettings.xhr();f.cors=!!Pe&&"withCredentials"in Pe,f.ajax=Pe=!!Pe,m.ajaxTransport(function(e){var n,i;if(f.cors||Pe&&!e.crossDomain)return{send:function(o,r){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest");for(s in o)a.setRequestHeader(s,o[s]);n=function(t){return function(){n&&(n=i=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?r(0,"error"):r(a.status,a.statusText):r(Le[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),i=a.onerror=n("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout(function(){n&&i()})},n=n("abort");try{a.send(e.hasContent&&e.data||null)}catch(t){if(n)throw t}},abort:function(){n&&n()}}}),m.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return m.globalEval(t),t}}}),m.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),m.ajaxTransport("script",function(t){var e,n;if(t.crossDomain)return{send:function(o,r){e=m("<script>").prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&r("error"===t.type?404:200,t.type)}),i.head.appendChild(e[0])},abort:function(){n&&n()}}});var Re,qe=[],He=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=qe.pop()||m.expando+"_"+ge++;return this[t]=!0,t}}),m.ajaxPrefilter("json jsonp",function(e,n,i){var o,r,s,a=!1!==e.jsonp&&(He.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&He.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=m.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(He,"$1"+o):!1!==e.jsonp&&(e.url+=(me.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return s||m.error(o+" was not called"),s[0]},e.dataTypes[0]="json",r=t[o],t[o]=function(){s=arguments},i.always(function(){void 0===r?m(t).removeProp(o):t[o]=r,e[o]&&(e.jsonpCallback=n.jsonpCallback,qe.push(o)),s&&m.isFunction(r)&&r(s[0]),s=r=void 0}),"script"}),f.createHTMLDocument=((Re=i.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Re.childNodes.length),m.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(f.createHTMLDocument?((o=(e=i.implementation.createHTMLDocument("")).createElement("base")).href=i.location.href,e.head.appendChild(o)):e=i),r=S.exec(t),s=!n&&[],r?[e.createElement(r[1])]:(r=pt([t],e,s),s&&s.length&&m(s).remove(),m.merge([],r.childNodes)));var o,r,s},m.fn.load=function(t,e,n){var i,o,r,s=this,a=t.indexOf(" ");return a>-1&&(i=ue(t.slice(a)),t=t.slice(0,a)),m.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),s.length>0&&m.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done(function(t){r=arguments,s.html(i?m("<div>").append(m.parseHTML(t)).find(i):t)}).always(n&&function(t,e){s.each(function(){n.apply(this,r||[t.responseText,e,t])})}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){m.fn[e]=function(t){return this.on(e,t)}}),m.expr.pseudos.animated=function(t){return m.grep(m.timers,function(e){return t===e.elem}).length},m.offset={setOffset:function(t,e,n){var i,o,r,s,a,l,c=m.css(t,"position"),u=m(t),h={};"static"===c&&(t.style.position="relative"),a=u.offset(),r=m.css(t,"top"),l=m.css(t,"left"),("absolute"===c||"fixed"===c)&&(r+l).indexOf("auto")>-1?(s=(i=u.position()).top,o=i.left):(s=parseFloat(r)||0,o=parseFloat(l)||0),m.isFunction(e)&&(e=e.call(t,n,m.extend({},a))),null!=e.top&&(h.top=e.top-a.top+s),null!=e.left&&(h.left=e.left-a.left+o),"using"in e?e.using.call(t,h):u.css(h)}},m.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){m.offset.setOffset(this,t,e)});var e,n,i,o,r=this[0];return r?r.getClientRects().length?(i=r.getBoundingClientRect(),n=(e=r.ownerDocument).documentElement,o=e.defaultView,{top:i.top+o.pageYOffset-n.clientTop,left:i.left+o.pageXOffset-n.clientLeft}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n=this[0],i={top:0,left:0};return"fixed"===m.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),T(t[0],"html")||(i=t.offset()),i={top:i.top+m.css(t[0],"borderTopWidth",!0),left:i.left+m.css(t[0],"borderLeftWidth",!0)}),{top:e.top-i.top-m.css(n,"marginTop",!0),left:e.left-i.left-m.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===m.css(t,"position");)t=t.offsetParent;return t||ft})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n="pageYOffset"===e;m.fn[t]=function(i){return z(this,function(t,i,o){var r;return m.isWindow(t)?r=t:9===t.nodeType&&(r=t.defaultView),void 0===o?r?r[e]:t[i]:void(r?r.scrollTo(n?r.pageXOffset:o,n?o:r.pageYOffset):t[i]=o)},t,i,arguments.length)}}),m.each(["top","left"],function(t,e){m.cssHooks[e]=Rt(f.pixelPosition,function(t,n){if(n)return n=Pt(t,e),Ot.test(n)?m(t).position()[e]+"px":n})}),m.each({Height:"height",Width:"width"},function(t,e){m.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){m.fn[i]=function(o,r){var s=arguments.length&&(n||"boolean"!=typeof o),a=n||(!0===o||!0===r?"margin":"border");return z(this,function(e,n,o){var r;return m.isWindow(e)?0===i.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===o?m.css(e,n,a):m.style(e,n,o,a)},e,s?o:void 0,s)}})}),m.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}}),m.holdReady=function(t){t?m.readyWait++:m.ready(!0)},m.isArray=Array.isArray,m.parseJSON=JSON.parse,m.nodeName=T,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var Fe=t.jQuery,Be=t.$;return m.noConflict=function(e){return t.$===m&&(t.$=Be),e&&t.jQuery===m&&(t.jQuery=Fe),m},e||(t.jQuery=t.$=m),m}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",function(){n=!0});return setTimeout(function(){n||t(i).trigger(t.support.transition.end)},e),this},t(function(){t.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(t){"use strict";var e='[data-dismiss="alert"]',n=function(n){t(n).on("click",e,this.close)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.close=function(e){function i(){s.detach().trigger("closed.bs.alert").remove()}var o=t(this),r=o.attr("data-target");r||(r=(r=o.attr("href"))&&r.replace(/.*(?=#[^\s]*$)/,""));var s=t("#"===r?[]:r);e&&e.preventDefault(),s.length||(s=o.closest(".alert")),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i())};var i=t.fn.alert;t.fn.alert=function(e){return this.each(function(){var i=t(this),o=i.data("bs.alert");o||i.data("bs.alert",o=new n(this)),"string"==typeof e&&o[e].call(i)})},t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=i,this},t(document).on("click.bs.alert.data-api",e,n.prototype.close)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.button"),r="object"==typeof e&&e;o||i.data("bs.button",o=new n(this,r)),"toggle"==e?o.toggle():e&&o.setState(e)})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.7",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,o=i.is("input")?"val":"html",r=i.data();e+="Text",null==r.resetText&&i.data("resetText",i[o]()),setTimeout(t.proxy(function(){i[o](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=t(n.target).closest(".btn");e.call(i,"toggle"),t(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),i.is("input,button")?i.trigger("focus"):i.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.carousel"),r=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e),s="string"==typeof e?e:r.slide;o||i.data("bs.carousel",o=new n(this,r)),"number"==typeof e?o.to(e):s?o[s]():r.interval&&o.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e);if(("prev"==t&&0===n||"next"==t&&n==this.$items.length-1)&&!this.options.wrap)return e;var i=(n+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(i)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(e,i){var o=this.$element.find(".item.active"),r=i||this.getItemForDirection(e,o),s=this.interval,a="next"==e?"left":"right",l=this;if(r.hasClass("active"))return this.sliding=!1;var c=r[0],u=t.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=t(this.$indicators.children()[this.getItemIndex(r)]);h&&h.addClass("active")}var d=t.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),r[0].offsetWidth,o.addClass(a),r.addClass(a),o.one("bsTransitionEnd",function(){r.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(d)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(o.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(d)),s&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this};var o=function(n){var i,o=t(this),r=t(o.attr("data-target")||(i=o.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var s=t.extend({},r.data(),o.data()),a=o.attr("data-slide-to");a&&(s.interval=!1),e.call(r,s),a&&r.data("bs.carousel").to(a),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery),function(t){"use strict";function e(e){var n,i=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(i)}function n(e){return this.each(function(){var n=t(this),o=n.data("bs.collapse"),r=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||n.data("bs.collapse",o=new i(this,r)),"string"==typeof e&&o[e]()})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.3.7",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"),e&&e.transitioning))){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){o&&o.length&&(n.call(o,"hide"),e||o.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[s](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[n](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(i.TRANSITION_DURATION):o.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,i){var o=t(i);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var o=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var o=t(this);o.attr("data-target")||i.preventDefault();var r=e(o),s=r.data("bs.collapse")?"toggle":o.data();n.call(r,s)})}(jQuery),function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=(n=e.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&t(n);return i&&i.length?i:e.parent()}function n(n){n&&3===n.which||(t(i).remove(),t(o).each(function(){var i=t(this),o=e(i),r={relatedTarget:this};o.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(o[0],n.target)||(o.trigger(n=t.Event("hide.bs.dropdown",r)),n.isDefaultPrevented()||(i.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))}))}var i=".dropdown-backdrop",o='[data-toggle="dropdown"]',r=function(e){t(e).on("click.bs.dropdown",this.toggle)};r.VERSION="3.3.7",r.prototype.toggle=function(i){var o=t(this);if(!o.is(".disabled, :disabled")){var r=e(o),s=r.hasClass("open");if(n(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var a={relatedTarget:this};if(r.trigger(i=t.Event("show.bs.dropdown",a)),i.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},r.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var r=e(i),s=r.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&r.find(o).trigger("focus"),i.trigger("click");var a=r.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var l=a.index(n.target);38==n.which&&l>0&&l--,40==n.which&&l<a.length-1&&l++,~l||(l=0),a.eq(l).trigger("focus")}}}};var s=t.fn.dropdown;t.fn.dropdown=function(e){return this.each(function(){var n=t(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),"string"==typeof e&&i[e].call(n)})},t.fn.dropdown.Constructor=r,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=s,this},t(document).on("click.bs.dropdown.data-api",n).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",o,r.prototype.toggle).on("keydown.bs.dropdown.data-api",o,r.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",r.prototype.keydown)}(jQuery),function(t){"use strict";function e(e,i){return this.each(function(){var o=t(this),r=o.data("bs.modal"),s=t.extend({},n.DEFAULTS,o.data(),"object"==typeof e&&e);r||o.data("bs.modal",r=new n(this,s)),"string"==typeof e?r[e](i):s.show&&r.show(i)})}var n=function(e,n){this.options=n,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},n.prototype.show=function(e){var i=this,o=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(o),this.isShown||o.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){i.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(i.$element)&&(i.ignoreBackdropClick=!0)})}),this.backdrop(function(){var o=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),o&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus();var r=t.Event("shown.bs.modal",{relatedTarget:e});o?i.$dialog.one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(n.TRANSITION_DURATION):i.$element.trigger("focus").trigger(r)}))},n.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(e){var i=this,o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=t.support.transition&&o;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+o).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;r?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):s()}else e&&e()},n.prototype.handleUpdate=function(){this.adjustDialog()},n.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},n.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var i=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=n,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var i=t(this),o=i.attr("href"),r=t(i.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,"")),s=r.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(o)&&o},r.data(),i.data());i.is("a")&&n.preventDefault(),r.one("show.bs.modal",function(t){t.isDefaultPrevented()||r.one("hidden.bs.modal",function(){i.is(":visible")&&i.trigger("focus")})}),e.call(r,s,this)})}(jQuery),function(t){"use strict";var e=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};e.VERSION="3.3.7",e.TRANSITION_DURATION=150,e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},e.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),r=o.length;r--;){var s=o[r];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",l="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return(e=t.extend({},this.getDefaults(),this.$element.data(),e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,i){n[t]!=i&&(e[t]=i)}),e},e.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},e.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},e.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue())return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},e.prototype.show=function(){var n=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(n);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(n.isDefaultPrevented()||!i)return;var o=this,r=this.tip(),s=this.getUID(this.type);this.setContent(),r.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,c=l.test(a);c&&(a=a.replace(l,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var u=this.getPosition(),h=r[0].offsetWidth,d=r[0].offsetHeight;if(c){var p=a,f=this.getPosition(this.$viewport);a="bottom"==a&&u.bottom+d>f.bottom?"top":"top"==a&&u.top-d<f.top?"bottom":"right"==a&&u.right+h>f.width?"left":"left"==a&&u.left-h<f.left?"right":a,r.removeClass(p).addClass(a)}var g=this.getCalculatedOffset(a,u,h,d);this.applyPlacement(g,a);var m=function(){var t=o.hoverState;o.$element.trigger("shown.bs."+o.type),o.hoverState=null,"out"==t&&o.leave(o)};t.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",m).emulateTransitionEnd(e.TRANSITION_DURATION):m()}},e.prototype.applyPlacement=function(e,n){var i=this.tip(),o=i[0].offsetWidth,r=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top+=s,e.left+=a,t.offset.setOffset(i[0],t.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),i.addClass("in");var l=i[0].offsetWidth,c=i[0].offsetHeight;"top"==n&&c!=r&&(e.top=e.top+r-c);var u=this.getViewportAdjustedDelta(n,e,l,c);u.left?e.left+=u.left:e.top+=u.top;var h=/top|bottom/.test(n),d=h?2*u.left-o+l:2*u.top-r+c,p=h?"offsetWidth":"offsetHeight";i.offset(e),this.replaceArrow(d,i[0][p],h)},e.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},e.prototype.hide=function(n){function i(){"in"!=o.hoverState&&r.detach(),o.$element&&o.$element.removeAttr("aria-describedby").trigger("hidden.bs."+o.type),n&&n()}var o=this,r=t(this.$tip),s=t.Event("hide.bs."+this.type);if(this.$element.trigger(s),!s.isDefaultPrevented())return r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",i).emulateTransitionEnd(e.TRANSITION_DURATION):i(),this.hoverState=null,this},e.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},e.prototype.hasContent=function(){return this.getTitle()},e.prototype.getPosition=function(e){var n=(e=e||this.$element)[0],i="BODY"==n.tagName,o=n.getBoundingClientRect();null==o.width&&(o=t.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var r=window.SVGElement&&n instanceof window.SVGElement,s=i?{top:0,left:0}:r?null:e.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},l=i?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},o,a,l,s)},e.prototype.getCalculatedOffset=function(t,e,n,i){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-i,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-i/2,left:e.left-n}:{top:e.top+e.height/2-i/2,left:e.left+e.width}},e.prototype.getViewportAdjustedDelta=function(t,e,n,i){var o={top:0,left:0};if(!this.$viewport)return o;var r=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-r-s.scroll,l=e.top+r-s.scroll+i;a<s.top?o.top=s.top-a:l>s.top+s.height&&(o.top=s.top+s.height-l)}else{var c=e.left-r,u=e.left+r+n;c<s.left?o.left=s.left-c:u>s.right&&(o.left=s.left+s.width-u)}return o},e.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},e.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},e.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.toggleEnabled=function(){this.enabled=!this.enabled},e.prototype.toggle=function(e){var n=this;e&&((n=t(e.currentTarget).data("bs."+this.type))||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},e.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var n=t.fn.tooltip;t.fn.tooltip=function(n){return this.each(function(){var i=t(this),o=i.data("bs.tooltip"),r="object"==typeof n&&n;!o&&/destroy|hide/.test(n)||(o||i.data("bs.tooltip",o=new e(this,r)),"string"==typeof n&&o[n]())})},t.fn.tooltip.Constructor=e,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=n,this}}(jQuery),function(t){"use strict";var e=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");e.VERSION="3.3.7",e.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=t.fn.popover;t.fn.popover=function(n){return this.each(function(){var i=t(this),o=i.data("bs.popover"),r="object"==typeof n&&n;!o&&/destroy|hide/.test(n)||(o||i.data("bs.popover",o=new e(this,r)),"string"==typeof n&&o[n]())})},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery),function(t){"use strict";function e(n,i){this.$body=t(document.body),this.$scrollElement=t(t(n).is(document.body)?window:n),this.options=t.extend({},e.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var i=t(this),o=i.data("bs.scrollspy"),r="object"==typeof n&&n;o||i.data("bs.scrollspy",o=new e(this,r)),"string"==typeof n&&o[n]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),o=e.data("target")||e.attr("href"),r=/^#./.test(o)&&t(o);return r&&r.length&&r.is(":visible")&&[[r[n]().top+i,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),o=this.offsets,r=this.targets,s=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=i)return s!=(t=r[r.length-1])&&this.activate(t);if(s&&e<o[0])return this.activeTarget=null,this.clear();for(t=o.length;t--;)s!=r[t]&&e>=o[t]&&(void 0===o[t+1]||e<o[t+1])&&this.activate(r[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var n=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',i=t(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var i=t.fn.scrollspy;t.fn.scrollspy=n,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=i,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);n.call(e,e.data())})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.tab");o||i.data("bs.tab",o=new n(this)),"string"==typeof e&&o[e]()})}var n=function(e){this.element=t(e)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.show=function(){var e=this.element,n=e.closest("ul:not(.dropdown-menu)"),i=e.data("target");if(i||(i=(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var o=n.find(".active:last a"),r=t.Event("hide.bs.tab",{relatedTarget:e[0]}),s=t.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(r),e.trigger(s),!s.isDefaultPrevented()&&!r.isDefaultPrevented()){var a=t(i);this.activate(e.closest("li"),n),this.activate(a,a.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})}}},n.prototype.activate=function(e,i,o){function r(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var s=i.find("> .active"),a=o&&t.support.transition&&(s.length&&s.hasClass("fade")||!!i.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",r).emulateTransitionEnd(n.TRANSITION_DURATION):r(),s.removeClass("in")};var i=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var o=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.affix"),r="object"==typeof e&&e;o||i.data("bs.affix",o=new n(this,r)),"string"==typeof e&&o[e]()})}var n=function(e,i){this.options=t.extend({},n.DEFAULTS,i),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.7",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,i){var o=this.$target.scrollTop(),r=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return o<n&&"top";if("bottom"==this.affixed)return null!=n?!(o+this.unpin<=r.top)&&"bottom":!(o+s<=t-i)&&"bottom";var a=null==this.affixed,l=a?o:r.top;return null!=n&&o<=n?"top":null!=i&&l+(a?s:e)>=t-i&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,o=i.top,r=i.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(r=o=i),"function"==typeof o&&(o=i.top(this.$element)),"function"==typeof r&&(r=i.bottom(this.$element));var a=this.getState(s,e,o,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),c=t.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-e-r})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)})})}(jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(t){"use strict";var e=function(e,n){t.each(["autofocus","savable","hideable","width","height","resize","iconlibrary","language","footer","fullscreen","hiddenButtons","disabledButtons"],function(i,o){void 0!==t(e).data(o)&&((n="object"==typeof n?n:{})[o]=t(e).data(o))}),this.$ns="bootstrap-markdown",this.$element=t(e),this.$editable={el:null,type:null,attrKeys:[],attrValues:[],content:null},this.$options=t.extend(!0,{},t.fn.markdown.defaults,n,this.$element.data("options")),this.$oldContent=null,this.$isPreview=!1,this.$isFullscreen=!1,this.$editor=null,this.$textarea=null,this.$handler=[],this.$callback=[],this.$nextTab=[],this.showEditor()};e.prototype={constructor:e,__alterButtons:function(e,n){var i=this.$handler,o="all"==e,r=this;t.each(i,function(t,i){!1===(!o&&i.indexOf(e)<0)&&n(r.$editor.find('button[data-handler="'+i+'"]'))})},__buildButtons:function(e,n){var i,o=this.$ns,r=this.$handler,s=this.$callback;for(i=0;i<e.length;i++){var a,l=e[i];for(a=0;a<l.length;a++){var c,u=l[a].data,h=t("<div/>",{class:"btn-group"});for(c=0;c<u.length;c++){var d,p,f=u[c],g=o+"-"+f.name,m=this.__getIcon(f.icon),v=f.btnText?f.btnText:"",y=f.btnClass?f.btnClass:"btn",b=f.tabIndex?f.tabIndex:"-1",x=void 0!==f.hotkey?f.hotkey:"",w=void 0!==jQuery.hotkeys&&""!==x?" ("+x+")":"";(d=t("<button></button>")).text(" "+this.__localize(v)).addClass("btn-default btn-sm").addClass(y),y.match(/btn\-(primary|success|info|warning|danger|link)/)&&d.removeClass("btn-default"),d.attr({type:"button",title:this.__localize(f.title)+w,tabindex:b,"data-provider":o,"data-handler":g,"data-hotkey":x}),!0===f.toggle&&d.attr("data-toggle","button"),(p=t("<span/>")).addClass(m),p.prependTo(d),h.append(d),r.push(g),s.push(f.callback)}n.append(h)}}return n},__setListener:function(){var e=void 0!==this.$textarea.attr("rows"),n=this.$textarea.val().split("\n").length>5?this.$textarea.val().split("\n").length:"5",i=e?this.$textarea.attr("rows"):n;this.$textarea.attr("rows",i),this.$options.resize&&this.$textarea.css("resize",this.$options.resize),this.$textarea.on({focus:t.proxy(this.focus,this),keyup:t.proxy(this.keyup,this),change:t.proxy(this.change,this),select:t.proxy(this.select,this)}),this.eventSupported("keydown")&&this.$textarea.on("keydown",t.proxy(this.keydown,this)),this.eventSupported("keypress")&&this.$textarea.on("keypress",t.proxy(this.keypress,this)),this.$textarea.data("markdown",this)},__handle:function(e){var n=t(e.currentTarget),i=this.$handler,o=this.$callback,r=n.attr("data-handler"),s=o[i.indexOf(r)];t(e.currentTarget).focus(),s(this),this.change(this),r.indexOf("cmdSave")<0&&this.$textarea.focus(),e.preventDefault()},__localize:function(e){var n=t.fn.markdown.messages,i=this.$options.language;return void 0!==n&&void 0!==n[i]&&void 0!==n[i][e]?n[i][e]:e},__getIcon:function(t){return"object"==typeof t?t[this.$options.iconlibrary]:t},setFullscreen:function(e){var n=this.$editor,i=this.$textarea;!0===e?(n.addClass("md-fullscreen-mode"),t("body").addClass("md-nooverflow"),this.$options.onFullscreen(this)):(n.removeClass("md-fullscreen-mode"),t("body").removeClass("md-nooverflow"),1==this.$isPreview&&this.hidePreview().showPreview()),this.$isFullscreen=e,i.focus()},showEditor:function(){var e,n=this,i=this.$ns,o=this.$element,r=(o.css("height"),o.css("width"),this.$editable),s=this.$handler,a=this.$callback,l=this.$options,c=t("<div/>",{class:"md-editor",click:function(){n.focus()}});if(null===this.$editor){var u=t("<div/>",{class:"md-header btn-toolbar"}),h=[];if(l.buttons.length>0&&(h=h.concat(l.buttons[0])),l.additionalButtons.length>0&&t.each(l.additionalButtons[0],function(e,n){var i=t.grep(h,function(t,e){return t.name===n.name});i.length>0?i[0].data=i[0].data.concat(n.data):h.push(l.additionalButtons[0][e])}),l.reorderButtonGroups.length>0&&(h=h.filter(function(t){return l.reorderButtonGroups.indexOf(t.name)>-1}).sort(function(t,e){return l.reorderButtonGroups.indexOf(t.name)<l.reorderButtonGroups.indexOf(e.name)?-1:l.reorderButtonGroups.indexOf(t.name)>l.reorderButtonGroups.indexOf(e.name)?1:0})),h.length>0&&(u=this.__buildButtons([h],u)),l.fullscreen.enable&&u.append('<div class="md-controls"><a class="md-control md-control-fullscreen" href="#"><span class="'+this.__getIcon(l.fullscreen.icons.fullscreenOn)+'"></span></a></div>').on("click",".md-control-fullscreen",function(t){t.preventDefault(),n.setFullscreen(!0)}),c.append(u),o.is("textarea"))o.before(c),(e=o).addClass("md-input"),c.append(e);else{var d="function"==typeof toMarkdown?toMarkdown(o.html()):o.html(),p=t.trim(d);e=t("<textarea/>",{class:"md-input",val:p}),c.append(e),r.el=o,r.type=o.prop("tagName").toLowerCase(),r.content=o.html(),t(o[0].attributes).each(function(){r.attrKeys.push(this.nodeName),r.attrValues.push(this.nodeValue)}),o.replaceWith(c)}var f,g=t("<div/>",{class:"md-footer"}),m=!1;if(l.savable){m=!0;s.push("cmdSave"),a.push(l.onSave),g.append('<button class="btn btn-success" data-provider="'+i+'" data-handler="cmdSave"><i class="icon icon-white icon-ok"></i> '+this.__localize("Save")+"</button>")}if(f="function"==typeof l.footer?l.footer(this):l.footer,""!==t.trim(f)&&(m=!0,g.append(f)),m&&c.append(g),l.width&&"inherit"!==l.width&&(jQuery.isNumeric(l.width)?(c.css("display","table"),e.css("width",l.width+"px")):c.addClass(l.width)),l.height&&"inherit"!==l.height)if(jQuery.isNumeric(l.height)){var v=l.height;u&&(v=Math.max(0,v-u.outerHeight())),g&&(v=Math.max(0,v-g.outerHeight())),e.css("height",v+"px")}else c.addClass(l.height);this.$editor=c,this.$textarea=e,this.$editable=r,this.$oldContent=this.getContent(),this.__setListener(),this.$editor.attr("id",(new Date).getTime()),this.$editor.on("click",'[data-provider="bootstrap-markdown"]',t.proxy(this.__handle,this)),(this.$element.is(":disabled")||this.$element.is("[readonly]"))&&(this.$editor.addClass("md-editor-disabled"),this.disableButtons("all")),this.eventSupported("keydown")&&"object"==typeof jQuery.hotkeys&&u.find('[data-provider="bootstrap-markdown"]').each(function(){var n=t(this),i=n.attr("data-hotkey");""!==i.toLowerCase()&&e.bind("keydown",i,function(){return n.trigger("click"),!1})}),"preview"===l.initialstate?this.showPreview():"fullscreen"===l.initialstate&&l.fullscreen.enable&&this.setFullscreen(!0)}else this.$editor.show();return l.autofocus&&(this.$textarea.focus(),this.$editor.addClass("active")),l.fullscreen.enable&&!1!==l.fullscreen&&(this.$editor.append('<div class="md-fullscreen-controls"><a href="#" class="exit-fullscreen" title="Exit fullscreen"><span class="'+this.__getIcon(l.fullscreen.icons.fullscreenOff)+'"></span></a></div>'),this.$editor.on("click",".exit-fullscreen",function(t){t.preventDefault(),n.setFullscreen(!1)})),this.hideButtons(l.hiddenButtons),this.disableButtons(l.disabledButtons),l.onShow(this),this},parseContent:function(t){t=t||this.$textarea.val();return this.$options.parser?this.$options.parser(t):"object"==typeof markdown?markdown.toHTML(t):"function"==typeof marked?marked(t):t},showPreview:function(){var e,n,i=this.$options,o=this.$textarea,r=o.next(),s=t("<div/>",{class:"md-preview","data-provider":"markdown-preview"});return 1==this.$isPreview?this:(this.$isPreview=!0,this.disableButtons("all").enableButtons("cmdPreview"),e="string"==typeof(n=i.onPreview(this))?n:this.parseContent(),s.html(e),r&&"md-footer"==r.attr("class")?s.insertBefore(r):o.parent().append(s),s.css({width:o.outerWidth()+"px",height:o.outerHeight()+"px"}),this.$options.resize&&s.css("resize",this.$options.resize),o.hide(),s.data("markdown",this),(this.$element.is(":disabled")||this.$element.is("[readonly]"))&&(this.$editor.addClass("md-editor-disabled"),this.disableButtons("all")),this)},hidePreview:function(){return this.$isPreview=!1,this.$editor.find('div[data-provider="markdown-preview"]').remove(),this.enableButtons("all"),this.disableButtons(this.$options.disabledButtons),this.$textarea.show(),this.__setListener(),this},isDirty:function(){return this.$oldContent!=this.getContent()},getContent:function(){return this.$textarea.val()},setContent:function(t){return this.$textarea.val(t),this},findSelection:function(t){var e;if((e=this.getContent().indexOf(t))>=0&&t.length>0){var n,i=this.getSelection();return this.setSelection(e,e+t.length),n=this.getSelection(),this.setSelection(i.start,i.end),n}return null},getSelection:function(){var t=this.$textarea[0];return("selectionStart"in t&&function(){var e=t.selectionEnd-t.selectionStart;return{start:t.selectionStart,end:t.selectionEnd,length:e,text:t.value.substr(t.selectionStart,e)}}||function(){return null})()},setSelection:function(t,e){var n=this.$textarea[0];return("selectionStart"in n&&function(){n.selectionStart=t,n.selectionEnd=e}||function(){return null})()},replaceSelection:function(t){var e=this.$textarea[0];return("selectionStart"in e&&function(){return e.value=e.value.substr(0,e.selectionStart)+t+e.value.substr(e.selectionEnd,e.value.length),e.selectionStart=e.value.length,this}||function(){return e.value+=t,jQuery(e)})()},getNextTab:function(){if(0===this.$nextTab.length)return null;var t,e=this.$nextTab.shift();return"function"==typeof e?t=e():"object"==typeof e&&e.length>0&&(t=e),t},setNextTab:function(t,e){if("string"==typeof t){var n=this;this.$nextTab.push(function(){return n.findSelection(t)})}else if("number"==typeof t&&"number"==typeof e){var i=this.getSelection();this.setSelection(t,e),this.$nextTab.push(this.getSelection()),this.setSelection(i.start,i.end)}},__parseButtonNameParam:function(t){return"string"==typeof t?t.split(" "):t},enableButtons:function(e){var n=this.__parseButtonNameParam(e),i=this;return t.each(n,function(t,e){i.__alterButtons(n[t],function(t){t.removeAttr("disabled")})}),this},disableButtons:function(e){var n=this.__parseButtonNameParam(e),i=this;return t.each(n,function(t,e){i.__alterButtons(n[t],function(t){t.attr("disabled","disabled")})}),this},hideButtons:function(e){var n=this.__parseButtonNameParam(e),i=this;return t.each(n,function(t,e){i.__alterButtons(n[t],function(t){t.addClass("hidden")})}),this},showButtons:function(e){var n=this.__parseButtonNameParam(e),i=this;return t.each(n,function(t,e){i.__alterButtons(n[t],function(t){t.removeClass("hidden")})}),this},eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},keyup:function(t){var e=!1;switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:var n;if(null!==(n=this.getNextTab())){var i=this;setTimeout(function(){i.setSelection(n.start,n.end)},500),e=!0}else{var o=this.getSelection();o.start==o.end&&o.end==this.getContent().length?e=!1:(this.setSelection(this.getContent().length,this.getContent().length),e=!0)}break;case 13:e=!1;break;case 27:this.$isFullscreen&&this.setFullscreen(!1),e=!1;break;default:e=!1}e&&(t.stopPropagation(),t.preventDefault()),this.$options.onChange(this)},change:function(t){return this.$options.onChange(this),this},select:function(t){return this.$options.onSelect(this),this},focus:function(e){var n=this.$options,i=(n.hideable,this.$editor);return i.addClass("active"),t(document).find(".md-editor").each(function(){var e;t(this).attr("id")!==i.attr("id")&&(null===(e=t(this).find("textarea").data("markdown"))&&(e=t(this).find('div[data-provider="markdown-preview"]').data("markdown")),e&&e.blur())}),n.onFocus(this),this},blur:function(e){var n=this.$options,i=n.hideable,o=this.$editor,r=this.$editable;if(o.hasClass("active")||0===this.$element.parent().length){if(o.removeClass("active"),i)if(null!==r.el){var s=t("<"+r.type+"/>"),a=this.getContent(),l=this.parseContent(a);t(r.attrKeys).each(function(t,e){s.attr(r.attrKeys[t],r.attrValues[t])}),s.html(l),o.replaceWith(s)}else o.hide();n.onBlur(this)}return this}};var n=t.fn.markdown;t.fn.markdown=function(n){return this.each(function(){var i=t(this),o=i.data("markdown"),r="object"==typeof n&&n;o||i.data("markdown",o=new e(this,r))})},t.fn.markdown.messages={},t.fn.markdown.defaults={autofocus:!1,hideable:!1,savable:!1,width:"inherit",height:"inherit",resize:"none",iconlibrary:"glyph",language:"en",initialstate:"editor",parser:null,buttons:[[{name:"groupFont",data:[{name:"cmdBold",hotkey:"Ctrl+B",title:"Bold",icon:{glyph:"glyphicon glyphicon-bold",fa:"fa fa-bold","fa-3":"icon-bold"},callback:function(t){var e,n,i=t.getSelection(),o=t.getContent();e=0===i.length?t.__localize("strong text"):i.text,"**"===o.substr(i.start-2,2)&&"**"===o.substr(i.end,2)?(t.setSelection(i.start-2,i.end+2),t.replaceSelection(e),n=i.start-2):(t.replaceSelection("**"+e+"**"),n=i.start+2),t.setSelection(n,n+e.length)}},{name:"cmdItalic",title:"Italic",hotkey:"Ctrl+I",icon:{glyph:"glyphicon glyphicon-italic",fa:"fa fa-italic","fa-3":"icon-italic"},callback:function(t){var e,n,i=t.getSelection(),o=t.getContent();e=0===i.length?t.__localize("emphasized text"):i.text,"_"===o.substr(i.start-1,1)&&"_"===o.substr(i.end,1)?(t.setSelection(i.start-1,i.end+1),t.replaceSelection(e),n=i.start-1):(t.replaceSelection("_"+e+"_"),n=i.start+1),t.setSelection(n,n+e.length)}},{name:"cmdHeading",title:"Heading",hotkey:"Ctrl+H",icon:{glyph:"glyphicon glyphicon-header",fa:"fa fa-header","fa-3":"icon-font"},callback:function(t){var e,n,i,o,r=t.getSelection(),s=t.getContent();e=0===r.length?t.__localize("heading text"):r.text+"\n",i=4,"### "===s.substr(r.start-i,i)||(i=3,"###"===s.substr(r.start-i,i))?(t.setSelection(r.start-i,r.end),t.replaceSelection(e),n=r.start-i):r.start>0&&((o=s.substr(r.start-1,1))&&"\n"!=o)?(t.replaceSelection("\n\n### "+e),n=r.start+6):(t.replaceSelection("### "+e),n=r.start+4),t.setSelection(n,n+e.length)}}]},{name:"groupLink",data:[{name:"cmdUrl",title:"URL/Link",hotkey:"Ctrl+L",icon:{glyph:"glyphicon glyphicon-link",fa:"fa fa-link","fa-3":"icon-link"},callback:function(e){var n,i,o,r=e.getSelection();e.getContent();n=0===r.length?e.__localize("enter link description here"):r.text,o=prompt(e.__localize("Insert Hyperlink"),"http://");var s=new RegExp("^((http|https)://|(mailto:)|(//))[a-z0-9]","i");if(null!==o&&""!==o&&"http://"!==o&&s.test(o)){var a=t("<div>"+o+"</div>").text();e.replaceSelection("["+n+"]("+a+")"),i=r.start+1,e.setSelection(i,i+n.length)}}},{name:"cmdImage",title:"Image",hotkey:"Ctrl+G",icon:{glyph:"glyphicon glyphicon-picture",fa:"fa fa-picture-o","fa-3":"icon-picture"},callback:function(e){var n,i,o,r=e.getSelection();e.getContent();n=0===r.length?e.__localize("enter image description here"):r.text,o=prompt(e.__localize("Insert Image Hyperlink"),"http://");var s=new RegExp("^((http|https)://|(//))[a-z0-9]","i");if(null!==o&&""!==o&&"http://"!==o&&s.test(o)){var a=t("<div>"+o+"</div>").text();e.replaceSelection("+'")'),i=r.start+2,e.setNextTab(e.__localize("enter image title here")),e.setSelection(i,i+n.length)}}}]},{name:"groupMisc",data:[{name:"cmdList",hotkey:"Ctrl+U",title:"Unordered List",icon:{glyph:"glyphicon glyphicon-list",fa:"fa fa-list","fa-3":"icon-list-ul"},callback:function(e){var n,i,o=e.getSelection();e.getContent();if(0===o.length)n=e.__localize("list text here"),e.replaceSelection("- "+n),i=o.start+2;else if(o.text.indexOf("\n")<0)n=o.text,e.replaceSelection("- "+n),i=o.start+2;else{var r=[];n=(r=o.text.split("\n"))[0],t.each(r,function(t,e){r[t]="- "+e}),e.replaceSelection("\n\n"+r.join("\n")),i=o.start+4}e.setSelection(i,i+n.length)}},{name:"cmdListO",hotkey:"Ctrl+O",title:"Ordered List",icon:{glyph:"glyphicon glyphicon-th-list",fa:"fa fa-list-ol","fa-3":"icon-list-ol"},callback:function(e){var n,i,o=e.getSelection();e.getContent();if(0===o.length)n=e.__localize("list text here"),e.replaceSelection("1. "+n),i=o.start+3;else if(o.text.indexOf("\n")<0)n=o.text,e.replaceSelection("1. "+n),i=o.start+3;else{var r=[];n=(r=o.text.split("\n"))[0],t.each(r,function(t,e){r[t]="1. "+e}),e.replaceSelection("\n\n"+r.join("\n")),i=o.start+5}e.setSelection(i,i+n.length)}},{name:"cmdCode",hotkey:"Ctrl+K",title:"Code",icon:{glyph:"glyphicon glyphicon-asterisk",fa:"fa fa-code","fa-3":"icon-code"},callback:function(t){var e,n,i=t.getSelection(),o=t.getContent();e=0===i.length?t.__localize("code text here"):i.text,"```\n"===o.substr(i.start-4,4)&&"\n```"===o.substr(i.end,4)?(t.setSelection(i.start-4,i.end+4),t.replaceSelection(e),n=i.start-4):"`"===o.substr(i.start-1,1)&&"`"===o.substr(i.end,1)?(t.setSelection(i.start-1,i.end+1),t.replaceSelection(e),n=i.start-1):o.indexOf("\n")>-1?(t.replaceSelection("```\n"+e+"\n```"),n=i.start+4):(t.replaceSelection("`"+e+"`"),n=i.start+1),t.setSelection(n,n+e.length)}},{name:"cmdQuote",hotkey:"Ctrl+Q",title:"Quote",icon:{glyph:"glyphicon glyphicon-comment",fa:"fa fa-quote-left","fa-3":"icon-quote-left"},callback:function(e){var n,i,o=e.getSelection();e.getContent();if(0===o.length)n=e.__localize("quote here"),e.replaceSelection("> "+n),i=o.start+2;else if(o.text.indexOf("\n")<0)n=o.text,e.replaceSelection("> "+n),i=o.start+2;else{var r=[];n=(r=o.text.split("\n"))[0],t.each(r,function(t,e){r[t]="> "+e}),e.replaceSelection("\n\n"+r.join("\n")),i=o.start+4}e.setSelection(i,i+n.length)}}]},{name:"groupUtil",data:[{name:"cmdPreview",toggle:!0,hotkey:"Ctrl+P",title:"Preview",btnText:"Preview",btnClass:"btn btn-primary btn-sm",icon:{glyph:"glyphicon glyphicon-search",fa:"fa fa-search","fa-3":"icon-search"},callback:function(t){!1===t.$isPreview?t.showPreview():t.hidePreview()}}]}]],additionalButtons:[],reorderButtonGroups:[],hiddenButtons:[],disabledButtons:[],footer:"",fullscreen:{enable:!0,icons:{fullscreenOn:{fa:"fa fa-expand",glyph:"glyphicon glyphicon-fullscreen","fa-3":"icon-resize-full"},fullscreenOff:{fa:"fa fa-compress",glyph:"glyphicon glyphicon-fullscreen","fa-3":"icon-resize-small"}}},onShow:function(t){},onPreview:function(t){},onSave:function(t){},onBlur:function(t){},onFocus:function(t){},onChange:function(t){},onFullscreen:function(t){},onSelect:function(t){}},t.fn.markdown.Constructor=e,t.fn.markdown.noConflict=function(){return t.fn.markdown=n,this};var i=function(t){var e=t;e.data("markdown")?e.data("markdown").showEditor():e.markdown()};t(document).on("click.markdown.data-api",'[data-provide="markdown-editable"]',function(e){i(t(this)),e.preventDefault()}).on("click focusin",function(e){var n;n=t(document.activeElement),t(document).find(".md-editor").each(function(){var e=t(this),i=n.closest(".md-editor")[0]===this,o=e.find("textarea").data("markdown")||e.find('div[data-provider="markdown-preview"]').data("markdown");o&&!i&&o.blur()})}).ready(function(){t('textarea[data-provide="markdown"]').each(function(){i(t(this))})})}),function(){var t={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:c,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:c,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:c,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};function e(e){this.tokens=[],this.tokens.links={},this.options=e||h.defaults,this.rules=t.normal,this.options.gfm&&(this.options.tables?this.rules=t.tables:this.rules=t.gfm)}t.bullet=/(?:[*+-]|\d+\.)/,t.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,t.item=a(t.item,"gm")(/bull/g,t.bullet)(),t.list=a(t.list)(/bull/g,t.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+t.def.source+")")(),t._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",t.html=a(t.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,t._tag)(),t.paragraph=a(t.paragraph)("hr",t.hr)("heading",t.heading)("lheading",t.lheading)("blockquote",t.blockquote)("tag","<"+t._tag)("def",t.def)(),t.normal=u({},t),t.gfm=u({},t.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),t.gfm.paragraph=a(t.paragraph)("(?!","(?!"+t.gfm.fences.source.replace("\\1","\\2")+"|"+t.list.source.replace("\\1","\\3")+"|")(),t.tables=u({},t.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=t,e.lex=function(t,n){return new e(n).lex(t)},e.prototype.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(t,!0)},e.prototype.token=function(e,n,i){var o,r,s,a,l,c,u,h,d;for(e=e.replace(/^ +$/gm,"");e;)if((s=this.rules.newline.exec(e))&&(e=e.substring(s[0].length),s[0].length>1&&this.tokens.push({type:"space"})),s=this.rules.code.exec(e))e=e.substring(s[0].length),s=s[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?s:s.replace(/\n+$/,"")});else if(s=this.rules.fences.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"code",lang:s[2],text:s[3]||""});else if(s=this.rules.heading.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"heading",depth:s[1].length,text:s[2]});else if(n&&(s=this.rules.nptable.exec(e))){for(e=e.substring(s[0].length),c={type:"table",header:s[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:s[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:s[3].replace(/\n$/,"").split("\n")},h=0;h<c.align.length;h++)/^ *-+: *$/.test(c.align[h])?c.align[h]="right":/^ *:-+: *$/.test(c.align[h])?c.align[h]="center":/^ *:-+ *$/.test(c.align[h])?c.align[h]="left":c.align[h]=null;for(h=0;h<c.cells.length;h++)c.cells[h]=c.cells[h].split(/ *\| */);this.tokens.push(c)}else if(s=this.rules.lheading.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"heading",depth:"="===s[2]?1:2,text:s[1]});else if(s=this.rules.hr.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"hr"});else if(s=this.rules.blockquote.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"blockquote_start"}),s=s[0].replace(/^ *> ?/gm,""),this.token(s,n,!0),this.tokens.push({type:"blockquote_end"});else if(s=this.rules.list.exec(e)){for(e=e.substring(s[0].length),a=s[2],this.tokens.push({type:"list_start",ordered:a.length>1}),o=!1,d=(s=s[0].match(this.rules.item)).length,h=0;h<d;h++)u=(c=s[h]).length,~(c=c.replace(/^ *([*+-]|\d+\.) +/,"")).indexOf("\n ")&&(u-=c.length,c=this.options.pedantic?c.replace(/^ {1,4}/gm,""):c.replace(new RegExp("^ {1,"+u+"}","gm"),"")),this.options.smartLists&&h!==d-1&&(a===(l=t.bullet.exec(s[h+1])[0])||a.length>1&&l.length>1||(e=s.slice(h+1).join("\n")+e,h=d-1)),r=o||/\n\n(?!\s*$)/.test(c),h!==d-1&&(o="\n"===c.charAt(c.length-1),r||(r=o)),this.tokens.push({type:r?"loose_item_start":"list_item_start"}),this.token(c,!1,i),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(s=this.rules.html.exec(e))e=e.substring(s[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===s[1]||"script"===s[1]||"style"===s[1]),text:s[0]});else if(!i&&n&&(s=this.rules.def.exec(e)))e=e.substring(s[0].length),this.tokens.links[s[1].toLowerCase()]={href:s[2],title:s[3]};else if(n&&(s=this.rules.table.exec(e))){for(e=e.substring(s[0].length),c={type:"table",header:s[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:s[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:s[3].replace(/(?: *\| *)?\n$/,"").split("\n")},h=0;h<c.align.length;h++)/^ *-+: *$/.test(c.align[h])?c.align[h]="right":/^ *:-+: *$/.test(c.align[h])?c.align[h]="center":/^ *:-+ *$/.test(c.align[h])?c.align[h]="left":c.align[h]=null;for(h=0;h<c.cells.length;h++)c.cells[h]=c.cells[h].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);this.tokens.push(c)}else if(n&&(s=this.rules.paragraph.exec(e)))e=e.substring(s[0].length),this.tokens.push({type:"paragraph",text:"\n"===s[1].charAt(s[1].length-1)?s[1].slice(0,-1):s[1]});else if(s=this.rules.text.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"text",text:s[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var n={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:c,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)([\s\S]*?[^`])\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:c,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};function i(t,e){if(this.options=e||h.defaults,this.links=t,this.rules=n.normal,this.renderer=this.options.renderer||new o,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=n.breaks:this.rules=n.gfm:this.options.pedantic&&(this.rules=n.pedantic)}function o(t){this.options=t||{}}function r(t){this.tokens=[],this.token=null,this.options=t||h.defaults,this.options.renderer=this.options.renderer||new o,this.renderer=this.options.renderer,this.renderer.options=this.options}function s(t,e){return t.replace(e?/&/g:/&(?!#?\w+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(t,e){return t=t.source,e=e||"",function n(i,o){return i?(o=(o=o.source||o).replace(/(^|[^\[])\^/g,"$1"),t=t.replace(i,o),n):new RegExp(t,e)}}function l(t,e){return baseUrls[" "+t]||(/^[^:]+:\/*[^/]*$/.test(t)?baseUrls[" "+t]=t+"/":baseUrls[" "+t]=t.replace(/[^/]*$/,"")),t=baseUrls[" "+t],"//"===e.slice(0,2)?t.replace(/:[^]*/,":")+e:"/"===e.charAt(0)?t.replace(/(:\/*[^/]*)[^]*/,"$1")+e:t+e}function c(){}function u(t){for(var e,n,i=1;i<arguments.length;i++){e=arguments[i];for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t}function h(t,n,i){if(i||"function"==typeof n){i||(i=n,n=null);var o,a,l=(n=u({},h.defaults,n||{})).highlight,c=0;try{o=e.lex(t,n)}catch(t){return i(t)}a=o.length;var d=function(t){if(t)return n.highlight=l,i(t);var e;try{e=r.parse(o,n)}catch(e){t=e}return n.highlight=l,t?i(t):i(null,e)};if(!l||l.length<3)return d();if(delete n.highlight,!a)return d();for(;c<o.length;c++)!function(t){"code"!==t.type?--a||d():l(t.text,t.lang,function(e,n){return e?d(e):null==n||n===t.text?--a||d():(t.text=n,t.escaped=!0,void(--a||d()))})}(o[c])}else try{return n&&(n=u({},h.defaults,n)),r.parse(e.lex(t,n),n)}catch(t){if(t.message+="\nPlease report this to https://github.com/chjj/marked.",(n||h.defaults).silent)return"<p>An error occured:</p><pre>"+s(t.message+"",!0)+"</pre>";throw t}}n._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,n._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/,n.link=a(n.link)("inside",n._inside)("href",n._href)(),n.reflink=a(n.reflink)("inside",n._inside)(),n.normal=u({},n),n.pedantic=u({},n.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),n.gfm=u({},n.normal,{escape:a(n.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:a(n.text)("]|","~]|")("|","|https?://|")()}),n.breaks=u({},n.gfm,{br:a(n.br)("{2,}","*")(),text:a(n.gfm.text)("{2,}","*")()}),i.rules=n,i.output=function(t,e,n){return new i(e,n).output(t)},i.prototype.output=function(t){for(var e,n,i,o,r="";t;)if(o=this.rules.escape.exec(t))t=t.substring(o[0].length),r+=o[1];else if(o=this.rules.autolink.exec(t))t=t.substring(o[0].length),"@"===o[2]?(n=s(":"===o[1].charAt(6)?this.mangle(o[1].substring(7)):this.mangle(o[1])),i=this.mangle("mailto:")+n):i=n=s(o[1]),r+=this.renderer.link(i,null,n);else if(this.inLink||!(o=this.rules.url.exec(t))){if(o=this.rules.tag.exec(t))!this.inLink&&/^<a /i.test(o[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(o[0])&&(this.inLink=!1),t=t.substring(o[0].length),r+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):s(o[0]):o[0];else if(o=this.rules.link.exec(t))t=t.substring(o[0].length),this.inLink=!0,r+=this.outputLink(o,{href:o[2],title:o[3]}),this.inLink=!1;else if((o=this.rules.reflink.exec(t))||(o=this.rules.nolink.exec(t))){if(t=t.substring(o[0].length),e=(o[2]||o[1]).replace(/\s+/g," "),!(e=this.links[e.toLowerCase()])||!e.href){r+=o[0].charAt(0),t=o[0].substring(1)+t;continue}this.inLink=!0,r+=this.outputLink(o,e),this.inLink=!1}else if(o=this.rules.strong.exec(t))t=t.substring(o[0].length),r+=this.renderer.strong(this.output(o[2]||o[1]));else if(o=this.rules.em.exec(t))t=t.substring(o[0].length),r+=this.renderer.em(this.output(o[2]||o[1]));else if(o=this.rules.code.exec(t))t=t.substring(o[0].length),r+=this.renderer.codespan(s(o[2].trim(),!0));else if(o=this.rules.br.exec(t))t=t.substring(o[0].length),r+=this.renderer.br();else if(o=this.rules.del.exec(t))t=t.substring(o[0].length),r+=this.renderer.del(this.output(o[1]));else if(o=this.rules.text.exec(t))t=t.substring(o[0].length),r+=this.renderer.text(s(this.smartypants(o[0])));else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}else t=t.substring(o[0].length),i=n=s(o[1]),r+=this.renderer.link(i,null,n);return r},i.prototype.outputLink=function(t,e){var n=s(e.href),i=e.title?s(e.title):null;return"!"!==t[0].charAt(0)?this.renderer.link(n,i,this.output(t[1])):this.renderer.image(n,i,s(t[1]))},i.prototype.smartypants=function(t){return this.options.smartypants?t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):t},i.prototype.mangle=function(t){if(!this.options.mangle)return t;for(var e,n="",i=t.length,o=0;o<i;o++)e=t.charCodeAt(o),Math.random()>.5&&(e="x"+e.toString(16)),n+="&#"+e+";";return n},o.prototype.code=function(t,e,n){if(this.options.highlight){var i=this.options.highlight(t,e);null!=i&&i!==t&&(n=!0,t=i)}return e?'<pre><code class="'+this.options.langPrefix+s(e,!0)+'">'+(n?t:s(t,!0))+"\n</code></pre>\n":"<pre><code>"+(n?t:s(t,!0))+"\n</code></pre>"},o.prototype.blockquote=function(t){return"<blockquote>\n"+t+"</blockquote>\n"},o.prototype.html=function(t){return t},o.prototype.heading=function(t,e,n){return"<h"+e+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+t+"</h"+e+">\n"},o.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},o.prototype.list=function(t,e){var n=e?"ol":"ul";return"<"+n+">\n"+t+"</"+n+">\n"},o.prototype.listitem=function(t){return"<li>"+t+"</li>\n"},o.prototype.paragraph=function(t){return"<p>"+t+"</p>\n"},o.prototype.table=function(t,e){return"<table>\n<thead>\n"+t+"</thead>\n<tbody>\n"+e+"</tbody>\n</table>\n"},o.prototype.tablerow=function(t){return"<tr>\n"+t+"</tr>\n"},o.prototype.tablecell=function(t,e){var n=e.header?"th":"td";return(e.align?"<"+n+' style="text-align:'+e.align+'">':"<"+n+">")+t+"</"+n+">\n"},o.prototype.strong=function(t){return"<strong>"+t+"</strong>"},o.prototype.em=function(t){return"<em>"+t+"</em>"},o.prototype.codespan=function(t){return"<code>"+t+"</code>"},o.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},o.prototype.del=function(t){return"<del>"+t+"</del>"},o.prototype.link=function(t,e,n){if(this.options.sanitize){try{var i=decodeURIComponent((o=t,o.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))).replace(/[^\w:]/g,"").toLowerCase()}catch(t){return""}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:")||0===i.indexOf("data:"))return""}var o;this.options.baseUrl&&!originIndependentUrl.test(t)&&(t=l(this.options.baseUrl,t));var r='<a href="'+t+'"';return e&&(r+=' title="'+e+'"'),r+=">"+n+"</a>"},o.prototype.image=function(t,e,n){this.options.baseUrl&&!originIndependentUrl.test(t)&&(t=l(this.options.baseUrl,t));var i='<img src="'+t+'" alt="'+n+'"';return e&&(i+=' title="'+e+'"'),i+=this.options.xhtml?"/>":">"},o.prototype.text=function(t){return t},r.parse=function(t,e,n){return new r(e,n).parse(t)},r.prototype.parse=function(t){this.inline=new i(t.links,this.options,this.renderer),this.tokens=t.reverse();for(var e="";this.next();)e+=this.tok();return e},r.prototype.next=function(){return this.token=this.tokens.pop()},r.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},r.prototype.parseText=function(){for(var t=this.token.text;"text"===this.peek().type;)t+="\n"+this.next().text;return this.inline.output(t)},r.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var t,e,n,i,o="",r="";for(n="",t=0;t<this.token.header.length;t++)({header:!0,align:this.token.align[t]}),n+=this.renderer.tablecell(this.inline.output(this.token.header[t]),{header:!0,align:this.token.align[t]});for(o+=this.renderer.tablerow(n),t=0;t<this.token.cells.length;t++){for(e=this.token.cells[t],n="",i=0;i<e.length;i++)n+=this.renderer.tablecell(this.inline.output(e[i]),{header:!1,align:this.token.align[i]});r+=this.renderer.tablerow(n)}return this.renderer.table(o,r);case"blockquote_start":for(r="";"blockquote_end"!==this.next().type;)r+=this.tok();return this.renderer.blockquote(r);case"list_start":r="";for(var s=this.token.ordered;"list_end"!==this.next().type;)r+=this.tok();return this.renderer.list(r,s);case"list_item_start":for(r="";"list_item_end"!==this.next().type;)r+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(r);case"loose_item_start":for(r="";"list_item_end"!==this.next().type;)r+=this.tok();return this.renderer.listitem(r);case"html":var a=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(a);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}},baseUrls={},originIndependentUrl=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,c.exec=c,h.options=h.setOptions=function(t){return u(h.defaults,t),h},h.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new o,xhtml:!1,baseUrl:null},h.Parser=r,h.parser=r.parse,h.Renderer=o,h.Lexer=e,h.lexer=e.lex,h.InlineLexer=i,h.inlineLexer=i.output,h.parse=h,"undefined"!=typeof module&&"object"==typeof exports?module.exports=h:"function"==typeof define&&define.amd?define(function(){return h}):this.marked=h}.call(function(){return this||("undefined"!=typeof window?window:global)}()),function(t){if("function"==typeof define&&define.amd)define(["jquery"],t);else if("object"==typeof module&&module.exports){var e=require("jquery");module.exports=t(e)}else t(jQuery)}(function(t){if(void 0===t)throw new Error("jQuery.textcomplete requires jQuery");return function(t){"use strict";var e=1;t.fn.textcomplete=function(n,i){var o=Array.prototype.slice.call(arguments);return this.each(function(){var r=t(this),s=r.data("textComplete");if(s||(i||(i={}),i._oid=e++,s=new t.fn.textcomplete.Completer(this,i),r.data("textComplete",s)),"string"==typeof n){if(!s)return;o.shift(),s[n].apply(s,o),"destroy"===n&&r.removeData("textComplete")}else t.each(n,function(e){t.each(["header","footer","placement","maxCount"],function(t){var n;e[t]&&(s.option[t]=e[t],n=t+"as a strategy param is deprecated. Use option.",console.warn&&console.warn(n),delete e[t])})}),s.register(t.fn.textcomplete.Strategy.parse(n,{el:this,$el:r}))})}}(t),function(t){"use strict";function e(n,i){if(this.$el=t(n),this.id="textcomplete"+r++,this.strategies=[],this.views=[],this.option=t.extend({},e.defaults,i),!(this.$el.is("input[type=text]")||this.$el.is("input[type=search]")||this.$el.is("textarea")||n.isContentEditable||"true"==n.contentEditable))throw new Error("textcomplete must be called on a Textarea or a ContentEditable.");if(n===n.ownerDocument.activeElement)this.initialize();else{var o=this;this.$el.one("focus."+this.id,function(){o.initialize()}),this.option.adapter&&"CKEditor"!=this.option.adapter||"undefined"==typeof CKEDITOR||!this.$el.is("textarea")||CKEDITOR.on("instanceReady",function(e){-1==t.inArray(e.editor.id,s)&&(s.push(e.editor.id),e.editor.on("focus",function(n){o.$el=t(e.editor.editable().$),o.option.adapter||(o.option.adapter=t.fn.textcomplete.CKEditor),o.option.ckeditor_instance=e.editor,o.initialize()}))})}}var n,i,o,r=0,s=[];e.defaults={appendTo:"body",className:"",dropdownClassName:"dropdown-menu textcomplete-dropdown",maxCount:10,zIndex:"100",rightEdgeOffset:30},t.extend(e.prototype,{id:null,option:null,strategies:null,adapter:null,dropdown:null,$el:null,$iframe:null,initialize:function(){var e,n,i=this.$el.get(0);if(this.$el.prop("ownerDocument")!==document&&window.frames.length)for(var o=0;o<window.frames.length;o++)if(this.$el.prop("ownerDocument")===window.frames[o].document){this.$iframe=t(window.frames[o].frameElement);break}this.dropdown=new t.fn.textcomplete.Dropdown(i,this,this.option),this.option.adapter?e=this.option.adapter:(n=this.$el.is("textarea")||this.$el.is("input[type=text]")||this.$el.is("input[type=search]")?"number"==typeof i.selectionEnd?"Textarea":"IETextarea":"ContentEditable",e=t.fn.textcomplete[n]),this.adapter=new e(i,this,this.option)},destroy:function(){this.$el.off("."+this.id),this.adapter&&this.adapter.destroy(),this.dropdown&&this.dropdown.destroy(),this.$el=this.adapter=this.dropdown=null},deactivate:function(){this.dropdown&&this.dropdown.deactivate()},trigger:function(t,e){this.dropdown||this.initialize(),null!=t||(t=this.adapter.getTextFromHeadToCaret());var n=this._extractSearchQuery(t);if(n.length){var i=n[1];if(e&&this._term===i&&""!==i)return;this._term=i,this._search.apply(this,n)}else this._term=null,this.dropdown.deactivate()},fire:function(t){var e=Array.prototype.slice.call(arguments,1);return this.$el.trigger(t,e),this},register:function(t){Array.prototype.push.apply(this.strategies,t)},select:function(t,e,n){this._term=null,this.adapter.select(t,e,n),this.fire("change").fire("textComplete:select",t,e),this.adapter.focus()},_clearAtNext:!0,_term:null,_extractSearchQuery:function(e){for(var n=0;n<this.strategies.length;n++){var i=this.strategies[n],o=i.context(e);if(o||""===o){var r=t.isFunction(i.match)?i.match(e):i.match;a=o,"[object String]"===Object.prototype.toString.call(a)&&(e=o);var s=e.match(r);if(s)return[i,s[i.index],s]}}var a;return[]},_search:(n=function(t,e,n,i){var o=this;e.search(n,function(i,r){o.dropdown.shown||o.dropdown.activate(),o._clearAtNext&&(o.dropdown.clear(),o._clearAtNext=!1),o.dropdown.setPosition(o.adapter.getCaretPosition()),o.dropdown.render(o._zip(i,e,n)),r||(t(),o._clearAtNext=!0)},i)},function(){var t=Array.prototype.slice.call(arguments);if(i)o=t;else{i=!0;var e=this;t.unshift(function t(){if(o){var r=o;o=void 0,r.unshift(t),n.apply(e,r)}else i=!1}),n.apply(this,t)}}),_zip:function(e,n,i){return t.map(e,function(t){return{value:t,strategy:n,term:i}})}}),t.fn.textcomplete.Completer=e}(t),function(t){"use strict";function e(n,i,r){this.$el=e.createElement(r),this.completer=i,this.id=i.id+"dropdown",this._data=[],this.$inputEl=t(n),this.option=r,r.listPosition&&(this.setPosition=r.listPosition),r.height&&this.$el.height(r.height);var s=this;t.each(["maxCount","placement","footer","header","noResultsMessage","className"],function(t,e){null!=r[e]&&(s[e]=r[e])}),this._bindEvents(n),o[this.id]=this}var n=t(window),i=function(t,e){var n,i,o=e.strategy.idProperty;for(n=0;n<t.length;n++)if(i=t[n],i.strategy===e.strategy)if(o){if(i.value[o]===e.value[o])return!0}else if(i.value===e.value)return!0;return!1},o={};t(document).on("click",function(e){var n=e.originalEvent&&e.originalEvent.keepTextCompleteDropdown;t.each(o,function(t,e){t!==n&&e.deactivate()})});var r={SKIP_DEFAULT:0,KEY_UP:1,KEY_DOWN:2,KEY_ENTER:3,KEY_PAGEUP:4,KEY_PAGEDOWN:5,KEY_ESCAPE:6};t.extend(e,{createElement:function(e){var n=e.appendTo;return n instanceof t||(n=t(n)),t("<ul></ul>").addClass(e.dropdownClassName).attr("id","textcomplete-dropdown-"+e._oid).css({display:"none",left:0,position:"absolute",zIndex:e.zIndex}).appendTo(n)}}),t.extend(e.prototype,{$el:null,$inputEl:null,completer:null,footer:null,header:null,id:null,maxCount:null,placement:"",shown:!1,data:[],className:"",destroy:function(){this.deactivate(),this.$el.off("."+this.id),this.$inputEl.off("."+this.id),this.clear(),this.$el.remove(),this.$el=this.$inputEl=this.completer=null,delete o[this.id]},render:function(e){var n=this._buildContents(e),i=t.map(e,function(t){return t.value});if(e.length){var o=e[0].strategy;o.id?this.$el.attr("data-strategy",o.id):this.$el.removeAttr("data-strategy"),this._renderHeader(i),this._renderFooter(i),n&&(this._renderContents(n),this._fitToBottom(),this._fitToRight(),this._activateIndexedItem()),this._setScroll()}else this.noResultsMessage?this._renderNoResultsMessage(i):this.shown&&this.deactivate()},setPosition:function(e){var i="absolute";return this.$inputEl.add(this.$inputEl.parents()).each(function(){return"absolute"!==t(this).css("position")&&("fixed"===t(this).css("position")?(e.top-=n.scrollTop(),e.left-=n.scrollLeft(),i="fixed",!1):void 0)}),this.$el.css(this._applyPlacement(e)),this.$el.css({position:i}),this},clear:function(){this.$el.html(""),this.data=[],this._index=0,this._$header=this._$footer=this._$noResultsMessage=null},activate:function(){return this.shown||(this.clear(),this.$el.show(),this.className&&this.$el.addClass(this.className),this.completer.fire("textComplete:show"),this.shown=!0),this},deactivate:function(){return this.shown&&(this.$el.hide(),this.className&&this.$el.removeClass(this.className),this.completer.fire("textComplete:hide"),this.shown=!1),this},isUp:function(t){return 38===t.keyCode||t.ctrlKey&&80===t.keyCode},isDown:function(t){return 40===t.keyCode||t.ctrlKey&&78===t.keyCode},isEnter:function(t){return!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&(13===t.keyCode||9===t.keyCode||!0===this.option.completeOnSpace&&32===t.keyCode)},isPageup:function(t){return 33===t.keyCode},isPagedown:function(t){return 34===t.keyCode},isEscape:function(t){return 27===t.keyCode},_data:null,_index:null,_$header:null,_$noResultsMessage:null,_$footer:null,_bindEvents:function(){this.$el.on("mousedown."+this.id,".textcomplete-item",t.proxy(this._onClick,this)),this.$el.on("touchstart."+this.id,".textcomplete-item",t.proxy(this._onClick,this)),this.$el.on("mouseover."+this.id,".textcomplete-item",t.proxy(this._onMouseover,this)),this.$inputEl.on("keydown."+this.id,t.proxy(this._onKeydown,this))},_onClick:function(e){var n=t(e.target);e.preventDefault(),e.originalEvent.keepTextCompleteDropdown=this.id,n.hasClass("textcomplete-item")||(n=n.closest(".textcomplete-item"));var i=this.data[parseInt(n.data("index"),10)];this.completer.select(i.value,i.strategy,e);var o=this;setTimeout(function(){o.deactivate(),"touchstart"===e.type&&o.$inputEl.focus()},0)},_onMouseover:function(e){var n=t(e.target);e.preventDefault(),n.hasClass("textcomplete-item")||(n=n.closest(".textcomplete-item")),this._index=parseInt(n.data("index"),10),this._activateIndexedItem()},_onKeydown:function(e){var n;if(this.shown)switch(t.isFunction(this.option.onKeydown)&&(n=this.option.onKeydown(e,r)),null==n&&(n=this._defaultKeydown(e)),n){case r.KEY_UP:e.preventDefault(),this._up();break;case r.KEY_DOWN:e.preventDefault(),this._down();break;case r.KEY_ENTER:e.preventDefault(),this._enter(e);break;case r.KEY_PAGEUP:e.preventDefault(),this._pageup();break;case r.KEY_PAGEDOWN:e.preventDefault(),this._pagedown();break;case r.KEY_ESCAPE:e.preventDefault(),this.deactivate()}},_defaultKeydown:function(t){return this.isUp(t)?r.KEY_UP:this.isDown(t)?r.KEY_DOWN:this.isEnter(t)?r.KEY_ENTER:this.isPageup(t)?r.KEY_PAGEUP:this.isPagedown(t)?r.KEY_PAGEDOWN:this.isEscape(t)?r.KEY_ESCAPE:void 0},_up:function(){0===this._index?this._index=this.data.length-1:this._index-=1,this._activateIndexedItem(),this._setScroll()},_down:function(){this._index===this.data.length-1?this._index=0:this._index+=1,this._activateIndexedItem(),this._setScroll()},_enter:function(t){var e=this.data[parseInt(this._getActiveElement().data("index"),10)];this.completer.select(e.value,e.strategy,t),this.deactivate()},_pageup:function(){var e=0,n=this._getActiveElement().position().top-this.$el.innerHeight();this.$el.children().each(function(i){return t(this).position().top+t(this).outerHeight()>n?(e=i,!1):void 0}),this._index=e,this._activateIndexedItem(),this._setScroll()},_pagedown:function(){var e=this.data.length-1,n=this._getActiveElement().position().top+this.$el.innerHeight();this.$el.children().each(function(i){return t(this).position().top>n?(e=i,!1):void 0}),this._index=e,this._activateIndexedItem(),this._setScroll()},_activateIndexedItem:function(){this.$el.find(".textcomplete-item.active").removeClass("active"),this._getActiveElement().addClass("active")},_getActiveElement:function(){return this.$el.children(".textcomplete-item:nth("+this._index+")")},_setScroll:function(){var t=this._getActiveElement(),e=t.position().top,n=t.outerHeight(),i=this.$el.innerHeight(),o=this.$el.scrollTop();0===this._index||this._index==this.data.length-1||0>e?this.$el.scrollTop(e+o):e+n>i&&this.$el.scrollTop(e+n+o-i)},_buildContents:function(t){var e,n,o,r="";for(n=0;n<t.length&&this.data.length!==this.maxCount;n++)e=t[n],i(this.data,e)||(o=this.data.length,this.data.push(e),r+='<li class="textcomplete-item" data-index="'+o+'"><a>',r+=e.strategy.template(e.value,e.term),r+="</a></li>");return r},_renderHeader:function(e){if(this.header){this._$header||(this._$header=t('<li class="textcomplete-header"></li>').prependTo(this.$el));var n=t.isFunction(this.header)?this.header(e):this.header;this._$header.html(n)}},_renderFooter:function(e){if(this.footer){this._$footer||(this._$footer=t('<li class="textcomplete-footer"></li>').appendTo(this.$el));var n=t.isFunction(this.footer)?this.footer(e):this.footer;this._$footer.html(n)}},_renderNoResultsMessage:function(e){if(this.noResultsMessage){this._$noResultsMessage||(this._$noResultsMessage=t('<li class="textcomplete-no-results-message"></li>').appendTo(this.$el));var n=t.isFunction(this.noResultsMessage)?this.noResultsMessage(e):this.noResultsMessage;this._$noResultsMessage.html(n)}},_renderContents:function(t){this._$footer?this._$footer.before(t):this.$el.append(t)},_fitToBottom:function(){var t=n.scrollTop()+n.height(),e=this.$el.height();this.$el.position().top+e>t&&(this.completer.$iframe||this.$el.offset({top:t-e}))},_fitToRight:function(){for(var t,e=this.option.rightEdgeOffset,i=this.$el.offset().left,o=this.$el.width(),r=n.width()-e;i+o>r&&(this.$el.offset({left:i-e}),!((t=this.$el.offset().left)>=i));)i=t},_applyPlacement:function(t){return-1!==this.placement.indexOf("top")?t={top:"auto",bottom:this.$el.parent().height()-t.top+t.lineHeight,left:t.left}:(t.bottom="auto",delete t.lineHeight),-1!==this.placement.indexOf("absleft")?t.left=0:-1!==this.placement.indexOf("absright")&&(t.right=0,t.left="auto"),t}}),t.fn.textcomplete.Dropdown=e,t.extend(t.fn.textcomplete,r)}(t),function(t){"use strict";function e(e){t.extend(this,e),this.cache&&(this.search=n(this.search))}var n=function(t){var e={};return function(n,i){e[n]?i(e[n]):t.call(this,n,function(t){e[n]=(e[n]||[]).concat(t),i.apply(null,arguments)})}};e.parse=function(n,i){return t.map(n,function(t){var n=new e(t);return n.el=i.el,n.$el=i.$el,n})},t.extend(e.prototype,{match:null,replace:null,search:null,id:null,cache:!1,context:function(){return!0},index:2,template:function(t){return t},idProperty:null}),t.fn.textcomplete.Strategy=e}(t),function(t){"use strict";function e(){}var n=Date.now||function(){return(new Date).getTime()};t.extend(e.prototype,{id:null,completer:null,el:null,$el:null,option:null,initialize:function(e,i,o){var r,s,a,l,c,u,h,d;this.el=e,this.$el=t(e),this.id=i.id+this.constructor.name,this.completer=i,this.option=o,this.option.debounce&&(this._onKeyup=(r=this._onKeyup,s=this.option.debounce,d=function(){var t=n()-u;s>t?a=setTimeout(d,s-t):(a=null,h=r.apply(c,l),c=l=null)},function(){return c=this,l=arguments,u=n(),a||(a=setTimeout(d,s)),h})),this._bindEvents()},destroy:function(){this.$el.off("."+this.id),this.$el=this.el=this.completer=null},select:function(){throw new Error("Not implemented")},getCaretPosition:function(){var e=this._getCaretRelativePosition(),n=this.$el.offset(),i=this.option.appendTo;if(i){i instanceof t||(i=t(i));var o=i.offsetParent().offset();n.top-=o.top,n.left-=o.left}return e.top+=n.top,e.left+=n.left,e},focus:function(){this.$el.focus()},_bindEvents:function(){this.$el.on("keyup."+this.id,t.proxy(this._onKeyup,this))},_onKeyup:function(t){this._skipSearch(t)||this.completer.trigger(this.getTextFromHeadToCaret(),!0)},_skipSearch:function(t){switch(t.keyCode){case 9:case 13:case 16:case 17:case 18:case 33:case 34:case 40:case 38:case 27:return!0}if(t.ctrlKey)switch(t.keyCode){case 78:case 80:return!0}}}),t.fn.textcomplete.Adapter=e}(t),function(t){"use strict";function e(t,e,n){this.initialize(t,e,n)}t.extend(e.prototype,t.fn.textcomplete.Adapter.prototype,{select:function(e,n,i){var o,r=this.getTextFromHeadToCaret(),s=this.el.value.substring(this.el.selectionEnd),a=n.replace(e,i);void 0!==a&&(t.isArray(a)&&(s=a[1]+s,a=a[0]),o=t.isFunction(n.match)?n.match(r):n.match,r=r.replace(o,a),this.$el.val(r+s),this.el.selectionStart=this.el.selectionEnd=r.length)},getTextFromHeadToCaret:function(){return this.el.value.substring(0,this.el.selectionEnd)},_getCaretRelativePosition:function(){var e=t.fn.textcomplete.getCaretCoordinates(this.el,this.el.selectionStart);return{top:e.top+this._calculateLineHeight()-this.$el.scrollTop(),left:e.left-this.$el.scrollLeft(),lineHeight:this._calculateLineHeight()}},_calculateLineHeight:function(){var t=parseInt(this.$el.css("line-height"),10);if(isNaN(t)){var e=this.el.parentNode,n=document.createElement(this.el.nodeName),i=this.el.style;n.setAttribute("style","margin:0px;padding:0px;font-family:"+i.fontFamily+";font-size:"+i.fontSize),n.innerHTML="test",e.appendChild(n),t=n.clientHeight,e.removeChild(n)}return t}}),t.fn.textcomplete.Textarea=e}(t),function(t){"use strict";function e(e,i,o){this.initialize(e,i,o),t("<span>"+n+"</span>").css({position:"absolute",top:-9999,left:-9999}).insertBefore(e)}var n="吶";t.extend(e.prototype,t.fn.textcomplete.Textarea.prototype,{select:function(e,n,i){var o,r=this.getTextFromHeadToCaret(),s=this.el.value.substring(r.length),a=n.replace(e,i);if(void 0!==a){t.isArray(a)&&(s=a[1]+s,a=a[0]),o=t.isFunction(n.match)?n.match(r):n.match,r=r.replace(o,a),this.$el.val(r+s),this.el.focus();var l=this.el.createTextRange();l.collapse(!0),l.moveEnd("character",r.length),l.moveStart("character",r.length),l.select()}},getTextFromHeadToCaret:function(){this.el.focus();var t=document.selection.createRange();t.moveStart("character",-this.el.value.length);var e=t.text.split(n);return 1===e.length?e[0]:e[1]}}),t.fn.textcomplete.IETextarea=e}(t),function(t){"use strict";function e(t,e,n){this.initialize(t,e,n)}t.extend(e.prototype,t.fn.textcomplete.Adapter.prototype,{select:function(e,n,i){var o=this.getTextFromHeadToCaret(),r=this.el.ownerDocument.getSelection(),s=r.getRangeAt(0),a=s.cloneRange();a.selectNodeContents(s.startContainer);var l,c=a.toString().substring(s.startOffset),u=n.replace(e,i);if(void 0!==u){t.isArray(u)&&(c=u[1]+c,u=u[0]),l=t.isFunction(n.match)?n.match(o):n.match,o=o.replace(l,u).replace(/ $/," "),s.selectNodeContents(s.startContainer),s.deleteContents();var h=this.el.ownerDocument.createElement("div");h.innerHTML=o;var d=this.el.ownerDocument.createElement("div");d.innerHTML=c;for(var p,f,g=this.el.ownerDocument.createDocumentFragment();p=h.firstChild;)f=g.appendChild(p);for(;p=d.firstChild;)g.appendChild(p);s.insertNode(g),s.setStartAfter(f),s.collapse(!0),r.removeAllRanges(),r.addRange(s)}},_getCaretRelativePosition:function(){var e=this.el.ownerDocument.getSelection().getRangeAt(0).cloneRange(),n=e.endContainer.parentNode,i=this.el.ownerDocument.createElement("span");e.insertNode(i),e.selectNodeContents(i),e.deleteContents(),setTimeout(function(){n.normalize()},0);var o=t(i),r=o.offset();if(r.left-=this.$el.offset().left,r.top+=o.height()-this.$el.offset().top,r.lineHeight=o.height(),this.completer.$iframe){var s=this.completer.$iframe.offset();r.top+=s.top,r.left+=s.left,r.top-=t(this.completer.$iframe[0].contentWindow.document).scrollTop()}return o.remove(),r},getTextFromHeadToCaret:function(){var t=this.el.ownerDocument.getSelection().getRangeAt(0),e=t.cloneRange();return e.selectNodeContents(t.startContainer),e.toString().substring(0,t.startOffset)}}),t.fn.textcomplete.ContentEditable=e}(t),function(t){"use strict";function e(t,e,n){this.initialize(t,e,n)}t.extend(e.prototype,t.fn.textcomplete.ContentEditable.prototype,{_bindEvents:function(){var e=this;this.option.ckeditor_instance.on("key",function(t){var n=t.data;return e._onKeyup(n),(!e.completer.dropdown.shown||!e._skipSearch(n))&&void 0},null,null,1),this.$el.on("keyup."+this.id,t.proxy(this._onKeyup,this))}}),t.fn.textcomplete.CKEditor=e}(t),function(t){var e=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],n="undefined"!=typeof window,i=n&&null!=window.mozInnerScreenX;t.fn.textcomplete.getCaretCoordinates=function(t,o,r){if(!n)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var s=r&&r.debug||!1;if(s){var a=document.querySelector("#input-textarea-caret-position-mirror-div");a&&a.parentNode.removeChild(a)}var l=document.createElement("div");l.id="input-textarea-caret-position-mirror-div",document.body.appendChild(l);var c=l.style,u=window.getComputedStyle?getComputedStyle(t):t.currentStyle;c.whiteSpace="pre-wrap","INPUT"!==t.nodeName&&(c.wordWrap="break-word"),c.position="absolute",s||(c.visibility="hidden"),e.forEach(function(t){c[t]=u[t]}),i?t.scrollHeight>parseInt(u.height)&&(c.overflowY="scroll"):c.overflow="hidden",l.textContent=t.value.substring(0,o),"INPUT"===t.nodeName&&(l.textContent=l.textContent.replace(/\s/g," "));var h=document.createElement("span");h.textContent=t.value.substring(o)||".",l.appendChild(h);var d={top:h.offsetTop+parseInt(u.borderTopWidth),left:h.offsetLeft+parseInt(u.borderLeftWidth)};return s?h.style.backgroundColor="#aaa":document.body.removeChild(l),d}}(t),t}),marked.setOptions({gfm:!0,tables:!0,breaks:!0,pedantic:!1,sanitize:!0,smartLists:!0,smartypants:!1}),$(".flaskbb-editor").markdown({iconlibrary:"fa",additionalButtons:[[{name:"groupHelp",data:[{name:"cmdHelp",toggle:!1,title:"Help",icon:"fa fa-question",btnClass:"btn btn-success",callback:function(t){$("#editor-help").modal("show")}}]}]]}),$(".flaskbb-editor").textcomplete([{match:/\B:([\-+\w]*)$/,search:function(t,e){e($.map(emojies,function(e){return 0===e.indexOf(t)?e:null}))},template:function(t){return'<img class="emoji" src="/static/emoji/'+t+'.png"></img>'+t},replace:function(t){return":"+t+": "},index:1}],{onKeydown:function(t,e){if(t.ctrlKey&&74===t.keyCode)return e.KEY_ENTER}});var emojies=["+1","-1","100","1234","8ball","a","ab","abc","abcd","accept","aerial_tramway","airplane","alarm_clock","alien","ambulance","anchor","angel","anger","angry","anguished","ant","apple","aquarius","aries","arrow_backward","arrow_double_down","arrow_double_up","arrow_down","arrow_down_small","arrow_forward","arrow_heading_down","arrow_heading_up","arrow_left","arrow_lower_left","arrow_lower_right","arrow_right","arrow_right_hook","arrow_up","arrow_up_down","arrow_up_small","arrow_upper_left","arrow_upper_right","arrows_clockwise","arrows_counterclockwise","art","articulated_lorry","astonished","athletic_shoe","atm","b","baby","baby_bottle","baby_chick","baby_symbol","back","baggage_claim","balloon","ballot_box_with_check","bamboo","banana","bangbang","bank","bar_chart","barber","baseball","basketball","bath","bathtub","battery","bear","bee","beer","beers","beetle","beginner","bell","bento","bicyclist","bike","bikini","bird","birthday","black_circle","black_joker","black_large_square","black_medium_small_square","black_medium_square","black_nib","black_small_square","black_square_button","blossom","blowfish","blue_book","blue_car","blue_heart","blush","boar","boat","bomb","book","bookmark","bookmark_tabs","books","boom","boot","bouquet","bow","bowling","bowtie","boy","bread","bride_with_veil","bridge_at_night","briefcase","broken_heart","bug","bulb","bullettrain_front","bullettrain_side","bus","busstop","bust_in_silhouette","busts_in_silhouette","cactus","cake","calendar","calling","camel","camera","cancer","candy","capital_abcd","capricorn","car","card_index","carousel_horse","cat","cat2","cd","chart","chart_with_downwards_trend","chart_with_upwards_trend","checkered_flag","cherries","cherry_blossom","chestnut","chicken","children_crossing","chocolate_bar","christmas_tree","church","cinema","circus_tent","city_sunrise","city_sunset","cl","clap","clapper","clipboard","clock1","clock10","clock1030","clock11","clock1130","clock12","clock1230","clock130","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","closed_book","closed_lock_with_key","closed_umbrella","cloud","clubs","cn","cocktail","coffee","cold_sweat","collision","computer","confetti_ball","confounded","confused","congratulations","construction","construction_worker","convenience_store","cookie","cool","cop","copyright","corn","couple","couple_with_heart","couplekiss","cow","cow2","credit_card","crescent_moon","crocodile","crossed_flags","crown","cry","crying_cat_face","crystal_ball","cupid","curly_loop","currency_exchange","curry","custard","customs","cyclone","dancer","dancers","dango","dart","dash","date","de","deciduous_tree","department_store","diamond_shape_with_a_dot_inside","diamonds","disappointed","disappointed_relieved","dizzy","dizzy_face","do_not_litter","dog","dog2","dollar","dolls","dolphin","door","doughnut","dragon","dragon_face","dress","dromedary_camel","droplet","dvd","e-mail","ear","ear_of_rice","earth_africa","earth_americas","earth_asia","egg","eggplant","eight","eight_pointed_black_star","eight_spoked_asterisk","electric_plug","elephant","email","end","envelope","envelope_with_arrow","es","euro","european_castle","european_post_office","evergreen_tree","exclamation","expressionless","eyeglasses","eyes","facepunch","factory","fallen_leaf","family","fast_forward","fax","fearful","feelsgood","feet","ferris_wheel","file_folder","finnadie","fire","fire_engine","fireworks","first_quarter_moon","first_quarter_moon_with_face","fish","fish_cake","fishing_pole_and_fish","fist","five","flags","flashlight","floppy_disk","flower_playing_cards","flushed","foggy","football","footprints","fork_and_knife","fountain","four","four_leaf_clover","fr","free","fried_shrimp","fries","frog","frowning","fu","fuelpump","full_moon","full_moon_with_face","game_die","gb","gem","gemini","ghost","gift","gift_heart","girl","globe_with_meridians","goat","goberserk","godmode","golf","grapes","green_apple","green_book","green_heart","grey_exclamation","grey_question","grimacing","grin","grinning","guardsman","guitar","gun","haircut","hamburger","hammer","hamster","hand","handbag","hankey","hash","hatched_chick","hatching_chick","headphones","hear_no_evil","heart","heart_decoration","heart_eyes","heart_eyes_cat","heartbeat","heartpulse","hearts","heavy_check_mark","heavy_division_sign","heavy_dollar_sign","heavy_exclamation_mark","heavy_minus_sign","heavy_multiplication_x","heavy_plus_sign","helicopter","herb","hibiscus","high_brightness","high_heel","hocho","honey_pot","honeybee","horse","horse_racing","hospital","hotel","hotsprings","hourglass","hourglass_flowing_sand","house","house_with_garden","hurtrealbad","hushed","ice_cream","icecream","id","ideograph_advantage","imp","inbox_tray","incoming_envelope","information_desk_person","information_source","innocent","interrobang","iphone","it","izakaya_lantern","jack_o_lantern","japan","japanese_castle","japanese_goblin","japanese_ogre","jeans","joy","joy_cat","jp","key","keycap_ten","kimono","kiss","kissing","kissing_cat","kissing_closed_eyes","kissing_heart","kissing_smiling_eyes","koala","koko","kr","lantern","large_blue_circle","large_blue_diamond","large_orange_diamond","last_quarter_moon","last_quarter_moon_with_face","laughing","leaves","ledger","left_luggage","left_right_arrow","leftwards_arrow_with_hook","lemon","leo","leopard","libra","light_rail","link","lips","lipstick","lock","lock_with_ink_pen","lollipop","loop","loudspeaker","love_hotel","love_letter","low_brightness","m","mag","mag_right","mahjong","mailbox","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","man","man_with_gua_pi_mao","man_with_turban","mans_shoe","maple_leaf","mask","massage","meat_on_bone","mega","melon","memo","mens","metal","metro","microphone","microscope","milky_way","minibus","minidisc","mobile_phone_off","money_with_wings","moneybag","monkey","monkey_face","monorail","moon","mortar_board","mount_fuji","mountain_bicyclist","mountain_cableway","mountain_railway","mouse","mouse2","movie_camera","moyai","muscle","mushroom","musical_keyboard","musical_note","musical_score","mute","nail_care","name_badge","neckbeard","necktie","negative_squared_cross_mark","neutral_face","new","new_moon","new_moon_with_face","newspaper","ng","nine","no_bell","no_bicycles","no_entry","no_entry_sign","no_good","no_mobile_phones","no_mouth","no_pedestrians","no_smoking","non-potable_water","nose","notebook","notebook_with_decorative_cover","notes","nut_and_bolt","o","o2","ocean","octocat","octopus","oden","office","ok","ok_hand","ok_woman","older_man","older_woman","on","oncoming_automobile","oncoming_bus","oncoming_police_car","oncoming_taxi","one","open_book","open_file_folder","open_hands","open_mouth","ophiuchus","orange_book","outbox_tray","ox","package","page_facing_up","page_with_curl","pager","palm_tree","panda_face","paperclip","parking","part_alternation_mark","partly_sunny","passport_control","paw_prints","peach","pear","pencil","pencil2","penguin","pensive","performing_arts","persevere","person_frowning","person_with_blond_hair","person_with_pouting_face","phone","pig","pig2","pig_nose","pill","pineapple","pisces","pizza","point_down","point_left","point_right","point_up","point_up_2","police_car","poodle","poop","post_office","postal_horn","postbox","potable_water","pouch","poultry_leg","pound","pouting_cat","pray","princess","punch","purple_heart","purse","pushpin","put_litter_in_its_place","question","rabbit","rabbit2","racehorse","radio","radio_button","rage","rage1","rage2","rage3","rage4","railway_car","rainbow","raised_hand","raised_hands","raising_hand","ram","ramen","rat","recycle","red_car","red_circle","registered","relaxed","relieved","repeat","repeat_one","restroom","revolving_hearts","rewind","ribbon","rice","rice_ball","rice_cracker","rice_scene","ring","rocket","roller_coaster","rooster","rose","rotating_light","round_pushpin","rowboat","ru","rugby_football","runner","running","running_shirt_with_sash","sa","sagittarius","sailboat","sake","sandal","santa","satellite","satisfied","saxophone","school","school_satchel","scissors","scorpius","scream","scream_cat","scroll","seat","secret","see_no_evil","seedling","seven","shaved_ice","sheep","shell","ship","shipit","shirt","shit","shoe","shower","signal_strength","six","six_pointed_star","ski","skull","sleeping","sleepy","slot_machine","small_blue_diamond","small_orange_diamond","small_red_triangle","small_red_triangle_down","smile","smile_cat","smiley","smiley_cat","smiling_imp","smirk","smirk_cat","smoking","snail","snake","snowboarder","snowflake","snowman","sob","soccer","soon","sos","sound","space_invader","spades","spaghetti","sparkle","sparkler","sparkles","sparkling_heart","speak_no_evil","speaker","speech_balloon","speedboat","squirrel","star","star2","stars","station","statue_of_liberty","steam_locomotive","stew","straight_ruler","strawberry","stuck_out_tongue","stuck_out_tongue_closed_eyes","stuck_out_tongue_winking_eye","sun_with_face","sunflower","sunglasses","sunny","sunrise","sunrise_over_mountains","surfer","sushi","suspect","suspension_railway","sweat","sweat_drops","sweat_smile","sweet_potato","swimmer","symbols","syringe","tada","tanabata_tree","tangerine","taurus","taxi","tea","telephone","telephone_receiver","telescope","tennis","tent","thought_balloon","three","thumbsdown","thumbsup","ticket","tiger","tiger2","tired_face","tm","toilet","tokyo_tower","tomato","tongue","top","tophat","tractor","traffic_light","train","train2","tram","triangular_flag_on_post","triangular_ruler","trident","triumph","trolleybus","trollface","trophy","tropical_drink","tropical_fish","truck","trumpet","tshirt","tulip","turtle","tv","twisted_rightwards_arrows","two","two_hearts","two_men_holding_hands","two_women_holding_hands","u5272","u5408","u55b6","u6307","u6708","u6709","u6e80","u7121","u7533","u7981","u7a7a","uk","umbrella","unamused","underage","unlock","up","us","v","vertical_traffic_light","vhs","vibration_mode","video_camera","video_game","violin","virgo","volcano","vs","walking","waning_crescent_moon","waning_gibbous_moon","warning","watch","water_buffalo","watermelon","wave","wavy_dash","waxing_crescent_moon","waxing_gibbous_moon","wc","weary","wedding","whale","whale2","wheelchair","white_check_mark","white_circle","white_flower","white_large_square","white_medium_small_square","white_medium_square","white_small_square","white_square_button","wind_chime","wine_glass","wink","wolf","woman","womans_clothes","womans_hat","womens","worried","wrench","x","yellow_heart","yen","yum","zap","zero","zzz"],csrftoken=$("meta[name=csrf-token]").attr("content"),show_management_search=function(){var t=$(".management-body").find(".search-form");t.slideToggle(function(){"none"!=t.css("display")&&t.find("input").focus()})},flash_message=function(t){var e=$("#flashed-messages"),n='<div class="alert alert-'+t.category+'">';"success"==t.category?n+='<span class="glyphicon glyphicon-ok-sign"></span> ':"error"==t.category?n+='<span class="glyphicon glyphicon-exclamation-sign"></span> ':n+='<span class="glyphicon glyphicon-info-sign"></span> ',n+='<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>'+t.message+"</div>",e.append(n)},BulkActions=function(){this.execute=function(t){var e={ids:[]};return 0!==$("input.action-checkbox:checked").length&&($("input.action-checkbox:checked").each(function(t,n){e.ids.push($(n).val())}),this.confirm(t,e),!1)},this.confirm=function(t,e){$(".confirmModal").modal({keyboard:!1}).one("click",".confirmBtn",function(){$(".confirmModal").modal("hide"),send_data(t,e)}).on("hidden.bs.modal",function(){$(".confirmBtn").unbind()})}},send_data=function(t,e){$.ajax({url:t,method:"POST",data:JSON.stringify(e),dataType:"json",contentType:"application/json",beforeSend:function(t,e){/^(GET|HEAD|OPTIONS|TRACE)$/i.test(e.type)||this.crossDomain||t.setRequestHeader("X-CSRFToken",csrftoken)}}).done(function(t){flash_message(t),$.each(t.data,function(t,e){var n=$("#"+e.type+"-"+e.id);e.reverse?(n.attr("action",e.reverse_url),"ban"==e.type?reverse_html='<span class="fa fa-flag text-success" data-toggle="tooltip" data-placement="top" title="'+e.reverse_name+'"></span>':"unban"==e.type&&(reverse_html='<span class="fa fa-flag text-warning" data-toggle="tooltip" data-placement="top" title="'+e.reverse_name+'"></span>'),n.find("button").html(reverse_html)):"delete"==e.type&&n.parents(".row").remove()})}).fail(function(t){flash_message(t)})};$(document).ready(function(){$(".action-checkall").change(function(){$("input.action-checkbox").prop("checked",this.checked)}),$(".reply-btn").click(function(t){t.preventDefault();var e=$(this).attr("data-message-id");$.get("/message/message/"+e+"/raw",function(t){var e=$(".flaskbb-editor");e.val((e.val()+"\n"+t).trim()+"\n"),e.selectionStart=e.selectionEnd=e.val().length,e[0].scrollTop=e[0].scrollHeight,window.location.href="#content"})}),$(".quote-btn").click(function(t){t.preventDefault();var e=$(this).attr("data-post-id");$.get("/post/"+e+"/raw",function(t){var e=$(".flaskbb-editor");e.val((e.val()+"\n"+t).trim()+"\n"),e.selectionStart=e.selectionEnd=e.val().length,e[0].scrollTop=e[0].scrollHeight,window.location.href="#content"})}),$('button[name="confirmDialog"]').on("click",function(t){var e=$(this).closest("form");t.preventDefault(),$(".confirmModal").modal({keyboard:!0}).one("click",".confirmBtn",function(){e.trigger("submit")}).on("hidden.bs.modal",function(){$(".confirmBtn").unbind()})})});
|
|
|
|
|
|
+if(function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){"use strict";var n=[],i=t.document,o=Object.getPrototypeOf,r=n.slice,s=n.concat,a=n.push,l=n.indexOf,c={},u=c.toString,h=c.hasOwnProperty,d=h.toString,p=d.call(Object),f={},g=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},m=function(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function y(t,e,n){var o,r=(e=e||i).createElement("script");if(r.text=t,n)for(o in v)n[o]&&(r[o]=n[o]);e.head.appendChild(r).parentNode.removeChild(r)}function b(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?c[u.call(t)]||"object":typeof t}var x=function(t,e){return new x.fn.init(t,e)},w=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function _(t){var e=!!t&&"length"in t&&t.length,n=b(t);return!g(t)&&!m(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}x.fn=x.prototype={jquery:"3.3.1",constructor:x,length:0,toArray:function(){return r.call(this)},get:function(t){return null==t?r.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=x.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return x.each(this,t)},map:function(t){return this.pushStack(x.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(r.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:n.sort,splice:n.splice},x.extend=x.fn.extend=function(){var t,e,n,i,o,r,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||g(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)n=s[e],s!==(i=t[e])&&(c&&i&&(x.isPlainObject(i)||(o=Array.isArray(i)))?(o?(o=!1,r=n&&Array.isArray(n)?n:[]):r=n&&x.isPlainObject(n)?n:{},s[e]=x.extend(c,r,i)):void 0!==i&&(s[e]=i));return s},x.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==u.call(t)||(e=o(t))&&("function"!=typeof(n=h.call(e,"constructor")&&e.constructor)||d.call(n)!==p))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t){y(t)},each:function(t,e){var n,i=0;if(_(t))for(n=t.length;i<n&&!1!==e.call(t[i],i,t[i]);i++);else for(i in t)if(!1===e.call(t[i],i,t[i]))break;return t},trim:function(t){return null==t?"":(t+"").replace(w,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(_(Object(t))?x.merge(n,"string"==typeof t?[t]:t):a.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:l.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,o=t.length;i<n;i++)t[o++]=e[i];return t.length=o,t},grep:function(t,e,n){for(var i=[],o=0,r=t.length,s=!n;o<r;o++)!e(t[o],o)!==s&&i.push(t[o]);return i},map:function(t,e,n){var i,o,r=0,a=[];if(_(t))for(i=t.length;r<i;r++)null!=(o=e(t[r],r,n))&&a.push(o);else for(r in t)null!=(o=e(t[r],r,n))&&a.push(o);return s.apply([],a)},guid:1,support:f}),"function"==typeof Symbol&&(x.fn[Symbol.iterator]=n[Symbol.iterator]),x.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){c["[object "+e+"]"]=e.toLowerCase()});var k=function(t){var e,n,i,o,r,s,a,l,c,u,h,d,p,f,g,m,v,y,b,x="sizzle"+1*new Date,w=t.document,_=0,k=0,$=st(),C=st(),T=st(),S=function(t,e){return t===e&&(h=!0),0},E={}.hasOwnProperty,D=[],N=D.pop,A=D.push,j=D.push,O=D.slice,I=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",q="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",R="\\["+P+"*("+q+")(?:"+P+"*([*^$|!~]?=)"+P+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+q+"))|)"+P+"*\\]",H=":("+q+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+R+")*)|.*)\\)|)",B=new RegExp(P+"+","g"),z=new RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),F=new RegExp("^"+P+"*,"+P+"*"),M=new RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),W=new RegExp("="+P+"*([^\\]'\"]*?)"+P+"*\\]","g"),U=new RegExp(H),K=new RegExp("^"+q+"$"),Q={ID:new RegExp("^#("+q+")"),CLASS:new RegExp("^\\.("+q+")"),TAG:new RegExp("^("+q+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},V=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,G=/^[^{]+\{\s*\[native \w/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),tt=function(t,e,n){var i="0x"+e-65536;return i!=i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},et=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,nt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},it=function(){d()},ot=yt(function(t){return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{j.apply(D=O.call(w.childNodes),w.childNodes),D[w.childNodes.length].nodeType}catch(t){j={apply:D.length?function(t,e){A.apply(t,O.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}function rt(t,e,i,o){var r,a,c,u,h,f,v,y=e&&e.ownerDocument,_=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==_&&9!==_&&11!==_)return i;if(!o&&((e?e.ownerDocument||e:w)!==p&&d(e),e=e||p,g)){if(11!==_&&(h=X.exec(t)))if(r=h[1]){if(9===_){if(!(c=e.getElementById(r)))return i;if(c.id===r)return i.push(c),i}else if(y&&(c=y.getElementById(r))&&b(e,c)&&c.id===r)return i.push(c),i}else{if(h[2])return j.apply(i,e.getElementsByTagName(t)),i;if((r=h[3])&&n.getElementsByClassName&&e.getElementsByClassName)return j.apply(i,e.getElementsByClassName(r)),i}if(n.qsa&&!T[t+" "]&&(!m||!m.test(t))){if(1!==_)y=e,v=t;else if("object"!==e.nodeName.toLowerCase()){for((u=e.getAttribute("id"))?u=u.replace(et,nt):e.setAttribute("id",u=x),a=(f=s(t)).length;a--;)f[a]="#"+u+" "+vt(f[a]);v=f.join(","),y=J.test(t)&>(e.parentNode)||e}if(v)try{return j.apply(i,y.querySelectorAll(v)),i}catch(t){}finally{u===x&&e.removeAttribute("id")}}}return l(t.replace(z,"$1"),e,i,o)}function st(){var t=[];return function e(n,o){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=o}}function at(t){return t[x]=!0,t}function lt(t){var e=p.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ct(t,e){for(var n=t.split("|"),o=n.length;o--;)i.attrHandle[n[o]]=e}function ut(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ht(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function dt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function pt(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&&ot(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ft(t){return at(function(e){return e=+e,at(function(n,i){for(var o,r=t([],n.length,e),s=r.length;s--;)n[o=r[s]]&&(n[o]=!(i[o]=n[o]))})})}function gt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=rt.support={},r=rt.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},d=rt.setDocument=function(t){var e,o,s=t?t.ownerDocument||t:w;return s!==p&&9===s.nodeType&&s.documentElement?(f=(p=s).documentElement,g=!r(p),w!==p&&(o=p.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",it,!1):o.attachEvent&&o.attachEvent("onunload",it)),n.attributes=lt(function(t){return t.className="i",!t.getAttribute("className")}),n.getElementsByTagName=lt(function(t){return t.appendChild(p.createComment("")),!t.getElementsByTagName("*").length}),n.getElementsByClassName=G.test(p.getElementsByClassName),n.getById=lt(function(t){return f.appendChild(t).id=x,!p.getElementsByName||!p.getElementsByName(x).length}),n.getById?(i.filter.ID=function(t){var e=t.replace(Z,tt);return function(t){return t.getAttribute("id")===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var n=e.getElementById(t);return n?[n]:[]}}):(i.filter.ID=function(t){var e=t.replace(Z,tt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var n,i,o,r=e.getElementById(t);if(r){if((n=r.getAttributeNode("id"))&&n.value===t)return[r];for(o=e.getElementsByName(t),i=0;r=o[i++];)if((n=r.getAttributeNode("id"))&&n.value===t)return[r]}return[]}}),i.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],o=0,r=e.getElementsByTagName(t);if("*"===t){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},i.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&g)return e.getElementsByClassName(t)},v=[],m=[],(n.qsa=G.test(p.querySelectorAll))&&(lt(function(t){f.appendChild(t).innerHTML="<a id='"+x+"'></a><select id='"+x+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+P+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\["+P+"*(?:value|"+L+")"),t.querySelectorAll("[id~="+x+"-]").length||m.push("~="),t.querySelectorAll(":checked").length||m.push(":checked"),t.querySelectorAll("a#"+x+"+*").length||m.push(".#.+[+~]")}),lt(function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=p.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&m.push("name"+P+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),f.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=G.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&<(function(t){n.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),v.push("!=",H)}),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),e=G.test(f.compareDocumentPosition),b=e||G.test(f.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},S=e?function(t,e){if(t===e)return h=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===i?t===p||t.ownerDocument===w&&b(w,t)?-1:e===p||e.ownerDocument===w&&b(w,e)?1:u?I(u,t)-I(u,e):0:4&i?-1:1)}:function(t,e){if(t===e)return h=!0,0;var n,i=0,o=t.parentNode,r=e.parentNode,s=[t],a=[e];if(!o||!r)return t===p?-1:e===p?1:o?-1:r?1:u?I(u,t)-I(u,e):0;if(o===r)return ut(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?ut(s[i],a[i]):s[i]===w?-1:a[i]===w?1:0},p):p},rt.matches=function(t,e){return rt(t,null,null,e)},rt.matchesSelector=function(t,e){if((t.ownerDocument||t)!==p&&d(t),e=e.replace(W,"='$1']"),n.matchesSelector&&g&&!T[e+" "]&&(!v||!v.test(e))&&(!m||!m.test(e)))try{var i=y.call(t,e);if(i||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return rt(e,p,null,[t]).length>0},rt.contains=function(t,e){return(t.ownerDocument||t)!==p&&d(t),b(t,e)},rt.attr=function(t,e){(t.ownerDocument||t)!==p&&d(t);var o=i.attrHandle[e.toLowerCase()],r=o&&E.call(i.attrHandle,e.toLowerCase())?o(t,e,!g):void 0;return void 0!==r?r:n.attributes||!g?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},rt.escape=function(t){return(t+"").replace(et,nt)},rt.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},rt.uniqueSort=function(t){var e,i=[],o=0,r=0;if(h=!n.detectDuplicates,u=!n.sortStable&&t.slice(0),t.sort(S),h){for(;e=t[r++];)e===t[r]&&(o=i.push(r));for(;o--;)t.splice(i[o],1)}return u=null,t},o=rt.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=o(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=o(e);return n},(i=rt.selectors={cacheLength:50,createPseudo:at,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(Z,tt),t[3]=(t[3]||t[4]||t[5]||"").replace(Z,tt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||rt.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&rt.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return Q.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&U.test(n)&&(e=s(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(Z,tt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=$[t+" "];return e||(e=new RegExp("(^|"+P+")"+t+"("+P+"|$)"))&&$(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(i){var o=rt.attr(i,t);return null==o?"!="===e:!e||(o+="","="===e?o===n:"!="===e?o!==n:"^="===e?n&&0===o.indexOf(n):"*="===e?n&&o.indexOf(n)>-1:"$="===e?n&&o.slice(-n.length)===n:"~="===e?(" "+o.replace(B," ")+" ").indexOf(n)>-1:"|="===e&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,i,o){var r="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===o?function(t){return!!t.parentNode}:function(e,n,l){var c,u,h,d,p,f,g=r!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(r){for(;g;){for(d=e;d=d[g];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?m.firstChild:m.lastChild],s&&y){for(b=(p=(c=(u=(h=(d=m)[x]||(d[x]={}))[d.uniqueID]||(h[d.uniqueID]={}))[t]||[])[0]===_&&c[1])&&c[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(b=p=0)||f.pop();)if(1===d.nodeType&&++b&&d===e){u[t]=[_,p,b];break}}else if(y&&(b=p=(c=(u=(h=(d=e)[x]||(d[x]={}))[d.uniqueID]||(h[d.uniqueID]={}))[t]||[])[0]===_&&c[1]),!1===b)for(;(d=++p&&d&&d[g]||(b=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&((u=(h=d[x]||(d[x]={}))[d.uniqueID]||(h[d.uniqueID]={}))[t]=[_,b]),d!==e)););return(b-=o)===i||b%i==0&&b/i>=0}}},PSEUDO:function(t,e){var n,o=i.pseudos[t]||i.setFilters[t.toLowerCase()]||rt.error("unsupported pseudo: "+t);return o[x]?o(e):o.length>1?(n=[t,t,"",e],i.setFilters.hasOwnProperty(t.toLowerCase())?at(function(t,n){for(var i,r=o(t,e),s=r.length;s--;)t[i=I(t,r[s])]=!(n[i]=r[s])}):function(t){return o(t,0,n)}):o}},pseudos:{not:at(function(t){var e=[],n=[],i=a(t.replace(z,"$1"));return i[x]?at(function(t,e,n,o){for(var r,s=i(t,null,o,[]),a=t.length;a--;)(r=s[a])&&(t[a]=!(e[a]=r))}):function(t,o,r){return e[0]=t,i(e,null,r,n),e[0]=null,!n.pop()}}),has:at(function(t){return function(e){return rt(t,e).length>0}}),contains:at(function(t){return t=t.replace(Z,tt),function(e){return(e.textContent||e.innerText||o(e)).indexOf(t)>-1}}),lang:at(function(t){return K.test(t||"")||rt.error("unsupported lang: "+t),t=t.replace(Z,tt).toLowerCase(),function(e){var n;do{if(n=g?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===f},focus:function(t){return t===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:pt(!1),disabled:pt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!i.pseudos.empty(t)},header:function(t){return Y.test(t.nodeName)},input:function(t){return V.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:ft(function(){return[0]}),last:ft(function(t,e){return[e-1]}),eq:ft(function(t,e,n){return[n<0?n+e:n]}),even:ft(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:ft(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:ft(function(t,e,n){for(var i=n<0?n+e:n;--i>=0;)t.push(i);return t}),gt:ft(function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t})}}).pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[e]=ht(e);for(e in{submit:!0,reset:!0})i.pseudos[e]=dt(e);function mt(){}function vt(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function yt(t,e,n){var i=e.dir,o=e.next,r=o||i,s=n&&"parentNode"===r,a=k++;return e.first?function(e,n,o){for(;e=e[i];)if(1===e.nodeType||s)return t(e,n,o);return!1}:function(e,n,l){var c,u,h,d=[_,a];if(l){for(;e=e[i];)if((1===e.nodeType||s)&&t(e,n,l))return!0}else for(;e=e[i];)if(1===e.nodeType||s)if(u=(h=e[x]||(e[x]={}))[e.uniqueID]||(h[e.uniqueID]={}),o&&o===e.nodeName.toLowerCase())e=e[i]||e;else{if((c=u[r])&&c[0]===_&&c[1]===a)return d[2]=c[2];if(u[r]=d,d[2]=t(e,n,l))return!0}return!1}}function bt(t){return t.length>1?function(e,n,i){for(var o=t.length;o--;)if(!t[o](e,n,i))return!1;return!0}:t[0]}function xt(t,e,n,i,o){for(var r,s=[],a=0,l=t.length,c=null!=e;a<l;a++)(r=t[a])&&(n&&!n(r,i,o)||(s.push(r),c&&e.push(a)));return s}function wt(t,e,n,i,o,r){return i&&!i[x]&&(i=wt(i)),o&&!o[x]&&(o=wt(o,r)),at(function(r,s,a,l){var c,u,h,d=[],p=[],f=s.length,g=r||function(t,e,n){for(var i=0,o=e.length;i<o;i++)rt(t,e[i],n);return n}(e||"*",a.nodeType?[a]:a,[]),m=!t||!r&&e?g:xt(g,d,t,a,l),v=n?o||(r?t:f||i)?[]:s:m;if(n&&n(m,v,a,l),i)for(c=xt(v,p),i(c,[],a,l),u=c.length;u--;)(h=c[u])&&(v[p[u]]=!(m[p[u]]=h));if(r){if(o||t){if(o){for(c=[],u=v.length;u--;)(h=v[u])&&c.push(m[u]=h);o(null,v=[],c,l)}for(u=v.length;u--;)(h=v[u])&&(c=o?I(r,h):d[u])>-1&&(r[c]=!(s[c]=h))}}else v=xt(v===s?v.splice(f,v.length):v),o?o(null,s,v,l):j.apply(s,v)})}function _t(t){for(var e,n,o,r=t.length,s=i.relative[t[0].type],a=s||i.relative[" "],l=s?1:0,u=yt(function(t){return t===e},a,!0),h=yt(function(t){return I(e,t)>-1},a,!0),d=[function(t,n,i){var o=!s&&(i||n!==c)||((e=n).nodeType?u(t,n,i):h(t,n,i));return e=null,o}];l<r;l++)if(n=i.relative[t[l].type])d=[yt(bt(d),n)];else{if((n=i.filter[t[l].type].apply(null,t[l].matches))[x]){for(o=++l;o<r&&!i.relative[t[o].type];o++);return wt(l>1&&bt(d),l>1&&vt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(z,"$1"),n,l<o&&_t(t.slice(l,o)),o<r&&_t(t=t.slice(o)),o<r&&vt(t))}d.push(n)}return bt(d)}return mt.prototype=i.filters=i.pseudos,i.setFilters=new mt,s=rt.tokenize=function(t,e){var n,o,r,s,a,l,c,u=C[t+" "];if(u)return e?0:u.slice(0);for(a=t,l=[],c=i.preFilter;a;){for(s in n&&!(o=F.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(r=[])),n=!1,(o=M.exec(a))&&(n=o.shift(),r.push({value:n,type:o[0].replace(z," ")}),a=a.slice(n.length)),i.filter)!(o=Q[s].exec(a))||c[s]&&!(o=c[s](o))||(n=o.shift(),r.push({value:n,type:s,matches:o}),a=a.slice(n.length));if(!n)break}return e?a.length:a?rt.error(t):C(t,l).slice(0)},a=rt.compile=function(t,e){var n,o,r,a,l,u,h=[],f=[],m=T[t+" "];if(!m){for(e||(e=s(t)),n=e.length;n--;)(m=_t(e[n]))[x]?h.push(m):f.push(m);(m=T(t,(o=f,r=h,a=r.length>0,l=o.length>0,u=function(t,e,n,s,u){var h,f,m,v=0,y="0",b=t&&[],x=[],w=c,k=t||l&&i.find.TAG("*",u),$=_+=null==w?1:Math.random()||.1,C=k.length;for(u&&(c=e===p||e||u);y!==C&&null!=(h=k[y]);y++){if(l&&h){for(f=0,e||h.ownerDocument===p||(d(h),n=!g);m=o[f++];)if(m(h,e||p,n)){s.push(h);break}u&&(_=$)}a&&((h=!m&&h)&&v--,t&&b.push(h))}if(v+=y,a&&y!==v){for(f=0;m=r[f++];)m(b,x,e,n);if(t){if(v>0)for(;y--;)b[y]||x[y]||(x[y]=N.call(s));x=xt(x)}j.apply(s,x),u&&!t&&x.length>0&&v+r.length>1&&rt.uniqueSort(s)}return u&&(_=$,c=w),b},a?at(u):u))).selector=t}return m},l=rt.select=function(t,e,n,o){var r,l,c,u,h,d="function"==typeof t&&t,p=!o&&s(t=d.selector||t);if(n=n||[],1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&9===e.nodeType&&g&&i.relative[l[1].type]){if(!(e=(i.find.ID(c.matches[0].replace(Z,tt),e)||[])[0]))return n;d&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(r=Q.needsContext.test(t)?0:l.length;r--&&(c=l[r],!i.relative[u=c.type]);)if((h=i.find[u])&&(o=h(c.matches[0].replace(Z,tt),J.test(l[0].type)&>(e.parentNode)||e))){if(l.splice(r,1),!(t=o.length&&vt(l)))return j.apply(n,o),n;break}}return(d||a(t,p))(o,e,!g,n,!e||J.test(t)&>(e.parentNode)||e),n},n.sortStable=x.split("").sort(S).join("")===x,n.detectDuplicates=!!h,d(),n.sortDetached=lt(function(t){return 1&t.compareDocumentPosition(p.createElement("fieldset"))}),lt(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||ct("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),n.attributes&<(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||ct("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),lt(function(t){return null==t.getAttribute("disabled")})||ct(L,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),rt}(t);x.find=k,x.expr=k.selectors,x.expr[":"]=x.expr.pseudos,x.uniqueSort=x.unique=k.uniqueSort,x.text=k.getText,x.isXMLDoc=k.isXML,x.contains=k.contains,x.escapeSelector=k.escape;var $=function(t,e,n){for(var i=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&x(t).is(n))break;i.push(t)}return i},C=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},T=x.expr.match.needsContext;function S(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var E=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(t,e,n){return g(e)?x.grep(t,function(t,i){return!!e.call(t,i,t)!==n}):e.nodeType?x.grep(t,function(t){return t===e!==n}):"string"!=typeof e?x.grep(t,function(t){return l.call(e,t)>-1!==n}):x.filter(e,t,n)}x.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?x.find.matchesSelector(i,t)?[i]:[]:x.find.matches(t,x.grep(e,function(t){return 1===t.nodeType}))},x.fn.extend({find:function(t){var e,n,i=this.length,o=this;if("string"!=typeof t)return this.pushStack(x(t).filter(function(){for(e=0;e<i;e++)if(x.contains(o[e],this))return!0}));for(n=this.pushStack([]),e=0;e<i;e++)x.find(t,o[e],n);return i>1?x.uniqueSort(n):n},filter:function(t){return this.pushStack(D(this,t||[],!1))},not:function(t){return this.pushStack(D(this,t||[],!0))},is:function(t){return!!D(this,"string"==typeof t&&T.test(t)?x(t):t||[],!1).length}});var N,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(x.fn.init=function(t,e,n){var o,r;if(!t)return this;if(n=n||N,"string"==typeof t){if(!(o="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:A.exec(t))||!o[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(o[1]){if(e=e instanceof x?e[0]:e,x.merge(this,x.parseHTML(o[1],e&&e.nodeType?e.ownerDocument||e:i,!0)),E.test(o[1])&&x.isPlainObject(e))for(o in e)g(this[o])?this[o](e[o]):this.attr(o,e[o]);return this}return(r=i.getElementById(o[2]))&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):g(t)?void 0!==n.ready?n.ready(t):t(x):x.makeArray(t,this)}).prototype=x.fn,N=x(i);var j=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function I(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}x.fn.extend({has:function(t){var e=x(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if(x.contains(this,e[t]))return!0})},closest:function(t,e){var n,i=0,o=this.length,r=[],s="string"!=typeof t&&x(t);if(!T.test(t))for(;i<o;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(r.length>1?x.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?l.call(x(t),this[0]):l.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(x.uniqueSort(x.merge(this.get(),x(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),x.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return $(t,"parentNode")},parentsUntil:function(t,e,n){return $(t,"parentNode",n)},next:function(t){return I(t,"nextSibling")},prev:function(t){return I(t,"previousSibling")},nextAll:function(t){return $(t,"nextSibling")},prevAll:function(t){return $(t,"previousSibling")},nextUntil:function(t,e,n){return $(t,"nextSibling",n)},prevUntil:function(t,e,n){return $(t,"previousSibling",n)},siblings:function(t){return C((t.parentNode||{}).firstChild,t)},children:function(t){return C(t.firstChild)},contents:function(t){return S(t,"iframe")?t.contentDocument:(S(t,"template")&&(t=t.content||t),x.merge([],t.childNodes))}},function(t,e){x.fn[t]=function(n,i){var o=x.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=x.filter(i,o)),this.length>1&&(O[t]||x.uniqueSort(o),j.test(t)&&o.reverse()),this.pushStack(o)}});var L=/[^\x20\t\r\n\f]+/g;function P(t){return t}function q(t){throw t}function R(t,e,n,i){var o;try{t&&g(o=t.promise)?o.call(t).done(e).fail(n):t&&g(o=t.then)?o.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}x.Callbacks=function(t){var e,n;t="string"==typeof t?(e=t,n={},x.each(e.match(L)||[],function(t,e){n[e]=!0}),n):x.extend({},t);var i,o,r,s,a=[],l=[],c=-1,u=function(){for(s=s||t.once,r=i=!0;l.length;c=-1)for(o=l.shift();++c<a.length;)!1===a[c].apply(o[0],o[1])&&t.stopOnFalse&&(c=a.length,o=!1);t.memory||(o=!1),i=!1,s&&(a=o?[]:"")},h={add:function(){return a&&(o&&!i&&(c=a.length-1,l.push(o)),function e(n){x.each(n,function(n,i){g(i)?t.unique&&h.has(i)||a.push(i):i&&i.length&&"string"!==b(i)&&e(i)})}(arguments),o&&!i&&u()),this},remove:function(){return x.each(arguments,function(t,e){for(var n;(n=x.inArray(e,a,n))>-1;)a.splice(n,1),n<=c&&c--}),this},has:function(t){return t?x.inArray(t,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return s=l=[],a=o="",this},disabled:function(){return!a},lock:function(){return s=l=[],o||i||(a=o=""),this},locked:function(){return!!s},fireWith:function(t,e){return s||(e=[t,(e=e||[]).slice?e.slice():e],l.push(e),i||u()),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!r}};return h},x.extend({Deferred:function(e){var n=[["notify","progress",x.Callbacks("memory"),x.Callbacks("memory"),2],["resolve","done",x.Callbacks("once memory"),x.Callbacks("once memory"),0,"resolved"],["reject","fail",x.Callbacks("once memory"),x.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},catch:function(t){return o.then(null,t)},pipe:function(){var t=arguments;return x.Deferred(function(e){x.each(n,function(n,i){var o=g(t[i[4]])&&t[i[4]];r[i[1]](function(){var t=o&&o.apply(this,arguments);t&&g(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[i[0]+"With"](this,o?[t]:arguments)})}),t=null}).promise()},then:function(e,i,o){var r=0;function s(e,n,i,o){return function(){var a=this,l=arguments,c=function(){var t,c;if(!(e<r)){if((t=i.apply(a,l))===n.promise())throw new TypeError("Thenable self-resolution");c=t&&("object"==typeof t||"function"==typeof t)&&t.then,g(c)?o?c.call(t,s(r,n,P,o),s(r,n,q,o)):(r++,c.call(t,s(r,n,P,o),s(r,n,q,o),s(r,n,P,n.notifyWith))):(i!==P&&(a=void 0,l=[t]),(o||n.resolveWith)(a,l))}},u=o?c:function(){try{c()}catch(t){x.Deferred.exceptionHook&&x.Deferred.exceptionHook(t,u.stackTrace),e+1>=r&&(i!==q&&(a=void 0,l=[t]),n.rejectWith(a,l))}};e?u():(x.Deferred.getStackHook&&(u.stackTrace=x.Deferred.getStackHook()),t.setTimeout(u))}}return x.Deferred(function(t){n[0][3].add(s(0,t,g(o)?o:P,t.notifyWith)),n[1][3].add(s(0,t,g(e)?e:P)),n[2][3].add(s(0,t,g(i)?i:q))}).promise()},promise:function(t){return null!=t?x.extend(t,o):o}},r={};return x.each(n,function(t,e){var s=e[2],a=e[5];o[e[1]]=s.add,a&&s.add(function(){i=a},n[3-t][2].disable,n[3-t][3].disable,n[0][2].lock,n[0][3].lock),s.add(e[3].fire),r[e[0]]=function(){return r[e[0]+"With"](this===r?void 0:this,arguments),this},r[e[0]+"With"]=s.fireWith}),o.promise(r),e&&e.call(r,r),r},when:function(t){var e=arguments.length,n=e,i=Array(n),o=r.call(arguments),s=x.Deferred(),a=function(t){return function(n){i[t]=this,o[t]=arguments.length>1?r.call(arguments):n,--e||s.resolveWith(i,o)}};if(e<=1&&(R(t,s.done(a(n)).resolve,s.reject,!e),"pending"===s.state()||g(o[n]&&o[n].then)))return s.then();for(;n--;)R(o[n],a(n),s.reject);return s.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&H.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)},x.readyException=function(e){t.setTimeout(function(){throw e})};var B=x.Deferred();function z(){i.removeEventListener("DOMContentLoaded",z),t.removeEventListener("load",z),x.ready()}x.fn.ready=function(t){return B.then(t).catch(function(t){x.readyException(t)}),this},x.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--x.readyWait:x.isReady)||(x.isReady=!0,!0!==t&&--x.readyWait>0||B.resolveWith(i,[x]))}}),x.ready.then=B.then,"complete"===i.readyState||"loading"!==i.readyState&&!i.documentElement.doScroll?t.setTimeout(x.ready):(i.addEventListener("DOMContentLoaded",z),t.addEventListener("load",z));var F=function(t,e,n,i,o,r,s){var a=0,l=t.length,c=null==n;if("object"===b(n))for(a in o=!0,n)F(t,e,a,n[a],!0,r,s);else if(void 0!==i&&(o=!0,g(i)||(s=!0),c&&(s?(e.call(t,i),e=null):(c=e,e=function(t,e,n){return c.call(x(t),n)})),e))for(;a<l;a++)e(t[a],n,s?i:i.call(t[a],a,e(t[a],n)));return o?t:c?e.call(t):l?e(t[0],n):r},M=/^-ms-/,W=/-([a-z])/g;function U(t,e){return e.toUpperCase()}function K(t){return t.replace(M,"ms-").replace(W,U)}var Q=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function V(){this.expando=x.expando+V.uid++}V.uid=1,V.prototype={cache:function(t){var e=t[this.expando];return e||(e={},Q(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,o=this.cache(t);if("string"==typeof e)o[K(e)]=n;else for(i in e)o[K(i)]=e[i];return o},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][K(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,i=t[this.expando];if(void 0!==i){if(void 0!==e){n=(e=Array.isArray(e)?e.map(K):(e=K(e))in i?[e]:e.match(L)||[]).length;for(;n--;)delete i[e[n]]}(void 0===e||x.isEmptyObject(i))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!x.isEmptyObject(e)}};var Y=new V,G=new V,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,J=/[A-Z]/g;function Z(t,e,n){var i,o;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(J,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n="true"===(o=n)||"false"!==o&&("null"===o?null:o===+o+""?+o:X.test(o)?JSON.parse(o):o)}catch(t){}G.set(t,e,n)}else n=void 0;return n}x.extend({hasData:function(t){return G.hasData(t)||Y.hasData(t)},data:function(t,e,n){return G.access(t,e,n)},removeData:function(t,e){G.remove(t,e)},_data:function(t,e,n){return Y.access(t,e,n)},_removeData:function(t,e){Y.remove(t,e)}}),x.fn.extend({data:function(t,e){var n,i,o,r=this[0],s=r&&r.attributes;if(void 0===t){if(this.length&&(o=G.get(r),1===r.nodeType&&!Y.get(r,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=K(i.slice(5)),Z(r,i,o[i]));Y.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof t?this.each(function(){G.set(this,t)}):F(this,function(e){var n;if(r&&void 0===e){if(void 0!==(n=G.get(r,t)))return n;if(void 0!==(n=Z(r,t)))return n}else this.each(function(){G.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){G.remove(this,t)})}}),x.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=Y.get(t,e),n&&(!i||Array.isArray(n)?i=Y.access(t,e,x.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=x.queue(t,e),i=n.length,o=n.shift(),r=x._queueHooks(t,e);"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete r.stop,o.call(t,function(){x.dequeue(t,e)},r)),!i&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Y.get(t,n)||Y.access(t,n,{empty:x.Callbacks("once memory").add(function(){Y.remove(t,[e+"queue",n])})})}}),x.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?x.queue(this[0],t):void 0===e?this:this.each(function(){var n=x.queue(this,t,e);x._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&x.dequeue(this,t)})},dequeue:function(t){return this.each(function(){x.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,o=x.Deferred(),r=this,s=this.length,a=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(n=Y.get(r[s],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(e)}});var tt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,et=new RegExp("^(?:([+-])=|)("+tt+")([a-z%]*)$","i"),nt=["Top","Right","Bottom","Left"],it=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&x.contains(t.ownerDocument,t)&&"none"===x.css(t,"display")},ot=function(t,e,n,i){var o,r,s={};for(r in e)s[r]=t.style[r],t.style[r]=e[r];for(r in o=n.apply(t,i||[]),e)t.style[r]=s[r];return o};function rt(t,e,n,i){var o,r,s=20,a=i?function(){return i.cur()}:function(){return x.css(t,e,"")},l=a(),c=n&&n[3]||(x.cssNumber[e]?"":"px"),u=(x.cssNumber[e]||"px"!==c&&+l)&&et.exec(x.css(t,e));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;s--;)x.style(t,e,u+c),(1-r)*(1-(r=a()/l||.5))<=0&&(s=0),u/=r;u*=2,x.style(t,e,u+c),n=n||[]}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=o)),o}var st={};function at(t,e){for(var n,i,o=[],r=0,s=t.length;r<s;r++)(i=t[r]).style&&(n=i.style.display,e?("none"===n&&(o[r]=Y.get(i,"display")||null,o[r]||(i.style.display="")),""===i.style.display&&it(i)&&(o[r]=(l=void 0,c=void 0,void 0,h=void 0,c=(a=i).ownerDocument,u=a.nodeName,(h=st[u])||(l=c.body.appendChild(c.createElement(u)),h=x.css(l,"display"),l.parentNode.removeChild(l),"none"===h&&(h="block"),st[u]=h,h)))):"none"!==n&&(o[r]="none",Y.set(i,"display",n)));var a,l,c,u,h;for(r=0;r<s;r++)null!=o[r]&&(t[r].style.display=o[r]);return t}x.fn.extend({show:function(){return at(this,!0)},hide:function(){return at(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){it(this)?x(this).show():x(this).hide()})}});var lt=/^(?:checkbox|radio)$/i,ct=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ut=/^$|^module$|\/(?:java|ecma)script/i,ht={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function dt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&S(t,e)?x.merge([t],n):n}function pt(t,e){for(var n=0,i=t.length;n<i;n++)Y.set(t[n],"globalEval",!e||Y.get(e[n],"globalEval"))}ht.optgroup=ht.option,ht.tbody=ht.tfoot=ht.colgroup=ht.caption=ht.thead,ht.th=ht.td;var ft,gt,mt=/<|&#?\w+;/;function vt(t,e,n,i,o){for(var r,s,a,l,c,u,h=e.createDocumentFragment(),d=[],p=0,f=t.length;p<f;p++)if((r=t[p])||0===r)if("object"===b(r))x.merge(d,r.nodeType?[r]:r);else if(mt.test(r)){for(s=s||h.appendChild(e.createElement("div")),a=(ct.exec(r)||["",""])[1].toLowerCase(),l=ht[a]||ht._default,s.innerHTML=l[1]+x.htmlPrefilter(r)+l[2],u=l[0];u--;)s=s.lastChild;x.merge(d,s.childNodes),(s=h.firstChild).textContent=""}else d.push(e.createTextNode(r));for(h.textContent="",p=0;r=d[p++];)if(i&&x.inArray(r,i)>-1)o&&o.push(r);else if(c=x.contains(r.ownerDocument,r),s=dt(h.appendChild(r),"script"),c&&pt(s),n)for(u=0;r=s[u++];)ut.test(r.type||"")&&n.push(r);return h}ft=i.createDocumentFragment().appendChild(i.createElement("div")),(gt=i.createElement("input")).setAttribute("type","radio"),gt.setAttribute("checked","checked"),gt.setAttribute("name","t"),ft.appendChild(gt),f.checkClone=ft.cloneNode(!0).cloneNode(!0).lastChild.checked,ft.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!ft.cloneNode(!0).lastChild.defaultValue;var yt=i.documentElement,bt=/^key/,xt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,wt=/^([^.]*)(?:\.(.+)|)/;function _t(){return!0}function kt(){return!1}function $t(){try{return i.activeElement}catch(t){}}function Ct(t,e,n,i,o,r){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(i=i||n,n=void 0),e)Ct(t,a,n,i,e[a],r);return t}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=kt;else if(!o)return t;return 1===r&&(s=o,(o=function(t){return x().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=x.guid++)),t.each(function(){x.event.add(this,e,o,i,n)})}x.event={global:{},add:function(t,e,n,i,o){var r,s,a,l,c,u,h,d,p,f,g,m=Y.get(t);if(m)for(n.handler&&(n=(r=n).handler,o=r.selector),o&&x.find.matchesSelector(yt,o),n.guid||(n.guid=x.guid++),(l=m.events)||(l=m.events={}),(s=m.handle)||(s=m.handle=function(e){return void 0!==x&&x.event.triggered!==e.type?x.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(L)||[""]).length;c--;)p=g=(a=wt.exec(e[c])||[])[1],f=(a[2]||"").split(".").sort(),p&&(h=x.event.special[p]||{},p=(o?h.delegateType:h.bindType)||p,h=x.event.special[p]||{},u=x.extend({type:p,origType:g,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&x.expr.match.needsContext.test(o),namespace:f.join(".")},r),(d=l[p])||((d=l[p]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(t,i,f,s)||t.addEventListener&&t.addEventListener(p,s)),h.add&&(h.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,u):d.push(u),x.event.global[p]=!0)},remove:function(t,e,n,i,o){var r,s,a,l,c,u,h,d,p,f,g,m=Y.hasData(t)&&Y.get(t);if(m&&(l=m.events)){for(c=(e=(e||"").match(L)||[""]).length;c--;)if(p=g=(a=wt.exec(e[c])||[])[1],f=(a[2]||"").split(".").sort(),p){for(h=x.event.special[p]||{},d=l[p=(i?h.delegateType:h.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=d.length;r--;)u=d[r],!o&&g!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(d.splice(r,1),u.selector&&d.delegateCount--,h.remove&&h.remove.call(t,u));s&&!d.length&&(h.teardown&&!1!==h.teardown.call(t,f,m.handle)||x.removeEvent(t,p,m.handle),delete l[p])}else for(p in l)x.event.remove(t,p+e[c],n,i,!0);x.isEmptyObject(l)&&Y.remove(t,"handle events")}},dispatch:function(t){var e,n,i,o,r,s,a=x.event.fix(t),l=new Array(arguments.length),c=(Y.get(this,"events")||{})[a.type]||[],u=x.event.special[a.type]||{};for(l[0]=a,e=1;e<arguments.length;e++)l[e]=arguments[e];if(a.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,a)){for(s=x.event.handlers.call(this,a,c),e=0;(o=s[e++])&&!a.isPropagationStopped();)for(a.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(r.namespace)||(a.handleObj=r,a.data=r.data,void 0!==(i=((x.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,l))&&!1===(a.result=i)&&(a.preventDefault(),a.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,a),a.result}},handlers:function(t,e){var n,i,o,r,s,a=[],l=e.delegateCount,c=t.target;if(l&&c.nodeType&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(r=[],s={},n=0;n<l;n++)void 0===s[o=(i=e[n]).selector+" "]&&(s[o]=i.needsContext?x(o,this).index(c)>-1:x.find(o,this,null,[c]).length),s[o]&&r.push(i);r.length&&a.push({elem:c,handlers:r})}return c=this,l<e.length&&a.push({elem:c,handlers:e.slice(l)}),a},addProp:function(t,e){Object.defineProperty(x.Event.prototype,t,{enumerable:!0,configurable:!0,get:g(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[x.expando]?t:new x.Event(t)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==$t()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===$t()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&S(this,"input"))return this.click(),!1},_default:function(t){return S(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},x.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},x.Event=function(t,e){if(!(this instanceof x.Event))return new x.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?_t:kt,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&x.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[x.expando]=!0},x.Event.prototype={constructor:x.Event,isDefaultPrevented:kt,isPropagationStopped:kt,isImmediatePropagationStopped:kt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=_t,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=_t,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=_t,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},x.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(t){var e=t.button;return null==t.which&&bt.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&void 0!==e&&xt.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},x.event.addProp),x.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){x.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=t.relatedTarget,o=t.handleObj;return i&&(i===this||x.contains(this,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),x.fn.extend({on:function(t,e,n,i){return Ct(this,t,e,n,i)},one:function(t,e,n,i){return Ct(this,t,e,n,i,1)},off:function(t,e,n){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,x(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(o in t)this.off(o,e,t[o]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=kt),this.each(function(){x.event.remove(this,t,n,e)})}});var Tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,St=/<script|<style|<link/i,Et=/checked\s*(?:[^=]|=\s*.checked.)/i,Dt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Nt(t,e){return S(t,"table")&&S(11!==e.nodeType?e:e.firstChild,"tr")&&x(t).children("tbody")[0]||t}function At(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function jt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Ot(t,e){var n,i,o,r,s,a,l,c;if(1===e.nodeType){if(Y.hasData(t)&&(r=Y.access(t),s=Y.set(e,r),c=r.events))for(o in delete s.handle,s.events={},c)for(n=0,i=c[o].length;n<i;n++)x.event.add(e,o,c[o][n]);G.hasData(t)&&(a=G.access(t),l=x.extend({},a),G.set(e,l))}}function It(t,e,n,i){e=s.apply([],e);var o,r,a,l,c,u,h=0,d=t.length,p=d-1,m=e[0],v=g(m);if(v||d>1&&"string"==typeof m&&!f.checkClone&&Et.test(m))return t.each(function(o){var r=t.eq(o);v&&(e[0]=m.call(this,o,r.html())),It(r,e,n,i)});if(d&&(r=(o=vt(e,t[0].ownerDocument,!1,t,i)).firstChild,1===o.childNodes.length&&(o=r),r||i)){for(l=(a=x.map(dt(o,"script"),At)).length;h<d;h++)c=o,h!==p&&(c=x.clone(c,!0,!0),l&&x.merge(a,dt(c,"script"))),n.call(t[h],c,h);if(l)for(u=a[a.length-1].ownerDocument,x.map(a,jt),h=0;h<l;h++)c=a[h],ut.test(c.type||"")&&!Y.access(c,"globalEval")&&x.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?x._evalUrl&&x._evalUrl(c.src):y(c.textContent.replace(Dt,""),u,c))}return t}function Lt(t,e,n){for(var i,o=e?x.filter(e,t):t,r=0;null!=(i=o[r]);r++)n||1!==i.nodeType||x.cleanData(dt(i)),i.parentNode&&(n&&x.contains(i.ownerDocument,i)&&pt(dt(i,"script")),i.parentNode.removeChild(i));return t}x.extend({htmlPrefilter:function(t){return t.replace(Tt,"<$1></$2>")},clone:function(t,e,n){var i,o,r,s,a,l,c,u=t.cloneNode(!0),h=x.contains(t.ownerDocument,t);if(!(f.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||x.isXMLDoc(t)))for(s=dt(u),i=0,o=(r=dt(t)).length;i<o;i++)a=r[i],l=s[i],void 0,"input"===(c=l.nodeName.toLowerCase())&<.test(a.type)?l.checked=a.checked:"input"!==c&&"textarea"!==c||(l.defaultValue=a.defaultValue);if(e)if(n)for(r=r||dt(t),s=s||dt(u),i=0,o=r.length;i<o;i++)Ot(r[i],s[i]);else Ot(t,u);return(s=dt(u,"script")).length>0&&pt(s,!h&&dt(t,"script")),u},cleanData:function(t){for(var e,n,i,o=x.event.special,r=0;void 0!==(n=t[r]);r++)if(Q(n)){if(e=n[Y.expando]){if(e.events)for(i in e.events)o[i]?x.event.remove(n,i):x.removeEvent(n,i,e.handle);n[Y.expando]=void 0}n[G.expando]&&(n[G.expando]=void 0)}}}),x.fn.extend({detach:function(t){return Lt(this,t,!0)},remove:function(t){return Lt(this,t)},text:function(t){return F(this,function(t){return void 0===t?x.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return It(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Nt(this,t).appendChild(t)})},prepend:function(){return It(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Nt(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return It(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return It(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(x.cleanData(dt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return x.clone(this,t,e)})},html:function(t){return F(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!St.test(t)&&!ht[(ct.exec(t)||["",""])[1].toLowerCase()]){t=x.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&(x.cleanData(dt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return It(this,arguments,function(e){var n=this.parentNode;x.inArray(this,t)<0&&(x.cleanData(dt(this)),n&&n.replaceChild(e,this))},t)}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){x.fn[t]=function(t){for(var n,i=[],o=x(t),r=o.length-1,s=0;s<=r;s++)n=s===r?this:this.clone(!0),x(o[s])[e](n),a.apply(i,n.get());return this.pushStack(i)}});var Pt=new RegExp("^("+tt+")(?!px)[a-z%]+$","i"),qt=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)},Rt=new RegExp(nt.join("|"),"i");function Ht(t,e,n){var i,o,r,s,a=t.style;return(n=n||qt(t))&&(""!==(s=n.getPropertyValue(e)||n[e])||x.contains(t.ownerDocument,t)||(s=x.style(t,e)),!f.pixelBoxStyles()&&Pt.test(s)&&Rt.test(e)&&(i=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=o,a.maxWidth=r)),void 0!==s?s+"":s}function Bt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",yt.appendChild(c).appendChild(u);var e=t.getComputedStyle(u);o="1%"!==e.top,l=12===n(e.marginLeft),u.style.right="60%",a=36===n(e.right),r=36===n(e.width),u.style.position="absolute",s=36===u.offsetWidth||"absolute",yt.removeChild(c),u=null}}function n(t){return Math.round(parseFloat(t))}var o,r,s,a,l,c=i.createElement("div"),u=i.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===u.style.backgroundClip,x.extend(f,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),o},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),s}}))}();var zt=/^(none|table(?!-c[ea]).+)/,Ft=/^--/,Mt={position:"absolute",visibility:"hidden",display:"block"},Wt={letterSpacing:"0",fontWeight:"400"},Ut=["Webkit","Moz","ms"],Kt=i.createElement("div").style;function Qt(t){var e=x.cssProps[t];return e||(e=x.cssProps[t]=function(t){if(t in Kt)return t;for(var e=t[0].toUpperCase()+t.slice(1),n=Ut.length;n--;)if((t=Ut[n]+e)in Kt)return t}(t)||t),e}function Vt(t,e,n){var i=et.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function Yt(t,e,n,i,o,r){var s="width"===e?1:0,a=0,l=0;if(n===(i?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(l+=x.css(t,n+nt[s],!0,o)),i?("content"===n&&(l-=x.css(t,"padding"+nt[s],!0,o)),"margin"!==n&&(l-=x.css(t,"border"+nt[s]+"Width",!0,o))):(l+=x.css(t,"padding"+nt[s],!0,o),"padding"!==n?l+=x.css(t,"border"+nt[s]+"Width",!0,o):a+=x.css(t,"border"+nt[s]+"Width",!0,o));return!i&&r>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-r-l-a-.5))),l}function Gt(t,e,n){var i=qt(t),o=Ht(t,e,i),r="border-box"===x.css(t,"boxSizing",!1,i),s=r;if(Pt.test(o)){if(!n)return o;o="auto"}return s=s&&(f.boxSizingReliable()||o===t.style[e]),("auto"===o||!parseFloat(o)&&"inline"===x.css(t,"display",!1,i))&&(o=t["offset"+e[0].toUpperCase()+e.slice(1)],s=!0),(o=parseFloat(o)||0)+Yt(t,e,n||(r?"border":"content"),s,i,o)+"px"}function Xt(t,e,n,i,o){return new Xt.prototype.init(t,e,n,i,o)}x.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Ht(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,r,s,a=K(e),l=Ft.test(e),c=t.style;if(l||(e=Qt(a)),s=x.cssHooks[e]||x.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(t,!1,i))?o:c[e];"string"==(r=typeof n)&&(o=et.exec(n))&&o[1]&&(n=rt(t,e,o),r="number"),null!=n&&n==n&&("number"===r&&(n+=o&&o[3]||(x.cssNumber[a]?"":"px")),f.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,i))||(l?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,i){var o,r,s,a=K(e);return Ft.test(e)||(e=Qt(a)),(s=x.cssHooks[e]||x.cssHooks[a])&&"get"in s&&(o=s.get(t,!0,n)),void 0===o&&(o=Ht(t,e,i)),"normal"===o&&e in Wt&&(o=Wt[e]),""===n||n?(r=parseFloat(o),!0===n||isFinite(r)?r||0:o):o}}),x.each(["height","width"],function(t,e){x.cssHooks[e]={get:function(t,n,i){if(n)return!zt.test(x.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?Gt(t,e,i):ot(t,Mt,function(){return Gt(t,e,i)})},set:function(t,n,i){var o,r=qt(t),s="border-box"===x.css(t,"boxSizing",!1,r),a=i&&Yt(t,e,i,s,r);return s&&f.scrollboxSize()===r.position&&(a-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(r[e])-Yt(t,e,"border",!1,r)-.5)),a&&(o=et.exec(n))&&"px"!==(o[3]||"px")&&(t.style[e]=n,n=x.css(t,e)),Vt(0,n,a)}}}),x.cssHooks.marginLeft=Bt(f.reliableMarginLeft,function(t,e){if(e)return(parseFloat(Ht(t,"marginLeft"))||t.getBoundingClientRect().left-ot(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),x.each({margin:"",padding:"",border:"Width"},function(t,e){x.cssHooks[t+e]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[t+nt[i]+e]=r[i]||r[i-2]||r[0];return o}},"margin"!==t&&(x.cssHooks[t+e].set=Vt)}),x.fn.extend({css:function(t,e){return F(this,function(t,e,n){var i,o,r={},s=0;if(Array.isArray(e)){for(i=qt(t),o=e.length;s<o;s++)r[e[s]]=x.css(t,e[s],!1,i);return r}return void 0!==n?x.style(t,e,n):x.css(t,e)},t,e,arguments.length>1)}}),x.Tween=Xt,Xt.prototype={constructor:Xt,init:function(t,e,n,i,o,r){this.elem=t,this.prop=n,this.easing=o||x.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=r||(x.cssNumber[n]?"":"px")},cur:function(){var t=Xt.propHooks[this.prop];return t&&t.get?t.get(this):Xt.propHooks._default.get(this)},run:function(t){var e,n=Xt.propHooks[this.prop];return this.options.duration?this.pos=e=x.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Xt.propHooks._default.set(this),this}},Xt.prototype.init.prototype=Xt.prototype,Xt.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=x.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){x.fx.step[t.prop]?x.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[x.cssProps[t.prop]]&&!x.cssHooks[t.prop]?t.elem[t.prop]=t.now:x.style(t.elem,t.prop,t.now+t.unit)}}},Xt.propHooks.scrollTop=Xt.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},x.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},x.fx=Xt.prototype.init,x.fx.step={};var Jt,Zt,te,ee,ne=/^(?:toggle|show|hide)$/,ie=/queueHooks$/;function oe(){Zt&&(!1===i.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(oe):t.setTimeout(oe,x.fx.interval),x.fx.tick())}function re(){return t.setTimeout(function(){Jt=void 0}),Jt=Date.now()}function se(t,e){var n,i=0,o={height:t};for(e=e?1:0;i<4;i+=2-e)o["margin"+(n=nt[i])]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function ae(t,e,n){for(var i,o=(le.tweeners[e]||[]).concat(le.tweeners["*"]),r=0,s=o.length;r<s;r++)if(i=o[r].call(n,e,t))return i}function le(t,e,n){var i,o,r=0,s=le.prefilters.length,a=x.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var e=Jt||re(),n=Math.max(0,c.startTime+c.duration-e),i=1-(n/c.duration||0),r=0,s=c.tweens.length;r<s;r++)c.tweens[r].run(i);return a.notifyWith(t,[c,i,n]),i<1&&s?n:(s||a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:x.extend({},e),opts:x.extend(!0,{specialEasing:{},easing:x.easing._default},n),originalProperties:e,originalOptions:n,startTime:Jt||re(),duration:n.duration,tweens:[],createTween:function(e,n){var i=x.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(i),i},stop:function(e){var n=0,i=e?c.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)c.tweens[n].run(1);return e?(a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c,e])):a.rejectWith(t,[c,e]),this}}),u=c.props;for(function(t,e){var n,i,o,r,s;for(n in t)if(o=e[i=K(n)],r=t[n],Array.isArray(r)&&(o=r[1],r=t[n]=r[0]),n!==i&&(t[i]=r,delete t[n]),(s=x.cssHooks[i])&&"expand"in s)for(n in r=s.expand(r),delete t[i],r)n in t||(t[n]=r[n],e[n]=o);else e[i]=o}(u,c.opts.specialEasing);r<s;r++)if(i=le.prefilters[r].call(c,t,u,c.opts))return g(i.stop)&&(x._queueHooks(c.elem,c.opts.queue).stop=i.stop.bind(i)),i;return x.map(u,ae,c),g(c.opts.start)&&c.opts.start.call(t,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),x.fx.timer(x.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c}x.Animation=x.extend(le,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return rt(n.elem,t,et.exec(e),n),n}]},tweener:function(t,e){g(t)?(e=t,t=["*"]):t=t.match(L);for(var n,i=0,o=t.length;i<o;i++)n=t[i],le.tweeners[n]=le.tweeners[n]||[],le.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var i,o,r,s,a,l,c,u,h="width"in e||"height"in e,d=this,p={},f=t.style,g=t.nodeType&&it(t),m=Y.get(t,"fxshow");for(i in n.queue||(null==(s=x._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,x.queue(t,"fx").length||s.empty.fire()})})),e)if(o=e[i],ne.test(o)){if(delete e[i],r=r||"toggle"===o,o===(g?"hide":"show")){if("show"!==o||!m||void 0===m[i])continue;g=!0}p[i]=m&&m[i]||x.style(t,i)}if((l=!x.isEmptyObject(e))||!x.isEmptyObject(p))for(i in h&&1===t.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=m&&m.display)&&(c=Y.get(t,"display")),"none"===(u=x.css(t,"display"))&&(c?u=c:(at([t],!0),c=t.style.display||c,u=x.css(t,"display"),at([t]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===x.css(t,"float")&&(l||(d.done(function(){f.display=c}),null==c&&(u=f.display,c="none"===u?"":u)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",d.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]})),l=!1,p)l||(m?"hidden"in m&&(g=m.hidden):m=Y.access(t,"fxshow",{display:c}),r&&(m.hidden=!g),g&&at([t],!0),d.done(function(){for(i in g||at([t]),Y.remove(t,"fxshow"),p)x.style(t,i,p[i])})),l=ae(g?m[i]:0,i,d),i in m||(m[i]=l.start,g&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?le.prefilters.unshift(t):le.prefilters.push(t)}}),x.speed=function(t,e,n){var i=t&&"object"==typeof t?x.extend({},t):{complete:n||!n&&e||g(t)&&t,duration:t,easing:n&&e||e&&!g(e)&&e};return x.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in x.fx.speeds?i.duration=x.fx.speeds[i.duration]:i.duration=x.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){g(i.old)&&i.old.call(this),i.queue&&x.dequeue(this,i.queue)},i},x.fn.extend({fadeTo:function(t,e,n,i){return this.filter(it).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var o=x.isEmptyObject(t),r=x.speed(e,n,i),s=function(){var e=le(this,x.extend({},t),r);(o||Y.get(this,"finish"))&&e.stop(!0)};return s.finish=s,o||!1===r.queue?this.each(s):this.queue(r.queue,s)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each(function(){var e=!0,o=null!=t&&t+"queueHooks",r=x.timers,s=Y.get(this);if(o)s[o]&&s[o].stop&&i(s[o]);else for(o in s)s[o]&&s[o].stop&&ie.test(o)&&i(s[o]);for(o=r.length;o--;)r[o].elem!==this||null!=t&&r[o].queue!==t||(r[o].anim.stop(n),e=!1,r.splice(o,1));!e&&n||x.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,n=Y.get(this),i=n[t+"queue"],o=n[t+"queueHooks"],r=x.timers,s=i?i.length:0;for(n.finish=!0,x.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===t&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<s;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish})}}),x.each(["toggle","show","hide"],function(t,e){var n=x.fn[e];x.fn[e]=function(t,i,o){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(se(e,!0),t,i,o)}}),x.each({slideDown:se("show"),slideUp:se("hide"),slideToggle:se("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){x.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}}),x.timers=[],x.fx.tick=function(){var t,e=0,n=x.timers;for(Jt=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||x.fx.stop(),Jt=void 0},x.fx.timer=function(t){x.timers.push(t),x.fx.start()},x.fx.interval=13,x.fx.start=function(){Zt||(Zt=!0,oe())},x.fx.stop=function(){Zt=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fn.delay=function(e,n){return e=x.fx&&x.fx.speeds[e]||e,n=n||"fx",this.queue(n,function(n,i){var o=t.setTimeout(n,e);i.stop=function(){t.clearTimeout(o)}})},te=i.createElement("input"),ee=i.createElement("select").appendChild(i.createElement("option")),te.type="checkbox",f.checkOn=""!==te.value,f.optSelected=ee.selected,(te=i.createElement("input")).value="t",te.type="radio",f.radioValue="t"===te.value;var ce,ue=x.expr.attrHandle;x.fn.extend({attr:function(t,e){return F(this,x.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){x.removeAttr(this,t)})}}),x.extend({attr:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===t.getAttribute?x.prop(t,e,n):(1===r&&x.isXMLDoc(t)||(o=x.attrHooks[e.toLowerCase()]||(x.expr.match.bool.test(e)?ce:void 0)),void 0!==n?null===n?void x.removeAttr(t,e):o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:(t.setAttribute(e,n+""),n):o&&"get"in o&&null!==(i=o.get(t,e))?i:null==(i=x.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!f.radioValue&&"radio"===e&&S(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,o=e&&e.match(L);if(o&&1===t.nodeType)for(;n=o[i++];)t.removeAttribute(n)}}),ce={set:function(t,e,n){return!1===e?x.removeAttr(t,n):t.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(t,e){var n=ue[e]||x.find.attr;ue[e]=function(t,e,i){var o,r,s=e.toLowerCase();return i||(r=ue[s],ue[s]=o,o=null!=n(t,e,i)?s:null,ue[s]=r),o}});var he=/^(?:input|select|textarea|button)$/i,de=/^(?:a|area)$/i;function pe(t){return(t.match(L)||[]).join(" ")}function fe(t){return t.getAttribute&&t.getAttribute("class")||""}function ge(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(L)||[]}x.fn.extend({prop:function(t,e){return F(this,x.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[x.propFix[t]||t]})}}),x.extend({prop:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&x.isXMLDoc(t)||(e=x.propFix[e]||e,o=x.propHooks[e]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:t[e]=n:o&&"get"in o&&null!==(i=o.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=x.find.attr(t,"tabindex");return e?parseInt(e,10):he.test(t.nodeName)||de.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(x.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.fn.extend({addClass:function(t){var e,n,i,o,r,s,a,l=0;if(g(t))return this.each(function(e){x(this).addClass(t.call(this,e,fe(this)))});if((e=ge(t)).length)for(;n=this[l++];)if(o=fe(n),i=1===n.nodeType&&" "+pe(o)+" "){for(s=0;r=e[s++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");o!==(a=pe(i))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,i,o,r,s,a,l=0;if(g(t))return this.each(function(e){x(this).removeClass(t.call(this,e,fe(this)))});if(!arguments.length)return this.attr("class","");if((e=ge(t)).length)for(;n=this[l++];)if(o=fe(n),i=1===n.nodeType&&" "+pe(o)+" "){for(s=0;r=e[s++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");o!==(a=pe(i))&&n.setAttribute("class",a)}return this},toggleClass:function(t,e){var n=typeof t,i="string"===n||Array.isArray(t);return"boolean"==typeof e&&i?e?this.addClass(t):this.removeClass(t):g(t)?this.each(function(n){x(this).toggleClass(t.call(this,n,fe(this),e),e)}):this.each(function(){var e,o,r,s;if(i)for(o=0,r=x(this),s=ge(t);e=s[o++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else void 0!==t&&"boolean"!==n||((e=fe(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Y.get(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+pe(fe(n))+" ").indexOf(e)>-1)return!0;return!1}});var me=/\r/g;x.fn.extend({val:function(t){var e,n,i,o=this[0];return arguments.length?(i=g(t),this.each(function(n){var o;1===this.nodeType&&(null==(o=i?t.call(this,n,x(this).val()):t)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=x.map(o,function(t){return null==t?"":t+""})),(e=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))})):o?(e=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(me,""):null==n?"":n:void 0}}),x.extend({valHooks:{option:{get:function(t){var e=x.find.attr(t,"value");return null!=e?e:pe(x.text(t))}},select:{get:function(t){var e,n,i,o=t.options,r=t.selectedIndex,s="select-one"===t.type,a=s?null:[],l=s?r+1:o.length;for(i=r<0?l:s?r:0;i<l;i++)if(((n=o[i]).selected||i===r)&&!n.disabled&&(!n.parentNode.disabled||!S(n.parentNode,"optgroup"))){if(e=x(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,i,o=t.options,r=x.makeArray(e),s=o.length;s--;)((i=o[s]).selected=x.inArray(x.valHooks.option.get(i),r)>-1)&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=x.inArray(x(t).val(),e)>-1}},f.checkOn||(x.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),f.focusin="onfocusin"in t;var ve=/^(?:focusinfocus|focusoutblur)$/,ye=function(t){t.stopPropagation()};x.extend(x.event,{trigger:function(e,n,o,r){var s,a,l,c,u,d,p,f,v=[o||i],y=h.call(e,"type")?e.type:e,b=h.call(e,"namespace")?e.namespace.split("."):[];if(a=f=l=o=o||i,3!==o.nodeType&&8!==o.nodeType&&!ve.test(y+x.event.triggered)&&(y.indexOf(".")>-1&&(y=(b=y.split(".")).shift(),b.sort()),u=y.indexOf(":")<0&&"on"+y,(e=e[x.expando]?e:new x.Event(y,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=b.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=o),n=null==n?[e]:x.makeArray(n,[e]),p=x.event.special[y]||{},r||!p.trigger||!1!==p.trigger.apply(o,n))){if(!r&&!p.noBubble&&!m(o)){for(c=p.delegateType||y,ve.test(c+y)||(a=a.parentNode);a;a=a.parentNode)v.push(a),l=a;l===(o.ownerDocument||i)&&v.push(l.defaultView||l.parentWindow||t)}for(s=0;(a=v[s++])&&!e.isPropagationStopped();)f=a,e.type=s>1?c:p.bindType||y,(d=(Y.get(a,"events")||{})[e.type]&&Y.get(a,"handle"))&&d.apply(a,n),(d=u&&a[u])&&d.apply&&Q(a)&&(e.result=d.apply(a,n),!1===e.result&&e.preventDefault());return e.type=y,r||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(v.pop(),n)||!Q(o)||u&&g(o[y])&&!m(o)&&((l=o[u])&&(o[u]=null),x.event.triggered=y,e.isPropagationStopped()&&f.addEventListener(y,ye),o[y](),e.isPropagationStopped()&&f.removeEventListener(y,ye),x.event.triggered=void 0,l&&(o[u]=l)),e.result}},simulate:function(t,e,n){var i=x.extend(new x.Event,n,{type:t,isSimulated:!0});x.event.trigger(i,null,e)}}),x.fn.extend({trigger:function(t,e){return this.each(function(){x.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return x.event.trigger(t,e,n,!0)}}),f.focusin||x.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){x.event.simulate(e,t.target,x.event.fix(t))};x.event.special[e]={setup:function(){var i=this.ownerDocument||this,o=Y.access(i,e);o||i.addEventListener(t,n,!0),Y.access(i,e,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=Y.access(i,e)-1;o?Y.access(i,e,o):(i.removeEventListener(t,n,!0),Y.remove(i,e))}}});var be=t.location,xe=Date.now(),we=/\?/;x.parseXML=function(e){var n;if(!e||"string"!=typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(t){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+e),n};var _e=/\[\]$/,ke=/\r?\n/g,$e=/^(?:submit|button|image|reset|file)$/i,Ce=/^(?:input|select|textarea|keygen)/i;function Te(t,e,n,i){var o;if(Array.isArray(e))x.each(e,function(e,o){n||_e.test(t)?i(t,o):Te(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,n,i)});else if(n||"object"!==b(e))i(t,e);else for(o in e)Te(t+"["+o+"]",e[o],n,i)}x.param=function(t,e){var n,i=[],o=function(t,e){var n=g(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(t)||t.jquery&&!x.isPlainObject(t))x.each(t,function(){o(this.name,this.value)});else for(n in t)Te(n,t[n],e,o);return i.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=x.prop(this,"elements");return t?x.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!x(this).is(":disabled")&&Ce.test(this.nodeName)&&!$e.test(t)&&(this.checked||!lt.test(t))}).map(function(t,e){var n=x(this).val();return null==n?null:Array.isArray(n)?x.map(n,function(t){return{name:e.name,value:t.replace(ke,"\r\n")}}):{name:e.name,value:n.replace(ke,"\r\n")}}).get()}});var Se=/%20/g,Ee=/#.*$/,De=/([?&])_=[^&]*/,Ne=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ae=/^(?:GET|HEAD)$/,je=/^\/\//,Oe={},Ie={},Le="*/".concat("*"),Pe=i.createElement("a");function qe(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,o=0,r=e.toLowerCase().match(L)||[];if(g(n))for(;i=r[o++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function Re(t,e,n,i){var o={},r=t===Ie;function s(a){var l;return o[a]=!0,x.each(t[a]||[],function(t,a){var c=a(e,n,i);return"string"!=typeof c||r||o[c]?r?!(l=c):void 0:(e.dataTypes.unshift(c),s(c),!1)}),l}return s(e.dataTypes[0])||!o["*"]&&s("*")}function He(t,e){var n,i,o=x.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:i||(i={}))[n]=e[n]);return i&&x.extend(!0,t,i),t}Pe.href=be.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:be.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(be.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Le,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?He(He(t,x.ajaxSettings),e):He(x.ajaxSettings,t)},ajaxPrefilter:qe(Oe),ajaxTransport:qe(Ie),ajax:function(e,n){"object"==typeof e&&(n=e,e=void 0),n=n||{};var o,r,s,a,l,c,u,h,d,p,f=x.ajaxSetup({},n),g=f.context||f,m=f.context&&(g.nodeType||g.jquery)?x(g):x.event,v=x.Deferred(),y=x.Callbacks("once memory"),b=f.statusCode||{},w={},_={},k="canceled",$={readyState:0,getResponseHeader:function(t){var e;if(u){if(!a)for(a={};e=Ne.exec(s);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return u?s:null},setRequestHeader:function(t,e){return null==u&&(t=_[t.toLowerCase()]=_[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==u&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(u)$.always(t[$.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||k;return o&&o.abort(e),C(0,e),this}};if(v.promise($),f.url=((e||f.url||be.href)+"").replace(je,be.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(L)||[""],null==f.crossDomain){c=i.createElement("a");try{c.href=f.url,c.href=c.href,f.crossDomain=Pe.protocol+"//"+Pe.host!=c.protocol+"//"+c.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=x.param(f.data,f.traditional)),Re(Oe,f,n,$),u)return $;for(d in(h=x.event&&f.global)&&0==x.active++&&x.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Ae.test(f.type),r=f.url.replace(Ee,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Se,"+")):(p=f.url.slice(r.length),f.data&&(f.processData||"string"==typeof f.data)&&(r+=(we.test(r)?"&":"?")+f.data,delete f.data),!1===f.cache&&(r=r.replace(De,"$1"),p=(we.test(r)?"&":"?")+"_="+xe+++p),f.url=r+p),f.ifModified&&(x.lastModified[r]&&$.setRequestHeader("If-Modified-Since",x.lastModified[r]),x.etag[r]&&$.setRequestHeader("If-None-Match",x.etag[r])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&$.setRequestHeader("Content-Type",f.contentType),$.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Le+"; q=0.01":""):f.accepts["*"]),f.headers)$.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(g,$,f)||u))return $.abort();if(k="abort",y.add(f.complete),$.done(f.success),$.fail(f.error),o=Re(Ie,f,n,$)){if($.readyState=1,h&&m.trigger("ajaxSend",[$,f]),u)return $;f.async&&f.timeout>0&&(l=t.setTimeout(function(){$.abort("timeout")},f.timeout));try{u=!1,o.send(w,C)}catch(t){if(u)throw t;C(-1,t)}}else C(-1,"No Transport");function C(e,n,i,a){var c,d,p,w,_,k=n;u||(u=!0,l&&t.clearTimeout(l),o=void 0,s=a||"",$.readyState=e>0?4:0,c=e>=200&&e<300||304===e,i&&(w=function(t,e,n){for(var i,o,r,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(o in a)if(a[o]&&a[o].test(i)){l.unshift(o);break}if(l[0]in n)r=l[0];else{for(o in n){if(!l[0]||t.converters[o+" "+l[0]]){r=o;break}s||(s=o)}r=r||s}if(r)return r!==l[0]&&l.unshift(r),n[r]}(f,$,i)),w=function(t,e,n,i){var o,r,s,a,l,c={},u=t.dataTypes.slice();if(u[1])for(s in t.converters)c[s.toLowerCase()]=t.converters[s];for(r=u.shift();r;)if(t.responseFields[r]&&(n[t.responseFields[r]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(s=c[l+" "+r]||c["* "+r]))for(o in c)if((a=o.split(" "))[1]===r&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[o]:!0!==c[o]&&(r=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+l+" to "+r}}}return{state:"success",data:e}}(f,w,$,c),c?(f.ifModified&&((_=$.getResponseHeader("Last-Modified"))&&(x.lastModified[r]=_),(_=$.getResponseHeader("etag"))&&(x.etag[r]=_)),204===e||"HEAD"===f.type?k="nocontent":304===e?k="notmodified":(k=w.state,d=w.data,c=!(p=w.error))):(p=k,!e&&k||(k="error",e<0&&(e=0))),$.status=e,$.statusText=(n||k)+"",c?v.resolveWith(g,[d,k,$]):v.rejectWith(g,[$,k,p]),$.statusCode(b),b=void 0,h&&m.trigger(c?"ajaxSuccess":"ajaxError",[$,f,c?d:p]),y.fireWith(g,[$,k]),h&&(m.trigger("ajaxComplete",[$,f]),--x.active||x.event.trigger("ajaxStop")))}return $},getJSON:function(t,e,n){return x.get(t,e,n,"json")},getScript:function(t,e){return x.get(t,void 0,e,"script")}}),x.each(["get","post"],function(t,e){x[e]=function(t,n,i,o){return g(n)&&(o=o||i,i=n,n=void 0),x.ajax(x.extend({url:t,type:e,dataType:o,data:n,success:i},x.isPlainObject(t)&&t))}}),x._evalUrl=function(t){return x.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},x.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(t)&&(t=t.call(this[0])),e=x(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return g(t)?this.each(function(e){x(this).wrapInner(t.call(this,e))}):this.each(function(){var e=x(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=g(t);return this.each(function(n){x(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){x(this).replaceWith(this.childNodes)}),this}}),x.expr.pseudos.hidden=function(t){return!x.expr.pseudos.visible(t)},x.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(t){}};var Be={0:200,1223:204},ze=x.ajaxSettings.xhr();f.cors=!!ze&&"withCredentials"in ze,f.ajax=ze=!!ze,x.ajaxTransport(function(e){var n,i;if(f.cors||ze&&!e.crossDomain)return{send:function(o,r){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(s,o[s]);n=function(t){return function(){n&&(n=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?r(0,"error"):r(a.status,a.statusText):r(Be[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),i=a.onerror=a.ontimeout=n("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout(function(){n&&i()})},n=n("abort");try{a.send(e.hasContent&&e.data||null)}catch(t){if(n)throw t}},abort:function(){n&&n()}}}),x.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return x.globalEval(t),t}}}),x.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),x.ajaxTransport("script",function(t){var e,n;if(t.crossDomain)return{send:function(o,r){e=x("<script>").prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&r("error"===t.type?404:200,t.type)}),i.head.appendChild(e[0])},abort:function(){n&&n()}}});var Fe,Me=[],We=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Me.pop()||x.expando+"_"+xe++;return this[t]=!0,t}}),x.ajaxPrefilter("json jsonp",function(e,n,i){var o,r,s,a=!1!==e.jsonp&&(We.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&We.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=g(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(We,"$1"+o):!1!==e.jsonp&&(e.url+=(we.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},e.dataTypes[0]="json",r=t[o],t[o]=function(){s=arguments},i.always(function(){void 0===r?x(t).removeProp(o):t[o]=r,e[o]&&(e.jsonpCallback=n.jsonpCallback,Me.push(o)),s&&g(r)&&r(s[0]),s=r=void 0}),"script"}),f.createHTMLDocument=((Fe=i.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Fe.childNodes.length),x.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(f.createHTMLDocument?((o=(e=i.implementation.createHTMLDocument("")).createElement("base")).href=i.location.href,e.head.appendChild(o)):e=i),s=!n&&[],(r=E.exec(t))?[e.createElement(r[1])]:(r=vt([t],e,s),s&&s.length&&x(s).remove(),x.merge([],r.childNodes)));var o,r,s},x.fn.load=function(t,e,n){var i,o,r,s=this,a=t.indexOf(" ");return a>-1&&(i=pe(t.slice(a)),t=t.slice(0,a)),g(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),s.length>0&&x.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done(function(t){r=arguments,s.html(i?x("<div>").append(x.parseHTML(t)).find(i):t)}).always(n&&function(t,e){s.each(function(){n.apply(this,r||[t.responseText,e,t])})}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){x.fn[e]=function(t){return this.on(e,t)}}),x.expr.pseudos.animated=function(t){return x.grep(x.timers,function(e){return t===e.elem}).length},x.offset={setOffset:function(t,e,n){var i,o,r,s,a,l,c=x.css(t,"position"),u=x(t),h={};"static"===c&&(t.style.position="relative"),a=u.offset(),r=x.css(t,"top"),l=x.css(t,"left"),("absolute"===c||"fixed"===c)&&(r+l).indexOf("auto")>-1?(s=(i=u.position()).top,o=i.left):(s=parseFloat(r)||0,o=parseFloat(l)||0),g(e)&&(e=e.call(t,n,x.extend({},a))),null!=e.top&&(h.top=e.top-a.top+s),null!=e.left&&(h.left=e.left-a.left+o),"using"in e?e.using.call(t,h):u.css(h)}},x.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){x.offset.setOffset(this,t,e)});var e,n,i=this[0];return i?i.getClientRects().length?(e=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,i=this[0],o={top:0,left:0};if("fixed"===x.css(i,"position"))e=i.getBoundingClientRect();else{for(e=this.offset(),n=i.ownerDocument,t=i.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===x.css(t,"position");)t=t.parentNode;t&&t!==i&&1===t.nodeType&&((o=x(t).offset()).top+=x.css(t,"borderTopWidth",!0),o.left+=x.css(t,"borderLeftWidth",!0))}return{top:e.top-o.top-x.css(i,"marginTop",!0),left:e.left-o.left-x.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===x.css(t,"position");)t=t.offsetParent;return t||yt})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n="pageYOffset"===e;x.fn[t]=function(i){return F(this,function(t,i,o){var r;if(m(t)?r=t:9===t.nodeType&&(r=t.defaultView),void 0===o)return r?r[e]:t[i];r?r.scrollTo(n?r.pageXOffset:o,n?o:r.pageYOffset):t[i]=o},t,i,arguments.length)}}),x.each(["top","left"],function(t,e){x.cssHooks[e]=Bt(f.pixelPosition,function(t,n){if(n)return n=Ht(t,e),Pt.test(n)?x(t).position()[e]+"px":n})}),x.each({Height:"height",Width:"width"},function(t,e){x.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){x.fn[i]=function(o,r){var s=arguments.length&&(n||"boolean"!=typeof o),a=n||(!0===o||!0===r?"margin":"border");return F(this,function(e,n,o){var r;return m(e)?0===i.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===o?x.css(e,n,a):x.style(e,n,o,a)},e,s?o:void 0,s)}})}),x.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(t,e){x.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),x.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),x.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}}),x.proxy=function(t,e){var n,i,o;if("string"==typeof e&&(n=t[e],e=t,t=n),g(t))return i=r.call(arguments,2),(o=function(){return t.apply(e||this,i.concat(r.call(arguments)))}).guid=t.guid=t.guid||x.guid++,o},x.holdReady=function(t){t?x.readyWait++:x.ready(!0)},x.isArray=Array.isArray,x.parseJSON=JSON.parse,x.nodeName=S,x.isFunction=g,x.isWindow=m,x.camelCase=K,x.type=b,x.now=Date.now,x.isNumeric=function(t){var e=x.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return x});var Ue=t.jQuery,Ke=t.$;return x.noConflict=function(e){return t.$===x&&(t.$=Ke),e&&t.jQuery===x&&(t.jQuery=Ue),x},e||(t.jQuery=t.$=x),x}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){"use strict";var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(),function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",function(){n=!0});return setTimeout(function(){n||t(i).trigger(t.support.transition.end)},e),this},t(function(){t.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(t){"use strict";var e='[data-dismiss="alert"]',n=function(n){t(n).on("click",e,this.close)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.close=function(e){function i(){s.detach().trigger("closed.bs.alert").remove()}var o=t(this),r=o.attr("data-target");r||(r=(r=o.attr("href"))&&r.replace(/.*(?=#[^\s]*$)/,""));var s=t("#"===r?[]:r);e&&e.preventDefault(),s.length||(s=o.closest(".alert")),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i())};var i=t.fn.alert;t.fn.alert=function(e){return this.each(function(){var i=t(this),o=i.data("bs.alert");o||i.data("bs.alert",o=new n(this)),"string"==typeof e&&o[e].call(i)})},t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=i,this},t(document).on("click.bs.alert.data-api",e,n.prototype.close)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.button"),r="object"==typeof e&&e;o||i.data("bs.button",o=new n(this,r)),"toggle"==e?o.toggle():e&&o.setState(e)})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.7",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,o=i.is("input")?"val":"html",r=i.data();e+="Text",null==r.resetText&&i.data("resetText",i[o]()),setTimeout(t.proxy(function(){i[o](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=t(n.target).closest(".btn");e.call(i,"toggle"),t(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),i.is("input,button")?i.trigger("focus"):i.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.carousel"),r=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e),s="string"==typeof e?e:r.slide;o||i.data("bs.carousel",o=new n(this,r)),"number"==typeof e?o.to(e):s?o[s]():r.interval&&o.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e);if(("prev"==t&&0===n||"next"==t&&n==this.$items.length-1)&&!this.options.wrap)return e;var i=(n+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(i)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(e,i){var o=this.$element.find(".item.active"),r=i||this.getItemForDirection(e,o),s=this.interval,a="next"==e?"left":"right",l=this;if(r.hasClass("active"))return this.sliding=!1;var c=r[0],u=t.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=t(this.$indicators.children()[this.getItemIndex(r)]);h&&h.addClass("active")}var d=t.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),r[0].offsetWidth,o.addClass(a),r.addClass(a),o.one("bsTransitionEnd",function(){r.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(d)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(o.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(d)),s&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this};var o=function(n){var i,o=t(this),r=t(o.attr("data-target")||(i=o.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var s=t.extend({},r.data(),o.data()),a=o.attr("data-slide-to");a&&(s.interval=!1),e.call(r,s),a&&r.data("bs.carousel").to(a),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery),function(t){"use strict";function e(e){var n,i=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(i)}function n(e){return this.each(function(){var n=t(this),o=n.data("bs.collapse"),r=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||n.data("bs.collapse",o=new i(this,r)),"string"==typeof e&&o[e]()})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.3.7",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"),e&&e.transitioning))){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){o&&o.length&&(n.call(o,"hide"),e||o.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[s](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[n](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(i.TRANSITION_DURATION):o.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,i){var o=t(i);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var o=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var o=t(this);o.attr("data-target")||i.preventDefault();var r=e(o),s=r.data("bs.collapse")?"toggle":o.data();n.call(r,s)})}(jQuery),function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=(n=e.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&t(n);return i&&i.length?i:e.parent()}function n(n){n&&3===n.which||(t(i).remove(),t(o).each(function(){var i=t(this),o=e(i),r={relatedTarget:this};o.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(o[0],n.target)||(o.trigger(n=t.Event("hide.bs.dropdown",r)),n.isDefaultPrevented()||(i.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))}))}var i=".dropdown-backdrop",o='[data-toggle="dropdown"]',r=function(e){t(e).on("click.bs.dropdown",this.toggle)};r.VERSION="3.3.7",r.prototype.toggle=function(i){var o=t(this);if(!o.is(".disabled, :disabled")){var r=e(o),s=r.hasClass("open");if(n(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var a={relatedTarget:this};if(r.trigger(i=t.Event("show.bs.dropdown",a)),i.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},r.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var r=e(i),s=r.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&r.find(o).trigger("focus"),i.trigger("click");var a=r.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var l=a.index(n.target);38==n.which&&l>0&&l--,40==n.which&&l<a.length-1&&l++,~l||(l=0),a.eq(l).trigger("focus")}}}};var s=t.fn.dropdown;t.fn.dropdown=function(e){return this.each(function(){var n=t(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),"string"==typeof e&&i[e].call(n)})},t.fn.dropdown.Constructor=r,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=s,this},t(document).on("click.bs.dropdown.data-api",n).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",o,r.prototype.toggle).on("keydown.bs.dropdown.data-api",o,r.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",r.prototype.keydown)}(jQuery),function(t){"use strict";function e(e,i){return this.each(function(){var o=t(this),r=o.data("bs.modal"),s=t.extend({},n.DEFAULTS,o.data(),"object"==typeof e&&e);r||o.data("bs.modal",r=new n(this,s)),"string"==typeof e?r[e](i):s.show&&r.show(i)})}var n=function(e,n){this.options=n,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},n.prototype.show=function(e){var i=this,o=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(o),this.isShown||o.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){i.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(i.$element)&&(i.ignoreBackdropClick=!0)})}),this.backdrop(function(){var o=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),o&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus();var r=t.Event("shown.bs.modal",{relatedTarget:e});o?i.$dialog.one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(n.TRANSITION_DURATION):i.$element.trigger("focus").trigger(r)}))},n.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(e){var i=this,o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=t.support.transition&&o;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+o).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;r?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):s()}else e&&e()},n.prototype.handleUpdate=function(){this.adjustDialog()},n.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},n.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var i=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=n,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var i=t(this),o=i.attr("href"),r=t(i.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,"")),s=r.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(o)&&o},r.data(),i.data());i.is("a")&&n.preventDefault(),r.one("show.bs.modal",function(t){t.isDefaultPrevented()||r.one("hidden.bs.modal",function(){i.is(":visible")&&i.trigger("focus")})}),e.call(r,s,this)})}(jQuery),function(t){"use strict";var e=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};e.VERSION="3.3.7",e.TRANSITION_DURATION=150,e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},e.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),r=o.length;r--;){var s=o[r];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",l="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return(e=t.extend({},this.getDefaults(),this.$element.data(),e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,i){n[t]!=i&&(e[t]=i)}),e},e.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},e.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},e.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue())return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},e.prototype.show=function(){var n=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(n);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(n.isDefaultPrevented()||!i)return;var o=this,r=this.tip(),s=this.getUID(this.type);this.setContent(),r.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,c=l.test(a);c&&(a=a.replace(l,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var u=this.getPosition(),h=r[0].offsetWidth,d=r[0].offsetHeight;if(c){var p=a,f=this.getPosition(this.$viewport);a="bottom"==a&&u.bottom+d>f.bottom?"top":"top"==a&&u.top-d<f.top?"bottom":"right"==a&&u.right+h>f.width?"left":"left"==a&&u.left-h<f.left?"right":a,r.removeClass(p).addClass(a)}var g=this.getCalculatedOffset(a,u,h,d);this.applyPlacement(g,a);var m=function(){var t=o.hoverState;o.$element.trigger("shown.bs."+o.type),o.hoverState=null,"out"==t&&o.leave(o)};t.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",m).emulateTransitionEnd(e.TRANSITION_DURATION):m()}},e.prototype.applyPlacement=function(e,n){var i=this.tip(),o=i[0].offsetWidth,r=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top+=s,e.left+=a,t.offset.setOffset(i[0],t.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),i.addClass("in");var l=i[0].offsetWidth,c=i[0].offsetHeight;"top"==n&&c!=r&&(e.top=e.top+r-c);var u=this.getViewportAdjustedDelta(n,e,l,c);u.left?e.left+=u.left:e.top+=u.top;var h=/top|bottom/.test(n),d=h?2*u.left-o+l:2*u.top-r+c,p=h?"offsetWidth":"offsetHeight";i.offset(e),this.replaceArrow(d,i[0][p],h)},e.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},e.prototype.hide=function(n){function i(){"in"!=o.hoverState&&r.detach(),o.$element&&o.$element.removeAttr("aria-describedby").trigger("hidden.bs."+o.type),n&&n()}var o=this,r=t(this.$tip),s=t.Event("hide.bs."+this.type);if(this.$element.trigger(s),!s.isDefaultPrevented())return r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",i).emulateTransitionEnd(e.TRANSITION_DURATION):i(),this.hoverState=null,this},e.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},e.prototype.hasContent=function(){return this.getTitle()},e.prototype.getPosition=function(e){var n=(e=e||this.$element)[0],i="BODY"==n.tagName,o=n.getBoundingClientRect();null==o.width&&(o=t.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var r=window.SVGElement&&n instanceof window.SVGElement,s=i?{top:0,left:0}:r?null:e.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},l=i?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},o,a,l,s)},e.prototype.getCalculatedOffset=function(t,e,n,i){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-i,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-i/2,left:e.left-n}:{top:e.top+e.height/2-i/2,left:e.left+e.width}},e.prototype.getViewportAdjustedDelta=function(t,e,n,i){var o={top:0,left:0};if(!this.$viewport)return o;var r=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-r-s.scroll,l=e.top+r-s.scroll+i;a<s.top?o.top=s.top-a:l>s.top+s.height&&(o.top=s.top+s.height-l)}else{var c=e.left-r,u=e.left+r+n;c<s.left?o.left=s.left-c:u>s.right&&(o.left=s.left+s.width-u)}return o},e.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},e.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},e.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.toggleEnabled=function(){this.enabled=!this.enabled},e.prototype.toggle=function(e){var n=this;e&&((n=t(e.currentTarget).data("bs."+this.type))||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},e.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var n=t.fn.tooltip;t.fn.tooltip=function(n){return this.each(function(){var i=t(this),o=i.data("bs.tooltip"),r="object"==typeof n&&n;!o&&/destroy|hide/.test(n)||(o||i.data("bs.tooltip",o=new e(this,r)),"string"==typeof n&&o[n]())})},t.fn.tooltip.Constructor=e,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=n,this}}(jQuery),function(t){"use strict";var e=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");e.VERSION="3.3.7",e.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=t.fn.popover;t.fn.popover=function(n){return this.each(function(){var i=t(this),o=i.data("bs.popover"),r="object"==typeof n&&n;!o&&/destroy|hide/.test(n)||(o||i.data("bs.popover",o=new e(this,r)),"string"==typeof n&&o[n]())})},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery),function(t){"use strict";function e(n,i){this.$body=t(document.body),this.$scrollElement=t(t(n).is(document.body)?window:n),this.options=t.extend({},e.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var i=t(this),o=i.data("bs.scrollspy"),r="object"==typeof n&&n;o||i.data("bs.scrollspy",o=new e(this,r)),"string"==typeof n&&o[n]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),o=e.data("target")||e.attr("href"),r=/^#./.test(o)&&t(o);return r&&r.length&&r.is(":visible")&&[[r[n]().top+i,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),o=this.offsets,r=this.targets,s=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=i)return s!=(t=r[r.length-1])&&this.activate(t);if(s&&e<o[0])return this.activeTarget=null,this.clear();for(t=o.length;t--;)s!=r[t]&&e>=o[t]&&(void 0===o[t+1]||e<o[t+1])&&this.activate(r[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var n=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',i=t(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var i=t.fn.scrollspy;t.fn.scrollspy=n,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=i,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);n.call(e,e.data())})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.tab");o||i.data("bs.tab",o=new n(this)),"string"==typeof e&&o[e]()})}var n=function(e){this.element=t(e)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.show=function(){var e=this.element,n=e.closest("ul:not(.dropdown-menu)"),i=e.data("target");if(i||(i=(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var o=n.find(".active:last a"),r=t.Event("hide.bs.tab",{relatedTarget:e[0]}),s=t.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(r),e.trigger(s),!s.isDefaultPrevented()&&!r.isDefaultPrevented()){var a=t(i);this.activate(e.closest("li"),n),this.activate(a,a.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})}}},n.prototype.activate=function(e,i,o){function r(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var s=i.find("> .active"),a=o&&t.support.transition&&(s.length&&s.hasClass("fade")||!!i.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",r).emulateTransitionEnd(n.TRANSITION_DURATION):r(),s.removeClass("in")};var i=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var o=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.affix"),r="object"==typeof e&&e;o||i.data("bs.affix",o=new n(this,r)),"string"==typeof e&&o[e]()})}var n=function(e,i){this.options=t.extend({},n.DEFAULTS,i),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.7",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,i){var o=this.$target.scrollTop(),r=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return o<n&&"top";if("bottom"==this.affixed)return null!=n?!(o+this.unpin<=r.top)&&"bottom":!(o+s<=t-i)&&"bottom";var a=null==this.affixed,l=a?o:r.top;return null!=n&&o<=n?"top":null!=i&&l+(a?s:e)>=t-i&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,o=i.top,r=i.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(r=o=i),"function"==typeof o&&(o=i.top(this.$element)),"function"==typeof r&&(r=i.bottom(this.$element));var a=this.getState(s,e,o,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),c=t.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-e-r})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)})})}(jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(t){"use strict";var e=function(e,n){t.each(["autofocus","savable","hideable","width","height","resize","iconlibrary","language","footer","fullscreen","hiddenButtons","disabledButtons"],function(i,o){void 0!==t(e).data(o)&&((n="object"==typeof n?n:{})[o]=t(e).data(o))}),this.$ns="bootstrap-markdown",this.$element=t(e),this.$editable={el:null,type:null,attrKeys:[],attrValues:[],content:null},this.$options=t.extend(!0,{},t.fn.markdown.defaults,n,this.$element.data("options")),this.$oldContent=null,this.$isPreview=!1,this.$isFullscreen=!1,this.$editor=null,this.$textarea=null,this.$handler=[],this.$callback=[],this.$nextTab=[],this.showEditor()};e.prototype={constructor:e,__alterButtons:function(e,n){var i=this.$handler,o="all"==e,r=this;t.each(i,function(t,i){!1===(!o&&i.indexOf(e)<0)&&n(r.$editor.find('button[data-handler="'+i+'"]'))})},__buildButtons:function(e,n){var i,o=this.$ns,r=this.$handler,s=this.$callback;for(i=0;i<e.length;i++){var a,l=e[i];for(a=0;a<l.length;a++){var c,u=l[a].data,h=t("<div/>",{class:"btn-group"});for(c=0;c<u.length;c++){var d,p,f=u[c],g=o+"-"+f.name,m=this.__getIcon(f.icon),v=f.btnText?f.btnText:"",y=f.btnClass?f.btnClass:"btn",b=f.tabIndex?f.tabIndex:"-1",x=void 0!==f.hotkey?f.hotkey:"",w=void 0!==jQuery.hotkeys&&""!==x?" ("+x+")":"";(d=t("<button></button>")).text(" "+this.__localize(v)).addClass("btn-default btn-sm").addClass(y),y.match(/btn\-(primary|success|info|warning|danger|link)/)&&d.removeClass("btn-default"),d.attr({type:"button",title:this.__localize(f.title)+w,tabindex:b,"data-provider":o,"data-handler":g,"data-hotkey":x}),!0===f.toggle&&d.attr("data-toggle","button"),(p=t("<span/>")).addClass(m),p.prependTo(d),h.append(d),r.push(g),s.push(f.callback)}n.append(h)}}return n},__setListener:function(){var e=void 0!==this.$textarea.attr("rows"),n=this.$textarea.val().split("\n").length>5?this.$textarea.val().split("\n").length:"5",i=e?this.$textarea.attr("rows"):n;this.$textarea.attr("rows",i),this.$options.resize&&this.$textarea.css("resize",this.$options.resize),this.$textarea.on({focus:t.proxy(this.focus,this),keyup:t.proxy(this.keyup,this),change:t.proxy(this.change,this),select:t.proxy(this.select,this)}),this.eventSupported("keydown")&&this.$textarea.on("keydown",t.proxy(this.keydown,this)),this.eventSupported("keypress")&&this.$textarea.on("keypress",t.proxy(this.keypress,this)),this.$textarea.data("markdown",this)},__handle:function(e){var n=t(e.currentTarget),i=this.$handler,o=this.$callback,r=n.attr("data-handler"),s=o[i.indexOf(r)];t(e.currentTarget).focus(),s(this),this.change(this),r.indexOf("cmdSave")<0&&this.$textarea.focus(),e.preventDefault()},__localize:function(e){var n=t.fn.markdown.messages,i=this.$options.language;return void 0!==n&&void 0!==n[i]&&void 0!==n[i][e]?n[i][e]:e},__getIcon:function(t){return"object"==typeof t?t[this.$options.iconlibrary]:t},setFullscreen:function(e){var n=this.$editor,i=this.$textarea;!0===e?(n.addClass("md-fullscreen-mode"),t("body").addClass("md-nooverflow"),this.$options.onFullscreen(this)):(n.removeClass("md-fullscreen-mode"),t("body").removeClass("md-nooverflow"),1==this.$isPreview&&this.hidePreview().showPreview()),this.$isFullscreen=e,i.focus()},showEditor:function(){var e,n=this,i=this.$ns,o=this.$element,r=(o.css("height"),o.css("width"),this.$editable),s=this.$handler,a=this.$callback,l=this.$options,c=t("<div/>",{class:"md-editor",click:function(){n.focus()}});if(null===this.$editor){var u=t("<div/>",{class:"md-header btn-toolbar"}),h=[];if(l.buttons.length>0&&(h=h.concat(l.buttons[0])),l.additionalButtons.length>0&&t.each(l.additionalButtons[0],function(e,n){var i=t.grep(h,function(t,e){return t.name===n.name});i.length>0?i[0].data=i[0].data.concat(n.data):h.push(l.additionalButtons[0][e])}),l.reorderButtonGroups.length>0&&(h=h.filter(function(t){return l.reorderButtonGroups.indexOf(t.name)>-1}).sort(function(t,e){return l.reorderButtonGroups.indexOf(t.name)<l.reorderButtonGroups.indexOf(e.name)?-1:l.reorderButtonGroups.indexOf(t.name)>l.reorderButtonGroups.indexOf(e.name)?1:0})),h.length>0&&(u=this.__buildButtons([h],u)),l.fullscreen.enable&&u.append('<div class="md-controls"><a class="md-control md-control-fullscreen" href="#"><span class="'+this.__getIcon(l.fullscreen.icons.fullscreenOn)+'"></span></a></div>').on("click",".md-control-fullscreen",function(t){t.preventDefault(),n.setFullscreen(!0)}),c.append(u),o.is("textarea"))o.before(c),(e=o).addClass("md-input"),c.append(e);else{var d="function"==typeof toMarkdown?toMarkdown(o.html()):o.html(),p=t.trim(d);e=t("<textarea/>",{class:"md-input",val:p}),c.append(e),r.el=o,r.type=o.prop("tagName").toLowerCase(),r.content=o.html(),t(o[0].attributes).each(function(){r.attrKeys.push(this.nodeName),r.attrValues.push(this.nodeValue)}),o.replaceWith(c)}var f,g=t("<div/>",{class:"md-footer"}),m=!1;if(l.savable){m=!0;var v="cmdSave";s.push(v),a.push(l.onSave),g.append('<button class="btn btn-success" data-provider="'+i+'" data-handler="'+v+'"><i class="icon icon-white icon-ok"></i> '+this.__localize("Save")+"</button>")}if(f="function"==typeof l.footer?l.footer(this):l.footer,""!==t.trim(f)&&(m=!0,g.append(f)),m&&c.append(g),l.width&&"inherit"!==l.width&&(jQuery.isNumeric(l.width)?(c.css("display","table"),e.css("width",l.width+"px")):c.addClass(l.width)),l.height&&"inherit"!==l.height)if(jQuery.isNumeric(l.height)){var y=l.height;u&&(y=Math.max(0,y-u.outerHeight())),g&&(y=Math.max(0,y-g.outerHeight())),e.css("height",y+"px")}else c.addClass(l.height);this.$editor=c,this.$textarea=e,this.$editable=r,this.$oldContent=this.getContent(),this.__setListener(),this.$editor.attr("id",(new Date).getTime()),this.$editor.on("click",'[data-provider="bootstrap-markdown"]',t.proxy(this.__handle,this)),(this.$element.is(":disabled")||this.$element.is("[readonly]"))&&(this.$editor.addClass("md-editor-disabled"),this.disableButtons("all")),this.eventSupported("keydown")&&"object"==typeof jQuery.hotkeys&&u.find('[data-provider="bootstrap-markdown"]').each(function(){var n=t(this),i=n.attr("data-hotkey");""!==i.toLowerCase()&&e.bind("keydown",i,function(){return n.trigger("click"),!1})}),"preview"===l.initialstate?this.showPreview():"fullscreen"===l.initialstate&&l.fullscreen.enable&&this.setFullscreen(!0)}else this.$editor.show();return l.autofocus&&(this.$textarea.focus(),this.$editor.addClass("active")),l.fullscreen.enable&&!1!==l.fullscreen&&(this.$editor.append('<div class="md-fullscreen-controls"><a href="#" class="exit-fullscreen" title="Exit fullscreen"><span class="'+this.__getIcon(l.fullscreen.icons.fullscreenOff)+'"></span></a></div>'),this.$editor.on("click",".exit-fullscreen",function(t){t.preventDefault(),n.setFullscreen(!1)})),this.hideButtons(l.hiddenButtons),this.disableButtons(l.disabledButtons),l.onShow(this),this},parseContent:function(t){t=t||this.$textarea.val();return this.$options.parser?this.$options.parser(t):"object"==typeof markdown?markdown.toHTML(t):"function"==typeof marked?marked(t):t},showPreview:function(){var e,n,i=this.$options,o=this.$textarea,r=o.next(),s=t("<div/>",{class:"md-preview","data-provider":"markdown-preview"});return 1==this.$isPreview?this:(this.$isPreview=!0,this.disableButtons("all").enableButtons("cmdPreview"),e="string"==typeof(n=i.onPreview(this))?n:this.parseContent(),s.html(e),r&&"md-footer"==r.attr("class")?s.insertBefore(r):o.parent().append(s),s.css({width:o.outerWidth()+"px",height:o.outerHeight()+"px"}),this.$options.resize&&s.css("resize",this.$options.resize),o.hide(),s.data("markdown",this),(this.$element.is(":disabled")||this.$element.is("[readonly]"))&&(this.$editor.addClass("md-editor-disabled"),this.disableButtons("all")),this)},hidePreview:function(){return this.$isPreview=!1,this.$editor.find('div[data-provider="markdown-preview"]').remove(),this.enableButtons("all"),this.disableButtons(this.$options.disabledButtons),this.$textarea.show(),this.__setListener(),this},isDirty:function(){return this.$oldContent!=this.getContent()},getContent:function(){return this.$textarea.val()},setContent:function(t){return this.$textarea.val(t),this},findSelection:function(t){var e;if((e=this.getContent().indexOf(t))>=0&&t.length>0){var n,i=this.getSelection();return this.setSelection(e,e+t.length),n=this.getSelection(),this.setSelection(i.start,i.end),n}return null},getSelection:function(){var t=this.$textarea[0];return("selectionStart"in t&&function(){var e=t.selectionEnd-t.selectionStart;return{start:t.selectionStart,end:t.selectionEnd,length:e,text:t.value.substr(t.selectionStart,e)}}||function(){return null})()},setSelection:function(t,e){var n=this.$textarea[0];return("selectionStart"in n&&function(){n.selectionStart=t,n.selectionEnd=e}||function(){return null})()},replaceSelection:function(t){var e=this.$textarea[0];return("selectionStart"in e&&function(){return e.value=e.value.substr(0,e.selectionStart)+t+e.value.substr(e.selectionEnd,e.value.length),e.selectionStart=e.value.length,this}||function(){return e.value+=t,jQuery(e)})()},getNextTab:function(){if(0===this.$nextTab.length)return null;var t,e=this.$nextTab.shift();return"function"==typeof e?t=e():"object"==typeof e&&e.length>0&&(t=e),t},setNextTab:function(t,e){if("string"==typeof t){var n=this;this.$nextTab.push(function(){return n.findSelection(t)})}else if("number"==typeof t&&"number"==typeof e){var i=this.getSelection();this.setSelection(t,e),this.$nextTab.push(this.getSelection()),this.setSelection(i.start,i.end)}},__parseButtonNameParam:function(t){return"string"==typeof t?t.split(" "):t},enableButtons:function(e){var n=this.__parseButtonNameParam(e),i=this;return t.each(n,function(t,e){i.__alterButtons(n[t],function(t){t.removeAttr("disabled")})}),this},disableButtons:function(e){var n=this.__parseButtonNameParam(e),i=this;return t.each(n,function(t,e){i.__alterButtons(n[t],function(t){t.attr("disabled","disabled")})}),this},hideButtons:function(e){var n=this.__parseButtonNameParam(e),i=this;return t.each(n,function(t,e){i.__alterButtons(n[t],function(t){t.addClass("hidden")})}),this},showButtons:function(e){var n=this.__parseButtonNameParam(e),i=this;return t.each(n,function(t,e){i.__alterButtons(n[t],function(t){t.removeClass("hidden")})}),this},eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},keyup:function(t){var e=!1;switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:var n;if(null!==(n=this.getNextTab())){var i=this;setTimeout(function(){i.setSelection(n.start,n.end)},500),e=!0}else{var o=this.getSelection();o.start==o.end&&o.end==this.getContent().length?e=!1:(this.setSelection(this.getContent().length,this.getContent().length),e=!0)}break;case 13:e=!1;break;case 27:this.$isFullscreen&&this.setFullscreen(!1),e=!1;break;default:e=!1}e&&(t.stopPropagation(),t.preventDefault()),this.$options.onChange(this)},change:function(t){return this.$options.onChange(this),this},select:function(t){return this.$options.onSelect(this),this},focus:function(e){var n=this.$options,i=(n.hideable,this.$editor);return i.addClass("active"),t(document).find(".md-editor").each(function(){var e;t(this).attr("id")!==i.attr("id")&&(null===(e=t(this).find("textarea").data("markdown"))&&(e=t(this).find('div[data-provider="markdown-preview"]').data("markdown")),e&&e.blur())}),n.onFocus(this),this},blur:function(e){var n=this.$options,i=n.hideable,o=this.$editor,r=this.$editable;if(o.hasClass("active")||0===this.$element.parent().length){if(o.removeClass("active"),i)if(null!==r.el){var s=t("<"+r.type+"/>"),a=this.getContent(),l=this.parseContent(a);t(r.attrKeys).each(function(t,e){s.attr(r.attrKeys[t],r.attrValues[t])}),s.html(l),o.replaceWith(s)}else o.hide();n.onBlur(this)}return this}};var n=t.fn.markdown;t.fn.markdown=function(n){return this.each(function(){var i=t(this),o=i.data("markdown"),r="object"==typeof n&&n;o||i.data("markdown",o=new e(this,r))})},t.fn.markdown.messages={},t.fn.markdown.defaults={autofocus:!1,hideable:!1,savable:!1,width:"inherit",height:"inherit",resize:"none",iconlibrary:"glyph",language:"en",initialstate:"editor",parser:null,buttons:[[{name:"groupFont",data:[{name:"cmdBold",hotkey:"Ctrl+B",title:"Bold",icon:{glyph:"glyphicon glyphicon-bold",fa:"fa fa-bold","fa-3":"icon-bold"},callback:function(t){var e,n,i=t.getSelection(),o=t.getContent();e=0===i.length?t.__localize("strong text"):i.text,"**"===o.substr(i.start-2,2)&&"**"===o.substr(i.end,2)?(t.setSelection(i.start-2,i.end+2),t.replaceSelection(e),n=i.start-2):(t.replaceSelection("**"+e+"**"),n=i.start+2),t.setSelection(n,n+e.length)}},{name:"cmdItalic",title:"Italic",hotkey:"Ctrl+I",icon:{glyph:"glyphicon glyphicon-italic",fa:"fa fa-italic","fa-3":"icon-italic"},callback:function(t){var e,n,i=t.getSelection(),o=t.getContent();e=0===i.length?t.__localize("emphasized text"):i.text,"_"===o.substr(i.start-1,1)&&"_"===o.substr(i.end,1)?(t.setSelection(i.start-1,i.end+1),t.replaceSelection(e),n=i.start-1):(t.replaceSelection("_"+e+"_"),n=i.start+1),t.setSelection(n,n+e.length)}},{name:"cmdHeading",title:"Heading",hotkey:"Ctrl+H",icon:{glyph:"glyphicon glyphicon-header",fa:"fa fa-header","fa-3":"icon-font"},callback:function(t){var e,n,i,o,r=t.getSelection(),s=t.getContent();e=0===r.length?t.__localize("heading text"):r.text+"\n",i=4,"### "===s.substr(r.start-i,i)||(i=3,"###"===s.substr(r.start-i,i))?(t.setSelection(r.start-i,r.end),t.replaceSelection(e),n=r.start-i):r.start>0&&((o=s.substr(r.start-1,1))&&"\n"!=o)?(t.replaceSelection("\n\n### "+e),n=r.start+6):(t.replaceSelection("### "+e),n=r.start+4),t.setSelection(n,n+e.length)}}]},{name:"groupLink",data:[{name:"cmdUrl",title:"URL/Link",hotkey:"Ctrl+L",icon:{glyph:"glyphicon glyphicon-link",fa:"fa fa-link","fa-3":"icon-link"},callback:function(e){var n,i,o,r=e.getSelection();e.getContent();n=0===r.length?e.__localize("enter link description here"):r.text,o=prompt(e.__localize("Insert Hyperlink"),"http://");var s=new RegExp("^((http|https)://|(mailto:)|(//))[a-z0-9]","i");if(null!==o&&""!==o&&"http://"!==o&&s.test(o)){var a=t("<div>"+o+"</div>").text();e.replaceSelection("["+n+"]("+a+")"),i=r.start+1,e.setSelection(i,i+n.length)}}},{name:"cmdImage",title:"Image",hotkey:"Ctrl+G",icon:{glyph:"glyphicon glyphicon-picture",fa:"fa fa-picture-o","fa-3":"icon-picture"},callback:function(e){var n,i,o,r=e.getSelection();e.getContent();n=0===r.length?e.__localize("enter image description here"):r.text,o=prompt(e.__localize("Insert Image Hyperlink"),"http://");var s=new RegExp("^((http|https)://|(//))[a-z0-9]","i");if(null!==o&&""!==o&&"http://"!==o&&s.test(o)){var a=t("<div>"+o+"</div>").text();e.replaceSelection("+'")'),i=r.start+2,e.setNextTab(e.__localize("enter image title here")),e.setSelection(i,i+n.length)}}}]},{name:"groupMisc",data:[{name:"cmdList",hotkey:"Ctrl+U",title:"Unordered List",icon:{glyph:"glyphicon glyphicon-list",fa:"fa fa-list","fa-3":"icon-list-ul"},callback:function(e){var n,i,o=e.getSelection();e.getContent();if(0===o.length)n=e.__localize("list text here"),e.replaceSelection("- "+n),i=o.start+2;else if(o.text.indexOf("\n")<0)n=o.text,e.replaceSelection("- "+n),i=o.start+2;else{var r=[];n=(r=o.text.split("\n"))[0],t.each(r,function(t,e){r[t]="- "+e}),e.replaceSelection("\n\n"+r.join("\n")),i=o.start+4}e.setSelection(i,i+n.length)}},{name:"cmdListO",hotkey:"Ctrl+O",title:"Ordered List",icon:{glyph:"glyphicon glyphicon-th-list",fa:"fa fa-list-ol","fa-3":"icon-list-ol"},callback:function(e){var n,i,o=e.getSelection();e.getContent();if(0===o.length)n=e.__localize("list text here"),e.replaceSelection("1. "+n),i=o.start+3;else if(o.text.indexOf("\n")<0)n=o.text,e.replaceSelection("1. "+n),i=o.start+3;else{var r=[];n=(r=o.text.split("\n"))[0],t.each(r,function(t,e){r[t]="1. "+e}),e.replaceSelection("\n\n"+r.join("\n")),i=o.start+5}e.setSelection(i,i+n.length)}},{name:"cmdCode",hotkey:"Ctrl+K",title:"Code",icon:{glyph:"glyphicon glyphicon-asterisk",fa:"fa fa-code","fa-3":"icon-code"},callback:function(t){var e,n,i=t.getSelection(),o=t.getContent();e=0===i.length?t.__localize("code text here"):i.text,"```\n"===o.substr(i.start-4,4)&&"\n```"===o.substr(i.end,4)?(t.setSelection(i.start-4,i.end+4),t.replaceSelection(e),n=i.start-4):"`"===o.substr(i.start-1,1)&&"`"===o.substr(i.end,1)?(t.setSelection(i.start-1,i.end+1),t.replaceSelection(e),n=i.start-1):o.indexOf("\n")>-1?(t.replaceSelection("```\n"+e+"\n```"),n=i.start+4):(t.replaceSelection("`"+e+"`"),n=i.start+1),t.setSelection(n,n+e.length)}},{name:"cmdQuote",hotkey:"Ctrl+Q",title:"Quote",icon:{glyph:"glyphicon glyphicon-comment",fa:"fa fa-quote-left","fa-3":"icon-quote-left"},callback:function(e){var n,i,o=e.getSelection();e.getContent();if(0===o.length)n=e.__localize("quote here"),e.replaceSelection("> "+n),i=o.start+2;else if(o.text.indexOf("\n")<0)n=o.text,e.replaceSelection("> "+n),i=o.start+2;else{var r=[];n=(r=o.text.split("\n"))[0],t.each(r,function(t,e){r[t]="> "+e}),e.replaceSelection("\n\n"+r.join("\n")),i=o.start+4}e.setSelection(i,i+n.length)}}]},{name:"groupUtil",data:[{name:"cmdPreview",toggle:!0,hotkey:"Ctrl+P",title:"Preview",btnText:"Preview",btnClass:"btn btn-primary btn-sm",icon:{glyph:"glyphicon glyphicon-search",fa:"fa fa-search","fa-3":"icon-search"},callback:function(t){!1===t.$isPreview?t.showPreview():t.hidePreview()}}]}]],additionalButtons:[],reorderButtonGroups:[],hiddenButtons:[],disabledButtons:[],footer:"",fullscreen:{enable:!0,icons:{fullscreenOn:{fa:"fa fa-expand",glyph:"glyphicon glyphicon-fullscreen","fa-3":"icon-resize-full"},fullscreenOff:{fa:"fa fa-compress",glyph:"glyphicon glyphicon-fullscreen","fa-3":"icon-resize-small"}}},onShow:function(t){},onPreview:function(t){},onSave:function(t){},onBlur:function(t){},onFocus:function(t){},onChange:function(t){},onFullscreen:function(t){},onSelect:function(t){}},t.fn.markdown.Constructor=e,t.fn.markdown.noConflict=function(){return t.fn.markdown=n,this};var i=function(t){var e=t;e.data("markdown")?e.data("markdown").showEditor():e.markdown()};t(document).on("click.markdown.data-api",'[data-provide="markdown-editable"]',function(e){i(t(this)),e.preventDefault()}).on("click focusin",function(e){var n;n=t(document.activeElement),t(document).find(".md-editor").each(function(){var e=t(this),i=n.closest(".md-editor")[0]===this,o=e.find("textarea").data("markdown")||e.find('div[data-provider="markdown-preview"]').data("markdown");o&&!i&&o.blur()})}).ready(function(){t('textarea[data-provide="markdown"]').each(function(){i(t(this))})})}),function(){"use strict";var t={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:h,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:h,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:h,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};function e(e){this.tokens=[],this.tokens.links={},this.options=e||p.defaults,this.rules=t.normal,this.options.gfm&&(this.options.tables?this.rules=t.tables:this.rules=t.gfm)}t.bullet=/(?:[*+-]|\d+\.)/,t.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,t.item=a(t.item,"gm")(/bull/g,t.bullet)(),t.list=a(t.list)(/bull/g,t.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+t.def.source+")")(),t.blockquote=a(t.blockquote)("def",t.def)(),t._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",t.html=a(t.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,t._tag)(),t.paragraph=a(t.paragraph)("hr",t.hr)("heading",t.heading)("lheading",t.lheading)("blockquote",t.blockquote)("tag","<"+t._tag)("def",t.def)(),t.normal=d({},t),t.gfm=d({},t.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),t.gfm.paragraph=a(t.paragraph)("(?!","(?!"+t.gfm.fences.source.replace("\\1","\\2")+"|"+t.list.source.replace("\\1","\\3")+"|")(),t.tables=d({},t.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=t,e.lex=function(t,n){return new e(n).lex(t)},e.prototype.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(t,!0)},e.prototype.token=function(e,n,i){var o,r,s,a,l,c,u,h,d;for(e=e.replace(/^ +$/gm,"");e;)if((s=this.rules.newline.exec(e))&&(e=e.substring(s[0].length),s[0].length>1&&this.tokens.push({type:"space"})),s=this.rules.code.exec(e))e=e.substring(s[0].length),s=s[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?s:s.replace(/\n+$/,"")});else if(s=this.rules.fences.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"code",lang:s[2],text:s[3]||""});else if(s=this.rules.heading.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"heading",depth:s[1].length,text:s[2]});else if(n&&(s=this.rules.nptable.exec(e))){for(e=e.substring(s[0].length),c={type:"table",header:s[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:s[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:s[3].replace(/\n$/,"").split("\n")},h=0;h<c.align.length;h++)/^ *-+: *$/.test(c.align[h])?c.align[h]="right":/^ *:-+: *$/.test(c.align[h])?c.align[h]="center":/^ *:-+ *$/.test(c.align[h])?c.align[h]="left":c.align[h]=null;for(h=0;h<c.cells.length;h++)c.cells[h]=c.cells[h].split(/ *\| */);this.tokens.push(c)}else if(s=this.rules.lheading.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"heading",depth:"="===s[2]?1:2,text:s[1]});else if(s=this.rules.hr.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"hr"});else if(s=this.rules.blockquote.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"blockquote_start"}),s=s[0].replace(/^ *> ?/gm,""),this.token(s,n,!0),this.tokens.push({type:"blockquote_end"});else if(s=this.rules.list.exec(e)){for(e=e.substring(s[0].length),a=s[2],this.tokens.push({type:"list_start",ordered:a.length>1}),o=!1,d=(s=s[0].match(this.rules.item)).length,h=0;h<d;h++)u=(c=s[h]).length,~(c=c.replace(/^ *([*+-]|\d+\.) +/,"")).indexOf("\n ")&&(u-=c.length,c=this.options.pedantic?c.replace(/^ {1,4}/gm,""):c.replace(new RegExp("^ {1,"+u+"}","gm"),"")),this.options.smartLists&&h!==d-1&&(a===(l=t.bullet.exec(s[h+1])[0])||a.length>1&&l.length>1||(e=s.slice(h+1).join("\n")+e,h=d-1)),r=o||/\n\n(?!\s*$)/.test(c),h!==d-1&&(o="\n"===c.charAt(c.length-1),r||(r=o)),this.tokens.push({type:r?"loose_item_start":"list_item_start"}),this.token(c,!1,i),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(s=this.rules.html.exec(e))e=e.substring(s[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===s[1]||"script"===s[1]||"style"===s[1]),text:s[0]});else if(!i&&n&&(s=this.rules.def.exec(e)))e=e.substring(s[0].length),this.tokens.links[s[1].toLowerCase()]={href:s[2],title:s[3]};else if(n&&(s=this.rules.table.exec(e))){for(e=e.substring(s[0].length),c={type:"table",header:s[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:s[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:s[3].replace(/(?: *\| *)?\n$/,"").split("\n")},h=0;h<c.align.length;h++)/^ *-+: *$/.test(c.align[h])?c.align[h]="right":/^ *:-+: *$/.test(c.align[h])?c.align[h]="center":/^ *:-+ *$/.test(c.align[h])?c.align[h]="left":c.align[h]=null;for(h=0;h<c.cells.length;h++)c.cells[h]=c.cells[h].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);this.tokens.push(c)}else if(n&&(s=this.rules.paragraph.exec(e)))e=e.substring(s[0].length),this.tokens.push({type:"paragraph",text:"\n"===s[1].charAt(s[1].length-1)?s[1].slice(0,-1):s[1]});else if(s=this.rules.text.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"text",text:s[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var n={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ <>]+(@|:\/)[^ <>]+)>/,url:h,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^<'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)([\s\S]*?[^`])\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:h,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};function i(t,e){if(this.options=e||p.defaults,this.links=t,this.rules=n.normal,this.renderer=this.options.renderer||new o,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=n.breaks:this.rules=n.gfm:this.options.pedantic&&(this.rules=n.pedantic)}function o(t){this.options=t||{}}function r(t){this.tokens=[],this.token=null,this.options=t||p.defaults,this.options.renderer=this.options.renderer||new o,this.renderer=this.options.renderer,this.renderer.options=this.options}function s(t,e){return t.replace(e?/&/g:/&(?!#?\w+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(t,e){return t=t.source,e=e||"",function n(i,o){return i?(o=(o=o.source||o).replace(/(^|[^\[])\^/g,"$1"),t=t.replace(i,o),n):new RegExp(t,e)}}function l(t,e){return c[" "+t]||(/^[^:]+:\/*[^/]*$/.test(t)?c[" "+t]=t+"/":c[" "+t]=t.replace(/[^/]*$/,"")),t=c[" "+t],"//"===e.slice(0,2)?t.replace(/:[\s\S]*/,":")+e:"/"===e.charAt(0)?t.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+e:t+e}n._inside=/(?:\[[^\]]*\]|\\[\[\]]|[^\[\]]|\](?=[^\[]*\]))*/,n._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/,n.link=a(n.link)("inside",n._inside)("href",n._href)(),n.reflink=a(n.reflink)("inside",n._inside)(),n.normal=d({},n),n.pedantic=d({},n.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),n.gfm=d({},n.normal,{escape:a(n.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:a(n.text)("]|","~]|")("|","|https?://|")()}),n.breaks=d({},n.gfm,{br:a(n.br)("{2,}","*")(),text:a(n.gfm.text)("{2,}","*")()}),i.rules=n,i.output=function(t,e,n){return new i(e,n).output(t)},i.prototype.output=function(t){for(var e,n,i,o,r="";t;)if(o=this.rules.escape.exec(t))t=t.substring(o[0].length),r+=o[1];else if(o=this.rules.autolink.exec(t))t=t.substring(o[0].length),"@"===o[2]?(n=s(":"===o[1].charAt(6)?this.mangle(o[1].substring(7)):this.mangle(o[1])),i=this.mangle("mailto:")+n):i=n=s(o[1]),r+=this.renderer.link(i,null,n);else if(this.inLink||!(o=this.rules.url.exec(t))){if(o=this.rules.tag.exec(t))!this.inLink&&/^<a /i.test(o[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(o[0])&&(this.inLink=!1),t=t.substring(o[0].length),r+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):s(o[0]):o[0];else if(o=this.rules.link.exec(t))t=t.substring(o[0].length),this.inLink=!0,r+=this.outputLink(o,{href:o[2],title:o[3]}),this.inLink=!1;else if((o=this.rules.reflink.exec(t))||(o=this.rules.nolink.exec(t))){if(t=t.substring(o[0].length),e=(o[2]||o[1]).replace(/\s+/g," "),!(e=this.links[e.toLowerCase()])||!e.href){r+=o[0].charAt(0),t=o[0].substring(1)+t;continue}this.inLink=!0,r+=this.outputLink(o,e),this.inLink=!1}else if(o=this.rules.strong.exec(t))t=t.substring(o[0].length),r+=this.renderer.strong(this.output(o[2]||o[1]));else if(o=this.rules.em.exec(t))t=t.substring(o[0].length),r+=this.renderer.em(this.output(o[2]||o[1]));else if(o=this.rules.code.exec(t))t=t.substring(o[0].length),r+=this.renderer.codespan(s(o[2].trim(),!0));else if(o=this.rules.br.exec(t))t=t.substring(o[0].length),r+=this.renderer.br();else if(o=this.rules.del.exec(t))t=t.substring(o[0].length),r+=this.renderer.del(this.output(o[1]));else if(o=this.rules.text.exec(t))t=t.substring(o[0].length),r+=this.renderer.text(s(this.smartypants(o[0])));else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}else t=t.substring(o[0].length),i=n=s(o[1]),r+=this.renderer.link(i,null,n);return r},i.prototype.outputLink=function(t,e){var n=s(e.href),i=e.title?s(e.title):null;return"!"!==t[0].charAt(0)?this.renderer.link(n,i,this.output(t[1])):this.renderer.image(n,i,s(t[1]))},i.prototype.smartypants=function(t){return this.options.smartypants?t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):t},i.prototype.mangle=function(t){if(!this.options.mangle)return t;for(var e,n="",i=t.length,o=0;o<i;o++)e=t.charCodeAt(o),Math.random()>.5&&(e="x"+e.toString(16)),n+="&#"+e+";";return n},o.prototype.code=function(t,e,n){if(this.options.highlight){var i=this.options.highlight(t,e);null!=i&&i!==t&&(n=!0,t=i)}return e?'<pre><code class="'+this.options.langPrefix+s(e,!0)+'">'+(n?t:s(t,!0))+"\n</code></pre>\n":"<pre><code>"+(n?t:s(t,!0))+"\n</code></pre>"},o.prototype.blockquote=function(t){return"<blockquote>\n"+t+"</blockquote>\n"},o.prototype.html=function(t){return t},o.prototype.heading=function(t,e,n){return"<h"+e+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+t+"</h"+e+">\n"},o.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},o.prototype.list=function(t,e){var n=e?"ol":"ul";return"<"+n+">\n"+t+"</"+n+">\n"},o.prototype.listitem=function(t){return"<li>"+t+"</li>\n"},o.prototype.paragraph=function(t){return"<p>"+t+"</p>\n"},o.prototype.table=function(t,e){return"<table>\n<thead>\n"+t+"</thead>\n<tbody>\n"+e+"</tbody>\n</table>\n"},o.prototype.tablerow=function(t){return"<tr>\n"+t+"</tr>\n"},o.prototype.tablecell=function(t,e){var n=e.header?"th":"td";return(e.align?"<"+n+' style="text-align:'+e.align+'">':"<"+n+">")+t+"</"+n+">\n"},o.prototype.strong=function(t){return"<strong>"+t+"</strong>"},o.prototype.em=function(t){return"<em>"+t+"</em>"},o.prototype.codespan=function(t){return"<code>"+t+"</code>"},o.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},o.prototype.del=function(t){return"<del>"+t+"</del>"},o.prototype.link=function(t,e,n){if(this.options.sanitize){try{var i=decodeURIComponent((o=t,o.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))).replace(/[^\w:]/g,"").toLowerCase()}catch(t){return n}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:")||0===i.indexOf("data:"))return n}var o;this.options.baseUrl&&!u.test(t)&&(t=l(this.options.baseUrl,t));var r='<a href="'+t+'"';return e&&(r+=' title="'+e+'"'),r+=">"+n+"</a>"},o.prototype.image=function(t,e,n){this.options.baseUrl&&!u.test(t)&&(t=l(this.options.baseUrl,t));var i='<img src="'+t+'" alt="'+n+'"';return e&&(i+=' title="'+e+'"'),i+=this.options.xhtml?"/>":">"},o.prototype.text=function(t){return t},r.parse=function(t,e,n){return new r(e,n).parse(t)},r.prototype.parse=function(t){this.inline=new i(t.links,this.options,this.renderer),this.tokens=t.reverse();for(var e="";this.next();)e+=this.tok();return e},r.prototype.next=function(){return this.token=this.tokens.pop()},r.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},r.prototype.parseText=function(){for(var t=this.token.text;"text"===this.peek().type;)t+="\n"+this.next().text;return this.inline.output(t)},r.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var t,e,n,i,o="",r="";for(n="",t=0;t<this.token.header.length;t++)({header:!0,align:this.token.align[t]}),n+=this.renderer.tablecell(this.inline.output(this.token.header[t]),{header:!0,align:this.token.align[t]});for(o+=this.renderer.tablerow(n),t=0;t<this.token.cells.length;t++){for(e=this.token.cells[t],n="",i=0;i<e.length;i++)n+=this.renderer.tablecell(this.inline.output(e[i]),{header:!1,align:this.token.align[i]});r+=this.renderer.tablerow(n)}return this.renderer.table(o,r);case"blockquote_start":for(r="";"blockquote_end"!==this.next().type;)r+=this.tok();return this.renderer.blockquote(r);case"list_start":r="";for(var s=this.token.ordered;"list_end"!==this.next().type;)r+=this.tok();return this.renderer.list(r,s);case"list_item_start":for(r="";"list_item_end"!==this.next().type;)r+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(r);case"loose_item_start":for(r="";"list_item_end"!==this.next().type;)r+=this.tok();return this.renderer.listitem(r);case"html":var a=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(a);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}};var c={},u=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function h(){}function d(t){for(var e,n,i=1;i<arguments.length;i++)for(n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function p(t,n,i){if(i||"function"==typeof n){i||(i=n,n=null);var o,a,l=(n=d({},p.defaults,n||{})).highlight,c=0;try{o=e.lex(t,n)}catch(t){return i(t)}a=o.length;var u=function(t){if(t)return n.highlight=l,i(t);var e;try{e=r.parse(o,n)}catch(e){t=e}return n.highlight=l,t?i(t):i(null,e)};if(!l||l.length<3)return u();if(delete n.highlight,!a)return u();for(;c<o.length;c++)!function(t){"code"!==t.type?--a||u():l(t.text,t.lang,function(e,n){return e?u(e):null==n||n===t.text?--a||u():(t.text=n,t.escaped=!0,void(--a||u()))})}(o[c])}else try{return n&&(n=d({},p.defaults,n)),r.parse(e.lex(t,n),n)}catch(t){if(t.message+="\nPlease report this to https://github.com/chjj/marked.",(n||p.defaults).silent)return"<p>An error occurred:</p><pre>"+s(t.message+"",!0)+"</pre>";throw t}}h.exec=h,p.options=p.setOptions=function(t){return d(p.defaults,t),p},p.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new o,xhtml:!1,baseUrl:null},p.Parser=r,p.parser=r.parse,p.Renderer=o,p.Lexer=e,p.lexer=e.lex,p.InlineLexer=i,p.inlineLexer=i.output,p.parse=p,"undefined"!=typeof module&&"object"==typeof exports?module.exports=p:"function"==typeof define&&define.amd?define(function(){return p}):this.marked=p}.call(function(){return this||("undefined"!=typeof window?window:global)}()),function(t){if("function"==typeof define&&define.amd)define(["jquery"],t);else if("object"==typeof module&&module.exports){var e=require("jquery");module.exports=t(e)}else t(jQuery)}(function(t){if(void 0===t)throw new Error("jQuery.textcomplete requires jQuery");return function(t){"use strict";var e=1;t.fn.textcomplete=function(n,i){var o=Array.prototype.slice.call(arguments);return this.each(function(){var r=t(this),s=r.data("textComplete");if(s||(i||(i={}),i._oid=e++,s=new t.fn.textcomplete.Completer(this,i),r.data("textComplete",s)),"string"==typeof n){if(!s)return;o.shift(),s[n].apply(s,o),"destroy"===n&&r.removeData("textComplete")}else t.each(n,function(e){t.each(["header","footer","placement","maxCount"],function(t){var n;e[t]&&(s.option[t]=e[t],n=t+"as a strategy param is deprecated. Use option.",console.warn&&console.warn(n),delete e[t])})}),s.register(t.fn.textcomplete.Strategy.parse(n,{el:this,$el:r}))})}}(t),function(t){"use strict";function e(n,i){if(this.$el=t(n),this.id="textcomplete"+r++,this.strategies=[],this.views=[],this.option=t.extend({},e.defaults,i),!(this.$el.is("input[type=text]")||this.$el.is("input[type=search]")||this.$el.is("textarea")||n.isContentEditable||"true"==n.contentEditable))throw new Error("textcomplete must be called on a Textarea or a ContentEditable.");if(n===n.ownerDocument.activeElement)this.initialize();else{var o=this;this.$el.one("focus."+this.id,function(){o.initialize()}),this.option.adapter&&"CKEditor"!=this.option.adapter||"undefined"==typeof CKEDITOR||!this.$el.is("textarea")||CKEDITOR.on("instanceReady",function(e){-1==t.inArray(e.editor.id,s)&&(s.push(e.editor.id),e.editor.on("focus",function(n){o.$el=t(e.editor.editable().$),o.option.adapter||(o.option.adapter=t.fn.textcomplete.CKEditor),o.option.ckeditor_instance=e.editor,o.initialize()}))})}}var n,i,o,r=0,s=[];e.defaults={appendTo:"body",className:"",dropdownClassName:"dropdown-menu textcomplete-dropdown",maxCount:10,zIndex:"100",rightEdgeOffset:30},t.extend(e.prototype,{id:null,option:null,strategies:null,adapter:null,dropdown:null,$el:null,$iframe:null,initialize:function(){var e,n,i=this.$el.get(0);if(this.$el.prop("ownerDocument")!==document&&window.frames.length)for(var o=0;o<window.frames.length;o++)if(this.$el.prop("ownerDocument")===window.frames[o].document){this.$iframe=t(window.frames[o].frameElement);break}this.dropdown=new t.fn.textcomplete.Dropdown(i,this,this.option),this.option.adapter?e=this.option.adapter:(n=this.$el.is("textarea")||this.$el.is("input[type=text]")||this.$el.is("input[type=search]")?"number"==typeof i.selectionEnd?"Textarea":"IETextarea":"ContentEditable",e=t.fn.textcomplete[n]),this.adapter=new e(i,this,this.option)},destroy:function(){this.$el.off("."+this.id),this.adapter&&this.adapter.destroy(),this.dropdown&&this.dropdown.destroy(),this.$el=this.adapter=this.dropdown=null},deactivate:function(){this.dropdown&&this.dropdown.deactivate()},trigger:function(t,e){this.dropdown||this.initialize(),null!=t||(t=this.adapter.getTextFromHeadToCaret());var n=this._extractSearchQuery(t);if(n.length){var i=n[1];if(e&&this._term===i&&""!==i)return;this._term=i,this._search.apply(this,n)}else this._term=null,this.dropdown.deactivate()},fire:function(t){var e=Array.prototype.slice.call(arguments,1);return this.$el.trigger(t,e),this},register:function(t){Array.prototype.push.apply(this.strategies,t)},select:function(t,e,n){this._term=null,this.adapter.select(t,e,n),this.fire("change").fire("textComplete:select",t,e),this.adapter.focus()},_clearAtNext:!0,_term:null,_extractSearchQuery:function(e){for(var n=0;n<this.strategies.length;n++){var i=this.strategies[n],o=i.context(e);if(o||""===o){var r=t.isFunction(i.match)?i.match(e):i.match;a=o,"[object String]"===Object.prototype.toString.call(a)&&(e=o);var s=e.match(r);if(s)return[i,s[i.index],s]}}var a;return[]},_search:(n=function(t,e,n,i){var o=this;e.search(n,function(i,r){o.dropdown.shown||o.dropdown.activate(),o._clearAtNext&&(o.dropdown.clear(),o._clearAtNext=!1),o.dropdown.setPosition(o.adapter.getCaretPosition()),o.dropdown.render(o._zip(i,e,n)),r||(t(),o._clearAtNext=!0)},i)},function(){var t=Array.prototype.slice.call(arguments);if(i)o=t;else{i=!0;var e=this;t.unshift(function t(){if(o){var r=o;o=void 0,r.unshift(t),n.apply(e,r)}else i=!1}),n.apply(this,t)}}),_zip:function(e,n,i){return t.map(e,function(t){return{value:t,strategy:n,term:i}})}}),t.fn.textcomplete.Completer=e}(t),function(t){"use strict";function e(n,i,r){this.$el=e.createElement(r),this.completer=i,this.id=i.id+"dropdown",this._data=[],this.$inputEl=t(n),this.option=r,r.listPosition&&(this.setPosition=r.listPosition),r.height&&this.$el.height(r.height);var s=this;t.each(["maxCount","placement","footer","header","noResultsMessage","className"],function(t,e){null!=r[e]&&(s[e]=r[e])}),this._bindEvents(n),o[this.id]=this}var n=t(window),i=function(t,e){var n,i,o=e.strategy.idProperty;for(n=0;n<t.length;n++)if((i=t[n]).strategy===e.strategy)if(o){if(i.value[o]===e.value[o])return!0}else if(i.value===e.value)return!0;return!1},o={};t(document).on("click",function(e){var n=e.originalEvent&&e.originalEvent.keepTextCompleteDropdown;t.each(o,function(t,e){t!==n&&e.deactivate()})});var r={SKIP_DEFAULT:0,KEY_UP:1,KEY_DOWN:2,KEY_ENTER:3,KEY_PAGEUP:4,KEY_PAGEDOWN:5,KEY_ESCAPE:6};t.extend(e,{createElement:function(e){var n=e.appendTo;return n instanceof t||(n=t(n)),t("<ul></ul>").addClass(e.dropdownClassName).attr("id","textcomplete-dropdown-"+e._oid).css({display:"none",left:0,position:"absolute",zIndex:e.zIndex}).appendTo(n)}}),t.extend(e.prototype,{$el:null,$inputEl:null,completer:null,footer:null,header:null,id:null,maxCount:null,placement:"",shown:!1,data:[],className:"",destroy:function(){this.deactivate(),this.$el.off("."+this.id),this.$inputEl.off("."+this.id),this.clear(),this.$el.remove(),this.$el=this.$inputEl=this.completer=null,delete o[this.id]},render:function(e){var n=this._buildContents(e),i=t.map(e,function(t){return t.value});if(e.length){var o=e[0].strategy;o.id?this.$el.attr("data-strategy",o.id):this.$el.removeAttr("data-strategy"),this._renderHeader(i),this._renderFooter(i),n&&(this._renderContents(n),this._fitToBottom(),this._fitToRight(),this._activateIndexedItem()),this._setScroll()}else this.noResultsMessage?this._renderNoResultsMessage(i):this.shown&&this.deactivate()},setPosition:function(e){var i="absolute";return this.$inputEl.add(this.$inputEl.parents()).each(function(){return"absolute"!==t(this).css("position")&&("fixed"===t(this).css("position")?(e.top-=n.scrollTop(),e.left-=n.scrollLeft(),i="fixed",!1):void 0)}),this.$el.css(this._applyPlacement(e)),this.$el.css({position:i}),this},clear:function(){this.$el.html(""),this.data=[],this._index=0,this._$header=this._$footer=this._$noResultsMessage=null},activate:function(){return this.shown||(this.clear(),this.$el.show(),this.className&&this.$el.addClass(this.className),this.completer.fire("textComplete:show"),this.shown=!0),this},deactivate:function(){return this.shown&&(this.$el.hide(),this.className&&this.$el.removeClass(this.className),this.completer.fire("textComplete:hide"),this.shown=!1),this},isUp:function(t){return 38===t.keyCode||t.ctrlKey&&80===t.keyCode},isDown:function(t){return 40===t.keyCode||t.ctrlKey&&78===t.keyCode},isEnter:function(t){return!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&(13===t.keyCode||9===t.keyCode||!0===this.option.completeOnSpace&&32===t.keyCode)},isPageup:function(t){return 33===t.keyCode},isPagedown:function(t){return 34===t.keyCode},isEscape:function(t){return 27===t.keyCode},_data:null,_index:null,_$header:null,_$noResultsMessage:null,_$footer:null,_bindEvents:function(){this.$el.on("mousedown."+this.id,".textcomplete-item",t.proxy(this._onClick,this)),this.$el.on("touchstart."+this.id,".textcomplete-item",t.proxy(this._onClick,this)),this.$el.on("mouseover."+this.id,".textcomplete-item",t.proxy(this._onMouseover,this)),this.$inputEl.on("keydown."+this.id,t.proxy(this._onKeydown,this))},_onClick:function(e){var n=t(e.target);e.preventDefault(),e.originalEvent.keepTextCompleteDropdown=this.id,n.hasClass("textcomplete-item")||(n=n.closest(".textcomplete-item"));var i=this.data[parseInt(n.data("index"),10)];this.completer.select(i.value,i.strategy,e);var o=this;setTimeout(function(){o.deactivate(),"touchstart"===e.type&&o.$inputEl.focus()},0)},_onMouseover:function(e){var n=t(e.target);e.preventDefault(),n.hasClass("textcomplete-item")||(n=n.closest(".textcomplete-item")),this._index=parseInt(n.data("index"),10),this._activateIndexedItem()},_onKeydown:function(e){var n;if(this.shown)switch(t.isFunction(this.option.onKeydown)&&(n=this.option.onKeydown(e,r)),null==n&&(n=this._defaultKeydown(e)),n){case r.KEY_UP:e.preventDefault(),this._up();break;case r.KEY_DOWN:e.preventDefault(),this._down();break;case r.KEY_ENTER:e.preventDefault(),this._enter(e);break;case r.KEY_PAGEUP:e.preventDefault(),this._pageup();break;case r.KEY_PAGEDOWN:e.preventDefault(),this._pagedown();break;case r.KEY_ESCAPE:e.preventDefault(),this.deactivate()}},_defaultKeydown:function(t){return this.isUp(t)?r.KEY_UP:this.isDown(t)?r.KEY_DOWN:this.isEnter(t)?r.KEY_ENTER:this.isPageup(t)?r.KEY_PAGEUP:this.isPagedown(t)?r.KEY_PAGEDOWN:this.isEscape(t)?r.KEY_ESCAPE:void 0},_up:function(){0===this._index?this._index=this.data.length-1:this._index-=1,this._activateIndexedItem(),this._setScroll()},_down:function(){this._index===this.data.length-1?this._index=0:this._index+=1,this._activateIndexedItem(),this._setScroll()},_enter:function(t){var e=this.data[parseInt(this._getActiveElement().data("index"),10)];this.completer.select(e.value,e.strategy,t),this.deactivate()},_pageup:function(){var e=0,n=this._getActiveElement().position().top-this.$el.innerHeight();this.$el.children().each(function(i){return t(this).position().top+t(this).outerHeight()>n?(e=i,!1):void 0}),this._index=e,this._activateIndexedItem(),this._setScroll()},_pagedown:function(){var e=this.data.length-1,n=this._getActiveElement().position().top+this.$el.innerHeight();this.$el.children().each(function(i){return t(this).position().top>n?(e=i,!1):void 0}),this._index=e,this._activateIndexedItem(),this._setScroll()},_activateIndexedItem:function(){this.$el.find(".textcomplete-item.active").removeClass("active"),this._getActiveElement().addClass("active")},_getActiveElement:function(){return this.$el.children(".textcomplete-item:nth("+this._index+")")},_setScroll:function(){var t=this._getActiveElement(),e=t.position().top,n=t.outerHeight(),i=this.$el.innerHeight(),o=this.$el.scrollTop();0===this._index||this._index==this.data.length-1||0>e?this.$el.scrollTop(e+o):e+n>i&&this.$el.scrollTop(e+n+o-i)},_buildContents:function(t){var e,n,o,r="";for(n=0;n<t.length&&this.data.length!==this.maxCount;n++)e=t[n],i(this.data,e)||(o=this.data.length,this.data.push(e),r+='<li class="textcomplete-item" data-index="'+o+'"><a>',r+=e.strategy.template(e.value,e.term),r+="</a></li>");return r},_renderHeader:function(e){if(this.header){this._$header||(this._$header=t('<li class="textcomplete-header"></li>').prependTo(this.$el));var n=t.isFunction(this.header)?this.header(e):this.header;this._$header.html(n)}},_renderFooter:function(e){if(this.footer){this._$footer||(this._$footer=t('<li class="textcomplete-footer"></li>').appendTo(this.$el));var n=t.isFunction(this.footer)?this.footer(e):this.footer;this._$footer.html(n)}},_renderNoResultsMessage:function(e){if(this.noResultsMessage){this._$noResultsMessage||(this._$noResultsMessage=t('<li class="textcomplete-no-results-message"></li>').appendTo(this.$el));var n=t.isFunction(this.noResultsMessage)?this.noResultsMessage(e):this.noResultsMessage;this._$noResultsMessage.html(n)}},_renderContents:function(t){this._$footer?this._$footer.before(t):this.$el.append(t)},_fitToBottom:function(){var t=n.scrollTop()+n.height(),e=this.$el.height();this.$el.position().top+e>t&&(this.completer.$iframe||this.$el.offset({top:t-e}))},_fitToRight:function(){for(var t,e=this.option.rightEdgeOffset,i=this.$el.offset().left,o=this.$el.width(),r=n.width()-e;i+o>r&&(this.$el.offset({left:i-e}),!((t=this.$el.offset().left)>=i));)i=t},_applyPlacement:function(t){return-1!==this.placement.indexOf("top")?t={top:"auto",bottom:this.$el.parent().height()-t.top+t.lineHeight,left:t.left}:(t.bottom="auto",delete t.lineHeight),-1!==this.placement.indexOf("absleft")?t.left=0:-1!==this.placement.indexOf("absright")&&(t.right=0,t.left="auto"),t}}),t.fn.textcomplete.Dropdown=e,t.extend(t.fn.textcomplete,r)}(t),function(t){"use strict";function e(e){t.extend(this,e),this.cache&&(this.search=n(this.search))}var n=function(t){var e={};return function(n,i){e[n]?i(e[n]):t.call(this,n,function(t){e[n]=(e[n]||[]).concat(t),i.apply(null,arguments)})}};e.parse=function(n,i){return t.map(n,function(t){var n=new e(t);return n.el=i.el,n.$el=i.$el,n})},t.extend(e.prototype,{match:null,replace:null,search:null,id:null,cache:!1,context:function(){return!0},index:2,template:function(t){return t},idProperty:null}),t.fn.textcomplete.Strategy=e}(t),function(t){"use strict";function e(){}var n=Date.now||function(){return(new Date).getTime()};t.extend(e.prototype,{id:null,completer:null,el:null,$el:null,option:null,initialize:function(e,i,o){var r,s,a,l,c,u,h,d;this.el=e,this.$el=t(e),this.id=i.id+this.constructor.name,this.completer=i,this.option=o,this.option.debounce&&(this._onKeyup=(r=this._onKeyup,s=this.option.debounce,d=function(){var t=n()-u;s>t?a=setTimeout(d,s-t):(a=null,h=r.apply(c,l),c=l=null)},function(){return c=this,l=arguments,u=n(),a||(a=setTimeout(d,s)),h})),this._bindEvents()},destroy:function(){this.$el.off("."+this.id),this.$el=this.el=this.completer=null},select:function(){throw new Error("Not implemented")},getCaretPosition:function(){var e=this._getCaretRelativePosition(),n=this.$el.offset(),i=this.option.appendTo;if(i){i instanceof t||(i=t(i));var o=i.offsetParent().offset();n.top-=o.top,n.left-=o.left}return e.top+=n.top,e.left+=n.left,e},focus:function(){this.$el.focus()},_bindEvents:function(){this.$el.on("keyup."+this.id,t.proxy(this._onKeyup,this))},_onKeyup:function(t){this._skipSearch(t)||this.completer.trigger(this.getTextFromHeadToCaret(),!0)},_skipSearch:function(t){switch(t.keyCode){case 9:case 13:case 16:case 17:case 18:case 33:case 34:case 40:case 38:case 27:return!0}if(t.ctrlKey)switch(t.keyCode){case 78:case 80:return!0}}}),t.fn.textcomplete.Adapter=e}(t),function(t){"use strict";function e(t,e,n){this.initialize(t,e,n)}t.extend(e.prototype,t.fn.textcomplete.Adapter.prototype,{select:function(e,n,i){var o,r=this.getTextFromHeadToCaret(),s=this.el.value.substring(this.el.selectionEnd),a=n.replace(e,i);void 0!==a&&(t.isArray(a)&&(s=a[1]+s,a=a[0]),o=t.isFunction(n.match)?n.match(r):n.match,r=r.replace(o,a),this.$el.val(r+s),this.el.selectionStart=this.el.selectionEnd=r.length)},getTextFromHeadToCaret:function(){return this.el.value.substring(0,this.el.selectionEnd)},_getCaretRelativePosition:function(){var e=t.fn.textcomplete.getCaretCoordinates(this.el,this.el.selectionStart);return{top:e.top+this._calculateLineHeight()-this.$el.scrollTop(),left:e.left-this.$el.scrollLeft(),lineHeight:this._calculateLineHeight()}},_calculateLineHeight:function(){var t=parseInt(this.$el.css("line-height"),10);if(isNaN(t)){var e=this.el.parentNode,n=document.createElement(this.el.nodeName),i=this.el.style;n.setAttribute("style","margin:0px;padding:0px;font-family:"+i.fontFamily+";font-size:"+i.fontSize),n.innerHTML="test",e.appendChild(n),t=n.clientHeight,e.removeChild(n)}return t}}),t.fn.textcomplete.Textarea=e}(t),function(t){"use strict";function e(e,i,o){this.initialize(e,i,o),t("<span>"+n+"</span>").css({position:"absolute",top:-9999,left:-9999}).insertBefore(e)}var n="吶";t.extend(e.prototype,t.fn.textcomplete.Textarea.prototype,{select:function(e,n,i){var o,r=this.getTextFromHeadToCaret(),s=this.el.value.substring(r.length),a=n.replace(e,i);if(void 0!==a){t.isArray(a)&&(s=a[1]+s,a=a[0]),o=t.isFunction(n.match)?n.match(r):n.match,r=r.replace(o,a),this.$el.val(r+s),this.el.focus();var l=this.el.createTextRange();l.collapse(!0),l.moveEnd("character",r.length),l.moveStart("character",r.length),l.select()}},getTextFromHeadToCaret:function(){this.el.focus();var t=document.selection.createRange();t.moveStart("character",-this.el.value.length);var e=t.text.split(n);return 1===e.length?e[0]:e[1]}}),t.fn.textcomplete.IETextarea=e}(t),function(t){"use strict";function e(t,e,n){this.initialize(t,e,n)}t.extend(e.prototype,t.fn.textcomplete.Adapter.prototype,{select:function(e,n,i){var o=this.getTextFromHeadToCaret(),r=this.el.ownerDocument.getSelection(),s=r.getRangeAt(0),a=s.cloneRange();a.selectNodeContents(s.startContainer);var l,c=a.toString().substring(s.startOffset),u=n.replace(e,i);if(void 0!==u){t.isArray(u)&&(c=u[1]+c,u=u[0]),l=t.isFunction(n.match)?n.match(o):n.match,o=o.replace(l,u).replace(/ $/," "),s.selectNodeContents(s.startContainer),s.deleteContents();var h=this.el.ownerDocument.createElement("div");h.innerHTML=o;var d=this.el.ownerDocument.createElement("div");d.innerHTML=c;for(var p,f,g=this.el.ownerDocument.createDocumentFragment();p=h.firstChild;)f=g.appendChild(p);for(;p=d.firstChild;)g.appendChild(p);s.insertNode(g),s.setStartAfter(f),s.collapse(!0),r.removeAllRanges(),r.addRange(s)}},_getCaretRelativePosition:function(){var e=this.el.ownerDocument.getSelection().getRangeAt(0).cloneRange(),n=e.endContainer.parentNode,i=this.el.ownerDocument.createElement("span");e.insertNode(i),e.selectNodeContents(i),e.deleteContents(),setTimeout(function(){n.normalize()},0);var o=t(i),r=o.offset();if(r.left-=this.$el.offset().left,r.top+=o.height()-this.$el.offset().top,r.lineHeight=o.height(),this.completer.$iframe){var s=this.completer.$iframe.offset();r.top+=s.top,r.left+=s.left,r.top-=t(this.completer.$iframe[0].contentWindow.document).scrollTop()}return o.remove(),r},getTextFromHeadToCaret:function(){var t=this.el.ownerDocument.getSelection().getRangeAt(0),e=t.cloneRange();return e.selectNodeContents(t.startContainer),e.toString().substring(0,t.startOffset)}}),t.fn.textcomplete.ContentEditable=e}(t),function(t){"use strict";function e(t,e,n){this.initialize(t,e,n)}t.extend(e.prototype,t.fn.textcomplete.ContentEditable.prototype,{_bindEvents:function(){var e=this;this.option.ckeditor_instance.on("key",function(t){var n=t.data;return e._onKeyup(n),(!e.completer.dropdown.shown||!e._skipSearch(n))&&void 0},null,null,1),this.$el.on("keyup."+this.id,t.proxy(this._onKeyup,this))}}),t.fn.textcomplete.CKEditor=e}(t),function(t){var e=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],n="undefined"!=typeof window,i=n&&null!=window.mozInnerScreenX;t.fn.textcomplete.getCaretCoordinates=function(t,o,r){if(!n)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var s=r&&r.debug||!1;if(s){var a=document.querySelector("#input-textarea-caret-position-mirror-div");a&&a.parentNode.removeChild(a)}var l=document.createElement("div");l.id="input-textarea-caret-position-mirror-div",document.body.appendChild(l);var c=l.style,u=window.getComputedStyle?getComputedStyle(t):t.currentStyle;c.whiteSpace="pre-wrap","INPUT"!==t.nodeName&&(c.wordWrap="break-word"),c.position="absolute",s||(c.visibility="hidden"),e.forEach(function(t){c[t]=u[t]}),i?t.scrollHeight>parseInt(u.height)&&(c.overflowY="scroll"):c.overflow="hidden",l.textContent=t.value.substring(0,o),"INPUT"===t.nodeName&&(l.textContent=l.textContent.replace(/\s/g," "));var h=document.createElement("span");h.textContent=t.value.substring(o)||".",l.appendChild(h);var d={top:h.offsetTop+parseInt(u.borderTopWidth),left:h.offsetLeft+parseInt(u.borderLeftWidth)};return s?h.style.backgroundColor="#aaa":document.body.removeChild(l),d}}(t),t}),marked.setOptions({gfm:!0,tables:!0,breaks:!0,pedantic:!1,sanitize:!0,smartLists:!0,smartypants:!1}),$(".flaskbb-editor").markdown({iconlibrary:"fa",additionalButtons:[[{name:"groupHelp",data:[{name:"cmdHelp",toggle:!1,title:"Help",icon:"fa fa-question",btnClass:"btn btn-success",callback:function(t){$("#editor-help").modal("show")}}]}]]}),$(".flaskbb-editor").textcomplete([{match:/\B:([\-+\w]*)$/,search:function(t,e){e($.map(emojies,function(e){return 0===e.indexOf(t)?e:null}))},template:function(t){return'<img class="emoji" src="/static/emoji/'+t+'.png"></img>'+t},replace:function(t){return":"+t+": "},index:1}],{onKeydown:function(t,e){if(t.ctrlKey&&74===t.keyCode)return e.KEY_ENTER}});var emojies=["+1","-1","100","1234","8ball","a","ab","abc","abcd","accept","aerial_tramway","airplane","alarm_clock","alien","ambulance","anchor","angel","anger","angry","anguished","ant","apple","aquarius","aries","arrow_backward","arrow_double_down","arrow_double_up","arrow_down","arrow_down_small","arrow_forward","arrow_heading_down","arrow_heading_up","arrow_left","arrow_lower_left","arrow_lower_right","arrow_right","arrow_right_hook","arrow_up","arrow_up_down","arrow_up_small","arrow_upper_left","arrow_upper_right","arrows_clockwise","arrows_counterclockwise","art","articulated_lorry","astonished","athletic_shoe","atm","b","baby","baby_bottle","baby_chick","baby_symbol","back","baggage_claim","balloon","ballot_box_with_check","bamboo","banana","bangbang","bank","bar_chart","barber","baseball","basketball","bath","bathtub","battery","bear","bee","beer","beers","beetle","beginner","bell","bento","bicyclist","bike","bikini","bird","birthday","black_circle","black_joker","black_large_square","black_medium_small_square","black_medium_square","black_nib","black_small_square","black_square_button","blossom","blowfish","blue_book","blue_car","blue_heart","blush","boar","boat","bomb","book","bookmark","bookmark_tabs","books","boom","boot","bouquet","bow","bowling","bowtie","boy","bread","bride_with_veil","bridge_at_night","briefcase","broken_heart","bug","bulb","bullettrain_front","bullettrain_side","bus","busstop","bust_in_silhouette","busts_in_silhouette","cactus","cake","calendar","calling","camel","camera","cancer","candy","capital_abcd","capricorn","car","card_index","carousel_horse","cat","cat2","cd","chart","chart_with_downwards_trend","chart_with_upwards_trend","checkered_flag","cherries","cherry_blossom","chestnut","chicken","children_crossing","chocolate_bar","christmas_tree","church","cinema","circus_tent","city_sunrise","city_sunset","cl","clap","clapper","clipboard","clock1","clock10","clock1030","clock11","clock1130","clock12","clock1230","clock130","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","closed_book","closed_lock_with_key","closed_umbrella","cloud","clubs","cn","cocktail","coffee","cold_sweat","collision","computer","confetti_ball","confounded","confused","congratulations","construction","construction_worker","convenience_store","cookie","cool","cop","copyright","corn","couple","couple_with_heart","couplekiss","cow","cow2","credit_card","crescent_moon","crocodile","crossed_flags","crown","cry","crying_cat_face","crystal_ball","cupid","curly_loop","currency_exchange","curry","custard","customs","cyclone","dancer","dancers","dango","dart","dash","date","de","deciduous_tree","department_store","diamond_shape_with_a_dot_inside","diamonds","disappointed","disappointed_relieved","dizzy","dizzy_face","do_not_litter","dog","dog2","dollar","dolls","dolphin","door","doughnut","dragon","dragon_face","dress","dromedary_camel","droplet","dvd","e-mail","ear","ear_of_rice","earth_africa","earth_americas","earth_asia","egg","eggplant","eight","eight_pointed_black_star","eight_spoked_asterisk","electric_plug","elephant","email","end","envelope","envelope_with_arrow","es","euro","european_castle","european_post_office","evergreen_tree","exclamation","expressionless","eyeglasses","eyes","facepunch","factory","fallen_leaf","family","fast_forward","fax","fearful","feelsgood","feet","ferris_wheel","file_folder","finnadie","fire","fire_engine","fireworks","first_quarter_moon","first_quarter_moon_with_face","fish","fish_cake","fishing_pole_and_fish","fist","five","flags","flashlight","floppy_disk","flower_playing_cards","flushed","foggy","football","footprints","fork_and_knife","fountain","four","four_leaf_clover","fr","free","fried_shrimp","fries","frog","frowning","fu","fuelpump","full_moon","full_moon_with_face","game_die","gb","gem","gemini","ghost","gift","gift_heart","girl","globe_with_meridians","goat","goberserk","godmode","golf","grapes","green_apple","green_book","green_heart","grey_exclamation","grey_question","grimacing","grin","grinning","guardsman","guitar","gun","haircut","hamburger","hammer","hamster","hand","handbag","hankey","hash","hatched_chick","hatching_chick","headphones","hear_no_evil","heart","heart_decoration","heart_eyes","heart_eyes_cat","heartbeat","heartpulse","hearts","heavy_check_mark","heavy_division_sign","heavy_dollar_sign","heavy_exclamation_mark","heavy_minus_sign","heavy_multiplication_x","heavy_plus_sign","helicopter","herb","hibiscus","high_brightness","high_heel","hocho","honey_pot","honeybee","horse","horse_racing","hospital","hotel","hotsprings","hourglass","hourglass_flowing_sand","house","house_with_garden","hurtrealbad","hushed","ice_cream","icecream","id","ideograph_advantage","imp","inbox_tray","incoming_envelope","information_desk_person","information_source","innocent","interrobang","iphone","it","izakaya_lantern","jack_o_lantern","japan","japanese_castle","japanese_goblin","japanese_ogre","jeans","joy","joy_cat","jp","key","keycap_ten","kimono","kiss","kissing","kissing_cat","kissing_closed_eyes","kissing_heart","kissing_smiling_eyes","koala","koko","kr","lantern","large_blue_circle","large_blue_diamond","large_orange_diamond","last_quarter_moon","last_quarter_moon_with_face","laughing","leaves","ledger","left_luggage","left_right_arrow","leftwards_arrow_with_hook","lemon","leo","leopard","libra","light_rail","link","lips","lipstick","lock","lock_with_ink_pen","lollipop","loop","loudspeaker","love_hotel","love_letter","low_brightness","m","mag","mag_right","mahjong","mailbox","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","man","man_with_gua_pi_mao","man_with_turban","mans_shoe","maple_leaf","mask","massage","meat_on_bone","mega","melon","memo","mens","metal","metro","microphone","microscope","milky_way","minibus","minidisc","mobile_phone_off","money_with_wings","moneybag","monkey","monkey_face","monorail","moon","mortar_board","mount_fuji","mountain_bicyclist","mountain_cableway","mountain_railway","mouse","mouse2","movie_camera","moyai","muscle","mushroom","musical_keyboard","musical_note","musical_score","mute","nail_care","name_badge","neckbeard","necktie","negative_squared_cross_mark","neutral_face","new","new_moon","new_moon_with_face","newspaper","ng","nine","no_bell","no_bicycles","no_entry","no_entry_sign","no_good","no_mobile_phones","no_mouth","no_pedestrians","no_smoking","non-potable_water","nose","notebook","notebook_with_decorative_cover","notes","nut_and_bolt","o","o2","ocean","octocat","octopus","oden","office","ok","ok_hand","ok_woman","older_man","older_woman","on","oncoming_automobile","oncoming_bus","oncoming_police_car","oncoming_taxi","one","open_book","open_file_folder","open_hands","open_mouth","ophiuchus","orange_book","outbox_tray","ox","package","page_facing_up","page_with_curl","pager","palm_tree","panda_face","paperclip","parking","part_alternation_mark","partly_sunny","passport_control","paw_prints","peach","pear","pencil","pencil2","penguin","pensive","performing_arts","persevere","person_frowning","person_with_blond_hair","person_with_pouting_face","phone","pig","pig2","pig_nose","pill","pineapple","pisces","pizza","point_down","point_left","point_right","point_up","point_up_2","police_car","poodle","poop","post_office","postal_horn","postbox","potable_water","pouch","poultry_leg","pound","pouting_cat","pray","princess","punch","purple_heart","purse","pushpin","put_litter_in_its_place","question","rabbit","rabbit2","racehorse","radio","radio_button","rage","rage1","rage2","rage3","rage4","railway_car","rainbow","raised_hand","raised_hands","raising_hand","ram","ramen","rat","recycle","red_car","red_circle","registered","relaxed","relieved","repeat","repeat_one","restroom","revolving_hearts","rewind","ribbon","rice","rice_ball","rice_cracker","rice_scene","ring","rocket","roller_coaster","rooster","rose","rotating_light","round_pushpin","rowboat","ru","rugby_football","runner","running","running_shirt_with_sash","sa","sagittarius","sailboat","sake","sandal","santa","satellite","satisfied","saxophone","school","school_satchel","scissors","scorpius","scream","scream_cat","scroll","seat","secret","see_no_evil","seedling","seven","shaved_ice","sheep","shell","ship","shipit","shirt","shit","shoe","shower","signal_strength","six","six_pointed_star","ski","skull","sleeping","sleepy","slot_machine","small_blue_diamond","small_orange_diamond","small_red_triangle","small_red_triangle_down","smile","smile_cat","smiley","smiley_cat","smiling_imp","smirk","smirk_cat","smoking","snail","snake","snowboarder","snowflake","snowman","sob","soccer","soon","sos","sound","space_invader","spades","spaghetti","sparkle","sparkler","sparkles","sparkling_heart","speak_no_evil","speaker","speech_balloon","speedboat","squirrel","star","star2","stars","station","statue_of_liberty","steam_locomotive","stew","straight_ruler","strawberry","stuck_out_tongue","stuck_out_tongue_closed_eyes","stuck_out_tongue_winking_eye","sun_with_face","sunflower","sunglasses","sunny","sunrise","sunrise_over_mountains","surfer","sushi","suspect","suspension_railway","sweat","sweat_drops","sweat_smile","sweet_potato","swimmer","symbols","syringe","tada","tanabata_tree","tangerine","taurus","taxi","tea","telephone","telephone_receiver","telescope","tennis","tent","thought_balloon","three","thumbsdown","thumbsup","ticket","tiger","tiger2","tired_face","tm","toilet","tokyo_tower","tomato","tongue","top","tophat","tractor","traffic_light","train","train2","tram","triangular_flag_on_post","triangular_ruler","trident","triumph","trolleybus","trollface","trophy","tropical_drink","tropical_fish","truck","trumpet","tshirt","tulip","turtle","tv","twisted_rightwards_arrows","two","two_hearts","two_men_holding_hands","two_women_holding_hands","u5272","u5408","u55b6","u6307","u6708","u6709","u6e80","u7121","u7533","u7981","u7a7a","uk","umbrella","unamused","underage","unlock","up","us","v","vertical_traffic_light","vhs","vibration_mode","video_camera","video_game","violin","virgo","volcano","vs","walking","waning_crescent_moon","waning_gibbous_moon","warning","watch","water_buffalo","watermelon","wave","wavy_dash","waxing_crescent_moon","waxing_gibbous_moon","wc","weary","wedding","whale","whale2","wheelchair","white_check_mark","white_circle","white_flower","white_large_square","white_medium_small_square","white_medium_square","white_small_square","white_square_button","wind_chime","wine_glass","wink","wolf","woman","womans_clothes","womans_hat","womens","worried","wrench","x","yellow_heart","yen","yum","zap","zero","zzz"],csrftoken=$("meta[name=csrf-token]").attr("content"),show_management_search=function(){var t=$(".management-body").find(".search-form");t.slideToggle(function(){"none"!=t.css("display")&&t.find("input").focus()})},flash_message=function(t){var e=$("#flashed-messages"),n='<div class="alert alert-'+t.category+'">';"success"==t.category?n+='<span class="glyphicon glyphicon-ok-sign"></span> ':"error"==t.category?n+='<span class="glyphicon glyphicon-exclamation-sign"></span> ':n+='<span class="glyphicon glyphicon-info-sign"></span> ',n+='<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>'+t.message+"</div>",e.append(n)},BulkActions=function(){this.execute=function(t){var e=$("input.action-checkbox:checked").length,n={ids:[]};return 0!==e&&($("input.action-checkbox:checked").each(function(t,e){n.ids.push($(e).val())}),this.confirm(t,n),!1)},this.confirm=function(t,e){$(".confirmModal").modal({keyboard:!1}).one("click",".confirmBtn",function(){$(".confirmModal").modal("hide"),send_data(t,e)}).on("hidden.bs.modal",function(){$(".confirmBtn").unbind()})}},send_data=function(t,e){$.ajax({url:t,method:"POST",data:JSON.stringify(e),dataType:"json",contentType:"application/json",beforeSend:function(t,e){/^(GET|HEAD|OPTIONS|TRACE)$/i.test(e.type)||this.crossDomain||t.setRequestHeader("X-CSRFToken",csrftoken)}}).done(function(t){flash_message(t),$.each(t.data,function(t,e){var n=$("#"+e.type+"-"+e.id);e.reverse?(n.attr("action",e.reverse_url),"ban"==e.type?reverse_html='<span class="fa fa-flag text-success" data-toggle="tooltip" data-placement="top" title="'+e.reverse_name+'"></span>':"unban"==e.type&&(reverse_html='<span class="fa fa-flag text-warning" data-toggle="tooltip" data-placement="top" title="'+e.reverse_name+'"></span>'),n.find("button").html(reverse_html)):"delete"==e.type&&n.parents(".row").remove()})}).fail(function(t){flash_message(t)})};$(document).ready(function(){$(".action-checkall").change(function(){$("input.action-checkbox").prop("checked",this.checked)}),$(".reply-btn").click(function(t){t.preventDefault();var e=$(this).attr("data-message-id");$.get("/message/message/"+e+"/raw",function(t){var e=$(".flaskbb-editor");e.val((e.val()+"\n"+t).trim()+"\n"),e.selectionStart=e.selectionEnd=e.val().length,e[0].scrollTop=e[0].scrollHeight,window.location.href="#content"})}),$(".quote-btn").click(function(t){t.preventDefault();var e=$(this).attr("data-post-id");$.get("/post/"+e+"/raw",function(t){var e=$(".flaskbb-editor");e.val((e.val()+"\n"+t).trim()+"\n"),e.selectionStart=e.selectionEnd=e.val().length,e[0].scrollTop=e[0].scrollHeight,window.location.href="#content"})}),$('button[name="confirmDialog"]').on("click",function(t){var e=$(this).closest("form");t.preventDefault(),$(".confirmModal").modal({keyboard:!0}).one("click",".confirmBtn",function(){e.trigger("submit")}).on("hidden.bs.modal",function(){$(".confirmBtn").unbind()})})});
|