Files
pathfinder/public/js/v2.2.4/app/summernote.loader.js
Sam 5efad1da50 2.2.4 (#216)
* changes for eve-scout API

* updates composer for new pathfinder-esi version

* updates public files

* updates signature and jump info

* adds public files

* typo fix: Turnur, not Turner

Signed-off-by: Tyr Heimdal <tyr.heimdal@warning.no>

---------

Signed-off-by: Tyr Heimdal <tyr.heimdal@warning.no>
Co-authored-by: Tyr Heimdal <tyr.heimdal@warning.no>
2024-04-01 15:38:01 +13:00

3 lines
216 KiB
JavaScript
Raw Permalink Blame History

!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],o=e.document,i=Object.getPrototypeOf,r=n.slice,s=n.concat,a=n.push,l=n.indexOf,c={},u=c.toString,d=c.hasOwnProperty,p=d.toString,f=p.call(Object),h={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},g=function(e){return null!=e&&e===e.window},v={type:!0,src:!0,nonce:!0,noModule:!0};function y(e,t,n){var i,r,s=(n=n||o).createElement("script");if(s.text=e,t)for(i in v)(r=t[i]||t.getAttribute&&t.getAttribute(i))&&s.setAttribute(i,r);n.head.appendChild(s).parentNode.removeChild(s)}function b(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[u.call(e)]||"object":typeof e}var x="3.4.1",w=function(e,t){return new w.fn.init(e,t)},C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function k(e){var t=!!e&&"length"in e&&e.length,n=b(e);return!m(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}w.fn=w.prototype={jquery:x,constructor:w,length:0,toArray:function(){return r.call(this)},get:function(e){return null==e?r.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(r.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var e,t,n,o,i,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(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)o=e[t],"__proto__"!==t&&s!==o&&(c&&o&&(w.isPlainObject(o)||(i=Array.isArray(o)))?(n=s[t],r=i&&!Array.isArray(n)?[]:i||w.isPlainObject(n)?n:{},i=!1,s[t]=w.extend(c,r,o)):void 0!==o&&(s[t]=o));return s},w.extend({expando:"jQuery"+(x+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==u.call(e)||(t=i(e))&&("function"!=typeof(n=d.call(t,"constructor")&&t.constructor)||p.call(n)!==f))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){y(e,{nonce:t&&t.nonce})},each:function(e,t){var n,o=0;if(k(e))for(n=e.length;o<n&&!1!==t.call(e[o],o,e[o]);o++);else for(o in e)if(!1===t.call(e[o],o,e[o]))break;return e},trim:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(k(Object(e))?w.merge(n,"string"==typeof e?[e]:e):a.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:l.call(t,e,n)},merge:function(e,t){for(var n=+t.length,o=0,i=e.length;o<n;o++)e[i++]=t[o];return e.length=i,e},grep:function(e,t,n){for(var o=[],i=0,r=e.length,s=!n;i<r;i++)!t(e[i],i)!==s&&o.push(e[i]);return o},map:function(e,t,n){var o,i,r=0,a=[];if(k(e))for(o=e.length;r<o;r++)null!=(i=t(e[r],r,n))&&a.push(i);else for(r in e)null!=(i=t(e[r],r,n))&&a.push(i);return s.apply([],a)},guid:1,support:h}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});var T=function(e){var t,n,o,i,r,s,a,l,c,u,d,p,f,h,m,g,v,y,b,x="sizzle"+1*new Date,w=e.document,C=0,k=0,T=le(),S=le(),E=le(),A=le(),N=function(e,t){return e===t&&(d=!0),0},I={}.hasOwnProperty,D=[],L=D.pop,$=D.push,R=D.push,H=D.slice,P=function(e,t){for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},j="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",B="\\["+M+"*("+F+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+F+"))|)"+M+"*\\]",O=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+B+")*)|.*)\\)|)",z=new RegExp(M+"+","g"),q=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),U=new RegExp("^"+M+"*,"+M+"*"),_=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),W=new RegExp(M+"|>"),V=new RegExp(O),K=new RegExp("^"+F+"$"),G={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,Y=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var o="0x"+t-65536;return o!=o||n?t:o<0?String.fromCharCode(o+65536):String.fromCharCode(o>>10|55296,1023&o|56320)},oe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"<22>":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},se=xe(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{R.apply(D=H.call(w.childNodes),w.childNodes),D[w.childNodes.length].nodeType}catch(t){R={apply:D.length?function(e,t){$.apply(e,H.call(t))}:function(e,t){for(var n=e.length,o=0;e[n++]=t[o++];);e.length=n-1}}}function ae(e,t,o,i){var r,a,c,u,d,h,v,y=t&&t.ownerDocument,C=t?t.nodeType:9;if(o=o||[],"string"!=typeof e||!e||1!==C&&9!==C&&11!==C)return o;if(!i&&((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,m)){if(11!==C&&(d=J.exec(e)))if(r=d[1]){if(9===C){if(!(c=t.getElementById(r)))return o;if(c.id===r)return o.push(c),o}else if(y&&(c=y.getElementById(r))&&b(t,c)&&c.id===r)return o.push(c),o}else{if(d[2])return R.apply(o,t.getElementsByTagName(e)),o;if((r=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return R.apply(o,t.getElementsByClassName(r)),o}if(n.qsa&&!A[e+" "]&&(!g||!g.test(e))&&(1!==C||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===C&&W.test(e)){for((u=t.getAttribute("id"))?u=u.replace(oe,ie):t.setAttribute("id",u=x),a=(h=s(e)).length;a--;)h[a]="#"+u+" "+be(h[a]);v=h.join(","),y=ee.test(e)&&ve(t.parentNode)||t}try{return R.apply(o,y.querySelectorAll(v)),o}catch(t){A(e,!0)}finally{u===x&&t.removeAttribute("id")}}}return l(e.replace(q,"$1"),t,o,i)}function le(){var e=[];return function t(n,i){return e.push(n+" ")>o.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function ce(e){return e[x]=!0,e}function ue(e){var t=f.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),i=n.length;i--;)o.attrHandle[n[i]]=t}function pe(e,t){var n=t&&e,o=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(o)return o;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&se(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return ce(function(t){return t=+t,ce(function(n,o){for(var i,r=e([],n.length,t),s=r.length;s--;)n[i=r[s]]&&(n[i]=!(o[i]=n[i]))})})}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ae.support={},r=ae.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!X.test(t||n&&n.nodeName||"HTML")},p=ae.setDocument=function(e){var t,i,s=e?e.ownerDocument||e:w;return s!==f&&9===s.nodeType&&s.documentElement&&(h=(f=s).documentElement,m=!r(f),w!==f&&(i=f.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Z.test(f.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=x,!f.getElementsByName||!f.getElementsByName(x).length}),n.getById?(o.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},o.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(o.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},o.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,o,i,r=t.getElementById(e);if(r){if((n=r.getAttributeNode("id"))&&n.value===e)return[r];for(i=t.getElementsByName(e),o=0;r=i[o++];)if((n=r.getAttributeNode("id"))&&n.value===e)return[r]}return[]}}),o.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,o=[],i=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[i++];)1===n.nodeType&&o.push(n);return o}return r},o.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},v=[],g=[],(n.qsa=Z.test(f.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="<a id='"+x+"'></a><select id='"+x+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+M+"*(?:value|"+j+")"),e.querySelectorAll("[id~="+x+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||g.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(n.matchesSelector=Z.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",O)}),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),t=Z.test(h.compareDocumentPosition),b=t||Z.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,o=t&&t.parentNode;return e===o||!(!o||1!==o.nodeType||!(n.contains?n.contains(o):e.compareDocumentPosition&&16&e.compareDocumentPosition(o)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},N=t?function(e,t){if(e===t)return d=!0,0;var o=!e.compareDocumentPosition-!t.compareDocumentPosition;return o||(1&(o=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===o?e===f||e.ownerDocument===w&&b(w,e)?-1:t===f||t.ownerDocument===w&&b(w,t)?1:u?P(u,e)-P(u,t):0:4&o?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,o=0,i=e.parentNode,r=t.parentNode,s=[e],a=[t];if(!i||!r)return e===f?-1:t===f?1:i?-1:r?1:u?P(u,e)-P(u,t):0;if(i===r)return pe(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[o]===a[o];)o++;return o?pe(s[o],a[o]):s[o]===w?-1:a[o]===w?1:0}),f},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),n.matchesSelector&&m&&!A[t+" "]&&(!v||!v.test(t))&&(!g||!g.test(t)))try{var o=y.call(e,t);if(o||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return o}catch(e){A(t,!0)}return 0<ae(t,f,null,[e]).length},ae.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),b(e,t)},ae.attr=function(e,t){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[t.toLowerCase()],r=i&&I.call(o.attrHandle,t.toLowerCase())?i(e,t,!m):void 0;return void 0!==r?r:n.attributes||!m?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},ae.escape=function(e){return(e+"").replace(oe,ie)},ae.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ae.uniqueSort=function(e){var t,o=[],i=0,r=0;if(d=!n.detectDuplicates,u=!n.sortStable&&e.slice(0),e.sort(N),d){for(;t=e[r++];)t===e[r]&&(i=o.push(r));for(;i--;)e.splice(o[i],1)}return u=null,e},i=ae.getText=function(e){var t,n="",o=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[o++];)n+=i(t);return n},(o=ae.selectors={cacheLength:50,createPseudo:ce,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=s(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&T(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(o){var i=ae.attr(o,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&-1<i.indexOf(n):"$="===t?n&&i.slice(-n.length)===n:"~="===t?-1<(" "+i.replace(z," ")+" ").indexOf(n):"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,o,i){var r="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===o&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,p,f,h,m=r!==s?"nextSibling":"previousSibling",g=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(g){if(r){for(;m;){for(p=t;p=p[m];)if(a?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?g.firstChild:g.lastChild],s&&y){for(b=(f=(c=(u=(d=(p=g)[x]||(p[x]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]||[])[0]===C&&c[1])&&c[2],p=f&&g.childNodes[f];p=++f&&p&&p[m]||(b=f=0)||h.pop();)if(1===p.nodeType&&++b&&p===t){u[e]=[C,f,b];break}}else if(y&&(b=f=(c=(u=(d=(p=t)[x]||(p[x]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]||[])[0]===C&&c[1]),!1===b)for(;(p=++f&&p&&p[m]||(b=f=0)||h.pop())&&((a?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++b||(y&&((u=(d=p[x]||(p[x]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]=[C,b]),p!==t)););return(b-=i)===o||b%o==0&&0<=b/o}}},PSEUDO:function(e,t){var n,i=o.pseudos[e]||o.setFilters[e.toLowerCase()]||ae.error("unsupported pseudo: "+e);return i[x]?i(t):1<i.length?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?ce(function(e,n){for(var o,r=i(e,t),s=r.length;s--;)e[o=P(e,r[s])]=!(n[o]=r[s])}):function(e){return i(e,0,n)}):i}},pseudos:{not:ce(function(e){var t=[],n=[],o=a(e.replace(q,"$1"));return o[x]?ce(function(e,t,n,i){for(var r,s=o(e,null,i,[]),a=e.length;a--;)(r=s[a])&&(e[a]=!(t[a]=r))}):function(e,i,r){return t[0]=e,o(t,null,r,n),t[0]=null,!n.pop()}}),has:ce(function(e){return function(t){return 0<ae(e,t).length}}),contains:ce(function(e){return e=e.replace(te,ne),function(t){return-1<(t.textContent||i(t)).indexOf(e)}}),lang:ce(function(e){return K.test(e||"")||ae.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return Y.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge(function(){return[0]}),last:ge(function(e,t){return[t-1]}),eq:ge(function(e,t,n){return[n<0?n+t:n]}),even:ge(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ge(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ge(function(e,t,n){for(var o=n<0?n+t:t<n?t:n;0<=--o;)e.push(o);return e}),gt:ge(function(e,t,n){for(var o=n<0?n+t:n;++o<t;)e.push(o);return e})}}).pseudos.nth=o.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})o.pseudos[t]=he(t);function ye(){}function be(e){for(var t=0,n=e.length,o="";t<n;t++)o+=e[t].value;return o}function xe(e,t,n){var o=t.dir,i=t.next,r=i||o,s=n&&"parentNode"===r,a=k++;return t.first?function(t,n,i){for(;t=t[o];)if(1===t.nodeType||s)return e(t,n,i);return!1}:function(t,n,l){var c,u,d,p=[C,a];if(l){for(;t=t[o];)if((1===t.nodeType||s)&&e(t,n,l))return!0}else for(;t=t[o];)if(1===t.nodeType||s)if(u=(d=t[x]||(t[x]={}))[t.uniqueID]||(d[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[o]||t;else{if((c=u[r])&&c[0]===C&&c[1]===a)return p[2]=c[2];if((u[r]=p)[2]=e(t,n,l))return!0}return!1}}function we(e){return 1<e.length?function(t,n,o){for(var i=e.length;i--;)if(!e[i](t,n,o))return!1;return!0}:e[0]}function Ce(e,t,n,o,i){for(var r,s=[],a=0,l=e.length,c=null!=t;a<l;a++)(r=e[a])&&(n&&!n(r,o,i)||(s.push(r),c&&t.push(a)));return s}function ke(e,t,n,o,i,r){return o&&!o[x]&&(o=ke(o)),i&&!i[x]&&(i=ke(i,r)),ce(function(r,s,a,l){var c,u,d,p=[],f=[],h=s.length,m=r||function(e,t,n){for(var o=0,i=t.length;o<i;o++)ae(e,t[o],n);return n}(t||"*",a.nodeType?[a]:a,[]),g=!e||!r&&t?m:Ce(m,p,e,a,l),v=n?i||(r?e:h||o)?[]:s:g;if(n&&n(g,v,a,l),o)for(c=Ce(v,f),o(c,[],a,l),u=c.length;u--;)(d=c[u])&&(v[f[u]]=!(g[f[u]]=d));if(r){if(i||e){if(i){for(c=[],u=v.length;u--;)(d=v[u])&&c.push(g[u]=d);i(null,v=[],c,l)}for(u=v.length;u--;)(d=v[u])&&-1<(c=i?P(r,d):p[u])&&(r[c]=!(s[c]=d))}}else v=Ce(v===s?v.splice(h,v.length):v),i?i(null,s,v,l):R.apply(s,v)})}function Te(e){for(var t,n,i,r=e.length,s=o.relative[e[0].type],a=s||o.relative[" "],l=s?1:0,u=xe(function(e){return e===t},a,!0),d=xe(function(e){return-1<P(t,e)},a,!0),p=[function(e,n,o){var i=!s&&(o||n!==c)||((t=n).nodeType?u(e,n,o):d(e,n,o));return t=null,i}];l<r;l++)if(n=o.relative[e[l].type])p=[xe(we(p),n)];else{if((n=o.filter[e[l].type].apply(null,e[l].matches))[x]){for(i=++l;i<r&&!o.relative[e[i].type];i++);return ke(1<l&&we(p),1<l&&be(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(q,"$1"),n,l<i&&Te(e.slice(l,i)),i<r&&Te(e=e.slice(i)),i<r&&be(e))}p.push(n)}return we(p)}return ye.prototype=o.filters=o.pseudos,o.setFilters=new ye,s=ae.tokenize=function(e,t){var n,i,r,s,a,l,c,u=S[e+" "];if(u)return t?0:u.slice(0);for(a=e,l=[],c=o.preFilter;a;){for(s in n&&!(i=U.exec(a))||(i&&(a=a.slice(i[0].length)||a),l.push(r=[])),n=!1,(i=_.exec(a))&&(n=i.shift(),r.push({value:n,type:i[0].replace(q," ")}),a=a.slice(n.length)),o.filter)!(i=G[s].exec(a))||c[s]&&!(i=c[s](i))||(n=i.shift(),r.push({value:n,type:s,matches:i}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ae.error(e):S(e,l).slice(0)},a=ae.compile=function(e,t){var n,i,r,a,l,u,d=[],h=[],g=E[e+" "];if(!g){for(t||(t=s(e)),n=t.length;n--;)(g=Te(t[n]))[x]?d.push(g):h.push(g);(g=E(e,(i=h,a=0<(r=d).length,l=0<i.length,u=function(e,t,n,s,u){var d,h,g,v=0,y="0",b=e&&[],x=[],w=c,k=e||l&&o.find.TAG("*",u),T=C+=null==w?1:Math.random()||.1,S=k.length;for(u&&(c=t===f||t||u);y!==S&&null!=(d=k[y]);y++){if(l&&d){for(h=0,t||d.ownerDocument===f||(p(d),n=!m);g=i[h++];)if(g(d,t||f,n)){s.push(d);break}u&&(C=T)}a&&((d=!g&&d)&&v--,e&&b.push(d))}if(v+=y,a&&y!==v){for(h=0;g=r[h++];)g(b,x,t,n);if(e){if(0<v)for(;y--;)b[y]||x[y]||(x[y]=L.call(s));x=Ce(x)}R.apply(s,x),u&&!e&&0<x.length&&1<v+r.length&&ae.uniqueSort(s)}return u&&(C=T,c=w),b},a?ce(u):u))).selector=e}return g},l=ae.select=function(e,t,n,i){var r,l,c,u,d,p="function"==typeof e&&e,f=!i&&s(e=p.selector||e);if(n=n||[],1===f.length){if(2<(l=f[0]=f[0].slice(0)).length&&"ID"===(c=l[0]).type&&9===t.nodeType&&m&&o.relative[l[1].type]){if(!(t=(o.find.ID(c.matches[0].replace(te,ne),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(r=G.needsContext.test(e)?0:l.length;r--&&(c=l[r],!o.relative[u=c.type]);)if((d=o.find[u])&&(i=d(c.matches[0].replace(te,ne),ee.test(l[0].type)&&ve(t.parentNode)||t))){if(l.splice(r,1),!(e=i.length&&be(l)))return R.apply(n,i),n;break}}return(p||a(e,f))(i,t,!m,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=x.split("").sort(N).join("")===x,n.detectDuplicates=!!d,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(f.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||de("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||de("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||de(j,function(e,t,n){var o;if(!n)return!0===e[t]?t.toLowerCase():(o=e.getAttributeNode(t))&&o.specified?o.value:null}),ae}(e);w.find=T,w.expr=T.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=T.uniqueSort,w.text=T.getText,w.isXMLDoc=T.isXML,w.contains=T.contains,w.escapeSelector=T.escape;var S=function(e,t,n){for(var o=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&w(e).is(n))break;o.push(e)}return o},E=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},A=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var I=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,t,n){return m(t)?w.grep(e,function(e,o){return!!t.call(e,o,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return-1<l.call(t,e)!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var o=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===o.nodeType?w.find.matchesSelector(o,e)?[o]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,o=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t<o;t++)if(w.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<o;t++)w.find(e,i[t],n);return 1<o?w.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&A.test(e)?w(e):e||[],!1).length}});var L,$=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||L,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:$.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),I.test(i[1])&&w.isPlainObject(t))for(i in t)m(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(r=o.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,L=w(o);var R=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(w.contains(this,t[e]))return!0})},closest:function(e,t){var n,o=0,i=this.length,r=[],s="string"!=typeof e&&w(e);if(!A.test(e))for(;o<i;o++)for(n=this[o];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?-1<s.index(n):1===n.nodeType&&w.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(1<r.length?w.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?l.call(w(e),this[0]):l.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return S(e,"parentNode")},parentsUntil:function(e,t,n){return S(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return S(e,"nextSibling")},prevAll:function(e){return S(e,"previousSibling")},nextUntil:function(e,t,n){return S(e,"nextSibling",n)},prevUntil:function(e,t,n){return S(e,"previousSibling",n)},siblings:function(e){return E((e.parentNode||{}).firstChild,e)},children:function(e){return E(e.firstChild)},contents:function(e){return void 0!==e.contentDocument?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,o){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(o=n),o&&"string"==typeof o&&(i=w.filter(o,i)),1<this.length&&(H[e]||w.uniqueSort(i),R.test(e)&&i.reverse()),this.pushStack(i)}});var j=/[^\x20\t\r\n\f]+/g;function M(e){return e}function F(e){throw e}function B(e,t,n,o){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(o))}catch(e){n.apply(void 0,[e])}}w.Callbacks=function(e){var t,n;e="string"==typeof e?(t=e,n={},w.each(t.match(j)||[],function(e,t){n[t]=!0}),n):w.extend({},e);var o,i,r,s,a=[],l=[],c=-1,u=function(){for(s=s||e.once,r=o=!0;l.length;c=-1)for(i=l.shift();++c<a.length;)!1===a[c].apply(i[0],i[1])&&e.stopOnFalse&&(c=a.length,i=!1);e.memory||(i=!1),o=!1,s&&(a=i?[]:"")},d={add:function(){return a&&(i&&!o&&(c=a.length-1,l.push(i)),function t(n){w.each(n,function(n,o){m(o)?e.unique&&d.has(o)||a.push(o):o&&o.length&&"string"!==b(o)&&t(o)})}(arguments),i&&!o&&u()),this},remove:function(){return w.each(arguments,function(e,t){for(var n;-1<(n=w.inArray(t,a,n));)a.splice(n,1),n<=c&&c--}),this},has:function(e){return e?-1<w.inArray(e,a):0<a.length},empty:function(){return a&&(a=[]),this},disable:function(){return s=l=[],a=i="",this},disabled:function(){return!a},lock:function(){return s=l=[],i||o||(a=i=""),this},locked:function(){return!!s},fireWith:function(e,t){return s||(t=[e,(t=t||[]).slice?t.slice():t],l.push(t),o||u()),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!r}};return d},w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],o="pending",i={state:function(){return o},always:function(){return r.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,o){var i=m(e[o[4]])&&e[o[4]];r[o[1]](function(){var e=i&&i.apply(this,arguments);e&&m(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[o[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,o,i){var r=0;function s(t,n,o,i){return function(){var a=this,l=arguments,c=function(){var e,c;if(!(t<r)){if((e=o.apply(a,l))===n.promise())throw new TypeError("Thenable self-resolution");c=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(c)?i?c.call(e,s(r,n,M,i),s(r,n,F,i)):(r++,c.call(e,s(r,n,M,i),s(r,n,F,i),s(r,n,M,n.notifyWith))):(o!==M&&(a=void 0,l=[e]),(i||n.resolveWith)(a,l))}},u=i?c:function(){try{c()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,u.stackTrace),r<=t+1&&(o!==F&&(a=void 0,l=[e]),n.rejectWith(a,l))}};t?u():(w.Deferred.getStackHook&&(u.stackTrace=w.Deferred.getStackHook()),e.setTimeout(u))}}return w.Deferred(function(e){n[0][3].add(s(0,e,m(i)?i:M,e.notifyWith)),n[1][3].add(s(0,e,m(t)?t:M)),n[2][3].add(s(0,e,m(o)?o:F))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},r={};return w.each(n,function(e,t){var s=t[2],a=t[5];i[t[1]]=s.add,a&&s.add(function(){o=a},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),s.add(t[3].fire),r[t[0]]=function(){return r[t[0]+"With"](this===r?void 0:this,arguments),this},r[t[0]+"With"]=s.fireWith}),i.promise(r),t&&t.call(r,r),r},when:function(e){var t=arguments.length,n=t,o=Array(n),i=r.call(arguments),s=w.Deferred(),a=function(e){return function(n){o[e]=this,i[e]=1<arguments.length?r.call(arguments):n,--t||s.resolveWith(o,i)}};if(t<=1&&(B(e,s.done(a(n)).resolve,s.reject,!t),"pending"===s.state()||m(i[n]&&i[n].then)))return s.then();for(;n--;)B(i[n],a(n),s.reject);return s.promise()}});var O=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&O.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var z=w.Deferred();function q(){o.removeEventListener("DOMContentLoaded",q),e.removeEventListener("load",q),w.ready()}w.fn.ready=function(e){return z.then(e).catch(function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0)!==e&&0<--w.readyWait||z.resolveWith(o,[w])}}),w.ready.then=z.then,"complete"===o.readyState||"loading"!==o.readyState&&!o.documentElement.doScroll?e.setTimeout(w.ready):(o.addEventListener("DOMContentLoaded",q),e.addEventListener("load",q));var U=function(e,t,n,o,i,r,s){var a=0,l=e.length,c=null==n;if("object"===b(n))for(a in i=!0,n)U(e,t,a,n[a],!0,r,s);else if(void 0!==o&&(i=!0,m(o)||(s=!0),c&&(s?(t.call(e,o),t=null):(c=t,t=function(e,t,n){return c.call(w(e),n)})),t))for(;a<l;a++)t(e[a],n,s?o:o.call(e[a],a,t(e[a],n)));return i?e:c?t.call(e):l?t(e[0],n):r},_=/^-ms-/,W=/-([a-z])/g;function V(e,t){return t.toUpperCase()}function K(e){return e.replace(_,"ms-").replace(W,V)}var G=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function X(){this.expando=w.expando+X.uid++}X.uid=1,X.prototype={cache:function(e){var t=e[this.expando];return t||(t={},G(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var o,i=this.cache(e);if("string"==typeof t)i[K(t)]=n;else for(o in t)i[K(o)]=t[o];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][K(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,o=e[this.expando];if(void 0!==o){if(void 0!==t){n=(t=Array.isArray(t)?t.map(K):(t=K(t))in o?[t]:t.match(j)||[]).length;for(;n--;)delete o[t[n]]}(void 0===t||w.isEmptyObject(o))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!w.isEmptyObject(t)}};var Y=new X,Q=new X,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,J=/[A-Z]/g;function ee(e,t,n){var o,i;if(void 0===n&&1===e.nodeType)if(o="data-"+t.replace(J,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(o))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:Z.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,o,i,r=this[0],s=r&&r.attributes;if(void 0===e){if(this.length&&(i=Q.get(r),1===r.nodeType&&!Y.get(r,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(o=s[n].name).indexOf("data-")&&(o=K(o.slice(5)),ee(r,o,i[o]));Y.set(r,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){Q.set(this,e)}):U(this,function(t){var n;if(r&&void 0===t)return void 0!==(n=Q.get(r,e))?n:void 0!==(n=ee(r,e))?n:void 0;this.each(function(){Q.set(this,e,t)})},null,t,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),w.extend({queue:function(e,t,n){var o;if(e)return t=(t||"fx")+"queue",o=Y.get(e,t),n&&(!o||Array.isArray(n)?o=Y.access(e,t,w.makeArray(n)):o.push(n)),o||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),o=n.length,i=n.shift(),r=w._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),o--),i&&("fx"===t&&n.unshift("inprogress"),delete r.stop,i.call(e,function(){w.dequeue(e,t)},r)),!o&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:w.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?w.queue(this[0],e):void 0===t?this:this.each(function(){var n=w.queue(this,e,t);w._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&w.dequeue(this,e)})},dequeue:function(e){return this.each(function(){w.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,o=1,i=w.Deferred(),r=this,s=this.length,a=function(){--o||i.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(n=Y.get(r[s],e+"queueHooks"))&&n.empty&&(o++,n.empty.add(a));return a(),i.promise(t)}});var te=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ne=new RegExp("^(?:([+-])=|)("+te+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ie=o.documentElement,re=function(e){return w.contains(e.ownerDocument,e)},se={composed:!0};ie.getRootNode&&(re=function(e){return w.contains(e.ownerDocument,e)||e.getRootNode(se)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&re(e)&&"none"===w.css(e,"display")},le=function(e,t,n,o){var i,r,s={};for(r in t)s[r]=e.style[r],e.style[r]=t[r];for(r in i=n.apply(e,o||[]),t)e.style[r]=s[r];return i};function ce(e,t,n,o){var i,r,s=20,a=o?function(){return o.cur()}:function(){return w.css(e,t,"")},l=a(),c=n&&n[3]||(w.cssNumber[t]?"":"px"),u=e.nodeType&&(w.cssNumber[t]||"px"!==c&&+l)&&ne.exec(w.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;s--;)w.style(e,t,u+c),(1-r)*(1-(r=a()/l||.5))<=0&&(s=0),u/=r;u*=2,w.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,i=n[1]?u+(n[1]+1)*n[2]:+n[2],o&&(o.unit=c,o.start=u,o.end=i)),i}var ue={};function de(e,t){for(var n,o,i,r,s,a,l,c=[],u=0,d=e.length;u<d;u++)(o=e[u]).style&&(n=o.style.display,t?("none"===n&&(c[u]=Y.get(o,"display")||null,c[u]||(o.style.display="")),""===o.style.display&&ae(o)&&(c[u]=(l=s=r=void 0,s=(i=o).ownerDocument,a=i.nodeName,(l=ue[a])||(r=s.body.appendChild(s.createElement(a)),l=w.css(r,"display"),r.parentNode.removeChild(r),"none"===l&&(l="block"),ue[a]=l)))):"none"!==n&&(c[u]="none",Y.set(o,"display",n)));for(u=0;u<d;u++)null!=c[u]&&(e[u].style.display=c[u]);return e}w.fn.extend({show:function(){return de(this,!0)},hide:function(){return de(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?w(this).show():w(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,fe=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,me={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 ge(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,o=e.length;n<o;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}me.optgroup=me.option,me.tbody=me.tfoot=me.colgroup=me.caption=me.thead,me.th=me.td;var ye,be,xe=/<|&#?\w+;/;function we(e,t,n,o,i){for(var r,s,a,l,c,u,d=t.createDocumentFragment(),p=[],f=0,h=e.length;f<h;f++)if((r=e[f])||0===r)if("object"===b(r))w.merge(p,r.nodeType?[r]:r);else if(xe.test(r)){for(s=s||d.appendChild(t.createElement("div")),a=(fe.exec(r)||["",""])[1].toLowerCase(),l=me[a]||me._default,s.innerHTML=l[1]+w.htmlPrefilter(r)+l[2],u=l[0];u--;)s=s.lastChild;w.merge(p,s.childNodes),(s=d.firstChild).textContent=""}else p.push(t.createTextNode(r));for(d.textContent="",f=0;r=p[f++];)if(o&&-1<w.inArray(r,o))i&&i.push(r);else if(c=re(r),s=ge(d.appendChild(r),"script"),c&&ve(s),n)for(u=0;r=s[u++];)he.test(r.type||"")&&n.push(r);return d}ye=o.createDocumentFragment().appendChild(o.createElement("div")),(be=o.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),ye.appendChild(be),h.checkClone=ye.cloneNode(!0).cloneNode(!0).lastChild.checked,ye.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!ye.cloneNode(!0).lastChild.defaultValue;var Ce=/^key/,ke=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Se(){return!0}function Ee(){return!1}function Ae(e,t){return e===function(){try{return o.activeElement}catch(e){}}()==("focus"===t)}function Ne(e,t,n,o,i,r){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(o=o||n,n=void 0),t)Ne(e,a,n,o,t[a],r);return e}if(null==o&&null==i?(i=n,o=n=void 0):null==i&&("string"==typeof n?(i=o,o=void 0):(i=o,o=n,n=void 0)),!1===i)i=Ee;else if(!i)return e;return 1===r&&(s=i,(i=function(e){return w().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,o,n)})}function Ie(e,t,n){n?(Y.set(e,t,!1),w.event.add(e,t,{namespace:!1,handler:function(e){var o,i,s=Y.get(this,t);if(1&e.isTrigger&&this[t]){if(s.length)(w.event.special[t]||{}).delegateType&&e.stopPropagation();else if(s=r.call(arguments),Y.set(this,t,s),o=n(this,t),this[t](),s!==(i=Y.get(this,t))||o?Y.set(this,t,!1):i={},s!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else s.length&&(Y.set(this,t,{value:w.event.trigger(w.extend(s[0],w.Event.prototype),s.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,t)&&w.event.add(e,t,Se)}w.event={global:{},add:function(e,t,n,o,i){var r,s,a,l,c,u,d,p,f,h,m,g=Y.get(e);if(g)for(n.handler&&(n=(r=n).handler,i=r.selector),i&&w.find.matchesSelector(ie,i),n.guid||(n.guid=w.guid++),(l=g.events)||(l=g.events={}),(s=g.handle)||(s=g.handle=function(t){return void 0!==w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(j)||[""]).length;c--;)f=m=(a=Te.exec(t[c])||[])[1],h=(a[2]||"").split(".").sort(),f&&(d=w.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,d=w.event.special[f]||{},u=w.extend({type:f,origType:m,data:o,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},r),(p=l[f])||((p=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,o,h,s)||e.addEventListener&&e.addEventListener(f,s)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,u):p.push(u),w.event.global[f]=!0)},remove:function(e,t,n,o,i){var r,s,a,l,c,u,d,p,f,h,m,g=Y.hasData(e)&&Y.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(j)||[""]).length;c--;)if(f=m=(a=Te.exec(t[c])||[])[1],h=(a[2]||"").split(".").sort(),f){for(d=w.event.special[f]||{},p=l[f=(o?d.delegateType:d.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=p.length;r--;)u=p[r],!i&&m!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||o&&o!==u.selector&&("**"!==o||!u.selector)||(p.splice(r,1),u.selector&&p.delegateCount--,d.remove&&d.remove.call(e,u));s&&!p.length&&(d.teardown&&!1!==d.teardown.call(e,h,g.handle)||w.removeEvent(e,f,g.handle),delete l[f])}else for(f in l)w.event.remove(e,f+t[c],n,o,!0);w.isEmptyObject(l)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,o,i,r,s,a=w.event.fix(e),l=new Array(arguments.length),c=(Y.get(this,"events")||{})[a.type]||[],u=w.event.special[a.type]||{};for(l[0]=a,t=1;t<arguments.length;t++)l[t]=arguments[t];if(a.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,a)){for(s=w.event.handlers.call(this,a,c),t=0;(i=s[t++])&&!a.isPropagationStopped();)for(a.currentTarget=i.elem,n=0;(r=i.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!1!==r.namespace&&!a.rnamespace.test(r.namespace)||(a.handleObj=r,a.data=r.data,void 0!==(o=((w.event.special[r.origType]||{}).handle||r.handler).apply(i.elem,l))&&!1===(a.result=o)&&(a.preventDefault(),a.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,a),a.result}},handlers:function(e,t){var n,o,i,r,s,a=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&1<=e.button))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(r=[],s={},n=0;n<l;n++)void 0===s[i=(o=t[n]).selector+" "]&&(s[i]=o.needsContext?-1<w(i,this).index(c):w.find(i,this,null,[c]).length),s[i]&&r.push(o);r.length&&a.push({elem:c,handlers:r})}return c=this,l<t.length&&a.push({elem:c,handlers:t.slice(l)}),a},addProp:function(e,t){Object.defineProperty(w.Event.prototype,e,{enumerable:!0,configurable:!0,get:m(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[w.expando]?e:new w.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&N(t,"input")&&Ie(t,"click",Se),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&N(t,"input")&&Ie(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&N(t,"input")&&Y.get(t,"click")||N(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},w.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},w.Event=function(e,t){if(!(this instanceof w.Event))return new w.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Se:Ee,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Se,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Se,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Se,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},w.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,code:!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(e){var t=e.button;return null==e.which&&Ce.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&ke.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},w.event.addProp),w.each({focus:"focusin",blur:"focusout"},function(e,t){w.event.special[e]={setup:function(){return Ie(this,e,Ae),!1},trigger:function(){return Ie(this,e),!0},delegateType:t}}),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){w.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,o=e.relatedTarget,i=e.handleObj;return o&&(o===this||w.contains(this,o))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}}),w.fn.extend({on:function(e,t,n,o){return Ne(this,e,t,n,o)},one:function(e,t,n,o){return Ne(this,e,t,n,o,1)},off:function(e,t,n){var o,i;if(e&&e.preventDefault&&e.handleObj)return o=e.handleObj,w(e.delegateTarget).off(o.namespace?o.origType+"."+o.namespace:o.origType,o.selector,o.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ee),this.each(function(){w.event.remove(this,e,n,t)})}});var De=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Le=/<script|<style|<link/i,$e=/checked\s*(?:[^=]|=\s*.checked.)/i,Re=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function He(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")&&w(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function je(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,o,i,r,s,a,l,c;if(1===t.nodeType){if(Y.hasData(e)&&(r=Y.access(e),s=Y.set(t,r),c=r.events))for(i in delete s.handle,s.events={},c)for(n=0,o=c[i].length;n<o;n++)w.event.add(t,i,c[i][n]);Q.hasData(e)&&(a=Q.access(e),l=w.extend({},a),Q.set(t,l))}}function Fe(e,t,n,o){t=s.apply([],t);var i,r,a,l,c,u,d=0,p=e.length,f=p-1,g=t[0],v=m(g);if(v||1<p&&"string"==typeof g&&!h.checkClone&&$e.test(g))return e.each(function(i){var r=e.eq(i);v&&(t[0]=g.call(this,i,r.html())),Fe(r,t,n,o)});if(p&&(r=(i=we(t,e[0].ownerDocument,!1,e,o)).firstChild,1===i.childNodes.length&&(i=r),r||o)){for(l=(a=w.map(ge(i,"script"),Pe)).length;d<p;d++)c=i,d!==f&&(c=w.clone(c,!0,!0),l&&w.merge(a,ge(c,"script"))),n.call(e[d],c,d);if(l)for(u=a[a.length-1].ownerDocument,w.map(a,je),d=0;d<l;d++)c=a[d],he.test(c.type||"")&&!Y.access(c,"globalEval")&&w.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?w._evalUrl&&!c.noModule&&w._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")}):y(c.textContent.replace(Re,""),c,u))}return e}function Be(e,t,n){for(var o,i=t?w.filter(t,e):e,r=0;null!=(o=i[r]);r++)n||1!==o.nodeType||w.cleanData(ge(o)),o.parentNode&&(n&&re(o)&&ve(ge(o,"script")),o.parentNode.removeChild(o));return e}w.extend({htmlPrefilter:function(e){return e.replace(De,"<$1></$2>")},clone:function(e,t,n){var o,i,r,s,a,l,c,u=e.cloneNode(!0),d=re(e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(s=ge(u),o=0,i=(r=ge(e)).length;o<i;o++)a=r[o],"input"===(c=(l=s[o]).nodeName.toLowerCase())&&pe.test(a.type)?l.checked=a.checked:"input"!==c&&"textarea"!==c||(l.defaultValue=a.defaultValue);if(t)if(n)for(r=r||ge(e),s=s||ge(u),o=0,i=r.length;o<i;o++)Me(r[o],s[o]);else Me(e,u);return 0<(s=ge(u,"script")).length&&ve(s,!d&&ge(e,"script")),u},cleanData:function(e){for(var t,n,o,i=w.event.special,r=0;void 0!==(n=e[r]);r++)if(G(n)){if(t=n[Y.expando]){if(t.events)for(o in t.events)i[o]?w.event.remove(n,o):w.removeEvent(n,o,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return U(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Fe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||He(this,e).appendChild(e)})},prepend:function(){return Fe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=He(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Fe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Fe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ge(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return U(this,function(e){var t=this[0]||{},n=0,o=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Le.test(e)&&!me[(fe.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n<o;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(ge(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Fe(this,arguments,function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(ge(this)),n&&n.replaceChild(t,this))},e)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){w.fn[e]=function(e){for(var n,o=[],i=w(e),r=i.length-1,s=0;s<=r;s++)n=s===r?this:this.clone(!0),w(i[s])[t](n),a.apply(o,n.get());return this.pushStack(o)}});var Oe=new RegExp("^("+te+")(?!px)[a-z%]+$","i"),ze=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},qe=new RegExp(oe.join("|"),"i");function Ue(e,t,n){var o,i,r,s,a=e.style;return(n=n||ze(e))&&(""!==(s=n.getPropertyValue(t)||n[t])||re(e)||(s=w.style(e,t)),!h.pixelBoxStyles()&&Oe.test(s)&&qe.test(t)&&(o=a.width,i=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=o,a.minWidth=i,a.maxWidth=r)),void 0!==s?s+"":s}function _e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){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%",ie.appendChild(c).appendChild(u);var t=e.getComputedStyle(u);i="1%"!==t.top,l=12===n(t.marginLeft),u.style.right="60%",a=36===n(t.right),r=36===n(t.width),u.style.position="absolute",s=12===n(u.offsetWidth/3),ie.removeChild(c),u=null}}function n(e){return Math.round(parseFloat(e))}var i,r,s,a,l,c=o.createElement("div"),u=o.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===u.style.backgroundClip,w.extend(h,{boxSizingReliable:function(){return t(),r},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),s}}))}();var We=["Webkit","Moz","ms"],Ve=o.createElement("div").style,Ke={};function Ge(e){return w.cssProps[e]||Ke[e]||(e in Ve?e:Ke[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=We.length;n--;)if((e=We[n]+t)in Ve)return e}(e)||e)}var Xe=/^(none|table(?!-c[ea]).+)/,Ye=/^--/,Qe={position:"absolute",visibility:"hidden",display:"block"},Ze={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var o=ne.exec(t);return o?Math.max(0,o[2]-(n||0))+(o[3]||"px"):t}function et(e,t,n,o,i,r){var s="width"===t?1:0,a=0,l=0;if(n===(o?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(l+=w.css(e,n+oe[s],!0,i)),o?("content"===n&&(l-=w.css(e,"padding"+oe[s],!0,i)),"margin"!==n&&(l-=w.css(e,"border"+oe[s]+"Width",!0,i))):(l+=w.css(e,"padding"+oe[s],!0,i),"padding"!==n?l+=w.css(e,"border"+oe[s]+"Width",!0,i):a+=w.css(e,"border"+oe[s]+"Width",!0,i));return!o&&0<=r&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-r-l-a-.5))||0),l}function tt(e,t,n){var o=ze(e),i=(!h.boxSizingReliable()||n)&&"border-box"===w.css(e,"boxSizing",!1,o),r=i,s=Ue(e,t,o),a="offset"+t[0].toUpperCase()+t.slice(1);if(Oe.test(s)){if(!n)return s;s="auto"}return(!h.boxSizingReliable()&&i||"auto"===s||!parseFloat(s)&&"inline"===w.css(e,"display",!1,o))&&e.getClientRects().length&&(i="border-box"===w.css(e,"boxSizing",!1,o),(r=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+et(e,t,n||(i?"border":"content"),r,o,s)+"px"}function nt(e,t,n,o,i){return new nt.prototype.init(e,t,n,o,i)}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ue(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,o){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,r,s,a=K(t),l=Ye.test(t),c=e.style;if(l||(t=Ge(a)),s=w.cssHooks[t]||w.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,o))?i:c[t];"string"==(r=typeof n)&&(i=ne.exec(n))&&i[1]&&(n=ce(e,t,i),r="number"),null!=n&&n==n&&("number"!==r||l||(n+=i&&i[3]||(w.cssNumber[a]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,o))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,o){var i,r,s,a=K(t);return Ye.test(t)||(t=Ge(a)),(s=w.cssHooks[t]||w.cssHooks[a])&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=Ue(e,t,o)),"normal"===i&&t in Ze&&(i=Ze[t]),""===n||n?(r=parseFloat(i),!0===n||isFinite(r)?r||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,o){if(n)return!Xe.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?tt(e,t,o):le(e,Qe,function(){return tt(e,t,o)})},set:function(e,n,o){var i,r=ze(e),s=!h.scrollboxSize()&&"absolute"===r.position,a=(s||o)&&"border-box"===w.css(e,"boxSizing",!1,r),l=o?et(e,t,o,a,r):0;return a&&s&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(r[t])-et(e,t,"border",!1,r)-.5)),l&&(i=ne.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Je(0,n,l)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ue(e,"marginLeft"))||e.getBoundingClientRect().left-le(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var o=0,i={},r="string"==typeof n?n.split(" "):[n];o<4;o++)i[e+oe[o]+t]=r[o]||r[o-2]||r[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Je)}),w.fn.extend({css:function(e,t){return U(this,function(e,t,n){var o,i,r={},s=0;if(Array.isArray(t)){for(o=ze(e),i=t.length;s<i;s++)r[t[s]]=w.css(e,t[s],!1,o);return r}return void 0!==n?w.style(e,t,n):w.css(e,t)},e,t,1<arguments.length)}}),((w.Tween=nt).prototype={constructor:nt,init:function(e,t,n,o,i,r){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=o,this.unit=r||(w.cssNumber[n]?"":"px")},cur:function(){var e=nt.propHooks[this.prop];return e&&e.get?e.get(this):nt.propHooks._default.get(this)},run:function(e){var t,n=nt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):nt.propHooks._default.set(this),this}}).init.prototype=nt.prototype,(nt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||!w.cssHooks[e.prop]&&null==e.elem.style[Ge(e.prop)]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=nt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=nt.prototype.init,w.fx.step={};var ot,it,rt,st,at=/^(?:toggle|show|hide)$/,lt=/queueHooks$/;function ct(){it&&(!1===o.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(ct):e.setTimeout(ct,w.fx.interval),w.fx.tick())}function ut(){return e.setTimeout(function(){ot=void 0}),ot=Date.now()}function dt(e,t){var n,o=0,i={height:e};for(t=t?1:0;o<4;o+=2-t)i["margin"+(n=oe[o])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function pt(e,t,n){for(var o,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),r=0,s=i.length;r<s;r++)if(o=i[r].call(n,t,e))return o}function ft(e,t,n){var o,i,r=0,s=ft.prefilters.length,a=w.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;for(var t=ot||ut(),n=Math.max(0,c.startTime+c.duration-t),o=1-(n/c.duration||0),r=0,s=c.tweens.length;r<s;r++)c.tweens[r].run(o);return a.notifyWith(e,[c,o,n]),o<1&&s?n:(s||a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:ot||ut(),duration:n.duration,tweens:[],createTween:function(t,n){var o=w.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(o),o},stop:function(t){var n=0,o=t?c.tweens.length:0;if(i)return this;for(i=!0;n<o;n++)c.tweens[n].run(1);return t?(a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c,t])):a.rejectWith(e,[c,t]),this}}),u=c.props;for(function(e,t){var n,o,i,r,s;for(n in e)if(i=t[o=K(n)],r=e[n],Array.isArray(r)&&(i=r[1],r=e[n]=r[0]),n!==o&&(e[o]=r,delete e[n]),(s=w.cssHooks[o])&&"expand"in s)for(n in r=s.expand(r),delete e[o],r)n in e||(e[n]=r[n],t[n]=i);else t[o]=i}(u,c.opts.specialEasing);r<s;r++)if(o=ft.prefilters[r].call(c,e,u,c.opts))return m(o.stop)&&(w._queueHooks(c.elem,c.opts.queue).stop=o.stop.bind(o)),o;return w.map(u,pt,c),m(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),w.fx.timer(w.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}w.Animation=w.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ce(n.elem,e,ne.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(j);for(var n,o=0,i=e.length;o<i;o++)n=e[o],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var o,i,r,s,a,l,c,u,d="width"in t||"height"in t,p=this,f={},h=e.style,m=e.nodeType&&ae(e),g=Y.get(e,"fxshow");for(o in n.queue||(null==(s=w._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,p.always(function(){p.always(function(){s.unqueued--,w.queue(e,"fx").length||s.empty.fire()})})),t)if(i=t[o],at.test(i)){if(delete t[o],r=r||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!g||void 0===g[o])continue;m=!0}f[o]=g&&g[o]||w.style(e,o)}if((l=!w.isEmptyObject(t))||!w.isEmptyObject(f))for(o in d&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(c=g&&g.display)&&(c=Y.get(e,"display")),"none"===(u=w.css(e,"display"))&&(c?u=c:(de([e],!0),c=e.style.display||c,u=w.css(e,"display"),de([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===w.css(e,"float")&&(l||(p.done(function(){h.display=c}),null==c&&(u=h.display,c="none"===u?"":u)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),l=!1,f)l||(g?"hidden"in g&&(m=g.hidden):g=Y.access(e,"fxshow",{display:c}),r&&(g.hidden=!m),m&&de([e],!0),p.done(function(){for(o in m||de([e]),Y.remove(e,"fxshow"),f)w.style(e,o,f[o])})),l=pt(m?g[o]:0,o,p),o in g||(g[o]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),w.speed=function(e,t,n){var o=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return w.fx.off?o.duration=0:"number"!=typeof o.duration&&(o.duration in w.fx.speeds?o.duration=w.fx.speeds[o.duration]:o.duration=w.fx.speeds._default),null!=o.queue&&!0!==o.queue||(o.queue="fx"),o.old=o.complete,o.complete=function(){m(o.old)&&o.old.call(this),o.queue&&w.dequeue(this,o.queue)},o},w.fn.extend({fadeTo:function(e,t,n,o){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,o)},animate:function(e,t,n,o){var i=w.isEmptyObject(e),r=w.speed(t,n,o),s=function(){var t=ft(this,w.extend({},e),r);(i||Y.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||!1===r.queue?this.each(s):this.queue(r.queue,s)},stop:function(e,t,n){var o=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",r=w.timers,s=Y.get(this);if(i)s[i]&&s[i].stop&&o(s[i]);else for(i in s)s[i]&&s[i].stop&&lt.test(i)&&o(s[i]);for(i=r.length;i--;)r[i].elem!==this||null!=e&&r[i].queue!==e||(r[i].anim.stop(n),t=!1,r.splice(i,1));!t&&n||w.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Y.get(this),o=n[e+"queue"],i=n[e+"queueHooks"],r=w.timers,s=o?o.length:0;for(n.finish=!0,w.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;t<s;t++)o[t]&&o[t].finish&&o[t].finish.call(this);delete n.finish})}}),w.each(["toggle","show","hide"],function(e,t){var n=w.fn[t];w.fn[t]=function(e,o,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(dt(t,!0),e,o,i)}}),w.each({slideDown:dt("show"),slideUp:dt("hide"),slideToggle:dt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){w.fn[e]=function(e,n,o){return this.animate(t,e,n,o)}}),w.timers=[],w.fx.tick=function(){var e,t=0,n=w.timers;for(ot=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||w.fx.stop(),ot=void 0},w.fx.timer=function(e){w.timers.push(e),w.fx.start()},w.fx.interval=13,w.fx.start=function(){it||(it=!0,ct())},w.fx.stop=function(){it=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(t,n){return t=w.fx&&w.fx.speeds[t]||t,n=n||"fx",this.queue(n,function(n,o){var i=e.setTimeout(n,t);o.stop=function(){e.clearTimeout(i)}})},rt=o.createElement("input"),st=o.createElement("select").appendChild(o.createElement("option")),rt.type="checkbox",h.checkOn=""!==rt.value,h.optSelected=st.selected,(rt=o.createElement("input")).value="t",rt.type="radio",h.radioValue="t"===rt.value;var ht,mt=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return U(this,w.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var o,i,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===e.getAttribute?w.prop(e,t,n):(1===r&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?ht:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(o=i.set(e,n,t))?o:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(o=i.get(e,t))?o:null==(o=w.find.attr(e,t))?void 0:o)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,o=0,i=t&&t.match(j);if(i&&1===e.nodeType)for(;n=i[o++];)e.removeAttribute(n)}}),ht={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=mt[t]||w.find.attr;mt[t]=function(e,t,o){var i,r,s=t.toLowerCase();return o||(r=mt[s],mt[s]=i,i=null!=n(e,t,o)?s:null,mt[s]=r),i}});var gt=/^(?:input|select|textarea|button)$/i,vt=/^(?:a|area)$/i;function yt(e){return(e.match(j)||[]).join(" ")}function bt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(j)||[]}w.fn.extend({prop:function(e,t){return U(this,w.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var o,i,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(o=i.set(e,n,t))?o:e[t]=n:i&&"get"in i&&null!==(o=i.get(e,t))?o:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||vt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),h.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this}),w.fn.extend({addClass:function(e){var t,n,o,i,r,s,a,l=0;if(m(e))return this.each(function(t){w(this).addClass(e.call(this,t,bt(this)))});if((t=xt(e)).length)for(;n=this[l++];)if(i=bt(n),o=1===n.nodeType&&" "+yt(i)+" "){for(s=0;r=t[s++];)o.indexOf(" "+r+" ")<0&&(o+=r+" ");i!==(a=yt(o))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,o,i,r,s,a,l=0;if(m(e))return this.each(function(t){w(this).removeClass(e.call(this,t,bt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)for(;n=this[l++];)if(i=bt(n),o=1===n.nodeType&&" "+yt(i)+" "){for(s=0;r=t[s++];)for(;-1<o.indexOf(" "+r+" ");)o=o.replace(" "+r+" "," ");i!==(a=yt(o))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,o="string"===n||Array.isArray(e);return"boolean"==typeof t&&o?t?this.addClass(e):this.removeClass(e):m(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,bt(this),t),t)}):this.each(function(){var t,i,r,s;if(o)for(i=0,r=w(this),s=xt(e);t=s[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&"boolean"!==n||((t=bt(this))&&Y.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,o=0;for(t=" "+e+" ";n=this[o++];)if(1===n.nodeType&&-1<(" "+yt(bt(n))+" ").indexOf(t))return!0;return!1}});var wt=/\r/g;w.fn.extend({val:function(e){var t,n,o,i=this[0];return arguments.length?(o=m(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=o?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(wt,""):null==n?"":n:void 0}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:yt(w.text(e))}},select:{get:function(e){var t,n,o,i=e.options,r=e.selectedIndex,s="select-one"===e.type,a=s?null:[],l=s?r+1:i.length;for(o=r<0?l:s?r:0;o<l;o++)if(((n=i[o]).selected||o===r)&&!n.disabled&&(!n.parentNode.disabled||!N(n.parentNode,"optgroup"))){if(t=w(n).val(),s)return t;a.push(t)}return a},set:function(e,t){for(var n,o,i=e.options,r=w.makeArray(t),s=i.length;s--;)((o=i[s]).selected=-1<w.inArray(w.valHooks.option.get(o),r))&&(n=!0);return n||(e.selectedIndex=-1),r}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<w.inArray(w(e).val(),t)}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var Ct=/^(?:focusinfocus|focusoutblur)$/,kt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,r){var s,a,l,c,u,p,f,h,v=[i||o],y=d.call(t,"type")?t.type:t,b=d.call(t,"namespace")?t.namespace.split("."):[];if(a=h=l=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!Ct.test(y+w.event.triggered)&&(-1<y.indexOf(".")&&(y=(b=y.split(".")).shift(),b.sort()),u=y.indexOf(":")<0&&"on"+y,(t=t[w.expando]?t:new w.Event(y,"object"==typeof t&&t)).isTrigger=r?2:3,t.namespace=b.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),f=w.event.special[y]||{},r||!f.trigger||!1!==f.trigger.apply(i,n))){if(!r&&!f.noBubble&&!g(i)){for(c=f.delegateType||y,Ct.test(c+y)||(a=a.parentNode);a;a=a.parentNode)v.push(a),l=a;l===(i.ownerDocument||o)&&v.push(l.defaultView||l.parentWindow||e)}for(s=0;(a=v[s++])&&!t.isPropagationStopped();)h=a,t.type=1<s?c:f.bindType||y,(p=(Y.get(a,"events")||{})[t.type]&&Y.get(a,"handle"))&&p.apply(a,n),(p=u&&a[u])&&p.apply&&G(a)&&(t.result=p.apply(a,n),!1===t.result&&t.preventDefault());return t.type=y,r||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(v.pop(),n)||!G(i)||u&&m(i[y])&&!g(i)&&((l=i[u])&&(i[u]=null),w.event.triggered=y,t.isPropagationStopped()&&h.addEventListener(y,kt),i[y](),t.isPropagationStopped()&&h.removeEventListener(y,kt),w.event.triggered=void 0,l&&(i[u]=l)),t.result}},simulate:function(e,t,n){var o=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(o,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var o=this.ownerDocument||this,i=Y.access(o,t);i||o.addEventListener(e,n,!0),Y.access(o,t,(i||0)+1)},teardown:function(){var o=this.ownerDocument||this,i=Y.access(o,t)-1;i?Y.access(o,t,i):(o.removeEventListener(e,n,!0),Y.remove(o,t))}}});var Tt=e.location,St=Date.now(),Et=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(t){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var At=/\[\]$/,Nt=/\r?\n/g,It=/^(?:submit|button|image|reset|file)$/i,Dt=/^(?:input|select|textarea|keygen)/i;function Lt(e,t,n,o){var i;if(Array.isArray(t))w.each(t,function(t,i){n||At.test(e)?o(e,i):Lt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,o)});else if(n||"object"!==b(t))o(e,t);else for(i in t)Lt(e+"["+i+"]",t[i],n,o)}w.param=function(e,t){var n,o=[],i=function(e,t){var n=m(t)?t():t;o[o.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)Lt(n,e[n],t,i);return o.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&Dt.test(this.nodeName)&&!It.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Nt,"\r\n")}}):{name:t.name,value:n.replace(Nt,"\r\n")}}).get()}});var $t=/%20/g,Rt=/#.*$/,Ht=/([?&])_=[^&]*/,Pt=/^(.*?):[ \t]*([^\r\n]*)$/gm,jt=/^(?:GET|HEAD)$/,Mt=/^\/\//,Ft={},Bt={},Ot="*/".concat("*"),zt=o.createElement("a");function qt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var o,i=0,r=t.toLowerCase().match(j)||[];if(m(n))for(;o=r[i++];)"+"===o[0]?(o=o.slice(1)||"*",(e[o]=e[o]||[]).unshift(n)):(e[o]=e[o]||[]).push(n)}}function Ut(e,t,n,o){var i={},r=e===Bt;function s(a){var l;return i[a]=!0,w.each(e[a]||[],function(e,a){var c=a(t,n,o);return"string"!=typeof c||r||i[c]?r?!(l=c):void 0:(t.dataTypes.unshift(c),s(c),!1)}),l}return s(t.dataTypes[0])||!i["*"]&&s("*")}function _t(e,t){var n,o,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:o||(o={}))[n]=t[n]);return o&&w.extend(!0,e,o),e}zt.href=Tt.href,w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ot,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":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_t(_t(e,w.ajaxSettings),t):_t(w.ajaxSettings,e)},ajaxPrefilter:qt(Ft),ajaxTransport:qt(Bt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,r,s,a,l,c,u,d,p,f,h=w.ajaxSetup({},n),m=h.context||h,g=h.context&&(m.nodeType||m.jquery)?w(m):w.event,v=w.Deferred(),y=w.Callbacks("once memory"),b=h.statusCode||{},x={},C={},k="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=Pt.exec(s);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?s:null},setRequestHeader:function(e,t){return null==u&&(e=C[e.toLowerCase()]=C[e.toLowerCase()]||e,x[e]=t),this},overrideMimeType:function(e){return null==u&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)T.always(e[T.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||k;return i&&i.abort(t),S(0,t),this}};if(v.promise(T),h.url=((t||h.url||Tt.href)+"").replace(Mt,Tt.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(j)||[""],null==h.crossDomain){c=o.createElement("a");try{c.href=h.url,c.href=c.href,h.crossDomain=zt.protocol+"//"+zt.host!=c.protocol+"//"+c.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),Ut(Ft,h,n,T),u)return T;for(p in(d=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!jt.test(h.type),r=h.url.replace(Rt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace($t,"+")):(f=h.url.slice(r.length),h.data&&(h.processData||"string"==typeof h.data)&&(r+=(Et.test(r)?"&":"?")+h.data,delete h.data),!1===h.cache&&(r=r.replace(Ht,"$1"),f=(Et.test(r)?"&":"?")+"_="+St+++f),h.url=r+f),h.ifModified&&(w.lastModified[r]&&T.setRequestHeader("If-Modified-Since",w.lastModified[r]),w.etag[r]&&T.setRequestHeader("If-None-Match",w.etag[r])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&T.setRequestHeader("Content-Type",h.contentType),T.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Ot+"; q=0.01":""):h.accepts["*"]),h.headers)T.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(m,T,h)||u))return T.abort();if(k="abort",y.add(h.complete),T.done(h.success),T.fail(h.error),i=Ut(Bt,h,n,T)){if(T.readyState=1,d&&g.trigger("ajaxSend",[T,h]),u)return T;h.async&&0<h.timeout&&(l=e.setTimeout(function(){T.abort("timeout")},h.timeout));try{u=!1,i.send(x,S)}catch(t){if(u)throw t;S(-1,t)}}else S(-1,"No Transport");function S(t,n,o,a){var c,p,f,x,C,k=n;u||(u=!0,l&&e.clearTimeout(l),i=void 0,s=a||"",T.readyState=0<t?4:0,c=200<=t&&t<300||304===t,o&&(x=function(e,t,n){for(var o,i,r,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===o&&(o=e.mimeType||t.getResponseHeader("Content-Type"));if(o)for(i in a)if(a[i]&&a[i].test(o)){l.unshift(i);break}if(l[0]in n)r=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){r=i;break}s||(s=i)}r=r||s}if(r)return r!==l[0]&&l.unshift(r),n[r]}(h,T,o)),x=function(e,t,n,o){var i,r,s,a,l,c={},u=e.dataTypes.slice();if(u[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(r=u.shift();r;)if(e.responseFields[r]&&(n[e.responseFields[r]]=t),!l&&o&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(s=c[l+" "+r]||c["* "+r]))for(i in c)if((a=i.split(" "))[1]===r&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[i]:!0!==c[i]&&(r=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}(h,x,T,c),c?(h.ifModified&&((C=T.getResponseHeader("Last-Modified"))&&(w.lastModified[r]=C),(C=T.getResponseHeader("etag"))&&(w.etag[r]=C)),204===t||"HEAD"===h.type?k="nocontent":304===t?k="notmodified":(k=x.state,p=x.data,c=!(f=x.error))):(f=k,!t&&k||(k="error",t<0&&(t=0))),T.status=t,T.statusText=(n||k)+"",c?v.resolveWith(m,[p,k,T]):v.rejectWith(m,[T,k,f]),T.statusCode(b),b=void 0,d&&g.trigger(c?"ajaxSuccess":"ajaxError",[T,h,c?p:f]),y.fireWith(m,[T,k]),d&&(g.trigger("ajaxComplete",[T,h]),--w.active||w.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,o,i){return m(n)&&(i=i||o,o=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:o},w.isPlainObject(e)&&e))}}),w._evalUrl=function(e,t){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){w.globalEval(e,t)}})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return m(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=m(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Wt={0:200,1223:204},Vt=w.ajaxSettings.xhr();h.cors=!!Vt&&"withCredentials"in Vt,h.ajax=Vt=!!Vt,w.ajaxTransport(function(t){var n,o;if(h.cors||Vt&&!t.crossDomain)return{send:function(i,r){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(s,i[s]);n=function(e){return function(){n&&(n=o=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?r(0,"error"):r(a.status,a.statusText):r(Wt[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(),o=a.onerror=a.ontimeout=n("error"),void 0!==a.onabort?a.onabort=o:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout(function(){n&&o()})},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(i){if(n)throw i}},abort:function(){n&&n()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(i,r){t=w("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),o.head.appendChild(t[0])},abort:function(){n&&n()}}});var Kt,Gt=[],Xt=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||w.expando+"_"+St++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",function(t,n,o){var i,r,s,a=!1!==t.jsonp&&(Xt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xt.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=m(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Xt,"$1"+i):!1!==t.jsonp&&(t.url+=(Et.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||w.error(i+" was not called"),s[0]},t.dataTypes[0]="json",r=e[i],e[i]=function(){s=arguments},o.always(function(){void 0===r?w(e).removeProp(i):e[i]=r,t[i]&&(t.jsonpCallback=n.jsonpCallback,Gt.push(i)),s&&m(r)&&r(s[0]),s=r=void 0}),"script"}),h.createHTMLDocument=((Kt=o.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Kt.childNodes.length),w.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(h.createHTMLDocument?((i=(t=o.implementation.createHTMLDocument("")).createElement("base")).href=o.location.href,t.head.appendChild(i)):t=o),s=!n&&[],(r=I.exec(e))?[t.createElement(r[1])]:(r=we([e],t,s),s&&s.length&&w(s).remove(),w.merge([],r.childNodes)));var i,r,s},w.fn.load=function(e,t,n){var o,i,r,s=this,a=e.indexOf(" ");return-1<a&&(o=yt(e.slice(a)),e=e.slice(0,a)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<s.length&&w.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){r=arguments,s.html(o?w("<div>").append(w.parseHTML(e)).find(o):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,r||[e.responseText,t,e])})}),this},w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}}),w.expr.pseudos.animated=function(e){return w.grep(w.timers,function(t){return e===t.elem}).length},w.offset={setOffset:function(e,t,n){var o,i,r,s,a,l,c=w.css(e,"position"),u=w(e),d={};"static"===c&&(e.style.position="relative"),a=u.offset(),r=w.css(e,"top"),l=w.css(e,"left"),("absolute"===c||"fixed"===c)&&-1<(r+l).indexOf("auto")?(s=(o=u.position()).top,i=o.left):(s=parseFloat(r)||0,i=parseFloat(l)||0),m(t)&&(t=t.call(e,n,w.extend({},a))),null!=t.top&&(d.top=t.top-a.top+s),null!=t.left&&(d.left=t.left-a.left+i),"using"in t?t.using.call(e,d):u.css(d)}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){w.offset.setOffset(this,e,t)});var t,n,o=this[0];return o?o.getClientRects().length?(t=o.getBoundingClientRect(),n=o.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,o=this[0],i={top:0,left:0};if("fixed"===w.css(o,"position"))t=o.getBoundingClientRect();else{for(t=this.offset(),n=o.ownerDocument,e=o.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position");)e=e.parentNode;e&&e!==o&&1===e.nodeType&&((i=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),i.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-w.css(o,"marginTop",!0),left:t.left-i.left-w.css(o,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===w.css(e,"position");)e=e.offsetParent;return e||ie})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;w.fn[e]=function(o){return U(this,function(e,o,i){var r;if(g(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===i)return r?r[t]:e[o];r?r.scrollTo(n?r.pageXOffset:i,n?i:r.pageYOffset):e[o]=i},e,o,arguments.length)}}),w.each(["top","left"],function(e,t){w.cssHooks[t]=_e(h.pixelPosition,function(e,n){if(n)return n=Ue(e,t),Oe.test(n)?w(e).position()[t]+"px":n})}),w.each({Height:"height",Width:"width"},function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,o){w.fn[o]=function(i,r){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===r?"margin":"border");return U(this,function(t,n,i){var r;return g(t)?0===o.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===i?w.css(t,n,a):w.style(t,n,i,a)},t,s?i:void 0,s)}})}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){w.fn[t]=function(e,n){return 0<arguments.length?this.on(t,null,e,n):this.trigger(t)}}),w.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),w.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,o){return this.on(t,e,n,o)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),w.proxy=function(e,t){var n,o,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return o=r.call(arguments,2),(i=function(){return e.apply(t||this,o.concat(r.call(arguments)))}).guid=e.guid=e.guid||w.guid++,i},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=N,w.isFunction=m,w.isWindow=g,w.camelCase=K,w.type=b,w.now=Date.now,w.isNumeric=function(e){var t=w.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return w});var Yt=e.jQuery,Qt=e.$;return w.noConflict=function(t){return e.$===w&&(e.$=Qt),t&&e.jQuery===w&&(e.jQuery=Yt),w},t||(e.jQuery=e.$=w),w}),define("app/init",[],()=>{"use strict";let e={1:"E004 - C1",2:"L005 - C2",3:"Z006 - C3",4:"M001 - C4",5:"C008 - C5",6:"G008 - C6",7:"Q003 - 0.0",8:"A009 - C13"};return{path:{api:"/api/rest",getCaptcha:"/api/User/getCaptcha",getServerStatus:"/api/User/getEveServerStatus",getCookieCharacterData:"/api/User/getCookieCharacter",logIn:"/api/User/logIn",logout:"/api/User/logout",openIngameWindow:"/api/User/openIngameWindow",saveUserConfig:"/api/User/saveAccount",deleteAccount:"/api/User/deleteAccount",searchAccess:"/api/Access/search",initData:"/api/Map/initData",getAccessData:"/api/Map/getAccessData",updateMapData:"/api/Map/updateData",updateUserData:"/api/Map/updateUserData",updateUnloadData:"/api/Map/updateUnloadData",importMap:"/api/Map/import",getMapConnectionData:"/api/Map/getConnectionData",getMapLogData:"/api/Map/getLogData",setDestination:"/api/System/setDestination",pokeRally:"/api/System/pokeRally",getStatisticsData:"/api/Statistic/getData",searchUniverseData:"/api/Universe/search",getConstellationData:"/api/Universe/constellationData",gitHubReleases:"/api/GitHub/releases"},breakpoints:[{name:"screen-xl",width:1/0},{name:"screen-l",width:1600},{name:"screen-m",width:1200},{name:"screen-d",width:1e3},{name:"screen-s",width:780},{name:"screen-xs",width:480}],animationSpeed:{splashOverlay:300,headerLink:100,mapOverlay:200,mapOverlayLocal:180,mapMoveSystem:180,mapDeleteSystem:200,mapModule:200,dialogEvents:180},syncStatus:{type:"ajax",webSocket:{status:"closed",class:"txt-color-danger",timestamp:void 0},sharedWorker:{status:"offline",class:"txt-color-danger",timestamp:void 0},ajax:{status:"enabled",class:"txt-color-success",timestamp:void 0}},performanceLogging:{keyServerMapData:"UPDATE_SERVER_MAP",keyClientMapData:"UPDATE_CLIENT_MAP",keyServerUserData:"UPDATE_SERVER_USER_DATA",keyClientUserData:"UPDATE_CLIENT_USER_DATA"},mapIcons:[{class:"fa-desktop",label:"desktop",unicode:"&#xf108;"},{class:"fa-space-shuttle",label:"space shuttle",unicode:"&#xf197;"},{class:"fa-anchor",label:"anchor",unicode:"&#xf13d;"},{class:"fa-satellite",label:"satellite",unicode:"&#xf7bf;"},{class:"fa-skull-crossbones",label:"skull crossbones",unicode:"&#xf714;"},{class:"fa-fire",label:"fire",unicode:"&#xf06d;"},{class:"fa-bookmark",label:"bookmark",unicode:"&#xf02e;"},{class:"fa-cube",label:"cube",unicode:"&#xf1b2;"},{class:"fa-star",label:"star",unicode:"&#xf005;"},{class:"fa-hat-wizard",label:"hat wizard",unicode:"&#xf6e8;"},{class:"fa-cross",label:"cross",unicode:"&#xf654;"},{class:"fa-cannabis",label:"cannabis",unicode:"&#xf55f;"},{class:"fa-spider",label:"spider",unicode:"&#xf717;"},{class:"fa-plane",label:"plane",unicode:"&#xf072;"},{class:"fa-globe",label:"globe",unicode:"&#xf0ac;"},{class:"fa-rocket",label:"rocket",unicode:"&#xf135;"},{class:"fa-life-ring",label:"life ring",unicode:"&#xf1cd;"},{class:"fa-heart",label:"heart",unicode:"&#xf004;"},{class:"fa-poop",label:"poop",unicode:"&#xf619;"}],classes:{logTypes:{info:{class:"pf-log-info",label:"info"},warning:{class:"pf-log-warning",label:"warning"},error:{class:"pf-log-error",label:"error"}},systemEffects:{effect:{class:"pf-system-effect",name:"no effect"},magnetar:{class:"pf-system-effect-magnetar",name:"magnetar"},redGiant:{class:"pf-system-effect-redgiant",name:"red giant"},pulsar:{class:"pf-system-effect-pulsar",name:"pulsar"},wolfRayet:{class:"pf-system-effect-wolfrayet",name:"wolf rayet"},cataclysmic:{class:"pf-system-effect-cataclysmic",name:"cataclysmic"},blackHole:{class:"pf-system-effect-blackhole",name:"black hole"}},systemSecurity:{security:{class:"pf-system-sec"},A:{class:"pf-system-sec-abyssal"},SH:{class:"pf-system-sec-unknown"},H:{class:"pf-system-sec-highSec"},L:{class:"pf-system-sec-lowSec"},T:{class:"pf-system-sec-triglav"},"0.0":{class:"pf-system-sec-nullSec"},C1:{class:"pf-system-sec-low"},C2:{class:"pf-system-sec-low"},C3:{class:"pf-system-sec-mid"},C4:{class:"pf-system-sec-mid"},C5:{class:"pf-system-sec-high"},C6:{class:"pf-system-sec-high"},C12:{class:"pf-system-sec-special"},C14:{class:"pf-system-sec-drifter"},C15:{class:"pf-system-sec-drifter"},C16:{class:"pf-system-sec-drifter"},C17:{class:"pf-system-sec-drifter"},C18:{class:"pf-system-sec-drifter"}},trueSec:{"0.0":{class:"pf-system-security-0-0"},.1:{class:"pf-system-security-0-1"},.2:{class:"pf-system-security-0-2"},.3:{class:"pf-system-security-0-3"},.4:{class:"pf-system-security-0-4"},.5:{class:"pf-system-security-0-5"},.6:{class:"pf-system-security-0-6"},.7:{class:"pf-system-security-0-7"},.8:{class:"pf-system-security-0-8"},.9:{class:"pf-system-security-0-9"},"1.0":{class:"pf-system-security-1-0"}},systemInfo:{rally:{class:"pf-system-info-rally",label:"rally point"}},planets:{barren:{class:"pf-planet-barren"},gas:{class:"pf-planet-gas"},ice:{class:"pf-planet-ice"},lava:{class:"pf-planet-lava"},oceanic:{class:"pf-planet-oceanic"},plasma:{class:"pf-planet-plasma"},shattered:{class:"pf-planet-shattered"},storm:{class:"pf-planet-storm"},temperate:{class:"pf-planet-temperate"}},pieChart:{class:"pf-pie-chart",pieChartMapCounterClass:"pf-pie-chart-map-timer"}},defaultMapScope:"wh",endpointTypes:{bubble:{cssClass:"pf-map-endpoint-bubble"}},connectionTypes:{abyssal:{cssClass:"pf-map-connection-abyssal"},jumpbridge:{cssClass:"pf-map-connection-jumpbridge"},stargate:{cssClass:"pf-map-connection-stargate"},wh_eol:{cssClass:"pf-map-connection-wh-eol"},wh_fresh:{cssClass:"pf-map-connection-wh-fresh"},wh_reduced:{cssClass:"pf-map-connection-wh-reduced"},wh_critical:{cssClass:"pf-map-connection-wh-critical"},wh_jump_mass_s:{cssClass:"pf-map-connection-wh-size-s",overlays:[["Label",{label:'<i class="fas fa-char pf-jump-mass-s" data-char-content="S"></i>',cssClass:["pf-map-component-overlay","small","text-center"].join(" "),location:.65,id:"pf-map-connection-jump-mass-overlay"}]]},wh_jump_mass_m:{cssClass:"pf-map-connection-wh-size-m",overlays:[["Label",{label:'<i class="fas fa-char pf-jump-mass-m" data-char-content="M"></i>',cssClass:["pf-map-component-overlay","small","text-center"].join(" "),location:.65,id:"pf-map-connection-jump-mass-overlay"}]]},wh_jump_mass_l:{cssClass:"pf-map-connection-wh-size-l",overlays:[["Label",{label:'<i class="fas fa-char pf-jump-mass-l" data-char-content="L"></i>',cssClass:["pf-map-component-overlay","small","text-center"].join(" "),location:.65,id:"pf-map-connection-jump-mass-overlay"}]]},wh_jump_mass_xl:{cssClass:"pf-map-connection-wh-size-xl",overlays:[["Label",{label:'<i class="fas fa-char pf-jump-mass-xl" data-char-content="XL"></i>',cssClass:["pf-map-component-overlay","small","text-center"].join(" "),location:.65,id:"pf-map-connection-jump-mass-overlay"}]]},preserve_mass:{cssClass:"pf-map-connection-preserve-mass",overlays:[["Label",{label:'<i class="fas fa-fw fa-exclamation-triangle"></i>&nbsp;save mass',cssClass:["pf-map-component-overlay","mass"].join(" "),location:.35}]]},info_signature:{overlays:[["Arrow",{id:"pf-map-connection-arrow-overlay",cssClass:"pf-map-connection-arrow-overlay",location:.5,length:"${arrowlength}",width:12,direction:"${arrowdirection}",foldback:"${arrowfoldback}"}]]},state_active:{cssClass:"pf-map-connection-active"},state_process:{cssClass:"pf-map-connection-process",overlays:[["Label",{label:'<i class="fas fa-fw fa-sync fa-spin"></i>',cssClass:["pf-map-connection-state-overlay"].join(" "),location:.5}]]}},wormholeSizes:{wh_jump_mass_xl:{jumpMassMin:1e9,type:"wh_jump_mass_xl",class:"pf-jump-mass-xl",label:"XL",text:"capital ships"},wh_jump_mass_l:{jumpMassMin:375e6,type:"wh_jump_mass_l",class:"pf-jump-mass-l",label:"L",text:"larger ships"},wh_jump_mass_m:{jumpMassMin:62e6,type:"wh_jump_mass_m",class:"pf-jump-mass-m",label:"M",text:"medium ships"},wh_jump_mass_s:{jumpMassMin:5e3,type:"wh_jump_mass_s",class:"pf-jump-mass-s",label:"S",text:"smallest ships"}},signatureGroups:{1:{name:"(combat site|kampfgebiet|site de combat|Боевой район|战斗地点)",label:"Combat"},2:{name:"(relic site|reliktgebiet|site de reliques|Археологический район|遗迹地点)",label:"Relic"},3:{name:"(data site|datengebiet|site de données|Информационный район|数据地点)",label:"Data"},4:{name:"(gas site|gasgebiet|site de collecte de gaz|Газовый район|气云地点)",label:"Gas"},5:{name:"(wormhole|wurmloch|trou de ver|Червоточина|虫洞)",label:"Wormhole"},6:{name:"(ore site|mineraliengebiet|site de minerai|Астероидный район|矿石地点)",label:"Ore"},7:{name:"(ghost|Призрачный)",label:"Ghost"}},frigateWormholes:{1:e,2:e,3:e,4:e,5:e,6:e,13:e,30:e,31:e,32:e},drifterWormholes:{1:"S877 - C14 Sentinel",2:"B735 - C15 Barbican",3:"V928 - C16 Vidette",4:"C414 - C17 Conflux",5:"R259 - C18 Redoubt"},incomingWormholes:{1:"K162 - C1/2/3 (unknown)",2:"K162 - C4/5 (dangerous)",3:"K162 - C6 (deadly)",4:"K162 - H",5:"K162 - L",6:"K162 - 0.0",7:"K162 - C12 Thera"}}}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("jquery")):"function"==typeof define&&define.amd?define("summernote",["jquery"],t):t(e.jQuery)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t=function(){function t(e,t,n,o){this.markup=e,this.children=t,this.options=n,this.callback=o}return t.prototype.render=function(t){var n=e(this.markup);if(this.options&&this.options.contents&&n.html(this.options.contents),this.options&&this.options.className&&n.addClass(this.options.className),this.options&&this.options.data&&e.each(this.options.data,function(e,t){n.attr("data-"+e,t)}),this.options&&this.options.click&&n.on("click",this.options.click),this.children){var o=n.find(".note-children-container");this.children.forEach(function(e){e.render(o.length?o:n)})}return this.callback&&this.callback(n,this.options),this.options&&this.options.callback&&this.options.callback(n),t&&t.append(n),n},t}(),n=function(n,o){return function(){var i="object"==typeof arguments[1]?arguments[1]:arguments[0],r=e.isArray(arguments[0])?arguments[0]:[];return i&&i.children&&(r=i.children),new t(n,r,i,o)}},o=n('<div class="note-editor note-frame panel"/>'),i=n('<div class="note-toolbar-wrapper panel-default"><div class="note-toolbar panel-heading" role="toolbar"></div></div>'),r=n('<div class="note-editing-area"/>'),s=n('<textarea class="note-codable" role="textbox" aria-multiline="true"/>'),a=n('<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"/>'),l=n(['<output class="note-status-output" aria-live="polite"/>','<div class="note-statusbar" role="status">',' <div class="note-resizebar" role="seperator" aria-orientation="horizontal" aria-label="Resize">',' <div class="note-icon-bar"/>',' <div class="note-icon-bar"/>',' <div class="note-icon-bar"/>'," </div>","</div>"].join("")),c=n('<div class="note-editor"/>'),u=n([' <output class="note-status-output" aria-live="polite"/>','<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"/>'].join("")),d=n('<div class="note-btn-group btn-group">'),p=n('<ul class="dropdown-menu" role="list">',function(t,n){var o=e.isArray(n.items)?n.items.map(function(e){var t="string"==typeof e?e:e.value||"",o=n.template?n.template(e):e,i="object"==typeof e?e.option:void 0;return'<li role="listitem" aria-label="'+e+'"><a href="#" data-value="'+t+'"'+(void 0!==i?' data-option="'+i+'"':"")+">"+o+"</a></li>"}).join(""):n.items;t.html(o).attr({"aria-label":n.title})}),f=n('<ul class="dropdown-menu note-check" role="list">',function(t,n){var o=e.isArray(n.items)?n.items.map(function(e){var t="string"==typeof e?e:e.value||"",o=n.template?n.template(e):e;return'<li role="listitem" aria-label="'+e+'"><a href="#" data-value="'+t+'">'+m(n.checkClassName)+" "+o+"</a></li>"}).join(""):n.items;t.html(o).attr({"aria-label":n.title})}),h=n('<div class="note-color-palette"/>',function(e,t){for(var n=[],o=0,i=t.colors.length;o<i;o++){for(var r=t.eventName,s=t.colors[o],a=t.colorsName[o],l=[],c=0,u=s.length;c<u;c++){var d=s[c],p=a[c];l.push(['<button type="button" class="note-color-btn"','style="background-color:',d,'" ','data-event="',r,'" ','data-value="',d,'" ','title="',p,'" ','aria-label="',p,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}n.push('<div class="note-color-row">'+l.join("")+"</div>")}e.html(n.join("")),t.tooltip&&e.find(".note-color-btn").tooltip({container:t.container,trigger:"hover",placement:"bottom"})}),m=function(e,t){return"<"+(t=t||"i")+' class="'+e+'"/>'},g={editor:o,toolbar:i,editingArea:r,codable:s,editable:a,statusbar:l,airEditor:c,airEditable:u,buttonGroup:d,dropdown:p,dropdownButtonContents:function(e,t){return e+" "+m(t.icons.caret,"span")},dropdownCheck:f,palette:h,dialog:n('<div class="modal" aria-hidden="false" tabindex="-1" role="dialog"/>',function(e,t){t.fade&&e.addClass("fade"),e.attr({"aria-label":t.title}),e.html(['<div class="modal-dialog">',' <div class="modal-content">',t.title?' <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close" aria-hidden="true">&times;</button> <h4 class="modal-title">'+t.title+"</h4> </div>":"",' <div class="modal-body">'+t.body+"</div>",t.footer?' <div class="modal-footer">'+t.footer+"</div>":""," </div>","</div>"].join(""))}),popover:n(['<div class="note-popover popover in">',' <div class="arrow"/>',' <div class="popover-content note-children-container"/>',"</div>"].join(""),function(e,t){var n=void 0!==t.direction?t.direction:"bottom";e.addClass(n),t.hideArrow&&e.find(".arrow").hide()}),checkbox:n('<div class="checkbox"></div>',function(e,t){e.html([" <label"+(t.id?' for="'+t.id+'"':"")+">",' <input role="checkbox" type="checkbox"'+(t.id?' id="'+t.id+'"':""),t.checked?" checked":"",' aria-checked="'+(t.checked?"true":"false")+'"/>',t.text?t.text:"","</label>"].join(""))}),icon:m,options:{},button:function(e,t){return n('<button type="button" class="note-btn btn btn-default btn-sm" role="button" tabindex="-1">',function(e,t){t&&t.tooltip&&e.attr({title:t.tooltip,"aria-label":t.tooltip}).tooltip({container:t.container,trigger:"hover",placement:"bottom"})})(e,t)},toggleBtn:function(e,t){e.toggleClass("disabled",!t),e.attr("disabled",!t)},toggleBtnActive:function(e,t){e.toggleClass("active",t)},onDialogShown:function(e,t){e.one("shown.bs.modal",t)},onDialogHidden:function(e,t){e.one("hidden.bs.modal",t)},showDialog:function(e){e.modal("show")},hideDialog:function(e){e.modal("hide")},createLayout:function(e,t){var n=(t.airMode?g.airEditor([g.editingArea([g.airEditable()])]):g.editor([g.toolbar(),g.editingArea([g.codable(),g.editable()]),g.statusbar()])).render();return n.insertAfter(e),{note:e,editor:n,toolbar:n.find(".note-toolbar"),editingArea:n.find(".note-editing-area"),editable:n.find(".note-editable"),codable:n.find(".note-codable"),statusbar:n.find(".note-statusbar")}},removeLayout:function(e,t){e.html(t.editable.html()),t.editor.remove(),e.show()}},v=0,y={eq:function(e){return function(t){return e===t}},eq2:function(e,t){return e===t},peq2:function(e){return function(t,n){return t[e]===n[e]}},ok:function(){return!0},fail:function(){return!1},self:function(e){return e},not:function(e){return function(){return!e.apply(e,arguments)}},and:function(e,t){return function(n){return e(n)&&t(n)}},invoke:function(e,t){return function(){return e[t].apply(e,arguments)}},uniqueId:function(e){var t=++v+"";return e?e+t:t},rect2bnd:function(e){var t=$(document);return{top:e.top+t.scrollTop(),left:e.left+t.scrollLeft(),width:e.right-e.left,height:e.bottom-e.top}},invertObject:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t},namespaceToCamel:function(e,t){return(t=t||"")+e.split(".").map(function(e){return e.substring(0,1).toUpperCase()+e.substring(1)}).join("")},debounce:function(e,t,n){var o,i=this;return function(){var r=i,s=arguments,a=n&&!o;clearTimeout(o),o=setTimeout(function(){o=null,n||e.apply(r,s)},t),a&&e.apply(r,s)}}};function b(e){return e[0]}function x(e){return e[e.length-1]}function w(e){return e.slice(1)}function C(t,n){return e.inArray(n,t)}function k(e,t){return-1!==C(e,t)}var T,S={head:b,last:x,initial:function(e){return e.slice(0,e.length-1)},tail:w,prev:function(e,t){var n=C(e,t);return-1===n?null:e[n-1]},next:function(e,t){var n=C(e,t);return-1===n?null:e[n+1]},find:function(e,t){for(var n=0,o=e.length;n<o;n++){var i=e[n];if(t(i))return i}},contains:k,all:function(e,t){for(var n=0,o=e.length;n<o;n++)if(!t(e[n]))return!1;return!0},sum:function(e,t){return t=t||y.self,e.reduce(function(e,n){return e+t(n)},0)},from:function(e){for(var t=[],n=e.length,o=-1;++o<n;)t[o]=e[o];return t},isEmpty:function(e){return!e||!e.length},clusterBy:function(e,t){return e.length?w(e).reduce(function(e,n){var o=x(e);return t(x(o),n)?o[o.length]=n:e[e.length]=[n],e},[[b(e)]]):[]},compact:function(e){for(var t=[],n=0,o=e.length;n<o;n++)e[n]&&t.push(e[n]);return t},unique:function(e){for(var t=[],n=0,o=e.length;n<o;n++)k(t,e[n])||t.push(e[n]);return t}},E="function"==typeof define&&define.amd,A=navigator.userAgent,N=/MSIE|Trident/i.test(A);if(N){var I=/MSIE (\d+[.]\d+)/.exec(A);I&&(T=parseFloat(I[1])),(I=/Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(A))&&(T=parseFloat(I[1]))}var D=/Edge\/\d+/.test(A),L=!!window.CodeMirror;if(!L&&E)if("function"==typeof __webpack_require__)try{require.resolve("codemirror"),L=!0}catch(e){}else if("undefined"!=typeof require)if(void 0!==require.resolve)try{require.resolve("codemirror"),L=!0}catch(e){}else void 0!==require.specified&&(L=require.specified("codemirror"));var R="ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,H=N||D?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input",P={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:N,isEdge:D,isFF:!D&&/firefox/i.test(A),isPhantom:/PhantomJS/i.test(A),isWebkit:!D&&/webkit/i.test(A),isChrome:!D&&/chrome/i.test(A),isSafari:!D&&/safari/i.test(A),browserVersion:T,jqueryVersion:parseFloat(e.fn.jquery),isSupportAmd:E,isSupportTouch:R,hasCodeMirror:L,isFontInstalled:function(t){var n="Comic Sans MS"===t?"Courier New":"Comic Sans MS",o=e("<div>").css({position:"absolute",left:"-9999px",top:"-9999px",fontSize:"200px"}).text("mmmmmmmmmwwwwwww").appendTo(document.body),i=o.css("fontFamily",n).width(),r=o.css("fontFamily",t+","+n).width();return o.remove(),i!==r},isW3CRangeSupport:!!document.createRange,inputEventName:H},j=String.fromCharCode(160);function M(t){return t&&e(t).hasClass("note-editable")}function F(e){return e=e.toUpperCase(),function(t){return t&&t.nodeName.toUpperCase()===e}}function B(e){return e&&3===e.nodeType}function O(e){return e&&/^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT/.test(e.nodeName.toUpperCase())}function z(e){return!M(e)&&e&&/^DIV|^P|^LI|^H[1-7]/.test(e.nodeName.toUpperCase())}var q=F("PRE"),U=F("LI"),_=F("TABLE"),W=F("DATA");function V(e){return!(Q(e)||K(e)||G(e)||z(e)||_(e)||Y(e)||W(e))}function K(e){return e&&/^UL|^OL/.test(e.nodeName.toUpperCase())}var G=F("HR");function X(e){return e&&/^TD|^TH/.test(e.nodeName.toUpperCase())}var Y=F("BLOCKQUOTE");function Q(e){return X(e)||Y(e)||M(e)}var Z=F("A"),J=F("BODY"),ee=P.isMSIE&&P.browserVersion<11?"&nbsp;":"<br>";function te(e){return B(e)?e.nodeValue.length:e?e.childNodes.length:0}function ne(e){var t=te(e);return 0===t||!B(e)&&1===t&&e.innerHTML===ee||!(!S.all(e.childNodes,B)||""!==e.innerHTML)}function oe(e){O(e)||te(e)||(e.innerHTML=ee)}function ie(e,t){for(;e;){if(t(e))return e;if(M(e))break;e=e.parentNode}return null}function re(e,t){t=t||y.fail;var n=[];return ie(e,function(e){return M(e)||n.push(e),t(e)}),n}function se(e,t){t=t||y.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.nextSibling;return n}function ae(e,t){var n=t.nextSibling,o=t.parentNode;return n?o.insertBefore(e,n):o.appendChild(e),e}function le(t,n){return e.each(n,function(e,n){t.appendChild(n)}),t}function ce(e){return 0===e.offset}function ue(e){return e.offset===te(e.node)}function de(e){return ce(e)||ue(e)}function pe(e,t){for(;e&&e!==t;){if(0!==he(e))return!1;e=e.parentNode}return!0}function fe(e,t){if(!t)return!1;for(;e&&e!==t;){if(he(e)!==te(e.parentNode)-1)return!1;e=e.parentNode}return!0}function he(e){for(var t=0;e=e.previousSibling;)t+=1;return t}function me(e){return!!(e&&e.childNodes&&e.childNodes.length)}function ge(e,t){var n,o;if(0===e.offset){if(M(e.node))return null;n=e.node.parentNode,o=he(e.node)}else me(e.node)?o=te(n=e.node.childNodes[e.offset-1]):(n=e.node,o=t?0:e.offset-1);return{node:n,offset:o}}function ve(e,t){var n,o;if(te(e.node)===e.offset){if(M(e.node))return null;n=e.node.parentNode,o=he(e.node)+1}else me(e.node)?(n=e.node.childNodes[e.offset],o=0):(n=e.node,o=t?te(e.node):e.offset+1);return{node:n,offset:o}}function ye(e,t){return e.node===t.node&&e.offset===t.offset}function be(e,t){var n=t&&t.isSkipPaddingBlankHTML,o=t&&t.isNotSplitEdgePoint;if(de(e)&&(B(e.node)||o)){if(ce(e))return e.node;if(ue(e))return e.node.nextSibling}if(B(e.node))return e.node.splitText(e.offset);var i=e.node.childNodes[e.offset],r=ae(e.node.cloneNode(!1),e.node);return le(r,se(i)),n||(oe(e.node),oe(r)),r}function xe(e,t,n){var o=re(t.node,y.eq(e));return o.length?1===o.length?be(t,n):o.reduce(function(e,o){return e===t.node&&(e=be(t,n)),be({node:o,offset:e?he(e):te(o)},n)}):null}function we(e){return document.createElement(e)}function Ce(e,t){if(e&&e.parentNode){if(e.removeNode)return e.removeNode(t);var n=e.parentNode;if(!t){for(var o=[],i=0,r=e.childNodes.length;i<r;i++)o.push(e.childNodes[i]);for(i=0,r=o.length;i<r;i++)n.insertBefore(o[i],e)}n.removeChild(e)}}var ke=F("TEXTAREA");function Te(e,t){var n=ke(e[0])?e.val():e.html();return t?n.replace(/[\n\r]/g,""):n}var Se={NBSP_CHAR:j,ZERO_WIDTH_NBSP_CHAR:"\ufeff",blank:ee,emptyPara:"<p>"+ee+"</p>",makePredByNodeName:F,isEditable:M,isControlSizing:function(t){return t&&e(t).hasClass("note-control-sizing")},isText:B,isElement:function(e){return e&&1===e.nodeType},isVoid:O,isPara:z,isPurePara:function(e){return z(e)&&!U(e)},isHeading:function(e){return e&&/^H[1-7]/.test(e.nodeName.toUpperCase())},isInline:V,isBlock:y.not(V),isBodyInline:function(e){return V(e)&&!ie(e,z)},isBody:J,isParaInline:function(e){return V(e)&&!!ie(e,z)},isPre:q,isList:K,isTable:_,isData:W,isCell:X,isBlockquote:Y,isBodyContainer:Q,isAnchor:Z,isDiv:F("DIV"),isLi:U,isBR:F("BR"),isSpan:F("SPAN"),isB:F("B"),isU:F("U"),isS:F("S"),isI:F("I"),isImg:F("IMG"),isTextarea:ke,isEmpty:ne,isEmptyAnchor:y.and(Z,ne),isClosestSibling:function(e,t){return e.nextSibling===t||e.previousSibling===t},withClosestSiblings:function(e,t){t=t||y.ok;var n=[];return e.previousSibling&&t(e.previousSibling)&&n.push(e.previousSibling),n.push(e),e.nextSibling&&t(e.nextSibling)&&n.push(e.nextSibling),n},nodeLength:te,isLeftEdgePoint:ce,isRightEdgePoint:ue,isEdgePoint:de,isLeftEdgeOf:pe,isRightEdgeOf:fe,isLeftEdgePointOf:function(e,t){return ce(e)&&pe(e.node,t)},isRightEdgePointOf:function(e,t){return ue(e)&&fe(e.node,t)},prevPoint:ge,nextPoint:ve,isSamePoint:ye,isVisiblePoint:function(e){if(B(e.node)||!me(e.node)||ne(e.node))return!0;var t=e.node.childNodes[e.offset-1],n=e.node.childNodes[e.offset];return!(t&&!O(t)||n&&!O(n))},prevPointUntil:function(e,t){for(;e;){if(t(e))return e;e=ge(e)}return null},nextPointUntil:function(e,t){for(;e;){if(t(e))return e;e=ve(e)}return null},isCharPoint:function(e){if(!B(e.node))return!1;var t=e.node.nodeValue.charAt(e.offset-1);return t&&" "!==t&&t!==j},walkPoint:function(e,t,n,o){for(var i=e;i&&(n(i),!ye(i,t));)i=ve(i,o&&e.node!==i.node&&t.node!==i.node)},ancestor:ie,singleChildAncestor:function(e,t){for(e=e.parentNode;e&&1===te(e);){if(t(e))return e;if(M(e))break;e=e.parentNode}return null},listAncestor:re,lastAncestor:function(e,t){var n=re(e);return S.last(n.filter(t))},listNext:se,listPrev:function(e,t){t=t||y.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.previousSibling;return n},listDescendant:function(e,t){var n=[];return t=t||y.ok,function o(i){e!==i&&t(i)&&n.push(i);for(var r=0,s=i.childNodes.length;r<s;r++)o(i.childNodes[r])}(e),n},commonAncestor:function(t,n){for(var o=re(t),i=n;i;i=i.parentNode)if(e.inArray(i,o)>-1)return i;return null},wrap:function(t,n){var o=t.parentNode,i=e("<"+n+">")[0];return o.insertBefore(i,t),i.appendChild(t),i},insertAfter:ae,appendChildNodes:le,position:he,hasChildren:me,makeOffsetPath:function(e,t){return re(t,y.eq(e)).map(he).reverse()},fromOffsetPath:function(e,t){for(var n=e,o=0,i=t.length;o<i;o++)n=n.childNodes.length<=t[o]?n.childNodes[n.childNodes.length-1]:n.childNodes[t[o]];return n},splitTree:xe,splitPoint:function(e,t){var n,o,i=t?z:Q,r=re(e.node,i),s=S.last(r)||e.node;i(s)?(n=r[r.length-2],o=s):o=(n=s).parentNode;var a=n&&xe(n,e,{isSkipPaddingBlankHTML:t,isNotSplitEdgePoint:t});return a||o!==e.node||(a=e.node.childNodes[e.offset]),{rightNode:a,container:o}},create:we,createText:function(e){return document.createTextNode(e)},remove:Ce,removeWhile:function(e,t){for(;e&&!M(e)&&t(e);){var n=e.parentNode;Ce(e),e=n}},replace:function(e,t){if(e.nodeName.toUpperCase()===t.toUpperCase())return e;var n=we(t);return e.style.cssText&&(n.style.cssText=e.style.cssText),le(n,S.from(e.childNodes)),ae(n,e),Ce(e),n},html:function(t,n){var o=Te(t);return n&&(o=o.replace(/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g,function(e,t,n){n=n.toUpperCase();var o=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(n)&&!!t,i=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(n);return e+(o||i?"\n":"")}),o=e.trim(o)),o},value:Te,posFromPlaceholder:function(t){var n=e(t),o=n.offset(),i=n.outerHeight(!0);return{left:o.left,top:o.top+i}},attachEvents:function(e,t){Object.keys(t).forEach(function(n){e.on(n,t[n])})},detachEvents:function(e,t){Object.keys(t).forEach(function(n){e.off(n,t[n])})},isCustomStyleTag:function(e){return e&&!B(e)&&S.contains(e.classList,"note-styletag")}};e.summernote=e.summernote||{lang:{}},e.extend(e.summernote.lang,{"en-US":{font:{bold:"Bold",italic:"Italic",underline:"Underline",clear:"Remove Font Style",height:"Line Height",name:"Font Family",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript",size:"Font Size"},image:{image:"Picture",insert:"Insert Image",resizeFull:"Resize Full",resizeHalf:"Resize Half",resizeQuarter:"Resize Quarter",floatLeft:"Float Left",floatRight:"Float Right",floatNone:"Float None",shapeRounded:"Shape: Rounded",shapeCircle:"Shape: Circle",shapeThumbnail:"Shape: Thumbnail",shapeNone:"Shape: None",dragImageHere:"Drag image or text here",dropImage:"Drop image or Text",selectFromFiles:"Select from files",maximumFileSize:"Maximum file size",maximumFileSizeError:"Maximum file size exceeded.",url:"Image URL",remove:"Remove Image",original:"Original"},video:{video:"Video",videoLink:"Video Link",insert:"Insert Video",url:"Video URL",providers:"(YouTube, Vimeo, Vine, Instagram, DailyMotion or Youku)"},link:{link:"Link",insert:"Insert Link",unlink:"Unlink",edit:"Edit",textToDisplay:"Text to display",url:"To what URL should this link go?",openInNewWindow:"Open in new window"},table:{table:"Table",addRowAbove:"Add row above",addRowBelow:"Add row below",addColLeft:"Add column left",addColRight:"Add column right",delRow:"Delete row",delCol:"Delete column",delTable:"Delete table"},hr:{insert:"Insert Horizontal Rule"},style:{style:"Style",p:"Normal",blockquote:"Quote",pre:"Code",h1:"Header 1",h2:"Header 2",h3:"Header 3",h4:"Header 4",h5:"Header 5",h6:"Header 6"},lists:{unordered:"Unordered list",ordered:"Ordered list"},options:{help:"Help",fullscreen:"Full Screen",codeview:"Code View"},paragraph:{paragraph:"Paragraph",outdent:"Outdent",indent:"Indent",left:"Align left",center:"Align center",right:"Align right",justify:"Justify full"},color:{recent:"Recent Color",more:"More Color",background:"Background Color",foreground:"Foreground Color",transparent:"Transparent",setTransparent:"Set transparent",reset:"Reset",resetToDefault:"Reset to default"},shortcut:{shortcuts:"Keyboard shortcuts",close:"Close",textFormatting:"Text formatting",action:"Action",paragraphFormatting:"Paragraph formatting",documentStyle:"Document Style",extraKeys:"Extra keys"},help:{insertParagraph:"Insert Paragraph",undo:"Undoes the last command",redo:"Redoes the last command",tab:"Tab",untab:"Untab",bold:"Set a bold style",italic:"Set a italic style",underline:"Set a underline style",strikethrough:"Set a strikethrough style",removeFormat:"Clean a style",justifyLeft:"Set left align",justifyCenter:"Set center align",justifyRight:"Set right align",justifyFull:"Set full align",insertUnorderedList:"Toggle unordered list",insertOrderedList:"Toggle ordered list",outdent:"Outdent on current paragraph",indent:"Indent on current paragraph",formatPara:"Change current block's format as a paragraph(P tag)",formatH1:"Change current block's format as H1",formatH2:"Change current block's format as H2",formatH3:"Change current block's format as H3",formatH4:"Change current block's format as H4",formatH5:"Change current block's format as H5",formatH6:"Change current block's format as H6",insertHorizontalRule:"Insert horizontal rule","linkDialog.show":"Show Link Dialog"},history:{undo:"Undo",redo:"Redo"},specialChar:{specialChar:"SPECIAL CHARACTERS",select:"Select Special characters"}}});var Ee={BACKSPACE:8,TAB:9,ENTER:13,SPACE:32,DELETE:46,LEFT:37,UP:38,RIGHT:39,DOWN:40,NUM0:48,NUM1:49,NUM2:50,NUM3:51,NUM4:52,NUM5:53,NUM6:54,NUM7:55,NUM8:56,B:66,E:69,I:73,J:74,K:75,L:76,R:82,S:83,U:85,V:86,Y:89,Z:90,SLASH:191,LEFTBRACKET:219,BACKSLASH:220,RIGHTBRACKET:221},Ae={isEdit:function(e){return S.contains([Ee.BACKSPACE,Ee.TAB,Ee.ENTER,Ee.SPACE,Ee.DELETE],e)},isMove:function(e){return S.contains([Ee.LEFT,Ee.UP,Ee.RIGHT,Ee.DOWN],e)},nameFromCode:y.invertObject(Ee),code:Ee};function Ne(e,t){var n,o,i=e.parentElement(),r=document.body.createTextRange(),s=S.from(i.childNodes);for(n=0;n<s.length;n++)if(!Se.isText(s[n])){if(r.moveToElementText(s[n]),r.compareEndPoints("StartToStart",e)>=0)break;o=s[n]}if(0!==n&&Se.isText(s[n-1])){var a=document.body.createTextRange(),l=null;a.moveToElementText(o||i),a.collapse(!o),l=o?o.nextSibling:i.firstChild;var c=e.duplicate();c.setEndPoint("StartToStart",a);for(var u=c.text.replace(/[\r\n]/g,"").length;u>l.nodeValue.length&&l.nextSibling;)u-=l.nodeValue.length,l=l.nextSibling;l.nodeValue,t&&l.nextSibling&&Se.isText(l.nextSibling)&&u===l.nodeValue.length&&(u-=l.nodeValue.length,l=l.nextSibling),i=l,n=u}return{cont:i,offset:n}}function Ie(e){var t=function(e,n){var o,i;if(Se.isText(e)){var r=Se.listPrev(e,y.not(Se.isText)),s=S.last(r).previousSibling;o=s||e.parentNode,n+=S.sum(S.tail(r),Se.nodeLength),i=!s}else{if(o=e.childNodes[n]||e,Se.isText(o))return t(o,0);n=0,i=!1}return{node:o,collapseToStart:i,offset:n}},n=document.body.createTextRange(),o=t(e.node,e.offset);return n.moveToElementText(o.node),n.collapse(o.collapseToStart),n.moveStart("character",o.offset),n}var De=function(){function t(e,t,n,o){this.sc=e,this.so=t,this.ec=n,this.eo=o,this.isOnEditable=this.makeIsOn(Se.isEditable),this.isOnList=this.makeIsOn(Se.isList),this.isOnAnchor=this.makeIsOn(Se.isAnchor),this.isOnCell=this.makeIsOn(Se.isCell),this.isOnData=this.makeIsOn(Se.isData)}return t.prototype.nativeRange=function(){if(P.isW3CRangeSupport){var e=document.createRange();return e.setStart(this.sc,this.so),e.setEnd(this.ec,this.eo),e}var t=Ie({node:this.sc,offset:this.so});return t.setEndPoint("EndToEnd",Ie({node:this.ec,offset:this.eo})),t},t.prototype.getPoints=function(){return{sc:this.sc,so:this.so,ec:this.ec,eo:this.eo}},t.prototype.getStartPoint=function(){return{node:this.sc,offset:this.so}},t.prototype.getEndPoint=function(){return{node:this.ec,offset:this.eo}},t.prototype.select=function(){var e=this.nativeRange();if(P.isW3CRangeSupport){var t=document.getSelection();t.rangeCount>0&&t.removeAllRanges(),t.addRange(e)}else e.select();return this},t.prototype.scrollIntoView=function(t){var n=e(t).height();return t.scrollTop+n<this.sc.offsetTop&&(t.scrollTop+=Math.abs(t.scrollTop+n-this.sc.offsetTop)),this},t.prototype.normalize=function(){var e=function(e,t){if(Se.isVisiblePoint(e)&&!Se.isEdgePoint(e)||Se.isVisiblePoint(e)&&Se.isRightEdgePoint(e)&&!t||Se.isVisiblePoint(e)&&Se.isLeftEdgePoint(e)&&t||Se.isVisiblePoint(e)&&Se.isBlock(e.node)&&Se.isEmpty(e.node))return e;var n=Se.ancestor(e.node,Se.isBlock);if((Se.isLeftEdgePointOf(e,n)||Se.isVoid(Se.prevPoint(e).node))&&!t||(Se.isRightEdgePointOf(e,n)||Se.isVoid(Se.nextPoint(e).node))&&t){if(Se.isVisiblePoint(e))return e;t=!t}return(t?Se.nextPointUntil(Se.nextPoint(e),Se.isVisiblePoint):Se.prevPointUntil(Se.prevPoint(e),Se.isVisiblePoint))||e},n=e(this.getEndPoint(),!1),o=this.isCollapsed()?n:e(this.getStartPoint(),!0);return new t(o.node,o.offset,n.node,n.offset)},t.prototype.nodes=function(e,t){e=e||y.ok;var n=t&&t.includeAncestor,o=t&&t.fullyContains,i=this.getStartPoint(),r=this.getEndPoint(),s=[],a=[];return Se.walkPoint(i,r,function(t){var i;Se.isEditable(t.node)||(o?(Se.isLeftEdgePoint(t)&&a.push(t.node),Se.isRightEdgePoint(t)&&S.contains(a,t.node)&&(i=t.node)):i=n?Se.ancestor(t.node,e):t.node,i&&e(i)&&s.push(i))},!0),S.unique(s)},t.prototype.commonAncestor=function(){return Se.commonAncestor(this.sc,this.ec)},t.prototype.expand=function(e){var n=Se.ancestor(this.sc,e),o=Se.ancestor(this.ec,e);if(!n&&!o)return new t(this.sc,this.so,this.ec,this.eo);var i=this.getPoints();return n&&(i.sc=n,i.so=0),o&&(i.ec=o,i.eo=Se.nodeLength(o)),new t(i.sc,i.so,i.ec,i.eo)},t.prototype.collapse=function(e){return e?new t(this.sc,this.so,this.sc,this.so):new t(this.ec,this.eo,this.ec,this.eo)},t.prototype.splitText=function(){var e=this.sc===this.ec,n=this.getPoints();return Se.isText(this.ec)&&!Se.isEdgePoint(this.getEndPoint())&&this.ec.splitText(this.eo),Se.isText(this.sc)&&!Se.isEdgePoint(this.getStartPoint())&&(n.sc=this.sc.splitText(this.so),n.so=0,e&&(n.ec=n.sc,n.eo=this.eo-this.so)),new t(n.sc,n.so,n.ec,n.eo)},t.prototype.deleteContents=function(){if(this.isCollapsed())return this;var n=this.splitText(),o=n.nodes(null,{fullyContains:!0}),i=Se.prevPointUntil(n.getStartPoint(),function(e){return!S.contains(o,e.node)}),r=[];return e.each(o,function(e,t){var n=t.parentNode;i.node!==n&&1===Se.nodeLength(n)&&r.push(n),Se.remove(t,!1)}),e.each(r,function(e,t){Se.remove(t,!1)}),new t(i.node,i.offset,i.node,i.offset).normalize()},t.prototype.makeIsOn=function(e){return function(){var t=Se.ancestor(this.sc,e);return!!t&&t===Se.ancestor(this.ec,e)}},t.prototype.isLeftEdgeOf=function(e){if(!Se.isLeftEdgePoint(this.getStartPoint()))return!1;var t=Se.ancestor(this.sc,e);return t&&Se.isLeftEdgeOf(this.sc,t)},t.prototype.isCollapsed=function(){return this.sc===this.ec&&this.so===this.eo},t.prototype.wrapBodyInlineWithPara=function(){if(Se.isBodyContainer(this.sc)&&Se.isEmpty(this.sc))return this.sc.innerHTML=Se.emptyPara,new t(this.sc.firstChild,0,this.sc.firstChild,0);var e,n=this.normalize();if(Se.isParaInline(this.sc)||Se.isPara(this.sc))return n;if(Se.isInline(n.sc)){var o=Se.listAncestor(n.sc,y.not(Se.isInline));e=S.last(o),Se.isInline(e)||(e=o[o.length-2]||n.sc.childNodes[n.so])}else e=n.sc.childNodes[n.so>0?n.so-1:0];var i=Se.listPrev(e,Se.isParaInline).reverse();if((i=i.concat(Se.listNext(e.nextSibling,Se.isParaInline))).length){var r=Se.wrap(S.head(i),"p");Se.appendChildNodes(r,S.tail(i))}return this.normalize()},t.prototype.insertNode=function(e){var t=this.wrapBodyInlineWithPara().deleteContents(),n=Se.splitPoint(t.getStartPoint(),Se.isInline(e));return n.rightNode?n.rightNode.parentNode.insertBefore(e,n.rightNode):n.container.appendChild(e),e},t.prototype.pasteHTML=function(t){var n=e("<div></div>").html(t)[0],o=S.from(n.childNodes),i=this.wrapBodyInlineWithPara().deleteContents();return o.reverse().map(function(e){return i.insertNode(e)}).reverse()},t.prototype.toString=function(){var e=this.nativeRange();return P.isW3CRangeSupport?e.toString():e.text},t.prototype.getWordRange=function(e){var n=this.getEndPoint();if(!Se.isCharPoint(n))return this;var o=Se.prevPointUntil(n,function(e){return!Se.isCharPoint(e)});return e&&(n=Se.nextPointUntil(n,function(e){return!Se.isCharPoint(e)})),new t(o.node,o.offset,n.node,n.offset)},t.prototype.bookmark=function(e){return{s:{path:Se.makeOffsetPath(e,this.sc),offset:this.so},e:{path:Se.makeOffsetPath(e,this.ec),offset:this.eo}}},t.prototype.paraBookmark=function(e){return{s:{path:S.tail(Se.makeOffsetPath(S.head(e),this.sc)),offset:this.so},e:{path:S.tail(Se.makeOffsetPath(S.last(e),this.ec)),offset:this.eo}}},t.prototype.getClientRects=function(){return this.nativeRange().getClientRects()},t}(),Le={create:function(e,t,n,o){if(4===arguments.length)return new De(e,t,n,o);if(2===arguments.length)return new De(e,t,n=e,o=t);var i=this.createFromSelection();return i||1!==arguments.length?i:(i=this.createFromNode(arguments[0])).collapse(Se.emptyPara===arguments[0].innerHTML)},createFromSelection:function(){var e,t,n,o;if(P.isW3CRangeSupport){var i=document.getSelection();if(!i||0===i.rangeCount)return null;if(Se.isBody(i.anchorNode))return null;var r=i.getRangeAt(0);e=r.startContainer,t=r.startOffset,n=r.endContainer,o=r.endOffset}else{var s=document.selection.createRange(),a=s.duplicate();a.collapse(!1);var l=s;l.collapse(!0);var c=Ne(l,!0),u=Ne(a,!1);Se.isText(c.node)&&Se.isLeftEdgePoint(c)&&Se.isTextNode(u.node)&&Se.isRightEdgePoint(u)&&u.node.nextSibling===c.node&&(c=u),e=c.cont,t=c.offset,n=u.cont,o=u.offset}return new De(e,t,n,o)},createFromNode:function(e){var t=e,n=0,o=e,i=Se.nodeLength(o);return Se.isVoid(t)&&(n=Se.listPrev(t).length-1,t=t.parentNode),Se.isBR(o)?(i=Se.listPrev(o).length-1,o=o.parentNode):Se.isVoid(o)&&(i=Se.listPrev(o).length,o=o.parentNode),this.create(t,n,o,i)},createFromNodeBefore:function(e){return this.createFromNode(e).collapse(!0)},createFromNodeAfter:function(e){return this.createFromNode(e).collapse()},createFromBookmark:function(e,t){var n=Se.fromOffsetPath(e,t.s.path),o=t.s.offset,i=Se.fromOffsetPath(e,t.e.path),r=t.e.offset;return new De(n,o,i,r)},createFromParaBookmark:function(e,t){var n=e.s.offset,o=e.e.offset,i=Se.fromOffsetPath(S.head(t),e.s.path),r=Se.fromOffsetPath(S.last(t),e.e.path);return new De(i,n,r,o)}},$e=function(){function e(e){this.stack=[],this.stackOffset=-1,this.$editable=e,this.editable=e[0]}return e.prototype.makeSnapshot=function(){var e=Le.create(this.editable);return{contents:this.$editable.html(),bookmark:e?e.bookmark(this.editable):{s:{path:[],offset:0},e:{path:[],offset:0}}}},e.prototype.applySnapshot=function(e){null!==e.contents&&this.$editable.html(e.contents),null!==e.bookmark&&Le.createFromBookmark(this.editable,e.bookmark).select()},e.prototype.rewind=function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset=0,this.applySnapshot(this.stack[this.stackOffset])},e.prototype.reset=function(){this.stack=[],this.stackOffset=-1,this.$editable.html(""),this.recordUndo()},e.prototype.undo=function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset>0&&(this.stackOffset--,this.applySnapshot(this.stack[this.stackOffset]))},e.prototype.redo=function(){this.stack.length-1>this.stackOffset&&(this.stackOffset++,this.applySnapshot(this.stack[this.stackOffset]))},e.prototype.recordUndo=function(){this.stackOffset++,this.stack.length>this.stackOffset&&(this.stack=this.stack.slice(0,this.stackOffset)),this.stack.push(this.makeSnapshot())},e}(),Re=function(){function t(){}return t.prototype.jQueryCSS=function(t,n){if(P.jqueryVersion<1.9){var o={};return e.each(n,function(e,n){o[n]=t.css(n)}),o}return t.css(n)},t.prototype.fromNode=function(e){var t=this.jQueryCSS(e,["font-family","font-size","text-align","list-style-type","line-height"])||{};return t["font-size"]=parseInt(t["font-size"],10),t},t.prototype.stylePara=function(t,n){e.each(t.nodes(Se.isPara,{includeAncestor:!0}),function(t,o){e(o).css(n)})},t.prototype.styleNodes=function(t,n){t=t.splitText();var o=n&&n.nodeName||"SPAN",i=!(!n||!n.expandClosestSibling),r=!(!n||!n.onlyPartialContains);if(t.isCollapsed())return[t.insertNode(Se.create(o))];var s=Se.makePredByNodeName(o),a=t.nodes(Se.isText,{fullyContains:!0}).map(function(e){return Se.singleChildAncestor(e,s)||Se.wrap(e,o)});if(i){if(r){var l=t.nodes();s=y.and(s,function(e){return S.contains(l,e)})}return a.map(function(t){var n=Se.withClosestSiblings(t,s),o=S.head(n),i=S.tail(n);return e.each(i,function(e,t){Se.appendChildNodes(o,t.childNodes),Se.remove(t)}),S.head(n)})}return a},t.prototype.current=function(t){var n=e(Se.isElement(t.sc)?t.sc:t.sc.parentNode),o=this.fromNode(n);try{o=e.extend(o,{"font-bold":document.queryCommandState("bold")?"bold":"normal","font-italic":document.queryCommandState("italic")?"italic":"normal","font-underline":document.queryCommandState("underline")?"underline":"normal","font-subscript":document.queryCommandState("subscript")?"subscript":"normal","font-superscript":document.queryCommandState("superscript")?"superscript":"normal","font-strikethrough":document.queryCommandState("strikethrough")?"strikethrough":"normal","font-family":document.queryCommandValue("fontname")||o["font-family"]})}catch(e){}if(t.isOnList()){var i=e.inArray(o["list-style-type"],["circle","disc","disc-leading-zero","square"])>-1;o["list-style"]=i?"unordered":"ordered"}else o["list-style"]="none";var r=Se.ancestor(t.sc,Se.isPara);if(r&&r.style["line-height"])o["line-height"]=r.style.lineHeight;else{var s=parseInt(o["line-height"],10)/parseInt(o["font-size"],10);o["line-height"]=s.toFixed(1)}return o.anchor=t.isOnAnchor()&&Se.ancestor(t.sc,Se.isAnchor),o.ancestors=Se.listAncestor(t.sc,Se.isEditable),o.range=t,o},t}(),He=function(){function t(){}return t.prototype.insertOrderedList=function(e){this.toggleList("OL",e)},t.prototype.insertUnorderedList=function(e){this.toggleList("UL",e)},t.prototype.indent=function(t){var n=this,o=Le.create(t).wrapBodyInlineWithPara(),i=o.nodes(Se.isPara,{includeAncestor:!0}),r=S.clusterBy(i,y.peq2("parentNode"));e.each(r,function(t,o){var i=S.head(o);Se.isLi(i)?n.wrapList(o,i.parentNode.nodeName):e.each(o,function(t,n){e(n).css("marginLeft",function(e,t){return(parseInt(t,10)||0)+25})})}),o.select()},t.prototype.outdent=function(t){var n=this,o=Le.create(t).wrapBodyInlineWithPara(),i=o.nodes(Se.isPara,{includeAncestor:!0}),r=S.clusterBy(i,y.peq2("parentNode"));e.each(r,function(t,o){var i=S.head(o);Se.isLi(i)?n.releaseList([o]):e.each(o,function(t,n){e(n).css("marginLeft",function(e,t){return(t=parseInt(t,10)||0)>25?t-25:""})})}),o.select()},t.prototype.toggleList=function(t,n){var o=this,i=Le.create(n).wrapBodyInlineWithPara(),r=i.nodes(Se.isPara,{includeAncestor:!0}),s=i.paraBookmark(r),a=S.clusterBy(r,y.peq2("parentNode"));if(S.find(r,Se.isPurePara)){var l=[];e.each(a,function(e,n){l=l.concat(o.wrapList(n,t))}),r=l}else{var c=i.nodes(Se.isList,{includeAncestor:!0}).filter(function(n){return!e.nodeName(n,t)});c.length?e.each(c,function(e,n){Se.replace(n,t)}):r=this.releaseList(a,!0)}Le.createFromParaBookmark(s,r).select()},t.prototype.wrapList=function(e,t){var n=S.head(e),o=S.last(e),i=Se.isList(n.previousSibling)&&n.previousSibling,r=Se.isList(o.nextSibling)&&o.nextSibling,s=i||Se.insertAfter(Se.create(t||"UL"),o);return e=e.map(function(e){return Se.isPurePara(e)?Se.replace(e,"LI"):e}),Se.appendChildNodes(s,e),r&&(Se.appendChildNodes(s,S.from(r.childNodes)),Se.remove(r)),e},t.prototype.releaseList=function(t,n){var o=[];return e.each(t,function(t,i){var r=S.head(i),s=S.last(i),a=n?Se.lastAncestor(r,Se.isList):r.parentNode,l=a.childNodes.length>1?Se.splitTree(a,{node:s.parentNode,offset:Se.position(s)+1},{isSkipPaddingBlankHTML:!0}):null,c=Se.splitTree(a,{node:r.parentNode,offset:Se.position(r)},{isSkipPaddingBlankHTML:!0});i=n?Se.listDescendant(c,Se.isLi):S.from(c.childNodes).filter(Se.isLi),!n&&Se.isList(a.parentNode)||(i=i.map(function(e){return Se.replace(e,"P")})),e.each(S.from(i).reverse(),function(e,t){Se.insertAfter(t,a)});var u=S.compact([a,c,l]);e.each(u,function(t,n){var o=[n].concat(Se.listDescendant(n,Se.isList));e.each(o.reverse(),function(e,t){Se.nodeLength(t)||Se.remove(t,!0)})}),o=o.concat(i)}),o},t}(),Pe=function(){function t(){this.bullet=new He}return t.prototype.insertTab=function(e,t){var n=Se.createText(new Array(t+1).join(Se.NBSP_CHAR));(e=e.deleteContents()).insertNode(n,!0),(e=Le.create(n,t)).select()},t.prototype.insertParagraph=function(t){var n=Le.create(t);n=(n=n.deleteContents()).wrapBodyInlineWithPara();var o,i=Se.ancestor(n.sc,Se.isPara);if(i){if(Se.isEmpty(i)&&Se.isLi(i))return void this.bullet.toggleList(i.parentNode.nodeName);if(Se.isEmpty(i)&&Se.isPara(i)&&Se.isBlockquote(i.parentNode))Se.insertAfter(i,i.parentNode),o=i;else{o=Se.splitTree(i,n.getStartPoint());var r=Se.listDescendant(i,Se.isEmptyAnchor);r=r.concat(Se.listDescendant(o,Se.isEmptyAnchor)),e.each(r,function(e,t){Se.remove(t)}),(Se.isHeading(o)||Se.isPre(o)||Se.isCustomStyleTag(o))&&Se.isEmpty(o)&&(o=Se.replace(o,"p"))}}else{var s=n.sc.childNodes[n.so];o=e(Se.emptyPara)[0],s?n.sc.insertBefore(o,s):n.sc.appendChild(o)}Le.create(o,0).normalize().select().scrollIntoView(t)},t}(),je=function(e,t,n,o){var i={colPos:0,rowPos:0},r=[],s=[];function a(e,t,n,o,i,s,a){var l={baseRow:n,baseCell:o,isRowSpan:i,isColSpan:s,isVirtual:a};r[e]||(r[e]=[]),r[e][t]=l}function l(e,t){if(!r[e])return t;if(!r[e][t])return t;for(var n=t;r[e][n];)if(n++,!r[e][n])return n}function c(e,t){var n=l(e.rowIndex,t.cellIndex),o=t.colSpan>1,r=t.rowSpan>1,s=e.rowIndex===i.rowPos&&t.cellIndex===i.colPos;a(e.rowIndex,n,e,t,r,o,!1);var c=t.attributes.rowSpan?parseInt(t.attributes.rowSpan.value,10):0;if(c>1)for(var d=1;d<c;d++){var p=e.rowIndex+d;u(p,n,t,s),a(p,n,e,t,!0,o,!0)}var f=t.attributes.colSpan?parseInt(t.attributes.colSpan.value,10):0;if(f>1)for(var h=1;h<f;h++){var m=l(e.rowIndex,n+h);u(e.rowIndex,m,t,s),a(e.rowIndex,m,e,t,r,!0,!0)}}function u(e,t,n,o){e===i.rowPos&&i.colPos>=n.cellIndex&&n.cellIndex<=t&&!o&&i.colPos++}function d(e){switch(t){case je.where.Column:if(e.isColSpan)return je.resultAction.SubtractSpanCount;break;case je.where.Row:if(!e.isVirtual&&e.isRowSpan)return je.resultAction.AddCell;if(e.isRowSpan)return je.resultAction.SubtractSpanCount}return je.resultAction.RemoveCell}function p(e){switch(t){case je.where.Column:if(e.isColSpan)return je.resultAction.SumSpanCount;if(e.isRowSpan&&e.isVirtual)return je.resultAction.Ignore;break;case je.where.Row:if(e.isRowSpan)return je.resultAction.SumSpanCount;if(e.isColSpan&&e.isVirtual)return je.resultAction.Ignore}return je.resultAction.AddCell}this.getActionList=function(){for(var e,o,a,l=t===je.where.Row?i.rowPos:-1,c=t===je.where.Column?i.colPos:-1,u=0,f=!0;f;){var h=l>=0?l:u,m=c>=0?c:u,g=r[h];if(!g)return f=!1,s;var v=g[m];if(!v)return f=!1,s;var y=je.resultAction.Ignore;switch(n){case je.requestAction.Add:y=p(v);break;case je.requestAction.Delete:y=d(v)}s.push((e=y,o=h,a=m,{baseCell:v.baseCell,action:e,virtualTable:{rowIndex:o,cellIndex:a}})),u++}return s},e&&e.tagName&&("td"===e.tagName.toLowerCase()||"th"===e.tagName.toLowerCase())?(i.colPos=e.cellIndex,e.parentElement&&e.parentElement.tagName&&"tr"===e.parentElement.tagName.toLowerCase()?i.rowPos=e.parentElement.rowIndex:console.error("Impossible to identify start Row point.",e)):console.error("Impossible to identify start Cell point.",e),function(){for(var e=o.rows,t=0;t<e.length;t++)for(var n=e[t].cells,i=0;i<n.length;i++)c(e[t],n[i])}()};je.where={Row:0,Column:1},je.requestAction={Add:0,Delete:1},je.resultAction={Ignore:0,SubtractSpanCount:1,RemoveCell:2,AddCell:3,SumSpanCount:4};var Me,Fe=function(){function t(){}return t.prototype.tab=function(e,t){var n=Se.ancestor(e.commonAncestor(),Se.isCell),o=Se.ancestor(n,Se.isTable),i=Se.listDescendant(o,Se.isCell),r=S[t?"prev":"next"](i,n);r&&Le.create(r,0).select()},t.prototype.addRow=function(t,n){for(var o=Se.ancestor(t.commonAncestor(),Se.isCell),i=e(o).closest("tr"),r=this.recoverAttributes(i),s=e("<tr"+r+"></tr>"),a=new je(o,je.where.Row,je.requestAction.Add,e(i).closest("table")[0]).getActionList(),l=0;l<a.length;l++){var c=a[l],u=this.recoverAttributes(c.baseCell);switch(c.action){case je.resultAction.AddCell:s.append("<td"+u+">"+Se.blank+"</td>");break;case je.resultAction.SumSpanCount:if("top"===n&&(c.baseCell.parent?c.baseCell.closest("tr").rowIndex:0)<=i[0].rowIndex){var d=e("<div></div>").append(e("<td"+u+">"+Se.blank+"</td>").removeAttr("rowspan")).html();s.append(d);break}var p=parseInt(c.baseCell.rowSpan,10);p++,c.baseCell.setAttribute("rowSpan",p)}}if("top"===n)i.before(s);else{if(o.rowSpan>1){var f=i[0].rowIndex+(o.rowSpan-2);return void e(e(i).parent().find("tr")[f]).after(e(s))}i.after(s)}},t.prototype.addCol=function(t,n){var o=Se.ancestor(t.commonAncestor(),Se.isCell),i=e(o).closest("tr");e(i).siblings().push(i);for(var r=new je(o,je.where.Column,je.requestAction.Add,e(i).closest("table")[0]).getActionList(),s=0;s<r.length;s++){var a=r[s],l=this.recoverAttributes(a.baseCell);switch(a.action){case je.resultAction.AddCell:"right"===n?e(a.baseCell).after("<td"+l+">"+Se.blank+"</td>"):e(a.baseCell).before("<td"+l+">"+Se.blank+"</td>");break;case je.resultAction.SumSpanCount:if("right"===n){var c=parseInt(a.baseCell.colSpan,10);c++,a.baseCell.setAttribute("colSpan",c)}else e(a.baseCell).before("<td"+l+">"+Se.blank+"</td>")}}},t.prototype.recoverAttributes=function(e){var t="";if(!e)return t;for(var n=e.attributes||[],o=0;o<n.length;o++)"id"!==n[o].name.toLowerCase()&&n[o].specified&&(t+=" "+n[o].name+"='"+n[o].value+"'");return t},t.prototype.deleteRow=function(t){for(var n=Se.ancestor(t.commonAncestor(),Se.isCell),o=e(n).closest("tr"),i=o.children("td, th").index(e(n)),r=o[0].rowIndex,s=new je(n,je.where.Row,je.requestAction.Delete,e(o).closest("table")[0]).getActionList(),a=0;a<s.length;a++)if(s[a]){var l=s[a].baseCell,c=s[a].virtualTable,u=l.rowSpan&&l.rowSpan>1,d=u?parseInt(l.rowSpan,10):0;switch(s[a].action){case je.resultAction.Ignore:continue;case je.resultAction.AddCell:var p=o.next("tr")[0];if(!p)continue;var f=o[0].cells[i];u&&(d>2?(d--,p.insertBefore(f,p.cells[i]),p.cells[i].setAttribute("rowSpan",d),p.cells[i].innerHTML=""):2===d&&(p.insertBefore(f,p.cells[i]),p.cells[i].removeAttribute("rowSpan"),p.cells[i].innerHTML=""));continue;case je.resultAction.SubtractSpanCount:u&&(d>2?(d--,l.setAttribute("rowSpan",d),c.rowIndex!==r&&l.cellIndex===i&&(l.innerHTML="")):2===d&&(l.removeAttribute("rowSpan"),c.rowIndex!==r&&l.cellIndex===i&&(l.innerHTML="")));continue;case je.resultAction.RemoveCell:continue}}o.remove()},t.prototype.deleteCol=function(t){for(var n=Se.ancestor(t.commonAncestor(),Se.isCell),o=e(n).closest("tr"),i=o.children("td, th").index(e(n)),r=new je(n,je.where.Column,je.requestAction.Delete,e(o).closest("table")[0]).getActionList(),s=0;s<r.length;s++)if(r[s])switch(r[s].action){case je.resultAction.Ignore:continue;case je.resultAction.SubtractSpanCount:var a=r[s].baseCell;if(a.colSpan&&a.colSpan>1){var l=a.colSpan?parseInt(a.colSpan,10):0;l>2?(l--,a.setAttribute("colSpan",l),a.cellIndex===i&&(a.innerHTML="")):2===l&&(a.removeAttribute("colSpan"),a.cellIndex===i&&(a.innerHTML=""))}continue;case je.resultAction.RemoveCell:Se.remove(r[s].baseCell,!0);continue}},t.prototype.createTable=function(t,n,o){for(var i,r=[],s=0;s<t;s++)r.push("<td>"+Se.blank+"</td>");i=r.join("");for(var a,l=[],c=0;c<n;c++)l.push("<tr>"+i+"</tr>");a=l.join("");var u=e("<table>"+a+"</table>");return o&&o.tableClassName&&u.addClass(o.tableClassName),u[0]},t.prototype.deleteTable=function(t){var n=Se.ancestor(t.commonAncestor(),Se.isCell);e(n).closest("table").remove()},t}(),Be=function(){function t(t){var n=this;this.context=t,this.$note=t.layoutInfo.note,this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.options=t.options,this.lang=this.options.langInfo,this.editable=this.$editable[0],this.lastRange=null,this.style=new Re,this.table=new Fe,this.typing=new Pe,this.bullet=new He,this.history=new $e(this.$editable),this.context.memo("help.undo",this.lang.help.undo),this.context.memo("help.redo",this.lang.help.redo),this.context.memo("help.tab",this.lang.help.tab),this.context.memo("help.untab",this.lang.help.untab),this.context.memo("help.insertParagraph",this.lang.help.insertParagraph),this.context.memo("help.insertOrderedList",this.lang.help.insertOrderedList),this.context.memo("help.insertUnorderedList",this.lang.help.insertUnorderedList),this.context.memo("help.indent",this.lang.help.indent),this.context.memo("help.outdent",this.lang.help.outdent),this.context.memo("help.formatPara",this.lang.help.formatPara),this.context.memo("help.insertHorizontalRule",this.lang.help.insertHorizontalRule),this.context.memo("help.fontName",this.lang.help.fontName);for(var o=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor"],i=0,r=o.length;i<r;i++)this[o[i]]=function(e){return function(t){n.beforeCommand(),document.execCommand(e,!1,t),n.afterCommand(!0)}}(o[i]),this.context.memo("help."+o[i],this.lang.help[o[i]]);for(this.fontName=this.wrapCommand(function(e){return n.fontStyling("font-family","'"+e+"'")}),this.fontSize=this.wrapCommand(function(e){return n.fontStyling("font-size",e+"px")}),i=1;i<=6;i++)this["formatH"+i]=function(e){return function(){n.formatBlock("H"+e)}}(i),this.context.memo("help.formatH"+i,this.lang.help["formatH"+i]);this.insertParagraph=this.wrapCommand(function(){n.typing.insertParagraph(n.editable)}),this.insertOrderedList=this.wrapCommand(function(){n.bullet.insertOrderedList(n.editable)}),this.insertUnorderedList=this.wrapCommand(function(){n.bullet.insertUnorderedList(n.editable)}),this.indent=this.wrapCommand(function(){n.bullet.indent(n.editable)}),this.outdent=this.wrapCommand(function(){n.bullet.outdent(n.editable)}),this.insertNode=this.wrapCommand(function(t){n.isLimited(e(t).text().length)||(n.createRange().insertNode(t),Le.createFromNodeAfter(t).select())}),this.insertText=this.wrapCommand(function(e){if(!n.isLimited(e.length)){var t=n.createRange().insertNode(Se.createText(e));Le.create(t,Se.nodeLength(t)).select()}}),this.pasteHTML=this.wrapCommand(function(e){if(!n.isLimited(e.length)){var t=n.createRange().pasteHTML(e);Le.createFromNodeAfter(S.last(t)).select()}}),this.formatBlock=this.wrapCommand(function(e,t){var o=n.options.callbacks.onApplyCustomStyle;o?o.call(n,t,n.context,n.onFormatBlock):n.onFormatBlock(e,t)}),this.insertHorizontalRule=this.wrapCommand(function(){var e=n.createRange().insertNode(Se.create("HR"));e.nextSibling&&Le.create(e.nextSibling,0).normalize().select()}),this.lineHeight=this.wrapCommand(function(e){n.style.stylePara(n.createRange(),{lineHeight:e})}),this.createLink=this.wrapCommand(function(t){var o=t.url,i=t.text,r=t.isNewWindow,s=t.range||n.createRange(),a=s.toString()!==i;"string"==typeof o&&(o=o.trim()),o=n.options.onCreateLink?n.options.onCreateLink(o):/^[A-Za-z][A-Za-z0-9+-.]*\:[\/\/]?/.test(o)?o:"http://"+o;var l=[];if(a){var c=(s=s.deleteContents()).insertNode(e("<A>"+i+"</A>")[0]);l.push(c)}else l=n.style.styleNodes(s,{nodeName:"A",expandClosestSibling:!0,onlyPartialContains:!0});e.each(l,function(t,n){e(n).attr("href",o),r?e(n).attr("target","_blank"):e(n).removeAttr("target")});var u=Le.createFromNodeBefore(S.head(l)).getStartPoint(),d=Le.createFromNodeAfter(S.last(l)).getEndPoint();Le.create(u.node,u.offset,d.node,d.offset).select()}),this.color=this.wrapCommand(function(e){var t=e.foreColor,n=e.backColor;t&&document.execCommand("foreColor",!1,t),n&&document.execCommand("backColor",!1,n)}),this.foreColor=this.wrapCommand(function(e){document.execCommand("styleWithCSS",!1,!0),document.execCommand("foreColor",!1,e)}),this.insertTable=this.wrapCommand(function(e){var t=e.split("x");n.createRange().deleteContents().insertNode(n.table.createTable(t[0],t[1],n.options))}),this.removeMedia=this.wrapCommand(function(){var t=e(n.restoreTarget()).parent();t.parent("figure").length?t.parent("figure").remove():t=e(n.restoreTarget()).detach(),n.context.triggerEvent("media.delete",t,n.$editable)}),this.floatMe=this.wrapCommand(function(t){var o=e(n.restoreTarget());o.toggleClass("note-float-left","left"===t),o.toggleClass("note-float-right","right"===t),o.css("float",t)}),this.resize=this.wrapCommand(function(t){e(n.restoreTarget()).css({width:100*t+"%",height:""})})}return t.prototype.initialize=function(){var e=this;this.$editable.on("keydown",function(t){if(t.keyCode===Ae.code.ENTER&&e.context.triggerEvent("enter",t),e.context.triggerEvent("keydown",t),t.isDefaultPrevented()||(e.options.shortcuts?e.handleKeyMap(t):e.preventDefaultEditableShortCuts(t)),e.isLimited(1,t))return!1}).on("keyup",function(t){e.context.triggerEvent("keyup",t)}).on("focus",function(t){e.context.triggerEvent("focus",t)}).on("blur",function(t){e.context.triggerEvent("blur",t)}).on("mousedown",function(t){e.context.triggerEvent("mousedown",t)}).on("mouseup",function(t){e.context.triggerEvent("mouseup",t)}).on("scroll",function(t){e.context.triggerEvent("scroll",t)}).on("paste",function(t){e.context.triggerEvent("paste",t)}),this.$editable.html(Se.html(this.$note)||Se.emptyPara),this.$editable.on(P.inputEventName,y.debounce(function(){e.context.triggerEvent("change",e.$editable.html())},100)),this.$editor.on("focusin",function(t){e.context.triggerEvent("focusin",t)}).on("focusout",function(t){e.context.triggerEvent("focusout",t)}),this.options.airMode||(this.options.width&&this.$editor.outerWidth(this.options.width),this.options.height&&this.$editable.outerHeight(this.options.height),this.options.maxHeight&&this.$editable.css("max-height",this.options.maxHeight),this.options.minHeight&&this.$editable.css("min-height",this.options.minHeight)),this.history.recordUndo()},t.prototype.destroy=function(){this.$editable.off()},t.prototype.handleKeyMap=function(e){var t=this.options.keyMap[P.isMac?"mac":"pc"],n=[];e.metaKey&&n.push("CMD"),e.ctrlKey&&!e.altKey&&n.push("CTRL"),e.shiftKey&&n.push("SHIFT");var o=Ae.nameFromCode[e.keyCode];o&&n.push(o);var i=t[n.join("+")];i?!1!==this.context.invoke(i)&&e.preventDefault():Ae.isEdit(e.keyCode)&&this.afterCommand()},t.prototype.preventDefaultEditableShortCuts=function(e){(e.ctrlKey||e.metaKey)&&S.contains([66,73,85],e.keyCode)&&e.preventDefault()},t.prototype.isLimited=function(e,t){return e=e||0,(void 0===t||!(Ae.isMove(t.keyCode)||t.ctrlKey||t.metaKey||S.contains([Ae.code.BACKSPACE,Ae.code.DELETE],t.keyCode)))&&this.options.maxTextLength>0&&this.$editable.text().length+e>=this.options.maxTextLength},t.prototype.createRange=function(){return this.focus(),Le.create(this.editable)},t.prototype.saveRange=function(e){this.lastRange=this.createRange(),e&&this.lastRange.collapse().select()},t.prototype.restoreRange=function(){this.lastRange&&(this.lastRange.select(),this.focus())},t.prototype.saveTarget=function(e){this.$editable.data("target",e)},t.prototype.clearTarget=function(){this.$editable.removeData("target")},t.prototype.restoreTarget=function(){return this.$editable.data("target")},t.prototype.currentStyle=function(){var e=Le.create();return e&&(e=e.normalize()),e?this.style.current(e):this.style.fromNode(this.$editable)},t.prototype.styleFromNode=function(e){return this.style.fromNode(e)},t.prototype.undo=function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.undo(),this.context.triggerEvent("change",this.$editable.html())},t.prototype.redo=function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.redo(),this.context.triggerEvent("change",this.$editable.html())},t.prototype.beforeCommand=function(){this.context.triggerEvent("before.command",this.$editable.html()),this.focus()},t.prototype.afterCommand=function(e){this.normalizeContent(),this.history.recordUndo(),e||this.context.triggerEvent("change",this.$editable.html())},t.prototype.tab=function(){var e=this.createRange();if(e.isCollapsed()&&e.isOnCell())this.table.tab(e);else{if(0===this.options.tabSize)return!1;this.isLimited(this.options.tabSize)||(this.beforeCommand(),this.typing.insertTab(e,this.options.tabSize),this.afterCommand())}},t.prototype.untab=function(){var e=this.createRange();if(e.isCollapsed()&&e.isOnCell())this.table.tab(e,!0);else if(0===this.options.tabSize)return!1},t.prototype.wrapCommand=function(e){var t=this;return function(){t.beforeCommand(),e.apply(t,arguments),t.afterCommand()}},t.prototype.insertImage=function(t,n){var o,i=this;return(o=t,e.Deferred(function(t){var n=e("<img>");n.one("load",function(){n.off("error abort"),t.resolve(n)}).one("error abort",function(){n.off("load").detach(),t.reject(n)}).css({display:"none"}).appendTo(document.body).attr("src",o)}).promise()).then(function(e){i.beforeCommand(),"function"==typeof n?n(e):("string"==typeof n&&e.attr("data-filename",n),e.css("width",Math.min(i.$editable.width(),e.width()))),e.show(),Le.create(i.editable).insertNode(e[0]),Le.createFromNodeAfter(e[0]).select(),i.afterCommand()}).fail(function(e){i.context.triggerEvent("image.upload.error",e)})},t.prototype.insertImages=function(t){var n=this;e.each(t,function(t,o){var i,r=o.name;n.options.maximumImageFileSize&&n.options.maximumImageFileSize<o.size?n.context.triggerEvent("image.upload.error",n.lang.image.maximumFileSizeError):(i=o,e.Deferred(function(t){e.extend(new FileReader,{onload:function(e){var n=e.target.result;t.resolve(n)},onerror:function(e){t.reject(e)}}).readAsDataURL(i)}).promise()).then(function(e){return n.insertImage(e,r)}).fail(function(){n.context.triggerEvent("image.upload.error")})})},t.prototype.insertImagesOrCallback=function(e){this.options.callbacks.onImageUpload?this.context.triggerEvent("image.upload",e):this.insertImages(e)},t.prototype.getSelectedText=function(){var e=this.createRange();return e.isOnAnchor()&&(e=Le.createFromNode(Se.ancestor(e.sc,Se.isAnchor))),e.toString()},t.prototype.onFormatBlock=function(t,n){if(t=P.isMSIE?"<"+t+">":t,document.execCommand("FormatBlock",!1,t),n&&n.length){var o=n[0].className||"";if(o){var i=this.createRange();e([i.sc,i.ec]).closest(t).addClass(o)}}},t.prototype.formatPara=function(){this.formatBlock("P")},t.prototype.fontStyling=function(t,n){var o=this.createRange();if(o){var i=this.style.styleNodes(o);if(e(i).css(t,n),o.isCollapsed()){var r=S.head(i);r&&!Se.nodeLength(r)&&(r.innerHTML=Se.ZERO_WIDTH_NBSP_CHAR,Le.createFromNodeAfter(r.firstChild).select(),this.$editable.data("bogus",r))}}},t.prototype.unlink=function(){var e=this.createRange();if(e.isOnAnchor()){var t=Se.ancestor(e.sc,Se.isAnchor);(e=Le.createFromNode(t)).select(),this.beforeCommand(),document.execCommand("unlink"),this.afterCommand()}},t.prototype.getLinkInfo=function(){var t=this.createRange().expand(Se.isAnchor),n=e(S.head(t.nodes(Se.isAnchor))),o={range:t,text:t.toString(),url:n.length?n.attr("href"):""};return n.length&&(o.isNewWindow="_blank"===n.attr("target")),o},t.prototype.addRow=function(e){var t=this.createRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.addRow(t,e),this.afterCommand())},t.prototype.addCol=function(e){var t=this.createRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.addCol(t,e),this.afterCommand())},t.prototype.deleteRow=function(){var e=this.createRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteRow(e),this.afterCommand())},t.prototype.deleteCol=function(){var e=this.createRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteCol(e),this.afterCommand())},t.prototype.deleteTable=function(){var e=this.createRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteTable(e),this.afterCommand())},t.prototype.resizeTo=function(e,t,n){var o;if(n){var i=e.y/e.x,r=t.data("ratio");o={width:r>i?e.x:e.y/r,height:r>i?e.x*r:e.y}}else o={width:e.x,height:e.y};t.css(o)},t.prototype.hasFocus=function(){return this.$editable.is(":focus")},t.prototype.focus=function(){this.hasFocus()||this.$editable.focus()},t.prototype.isEmpty=function(){return Se.isEmpty(this.$editable[0])||Se.emptyPara===this.$editable.html()},t.prototype.empty=function(){this.context.invoke("code",Se.emptyPara)},t.prototype.normalizeContent=function(){this.$editable[0].normalize()},t}(),Oe=function(){function e(e){this.context=e,this.$editable=e.layoutInfo.editable}return e.prototype.initialize=function(){this.$editable.on("paste",this.pasteByEvent.bind(this))},e.prototype.pasteByEvent=function(e){var t=e.originalEvent.clipboardData;if(t&&t.items&&t.items.length){var n=S.head(t.items);"file"===n.kind&&-1!==n.type.indexOf("image/")&&this.context.invoke("editor.insertImagesOrCallback",[n.getAsFile()]),this.context.invoke("editor.afterCommand")}},e}(),ze=function(){function t(t){this.context=t,this.$eventListener=e(document),this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.options=t.options,this.lang=this.options.langInfo,this.documentEventHandlers={},this.$dropzone=e(['<div class="note-dropzone">',' <div class="note-dropzone-message"/>',"</div>"].join("")).prependTo(this.$editor)}return t.prototype.initialize=function(){this.options.disableDragAndDrop?(this.documentEventHandlers.onDrop=function(e){e.preventDefault()},this.$eventListener=this.$dropzone,this.$eventListener.on("drop",this.documentEventHandlers.onDrop)):this.attachDragAndDropEvent()},t.prototype.attachDragAndDropEvent=function(){var t=this,n=e(),o=this.$dropzone.find(".note-dropzone-message");this.documentEventHandlers.onDragenter=function(e){var i=t.context.invoke("codeview.isActivated"),r=t.$editor.width()>0&&t.$editor.height()>0;i||n.length||!r||(t.$editor.addClass("dragover"),t.$dropzone.width(t.$editor.width()),t.$dropzone.height(t.$editor.height()),o.text(t.lang.image.dragImageHere)),n=n.add(e.target)},this.documentEventHandlers.onDragleave=function(e){(n=n.not(e.target)).length||t.$editor.removeClass("dragover")},this.documentEventHandlers.onDrop=function(){n=e(),t.$editor.removeClass("dragover")},this.$eventListener.on("dragenter",this.documentEventHandlers.onDragenter).on("dragleave",this.documentEventHandlers.onDragleave).on("drop",this.documentEventHandlers.onDrop),this.$dropzone.on("dragenter",function(){t.$dropzone.addClass("hover"),o.text(t.lang.image.dropImage)}).on("dragleave",function(){t.$dropzone.removeClass("hover"),o.text(t.lang.image.dragImageHere)}),this.$dropzone.on("drop",function(n){var o=n.originalEvent.dataTransfer;n.preventDefault(),o&&o.files&&o.files.length?(t.$editable.focus(),t.context.invoke("editor.insertImagesOrCallback",o.files)):e.each(o.types,function(n,i){var r=o.getData(i);i.toLowerCase().indexOf("text")>-1?t.context.invoke("editor.pasteHTML",r):e(r).each(function(e,n){t.context.invoke("editor.insertNode",n)})})}).on("dragover",!1)},t.prototype.destroy=function(){var e=this;Object.keys(this.documentEventHandlers).forEach(function(t){e.$eventListener.off(t.substr(2).toLowerCase(),e.documentEventHandlers[t])}),this.documentEventHandlers={}},t}();P.hasCodeMirror&&(P.isSupportAmd?require(["codemirror"],function(e){Me=e}):Me=window.CodeMirror);var qe=function(){function e(e){this.context=e,this.$editor=e.layoutInfo.editor,this.$editable=e.layoutInfo.editable,this.$codable=e.layoutInfo.codable,this.options=e.options}return e.prototype.sync=function(){this.isActivated()&&P.hasCodeMirror&&this.$codable.data("cmEditor").save()},e.prototype.isActivated=function(){return this.$editor.hasClass("codeview")},e.prototype.toggle=function(){this.isActivated()?this.deactivate():this.activate(),this.context.triggerEvent("codeview.toggled")},e.prototype.activate=function(){var e=this;if(this.$codable.val(Se.html(this.$editable,this.options.prettifyHtml)),this.$codable.height(this.$editable.height()),this.context.invoke("toolbar.updateCodeview",!0),this.$editor.addClass("codeview"),this.$codable.focus(),P.hasCodeMirror){var t=Me.fromTextArea(this.$codable[0],this.options.codemirror);if(this.options.codemirror.tern){var n=new Me.TernServer(this.options.codemirror.tern);t.ternServer=n,t.on("cursorActivity",function(e){n.updateArgHints(e)})}t.on("blur",function(n){e.context.triggerEvent("blur.codeview",t.getValue(),n)}),t.setSize(null,this.$editable.outerHeight()),this.$codable.data("cmEditor",t)}else this.$codable.on("blur",function(t){e.context.triggerEvent("blur.codeview",e.$codable.val(),t)})},e.prototype.deactivate=function(){if(P.hasCodeMirror){var e=this.$codable.data("cmEditor");this.$codable.val(e.getValue()),e.toTextArea()}var t=Se.value(this.$codable,this.options.prettifyHtml)||Se.emptyPara,n=this.$editable.html()!==t;this.$editable.html(t),this.$editable.height(this.options.height?this.$codable.height():"auto"),this.$editor.removeClass("codeview"),n&&this.context.triggerEvent("change",this.$editable.html(),this.$editable),this.$editable.focus(),this.context.invoke("toolbar.updateCodeview",!1)},e.prototype.destroy=function(){this.isActivated()&&this.deactivate()},e}(),Ue=function(){function t(t){this.$document=e(document),this.$statusbar=t.layoutInfo.statusbar,this.$editable=t.layoutInfo.editable,this.options=t.options}return t.prototype.initialize=function(){var e=this;this.options.airMode||this.options.disableResizeEditor?this.destroy():this.$statusbar.on("mousedown",function(t){t.preventDefault(),t.stopPropagation();var n=e.$editable.offset().top-e.$document.scrollTop(),o=function(t){var o=t.clientY-(n+24);o=e.options.minheight>0?Math.max(o,e.options.minheight):o,o=e.options.maxHeight>0?Math.min(o,e.options.maxHeight):o,e.$editable.height(o)};e.$document.on("mousemove",o).one("mouseup",function(){e.$document.off("mousemove",o)})})},t.prototype.destroy=function(){this.$statusbar.off(),this.$statusbar.addClass("locked")},t}(),_e=function(){function t(t){var n=this;this.context=t,this.$editor=t.layoutInfo.editor,this.$toolbar=t.layoutInfo.toolbar,this.$editable=t.layoutInfo.editable,this.$codable=t.layoutInfo.codable,this.$window=e(window),this.$scrollbar=e("html, body"),this.onResize=function(){n.resizeTo({h:n.$window.height()-n.$toolbar.outerHeight()})}}return t.prototype.resizeTo=function(e){this.$editable.css("height",e.h),this.$codable.css("height",e.h),this.$codable.data("cmeditor")&&this.$codable.data("cmeditor").setsize(null,e.h)},t.prototype.toggle=function(){this.$editor.toggleClass("fullscreen"),this.isFullscreen()?(this.$editable.data("orgHeight",this.$editable.css("height")),this.$window.on("resize",this.onResize).trigger("resize"),this.$scrollbar.css("overflow","hidden")):(this.$window.off("resize",this.onResize),this.resizeTo({h:this.$editable.data("orgHeight")}),this.$scrollbar.css("overflow","visible")),this.context.invoke("toolbar.updateFullscreen",this.isFullscreen())},t.prototype.isFullscreen=function(){return this.$editor.hasClass("fullscreen")},t}(),We=function(){function t(t){var n=this;this.context=t,this.$document=e(document),this.$editingArea=t.layoutInfo.editingArea,this.options=t.options,this.lang=this.options.langInfo,this.events={"summernote.mousedown":function(e,t){n.update(t.target)&&t.preventDefault()},"summernote.keyup summernote.scroll summernote.change summernote.dialog.shown":function(){n.update()},"summernote.disable":function(){n.hide()},"summernote.codeview.toggled":function(){n.update()}}}return t.prototype.initialize=function(){var t=this;this.$handle=e(['<div class="note-handle">','<div class="note-control-selection">','<div class="note-control-selection-bg"></div>','<div class="note-control-holder note-control-nw"></div>','<div class="note-control-holder note-control-ne"></div>','<div class="note-control-holder note-control-sw"></div>','<div class="',this.options.disableResizeImage?"note-control-holder":"note-control-sizing",' note-control-se"></div>',this.options.disableResizeImage?"":'<div class="note-control-selection-info"></div>',"</div>","</div>"].join("")).prependTo(this.$editingArea),this.$handle.on("mousedown",function(e){if(Se.isControlSizing(e.target)){e.preventDefault(),e.stopPropagation();var n=t.$handle.find(".note-control-selection").data("target"),o=n.offset(),i=t.$document.scrollTop(),r=function(e){t.context.invoke("editor.resizeTo",{x:e.clientX-o.left,y:e.clientY-(o.top-i)},n,!e.shiftKey),t.update(n[0])};t.$document.on("mousemove",r).one("mouseup",function(e){e.preventDefault(),t.$document.off("mousemove",r),t.context.invoke("editor.afterCommand")}),n.data("ratio")||n.data("ratio",n.height()/n.width())}}),this.$handle.on("wheel",function(e){e.preventDefault(),t.update()})},t.prototype.destroy=function(){this.$handle.remove()},t.prototype.update=function(t){if(this.context.isDisabled())return!1;var n=Se.isImg(t),o=this.$handle.find(".note-control-selection");if(this.context.invoke("imagePopover.update",t),n){var i=e(t),r=i.position(),s={left:r.left+parseInt(i.css("marginLeft"),10),top:r.top+parseInt(i.css("marginTop"),10)},a={w:i.outerWidth(!1),h:i.outerHeight(!1)};o.css({display:"block",left:s.left,top:s.top,width:a.w,height:a.h}).data("target",i);var l=new Image;l.src=i.attr("src");var c=a.w+"x"+a.h+" ("+this.lang.image.original+": "+l.width+"x"+l.height+")";o.find(".note-control-selection-info").text(c),this.context.invoke("editor.saveTarget",t)}else this.hide();return n},t.prototype.hide=function(){this.context.invoke("editor.clearTarget"),this.$handle.children().hide()},t}(),Ve=/^([A-Za-z][A-Za-z0-9+-.]*\:[\/\/]?|mailto:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i,Ke=function(){function t(e){var t=this;this.context=e,this.events={"summernote.keyup":function(e,n){n.isDefaultPrevented()||t.handleKeyup(n)},"summernote.keydown":function(e,n){t.handleKeydown(n)}}}return t.prototype.initialize=function(){this.lastWordRange=null},t.prototype.destroy=function(){this.lastWordRange=null},t.prototype.replace=function(){if(this.lastWordRange){var t=this.lastWordRange.toString(),n=t.match(Ve);if(n&&(n[1]||n[2])){var o=n[1]?t:"http://"+t,i=e("<a />").html(t).attr("href",o)[0];this.lastWordRange.insertNode(i),this.lastWordRange=null,this.context.invoke("editor.focus")}}},t.prototype.handleKeydown=function(e){if(S.contains([Ae.code.ENTER,Ae.code.SPACE],e.keyCode)){var t=this.context.invoke("editor.createRange").getWordRange();this.lastWordRange=t}},t.prototype.handleKeyup=function(e){S.contains([Ae.code.ENTER,Ae.code.SPACE],e.keyCode)&&this.replace()},t}(),Ge=function(){function e(e){var t=this;this.$note=e.layoutInfo.note,this.events={"summernote.change":function(){t.$note.val(e.invoke("code"))}}}return e.prototype.shouldInitialize=function(){return Se.isTextarea(this.$note[0])},e}(),Xe=function(){function t(e){var t=this;this.context=e,this.$editingArea=e.layoutInfo.editingArea,this.options=e.options,this.events={"summernote.init summernote.change":function(){t.update()},"summernote.codeview.toggled":function(){t.update()}}}return t.prototype.shouldInitialize=function(){return!!this.options.placeholder},t.prototype.initialize=function(){var t=this;this.$placeholder=e('<div class="note-placeholder">'),this.$placeholder.on("click",function(){t.context.invoke("focus")}).text(this.options.placeholder).prependTo(this.$editingArea),this.update()},t.prototype.destroy=function(){this.$placeholder.remove()},t.prototype.update=function(){var e=!this.context.invoke("codeview.isActivated")&&this.context.invoke("editor.isEmpty");this.$placeholder.toggle(e)},t}(),Ye=function(){function t(t){this.ui=e.summernote.ui,this.context=t,this.$toolbar=t.layoutInfo.toolbar,this.options=t.options,this.lang=this.options.langInfo,this.invertedKeyMap=y.invertObject(this.options.keyMap[P.isMac?"mac":"pc"])}return t.prototype.representShortcut=function(e){var t=this.invertedKeyMap[e];return this.options.shortcuts&&t?(P.isMac&&(t=t.replace("CMD","⌘").replace("SHIFT","⇧"))," ("+(t=t.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]"))+")"):""},t.prototype.button=function(e){return!this.options.tooltip&&e.tooltip&&delete e.tooltip,e.container=this.options.container,this.ui.button(e)},t.prototype.initialize=function(){this.addToolbarButtons(),this.addImagePopoverButtons(),this.addLinkPopoverButtons(),this.addTablePopoverButtons(),this.fontInstalledMap={}},t.prototype.destroy=function(){delete this.fontInstalledMap},t.prototype.isFontInstalled=function(e){return this.fontInstalledMap.hasOwnProperty(e)||(this.fontInstalledMap[e]=P.isFontInstalled(e)||S.contains(this.options.fontNamesIgnoreCheck,e)),this.fontInstalledMap[e]},t.prototype.isFontDeservedToAdd=function(t){return""!==(t=t.toLowerCase())&&this.isFontInstalled(t)&&-1===e.inArray(t,["sans-serif","serif","monospace","cursive","fantasy"])},t.prototype.addToolbarButtons=function(){var t=this;this.context.memo("button.style",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.magic),t.options),tooltip:t.lang.style.style,data:{toggle:"dropdown"}}),t.ui.dropdown({className:"dropdown-style",items:t.options.styleTags,title:t.lang.style.style,template:function(e){"string"==typeof e&&(e={tag:e,title:t.lang.style.hasOwnProperty(e)?t.lang.style[e]:e});var n=e.tag,o=e.title;return"<"+n+(e.style?' style="'+e.style+'" ':"")+(e.className?' class="'+e.className+'"':"")+">"+o+"</"+n+">"},click:t.context.createInvokeHandler("editor.formatBlock")})]).render()});for(var n=function(e,n){var i=o.options.styleTags[e];o.context.memo("button.style."+i,function(){return t.button({className:"note-btn-style-"+i,contents:'<div data-value="'+i+'">'+i.toUpperCase()+"</div>",tooltip:t.lang.style[i],click:t.context.createInvokeHandler("editor.formatBlock")}).render()})},o=this,i=0,r=this.options.styleTags.length;i<r;i++)n(i);this.context.memo("button.bold",function(){return t.button({className:"note-btn-bold",contents:t.ui.icon(t.options.icons.bold),tooltip:t.lang.font.bold+t.representShortcut("bold"),click:t.context.createInvokeHandlerAndUpdateState("editor.bold")}).render()}),this.context.memo("button.italic",function(){return t.button({className:"note-btn-italic",contents:t.ui.icon(t.options.icons.italic),tooltip:t.lang.font.italic+t.representShortcut("italic"),click:t.context.createInvokeHandlerAndUpdateState("editor.italic")}).render()}),this.context.memo("button.underline",function(){return t.button({className:"note-btn-underline",contents:t.ui.icon(t.options.icons.underline),tooltip:t.lang.font.underline+t.representShortcut("underline"),click:t.context.createInvokeHandlerAndUpdateState("editor.underline")}).render()}),this.context.memo("button.clear",function(){return t.button({contents:t.ui.icon(t.options.icons.eraser),tooltip:t.lang.font.clear+t.representShortcut("removeFormat"),click:t.context.createInvokeHandler("editor.removeFormat")}).render()}),this.context.memo("button.strikethrough",function(){return t.button({className:"note-btn-strikethrough",contents:t.ui.icon(t.options.icons.strikethrough),tooltip:t.lang.font.strikethrough+t.representShortcut("strikethrough"),click:t.context.createInvokeHandlerAndUpdateState("editor.strikethrough")}).render()}),this.context.memo("button.superscript",function(){return t.button({className:"note-btn-superscript",contents:t.ui.icon(t.options.icons.superscript),tooltip:t.lang.font.superscript,click:t.context.createInvokeHandlerAndUpdateState("editor.superscript")}).render()}),this.context.memo("button.subscript",function(){return t.button({className:"note-btn-subscript",contents:t.ui.icon(t.options.icons.subscript),tooltip:t.lang.font.subscript,click:t.context.createInvokeHandlerAndUpdateState("editor.subscript")}).render()}),this.context.memo("button.fontname",function(){var n=t.context.invoke("editor.currentStyle");return e.each(n["font-family"].split(","),function(n,o){o=o.trim().replace(/['"]+/g,""),t.isFontDeservedToAdd(o)&&-1===e.inArray(o,t.options.fontNames)&&t.options.fontNames.push(o)}),t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents('<span class="note-current-fontname"/>',t.options),tooltip:t.lang.font.name,data:{toggle:"dropdown"}}),t.ui.dropdownCheck({className:"dropdown-fontname",checkClassName:t.options.icons.menuCheck,items:t.options.fontNames.filter(t.isFontInstalled.bind(t)),title:t.lang.font.name,template:function(e){return"<span style=\"font-family: '"+e+"'\">"+e+"</span>"},click:t.context.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()}),this.context.memo("button.fontsize",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents('<span class="note-current-fontsize"/>',t.options),tooltip:t.lang.font.size,data:{toggle:"dropdown"}}),t.ui.dropdownCheck({className:"dropdown-fontsize",checkClassName:t.options.icons.menuCheck,items:t.options.fontSizes,title:t.lang.font.size,click:t.context.createInvokeHandlerAndUpdateState("editor.fontSize")})]).render()}),this.context.memo("button.color",function(){return t.ui.buttonGroup({className:"note-color",children:[t.button({className:"note-current-color-button",contents:t.ui.icon(t.options.icons.font+" note-recent-color"),tooltip:t.lang.color.recent,click:function(n){var o=e(n.currentTarget);t.context.invoke("editor.color",{backColor:o.attr("data-backColor"),foreColor:o.attr("data-foreColor")})},callback:function(e){e.find(".note-recent-color").css("background-color","#FFFF00"),e.attr("data-backColor","#FFFF00")}}),t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents("",t.options),tooltip:t.lang.color.more,data:{toggle:"dropdown"}}),t.ui.dropdown({items:['<div class="note-palette">',' <div class="note-palette-title">'+t.lang.color.background+"</div>"," <div>",' <button type="button" class="note-color-reset btn btn-light" data-event="backColor" data-value="inherit">',t.lang.color.transparent," </button>"," </div>",' <div class="note-holder" data-event="backColor"/>',"</div>",'<div class="note-palette">',' <div class="note-palette-title">'+t.lang.color.foreground+"</div>"," <div>",' <button type="button" class="note-color-reset btn btn-light" data-event="removeFormat" data-value="foreColor">',t.lang.color.resetToDefault," </button>"," </div>",' <div class="note-holder" data-event="foreColor"/>',"</div>"].join(""),callback:function(n){n.find(".note-holder").each(function(n,o){var i=e(o);i.append(t.ui.palette({colors:t.options.colors,colorsName:t.options.colorsName,eventName:i.data("event"),container:t.options.container,tooltip:t.options.tooltip}).render())})},click:function(n){var o=e(n.target),i=o.data("event"),r=o.data("value");if(i&&r){var s="backColor"===i?"background-color":"color",a=o.closest(".note-color").find(".note-recent-color"),l=o.closest(".note-color").find(".note-current-color-button");a.css(s,r),l.attr("data-"+i,r),t.context.invoke("editor."+i,r)}}})]}).render()}),this.context.memo("button.ul",function(){return t.button({contents:t.ui.icon(t.options.icons.unorderedlist),tooltip:t.lang.lists.unordered+t.representShortcut("insertUnorderedList"),click:t.context.createInvokeHandler("editor.insertUnorderedList")}).render()}),this.context.memo("button.ol",function(){return t.button({contents:t.ui.icon(t.options.icons.orderedlist),tooltip:t.lang.lists.ordered+t.representShortcut("insertOrderedList"),click:t.context.createInvokeHandler("editor.insertOrderedList")}).render()});var s=this.button({contents:this.ui.icon(this.options.icons.alignLeft),tooltip:this.lang.paragraph.left+this.representShortcut("justifyLeft"),click:this.context.createInvokeHandler("editor.justifyLeft")}),a=this.button({contents:this.ui.icon(this.options.icons.alignCenter),tooltip:this.lang.paragraph.center+this.representShortcut("justifyCenter"),click:this.context.createInvokeHandler("editor.justifyCenter")}),l=this.button({contents:this.ui.icon(this.options.icons.alignRight),tooltip:this.lang.paragraph.right+this.representShortcut("justifyRight"),click:this.context.createInvokeHandler("editor.justifyRight")}),c=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut("justifyFull"),click:this.context.createInvokeHandler("editor.justifyFull")}),u=this.button({contents:this.ui.icon(this.options.icons.outdent),tooltip:this.lang.paragraph.outdent+this.representShortcut("outdent"),click:this.context.createInvokeHandler("editor.outdent")}),d=this.button({contents:this.ui.icon(this.options.icons.indent),tooltip:this.lang.paragraph.indent+this.representShortcut("indent"),click:this.context.createInvokeHandler("editor.indent")});this.context.memo("button.justifyLeft",y.invoke(s,"render")),this.context.memo("button.justifyCenter",y.invoke(a,"render")),this.context.memo("button.justifyRight",y.invoke(l,"render")),this.context.memo("button.justifyFull",y.invoke(c,"render")),this.context.memo("button.outdent",y.invoke(u,"render")),this.context.memo("button.indent",y.invoke(d,"render")),this.context.memo("button.paragraph",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.alignLeft),t.options),tooltip:t.lang.paragraph.paragraph,data:{toggle:"dropdown"}}),t.ui.dropdown([t.ui.buttonGroup({className:"note-align",children:[s,a,l,c]}),t.ui.buttonGroup({className:"note-list",children:[u,d]})])]).render()}),this.context.memo("button.height",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.textHeight),t.options),tooltip:t.lang.font.height,data:{toggle:"dropdown"}}),t.ui.dropdownCheck({items:t.options.lineHeights,checkClassName:t.options.icons.menuCheck,className:"dropdown-line-height",title:t.lang.font.height,click:t.context.createInvokeHandler("editor.lineHeight")})]).render()}),this.context.memo("button.table",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.table),t.options),tooltip:t.lang.table.table,data:{toggle:"dropdown"}}),t.ui.dropdown({title:t.lang.table.table,className:"note-table",items:['<div class="note-dimension-picker">',' <div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"/>',' <div class="note-dimension-picker-highlighted"/>',' <div class="note-dimension-picker-unhighlighted"/>',"</div>",'<div class="note-dimension-display">1 x 1</div>'].join("")})],{callback:function(e){e.find(".note-dimension-picker-mousecatcher").css({width:t.options.insertTableMaxSize.col+"em",height:t.options.insertTableMaxSize.row+"em"}).mousedown(t.context.createInvokeHandler("editor.insertTable")).on("mousemove",t.tableMoveHandler.bind(t))}}).render()}),this.context.memo("button.link",function(){return t.button({contents:t.ui.icon(t.options.icons.link),tooltip:t.lang.link.link+t.representShortcut("linkDialog.show"),click:t.context.createInvokeHandler("linkDialog.show")}).render()}),this.context.memo("button.picture",function(){return t.button({contents:t.ui.icon(t.options.icons.picture),tooltip:t.lang.image.image,click:t.context.createInvokeHandler("imageDialog.show")}).render()}),this.context.memo("button.video",function(){return t.button({contents:t.ui.icon(t.options.icons.video),tooltip:t.lang.video.video,click:t.context.createInvokeHandler("videoDialog.show")}).render()}),this.context.memo("button.hr",function(){return t.button({contents:t.ui.icon(t.options.icons.minus),tooltip:t.lang.hr.insert+t.representShortcut("insertHorizontalRule"),click:t.context.createInvokeHandler("editor.insertHorizontalRule")}).render()}),this.context.memo("button.fullscreen",function(){return t.button({className:"btn-fullscreen",contents:t.ui.icon(t.options.icons.arrowsAlt),tooltip:t.lang.options.fullscreen,click:t.context.createInvokeHandler("fullscreen.toggle")}).render()}),this.context.memo("button.codeview",function(){return t.button({className:"btn-codeview",contents:t.ui.icon(t.options.icons.code),tooltip:t.lang.options.codeview,click:t.context.createInvokeHandler("codeview.toggle")}).render()}),this.context.memo("button.redo",function(){return t.button({contents:t.ui.icon(t.options.icons.redo),tooltip:t.lang.history.redo+t.representShortcut("redo"),click:t.context.createInvokeHandler("editor.redo")}).render()}),this.context.memo("button.undo",function(){return t.button({contents:t.ui.icon(t.options.icons.undo),tooltip:t.lang.history.undo+t.representShortcut("undo"),click:t.context.createInvokeHandler("editor.undo")}).render()}),this.context.memo("button.help",function(){return t.button({contents:t.ui.icon(t.options.icons.question),tooltip:t.lang.options.help,click:t.context.createInvokeHandler("helpDialog.show")}).render()})},t.prototype.addImagePopoverButtons=function(){var e=this;this.context.memo("button.imageSize100",function(){return e.button({contents:'<span class="note-fontsize-10">100%</span>',tooltip:e.lang.image.resizeFull,click:e.context.createInvokeHandler("editor.resize","1")}).render()}),this.context.memo("button.imageSize50",function(){return e.button({contents:'<span class="note-fontsize-10">50%</span>',tooltip:e.lang.image.resizeHalf,click:e.context.createInvokeHandler("editor.resize","0.5")}).render()}),this.context.memo("button.imageSize25",function(){return e.button({contents:'<span class="note-fontsize-10">25%</span>',tooltip:e.lang.image.resizeQuarter,click:e.context.createInvokeHandler("editor.resize","0.25")}).render()}),this.context.memo("button.floatLeft",function(){return e.button({contents:e.ui.icon(e.options.icons.alignLeft),tooltip:e.lang.image.floatLeft,click:e.context.createInvokeHandler("editor.floatMe","left")}).render()}),this.context.memo("button.floatRight",function(){return e.button({contents:e.ui.icon(e.options.icons.alignRight),tooltip:e.lang.image.floatRight,click:e.context.createInvokeHandler("editor.floatMe","right")}).render()}),this.context.memo("button.floatNone",function(){return e.button({contents:e.ui.icon(e.options.icons.alignJustify),tooltip:e.lang.image.floatNone,click:e.context.createInvokeHandler("editor.floatMe","none")}).render()}),this.context.memo("button.removeMedia",function(){return e.button({contents:e.ui.icon(e.options.icons.trash),tooltip:e.lang.image.remove,click:e.context.createInvokeHandler("editor.removeMedia")}).render()})},t.prototype.addLinkPopoverButtons=function(){var e=this;this.context.memo("button.linkDialogShow",function(){return e.button({contents:e.ui.icon(e.options.icons.link),tooltip:e.lang.link.edit,click:e.context.createInvokeHandler("linkDialog.show")}).render()}),this.context.memo("button.unlink",function(){return e.button({contents:e.ui.icon(e.options.icons.unlink),tooltip:e.lang.link.unlink,click:e.context.createInvokeHandler("editor.unlink")}).render()})},t.prototype.addTablePopoverButtons=function(){var e=this;this.context.memo("button.addRowUp",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowAbove),tooltip:e.lang.table.addRowAbove,click:e.context.createInvokeHandler("editor.addRow","top")}).render()}),this.context.memo("button.addRowDown",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowBelow),tooltip:e.lang.table.addRowBelow,click:e.context.createInvokeHandler("editor.addRow","bottom")}).render()}),this.context.memo("button.addColLeft",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colBefore),tooltip:e.lang.table.addColLeft,click:e.context.createInvokeHandler("editor.addCol","left")}).render()}),this.context.memo("button.addColRight",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colAfter),tooltip:e.lang.table.addColRight,click:e.context.createInvokeHandler("editor.addCol","right")}).render()}),this.context.memo("button.deleteRow",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowRemove),tooltip:e.lang.table.delRow,click:e.context.createInvokeHandler("editor.deleteRow")}).render()}),this.context.memo("button.deleteCol",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colRemove),tooltip:e.lang.table.delCol,click:e.context.createInvokeHandler("editor.deleteCol")}).render()}),this.context.memo("button.deleteTable",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.trash),tooltip:e.lang.table.delTable,click:e.context.createInvokeHandler("editor.deleteTable")}).render()})},t.prototype.build=function(t,n){for(var o=0,i=n.length;o<i;o++){for(var r=n[o],s=e.isArray(r)?r[0]:r,a=e.isArray(r)?1===r.length?[r[0]]:r[1]:[r],l=this.ui.buttonGroup({className:"note-"+s}).render(),c=0,u=a.length;c<u;c++){var d=this.context.memo("button."+a[c]);d&&l.append("function"==typeof d?d(this.context):d)}l.appendTo(t)}},t.prototype.updateCurrentStyle=function(t){var n=this,o=t||this.$toolbar,i=this.context.invoke("editor.currentStyle");if(this.updateBtnStates(o,{".note-btn-bold":function(){return"bold"===i["font-bold"]},".note-btn-italic":function(){return"italic"===i["font-italic"]},".note-btn-underline":function(){return"underline"===i["font-underline"]},".note-btn-subscript":function(){return"subscript"===i["font-subscript"]},".note-btn-superscript":function(){return"superscript"===i["font-superscript"]},".note-btn-strikethrough":function(){return"strikethrough"===i["font-strikethrough"]}}),i["font-family"]){var r=i["font-family"].split(",").map(function(e){return e.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")}),s=S.find(r,this.isFontInstalled.bind(this));o.find(".dropdown-fontname a").each(function(t,n){var o=e(n),i=o.data("value")+""==s+"";o.toggleClass("checked",i)}),o.find(".note-current-fontname").text(s).css("font-family",s)}if(i["font-size"]){var a=i["font-size"];o.find(".dropdown-fontsize a").each(function(t,n){var o=e(n),i=o.data("value")+""==a+"";o.toggleClass("checked",i)}),o.find(".note-current-fontsize").text(a)}if(i["line-height"]){var l=i["line-height"];o.find(".dropdown-line-height li a").each(function(t,o){var i=e(o).data("value")+""==l+"";n.className=i?"checked":""})}},t.prototype.updateBtnStates=function(t,n){var o=this;e.each(n,function(e,n){o.ui.toggleBtnActive(t.find(e),n())})},t.prototype.tableMoveHandler=function(t){var n,o=e(t.target.parentNode),i=o.next(),r=o.find(".note-dimension-picker-mousecatcher"),s=o.find(".note-dimension-picker-highlighted"),a=o.find(".note-dimension-picker-unhighlighted");if(void 0===t.offsetX){var l=e(t.target).offset();n={x:t.pageX-l.left,y:t.pageY-l.top}}else n={x:t.offsetX,y:t.offsetY};var c=Math.ceil(n.x/18)||1,u=Math.ceil(n.y/18)||1;s.css({width:c+"em",height:u+"em"}),r.data("value",c+"x"+u),c>3&&c<this.options.insertTableMaxSize.col&&a.css({width:c+1+"em"}),u>3&&u<this.options.insertTableMaxSize.row&&a.css({height:u+1+"em"}),i.html(c+" x "+u)},t}(),Qe=function(){function t(t){this.context=t,this.$window=e(window),this.$document=e(document),this.ui=e.summernote.ui,this.$note=t.layoutInfo.note,this.$editor=t.layoutInfo.editor,this.$toolbar=t.layoutInfo.toolbar,this.options=t.options,this.followScroll=this.followScroll.bind(this)}return t.prototype.shouldInitialize=function(){return!this.options.airMode},t.prototype.initialize=function(){var e=this;this.options.toolbar=this.options.toolbar||[],this.options.toolbar.length?this.context.invoke("buttons.build",this.$toolbar,this.options.toolbar):this.$toolbar.hide(),this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.changeContainer(!1),this.$note.on("summernote.keyup summernote.mouseup summernote.change",function(){e.context.invoke("buttons.updateCurrentStyle")}),this.context.invoke("buttons.updateCurrentStyle"),this.options.followingToolbar&&this.$window.on("scroll resize",this.followScroll)},t.prototype.destroy=function(){this.$toolbar.children().remove(),this.options.followingToolbar&&this.$window.off("scroll resize",this.followScroll)},t.prototype.followScroll=function(){if(this.$editor.hasClass("fullscreen"))return!1;var t=this.$toolbar.parent(".note-toolbar-wrapper"),n=this.$editor.outerHeight(),o=this.$editor.width(),i=this.$toolbar.height();t.css({height:i});var r=0;this.options.otherStaticBar&&(r=e(this.options.otherStaticBar).outerHeight());var s=this.$document.scrollTop(),a=this.$editor.offset().top;s>a-r&&s<a+n-r-i?this.$toolbar.css({position:"fixed",top:r,width:o}):this.$toolbar.css({position:"relative",top:0,width:"100%"})},t.prototype.changeContainer=function(e){e?this.$toolbar.prependTo(this.$editor):this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer)},t.prototype.updateFullscreen=function(e){this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"),e),this.changeContainer(e)},t.prototype.updateCodeview=function(e){this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"),e),e?this.deactivate():this.activate()},t.prototype.activate=function(e){var t=this.$toolbar.find("button");e||(t=t.not(".btn-codeview")),this.ui.toggleBtn(t,!0)},t.prototype.deactivate=function(e){var t=this.$toolbar.find("button");e||(t=t.not(".btn-codeview")),this.ui.toggleBtn(t,!1)},t}(),Ze=function(){function t(t){this.context=t,this.ui=e.summernote.ui,this.$body=e(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo,t.memo("help.linkDialog.show",this.options.langInfo.help["linkDialog.show"])}return t.prototype.initialize=function(){var t=this.options.dialogsInBody?this.$body:this.$editor,n=['<div class="form-group note-form-group">','<label class="note-form-label">'+this.lang.link.textToDisplay+"</label>",'<input class="note-link-text form-control note-form-control note-input" type="text" />',"</div>",'<div class="form-group note-form-group">','<label class="note-form-label">'+this.lang.link.url+"</label>",'<input class="note-link-url form-control note-form-control note-input" type="text" value="http://" />',"</div>",this.options.disableLinkTarget?"":e("<div/>").append(this.ui.checkbox({id:"sn-checkbox-open-in-new-window",text:this.lang.link.openInNewWindow,checked:!0}).render()).html()].join(""),o='<button type="submit" href="#" class="btn btn-primary note-btn note-btn-primary note-link-btn" disabled>'+this.lang.link.insert+"</button>";this.$dialog=this.ui.dialog({className:"link-dialog",title:this.lang.link.insert,fade:this.options.dialogsFade,body:n,footer:o}).render().appendTo(t)},t.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},t.prototype.bindEnterKey=function(e,t){e.on("keypress",function(e){e.keyCode===Ae.code.ENTER&&(e.preventDefault(),t.trigger("click"))})},t.prototype.toggleLinkBtn=function(e,t,n){this.ui.toggleBtn(e,t.val()&&n.val())},t.prototype.showLinkDialog=function(t){var n=this;return e.Deferred(function(e){var o=n.$dialog.find(".note-link-text"),i=n.$dialog.find(".note-link-url"),r=n.$dialog.find(".note-link-btn"),s=n.$dialog.find("input[type=checkbox]");n.ui.onDialogShown(n.$dialog,function(){n.context.triggerEvent("dialog.shown"),t.url||(t.url=t.text),o.val(t.text);var a=function(){n.toggleLinkBtn(r,o,i),t.text=o.val()};o.on("input",a).on("paste",function(){setTimeout(a,0)});var l=function(){n.toggleLinkBtn(r,o,i),t.text||o.val(i.val())};i.on("input",l).on("paste",function(){setTimeout(l,0)}).val(t.url),P.isSupportTouch||i.trigger("focus"),n.toggleLinkBtn(r,o,i),n.bindEnterKey(i,r),n.bindEnterKey(o,r);var c=void 0!==t.isNewWindow?t.isNewWindow:n.context.options.linkTargetBlank;s.prop("checked",c),r.one("click",function(r){r.preventDefault(),e.resolve({range:t.range,url:i.val(),text:o.val(),isNewWindow:s.is(":checked")}),n.ui.hideDialog(n.$dialog)})}),n.ui.onDialogHidden(n.$dialog,function(){o.off("input paste keypress"),i.off("input paste keypress"),r.off("click"),"pending"===e.state()&&e.reject()}),n.ui.showDialog(n.$dialog)}).promise()},t.prototype.show=function(){var e=this,t=this.context.invoke("editor.getLinkInfo");this.context.invoke("editor.saveRange"),this.showLinkDialog(t).then(function(t){e.context.invoke("editor.restoreRange"),e.context.invoke("editor.createLink",t)}).fail(function(){e.context.invoke("editor.restoreRange")})},t}(),Je=function(){function t(t){var n=this;this.context=t,this.ui=e.summernote.ui,this.options=t.options,this.events={"summernote.keyup summernote.mouseup summernote.change summernote.scroll":function(){n.update()},"summernote.disable summernote.dialog.shown":function(){n.hide()}}}return t.prototype.shouldInitialize=function(){return!S.isEmpty(this.options.popover.link)},t.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-link-popover",callback:function(e){e.find(".popover-content,.note-popover-content").prepend('<span><a target="_blank"></a>&nbsp;</span>')}}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.link)},t.prototype.destroy=function(){this.$popover.remove()},t.prototype.update=function(){if(this.context.invoke("editor.hasFocus")){var t=this.context.invoke("editor.createRange");if(t.isCollapsed()&&t.isOnAnchor()){var n=Se.ancestor(t.sc,Se.isAnchor),o=e(n).attr("href");this.$popover.find("a").attr("href",o).html(o);var i=Se.posFromPlaceholder(n);this.$popover.css({display:"block",left:i.left,top:i.top})}else this.hide()}else this.hide()},t.prototype.hide=function(){this.$popover.hide()},t}(),et=function(){function t(t){this.context=t,this.ui=e.summernote.ui,this.$body=e(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo}return t.prototype.initialize=function(){var e=this.options.dialogsInBody?this.$body:this.$editor,t="";if(this.options.maximumImageFileSize){var n=Math.floor(Math.log(this.options.maximumImageFileSize)/Math.log(1024)),o=1*(this.options.maximumImageFileSize/Math.pow(1024,n)).toFixed(2)+" "+" KMGTP"[n]+"B";t="<small>"+this.lang.image.maximumFileSize+" : "+o+"</small>"}var i=['<div class="form-group note-form-group note-group-select-from-files">','<label class="note-form-label">'+this.lang.image.selectFromFiles+"</label>",'<input class="note-image-input note-form-control note-input" ',' type="file" name="files" accept="image/*" multiple="multiple" />',t,"</div>",'<div class="form-group note-group-image-url" style="overflow:auto;">','<label class="note-form-label">'+this.lang.image.url+"</label>",'<input class="note-image-url form-control note-form-control note-input ',' col-md-12" type="text" />',"</div>"].join(""),r='<button type="submit" href="#" class="btn btn-primary note-btn note-btn-primary note-image-btn" disabled>'+this.lang.image.insert+"</button>";this.$dialog=this.ui.dialog({title:this.lang.image.insert,fade:this.options.dialogsFade,body:i,footer:r}).render().appendTo(e)},t.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},t.prototype.bindEnterKey=function(e,t){e.on("keypress",function(e){e.keyCode===Ae.code.ENTER&&(e.preventDefault(),t.trigger("click"))})},t.prototype.show=function(){var e=this;this.context.invoke("editor.saveRange"),this.showImageDialog().then(function(t){e.ui.hideDialog(e.$dialog),e.context.invoke("editor.restoreRange"),"string"==typeof t?e.context.invoke("editor.insertImage",t):e.context.invoke("editor.insertImagesOrCallback",t)}).fail(function(){e.context.invoke("editor.restoreRange")})},t.prototype.showImageDialog=function(){var t=this;return e.Deferred(function(e){var n=t.$dialog.find(".note-image-input"),o=t.$dialog.find(".note-image-url"),i=t.$dialog.find(".note-image-btn");t.ui.onDialogShown(t.$dialog,function(){t.context.triggerEvent("dialog.shown"),n.replaceWith(n.clone().on("change",function(t){e.resolve(t.target.files||t.target.value)}).val("")),i.click(function(t){t.preventDefault(),e.resolve(o.val())}),o.on("keyup paste",function(){var e=o.val();t.ui.toggleBtn(i,e)}).val(""),P.isSupportTouch||o.trigger("focus"),t.bindEnterKey(o,i)}),t.ui.onDialogHidden(t.$dialog,function(){n.off("change"),o.off("keyup paste keypress"),i.off("click"),"pending"===e.state()&&e.reject()}),t.ui.showDialog(t.$dialog)})},t}(),tt=function(){function t(t){var n=this;this.context=t,this.ui=e.summernote.ui,this.editable=t.layoutInfo.editable[0],this.options=t.options,this.events={"summernote.disable":function(){n.hide()}}}return t.prototype.shouldInitialize=function(){return!S.isEmpty(this.options.popover.image)},t.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-image-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.image)},t.prototype.destroy=function(){this.$popover.remove()},t.prototype.update=function(e){if(Se.isImg(e)){var t=Se.posFromPlaceholder(e),n=Se.posFromPlaceholder(this.editable);this.$popover.css({display:"block",left:this.options.popatmouse?event.pageX-20:t.left,top:this.options.popatmouse?event.pageY:Math.min(t.top,n.top)})}else this.hide()},t.prototype.hide=function(){this.$popover.hide()},t}(),nt=function(){function t(t){var n=this;this.context=t,this.ui=e.summernote.ui,this.options=t.options,this.events={"summernote.mousedown":function(e,t){n.update(t.target)},"summernote.keyup summernote.scroll summernote.change":function(){n.update()},"summernote.disable":function(){n.hide()}}}return t.prototype.shouldInitialize=function(){return!S.isEmpty(this.options.popover.table)},t.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-table-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.table),P.isFF&&document.execCommand("enableInlineTableEditing",!1,!1)},t.prototype.destroy=function(){this.$popover.remove()},t.prototype.update=function(e){if(this.context.isDisabled())return!1;var t=Se.isCell(e);if(t){var n=Se.posFromPlaceholder(e);this.$popover.css({display:"block",left:n.left,top:n.top})}else this.hide();return t},t.prototype.hide=function(){this.$popover.hide()},t}(),ot=function(){function t(t){this.context=t,this.ui=e.summernote.ui,this.$body=e(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo}return t.prototype.initialize=function(){var e=this.options.dialogsInBody?this.$body:this.$editor,t=['<div class="form-group note-form-group row-fluid">','<label class="note-form-label">'+this.lang.video.url+' <small class="text-muted">'+this.lang.video.providers+"</small></label>",'<input class="note-video-url form-control note-form-control note-input" type="text" />',"</div>"].join(""),n='<button type="submit" href="#" class="btn btn-primary note-btn note-btn-primary note-video-btn" disabled>'+this.lang.video.insert+"</button>";this.$dialog=this.ui.dialog({title:this.lang.video.insert,fade:this.options.dialogsFade,body:t,footer:n}).render().appendTo(e)},t.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},t.prototype.bindEnterKey=function(e,t){e.on("keypress",function(e){e.keyCode===Ae.code.ENTER&&(e.preventDefault(),t.trigger("click"))})},t.prototype.createVideoNode=function(t){var n,o=t.match(/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/),i=t.match(/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/),r=t.match(/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/),s=t.match(/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/),a=t.match(/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/),l=t.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),c=t.match(/\/\/v\.qq\.com.*?vid=(.+)/),u=t.match(/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/),d=t.match(/^.+.(mp4|m4v)$/),p=t.match(/^.+.(ogg|ogv)$/),f=t.match(/^.+.(webm)$/);if(o&&11===o[1].length){var h=o[1];n=e("<iframe>").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+h).attr("width","640").attr("height","360")}else if(i&&i[0].length)n=e("<iframe>").attr("frameborder",0).attr("src","https://instagram.com/p/"+i[1]+"/embed/").attr("width","612").attr("height","710").attr("scrolling","no").attr("allowtransparency","true");else if(r&&r[0].length)n=e("<iframe>").attr("frameborder",0).attr("src",r[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed");else if(s&&s[3].length)n=e("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+s[3]).attr("width","640").attr("height","360");else if(a&&a[2].length)n=e("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+a[2]).attr("width","640").attr("height","360");else if(l&&l[1].length)n=e("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+l[1]);else if(c&&c[1].length||u&&u[2].length){var m=c&&c[1].length?c[1]:u[2];n=e("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","310").attr("width","500").attr("src","http://v.qq.com/iframe/player.html?vid="+m+"&amp;auto=0")}else{if(!(d||p||f))return!1;n=e("<video controls>").attr("src",t).attr("width","640").attr("height","360")}return n.addClass("note-video-clip"),n[0]},t.prototype.show=function(){var e=this,t=this.context.invoke("editor.getSelectedText");this.context.invoke("editor.saveRange"),this.showVideoDialog(t).then(function(t){e.ui.hideDialog(e.$dialog),e.context.invoke("editor.restoreRange");var n=e.createVideoNode(t);n&&e.context.invoke("editor.insertNode",n)}).fail(function(){e.context.invoke("editor.restoreRange")})},t.prototype.showVideoDialog=function(t){var n=this;return e.Deferred(function(e){var o=n.$dialog.find(".note-video-url"),i=n.$dialog.find(".note-video-btn");n.ui.onDialogShown(n.$dialog,function(){n.context.triggerEvent("dialog.shown"),o.val(t).on("input",function(){n.ui.toggleBtn(i,o.val())}),P.isSupportTouch||o.trigger("focus"),i.click(function(t){t.preventDefault(),e.resolve(o.val())}),n.bindEnterKey(o,i)}),n.ui.onDialogHidden(n.$dialog,function(){o.off("input"),i.off("click"),"pending"===e.state()&&e.reject()}),n.ui.showDialog(n.$dialog)})},t}(),it=function(){function t(t){this.context=t,this.ui=e.summernote.ui,this.$body=e(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo}return t.prototype.initialize=function(){var e=this.options.dialogsInBody?this.$body:this.$editor,t=['<p class="text-center">','<a href="http://summernote.org/" target="_blank">Summernote 0.8.10</a> · ','<a href="https://github.com/summernote/summernote" target="_blank">Project</a> · ','<a href="https://github.com/summernote/summernote/issues" target="_blank">Issues</a>',"</p>"].join("");this.$dialog=this.ui.dialog({title:this.lang.options.help,fade:this.options.dialogsFade,body:this.createShortcutList(),footer:t,callback:function(e){e.find(".modal-body,.note-modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo(e)},t.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},t.prototype.createShortcutList=function(){var t=this,n=this.options.keyMap[P.isMac?"mac":"pc"];return Object.keys(n).map(function(o){var i=n[o],r=e('<div><div class="help-list-item"/></div>');return r.append(e("<label><kbd>"+o+"</kdb></label>").css({width:180,"margin-right":10})).append(e("<span/>").html(t.context.memo("help."+i)||i)),r.html()}).join("")},t.prototype.showHelpDialog=function(){var t=this;return e.Deferred(function(e){t.ui.onDialogShown(t.$dialog,function(){t.context.triggerEvent("dialog.shown"),e.resolve()}),t.ui.showDialog(t.$dialog)}).promise()},t.prototype.show=function(){var e=this;this.context.invoke("editor.saveRange"),this.showHelpDialog().then(function(){e.context.invoke("editor.restoreRange")})},t}(),rt=function(){function t(t){var n=this;this.context=t,this.ui=e.summernote.ui,this.options=t.options,this.events={"summernote.keyup summernote.mouseup summernote.scroll":function(){n.update()},"summernote.disable summernote.change summernote.dialog.shown":function(){n.hide()},"summernote.focusout":function(e,t){P.isFF||t.relatedTarget&&Se.ancestor(t.relatedTarget,y.eq(n.$popover[0]))||n.hide()}}}return t.prototype.shouldInitialize=function(){return this.options.airMode&&!S.isEmpty(this.options.popover.air)},t.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-air-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content");this.context.invoke("buttons.build",e,this.options.popover.air)},t.prototype.destroy=function(){this.$popover.remove()},t.prototype.update=function(){var e=this.context.invoke("editor.currentStyle");if(e.range&&!e.range.isCollapsed()){var t=S.last(e.range.getClientRects());if(t){var n=y.rect2bnd(t);this.$popover.css({display:"block",left:Math.max(n.left+n.width/2,0)-20,top:n.top+n.height}),this.context.invoke("buttons.updateCurrentStyle",this.$popover)}}else this.hide()},t.prototype.hide=function(){this.$popover.hide()},t}(),st=function(){function t(t){var n=this;this.context=t,this.ui=e.summernote.ui,this.$editable=t.layoutInfo.editable,this.options=t.options,this.hint=this.options.hint||[],this.direction=this.options.hintDirection||"bottom",this.hints=e.isArray(this.hint)?this.hint:[this.hint],this.events={"summernote.keyup":function(e,t){t.isDefaultPrevented()||n.handleKeyup(t)},"summernote.keydown":function(e,t){n.handleKeydown(t)},"summernote.disable summernote.dialog.shown":function(){n.hide()}}}return t.prototype.shouldInitialize=function(){return this.hints.length>0},t.prototype.initialize=function(){var t=this;this.lastWordRange=null,this.$popover=this.ui.popover({className:"note-hint-popover",hideArrow:!0,direction:""}).render().appendTo(this.options.container),this.$popover.hide(),this.$content=this.$popover.find(".popover-content,.note-popover-content"),this.$content.on("click",".note-hint-item",function(){t.$content.find(".active").removeClass("active"),e(t).addClass("active"),t.replace()})},t.prototype.destroy=function(){this.$popover.remove()},t.prototype.selectItem=function(e){this.$content.find(".active").removeClass("active"),e.addClass("active"),this.$content[0].scrollTop=e[0].offsetTop-this.$content.innerHeight()/2},t.prototype.moveDown=function(){var e=this.$content.find(".note-hint-item.active"),t=e.next();if(t.length)this.selectItem(t);else{var n=e.parent().next();n.length||(n=this.$content.find(".note-hint-group").first()),this.selectItem(n.find(".note-hint-item").first())}},t.prototype.moveUp=function(){var e=this.$content.find(".note-hint-item.active"),t=e.prev();if(t.length)this.selectItem(t);else{var n=e.parent().prev();n.length||(n=this.$content.find(".note-hint-group").last()),this.selectItem(n.find(".note-hint-item").last())}},t.prototype.replace=function(){var e=this.$content.find(".note-hint-item.active");if(e.length){var t=this.nodeFromItem(e);this.lastWordRange.insertNode(t),Le.createFromNode(t).collapse().select(),this.lastWordRange=null,this.hide(),this.context.triggerEvent("change",this.$editable.html(),this.$editable[0]),this.context.invoke("editor.focus")}},t.prototype.nodeFromItem=function(e){var t=this.hints[e.data("index")],n=e.data("item"),o=t.content?t.content(n):n;return"string"==typeof o&&(o=Se.createText(o)),o},t.prototype.createItemTemplates=function(t,n){var o=this.hints[t];return n.map(function(n,i){var r=e('<div class="note-hint-item"/>');return r.append(o.template?o.template(n):n+""),r.data({index:t,item:n}),r})},t.prototype.handleKeydown=function(e){this.$popover.is(":visible")&&(e.keyCode===Ae.code.ENTER?(e.preventDefault(),this.replace()):e.keyCode===Ae.code.UP?(e.preventDefault(),this.moveUp()):e.keyCode===Ae.code.DOWN&&(e.preventDefault(),this.moveDown()))},t.prototype.searchKeyword=function(e,t,n){var o=this.hints[e];if(o&&o.match.test(t)&&o.search){var i=o.match.exec(t);o.search(i[1],n)}else n()},t.prototype.createGroup=function(t,n){var o=this,i=e('<div class="note-hint-group note-hint-group-'+t+'"/>');return this.searchKeyword(t,n,function(e){(e=e||[]).length&&(i.html(o.createItemTemplates(t,e)),o.show())}),i},t.prototype.handleKeyup=function(e){var t=this;if(!S.contains([Ae.code.ENTER,Ae.code.UP,Ae.code.DOWN],e.keyCode)){var n=this.context.invoke("editor.createRange").getWordRange(),o=n.toString();if(this.hints.length&&o){this.$content.empty();var i=y.rect2bnd(S.last(n.getClientRects()));i&&(this.$popover.hide(),this.lastWordRange=n,this.hints.forEach(function(e,n){e.match.test(o)&&t.createGroup(n,o).appendTo(t.$content)}),this.$content.find(".note-hint-item:first").addClass("active"),"top"===this.direction?this.$popover.css({left:i.left,top:i.top-this.$popover.outerHeight()-5}):this.$popover.css({left:i.left,top:i.top+i.height+5}))}else this.hide()}},t.prototype.show=function(){this.$popover.show()},t.prototype.hide=function(){this.$popover.hide()},t}(),at=function(){function t(t,n){this.ui=e.summernote.ui,this.$note=t,this.memos={},this.modules={},this.layoutInfo={},this.options=n,this.initialize()}return t.prototype.initialize=function(){return this.layoutInfo=this.ui.createLayout(this.$note,this.options),this._initialize(),this.$note.hide(),this},t.prototype.destroy=function(){this._destroy(),this.$note.removeData("summernote"),this.ui.removeLayout(this.$note,this.layoutInfo)},t.prototype.reset=function(){var e=this.isDisabled();this.code(Se.emptyPara),this._destroy(),this._initialize(),e&&this.disable()},t.prototype._initialize=function(){var t=this,n=e.extend({},this.options.buttons);Object.keys(n).forEach(function(e){t.memo("button."+e,n[e])});var o=e.extend({},this.options.modules,e.summernote.plugins||{});Object.keys(o).forEach(function(e){t.module(e,o[e],!0)}),Object.keys(this.modules).forEach(function(e){t.initializeModule(e)})},t.prototype._destroy=function(){var e=this;Object.keys(this.modules).reverse().forEach(function(t){e.removeModule(t)}),Object.keys(this.memos).forEach(function(t){e.removeMemo(t)}),this.triggerEvent("destroy",this)},t.prototype.code=function(e){var t=this.invoke("codeview.isActivated");if(void 0===e)return this.invoke("codeview.sync"),t?this.layoutInfo.codable.val():this.layoutInfo.editable.html();t?this.layoutInfo.codable.val(e):this.layoutInfo.editable.html(e),this.$note.val(e),this.triggerEvent("change",e)},t.prototype.isDisabled=function(){return"false"===this.layoutInfo.editable.attr("contenteditable")},t.prototype.enable=function(){this.layoutInfo.editable.attr("contenteditable",!0),this.invoke("toolbar.activate",!0),this.triggerEvent("disable",!1)},t.prototype.disable=function(){this.invoke("codeview.isActivated")&&this.invoke("codeview.deactivate"),this.layoutInfo.editable.attr("contenteditable",!1),this.invoke("toolbar.deactivate",!0),this.triggerEvent("disable",!0)},t.prototype.triggerEvent=function(){var e=S.head(arguments),t=S.tail(S.from(arguments)),n=this.options.callbacks[y.namespaceToCamel(e,"on")];n&&n.apply(this.$note[0],t),this.$note.trigger("summernote."+e,t)},t.prototype.initializeModule=function(e){var t=this.modules[e];t.shouldInitialize=t.shouldInitialize||y.ok,t.shouldInitialize()&&(t.initialize&&t.initialize(),t.events&&Se.attachEvents(this.$note,t.events))},t.prototype.module=function(e,t,n){if(1===arguments.length)return this.modules[e];this.modules[e]=new t(this),n||this.initializeModule(e)},t.prototype.removeModule=function(e){var t=this.modules[e];t.shouldInitialize()&&(t.events&&Se.detachEvents(this.$note,t.events),t.destroy&&t.destroy()),delete this.modules[e]},t.prototype.memo=function(e,t){if(1===arguments.length)return this.memos[e];this.memos[e]=t},t.prototype.removeMemo=function(e){this.memos[e]&&this.memos[e].destroy&&this.memos[e].destroy(),delete this.memos[e]},t.prototype.createInvokeHandlerAndUpdateState=function(e,t){var n=this;return function(o){n.createInvokeHandler(e,t)(o),n.invoke("buttons.updateCurrentStyle")}},t.prototype.createInvokeHandler=function(t,n){var o=this;return function(i){i.preventDefault();var r=e(i.target);o.invoke(t,n||r.closest("[data-value]").data("value"),r)}},t.prototype.invoke=function(){var e=S.head(arguments),t=S.tail(S.from(arguments)),n=e.split("."),o=n.length>1,i=o&&S.head(n),r=o?S.last(n):S.head(n),s=this.modules[i||"editor"];return!i&&this[r]?this[r].apply(this,t):s&&s[r]&&s.shouldInitialize()?s[r].apply(s,t):void 0},t}();e.fn.extend({summernote:function(){var t=e.type(S.head(arguments)),n="string"===t,o="object"===t,i=e.extend({},e.summernote.options,o?S.head(arguments):{});i.langInfo=e.extend(!0,{},e.summernote.lang["en-US"],e.summernote.lang[i.lang]),i.icons=e.extend(!0,{},e.summernote.options.icons,i.icons),i.tooltip="auto"===i.tooltip?!P.isSupportTouch:i.tooltip,this.each(function(t,n){var o=e(n);if(!o.data("summernote")){var r=new at(o,i);o.data("summernote",r),o.data("summernote").triggerEvent("init",r.layoutInfo)}});var r=this.first();if(r.length){var s=r.data("summernote");if(n)return s.invoke.apply(s,S.from(arguments));i.focus&&s.invoke("editor.focus")}return this}}),e.summernote=e.extend(e.summernote,{version:"0.8.10",ui:g,dom:Se,plugins:{},options:{modules:{editor:Be,clipboard:Oe,dropzone:ze,codeview:qe,statusbar:Ue,fullscreen:_e,handle:We,hintPopover:st,autoLink:Ke,autoSync:Ge,placeholder:Xe,buttons:Ye,toolbar:Qe,linkDialog:Ze,linkPopover:Je,imageDialog:et,imagePopover:tt,tablePopover:nt,videoDialog:ot,helpDialog:it,airPopover:rt},buttons:{},lang:"en-US",followingToolbar:!0,otherStaticBar:"",toolbar:[["style",["style"]],["font",["bold","underline","clear"]],["fontname",["fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["link","picture","video"]],["view",["fullscreen","codeview","help"]]],popatmouse:!0,popover:{image:[["imagesize",["imageSize100","imageSize50","imageSize25"]],["float",["floatLeft","floatRight","floatNone"]],["remove",["removeMedia"]]],link:[["link",["linkDialogShow","unlink"]]],table:[["add",["addRowDown","addRowUp","addColLeft","addColRight"]],["delete",["deleteRow","deleteCol","deleteTable"]]],air:[["color",["color"]],["font",["bold","underline","clear"]],["para",["ul","paragraph"]],["table",["table"]],["insert",["link","picture"]]]},airMode:!1,width:null,height:null,linkTargetBlank:!0,focus:!1,tabSize:4,styleWithSpan:!0,shortcuts:!0,textareaAutoSync:!0,hintDirection:"bottom",tooltip:"auto",container:"body",maxTextLength:0,styleTags:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Helvetica Neue","Helvetica","Impact","Lucida Grande","Tahoma","Times New Roman","Verdana"],fontSizes:["8","9","10","11","12","14","18","24","36"],colors:[["#000000","#424242","#636363","#9C9C94","#CEC6CE","#EFEFEF","#F7F7F7","#FFFFFF"],["#FF0000","#FF9C00","#FFFF00","#00FF00","#00FFFF","#0000FF","#9C00FF","#FF00FF"],["#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE"],["#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD"],["#E76363","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5"],["#CE0000","#E79439","#EFC631","#6BA54A","#4A7B8C","#3984C6","#634AA5","#A54A7B"],["#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842"],["#630000","#7B3900","#846300","#295218","#083139","#003163","#21104A","#4A1031"]],colorsName:[["Black","Tundora","Dove Gray","Star Dust","Pale Slate","Gallery","Alabaster","White"],["Red","Orange Peel","Yellow","Green","Cyan","Blue","Electric Violet","Magenta"],["Azalea","Karry","Egg White","Zanah","Botticelli","Tropical Blue","Mischka","Twilight"],["Tonys Pink","Peach Orange","Cream Brulee","Sprout","Casper","Perano","Cold Purple","Careys Pink"],["Mandy","Rajah","Dandelion","Olivine","Gulf Stream","Viking","Blue Marguerite","Puce"],["Guardsman Red","Fire Bush","Golden Dream","Chelsea Cucumber","Smalt Blue","Boston Blue","Butterfly Bush","Cadillac"],["Sangria","Mai Tai","Buddha Gold","Forest Green","Eden","Venice Blue","Meteorite","Claret"],["Rosewood","Cinnamon","Olive","Parsley","Tiber","Midnight Blue","Valentino","Loulou"]],lineHeights:["1.0","1.2","1.4","1.5","1.6","1.8","2.0","3.0"],tableClassName:"table table-bordered",insertTableMaxSize:{col:10,row:10},dialogsInBody:!1,dialogsFade:!1,maximumImageFileSize:null,callbacks:{onInit:null,onFocus:null,onBlur:null,onBlurCodeview:null,onEnter:null,onKeyup:null,onKeydown:null,onImageUpload:null,onImageUploadError:null},codemirror:{mode:"text/html",htmlMode:!0,lineNumbers:!0},keyMap:{pc:{ENTER:"insertParagraph","CTRL+Z":"undo","CTRL+Y":"redo",TAB:"tab","SHIFT+TAB":"untab","CTRL+B":"bold","CTRL+I":"italic","CTRL+U":"underline","CTRL+SHIFT+S":"strikethrough","CTRL+BACKSLASH":"removeFormat","CTRL+SHIFT+L":"justifyLeft","CTRL+SHIFT+E":"justifyCenter","CTRL+SHIFT+R":"justifyRight","CTRL+SHIFT+J":"justifyFull","CTRL+SHIFT+NUM7":"insertUnorderedList","CTRL+SHIFT+NUM8":"insertOrderedList","CTRL+LEFTBRACKET":"outdent","CTRL+RIGHTBRACKET":"indent","CTRL+NUM0":"formatPara","CTRL+NUM1":"formatH1","CTRL+NUM2":"formatH2","CTRL+NUM3":"formatH3","CTRL+NUM4":"formatH4","CTRL+NUM5":"formatH5","CTRL+NUM6":"formatH6","CTRL+ENTER":"insertHorizontalRule","CTRL+K":"linkDialog.show"},mac:{ENTER:"insertParagraph","CMD+Z":"undo","CMD+SHIFT+Z":"redo",TAB:"tab","SHIFT+TAB":"untab","CMD+B":"bold","CMD+I":"italic","CMD+U":"underline","CMD+SHIFT+S":"strikethrough","CMD+BACKSLASH":"removeFormat","CMD+SHIFT+L":"justifyLeft","CMD+SHIFT+E":"justifyCenter","CMD+SHIFT+R":"justifyRight","CMD+SHIFT+J":"justifyFull","CMD+SHIFT+NUM7":"insertUnorderedList","CMD+SHIFT+NUM8":"insertOrderedList","CMD+LEFTBRACKET":"outdent","CMD+RIGHTBRACKET":"indent","CMD+NUM0":"formatPara","CMD+NUM1":"formatH1","CMD+NUM2":"formatH2","CMD+NUM3":"formatH3","CMD+NUM4":"formatH4","CMD+NUM5":"formatH5","CMD+NUM6":"formatH6","CMD+ENTER":"insertHorizontalRule","CMD+K":"linkDialog.show"}},icons:{align:"note-icon-align",alignCenter:"note-icon-align-center",alignJustify:"note-icon-align-justify",alignLeft:"note-icon-align-left",alignRight:"note-icon-align-right",rowBelow:"note-icon-row-below",colBefore:"note-icon-col-before",colAfter:"note-icon-col-after",rowAbove:"note-icon-row-above",rowRemove:"note-icon-row-remove",colRemove:"note-icon-col-remove",indent:"note-icon-align-indent",outdent:"note-icon-align-outdent",arrowsAlt:"note-icon-arrows-alt",bold:"note-icon-bold",caret:"note-icon-caret",circle:"note-icon-circle",close:"note-icon-close",code:"note-icon-code",eraser:"note-icon-eraser",font:"note-icon-font",frame:"note-icon-frame",italic:"note-icon-italic",link:"note-icon-link",unlink:"note-icon-chain-broken",magic:"note-icon-magic",menuCheck:"note-icon-menu-check",minus:"note-icon-minus",orderedlist:"note-icon-orderedlist",pencil:"note-icon-pencil",picture:"note-icon-picture",question:"note-icon-question",redo:"note-icon-redo",square:"note-icon-square",strikethrough:"note-icon-strikethrough",subscript:"note-icon-subscript",superscript:"note-icon-superscript",table:"note-icon-table",textHeight:"note-icon-text-height",trash:"note-icon-trash",underline:"note-icon-underline",undo:"note-icon-undo",unorderedlist:"note-icon-unorderedlist",video:"note-icon-video"}}})}),define("summernote.loader",["jquery","app/init","summernote"],(e,t)=>{"use strict";return e.extend(e.summernote.plugins,{lengthField:function(t){e.summernote.ui,t.memo("button.lengthField",()=>e("<kbd>",{class:["text-right","txt-color"].join(" ")}));let n=e=>{let n=t.options.maxTextLength,o=e.length,i=t.layoutInfo.toolbar.find("kbd"),r=n-o;i.text(r).data("charCount",r),i.toggleClass("txt-color-red",n<=o),t.layoutInfo.toolbar.find(".btn-save").prop("disabled",n<o)};this.events={"summernote.init":function(e,o){n(t.$note.summernote("code"))},"summernote.change":function(e,t){n(t)}}}}),e.extend(e.summernote.plugins,{discardBtn:function(t){let n=e.summernote.ui;t.memo("button.discardBtn",()=>{let o=n.button({contents:'<i class="fas fa-fw fa-ban"/>',container:"body",click:function(){e(this).confirmation("show")}}).render(),i={placement:"top",title:"discard changes",btnCancelIcon:"",btnOkClass:"btn btn-sm btn-warning",btnOkLabel:"discard",btnOkIcon:"fas fa-fw fa-ban",onConfirm:(e,n)=>{t.$note.summernote("reset"),t.$note.summernote("destroy")}};return o.confirmation(i),o})}}),{initSummernote:(t,n)=>{n=e.extend({},{dialogsInBody:!0,dialogsFade:!0,styleTags:["p","h2","h3","blockquote"],linkTargetBlank:!0,tableClassName:"table table-condensed table-bordered",insertTableMaxSize:{col:5,row:5},icons:{alignCenter:"fas fa-align-center",alignJustify:"fas fa-align-justify",alignLeft:"fas fa-align-left",alignRight:"fas fa-align-right",indent:"fas fa-indent",outdent:"fas fa-outdent",arrowsAlt:"fas fa-expand-arrows-alt",bold:"fas fa-bold",caret:"fas fa-caret-down",circle:"fas fa-circle",close:"fas fa-time",code:"fas fa-code",eraser:"fas fa-eraser",font:"fas fa-font",italic:"fas fa-italic",link:"fas fa-link",unlink:"fas fa-unlink",magic:"fas fa-magic",menuCheck:"fas fa-check",minus:"fas fa-minus",orderedlist:"fas fa-list-ol",pencil:"fa-pen",picture:"fas fa-image",question:"fas fa-question",redo:"fas fa-redo",square:"fas fa-square",strikethrough:"fas fa-strikethrough",subscript:"fas fa-subscript",superscript:"fas fa-superscript",table:"fas fa-table",textHeight:"fas fa-text-height",trash:"fas fa-trash",underline:"fas fa-underline",undo:"fas fa-undo",unorderedlist:"fas fa-list-ul",video:"fab fa-youtube"},colors:[["#5cb85c","#e28a0d","#d9534f","#e06fdf","#9fa8da","#e2ce48","#428bca"]],colorsName:[["Green","Orange","Red","Pink","Indigo","Yellow","Blue"]]},n),t.summernote(n)}}}),define("text",["module"],function(e){"use strict";var t,n,o,i,r,s=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],a=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,l=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,c="undefined"!=typeof location&&location.href,u=c&&location.protocol&&location.protocol.replace(/\:/,""),d=c&&location.hostname,p=c&&(location.port||void 0),f={},h=e.config&&e.config()||{};return t={version:"2.0.12",strip:function(e){if(e){var t=(e=e.replace(a,"")).match(l);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:h.createXhr||function(){var e,t,n;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(t=0;t<3;t+=1){n=s[t];try{e=new ActiveXObject(n)}catch(e){}if(e){s=[n];break}}return e},parseName:function(e){var t,n,o,i=!1,r=e.indexOf("."),s=0===e.indexOf("./")||0===e.indexOf("../");return-1!==r&&(!s||r>1)?(t=e.substring(0,r),n=e.substring(r+1,e.length)):t=e,-1!==(r=(o=n||t).indexOf("!"))&&(i="strip"===o.substring(r+1),o=o.substring(0,r),n?n=o:t=o),{moduleName:t,ext:n,strip:i}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,o,i){var r,s,a,l=t.xdRegExp.exec(e);return!l||(r=l[2],a=(s=(s=l[3]).split(":"))[1],s=s[0],!(r&&r!==n||s&&s.toLowerCase()!==o.toLowerCase()||(a||s)&&a!==i))},finishLoad:function(e,n,o,i){o=n?t.strip(o):o,h.isBuild&&(f[e]=o),i(o)},load:function(e,n,o,i){if(i&&i.isBuild&&!i.inlineText)o();else{h.isBuild=i&&i.isBuild;var r=t.parseName(e),s=r.moduleName+(r.ext?"."+r.ext:""),a=n.toUrl(s),l=h.useXhr||t.useXhr;0!==a.indexOf("empty:")?!c||l(a,u,d,p)?t.get(a,function(n){t.finishLoad(e,r.strip,n,o)},function(e){o.error&&o.error(e)}):n([s],function(e){t.finishLoad(r.moduleName+"."+r.ext,r.strip,e,o)}):o()}},write:function(e,n,o,i){if(f.hasOwnProperty(n)){var r=t.jsEscape(f[n]);o.asModule(e+"!"+n,"define(function () { return '"+r+"';});\n")}},writeFile:function(e,n,o,i,r){var s=t.parseName(n),a=s.ext?"."+s.ext:"",l=s.moduleName+a,c=o.toUrl(s.moduleName+a)+".js";t.load(l,o,function(n){var o=function(e){return i(c,e)};o.asModule=function(e,t){return i.asModule(e,c,t)},t.write(e,l,o,r)},r)}},"node"===h.env||!h.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]?(n=require.nodeRequire("fs"),t.get=function(e,t,o){try{var i=n.readFileSync(e,"utf8");0===i.indexOf("\ufeff")&&(i=i.substring(1)),t(i)}catch(e){o&&o(e)}}):"xhr"===h.env||!h.env&&t.createXhr()?t.get=function(e,n,o,i){var r,s=t.createXhr();if(s.open("GET",e,!0),i)for(r in i)i.hasOwnProperty(r)&&s.setRequestHeader(r.toLowerCase(),i[r]);h.onXhr&&h.onXhr(s,e),s.onreadystatechange=function(t){var i,r;4===s.readyState&&((i=s.status||0)>399&&i<600?((r=new Error(e+" HTTP status: "+i)).xhr=s,o&&o(r)):n(s.responseText),h.onXhrComplete&&h.onXhrComplete(s,e))},s.send(null)}:"rhino"===h.env||!h.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?t.get=function(e,t){var n,o,i=new java.io.File(e),r=java.lang.System.getProperty("line.separator"),s=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(i),"utf-8")),a="";try{for(n=new java.lang.StringBuffer,(o=s.readLine())&&o.length()&&65279===o.charAt(0)&&(o=o.substring(1)),null!==o&&n.append(o);null!==(o=s.readLine());)n.append(r),n.append(o);a=String(n.toString())}finally{s.close()}t(a)}:("xpconnect"===h.env||!h.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(o=Components.classes,i=Components.interfaces,Components.utils.import("resource://gre/modules/FileUtils.jsm"),r="@mozilla.org/windows-registry-key;1"in o,t.get=function(e,t){var n,s,a,l={};r&&(e=e.replace(/\//g,"\\")),a=new FileUtils.File(e);try{(n=o["@mozilla.org/network/file-input-stream;1"].createInstance(i.nsIFileInputStream)).init(a,1,0,!1),(s=o["@mozilla.org/intl/converter-input-stream;1"].createInstance(i.nsIConverterInputStream)).init(n,"utf-8",n.available(),i.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),s.readString(n.available(),l),s.close(),n.close(),t(l.value)}catch(e){throw new Error((a&&a.path||"")+": "+e)}}),t});
//# sourceMappingURL=summernote.loader.js.map