// Copyright 2013-2015 Evernote Corp. All rights reserved.
// http://www.evernote.com

window.enLoadState = 'willLoad';
try {(function(){ var n,aa=this;
function ca(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==
b&&"undefined"==typeof a.call)return"object";return b}function v(a){return"string"==typeof a}function da(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ea(a,b){var c=a.split("."),d=aa;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var f;c.length&&(f=c.shift());)c.length||void 0===b?d=d[f]?d[f]:d[f]={}:d[f]=b}
function fa(a,b){function c(){}c.prototype=b.prototype;a.Lb=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Rf=function(a,c,e){for(var h=Array(arguments.length-2),k=2;k<arguments.length;k++)h[k-2]=arguments[k];return b.prototype[c].apply(a,h)}};var w;
(function(){function a(){}var b;window.evernoteClient&&(b=function(a){window.evernoteClient.log(Array.prototype.slice.call(arguments).join(" "))});if(b)w={log:b,info:b.bind(null,"INFO:"),warn:b.bind(null,"WARN:"),error:b.bind(null,"ERROR:")};else try{w={},w.log=window.console.log.bind(window.console),w.info=window.console.info.bind(window.console),w.warn=window.console.warn.bind(window.console),w.error=window.console.error.bind(window.console),w.trace=window.console.trace.bind(window.console),w.time=
window.console.time.bind(window.console),w.timeEnd=window.console.timeEnd.bind(window.console)}catch(c){w=window.console}w.time||(w.time=a);w.timeEnd||(w.timeEnd=a);w.trace||(w.trace=a);var d={};w.pe=function(a,b){var c={Cc:window.performance?window.performance.now():(new Date).getTime(),gb:Array.prototype.slice.call(arguments,1).join(" ")||""};d[a]?d[a].push(c):d[a]=[c]};w.bg=function(a,b){d[a]=[];w.pe.apply(this,arguments)};w.ag=function(a,b){function c(a){a=a.toString();var b=a.indexOf(".");return 0>
b?a:a.substring(0,b+4)}w.pe.apply(this,arguments);for(var k=d[a],g=k[k.length-1].Cc-k[0].Cc,l=1;l<k.length;l++){var m=k[l].Cc-k[l-1].Cc;w.log("\u25fc "+a+"."+l+": "+c(m)+"ms ("+Math.round(100*m/g)+"% of "+c(g)+"ms full time)",k[l].gb?"<-":"",k[l].gb)}d[a]=[]}}).call(aa);function x(a,b){if(!a){var c="Assertion failed! "+Array.prototype.slice.call(arguments,1).join(" ");w.error(c);throw c;}}function ga(a){try{var b=JSON.stringify(a)}catch(c){return a.toString()}return b}
function ha(a){if(a instanceof Text)return"<TextNode:"+ga(a.textContent)+">";if(a instanceof Element)return"<Element:"+a.outerHTML.replace(/^<(.*?)>[\s\S]*$/gi,"$1")+">";if(a instanceof Range){var b=document.createElement("div");b.appendChild(a.cloneContents());return"<Range:"+ha(a.startContainer)+":"+a.startOffset+","+ha(a.endContainer)+":"+a.endOffset+(a.collapsed?" collapsed":" not collapsed")+" "+ga(b.innerHTML)+">"}return"<"+typeof a+":"+ga(a)+">"}
function ia(a){var b="g";x(!!a,"<$>");a instanceof RegExp&&("undefined"===typeof b&&(b=(a.global?"g":"")+(a.ignoreCase?"i":"")+(a.multiline?"m":"")),a=a.source);"undefined"===typeof b&&(b="g");0<=a.indexOf("[:")&&(a=a.replace(/\[:punct:\]/gi,/\!\#\$\%\&\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\{\|\}\~\'\`\"/.source),a=a.replace(/\[:secpunct:\]/gi,/\!\#\$\%\&\*\+\-\/\<\=\>\?\\\^\_\|\~/.source),a=a.replace(/\[:lower:\]/gi,"a-z"),a=a.replace(/\[:upper:\]/gi,"A-Z"),a=a.replace(/\[:digit:\]/gi,"0-9"));
return new RegExp(a,b)}function ja(a){return a instanceof RegExp?a.source:a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function ka(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'"};Object.keys(b).forEach(function(c){var d=b[c];a=a.replace(ia(c),d)});return a}function la(a){var b={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"};Object.keys(b).forEach(function(c){var d=b[c];a=a.replace(ia(c),d)});return a}
function y(a,b){var c;if(a&&b)if(void 0!==a.length){c=0;for(var d=a.length;c<d&&b.call(a,a[c],c)!==ma;c++);}else"object"===typeof a&&(c=null,c=Object.keys(a),c.every(function(d){return b.call(a,d,a[d])===ma?!1:!0}))}var ma={};
function na(a,b,c){null==c&&(c=!0);null==a&&(a={});v(a)&&(a=JSON.parse(a)||{});x(oa(a),"Options of wrong type");if(b){x(oa(b),"Defaults of wrong type");var d,f=Object.keys(b);for(d in a)a.hasOwnProperty(d)&&!(0<=f.indexOf(d))&&c&&w.warn("Key",ga(d),"not supported! Seen in:",a);for(d in b)"undefined"===typeof a[d]&&(a[d]=b[d])}return a}function z(a,b){var c=a.length||0,d=[];if(b)for(;c;)d.push(a[--c]);else for(;c;)d.unshift(a[--c]);return d}
function pa(a,b,c){null==b||qa(b)?w.warn("Listener setup for",a,"had no types!"):y(b.toLowerCase().split(/[\s,]+/gi),function(b){ra(a,b,c)})}function sa(a,b,c){if(qa(b))return null;b?y(b.toLowerCase().split(/[\s,]+/gi),function(b){try{ta(a,b,c)}catch(f){c&&(a.removeEventListener(b,c,!1),a.removeEventListener(b,c,!0))}}):ta(a)}function ua(a,b){A(a,"TABLE_CELL_COLOR",b)}function qa(a){return v(a)?0===a.length||/^[\x00-\x20\s]*$/g.test(a):!1}var va=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?((?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))))(?::\d{2,5})?(?:\/\S*)?$/gi;
function ya(a){va.lastIndex=0;return v(a)&&va.test(a.trim())}function oa(a){return!!a&&"object"===ca(a)}function za(a){var b=a.indexOf(">"),c=a.lastIndexOf("<");return 0>b||0>c?a:a.substring(b+1,c)}function Aa(a){var b;if(v(a))b=document.createElement("div"),b.textContent=a;else if(a instanceof Node)b=a.ownerDocument.createElement("div"),b.appendChild(a.cloneNode(!0));else throw"Illegal argument type for en.toHTML";return za(b.outerHTML)}var Ba=1;function Ca(a){window.setTimeout(a,0)}
function Da(a,b){var c;try{c=a()}catch(d){w.error("Exception:",d.toString()),b&&b(d)}return c}Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return f.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!==typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var d=Array.prototype.slice.call(arguments,1),f=this;c.prototype=this.prototype;b.prototype=new c;return b});
function Ea(){return!1}function B(){return!0}var Ga=window.onerror;window.onerror=function(a,b,c){var d=!1;Ga&&(d=Ga(a,b,c));w.error("Uncaught error in JS:",a.toString(),b,c);return d};var Ha="style bgcolor title lang dir text".split(" "),Ia="address article aside body blockquote caption center col colgroup dd details dir div dl dt fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 header hgroup hr li listing menu nav ol p plaintext pre section summary table tbody td tfoot th thead tr ul xmp".split(" "),Ja="a abbr b bdi bdo cite code dfn em h1 h2 h3 h4 h5 h6 i kbd mark p pre q rp rt ruby s samp small span strong sub sup u var acronym listing strike xmp big blink font marquee nobr tt".split(" "),
La="margin-left margin-right font-family font-size font-weight text-align color direction background-color font-style text-decoration vertical-alignment line-height".split(" "),Ma=["0","0px","none","initial"],Na=Ja.join(","),Oa=Ia.join(",");function Pa(){function a(a){x(v(a)&&a===a.toLowerCase(),"Command name has to be lower case only.");var d=a.lastIndexOf("."),f=[];if(-1===d)(a=b[a])&&(f=a.filter(function(a){return!0!==a.Fa}));else{var e=a.substring(0,d);(a=b[a.substring(d+1)])&&(f=a.filter(function(a){return a.xb&&-1!==a.xb.indexOf(e)}))}return f}var b={};this.Af=function(a){x(oa(a),"We require command to be an object:",a);var d=a.name;x(v(d)&&1<d.length&&!!d.match(/[a-z]+/gi),"Invalid name for command:",ga(d));a.action&&x(!!a.enabled,
'We require command to have "enabled" state:',a.name);x(!!(a.action||a.value||a.state),'We require command to have one of "action", "value" or "state":',a.name);x(!a.xb||"array"==ca(a.xb),"We require command groups to be an Array:",a.name);var f=b[d];f||(f=[],b[d]=f);x("array"==ca(f),"Expected list for commands");f.push(a)};this.Le=function(a){if(a&&b)for(var d=Object.keys(b||{}),f=0;f<d.length;f++){var e=d[f],h=b[e];if(h)for(var k=h.length-1;0<=k;k--){var g=h[k];g&&a(g)&&(h.splice(k,1),0>=h.length?
delete b[e]:b[e]=h)}}else b={}};this.action=function(b,d){var f=null;Da(function(){var e=a(b);if(e)for(var h=0;h<e.length;h++){var k=e[h];if(k.action&&k&&k.enabled&&!0===k.enabled.call(k,d)){var g={name:k.name,value:d||"",command:k};A(document.body,"beforeexeccommand",g);k=k.action.call(k,d||"");f=null===f&&!1===k?!1:!0;g.result=k;A(document.body,"execcommand",g)}}else w.warn("execCommand of unknown command:",b,d)},function(a){"complete"!==document.readyState?w.warn("Exception in execCommand <$>:",
a.toString()):w.error("Exception in execCommand <$>:",a.toString())});return f};this.enabled=function(b,d){var f=null;Da(function(){var e=a(b);if(e)for(var h=0;h<e.length;h++){var k=e[h];if(k.enabled){k=k.enabled.call(k,d);if(!0===k){f=!0;break}null===f&&!1===k&&(f=!1)}}else w.warn("queryCommandEnabled of unknown command:",b,d)},function(a){"complete"!==document.readyState?w.warn("Exception in queryCommandEnabled <$>:",a.toString()):w.error("Exception in queryCommandEnabled <$>:",a.toString())});
return f};this.state=function(b,d){var f=null;Da(function(){var e=a(b);if(e)for(var h=0;h<e.length;h++){var k=e[h];if(k.state){if(!0===k.state.call(k,d||"")){f=!0;break}f=!1}}else w.warn("queryCommandState of unknown command:",b,d)},function(a){"complete"!==document.readyState?w.warn("Exception in queryCommandState <$>:",a.toString()):w.error("Exception in queryCommandState <$>:",a.toString())});return f};this.value=function(b,d){var f=null;Da(function(){var e=a(b);if(e)for(var h=0;h<e.length;h++){var k=
e[h];if(k.value){k=k.value.call(k,d);if(null!=k){if(!v(k))try{f=JSON.stringify(k);break}catch(g){}f=k.toString();break}f=""}}else w.warn("queryCommandValue of unknown command:",b,d)},function(a){"complete"!==document.readyState?w.warn("Exception in queryCommandValue <$>:",a.toString()):w.error("Exception in queryCommandValue <$>:",a.toString())});return f}}function Qa(a){if(null==a||""==a)return!0;a=a.toString().trim().toLowerCase();return!("false"===a||"0"===a)}
function Ra(a){return oa(a)?a:v(a)?0===a.indexOf("{")?JSON.parse(a)||{}:{value:a||""}:{}};function Sa(){function a(a){for(var b=c.length-1;0<=b;b--)if(c[b]===a){c.splice(b,1);break}}function b(a,b){c.push([a,b||{}])}x(this instanceof Sa,"Use `new` to instantiate this class");var c=[],d=!1,f=null;this.e=function(a){a=na(a,{name:null});f=a.name;x(0===c.length,"Binding are in an undefined state before setup",f);x(!1===d,"You need to call cleanup first!",f);d=!0};this.v=function(){x(d,"You need to call setup first!");for(d=!1;0<c.length;)Da(function(){var a=c.pop(),b=a[0],d=a[1];1===b?Ta.Le(function(a){return a.ue===
d}):2===b?sa.apply(sa,d):3===b?window.clearTimeout(d):4===b?window.clearInterval(d):6===b?d():w.error("Unhandled binding cleanup step!",b,d)});x(c!==[],"Binding are in an undefined state after cleanup");f=e=null};var e=null;this.Ae=function(a){e=a};this.n=function(a){x(d,"You need to call setup first!");a.ue=Ba++;b(1,a.ue);if(e){var c=e;if(c)for(var g in c)if(void 0===a[g]){var f=c[g];void 0!==f&&(a[g]=f)}}Ta.Af(a);return a};this.g=function(a,c,e){x(d,"You need to call setup first!");b(2,[a,c,e]);
pa(a,c,e)};this.timeout=function(c,k,e){x(d,"You need to call setup first!");e&&this.md(e);var f=0,f=window.setTimeout(function(){c();a(f)},k||0);b(3,f);return f};this.md=function(b){0<b&&(window.clearTimeout(b),a(b))};this.interval=function(c,k){x(d,"You need to call setup first!");var e=0,e=window.setInterval(function(){c();a(e)},k||0);b(4,e);return e};this.Cd=function(a){b(6,a)}};function Ua(a){var b=this;b.Xb=a||{};b.oe=null;var c=[],d={};b.load=function(a){return Da(function(){if(!a)return!1;a.bb=!1;x(!(0<=c.indexOf(a)),"Plugin has already been loaded:",a.name);x(!d[a.name],"There is another plugin with the same name!",a.name);c.push(a);a.name&&0<a.name.length&&(d[a.name]=a);a.b=new Sa;return!0},function(a){w.error("Exception in PluginManager.load <$>",a.toString())})};b.Wf=function(a){return d[a]||null};b.Md=function(){return c.filter(function(a){return a.bb})};b.$b=function(a){if(v(a))return d[a]||
null;for(var b=c.length-1;0<=b;b--){var h=c[b];if(a(h))return h}return null};b.Df=function(a){x(null!=d[a],"The plugin",a,"is required here!");return d[a]};b.e=function(a,d){return Da(function(){x(!!a,"Expected a plugin");x(!a.bb,"Plugin is already set up:",a.name);0<=c.indexOf(a)||b.load(a);a.b.e({name:a.name||"?"+Ba++});a.zf=b;a.Xa=function(){a.da||(a.da=new Ua(b.Xb),a.da.oe=a);return a.da};a.ac=b.$b.bind(b);a.f=b.Df.bind(b);a.e&&a.e(d||{},b.Xb);a.bb=!0;return a},function(a){w.error("Exception in PluginManager.setup <$>",
a.toString())})};b.fg=function(a){for(var d=0;d<c.length;d++)b.e(c[d],a)};b.v=function(a){Da(function(){x(!!a,"Expected a plugin");x(a.bb,"Plugin is not yet set up:",a.name);x(0<=c.indexOf(a),"Plugin has not been loaded before:",a.name);a.bb=!1;a.da&&(a.da.oe=null,a.da.Ke(),a.da=null);a.b.v();a.v&&a.v();delete a.Xa;delete a.ac;delete a.f;a.zf=null},function(a){w.error("Exception in PluginManager.cleanup <$>",a.toString())})};b.Ke=function(){for(var a=c.length-1;0<=a;a--){var e=c[a];!0===e.bb&&b.v(e)}c=
[];d={}}};function Va(a,b){return a.classList.contains(b)}function C(a,b){a.classList.add(b)}function D(a,b){a.classList.remove(b);0===a.className.length&&a.removeAttribute("class")}function Wa(a,b,c){void 0!==c?c?C(a,b):D(a,b):(a.classList.toggle(b),0===a.className.length&&a.removeAttribute("class"))}function E(a){return a&&a.parentNode?a.parentNode.removeChild(a):null}function Xa(a){return F(a)?z(a.childNodes):[]}function Ya(a){return F(a)&&a.firstChild?Ya(a.firstChild):a}
function Za(a){return F(a)&&a.lastChild?Za(a.lastChild):a}function $a(a){for(;a.firstChild;)a.removeChild(a.firstChild)}function ab(a,b){var c=a.parentNode;c&&c.replaceChild(b,a);return b}function bb(a){if(a){for(;a.firstChild;)a.parentNode.insertBefore(a.removeChild(a.firstChild),a);E(a)}}function cb(a,b){for(;a.firstChild;)b.appendChild(a.firstChild)}function db(a,b){cb(a,b);a.appendChild(b)}
function eb(a,b){x(F(a),"<$>");b=b.toLowerCase();if(G(a)===b||!a.parentNode)return a;for(var c=a.ownerDocument.createElement(b),d=0;d<a.attributes.length;d++)c.setAttributeNS(a.attributes[d].namespaceURI,a.attributes[d].name,a.attributes[d].value);x(F(a),"<$>");x(F(c),"<$>");x(!c.hasChildNodes(),"new node has to be empty <$>");a.parentNode.insertBefore(c,a);cb(a,c);E(a);return c}
function fb(a,b,c,d){a instanceof Document||(a=a.ownerDocument);var f=a.createElement(b?b.toString().toLowerCase():"div");c&&y(c,function(a,b){null!=a&&null!=b&&v(a)&&v(b)&&f.setAttribute(a,b)});if(d)if(v(d))f.innerHTML=d;else if("array"==ca(d))for(b=0;b<d.length;b++)(c=d[b])&&(v(c)?f.appendChild(a.createTextNode(c)):f.appendChild(c));else throw"Unsupported type for opt_inner";return f}function I(a,b,c){return fb(document,a,b,c)}
function gb(a){if(!a)return null;if(a.previousSibling){for(a=a.previousSibling;a.hasChildNodes();)a=a.lastChild;return a}return a.parentNode&&1==a.parentNode.nodeType?a.parentNode:null}function hb(a,b){if(null===a)return null;b||(b=b||document.body);if(void 0===a)for(a=b;a.lastChild;)a=a.lastChild;else a=gb(a);return ib(a,b)?a:null}function kb(a){if(!a)return null;if(a.hasChildNodes())return a.firstChild;for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}
function lb(a,b){if(null===a)return null;b||(b=b||document.body);void 0===a&&(a=b);a=kb(a);return ib(a,b)?a:null}function mb(a){return!(!a||3!==a.nodeType)}function F(a){return!(!a||!a.nodeType||1!==a.nodeType)}function ib(a,b){return b&&a?!!(a.compareDocumentPosition(b)&8):!1}function nb(a,b){return b&&a?!!(a.compareDocumentPosition(b)&16):!1}function J(a){try{if(a&&(F(a)||(a=a.parentNode),a))return window.getComputedStyle(a)}catch(b){}return null}
function K(a){a=a.getBoundingClientRect();return{top:a.top+document.body.scrollTop,bottom:a.bottom+document.body.scrollTop,left:a.left+document.body.scrollLeft,right:a.right+document.body.scrollLeft,width:a.width,height:a.height}}function ob(a){return(a=J(a))&&a.display?"block"===a.display.toLowerCase():!1}function pb(a){return!(!a||!L(a,Oa)&&9!==a.nodeType&&11!==a.nodeType)}function G(a){return a&&a.tagName?a.tagName.toLowerCase()||void 0||"":""}
function tb(a,b){return a&&a.getAttribute?a.getAttribute(b)||void 0||"":""}function M(a){for(var b=0;a=a.previousSibling;)b++;return b}function N(a){if(!a)return 0;switch(a.nodeType){case 7:case 10:return 0;case 3:case 8:return a.length;default:return a.childNodes.length}}function O(a,b,c){c||(c=document.body);return a===c?null:L(a,b)?a:(a=a&&a.parentNode)?O(a,b,c):null}function ub(a,b){return O(a.parentNode,pb,b)}
function L(a,b){return a&&b?b instanceof Function?b(a):F(a)&&v(b)?a.webkitMatchesSelector(b):!1:!1}function R(a,b){return b?G(a)===b:F(a)}function S(a){return"br"===G(a)}function vb(a){return F(a)?"true"===a.contentEditable:!1}function wb(a,b){a.contentEditable=!!b;b||a.removeAttribute("contenteditable")}function xb(a){return new RegExp("(^|;)\\s*("+ja(a)+")\\s*\\:\\s*(.*?)($|;)+","gi")}
function yb(a){a&&a.hasAttribute&&a.hasAttribute("style")&&(a.getAttribute("style").trim().length||a.removeAttribute("style"))}function zb(a,b){var c=a&&a.getAttribute?a.getAttribute("style"):"";if(null==c)return null;c=xb(b).exec(c);return null===c?null:c[3].trim()}function T(a,b){var c=a&&a.getAttribute?a.getAttribute("style"):"";if(null==c)return"";c=c.replace(xb(b),"$1").trim();0<c.length?a.setAttribute("style",c):a.removeAttribute("style");return c||""}
function U(a,b,c){var d=T(a,b);null!=c&&(d=d.trim(),d.length&&";"!==d[d.length-1]&&(d+=";"),a.setAttribute("style",d+b+":"+c+";"))}function Ab(a,b){F(a)&&a.style?(a.style.display=b?"":"none",yb(a)):w.warn("Failed to set visibility on non HTML element",a)}function W(a,b,c){b||(b=document);try{return z(b.querySelectorAll(a),c)}catch(d){throw 0===d.toString().indexOf("Uncaught error in JS: SyntaxError: DOM Exception 12")&&w.error("Wrong syntax in selector:",a),d;}}function X(a,b){return W(a,b,!0)}
function Bb(a,b,c){for(;a=lb(a,c);)if(L(a,b))return a;return null}function Cb(a,b,c){for(;a=hb(a,c);)if(L(a,b))return a;return null}function Db(a){var b=mb(a)&&(""===a.data||/^[\t\n\r ]+$/.test(a.data));w.log("en.node.isWhitespaceNode",ha(a),b);return b}function Eb(a){for(var b;a&&(b=a.firstChild);)a=b;return a}function Fb(a,b){var c=I("div",{style:"position: absolute; width: 1px; height: 1px; top: -9999px; left: -9999px;"});c.appendChild(a);document.body.appendChild(c);b(a);E(a);E(c)}
function Gb(a,b){var c;a=a||0;c=c||document.body;b=b||240;if(0==b)c.scrollTop=a;else{var d=c.scrollTop,f=a-d,e=0,h=function(){e+=20;var a;a=e;a/=b/2;1>a?a=f/2*a*a+d:(a--,a=-f/2*(a*(a-2)-1)+d);c.scrollTop=a;e<b&&window.setTimeout(h,20)};h()}}function Hb(a,b){if(!F(a))return!1;var c=window.scrollY,d=c+window.innerHeight;null==b&&(b=55);var f=a.getBoundingClientRect().top+c,e=a.getBoundingClientRect().bottom+c,c=Math.max(c,f),d=Math.min(d,e);return Math.max(0,Math.round((d-c)/(e-f)*100))>=b};function Ib(){function a(){c.ic()}function b(){if(null==e){null!=e&&(e.disconnect(),e=null);var a=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;a?(e=new a(function(a){var b=[];y(a,function(a){y(a.addedNodes,function(a){if(null==a.querySelectorAll)return ma;var b=a.tagName.toLowerCase();if("img"===b)c.jb(a),A(a,"imageAdded",void 0);else{var d=a.querySelectorAll("img");y(d,function(a){c.jb(a);A(a,"imageAdded",void 0)});"table"===b?(c.jb(a),A(a,"tableAdded",void 0)):
(a=a.querySelectorAll("table"),y(a,function(a){c.jb(a);A(a,"tableAdded",void 0)}))}});if("attributes"===a.type&&"style"===a.attributeName){var d=I("div",{style:a.oldValue}),h=zb(a.target,"text-align"),d=zb(d,"text-align");h!==d&&("img"===a.target.tagName&&-1===b.indexOf(a.target)&&b.push(a.target),y(a.target.querySelectorAll("img"),function(a){-1===b.indexOf(a)&&b.push(a)}))}});y(b,function(a){A(a,"imageAligned",void 0)});c.ic()}),e.observe(Jb.root,{childList:!0,attributes:!0,characterData:!0,subtree:!0,
attributeOldValue:!0,characterDataOldValue:!1})):w.warn("Mutation Observer not supported, UI functionality limited!")}}var c=this;c.T={};var d=!1,f=0,e;c.gc=function(){var a=document.querySelector("#en-tools");return null==a?(w.error("Could not find tools div!"),null):a};c.dc=function(a){return a.getAttribute("data-en-overlay-id")};c.jb=function(a){a.removeAttribute("data-en-overlay-id")};c.Od=function(a){return a.getAttribute("data-en-layout-algorithm")};c.ka=function(a){var b=c.gc(),d="";if(null==
b)return[];if(null==a)d="[data-en-overlay-id]";else if("string"===typeof a)d='[data-en-overlay-id="'+a+'"]';else if(a instanceof Node){a=c.dc(a);if(null==a)return[];d='[data-en-overlay-id="'+a+'"]'}else return[];return z(b.querySelectorAll(d))};c.Oc=function(a,b){var d=Jb.root,c='[data-en-overlay-id="'+a+'"]';null==b&&(b=!1);return null==d?null:!0===b?z(d.querySelectorAll(c)):[d.querySelector(c)]};c.Ld=function(a){var b=c.Od(a),d=c.dc(a);if(null!=b&&"undefined"!==typeof c.T[b]&&null!=d)if(d=c.Oc(d)[0],
null==d)c.detach(a);else c.T[b](d,a)};c.ic=function(){y(c.ka(),function(a){c.Ld(a)})};c.mb=function(a,b){var d=c.gc();if(null==d)return w.warn("Unable to find tools DIV in me.attach"),null;null==b?b="cover":"undefined"===typeof c.T[b]&&(w.error("Invalid layout algorithm: "+b),b="cover");var e=c.dc(a);if(null==e){for(var m;f+=1,e=c.Oc(""+f,!0),m=c.ka(""+f),0!==e.length||0!==m.length;);e=""+f}m=I("div");m.setAttribute("data-en-overlay-id",e);m.setAttribute("data-en-layout-algorithm",b);U(m,"z-index",
"900");d.appendChild(m);a.setAttribute("data-en-overlay-id",e);c.T[b](a,m);return m};c.detach=function(a){E(a)};c.gg=function(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver?!0:!1};c.T.cover=function(a,b){var d=K(a);U(b,"position","absolute");U(b,"top",d.top+"px");U(b,"left",d.left+"px");U(b,"width",d.width+"px");U(b,"height",d.height+"px")};c.T.bottomRightCorner=function(a,b){var d=K(a),c=window.innerWidth-d.right,d=window.innerHeight-d.bottom;U(b,"position",
"absolute");U(b,"bottom",d+"px");U(b,"right",c+"px")};c.T.bottomLeftCorner=function(a,b){var d=K(a),c=window.innerHeight-d.bottom;U(b,"position","absolute");U(b,"bottom",c+"px");U(b,"left",d.left+"px")};c.T.bottomRightResizeHandle=function(a,b){var d=K(a),c=window.innerWidth-d.right-11,d=window.innerHeight-d.bottom-13;U(b,"position","absolute");U(b,"bottom",d+"px");U(b,"right",c+"px")};c.T.bottomLeftResizeHandle=function(a,b){var d=K(a),c=d.left-11,d=window.innerHeight-d.bottom-13;U(b,"position",
"absolute");U(b,"bottom",d+"px");U(b,"left",c+"px")};c.T.rightEdge=function(a,b){var d=Math.floor(K(b).width/2),c=K(a),d=window.innerWidth-c.right-d,e=window.innerHeight-c.bottom,c=c.top;U(b,"position","absolute");U(b,"top",c+"px");U(b,"right",d+"px");U(b,"bottom",e+"px")};c.T.leftEdge=function(a,b){var d=Math.floor(K(b).width/2),c=K(a),d=c.left-d,e=window.innerHeight-c.bottom,c=c.top;U(b,"position","absolute");U(b,"top",c+"px");U(b,"left",d+"px");U(b,"bottom",e+"px")};c.T.tableColumnEdge=function(a,
b){c.T.rightEdge(a,b);var d=O(a,"table"),d=window.innerHeight-K(d).bottom;U(b,"bottom",d+"px")};c.vc=function(a,b,d,e,m){var f=!0;null==f&&(f=!1);var r=!1,u,p,t,P,V=I("div",{style:"position: fixed;top: 0px;left: 0px;right: 0px;bottom: 0px;z-index: 999;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;-o-user-select: none;user-select: none;"+(null==m?"":m)});c.b.g(a,"mousedown",function(a){r=!0;u=a.pageX;p=a.pageY;t=a.pageX;P=a.pageY;!0===f&&c.gc().appendChild(V);null!=b&&b()});
c.b.g(window,"mousemove",function(a){if(!1!==r){t=a.pageX;P=a.pageY;a=t-u;var b=P-p;null!=d&&d(a,b)}});c.b.g(window,"mouseup",function(a){if(!1!==r){r=!1;t=a.pageX;P=a.pageY;a=t-u;var b=P-p;!0===f&&E(V);null!=e&&e(a,b)}})};c.name="ui";c.e=function(){!0!==d&&(d=!0,C(Jb.root,"en-ui-on"),c.b.g(window,"resize",a),b())};c.v=function(){if(!1!==d){d=!1;D(Jb.root,"en-ui-on");null!=e&&(e.disconnect(),e=null);var a=Jb.root;null!=a&&y(a.querySelectorAll("[data-en-overlay-id]"),function(a){c.jb(a)});y(c.ka,function(a){c.detach(a)});
f=0}}};function Kb(a,b,c,d){var f=document.createRange();void 0!==a&&(f.setStart(a||null,b||0),c?f.setEnd(c||null,d||0):f.setEnd(a||null,b||0));return f}function Lb(a,b){if(a&&(!b||Mb(a,b))&&a){var c=window.getSelection();c.removeAllRanges();c.addRange(a)}}function Y(a){var b=window.getSelection();if(1>b.rangeCount)return null;b=b.getRangeAt(0);return a&&b&&!Mb(b,a)?null:b?b.cloneRange():null}function Nb(a){var b=document.createRange();b.selectNode(a);Lb(b)}
function Ob(){window.getSelection().removeAllRanges()}function Mb(a,b){return(a.startContainer===b||ib(a.startContainer,b))&&(a.endContainer===b||ib(a.endContainer,b))}function Pb(a){return a?mb(a.startContainer)?a.startContainer:a.startContainer.childNodes[a.startOffset]||a.startContainer:null}function Qb(a){return a?mb(a.endContainer)?a.endContainer:a.endContainer.childNodes[a.endOffset]||a.endContainer.lastChild||a.endContainer:null}
function Rb(a,b){return null==a||null==b?!1:a.startContainer===b.startContainer&&a.startOffset===b.startOffset&&a.endContainer===b.endContainer&&a.endOffset===b.endOffset?!0:!1}function Sb(a){return a?{startContainer:a.startContainer,startOffset:a.startOffset,endContainer:a.endContainer,endOffset:a.endOffset,collapsed:a.collapsed}:null}function Tb(a){if(!a)return null;try{var b=Kb(a.startContainer,a.startOffset,a.endContainer,a.endOffset)}catch(c){b=null}return b}
function Ub(a,b){function c(a,b){var c=document.createNodeIterator(d,window.NodeFilter.SHOW_TEXT),h;for(a=Math.max(0,b?a:a-1);0<=a&&(h=c.nextNode());)a-=h.length;return h?{Da:h,offset:a+h.length+(b?0:1)}:null}var d=b||a.root||document.body,f=a.hasOwnProperty("len")?a.len:a.end-a.start,e=a.start,f=a.hasOwnProperty("end")?a.end:e+f,h=c(e,!0),k=h;e!==f&&(k=c(f,!1));return h&&k?Kb(h.Da,h.offset,k.Da,k.offset):null}
function Vb(a,b){if(!a||a.collapsed)return[];for(var c=[],d=a.startContainer;d&&a.intersectsNode(d);d=lb(d))b&&!L(d,b)||c.push(d);return c}function Wb(a){if(!a)return null;var b=a.getClientRects();return 0<b.length?b[0]:mb(a.endContainer)&&0<a.endContainer.length?(a=a.cloneRange(),a.endOffset=Math.min(a.endOffset+1,a.endContainer.length),a.startOffset=Math.max(a.startOffset-1,0),a.getBoundingClientRect()):(a=O(a.endContainer,F))?a.getBoundingClientRect():null}
Range.prototype.compareNode||(w.warn("Range.compareNode has been added by polyfill!"),Range.prototype.compareNode=function(a){var b=a.ownerDocument.createRange();try{b.selectNode(a)}catch(c){b.selectNodeContents(a)}a=1===this.compareBoundaryPoints(Range.START_TO_START,b);b=-1===this.compareBoundaryPoints(Range.RANGE_END_TO_END,b);return a&&!b?0:!a&&b?1:a&&b?2:3});var Xb={},Yb=1,Zb="data"+(new Date).getTime(),$b=1;function ac(a){var b=a[Zb];b||(b=a[Zb]=Yb++,Xb[b]={});return Xb[b]}function bc(a){var b=a[Zb];if(b){delete Xb[b];try{delete a[Zb]}catch(c){a.removeAttribute&&a.removeAttribute(Zb)}}}
function cc(a){if(!a||!a.stopPropagation){var b=a||window.event;a={};for(var c in b)a[c]=b[c];a.type=a.type.toLowerCase();a.target||(a.target=a.srcElement||document);a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;a.preventDefault=function(){a.returnValue=!1;a.isDefaultPrevented=B};a.isDefaultPrevented=Ea;a.stopPropagation=function(){a.cancelBubble=!0;a.isPropagationStopped=B};a.isPropagationStopped=Ea;a.stopImmediatePropagation=function(){a.isImmediatePropagationStopped=B;a.stopPropagation()};
a.isImmediatePropagationStopped=Ea;null!=a.clientX&&(b=document.documentElement,c=document.body,a.pageX=a.clientX+(b&&b.scrollLeft||c&&c.scrollLeft||0)-(b&&b.clientLeft||c&&c.clientLeft||0),a.pageY=a.clientY+(b&&b.scrollTop||c&&c.scrollTop||0)-(b&&b.clientTop||c&&c.clientTop||0));a.which=a.charCode||a.keyCode;null!=a.button&&(a.button=a.button&1?0:a.button&4?1:a.button&2?2:0)}return a}
function dc(a,b){function c(a){for(var b in a)return!1;return!0}var d=ac(a);0===d.K[b].length&&(delete d.K[b],document.removeEventListener?a.removeEventListener(b,d.xa,!1):document.detachEvent&&a.detachEvent("on"+b,d.xa));c(d.K)&&(delete d.K,delete d.xa);c(d)&&bc(a)}
function ra(a,b,c){b=b.toLowerCase();var d=ac(a);d.K||(d.K={});d.K[b]||(d.K[b]=[]);c.jc||(c.jc=$b++);d.K[b].push(c);d.xa||(d.disabled=!1,d.xa=function(b){if(!d.disabled){b=cc(b);var c=d.K[b.type];if(c)for(var h=0;h<c.length;h++)c[h].call(a,b)}});1==d.K[b].length&&(a.addEventListener?a.addEventListener(b,d.xa,!1):a.attachEvent&&a.attachEvent("on"+b,d.xa))}
function ta(a,b,c){var d=ac(a);if(d.K)if(b){b=b.toLowerCase();var f=d.K[b];if(f){if(c){if(c.jc)for(d=0;d<f.length;d++)f[d].jc===c.jc&&f.splice(d--,1)}else d.K[b]=[];dc(a,b)}}else for(f in d.K)b=f,d.K[b]=[],dc(a,b)}
function A(a,b,c){try{var d=ac(a),f=a.parentNode||a.ownerDocument;v(b)&&(b={type:b,target:a});b=cc(b);null!=c&&(b.data=c);d.xa&&d.xa.call(a,b);if(f&&!b.isPropagationStopped())A(f,b);else if(!f&&!b.isDefaultPrevented()){var e=ac(b.target);b.target[b.type]&&(e.disabled=!0,b.target[b.type](),e.disabled=!1)}}catch(h){w.error("Exception while firing an event <$>",h.toString(),a,b&&b.type)}};function ec(a,b,c){if("undefined"===typeof c||0===+c)return Math[a](b);b=+b;c=+c;if(isNaN(b)||"number"!==typeof c||0!==c%1)return NaN;b=b.toString().split("e");b=Math[a](+(b[0]+"e"+(b[1]?+b[1]-c:-c)));b=b.toString().split("e");return+(b[0]+"e"+(b[1]?+b[1]+c:c))}Math.Oa||(Math.Oa=function(a,b){return ec("round",a,b||0)});Math.df||(Math.df=function(a,b){return ec("floor",a,b||0)});Math.Ze||(Math.Ze=function(a,b){return ec("ceil",a,b||0)});var fc=/^(\d*\.?\d*)(px|em|\%|pt)?$/,gc=0,hc=0;
function ic(a){var b=null;if("number"===typeof a)b={Ra:"px",value:a,Nb:a.toString(),wc:a||null};else{var c=fc.exec(a);c&&(b={Ra:c[2]||"px",value:parseFloat(c[1]),Nb:c[1],wc:a||null})}return b}function jc(a){a=a||document.body;a=J(a);gc=ic(a.fontSize).value;x(!!gc,"Did not find base font size",gc,a.fontSize);a=I("div",{style:"height: 100pt; left: -100%; position: absolute; top: -100%; width: 100pt; "});document.body.appendChild(a);hc=a.offsetHeight/100;x(!!hc,"Did not find pt ratio",hc);E(a)}
function kc(a,b,c){var d=a||null;if(v(a)){var f=ic(a);f?(a=f.value,c=f.Ra):a=null}b||(b="px");if(!a)return{Ra:b,value:0,Nb:"0",wc:d};c||(c="px");if(c===b)return{Ra:b,value:a,Nb:a+b,wc:d};"px"===c&&"px"===b||x(0<gc,"en.unit.init needs to get called first!");"px"===c?"em"===b?a=Math.Oa(a/gc):"%"===b?a=Math.Oa(100*a/gc):"pt"===b&&(a=Math.Oa(a/hc)):"pt"===c?"em"===b?a=Math.Oa(a*hc/gc):"%"===b?a=Math.Oa(100*a*hc/gc):"px"===b&&(a=Math.Oa(a*hc)):x(!1,"Not implemented yet",c,"=>",b);return{Ra:b,value:a,Nb:a+
b,wc:d}}function lc(a){return kc(a).value||0};function mc(a,b){void 0===a&&(a=document.body);for(var c=a,d=b.length-1;0<=d;d--){var f=b[d];f>N(c)&&(f=N(c)-1);c=c.childNodes[f]}return c}function oc(a,b){var c=[];void 0===b&&(b=document.body);for(;a&&a.parentNode&&a!==b;){for(var d=0,f=a.parentNode.childNodes,e=0;e<f.length;e++)if(f[e]===a){d=e;break}c.push(d);a=a.parentNode}return c}
function pc(a,b,c){for(var d=[];1==b.nodeType;){var f=b.childNodes[c];if(!f&&!b.lastChild)break;f?(b=f,c=0):(b=b.lastChild,c=N(b))}b=c={m:b,offset:c};if(3==b.m.nodeType)for(c=b.m.previousSibling;c&&3==c.nodeType;c=c.previousSibling)b.offset+=N(c);else c=b.m.previousSibling;f=b.m.parentNode;b.m=c?c.nextSibling:f.firstChild;c=b;for(b=c.m;b&&b.parentNode&&b!==a;){for(var e=f=0,h=b.parentNode.childNodes,k=0;k<h.length;k++){var g=h[k];3!==g.nodeType&&0<e&&(++f,e=0);if(g===b)break;3===g.nodeType?e+=N(g):
++f}d.push(f);b=b.parentNode}return{path:d,offset:c.offset}}function qc(a,b,c){void 0===a&&(a=document.body);var d="";b&&(c?(c=pc(a,b.startContainer,b.startOffset),a=pc(a,b.endContainer,b.endOffset),d={startPath:c.path,startOffset:c.offset,endPath:a.path,endOffset:a.offset,collapsed:b.collapsed}):d={startPath:oc(b.startContainer,a),startOffset:b.startOffset,endPath:oc(b.endContainer,a),endOffset:b.endOffset,collapsed:b.collapsed});return JSON.stringify(d)}
function rc(a,b){void 0===a&&(a=document.body);if(!b)return null;var c=JSON.parse(b),d;if(c&&c instanceof Object)a:{var f=a;void 0===f&&(f=document.body);if(void 0===f||!c)throw"All arguments required";try{var e=mc(f,c.startPath),h=mc(f,c.endPath);if(!e||!h){d=null;break a}var k=Kb(e,c.startOffset,h,c.endOffset);c.collapsed&&k.collapse(!0);d=k;break a}catch(g){w.error("Exception <$>",g.toString())}d=null}else d=null;return d}
function sc(a,b){void 0===a&&(a=document.body);var c=Y(a);return c?qc(a,c,b):null}function tc(a,b){void 0===a&&(a=document.body);sc(a);if(b){var c=rc(a,b);c&&Lb(c)}};function uc(a,b){x(v(a),"name has to be string",b);x(null==b||oa(b),"info has to be empty or dict",a,b);b=b||{};b.version="1.0";window.evernoteClient&&window.evernoteClient.postNotification&&window.evernoteClient.postNotification(a,JSON.stringify(b))}function vc(a,b){x(!a||v(a),"module has to be string",a,b);x(!b||oa(b),"info has to be dict",a,b);b=b||{};b.module=a||"";uc("contentChanged",b)}
function wc(a,b){x(!a||v(a),"module has to be string",a,b);x(!b||oa(b),"info has to be dict",a,b);b=b||{};b.module=a||"";uc("focusChanged",b)}function xc(a){uc("titleBlur",{module:a||"title"})}function yc(a,b,c){x(v(a)||1<a.length,"href required",a,b,c);x(!b||v(b),"module has to be string",a,b,c);x(!c||oa(c),"info has to be dict",a,b,c);c=c||{};c.href=a;c.module=b||"";uc("openLink",c)}function zc(){uc("contextVisible",{module:"context"})}
function Ac(a){uc("contextExpanded",{module:"context",expanded:!!a})};function Bc(){function a(a){return a.toString().trim().slice(0,b.c.maxLength)}x(this instanceof Bc,"Use `new` to instantiate this class");var b=this,c=null;b.name="textfield"+Ba++;b.c=null;b.i=null;b.Sc=null;b.e=function(a){b.c=na(a,{element:null,je:!1,maxLength:0,placeholder:null,Je:!0,Hd:!0,zd:!0,Zb:null});c=a.element;x(!!c&&F(c),'"element" option must be an HTMLElement');b.Gf(b.c.placeholder);b.setActive(b.c.zd);b.Hb();x(!(b.c.je&&b.c.maxLength),"Max length not supported for multi line fields");
0<b.c.maxLength&&b.b.g(c,"input",function(){b.aa();if(c.textContent.length>b.c.maxLength){var a=c.firstChild;if(mb(a)){var d=Y(c).startOffset;a.textContent=b.aa();Lb(Kb(a,Math.min(d,b.c.maxLength)))}x(v("title")&&!0,"module name expexted","title");uc("warning",{module:"title"})}});b.c.Zb&&(b.b.g(c,"input",function(){A(c,b.c.Zb,void 0)}),b.b.g(c,"blur",function(){b.$a()&&A(c,b.c.Zb,{blur:!0})}));if(b.c.Hd){b.b.n({name:"pasteplain",action:function(a){b.i&&Cc(b.i);if(b.hasFocus())return document.execCommand("inserttext",
!1,a.replace(/\s+/gi," ")),!0},enabled:function(){return b.hasFocus()}});var f=function(){var a=Y(c);return a&&!a.collapsed};b.b.n({name:"copy",value:function(){if(!f())return null;var a=Y(c);return Dc(c,a,{plain:!0})},enabled:f});b.b.n({name:"inserttext",action:function(a){b.i&&Cc(b.i);if(b.hasFocus())return document.execCommand("inserttext",!1,a),!0},enabled:function(){return b.hasFocus()}});b.b.n({name:"delete",action:function(a){return"selection"===a?(document.execCommand("delete"),!0):!1},enabled:function(a){if("selection"===
a)return b.hasFocus()}})}b.c.Je&&(b.i=new Ec,b.Xa().e(b.i,{element:c}),b.b.n({name:"undo",action:function(){b.i.He();return!0},state:function(){return Fc(b.i)},value:function(){return Gc(b.i)},enabled:function(){return b.hasFocus()&&Fc(b.i)}}),b.b.n({name:"redo",action:function(){Hc(b.i);return!0},state:function(){return Ic(b.i)},value:function(){return Jc(b.i)},enabled:function(){return b.hasFocus()&&Ic(b.i)}}))};b.v=function(){b.setActive(!1);b.Sc=null;b.c=null;c.removeAttribute("data-en-placeholder");
c=null};b.aa=function(d){d&&b.Hb();return b.c.multiline?c.innerText||"":a(c.textContent)};b.Ce=function(d){c.textContent=a(d);b.Hb()};b.hasFocus=function(){if(!b.kc())return!1;var a=Y(c);return a&&(a=Pb(a))?!!O(a,vb):!1};b.focus=function(){c.focus();Lb(Kb(c,N(c)))};b.Ef=function(){c.focus();window.getSelection().selectAllChildren(c)};b.wb=function(){return c.getAttribute("data-en-placeholder")||""};b.Gf=function(b){null!=b?c.setAttribute("data-en-placeholder",a(b)):c.removeAttribute("data-en-placeholder")};
b.setActive=function(a){a!==b.kc()&&(window.getSelection().containsNode(c,!0)&&Ob(),wb(c,a))};b.kc=function(){return vb(c)};b.Hb=function(){b.Sc=a(c.textContent)};b.$a=function(){return!(b.kc()&&b.Sc===c.textContent)}};var Kc={},Jb=null,Ta=null,Lc=null;function Mc(a){x(oa(a),"Expected to get an non empty object");Kc=a}function Nc(){var a=Kc.env;return a?a.selectionColor||"rgb(167, 203, 245)":"rgb(167, 203, 245)"};function Oc(){function a(a){b(a.target)}function b(a){var b=h(a),c;y(t.p.ka(a),function(a){Va(a,"img-resizer-handle")&&(c=t.p.Od(a))});null!=c&&c!==b&&(d(a),e(a))}function c(a){d(a.target)}function d(a){y(t.p.ka(a),function(a){Va(a,"img-resizer-handle")&&t.p.detach(a)})}function f(a){e(a.target)}function e(a){if(1!==V.length)y(t.p.gc().querySelectorAll(".img-resizer-handle"),function(a){a=t.p.Oc(t.p.dc(a))[0];d(a)});else{var b=!1;y(t.p.ka(a),function(a){Va(a,"img-resizer-handle")&&(b=!0)});if(!0!==
b){var c=u(a),e=c===a.naturalWidth;if(!(142>=c)){var g=k(a),m=h(a),f=t.p.mb(a,m);U(f,"z-index","901");C(f,"img-resizer-handle");C(f,m);var l;"bottomRightResizeHandle"===m?l="cursor: nwse-resize;":"bottomLeftResizeHandle"===m&&(l="cursor: nesw-resize;");var q=function(){U(a,"height","auto");var b=K(a);T(a,"width");a.setAttribute("width",b.width)},Q=K(a);t.p.vc(f,function(){null!=P&&w.warn("Multiple images being resized at once! <$>");P=a;q()},function(b){var d=K(Jb.root).width;b="right"===g?Q.width-
b:"center"===g?Q.width+2*b:Q.width+b;142>=b?a.setAttribute("width","142"):b>=d||b>=c?(a.removeAttribute("width"),!1===e&&(r(a),q())):a.setAttribute("width",""+b);t.p.ic()},function(){P=null;Q=K(a);A(a,"dirty",void 0);Nb(a)},l)}}}}function h(a){return"right"===k(a)?"bottomLeftResizeHandle":"bottomRightResizeHandle"}function k(a){a=(a=J(a))?a.textAlign:null;return"center"===a?"center":"right"===a?"right":"justify"===a?"full":"left"}function g(a){Nb(a.target)}function l(a){!1!==a.classList.contains("img-selected")&&
(D(a,"img-selected"),y(t.p.ka(a),function(a){Va(a,"img-selected-overlay")&&t.p.detach(a)}))}function m(a){null!=a&&a!=={}&&(Q=a);y(document.querySelectorAll("img"),function(a){!0===a.complete?q(a):t.b.g(a,"load",function(){q(a)})})}function q(a){r(a);var b=p(a),d=b.width,b=b.height;null==d&&null==b?a.style.height="auto":null!=d&&null!=b&&Math.round(a.naturalHeight/a.naturalWidth*10)===Math.round(b/d*10)&&(a.style.height="auto")}function r(a){var b=a.naturalWidth,d=u(a),c=a.naturalHeight,h;if(null==
Q)h=a.naturalHeight;else if(null==Q["images-dpi"][a.getAttribute("src")])h=a.naturalHeight;else{h=Q["images-dpi"][a.getAttribute("src")][1];var k=a.naturalHeight;h=144===h?Math.round(k/(h/72)):k}k=p(a);null==k.height&&null==k.width&&(b!==d&&U(a,"width",d+"px"),c!==h&&U(a,"height",h+"px"))}function u(a){if(null==Q)return a.naturalWidth;var b;if(null==Q["images-dpi"][a.getAttribute("src")])return a.naturalWidth;b=Q["images-dpi"][a.getAttribute("src")][0];a=a.naturalWidth;return 144===b?Math.round(a/
(b/72)):a}function p(a){var b;null!=a.getAttribute("width")?b=parseInt(a.getAttribute("width"),10):(b=parseInt(a.style.width,10),isNaN(b)&&(b=null));null!=a.getAttribute("height")?a=parseInt(a.getAttribute("height"),10):(a=parseInt(a.style.height,10),isNaN(a)&&(a=null));return{width:b,height:a}}var t=this;t.p=null;t.name="ui-img";var P,V=[],Q=null;t.e=function(b){t.p=t.f("ui");t.b.g(document,"imageAdded",function(b){t.b.g(b.target,"imageSelected",f);t.b.g(b.target,"imageUnselected",c);t.b.g(b.target,
"imageAligned",a)});t.b.g(document,"imageAdded",function(a){t.b.g(a.target,"click",g)});t.b.g(document,"selectionchange",function(){var a=window.getSelection(),b=Jb.root.querySelectorAll("img");V=[];y(b,function(b){a.containsNode(b,!1)&&-1===V.indexOf(b)&&V.push(b)});y(b,function(b){if(a.containsNode(b,!1)){if(!b.classList.contains("img-selected")){C(b,"img-selected");var d=t.p.mb(b);C(d,"img-selected-overlay");var c=I("div",{"class":"img-selected-overlay-top-left-corner"}),h=I("div",{"class":"img-selected-overlay-top-right-corner"}),
k=I("div",{"class":"img-selected-overlay-bottom-left-corner"}),e=I("div",{"class":"img-selected-overlay-bottom-right-corner"}),g=I("div",{"class":"img-selected-overlay-right-edge"}),m=I("div",{"class":"img-selected-overlay-left-edge"});d.appendChild(c);d.appendChild(h);d.appendChild(k);d.appendChild(e);d.appendChild(g);d.appendChild(m)}A(b,"imageSelected",void 0)}else P!==b&&(l(b),A(b,"imageUnselected",void 0))})});b.images&&m(b.images);t.b.n({name:"images",action:function(a){a&&m(Ra(a));return!0},
enabled:B});y(Jb.root.querySelectorAll("img"),function(a){A(a,"imageAdded",void 0)})};t.v=function(){y(Jb.root.querySelectorAll("img"),function(a){l(a)});y(document.querySelectorAll("img"),function(a){d(a)})}};function Pc(){function a(a){var h=Ra(a);a=!1;var k=h.visible;null!=k&&(Ab(c,!!k),a=!0);k=h.active;null!=k&&(C(c,k?"en-shared-on":"en-shared-off"),D(c,k?"en-shared-off":"en-shared-on"),a=!0);k=h.business;null!=k&&(Ab(f,!!k),a=!0);h=h.value;v(h)&&(d.innerHTML=h,X("a",d).forEach(function(a){var d=a.getAttribute("href");a.removeAttribute("href");C(a,"en-shared-link");a=eb(a,"span");a.onclick=function(){var c=K(a);yc(d,b.name,{left:c.left,top:c.top,width:c.width,height:c.height});return!1}}),a=!0);return a}
var b=this;this.name="shared";x(this instanceof Pc,"Use `new` to instantiate this class");var c=null,d=null,f=null;this.e=function(b){var h=document.querySelector(".en-note-container");d=I("div",{"class":"en-shared-message"});f=I("div",{"class":"en-shared-business",style:"display:none;"});c=I("div",{"class":"en-shared en-shared-off",id:"en-shared",style:"display:none;"},[f,d]);h.insertBefore(c,h.firstChild);a(b);this.b.n({name:"shared",action:a,enabled:B})};this.v=function(){f=d=null;E(c);c=null}}
;function Qc(){function a(a){if(!(null==a||v(a)&&""===a||da(a)&&0===Object.keys(a).length)){var l=Ra(a);a=l.visible;var r=l.expanded,t=l.hideIndicatorLabelWhenExpanded,u=l.hideIndicatorLabelWhenCollapsed,p=l.chatButtonLabel||"Chat",ie=l.shareButtonLabel||"Share",Fa=l.items,H=l.contextSectionLabel,ba=l.firstLaunchInfo;null!=a&&Ab(q,!!a);if(Fa&&!(0>=Fa.length)){$a(q);var xa=I("div",{"class":"en-context-label"});xa.textContent=H||"Context";q.appendChild(xa);H=I("div",{"class":r?"en-context-hide-label":
"en-context-show-label"});q.appendChild(H);if(null!=ba&&null!=ba.headline&&null!=ba.subHeadline&&null!=ba.learnMoreLinkLabel&&null!=ba.dismissButtonLabel){var rb=ba.headline,sb=ba.subHeadline,xa=ba.learnMoreLinkLabel,ba=ba.dismissButtonLabel,qb=I("div",{"class":"en-context-fle-container"});q.appendChild(qb);var Ka=I("div",{"class":"en-context-fle-header"});Ka.textContent=rb;qb.appendChild(Ka);rb=I("div",{"class":"en-context-fle-body"});qb.appendChild(rb);Ka=I("span",{"class":"en-context-fle-subheader"});
Ka.textContent=sb+" ";rb.appendChild(Ka);sb=I("span",{"class":"en-context-fle-learn-more"});sb.textContent=xa;rb.appendChild(sb);g.b.g(sb,"click",function(a){yc("learnMore",g.name,{kind:"firstLaunch",sharing:!1});a.stopPropagation()});xa=I("div",{"class":"en-context-fle-dismiss-button"});xa.textContent=ba;qb.appendChild(xa);g.b.g(xa,"click",function(a){yc("dismiss",g.name,{kind:"firstLaunch",sharing:!1});E(qb);a.stopPropagation()})}xa=I("div",{"class":"en-context-card-holder"});q.appendChild(xa);
for(ba=0;ba<Fa.length;ba++)xa.appendChild(k(Fa[ba],ie,p));U(q,"max-height",139*m.maxRows+32+"px");r?f(H,t):e(H,u);d(H,t,u);b();g.b.timeout(b,250);h(!0);!0===a&&!0===r&&0<Fa.length&&g.b.timeout(function(){c(l)},1500)}}}function b(){var a;var b=document.querySelector(".en-context-card-holder");a=document.querySelectorAll(".en-context-item").length||0;var d=document.querySelector(".en-context-item");if(null==b||null==d)a=null;else{var b=Math.round(K(b).width),c=J(d),h=Math.round(d.offsetWidth+(parseInt(c["margin-left"],
10)+parseInt(c["margin-right"],10)));a={Ue:b,yf:a,Xe:h,Tf:Math.round(d.offsetHeight+(parseInt(c["margin-top"],10)+parseInt(c["margin-bottom"],10))),Ye:Math.floor(b/h)}}d=document.querySelector(".en-context-card-holder");null!=a&&null!=d&&(b=Math.min(a.yf,a.Ye),0>=b?U(d,"left","0px"):U(d,"left",(a.Ue-a.Xe*b)/2+"px"))}function c(a){if(!0!==p&&!1!==m.showPopup&&null==r&&null!=q&&null!=a&&null!=a.items&&0!==a.items.length){var b=a.items,d=a.toastNotificationHeaderLabel||"FIX HEADER";a=a.toastNotificationFooterLabel||
"FIX FOOTER";var c=ka(b[0].title||"Untitled"),h=I("div",{"class":"en-context-popup-header"});h.textContent=d;d="en-context-popup-body";null!=b[0].kind&&(d+=" "+b[0].kind);b=I("div",{"class":d});b.textContent=c;c=I("div",{"class":"en-context-popup-footer"});c.textContent=a;c.appendChild(I("div",{"class":"en-context-popup-down-arrow"}));r=I("div",{"class":"en-context-popup"},[I("div",{"class":"en-context-popup-wrapper"},[h,b,c])]);q.parentNode.insertBefore(r,q.nextSibling);g.b.timeout(function(){C(r,
"en-context-popup-visible")},1);g.b.g(r,"mousedown",function(){g.b.md(u)});g.b.g(r,"mouseup",function(){var a=K(q);Gb(a.top-15,240);D(r,"en-context-popup-visible");U(r,"pointer-events","none")});u=g.b.timeout(function(){D(r,"en-context-popup-visible");U(r,"pointer-events","none")},5500,u)}}function d(a,b,d){g.b.g(a,"click",function(){a.textContent===b?(e(a,d),Ac(!1)):a.textContent===d&&(f(a,b),Ac(!0));h(!0)})}function f(a,b){var d=W(".en-context-card-holder",q),c=W(".en-context-fle-container",q);
1!==d.length?w.error("Couldnt find card holder?!"):(d=d[0],a.textContent=b,D(a,"en-context-show-label"),C(a,"en-context-hide-label"),Ab(d,!0),null!=c&&1===c.length&&Ab(c[0],!0))}function e(a,b){var d=W(".en-context-card-holder",q),c=W(".en-context-fle-container",q);1!==d.length?w.error("Couldnt find card holder?!"):(d=d[0],a.textContent=b,D(a,"en-context-hide-label"),C(a,"en-context-show-label"),Ab(d,!1),null!=c&&1===c.length&&Ab(c[0],!1))}function h(a){function b(){var a=q.querySelector(".en-context-item");
null!=a&&Hb(a,100)&&!1===p&&(p=!0,zc())}null==a&&(a=!1);a?b():t=g.b.timeout(b,100,t)}function k(a,b,d){var c=a.link||"#",h=a.kind||"undefined",k=document.createTextNode(ka(a.text||"")),e=a.thumbnail||"",m=""!==e,f=ka(a.title||"Untitled"),r=a.sourceName||"",t=a.sourceId||"",q=a.date||"",u=a.author||"";a=a.canShare;var p=I("div",{"class":m?"en-context-item-title":"en-context-item-title en-context-wide",href:c,name:h});p.textContent=f;f=I("span",{"class":"en-context-author"});""!==u&&(f.textContent=
u);var Ka=I("span",{"class":"en-context-separator"});Ka.textContent="|";var nc=I("span",{"class":"note"===h?"en-context-note-date":"en-context-news-date"});""!==q&&(nc.textContent=q);c=[];"news"===h?""!==q?(c.push(nc),""!==u&&(c.push(Ka),c.push(f))):""!==u&&c.push(f):(""!==q&&c.push(nc),c.push(k));k="en-context-item-body";m||(k+=" en-context-wide");"news"===h?k+=" en-context-item-body-one":"note"===h&&"evernote.business"===t?k+=" en-context-item-body-two":"people"===h&&(k+=" en-context-body-italics");
q=I("div",{"class":k},c);k=I("div",{"class":"en-context-graphic-clipper"});c="en-context-graphic";a&&(c+=" en-context-graphic-blur");e=I("img",{"class":c,alt:"graphic",src:e});c="en-context-graphic-hover";m||(c+=" en-context-graphic-hover-solid");b=I("div",{"class":c},[I("div",{"class":"en-context-workchat"}),I("div",{"class":"en-context-share-text"},["people"===h?d:b])]);m&&k.appendChild(e);a&&(k.appendChild(b),g.b.g(k,"click",function(a){yc(p.getAttribute("href"),g.name,{kind:p.getAttribute("name"),
sharing:!0});a.stopPropagation()}));m=t;"dowjones.wsj"===m&&(m="wsj");"profile.linkedin"===m&&(m="linkedin");if("profile.evernote.business"===m||"evernote.business"===m)m="evernote-business";"profile.factiva"===m&&(m="factiva");d="";if("profile.evernote.business"===t||"evernote.business"===t)d="en-context-source-text-blue";b=I("div",{"class":"en-context-source-img "+m});d=I("div",{"class":"en-context-source-text "+d});d.textContent="dowjones.wsj"===t?"":"evernote.business"===t?u:r;r=I("div",{"class":"en-context-source"});
-1!==l.indexOf(m)&&r.appendChild(b);r.appendChild(d);u=[p,q];u.push(k);("news"===h||"people"===h||"company"===h||"note"===h&&"evernote.business"===t)&&u.push(r);h=I("div",{"class":"en-context-item"},u);g.b.g(h,"click",function(a){yc(p.getAttribute("href"),g.name,{kind:p.getAttribute("name"),sharing:!1});a.preventDefault()});return h}var g=this;this.name="context";x(this instanceof Qc,"Use new for this");var l="factiva fastcompany inc lifehacker linkedin pandodaily techcrunch theverge evernote-business wsj forbes nikkei".split(" "),
m,q=null,r=null,u=0,p=!1,t=-1;this.e=function(d){var c=document.querySelector(".en-note-container");q=I("div",{"class":"en-context",id:"en-context",style:"display:none;"});null!=c?(c.parentNode.insertBefore(q,c.nextSibling),g.b.g(window,"scroll resize",h),h(!0),g.b.g(window,"resize",b),m=na(d,{showPopup:!0,maxRows:9999},!1),this.b.n({name:"context",action:a,enabled:B})):w.error("Couldnt find note container! Bailing.")};this.v=function(){E(q);E(r);u=0;q=null;p=!1}};function Rc(){function a(a){if(!(null==a||v(a)&&""===a||da(a)&&0===Object.keys(a).length)){var g=Ra(a),l=g.expanded;null==l&&(l=!1);var u=g.headline||"Get more Context with Premium",p=g.subHeadline||"Go Premium to view notes, articles, and people related to what you're working on.";a=g.goPremiumLabel||"Go Premium";var t=g.hideIndicatorLabelWhenExpanded||"Hide",g=g.hideIndicatorLabelWhenCollapsed||"Show";$a(h);Ab(h,!0);k=I("div",{"class":"en-context-upsell-body"});h.appendChild(k);var P=I("div",{"class":l?
"en-context-upsell-hide-label":"en-context-upsell-show-label"});h.appendChild(P);l?c(P,t):d(P,g);b(P,t,g);l=I("div",{"class":"en-context-upsell-headline"});l.textContent=u;k.appendChild(l);u=I("div",{"class":"en-context-upsell-subheadline"});u.textContent=p;k.appendChild(u);p=I("div",{"class":"en-context-upsell-go-premium"});p.textContent=a;k.appendChild(p);e.b.g(p,"click",function(a){yc("http://evernote.com","context",{kind:"upsell",sharing:!0});a.stopPropagation()});f(!0)}}function b(a,b,h){e.b.g(a,
"click",function(){a.textContent===b?(d(a,h),Ac(!1)):a.textContent===h&&(c(a,b),Ac(!0));f(!0)})}function c(a,b){null!=k&&(a.textContent=b,D(a,"en-context-upsell-show-label"),C(a,"en-context-upsell-hide-label"),Ab(k,!0))}function d(a,b){null!=k&&(a.textContent=b,D(a,"en-context-upsell-hide-label"),C(a,"en-context-upsell-show-label"),Ab(k,!1))}function f(a){function b(){Hb(h,75)&&!1===g&&(g=!0,zc())}null==a&&(a=!1);a?b():l=e.b.timeout(b,100,l)}var e=this;this.name="context-upsell";x(this instanceof
Rc,'Use "new" to create the Context Upsell Plugin');var h=null,k=null,g=!1,l=-1;this.e=function(b){var d=document.querySelector(".en-note-container");h=I("div",{"class":"en-context-upsell",id:"en-context-upsell",style:"display:none;"});null!=d?(d.parentNode.insertBefore(h,d.nextSibling),e.b.g(window,"scroll resize",f),f(!0),a(b),this.b.n({name:"context-upsell",action:a,enabled:B})):w.error("Couldnt find note container! Bailing.")};this.v=function(){E(h);k=h=null;g=!1}};function Sc(){function a(a){a=Ra(a);a=c(a.value,+a.limit||d);return JSON.stringify(a)}function b(a){c(a);return!0}function c(a,b){if(0>=a.length)return null;b||(b=d);var c=b,g=[a.trim()].map(ja).join("|"),l=new RegExp(g,"gi"),m=[],q=!1;W(f).forEach(function(a){for(var d=a.textContent,c;(c=l.exec(d))&&0<c.length;){var k=c.index,e=l.lastIndex,k={string:d.slice(k,e),length:e-k,from:k,to:e};var e=k,g=a,f={start:e.from,end:e.to},jb=Ub(f,g);if(jb){var wa=jb.getBoundingClientRect();wa.height>lc(J(Pb(jb)).lineHeight)&&
(jb=Ub({start:e.from,Yf:1},g),g=jb.getBoundingClientRect(),wa={left:g.left,right:wa.right,top:g.top,bottom:g.bottom});g=document.body;e.to=f.end;e.top=wa.top+g.scrollTop;e.bottom=wa.bottom+g.scrollTop;e.left=wa.left+g.scrollLeft;e.right=wa.right+g.scrollLeft;e.width=wa.right-wa.left;e.height=wa.bottom-wa.top}else e=null;if(null!=e){if(0>=b--){q=!0;break}m.push(k)}}});return{limit:c,hasMore:q,count:m.length,items:m}}this.name="find";x(this instanceof Sc,"Use `new` to instantiate this class");var d,
f;this.e=function(c){d=0<+c.limit?+c.limit:100;f=v(c.selector)?c.selector:"#en-note";this.b.n({name:"find",action:b,value:a,enabled:B})}};function Ec(){if(!(this instanceof Ec))return new Ec;this.name="undo"}
Ec.prototype.e=function(a){var b=this;b.c=na(a,{element:null,Kd:!1,Ac:null,Bc:null,nd:null,he:null});a=b.c.element;b.root=a;x(!!a&&F(a),"UndoManager requires a node to be attached to!");b.c.Kd=!0;b.ed=!1;b.Z=null;!b.c.Kd&&(a=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)&&(b.Aa=Sb(Y(this.root)),b.Ca=[],b.Z=new a(b.yc.bind(b)),Tc(b),b.b.Cd(function(){Uc(b)}));b.clear();Vc(b);b.b.g(b.root,"keydown",function(a){a=a.keyCode;(33<=a&&36>=a||37<=a&&40>=a||45===a||13===
a)&&Vc(b)});b.b.g(b.root,"blur select click mousedown paste cut copy",function(){Vc(b)})};Ec.prototype.clear=function(){Wc(this);this.stack=[];this.index=0;Vc(this)};Ec.prototype.v=function(){this.A=this.ed=this.c=this.root=this.Z=this.index=this.stack=null};
Ec.prototype.add=function(a){var b=this;a.title||(a.title="");if(b.c.Ac&&b.c.Bc&&b.c.nd){for(var c=b.c.Ac(b.root),d=[],f=0;f<a.Tb.length;f++){var e=a.Tb[f];0<=c.indexOf(e)||d.push(e)}for(var h=[],f=0;f<c.length;f++)e=c[f],0<=a.Tb.indexOf(e)||h.push(e);d.length&&b.c.Bc(d);a.Ie.push(function(){h.length&&b.c.Bc(h);d.length&&b.c.nd(d)});a.te.push(function(){d.length&&b.c.Bc(d);h.length&&b.c.nd(h)});a.Tb=void 0}b.A.Pb=sc(b.root);b.Z||(b.A.Qb=b.root.cloneNode(!0));(a.cf=!!b.Z)?a.ke=Xc(b):(a.Qb=a.Qb||b.root.cloneNode(!0),
a.nb=a.nb||a.Qb);a.Hc=a.Hc||a.Pb;a.Pb=a.Pb||sc(b.root);for(b.stack.length=b.index;b.c.he&&b.stack.length>b.c.he;)b.stack.shift(),b.index--;b.stack.push(a);++b.index;b.A=null;return a};var Yc=/\s*(id|data\-en\-[a-z0-9\-]+)\=\".*?\"/gi;function Zc(a){var b;if(!a.A)return!1;if(a.Z)return a.yc($c(a)),0<a.Ca.length;b=b||a.root.innerHTML;return a.A.nb?(a=a.A.nb.innerHTML,a=a.replace(Yc,""),b=b.replace(Yc,""),a!==b):!1}
function Vc(a){Wc(a);a.A={};a.A.Ie=[];a.A.te=[];a.A.Hc=sc(a.root);a.Z||(a.A.nb=a.root.cloneNode(!0));a.c.Ac&&(a.A.Tb=a.c.Ac(a.root))}function Wc(a){Zc(a)&&a.add(a.A);delete a.A}function Cc(a,b){Vc(a);b&&a.A&&(a.A.title=b)}
Ec.prototype.restore=function(a,b){try{var c=b?a.te:a.Ie;if(c&&0<c.length)for(var d=0;d<c.length;d++)c[d](a);if(a.cf){if(b){var f=a.ke;Uc(this);f=f||this.Ca;for(c=0;c<f.length;c++){var e=f[c];"childList"===e.type?(e.Ob&&e.target.insertBefore(e.Ob,e.nextSibling),e.zc&&e.target.removeChild(e.zc)):e.target&&"attributes"===e.type?null===e.value?e.target.removeAttribute(e.attributeName):e.target.setAttribute(e.attributeName,e.value):"characterData"===e.type?e.target.data=e.value:w.error("unknown mutation",
e.type)}}else{var h=a.ke;Uc(this);for(var h=h||this.Ca,k=h.length-1;0<=k;k--){var g=h[k];"childList"===g.type?(g.Ob&&g.target.removeChild(g.Ob),g.zc&&g.target.insertBefore(g.zc,g.nextSibling)):"attributes"===g.type?null===g.oldValue?g.target.removeAttribute(g.attributeName):g.target.setAttribute(g.attributeName,g.oldValue):"characterData"===g.type?g.target.data=g.oldValue:w.error("unknown mutation",g.type)}}Tc(this)}else{this.root.innerHTML="";for(var l=b?a.Qb:a.nb,d=0;d<N(l);d++)this.root.appendChild(l.childNodes[d].cloneNode(!0))}tc(this.root,
b?a.Pb:a.Hc);this.A=null;Vc(this);A(this.root,b?"redo":"undo")}catch(m){w.error("Exception occurred in <$>:",m.toString())}};Ec.prototype.He=function(){Wc(this);if(1>this.index)return null;var a=this.stack[--this.index];this.restore(a,!1);return a};function Hc(a){if(!Ic(a))return null;var b=a.stack[a.index++];a.restore(b,!0);return b}function Fc(a){return 0<a.stack.length&&0<a.index||Zc(a)}function Ic(a){return 0<a.stack.length&&a.index<a.stack.length&&!Zc(a)}
function Gc(a){if(!Fc(a))return null;var b=null;return(b=Zc(a)?a.A:a.stack[a.index-1])?b.title:null}function Jc(a){return Ic(a)?(a=a.stack[a.index])?a.title:null:null}function Tc(a){if(a.Z){var b=new (window.MutationObserverInit||window.Pf||window.Of||Object);b.subtree=!0;b.childList=!0;b.attributes=!0;b.characterData=!0;b.attributeOldValue=!0;b.characterDataOldValue=!0;a.Ca=[];self.ed=!0;a.Z.observe(a.root,b)}}function $c(a){return a.Z.takeRecords?a.Z.takeRecords():null}
function Uc(a){if(a.Z){var b=$c(a);a.yc(b);a.Z.disconnect();self.ed=!1}}function Xc(a){a.yc($c(a));var b=a.Ca;a.Ca=[];return b}
Ec.prototype.yc=function(a){if(a)for(var b=0;b<a.length;b++)for(var c=a[b],d=0;d<Math.min(1,c.addedNodes.length+c.removedNodes.length);d++){var f={type:c.type,target:c.target,Ob:c.addedNodes[d],zc:c.removedNodes[d],oldValue:c.oldValue,nextSibling:c.nextSibling,attributeName:c.attributeName,value:"characterData"===c.type?c.target.data:c.target.getAttribute(c.attributeName),Zf:c};("attributes"!==f.type||"width"!==f.attributeName&&"height"!==f.attributeName&&"embed"!==G(f.target))&&this.Ca.push(f)}return this.Ca};function ad(){function a(){return h.hasFocus()}function b(a){return"placeholder"===a?h.wb():"focus"===a?h.hasFocus():h.aa()||h.wb()}function c(a){a=Ra(a);var b=!1,c=a.active;null!=c&&(h.setActive(c),b=!0);c=a.value;null!=c&&(d(c),b=!0);!0===a.focus&&(h.focus(),b=!0);return b}function d(a){a&&a!==h.wb()?h.aa()!==a&&h.Ce(a):h.Ce("");k=h.aa()||h.wb();h.Hb()}x(this instanceof ad,"Use `new` to instantiate this class");var f=this;this.name="title";var e=document.querySelector("#en-title");x(F(e),"Node for title required");
var h=null,k=null;this.e=function(g){g=na(g,{active:!0,value:"",placeholder:"Untitled"});this.b.Ae({xb:["title"]});h=new Bc;this.Xa().e(h,{element:e,je:!1,maxLength:255,placeholder:g.placeholder,Je:!0,Hd:!0,zd:g.active,Zb:"titlechanged"});this.b.Cd(function(){h=null});k=g.value;d(k);this.b.g(e,"focus",function(){wc("title",{focus:a()})});this.b.g(e,"blur",function(){wc("title",{focus:a()})});this.b.g(e,"keydown",function(a){var b=!1,d=(a.shiftKey?1:0)+(a.altKey?2:0)+(a.metaKey?4:0)+(a.ctrlKey?8:0);
9===a.keyCode?0===d?(bd("content.focus",{pos:"top",force:!0}),b=!0):1===d&&(xc(f.name),b=!0):13===a.keyCode&&(0===d?(bd("content.focus",{pos:"top",force:!0}),b=!0):1===d?(xc(f.name),b=!0):4!==d&&6!==d&&(b=!0));return b?(a.preventDefault(),a.stopPropagation(),!1):!0});this.b.n({name:"title",action:c,value:b,state:a,enabled:B});this.b.n({name:"content",action:c,value:function(a){g=na(Ra(a),{resetChangesState:!0});g.resetChangesState&&h.Hb();return h.aa()||h.wb()},enabled:B,Fa:!0});this.b.n({name:"active",
action:function(a){h.setActive(Qa(a))},state:function(){return h.kc()},enabled:B,Fa:!0});this.b.n({name:"focus",action:function(){h.focus();return!0},state:a,enabled:B,Fa:!0});this.b.n({name:"changes",state:function(){return h.$a()},enabled:B,Fa:!0});this.b.n({name:"selectall",action:function(){h.Ef();return!0},enabled:B,Fa:!0})}};function cd(a){a.c.Jd=a.name;A(a.m,"dirty",void 0)}function dd(a){x(a,"We need field info");x(a.m,"We need an element to work on");var b=a.m;b.innerHTML=ed(b,a.$d);qa(b.textContent)?C(b,"en-editable-placeholder"):D(b,"en-editable-placeholder");a.nf=b.innerHTML}function ed(a,b){var c=a.innerText.trim();qa(c)?c="\u00a0":b?(c=c.split("\n"),c=c.map(function(a){return qa(a)?"<div><br/></div>":"<div>"+Aa(a)+"</div>"}),c=c.join("")):c=Aa(c.replace(/\n/g," "));return c}
function fd(a){var b=a.m;C(b,"en-editable");C(b,"en-editable-"+a.type);C(b,("en-"+a.c.Kc+"-"+a.name).toLowerCase());b.setAttribute("title",(a.c.fb[a.name+"-placeholder-title"]||"...")+"\u00a0\u00a0\u00a0");wb(b,!0);dd(a);a.c.td&&b.removeAttribute("style");var c=null;pa(b,"focus",function(){c=a.object.ya();Ca(function(){window.getSelection().selectAllChildren(b)})});pa(b,"blur",function(){Ob();dd(a);var b=!1;if(a.c.Eb instanceof Object)try{var f=a.c.Eb[a.name];f&&f(a)&&(b=!0)}catch(e){w.error("Exception on onDidChangeActions (1)",
e.toString())}f=a.object.ya();(b||c!==f)&&cd(a)});pa(b,"keydown",function(d){var c=!1;13===d.keyCode?a.$d||(b.blur(),c=!0):8===d.keyCode&&(document.execCommand("delete"),c=!0);c&&(d.preventDefault(),d.stopPropagation());return!1})}function gd(a,b){for(var c=z(a.querySelectorAll("*[style*='x-evernote:']")),d=0;d<c.length;d++){var f=c[d];if(zb(f,"x-evernote")===b)return f}return null}
function hd(a,b){a.Dd=gd(a.Da,"context");a.ne=gd(a.gd,"context");var c=a.Dd,d=zb(c,"-evernote-context-name");C(c,"en-editable-context");var f;$a(c);c.appendChild(f=I("span"));f.textContent=a.c.fb[d+"-label"]||d;for(var e=[],h=0;h<b.length;h++){var k=b[h];e.push(I("option",{value:k,selected:k===d?"selected":void 0},a.c.fb[k+"-label"]||k))}var g=I("select",{"class":"en-editable-select-context",tabindex:"-1"},e);c.insertBefore(g,null);pa(g,"change",function(){var b=g.value;U(c,"-evernote-context-name",
b);f.textContent=a.c.fb[b+"-label"]||b;if(a.c.Eb instanceof Object)try{var d=a.c.Eb[a.name];d&&d(a)}catch(h){w.error("Exception on onDidChangeActions (2)",h.toString())}cd(a)});c.parentElement.style.textDecoration="none"}function id(a){var b=zb(a.Dd,"-evernote-context-name");b&&(U(a.ne,"-evernote-context-name",b),a.ne.textContent=a.c.fb[b+"-label"]||b)}function Z(a){if(!(this instanceof Z))return new Z(a);this.o=a;this.e()}Z.prototype.e=function(){};Z.prototype.ya=function(){return this.o.m.innerHTML};
Z.prototype.Mb=function(a){var b=this.ya();this.o.Fb.innerHTML=b;a&&this.o.c.Jd===this.o.name&&this.o.Fb.insertBefore(jd(),null)};function kd(a){Z.call(this,a)}fa(kd,Z);function ld(a){Z.call(this,a)}fa(ld,Z);ld.prototype.ya=function(){return ed(this.o.m)};function md(a){Z.call(this,a)}fa(md,Z);md.prototype.e=function(){fd(this.o)};md.prototype.ya=function(){return ed(this.o.m)};function nd(a){a.$d=!0;Z.call(this,a)}fa(nd,md);
nd.prototype.ya=function(){try{return ed(this.o.m,!0)}catch(a){w.error("getHTML 'en.template.PlainTextArea.prototype.getHTML' failed ",a)}return null};function od(a){Z.call(this,a)}fa(od,Z);od.prototype.e=function(){this.o.m=gd(this.o.Da,"value");this.o.Fb=gd(this.o.gd,"value");x(!!this.o.m,"x-evernote:value element missing in phone field");fd(this.o);hd(this.o,"phone home work mobile main home-fax work-fax other".split(" "))};od.prototype.ya=function(){return ed(this.o.m)};
od.prototype.Mb=function(a){od.Lb.Mb.call(this,a);id(this.o)};function pd(a){Z.call(this,a)}fa(pd,Z);pd.prototype.Ta=function(a,b){x(b instanceof Object);b.href=a;return I("a",b,a)};pd.prototype.aa=function(){var a=this.o.m.textContent;return!a||qa(a)?"":a.trim()};
pd.prototype.e=function(){function a(){D(e,"en-editable-hidden");C(f,"en-editable-hidden");$a(h);var a=b.aa();qa(a)?(D(f,"en-editable-hidden"),C(e,"en-editable-hidden")):h.appendChild(b.Ta(a,{tabindex:"-1"}));f.textContent=a}var b=this;this.o.m=gd(this.o.Da,"value");this.o.Fb=gd(this.o.gd,"value");x(!!this.o.m,"x-evernote:value element missing in LinkField");var c=this.o.m,d=this.aa();T(c,"text-decoration");$a(c);var f;c.appendChild(f=I("div"));f.textContent=d;this.o.m=f;fd(this.o);var e,h;c.appendChild(e=
I("div",{"class":"en-editable-preview"},[h=I("span")]));a();pa(e,"click",function(){f.focus()});pa(f,"focus",function(){D(f,"en-editable-hidden");C(e,"en-editable-hidden")});pa(f,"blur",function(){a()});C(this.o.Da,"en-editable-container")};pd.prototype.ya=function(){var a=this.o.m.textContent;return qa(a)?"\u00a0":Aa(this.Ta(a,{}))};function qd(a){Z.call(this,a)}fa(qd,pd);qd.prototype.e=function(){qd.Lb.e.call(this);hd(this.o,["email","home","work","other"])};
qd.prototype.Mb=function(a){qd.Lb.Mb.call(this,a);id(this.o)};qd.prototype.Ta=function(a,b){a=a.trim().replace(/^mailto:/,"");x(b instanceof Object);b.href="mailto:"+a;return I("a",b,a)};function rd(a){Z.call(this,a)}fa(rd,pd);rd.prototype.aa=function(){var a=this.o.m.textContent;if(!a)return"";a=a.trim().replace(/^\@/,"");return qa(a)?"":a};rd.prototype.Ta=function(a,b){x(b instanceof Object);b.href="http://twitter.com/"+encodeURIComponent(a);return I("a",b,"@"+a)};
function sd(a){Z.call(this,a)}fa(sd,pd);function td(a){Z.call(this,a)}fa(td,pd);function ud(a){Z.call(this,a)}fa(ud,pd);ud.prototype.aa=function(){var a=this.o.m.textContent;if(!a)return"";a=a.trim().replace(/^\@/,"");return qa(a)?"":a};ud.prototype.Ta=function(a,b){x(b instanceof Object);return document.createTextNode("@"+a)};function vd(a){Z.call(this,a)}fa(vd,pd);
vd.prototype.Ta=function(a,b){a=a.trim();x(b instanceof Object);b.href="http://maps.google.com/?q="+encodeURIComponent(a);return I("a",b,a)};var wd={title:ld,field:md,textarea:nd,phone:od,email:qd,twitter:rd,linkedin:sd,facebook:td,weibo:ud,address:vd,"profile-image":kd},xd=Object.keys(wd);function yd(){x(this instanceof yd,"Use `new` to instantiate this class")}n=yd.prototype;n.name="template";
function zd(a,b,c){a.cg=c;c=c.w;x(!!c&&c instanceof Pa,"Expected command manager in context");a.w=c;a.c=na(b,{Wb:null,Kc:null,Rb:null,td:!1,ud:null,vd:null,fd:{},Eb:{},fb:{},Jd:null,root:null});a.root=b.root||document.getElementById("en-note");x(a.root&&F(a.root),"Root not valid!");Ad(a.root);x(null!==a.c.Wb,"Content Class is required");a.c.Kc=a.c.Kc||a.c.Wb.replace(/[^\w]+/gi,"-");a.root===document.body?(a.La=document.body.parentNode.cloneNode(!0),z(a.La.getElementsByTagName("head")).forEach(function(a){E(a)})):
a.La=a.root.cloneNode(!0);b=Bd(a,a.root);var d=Bd(a,a.root===document.body?a.La.getElementsByTagName("body")[0]:a.La);a.S=[];for(var f=0;f<b.length;f++)try{var e=b[f];e.index=f;e.Fb=d[f].m;e.c=a.c;e.Da=e.m;e.gd=e.Fb;e.object=new wd[e.type](e);a.S.push(e)}catch(h){w.error("A field failed during setup",h.toString())}null!==a.c.vd&&Cd(a,a.c.vd);a.Td=function(b){Cd(a,b.data)};pa(document,"titlechanged",a.Td);if(a.c.fd instanceof Object)for(f=0;f<a.S.length;f++)try{var e=a.S[f],k=a.c.fd[e.name];k&&k(e)}catch(g){w.error("Exception on onDidInitActions (3)",
g.toString())}a.Ib(c)}n.v=function(){for(var a=0;a<this.S.length;a++)try{ta(this.S[a].m)}catch(b){w.error("Exception on cleanup",b.toString())}W(".en-editable-select-context,.en-editable-preview",this.root).forEach(function(a){ta(a)});this.S=[];sa(document,"titlechanged",this.Td)};n.hasFocus=function(){var a=Y(this.root);return a&&(a=Pb(a))?O(a,vb):!1};
n.Ib=function(){var a=this;this.b.n({name:"focus",action:function(){a.focus();return!0},state:function(){return a.hasFocus()},value:function(){if(a.hasFocus())return a.name},enabled:B});this.b.n({name:"pasteplain",action:function(a){document.execCommand("inserttext",!1,a.replace(/\s+/gi," "))},enabled:B});this.b.n({name:"copy",enabled:B,value:function(){var b=Y(a.root);if(!b||b.collapsed)return"";var c={},b=b.cloneContents(),d=document.createElement("div");d.appendChild(b);Fb(d,function(a){c.plain=
a.innerText});return JSON.stringify(c)}});this.b.n({name:"content",value:function(b){return a.Mc(Ra(b))},enabled:B})};n.focus=function(a){for(a=+a||0;a<this.S.length;a++){var b=this.S[a];if(!b.be){b.m.focus();break}}};function Cd(a,b){if(b&&0<b.length&&255>=b.length){for(var c,d=0;d<a.S.length;d++)if(!0===a.S[d].be){c=a.S[d];break}c&&c.m.textContent!==b&&(c.m.textContent=b,c.nf=c.m.innerHTML)}}
function Bd(a,b){return z(b.querySelectorAll("*[style*='-evernote-editable:']")).map(function(a){var b=zb(a,"-evernote-editable");if(0<=xd.indexOf(b)){var f=zb(a,"x-evernote"),e=this.c.ud&&this.c.ud===f;e&&(b="title");return e||null===this.c.Rb||this.c.Rb.some(function(a){return f===a})?{m:a,name:f,type:b,be:e}:void 0}w.error("Invalid -evernote-editable field mode!",b)},a).filter(function(a){return a&&a.m})}
n.Mc=function(a){a=na(a,{html:!1,cleanup:!1,stripNS:!1,trim:!0,withInsertionPoint:!1,titleString:"",hiddenCryptoData:null,wrap:!1});v(a.titleString)&&Cd(this,a.titleString);for(var b=0;b<this.S.length;b++){var c=this.S[b];try{c.object.Mb(a.withInsertionPoint)}catch(d){w.error("Unable to extract data from field",d.toString(),c)}}b="html"===G(this.La)||a.stripNS?this.La.outerHTML:this.La.innerHTML;a.stripNS&&(b=za(b));b=b.trim();return a.html?"<html><head><title></title></head><body>"+b+"</body></html>":
a.wrap?Dd(this.root,b):b};
n.e=function(a,b){var c=a.contentClass,d=a.title,f=a.localization;if("evernote.food.meal.2"===c)zd(this,{root:a.root||null,Wb:c,Rb:["caption-text","meal-review"],td:!0,ud:"title",vd:d},b);else if("evernote.contact.1"===c){var e=function(a){return(a=a.m.textContent)?a.replace(/\s+/g," ").trim():null},h=null,k=d;zd(this,{root:a.root||null,Wb:c,Rb:"contact-title contact-org note-body weibo twitter phone email address display-as".split(" "),td:!1,fb:f||{"display-as-placeholder-title":"Add Name...","contact-title-placeholder-title":"Add Title...",
"contact-org-placeholder-title":"Add Company...","note-body-placeholder-title":"Add Notes...","linkedin-placeholder-title":"Add LinkedIn URL...","facebook-placeholder-title":"Add Facebook URL...","twitter-placeholder-title":"Add Twitter Name...","weibo-placeholder-title":"Add Weibo Name...","phone-placeholder-title":"Add Phone...","email-placeholder-title":"Add Email...","address-placeholder-title":"Add Address...","email-label":"Email","home-label":"Home","work-label":"Work","other-label":"Other",
"phone-label":"Phone","mobile-label":"Mobile","main-label":"Main","home-fax-label":"Home Fax","work-fax-label":"Work Fax","twitter-label":"Twitter","facebook-label":"Facebook","weibo-label":"Weibo","linkedin-label":"LinkedIn","address-label":"Address"},fd:{"display-as":function(a){h=e(a)}},Eb:{"display-as":function(a){k=Ta.value("title");var b=!1;a=e(a);if(h&&a&&k){var d=new RegExp("\\b"+ja(h)+"\\b","g");if(d=k.replace(d,a))255<d.length&&(d=k),Ta.action("title",d),b=!0,h=a}return b}}},b)}};function Ed(){var a=this,b=this;b.name="query";b.e=function(){var c=b.f("context").root;a.nextNode=function(b){return b.hasChildNodes()?b.firstChild:a.na(b)};a.previousNode=function(a){if(a.previousSibling){for(a=a.previousSibling;a.hasChildNodes();)a=a.lastChild;return a}return a.parentNode&&1===a.parentNode.nodeType?a.parentNode:null};a.na=function(a){for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null};a.Uc=function(a,b){return!!(a&&b&&a.compareDocumentPosition(b)&16)};a.oc=function(a,
b){return!!(b&&a&&b.compareDocumentPosition(a)&16)};a.qa=function(a){for(var b=[];a.parentNode;)b.unshift(a.parentNode),a=a.parentNode;return b};a.hf=function(b){return a.qa(b).concat(b)};a.sb=function(b){for(var c=[],e=a.na(b);(b=a.nextNode(b))&&b!=e;)c.push(b);return c};a.Nc=function(b){return"ltr"==b.dir?"ltr":"rtl"==b.dir?"rtl":R(b.parentNode)?a.Nc(b.parentNode):"ltr"};a.Ya=function(b,c,e,h){if(b==e){if(c==h)return"equal";if(c<h)return"before";if(c>h)return"after"}if(e.compareDocumentPosition(b)&
4){h=a.Ya(e,h,b,c);if("before"==h)return"after";if("after"==h)return"before"}if(e.compareDocumentPosition(b)&8){for(;e.parentNode!=b;)e=e.parentNode;if(M(e)<c)return"after"}return"before"};a.Nd=function(a){for(;null!=a.parentNode;)a=a.parentNode;return a};a.nc=function(b,c){var e=a.Ya(b,0,c.startContainer,c.startOffset),h=a.Ya(b,N(b),c.endContainer,c.endOffset);return a.Nd(b)==a.Nd(c.startContainer)&&"after"==e&&"before"==h};a.ja=function(b,c){"undefined"==typeof c&&(c=function(){return!0});for(var e=
b.startContainer,e=e.hasChildNodes()&&b.startOffset<e.childNodes.length?e.childNodes[b.startOffset]:b.startOffset==N(e)?a.na(e):a.nextNode(e),h=b.endContainer,h=h.hasChildNodes()&&b.endOffset<h.childNodes.length?h.childNodes[b.endOffset]:a.na(h),k=[];e.compareDocumentPosition(h)&4;)a.nc(e,b)&&c(e)?(k.push(e),e=a.na(e)):e=a.nextNode(e);return k};a.Va=function(b,c){"undefined"==typeof c&&(c=function(){return!0});for(var e=b.startContainer,e=e.hasChildNodes()&&b.startOffset<e.childNodes.length?e.childNodes[b.startOffset]:
b.startOffset==N(e)?a.na(e):a.nextNode(e),h=b.endContainer,h=h.hasChildNodes()&&b.endOffset<h.childNodes.length?h.childNodes[b.endOffset]:a.na(h),k=[];e.compareDocumentPosition(h)&4;)a.nc(e,b)&&c(e)&&k.push(e),e=a.nextNode(e);return k};a.ab=function(a){return L(a,Oa)};a.t=function(a){return!(!a||a!==c&&!pb(a))};a.l=function(b){return!(!b||a.t(b))};a.ra=function(b,c){var e=0;null==c&&(c=1);var h=a.sb(b);0===h.length&&(h=[b]);for(var k=h.length-1;0<=k;k--){var g=h[k];if(mb(g)&&!Db(g)||S(g)&&++e>=c+
1||a.ca(g))return!1}return!0};a.d=function(b){return!(!b||!a.qf(b)||1!==b.nodeType&&1!==b.parentNode.nodeType)};a.Ud=function(b){for(var c=0;c<b.childNodes.length;c++)if(a.d(b.childNodes[c])||a.Ud(b.childNodes[c]))return!0;return!1};a.mc=function(b){if(!S(b))return!1;var f=a.I(b),e=!1,h=!1;Bb(b,function(b){if(a.t(b)||f!==a.I(b))return!0;if(S(b))return h=!0;e=e||a.Xc(b);return!1},c);return!e&&!h};a.Xc=function(b){return 3===b.nodeType&&!Db(b)||a.ca(b)};a.Ha=function(b){if(!S(b))return!1;for(var f=
b;(f=f.parentNode)&&!(1<f.childNodes.length||f===c);){if(L(f,"li"))return!1;if(a.t(f))break}var f=b,e=a.I(b),h=!1,k=!1;Cb(f,function(b){if(a.t(b)||e!==a.I(b))return!0;if(S(b))return k=!0;h=h||a.Xc(b);return!1},c);var g=!1,l=!1;Bb(f,function(b){if(a.t(b)||e!==a.I(b))return!0;if(S(b))return l=!0;g=g||a.Xc(b);return!1},c);return l||g||k||h?l||g?!1:h&&!g?!0:k?!1:!0:L(e,"li")};a.ca=function(a){return L(a,"img,embed,object,input,hr,.en-resource, .en-resource *")};a.Wc=function(b){if(!Db(b))return!1;if(""==
b.data)return!0;var c=b.parentNode;if(!c||a.qa(b).some(function(a){return 1==a.nodeType&&"none"==J(a).display}))return!0;for(;!a.t(c)&&c.parentNode;)c=c.parentNode;for(var e=b;e!=c;){e=a.previousNode(e);if(a.t(e)||S(e))return!0;if(3==e.nodeType&&!Db(e)||a.ca(e))break}e=b;for(b=a.na(c);e!=b;){e=a.nextNode(e);if(a.t(e)||S(e))return!0;if(e&&3==e.nodeType&&!Db(e)||a.ca(e))break}return!1};a.ce=function(b){if(!b)return!1;if(a.t(b)||3===b.nodeType&&!a.Wc(b)||a.ca(b))return!0;for(var c=0;c<b.childNodes.length;c++)if(a.ce(b.childNodes[c]))return!0;
return!1};a.J=function(b){if(!b)return!1;if(a.t(b)||a.ca(b)||3===b.nodeType&&!a.Wc(b)||S(b)&&!a.Ha(b))return!0;for(var c=0;c<b.childNodes.length;c++)if(a.J(b.childNodes[c]))return!0;return!1};a.yb=function(b){return Xa(b).some(function(b){return a.J(b)})};a.L=function(b){return!!b&&!a.J(b)};a.Vc=function(b){if(a.mc(b)&&!a.Ha(b))return!0;if(!a.l(b)||1!=b.nodeType)return!1;for(var c=!1,e=0;e<b.childNodes.length;e++){if(!a.L(b.childNodes[e])&&!a.Vc(b.childNodes[e]))return!1;a.Vc(b.childNodes[e])&&(c=
!0)}return c};a.of=function(a){return L(a,Na)};a.H=function(b,c){if((-1!=="colgroup table tbody tfoot thead tr".split(" ").indexOf(c)||L(c,"colgroup,table,tbody,tfoot,thead,tr"))&&"object"===typeof b&&3===b.nodeType&&!/^[ \t\n\f\r]*$/.test(b.data)||(-1!==["script","style","plaintext","xmp"].indexOf(c)||L(c,"script,style,plaintext,xmp"))&&("object"!==typeof b||3!==b.nodeType)||"object"===typeof b&&(9===b.nodeType||11===b.nodeType||10===b.nodeType))return!1;R(b)&&(b=G(b));if(!v(b))return!0;if(R(c)){for(var e=
c;e;){if("a"===b&&R(e,"a")||-1!==Ia.indexOf(b)&&a.of(e)||/^h[1-6]$/.test(b)&&R(e)&&/^h[1-6]$/.test(G(e)))return!1;e=e.parentNode}c=G(c)}if("object"===typeof c&&(1===c.nodeType||11===c.nodeType))return!0;if(!v(c))return!1;switch(c){case "colgroup":return"col"===b;case "table":return-1!=="caption col colgroup tbody td tfoot th thead tr".split(" ").indexOf(b);case "tbody":case "thead":case "tfoot":return-1!==["td","th","tr"].indexOf(b);case "tr":return-1!==["td","th"].indexOf(b);case "dl":return-1!==
["dt","dd"].indexOf(b);case "dir":case "ol":case "ul":return-1!==["dir","li","ol","ul"].indexOf(b);case "hgroup":return/^h[1-6]$/.test(b)}if(-1!=="body caption col colgroup frame frameset head html tbody td tfoot th thead tr".split(" ").indexOf(b)||-1!==["dd","dt"].indexOf(b)&&"dl"!==c||"li"===b&&"ol"!==c&&"ul"!==c)return!1;for(var e=[[["a"],["a"]],[["dd","dt"],["dd","dt"]],["h1 h2 h3 h4 h5 h6".split(" "),"h1 h2 h3 h4 h5 h6".split(" ")],[["li"],["li"]],[["nobr"],["nobr"]],[Ja,Ia],[["td","th"],"caption col colgroup tbody td tfoot th thead tr".split(" ")]],
h=0;h<e.length;h++)if(-1!==e[h][0].indexOf(c)&&-1!==e[h][1].indexOf(b))return!1;return!0};a.Y=function(b){return a.d(b)&&a.J(b)&&(3===b.nodeType||a.ca(b)||S(b))};a.Ia=function(a){if(!R(a))return!1;var b=G(a);return"blockquote"===b?!0:"div"!==b?!1:"0px"!==J(a)["margin-left"]?!0:!1};a.Cb=function(b){if(!a.Ia(b))return!1;for(var c=0;c<b.attributes.length;c++)if(-1===["style","dir"].indexOf(b.attributes[c].name))return!1;for(c=0;c<b.style.length;c++)if(!/^(-[a-z]+-)?(margin|border|padding)/.test(b.style[c]))return!1;
return!0};a.sf=function(a){return L(a,"address,div,h1,h2,h3,h4,h5,h6,listing,p,pre,xmp")};a.Zc=function(b){return a.sf(b)||L(b,"li,dt,dd")};a.I=function(b){for(;b&&!a.t(b);)b=b.parentNode;return b};a.Yd=function(b,c){var e=!1;b?0===c?e=a.t(b)||!b.parentNode:0<=c-1&&c-1<b.childNodes.length&&(e=a.J(b.childNodes[c-1])&&a.t(b.childNodes[c-1])||S(b.childNodes[c-1])):e=!0;return e};a.Xd=function(b,c){var e=!1;b?c===N(b)?e=!b.parentNode&&c===N(b)||a.t(b):c<b.childNodes.length&&(e=a.J(b.childNodes[c])&&a.t(b.childNodes[c])):
e=!0;return e};a.lc=function(b,c){return a.Yd(b,c)||a.Xd(b,c)};a.W=function(b){var c=b.startContainer,e=b.startOffset,h=b.endContainer;b=b.endOffset;var k=a.qa(c).concat(c).filter(function(a){return R(a,"li")}).slice(-1);k.length&&(e=M(k[0]),c=k[0].parentNode);if(!a.Yd(c,e)){do 0<=e-1&&F(c.childNodes[e-1])&&c.childNodes[e-1].hasChildNodes()?(c=c.childNodes[e-1],e=N(c)):0==e?(e=M(c),c=c.parentNode):e--,mb(c)&&(e=M(c),c=c.parentNode);while(!a.lc(c,e))}for(;0==e&&c.parentNode&&a.d(h);)e=M(c),c=c.parentNode;
k=a.qa(h).concat(h).filter(function(a){return R(a,"li")}).slice(-1);k.length&&(b=1+M(k[0]),h=k[0].parentNode);if(!a.Xd(h,b)){do b<N(h)&&F(h)&&h.hasChildNodes()?(h=h.childNodes[b],b=0):b>=N(h)?(b=1+M(h),h=h.parentNode):b++,mb(h)&&(b=1+M(h),h=h.parentNode);while(!a.lc(h,b))}for(;b==N(h)&&h.parentNode&&a.d(h);)b=1+M(h),h=h.parentNode;return Kb(c,e,h,b)};a.qb=function(b){for(var c=0;!a.lc(b,c);){if(0<=c-1&&c-1<b.childNodes.length&&a.J(b.childNodes[c-1]))return!1;0!=c&&b.hasChildNodes()?(b=b.childNodes[c-
1],c=N(b)):(c=M(b),b=b.parentNode)}return!0};a.ib=function(b){for(var c=N(b);!a.lc(b,c);){if(c<b.childNodes.length&&a.J(b.childNodes[c]))return!1;c!=N(b)&&b.hasChildNodes()?(b=b.childNodes[c],c=0):(c=1+M(b),b=b.parentNode)}return!0};a.vb=function(a){return a&&a.style?lc(a.style.marginLeft):0};a.rc=function(b,c){if(!b||a.ma(b)||!F(b))return!0;var e=b.style;if(e)for(var h=0;h<e.length;h++){var k=null,g=null,k=e[h],g=e.getPropertyValue(k);if(-1===Ma.indexOf(g)&&g&&-1===La.indexOf(k))return!1}return c?
a.rc(b.parentNode):!0};a.rf=function(b){return!!O(b,"li,ol,ul,dl,dd,dt",a.tb(b))};a.Pd=function(a){return L(a,"ul.en-todo-list")?"tl":L(a,"ol,ul")?G(a):null};a.Ab=function(b,c){return a.Pd(b)===c};a.Qf=function(a,b){return!(!a.isPointInRange(b.startContainer,b.startOffset)&&!a.isPointInRange(b.endContainer,b.endOffset))};a.kf=function(b,c){return 0===N(b)?null:c===N(b)&&b.parentNode&&a.l(b)?[b.parentNode,1+M(b)]:0<=c&&c<b.childNodes.length&&0!==N(b.childNodes[c])&&a.l(b.childNodes[c])?[b.childNodes[c],
0]:null};a.lf=function(b,c){return 0==N(b)?null:0==c&&b.parentNode&&a.l(b)?[b.parentNode,M(b)]:0<=c-1&&c-1<b.childNodes.length&&0!=N(b.childNodes[c-1])&&a.l(b.childNodes[c-1])?[b.childNodes[c-1],N(b.childNodes[c-1])]:null};a.ub=function(b,c){for(var e;e=a.lf(b,c);)b=e[0],c=e[1];return[b,c]};a.cc=function(b,c){for(var e;e=a.kf(b,c);)b=e[0],c=e[1];return[b,c]};a.zb=function(b){var f;!(f=c===b)&&(f=b&&ib(b,c))&&(f=!!(b&&F(b)&&(Va(b,"en-container")||R(b,"td")||a.t(b)&&!a.rc(b,!1))));return f?!0:!1};a.ma=
function(a){return c===a};a.tb=function(b){return ib(b,c)||a.ma(b)?c:null};a.qf=function(a){return ib(a,c)};a.B=function(b,c){return!(!a.tb(b)||a.tb(b)!=a.tb(c))}}};function Fd(a){a=W("*[id],*[class],*[data-en-overlay-id]",a);for(var b=a.length-1;0<=b;b--){var c=a[b];if(!L(c,"div.en-container,object.en-todo,.en-resource, .en-resource *")){L(c,"embed,object,img")||"en-editor-last-insertion-point"!==c.id&&c.removeAttribute("id");c.removeAttribute("class");c.removeAttribute("data");for(var d in c.dataset)c.removeAttribute("data-"+d)}}}function Gd(a){X("span",a).forEach(function(a){a.hasAttributes()||bb(a)})}
function Hd(a){X("span[style*='-evernote-last-insertion-point']",a).forEach(function(a){bb(a)})}
function Id(a){X('div[style~="margin-left:"]>ul,div[style~="margin-left:"]>ol',a).forEach(function(b){var c=b.parentElement;if(L(c,"div")){for(var d=zb(c,"margin-left"),d=+d.replace(/(\d+)em/gi,"$1"),f=null;0<d;){var e=fb(a,b.tagName);f?f.appendChild(e):c.insertAdjacentElement("afterEnd",e);f=e;d-=2}f&&(cb(c,f),E(c))}});X('li[style*="list-style:"]',a).forEach(function(a){"none"===zb(a,"list-style")&&bb(a)});X("ol,ul",a).forEach(function(b){var c=null;z(b.childNodes).forEach(function(b){L(b,"li,ol,ul")?
c=null:Db(b)?E(b):pb(b)?eb(b,"li"):(c||(c=fb(a,"li"),b.parentNode.insertBefore(c,b.nextSibling)),c.appendChild(b))})})}function Jd(a){X("ol>ul,ul>ol,ul>ul,ol>ol",a).forEach(function(b){var c=fb(a,"li",{style:"display:inline;list-style:none;"});b.parentNode.insertBefore(c,b);c.appendChild(b)})}
function Kd(a){X("ul.en-todo-list",a).forEach(function(b){Xa(b).forEach(function(b){if(R(b,"li")){var d=fb(a,"object",{"class":"en-todo"});Wa(d,"en-todo-checked",Va(b,"en-todo-checked"));b.insertBefore(d,b.firstChild)}})})}function Ld(a){X('ul[style*="-evernote-list-type"]',a).forEach(function(a){C(a,"en-todo-list");Xa(a).forEach(function(a){if(R(a,"li")){var b=!1,f=W("object.en-todo",a).shift();f&&(b=Va(f,"en-todo-checked"),E(f));D(a,"en-todo-over");Wa(a,"en-todo-checked",b)}})})}
function Md(a){X("object.en-todo",a).forEach(function(b){var c=fb(a,"input",{type:"checkbox"});Va(b,"en-todo-checked")&&c.setAttribute("checked","checked");ab(b,c)})}
function Nd(a){X("input[type=checkbox]",a).forEach(function(b){var c=fb(a,"object",{"class":"en-todo"});Wa(c,"en-todo-checked",b.checked);ab(b,c)});X("img[src^=en-resource\\:\\/\\/database\\/check]",a).forEach(function(b){var c=fb(a,"object",{"class":"en-todo"}),d=b.getAttribute("src"),d=/database\/check(\d+):(\d+)/.exec(d),d=parseInt(d[1],10);Wa(c,"en-todo-checked",1===d||3===d);ab(b,c)})}
function Od(a){x(!0,"This is Mac specific");X("embed",a).forEach(function(b){if("evernote/x-todo"===b.type){var c=fb(a,"object",{"class":"en-todo"});"true"===b.getAttribute("todo-checked")&&C(c,"en-todo-checked");ab(b,c)}else(c=b.getAttribute("align"))&&c.length&&"absmiddle"!==c.toLowerCase()&&b.removeAttribute("align"),T(b,"float"),b.style.textAlign&&"absmiddle"!==b.style.textAlign.toLowerCase()&&T(b,"text-align"),yb(b)})}
function Pd(a){X("center",a).forEach(function(a){U(a,"text-align","center");eb(a,"div")})}function Qd(a){X('embed[type="evernote/x-crypto"],.en-crypto',a).forEach(function(a){E(a)})}function Rd(a){X("embed[src][id]",a).forEach(function(b){var c=Sd(b.id);c&&(c=fb(a,"object",{type:"application/x-apple-msg-attachment",data:"cid:"+c}),ab(b,c))});X("img[src]",a).forEach(function(a){var c=Sd(a.id);c&&a.setAttribute("src","cid:"+c)})}var Td=["javascript"];
function Ud(a){var b=a,b=decodeURIComponent(b)||b,b=b.replace(/[\x00-\x20]+/,""),b=b.replace(/<\!\-\-.*?\-\-\>/g,"");return(b=b.match(/^([a-zA-Z]+)\:/))?0<=Td.indexOf(b[1].toLowerCase())?"#":a.trim()||"#":a||"#"}function Vd(a){X("*[href]",a).forEach(function(a){a.setAttribute("href",Ud(a.getAttribute("href")))});X("*[src]",a).forEach(function(a){a.setAttribute("src",Ud(a.getAttribute("src")))})}function Wd(a){Da(function(){Kd(a);Md(a);Jd(a);Rd(a);Fd(a)})}
function Xd(a){Da(function(){Hd(a);for(var b=a;b=lb(b,a);){if(8==b.nodeType)if(0==b.data.indexOf("[CDATA[")){var c=b.nextSibling,b=ab(b,document.createTextNode(b.data.substr(7)));b.data.lastIndexOf("]]")!=b.data.length-2&&c&&3==c.nodeType?(c.data=c.data.replace(/^(.*?)\]\]\>(.*?)$/gi,"$1$2"),b.data+=">"):b.data=b.data.replace(/^(.*?)\]\](.*?)$/gi,"$1$2")}else b=ab(b,document.createTextNode(""));else 4==b.nodeType?b=ab(b,document.createTextNode(b.data)):-1===[1,3].indexOf(b.nodeType)&&w.warn("Usage of unsupported DOM node:",
b.nodeType,b.toString());F(b)&&b.style&&0<b.style.length&&T(b,"line-height")}Fd(a);Gd(a);Od(a);Vd(a);Id(a);Nd(a);Ld(a);Pd(a)})}function Yd(a){Da(function(){Kd(a);Jd(a);Fd(a)})}function Zd(a){a=(new DOMParser).parseFromString(a.toString(),"text/html");return(new XMLSerializer).serializeToString(a).replace(/^[\s\S]*<body[^>]*>/i,"").replace(/<\/body>[\s\S]*?$/i,"").replace(/\x00+/gi,"").replace(/&nbsp;/gi,"\u00a0")}
function Sd(a){a=(a||"").split(":");return 3<=a.length&&"en-media"===a[0]?a[2]:null}function $d(a){if(!a)return null;try{var b=[],c=a.querySelectorAll("embed[id],img[id]");for(a=0;a<c.length;a++){var d=c[a],f=(d.getAttribute("id")||"").split(":");if(3<=f.length&&"en-media"===f[0]){var e=f[2];e&&(d.setAttribute("src","?hash="+e),-1===b.indexOf(e)&&b.push(e))}}return b}catch(h){w.error("Exception in collectResourcesAction <$>",h.toString())}return null}
function Dc(a,b,c){c=na(c,{plain:!0,html:!1,raw:!1,xhtml:!1,resources:!1});if(!b||b.collapsed)return"";var d=Lc.$b("rte").Xa(),f=d.$b("query"),e=d.$b("table"),h=f.ub(b.startContainer,b.startOffset),k=O(b.startContainer,"td.en-selected",a),d=0;null!==k&&(h=f.ub(k,0),k=e.hd(k),0<k.column&&(d=k.column));b.setStart(h[0],h[1]);k=O(b.endContainer,"td.en-selected",a);h=0;if(null!==k){var g=f.cc(k,N(k));b.setEnd(g[0],g[1]);k=e.hd(k);(e=e.Rd(k.table))&&e.columns>k.column&&(h=e.columns-k.column-1)}k=b.cloneContents();
e=document.createElement("body");e.appendChild(k);for(k=b.commonAncestorContainer;k&&f.d(k)&&f.l(k);)F(k)&&db(e,k.cloneNode(!1)),k=k.parentNode;if(Xa(e).some(function(a){return L(a,"li,tr,td")})&&(a=O(b.startContainer,"table,ul,ol",a)))for(a=a.cloneNode(!1),e.insertBefore(a,e.firstChild);;)if((b=e.children[1])&&L(b,"li,ol,ul,tr,td"))a.appendChild(b);else break;if(0<d||0<h){k=W("tr",e);if(0<d&&0<k.length)for(g=k[0],a=0;a<d;a++)b=g.firstChild.cloneNode(!1),f=I("div",{},[I("br")]),b.appendChild(f),g.insertBefore(b,
g.firstChild);if(0<h&&0<k.length)for(d=k[k.length-1],a=0;a<h;a++)b=d.lastChild.cloneNode(!1),f=I("div",{},[I("br")]),b.appendChild(f),d.appendChild(b)}Qd(e);var l={};c.plain&&Fb(e.cloneNode(!0),function(a){a=(a=a.innerText||a.textContent)?a.replace(/\u00A0/g," "):"";l.plain=a});c.resources&&(l.resources=$d(e)||[]);c.raw&&(d=e.cloneNode(!0),Fd(d),l.raw=za(d.outerHTML));c.html&&(Wd(e),l.html=za(e.outerHTML));return JSON.stringify(l)}
function jd(){return I("span",{style:"-evernote-last-insertion-point:true;",id:"en-editor-last-insertion-point"})}function Ad(a){for(var b=Ha.concat("id","contenteditable"),c=z(a.attributes||[]).map(function(a){return a.name.toLowerCase()}),d=0;d<c.length;d++){var f=c[d];-1===b.indexOf(f)&&a.removeAttribute(f)}T(a,"height");T(a,"width");T(a,"max-height");T(a,"max-width");T(a,"min-height");T(a,"min-width")}
function Dd(a,b){for(var c='<div id="en-note"',d=0;d<Ha.length;d++){var f=Ha[d].toLowerCase();a.hasAttribute(f)&&(c+=" "+f+'="'+la(a.getAttribute(f))+'"')}return c+">"+b+"</div>"}function ae(){return I("div",{},[I("br")])};function be(){var a=this;a.name="context";a.e=function(b){var c=b.root;x(F(c),"We expect a valid root element",c);a.root=c;var d=b.dg||Y(a.root)||null,f=!1,e=null;a.ia={};a.k=function(b){return a.ia[b]||{}};(function(){function b(){var h=a.a();e&&h&&e.startContainer===h.startContainer&&e.endContainer===h.endContainer&&e.startOffset===h.startOffset&&e.endOffset===h.endOffset||(c={},d={},e=h?h.cloneRange():null)}var c={},d={},e=null;a.fc=function(a){b();return c[a]};a.Be=function(a,d){b();c[a]=d};a.Me=
function(a){b();delete c[a]};a.hc=function(a){b();return d[a]};a.De=function(a,c){b();d[a]=c;"backcolor"===a?d.Ve=c:"highlight"===a&&(d.mf=c)};a.Nf=function(a){b();delete d[a];"backcolor"===a?delete d.Ve:"highlight"===a&&delete d.mf}})();a.a=function(){return d};a.Pa=function(a){d=a||null;f=!0};a.Vf=function(){w.log("getOtherRange",ha(e));return e};a.eg=function(a){e=a||null;w.log("setOtherRange",ha(e))};a.ze=function(a,b){d.setStart(a,b);f=!0};a.ye=function(a,b){d.setEnd(a,b);f=!0};a.Qa=function(){d=
Y(c)||null;f=!1};a.$f=function(){a.fa()};a.fa=function(){f&&(Lb(d,c),a.Qa())};a.Ff=function(a){d||(d=c.ownerDocument.createRange());d.selectNode(a);f=!0};a.j=function(a,b,e,l){d||(d=c.ownerDocument.createRange());d.setStart(a,b);e?d.setEnd(e,l||0):d.setEnd(a,b);f=!0};a.s=function(b,c,g){c&&-1===g&&(g=c.childNodes.length);var l=b.parentNode,m=M(b);x(!!d,"Global range expected");var f=[[d.startContainer,d.startOffset],[d.endContainer,d.endOffset]];e&&f.push([[e.startContainer,e.startOffset],[e.endContainer,
e.endOffset]]);for(var r=f.length,u=0;u<r;u++){var p=f[u];p[0]===c&&p[1]>g&&p[1]++;p[0]!==l||p[1]!==m&&p[1]!==m+1||(c?(p[0]=c,p[1]+=g-m):p[1]>m&&0<p[1]&&--p[1]);p[0]===l&&p[1]>m+1&&p[1]--;!c&&ib(p[0],b)&&(p[0]=b.parentNode,p[1]=M(b))}c?c.childNodes.length===g?c.appendChild(b):c.insertBefore(b,c.childNodes[g]):E(b);a.j(f[0][0],f[0][1],f[1][0],f[1][1]);e&&(u=2,e=Kb(f[u][0],f[u][1],f[u+1][0],f[u+1][1]))};a.ie=function(b,c,d){x(b!==c,"Do not move into itself");for(var e;e=b.firstChild;)a.s(e,c,0>d?-1:
d++)};a.insertBefore=function(b,c,d){a.s(b,c,d?M(d):-1)};a.Sb=function(b,c){a.s(b,c,-1)};a.removeNode=function(b){a.s(b)};a.ve=function(b){for(;b.firstChild;)a.removeNode(b.firstChild)};a.oa=function(b,c){if(b&&b.tagName.toLowerCase()===c.toLocaleLowerCase())return b;var d=b.parentNode;if(!d)return b;for(var e=I(c),m=0;m<b.attributes.length;m++)e.setAttributeNS(b.attributes[m].namespaceURI,b.attributes[m].name,b.attributes[m].value);a.s(e,d,M(b));a.ie(b,e,0);a.removeNode(b);return e};a.dump=function(){var b;
if(b=a.a()){var d=qc(c,b);b=c.cloneNode(!0);if(d=rc(b,d)){if(d.startContainer.nodeType==Node.TEXT_NODE||d.startContainer.nodeType==Node.COMMENT_NODE)d.collapsed?d.startContainer.insertData(d.startOffset,"[]"):d.startContainer.insertData(d.startOffset,"[");else{var e=d.collapsed?"{}":"{";d.startOffset!=d.startContainer.childNodes.length&&d.startContainer.childNodes[d.startOffset].nodeType==Node.TEXT_NODE?d.startContainer.childNodes[d.startOffset].insertData(0,e):0!=d.startOffset&&d.startContainer.childNodes[d.startOffset-
1].nodeType==Node.TEXT_NODE?d.startContainer.childNodes[d.startOffset-1].appendData(e):d.startContainer.insertBefore(document.createTextNode(e),d.startContainer.childNodes.length==d.startOffset?null:d.startContainer.childNodes[d.startOffset])}d.collapsed||(d.endContainer.nodeType==Node.TEXT_NODE||d.endContainer.nodeType==Node.COMMENT_NODE?d.endContainer.insertData(d.endOffset,"]"):d.endOffset!=d.endContainer.childNodes.length&&d.endContainer.childNodes[d.endOffset].nodeType==Node.TEXT_NODE?d.endContainer.childNodes[d.endOffset].insertData(0,
"}"):0!=d.endOffset&&d.endContainer.childNodes[d.endOffset-1].nodeType==Node.TEXT_NODE?d.endContainer.childNodes[d.endOffset-1].appendData("}"):d.endContainer.insertBefore(document.createTextNode("}"),d.endContainer.childNodes.length==d.endOffset?null:d.endContainer.childNodes[d.endOffset]))}b=b.innerHTML}else b=c.innerHTML;return b};a.hasFocus=function(){return vb(c)&&!!Y(c)}};a.v=function(){a.root=null}};function ce(){var a=this,b=this;b.name="format";b.e=function(){var c=b.f("context"),d=b.f("query");a.ld=function(a){var b=a.previousSibling;if(b){for(;b.hasChildNodes();)b=b.lastChild;for(;d.L(b)&&!d.Ha(b)&&b!=a.parentNode;)b=d.previousNode(b);d.d(b)&&d.Ha(b)&&b.parentNode.removeChild(b)}};a.kd=function(a){for(var b=a;b.hasChildNodes();)b=b.lastChild;for(;d.L(b)&&!d.Ha(b)&&b!=a;)b=d.previousNode(b);if(d.d(b)&&d.Ha(b)){for(;d.d(b.parentNode)&&d.L(b.parentNode);)b=b.parentNode;b.parentNode.removeChild(b)}};
a.Bf=function(b){a.ld(b);a.kd(b)};a.pa=function(b,e,g){"undefined"==typeof e&&(e=function(){return!1});"undefined"==typeof g&&(g=function(){return null});if(b.every(d.L)&&!b.some(function(a){return S(a)})||!b[0].parentNode)return null;for(d.l(b[b.length-1])&&!S(b[b.length-1])&&S(b[b.length-1].nextSibling)&&b.push(b[b.length-1].nextSibling);d.L(b[0].previousSibling);)b.unshift(b[0].previousSibling);for(;d.L(b[b.length-1].nextSibling);)b.push(b[b.length-1].nextSibling);g=d.d(b[0].previousSibling)&&
e(b[0].previousSibling)?b[0].previousSibling:d.d(b[b.length-1].nextSibling)&&e(b[b.length-1].nextSibling)?b[b.length-1].nextSibling:g();if(!g)return null;if(!g.parentNode){b[0].parentNode.insertBefore(g,b[0]);var l=c.a();l.startContainer==g.parentNode&&l.startOffset==M(g)&&c.ze(l.startContainer,l.startOffset+1);l.endContainer==g.parentNode&&l.endOffset==M(g)&&c.ye(l.endContainer,l.endOffset+1)}l=b[0].parentNode;if(g.compareDocumentPosition(b[0])&4){!d.l(g)&&d.l([].filter.call(g.childNodes,d.J).slice(-1)[0])&&
d.l(b.filter(d.J)[0])&&!S(g.lastChild)&&g.appendChild(I("br"));for(var m=0;m<b.length;m++)c.s(b[m],g,-1)}else for(!d.l(g)&&d.l([].filter.call(g.childNodes,d.J)[0])&&d.l(b.filter(d.J).slice(-1)[0])&&!S(b[b.length-1])&&g.insertBefore(I("br"),g.firstChild),m=b.length-1;0<=m;m--)c.s(b[m],g,0);d.d(l)&&!l.hasChildNodes()&&l.parentNode.removeChild(l);if(d.d(g.nextSibling)&&e(g.nextSibling)){for(!d.l(g)&&d.l(g.lastChild)&&d.l(g.nextSibling.firstChild)&&!S(g.lastChild)&&g.appendChild(I("br"));g.nextSibling.hasChildNodes();)c.s(g.nextSibling.firstChild,
g,-1);c.removeNode(g.nextSibling)}a.Bf(g);return g};a.Yc=function(b,c){return c.collapsed?!1:d.nc(b,c)||b==c.startContainer&&3===b.nodeType&&N(b)!=c.startOffset||b==c.endContainer&&3===b.nodeType&&0!=c.endOffset||!(!b.hasChildNodes()||![].every.call(b.childNodes,function(b){return a.Yc(b,c)})||d.oc(c.startContainer,b)&&3==c.startContainer.nodeType&&0!=c.startOffset||d.oc(c.endContainer,b)&&3==c.endContainer.nodeType&&c.endOffset!=N(c.endContainer))?!0:!1};a.C=function(b,c){"undefined"==typeof c&&
(c=function(){return!0});for(var e=b.startContainer;a.Yc(e.parentNode,b);)e=e.parentNode;for(var l=d.na(b.endContainer),m=[];!l&&e||l&&e.compareDocumentPosition(l)&4;)a.Yc(e,b)&&c(e)&&m.push(e),e=d.nextNode(e);return m};a.Zd=function(a){if(!R(a))return!1;var b=a.tagName.toUpperCase();if(-1!="B EM I S SPAN STRIKE STRONG SUB SUP U".split(" ").indexOf(b)&&(0==a.attributes.length||1==a.attributes.length&&a.hasAttribute("style")))return!0;if("FONT"==b||"A"==b){var c=a.attributes.length;a.hasAttribute("style")&&
c--;"FONT"==b&&(a.hasAttribute("color")&&c--,a.hasAttribute("face")&&c--,a.hasAttribute("size")&&c--);"A"==b&&a.hasAttribute("href")&&c--;if(0==c)return!0}return!1};a.qc=function(a){if(!R(a))return!1;var b=a.tagName.toUpperCase();return-1=="A B EM FONT I S SPAN STRIKE STRONG SUB SUP U".split(" ").indexOf(b)?!1:0==a.attributes.length?!0:1<a.attributes.length?!1:a.hasAttribute("style")&&0==a.style.length||"A"==b&&a.hasAttribute("href")||"FONT"==b&&(a.hasAttribute("color")||a.hasAttribute("face")||a.hasAttribute("size"))||
("B"==b||"STRONG"==b)&&a.hasAttribute("style")&&1==a.style.length&&""!=a.style.fontWeight||("I"==b||"EM"==b)&&a.hasAttribute("style")&&1==a.style.length&&""!=a.style.fontStyle||("A"==b||"FONT"==b||"SPAN"==b)&&a.hasAttribute("style")&&1==a.style.length&&""==a.style.textDecoration||-1!="A FONT S SPAN STRIKE U".split(" ").indexOf(b)&&a.hasAttribute("style")&&(1==a.style.length||4==a.style.length&&"MozTextBlink"in a.style&&"MozTextDecorationColor"in a.style&&"MozTextDecorationLine"in a.style&&"MozTextDecorationStyle"in
a.style)&&("line-through"==a.style.textDecoration||"underline"==a.style.textDecoration||"overline"==a.style.textDecoration||"none"==a.style.textDecoration)?!0:!1};a.ga=function(a,b,d){return null===b&&null===d||v(b)&&v(d)&&b==d&&!c.k(a).Ea||v(b)&&v(d)&&c.k(a).Ea&&c.k(a).Ea(b,d)?!0:!1};a.va=function(b,c,d){return a.ga(b,c,d)?!0:!1};a.u=function(b,e){if(1!==b.nodeType&&(!b.parentNode||1!=b.parentNode.nodeType))return null;if(1!==b.nodeType)return a.u(b.parentNode,e);if("createlink"===e||"unlink"===
e){for(;b&&(!R(b)||"a"!==G(b)||!b.hasAttribute("href"));)b=b.parentNode;return b?b.getAttribute("href"):null}if("backcolor"===e){for(;("rgba(0, 0, 0, 0)"===J(b).backgroundColor||""===J(b).backgroundColor||"transparent"===J(b).backgroundColor)&&b.parentNode&&1===b.parentNode.nodeType;)b=b.parentNode;return J(b).backgroundColor}if("highlight"===e){for(;("rgba(0, 0, 0, 0)"===J(b).backgroundColor||""===J(b).backgroundColor||"transparent"===J(b).backgroundColor)&&b.parentNode&&1===b.parentNode.nodeType;)b=
b.parentNode;return J(b).backgroundColor}if("subscript"===e||"superscript"===e){for(var g=!1,l=!1;d.l(b);)R(b,"sub")?g=!0:R(b,"sup")&&(l=!0),b=b.parentNode;return g&&l?"mixed":g?"subscript":l?"superscript":null}if("strikethrough"===e)return O(b,function(a){return-1!=J(a).textDecoration.indexOf("line-through")},c.root)?"line-through":null;if("underline"===e)return O(b,function(a){return-1!=J(a).textDecoration.indexOf("underline")},c.root)?"underline":null;if("tt"===e)return O(b,"tt",c.root)?"tt":null;
x(!!c.k(e).Q,"Bug: no relevantCssProperty for "+e+" in f.getEffectiveCommandValue");return J(b)[c.k(e).Q]};a.G=function(a,b){if(("backcolor"===b||"highlight"===b)&&"inline"!=J(a).display)return null;var d=G(a);if("createlink"===b||"unlink"===b)return"a"===d&&a.hasAttribute("href")?a.getAttribute("href"):null;if("subscript"===b||"superscript"===b)return"sup"===d?"superscript":"sub"===d?"subscript":null;if("strikethrough"===b&&""!=a.style.textDecoration)return-1!=a.style.textDecoration.indexOf("line-through")?
"line-through":null;if("strikethrough"===b&&("s"===d||"strike"===d||"del"===d))return"line-through";if("underline"===b&&""!=a.style.textDecoration)return-1!=a.style.textDecoration.indexOf("underline")?"underline":null;if("underline"===b&&"u"===d)return"underline";if("highlight"===b&&"mark"===d)return"rgb(255, 250, 165)";if("tt"==d)return"tt";var e=c.k(b),m=e.Q;if(null===m)return null;var f=a.style[m];if(""!=f)return(d=e.O)&&d.length?("highlight"===b&&(f=de(f)),-1!==d.indexOf(f)?f:null):f;if("font"===
d){if("color"==m&&a.hasAttribute("color"))return a.color;if("fontFamily"==m&&a.hasAttribute("face"))return a.face;if("fontSize"==m&&a.hasAttribute("size"))return J(a).fontSize.toString()}return"fontWeight"!=m||"b"!=d&&"strong"!=d?"fontStyle"!=m||"i"!=d&&"em"!=d?null:"italic":"bold"};a.we=function(b,d,e){for(var l=b;a.Zd(l)&&1==l.childNodes.length&&a.Zd(l.firstChild)&&(!a.qc(l)||!a.ga(d,a.G(l,d),e));)l=l.firstChild;if(l!=b&&a.qc(l)&&a.ga(d,a.G(l,d),e)&&a.va(d,a.u(l,d),e)){for(;l.hasChildNodes();)c.s(l.firstChild,
l.parentNode,M(l));b.parentNode.insertBefore(l,b.nextSibling);c.s(b,l,-1)}};a.P=function(b){var c=[];b.forEach(function(b){"subscript forecolor highlight backcolor fontname fontsize bold italic strikethrough underline tt".split(" ").forEach(function(d){var e=b;1!=e.nodeType&&(e=e.parentNode);for(;e&&1==e.nodeType&&null===a.G(e,d);)e=e.parentNode;e&&1==e.nodeType?c.push([b,d,a.G(e,d)]):c.push([b,d,null])})});return c};a.R=function(b){b.forEach(function(b){var c=b[0],d=b[1];b=b[2];var e=c;e&&1==e.nodeType||
(e=e.parentNode);for(;e&&1==e.nodeType&&null===a.G(e,d);)e=e.parentNode;null===b&&e&&1==e.nodeType?a.qe(c,d,null):(e&&1==e.nodeType&&!a.ga(d,a.G(e,d),b)||(!e||1!=e.nodeType)&&null!==b)&&a.rb(c,d,b)})};a.Ic=function(b,e){if(d.d(b)&&null!==a.G(b,e))if(a.qc(b)){for(var g=Array.prototype.slice.call(b.childNodes),l=0;l<g.length;l++)c.s(g[l],b.parentNode,M(b));b.parentNode.removeChild(b)}else"strikethrough"===e&&-1!=b.style.textDecoration.indexOf("line-through")&&(b.style.textDecoration="line-through"==
b.style.textDecoration?"":b.style.textDecoration.replace("line-through","")),"underline"===e&&-1!=b.style.textDecoration.indexOf("underline")&&(b.style.textDecoration="underline"==b.style.textDecoration?"":b.style.textDecoration.replace("underline","")),null!==c.k(e).Q&&(b.style[c.k(e).Q]=""),R(b,"font")&&("forecolor"===e&&b.removeAttribute("color"),"fontname"===e&&b.removeAttribute("face"),"fontsize"===e&&b.removeAttribute("size")),!R(b,"a")||"createlink"!==e&&"unlink"!==e||b.removeAttribute("href"),
""==b.getAttribute("style")&&b.removeAttribute("style"),null===a.G(b,e)||c.oa(b,"span")};a.qe=function(b,c,e){if(b.parentNode&&1==b.parentNode.nodeType&&!a.va(c,a.u(b,c),e)){for(var l=b.parentNode,m=[];d.d(l)&&1==l.nodeType&&!a.va(c,a.u(l,c),e);)m.push(l),l=l.parentNode;if(m.length){var f=a.G(m[m.length-1],c);if(null!==f||f==e)if(null===e||a.va(c,a.u(m[m.length-1].parentNode,c),e))for(;m.length;)for(l=m.pop(),null!==a.G(l,c)&&(f=a.G(l,c)),e=Array.prototype.slice.call(l.childNodes),null!==a.G(l,c)&&
a.Ic(l,c),l=0;l<e.length;l++){var r=e[l];r!=b&&(1!=r.nodeType||null===a.G(r,c)||a.ga(c,f,a.G(r,c)))&&r!=m[m.length-1]&&a.rb(r,c,f)}}}};a.rb=function(b,e,g){if(b.parentNode&&null!==g&&(d.H(b,"span")&&(a.we(b.previousSibling,e,g),a.we(b.nextSibling,e,g),a.pa([b],function(b){return a.qc(b)&&a.ga(e,a.G(b,e),g)&&a.va(e,a.u(b,e),g)},function(){return null})),!d.L(b)&&!a.va(e,a.u(b,e),g)&&b.parentNode))if(!d.H(b,"span")){for(var l=[],m=0;m<b.childNodes.length;m++){if(1==b.childNodes[m].nodeType){var f=a.G(b.childNodes[m],
e);if(null!==f&&!a.ga(e,g,f))continue}l.push(b.childNodes[m])}for(m=0;m<l.length;m++)a.rb(l[m],e,g)}else if(!a.va(e,a.u(b,e),g)){l=null;if("bold"!==e||"bold"!==g&&"700"!==g)if("italic"===e&&"italic"===g)l=I("i");else if("strikethrough"===e&&"line-through"==g)l=I("s");else if("underline"===e&&"underline"===g)l=I("u");else if("tt"===e&&"tt"===g)l=I("tt");else if("createlink"===e||"unlink"===e)for(l=I("a"),l.setAttribute("href",g),m=b.parentNode;m;)R(m,"a")&&(m=c.oa(m,"span")),m=m.parentNode;else"subscript"!==
e&&"superscript"!==e||"subscript"!==g?"subscript"!==e&&"superscript"!==e||"superscript"!==g||(l=I("sup")):l=I("sub");else l=I("b");l||(l=I("span"));b.parentNode.insertBefore(l,b);m=c.k(e).Q;null===m||a.va(e,a.u(l,e),g)||(l.style[m]=g,"highlight"===e&&U(l,"-evernote-highlight","true"));"forecolor"===e&&ee(g)&&(l.style.color=g);"fontname"===e&&null!=g&&(l.style.fontFamily=g);"fontsize"===e&&null!=g&&(l.style.fontSize=g);"strikethrough"===e&&"line-through"==g&&"line-through"!=a.u(l,"strikethrough")&&
(l.style.textDecoration="line-through");"underline"===e&&"underline"==g&&"underline"!=a.u(l,"underline")&&(l.style.textDecoration="underline");c.s(b,l,l.childNodes.length);if(1===b.nodeType&&!a.ga(e,a.u(b,e),g)){c.s(b,l.parentNode,M(l));l.parentNode.removeChild(l);l=[];for(m=0;m<b.childNodes.length;m++){if(1==b.childNodes[m].nodeType&&(f=a.G(b.childNodes[m],e),null!==f&&!a.ga(e,g,f)))continue;l.push(b.childNodes[m])}for(m=0;m<l.length;m++)a.rb(l[m],e,g)}}};a.M=function(b,e,g){var l=!1;void 0===g&&
(g=c.a(),l=!0);if(a.C(g).some(d.Y)){if(d.d(g.startContainer)&&3==g.startContainer.nodeType&&0!=g.startOffset&&g.startOffset!=N(g.startContainer)){var m;if(g.startContainer==g.endContainer){var f=g.endOffset-g.startOffset;m=g.startContainer.splitText(g.startOffset);g.setEnd(m,f)}else m=g.startContainer.splitText(g.startOffset);g.setStart(m,0)}d.d(g.endContainer)&&3==g.endContainer.nodeType&&0!=g.endOffset&&g.endOffset!=N(g.endContainer)&&(m=[g.startContainer,g.startOffset],f=[g.endContainer,g.endOffset],
g.endContainer.splitText(g.endOffset),g.setStart(m[0],m[1]),g.setEnd(f[0],f[1]));l&&c.Pa(g);a.C(g,function(a){return d.d(a)&&1===a.nodeType}).forEach(function(c){a.Ic(c,b)});a.C(g,d.d).forEach(function(c){a.qe(c,b,e);d.H(c,"span")&&a.rb(c,b,e)})}else c.k(b).O&&c.Be(b,-1!=c.k(b).O.indexOf(e)),"subscript"===b&&c.Me("superscript"),"superscript"===b&&c.Me("subscript"),null===e?c.Nf(b):("createlink"===b||c.k(b).value)&&c.De(b,e)};var f="bold italic strikethrough subscript superscript underline highlight tt".split(" "),
e=["fontname","fontsize","forecolor"];a.jd=function(){var a=[];void 0!==c.hc("createlink")&&a.push(["createlink",c.hc("createlink")]);f.forEach(function(b){void 0!==c.fc(b)&&a.push([b,c.fc(b)])});e.forEach(function(b){void 0!==c.hc(b)&&a.push([b,c.hc(b)])});return a};a.se=function(b){var k=[],g=a.C(c.a()).filter(d.Y)[0];!g&&b&&(b=c.a())&&(g=Pb(b));if(!g)return k;k.push(["createlink",a.u(g,"createlink")]);f.forEach(function(b){var d=a.u(g,b);-1!=c.k(b).O.indexOf(d)?k.push([b,!0]):k.push([b,!1])});
e.forEach(function(a){k.push([a,c.k(a).value()])});return k};a.Ma=function(b){var e=a.C(c.a()).filter(d.Y)[0];if(e)for(var g=0;g<b.length;g++){var l=b[g][0],m=b[g][1];"boolean"===typeof m&&c.k(l).state()!==m?c.k(l).action(m):v(m)&&!a.ga(l,a.u(e,l),m)&&c.k(l).action(m);e=a.C(c.a()).filter(d.Y)[0]||e}else for(g=0;g<b.length;g++)l=b[g][0],m=b[g][1],"boolean"==typeof m&&c.Be(l,m),v(m)&&c.De(l,m)};a.tf=function(b){var d=a.se(!0);b();c.fa();a.Ma(d)};a.Wa=function(){return c.root}}};function fe(){var a=this;a.name="normalize";a.e=function(){function b(){if(!g(t,!0)&&r.ra(t)){$a(t);var a=ae();t.appendChild(a);q.j(a,0)}}function c(){var a=l(t,d);a.reverse();a.forEach(function(a){do{var b=a.parentNode;q.removeNode(a);a=b}while(d(a))})}function d(a){return!(!a||!ib(a,t)||(!mb(a)||""!==a.data)&&(!F(a)||a.hasChildNodes()||pb(a)||r.ca(a)||S(a)))}function f(a){(a=Eb(a))&&m(a,"div>div,div>table,div>ol,div>ul").forEach(function(a){var b=a.parentNode;if(b&&!r.zb(b)){if(R(a,"div")){["text-align"].forEach(function(c){if(!a.style[c]){var d=
b.style[c];d&&(a.style[c]=d)}});var c=r.vb(b)+r.vb(a);0<c?U(a,"margin-left",c+"px"):T(a,"margin-left")}var c=[a],d=u.P(c);p.V(c);u.R(d);e(r.I(a))}})}function e(a){var b=a&&a.nextSibling;b&&!g(b)&&q.removeNode(b);(a=a&&a.previousSibling)&&!g(a)&&q.removeNode(a)}function h(a){if(L(a,"ul,ol")&&r.d(a)&&r.rc(a,!0))for(var b=null,c=a.childNodes.length-1;0<=c;c--){var d=a.childNodes[c];L(d,"li,ol,ul")?b=null:pb(d)?q.oa(d,"li"):Db(d)?q.removeNode(d):(b||(b=I("li"),q.insertBefore(b,d.parentNode,d.nextSibling)),
q.s(d,b,0))}}function k(a){x(!!a,"expected node");if("hr"===G(a)){var b=I("div");b.appendChild(a);return b}do{var c=Kb(a,0),c=r.W(c);if(c.collapsed)return null;for(;r.t(b=c.startContainer.childNodes[c.startOffset]);)c.setStart(b,0);b=r.ja(c);if(0>=b.length)return Qb(c);for(var c=b[0].parentNode,d=r.t(c)&&b[0]===c.firstChild&&b[b.length-1]===c.lastChild;b.length&&Db(b[0]);)q.removeNode(b.shift());var e=r.zb(c);if(d){if(!e)break;if(0>=b.length||!Xa(c).some(function(a){return g(a)})){p.Ua(c);break}}b.length&&
(d=u.P(b),c=u.pa(b,function(){return!1},function(){return I("div")}),u.R(d),p.$(c))}while(0);return c}function g(a,b){if(!a)return!1;if(3===a.nodeType&&!r.Wc(a)||r.ca(a)||L(a,"table,tr,td,th,li")||S(a)&&(b?!r.mc(a):!r.Ha(a)))return!0;for(var c=0;c<a.childNodes.length;c++)if(g(a.childNodes[c],b))return!0;return!1}function l(a,b){var c;if(v(b))c=W(b,a);else{c=[];if(a)for(var d=a;null!==d;d=lb(d,a))c.push(d);c=c.filter(b)}if(!c)return[];c.reverse();return c}function m(a,b){for(var c=[];a&&a!==t;)L(a,
b)&&c.unshift(a),a=a.parentNode;return c}var q=a.f("context"),r=a.f("query"),u=a.f("format"),p=a.f("block"),t=q.root;a.uc=function(a){function b(a){var c=J(a)||{},c={fontWeight:c.fontWeight,ff:c.fontFamily,fontSize:c.fontSize,marginTop:lc(c.marginTop),marginBottom:lc(c.marginBottom)},e=J(a.parentNode)||{};a=d(a);c.fontWeight&&"normal"!==c.fontWeight&&400!=c.fontWeight&&(a.style.fontWeight=c.fontWeight);c.fontFamily&&c.ff!==e.fontName&&(a.style.fontFamily=c.fontFamily);c.fontSize&&c.fontSize!==e.fontSize&&
(a.style.fontSize=c.fontSize);0<=1*c.marginTop-lc(e.fontSize)&&(r.rf(a)?(a.appendChild(I("br")),a.appendChild(I("br"))):(c=ae(),q.s(c,a.parentNode,M(a)),f(c)));return a}function d(b,c){var e=a===b,h=q.oa(b,c||"div");e&&(a=h);return h}if(!a)return null;a=Eb(a);m(a,"dl").forEach(function(a){a&&(W("dt",a).forEach(b),W("dd",a).forEach(function(a){p.Rc(b(a))}),b(a))});m(a,"h1,h2,h3,h4,h5,h6,p").forEach(b);m(a,"blockquote").forEach(function(a){a=b(a);a.style.marginLeft="";p.Rc(a);Xa(a).forEach(f)});m(a,
"th").forEach(function(a){a=d(a,"td");var b=document.createRange();b.selectNodeContents(a);u.M("bold","bold",b)});var g=!1;m(a,"ol,ul").forEach(function(a){g||(l(a,"li div").forEach(function(a){r.zb(a)||p.Gb(a)}),l(a,"li").forEach(p.Ba),l(a,'li[style*="list-style:"]').forEach(function(a){if("none"===zb(a,"list-style")){for(;Db(a.previousSibling);)q.removeNode(a.previousSibling);L(a.previousSibling,"li")?(q.ie(a,a.previousSibling,-1),q.removeNode(a)):a.removeAttribute("style")}}));g=!0;h(a)});g||(a=
Eb(a),a=k(a));a=Eb(a);f(a);m(a,"*[style]").forEach(function(a){T(a,"line-height")});a=r.I(a);c();e(a);return a};a.Ka=function(){a.uc(Pb(q.a()));b()};a.me=function(){a.uc(Qb(q.a()));b()};a.le=function(){q.a().collapsed||a.me();a.Ka()};a.xf=function(){for(var c=Pb(q.a()),d,e=2;c&&0<e;)Db(c)?d=hb(c,t):r.l(c)?(--e,d=a.uc(c),d=Cb(d,function(a){return r.l(a)&&r.I(d)!==r.I(a)},t)):d=hb(c,t),x(d!==c,"iterate!",d,c),c=d;b()};a.dd=function(c,d){q.a()||q.j(t,0);var e=0;d||(d=B);var h=u.Wa();l(h,"td:empty,th:empty").forEach(function(a){q.Sb(ae(),
a)});l(h,"li:empty").forEach(function(a){q.Sb(I("br"),a)});l(h,"hr").forEach(function(a){a.parentNode!==h&&p.V([a])});for(var g=c||h.firstChild,k;g&&d(g)&&1111>e++;){g=Eb(g);if(Db(g)&&1<N(g.parentNode))k=lb(g,h),q.removeNode(g);else if(r.l(g)||L(g,"td,li,div")){var m=g.nextSibling;(k=a.uc(g))||(k=m);k=Bb(k,function(a){return r.l(a)&&r.I(k)!==r.I(a)},h)}else k=lb(g,h);g=k}b();0>=e&&w.error("Normalization reached safety limit, this probably indicates that the current document failed to get normalized and may behave unexpectedly.")};
a.Ja=function(){q.a().collapsed?a.Ka():a.dd(Pb(q.a()),function(a){var b=q.a();return b&&!(a.compareDocumentPosition(Qb(b))&2)})}}};function ge(){return I("div",{},[I("br")])}function he(a){return(a=/^[\'\"]?(.*?)[\'\"]?(,|$)/.exec(a))&&a[1]?a[1]:null}
function de(a){if("currentcolor"===a.toLowerCase())return null;void 0===je&&(je={});if(void 0!==je[a])return je[a];var b=a,c=I("span");document.body.appendChild(c);c.style.color="black";var d=I("span");c.appendChild(d);d.style.color=a;a=J(d).color;if("rgb(0, 0, 0)"===a&&(c.color="white",a=J(d).color,"rgb(0, 0, 0)"!==a))return je[b]=null;document.body.removeChild(c);if(/^rgba\([0-9]+, [0-9]+, [0-9]+, 1\)$/.test(a))return je[b]=a.replace("rgba","rgb").replace(", 1)",")");if("transparent"===a)return je[b]=
"rgba(0, 0, 0, 0)";a=a.replace(/, 0.496094\)$/,", 0.5)");return je[b]=a}var je;function ee(a){a=de(a);return(a=/^rgb\(([0-9]+), ([0-9]+), ([0-9]+)\)$/.exec(a))?"#"+(parseInt(a[1],10)||0).toString(16).replace(/^.$/,"0$&")+(parseInt(a[2],10)||0).toString(16).replace(/^.$/,"0$&")+(parseInt(a[3],10)||0).toString(16).replace(/^.$/,"0$&"):null};function ke(){var a=this,b=this;b.name="block";b.e=function(){var c=b.f("context"),d=b.f("query"),f=b.f("format");a.Ua=function(a){(a=d.I(a))&&(d.d(a)||d.ma(a))&&!d.yb(a)&&(c.ve(a),d.zb(a)?c.Sb(ge(),a):c.Sb(I("br"),a))};a.$=function(b){if(d.d(b))if(d.qa(b).every(function(a){return!d.B(b,a)||!d.H(b,a)}))L(b,"dd,dt")?f.pa([b],function(a){return R(a,"dl")&&!a.attributes.length},function(){return I("dl")}):d.H("p",d.tb(b))&&d.ab(b)&&(b=c.oa(b,"div"),a.$(b),z(b.childNodes).filter(d.ab).forEach(function(b){var c=
f.P([b]);a.V([b]);f.R(c)}));else{for(var h=f.P([b]);!d.H(b,b.parentNode);)a.V([b]);f.R(h)}};a.Ba=function(a){if(R(a,"li")&&d.d(a)&&d.d(a.parentNode)){for(var b=function(a){return L(a,"ol,ul")},k=!1,g=null;z(a.childNodes).some(b);){var l=a.lastChild;b(l)||!g&&Db(l)?(g=null,c.s(l,a.parentNode,1+M(a)),k=!0):d.L(l)?c.removeNode(l):(g||(g=I("li"),a.parentNode.insertBefore(g,a.nextSibling)),c.s(l,g,0),k=!0)}k&&d.ra(a,0)&&c.removeNode(a)}};a.jf=function(){if(!c.a())return null;var a=d.W(c.a()),a=d.ja(a,
function(a){return d.d(a)&&!d.Ia(a)&&(L(a,"ol,ul")||L(a.parentNode,"ol,ul")||d.H(a,"li"))});return a.length?a:null};a.la=function(){function b(a,c){var e=["ol","ul","tl"];e.splice(e.indexOf(a),1);e=e.join(",");return d.Ab(c,a)&&null==c.querySelector(e)||!L(c,"ol,ul")&&d.Ab(c.parentNode,a)||R(c.parentNode,"li")&&d.Ab(c.parentNode.parentNode,a)}var c=a.jf();if(!c)return"none";for(var k=["ol","ul","tl"],g=0;g<k.length;g++){var l=k[g];if(c.every(b.bind(c,l)))return l}return c.some(function(a){return L(a,
"ol,ul")||L(a.parentNode,"ol,ul")||"querySelector"in a&&a.querySelector("ol,ul")||L(a.parentNode,"li")&&L(a.parentNode.parentNode,"ol,ul")})?"mixed":"none"};a.bc=function(a){for(;a&&1!==a.nodeType||1===a.nodeType&&-1!==["inline","none"].indexOf(J(a).display);)a=a.parentNode;if(!a||1!==a.nodeType)return"left";var b=J(a).textAlign.replace(/^-(moz|webkit)-/,"").replace(/^auto$/,"start");return"start"===b?"ltr"===d.Nc(a)?"left":"right":"end"===b?"ltr"===d.Nc(a)?"right":"left":-1!==["center","justify",
"left","right"].indexOf(b)?b:"left"};a.bf=function(b){void 0===b&&(b={});var h="blockMerging"in b?Boolean(b.Sf):!0,k="stripWrappers"in b?Boolean(b.Kb):!0,g="direction"in b?b.direction:"forward";if(c.a()){a.Sa(c.a().startContainer,c.a().startOffset);a.Sa(c.a().endContainer,c.a().endOffset);b=d.cc(c.a().startContainer,c.a().startOffset);var l=b[0],m=b[1];b=d.ub(c.a().endContainer,c.a().endOffset);var q=b[0],r=b[1];if("after"!==d.Ya(q,r,l,m))c.a().collapse("forward"===g);else{3===l.nodeType&&0==m&&(m=
M(l),l=l.parentNode);3===q.nodeType&&r==N(q)&&(r=1+M(q),q=q.parentNode);c.j(l,m,q,r);for(var u=c.a().startContainer;d.B(u,u.parentNode)&&d.l(u);)u=u.parentNode;if(!d.t(u)&&!d.ma(u)||!d.H("span",u)||L(u,"td,th"))u=null;for(var p=c.a().endContainer;d.B(p,p.parentNode)&&d.l(p);)p=p.parentNode;if(!d.t(p)&&!d.ma(p)||!d.H("span",p)||L(p,"td,th"))p=null;b=f.se();if(l==q&&d.d(l)&&3===l.nodeType)l.deleteData(m,r-m),a.Sa(l,m,!1),c.a().collapse("forward"===g);else{d.d(l)&&3===l.nodeType&&l.deleteData(m,N(l)-
m);for(var t=d.ja(c.a(),function(a){return d.d(a)&&!L(a,"thead,tbody,tfoot,tr,th,td")}),P=0;P<t.length;P++){var V=t[P];if(m=V.parentNode)if(m.removeChild(V),a.Ua(m),k||!d.Uc(m,l)&&m!=l)for(;d.d(m)&&d.l(m)&&0==N(m);)V=m.parentNode,V.removeChild(m),m=V}d.d(q)&&3===q.nodeType&&q.deleteData(0,r);a.Sa(c.a().startContainer,c.a().startOffset,!1);a.Sa(c.a().endContainer,c.a().endOffset,!1);if(h&&u&&p&&d.B(u,p)&&u!=p){1===u.children.length&&d.Vc(u.firstChild)&&u.removeChild(u.firstChild);if(d.Uc(u,p)){for(h=
p;h.parentNode!=u;)h=h.parentNode;c.j(u,M(h));if(!p.hasChildNodes()){for(;d.d(p)&&1==p.parentNode.childNodes.length&&p.parentNode!=u;)m=p,m.removeChild(p),p=m;d.d(p)&&!d.l(p)&&d.l(p.previousSibling)&&d.l(p.nextSibling)&&p.parentNode.insertBefore(I("br"),p.nextSibling);d.d(p)&&p.parentNode.removeChild(p);f.Ma(b);return}if(!d.l(p.firstChild)){f.Ma(b);return}k=[];for(k.push(p.firstChild);!S(k[k.length-1])&&d.l(k[k.length-1].nextSibling);)k.push(k[k.length-1].nextSibling);for(h=f.P(k);ib(u,k[0])&&k[0].parentNode!=
u;)a.V(k);d.d(k[0].previousSibling)&&S(k[0].previousSibling)&&k[0].parentNode.removeChild(k[0].previousSibling)}else if(d.oc(u,p)){c.j(u,N(u));for(h=u;h.parentNode!=p;)h=h.parentNode;d.l(h.nextSibling)&&S(u.lastChild)&&u.removeChild(u.lastChild);k=[];h.nextSibling&&!d.t(h.nextSibling)&&k.push(h.nextSibling);k.length&&!S(k[k.length-1])&&k[k.length-1].nextSibling&&!d.t(k[k.length-1].nextSibling)&&k.push(k[k.length-1].nextSibling);h=f.P(k);k.forEach(function(a){c.s(a,u,-1)})}else{c.j(u,N(u));d.l(p.firstChild)&&
S(u.lastChild)&&u.removeChild(u.lastChild);for(h=f.P(z(p.childNodes));p.hasChildNodes();)c.s(p.firstChild,u,-1);for(;!(p.hasChildNodes()||0<=["td"].indexOf(p.tagName.toLowerCase()));)m=p.parentNode,m.removeChild(p),p=m}for(var Q=u;d.hf(Q).some(function(a){return d.B(Q,a)&&(R(a,"ol")&&R(a.nextSibling,"ol")||R(a,"ul")&&R(a.nextSibling,"ul"))&&d.B(Q,a.nextSibling)});){for(;!(R(Q,"ol")&&R(Q.nextSibling,"ol")&&d.B(Q,Q.nextSibling)||R(Q,"ul")&&R(Q.nextSibling,"ul")&&d.B(Q,Q.nextSibling));)Q=Q.parentNode;
for(;Q.nextSibling.hasChildNodes();)c.s(Q.nextSibling.firstChild,Q,-1);Q.parentNode.removeChild(Q.nextSibling)}f.R(h);a.Ua(u);f.kd(u)}else c.a().collapse("forward"===g)}f.Ma(b)}}};a.V=function(a){var b=a[0].parentNode;if(d.d(b)&&b.parentNode){-1!==a.indexOf(b.firstChild)&&f.ld(b);var k=-1!==a.indexOf(b.firstChild)&&d.qb(b),g=-1!==a.indexOf(b.lastChild)&&d.ib(b);if(-1===a.indexOf(b.firstChild)&&-1!==a.indexOf(b.lastChild)){for(var l=a.length-1;0<=l;l--)c.s(a[l],b.parentNode,1+M(b));g&&!d.ib(a[a.length-
1])&&a[a.length-1].parentNode.insertBefore(I("br"),a[a.length-1].nextSibling);f.kd(b)}else{if(-1===a.indexOf(b.firstChild))for(l=b.cloneNode(!1),b.removeAttribute("id"),b.parentNode.insertBefore(l,b);a[0].previousSibling;)c.s(b.firstChild,l,l.childNodes.length);for(l=0;l<a.length;l++)c.s(a[l],b.parentNode,M(b));k&&!d.qb(a[0])&&a[0].parentNode.insertBefore(I("br"),a[0]);d.l(a[a.length-1])&&!S(a[a.length-1])&&S(b.firstChild)&&!d.l(b)&&b.removeChild(b.firstChild);d.ra(b,0)?(a=a[a.length-1],E(b),g&&!d.ib(a)&&
a.parentNode.insertBefore(I("br"),a.nextSibling)):f.ld(b)}}};a.Gb=function(b){d.yb(b)?a.V(z(b.childNodes)):c.removeNode(b)};a.We=function(a,b,c){if(0==a)return"";if(1==a&&!b&&!c)return" ";if(1==a)return"\u00a0";var d="",l;for(l=b?"\u00a0 ":" \u00a0";3<a;)d+=l,a-=2;return 3==a?d+(b||c?b&&!c?"\u00a0\u00a0 ":!b&&c?" \u00a0\u00a0":b&&c?"\u00a0 \u00a0":"impossible":" \u00a0 "):d+(b||c?b&&!c?"\u00a0 ":!b&&c?" \u00a0":b&&c?"\u00a0\u00a0":"impossible":"\u00a0 ")};a.Sa=function(b,c,k){void 0===k&&(k=!0);if(d.d(b)||
d.ma(b)){for(;;)if(0<=c-1&&d.B(b,b.childNodes[c-1]))b=b.childNodes[c-1],c=N(b);else if(0==c&&!d.qb(b)&&d.B(b,b.parentNode))c=M(b),b=b.parentNode;else if(3===b.nodeType&&-1==["pre","pre-f.wrap"].indexOf(J(b.parentNode).whiteSpace)&&0!=c&&/[ \xa0]/.test(b.data[c-1]))c--;else break;for(var g=b,l=c,m=0,f=0==c&&d.qb(b);;)if(l<g.childNodes.length&&d.B(g,g.childNodes[l]))g=g.childNodes[l],l=0;else if(l==N(g)&&!d.ib(g)&&d.B(g,g.parentNode))l=1+M(g),g=g.parentNode;else if(3===g.nodeType&&-1==["pre","pre-f.wrap"].indexOf(J(g.parentNode).whiteSpace)&&
l!=N(g)&&/[ \xa0]/.test(g.data[l]))k&&f&&" "==g.data[l]?g.deleteData(l,1):(f=" "==g.data[l],l++,m++);else break;k&&b===g&&mb(b)&&c===l&&(f=(f=b.textContent.match(/^\s+/))?f[0]:"",f=f.length,f>=c&&(b.deleteData(0,f),c=l=0));if(k)for(;"before"==d.Ya(b,c,g,l);)if(0<=l-1&&l-1<g.childNodes.length&&d.B(g,g.childNodes[l-1]))g=g.childNodes[l-1],l=N(g);else if(0==l&&d.B(g,g.parentNode))l=M(g),g=g.parentNode;else if(3===g.nodeType&&-1==["pre","pre-f.wrap"].indexOf(J(g.parentNode).whiteSpace)&&l==N(g)&&" "==
g.data[g.data.length-1]&&d.ib(g))l--,m--,g.deleteData(l,1);else break;for(k=a.We(m,0==c&&d.qb(b),l==N(g)&&d.ib(g));"before"==d.Ya(b,c,g,l);)c<b.childNodes.length?(b=b.childNodes[c],c=0):3!=b.nodeType||c==N(b)?(c=1+M(b),b=b.parentNode):(m=k[0],k=k.slice(1),m!=b.data[c]&&(b.insertData(c,m),b.deleteData(c+1,1)),c++)}};a.Rc=function(a){U(a,"margin-left",d.vb(a)+40+"px")};a.Bb=function(){return!(!c.a()||!O(c.a().startContainer,"ul,ol",f.Wa()))};a.ae=function(){return!(!c.a()||!O(c.a().startContainer,"table",
f.Wa()))};a.pc=function(){return a.ae()||a.Bb()}}};function le(){var a=this;a.name="editor";a.e=function(){function b(a,b){var d=!1;0==k&&null!=a?c.Pa(a):0==k&&(c.Qa(),d=!0);k++;var e=Da(function(){return b()});k--;d&&c.fa();return e}var c=a.f("context"),d=a.f("query"),f=a.f("format");a.f("block");var e=a.f("normalize"),h=c.ia;jc(c.root);var k=0;a.execCommand=function(c,d,e,k){if(1==arguments.length||4<=arguments.length&&null==d)d=!1;if(2>=arguments.length||4<=arguments.length&&null==e)e="";return b(k,function(b,c,d){return function(){if(!(b in h&&
a.queryCommandEnabled(b)))return!1;var c=h[b],e=c.action(""===d?null:d);c.Ga&&(c=a.ac("spellcheck"))&&c.Ga(b);if(!0!==e&&!1!==e)throw"execCommand() didn't return true or false: "+e;return!1!==e}}(c,d,e))};a.queryCommandEnabled=function(a,d){return b(d,function(a){return function(){return a in h?c.k(a).enabled?c.k(a).enabled():c.hasFocus():!1}}(a))};a.queryCommandIndeterm=function(a,d){return b(d,function(a){return function(){return c.k(a).ba?h[a].ba():!1}}(a))};a.queryCommandState=function(a,d){return b(d,
function(a){return function(){var b=c.k(a);return b.state?null!=c.fc(a)?c.fc(a):b.state():!1}}(a))};a.queryCommandSupported=function(a){return a in h};a.queryCommandValue=function(a,d,e){return b(e,function(){return c.k(a).value?h[a].value(d):""})};c.Ib=function(){Object.keys(h).forEach(function(a){c.k(a).Q||(h[a].Q=null);c.k(a).O&&!c.k(a).ba&&(h[a].ba=function(){if(!c.a())return!1;var b=f.C(c.a(),d.Y).map(function(b){return f.u(b,a)}),e=b.filter(function(b){return-1!=h[a].O.indexOf(b)});return 1<=
e.length&&1<=b.length-e.length});c.k(a).O&&(h[a].state=function(){if(!c.a())return!1;f.C(c.a(),d.Y);return-1!==h[a].O.indexOf(f.u(c.a().startContainer,a))});c.k(a).Ee&&(h[a].ba=function(){if(!c.a())return!1;for(var b=f.C(c.a()).filter(d.Y).map(function(b){return f.u(b,a)}),e=1;e<b.length;e++)if(b[e]!==b[e-1])return!0;return!1},h[a].value=function(){if(!c.a())return"";var b=f.C(c.a(),d.Y)[0];null==b&&(b=c.a().startContainer);b=f.u(b,a);return null===b?"":b});if(c.k(a).D){var b=h[a].action;h[a].action=
function(a){var d=f.jd();a=b(a);c.fa();c.a().collapsed&&f.Ma(d);return a}}})};a.Ja=e.dd;a.gf=function(){return h}}};function me(){function a(){P=t.b.timeout(function(){var a=-V;V=K(Jb.root).width;a+=V;0!==a&&y(Jb.root.querySelectorAll("table"),function(a){r(a)})},100,P)}function b(a){t.b.g(a.target,"mouseenter",function(){h(a.target)});t.b.g(a.target,"TABLE_ALIGN",f);t.b.g(a.target,"TABLE_INSERT_ROW",d);t.b.g(a.target,"TABLE_DELETE_ROW",f);t.b.g(a.target,"TABLE_INSERT_COLUMN",d);t.b.g(a.target,"TABLE_DELETE_COLUMN",c)}function c(a){u(a.target);r(a.target);f(a)}function d(a){if(a.data&&a.data.length)for(var b=0;b<
a.data.length;b++){var c=a.data[b];c.attributes&&t.p.jb(c)}f(a)}function f(a){p(a.target);h(a.target)}function e(a,b){var c=[],d=-1,e=O(a,"table"),k=O(a,"tr");null==b&&(b=0);if(null==e||null==k)return w.warn("Couldnt find tr or table for a td! <$>"),[];for(var k=k.querySelectorAll("td"),g=0;g<k.length;g++)k[g]===a&&(d=g);if(-1===d)return w.warn("Couldnt find td within its tr! <%>"),[];d+=b;if(0>d||d>k.length-1)return[];y(e.querySelectorAll("tr"),function(a){a=a.querySelectorAll("td");null!=a[d]&&
c.push(a[d])});return c}function h(a){if(!1!==g(a)&&!1!==k(a)){var b=t.ta.Ub(a);"right"===b?q(a):("center"===b&&q(a),m(a));l(a)}}function k(a){var b=z(a.querySelectorAll("colgroup")),c=b[0]||null,d;if(0===b.length)return!0;d=X("col",c);for(var e=0;e<b.length;e++)if(null!=d[e].getAttribute("style"))return!1;for(e=0;e<d.length;e++)if(null!=d[e].getAttribute("style"))return!1;r(a);E(c);return!0}function g(a){if(O(a.parentElement,"table")||null!=a.querySelector("table"))return!1;var b=!1;y(t.p.ka(a),
function(a){Va(a,"table-edge")&&(b=!0)});return b?!1:!0}function l(a){var b=a.querySelector("tr").querySelectorAll("td");y(b,function(c){if(c!==b[b.length-1]){var d=t.p.mb(c,"tableColumnEdge");C(d,"table-edge");var k=I("div",{"class":"line"});d.appendChild(k);var g,h,f,l,m,P,q=e(c),p=e(c,1),V=K(d).width;t.p.vc(d,function(){u(a);var b=K(q[0]),c=K(p[0]);g=b.width;h=c.width;f=window.innerWidth-b.left-35;l=window.innerWidth-c.right+35;m=K(a).width;P=parseInt(zb(d,"right"),10);C(d,"no-hide-element")},
function(a){a=P-a;a>f-V&&(a=f-V);a<l&&(a=l);d.style.right=a+"px"},function(b){b<-g+35&&(b=-g+35);b>h-35&&(b=h-35);var c=(h-b)/m*100;q[0].style.width=(g+b)/m*100+"%";p[0].style.width=c+"%";D(d,"no-hide-element");t.p.Ld(d);r(a);A(a,"dirty",void 0)},"cursor: col-resize;")}})}function m(a){var b,c,d,e=35*a.querySelector("tr").querySelectorAll("td").length,g=t.ta.Ub(a),k=t.p.mb(a,"rightEdge");C(k,"table-edge");k.appendChild(I("div",{"class":"line"}));var h=K(k).width,f;t.p.vc(k,function(){u(a);var e=K(a);
b=e.width;c=window.innerWidth-e.left;f=parseInt(zb(k,"right"),10);d=K(a.parentNode).width;C(k,"no-hide-element")},function(a){if("center"===g){a=f-a;var d=c-(h+e+b)/2;a>d&&(a=d)}else a=f-a,a>c-h-e&&(a=c-h-e);0>a&&(a=0);k.style.right=a+"px"},function(c){b="center"===g?b+2*c:b+c;b<e&&(b=e);c=b/d*100;100<c&&(c=100);D(k,"no-hide-element");a.style.width=c+"%";r(a);A(a,"dirty",void 0)},"cursor: col-resize;")}function q(a){var b,c,d,e=35*a.querySelector("tr").querySelectorAll("td").length,k=t.ta.Ub(a),g=
t.p.mb(a,"leftEdge");C(g,"table-edge");g.appendChild(I("div",{"class":"line"}));var h=K(g).width,f;t.p.vc(g,function(){u(a);var e=K(a);b=e.width;c=e.right;f=parseInt(zb(g,"left"),10);d=K(a.parentNode).width;C(g,"no-hide-element")},function(a){if("center"===k){a=f+a;var d=c-(b+e+h)/2;a>d&&(a=d)}else a=f+a,a>c-h-e&&(a=c-h-e);0>a&&(a=0);g.style.left=a+"px"},function(c){b="center"===k?b-2*c:b-c;b<e&&(b=e);c=b/d*100;100<c&&(c=100);D(g,"no-hide-element");a.style.width=c+"%";r(a);A(a,"dirty",void 0)},"cursor: col-resize;")}
function r(a){var b=K(a).width,c=35/b*100,d=[],e=0,g=0,k=a.querySelector("tr");if(null!=k&&(k=k.querySelectorAll("td"),0!==k.length)){b<35*k.length&&(b=35*k.length);var h=K(a.parentNode).width,h=Math.max(0,Math.min(100,b/h*100)),f=zb(a,"width"),l=null;null!=f&&(l=ic(f||""));l&&l.Ra&&"%"===l.Ra?U(a,"width",h+"%"):U(a,"width",b+"px");var m=[];y(k,function(a){a=K(a).width;m.push(a/b*100+"%")});y(k,function(a){var b=K(a).width,k=m.shift();null==k&&(w.error("Length of first row magically changed <$>"),
k="0%");U(a,"width",k);35>=b?(U(a,"width",c+"%"),g++):d.push(a);e+=parseInt(zb(a,"width"),10)});if(0!==d.length&&0!==g){a=g*c;var r=e-a,t=100-a;y(d,function(a){var b=parseInt(zb(a,"width"),10),b=b/r*t;U(a,"width",b+"%")})}}}function u(a){U(a,"table-layout","fixed")}function p(a){y(t.p.ka(a),function(a){Va(a,"table-edge")&&t.p.detach(a)});y(a.querySelectorAll("td"),function(a){y(t.p.ka(a),function(a){Va(a,"table-edge")&&t.p.detach(a)})})}var t=this;t.name="ui-table";t.p=null;t.ta=null;var P=0,V=null;
this.e=function(){t.p=t.f("ui");t.ta=t.f("table");t.b.g(document,"tableAdded",b);V=K(Jb.root).width;t.b.timeout(function(){t.b.g(window,"resize",a)},3E3);t.b.timeout(function(){t.p.ic()},250);y(Jb.root.querySelectorAll("table"),function(a){A(a,"tableAdded",void 0)})};this.v=function(){y(document.querySelectorAll("table"),function(a){p(a)})}};function ne(){var a=this;a.name="inline";a.e=function(){function b(b){if(!b)return!1;a.f("edit").F({Kb:!1});var c=d.a();if(!f.d(d.a().startContainer)&&!f.ma(d.a().startContainer))return!0;f.t(c.startContainer)&&1==c.startContainer.childNodes.length&&S(c.startContainer.firstChild)&&0==c.startOffset&&c.startContainer.removeChild(c.startContainer.firstChild);c.insertNode(b);d.j(b.parentNode,1+M(b));return!0}function c(){if(!d.a()||!d.a().startContainer)return null;var a=O(d.a().startContainer,"a[href]",
d.root);return a?a.href:null}var d=a.f("context"),f=a.f("query"),e=a.f("format"),h=a.f("block"),k=a.f("editor"),g=d.root,l=d.ia;l.bold={h:!0,U:!0,action:function(a){a=null==a?!k.queryCommandState("bold"):+a;e.M("bold",a?"bold":"normal");return!0},O:["bold","600","700","800","900"],Q:"fontWeight",Ea:function(a,b){return a==b||"bold"==a&&"700"==b||"700"==a&&"bold"==b||"normal"==a&&"400"==b||"400"==a&&"normal"==b}};l.italic={h:!0,U:!0,action:function(a){a=null==a?!k.queryCommandState("italic"):+a;e.M("italic",
a?"italic":"normal");return!0},O:["italic","oblique"],Q:"fontStyle"};l.underline={h:!0,U:!0,action:function(a){a=null==a?!k.queryCommandState("underline"):+a;e.M("underline",a?"underline":null);return!0},O:["underline"]};l.strikethrough={h:!0,U:!0,action:function(a){a=null==a?!k.queryCommandState("strikethrough"):+a;e.M("strikethrough",a?"line-through":null);return!0},O:["line-through"]};l.tt={h:!0,U:!0,action:function(a){a=null==a?!k.queryCommandState("tt"):+a;e.M("tt",a?"tt":null);return!0},O:["tt"]};
l.createlink={h:!0,action:function(a){if(!a)return!1;if(d.a().collapsed){var c=I("a",{href:Ud(a.toString())});c.textContent=a.toString();return b(c)}e.C(d.a()).forEach(function(b){f.qa(b).forEach(function(b){f.d(b)&&R(b,"a")&&b.hasAttribute("href")&&b.setAttribute("href",a)})});e.M("createlink",a);return!0},value:function(){return c()||""},state:function(){return!!c()}};l.unlink={h:!0,action:function(){for(var a=d.a(),b=[],c=a.startContainer;c;c=c.parentNode)R(c,"a")&&c.hasAttribute("href")&&b.unshift(c);
for(c=a.startContainer;c!=f.na(a.endContainer);c=f.nextNode(c))R(c,"a")&&c.hasAttribute("href")&&(f.nc(c,a)||f.Uc(c,a.endContainer)||c==a.endContainer)&&b.push(c);for(a=0;a<b.length;a++)e.Ic(b[a],"unlink");return!0},value:function(){return c()||""},state:function(){return!!c()}};l.fontname={h:!0,U:!0,action:function(a){e.M("fontname",a);return!0},value:function(){if(!d.a())return"";var a=e.C(d.a(),f.Y)[0];void 0===a&&(a=d.a().startContainer);a=e.u(a,"fontname");return he(a)||""},Q:"fontFamily",Ea:function(a,
b){return he(a)===he(b)}};l.fontsize={h:!0,U:!0,action:function(a){a=kc(a,"px","px");e.M("fontsize",a?a.Nb:null);return!0},ba:function(){return 2<=e.C(d.a(),f.Y).map(function(a){return e.u(a,"fontsize")}).filter(function(a,b,c){return-1==c.slice(0,b).indexOf(a)}).length},value:function(a,b){a||(a="px");if(!b){if(!d.a())return"";var c=e.C(d.a(),f.Y)[0];void 0===c&&(c=d.a().startContainer);b=e.u(c,"fontsize")}return(c=kc(b,a))&&c.value?c.value.toString():"0"},Q:"fontSize"};l.forecolor={h:!0,U:!0,action:function(a){/^([0-9a-fA-F]{3}){1,2}$/.test(a)&&
(a="#"+a);if(!/^(rgba?|hsla?)\(.*\)$/.test(a)&&!ee(a)&&"transparent"!=a.toLowerCase())return!1;e.M("forecolor",a);return!0},Ee:!0,Q:"color",Ea:function(a,b){return de(a)===de(b)}};l.backcolor={h:!0,U:!0,action:function(a){/^([0-9a-fA-F]{3}){1,2}$/.test(a)&&(a="#"+a);if(!/^(rgba?|hsla?)\(.*\)$/.test(a)&&!ee(a)&&"transparent"!=a.toLowerCase())return!1;e.M("backcolor",a);return!0},ba:function(){return 2<=e.C(d.a(),function(a){return f.d(a)&&3===a.nodeType}).map(function(a){return e.u(a,"backcolor")}).filter(function(a,
b,c){return-1==c.slice(0,b).indexOf(a)}).length},Ee:!0,Q:"backgroundColor",Ea:function(a,b){return de(a)===de(b)}};l.highlight={h:!0,U:!0,action:function(a){a=null==a?!k.queryCommandState("highlight"):+a;e.M("highlight",a?"rgb(255, 250, 165)":null);return!0},O:["rgb(255, 250, 165)","rgb(255, 204, 102)"],Q:"backgroundColor",Ea:function(a,b){return de(a)===de(b)}};l.removeformat={h:!0,U:!0,action:function(){function a(b){return f.d(b)&&L(b,"abbr,acronym,b,bdi,bdo,big,blink,cite,code,dfn,em,font,i,ins,kbd,mark,nobr,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var")}
e.C(d.a(),a).forEach(function(a){for(;a.hasChildNodes();)d.s(a.firstChild,a.parentNode,M(a));a.parentNode.removeChild(a)});if(f.d(d.a().startContainer)&&3==d.a().startContainer.nodeType&&0!=d.a().startOffset&&d.a().startOffset!=N(d.a().startContainer))if(d.a().startContainer==d.a().endContainer){var b=d.a().endOffset-d.a().startOffset,c=d.a().startContainer.splitText(d.a().startOffset);d.j(c,0,c,b)}else d.ze(d.a().startContainer.splitText(d.a().startOffset),0);f.d(d.a().endContainer)&&3==d.a().endContainer.nodeType&&
0!=d.a().endOffset&&d.a().endOffset!=N(d.a().endContainer)&&(c=[d.a().startContainer,d.a().startOffset],b=[d.a().endContainer,d.a().endOffset],d.ye(document.documentElement,0),b[0].splitText(b[1]),d.j(c[0],c[1],b[0],b[1]));e.C(d.a(),f.d).forEach(function(b){for(;a(b.parentNode)&&f.B(b.parentNode,b);)h.V([b])});"subscript superscript bold tt fontname fontsize forecolor highlight backcolor italic strikethrough underline".split(" ").forEach(function(a){e.M(a,null)});return!0}};["superscript","subscript"].forEach(function(a){l[a]=
{h:!0,U:!0,action:function(b){b=null==b?!k.queryCommandState(a):+b;e.M(a,null);b&&e.M(a,a);return!0},ba:function(){var b=e.C(d.a(),f.Y);return b.some(function(b){return e.u(b,a)==a})&&b.some(function(b){return e.u(b,a)!=a})||b.some(function(b){return"mixed"==e.u(b,a)})},O:[a]}});try{if(!0===Kc.rte.highlightMagic){var m=null;a.b.g(d.root,"mousedown",function(){m=sc(d.root)});a.b.g(document,"mouseup",function(a){var b=Y(d.root);b&&!b.collapsed&&m!==sc(d.root)&&(!a.metaKey||a.altKey||a.shiftKey||a.ctrlKey?
a.metaKey&&a.altKey&&!a.shiftKey&&!a.ctrlKey&&bd("strikethrough"):bd("highlight"));m=null})}}catch(q){w.error("Exception in <$>:",q.toString)}a.Ad=function(a){var b=e.jd();b&&b.length&&(a=Tb(a.data))&&(d.Pa(a),d.a().collapsed||(e.Ma(b),a=d.a(),a.collapse(!1),d.Pa(a),d.fa()))};a.b.g(g,"applypendingstyles",a.Ad)}};function oe(){var a=this;this.name="edit";this.e=function(){function b(a){window.getSelection().isCollapsed&&(window.getSelection().modify("extend",a?"backward":"forward","lineboundary"),l.Qa());return l.k(a?"delete":"forwarddelete").action()}function c(a){if(!window.getSelection().isCollapsed)return l.k("delete").action();var b=O(l.a().startContainer,"li");r.Bb()&&null!=b&&m.ra(b)||(window.getSelection().modify("extend",a?"backward":"forward","word"),l.Qa());return l.k(a?"delete":"forwarddelete").action()}
function d(){if(l.a().collapsed){u.xf();var b=q.Wa();if(!(m.zb(b)&&1===N(b)&&R(b.firstChild,"div")&&1===N(b.firstChild)&&R(b.firstChild.firstChild,"br"))){r.Sa(l.a().startContainer,l.a().startOffset);var c=l.a().startContainer,b=l.a().startOffset;if(!l.a().collapsed||0!==b||!R(c.parentNode,"td")&&!R(c.parentNode.parentNode,"td")){for(;;)if(0===b&&m.d(c.previousSibling)&&m.L(c.previousSibling))c.parentNode.removeChild(c.previousSibling);else if(0<=b-1&&b-1<c.childNodes.length&&m.d(c.childNodes[b-1])&&
m.L(c.childNodes[b-1]))c.removeChild(c.childNodes[b-1]),b--;else if(0==b&&m.l(c)||m.L(c))b=M(c),c=c.parentNode;else{if(0<=b-1&&b-1<c.childNodes.length&&m.d(c.childNodes[b-1])&&R(c.childNodes[b-1],"a")){r.Gb(c.childNodes[b-1]);return}if(0<=b-1&&b-1<c.childNodes.length&&!m.t(c.childNodes[b-1])&&!S(c.childNodes[b-1])&&!m.ca(c.childNodes[b-1]))c=c.childNodes[b-1],b=N(c);else break}if(3===c.nodeType&&0!=b||m.d(c)&&0<=b-1&&b-1<c.childNodes.length&&(L(c.childNodes[b-1],"br,hr")||m.ca(c.childNodes[b-1])))l.j(c,
b-1,c,b),a.F();else if(!m.l(c))if(L(c,"li,dt,dd")&&c==c.parentNode.firstChild&&0==b){for(var b=[],d=c.parentNode;d;d=d.parentNode)R(d,"li")&&b.unshift(d);for(d=0;d<b.length;d++)r.Ba(b[d]);b=q.P([c]);r.V([c]);q.R(b);L(c,"dd,dt")&&m.qa(c).every(function(a){return!m.B(c,a)||!m.H(c,a)})&&(c=l.oa(c,"div"));r.$(c)}else{for(var d=c,e=b;;)if(0==e)e=M(d),d=d.parentNode;else if(0<=e-1&&e-1<d.childNodes.length&&m.d(d.childNodes[e-1])&&m.L(d.childNodes[e-1]))d.removeChild(d.childNodes[e-1]),e--;else break;if(0===
b&&m.rc(c,!0)&&m.qa(c).concat(c).filter(function(a){return m.d(a)&&m.B(a,c)&&m.Ia(a)}).length)for(b=Kb(c,0),b=m.W(b),b=m.ja(b,function(a){return m.d(a)&&!m.Ud(a)}),d=0;d<b.length;d++)k(b[d]);else if(!R(d.childNodes[e],"table"))if(0<=e-1&&e-1<d.childNodes.length&&R(d.childNodes[e-1],"table"))l.j(d,e-1,d,e);else if(0==b&&(R(d.childNodes[e-1],"hr")||S(d.childNodes[e-1])&&(S(d.childNodes[e-1].previousSibling)||!m.l(d.childNodes[e-1].previousSibling))))l.j(d,e-1,d,e),a.F(),l.j(c,b);else if(L(d.childNodes[e],
"li,dt,dd")&&L(d.childNodes[e].previousSibling,"li,dt,dd"))d=d.childNodes[e-1],e=N(d),c=d.nextSibling,l.j(d,e,c,0),a.F();else{for(;0<=e-1&&e-1<d.childNodes.length;){var g=d.childNodes[e-1];m.d(g)&&m.L(g)?(d.removeChild(g),e--):L(g,"hr")?e--:(d=g,e=N(d))}l.j(d,e,c,b);a.F({direction:"backward"})}}}}}else a.F()}function f(a){u.Ja();for(var b=m.W(l.a()),b=m.Va(b,function(a){return 1===a.nodeType&&m.d(a)&&(a.hasAttribute("align")||""!=a.style.textAlign)}),c=0;c<b.length;c++){var d=b[c];d.removeAttribute("align");
T(d,"text-align")}if("left"!=a)for(b=m.W(l.a()),b=m.ja(b,function(a){return m.d(a)&&R(a,"div")});b.length;)b.shift().setAttribute("style","text-align: "+a)}function e(a){var b=a.toLowerCase(),c="tl"===b,d=c?"ul":b,e=l.a();if(e){u.Ja();var g=r.la()===b?"disable":"enable",f=function(a){return m.Ab(a,b)},p=function(a){return!f(a)&&L(a,"ol,ul")},Fa=[];(function(){for(var a=e.endContainer;a!==e.commonAncestorContainer;a=a.parentNode)R(a,"li")&&Fa.unshift(a);for(a=e.startContainer;a;a=a.parentNode)R(a,
"li")&&Fa.unshift(a)})();Fa.forEach(r.Ba);a=m.W(e);"enable"===g&&m.Va(a,function(a){return m.d(a)&&p(a)}).forEach(function(a){if(m.d(a.previousSibling)&&f(a.previousSibling)||m.d(a.nextSibling)&&f(a.nextSibling)){a=[].slice.call(a.childNodes);var b=q.P(a);r.V(a);q.pa(a,function(a){return f(a)});q.R(b)}else l.oa(a,d),Wa(a,"en-todo-list",c),U(a,"-evernote-list-type",c?"todo":null)});a=m.ja(a,function(a){return m.d(a)&&(L(a,"ol,ul")||L(a.parentNode,"ol,ul")||m.H(a,"li"))});"enable"==g&&(a=a.filter(function(a){return!L(a,
"ol,ul")||L(a.parentNode,"ol,ul")}));if("disable"==g)for(;a.length;){var H=[];H.push(a.shift());if(f(H[0]))k(H[0]);else{for(;a.length&&a[0]==H[H.length-1].nextSibling&&!f(a[0]);)H.push(a.shift());g=q.P(H);r.V(H);for(var ba=0;ba<H.length;ba++)r.$(H[ba]);q.R(g)}}else for(;a.length;){for(H=[];!H.length||a.length&&a[0]==H[H.length-1].nextSibling;)if(L(a[0],"p,div"))a[0].style.margin="",a[0].style.textAlign="",a[0].removeAttribute("align"),yb(a[0]),H.push(l.oa(a[0],"li")),a.shift();else if(L(a[0],"li,ol,ul"))H.push(a.shift());
else{for(g=[];!g.length||a.length&&a[0]==g[g.length-1].nextSibling&&m.l(a[0])&&m.l(g[g.length-1])&&!S(g[g.length-1]);)g.push(a.shift());for(;g.length&&Db(g[g.length-1]);)g.pop();g.length&&H.push(q.pa(g,void 0,function(){return I("li")}))}f(H[0].parentNode)||H.every(function(a){return L(a,"ol,ul")})||(p(H[0].parentNode)?(H=z(H[0].parentNode.childNodes),g=q.P(H),r.V(H),q.pa(H,function(a){return f(a)},function(){return h(b)}),q.R(g)):(g=q.pa(H,function(a){return f(a)},function(){if(!(m.d(H[0].parentNode)&&
m.Cb(H[0].parentNode)&&m.d(H[0].parentNode.previousSibling)&&f(H[0].parentNode.previousSibling)))return h(b);var a=H[0].parentNode.previousSibling;r.Ba(a.lastChild);m.d(a.lastChild)&&f(a.lastChild)||a.appendChild(h(b));return a.lastChild}),r.$(g)))}}}function h(a){x(0<=["ul","ol","tl"].indexOf(a.toLowerCase()));return"tl"===a?I("ul",{"class":"en-todo-list",style:"-evernote-list-type:todo"}):I(a)}function k(a){if(m.d(a))if(R(a,"div")){var b=m.vb(a)-40;0<b?U(a,"margin-left",b+"px"):r.Gb(a)}else if(m.Cb(a))r.Gb(a);
else if(m.Ia(a))a.removeAttribute("dir"),a.style.margin="",a.style.padding="",a.style.border="",""!=a.getAttribute("style")&&"border-width: initial; border-color: initial; "!=a.getAttribute("style")||a.removeAttribute("style"),l.oa(a,"div");else{for(var b=a.parentNode,c=[];m.d(b)&&1==b.nodeType&&!m.Cb(b)&&!L(b,"ol,ul");)c.push(b),b=b.parentNode;if(!m.d(b)||!m.Cb(b))for(b=a.parentNode,c=[];m.d(b)&&1==b.nodeType&&!m.Ia(b)&&!L(b,"ol,ul");)c.push(b),b=b.parentNode;if(L(a,"ol,ul")&&(!m.d(b)||!m.Ia(b))){a.removeAttribute("reversed");
a.removeAttribute("start");a.removeAttribute("type");b=[].slice.call(a.childNodes);if(L(a.parentNode,"ol,ul")||z(a.parentNode.childNodes).every(function(){return L(a,"ol,ul")||Db(a)}))c=q.P([].slice.call(a.childNodes)),r.Gb(a),q.R(c);for(c=0;c<b.length;c++)r.$(b[c])}else if(m.d(b)&&m.Ia(b)){c.push(b);for(var d=b;c.length;){var b=c.pop(),e=a.parentNode==b?a:c[c.length-1];m.l(e)&&!S(e)&&S(e.nextSibling)&&e.parentNode.removeChild(e.nextSibling);var f=[].slice.call(b.childNodes,1+M(e));g([].slice.call(b.childNodes,
0,M(e)));g(f)}k(d)}}}function g(a){if(a.length){var b=a[0];if(L(b.parentNode,"ol,ul")){var c=m.Pd(b.parentNode);q.pa(a,function(a){return m.Ab(a,c)},function(){return h(c)})}else for(;a.length;)b=a.shift(),R(b,"div")?r.Rc(b):(b=q.pa([b],function(a){return m.Cb(a)?!0:!1},function(){return I("div",{style:"margin-left:40px;"})}),r.$(b))}}var l=a.f("context"),m=a.f("query"),q=a.f("format"),r=a.f("block"),u=a.f("normalize"),p=l.ia;this.F=function(b){if(l.a()){u.le();var c=0<Vb(l.a(),"td").length;r.bf(b);
c&&a.$e();u.Ka()}};this.$e=function(){for(var a=W("td",l.root),b=0;b<a.length;b++)if(0==N(a[b])){var c=I("div",{},[I("br")]);a[b].appendChild(c)}};p.deleteword={h:!0,Ga:!0,D:!0,action:function(){return c(!0)}};p.forwarddeleteword={h:!0,Ga:!0,D:!0,action:function(){return c(!1)}};p.deleteline={h:!0,Ga:!0,D:!0,action:function(){return b(!0)}};p.forwarddeleteline={h:!0,Ga:!0,D:!0,action:function(){return b(!1)}};p["delete"]={Ga:!0,action:function(e){q.tf(function(){"selection"===e?a.F():"word"===e?c(!0):
"line"===e?b(!0):d()});return!0}};p.forwarddelete={Ga:!0,D:!0,action:function(d){"selection"===d?a.F():"word"===d?c(!1):"line"===d?b(!1):l.a().collapsed?(d=l.a(),window.getSelection().modify("extend","forward","character"),window.getSelection().collapseToEnd(),l.Qa(),Rb(d,l.a())||l.k("delete").action()):a.F();return!0}};p.indent={h:!0,D:!0,action:function(){u.Ja();for(var a=[],b=l.a().endContainer;b!=l.a().commonAncestorContainer;b=b.parentNode)R(b,"li")&&a.unshift(b);for(b=l.a().startContainer;b!=
l.a().commonAncestorContainer;b=b.parentNode)R(b,"li")&&a.unshift(b);for(b=l.a().commonAncestorContainer;b;b=b.parentNode)R(b,"li")&&a.unshift(b);for(b=0;b<a.length;b++)r.Ba(a[b]);a=m.W(l.a());a=m.ja(a,function(a){return m.d(a)&&L(a,"div,li")});b=a.filter(m.J)[0];if(R(b,"li")&&L(b.parentNode,"ol,ul")){for(b=b.previousSibling;m.L(b);)b=b.previousSibling;R(b,"li")&&r.Ba(b)}for(;a.length;){b=[];for(b.push(a.shift());a.length&&a[0]==b[b.length-1].nextSibling;)b.push(a.shift());g(b)}return!0}};p.outdent=
{h:!0,D:!0,action:function(){u.Ja();var a=q.Wa(),b=[];(function(){for(var a=l.a().endContainer;a!=l.a().commonAncestorContainer;a=a.parentNode)R(a,"li")&&b.unshift(a);for(a=l.a().startContainer;a;a=a.parentNode)R(a,"li")&&b.unshift(a)})();b.forEach(r.Ba);for(var c=m.W(l.a()),c=m.ja(c,function(a){return m.d(a)&&(!m.sb(a).some(m.d)||L(a,"ol,ul")||R(a,"li")&&L(a.parentNode,"ol,ul"))}),d=[];c.length;){for(;c.length&&R(ub(c[0],a),"div");){var e=ub(c.shift(),a);if(-1===d.indexOf(e)){d.push(e);var g=m.vb(e)-
40;0<g?U(e,"margin-left",g+"px"):(T(e,"margin-left"),T(e,"margin"))}}for(;c.length&&(L(c[0],"ol,ul")||!L(c[0].parentNode,"ol,ul"));)k(c.shift());if(!c.length)break;e=[];for(e.push(c.shift());c.length&&c[0]==e[e.length-1].nextSibling&&!L(c[0],"ol,ul");)e.push(c.shift());g=q.P(e);r.V(e);e.forEach(r.$);q.R(g)}return!0}};p.inserthorizontalrule={h:!0,D:!0,action:function(){if(r.pc())return!1;l.k("insertparagraph").action();var a=I("div",{},[I("hr")]),b=m.I(l.a().startContainer);l.s(a,b.parentNode,M(b));
return!0},enabled:function(){return l.hasFocus()&&!r.pc()}};p.insertimage={h:!0,D:!0,action:function(b){if(""===b)return!1;b=I("img",{src:Ud(b)});if(b){a.F({Kb:!1});var c=l.a();if(m.d(l.a().startContainer)||m.ma(l.a().startContainer))m.t(c.startContainer)&&1==c.startContainer.childNodes.length&&S(c.startContainer.firstChild)&&0==c.startOffset&&c.startContainer.removeChild(c.startContainer.firstChild),c.insertNode(b),l.j(b.parentNode,1+M(b))}b.removeAttribute("width");b.removeAttribute("height");return!0}};
p.insertlinebreak={D:!0,action:function(){if(!r.Bb())return l.k("insertparagraph").action();a.F({Kb:!1});if(!m.d(l.a().startContainer)&&!m.ma(l.a().startContainer)||1==l.a().startContainer.nodeType&&!m.H("br",l.a().startContainer)||1!=l.a().startContainer.nodeType&&!m.H("br",l.a().startContainer.parentNode))return!0;if(3==l.a().startContainer.nodeType&&0==l.a().startOffset){var b=l.a().startContainer.parentNode,c=M(l.a().startContainer);l.j(b,c)}3==l.a().startContainer.nodeType&&l.a().startOffset==
N(l.a().startContainer)&&(b=l.a().startContainer.parentNode,c=1+M(l.a().startContainer),l.j(b,c));b=I("br");l.a().insertNode(b);l.j(b.parentNode,1+M(b));m.mc(b)&&(l.a().insertNode(I("br")),l.j(b.parentNode,1+M(b)));return!0}};p.insertparagraph={D:!0,action:function(){var b=a.ac("todo");a.F();var c=l.a().startContainer,d=l.a().startOffset;if(!m.d(c)&&!m.ma(c))return!0;3===c.nodeType&&0!==d&&d!==N(c)&&c.splitText(d);3===c.nodeType&&d===N(c)&&(d=1+M(c),c=c.parentNode);3===c.nodeType&&(d=M(c),c=c.parentNode);
l.j(c,d);for(var e=c;!m.Zc(e)&&m.d(e.parentNode)&&m.B(c,e.parentNode);)e=e.parentNode;if(m.d(e)&&m.Zc(e)&&m.B(c,e.parentNode)&&L(e,"p,div")){for(var g=e;!L(g,"dd,dt,li")&&m.d(g.parentNode);)g=g.parentNode;L(g,"dd,dt,li")&&(e=g)}if(!m.d(e)||!m.B(e,c)||!m.Zc(e)){g=m.W(l.a());g=m.ja(g,function(a){return m.H(a,"p")}).slice(0,1);if(!g.length){if(!m.H("div",l.a().startContainer))return!0;e=ge();l.a().insertNode(e);l.j(e,0);return!0}for(;g[g.length-1].nextSibling&&m.H(g[g.length-1].nextSibling,"p");)g.push(g[g.length-
1].nextSibling);e=q.pa(g,Ea,function(){return I("div")})}var g=!1,k=b?b.sd(e):null;if(b&&null!=k){if(b.pf(e))return $a(e),e.appendChild(I("br")),l.j(e,0),!0;g=!0}if(L(e,"address,listing,pre"))return b=I("br"),l.a().insertNode(b),l.j(c,d+1),m.oc(m.nextNode(b),e)||(l.a().insertNode(I("br")),l.j(c,d+1)),!0;L(e,"li,dt,dd")&&r.Ba(e);if(L(e,"li,dt,dd")&&m.ra(e))return r.V([e]),m.yb(e)||(l.ve(e),e.appendChild(I("br"))),L(e,"dd,dt")&&m.qa(e).every(function(a){return!m.B(e,a)||!m.H(e,a)})&&(e=l.oa(e,"div")),
r.$(e),!0;for(c=Kb(l.a().startContainer,l.a().startOffset,e,N(e));0===c.startOffset&&!m.ab(c.startContainer);)c.setStart(c.startContainer.parentNode,M(c.startContainer));for(;c.startOffset===N(c.startContainer)&&!m.ab(c.startContainer);)c.setStart(c.startContainer.parentNode,1+M(c.startContainer));for(var d=m.ja(c),k=!d.length||1===d.length&&S(d[0]),d=Pb(l.a()),f=q.Wa(),d=O(d,function(a){return"a"!==G(a)},f)||d,d=q.P([d]),k=L(e,"h1,h2,h3,h4,h5,h6")&&k?"div":R(e,"dt")&&k?"dd":R(e,"dd")&&k?"dt":e.tagName.toLowerCase(),
h=I(k),k=0;k<e.attributes.length;k++)h.setAttributeNS(e.attributes[k].namespaceURI,e.attributes[k].name,e.attributes[k].value);h.removeAttribute("id");h.removeAttribute("class");e.parentNode.insertBefore(h,e.nextSibling);for(var f=m.Va(c),c=c.extractContents(),p=m.sb(c),k=0;k<p.length;k++)1===p[k].nodeType&&-1===f.indexOf(p[k])&&p[k].removeAttribute("id");for(k=c.childNodes.length-1;0<=k;k--)f=c.childNodes[k],mb(f)?Db(f)&&E(f):m.ra(f)&&E(f);for(h.appendChild(c);m.ab(e.lastChild);)e=e.lastChild;for(;m.ab(h.lastChild);)h=
h.lastChild;m.yb(e)||(e.appendChild(I("br")),q.R(d.map(function(a){a[0]=e;return a})));if(m.yb(h))h.children&&1===h.children.length&&S(h.children[0])&&q.R(d.map(function(a){a[0]=h;return a}));else{if(g)return $a(h),b=b.Tc(h),l.j(b.parentNode,N(b)+1),!0;h.appendChild(I("br"));q.R(d.map(function(a){a[0]=h;return a}))}c=0;g&&!b.sd(h)&&(x(3!==h.nodeType,"newContainer for checkbox insertion cannot be text"),b.Tc(h),c++);b=m.cc(h,c);h=b[0];c=b[1];l.j(h,c);return!0}};p.insertorderedlist={h:!0,D:!0,action:function(){e("ol");
return!0},ba:function(){return"mixed"===r.la()},value:function(){return r.la()},state:function(){return"ol"===r.la()}};p.insertunorderedlist={h:!0,D:!0,action:function(){e("ul");return!0},ba:function(){return"mixed"===r.la()},value:function(){return r.la()},state:function(){return"ul"===r.la()}};p.inserttodolist={h:!0,D:!0,action:function(){e("tl");return!0},ba:function(){return"mixed"===r.la()},value:function(){return r.la()},state:function(){return"tl"===r.la()}};[{name:"justifyfull",mode:"justify"},
{name:"justifyleft",mode:"left"},{name:"justifycenter",mode:"center"},{name:"justifyright",mode:"right"}].forEach(function(a){p[a.name]={h:!0,D:!0,action:function(){f(a.mode);return!0},ba:function(){if(!l.a())return!1;var b=m.Va(m.W(l.a()),function(a){return m.d(a)&&m.J(a)&&!a.hasChildNodes()});return b.some(function(b){return r.bc(b)==a.mode})&&b.some(function(b){return r.bc(b)!=a.mode})},state:function(){if(!l.a())return!1;var b=m.Va(m.W(l.a()),function(a){return m.d(a)&&m.J(a)&&!a.hasChildNodes()});
return b.length&&b.every(function(b){return r.bc(b)==a.mode})},value:function(){if(!l.a())return"";var a=m.Va(m.W(l.a()),function(a){return m.d(a)&&m.J(a)&&!a.hasChildNodes()});return a.length?r.bc(a[0]):"left"},enabled:function(){return l.hasFocus()&&!r.Bb()}}});p.selectall={action:function(){window.getSelection().selectAllChildren(l.root);return!0},enabled:B,Db:!0};p.tab={h:!0,D:!0,action:function(b){var c="true"===b||1===+b;if(r.Bb())return l.k(c?"outdent":"indent").action();if(r.ae()){var d=a.ac("table");
if(d)return b=d.r(),d=d.ec(),c?(b=Cb(d,"td",b))&&l.j(b,0):(c=Bb(d,"td",b),c||(l.k("inserttablerow").action("after"),c=Bb(d,"td",b)),l.j(c,0)),!0}c||l.k("inserthtml").action("\u00a0\u00a0\u00a0\u00a0\u00a0");return!0}}}};function pe(){var a=this;this.name="content";this.root=null;this.e=function(){function b(){var a=h.a();return!(!a||a.collapsed)}function c(){return Dc(m,h.a(),{html:!0,raw:!0,resources:!0,plain:!0})}function d(a,b){try{return a.createContextualFragment(b)}catch(c){}return a.createContextualFragment(Zd(b))}function f(a){var b={};if(O(h.a().startContainer,"li")&&L(a.firstChild,"ol,ul,li")){var b={Lc:[],lastChild:null},c=O(h.a().startContainer,"li");k.ra(c,1)&&$a(c);for(var c=X("ol,ul",a),d=0;d<c.length;d++){var e=
c[d];if(null!=e){for(var g=!0,f=e.parentNode;f;){if(-1!==["ol","ul"].indexOf(G(f))){g=!1;break}f=f.parentNode}g&&bb(e)}}c=a.querySelector("li");L(c.parentNode,"ol,ul")||bb(c)}b.lastChild=a.lastChild;b.Lc=k.sb(a);h.a().insertNode(a);return b}function e(){var b=h.a();b||(b=Kb(),b.selectNodeContents(m),b.collapse(!1),h.Pa(b),h.fa());a.f("edit").F();return h.a()}var h=a.f("context"),k=a.f("query");a.f("format");var g=a.f("block"),l=a.f("normalize"),m=h.root,q=h.ia;this.root=m;a.Wd=function(b){a.f("edit").F({Kb:!1});
if(!h.a())return w.warn("insertPlainText did fail due to missing content"),!1;b=b.split(/\n/gi);for(var c=h.k("insertparagraph").action,d=0;d<b.length;d++){var e=b[d];0<d&&c&&c();if(e&&e.length){var g=h.a(),f=g.startContainer,g=g.startOffset;0<=g-1&&g-1<f.childNodes.length&&3===f.childNodes[g-1].nodeType&&(f=f.childNodes[g-1],g=N(f));0<=g&&g<f.childNodes.length&&3===f.childNodes[g].nodeType&&(f=f.childNodes[g],g=0);k.t(f)&&k.ra(f)&&(g=k.cc(f,g),f=g[0],g=g[1]);h.j(f,g);e.trim()&&(3===f.nodeType?(f.insertData(g,
e),h.j(f,g+e.length)):(1===f.childNodes.length&&k.mc(f.firstChild)&&f.removeChild(f.firstChild),f=document.createTextNode(e),h.a().insertNode(f),h.j(f,e.length)))}}h.a().collapse(!1);return!0};a.insertNode=function(a,b){w.log("insert node",a,b);if(!a)return w.warn("insertNode failed due to missing content"),!1;var c=e(),d;b&&(d=document.createTextNode(" "),c.insertNode(d),c.selectNode(d),h.k("removeformat").action(),h.j(d,1));var m;v(a)?m=h.a().createContextualFragment(a):a instanceof DocumentFragment?
m=a:a instanceof Node&&(m=document.createDocumentFragment(),m.appendChild(a));c.collapse(!1);h.Pa(c);h.fa();if(null==m.childNodes||0===m.childNodes.length)return w.warn("insertNode failed to empty content argument"),!1;k.t(h.a().startContainer)&&[].filter.call(h.a().startContainer.childNodes,function(a){return k.d(a)&&!k.ce(a)&&M(a)>=h.a().startOffset}).forEach(function(a){a.parentNode.removeChild(a)});m=f(m);c=m.Lc;m=m.lastChild;h.j(m.parentNode,M(m)+1);g.Ua(h.a().startContainer);g.Ua(m);for(var q=
0;q<c.length;q++)g.$(c[q]);d&&1===d.length&&h.removeNode(d);h.fa();l.Ka();m&&m.parentNode&&h.j(m.parentNode,M(m)+1);return!0};q.inserthtml={h:!0,D:!0,action:function(b){var c=e();if(b=d(c,b))W("title,script,style,link,base,meta",b).forEach(E),Xd(b),l.Ka(),a.insertNode(b);return!0},value:function(){var a=h.a();if(!a||a.collapsed)return"";var b=k.ub(a.startContainer,a.startOffset);a.setStart(b[0],b[1]);a=a.cloneContents();return Aa(a)}};q.inserttext={h:!0,action:function(b){return a.Wd(b)}};q.insertcrypto=
{D:!0,action:function(a){var b=e();if(a=d(b,a)){W("title,script,style,link,base,meta",a).forEach(E);Xd(a);var c=a.firstChild;b.insertNode(a);h.j(c,0)}return!0},value:function(){var a=h.a();if(!a||a.collapsed)return"";var b=k.ub(a.startContainer,a.startOffset);a.setStart(b[0],b[1]);a=a.cloneContents();return Aa(a)}};q.paste={h:!0,action:function(b){if(ya(b))return b=I("a",{href:b},[b]),a.insertNode(b,!0);var c=e();if(b=d(c,b))W("title,script,style,link,base,meta",b).forEach(E),Xd(b),l.Ka(),a.insertNode(b,
!0);return!0}};q.pasteraw={h:!0,action:function(b){var c=e();b=d(c,b);return a.insertNode(b,!0)}};q.pasteplain={h:!0,action:function(b){if(ya(b))return b=I("a",{href:b},[b]),a.insertNode(b,!0);a.Wd(b);return!0}};q.pastesimple={h:!0,action:function(b){var c=e(),c=d(c,b);b=a.f("simpletext").af(c);c=b.ownerDocument.createRange();c.selectNodeContents(b);c=c.cloneContents();a.insertNode(c,!0);return!0}};q.copy={action:function(){return!0},value:function(){if(b())return c()},enabled:function(){return b()},
Db:!0};q.cut={h:!0,action:function(){a.f("edit").F();return!0},value:function(){return c()},enabled:function(){return h.hasFocus()&&!1===h.a().collapsed}}};this.v=function(){this.root=this.Ad=null}};function qe(){var a=this;this.name="todo";var b;this.e=function(){function c(a,b){for(var c=0;c<a.length;c++){var d=a[c];b?C(d,"en-todo-checked"):D(d,"en-todo-checked")}}function d(b){var c=a.f("undo");Cc(c);Wa(b,"en-todo-checked");Cc(c);A(b,"dirty",void 0)}function f(a){var b=a.target;return R(b,"li")&&Va(b.parentNode,"en-todo-list")&&40>a.clientX-b.getBoundingClientRect().left}var e=a.f("context"),h=a.f("query"),k=a.f("block"),g=a.f("normalize");b=e.root;var l=e.ia;a.sd=function(a){var b=null;Bb(a,
function(a){return L(a,"object.en-todo")?(b=a,!0):Db(a)||h.l(a)?!1:!0},a);return b};a.pf=function(b){if(!L(b,"div,li"))return!1;var c=a.sd(b);if(!c)return!1;for(var d=b.childNodes.length-1;0<=d;d--){var e=b.childNodes[d];if(e!==c&&(mb(e)&&!Db(e)||!h.ra(e)))return!1}return!0};a.ge=function(){return I("object",{"class":"en-todo"})};a.Tc=function(b){var c=a.ge();e.s(c,b,0);return c};a.re=function(){return W("object.en-todo",b)};a.Cf=function(a){if(a&&a.parentNode){var b=a.parentNode,c=a.nextSibling;
if(c&&mb(c)){var d=c.textContent,g=d.trimLeft(d);d!==g&&(0==g.length?e.removeNode(c):c.textContent=g)}e.removeNode(a);k.Ua(b)}};this.b.g(b,"mousemove mouseout blur",function(a){var c=a.target;if(vb(b)){var d=W("li.en-todo-over",b);(a=f(a))&&C(c,"en-todo-over");for(var e=0;e<d.length;e++){var g=d[e];a&&g.isEqualNode(c)||D(g,"en-todo-over")}}});this.b.g(b,"mouseup",function(a){(L(a.target,"object.en-todo")||f(a))&&vb(b)&&d(a.target)});l.controltodos={h:!0,action:function(d){var g=e.a();if(!g||!vb(b))return!1;
var k=a.re();g.collapsed||(k=Vb(g,"object.en-todo"),g=Pb(g),(g=Cb(g,"object.en-todo",h.I(g)||b))&&k.push(g));if(d&&"toggle"!=d)if("on"==d)c(k,!0);else if("off"==d)c(k,!1);else return!1;else for(d=k,k=0;k<d.length;k++)Wa(d[k],"en-todo-checked");return!0}};l.inserttodo={h:!0,action:function(c){var k=e.a();if(!k||!vb(b))return!1;if("toggle"===c){c=Pb(k);var f=O(c,"ul.en-todo-list > li",b);f?d(f):(f=Cb(c,"object.en-todo",h.I(c)||b))&&d(f);return!0}if(k.collapsed)return a.f("content").insertNode(a.ge()),
!0;g.Ja();if((c=a.re().filter(function(a){return k.intersectsNode(a)}).reverse())&&0<c.length)return c.map(function(b){a.Cf(b)}),!0;(c=W("div,li",b).filter(function(a){return k.intersectsNode(a)}))&&0<c.length&&(c.map(function(b){qa(b.textContent)||a.Tc(b)}),k=e.a(),e.j(c[0],0,k.endContainer,k.endOffset));return!0}}};this.v=function(){b=void 0}};function re(){this.name="table";this.e=function(){function a(a){var b=J(a.querySelector("td")),c=parseInt(b.borderWidth,10)||1,d=b.borderColor||"black";y(z(a.style),function(b){0<=b.indexOf("border")&&T(a,b)});a.removeAttribute("border");U(a,"border-style","solid");U(a,"border-width",c+"px");U(a,"border-color",d);U(a,"border-collapse","collapse");y(a.querySelectorAll("tr"),function(a){y(z(a.style),function(b){0<=b.indexOf("border")&&T(a,b)})});y(a.querySelectorAll("td"),function(a){y(z(a.style),function(b){0<=
b.indexOf("border")&&T(a,b)});U(a,"border-style","solid");U(a,"border-width",c+"px");U(a,"border-color",d)})}var b=this,c=b.f("context"),d=b.f("query"),f=b.f("block"),e=c.root,h=c.ia;b.r=function(){var a=c.a();if(!a)return null;var b=O(a.startContainer,"table",e),a=O(a.endContainer,"table",e);return!b||a&&a!==b?null:b};b.Pc=function(){return b.r()?O(c.a().startContainer,"tr",e):null};b.ec=function(){return b.r()?O(c.a().startContainer,"td",e):null};b.Qd=function(){var a;if(null==a&&(a=b.r(),null==
a))return[];var c=window.getSelection(),d=[],e=[],f=[];y(a.querySelectorAll("td"),function(a){c.containsNode(a,!1)?(e.push(a),f.push(a)):c.containsNode(a,!0)&&(d.push(a),f.push(a))});return f};b.hd=function(a){var b={table:null,cell:null,row:-1,column:-1},c=O(a,"table"),d=O(a,"tr");a=O(a,"td,th");if(null==c||null==d||null==a)return b;for(var e=-1,f=-1,h=c.querySelectorAll("tr"),p=0;p<h.length;p++)h[p]===d&&(e=p);if(-1===e)return b;d=d.querySelectorAll("td,th");for(p=0;p<d.length;p++)d[p]===a&&(f=
p);return-1===f?b:{table:c,cell:a,row:e,column:f}};b.Ub=function(a){var b=zb(a,"float"),c=a.getAttribute("align"),d=a.style.marginLeft;a=a.style.marginRight;var e;null!=b?e=b:null!=c?e=c:"auto"===d&&"auto"===a?e="center":"auto"===d?e="right":"auto"===a&&(e="left");null==e&&(e="left");return e};b.Rd=function(a){if(null==a||!F(a)||"table"!==G(a)||null!=a.querySelector("table"))return{rows:-1,columns:-1};a=a.querySelectorAll("tr");if(0>=a.length)return{rows:0,columns:0};var b=a[0].querySelectorAll("td,th");
return{rows:a.length,columns:b.length}};b.Ed=function(a){for(var b=+a.columns||2,c=+a.rows||2,d=a.borderColor||"rgb(211,211,211)",e=+a.borderWidth||1,f=I("table",{style:"-evernote-table:true;border-collapse:collapse;width:100%;table-layout:fixed;"}),h=Math.round(1E4/b)/100,p=0;p<c;p++){var t=I("tr");f.appendChild(t);for(var P=0;P<b;P++){var V=I("td",{style:"border-style:solid;border-width:"+e+"px;border-color:"+d+";padding:10px;margin:0px;width:"+h+"%;"},[ge()]);a.cellColor&&(V.style.backgroundColor=
a.cellColor);t.appendChild(V)}}return f};h.inserttable={h:!0,action:function(a){if(!c.a()||f.pc())return!1;var e={};"{"===a[0]?e=na(a,{columns:2,rows:2,borderColor:"rgb(211,211,211)",borderWidth:1,cellColor:null,alignment:"left"}):(a=a.split(","),e.columns=+a[0].trim(),e.rows=+a[1].trim());c.k("insertparagraph").action();a=e.align||"left";var e=b.Ed(e),h=d.I(c.a().startContainer);h.parentNode.insertBefore(e,h);f.$(e);c.j(e.querySelector("div"),0);c.k("tablealign").action(a);A(e,"TABLE_ADDED",void 0);
return!0},state:function(){return!!b.r()},enabled:function(){return c.hasFocus()&&!f.pc()}};h.inserttablerow={h:!0,action:function(a){var d=b.r();if(null==d)return!1;a="before"===a.toString().toLowerCase().trim();var f=O(c.a().startContainer,"tr",e),h=O(c.a().endContainer,"tr",e);if(!f&&!h)return!1;f=f.compareDocumentPosition(h)&(a?4:2)?f:h;if(!f)return!1;var h=f.cloneNode(!0),q=[];y(h.querySelectorAll("td"),function(a){q.push(a);$a(a);a.appendChild(ge())});c.s(h,f.parentNode,M(f)+(a?0:1));A(d,"TABLE_INSERT_ROW",
q);return!0},state:function(){return!!b.r()},enabled:function(){return c.hasFocus()&&!!b.r()}};h.inserttablecol={h:!0,action:function(a){var d=b.r();if(!d)return!1;var f="before"===a.toString().toLowerCase().trim();a=O(c.a().startContainer,"td",e);var h=O(c.a().endContainer,"td",e);if(!a&&!h)return!1;var q=a.compareDocumentPosition(h)&(f?4:2)?a:h;if(!q)return!1;var r=[],u=q.cellIndex;y(z(d.querySelectorAll("td")),function(a){if(a.cellIndex===u&&d===O(q,"table")){var b=a.cloneNode(!0);$a(b);b.appendChild(ge());
r.push(b);var e=zb(a,"width"),e=window.parseFloat(e)||0;0<e&&(U(b,"width",e/2+"%"),U(a,"width",e/2+"%"));c.s(b,a.parentNode,M(a)+(f?0:1))}});A(d,"TABLE_INSERT_COLUMN",r);return!0},state:function(){return!!b.r()},enabled:function(){return c.hasFocus()&&!!b.r()}};h.deletetablerow={h:!0,action:function(){var a=b.Pc();if(!a)return!1;var d=b.r(),e=W("tr",d);if(1===e.length)return c.k("deletetable").action();e.indexOf(a)===e.length-1?(e=W("td",e[e.length-2]).pop(),c.j(e,N(e))):(e=W("td",e[e.indexOf(a)+
1]).shift(),c.j(e,0));c.removeNode(a);A(d,"TABLE_DELETE_ROW",void 0);return!0},state:function(){return!!b.Pc()},enabled:function(){return c.hasFocus()&&!!b.Pc()}};h.deletetablecol={h:!0,action:function(){var a=b.ec();if(!a)return!1;var d=a.cellIndex,e=b.r(),f=W("td",e);if(f.every(function(a){return a.cellIndex===d}))return c.k("deletetable").action();var h=f.filter(function(a){return a.cellIndex===d+1});h&&h.length||(h=f.filter(function(a){return a.cellIndex===d-1}));for(var r=W("tr",e),u=0,p=0;p<
r.length;p++)for(var t=W("td",r[p]),P=0;P<t.length;P++)t[P]===a&&(u=p);c.j(h[u],0);for(p=f.length-1;0<=p;p--)a=f[p],a.cellIndex===d&&c.removeNode(a);A(e,"TABLE_DELETE_COLUMN",void 0);return!0},state:function(){return!!b.ec()},enabled:function(){return c.hasFocus()&&!!b.ec()}};h.deletetable={h:!0,action:function(){var a=b.r();if(!a)return!1;c.j(a.parentNode,M(a),a.parentNode,M(a)+1);b.f("edit").F();A(e,"TABLE_REMOVED",void 0);return!0},state:function(){return!!b.r()},enabled:function(){return c.hasFocus()&&
!!b.r()}};h.tablebordercolor={h:!0,action:function(c){var d=c||"black";c=b.r();if(null==c)return!1;a(c);U(c,"border-color",d);y(c.querySelectorAll("td"),function(a){U(a,"border-color",d)});A(c,"TABLE_BORDER_COLOR",d);return!0},value:function(){var a=b.r();return null==a?"":(a=J(a.querySelector("td")).borderColor)?""+a:""},state:function(){return!!b.r()},enabled:function(){return c.hasFocus()&&!!b.r()}};h.tableborderwidth={h:!0,action:function(c){var d=parseInt(c,10);if(isNaN(d)||0>d)return w.warn("Invalid value given to tableborderwidth <$>",
ga(d)),!1;c=b.r();if(null==c)return!1;a(c);U(c,"border-width",d+"px");y(c.querySelectorAll("td"),function(a){U(a,"border-width",d+"px")});A(c,"TABLE_BORDER_WIDTH",d);return!0},value:function(){var a=b.r();if(null==a)return"";a=J(a.querySelector("td"));return(a=parseInt(a.borderWidth,10))?""+a:"0"},state:function(){return!!b.r()},enabled:function(){return c.hasFocus()&&!!b.r()}};h.tablealign={h:!0,action:function(a){if("left"!==a&&"right"!==a&&"center"!==a)return w.warn("Invalid value given to tablealign <$>"),
!1;var c=b.r();if(null==c)return!1;c.removeAttribute("align");T(c,"float");T(c,"margin");T(c,"margin-right");T(c,"margin-left");"left"===a?U(c,"margin-left","0px"):"right"===a?(U(c,"margin-left","auto"),U(c,"margin-right","0px")):"center"===a&&(U(c,"margin-left","auto"),U(c,"margin-right","auto"));A(c,"TABLE_ALIGN",a);return!0},value:function(){var a=b.r();return null==a?"":b.Ub(a)},state:function(){return!!b.r()},enabled:function(){return c.hasFocus()&&!!b.r()}};h.tablecellcolor={h:!0,action:function(a){a=
a||"transparent";var c=b.Qd();if(0===c.length)return!1;y(c,function(b){T(b,"background");T(b,"background-image");T(b,"background-attachment");T(b,"background-position");T(b,"background-clip");T(b,"background-repeat");U(b,"background-color",a)});ua(b.r(),a);return!0},value:function(){var a=b.Qd();if(0===a.length)return"";a=a[0].style;return a.backgroundColor?(a=de(a.backgroundColor),null!=a?a:""):""},state:function(){return!!b.r()},enabled:function(){return c.hasFocus()&&!!b.r()}}}};function se(){function a(){b.b.g(d,"click",function(a){if("img"===G(a.target)){var b={};b.src=a.target.getAttribute("src")||"";a=b;x(!0,"tagname must have non-zero length");a=a||{};a.tagname="img";uc("clicked",a)}});b.b.g(d,"dblclick",function(a){if("img"===G(a.target)){var b={};b.src=a.target.getAttribute("src")||"";a=b;x(!0,"tagname must have non-zero length");a=a||{};a.tagname="img";uc("doubleClicked",a)}})}var b=this;b.name="img";var c,d,f;b.e=function(e){c=b.f("context");d=c.root;f=na(e,{imageClickEvents:!1});
!0===f.Xf&&a()};b.v=function(){}};function te(){var a=this;this.name="tableselection";this.e=function(){function b(){var a=d.querySelectorAll("td"),b=window.getSelection(),c=[],e=[];y(a,function(a){D(a,"en-selected");b.containsNode(a,!1)?e.push(a):b.containsNode(a,!0)&&c.push(a)});return{Jc:e,xc:c}}var c=this.f("context"),d=c.root,f=!1,e=-1,h=Kb();this.b.g(document,"selectionchange",function(){if(Y(d)&&!f){var a=Y();h=Kb(a.startContainer,a.startOffset,a.endContainer,a.endOffset);a=b();1===a.xc.length&&0===a.Jc.length?y(d.querySelectorAll("table"),
function(a){D(a,"en-selected")}):(y(d.querySelectorAll("table"),function(a){C(a,"en-selected")}),y(a.xc,function(a){C(a,"en-selected")}),y(a.Jc,function(a){C(a,"en-selected")}))}});this.b.g(document,"contextmenu",function(d){f=!0;e=a.b.timeout(function(){f=!1},1E3,e);d=d.target;var k=Y(),m=b();Rb(k,h)||2!==m.xc.length&&1!==m.xc.length||0!==m.Jc.length||O(k.startContainer,"td")===O(k.endContainer,"td")||(k=document.createRange(),k.selectNodeContents(d),c.Pa(k),c.fa());return!0});var k=d.querySelectorAll(".en-selected");
y(k,function(a){D(a,"en-selected")});k=I("style",{type:"text/css"});k.textContent="td.en-selected { background-color: "+Nc()+" !important;}";document.querySelector("head").appendChild(k)}};function ue(){var a=this;a.name="misc";a.e=function(){var b=a.f("context"),c=a.f("normalize");b.ia.normalize={Db:!0,action:function(a){if(!a||"all"===a)return c.dd(),!0;if(!b.a())return w.warn("Command normalize called without selection. Value:",a),!1;if("start"===a)return c.Ka(),!0;if("end"===a)return c.me(),!0;if("selection"===a)return c.Ja(),!0;if("edges"===a)return c.le(),!0;w.warn("Command normalize called with unknown value:",a);return!1},enabled:B}}};function ve(){var a=this;this.name="transform";this.e=function(){function b(a){void 0===a&&(a=document.body);c(a);e(a,function(a){var b="";a=a.split(/(\W+)/gi);for(var c=0;c<a.length;c++)var d=a[c],b=0<d.length?b+(d.charAt(0).toLocaleUpperCase()+d.slice(1).toLocaleLowerCase()):b+d;return b})}function c(a){var b=sc(a,!0);a.normalize();tc(a,b)}function d(a){void 0===a&&(a=document.body);e(a,function(a){return a.toLocaleLowerCase()})}function f(a){void 0===a&&(a=document.body);e(a,function(a){return a.toLocaleUpperCase()})}
function e(a,b){var c;void 0===a&&(a=document.body);var d=Y();if(d&&!(1>d.toString().length)){mb(d.endContainer)&&0<d.endOffset&&d.endOffset<d.endContainer.textContent.length&&(c=d.endContainer.splitText(d.endOffset),d.setEnd(c,0));mb(d.startContainer)&&0<d.startOffset&&(c=d.startContainer.splitText(d.startOffset),d.setStart(c,0));Lb(d);for(var e=c=null,f=window.getSelection(),d=document.createTreeWalker(a,4,{acceptNode:function(a){return f.containsNode(a,!1)?1:2}},!1);d.nextNode();)mb(d.currentNode)&&
(d.currentNode.textContent=b(d.currentNode.textContent),c||(c=d.currentNode),e=d.currentNode);d=document.createRange();d.setStartBefore(c);d.setEndAfter(e);Lb(d)}}var h=a.f("context"),k=h.root,h=h.ia;h.lowercase={h:!0,action:function(){d(k);return!0}};h.uppercase={h:!0,action:function(){f(k);return!0}};h.capitalize={h:!0,action:function(){b(k);return!0}}}};function we(a){a=G(a);return"p"===a||"div"===a}function xe(a){a=G(a);return"ul"===a||"ol"===a}function ye(a){return"td"===a||"th"===a}function ze(a){return a?!!O(a,function(a){return a&&a.style?"rgb(255, 250, 165)"===a.style.backgroundColor:!1}):!1}function Ae(a,b,c,d){b=b.getAttribute(c);if(null===b||void 0===b){if(void 0===d)return;b=d}a.setAttribute(c,b)}
function Be(a,b,c){"undefined"===typeof c&&(c={});this.wa=c;x(null!=this.wa.ta,"You have to provide tablePlugin config!");this.Yb=void 0!==c.cssBlockStyle?c.cssBlockStyle:this.wd;this.async=!!c.async;a instanceof DocumentFragment&&(c=I("div"),c.appendChild(a),document.body.appendChild(c),this.Ge=a=c);a||(a=document.body);this.za=a;this.hb=b;this.cd()}n=Be.prototype;n.Fc="div";n.wd=null;n.Ne=.8;n.Te=150;n.yd=10;n.Se=2E3;n.Pe="evernote://";n.Oe="rgb(105, 170, 53)";n.cancel=function(){this.uf=!0};
n.cd=function(){var a=this;this.od=this.Dc=this.eb=this.X=this.q=null;this.Na=I("div");this.$c=this.cb=null;this.sa=!1;this.kb=[];var b=J(document.body);this.If=b&&b.fontSize?+b.fontSize.replace(/px/gi,"")*this.Ne:16;if(this.async){this.sc=this.ad=this.ee=0;this.tc=!1;this.vf=this.fe=(new Date).getTime();for(var b=document.createNodeIterator(this.za,-1,null,!0),c=0;b.nextNode();)++c;this.wf=c}this.Lf=document.createTreeWalker(this.za,-1,{acceptNode:function(b){for(var c=0;c<a.kb.length;c++)if(ib(b,
a.kb[c]))return 2;return 1}},!0);Ce(this)};
function Ce(a){if(a.uf)a.v();else{for(var b;(b=a.Lf.nextNode())&&!(3===b.nodeType?De(a,b):1===b.nodeType&&a.Sd(b),a.async&&(++a.ee,(new Date).getTime()-a.fe>a.Te)););++a.ad;if(b&&a.async){a.sc=Math.min(1,a.ee/a.wf);a.tc||(b=((new Date).getTime()-a.vf)/a.sc,b+=(Math.ceil(a.ad/a.sc)-a.ad)*a.yd,b>=a.Se&&(a.tc=!0));if(a.tc&&a.wa.onprogress)a.wa.onprogress(a,a.sc);window.setTimeout(function(){a.fe=(new Date).getTime();Ce(a)},a.yd)}else{a.kb=null;Ee(a.q);if(a.tc&&a.wa.onprogress)a.wa.onprogress(a,1);a.bd()}}}
n.bd=function(){this.hb?($a(this.hb),cb(this.Na,this.hb)):this.hb=this.Na;this.v();if(this.wa.onready)this.wa.onready(this)};n.v=function(){this.Ge&&document.body.removeChild(this.Ge)};
function Ee(a){if(a){for(var b,c=document.createNodeIterator(a,4,null,!0);(b=c.nextNode())&&!(b.textContent=b.textContent.replace(/^ /gi,""),0<b.textContent.length););for(var c=document.createNodeIterator(a,4,null,!0),d=[];b=c.nextNode();)d.unshift(b);for(c=0;c<d.length&&!(b=d[c],b.textContent=b.textContent.replace(/\s+$/gi,""),0<b.textContent.length);c++);a.normalize()}}n.ob=function(a){a=I(a?a:this.Fc);this.Yb&&a.setAttribute("style",this.Yb);return a};
function Fe(a){var b=a.ob();b.appendChild(I("br"));a.Na.appendChild(b);a.sa=!1}function Ge(a,b){var c=a.ob();null!=b&&(v(b)?c=a.ob(b):F(b)&&(c=b));if(a.Na.hasChildNodes&&a.sa){var d=a.Na.lastElementChild;d&&d.textContent.length&&we(d)&&we(c)&&Fe(a)}a.sa=!1;a.Na.appendChild(c);return c}function He(a){Ee(a.q);a.q=null;a.X=null}
function Ie(a,b){var c=document.createRange();c.selectNodeContents(b);c=c.getBoundingClientRect();a.$c&&c&&!ib(b,a.X)&&Math.abs(c.top-a.$c.bottom)>=a.If&&(a.sa=!0);c&&(a.$c=c)}function Je(a){return"div"===G(a)&&1===a.childNodes.length&&"br"===G(a.childNodes[0])}
n.ea=function(a,b,c,d){c=!ib(a,this.X);if(d&&c)return null;b||(b=a.cloneNode(!1));Ie(this,a);c&&(F(this.X)&&(d=G(this.X),ye(d)&&(this.sa=!0)),He(this));for(c=a;c!==this.za&&(c=c.parentNode);){this.X=c;d=G(c);if("li"===d)break;if(ye(d))break;if(ob(c))break}if(O(a,"table"))if(d=O(a,"table"),c=this.wa.ta,null!=d&&null!=c&&F(d)&&"table"===G(d)){var f=c.Rd(d);-1!==f.rows&&(this.Dc!==d&&(this.Dc=d,this.od=c.Ed(f),Je(this.Dc.previousSibling)&&Fe(this),Ge(this,this.od),Je(this.Dc.nextSibling)&&Fe(this)),
d=c.hd(a),null!=d.table&&(c=d=this.od.querySelectorAll("tr")[d.row].querySelectorAll("td")[d.column],null==d?w.warn("Something crazy happened with table simplify: <$>"):(1===d.childNodes.length&&"div"===G(d.childNodes[0])&&(c=d.childNodes[0],1===c.childNodes.length&&"br"===G(c.childNodes[0])&&$a(c)),this.q=c)))}else w.warn("Couldn't simplify table. Look into this!");if(O(a,"li"))a:if(d=O(a,"li"),null==d)this.eb=null;else{if(mb(a)){if(-1!==a.textContent.search(/^\s*$/i))break a;a.textContent.replace(/\s+/gi,
" ")}if(this.cb&&this.eb===d)this.q=this.cb,this.q.appendChild(I("br"));else{var e=0;c=null;for(var h=d;h&&h!==this.za;)xe(h)&&(++e,c||(c=G(h))),h=h.parentNode;e=Math.max(0,e);f=null;for(h=this.q&&0<this.q.childNodes.length?this.q:this.Na;;){h=h.lastElementChild;if(!h)break;if(xe(h)&&(f=h,--e,1>e))break}if(0<e&&f)e=f.lastElementChild,f=Ge(this,c||"ol"),e.appendChild(f);else if(!f)null!=this.q?(f=I(c||"ol"),this.q.appendChild(f)):f=Ge(this,c||"ol");else if(this.sa||c&&c!==G(f))null!=this.q?(f=I(c||
"ol"),this.q.appendChild(f)):f=Ge(this,c||"ol");this.q=this.ob("li");f.appendChild(this.q);this.eb=d;this.cb=this.q}}a=this.Qc(a);this.q||(this.q=Ge(this));this.q.appendChild(this.rd(b,a));return b};
function De(a,b){if(b){var c;if((c=J(b.parentNode))&&/pre/gi.test(c.whiteSpace)){var d=b.textContent.split(/\n\r|\r\n|\r|\n/gi);if(d&&0<d.length){c=d[0].replace(/\s/gi," ").replace(/\s\s/gi,"\u00a0 ");var f=a.ea(b,document.createTextNode(c));if(f)for(var e=1;e<d.length;e++){var h=f.parentNode;h.appendChild(I("br"));c=d[e].replace(/\s/gi," ").replace(/\s\s/gi,"\u00a0 ");h.appendChild(document.createTextNode(c))}}}else c=b.textContent.replace(/[\ \n\r\t]+/gi," "),d=!1,-1!==c.search(/^[\ \t\n]*$/i)&&
(d=!0),a.ea(b,document.createTextNode(c),!1,d)}else w.warn("Node missing",b)}
n.Sd=function(a){if(a){var b=G(a);"div"===b&&/^en-revealed-crypto:\d+$/.test(a.id)?(He(this),this.ea(a,a.cloneNode(!0),!0),He(this),this.kb.push(a)):"embed"===b?(b=tb(a,"type").toLowerCase(),"evernote/x-crypto"!==b&&"evernote/x-todo"!==b&&"evernote/x-attachment"!==b&&"evernote/x-pdf"!==b||this.ea(a)):"script"===b||"style"===b?this.kb.push(a):"object"===b&&L(a,"object.en-todo")?this.ea(a):"img"===b&&a.src?(He(this),b=I("img"),Ae(b,a,"src"),Ae(b,a,"alt",""),Ae(b,a,"id"),this.ea(a,b,!0),He(this)):"hr"===
b?(He(this),this.ea(a,I("hr"),!0),He(this)):"br"===b?He(this):this.q&&a&&(ob(a)||!nb(this.X,a))&&He(this)}else w.warn("Node missing",a)};
n.Qc=function(a){for(var b={ua:0,gb:0,Gd:0,Bd:0,Vd:0,Ec:0,pd:0};a||a===this.za;){var c=G(a);"del"===c||"strike"===c||"s"===c?b.pd=1:"mark"===c?b.gb=1:"a"===c&&(c=a.href+"")&&c.length&&(b.ua=c,b.Gd=0===c.indexOf(this.Pe));if(c=J(a)){var d=c.backgroundColor.toLowerCase();if("rgb(255, 204, 102)"===d||"rgb(255, 250, 165)"===d||"rgb(246, 238, 150)"===d||ze(a))b.gb=1;var d=c.fontWeight.toLowerCase(),f=c.fontStyle.toLowerCase(),c=c.textDecoration.toLowerCase();if("bold"===d||"bolder"===d||"700"===d)b.Bd=
1;if("italic"===f||"oblique"===f)b.Vd=1;!b.ua&&0<=c.indexOf("underline")&&(b.Ec=1);0<=c.indexOf("line-through")&&(b.pd=1)}a=a.parentNode}b.ua&&b.Ec&&delete b.Ec;return b};
n.rd=function(a,b){var c;b.ua&&(c=I("a"),c.setAttribute("href",b.ua),b.Gd&&c.setAttribute("style","color:"+this.Oe+";"),c.appendChild(a),a=c);b.Bd&&(c=I("b"),c.appendChild(a),a=c);b.Vd&&(c=I("i"),c.appendChild(a),a=c);b.Ec&&(c=I("u"),c.appendChild(a),a=c);b.pd&&(c=I("s"),c.appendChild(a),a=c);b.gb&&(c=I("span",{style:"-evernote-highlight:true; background-color:rgb(255, 250, 165);"}),c.appendChild(a),a=c);return a};
function Ke(a,b,c){if(!(this instanceof Ke))return new Ke(a,b,c);Be.call(this,a,b,c)}fa(Ke,Be);function Le(a,b,c){if(!(this instanceof Le))return new Le(a,b,c);Be.call(this,a,b,c)}fa(Le,Be);n=Le.prototype;n.Fc="div";n.wd='font-family: Courier, "Courier New", monospace;';n.xd=!1;n.Re="\u00a0 \u00a0 ";n.Qe="- ";n.cd=function(){this.Gc=[];Le.Lb.cd.call(this)};n.bd=function(){this.sa=!0;for(var a=0;a<this.Gc.length;a++)this.q=Ge(this),this.q.appendChild(this.Gc[a]);Le.Lb.bd.call(this)};
n.ob=function(){var a=I(this.Fc);this.Yb&&a.setAttribute("style",this.Yb);return a};
n.ea=function(a,b,c,d){c=!ib(a,this.X);if(d&&c)return null;b||(b=a.cloneNode(!1));Ie(this,a);c&&(F(this.X)&&(d=G(this.X),ye(d)&&(this.sa=!0)),He(this));for(c=a;c!==this.za&&(c=c.parentNode);){this.X=c;d=G(c);if("li"===d)break;if(ye(d))break;if(ob(c))break}d=O(a,"li");if(!this.q&&d)if(this.cb&&this.eb===d)this.q=this.cb,this.q.appendChild(I("br"));else{c=0;for(var f=d;f&&f!==this.za;)xe(f)&&++c,f=f.parentNode;c=Math.max(0,c);this.q=Ge(this);for(f=this.Qe;1<c;)f=this.Re+f,--c;this.q.appendChild(document.createTextNode(f));
this.eb=d;this.cb=this.q}else this.eb=null,this.q||(this.q=Ge(this));a=this.Qc(a);this.q.appendChild(this.rd(b,a));return b};
n.Sd=function(a){var b;b=G(a);"object"===b&&L(a,"object.en-todo")?(b=Va(a,"en-todo-checked"),this.ea(a,document.createTextNode(b?"[x] ":"[ ] "))):"embed"===b?(b=tb(a,"type").toLowerCase(),"evernote/x-todo"===b?(b="true"===(tb(a,"todo-checked")+"").toLowerCase(),this.ea(a,document.createTextNode(b?"[x] ":"[ ] "))):"evernote/x-attachment"!==b&&"evernote/x-pdf"!==b||this.Gc.push(a.cloneNode(!0))):("script"!==b&&"style"!==b||this.kb.push(a),"img"!==b&&("hr"===b?He(this):"br"===b?He(this):ye(b)?(He(this),
this.sa=!0):!this.q||!ob(a)&&nb(this.X,a)||He(this)))};n.Qc=function(a){var b={};if(this.xd)for(;a||a===this.za;)"a"===G(a)&&(b.ua=a.href),a=a.parentNode;return b};n.rd=function(a,b){if(this.xd&&b.ua){var c=I("a");c.setAttribute("href",b.ua);c.appendChild(a);a=c}return a};
function Me(){var a=this;this.name="simpletext";this.e=function(){function b(b,e,g){var l=d.a(),m,q;l&&!l.collapsed&&null==e?(e=c(Pb(l)),m=c(Qb(l)),q=m.nextSibling,e===m?d.Ff(e):d.j(e,0,m,m.childNodes.length),m=d.a().cloneContents()):e&&(m=d.a().createContextualFragment(e));if(m){b=(new b(m,null,g)).hb.childNodes;e=b[0];m=b[b.length-1];for(l=l.startContainer;0<b.length;)d.insertBefore(b[0],f,q);a.f("edit").F({Kb:!0});l!==f&&d.removeNode(l);q=Za(m);d.j(Ya(e),0,q,q.length)}else new b(f,f,g),d.j(f,0),
d.fa();return!0}function c(a){for(var b=a,c=[];b.parentNode;)c.unshift(b.parentNode),b=b.parentNode;for(;0<c.length;)if(c.shift()===f)return c.shift()||a;return a}var d=a.f("context"),f=d.root,e=d.ia;e.simpletext={h:!0,action:function(c){return b(Ke,c,{ta:a.f("table")})},enabled:B};e.plaintext={h:!0,action:function(c){var d=I("tt",{style:"position: absolute;"});document.body.appendChild(d);var e=J(d),e={cssBlockStyle:"font-family:"+e.fontFamily+"; font-size:"+e.fontSize+"; font-weight:"+e.fontWeight,
ta:a.f("table")};E(d);return b(Le,c,e)},enabled:B}};this.af=function(b){return(new Ke(b,null,{ta:a.f("table")})).hb}};ea("EN.handleResourceEvent",function(a,b){w.log("handleResourceEvent",a,b);yc(a.dataset["en-resource-id"],"resource",{id:a.dataset["en-resource-id"],mime:a.dataset["en-resource-mime"],state:"unloaded",type:b.type});return!1});function Ne(){var a=this;a.name="emoticon";a.e=function(){var b=a.f("context"),c=a.f("undo"),d=b.root,f=!1;a.b.g(d,"keypress",function(a){f=32==a.keyCode});a.b.g(d,"keyup",function(){if(f){f=!1;var a=Y(d);if(a&&a.collapsed){var b=a.endContainer;if(mb(b)&&/^[\s\S]*:\)[\xa0 ]$/gi.test(b.textContent.substring(0,a.endOffset))){Cc(c);var b=I("span",{style:"font-family:Sentoj; color:#ffa200;"},"\ud83d\ude03"),a=Kb(a.startContainer,a.startOffset-1),a=a.insertNode(b)||b,b=a.previousSibling,k=b.textContent.replace(/:\)$/,
"");0<k.length?b.textContent=k:E(b);Lb(Kb(a.nextSibling,1));Cc(c)}}}})}};function Oe(){x(this instanceof Oe,"Use `new` to instantiate this class")}n=Oe.prototype;n.name="rte";
n.e=function(a){var b=this;b.w=Ta;b.c=na(a,{active:!0,highlightMagic:!1,skipMarkupTransform:!1,placeholder:"",keyCommands:!1,behavior:!1,trackStateChanges:null,trackValueChanges:null,trackEnabledChanges:null,undo:!0,tableResizing:!1,imageResizing:!1,tableSelection:!1,emoticons:!1,imageConfig:{},Mf:{},Uf:"div",Id:null,root:null,selector:null});b.root=v(b.c.selector)?document.querySelector(b.c.selector):a.root||document.getElementById("en-note")||document.body;x(b.root&&F(b.root),"Root not valid!");
x(F(b.root),"RTE root node required to be an HTML element! <$>");b.b.Ae({xb:["rte","content"]});var c=b.Xa();b.c.undo&&(b.c.Mf.element=b.root,c.e(b.i=new Ec,{element:b.root}));b.c.keyCommands&&(Pe(b,{key:"z",ha:!0},b.w.action.bind(b,"undo")),Pe(b,{key:"z",ha:!0,shiftKey:!0},b.w.action.bind(b,"redo")),Pe(b,{key:"y",ha:!0},b.w.action.bind(b,"redo")));b.c.keyCommands&&(Pe(b,{key:"b",ha:!0},b.w.action.bind(b,"bold")),Pe(b,{key:"i",ha:!0},b.w.action.bind(b,"italic")),Pe(b,{key:"u",ha:!0},b.w.action.bind(b,
"underline")),Pe(b,{key:"s",ha:!0},b.w.action.bind(b,"strikethrough")),Pe(b,{key:"h",ha:!0},b.w.action.bind(b,"highlight")));b.c.behavior&&b.b.g(b.root,"keydown",function(a){var c=!1,d=(a.shiftKey?1:0)+(a.altKey?2:0)+(a.metaKey?4:0)+(a.ctrlKey?8:0);9===a.keyCode?0===d?c=b.w.action("tab",""):1===d&&(c=b.w.action("tab","true")):13===a.keyCode?0===d?c=b.w.action("insertparagraph"):1===d?c=b.w.action("insertlinebreak"):2===d?c=b.w.action("inserttodo","toggle"):4!==d&&6!==d&&(c=!0):46===a.keyCode?(2===
d?b.w.action("forwarddeleteword"):4===d?b.w.action("forwarddeleteline"):b.w.action("forwarddelete"),c=!0):8===a.keyCode&&(2===d?b.w.action("deleteword"):4===d?b.w.action("deleteline"):b.w.action("delete"),c=!0);return c?(a.preventDefault(),a.stopPropagation(),!1):!0});b.xe=0;b.Vb=0;b.Hf=!!(b.c.trackStateChanges||b.c.trackValueChanges||b.c.trackEnabledChanges);var d=new be;c.e(d,{root:b.root});c.e(new Ed);c.e(new ce);c.e(new ke);c.e(new fe);b.N=new le;c.e(b.N);c.e(new ne);c.e(new oe);c.e(new pe);c.e(new se,
b.c.imageConfig);c.e(new re);c.e(new qe);c.e(new ue);c.e(new ve);c.e(new Me);a.emoticons&&c.e(new Ne);a=b.c.tableResizing;var f=b.c.imageResizing;b.c.tableSelection&&c.e(new te);if(f||a)b.p=new Ib,c.e(b.p,b.N);f&&(b.Za=new Oc,b.c.active&&c.e(b.Za));a&&(b.lb=new me,b.c.active&&c.e(b.lb));b.c.skipMarkupTransform||(Ad(b.root),c.Md().map(function(a){a.Jf&&a.Jf(b.root)}),Xd(b.root));b.c.active&&wb(b.root,!0);d.Ib();b.Ib();var e=!1,h=null,k=null;b.b.g(b.root,"compositionstart",function(){e=!0;b.N.Xb.Qa();
k=b.N.format.jd()});b.b.g(b.root,"compositionend",function(){e=!1});b.qd=function(){if(!e){var a=Y(b.root);a&&(h=Sb(a),k=null)}};b.b.g(b.root,"input",function(){if(!e&&h){k&&(b.N.Xb.Qa(),b.N.format.Ma(k),k=null);var a=Tb(h);if(null!=a){var c=Y(b.root),a=Kb(a.startContainer,a.startOffset,c.startContainer,c.startOffset);h=null;A(b.root,"applypendingstyles",Sb(a))}}});b.$a=!1;b.b.g(b.root,"dirty",b.pb.bind(b));b.b.g(b.root,"input",b.pb.bind(b));b.b.g(b.root.ownerDocument,"selectionchange",b.Fd.bind(b));
b.c.placeholder&&b.root.setAttribute("data-en-placeholder",b.c.placeholder);b.i&&b.i.clear()};n.v=function(){this.Fe=this.qd=this.Jb=null;Ob();this.de=this.Aa=null;wb(this.root,!1);this.N=this.root=this.c=this.lb=this.Za=null};
n.Fd=function(){var a=this;try{var b=Y(this.root);null!=b&&(this.Aa=Sb(b));a.qd&&a.qd();a.xe=a.b.timeout(function(){var b=a.hasFocus();b!==a.de&&(wc("content",{focus:b}),a.de=b);if(b&&a.Hf){var b=Qe(a),c=JSON.stringify(b);c!==a.Fe&&(a.Fe=c,x(!b||oa(b),"info has to be dict",b),b=b||{},b.module="content",uc("styleChanged",b))}},50,a.xe)}catch(c){w.error("Exception in en.rte.didChangeStyle <$>:",c.toString())}};function Re(a,b){a.b.md(a.Vb);a.Vb=0;a.$a=!!b}
n.pb=function(){var a=this;Re(a,!0);a.Vb=a.b.timeout(function(){a.$a&&vc("content")},100,a.Vb);a.Fd()};function Qe(a){function b(a,b,e){if(a&&a.length){for(var h={},k=0;k<a.length;k++){var g=a[k];h[g]=e(g)}h&&(c[b]=h)}}var c={};b(a.c.trackStateChanges,"state",a.w.state);b(a.c.trackValueChanges,"value",a.w.value);b(a.c.trackEnabledChanges,"enabled",a.w.enabled);return c}
function Pe(a,b,c){a.Jb||(a.Jb=[],a.b.g(a.root,"keypress",function(b){if(b.ctrlKey||b.metaKey)for(var c=a.Jb.length-1;0<=c;c--){var e=a.Jb[c];if(e.ha===(b.ctrlKey||b.metaKey)&&b.which===e.which&&b.shiftKey===e.shiftKey)return e.ef.call(a),b.preventDefault(),!1}}));b.ha=b.ha||!0;b.shiftKey=!!b.shiftKey;b.which=b.charCode||b.key.charCodeAt(0);b.ef=c;a.Jb.push(b)}n.focus=function(){Y(this.root)||(this.root.focus(),this.Aa?Lb(Tb(this.Aa)):window.getSelection().collapse(this.root,0))};
n.selection=function(a){var b=Y(this.root);a&&(this.Aa&&Lb(Tb(this.Aa)),this.root.focus(),b=Y(this.root));return b};function Se(a,b,c,d){return Da(function(){!0===b.focus&&a.selection(!0);!0===b.h&&a.i&&Cc(a.i);c();!0!==b.Db&&a.pb();a.c.Id&&a.c.Id(!0,b,d);!0===b.h&&a.i&&Cc(a.i);return!0})||!1}n.hasFocus=function(){var a=Y(this.root);return a&&(a=Pb(a))?!(!O(a,vb)&&!vb(document.body)):!1};
n.Ib=function(){var a=this,b=this.N.gf();Object.keys(b).forEach(function(c){var d=b[c];d.name=c;var f={name:c,h:d.h,Db:d.Db,U:d.U,enabled:null,action:function(b){var d=a.N.execCommand.bind(a.N,c,!1,b);return Se(a,f,d,b)},state:function(){return a.N.queryCommandState(c)},value:function(b){return a.N.queryCommandValue(c,b)}};f.enabled=d.enabled?function(){return a.N.queryCommandEnabled(c)}:function(){return a.hasFocus()&&a.N.queryCommandEnabled(c)};a.b.n(f)});a.b.n({name:"undo",action:function(){a.i&&
a.i.He()&&a.pb();return!0},state:function(){return a.i&&Fc(a.i)},value:function(){return a.i&&Gc(a.i)},enabled:function(){return a.hasFocus()&&a.i&&Fc(a.i)}});a.b.n({name:"redo",action:function(){a.i&&Hc(a.i)&&a.pb();return!0},state:function(){return a.i&&Ic(a.i)},value:function(){return a.i&&Jc(a.i)},enabled:function(){return a.hasFocus()&&a.i&&Ic(a.i)}});a.b.n({name:"addundo",action:function(b){a.i&&Cc(a.i,b);return!0},enabled:B});a.b.n({name:"clearundo",action:function(){a.i&&a.i.clear();return!0},
enabled:B});a.b.n({name:"undotitle",action:function(b){if(a.i){var d=a.i;d.A&&(d.A.title=b)}return!0},value:function(){return a.i&&Gc(a.i)},enabled:B});a.b.n({name:"redotitle",action:function(b){if(a.i){var d=a.i;d.A&&(d.A.title=b)}return!0},value:function(){return a.i&&Jc(a.i)},enabled:B});a.b.n({name:"focus",action:function(b){b=na(Ra(b),{pos:"top",force:!1,scroll:!1,animate:!1});w.log("Focus options",b);if(!Y(a.root)||b.force)if(a.root.focus(),a.Aa&&!b.force)Lb(Tb(a.Aa));else if("bottom"===b.pos){var d=
document.createRange();d.selectNodeContents(a.root);d.collapse(!1);Lb(d)}else window.getSelection().collapse(a.root,0);if(b.scroll&&(d=Y(a.root),b=!!b.animate,d)){var d=Wb(d),f=document.body;Math.max(document.documentElement.clientWidth,window.innerWidth||0);var e=Math.max(document.documentElement.clientHeight,window.innerHeight||0),h=f.scrollTop+16,k=null;d.bottom>f.scrollTop+e-16?k=d.bottom:d.top<h&&(k=d.top);null!=k&&(b?Gb(k):Gb(k,0))}return!0},state:function(){return a.hasFocus()},value:function(){if(a.hasFocus())return a.name},
Fa:!0,enabled:B});a.b.n({name:"content",action:function(b){Re(a,!1);a.i.clear();a.root.innerHTML=b;return!0},value:function(b){return a.Mc(Ra(b))},enabled:B});a.b.n({name:"changes",action:function(b){Re(a,Qa(b));return!0},enabled:B,state:function(){return a.$a},Fa:!0});a.b.n({name:"active",action:function(b){b=Qa(b);var d=vb(a.root);d!==b&&window.getSelection().containsNode(a.root,!0)&&Ob();d&&!b&&(wb(a.root,!1),a.Za&&a.da.v(a.Za),a.lb&&a.da.v(a.lb));!d&&b&&(Ob(),wb(a.root,!0),a.Za&&a.da.e(a.Za),
a.lb&&a.da.e(a.lb));return!0},state:function(b){if(!b||"rte"===b||"content"===b)return vb(a.root)},enabled:B})};
n.Mc=function(a){a=na(a,{html:!1,cleanup:!1,stripNS:!1,trim:!0,titleString:null,withInsertionPoint:!1,hiddenCryptoData:null,wrap:!1,resetChangesState:!1});a.resetChangesState&&Re(this,!1);var b=null,b=null,c=a.withInsertionPoint,d=this.root,f=sc(d);if(a.cleanup||c)d=this.root.cloneNode(!0);W("div.en-crypto-revealed",d).forEach(function(b){var c=b.id;0===c.indexOf("en-revealed-crypto:")?a.hiddenCryptoData&&a.hiddenCryptoData[c]?ab(b,I("embed",{type:"evernote/x-crypto",id:a.hiddenCryptoData[c]})):w.error("Found revealed crypto but not replacement. Key:",
c):w.error("Unsupported revealed crypto element with ID:",c)});a.cleanup&&b&&c&&(b.insertNode(jd()),c=!1);c&&f&&(b=rc(d,f))&&b.insertNode(jd());a.cleanup&&(this.Xa().Md().map(function(a){a.Kf&&a.Kf(d)}),Yd(d));b=a.stripNS?za(d.outerHTML):d.innerHTML;a.trim&&(b=b.trim());return a.html?"<html><head><title></title></head><body>"+b+"</body></html>":a.wrap?Dd(d,b):b};var Te=null,Ue=null;function bd(a,b){return Da(function(){a=a.toLowerCase();return Ta.action(a,b)||!1})};var Ve,We;
(function(){function a(a){y(d.querySelectorAll("embed"),function(b){var c=I("div");C(c,"en-print");switch(b.getAttribute("type")){case "evernote/x-pdf":C(c,"pdf");c.textContent=a.pdf_file;break;case "evernote/x-attachment":var d=b.getAttribute("id");null!=d&&d.match(/.*en-media:audio.*/)?(C(c,"audio"),c.textContent=a.audio_file):(C(c,"generic-attachment"),c.textContent=a.generic_file);break;default:w.warn("Found <embed> with unknown type! "+b),C(c,"generic-attachment"),c.textContent=a.generic_file}ab(b,c)});
y(d.querySelectorAll("object"),function(a){var b=I("div");C(b,"en-print");Va(a,"en-todo")&&C(b,"checkbox");Va(a,"en-todo-checked")&&C(b,"checked");ab(a,b)})}function b(){var a=I("br");C(a,"en-print");d.appendChild(a)}function c(a,b){for(var c=I("table"),k,g,l=0;4>l;l++){k=I("tr");c.appendChild(k);for(var m=0;2>m;m++)g=I("td"),k.appendChild(g)}c.setAttribute("id","header-table");C(c,"en-print");d.appendChild(c);k=[[0,b.author,"author"],[1,b.notebook,"notebook"],[2,b.created,"created"],[3,b.tags,"tags"],
[4,b.updated,"updated"],[5,b.url,"url"],[6,b.deleted,"deleted"],[7,b.location,"location"]];var q=c.querySelectorAll("td");y(k,function(b){if(null!=a[b[2]]){q[b[0]].innerHTML="";var c=I("span");C(c,"header-table-label");c.textContent=b[1];var d=I("span");C(d,"header-table-text");d.textContent=" "+a[b[2]];q[b[0]].appendChild(c);q[b[0]].appendChild(d)}})}var d=null;Ve=function(f,e){null!=d&&(w.warn("Multiple unnecessary calls to setup print."),We());for(var h=0;h<document.body.childNodes.length;h++)F(document.body.childNodes[h])&&
Ab(document.body.childNodes[h],!1);d=I("div");d.setAttribute("id","print-container");C(d,"en-print");h=document.querySelector("#container");h.parentNode.insertBefore(d,h);var k=na(e,{title:null,notebook:null,created:null,updated:null,deleted:null,author:null,location:null,tags:null,url:null}),h=na(f,{notebook:"Notebook:",created:"Created:",updated:"Updated:",deleted:"Deleted:",author:"Author:",location:"Location:",tags:"Tags:",url:"Source:",pdf_file:"PDF File",audio_file:"Audio File",generic_file:"Generic File"});
null!=e&&""!==e&&(c(k,h),k=I("hr"),d.appendChild(k),b());k=document.querySelector("#en-title");if(null!=k&&null!=k.textContent){var k=k.textContent,g=I("div");g.setAttribute("id","header-title");C(g,"en-print");g.textContent=k;d.appendChild(g);b()}k=document.querySelector("#en-note");null==k&&(w.warn("Could not find note!"),k=null);null!=k&&null!=d||w.error("Couldnt find note body or print container!");d.innerHTML+=k.innerHTML;a(h);uc("printReady",{module:"print"})};We=function(){null==d?w.warn("Print module teardown called while it was off!"):
(E(d),d=null)}})();ea("EN.setup",function(a){return Da(function(){a=na(a);Ta=new Pa;Mc(a);Lc=Te=new Ua({w:Ta,c:a,uid:(new Date).getTime()});Ue=new Sa;Ue.e({name:"document"});var b,c;a.template?(b=new yd,c=a.template):a.rte&&(b=new Oe,c=a.rte);(Jb=b)?((null==a.active||a.active)&&Te.e(b,c),Ue.n({name:"bounds",enabled:B,value:function(){var a=K(b.root),c={left:a.left,right:a.right,top:a.top,bottom:a.bottom,width:a.width,height:a.height};c.y=document.body.scrollHeight-a.bottom;c.x=a.left;return JSON.stringify(c)}})):w.error('Settings for "rte" or "template" are obligatory!');
null!=a.title&&(Te.e(new ad,a.title),Ue.g(document.body,"titlechanged",function(a){vc("title",a.data)}));null!=a.shared&&Te.e(new Pc,a.shared);null!=a.context&&Te.e(new Qc,a.context);null!=a["context-upsell"]&&Te.e(new Rc,a["context-upsell"]);null!=a.find&&Te.e(new Sc,a.find);var d=document.getElementById("en-note")||document.body;if(d){var f=function(){var a=Y(d);return!(!a||a.collapsed)};Ue.n({name:"copy",value:function(a){if(!f())return null;a=na(a,{html:!0,raw:!0,resources:!0,plain:!0});return Dc(d,
Y(d),a)},enabled:f})}return!0})});ea("EN.cleanup",function(){Da(function(){Ta.Le();Te.Ke();Te=null;Ue.v();Lc=Ta=Jb=null;Kc={}})});ea("EN.execCommand",bd);ea("EN.queryCommandState",function(a,b){return Da(function(){a=a.toLowerCase();return Ta.state(a,b)||!1})});ea("EN.queryCommandValue",function(a,b){return Da(function(){a=a.toLowerCase();return Ta.value(a,b)||""})});ea("EN.queryCommandEnabled",function(a,b){return Da(function(){a=a.toLowerCase();return Ta.enabled(a,b)||!1})});
ea("EN.enablePrint",Ve);ea("EN.disablePrint",We); }).call(window); window.enLoadState = 'didLoad'; }
catch(ex) { window.enLoadState = "Exception: " + ex.toString() + '\n' + ex.stack + ''; }

