// ce-27.68-release-mac 5a46b1e308a5356a33cb86c24cf02acd6da48b2d
// Copyright 2013-2015 Evernote Corp. All rights reserved.
// http://www.evernote.com

window.enLoadState = 'willLoad';
try {(function(){ 'use strict';var aa,ba,da=this;
function ea(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 fa(a){return"array"==ea(a)}function u(a){return"string"==typeof a}function ha(a){return"number"==typeof a}function ia(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ja(a,b){var c=a.split("."),d=da;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]?d=d[e]:d=d[e]={}:d[e]=b}
function ka(a,b){function c(){}c.prototype=b.prototype;a.Dd=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.oi=function(a,c,f){for(var g=Array(arguments.length-2),h=2;h<arguments.length;h++)g[h-2]=arguments[h];return b.prototype[c].apply(a,g)}};window.CE_VERSION_INFO={lastBuildNumber:26,lastCommitDate:"2015-11-03 15:29:31 -0600",major:27,build:68,channel:"release",platform:"mac"};function la(){return window.CE_VERSION_INFO.lastBuildNumber}function ma(){return window.CE_VERSION_INFO.lastCommitDate};var na="style bgcolor title lang dir text".split(" "),pa="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(" "),ra="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(" "),
sa="hr area base br col colgroup embed img input link meta param wbr en-todo en-media".split(" "),ua="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(" "),va=["0","0px","none","initial"],wa="colgroup table tbody tfoot thead tr".split(" "),ya=["script","style","plaintext","xmp"],za=["embed","object","img"],Ca=pa.join(","),Da=["*","~","!","_","`"];var Ea=[];function Fa(a){fa(a)||(a=[a.toString()]);this.B=a}aa=Fa.prototype;aa.log=function(a,b,c){if(800<=a)for(var d=0;d<Ea.length;d++)Ea[d](this.B,a,Array.prototype.slice.call(b),c)};aa.info=function(a){this.log(800,arguments)};aa.warn=function(a){this.log(900,arguments)};aa.error=function(a){this.log(1E3,arguments)};aa.vh=function(a){this.log(1200,arguments)};var Ga=new Fa("default"),Ha=Ga.info.bind(Ga),Ia=Ga.warn.bind(Ga),Ja=Ga.error.bind(Ga);Ga.vh.bind(Ga);
window.evernoteClient&&Ea.push(function(a,b,c){a=a.map(function(a){return"["+a+"]"}).join("");c.unshift(a);window.evernoteClient.log(c.join(" "))});Ea.push(function(a,b,c){a=a.map(function(a){return"["+a+"]"}).join("");c.unshift(a);a=c.map(Ka).join(" ");1E3<=b?console.error(a):900<=b?console.warn(a):800<=b?console.info(a):console.log(a)});var v={};function La(){return!1}function Ma(){return!0}function Na(){}v.log=function(){};v.info=Ha;v.warn=Ia;v.error=Ja;v.time=Na;v.timeEnd=Na;v.trace=Na;v.dump=function(a){var b=Array.prototype.slice.call(arguments).map(Ka);v.log.apply(v,b)};v.group=function(a){window.console&&window.console.groupCollapsed&&window.console.groupCollapsed(Array.prototype.slice.call(arguments).map(Ka).join(" "))};v.groupEnd=function(){window.console&&window.console.groupCollapsed&&window.console.groupEnd&&window.console.groupEnd()};
var Oa={};v.pg=function(a,b){var c={t:window.performance&&window.performance.now?window.performance.now():(new Date).getTime(),Tc:Array.prototype.slice.call(arguments,1).join(" ")||""};Oa[a]?Oa[a].push(c):Oa[a]=[c]};v.wi=function(a,b){Oa[a]=[];v.pg.apply(this,arguments)};function Pa(a){a=a.toString();var b=a.indexOf(".");return 0>b?a:a.substring(0,b+4)}
v.vi=function(a,b){v.pg.apply(this,arguments);for(var c=Oa[a],d=c[c.length-1].t-c[0].t,e=1;e<c.length;e++){var f=c[e].t-c[e-1].t;v.log("\u25fc "+a+"."+e+": "+Pa(f)+"ms ("+Math.round(100*f/d)+"% of "+Pa(d)+"ms full time)",c[e].Tc?"<-":"",c[e].Tc)}Oa[a]=[]};function Qa(a){var b=Ta(arguments);b.unshift("DEPRECATION WARNING:");v.warn.apply(null,b)}function z(a,b){if(!a){var c="Assertion failed! "+Array.prototype.slice.call(arguments,1).join(" ");v.error(c);throw c;}}
function Ua(a){try{if(u(a))return Va(a);var b=JSON.stringify(a,null,"  ")}catch(c){return a.toString()}return b}
function Wa(a){var b;return a instanceof Text?"<TextNode:"+Ua(a.textContent)+">":a instanceof Element?"<Element:"+a.outerHTML.replace(/^<(.*?)>[\s\S]*$/gi,"$1")+(a.id?"#"+a.id:"")+">":a instanceof DocumentFragment?(b=document.createElement("div"),b.appendChild(a.cloneNode(!0)),"<DocumentFragment:"+b.innerHTML.replace(/^<(.*?)>[\s\S]*$/gi,"$1")+">"):a instanceof Range?(b=document.createElement("div"),b.appendChild(a.cloneContents()),"<Range:"+Wa(a.startContainer)+":"+a.startOffset+","+Wa(a.endContainer)+
":"+a.endOffset+" collapsed="+(a.collapsed?"true":"false")+" html="+Ua(b.innerHTML)+">"):"<"+typeof a+":"+Ua(a)+">"}function Ka(a){return u(a)?a:Wa(a)}var Xa=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;function Ya(a){return a instanceof RegExp?a.source:a.replace(Xa,"\\$&")}var Za=/[^\x20-\x26\x28-\x5B\x5D-\x7E]/g,$a={"\n":"\\n","'":"\\'",'"':'\\"',"\t":"\\t","\r":"\\r"};
function Va(a){return"'"+a.replace(Za,function(a){if($a[a])return $a[a];a=a.charCodeAt(0).toString(16);var c=a.length;return 1===c?"\\x0"+a:2===c?"\\x"+a:3===c?"\\u0"+a:"\\u"+a})+"'"}var ab=/([\uD800-\uDBFF])([\uDC00-\uDFFF])/g;function bb(a){ab.lastIndex=0;return ab.test(a)}var eb=/[\u0000\u0001-\u0008\u000E-\u001F\u007F-\u009F\uFDD0-\uFDEF\u000B\uFFFE\uFFFF]|[\x01-\x10][\uFFFE-\uFFFF]/g;function fb(a){return a.replace(eb,"")}
var ib={"&apos;":/&apos;/gi,"&quot;":/&quot;/gi,"&gt;":/&gt;/gi,"&lt;":/&lt;/gi,"&amp;":/&amp;/gi,"&":/&/g,"<":/</g,">":/>/g,'"':/"/g,"'":/'/g};function jb(a){return a.replace(ib["&apos;"],"'").replace(ib["&quot;"],'"').replace(ib["&gt;"],">").replace(ib["&lt;"],"<").replace(ib["&amp;"],"&")}
function kb(a){var b;z(!!a&&lb(a),"obj has to be dict",a);var c={};null==b&&(b=!1);Object.keys(a).forEach(function(b){c[a[b]]=b});b||Object.keys(a).length===Object.keys(c).length||Ia("inverting resulted in a different number of keys","original:",a,"inverted:",c);return c}function mb(a,b){var c;if(a&&b)if(null!=a.length){c=0;for(var d=a.length;c<d&&b.call(a,a[c],c)!==nb;c++);}else"object"===typeof a&&Object.keys(a).every(function(c){return b.call(a,c,a[c])===nb?!1:!0})}var nb={};
function ob(a,b,c){if(b)for(var d in b)if(!c||void 0===a[d]){var e=b[d];void 0!==e&&(a[d]=e)}return a}function B(a,b,c){null==c&&(c=!0);if(null==a||""===a)a={};u(a)&&(a=JSON.parse(a)||{});z(lb(a),"Options of wrong type");if(b){z(lb(b),"Defaults of wrong type");var d,e=Object.keys(b);for(d in a)if(a.hasOwnProperty(d)&&!(0<=e.indexOf(d))&&c){var f=["Key",Ua(d),"not supported! Seen in:",(a||{}).name||"",a];v.warn.apply(f)}for(d in b)"undefined"===typeof a[d]&&(a[d]=b[d])}return a||{}}
function qb(){var a=navigator.language||navigator.userLanguage||"en",a=a.split("-")[0];window.Evernote&&window.Evernote.getLanguage&&(a=window.Evernote.getLanguage());return a}function Ta(a,b){if(!b)return Array.prototype.slice.call(a,0);var c=a.length,d=[],e;if(b)for(e=c-1;0<=e;e--)d.push(a[e]);else for(e=0;e<c;e++)d.push(a[e]);return d}var rb=/^[\x00-\x20\s]*$/g;function sb(a){return u(a)?(rb.lastIndex=0,0===a.length||rb.test(a)):!1}
function tb(a){return!a||sb(a)||fa(a)&&0===a.length||ia(a)&&0===Object.keys(a).length}var ub=/^(?:(?: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 vb(a){ub.lastIndex=0;return u(a)&&ub.test(a)}function lb(a){return!!a&&"object"===ea(a)}function wb(a){var b=a.indexOf(">"),c=a.lastIndexOf("<");return 0>b||0>c?a:a.substring(b+1,c)}function xb(a){var b;if(u(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 wb(b.outerHTML)}function yb(){return window.ENUniqueCounter++}
function Ab(a){var b=1+(window.ENUniqueCounterObject[a]||0);window.ENUniqueCounterObject[a]=b;return a+"-"+b}window.ENUniqueCounter=1;window.ENUniqueCounterObject={};function Bb(a){window.setTimeout(a,0)}function Cb(a,b){var c;try{c=a()}catch(d){var e=[];e.push("Exception:");e.push(d.toString());v.error.apply(e);b&&b(d)}return c}function Db(){this.wa=[];this.sb=[]}Db.prototype.has=function(a){return-1!==this.wa.indexOf(a)};
Db.prototype.get=function(a){a=this.wa.indexOf(a);return-1!==a?this.sb[a]:null};Db.prototype.set=function(a,b){var c=this.wa.indexOf(a);-1!==c?this.sb[c]=b:(this.wa.push(a),this.sb.push(b))};Db.prototype.remove=function(a){a=this.wa.indexOf(a);-1!==a&&(this.wa.splice(a,1),this.sb.splice(a,1))};function Eb(){this.B=Object.create(null)}Eb.prototype.add=function(a){this.B[a]=!0};Eb.prototype.remove=function(a){delete this.B[a]};Eb.prototype.has=function(a){return!!this.B[a]};var Gb=window.onerror;
window.onerror=function(a,b,c){var d=!1;Gb&&(d=Gb(a,b,c));v.error("Uncaught error in JS:",a.toString(),b,c);return d};var Jb={"smiling face with open mouth":{icon:"\ud83d\ude03",keystrokes:[":)",":=)",":-)"],color:"yellow"},pensive:{icon:"\ud83d\ude14",keystrokes:[":(",":=(",":-("]},"grinning face":{icon:"\ud83d\ude00",keystrokes:[":D",":=D",":-D"]},"smiling face with sunglasses":{icon:"\ud83d\ude0e",keystrokes:["8=)","8-)","B=)","B-)"]},"winking face":{icon:"\ud83d\ude09",keystrokes:[";)",";=)",";-)"]},"face with open mouth":{icon:"\ud83d\ude2e",keystrokes:":o :=o :-o :O :=O :-O".split(" ")},"crying face":{icon:"\ud83d\ude22",
keystrokes:[";(",";=(",";-("]},"smiling face with open mouth and cold sweat":{icon:"\ud83d\ude05",keystrokes:["(:|",":sweat:"]},"neutral face":{icon:"\ud83d\ude10",keystrokes:[":|",":=|",":-|",":neutral:"]},"kissing face with closed eyes":{icon:"\ud83d\ude1a",keystrokes:[":*",":=*",":-*",":kiss:"]},"face with stuck-out tongue":{icon:"\ud83d\ude1b",keystrokes:":P :=P :-P :p :=p :-p".split(" ")},"smiling face with smiling eyes":{icon:"\ud83d\ude0a",keystrokes:[":$",":-$",":=$",":simple_smile:"]},"angry face":{icon:"\ud83d\ude21",
keystrokes:":@ :-@ :=@ x( x-( x=( X( (X=( :angry:".split(" ")},"smiling face with halo":{icon:"\ud83d\ude07",keystrokes:"O:) O:=) O:-) o:) o:=) o:-) :innocent: :angel:".split(" ")},"heavy black heart":{icon:"\u2764\ufe0f",keystrokes:["<3",":heart:"]},"sleepy face":{icon:"\ud83d\ude2a",keystrokes:["|-)","I-)","I=)",":snooze:"]},"smiling face with heart-shaped eyes":{icon:"\ud83d\ude0d",keystrokes:[":inlove:",":in_love:"]},"smiling face with horns":{icon:"\ud83d\ude08",keystrokes:[":devil:"]},ghost:{icon:"\ud83d\udc7b",
keystrokes:[":ghost:"]},"extraterrestrial alien":{icon:"\ud83d\udc7d",keystrokes:[":alien:"]},skull:{icon:"\ud83d\udc80",keystrokes:[":skull:"]},"face screaming in fear":{icon:"\ud83d\ude31",keystrokes:[":scream:"]},"slice of pizza":{icon:"\ud83c\udf55",keystrokes:[":pizza:"]},"purple heart":{icon:"\ud83d\udc9c",keystrokes:[":purple_heart:",":purpleheart:"]},"green heart":{icon:"\ud83d\udc9a",keystrokes:[":green_heart:",":greenheart:"]},"blue heart":{icon:"\ud83d\udc99",keystrokes:[":blue_heart:",
":blueheart:"]},"yellow heart":{icon:"\ud83d\udc9b",keystrokes:[":yellow_heart:",":yellowheart:"]},droplet:{icon:"\ud83d\udca7",keystrokes:[":droplet:"]}},Kb={":(=|-)?\\)":Jb["smiling face with open mouth"],":(=|-)?\\(":Jb.pensive,":(=|-)?D":Jb["grinning face"],"(8|B)(=|-)?\\)":Jb["smiling face with sunglasses"],";(=|-)?\\)":Jb["winking face"],":(=|-)?(o|O)":Jb["face with open mouth"],";(=|-)?\\(":Jb["crying face"],"\\(:\\|":Jb["smiling face with open mouth and cold sweat"],":sweat:":Jb["smiling face with open mouth and cold sweat"],
":(=|-)?\\|":Jb["neutral face"],":neutral:":Jb["neutral face"],":(=|-)?\\*":Jb["kissing face with closed eyes"],":kiss:":Jb["kissing face with closed eyes"],":(=|-)?(P|p)":Jb["face with stuck-out tongue"],":(-|=)?\\$":Jb["smiling face with smiling eyes"],":simple_smile:":Jb["smiling face with smiling eyes"],"\\(?(:|x|X)(=|-)?(@|\\()":Jb["angry face"],":angry:":Jb["angry face"],"(O|o):(=|-)?\\)":Jb["smiling face with halo"],":innocent:":Jb["smiling face with halo"],":angel:":Jb["smiling face with halo"],
"<3":Jb["heavy black heart"],":heart:":Jb["heavy black heart"],"(\\||I)(-|=)\\)":Jb["sleepy face"],":snooze:":Jb["sleepy face"],":in_?love:":Jb["smiling face with heart-shaped eyes"],":devil:":Jb["smiling face with horns"],":ghost:":Jb.ghost,":alien:":Jb["extraterrestrial alien"],":skull:":Jb.skull,":scream:":Jb["face screaming in fear"],":pizza:":Jb["slice of pizza"],":purple_?heart:":Jb["purple heart"],":green_?heart:":Jb["green heart"],":blue_?heart:":Jb["blue heart"],":yellow_?heart:":Jb["yellow heart"],
":droplet:":Jb.droplet},Lb=new Db;Object.keys(Kb).forEach(function(a){Lb.set(a,Kb[a])});function Mb(){function a(a,c,b){a.K=B(c,{title:null,id:null,queryGroupName:b.Ah})}function b(a){z(u(a)&&a===a.toLowerCase(),"Command name has to be lower case only.");var b=a.lastIndexOf("."),f=[],g=null,h=a;-1===b?(b=c[a])&&(f=b.filter(function(a){return!0!==a.cc})):(g=a.substring(0,b),h=a.substring(b+1),(b=c[h])&&(f=b.filter(function(a){return a.Hb&&-1!==a.Hb.indexOf(g)})));return{xa:f,ti:h,Ah:g,xi:a}}var c={};this.Uh=function(a){z(lb(a),"We require command to be an object:",a);var b=a.name;z(u(b)&&
1<b.length&&!!b.match(/[a-z]+/gi),"Invalid name for command:",Ua(b));a.action&&z(!!a.enabled,'We require command to have "enabled" state:',a.name);z(!!(a.action||a.value||a.state),'We require command to have one of "action", "value" or "state":',a.name);z(!a.Hb||fa(a.Hb),"We require command groups to be an Array:",a.name);var f=c[b];f||(f=[],c[b]=f);z(fa(f),"Expected list for commands");f.push(a)};this.Gg=function(a){if(a&&c)for(var b=Object.keys(c||{}),f=0;f<b.length;f++){var g=b[f],h=c[g];if(h)for(var l=
h.length-1;0<=l;l--){var m=h[l];m&&a(m)&&(h.splice(l,1),0>=h.length?delete c[g]:c[g]=h)}}else c={}};this.action=function(c,e,f){var g=null;Cb(function(){var h=b(c),l=h.xa;if(0!=l.length)for(var m=0;m<l.length;m++){var p=l[m];a(p,f,h);if(p.action&&p&&p.enabled&&p.enabled.call(p,e)){var r={name:p.name,value:e,command:p};Nb("beforeexeccommand",r);p=p.action.call(p,e);g=!(null===g&&!1===p);r.result=p;Nb("execcommand",r)}}else v.warn("execCommand of unknown command:",c,"with value:",e)},function(a){"complete"!==
document.readyState?v.warn("Exception in execCommand <$>:",a.toString()):v.error("Exception in execCommand <$>:",a.toString())});return g};this.enabled=function(c,e,f){var g=null;Cb(function(){var h=b(c),l=h.xa;if(l)for(var m=0;m<l.length;m++){var p=l[m];if(p.enabled){a(p,f,h);p=p.enabled.call(p,e);if(!0===p){g=!0;break}null===g&&!1===p&&(g=!1)}}else v.warn("queryCommandEnabled of unknown command:",c,e)},function(a){"complete"!==document.readyState?v.warn("Exception in queryCommandEnabled <$>:",a.toString()):
v.error("Exception in queryCommandEnabled <$>:",a.toString())});return g};this.state=function(c,e,f){var g=null;Cb(function(){var h=b(c),l=h.xa;if(l)for(var m=0;m<l.length;m++){var p=l[m];if(p.state){a(p,f,h);if(!0===p.state.call(p,e)){g=!0;break}g=!1}}else v.warn("queryCommandState of unknown command:",c,e)},function(a){"complete"!==document.readyState?v.warn("Exception in queryCommandState <$>:",a.toString()):v.error("Exception in queryCommandState <$>:",a.toString())});return g};this.value=function(c,
e,f){var g=null;Cb(function(){var h=b(c),l=h.xa;if(l)for(var m=0;m<l.length;m++){var p=l[m];if(p.value){a(p,f,h);p=p.value.call(p,e);if(null!=p){if(!u(p))try{g=JSON.stringify(p);break}catch(r){}g=p.toString();break}g=""}}else v.warn("queryCommandValue of unknown command:",c,e)},function(a){"complete"!==document.readyState?v.warn("Exception in queryCommandValue <$>:",a.toString()):v.error("Exception in queryCommandValue <$>:",a.toString())});return g}}
function Ob(a){return!(!1===a||0===a||"0"===a||"false"===a.toString().toLocaleLowerCase())}function Pb(a){if(lb(a))return a;if(u(a)&&0<a.length){if(0===a.indexOf("{"))return JSON.parse(a)||{};Qa('Please use a JSON formatted string in the form { "value": "'+a.substring(0,100)+'"}');return{value:a}}return{}}function Qb(a){var b="";try{var c=a;u(c)&&(c=JSON.parse(c)||{});if(fa(c))return c;if(lb(c))return[c]}catch(d){b=d}v.warn("Problems parsing value",a,b.toString());return null};var Rb=new function(){var a=this;a.name="message";var b;a.G=function(){b={}};a.A=function(a,d){var e=b[a];if(null!=e){for(var f=0;f<e.length;f++)(0,e[f][1])(d,a);return!0}return!1};a.I=function(c,d){if(null!=b[c]){var e=d(c);return a.A(c,e)}return!1};a.subscribe=function(a,d,e,f){var g=b[a];null==g&&(g=[],b[a]=g);f&&(d=d.bind(f));a=e||0;for(e=0;e<g.length;e++)if(a<g[e][0]){g.splice(e,0,[a,d]);return}g.push([a,d])};a.L=function(c,b,e,f){function g(e){b.apply(f,arguments);a.unsubscribe(c,g)}a.subscribe(c,
g,e)};a.J=function(a){a=b[a];return null!=a?a.length:0};a.unsubscribe=function(a,d){var e=b[a];if(null!=e){for(var f=e.length-1;0<=f;f--)e[f][1]===d&&e.splice(f,1);0===e.length&&delete b[a]}};a.C=function(){b={}}};Rb.G({});function Sb(a,b,c){z(!!a,"Missing target to work with");z("function"==typeof b,"Listener must be a function");this.listener=b;this.target=a;this.mb={};this.state=1;this.A=!1;this.options=B(c||{},this.B,!1)}function Tb(a,b){return a===b?1:Math.abs(a)>=Math.abs(b)?0<a?2:4:0<b?8:16}function Ub(a,b){var c=void 0===a.x?["clientX","clientY"]:["x","y"],d=b[c[0]]-a[c[0]],c=b[c[1]]-a[c[1]];return Math.sqrt(d*d+c*c)}
function Vb(a,b){var c=void 0===a.x?["clientX","clientY"]:["x","y"];return 180*Math.atan2(b[c[1]]-a[c[1]],b[c[0]]-a[c[0]])/Math.PI}function Wb(a){var b=0,c=0,d=a.length;a.forEach(function(a){b+=a.clientX;c+=a.clientY});return{x:Math.round(b/d),y:Math.round(c/d)}}function Xb(a){var b=[];a.touches.forEach(function(a){b.push({clientX:Math.round(a.clientX),clientY:Math.round(a.clientY)})});return{timeStamp:Date.now(),touches:b,center:Wb(b),deltaX:a.deltaX,deltaY:a.deltaY}}
function Yb(a,b){var c=Array.prototype.slice.call(a.targetTouches),d={};if(b&3&&1===c.length)return[c,c];var e=Array.prototype.slice.call(a.changedTouches);c.forEach(function(a){d[a.identifier]=!0});e.forEach(function(a){d[a.identifier]||(d[a.identifier]=!0,c.push(a))});return[c,e]}function Zb(a){a.state=this.state;a.preventDefault=function(){a.srcEvent.preventDefault()};a.stopPropagation=function(){a.srcEvent.stopPropagation()};this.H(a);this.listener.call(this.target,a)}
var $b={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ac(a){a.preventDefault()}var bc=0;Sb.prototype.B={};Sb.prototype.Zc=function(){return 1};Sb.prototype.H=function(){};function cc(a,b){z(!!b,"Payload is missing, check proper flow when tryEmit is being used.");a.options.vf&&a.state&6&&!(a.state&8)?dc(a,!0):a.options.vf&&dc(a,!1);a.state&30&&Zb.call(a,b)}
function dc(a,b){a.A&&!b&&0>=--bc?document.body.removeEventListener("touchmove",ac):!a.A&&b&&0<++bc&&document.body.addEventListener("touchmove",ac);a.A=b}function fc(a,b,c){Sb.call(this,a,b,c);this.C=this.O=0}ka(fc,Sb);fc.prototype.B={type:"pan",Cb:1,threshold:10,vf:!0,direction:30};
fc.prototype.Zc=function(a){var b=this.state&6,c;if((c=a.touches.length===this.options.Cb)&&!(c=this.state&2)&&(c=!(this.state&2))){c=a.direction;var d=a.distance;a.direction&this.options.direction||(this.options.direction&6?(d=a.deltaX,c=0===d?1:0>d?2:4):(d=a.deltaY,c=0===d?1:0>d?8:16),d=Math.abs(d));c=!!(d>this.options.threshold&&c&this.options.direction)}if(b&&(a.inputType&8||!c))return this.state|16;if(b||c)return a.inputType&4?this.state|8:this.state&2?this.state|4:(this.O=a.deltaX,this.C=a.deltaY,
2);this.C=this.O=0;return 32};fc.prototype.H=function(a){a.deltaX-=this.O;a.deltaY-=this.C;2===this.state&&(a.isInitial=!0)};function jc(a,b,c){Sb.call(this,a,b,c)}ka(jc,Sb);jc.prototype.B={type:"pinch",Cb:2,threshold:0,vf:!0};jc.prototype.Zc=function(a){var b=this.state&6,c=a.touches.length===this.options.Cb&&(Math.abs(a.scale-1)>this.options.threshold||this.state&2);return b&&(a.inputType&8||!c)?this.state|16:b||c?a.inputType&4?this.state|8:this.state&2?this.state|4:2:32};
jc.prototype.H=function(a){this.state&8&&(a.isFinal=!0)};function kc(a,b,c){Sb.call(this,a,b,c)}ka(kc,jc);kc.prototype.B={type:"rotate",Cb:2,threshold:0};function lc(a,b,c){Sb.call(this,a,b,c)}ka(lc,Sb);lc.prototype.B={type:"swipe",threshold:10,ni:.65,direction:30,Cb:1};
lc.prototype.Zc=function(a){var b=this.options.direction,c=0;b&30?c=a.velocity:b&6?c=a.velocityX:b&24&&(c=a.velocityY);var d=this.state&6,b=a.touches.length===this.options.Cb&&a.inputType&4&&a.distance>this.options.threshold&&b&a.direction&&Math.abs(c)>this.options.ni;return d&&(a.inputType&8||!b)?this.state|16:d||b?a.inputType&4?this.state|8:this.state&2?this.state|4:2:32};function mc(a,b,c){Sb.call(this,a,b,c);this.nc=null;this.Oa=void 0;this.oc=0}ka(mc,Sb);
mc.prototype.B={type:"tap",Cb:1,Cg:1,interval:300,time:250,threshold:5,offset:10,cg:!1};
mc.prototype.Zc=function(a){var b=a.touches.length===this.options.Cb&&a.distance<this.options.threshold&&a.deltaTime<this.options.time;clearTimeout(this.nc);if(b){var c=this;if(4!=a.inputType)return c.nc=setTimeout(function(){c.state=32;c.Oa=void 0;c.oc=0},c.options.interval),32;var b=!this.Oa||a.timeStamp-this.Oa.timeStamp<this.options.interval,d=!this.Oa||Ub(this.Oa.center,a.center)<this.options.offset;this.Oa=a;this.oc=b&&d?this.oc+1:1;if(this.oc===this.options.Cg&&this.options.cg)return 8;this.oc===
this.options.Cg&&(this.nc=setTimeout(function(){c.state=8;cc(c,c.Oa)},this.options.interval))}return 32};mc.prototype.H=function(a){a.count=this.oc;this.oc=0;this.Oa=void 0};function nc(a,b,c){Sb.call(this,a,b,c);this.nc=null;this.Oa=void 0}ka(nc,Sb);nc.prototype.B={type:"press",Cb:1,time:450,threshold:5};
nc.prototype.Zc=function(a){var b=a.touches.length===this.options.Cb&&a.distance<this.options.threshold;if(b&&a.inputType&1){var c=this;clearTimeout(this.nc);this.Oa=a;this.nc=setTimeout(function(){c.state=8;cc(c,c.Oa)},this.options.time)}else b&&a.inputType&2?this.Oa=a:(clearTimeout(this.nc),this.Oa=void 0);return 32};function D(a,b){return a&&a.classList?a.classList.contains(b):!!(a&&a.className&&(new RegExp("(?:^|\\s+)"+b+"(?:\\s+|$)","gi")).test(a.className))}function E(a,b){a&&(a.classList?a.classList.add(b):D(a,b)||(a.className=((a.className||" ")+" "+b).trim()))}function H(a,b){a&&(a.classList?a.classList.remove(b):D(a,b)&&(a.className=a.className.replace(new RegExp("(?:^|\\s+)"+b+"(?:\\s+|$)","gi")," ").trim()||""),0===a.className.length&&a.removeAttribute("class"))}
function oc(a,b,c){a&&(null!=c?c?E(a,b):H(a,b):a.classList?(a.classList.toggle(b),0===a.className.length&&a.removeAttribute("class")):D(a,b)?H(a,b):E(a,b))}function I(a){return a&&a.parentNode?a.parentNode.removeChild(a):null}function pc(a){return J(a)?Ta(a.childNodes):[]}function qc(a,b){var c=rc(a);if(c.parentNode!==b){for(;c.parentNode!==b;)c=c.parentNode;return rc(c)===rc(a)}return 0===K(c)}function rc(a){return J(a)&&a.firstChild?rc(a.firstChild):a}
function sc(a){return J(a)&&a.lastChild?sc(a.lastChild):a}function tc(a){for(;a.firstChild;)a.removeChild(a.firstChild)}function uc(a,b){var c=a.parentNode;c&&c.replaceChild(b,a);return b}function vc(a){if(a){for(;a.firstChild;)a.parentNode.insertBefore(a.removeChild(a.firstChild),a);I(a)}}function wc(a,b){for(;a.firstChild;)b.appendChild(a.firstChild)}function xc(a){ba?ba.lastIndex=0:ba=new RegExp("<(("+sa.join("|")+")[^\\s/>]*?)>(?![^]*?<\\/\\1>)","gi");return a.replace(ba,"<$1/>")}
function yc(a,b){var c=null;try{if(a&&0<a.length){var d=zc(b||document,"div");a=fb(a).replace(/&nbsp;/gi,"\u00a0");Ac(d)&&(v.log("Before XHTML",a),a=xc(a),v.log("Processed XHTML",a));Bc(d,a);var e=d.ownerDocument.createRange();e.selectNodeContents(d);c=e.extractContents()}}catch(f){}return c}function Cc(a,b){for(var c=b.ownerDocument.createDocumentFragment();a.firstChild;)c.appendChild(a.firstChild);b.appendChild(c)}function Dc(a,b){tc(b);Cc(a,b)}
function Ec(a,b){wc(a,b);a.appendChild(b);return b}function Fc(a,b){b.parentNode.insertBefore(a,b.nextSibling)}function Gc(a,b){z(J(a),"<$>");b=b.toLowerCase();if(L(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);z(J(a),"<$>");z(J(c),"<$>");z(!c.hasChildNodes(),"new node has to be empty <$>");a.parentNode.insertBefore(c,a);wc(a,c);I(a);return c}
function zc(a,b,c,d){a instanceof Document||(a=a.ownerDocument);b=a.createElement(b?b.toString().toLowerCase():"div");if(null!=c)for(var e in c)if(u(e)){var f=c[e];u(f)?b.setAttribute(e,f):v.warn("Provide a string as attribute value",e,f)}if(null!=d)if(u(d))b.innerHTML=d;else if(fa(d))for(c=0;c<d.length;c++)(e=d[c])&&(u(e)?b.appendChild(a.createTextNode(e)):b.appendChild(e));else if(d instanceof Node)b.appendChild(d);else throw"Unsupported type for opt_inner";return b}
function Bc(a,b){a&&(z(J(a),"Expected a HTML element"),a.insertAdjacentHTML?(a.hasChildNodes()&&tc(a),a.insertAdjacentHTML("afterbegin",b)):a.innerHTML=b)}function Hc(a){return null!=a&&null!=a.nodeType?a.innerText:""}function M(a,b,c){return zc(document,a,b,c)}function Ic(){return M("div",{},[M("br")])}
function Jc(a,b){var c;if(a){if(a===b)return null;if(a.previousSibling)a=a.previousSibling;else return(c=a.parentNode)&&c!==b&&1==c.nodeType?c:null}else a=b||document.ownerDocument.documentElement;for(;c=a.lastChild;)a=c;return a}function Mc(a,b){if(!a){if(!b)return null;a=b}var c=a.firstChild;if(c)return c;for(;a&&a!==b;){if(c=a.nextSibling)return c;a=a.parentNode}return null}
function Ac(a){return(a=(a?a.ownerDocument||a:document).documentElement)&&a.nodeName?a.nodeName!==a.nodeName.toUpperCase():!1}function Nc(a){return!(!a||3!==a.nodeType)}function J(a){return!(!a||!a.nodeType||1!==a.nodeType)}function Oc(a,b){return b&&a?!!(a.compareDocumentPosition(b)&8):!1}function Pc(a,b){return b&&a?!!(a.compareDocumentPosition(b)&16):!1}function Qc(a){return!(!a||!a.isEqualNode(document.documentElement)&&!Oc(a,document.documentElement))}
function Rc(a){try{if(a&&(J(a)||(a=a.parentNode),a))return window.getComputedStyle(a)}catch(b){}return null}function Sc(a,b){if(null==a)return null;null==b&&(b=!1);var c,d;b||null!=c?d=c=0:(c=document.body.scrollLeft,d=document.body.scrollTop);return{left:a.left+c,right:a.right+c,top:a.top+d,bottom:a.bottom+d,width:a.width,height:a.height}}
function N(a,b){if(null==a)return null;null==b&&(b=!1);if(null==a.nodeType||!Qc(a)||!a.getClientRects)return null;var c=a.getClientRects();0===c.length&&(c=a.ownerDocument.createRange(),c.selectNode(a),c=c.getClientRects());return 1<=c.length?Sc(c[0],b):null}function Tc(a){return(a=Rc(a))&&a.display?"block"===a.display.toLowerCase():!1}function Uc(a){return!(!a||(-1===pa.indexOf(L(a))||D(a,"en-container"))&&9!==a.nodeType&&11!==a.nodeType)}
function Vc(a,b){var c=a;this.B=function(){a:{var a,e;if(c){if(c.firstChild){c=c.firstChild;break a}if(c!=b){if(a=c.nextSibling){c=a;break a}for(e=c.parentNode;e&&e!=b;e=e.parentNode)if(a=e.nextSibling){c=a;break a}}}c=void 0}return c}}function Wc(a){return!(!a||Uc(a))}function Xc(a,b){return null!=a&&null!=b&&!!(a.compareDocumentPosition(b)&4)}function L(a){return a&&a.tagName?a.tagName.toLowerCase()||void 0||"":""}function Yc(a,b){return a&&a.getAttribute?a.getAttribute(b)||void 0||"":""}
function K(a){for(var b=0;a=a.previousSibling;)b++;return b}function O(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 P(a,b,c){c||(c=document.body);return a===c?null:Q(a,b)?a:(a=a&&a.parentNode)?P(a,b,c):null}function Zc(a,b){return P(a.parentNode,Uc,b)}function Q(a,b){return a&&b?b instanceof Function?b(a):J(a)&&u(b)?a.webkitMatchesSelector(b):!1:!1}function R(a,b){return b?L(a)===b:J(a)}
function S(a){return"br"===L(a)}function $c(a,b){return!0===b?!!P(a,$c):J(a)?"true"===a.contentEditable:!1}function ad(a,b){J(a)&&(a.contentEditable=b?"true":"inherit",b||a.removeAttribute("contenteditable"))}var bd={};function cd(a){var b=bd[a];b?b.lastIndex=0:(b=new RegExp("(^|;)\\s*("+Ya(a)+")\\s*\\:\\s*(.*?)($|;)+","gi"),cd[a]=b);return b}function dd(a){return a&&a.getAttribute?a.B?a.H:a.getAttribute("style"):""}
function ed(a){a&&a.getAttribute&&!a.B&&(a.B=!0,a.H=a.getAttribute?a.getAttribute("style"):"")}function fd(a){if(a&&a.B){var b=a.H;"undefined"!==typeof b&&a.getAttribute("style")!==b&&(null===b||0===b.trim().length?a.removeAttribute("style"):a.setAttribute("style",b));delete a.H;delete a.B}}function gd(a){a&&a.hasAttribute&&a.hasAttribute("style")&&(a.getAttribute("style").trim().length||a.removeAttribute("style"))}
function hd(a,b){var c=dd(a);if(null==c)return null;c=cd(b).exec(c);return null===c?null:c[3].trim()}function id(a,b){var c=dd(a);if(null==c)return"";c=c.replace(cd(b),"$1").trim();if(a.B)return a.H=c;0<c.length?a.setAttribute("style",c):a.removeAttribute("style");return c||""}function T(a,b,c){var d=id(a,b);null!=c&&(d=d.trim(),d.length&&";"!==d[d.length-1]&&(d+=";"),d=d+b+":"+c+";",a.B?a.H=d:a.setAttribute("style",d))}
function nd(a,b){var c=a&&a.getAttribute?a.getAttribute("en-app-data"):"";if(null==c)return null;c=cd(b).exec(c);return null===c?null:c[3].trim()}function od(a,b){var c=a&&a.getAttribute?a.getAttribute("en-app-data"):"";if(null==c)return"";c=c.replace(cd(b),"$1").trim();0<c.length?a.setAttribute("en-app-data",c):a.removeAttribute("en-app-data");return c||""}function pd(a,b,c){var d=od(a,b);null!=c&&(d=d.trim(),d.length&&";"!==d[d.length-1]&&(d+=";"),a.setAttribute("en-app-data",d+b+":"+c+";"))}
function qd(a,b){J(a)&&a.style?(a.style.display=b?"":"none",gd(a)):v.warn("Failed to set visibility on non HTML element",a)}function rd(){var a;a="span";z(u("-evernote-sentoj-emoticon")||!0);return a+'[style*="-evernote-sentoj-emoticon"]'}function sd(a){a=U(rd(),a,!0);return a=a.filter(function(a){return"true"===hd(a,"-evernote-sentoj-emoticon")})}function td(a){for(var b=[];a&&a.parentNode;)b.unshift(a.parentNode),a=a.parentNode;return b}
function U(a,b,c){b||(b=document);try{return Ta(b.querySelectorAll(a),c)}catch(d){throw 0===d.toString().indexOf("Uncaught error in JS: SyntaxError: DOM Exception 12")&&v.error("Wrong syntax in selector:",a),d;}}function ud(a,b){return U(a,b,!0)}function vd(a,b,c){for(;a&&(a=Mc(a,c));)if(Q(a,b))return a;return null}function wd(a,b,c){for(;a&&(a=Jc(a,c));)if(Q(a,b))return a;return null}var xd=/^[\t\n\r ]+$/;function yd(a){xd.lastIndex=0;return Nc(a)&&(""===a.data||xd.test(a.data))}
function zd(a,b){var c=M("div",{style:"position: absolute; width: 1px; height: 1px; top: -9999px; left: -9999px;"});c.appendChild(a);document.body.appendChild(c);b(a);I(a);I(c)}function Ad(a,b,c){c=c||document.body;var d;if(!Oc(a,c)){do if(J(a)&&a.hasAttribute("style")&&(d=a.style[b],null!=d))break;while((a=a.parentNode)&&c===a)}return d||""}
function Bd(a,b,c){c=c||document.body;b=b||0;a=a||0;if(0===b)c.scrollTop=a;else{var d=c.scrollTop,e=a-d,f=0,g=function(){f+=20;var a;a=f;a/=b/2;1>a?a=e/2*a*a+d:(a--,a=-e/2*(a*(a-2)-1)+d);c.scrollTop=a;f<b&&window.setTimeout(g,20)};g()}}function Cd(a,b){if(!J(a))return!1;var c=a.getBoundingClientRect();return Dd(c.top,c.bottom,b)}
function Dd(a,b,c){var d=window.scrollY,e=d+window.innerHeight;null==c&&(c=55);a+=d;b+=d;d=Math.max(d,a);e=Math.min(e,b);return Math.max(0,Math.round((e-d)/(b-a)*100))>=c}var Ed=new Db;function Fd(a,b){var c=Ed.get(a);c||(c={},Ed.set(a,c));b&&!c.id&&(c.id=yb().toString());return c}function Gd(a,b){var c=a.id||Fd(a,!0).id;return b+"@"+c}function Hd(a){return null==a?a:0<a.children.length?a.children[a.children.length-1]:null};function Id(a,b,c,d){try{var e=document.createRange();null!=a&&(e.setStart(a||null,b||0),null!=c?e.setEnd(c||null,d||0):e.setEnd(a||null,b||0));return e}catch(f){}return null}function Jd(a,b){if(a&&(!b||Kd(a,b))&&a){var c=window.getSelection();null!=c&&(c.setBaseAndExtent?c.setBaseAndExtent(a.startContainer,a.startOffset,a.endContainer,a.endOffset||0):(c.removeAllRanges(),c.addRange(a)))}}
function W(a){var b=window.getSelection();if(1>b.rangeCount)return null;b=b.getRangeAt(0);return a&&b&&!Kd(b,a)?null:b?b.cloneRange():null}function Ld(a){var b=document.createRange();b.selectNode(a);Jd(b)}function Md(){window.getSelection().removeAllRanges()}function Kd(a,b){return(a.startContainer===b||Oc(a.startContainer,b))&&(a.endContainer===b||Oc(a.endContainer,b))}function Nd(a,b,c){if(!a)return null;var d;return(d=P(Od(a),b,c))?d:a.collapsed?null:P(Pd(a),b,c)}
function Od(a){return a?Nc(a.startContainer)?a.startContainer:a.startContainer.childNodes[a.startOffset]||a.startContainer:null}function Pd(a){return a?Nc(a.endContainer)?a.endContainer:a.endContainer.childNodes[a.endOffset]||a.endContainer.lastChild||a.endContainer:null}function Qd(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 Rd(a){return a?{startContainer:a.startContainer,startOffset:a.startOffset,endContainer:a.endContainer,endOffset:a.endOffset,collapsed:a.collapsed}:null}function Sd(a){if(!a)return null;try{var b=Id(a.startContainer,a.startOffset,a.endContainer,a.endOffset)}catch(c){b=null}return b}
function Td(a,b){function c(a,c){var b=document.createNodeIterator(d,window.NodeFilter.SHOW_TEXT,null,!1),e;for(a=Math.max(0,c?a:a-1);0<=a&&(e=b.nextNode());)a-=e.length;return e?{Ua:e,offset:a+e.length+(c?0:1)}:null}var d=b||a.root||document.body,e=a.hasOwnProperty("len")?a.len:a.end-a.start,f=a.start,e=a.hasOwnProperty("end")?a.end:f+e,g=c(f,!0),h=g;f!==e&&(h=c(e,!1));return g&&h?Id(g.Ua,g.offset,h.Ua,h.offset):null}
function Ud(a,b){if(!a||a.collapsed)return[];for(var c=[],d=a.commonAncestorContainer,e=a.startContainer;e&&a.intersectsNode(e);e=Mc(e,d))b&&!Q(e,b)||c.push(e);return c}function Vd(a){a=a.getClientRects();return 0<a.length?a[0]:null}
function Wd(a){if(null==a)return null;var b=Vd(a);if(null==b||a.collapsed){if(!Qc(a.startContainer))return null;var c=a.cloneRange();Nc(c.startContainer)&&(0<c.startOffset&&c.setStart(c.startContainer,c.startOffset-1),b=Vd(c),!b&&c.startOffset<O(c.startContainer)-1&&(c=a.cloneRange(),c.setEnd(c.startContainer,c.startOffset+1),b=Vd(c)));if(!b)for(a=Od(a);a&&a!==document.body;){if(a.getClientRects&&(c=a.getClientRects(),0<c.length)){b=c[0];break}a=a.parentNode}if(!b)return null}return Sc(b)}
function Xd(a,b){if(null!=a){var c=document.body.scrollTop,d=window.innerHeight,e;e=c+d;var f;if(f=(f=Yd.env)&&null!=f.editorInset?f.editorInset:{top:0,bottom:0,left:0,right:0})0!==f.top&&(c+=f.top),0!==f.bottom&&(e-=f.bottom);var g=null==a.nodeType?Wd(a):N(a);if(null!=g){var h=Math.min(24,d/12);b&&b.offsetTop&&(h=b.offsetTop);var l=h/2,m=null;g.bottom+l>e?m=Math.max(0,g.bottom-d+h):g.top-l<c&&(m=Math.max(0,g.top-h));null!=m&&(m!==f.top||0===f.top&&0===m)&&(document.body.scrollTop=m)}}}
function Zd(a,b){var c=document.body,d=Td(a,b);if(!d)return null;d=d.getClientRects();if(null===d||0===d.length)return null;for(var e=[],f=0;f<d.length;f++){var g={},h=d[f];g.top=h.top+c.scrollTop;g.bottom=h.bottom+c.scrollTop;g.left=h.left+c.scrollLeft;g.right=h.right+c.scrollLeft;g.width=h.right-h.left;g.height=h.bottom-h.top;h=e.length-1;if(-1<h&&e[h].left<=g.right&&g.left<=e[h].right&&e[h].top<=g.bottom&&g.top<=e[h].bottom){var l={};l.top=Math.max(e[h].top,g.top);l.bottom=Math.min(e[h].bottom,
g.bottom);l.left=e[h].left;l.right=g.right;l.width=l.right-l.left;l.height=l.bottom-l.top;e[h]=l}else e.push(g)}return e}function $d(a,b,c){if(b&&(b=P(a,b,c),null!==b))return b;for(;Nc(a);)a=a.parentNode;return a}function ae(a,b,c){var d=Od(a);a=Pd(a);d=$d(d,b,c);a=$d(a,b,c);if(d===a)return[d,a];b=td(d);c=td(a);if(b[0]!==c[0])return[d,a];for(var e=0;e<b.length&&e<c.length&&b[e]===c[e];e++);d=[d,a];e<b.length&&(d[0]=b[e]);e<c.length&&(d[1]=c[e]);return d}
Range.prototype.intersectsNode||(v.warn("Range.intersectsNode has been added by polyfill!"),Range.prototype.intersectsNode=function(a){var b=a.ownerDocument.createRange();try{b.selectNode(a)}catch(c){b.selectNodeContents(a)}return-1===this.compareBoundaryPoints(Range.END_TO_START,b)&&1===this.compareBoundaryPoints(Range.START_TO_END,b)});function ie(a,b,c){c||(c=a);c=new Vc(a,c);do if(!b(a))return!1;while(a=c.B());return!0}function je(a){return!(!a||!a.nodeType||3===a.nodeType||-1==="img embed object input param hr".split(" ").indexOf(L(a))&&!D(a,"en-media")&&!D(a,"en-module"))}function ke(a){var b=0;return ie(a,function(a){return!(Nc(a)&&!yd(a)||S(a)&&1<++b||je(a))})}
function le(a){var b=0;return ie(a,function(a){var d=!(a&&a.nodeType&&3!==a.nodeType&&"li"===L(a)),e=!je(a);S(a)&&(b+=1);var f=!(1<b);a=/^[ \t\n\r]*$/g.test(a.textContent||"");return d&&e&&f&&a})}function me(a){return ie(a.firstChild,function(a){return!(a&&!sb(a.textContent))&&!je(a)},a)};function X(a){a.preventDefault();a.stopPropagation();return!1}var ne={};function oe(){var a;a="onmouseenter";if(null!=ne[a])return ne[a];var b=M({select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"}[a]||"div"),c=a in b;c||(b.setAttribute(a,"return;"),c="function"===typeof b[a]);return ne[a]=c};var pe={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",
darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",
ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",
lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",
moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",
seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};
function qe(a){var b={};a=String(a);var c="#"==a.charAt(0)?a:"#"+a;if(re(c))return b.Nc=se(c),b.type="hex",b;a:{var d=a.match(te);if(d){var c=Number(d[1]),e=Number(d[2]),d=Number(d[3]);if(0<=c&&255>=c&&0<=e&&255>=e&&0<=d&&255>=d){c=[c,e,d];break a}}c=[]}if(c.length){a=c[0];e=c[1];c=c[2];a=Number(a);e=Number(e);c=Number(c);if(isNaN(a)||0>a||255<a||isNaN(e)||0>e||255<e||isNaN(c)||0>c||255<c)throw Error('"('+a+","+e+","+c+'") is not a valid RGB color');b.Nc="#"+ue(a.toString(16))+ue(e.toString(16))+
ue(c.toString(16));b.type="rgb";return b}if(pe&&(c=pe[a.toLowerCase()]))return b.Nc=c,b.type="named",b;throw Error(a+" is not a valid color string");}var ve=/#(.)(.)(.)/;function se(a){if(!re(a))throw Error("'"+a+"' is not a valid hex color");4==a.length&&(a=a.replace(ve,"#$1$1$2$2$3$3"));return a.toLowerCase()}var we=/^#(?:[0-9a-f]{3}){1,2}$/i;function re(a){we.lastIndex=0;return we.test(a)}var te=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;
function ue(a){return 1==a.length?"0"+a:a}function xe(a){if("currentcolor"===a.toLowerCase())return null;try{var b=qe(a),c;if(b.Nc){var d=b.Nc,d=se(d);c="rgb("+[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16)].join(", ")+")"}else c=null;return c}catch(e){return null}}function ye(a){try{var b=qe(a);if(b.Nc)return b.Nc}catch(c){}return null};function ze(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.lb||(Math.lb=function(a,b){return ze("round",a,b||0)});Math.wh||(Math.wh=function(a,b){return ze("floor",a,b||0)});Math.ph||(Math.ph=function(a,b){return ze("ceil",a,b||0)});var Ae=/^(\-?\d*\.?\d*)(px|em|\%|pt)?$/,Be=0,Ce=0;
function De(a){var b=null;if("number"===typeof a)b={wc:"px",value:a,ec:a.toString(),re:a||null};else{Ae.lastIndex=0;var c=Ae.exec(a);c&&(b={wc:c[2]||"px",value:parseFloat(c[1]),ec:c[1],re:a||null})}return b}
function Ee(a){a=a||document.body;a=Rc(a);Be=De(a.fontSize).value;z(!!Be,"Did not find base font size",Be,a.fontSize);a=M("div",{style:"height: 100pt; left: -100%; position: absolute; top: -100%; width: 100pt; "});document.body.appendChild(a);Ce=a.offsetHeight/100;z(!!Ce,"Did not find pt ratio",Ce);I(a)}
function Fe(a,b,c){var d=a||null;if(u(a)){var e=De(a);e?(a=e.value,c=e.wc):a=null}b||(b="px");if(!a)return{wc:b,value:0,ec:"0",re:d,kd:c};c||(c="px");if(c===b)return a=Math.lb(a),{wc:b,value:a,ec:a+b,re:d,kd:c};"px"===c&&"px"===b||z(0<Be,"en.unit.init needs to get called first!");"px"===c?"em"===b?a=Math.lb(a/Be):"%"===b?a=Math.lb(100*a/Be):"pt"===b&&(a=Math.lb(a/Ce)):"pt"===c?"em"===b?a=Math.lb(a*Ce/Be):"%"===b?a=Math.lb(100*a*Ce/Be):"px"===b&&(a=Math.lb(a*Ce)):"%"===c?"em"===b?a=Math.lb(a/100):
"pt"===b?a=Math.lb(a*Be/(100*Ce)):"px"===b&&(a=Math.lb(a*Be/100)):z(!1,"Not implemented yet",c,"=>",b);return{wc:b,value:a,ec:a+b,re:d,kd:c}};function Ge(a,b){null==a&&(a=document.body);for(var c=a,d=b.length-1;0<=d;d--){var e=b[d];e>O(c)&&(e=O(c)-1);c=c.childNodes[e]}return c}function He(a,b){var c=[];null==b&&(b=document.body);for(;a&&a.parentNode&&a!==b;){for(var d=0,e=a.parentNode.childNodes,f=0;f<e.length;f++)if(e[f]===a){d=f;break}c.push(d);a=a.parentNode}return c}
function Ie(a,b,c){for(var d=[];1==b.nodeType;){var e=b.childNodes[c];if(!e&&!b.lastChild)break;e?(b=e,c=0):(b=b.lastChild,c=O(b))}b=c={node:b,offset:c};if(3==b.node.nodeType)for(c=b.node.previousSibling;c&&3==c.nodeType;c=c.previousSibling)b.offset+=O(c);else c=b.node.previousSibling;e=b.node.parentNode;b.node=c?c.nextSibling:e.firstChild;c=b;for(b=c.node;b&&b.parentNode&&b!==a;){for(var f=e=0,g=b.parentNode.childNodes,h=0;h<g.length;h++){var l=g[h];3!==l.nodeType&&0<f&&(++e,f=0);if(l===b)break;
3===l.nodeType?f+=O(l):++e}d.push(e);b=b.parentNode}return{path:d,offset:c.offset}}function Je(a,b,c){null==a&&(a=document.body);var d="";b&&(c?(c=Ie(a,b.startContainer,b.startOffset),a=Ie(a,b.endContainer,b.endOffset),d={startPath:c.path,startOffset:c.offset,endPath:a.path,endOffset:a.offset,collapsed:b.collapsed}):d={startPath:He(b.startContainer,a),startOffset:b.startOffset,endPath:He(b.endContainer,a),endOffset:b.endOffset,collapsed:b.collapsed});return JSON.stringify(d)}
function Ke(a,b){null==a&&(a=document.body);if(!b)return null;var c=JSON.parse(b),d;if(c&&c instanceof Object)a:{var e=a;null==e&&(e=document.body);if(void 0===e||!c)throw"All arguments required";try{var f=Ge(e,c.startPath),g=Ge(e,c.endPath);if(!f||!g){d=null;break a}var h=Id(f,c.startOffset,g,c.endOffset);c.collapsed&&h.collapse(!0);d=h;break a}catch(l){v.error("Exception <$>",l.toString())}d=null}else d=null;return d}
function Le(a,b){null==a&&(a=document.body);var c=W(a);return c?Je(a,c,b):null}function Me(a,b){null==a&&(a=document.body);Le(a);if(b){var c=Ke(a,b);c&&Jd(c)}};function Ne(){var a=this;a.name="observer";var b=null,c={};a.ff=function(a,b,f){var g=yb().toString();c[g]={name:g,wf:a,G:b,S:f||La,xc:new Db}};a.A=function(){var a,e,f,g=Object.keys(c);for(a=0;a<g.length;a++){var h=c[g[a]],l=U(h.wf,b);for(e=0;e<l.length;e++){var m=l[e];h.xc.has(m)||(f=h.G(m),h.xc.set(m,f))}m=h.xc;for(e=m.wa.length-1;0<=e;e--){var p=m.wa[e];-1===l.indexOf(p)&&(f=m.sb[e],h.S(p,f),f=m,p=e,f.wa.splice(p,1),f.sb.splice(p,1))}}};a.G=function(c){b=B(c,{root:null}).root||a.H("context").root;
a.D.H("execcommand",a.A.bind(a));a.D.listener(document,"input",a.A.bind(a));a.D.ka(b,"contentReady",a.A.bind(a),-1)};a.S=function(){b=null}};function Oe(a){function b(a,b,c){this.Ig=a;this.uh=b;this.title=c||null}z(this instanceof Oe,"Use `new` to instantiate this class");var c=[],d=[],e=a&&a.maxLength||0;this.Pa=function(a,g,h){if(a)if(g){if(a=new b(a,g,h),d=[],a.Ig(),c.push(a),1<e)for(;c.length>e;)c.shift()}else throw"UndoRedo.do missing required parameter 'down'.";else throw"UndoRedo.do missing required parameter 'up'.";};this.register=function(a,g,h){if(a)if(g){if(a=new b(a,g,h),d=[],c.push(a),1<e)for(;c.length>e;)c.shift()}else throw"UndoRedo.do missing required parameter 'down'.";
else throw"UndoRedo.do missing required parameter 'up'.";};this.J=function(){return 0<c.length};this.C=function(){return 0<d.length};this.O=function(){return c&&0!==c.length?c[c.length-1].title:null};this.H=function(){return d&&0!==d.length?d[d.length-1].title:null};this.A=function(){var a=c.pop();return a?(a.uh(),d.push(a),!0):!1};this.B=function(){var a=d.pop();return a?(a.Ig(),c.push(a),!0):!1};this.clear=function(){c=[];d=[]}};function Pe(){function a(a,b,c){c=c||M("div");c.setAttribute("data-en-overlay-id",a);c.setAttribute("data-en-layout-algorithm",b);hd(c,"z-index")||T(c,"z-index","900");T(c,"position","absolute");h.appendChild(c);return c}function b(a,b){d.wb(b).forEach(function(a){d.detach(a)});null!=g[b]&&delete g[b];Ed.remove(a)}function c(){for(var a=Object.keys(f),c=0;c<a.length;c++){for(var d=f[a[c]],n=U(d.wf,e),h=0;h<n.length;h++){var g=n[h];if(!d.xc.has(g)){var l={id:Fd(g,!0).id};d.xc.set(g,l);d.G(g,l)}}for(var g=
[],A=d.xc,h=A.wa.length-1;0<=h;h--){var G=A.wa[h];if(-1===n.indexOf(G)){l=A.sb[h];d.S(G,l);var C=A,x=h;C.wa.splice(x,1);C.sb.splice(x,1);g.push([G,l.id])}}for(h=g.length-1;0<=h;h--)b.apply(this,g[h])}}var d=this;d.name="layer";var e=null,f={},g={},h=null,l=!1;d.A={};d.A.cover=function(a,b){var c=N(a);b.style.top=c.top+"px";b.style.left=c.left+"px";b.style.width=c.width+"px";b.style.height=c.height+"px"};d.A.anchor=function(a,b){var c=N(a);b.style.top=c.top+"px";b.style.left=c.left+"px"};d.A.bottomRightCorner=
function(a,b){var c=N(a),d=document.documentElement.clientWidth-c.right;b.style.bottom=document.documentElement.clientHeight-c.bottom+"px";b.style.right=d+"px"};d.A.bottomLeftCorner=function(a,b){var c=N(a);b.style.bottom=document.documentElement.clientHeight-c.bottom+"px";b.style.left=c.left+"px"};d.A.bottomRightResizeHandle=function(a,b){var c=N(a),d=document.documentElement.clientWidth-c.right-4;b.style.bottom=document.documentElement.clientHeight-c.bottom-4+"px";b.style.right=d+"px"};d.A.bottomLeftResizeHandle=
function(a,b){var c=N(a),d=c.left-4;b.style.bottom=document.documentElement.clientHeight-c.bottom-4+"px";b.style.left=d+"px"};d.A.rightEdge=function(a,b){var c=Math.floor(N(b).width/2),d=N(a),c=document.documentElement.clientWidth-d.right-c,e=document.documentElement.clientHeight-d.bottom;b.style.top=d.top+"px";b.style.right=c+"px";b.style.bottom=e+"px"};d.A.leftEdge=function(a,b){var c=Math.floor(N(b).width/2),d=N(a),c=d.left-c,e=document.documentElement.clientHeight-d.bottom;b.style.top=d.top+"px";
b.style.left=c+"px";b.style.bottom=e+"px"};d.A.tableColumnEdge=function(a,b){d.A.rightEdge(a,b);var c=P(a,"table"),c=document.documentElement.clientHeight-N(c).bottom;b.style.bottom=c+"px"};d.A.textRangeMatch=function(a,b){var c={start:parseInt(b.getAttribute("data-en-overlay-textfrom"),10),end:parseInt(b.getAttribute("data-en-overlay-textto"),10)},f=Zd(c,a);if(!f)return null;var g=parseInt(b.getAttribute("data-en-overlay-matchoffset"),10);isNaN(g)&&(g=0);var l=f[0];g<f.length&&(l=f[g]);b.style.display=
"";b.style.top=l.top+"px";b.style.left=l.left-1+"px";b.style.right=l.right-1+"px";b.style.bottom=l.bottom+"px";b.style.width=l.width+2+"px";b.style.height=l.height+"px";c=U('div[data-en-overlay-textfrom="'+c.start+'"]',h);if(c.length<f.length)for(g=c.length;g<f.length;g++)c=b.cloneNode(!0),c.setAttribute("data-en-overlay-matchoffset",g.toString()),d.fc(e,"textRangeMatch",c);else g>=f.length&&d.detach(b)};d.ff=function(a,b,c){var d=yb().toString();f[d]={name:d,wf:a,G:b,S:c||La,xc:new Db}};d.kg=function(){return h};
d.C=function(a){return a.getAttribute("data-en-layout-algorithm")};d.wb=function(a){var b="";if(null==a)b="[data-en-overlay-id]";else if("string"===typeof a)b='[data-en-overlay-id="'+a+'"]';else if(a instanceof Element){a=Fd(a).id;if(null==a)return[];b='[data-en-overlay-id="'+a+'"]'}else return[];return U(b,h)};d.getParent=function(a){return(a=g[a])&&a.node||null};d.fg=function(a){if(a){var c=a.getAttribute("data-en-overlay-id");if(null!=c){var e=d.getParent(c);if(null==e)d.detach(a);else if(Qc(e)){if(c=
d.C(a),null!=c&&"undefined"!==typeof d.A[c])d.A[c](e,a)}else b(e,c)}}};d.Pb=function(a){!0===a&&(l=!0);l&&c();a=d.wb();for(var b=0;b<a.length;b++)d.fg(a[b])};d.fc=function(b,c,e){c=c||"cover";z("undefined"!==typeof d.A[c],"Invalid layout algorithm:",c);z(J(b),"Expected a node!");var f=Fd(b,!0).id;z(!!f&&u(f),"Expected an ID");f in g?++g[f].$a:g[f]={node:b,$a:1};e=a(f,c,e);d.A[c](b,e);return e};d.Qg=function(b,c){var e;e="textRangeMatch";z("undefined"!==typeof d.A[e],"Invalid layout algorithm:",e);
z(J(b),"Expected a node!");var f=Fd(b,!0).id;z(!!f&&u(f),"Expected an ID");f in g?++g[f].$a:g[f]={node:b,$a:1};for(var h=0;h<c.length;h++)c[h]=a(f,e,c[h]);for(h=0;h<c.length;h++)d.A[e](b,c[h])};d.Pg=function(a){h.appendChild(a)};d.detach=function(a){var b=a.getAttribute("data-en-overlay-id"),c=g[b];c&&0>=--c.$a&&delete g[b];I(a);return b};d.$d=function(a,b,c,e,f){var h=!0;null==h&&(h=!1);var g=!1,l,G,C,x,F=M("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==f?"":f)});d.D.listener(a,"mousedown",function(a){g=!0;l=a.pageX;G=a.pageY;C=a.pageX;x=a.pageY;!0===h&&d.kg().appendChild(F);null!=b&&b()});d.D.listener(window,"mousemove",function(a){if(!1!==g){C=a.pageX;x=a.pageY;a=C-l;var b=x-G;null!=c&&c(a,b)}});d.D.listener(window,"mouseup",function(a){if(!1!==g){g=!1;C=a.pageX;x=a.pageY;a=C-l;var b=x-G;!0===h&&I(F);null!=e&&e(a,b)}})};d.G=function(a){e=B(a,{root:null}).root||d.H("context").root;h=document.querySelector("#en-tools");h||(h=M("div",{"class":"en-tools",
id:"en-tools"}),document.body.appendChild(h));z(J(e));z(J(h));d.D.listener(window,"resize",d.Pb.bind(d,!1));d.D.H("execcommand",d.Pb.bind(d,!0));d.D.listener(document,"input",d.Pb.bind(d,!0));d.Pb(!0)};d.S=function(){d.wb().forEach(function(a){d.detach(a)});e=null}};function Qe(a){return Q(a,"img:not(.en-object-placeholder)")?!0:!1};function Re(){function a(a){b(a.target)}function b(a){mb(l.wb(a),function(a){D(a,"img-resizer-handle")&&l.detach(a)})}function c(a){d(a.target)}function d(a){if(Qe(a))if(1!==n.length)U(".img-resizer-handle",l.kg()).forEach(function(a){a=l.getParent(a);b(a)});else{var c=!1;mb(l.wb(a),function(a){if(D(a,"img-resizer-handle"))return c=!0,nb});if(!0!==c){var d=m.ig(a),f=d===a.naturalWidth;if(!(142>=d)){var h=e(a),g="right"===e(a)?"bottomLeftResizeHandle":"bottomRightResizeHandle",x=l.fc(a,g);T(x,"z-index",
"901");E(x,"img-resizer-handle");E(x,g);var F;"bottomRightResizeHandle"===g?F="cursor: nwse-resize;":"bottomLeftResizeHandle"===g&&(F="cursor: nesw-resize;");var ga=function(){T(a,"height","auto");var b=N(a);id(a,"width");a.setAttribute("width",b.width)},Y=N(a);l.$d(x,function(){null!=r&&v.warn("Multiple images being resized at once! <$>");r=a;ga()},function(b){var c,e=N(p).width;"right"===h?c=Y.width-b:c="center"===h?Y.width+2*b:Y.width+b;142>=c?a.setAttribute("width","142"):c>=e||c>=d?(a.removeAttribute("width"),
!1===f&&(m.og(a),ga())):a.setAttribute("width",""+c);l.Pb()},function(){r=null;Y=N(a);Se(p,"setDirty",{pd:!0});Ld(a)},F)}}}}function e(a){a=(a=Rc(a))?a.textAlign:null;return"center"===a?"center":"right"===a?"right":"justify"===a?"full":"left"}function f(a){Q(a.target,"img:not(.en-object-placeholder)")&&Ld(a.target)}function g(a){!1!==!!a.getAttribute("data-en-img-selected")&&(a.removeAttribute("data-en-img-selected"),mb(l.wb(a),function(a){D(a,"img-selected-overlay")&&l.detach(a)}))}var h=this,l=
null,m=null,p=null;h.name="ui-img-resize";var r,n=[];h.G=function(){p=h.H("context").root;E(p,"en-ui-img-on");l=h.H("layer");m=h.H("img-dpi");h.D.ka(p,"imageSelected",c);h.D.ka(p,"imageUnselected",a);h.D.listener(p,"click",f);h.D.ka(p,"selectionChanged",function(){if(0!==p.getElementsByTagName("img").length){var a=U("img:not(.en-object-placeholder)",p);n=[];if(0!==a.length){var b=window.getSelection();b.isCollapsed||mb(a,function(a){b.containsNode(a,!1)&&-1===n.indexOf(a)&&n.push(a)});mb(a,function(a){if(!b.isCollapsed&&
b.containsNode(a,!1)){if(!a.getAttribute("data-en-img-selected")&&Qe(a)){a.setAttribute("data-en-img-selected","true");var c=l.fc(a);E(c,"img-selected-overlay");var d=M("div",{"class":"img-selected-overlay-top-left-corner"}),e=M("div",{"class":"img-selected-overlay-top-right-corner"}),f=M("div",{"class":"img-selected-overlay-bottom-left-corner"}),h=M("div",{"class":"img-selected-overlay-bottom-right-corner"}),n=M("div",{"class":"img-selected-overlay-right-edge"}),m=M("div",{"class":"img-selected-overlay-left-edge"});
c.appendChild(d);c.appendChild(e);c.appendChild(f);c.appendChild(h);c.appendChild(n);c.appendChild(m)}Se(p,"imageSelected",{target:a})}else r!==a&&(g(a),Se(p,"imageUnselected",{target:a}))})}}})};h.S=function(){H(p,"en-ui-img-on");U("img:not(.en-object-placeholder)",p).forEach(function(a){g(a);b(a)});m=l=p=null}};function Te(){function a(){h=[];l=[];b()}function b(){mb(f.wb(g),function(a){D(a,"find-result")&&f.detach(a)})}function c(b,c){l!==b&&(a(),l=b);if(0===h.length){for(var e=document.createDocumentFragment(),r=b.length;r--;)for(var p=b[r],G=0;G<p.length;G++)h.push(d(e,p[G],G));f.Pg(e)}f.Qg(g,h);m&&D(m,"find-result-active")&&H(m,"find-result-active");h[c]&&(m=e=h[c],D(e,"find-result-active")||E(e,"find-result-active"),Xd(e,g))}function d(a,b,c){return zc(a,"div",{"class":"find-result","data-en-overlay-textfrom":b.from.toString(),
"data-en-overlay-textto":b.to.toString(),"data-en-overlay-matchoffset":c.toString()})}var e=this,f=null,g=null,h=[],l=[],m=null,p=null,r=null;e.name="ui-find";e.G=function(){g=e.H("context").root;f=e.H("layer");e.D.H("findChanged",function(a){c(a.items,a.selected);p||(p=e.D.ka(g,"selectionChanged",function(){e.D.remove(p);p=null;Nb("findClear")}));r||(r=e.D.ka(g,"setDirty",function(){e.D.remove(r);r=null;Nb("findContentChanged")}))});e.D.H("findClear",a)}};function Ue(a,b){var c=a.tagName?a.tagName:"x"+a.nodeType;b[c]||(b[c]=0);b[c]++;return c+b[c]}
function Ve(a,b,c,d,e,f){for(var g=[],h=[],l={},m={},p=0,r=b.length;p<r;p++){var n=b[e?b.length-p-1:p],q=d.childNodes[e?d.childNodes.length-c[p]-1:c[p]],y=n.id?n.id:Ue(n,m);if(!l[y]){var t=a[y];t?(t!==q&&(q=e?d.childNodes.length-t.dd-1:t.dd,g.push({action:"moveChildElement",element:t,baseIndex:f+">"+q,sourceIndex:f+">"+p}),c.splice(p,0,c.splice(q,1)[0])),n.isEqualNode(t)||h.push([n,t])):(n=n.cloneNode(!0),q=e?b.length-p-1:p,g.push({action:"insertChildElement",element:n,baseIndex:f+">"+q,sourceIndex:f+
">"+q}));l[y]=!0}}p=0;for(r=d.childNodes.length;p<r;p++)a=d.childNodes[p],l[a.Of]||g.push({action:"removeChildElement",element:a,baseIndex:f+">"+a.dd,sourceIndex:null});return{compare:h,diff:g}}function We(a,b){return 0===a.baseIndex.indexOf(b.baseIndex)&&a.baseIndex!==b.baseIndex}
function Xe(a,b){if(!b||!a.childNodes||0===a.childNodes.length)return null;for(var c={},d=b.split(">"),e=!0,f="",g=1,h=d.length;g<h;g++){var l=parseInt(d[g],10);if(a.childNodes&&a.childNodes.length>l)a=a.childNodes[l];else{f=d.slice(0,g-1).join(">");e=!1;break}}c.lastParent=e?a.parentNode:a;c.lastParentIndex=e?b.slice(0,b.lastIndexOf(">")):f;c.node=e?a:null;c.found=e;return c}
function Ye(a,b,c){var d=[];if(a.isEqualNode(b))return d;null==c&&(c="0");if(3===a.nodeType&&3===b.nodeType)return b.nodeValue!==a.nodeValue&&d.push({action:"replaceText",element:b,baseIndex:c,sourceIndex:c,_deleted:b.nodeValue,_inserted:a.nodeValue}),d;if(a.attributes&&b.attributes){for(var e=a.attributes,f,g,h=0,l=e.length;h<l;h++){f=e[h].nodeValue;g=e[h].nodeName;var m=b.getAttribute(g);m!==f&&(null===m?d.push({action:"setAttribute",name:g,element:b,baseIndex:c,sourceIndex:c,_inserted:f}):d.push({action:"setAttribute",
name:g,element:b,baseIndex:c,sourceIndex:c,_deleted:m,_inserted:f}))}e=b.attributes;h=0;for(l=e.length;h<l;h++)g=e[h].nodeName,null===a.getAttribute(g)&&d.push({action:"removeAttribute",name:g,baseIndex:c,sourceIndex:c,_deleted:b.getAttribute(g)})}e=[];if(a.childNodes&&b.childNodes){h=b.childNodes;l={};e={};g=[];for(var m=0,p=h.length;m<p;m++){f=h[m];var r=f.id?f.id:Ue(f,e);l[r]=f;f.dd=m;f.Of=r;g.push(m)}l={map:l,indices:g};a=a.childNodes;h=l.map;e=l.indices;l=Ve(h,a,e.slice(0),b,!1,c);1<l.diff.length&&
(b=Ve(h,a,e.slice(0),b,!0,c),b.diff.length<l.diff.length&&(l=b));d=d.concat(l.diff);e=l.compare}if(0<e.length)for(h=0,l=e.length;h<l;h++)b=e[h][1],a=Ye(e[h][0],b,c+">"+b.dd),0<a.length&&(d=d.concat(a)),delete b.dd,delete b.Of;return d}
function Ze(a,b){if(a.sourceIndex===b.sourceIndex)return 0;if(!a.sourceIndex&&b.sourceIndex)return-1;if(a.sourceIndex&&!b.sourceIndex)return 1;for(var c=a.sourceIndex.split(">"),d=b.sourceIndex.split(">"),e=0;e<c.length&&e<d.length;){var f=parseInt(c[e],10),g=parseInt(d[e],10);if(f===g)e++;else return isNaN(f)||isNaN(g)?isNaN(f)?1:-1:f>g?1:-1}return 0}
function $e(a,b,c){for(var d=[],e=[],f=[],g=[],h=0,l=a.length;h<l;h++){var m=a[h],p=m.action,r=m.baseIndex,n=m.sourceIndex,q=m._baseReference,y=m._sourceReference;if(m._conflict)m._baseReference=Xe(b,r),n&&r!==n&&(m._sourceReference=Xe(b,n)),g.push(m);else{var t=q;if(null==t&&(t=Xe(b,r),null==t)){d.push(m);continue}q=t.node;t.found?null!==q&&("moveChildElement"===p||"insertChildElement"===p?(t=q,n!==r&&(r=y,null==r&&(r=Xe(b,n)),t=null!==r?r.node:null),"moveChildElement"===p?e.push([q.parentNode,q,
t,m]):c?(n=document.createElement("ins"),n.appendChild(m.element),e.push([q.parentNode,n,t,m])):e.push([q.parentNode,m.element,t,m])):"removeChildElement"===p?(c&&(p=document.createElement("del"),p.appendChild(q.cloneNode(!0)),e.push([q.parentNode,p,null,m,!0])),f.push([q.parentNode,q])):"replaceText"===p?c?(r=q.parentNode,p=document.createElement("del"),p.appendChild(document.createTextNode(m._deleted)),n=document.createElement("ins"),n.appendChild(document.createTextNode(m._inserted)),e.push([r,
n,q,m]),e.push([r,p,q,m]),q.nodeValue=""):q.nodeValue=m._inserted:"setAttribute"===p?q.setAttribute(m.name,m._inserted):"removeAttribute"===p&&q.removeAttribute(m.name)):"insertChildElement"===p?(q=t.lastParent,c?(n=document.createElement("ins"),n.appendChild(m.element),e.push([q,n,null,m])):e.push([q,m.element,null,m])):d.push(m)}}e.sort(function(a,b){return Ze(a[3],b[3])});a=0;for(b=e.length;a<b;a++)n=e[a],c=n[0],h=n[1],l=n[2],m=n[3],n=n[4],null===l&&!n&&(n=m.sourceIndex)&&(m=parseInt(n.substr(n.lastIndexOf(">")+
1,n.length),10),c.childNodes&&c.childNodes.length>m&&(l=c.childNodes[m])),c.insertBefore(h,l);for(a=0;a<f.length;a++)m=f[a],m[0].removeChild(m[1]);for(f=[];0<g.length;)m=g.pop(),e={},e[m._owner]=m,m._conflictedWith&&(n=m._conflictedWith)&&(a=g.indexOf(n),-1<a&&(g.splice(a,1),e[n._owner]=n),delete m._conflictedWith,delete n._conflictedWith),f.push(e);return{unapplied:d,conflicts:f}};function af(a,b){b=b||{};b.version="1.0";window.evernoteClient&&window.evernoteClient.postNotification&&window.evernoteClient.postNotification(a,JSON.stringify(b))}function bf(a,b){b=b||{};b.module=a||"";af("contentChanged",b)}function cf(a,b){var c=N(a,!0);af(b,{left:c.left,top:c.top,width:c.width,height:c.height})}function df(a,b){b=b||{};b.module=a||"";af("focusChanged",b)}function ef(){af("contentLoaded",{module:"content"})}function ff(a){af("titleBlur",{module:a||"title"})}
function gf(a,b,c){c=c||{};c.href=a;c.module=b||"";af("openLink",c)}function hf(){af("contextVisible",{module:"context"})}function jf(a){af("contextExpanded",{module:"context",expanded:!!a})}function kf(a){console.log(JSON.stringify(a));af("analytics",a)};function lf(){function a(a){af(a.target.dataset.name,{src:r.src,module:g.name});a.stopPropagation()}function b(){m&&(g.D.remove(n),n=null,g.D.remove(q),q=null,h.detach(m),m.removeChild(p),r=m=null)}function c(){var a=r;!0===t&&(y=!0,b(),a.click())}function d(a){var c=r.getBoundingClientRect();a.x>c.left&&a.x<c.right&&a.y>c.top&&a.y<c.bottom||(y=!1,b())}function e(){y=!1}function f(a){!Q(a.target,"img:not(.en-object-placeholder)")||m||a.target.getAttribute("data-en-img-selected")||y||!Qe(a.target)||
(r=a.target,m=h.fc(a.target,"cover"),m.appendChild(p),n=g.D.listener(m,"mouseout",d),q=g.D.listener(m,"click",c))}var g=this,h=null,l=null,m=null,p=null,r=null,n=null,q=null,y=!1,t=!0;g.name="ui-img-buttons";g.G=function(b){function c(d,e){var f=b[d];null!=f&&f&&(f=M("div",{"class":"en-imagebar-"+d+" en-imagebar-button","data-name":d}),g.D.listener(f,"click",a),e.appendChild(f))}l=g.H("context").root;h=g.H("layer");g.D.listener(l,"mouseover",f);g.D.listener(l,"mouseout",e);p=M("div",{"class":"en-imagebar"});
c("annotate",p);c("preview",p);c("rotate",p);t=b.bubbleImageClicks};g.S=function(){b();p=h=l=null}};function mf(){z(this instanceof mf,"Use new to instantiate");var a=this;a.name="analytics";var b={bold:"bold",bulleted_list:"insertunorderedlist",change_font_size:"fontsize",underline:"underline",highlighter:"highlight",checkbox:"inserttodo",italic:"italic",change_font_color:"forecolor",horizontal_rule:"inserthorizontalrule",change_font_family:"fontname",numbered_list:"insertorderedlist",strikethrough:"strikethrough",table:"inserttable",center_align:"justifycenter",left_align:"justifyleft",subscript:"subscript",
justified_align:"justifyfull",right_align:"justifyright",superscript:"superscript"},c=kb(b);a.A=null;a.G=function(d){d=B(d,{labels:Object.keys(b)});a.A=new Eb;d.labels.forEach(function(c){b[c]&&a.A.add(b[c])});a.D.H("execcommand",function(b){a.A.has(b.name)&&kf({category:"note",action:"note_editor_action",label:c[b.name]})})}};var Yd={},nf=null,of=null,pf=[];function qf(a){ed(a);-1===pf.indexOf(a)&&pf.push(a)}function rf(){for(var a=0;a<pf.length;a++)fd(pf[a]);pf=[]}function sf(a){z(lb(a),"Expected to get an non empty object");Yd=a}function tf(){var a=Yd.env;return a&&null!=a.selectionColor?a.selectionColor:"rgb(167, 203, 245)"}function Nb(a,b){Rb.A(a,b)}function Se(a,b,c){Rb.A(Gd(a,b),null!=c?c:{target:a})};var uf={tap:mc,press:nc,pan:fc,swipe:lc,rotate:kc,pinch:jc},vf=["touchstart","touchmove","touchend","touchcancel"],wf=1;
function xf(){function a(){++p;for(var a=l.sb,b=a.length-1;0<=b;b--){var c=a[b];p===c.qh&&(c.Fb(),c.Ph&&d.remove(c.Sa))}}function b(a,b){Cb(function(){1===a?nf.Gg(function(a){return a.Sa===b}):2===a?b[0].removeEventListener(b[1],b[2],b[3]):4===a?window.clearTimeout(b):10===a?(l.remove(b[0]),m&&0===l.wa.length&&(window.clearInterval(m),m=null)):5===a?window.clearInterval(b):7===a?b():8===a?(dc(b[4],!1),vf.forEach(function(a){b[0].removeEventListener(a,b[2],b[3])})):9===a?Rb.unsubscribe(b[0],b[1]):
v.error("Unhandled binding cleanup step!",a,b)})}function c(a,b){var c={qg:++wf,type:a,value:b};return g[c.qg]=c}var d=this;z(this instanceof xf,"Use `new` to instantiate this class");var e=!1,f=null,g={};d.J=function(){z(!1,"Not public!");return Object.keys(g)};d.remove=function(a){null!=a&&(b(a.type,a.value),delete g[a.qg])};d.G=function(a){a=B(a,{name:null});f=a.name;l=new Db;z(0===Object.keys(g).length,"Binding are in an undefined state before setup",f);z(!1===e,"You need to call cleanup first!",
f);e=!0};d.S=function(){z(e,"You need to call setup first!");e=!1;for(var a=Object.keys(g).sort(function(a,b){a=+a;b=+b;return a>b?1:a<b?-1:0}),c=a.length-1;0<=c;c--){var d=g[a[c]];b(d.type,d.value)}m&&(window.clearInterval(m),m=null);l=null;g={};f=h=null};var h=null;d.ad=function(a){h=a};d.B=function(a){z(e,"You need to call setup first!");a.Sa=yb().toString();h&&(a=ob(a,h,!0));nf.Uh(a);return c(1,a.Sa)};d.listener=function(a,b,d,f){z(null!=a,"target is required!");z(e,"You need to call setup first!");
z(!f||lb(f),"option must be dictionary when used");var h=!!f&&!0===f.ri,m=[a,b,d,h];if(uf[b.toLocaleLowerCase()]){b=b.toLocaleLowerCase();var g=new uf[b](a,d,f);m[2]=function(a){var b=$b[a.type],c=Yb.call(g,a,b);if(c){a={inputType:b,srcEvent:a,touches:c[0],changedTouches:c[1],target:a.target,type:g.options.type};var c=a.touches.length,d=a.changedTouches.length;a.isInitial=!!(b&1&&0===c-d);a.isFinal=!!(b&12&&0===c-d);a.isInitial&&(g.mb={});g.mb.Wf||(g.mb.Wf=Xb(a));1<a.touches.length&&!g.mb.Ve?g.mb.Ve=
Xb(a):1===a.touches.length&&(g.mb.Ve=void 0);var c=g.mb.Wf,d=(b=g.mb.Ve)?b.center:c.center,e=a.center=Wb(a.touches);a.timeStamp=Date.now();a.deltaTime=a.timeStamp-c.timeStamp;a.angle=Vb(d,e);a.distance=Ub(d,e);var c=g.mb,d=a.center,e=c.Oh||{},f=c.Rh||{},h=c.Sh||{};if(1===a.inputType||4===h.inputType)f=c.Rh={x:h.deltaX||0,y:h.deltaY||0},e=c.Oh={x:d.x,y:d.y};a.deltaX=f.x+(d.x-e.x);a.deltaY=f.y+(d.y-e.y);a.offsetDirection=Tb(a.deltaX,a.deltaY);b?(c=b.touches,d=a.touches,c=Ub(d[0],d[1])/Ub(c[0],c[1])):
c=1;a.scale=c;b?(b=b.touches,c=a.touches,b=Vb(c[1],c[0])-Vb(b[1],b[0])):b=0;a.rotation=b;b=g.mb;h=b.Ih||a;c=a.timeStamp-h.timeStamp;8!=a.inputType&&(25<c||void 0===h.velocity)?(e=h.deltaX-a.deltaX,h=h.deltaY-a.deltaY,f={x:e/c||0,y:h/c||0},c=f.x,d=f.y,f=Math.abs(f.x)>Math.abs(f.y)?f.x:f.y,e=Tb(e,h),b.Ih=a):(f=h.velocity,c=h.velocityX,d=h.velocityY,e=h.direction);a.velocity=f;a.velocityX=c;a.velocityY=d;a.direction=e;g.state&56&&(g.state=1);g.state=g.Zc(a);cc(g,a);g.mb.Sh=a}};m.push(g);f=c(8,m);vf.forEach(function(b){a.addEventListener(b,
m[2],h)})}else f=c(2,m),a.addEventListener(b,d,h);return f};d.selection=function(a,b){function c(a,e){b.stopPropagation&&a.stopPropagation();!e&&0<a.touches.length||(d.remove(p),function(a){p=d.timeout(function(){f(!1);a&&b.Re()},10,p)}(!e&&h&&b.Re),h=!1,g=null)}function e(a){for(var b=0,c=0,d=a.length,f=0;f<d;f++)var h=a[f],b=b+h.clientX,c=c+h.clientY;return{x:Math.round(b/d),y:Math.round(c/d)}}function f(c){c?(E(a,"en-mobile-selected"),b.Ke&&E(a,b.Ke)):(H(a,"en-mobile-selected"),b.Ke&&H(a,b.Ke))}
z(void 0===b||lb(b),"en.bindingSelectionOpt is not the right object or undefined");var h=!1,m=!1,g=null,p;d.listener(a,"touchstart",function(a){m=b.enabled&&!b.enabled();m||(b.stopPropagation&&a.stopPropagation(),g=e(a.touches),h||(p=d.timeout(function(){h=!0;f(!0)},100,p)))});d.listener(a,"touchmove",function(a){if(!m){b.stopPropagation&&a.stopPropagation();var d;if(d=g){var f=e(a.touches);d=f.x-g.x;f=f.y-g.y;d=5<Math.sqrt(d*d+f*f)}d&&c(a,!0)}});d.listener(a,"touchend",c);d.listener(a,"touchcancel",
c);d.listener(a,"tap",function(a){m||(b.stopPropagation&&a.stopPropagation(),h||d.timeout(function(){f(!0);p=d.timeout(function(){f(!1);b.Re&&b.Re()},50,p)},0,p))},{cg:!0})};d.H=function(a,b,d){Rb.subscribe(a,b,d);return c(9,[a,b])};d.ka=function(a,b,c,e){return d.H(Gd(a,b),c,e)};d.timeout=function(a,b,f){z(e,"You need to call setup first!");f&&d.remove(f);var h=0,h=window.setTimeout(function(){a();for(var b=h,c=g.length-1;0<=c;c--)if(g[c][0]===b){g.splice(c,1);break}},b||0);return c(4,h)};var l=
null,m=null,p=0;d.O=function(){p=0};d.C=function(b,f){z(e,"You need to call setup first!");z(0<f,"Delay needs to be a number >0");var h=yb().toString(),g=c(10,h);l.set(h,{Fb:b,Ph:!1,qh:f,Sa:g,id:h});m||(d.O(),m=window.setInterval(a,1E3))};d.A=function(a){c(7,a)}};function yf(a){var b=this;b.context=a||{};b.H=null;var c=[],d={};b.load=function(a){return Cb(function(){if(!a)return!1;a.ra=!1;z(!(0<=c.indexOf(a)),"Plugin has already been loaded:",a.name);z(!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.D=new xf;return!0},function(a){v.error("Exception in PluginManager.load <$>",a.toString())})};b.Y=function(a){return d[a]||null};b.A=function(a){return a?c.filter(function(a){return a.ra}):c};
b.Jc=function(a){if(u(a))return d[a]||null;for(var b=c.length-1;0<=b;b--){var g=c[b];if(a(g))return g}return null};b.B=function(a){z(null!=d[a],"The plugin",a,"is required here!");return d[a]};b.J=function(a){b.O=a};b.G=function(a,d){return Cb(function(){z(!!a,"Expected a plugin");z(!a.ra,"Plugin is already set up:",a.name);0<=c.indexOf(a)||b.load(a);a.D.G({name:a.name||"?"+yb()});a.vc=b;a.da=function(){a.Zb||(a.Zb=new yf(b.context),a.Zb.H=a);return a.Zb};a.Qb=b.Jc.bind(b);a.H=b.B.bind(b);b.O&&b.O(a);
a.G&&a.G(d||{},b.context);a.ra=!0;return a},function(a){v.error("Exception in PluginManager.setup <$>",a.toString())})};b.ba=function(a){for(var d=0;d<c.length;d++)b.G(c[d],a)};b.X=function(a){for(var c=b.H;null!=c;){if(u(a)){if(c.name===a)return c}else if(a(c))return c;c=c.vc.H}return null};b.S=function(a){Cb(function(){z(!!a,"Expected a plugin");z(a.ra,"Plugin is not yet set up:",a.name);z(0<=c.indexOf(a),"Plugin has not been loaded before:",a.name);a.ra=!1;a.Zb&&(a.Zb.H=null,a.Zb.C(),a.Zb=null);
a.D.S();a.S&&a.S();delete a.da;delete a.Qb;delete a.H;a.vc=null},function(a){v.error("Exception in PluginManager.cleanup <$>",a.toString())})};b.C=function(){for(var a=c.length-1;0<=a;a--){var f=c[a];!0===f.ra&&(b.S(f),b.D=null)}c=[];d={}}};function zf(){var a=this;a.name="mutation-observer";a.G=function(b){function c(a){if(a)for(var b=0;b<a.length;b++){var c=a[b],c={type:c.type,target:c.target,addedNodes:Ta(c.addedNodes),removedNodes:Ta(c.removedNodes),oldValue:c.oldValue,nextSibling:c.nextSibling,attributeName:c.attributeName,value:"characterData"===c.type?c.target.data:c.target.getAttribute(c.attributeName)};c.target===d&&"class"===c.attributeName||e.push(c)}}var d=B(b,{element:null}).element;z(J(d),"Element!");var e,f=null;a.D.A(function(){f&&
a.A()});a.L=function(){z(null==f,"Observer already running");e=[];var a=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(a){var b=new (window.MutationObserverInit||window.WebKitMutationObserverInit||window.MozMutationObserverInit||Object);b.subtree=!0;b.childList=!0;b.attributes=!0;b.characterData=!0;b.attributeOldValue=!0;b.characterDataOldValue=!0;f=new a(c);null==f.takeRecords?f=null:f.observe(d,b)}};a.J=function(){return!!f};a.C=function(){z(null!=f,"Observer not running");
var a=f.takeRecords();c(a);return e};a.A=function(){a.C();f.disconnect();f=null;return e};a.N=function(a){if(a)for(var b=0;b<a.length;b++){var c=a[b];if("childList"===c.type){if(c.addedNodes.length)for(var d=0;d<c.addedNodes.length;d++)v.log("  ",b,"add node",L(c.addedNodes[d])||Ua(c.addedNodes[d].textContent),c.addedNodes[d].outerHTML);if(c.removedNodes.length)for(d=0;d<c.removedNodes.length;d++)v.log("  ",b,"remove node",L(c.removedNodes[d])||Ua(c.removedNodes[d].textContent),c.removedNodes[d].outerHTML)}else"attributes"===
c.type?null===c.oldValue?v.log("  ",b,"remove attribute",L(c.target),c.attributeName,c.target.outerHTML):v.log("  ",b,"set attribute",L(c.target),c.attributeName,c.target.outerHTML):"characterData"===c.type?v.log("  ",b,"change text",Ua(c.oldValue),"to",Ua(c.value)):v.error("!!! unknown mutation",c.type)}};a.I=function(a){for(var b=a.length-1;0<=b;b--){var c=a[b];if("childList"===c.type){if(c.addedNodes.length)for(var d=0;d<c.addedNodes.length;d++)c.target.removeChild(c.addedNodes[d]);if(c.removedNodes.length)for(d=
0;d<c.removedNodes.length;d++)c.target.insertBefore(c.removedNodes[d],c.nextSibling)}else"attributes"===c.type?null===c.oldValue?c.target.removeAttribute(c.attributeName):c.target.setAttribute(c.attributeName,c.oldValue):"characterData"===c.type?c.target.data=c.oldValue:v.error("!!! unknown mutation",c.type)}}}};function Af(){z(this instanceof Af,"Use `new` to instantiate this class");var a=this;a.name="undo";var b=/\s*(id|data\-en\-[a-z0-9\-]+)=".*?"/gi;a.G=function(c){function d(a){return function(){Dc(a.node.cloneNode(!0),h);try{Me(h,a.selection)}catch(c){}g.$c&&g.$c(a.fd);m=a}}function e(a){!0!==a&&m||(m=f())}function f(){var c={node:h.cloneNode(!0),selection:Le(h)};if(a.Qb){var b=a.Qb("crypt");b&&b.Jf(c.node)}g.tb&&(c.fd=g.tb());return c}var g=B(c,{element:null,jd:"Typing",tb:null,$c:null},!0),h=g.element;
z(!!h&&J(h),'"element" option must be an HTMLElement');var l=new Oe,m=null;a.A=function(){if(!m||!h)return!1;m.node.className=h.className;m.node.id=h.id;if(!h.isEqualNode(m.node)){var a=m.ef;null==a&&(a=m.node.innerHTML.replace(b,""),m.ef=a);var c=h.innerHTML,c=c.replace(b,"");if(a!==c)return!0}return g.tb?g.tb()!==m.fd:!1};a.flush=function(c){if(a.A()){Se(h,"beforeGetContent");var b=f();l.register(d(b),d(m),c||g.jd);return m=b}e(!0);return m};var p=!1;a.D.listener(h,"mousedown",function(){p=!0});
this.D.ka(h,"selectionChanged",function(c){c.Fa&&(1==p&&a.flush(),e());p=!1});a.Pa=function(c,b){Se(h,"beforeGetContent");var e=a.flush()||f();c();var g=f();l.register(d(g),d(e),b);m=g};a.clear=function(){l.clear();m=null;window.TEST&&e()};var r=a.vc.H;a.J=function(){return l.J()||a.A()};a.C=function(){return l.C()&&!a.A()};a.D.B({name:"undo",action:function(){a.flush();l.A()&&Se(h,"setDirty");return!0},state:function(){return a.J()},value:function(){return a.A()?g.jd:l.O()},enabled:function(){return!(!(this.K&&
this.K.queryGroupName||r.hasFocus())||!a.J())}});a.D.B({name:"redo",action:function(){l.B()&&Se(h,"setDirty");return!0},state:function(){return a.C()},value:function(){return l.H()},enabled:function(){return!(!(this.K&&this.K.queryGroupName||r.hasFocus())||!a.C())}})}};function Bf(){z(this instanceof Bf,"Use `new` to instantiate this class");var a=this;a.name="undo";var b=[],c=[];a.G=function(d){function e(a){return function(){p.I(a.od);try{Me(l,a.selection)}catch(c){}h.$c&&h.$c(a.fd)}}function f(a){return!0!==a&&m?!1:(m=g(),p.L(),!0)}function g(){var a={od:[],selection:Le(l)};h.tb&&(a.fd=h.tb());return a}var h=B(d,{element:null,jd:"Typing",tb:null,$c:null},!0),l=h.element;z(!!l&&J(l),'"element" option must be an HTMLElement');var m=null,p=new zf;a.da().G(p,{element:l});
a.A=function(){return m&&l?0<p.C().length?!0:h.tb?h.tb()!==m.fd:!1:!1};a.flush=function(d){if(a.A()&&m){Se(l,"beforeGetContent");m.od=p.A();var n=e(m);d=d||h.jd;c=[];b.push({Fb:n,title:d});m=null}f()||(m=g());return m};var r=!1;a.D.listener(l,"mousedown",function(){r=!0});this.D.ka(l,"selectionChanged",function(c){c.Fa&&(1==r&&a.flush(),f());r=!1});a.Pa=function(d,h){a.flush();m=g();d();m.od=p.A();var n=e(m);c=[];b.push({Fb:n,title:h});f(!0)};a.clear=function(){p.J()&&(p.A(),m=null);b=[];c=[];window.TEST&&
f()};var n=a.vc.H;a.J=function(){return 0<b.length||a.A()};a.C=function(){return 0<c.length&&!a.A()};a.D.B({name:"undo",action:function(){a.flush();var d=b.pop();return d?(m=g(),d.Fb(),m.od=p.A(),c.push({Fb:e(m),title:d.title}),f(!0),Se(l,"setDirty"),!0):!1},state:function(){return a.J()},value:function(){return a.A()?h.jd:b&&0!==b.length?b[b.length-1].title:null},enabled:function(){return!(!(this.K&&this.K.queryGroupName||n.hasFocus())||!a.J())}});a.D.B({name:"redo",action:function(){var d=c.pop();
return d?(a.flush(),m=g(),d.Fb(),m.od=p.A(),b.push({Fb:e(m),title:d.title}),f(!0),Se(l,"setDirty"),!0):!1},state:function(){return a.C()},value:function(){return c&&0!==c.length?c[c.length-1].title:null},enabled:function(){return!(!(this.K&&this.K.queryGroupName||n.hasFocus())||!a.C())}})}};function Cf(){var a=this;a.name="textinput";var b=null;a.G=function(c){function d(c){var d={event:c,element:b,Fa:W(b),dc:g};Se(b,"anyInput",d);g&&(!1===l?(p=null,f=!1,d.dc={Ua:d.dc.Ua,offset:d.dc.offset},a.D.timeout(function(){d.Fa=W(b);d.Fa&&(d.Fa.collapsed||d.Fa.collapse(!1),Se(b,"input",d))}),g=null):h=d)}function e(a){if(!1===l&&!1===f){var c=W(b);g={Ua:c.startContainer,offset:c.startOffset};Se(b,"beforeInput",{event:a,Fa:c,dc:g,element:b});f=!0}return!0}b=B(c,{element:null}).element;var f=!1,
g=null,h=null,l=!1,m=null,p=null,r=null;a.Zg=function(){return l};a.Vg=function(){return l&&m?Sd(m):null};a.hh=function(a){l&&(m=Rd(a))};a.D.listener(b,"compositionstart",function(a){p=a.data;var c=e(a);Se(b,"compositionStart",{event:a,element:b,data:p});l=!0;return c});a.D.listener(b,"compositionupdate",function(a){var c=W(b);m=c?Rd(c):null;r=a.data;Nc(m.startContainer)&&(m.endOffset=m.startOffset+r.length);Se(b,"compositionUpdate",{event:a,element:b,data:r,Fa:c})});a.D.listener(b,"compositionend",
function(a){Se(b,"compositionEnd",{event:a,element:b,data:a.data});l=!1;m=null});a.D.listener(b,"webkitBeforeTextInserted",e);a.D.listener(b,"beforeInput",e);a.D.listener(b,"textInput",function(a){e(a)});a.D.listener(b,"textinput",e);a.D.listener(b,"input",function(a){d(a)});a.D.ka(b,"selectionChanged",function(){!1===l&&null!=h&&(g=h=null,f=!1)},1E3)}};function Df(){function a(a){a=Pb(a);var e=!1,m=a.visible;null!=m&&(qd(d,!!m),e=!0);m=a.active;null!=m&&(E(d,m?"en-shared-on":"en-shared-off"),H(d,m?"en-shared-off":"en-shared-on"),e=!0);m=a.business;null!=m&&(qd(f,!!m),e=!0);var p=a.value;u(p)&&(g?(b(p),g=!1):c.D.timeout(function(){b(p)},1E3),e=!0);return e}function b(a){e.innerHTML=a;ud("a",e).forEach(function(a){var b=a.getAttribute("href");a.removeAttribute("href");E(a,"en-shared-link");a=Gc(a,"span");c.D.listener(a,"click",function(){var d=N(a);
gf(b,c.name,{left:d.left,top:d.top,width:d.width,height:d.height});return!1})})}var c=this;this.name="shared";z(this instanceof Df,"Use `new` to instantiate this class");var d=null,e=null,f=null,g=!0;this.G=function(c){var b=document.querySelector(".en-note-container");e=M("div",{"class":"en-shared-message"});f=M("div",{"class":"en-shared-business",style:"display:none;"});d=M("div",{"class":"en-shared en-shared-off",id:"en-shared",style:"display:none;"},[f,e]);b.insertBefore(d,b.firstChild);a(c);
this.D.B({name:"shared",action:a,enabled:Ma})};this.S=function(){f=e=null;I(d);d=null}};function Ef(){function a(a){if(!(null==a||u(a)&&""===a||ia(a)&&0===Object.keys(a).length)){var p=Pb(a);a=p.visible;var q=p.expanded,A=p.hideIndicatorLabelWhenExpanded,y=p.hideIndicatorLabelWhenCollapsed,t=p.chatButtonLabel||"Chat",Aa=p.shareButtonLabel||"Share",ca=p.items,xa=p.contextSectionLabel,cb=p.firstLaunchInfo;null!=a&&qd(n,!!a);if(ca&&!(0>=ca.length)){tc(n);var k=M("div",{"class":"en-context-label"});k.textContent=xa||"Context";n.appendChild(k);xa=M("div",{"class":q?"en-context-hide-label":
"en-context-show-label"});n.appendChild(xa);b(cb);cb=M("div",{"class":"en-context-card-holder"});n.appendChild(cb);for(k=0;k<ca.length;k++)cb.appendChild(l(ca[k],Aa,t));T(n,"max-height",139*r.maxRows+32+"px");q?f(xa,A):g(xa,y);e(xa,A,y);c();m.D.timeout(c,250);h(!0);!0===a&&!0===q&&0<ca.length&&m.D.timeout(function(){d(p)},1500)}}}function b(a){if(null!=a&&null!=a.headline&&null!=a.subHeadline&&null!=a.learnMoreLinkLabel&&null!=a.dismissButtonLabel){Qa("The FLE functionality has been merged into the context-info command. Please switch to that API.");
var c=a.headline,b=a.subHeadline,d=a.learnMoreLinkLabel;a=a.dismissButtonLabel;var f=M("div",{"class":"en-context-fle-container"});n.appendChild(f);var e=M("div",{"class":"en-context-fle-header"});e.textContent=c;f.appendChild(e);c=M("div",{"class":"en-context-fle-body"});f.appendChild(c);e=M("span",{"class":"en-context-fle-subheader"});e.textContent=b+" ";c.appendChild(e);b=M("span",{"class":"en-context-fle-learn-more"});b.textContent=d;c.appendChild(b);m.D.listener(b,"click",function(a){gf("learnMore",
m.name,{kind:"firstLaunch",sharing:!1});X(a)});d=M("div",{"class":"en-context-fle-dismiss-button"});d.textContent=a;f.appendChild(d);m.D.listener(d,"click",function(a){gf("dismiss",m.name,{kind:"firstLaunch",sharing:!1});I(f);a.stopPropagation()})}}function c(){var a;var c=document.querySelector(".en-context-card-holder");a=document.querySelectorAll(".en-context-item").length||0;var b=document.querySelector(".en-context-item");if(null==c||null==b)a=null;else{var c=Math.round(N(c).width),d=Rc(b),f=
Math.round(b.offsetWidth+(parseInt(d["margin-left"],10)+parseInt(d["margin-right"],10)));a={gd:c,Nh:a,nh:f,si:Math.round(b.offsetHeight+(parseInt(d["margin-top"],10)+parseInt(d["margin-bottom"],10))),oh:Math.floor(c/f)}}b=document.querySelector(".en-context-card-holder");null!=a&&null!=b&&(c=Math.min(a.Nh,a.oh),0>=c?T(b,"left","0px"):T(b,"left",(a.gd-a.nh*c)/2+"px"))}function d(a){if(!0!==t&&!1!==r.showPopup&&null==q&&null!=n&&null!=a&&null!=a.items&&0!==a.items.length){var c=a.items,b=a.toastNotificationHeaderLabel||
"FIX HEADER";a=a.toastNotificationFooterLabel||"FIX FOOTER";var d=jb(c[0].title||"Untitled"),f=M("div",{"class":"en-context-popup-header"});f.textContent=b;b="en-context-popup-body";null!=c[0].kind&&(b+=" "+c[0].kind);c=M("div",{"class":b});c.textContent=d;d=M("div",{"class":"en-context-popup-footer"});d.textContent=a;d.appendChild(M("div",{"class":"en-context-popup-down-arrow"}));q=M("div",{"class":"en-context-popup"},[M("div",{"class":"en-context-popup-wrapper"},[f,c,d])]);Fc(q,n);m.D.timeout(function(){E(q,
"en-context-popup-visible")},1);m.D.listener(q,"mousedown",function(){m.D.remove(y)});m.D.listener(q,"mouseup",function(){var a=N(n);Bd(a.top-15,240);H(q,"en-context-popup-visible");T(q,"pointer-events","none")});y=m.D.timeout(function(){H(q,"en-context-popup-visible");T(q,"pointer-events","none");m.D.timeout(function(){qd(q,!1)},250)},5500,y)}}function e(a,c,b){m.D.listener(a,"click",function(){a.textContent===c?(g(a,b),jf(!1)):a.textContent===b&&(f(a,c),jf(!0));h(!0)})}function f(a,c){var b=U(".en-context-card-holder",
n),d=U(".en-context-fle-container",n);1!==b.length?v.error("Couldnt find card holder?!"):(b=b[0],a.textContent=c,H(a,"en-context-show-label"),E(a,"en-context-hide-label"),qd(b,!0),null!=d&&1===d.length&&qd(d[0],!0))}function g(a,c){var b=U(".en-context-card-holder",n),d=U(".en-context-fle-container",n);1!==b.length?v.error("Couldnt find card holder?!"):(b=b[0],a.textContent=c,H(a,"en-context-hide-label"),E(a,"en-context-show-label"),qd(b,!1),null!=d&&1===d.length&&qd(d[0],!1))}function h(a){function c(){var a=
n.querySelector(".en-context-item");null!=a&&Cd(a,100)&&!1===t&&(t=!0,hf())}null==a&&(a=!1);a?c():A=m.D.timeout(c,100,A)}function l(a,c,b){var d=a.link||"#",f=a.kind||"undefined",e=document.createTextNode(jb(a.text||"")),h=a.thumbnail||"",g=""!==h,n=jb(a.title||"Untitled"),r=a.sourceName||"",k=a.sourceId||"",l=a.date||"",q=a.author||"";a=a.canShare;var A=M("div",{"class":g?"en-context-item-title":"en-context-item-title en-context-wide",href:d,name:f});A.textContent=n;n=M("span",{"class":"en-context-author"});
""!==q&&(n.textContent=q);var y=M("span",{"class":"en-context-separator"});y.textContent="|";var t=M("span",{"class":"note"===f?"en-context-note-date":"en-context-news-date"});""!==l&&(t.textContent=l);d=[];"news"===f?""!==l?(d.push(t),""!==q&&(d.push(y),d.push(n))):""!==q&&d.push(n):(""!==l&&d.push(t),d.push(e));e="en-context-item-body";g||(e+=" en-context-wide");"news"===f?e+=" en-context-item-body-one":"note"===f&&"evernote.business"===k?e+=" en-context-item-body-two":"people"===f&&(e+=" en-context-body-italics");
l=M("div",{"class":e},d);e=M("div",{"class":"en-context-graphic-clipper"});d="en-context-graphic";a&&(d+=" en-context-graphic-blur");h=M("img",{"class":d,alt:"graphic",src:h});d="en-context-graphic-hover";g||(d+=" en-context-graphic-hover-solid");c=M("div",{"class":d},[M("div",{"class":"en-context-workchat"}),M("div",{"class":"en-context-share-text"},["people"===f?b:c])]);g&&e.appendChild(h);a&&(e.appendChild(c),m.D.listener(e,"click",function(a){gf(A.getAttribute("href"),m.name,{kind:A.getAttribute("name"),
sharing:!0});a.stopPropagation()}));g=k;"dowjones.wsj"===g&&(g="wsj");"profile.linkedin"===g&&(g="linkedin");if("profile.evernote.business"===g||"evernote.business"===g)g="evernote-business";"profile.factiva"===g&&(g="factiva");"nikkei.bp.business"===g&&(g="nikkeibp");"nikkei.bp.itpro"===g&&(g="itpro");"nikkei.bp.kenplatz"===g&&(g="kenplatz");"nikkei.bp.tech"===g&&(g="techon");b="";if("profile.evernote.business"===k||"evernote.business"===k)b="en-context-source-text-blue";c=M("div",{"class":"en-context-source-img "+
g});b=M("div",{"class":"en-context-source-text "+b});b.textContent="dowjones.wsj"===k?"":"evernote.business"===k?q:r;r=M("div",{"class":"en-context-source"});-1!==p.indexOf(g)&&r.appendChild(c);r.appendChild(b);q=[A,l];q.push(e);("news"===f||"people"===f||"company"===f||"note"===f&&"evernote.business"===k)&&q.push(r);f=M("div",{"class":"en-context-item"},q);m.D.listener(f,"click",function(a){gf(A.getAttribute("href"),m.name,{kind:A.getAttribute("name"),sharing:!1});a.preventDefault()});return f}var m=
this;this.name="context";z(this instanceof Ef,"Use new for this");var p="factiva fastcompany inc lifehacker linkedin pandodaily techcrunch theverge evernote-business wsj forbes nikkei nikkeibp techon itpro kenplatz".split(" "),r,n=null,q=null,y,t=!1,A;this.G=function(b){var d=document.querySelector(".en-note-container");n=M("div",{"class":"en-context",id:"en-context",style:"display:none;"});null!=d?(Fc(n,d),m.D.listener(window,"scroll",h),m.D.listener(window,"resize",h),h(!0),m.D.listener(window,
"resize",c),r=B(b,{showPopup:!0,maxRows:9999},!1),this.D.B({name:"context",action:a,enabled:Ma})):v.error("Couldnt find note container! Bailing.")};this.S=function(){I(n);I(q);y=0;n=null;t=!1}};function Ff(){function a(a){if(!(null==a||u(a)&&""===a||ia(a)&&0===Object.keys(a).length)){Qa("The FLE functionality has been merged into the context-info command. Please switch to that API.");var m=Pb(a),n=m.expanded;null==n&&(n=!1);var l=m.headline||"Get more Context with Premium",y=m.subHeadline||"Go Premium to view notes, articles, and people related to what you're working on.";a=m.goPremiumLabel||"Go Premium";var t=m.hideIndicatorLabelWhenExpanded||"Hide",m=m.hideIndicatorLabelWhenCollapsed||
"Show";tc(g);qd(g,!0);h=M("div",{"class":"en-context-upsell-body"});g.appendChild(h);var A=M("div",{"class":n?"en-context-upsell-hide-label":"en-context-upsell-show-label"});g.appendChild(A);n?c(A,t):d(A,m);b(A,t,m);n=M("div",{"class":"en-context-upsell-headline"});n.textContent=l;h.appendChild(n);l=M("div",{"class":"en-context-upsell-subheadline"});l.textContent=y;h.appendChild(l);y=M("div",{"class":"en-context-upsell-go-premium"});y.textContent=a;h.appendChild(y);f.D.listener(y,"click",function(a){gf("http://evernote.com",
"context",{kind:"upsell",sharing:!0});X(a)});e(!0)}}function b(a,b,h){f.D.listener(a,"click",function(){a.textContent===b?(d(a,h),jf(!1)):a.textContent===h&&(c(a,b),jf(!0));e(!0)})}function c(a,c){null!=h&&(a.textContent=c,H(a,"en-context-upsell-show-label"),E(a,"en-context-upsell-hide-label"),qd(h,!0))}function d(a,c){null!=h&&(a.textContent=c,H(a,"en-context-upsell-hide-label"),E(a,"en-context-upsell-show-label"),qd(h,!1))}function e(a){function c(){Cd(g,75)&&!1===l&&(l=!0,hf())}null==a&&(a=!1);
a?c():m=f.D.timeout(c,100,m)}var f=this;this.name="context-upsell";z(this instanceof Ff,'Use "new" to create the Context Upsell Plugin');var g=null,h=null,l=!1,m;this.G=function(c){var b=document.querySelector(".en-note-container");g=M("div",{"class":"en-context-upsell",id:"en-context-upsell",style:"display:none;"});null!=b?(Fc(g,b),f.D.listener(window,"scroll",e),f.D.listener(window,"resize",e),e(!0),a(c),this.D.B({name:"context-upsell",action:a,enabled:Ma})):v.error("Couldnt find note container! Bailing.")};
this.S=function(){I(g);h=g=null;l=!1}};function Gf(){function a(a){if(!(null==a||u(a)&&""===a||ia(a)&&0===Object.keys(a).length)){var e=Pb(a),h=e.showLogo||!1,n=e.headline||"HEADLINE",l=e.infoSections||[];a=e.buttonLabel||"BUTTONLABEL";var y=e.hideOnButtonClick||!1;tc(f);qd(f,!0);e=M("div",{"class":"en-context-info-logo"});h&&f.appendChild(e);h=M("div",{"class":"en-context-info-headline"});h.textContent=n;f.appendChild(h);g=M("div",{id:"en-context-info-body"});f.appendChild(g);if(3===l.length){for(n=0;n<l.length;n++)g.appendChild(b(l[n])),
g.appendChild(document.createTextNode(" "));l=M("div",{"class":"en-context-info-stretcher"});g.appendChild(l)}l=M("div",{"class":"en-context-info-button"});l.textContent=a;f.appendChild(l);d.D.listener(l,"click",function(a){gf("http://evernote.com","context",{kind:"info",sharing:!0});y&&qd(f,!1);X(a)});c(!0)}}function b(a){null!=a&&u(a.type)&&u(a.title)&&u(a.text)||v.error("Incomplete section info for context-info!");for(var c=!1,b=0;b<e.length;b++)a.type===e[b]&&(c=!0);!1===c&&v.error("Invalid type given for context-info: ",
a.type);c=M("div",{"class":"en-context-info-section"});b=M("div",{"class":"en-context-info-section-image "+a.type});c.appendChild(b);b=M("div",{"class":"en-context-info-section-title"});b.textContent=a.title;c.appendChild(b);b=M("div",{"class":"en-context-info-section-text"});b.textContent=a.text;c.appendChild(b);return c}function c(a){function c(){Cd(f,75)&&!1===h&&(h=!0,hf())}null==a&&(a=!1);a?c():l=d.D.timeout(c,100,l)}var d=this;this.name="context-info";z(this instanceof Gf,'Use "new" to create the Context Info Plugin');
var e=["note","article","person"],f=null,g=null,h=!1,l;this.G=function(b){var e=document.querySelector(".en-note-container");f=M("div",{"class":"en-context-info",style:"display:none;"});null!=e?(Fc(f,e),d.D.listener(window,"scroll",c),d.D.listener(window,"resize",c),c(!0),a(b),this.D.B({name:"context-info",action:a,enabled:Ma})):v.error("Couldnt find note container! Bailing.")};this.S=function(){I(f);g=f=null;h=!1}};function Hf(){function a(a){var c=B(Pb(a),{highlight:y,excludeMatches:q,limit:r,value:null});a=g;c.value&&(a=d.find(c.value,+c.limit));m=c.highlight;b();p||(p=d.D.H("findContentChanged",function(){d.D.remove(p);p=null}));if(c.excludeMatches){var c={},f;for(f in a)"items"!==f&&(c[f]=a[f]);a=c}return JSON.stringify(a)}function b(){"all"===m&&f?Nb("findChanged",{items:f,selected:h}):"single"===m&&l?Nb("findChanged",{items:[l],selected:0}):Nb("findClear")}function c(a){a=Pb(a).value;if("next"===a)d.A(h+
1);else if("prev"===a)d.A(h-1);else if("first"===a)d.A(0);else if("last"===a)d.A(-1);else if("clear"===a)Nb("findClear"),g=f=e=null,h=-1,l=null;else{a=parseInt(a,10);if(isNaN(a))return!1;d.A(a)}return!0}var d=this;d.name="find";z(this instanceof Hf,"Use `new` to instantiate this class");var e=null,f=null,g=null,h=-1,l=null,m=null,p=null,r,n,q,y,t={a:"a\u24d0\uff41\u1e9a\u00e0\u00e1\u00e2\u1ea7\u1ea5\u1eab\u1ea9\u00e3\u0101\u0103\u1eb1\u1eaf\u1eb5\u1eb3\u0227\u01e1\u00e4\u01df\u1ea3\u00e5\u01fb\u01ce\u0201\u0203\u1ea1\u1ead\u1eb7\u1e01\u0105\u2c65\u0250",
b:"b\u24d1\uff42\u1e03\u1e05\u1e07\u0180\u0183\u0253",c:"c\u24d2\uff43\u0107\u0109\u010b\u010d\u00e7\u1e09\u0188\u023c\ua73f\u2184",d:"d\u24d3\uff44\u1e0b\u010f\u1e0d\u1e11\u1e13\u1e0f\u0111\u018c\u0256\u0257\ua77a",e:"e\u24d4\uff45\u00e8\u00e9\u00ea\u1ec1\u1ebf\u1ec5\u1ec3\u1ebd\u0113\u1e15\u1e17\u0115\u0117\u00eb\u1ebb\u011b\u0205\u0207\u1eb9\u1ec7\u0229\u1e1d\u0119\u1e19\u1e1b\u0247\u025b\u01dd",f:"f\u24d5\uff46\u1e1f\u0192\ua77c",g:"g\u24d6\uff47\u01f5\u011d\u1e21\u011f\u0121\u01e7\u0123\u01e5\u0260\ua7a1\u1d79\ua77f",
h:"h\u24d7\uff48\u0125\u1e23\u1e27\u021f\u1e25\u1e29\u1e2b\u1e96\u0127\u2c68\u2c76\u0265",i:"i\u24d8\uff49\u00ec\u00ed\u00ee\u0129\u012b\u012d\u00ef\u1e2f\u1ec9\u01d0\u0209\u020b\u1ecb\u012f\u1e2d\u0268\u0131",j:"j\u24d9\uff4a\u0135\u01f0\u0249",k:"k\u24da\uff4b\u1e31\u01e9\u1e33\u0137\u1e35\u0199\u2c6a\ua741\ua743\ua745\ua7a3",l:"l\u24db\uff4c\u0140\u013a\u013e\u1e37\u1e39\u013c\u1e3d\u1e3b\u017f\u0142\u019a\u026b\u2c61\ua749\ua781\ua747",m:"m\u24dc\uff4d\u1e3f\u1e41\u1e43\u0271\u026f",n:"n\u24dd\uff4e\u01f9\u0144\u00f1\u1e45\u0148\u1e47\u0146\u1e4b\u1e49\u019e\u0272\u0149\ua791\ua7a5",
o:"o\u24de\uff4f\u00f2\u00f3\u00f4\u1ed3\u1ed1\u1ed7\u1ed5\u00f5\u1e4d\u022d\u1e4f\u014d\u1e51\u1e53\u014f\u022f\u0231\u00f6\u022b\u1ecf\u0151\u01d2\u020d\u020f\u01a1\u1edd\u1edb\u1ee1\u1edf\u1ee3\u1ecd\u1ed9\u01eb\u01ed\u00f8\u01ff\u0254\ua74b\ua74d\u0275",p:"p\u24df\uff50\u1e55\u1e57\u01a5\u1d7d\ua751\ua753\ua755",q:"q\u24e0\uff51\u024b\ua757\ua759",r:"r\u24e1\uff52\u0155\u1e59\u0159\u0211\u0213\u1e5b\u1e5d\u0157\u1e5f\u024d\u027d\ua75b\ua7a7\ua783",s:"s\u24e2\uff53\u00df\u015b\u1e65\u015d\u1e61\u0161\u1e67\u1e63\u1e69\u0219\u015f\u023f\ua7a9\ua785\u1e9b",
t:"t\u24e3\uff54\u1e6b\u1e97\u0165\u1e6d\u021b\u0163\u1e71\u1e6f\u0167\u01ad\u0288\u2c66\ua787",u:"u\u24e4\uff55\u00f9\u00fa\u00fb\u0169\u1e79\u016b\u1e7b\u016d\u00fc\u01dc\u01d8\u01d6\u01da\u1ee7\u016f\u0171\u01d4\u0215\u0217\u01b0\u1eeb\u1ee9\u1eef\u1eed\u1ef1\u1ee5\u1e73\u0173\u1e77\u1e75\u0289",v:"v\u24e5\uff56\u1e7d\u1e7f\u028b\ua75f\u028c",w:"w\u24e6\uff57\u1e81\u1e83\u0175\u1e87\u1e85\u1e98\u1e89\u2c73",x:"x\u24e7\uff58\u1e8b\u1e8d",y:"y\u24e8\uff59\u1ef3\u00fd\u0177\u1ef9\u0233\u1e8f\u00ff\u1ef7\u1e99\u1ef5\u01b4\u024f\u1eff",
z:"z\u24e9\uff5a\u017a\u1e91\u017c\u017e\u1e93\u1e95\u01b6\u0225\u0240\u2c6c\ua763"};d.G=function(b){b=B(b,{limit:100,excludeMatches:!1,highlight:"none",selector:"#en-note"});r=0<+b.limit?+b.limit:100;n=u(b.selector)?b.selector:"#en-note";q=b.excludeMatches;y=b.highlight;b={};for(var m in t){var p=t[m];b[m]="["+m+p+"]";for(var x=0;x<p.length;x++){var F=p[x];b[F]||(b[F]=b[m])}}t=b;g=f=e=null;h=-1;l=null;d.D.B({name:"find",action:c,value:a,enabled:Ma})};d.C=function(a,c){var b={start:a.from,end:a.to},
d=Zd(b,c);if(!d)return null;for(var f=0;f<d.length;f++){var e=d[f];e.top&&(e.string=a.string,e.length=a.length,e.from=b.start,e.to=b.end)}return d};d.A=function(a){f&&0<f.length&&(a>=f.length?a-=f.length:0>a&&(a+=f.length),h=a=Math.max(0,Math.min(f.length-1,a)),l=f[a],g.index=h,b())};d.find=function(a,c){if(0>=a.length)return null;c||(c=r);for(var b=c,m=[a.trim()].map(Ya).join("|"),q=[],y=0;y<m.length;y++){var Y=m[y],Aa=t[Y.toLowerCase()];Aa?q.push(Aa):q.push(Y)}var m=q.join(""),m=m.replace(/\s/g,
"\\s"),ca=new RegExp(m,"gi"),xa=[],cb=!1,k=-1,qa=-1;U(n).forEach(function(a){for(var b=a.textContent,f,e=!1;(f=ca.exec(b))&&0<f.length;){var h=f.index,m=ca.lastIndex;if(h=d.C({string:b.slice(h,m),length:m-h,from:h,to:m},a)){if(0>=c--){cb=!0;break}m=h[0];l&&p&&l.from===m.from&&(0===m.string.indexOf(l.string)||0===l.string.indexOf(m.string))&&(qa=xa.length);if(!e){var g=document.body.scrollTop;Dd(m.top-g,m.bottom-g)&&(e=!0,k=xa.length)}xa.push(h)}}});p&&a===e||(e=a,f=xa,h=0,-1<k&&(h=k),-1<qa&&(h=qa),
l=0<xa.length?xa[h]:null);return g=b={limit:b,hasMore:cb,count:xa.length,items:xa,index:h}}};function If(){function a(a,c){z(!0===a.Eb,"Only commands supported due to optimizations");a.Eb=a.Eb||!0;a.shiftKey=!!a.shiftKey;a.which=a.charCode||a.key.charCodeAt(0);a.Fb=c;m.push(a)}function b(a){var c=p[a.keyCode];if(!c)return!0;Nb("editingKeyEventOccurred",a);return c(a)?X(a):!0}function c(a){a=g(a);return 2===a?Z.execCommand("deleteword"):4===a?Z.execCommand("deleteline"):Z.execCommand("delete")}function d(a){a=g(a);return 2===a?Z.execCommand("forwarddeleteword"):4===a?Z.execCommand("forwarddeleteline"):
Z.execCommand("forwarddelete")}function e(a){var c=!1;a=g(a);0===a?c=Z.execCommand("insertparagraph"):1===a?c=Z.execCommand("insertlinebreak"):2===a?c=Z.execCommand("inserttodo","toggle"):4!==a&&6!==a&&(c=!0);return c}function f(a){var c=!1;a=g(a);0===a?c=Z.execCommand("tab",""):1===a&&(c=Z.execCommand("tab","true"));return c}function g(a){return(a.shiftKey?1:0)+(a.altKey?2:0)+(a.metaKey?4:0)+(a.ctrlKey?8:0)}function h(a){if(a.ctrlKey||a.metaKey)for(var c=m.length-1;0<=c;c--){var b=m[c];if((null==
a.which?a.keyCode:a.which)===b.which&&a.shiftKey===b.shiftKey)return b.Fb.call(null),X(a)}return!0}var l=this;z(this instanceof If,"Use `new` to instantiate this class");l.name="keyboard";var m=[],p={};l.G=function(g){g=B(g,{shortcuts:!0,editing:!0,custom:null,root:null});var n=g.root||document.body;g.shortcuts&&(a({key:"z",Eb:!0},Z.execCommand.bind(Z,"undo")),a({key:"z",Eb:!0,shiftKey:!0},Z.execCommand.bind(Z,"redo")),a({key:"y",Eb:!0},Z.execCommand.bind(Z,"redo")),a({key:"b",Eb:!0},Z.execCommand.bind(Z,
"bold")),a({key:"i",Eb:!0},Z.execCommand.bind(Z,"italic")),a({key:"u",Eb:!0},Z.execCommand.bind(Z,"underline")));g.editing&&(p[9]=f,p[13]=e,p[46]=d,p[8]=c,l.D.listener(n,"keydown",b));if(g.custom){var q=g.custom;z(fa(g.custom),"Expected an Array for custom keyboard definitions");for(g=0;g<q.length;g++){var y=q[g],t=y.key,y=y.fn;z(u(t)&&"function"==ea(y),'Expected "key" and "fn"');a({key:t,Eb:!0,shiftKey:t.toUpperCase()===t},y)}}0<m.length&&l.D.listener(n,"keypress",h)};l.S=function(){m=[]}};function Jf(){var a=this;a.name="context";a.G=function(b){function c(){l=!1;var c=a.B();m&&c&&Qd(c,m)||(g={},h={},m=c?c.cloneRange():null)}var d=b.root;z(J(d),"We expect a valid root element",d);a.root=d;var e=b.Fa||W(a.root)||null,f=!1;a.xa={};a.W=function(c){return a.xa[c]||{}};var g={},h={},l=!1,m=null;a.jh=function(){var c;void 0===c&&(c=a.B());m=c};a.J=function(){return l};a.Sd=function(a){c();return g[a]};a.Ng=function(a,b){c();g[a]=b;l=!0};a.Kf=function(a){c();delete g[a];l=!(!Object.keys(g).length&&
!Object.keys(h).length)};a.Td=function(a){c();return h[a]};a.If=function(a,b){c();h[a]=b;l=!0};a.ih=function(a){c();delete h[a];l=!0};a.Tg=function(){a.ud("getActiveRangeStartContainerComputedStyle",function(){var c=a.B();return c&&c.startContainer?Rc(c.startContainer):null})};var p={};a.B=function(){return e};a.$b=function(c){Qd(e,c)||(e=c||null,f=!0,a.A())};a.ce=function(c,b){e.setStart(c,b);f=!0;a.A()};a.be=function(c,b){e.setEnd(c,b);f=!0;a.A()};a.Qa=function(){a.$b(W(d)||null);f=!1};a.dh=function(){a.Ia()};
a.fh=function(){function c(a,b){for(var d=b,f=a,e=!0;e;)if(e=f.previousSibling&&Nc(f.previousSibling))d+=O(f.previousSibling),f=f.previousSibling;return d}var b=a.B(),d=c(b.startContainer,b.startOffset),f=c(b.endContainer,b.endOffset);b.startContainer.parentNode.normalize();b.startContainer!==b.endContainer&&b.endContainer.parentNode.normalize();a.ce(b.startContainer,d);a.be(b.endContainer,f)};a.eh=function(c){if(Nc(c)){for(var b=O(c),d=c,f=!0;f;)if(f=d.previousSibling&&Nc(d.previousSibling))b+=O(d.previousSibling),
d=d.previousSibling;c.parentNode.normalize();a.O(d,b);a.Ia()}else a.O(c.parentNode,K(c)+1)};a.Ia=function(){f&&(Jd(e,d),a.Qa(),a.A())};a.de=function(c){e||(e=d.ownerDocument.createRange());e.selectNode(c);f=!0;a.A()};a.O=function(c,b,h,g){e||(e=d.ownerDocument.createRange());e.setStart(c,b);h?e.setEnd(h,g||0):e.setEnd(c,b);f=!0;a.A()};a.ba=function(c,b,d){b&&-1===d&&(d=b.childNodes.length);var f=c.parentNode,h=K(c);z(!!e,"Global range expected");for(var g=[[e.startContainer,e.startOffset],[e.endContainer,
e.endOffset]],m=g.length,p=0;p<m;p++){var l=g[p];l[0]===b&&l[1]>d&&l[1]++;l[0]!==f||l[1]!==h&&l[1]!==h+1||(b?(l[0]=b,l[1]+=d-h):l[1]>h&&0<l[1]&&--l[1]);l[0]===f&&l[1]>h+1&&l[1]--;!b&&Oc(l[0],c)&&(l[0]=c.parentNode,l[1]=K(c))}b?b.childNodes.length===d?b.appendChild(c):b.insertBefore(c,b.childNodes[d]):I(c);a.O(g[0][0],g[0][1],g[1][0],g[1][1]);a.A()};a.Jg=function(c,b,d){z(c!==b,"Do not move into itself");for(var f;f=c.firstChild;)a.ba(f,b,0>d?-1:d++)};a.insertBefore=function(c,b,d){a.ba(c,b,d?K(d):
-1)};a.zc=function(c,b){a.ba(c,b,-1)};a.removeNode=function(c){a.ba(c)};a.Mg=function(c){for(;c.firstChild;)a.removeNode(c.firstChild);a.A()};a.Xa=function(c,b){if(c&&c.tagName.toLowerCase()===b.toLocaleLowerCase())return c;var d=c.parentNode;if(!d)return c;for(var f=M(b),e=0;e<c.attributes.length;e++)f.setAttributeNS(c.attributes[e].namespaceURI,c.attributes[e].name,c.attributes[e].value);a.ba(f,d,K(c));a.Jg(c,f,0);a.removeNode(c);return f};a.hasFocus=function(){var a=W(d);if(a){if(Nd(a,"div.en-module",
d))return!1;if((a=Od(a))&&!0===!(!P(a,$c)&&!$c(document.body)))return!0}return!1};var r=!1;a.zg=function(a){r=!0===a;Nb("noteReadOnlyStateChanged",{readOnly:r})};a.Jb=function(){return r};a.A=function(){p={}};a.I=function(a,c){p[a]=c};a.C=function(a){return p[a]};a.ud=function(a,c){var b=p[a];void 0===b&&(b=c(a),p[a]=b);return b};a.dump=function(){var c;if(c=a.B()){var b=Je(d,c);c=d.cloneNode(!0);if(b=Ke(c,b)){if(b.startContainer.nodeType==Node.TEXT_NODE||b.startContainer.nodeType==Node.COMMENT_NODE)b.collapsed?
b.startContainer.insertData(b.startOffset,"[]"):b.startContainer.insertData(b.startOffset,"[");else{var f=b.collapsed?"{}":"{";b.startOffset!=b.startContainer.childNodes.length&&b.startContainer.childNodes[b.startOffset].nodeType==Node.TEXT_NODE?b.startContainer.childNodes[b.startOffset].insertData(0,f):0!=b.startOffset&&b.startContainer.childNodes[b.startOffset-1].nodeType==Node.TEXT_NODE?b.startContainer.childNodes[b.startOffset-1].appendData(f):b.startContainer.insertBefore(document.createTextNode(f),
b.startContainer.childNodes.length==b.startOffset?null:b.startContainer.childNodes[b.startOffset])}b.collapsed||(b.endContainer.nodeType==Node.TEXT_NODE||b.endContainer.nodeType==Node.COMMENT_NODE?b.endContainer.insertData(b.endOffset,"]"):b.endOffset!=b.endContainer.childNodes.length&&b.endContainer.childNodes[b.endOffset].nodeType==Node.TEXT_NODE?b.endContainer.childNodes[b.endOffset].insertData(0,"}"):0!=b.endOffset&&b.endContainer.childNodes[b.endOffset-1].nodeType==Node.TEXT_NODE?b.endContainer.childNodes[b.endOffset-
1].appendData("}"):b.endContainer.insertBefore(document.createTextNode("}"),b.endContainer.childNodes.length==b.endOffset?null:b.endContainer.childNodes[b.endOffset]))}c=c.innerHTML}else c=d.innerHTML;return c}};a.S=function(){a.root=null}};function Kf(){var a=this,b=this;b.name="block";b.G=function(){var c=b.H("context"),d=b.H("query"),e=b.H("format"),f=c.root;a.Rb=function(a){if((a=d.oa(a))&&(d.M(a)||d.yb(a)))if(d.Fd(a)){var b=a.getElementsByTagName("object");if(0<b.length){var f=!1,b=b[b.length-1];vd(b.lastChild||b,function(a){return f=S(a)||d.va(a)},a);f||c.zc(M("br"),a)}}else c.Mg(a),d.jc(a)?c.zc(Ic(),a):c.zc(M("br"),a)};a.Wa=function(b){if(d.M(b))if(d.Vb(b).every(function(a){return!d.ja(b,a)||!d.pa(b,a)})){var f=L(b);"dd"===f||
"dt"===f?e.Db([b],function(a){return R(a,"dl")&&!a.attributes.length},function(){return M("dl")}):d.pa("p",d.Wb(b))&&d.Kc(b)&&("div"!==f&&(b=c.Xa(b,"div"),a.Wa(b)),Ta(b.childNodes).filter(d.Kc).forEach(function(b){var c=e.Ja([b]);a.Ha([b]);e.za(c)}))}else if(!d.pa(b,b.parentNode)){for(f=e.Ja([b]);!d.pa(b,b.parentNode);)a.Ha([b]);e.za(f)}};a.Yb=function(a){if(R(a,"li")&&d.M(a)&&d.M(a.parentNode)){for(var b=function(a){return Q(a,"ol,ul")},f=!1,e=null;Ta(a.childNodes).some(b);){var g=a.lastChild;b(g)||
!e&&yd(g)?(e=null,c.ba(g,a.parentNode,1+K(a)),f=!0):d.ya(g)?c.removeNode(g):(e||(e=M("li"),a.parentNode.insertBefore(e,a.nextSibling)),c.ba(g,e,0),f=!0)}f&&d.Ab(a,0)&&c.removeNode(a)}};a.C=function(){if(!c.B()||0===f.getElementsByTagName("li").length)return null;var a=d.Va(c.B()),a=d.vb(a,function(a){return d.M(a)&&!d.lc(a)&&(Q(a,"ol,ul")||Q(a.parentNode,"ol,ul")||d.pa(a,"li"))});return a.length?a:null};a.xb=function(){var b=a.C();if(!b)return"none";for(var c=[],f=!0,e=!1,g=[],n=b.length;n--;){var q=
b[n],y=!1,t=!1;if(J(q)){var A=d.Ec(q);null!==A&&(0>c.indexOf(A)&&c.push(A),y=!0);var G=d.Yg(q);G&&0<G.length&&(t=!0,null!==A&&(-1<G.indexOf(A)&&G.splice(G.indexOf(A),1),0<G.length&&(y=!1)))}q=q.parentNode;0>g.indexOf(q)&&(g.push(q),A=d.Ec(q),null!==A&&(0>c.indexOf(A)&&c.push(A),y=!0),R(q.parentNode,"li")&&(q=d.Ec(q.parentNode),null!==q&&(0>c.indexOf(q)&&c.push(q),y=!0)));f=f&&y;e=e||y||t;if(!f&&e)return"mixed"}return 0===c.length?"none":!f||1!==c.length&&1!==b.length?"mixed":c[0]};a.Qd=function(a){Uc(a)||
(a=Zc(a,f));if(!a||1!==a.nodeType)return"left";var b=Rc(a).textAlign.replace(/^-(moz|webkit)-/,"").replace(/^auto$/,"start");return"start"===b?"ltr"===d.Ie(a)?"left":"right":"end"===b?"ltr"===d.Ie(a)?"right":"left":-1!==["center","justify","left","right"].indexOf(b)?b:"left"};a.Sg=function(b){void 0===b&&(b={});var f="blockMerging"in b?Boolean(b.pi):!0,g="stripWrappers"in b?Boolean(b.Cd):!0,p="direction"in b?b.direction:"forward";if(c.B()){a.Bc(c.B().startContainer,c.B().startOffset,!1);a.Bc(c.B().endContainer,
c.B().endOffset,!1);b=d.pe(c.B().startContainer,c.B().startOffset);var r=b[0],n=b[1];b=d.ld(c.B().endContainer,c.B().endOffset);var q=b[0],y=b[1];if("after"!==d.Fc(q,y,r,n))c.B().collapse("forward"===p);else{3===r.nodeType&&0==n&&(n=K(r),r=r.parentNode);3===q.nodeType&&y==O(q)&&(y=1+K(q),q=q.parentNode);c.O(r,n,q,y);for(var t=c.B().startContainer;d.ja(t,t.parentNode)&&d.Z(t);)t=t.parentNode;if(!d.Y(t)&&!d.yb(t)||!d.pa("span",t)||Q(t,"td,th"))t=null;for(var A=c.B().endContainer;d.ja(A,A.parentNode)&&
d.Z(A);)A=A.parentNode;if(!d.Y(A)&&!d.yb(A)||!d.pa("span",A)||Q(A,"td,th"))A=null;b=e.tf();if(r==q&&d.M(r)&&3===r.nodeType)r.deleteData(n,y-n),a.Bc(r,n,!1),c.B().collapse("forward"===p);else{d.M(r)&&3===r.nodeType&&r.deleteData(n,O(r)-n);for(var G=d.vb(c.B(),function(a){return d.M(a)&&!Q(a,"thead,tbody,tfoot,tr,th,td")}),C=0;C<G.length;C++){var x=G[C];if(n=x.parentNode)if(n.removeChild(x),a.Rb(n),g||!Oc(r,n)&&n!=r)for(;d.M(n)&&d.Z(n)&&0==O(n);)x=n.parentNode,x.removeChild(n),n=x}d.M(q)&&3===q.nodeType&&
q.deleteData(0,y);a.Bc(c.B().startContainer,c.B().startOffset,!1);a.Bc(c.B().endContainer,c.B().endOffset,!1);if(f&&t&&A&&d.ja(t,A)&&t!=A){1===t.children.length&&d.Le(t.firstChild)&&t.removeChild(t.firstChild);if(Oc(A,t)){for(f=A;f.parentNode!=t;)f=f.parentNode;c.O(t,K(f));if(!A.hasChildNodes()){for(;d.M(A)&&1==A.parentNode.childNodes.length&&A.parentNode!=t;)n=A,n.removeChild(A),A=n;d.M(A)&&!d.Z(A)&&d.Z(A.previousSibling)&&d.Z(A.nextSibling)&&A.parentNode.insertBefore(M("br"),A.nextSibling);d.M(A)&&
A.parentNode.removeChild(A);e.Mb(b);return}if(!d.Z(A.firstChild)){e.Mb(b);return}g=[];for(g.push(A.firstChild);!S(g[g.length-1])&&d.Z(g[g.length-1].nextSibling);)g.push(g[g.length-1].nextSibling);for(f=e.Ja(g);Oc(t,g[0])&&g[0].parentNode!=t;)a.Ha(g);d.M(g[0].previousSibling)&&S(g[0].previousSibling)&&g[0].parentNode.removeChild(g[0].previousSibling)}else if(Oc(t,A)){c.O(t,O(t));for(f=t;f.parentNode!=A;)f=f.parentNode;d.Z(f.nextSibling)&&S(t.lastChild)&&t.removeChild(t.lastChild);g=[];f.nextSibling&&
!d.Y(f.nextSibling)&&g.push(f.nextSibling);g.length&&!S(g[g.length-1])&&g[g.length-1].nextSibling&&!d.Y(g[g.length-1].nextSibling)&&g.push(g[g.length-1].nextSibling);f=e.Ja(g);g.forEach(function(a){c.ba(a,t,-1)})}else{c.O(t,O(t));d.Z(A.firstChild)&&S(t.lastChild)&&t.removeChild(t.lastChild);for(f=e.Ja(Ta(A.childNodes));A.hasChildNodes();)c.ba(A.firstChild,t,-1);for(;!(A.hasChildNodes()||0<=["td"].indexOf(A.tagName.toLowerCase()));)n=A.parentNode,n.removeChild(A),A=n}for(var F=t;d.Wg(F).some(function(a){return d.ja(F,
a)&&(R(a,"ol")&&R(a.nextSibling,"ol")||R(a,"ul")&&R(a.nextSibling,"ul"))&&d.ja(F,a.nextSibling)});){for(;!(R(F,"ol")&&R(F.nextSibling,"ol")&&d.ja(F,F.nextSibling)||R(F,"ul")&&R(F.nextSibling,"ul")&&d.ja(F,F.nextSibling));)F=F.parentNode;for(;F.nextSibling.hasChildNodes();)c.ba(F.nextSibling.firstChild,F,-1);F.parentNode.removeChild(F.nextSibling)}e.za(f);a.Rb(t);e.hf(t)}else c.B().collapse("forward"===p)}e.Mb(b)}}};a.Ha=function(a){var b=a[0].parentNode;if(d.M(b)&&b.parentNode){-1!==a.indexOf(b.firstChild)&&
e.jf(b);var f=-1!==a.indexOf(b.firstChild)&&d.wd(b),g=-1!==a.indexOf(b.lastChild)&&d.Rc(b);if(-1===a.indexOf(b.firstChild)&&-1!==a.indexOf(b.lastChild)){for(var r=a.length-1;0<=r;r--)c.ba(a[r],b.parentNode,1+K(b));g&&!d.Rc(a[a.length-1])&&a[a.length-1].parentNode.insertBefore(M("br"),a[a.length-1].nextSibling);e.hf(b)}else{if(-1===a.indexOf(b.firstChild))for(r=b.cloneNode(!1),b.removeAttribute("id"),b.parentNode.insertBefore(r,b);a[0].previousSibling;)c.ba(b.firstChild,r,r.childNodes.length);for(r=
0;r<a.length;r++)c.ba(a[r],b.parentNode,K(b));f&&!d.wd(a[0])&&a[0].parentNode.insertBefore(M("br"),a[0]);d.Z(a[a.length-1])&&!S(a[a.length-1])&&S(b.firstChild)&&!d.Z(b)&&b.removeChild(b.firstChild);d.Ab(b,0)?(a=a[a.length-1],I(b),g&&!d.Rc(a)&&a.parentNode.insertBefore(M("br"),a.nextSibling)):e.jf(b)}}};a.Md=function(b){d.Fd(b)?a.Ha(Ta(b.childNodes)):c.removeNode(b)};a.A=function(a,b,c){if(0==a)return"";if(1==a&&!b&&!c)return" ";if(1==a)return"\u00a0";var d="",f;for(f=b?"\u00a0 ":" \u00a0";3<a;)d+=
f,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.Bc=function(b,c,f){void 0===f&&(f=!0);if(d.M(b)||d.yb(b)){for(;;)if(0<=c-1&&d.ja(b,b.childNodes[c-1]))b=b.childNodes[c-1],c=O(b);else if(0==c&&!d.wd(b)&&d.ja(b,b.parentNode))c=K(b),b=b.parentNode;else if(3===b.nodeType&&-1==["pre","pre-f.wrap"].indexOf(Rc(b.parentNode).whiteSpace)&&0!=c&&/[ \xa0]/.test(b.data[c-
1]))c--;else break;for(var e=b,g=c,n=0,q=0==c&&d.wd(b);;)if(g<e.childNodes.length&&d.ja(e,e.childNodes[g]))e=e.childNodes[g],g=0;else if(g==O(e)&&!d.Rc(e)&&d.ja(e,e.parentNode))g=1+K(e),e=e.parentNode;else if(3===e.nodeType&&-1==["pre","pre-f.wrap"].indexOf(Rc(e.parentNode).whiteSpace)&&g!=O(e)&&/[ \xa0]/.test(e.data[g]))f&&q&&" "==e.data[g]?e.deleteData(g,1):(q=" "==e.data[g],g++,n++);else break;f&&b===e&&Nc(b)&&c===g&&(q=(q=b.textContent.match(/^\s+/))?q[0]:"",q=q.length,q>=c&&(b.deleteData(0,q),
c=g=0));if(f)for(;"before"==d.Fc(b,c,e,g);)if(0<=g-1&&g-1<e.childNodes.length&&d.ja(e,e.childNodes[g-1]))e=e.childNodes[g-1],g=O(e);else if(0==g&&d.ja(e,e.parentNode))g=K(e),e=e.parentNode;else if(3===e.nodeType&&-1==["pre","pre-f.wrap"].indexOf(Rc(e.parentNode).whiteSpace)&&g==O(e)&&" "==e.data[e.data.length-1]&&d.Rc(e))g--,n--,e.deleteData(g,1);else break;for(f=a.A(n,0==c&&d.wd(b),g==O(e)&&d.Rc(e));"before"==d.Fc(b,c,e,g);)c<b.childNodes.length?(b=b.childNodes[c],c=0):3!=b.nodeType||c==O(b)?(c=
1+K(b),b=b.parentNode):(n=f[0],f=f.slice(1),n!=b.data[c]&&(b.insertData(c,n),b.deleteData(c+1,1)),c++)}};a.ye=function(a){T(a,"margin-left",d.zd(a)+40+"px")};a.Hd=function(){return c.ud("isSelectionAtList",function(){return!(!c.B()||!P(c.B().startContainer,"ul,ol",e.Cc()))})};a.Dg=function(){return c.ud("isSelectionAtTable",function(){return!(!c.B()||!P(c.B().startContainer,"table",e.Cc()))})};a.Xd=function(){return a.Dg()||a.Hd()};var g=".en-crypt-revealed",g=g+",.en-crypto-revealed";a.Bb=function(){return c.ud("isSelectionAtCryptUnveiled",
function(){var a=c.B();return!!(Nd(a,g,f)||0<Ud(a,g).length)})};a.J=function(){return c.ud("isSelectionAtModule",function(){return!!Nd(c.B(),"div.en-module",f)})}}};function Lf(){var a=this,b=this;b.name="query";b.G=function(){var c=b.H("context").root;a.nextNode=function(b){return b.hasChildNodes()?b.firstChild:a.kb(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.kb=function(a){for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null};a.Vb=function(a){for(var b=[];a.parentNode;)b.unshift(a.parentNode),a=a.parentNode;
return b};a.Wg=function(b){return a.Vb(b).concat(b)};a.xd=function(b){for(var c=[],d=a.kb(b);(b=a.nextNode(b))&&b!=d;)c.push(b);return c};a.Ie=function(b){return"ltr"==b.dir?"ltr":"rtl"==b.dir?"rtl":R(b.parentNode)?a.Ie(b.parentNode):"ltr"};a.Fc=function(b,c,d,e){if(b==d){if(c==e)return"equal";if(c<e)return"before";if(c>e)return"after"}if(d.compareDocumentPosition(b)&4){e=a.Fc(d,e,b,c);if("before"==e)return"after";if("after"==e)return"before"}if(d.compareDocumentPosition(b)&8){for(;d.parentNode!=
b;)d=d.parentNode;if(K(d)<c)return"after"}return"before"};a.J=function(a){for(;null!=a.parentNode;)a=a.parentNode;return a};a.Wd=function(b,c){var d=a.Fc(b,0,c.startContainer,c.startOffset),e=a.Fc(b,O(b),c.endContainer,c.endOffset);return a.J(b)==a.J(c.startContainer)&&"after"==d&&"before"==e};a.vb=function(b,c){"undefined"==typeof c&&(c=function(){return!0});var d=b.startContainer;d.hasChildNodes()&&b.startOffset<d.childNodes.length?d=d.childNodes[b.startOffset]:d=b.startOffset==O(d)?a.kb(d):a.nextNode(d);
var e=b.endContainer;e.hasChildNodes()&&b.endOffset<e.childNodes.length?e=e.childNodes[b.endOffset]:e=a.kb(e);for(var m=[];Xc(d,e);)a.Wd(d,b)&&c(d)?(m.push(d),d=a.kb(d)):d=a.nextNode(d);return m};a.hc=function(b,c){"undefined"==typeof c&&(c=function(){return!0});var d=b.startContainer;d.hasChildNodes()&&b.startOffset<d.childNodes.length?d=d.childNodes[b.startOffset]:d=b.startOffset==O(d)?a.kb(d):a.nextNode(d);var e=b.endContainer;e.hasChildNodes()&&b.endOffset<e.childNodes.length?e=e.childNodes[b.endOffset]:
e=a.kb(e);for(var m=[];Xc(d,e);)a.Wd(d,b)&&c(d)&&m.push(d),d=a.nextNode(d);return m};a.Kc=function(a){return Q(a,Ca)};a.Y=function(a){return!(!a||a!==c&&(!Uc(a)||D(a,"en-container")))};a.Z=function(b){return!(!b||a.Y(b))};a.Ab=function(b,c){var d=0;null==c&&(c=1);var e=a.xd(b);0===e.length&&(e=[b]);for(var m=e.length-1;0<=m;m--){var p=e[m];if(Nc(p)&&!yd(p)||S(p)&&++d>=c+1||je(p))return!1}return!0};a.M=function(b){return!(!b||!a.$(b)||1!==b.nodeType&&1!==b.parentNode.nodeType)};a.rg=function(b){for(var c=
0;c<b.childNodes.length;c++)if(a.M(b.childNodes[c])||a.rg(b.childNodes[c]))return!0;return!1};a.Vd=function(b){if(!S(b))return!1;var c=a.Wb(b),d=a.oa(b),e=!1,m=!1;vd(b,function(b){if(a.Y(b)||d!==a.oa(b))return!0;if(S(b))return m=!0;e=e||a.C(b);return!1},c);return!e&&!m};a.C=function(a){return 3===a.nodeType&&!yd(a)||je(a)};a.kc=function(b){if(!S(b))return!1;for(var c=b,d=a.Wb(b);(c=c.parentNode)&&!(1<c.childNodes.length||c===d);){if("li"===L(c))return!1;if(a.Y(c))break}var c=b,e=a.oa(b),m=!1,p=!1;
wd(c,function(b){if(a.Y(b)||e!==a.oa(b))return!0;if(S(b))return p=!0;m=m||a.C(b);return!1},d);var r=!1,n=!1;vd(c,function(b){if(a.Y(b)||e!==a.oa(b))return!0;if(S(b))return n=!0;r=r||a.C(b);return!1},d);return n||r||p||m?n||r?!1:m&&!r?!0:p?!1:!0:"li"===L(e)};a.Me=function(b){if(!yd(b))return!1;if(""===b.data)return!0;var c=b.parentNode;if(!c)return!0;for(;!a.Y(c)&&c.parentNode;)c=c.parentNode;for(var d=b;d!=c;){d=a.previousNode(d);if(a.Y(d)||S(d))return!0;if(3==d.nodeType&&!yd(d)||je(d))break}d=b;
for(b=a.kb(c);d!=b;){d=a.nextNode(d);if(a.Y(d)||S(d))return!0;if(d&&3==d.nodeType&&!yd(d)||je(d))break}return!1};a.Eg=function(b){if(!b)return!1;if(a.Y(b)||3===b.nodeType&&!a.Me(b)||je(b))return!0;for(var c=0;c<b.childNodes.length;c++)if(a.Eg(b.childNodes[c]))return!0;return!1};a.va=function(b){if(!b)return!1;if(a.Y(b)||je(b)||3===b.nodeType&&!a.Me(b)||S(b)&&!a.kc(b))return!0;for(var c=0;c<b.childNodes.length;c++)if(a.va(b.childNodes[c]))return!0;return!1};a.Fd=function(b){return pc(b).some(function(b){return a.va(b)})};
a.ya=function(b){return!!b&&!a.va(b)};a.Le=function(b){if(a.Vd(b)&&!a.kc(b))return!0;if(!a.Z(b)||1!=b.nodeType)return!1;for(var c=!1,d=0;d<b.childNodes.length;d++){if(!a.ya(b.childNodes[d])&&!a.Le(b.childNodes[d]))return!1;a.Le(b.childNodes[d])&&(c=!0)}return c};a.V=function(a){return-1!==ra.indexOf(L(a))};var d="body caption col colgroup frame frameset head html tbody td tfoot th thead tr".split(" "),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"]],[ra,pa],[["td","th"],"caption col colgroup tbody td tfoot th thead tr".split(" ")]];a.pa=function(b,c){if((-1!==wa.indexOf(c)||-1!==wa.indexOf(L(c)))&&"object"===typeof b&&3===b.nodeType&&!/^[ \t\n\f\r]*$/.test(b.data)||!(-1===ya.indexOf(c)&&-1===ya.indexOf(L(c))||"object"===typeof b&&3===b.nodeType)||"object"===typeof b&&(9===b.nodeType||11===b.nodeType||10===b.nodeType))return!1;R(b)&&(b=L(b));if(!u(b))return!0;if(R(c)){for(var h=c;h;){if("a"===b&&R(h,"a")||-1!==
pa.indexOf(b)&&a.V(h)||/^h[1-6]$/.test(b)&&R(h)&&/^h[1-6]$/.test(L(h)))return!1;h=h.parentNode}c=L(c)}if("object"===typeof c&&(1===c.nodeType||11===c.nodeType))return!0;if(!u(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!==d.indexOf(b)||-1!==["dd","dt"].indexOf(b)&&"dl"!==c||"li"===b&&"ol"!==c&&"ul"!==c)return!1;for(h=0;h<e.length;h++)if(-1!==e[h][0].indexOf(c)&&-1!==e[h][1].indexOf(b))return!1;return!0};a.jb=function(b){return a.M(b)&&a.va(b)&&(3===b.nodeType||je(b)||S(b))};a.lc=function(a){if(!R(a))return!1;var b=L(a);return"blockquote"===b?!0:"div"!==b?!1:"0px"!==Rc(a)["margin-left"]?!0:!1};a.Jd=function(b){if(!a.lc(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.ca=function(a){return Q(a,"address,div,h1,h2,h3,h4,h5,h6,listing,p,pre,xmp")};a.Pe=function(b){return a.ca(b)||Q(b,"li,dt,dd")};a.oa=function(b){for(;b&&!a.Y(b);)b=b.parentNode;return b};a.L=function(b,c){var d=!1;b?0===c?d=a.Y(b)||a.Ob(b)||!b.parentNode:0<=c-1&&c-1<b.childNodes.length&&(d=a.va(b.childNodes[c-
1])&&a.Y(b.childNodes[c-1])||S(b.childNodes[c-1])):d=!0;return d};a.I=function(b,c){var d=!1;b?c===O(b)?d=!b.parentNode||a.Y(b)||a.Ob(b):c<b.childNodes.length&&(d=a.va(b.childNodes[c])&&a.Y(b.childNodes[c])):d=!0;return d};a.A=function(b,c){return a.L(b,c)||a.I(b,c)};a.Va=function(b){var c=b.startContainer,d=b.startOffset,e=b.endContainer;b=b.endOffset;var m=a.Vb(c).concat(c).filter(function(a){return R(a,"li")}).slice(-1);m.length&&(d=K(m[0]),c=m[0].parentNode);if(!a.L(c,d)){do 0<=d-1&&(je(c.childNodes[d-
1])||a.Ob(c.childNodes[d-1]))?d--:0<=d-1&&J(c.childNodes[d-1])&&c.childNodes[d-1].hasChildNodes()?(c=c.childNodes[d-1],d=O(c)):0==d?(d=K(c),c=c.parentNode):d--,Nc(c)&&(d=K(c),c=c.parentNode);while(!a.A(c,d))}for(;0==d&&c.parentNode&&a.M(c)&&!a.Ob(c);)d=K(c),c=c.parentNode;m=a.Vb(e).concat(e).filter(function(a){return R(a,"li")}).slice(-1);m.length&&(b=1+K(m[0]),e=m[0].parentNode);if(!a.I(e,b)){do{if(b<O(e)&&(je(e.childNodes[b])||a.Ob(e.childNodes[b])))b++;else if(b<O(e)&&J(e)&&e.hasChildNodes())e=
e.childNodes[b],b=0;else if(b>=O(e)){if(a.Ob(e))break;b=1+K(e);e=e.parentNode}else b++;Nc(e)&&(b=1+K(e),e=e.parentNode)}while(!a.A(e,b))}for(;b==O(e)&&e.parentNode&&a.M(e)&&!a.Ob(e);)b=1+K(e),e=e.parentNode;return Id(c,d,e,b)};a.wd=function(b){for(var c=0;!a.A(b,c);){if(0<=c-1&&c-1<b.childNodes.length&&a.va(b.childNodes[c-1]))return!1;0!=c&&b.hasChildNodes()?(b=b.childNodes[c-1],c=O(b)):(c=K(b),b=b.parentNode)}return!0};a.Rc=function(b){for(var c=O(b);!a.A(b,c);){if(c<b.childNodes.length&&a.va(b.childNodes[c]))return!1;
c!=O(b)&&b.hasChildNodes()?(b=b.childNodes[c],c=0):(c=1+K(b),b=b.parentNode)}return!0};a.zd=function(a){return a&&a.style?Fe(a.style.marginLeft).value||0:0};a.Yd=function(b,c){if(!b||a.yb(b)||!J(b)||R(b,"table"))return!0;var d=b.style;if(d)for(var e=0;e<d.length;e++){var m=null,p=null,m=d[e],p=d.getPropertyValue(m);if(-1===va.indexOf(p)&&p&&-1===ua.indexOf(m))return!1}return c?a.Yd(b.parentNode):!0};a.ah=function(b){return!!P(b,"li,ol,ul,dl,dd,dt",a.Wb(b))};a.Ec=function(a){var b=L(a);return"ul"===
b&&D(a,"en-todo-list")?"tl":"ol"===b||"ul"===b?b:null};a.Yg=function(b){var c=[];b=b.querySelectorAll("ol,ul");for(var d=b.length;d--;){var e=a.Ec(b[d]);null!==e&&0>c.indexOf(e)&&c.push(e)}return c};a.xg=function(b,c){return a.Ec(b)===c};a.N=function(b,c){return 0===O(b)?null:c===O(b)&&b.parentNode&&a.Z(b)?[b.parentNode,1+K(b)]:0<=c&&c<b.childNodes.length&&0!==O(b.childNodes[c])&&a.Z(b.childNodes[c])?[b.childNodes[c],0]:null};a.R=function(b,c){return 0==O(b)?null:0==c&&b.parentNode&&a.Z(b)?[b.parentNode,
K(b)]:0<=c-1&&c-1<b.childNodes.length&&0!=O(b.childNodes[c-1])&&a.Z(b.childNodes[c-1])?[b.childNodes[c-1],O(b.childNodes[c-1])]:null};a.ld=function(b,c){for(var d;d=a.R(b,c);)b=d[0],c=d[1];return[b,c]};a.pe=function(b,c){for(var d;d=a.N(b,c);)b=d[0],c=d[1];return[b,c]};a.Ob=function(b){return!!(b&&J(b)&&(D(b,"en-container")||R(b,"td")||a.Y(b)&&!a.Yd(b,!1)))};a.jc=function(b){return c===b?!0:!!(b&&Oc(b,c)&&a.Ob(b))};a.yb=function(a){return c===a};a.Wb=function(b){return Oc(b,c)||a.yb(b)?c:null};a.$=
function(a){return Oc(a,c)};a.ja=function(b,c){return!(!a.Wb(b)||a.Wb(b)!=a.Wb(c))}}};function Mf(a){var b=U("*[id]:not(.en-module):not(.en-container):not(.en-todo):not(.en-media):not(.en-object-placeholder),*[class]:not(.en-module):not(.en-container):not(.en-todo):not(.en-media):not(.en-object-placeholder)",a);a=U(".en-resource *",a);for(var c=a.length;c--;)b.splice(b.indexOf(a[c]),1);for(c=b.length-1;0<=c;c--){var d=b[c];-1===za.indexOf(L(d))&&"en-editor-last-insertion-point"!==d.id&&d.removeAttribute("id");d.removeAttribute("class");d.attributes&&0<d.attributes.length&&Ta(d.attributes).forEach(function(a){0===
a.name.indexOf("data-")&&d.removeAttribute(a.name)})}}function Nf(a){ud("span",a).forEach(function(a){a.hasAttributes()||vc(a)})}
function Of(a){var b=a.ownerDocument.createNodeIterator(a,136,null,!1),c;for(a=[];c=b.nextNode();)a.push(c);for(b=a.length-1;0<=b;b--)if(c=a[b],8===c.nodeType)if(0==c.data.indexOf("[CDATA[")){var d=c.nextSibling;c=uc(c,document.createTextNode(c.data.substr(7)));c.data.lastIndexOf("]]")!=c.data.length-2&&d&&3==d.nodeType?(d.data=d.data.replace(/^(.*?)\]\]\>(.*?)$/gi,"$1$2"),c.data+=">"):c.data=c.data.replace(/^(.*?)\]\](.*?)$/gi,"$1$2")}else c.parentNode.removeChild(c);else uc(c,document.createTextNode(c.data))}
function Pf(a){a=a.querySelectorAll("*[style*='line-height']");for(var b=a.length-1;0<=b;b--){var c=a[b];c.style.lineHeight&&id(c,"line-height")}}var Qf=["javascript"];function Rf(a){var b=a;try{b=decodeURIComponent(b)||b}catch(c){v.warn("Could't decode invalid URI:",a),b="#"}b=b.replace(/[\x00-\x20]+/,"");b=b.replace(/<\!\-\-.*?\-\-\>/g,"");return(b=b.match(/^([a-zA-Z]+)\:/))?0<=Qf.indexOf(b[1].toLowerCase())?"#":a.trim()||"#":a||"#"}
function Sf(a){ud("span[style*='-evernote-last-insertion-point']",a).forEach(function(a){vc(a)})}function Tf(){return M("span",{style:"-evernote-last-insertion-point:true;",id:"en-editor-last-insertion-point"})}
function bg(a){for(var b=na.concat("id","contenteditable"),c=Ta(a.attributes||[]).map(function(a){return a.name.toLowerCase()}),d=0;d<c.length;d++){var e=c[d];-1===b.indexOf(e)&&a.removeAttribute(e)}ed(a);id(a,"height");id(a,"width");id(a,"max-height");id(a,"max-width");id(a,"min-height");id(a,"min-width");fd(a)}
function cg(a,b){for(var c='<div id="en-note"',d=0;d<na.length;d++){var e=na[d].toLowerCase();if(a.hasAttribute(e)){var f=a.getAttribute(e);if("lang"!==e||""!==f)c+=" "+e+'="'+f.replace(ib["&"],"&amp;").replace(ib["<"],"&lt;").replace(ib[">"],"&gt;").replace(ib['"'],"&quot;").replace(ib["'"],"&apos;")+'"'}}return c+">"+b+"</div>"};function dg(){var a=this,b=this;b.name="format";b.G=function(){var c=b.H("context"),d=b.H("query"),e=c.root,f={};f.createlink=f.unlink=function(a){for(;a&&(!R(a)||"a"!==L(a)||!a.hasAttribute("href"));)a=a.parentNode;return a?a.getAttribute("href"):null};f.backcolor=function(a){for(;a&&a!==e&&d.Z(a);){if(a.style){var b=a.style.backgroundColor;if(b&&"rgba(0, 0, 0, 0)"!==b&&""!==b&&"transparent"!==b)return Rc(a).backgroundColor}a=a.parentNode}return null};f.highlight=function(a){for(;a&&a!==e&&d.Z(a);){if(a.style&&
("rgb(255, 250, 165)"===a.style.backgroundColor||"true"===hd(a,"-evernote-highlight")||"true"===hd(a,"-evernote-highlighted")))return"rgb(255, 250, 165)";a=a.parentNode}return null};f.subscript=f.superscript=function(a){for(var b=!1,c=!1;d.Z(a);)R(a,"sub")?b=!0:R(a,"sup")&&(c=!0),a=a.parentNode;return b&&c?"mixed":b?"subscript":c?"superscript":null};f.strikethrough=function(a){return P(a,function(a){var b=L(a);return"s"===b||"strike"===b||"del"===b?!0:a.style&&(a=a.style.textDecoration)?-1!==a.indexOf("line-through"):
!1},c.root)?"line-through":null};f.underline=function(a){return P(a,function(a){return"u"===L(a)?!0:a.style&&(a=a.style.textDecoration)?-1!==a.indexOf("underline"):!1},c.root)?"underline":null};f.tt=function(a){return P(a,"tt",c.root)?"tt":null};a.jf=function(a){var b=a.previousSibling;if(b){for(;b.hasChildNodes();)b=b.lastChild;for(;d.ya(b)&&!d.kc(b)&&b!=a.parentNode;)b=d.previousNode(b);d.M(b)&&d.kc(b)&&b.parentNode.removeChild(b)}};a.hf=function(a){for(var b=a;b.hasChildNodes();)b=b.lastChild;
for(;d.ya(b)&&!d.kc(b)&&b!=a;)b=d.previousNode(b);if(d.M(b)&&d.kc(b)){for(;d.M(b.parentNode)&&d.ya(b.parentNode);)b=b.parentNode;b.parentNode.removeChild(b)}};a.ca=function(b){a.jf(b);a.hf(b)};a.Db=function(b,e,f){"undefined"==typeof e&&(e=function(){return!1});"undefined"==typeof f&&(f=function(){return null});if(b.every(d.ya)&&!b.some(function(a){return S(a)})||!b[0].parentNode)return null;for(d.Z(b[b.length-1])&&!S(b[b.length-1])&&S(b[b.length-1].nextSibling)&&b.push(b[b.length-1].nextSibling);d.ya(b[0].previousSibling);)b.unshift(b[0].previousSibling);
for(;d.ya(b[b.length-1].nextSibling);)b.push(b[b.length-1].nextSibling);f=d.M(b[0].previousSibling)&&e(b[0].previousSibling)?b[0].previousSibling:d.M(b[b.length-1].nextSibling)&&e(b[b.length-1].nextSibling)?b[b.length-1].nextSibling:f();if(!f)return null;if(!f.parentNode){b[0].parentNode.insertBefore(f,b[0]);var g=c.B();g.startContainer==f.parentNode&&g.startOffset==K(f)&&c.ce(g.startContainer,g.startOffset+1);g.endContainer==f.parentNode&&g.endOffset==K(f)&&c.be(g.endContainer,g.endOffset+1)}g=b[0].parentNode;
if(Xc(f,b[0])){!d.Z(f)&&d.Z([].filter.call(f.childNodes,d.va).slice(-1)[0])&&d.Z(b.filter(d.va)[0])&&!S(f.lastChild)&&f.appendChild(M("br"));for(var h=0;h<b.length;h++)c.ba(b[h],f,-1)}else for(!d.Z(f)&&d.Z([].filter.call(f.childNodes,d.va)[0])&&d.Z(b.filter(d.va).slice(-1)[0])&&!S(b[b.length-1])&&f.insertBefore(M("br"),f.firstChild),h=b.length-1;0<=h;h--)c.ba(b[h],f,0);d.M(g)&&!g.hasChildNodes()&&g.parentNode.removeChild(g);if(d.M(f.nextSibling)&&e(f.nextSibling)){for(!d.Z(f)&&d.Z(f.lastChild)&&d.Z(f.nextSibling.firstChild)&&
!S(f.lastChild)&&f.appendChild(M("br"));f.nextSibling.hasChildNodes();)c.ba(f.nextSibling.firstChild,f,-1);c.removeNode(f.nextSibling)}a.ca(f);return f};a.L=function(b,c){return c.collapsed?!1:d.Wd(b,c)||b==c.startContainer&&3===b.nodeType&&O(b)!=c.startOffset||b==c.endContainer&&3===b.nodeType&&0!=c.endOffset||!(!b.hasChildNodes()||![].every.call(b.childNodes,function(b){return a.L(b,c)})||Oc(c.startContainer,b)&&3==c.startContainer.nodeType&&0!=c.startOffset||Oc(c.endContainer,b)&&3==c.endContainer.nodeType&&
c.endOffset!=O(c.endContainer))?!0:!1};a.ic=function(b,c){"undefined"==typeof c&&(c=function(){return!0});if(b.collapsed)return null;for(var e=b.startContainer;a.L(e.parentNode,b);)e=e.parentNode;for(var f=d.kb(b.endContainer);!f&&e||f&&Xc(e,f);){if(a.L(e,b)&&c(e))return e;e=d.nextNode(e)}return null};a.ub=function(b,c){"undefined"==typeof c&&(c=function(){return!0});if(b.collapsed)return[];for(var e=b.startContainer;a.L(e.parentNode,b);)e=e.parentNode;for(var f=d.kb(b.endContainer),g=[];!f&&e||f&&
Xc(e,f);)a.L(e,b)&&c(e)&&g.push(e),e=d.nextNode(e);return g};a.R=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.N=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.C=function(a,b,d){return null===b&&null===d||u(b)&&u(d)&&b==d&&!c.W(a).bc||u(b)&&u(d)&&c.W(a).bc&&c.W(a).bc(b,d)?!0:!1};a.J=function(b,c,d){return a.C(b,c,d)?!0:!1};a.ea=function(b,d){if(1!==b.nodeType&&(!b.parentNode||1!=b.parentNode.nodeType))return null;if(1!==b.nodeType)return a.ea(b.parentNode,d);var g=f[d];if(g)return g(b);z(!!c.W(d).Ma,"Bug: no relevantCssProperty for "+d+" in f.getEffectiveCommandValue");g=c.W(d).Ma;if(!g)return"";if(!Qc(b))return v.warn("We are not on rendered DOM for fontSize retieval",
b),Ad(b,g,e);if(b.style&&null!==b.style[g]&&""!==b.style[g])return b.style[g];g=Rc(b)[g];"fontname"===d&&"-webkit-standard"===g&&(g=(g=Yd.env)&&null!=g.defaultNoteFont?g.defaultNoteFont:"Default");return g};a.A=function(a,b){if(("backcolor"===b||"highlight"===b)&&Uc(a))return null;var d=L(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 f=c.W(b),g=f.Ma;if(null===g)return null;var h=a.style[g];if(""!=h)return(d=
f.La)&&d.length?("highlight"===b&&(h=xe(h)),-1!==d.indexOf(h)?h:null):h;if("font"===d){if("color"==g&&a.hasAttribute("color"))return a.color;if("fontFamily"==g&&a.hasAttribute("face"))return a.face;if("fontSize"==g&&a.hasAttribute("size"))return Qc(a)?Rc(a).fontSize.toString():(v.warn("We are not on rendered DOM for fontSize retieval",a),Ad(a,"fontSize",e))}return"fontWeight"!=g||"b"!=d&&"strong"!=d?"fontStyle"!=g||"i"!=d&&"em"!=d?null:"italic":"bold"};a.$=function(b,d,e){for(var f=b;a.R(f)&&1==f.childNodes.length&&
a.R(f.firstChild)&&(!a.N(f)||!a.C(d,a.A(f,d),e));)f=f.firstChild;if(f!=b&&a.N(f)&&a.C(d,a.A(f,d),e)&&a.J(d,a.ea(f,d),e)){for(;f.hasChildNodes();)c.ba(f.firstChild,f.parentNode,K(f));b.parentNode.insertBefore(f,b.nextSibling);c.ba(b,f,-1)}};a.Ja=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.A(e,d);)e=e.parentNode;
e&&1==e.nodeType?c.push([b,d,a.A(e,d)]):c.push([b,d,null])})});return c};a.za=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.A(e,d);)e=e.parentNode;null===b&&e&&1==e.nodeType?a.V(c,d,null):(e&&1==e.nodeType&&!a.C(d,a.A(e,d),b)||(!e||1!=e.nodeType)&&null!==b)&&a.I(c,d,b)})};a.Ge=function(b,e){if(d.M(b)&&null!==a.A(b,e))if(a.N(b)){for(var f=Array.prototype.slice.call(b.childNodes),g=0;g<f.length;g++)c.ba(f[g],b.parentNode,
K(b));b.parentNode.removeChild(b)}else"strikethrough"===e&&-1!=b.style.textDecoration.indexOf("line-through")&&("line-through"==b.style.textDecoration?b.style.textDecoration="":b.style.textDecoration=b.style.textDecoration.replace("line-through","")),"underline"===e&&-1!=b.style.textDecoration.indexOf("underline")&&("underline"==b.style.textDecoration?b.style.textDecoration="":b.style.textDecoration=b.style.textDecoration.replace("underline","")),null!==c.W(e).Ma&&(b.style[c.W(e).Ma]=""),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.A(b,e)||c.Xa(b,"span")};a.V=function(b,c,e){if(b.parentNode&&1==b.parentNode.nodeType&&!a.J(c,a.ea(b,c),e)){for(var f=b.parentNode,g=[];d.M(f)&&1==f.nodeType&&!a.J(c,a.ea(f,c),e);)g.push(f),f=f.parentNode;if(g.length){var h=a.A(g[g.length-
1],c);if(null!==h||h==e)if(null===e||a.J(c,a.ea(g[g.length-1].parentNode,c),e))for(;g.length;)for(f=g.pop(),null!==a.A(f,c)&&(h=a.A(f,c)),e=Array.prototype.slice.call(f.childNodes),null!==a.A(f,c)&&a.Ge(f,c),f=0;f<e.length;f++){var l=e[f];l!=b&&(1!=l.nodeType||null===a.A(l,c)||a.C(c,h,a.A(l,c)))&&l!=g[g.length-1]&&a.I(l,c,h)}}}};a.I=function(b,e,f){if(b.parentNode&&null!==f&&(d.pa(b,"span")&&(a.$(b.previousSibling,e,f),a.$(b.nextSibling,e,f),a.Db([b],function(b){return a.N(b)&&a.C(e,a.A(b,e),f)&&
a.J(e,a.ea(b,e),f)},function(){return null})),!d.ya(b)&&!a.J(e,a.ea(b,e),f)&&b.parentNode))if(!d.pa(b,"span")){for(var g=[],h=0;h<b.childNodes.length;h++){if(1==b.childNodes[h].nodeType){var l=a.A(b.childNodes[h],e);if(null!==l&&!a.C(e,f,l))continue}g.push(b.childNodes[h])}for(h=0;h<g.length;h++)a.I(g[h],e,f)}else if(!a.J(e,a.ea(b,e),f)){g=null;if("bold"!==e||"bold"!==f&&"700"!==f)if("italic"===e&&"italic"===f)g=M("i");else if("strikethrough"===e&&"line-through"==f)g=M("s");else if("underline"===
e&&"underline"===f)g=M("u");else if("tt"===e&&"tt"===f)g=M("tt");else if("createlink"===e||"unlink"===e)for(g=M("a"),g.setAttribute("href",f),h=b.parentNode;h;)R(h,"a")&&(h=c.Xa(h,"span")),h=h.parentNode;else"subscript"!==e&&"superscript"!==e||"subscript"!==f?"subscript"!==e&&"superscript"!==e||"superscript"!==f||(g=M("sup")):g=M("sub");else g=M("b");g||(g=M("span"));b.parentNode.insertBefore(g,b);h=c.W(e).Ma;null===h||g.style[h]===f||a.J(e,a.ea(g,e),f)||(g.style[h]=f,"highlight"===e&&T(g,"-evernote-highlight",
"true"));"forecolor"===e&&ye(f)&&g.style.color!==f&&(g.style.color=f);"fontname"===e&&null!=f&&g.style.fontFamily!==f&&(g.style.fontFamily=f);"fontsize"===e&&null!=f&&g.style.fontSize!==f&&(g.style.fontSize=f);"strikethrough"===e&&"line-through"==f&&"line-through"!=a.ea(g,"strikethrough")&&(g.style.textDecoration="line-through");"underline"===e&&"underline"==f&&"underline"!=a.ea(g,"underline")&&(g.style.textDecoration="underline");c.ba(b,g,g.childNodes.length);if(1===b.nodeType&&!a.C(e,a.ea(b,e),
f)){c.ba(b,g.parentNode,K(g));g.parentNode.removeChild(g);g=[];for(h=0;h<b.childNodes.length;h++){if(1==b.childNodes[h].nodeType&&(l=a.A(b.childNodes[h],e),null!==l&&!a.C(e,f,l)))continue;g.push(b.childNodes[h])}for(h=0;h<g.length;h++)a.I(g[h],e,f)}}};a.Ga=function(b,e,f){var g=!1,h=!1,l=a.H("textinput");void 0===f&&((f=l.Vg())?h=!0:(f=c.B(),g=!0));if(null===a.ic(f,d.jb))c.jh(),c.W(b).La&&c.Ng(b,-1!=c.W(b).La.indexOf(e)),"subscript"===b&&c.Kf("superscript"),"superscript"===b&&c.Kf("subscript"),null===
e?c.ih(b):("createlink"===b||c.W(b).value)&&c.If(b,e);else{if(d.M(f.startContainer)&&3==f.startContainer.nodeType&&0!=f.startOffset&&f.startOffset!=O(f.startContainer)){var t;if(f.startContainer==f.endContainer){var A=f.endOffset-f.startOffset;t=f.startContainer.splitText(f.startOffset);f.setEnd(t,A)}else t=f.startContainer.splitText(f.startOffset);f.setStart(t,0)}d.M(f.endContainer)&&3==f.endContainer.nodeType&&0!=f.endOffset&&f.endOffset!=O(f.endContainer)&&(t=[f.startContainer,f.startOffset],A=
[f.endContainer,f.endOffset],f.endContainer.splitText(f.endOffset),f.setStart(t[0],t[1]),f.setEnd(A[0],A[1]));g?c.$b(f):h&&l.hh(f);a.ub(f,function(a){return d.M(a)&&1===a.nodeType}).forEach(function(c){a.Ge(c,b)});a.ub(f,d.M).forEach(function(c){a.V(c,b,e);d.pa(c,"span")&&a.I(c,b,e)})}};var g="bold italic strikethrough subscript superscript underline highlight tt".split(" "),h=["fontname","fontsize","forecolor"],l=["object"];a.ae=function(){var a=[];void 0!==c.Td("createlink")&&a.push(["createlink",
c.Td("createlink")]);g.forEach(function(b){void 0!==c.Sd(b)&&a.push([b,c.Sd(b)])});h.forEach(function(b){void 0!==c.Td(b)&&a.push([b,c.Td(b)])});return a};a.tf=function(b){var e=[],f=a.ic(c.B(),d.jb);!f&&b&&(b=c.B())&&(f=Od(b));if(!f)return e;e.push(["createlink",a.ea(f,"createlink")]);g.forEach(function(b){var d=a.ea(f,b);-1!=c.W(b).La.indexOf(d)?e.push([b,!0]):e.push([b,!1])});if(-1!==l.indexOf(L(f)))return e;h.forEach(function(a){e.push([a,c.W(a).value()])});return e};a.Mb=function(b){var e=a.ic(c.B(),
d.jb);if(null!==e)for(var f=0;f<b.length;f++){var g=b[f][0],h=b[f][1];"boolean"===typeof h&&c.W(g).state()!==h?c.W(g).action(h):u(h)&&!a.C(g,a.ea(e,g),h)&&c.W(g).action(h);e=a.ic(c.B(),d.jb)||e}else for(f=0;f<b.length;f++)g=b[f][0],h=b[f][1],"boolean"==typeof h&&c.Ng(g,h),u(h)&&c.If(g,h)};a.bh=function(b){var d=a.tf(!0);b();c.Ia();a.Mb(d)};a.Cc=function(){return d.Wb(Od(c.B()))}}};function eg(){var a=this;a.name="normalize";var b=/\n\r|\r\n|\r|\n/gi,c=/\s/gi;a.G=function(){function d(a,b,c){if(0>a||0>b){var d=c.style.marginLeft?c.style.marginLeft:"0",e=c.style.marginTop?c.style.marginTop:"0";a=c.style.left?c.style.left:"0";b=c.style.top?c.style.top:"0";if(0===d.indexOf("-")||0===e.indexOf("-"))(e=De(e))&&0>c.offsetTop&&0>e.value&&(qf(c),T(c,"margin-top",e.value-c.offsetTop+"px")),(d=De(d))&&0>c.offsetLeft&&0>d.value&&(qf(c),T(c,"margin-left",d.value-c.offsetLeft+"px"));if(0===
b.indexOf("-")||0===a.indexOf("-"))b=De(b).value,a=De(a).value,0>c.offsetTop&&0>b&&(qf(c),T(c,"top",b-c.offsetTop+"px")),0>c.offsetLeft&&0>a&&(qf(c),T(c,"left",a-c.offsetLeft+"px"))}}function e(a){var b=Rc(a)||{},b={fontWeight:b.fontWeight,xh:b.fontFamily,fontSize:Fe(b.fontSize).value||0,marginTop:Fe(b.marginTop).value||0,marginBottom:Fe(b.marginBottom).value||0},c=Rc(a.parentNode)||{};a=C.Xa(a,"div");b.fontWeight&&"normal"!==b.fontWeight&&400!=b.fontWeight&&(a.style.fontWeight=b.fontWeight);b.fontFamily&&
b.xh!==c.fontName&&(a.style.fontFamily=b.fontFamily);b.fontSize&&b.fontSize!==(Fe(c.fontSize).value||0)&&(a.style.fontSize=b.fontSize.toString()+"px");0<=1*b.marginTop-(Fe(c.fontSize).value||0)&&(x.ah(a)?(a.appendChild(M("br")),a.appendChild(M("br"))):(b=Ic(),C.ba(b,a.parentNode,K(a)),ed(b),m(b),fd(b)));return a}function f(a){if(!a)return a;Uc(a)&&(a=C.Xa(a,"div"));qf(a);id(a,"white-space");id(a,"word-wrap");id(a,"word-break");for(var d=pc(a),e,h,l=C.B(),n=0;n<d.length;n++){var m=d[n];if(Nc(m)){for(var x=
m.textContent.split(b),p=M("div"),A=0;A<x.length;A++){var r=x[A].replace(c,"\u00a0").replace(Aa,"\u00a0 ");r&&p.appendChild(document.createTextNode(r));A<x.length-1&&p.appendChild(M("br"))}if(l.startContainer===m||Oc(m,l.startContainer))e=g(p,l.startOffset);if(l.endContainer===m||Oc(m,l.endContainer))h=g(p,l.endOffset);uc(m,p);vc(p)}else f(m)}e&&null!==e[0]&&C.ce(e[0],e[1]);h&&null!==h[0]&&C.be(h[0],h[1]);return a}function g(a,b){for(var c=0,d=null,e=0,f=0;f<a.childNodes.length;f++){var g=a.childNodes[f],
h=g.length||1;if(c<b)c+=h,e=h-(c-b),d=g;else{c==b&&(e=0,d=g);break}}return[d,e]}function h(){if(!t(Y,!0)&&x.Ab(Y)){tc(Y);var a=Ic();Y.appendChild(a);C.O(a,0)}}function l(a){if(J(a)&&(a=a.getElementsByTagName("*")))for(var b=a.length-1;0<=b;b--){var c=a[b];c.hasChildNodes()||Uc(c)||je(c)||S(c)||C.removeNode(c)}}function m(a){(a=q(a))&&G(a,"div>div,div>table,div>ol,div>ul").forEach(function(a){var b=a.parentNode;if(b&&!x.jc(b)&&!x.jc(a)){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=x.zd(b)+x.zd(a);0<c?T(a,"margin-left",c+"px"):id(a,"margin-left")}var c=[a],d=F.Ja(c);ga.Ha(c);F.za(d);p(x.oa(a))}})}function p(a){var b=a&&a.nextSibling;b&&!t(b)&&C.removeNode(b);(a=a&&a.previousSibling)&&!t(a)&&C.removeNode(a)}function r(a){if(Q(a,"ul,ol")&&x.M(a)&&x.Yd(a,!0))for(var b=null,c=a.childNodes.length-1;0<=c;c--){var d=a.childNodes[c];Q(d,"li,ol,ul")?b=null:Uc(d)?C.Xa(d,"li"):yd(d)?C.removeNode(d):(b||(b=M("li"),C.insertBefore(b,d.parentNode,d.nextSibling)),
C.ba(d,b,0))}}function n(a){z(!!a,"expected node");if("hr"===L(a)){var b=M("div");b.appendChild(a);return b}b=Id(a,0);b=x.Va(b);if(b.collapsed)return null;for(;x.Y(a=b.startContainer.childNodes[b.startOffset]);)b.setStart(a,0);a=x.vb(b);if(0>=a.length)return Pd(b);for(var b=a[0].parentNode,c=(x.Y(b)||x.Ob(b))&&a[0]===b.firstChild&&a[a.length-1]===b.lastChild;a.length&&yd(a[0]);)C.removeNode(a.shift());var d=x.jc(b);if(c){if(!d)return b;if(0>=a.length||!pc(b).some(function(a){return t(a)}))return ga.Rb(b),
b}a.length&&(c=F.Ja(a),b=F.Db(a,function(){return!1},function(){return M("div")}),F.za(c),ga.Wa(b));return b}function q(a){for(var b;a&&!Q(a,"div.en-module,object")&&(b=a.firstChild);)a=b;return a}function y(a){var b=P(a,"div.en-module,object",Y);return b&&b!==a?!0:!1}function t(a,b){if(!a)return!1;if(3===a.nodeType&&!x.Me(a)||je(a)||Q(a,"table,tr,td,th,li")||S(a)&&(b?!x.Vd(a):!x.kc(a)))return!0;for(var c=0;c<a.childNodes.length;c++)if(t(a.childNodes[c],b))return!0;return!1}function A(a,b){for(var c=
[];a&&a!==Y;)-1!==b.indexOf(L(a))&&c.unshift(a),a=a.parentNode;return c}function G(a,b){for(var c=[];a&&a!==Y;)Q(a,b)&&c.unshift(a),a=a.parentNode;return c}var C=a.H("context"),x=a.H("query"),F=a.H("format"),ga=a.H("block"),Y=C.root,Aa=/\u00a0\u00a0/gi,ca={dl:function(a){if(a){for(var b=a.getElementsByTagName("dt"),c=b.length;c--;)e(b[c]);b=a.getElementsByTagName("dd");for(c=b.length;c--;)ga.ye(e(b[c]));return e(a)}return a}};ca.h1=ca.h2=ca.h3=ca.h4=ca.h5=ca.h6=ca.p=e;ca.center=function(a){a=e(a);
T(a,"text-align","center")};ca.blockquote=function(a){a=e(a);a.style.marginLeft="";ga.ye(a);pc(a).forEach(m);return a};ca.th=function(a){a=C.Xa(a,"td");var b=document.createRange();b.selectNodeContents(a);F.Ga("bold","bold",b);return a};ca.ol=ca.ul=function(a,b){b||(ud("li div",a).forEach(function(a){x.jc(a)||ga.Md(a)}),ud("li",a).forEach(ga.Yb),ud('li[style*="list-style:"]',a).forEach(function(a){if("none"===hd(a,"list-style")){for(;yd(a.previousSibling);)C.removeNode(a.previousSibling);Q(a.previousSibling,
"li")?(C.Jg(a,a.previousSibling,-1),C.removeNode(a)):a.removeAttribute("style")}}));r(a);return a};ca.pre=function(a){return f(a)};var xa=Object.keys(ca);a.A=function(a){if(!a||y(a))return null;a=q(a);var b=!1,c=!1;A(a,xa).forEach(function(a){var d=L(a),e=ca[d];e&&(e(a,b,c),"pre"===d?c=!0:-1!==["ul","ol"].indexOf(d)&&(b=!0))});G(a,"*[style]").forEach(function(a){var b=hd(a,"white-space");if("pre"===b||"pre-wrap"===b)a=f(a),c=!0;for(var b=["line-height","max-width","min-width"],e=b.length;e--;){var g=
b[e];hd(a,g)&&(qf(a),id(a,g))}if(0>a.offsetTop||0>a.offsetLeft||a.style&&a.style.position)if(b=hd(a,"position"),"fixed"!==b||a.offsetParent&&a.offsetParent!==Y||(qf(a),T(a,"position","relative")),"absolute"===b&&a.offsetParent===Y&&(a.offsetParent.offsetHeight<a.offsetTop+a.offsetHeight&&a.style.top&&(qf(a),T(a,"position","relative"),id(a,"top")),a.offsetParent.offsetWidth<a.offsetLeft+a.offsetWidth&&a.style.left&&(qf(a),T(a,"position","relative"),id(a,"left"))),0>a.offsetTop||0>a.offsetLeft){b=a.offsetParent;
e=a.offsetTop;for(g=a.offsetLeft;null!==b&&b!==Y;){b.offsetLeft&&(g+=b.offsetLeft);b.offsetTop&&(e+=b.offsetTop);var h=hd(b,"position");"absolute"!==h&&"fixed"!==h||b.offsetParent!==Y||(qf(b),0>b.offsetLeft||0>b.offsetTop?d(b.offsetTop,b.offsetLeft,b):T(b,"position","relative"));b=b.offsetParent}d(e,g,a)}});b||c||(a=q(a),a=n(a));a=q(a);qf(a);m(a);if(a=x.oa(a))l(a),p(a);rf();return a};a.mc=function(){a.A(Od(C.B()));h()};a.Kg=function(){a.A(Pd(C.B()));h()};a.We=function(){C.B().collapsed||a.Kg();a.mc()};
a.gh=function(){for(var b=Od(C.B()),c,d=2;b&&0<d;)yd(b)?c=Jc(b,Y):x.Z(b)?(--d,c=a.A(b),c=wd(c,function(a){return x.Z(a)&&x.oa(c)!==x.oa(a)},Y)):c=Jc(b,Y),b=c;h()};a.Wc=function(b,c){C.B()||C.O(Y,0);var d=0;c||(c=Ma);var e=F.Cc();ud("td:empty,th:empty",e).forEach(function(a){C.zc(Ic(),a)});ud("li:empty",e).forEach(function(a){C.zc(M("br"),a)});ud("hr",e).forEach(function(a){a.parentNode!==e&&ga.Ha([a])});for(var f=b||e.firstChild,g=[],l;f&&c(f)&&1111>d++;)if(f=q(f),-1!==g.indexOf(f))f=Mc(f,e);else{g.push(f);
if(yd(f)&&1<O(f.parentNode))l=Mc(f,e),C.removeNode(f);else if(x.Z(f)||Q(f,"td,li,div")){var n=f.nextSibling;(l=a.A(f))||(l=n);l=vd(l,function(a){return x.Z(a)&&!y(a)&&x.oa(l)!==x.oa(a)},e)}else l=Mc(f,e);f=l}h();0>=d&&v.error("Normalization reached safety limit, this probably indicates that the current document failed to get normalized and may behave unexpectedly.")};a.Pc=function(){C.B().collapsed?a.mc():a.Wc(Od(C.B()),function(a){var b=C.B(),c;if(c=b)b=Pd(b),c=!(null!=a&&null!=b&&a.compareDocumentPosition(b)&
2);return c})}}};function fg(){var a=this;a.name="editor";a.G=function(){function b(a,b){var d=!1;0==g&&null!=a?c.$b(a):0==g&&(c.Qa(),d=!0);g++;var e=Cb(function(){return b()});g--;d&&c.Ia();return e}var c=a.H("context"),d=a.H("query"),e=a.H("format");a.H("block");var f=c.xa;Ee(c.root);var g=0;a.execCommand=function(c,d,e,g){if(1===arguments.length||4<=arguments.length&&null==d)d=!1;if(2>=arguments.length||4<=arguments.length&&null==e)e="";return b(g,function(b,c,d){return function(){if(!(b in f&&a.queryCommandEnabled(b,
d)))return!1;var c=f[b],e=c.action(""===d?null:d);c.Gb&&a.H("spellcheck").Gb(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,e){return b(e,function(a,b){return function(){return a in f?c.W(a).enabled?c.W(a).enabled(b):c.hasFocus():!1}}(a,d))};a.queryCommandIndeterm=function(a,d){return b(d,function(a){return function(){return c.W(a).ib?f[a].ib():!1}}(a))};a.queryCommandState=function(a,d){return b(d,function(a){return function(){var b=
c.W(a);return b.state?null!=c.Sd(a)?c.Sd(a):b.state():!1}}(a))};a.queryCommandSupported=function(a){return a in f};a.queryCommandValue=function(a,d,e){return b(e,function(){return c.W(a).value?f[a].value(d):""})};c.Nd=function(){Object.keys(f).forEach(function(a){c.W(a).Ma||(f[a].Ma=null);c.W(a).La&&!c.W(a).ib&&(f[a].ib=function(){if(!c.B())return!1;var b=e.ub(c.B(),d.jb).map(function(b){return e.ea(b,a)}),g=b.filter(function(b){return-1!=f[a].La.indexOf(b)});return 1<=g.length&&1<=b.length-g.length});
c.W(a).La&&(f[a].state=function(){var b=c.B();if(!b)return!1;c.Tg();return-1!==f[a].La.indexOf(e.ea(b.startContainer,a))});c.W(a).Bg&&(f[a].ib=function(){if(!c.B())return!1;for(var b=e.ub(c.B(),d.jb).map(function(b){return e.ea(b,a)}),f=1;f<b.length;f++)if(b[f]!==b[f-1])return!0;return!1},f[a].value=function(){if(!c.B())return"";var b=e.ic(c.B(),d.jb);null==b&&(b=c.B().startContainer);b=e.ea(b,a);return null===b?"":b});var b=c.W(a).sa,g=f[a].action;f[a].action=function(a){if(b)var d=e.ae();a=g(a);
b&&(c.Ia(),c.B().collapsed&&e.Mb(d));return a}})};a.yh=function(){return f}}};function gg(){function a(){x=y.D.timeout(function(){var a=-F;F=N(C).width;a+=F;0!==a&&mb(C.querySelectorAll("table"),function(a){r(a)})},100,x)}function b(a){n(a.target);r(a.target);d(a)}function c(a){d(a)}function d(a){q(a.target);f(a.target)}function e(a,b){var c=[],d=-1,e=P(a,"table"),f=P(a,"tr");null==b&&(b=0);if(null==e||null==f)return v.warn("Couldn't find tr or table for a td! <$>"),[];for(var f=f.querySelectorAll("td"),g=0;g<f.length;g++)f[g]===a&&(d=g);if(-1===d)return v.warn("Couldn't find td within its tr! <%>"),
[];d+=b;if(0>d||d>f.length-1)return[];mb(e.querySelectorAll("tr"),function(a){a=a.querySelectorAll("td");null!=a[d]&&c.push(a[d])});return c}function f(a){if(!1!==h(a)&&!1!==g(a)){var b=A.Pd(a);"right"===b?p(a):("center"===b&&p(a),m(a));l(a)}}function g(a){function b(a){r(a);I(a.querySelector("colgroup"));var c=a.querySelector("tbody");Cc(c,a);I(c)}function c(a){r(a);I(a.querySelector("col"))}var d=!1,e=!1;(function(){var b=a.querySelector("col");null!=b&&null!=b.parentElement&&"table"===L(b.parentElement)&&
(d=!0)})();(function(){var b=a.querySelector("tbody");null!=b&&null!=b.parentElement&&"table"===L(b.parentElement)&&(e=!0)})();if(d&&!e)c(a);else if(e)b(a);else{var f=Ta(a.querySelectorAll("colgroup")),g=f[0]||null,h;if(0===f.length)return!0;h=ud("col",g);for(var l=0;l<f.length;l++)if(null!=h[l].getAttribute("style"))return!1;for(l=0;l<h.length;l++)if(null!=h[l].getAttribute("style"))return!1;r(a);I(g)}return!0}function h(a){if(P(a.parentElement,"table")||null!=a.querySelector("table"))return!1;var b=
!1;mb(t.wb(a),function(a){D(a,"table-edge")&&(b=!0)});return b?!1:!0}function l(a){var b=a.querySelector("tr").querySelectorAll("td");mb(b,function(c){if(c!==b[b.length-1]){var d=t.fc(c,"tableColumnEdge");E(d,"table-edge");var f=M("div",{"class":"line"});d.appendChild(f);var g,h,l,m,x,A,p=e(c),q=e(c,1),F=N(d).width;t.$d(d,function(){n(a);var b=N(p[0]),c=N(q[0]);g=b.width;h=c.width;l=window.innerWidth-b.left-35;m=window.innerWidth-c.right+35;x=N(a).width;A=parseInt(hd(d,"right"),10);E(d,"no-hide-element")},
function(a){a=A-a;a>l-F&&(a=l-F);a<m&&(a=m);d.style.right=a+"px"},function(b){b<-g+35&&(b=-g+35);b>h-35&&(b=h-35);var c=(g+b)/x*100,e=(h-b)/x*100;G.Pa(function(){p[0].style.width=c+"%";q[0].style.width=e+"%";H(d,"no-hide-element");t.fg(d);r(a)});Se(C,"setDirty",{pd:!0});t.Pb()},"cursor: col-resize;")}})}function m(a){var b,c,d,e=35*a.querySelector("tr").querySelectorAll("td").length,f=A.Pd(a),g=t.fc(a,"rightEdge");E(g,"table-edge");g.appendChild(M("div",{"class":"line"}));var h=N(g).width,l;t.$d(g,
function(){n(a);var e=N(a);b=e.width;c=window.innerWidth-e.left;l=parseInt(hd(g,"right"),10);d=N(a.parentNode).width;E(g,"no-hide-element")},function(a){if("center"===f){a=l-a;var d=c-(h+e+b)/2;a>d&&(a=d)}else a=l-a,a>c-h-e&&(a=c-h-e);0>a&&(a=0);g.style.right=a+"px"},function(c){var h;b="center"===f?b+2*c:b+c;b<e&&(b=e);h=b/d*100;100<h&&(h=100);H(g,"no-hide-element");G.Pa(function(){a.style.width=h+"%";r(a)});Se(C,"setDirty",{pd:!0});t.Pb()},"cursor: col-resize;")}function p(a){var b,c,d,e=35*a.querySelector("tr").querySelectorAll("td").length,
f=A.Pd(a),g=t.fc(a,"leftEdge");E(g,"table-edge");g.appendChild(M("div",{"class":"line"}));var h=N(g).width,l;t.$d(g,function(){n(a);var e=N(a);b=e.width;c=e.right;l=parseInt(hd(g,"left"),10);d=N(a.parentNode).width;E(g,"no-hide-element")},function(a){if("center"===f){a=l+a;var d=c-(b+e+h)/2;a>d&&(a=d)}else a=l+a,a>c-h-e&&(a=c-h-e);0>a&&(a=0);g.style.left=a+"px"},function(c){var h;b="center"===f?b-2*c:b-c;b<e&&(b=e);h=b/d*100;100<h&&(h=100);H(g,"no-hide-element");G.Pa(function(){a.style.width=h+"%";
r(a)});Se(C,"setDirty",{pd:!0});t.Pb()},"cursor: col-resize;")}function r(a){var b=N(a).width,c=35/b*100,d=[],e=0,f=0,g=a.querySelector("tr");if(null!=g&&(g=g.querySelectorAll("td"),0!==g.length)){b<35*g.length&&(b=35*g.length);var h=N(a.parentNode).width,h=Math.max(0,Math.min(100,b/h*100)),l=hd(a,"width"),n=null;null!=l&&(n=De(l||""));n&&n.wc&&"%"===n.wc?T(a,"width",h+"%"):T(a,"width",b+"px");var m=[];mb(g,function(a){a=N(a).width;m.push(a/b*100+"%")});mb(g,function(a){var b=N(a).width,g=m.shift();
null==g&&(v.error("Length of first row magically changed <$>"),g="0%");T(a,"width",g);35>=b?(T(a,"width",c+"%"),f++):d.push(a);e+=parseInt(hd(a,"width"),10)});if(0!==d.length&&0!==f){a=f*c;var x=e-a,A=100-a;mb(d,function(a){var b=parseInt(hd(a,"width"),10),b=b/x*A;T(a,"width",b+"%")})}}}function n(a){T(a,"table-layout","fixed")}function q(a){mb(t.wb(a),function(a){D(a,"table-edge")&&t.detach(a)});mb(a.querySelectorAll("td"),function(a){mb(t.wb(a),function(a){D(a,"table-edge")&&t.detach(a)})})}var y=
this,t=null,A=null,G=null,C=null;y.name="ui-table";var x,F=null;y.G=function(){C=y.H("context").root;E(C,"en-ui-table-on");t=y.H("layer");A=y.H("table");G=y.H("undo");t.ff("table",function(a,b){function c(b){f(a);b.stopPropagation();return!1}oe()?b.Sa=y.D.listener(a,"mouseenter",c):b.Sa=y.D.listener(a,"mouseover",c)},function(a,b){b.Sa&&y.D.remove(b.Sa)});y.D.ka(C,"TABLE_ALIGN",d);y.D.ka(C,"TABLE_INSERT_ROW",c);y.D.ka(C,"TABLE_DELETE_ROW",d);y.D.ka(C,"TABLE_INSERT_COLUMN",c);y.D.ka(C,"TABLE_DELETE_COLUMN",
b);F=N(C).width;y.D.listener(window,"resize",a)};y.S=function(){H(C,"en-ui-table-on");mb(C.querySelectorAll("table"),function(a){q(a)});C=null}};function hg(){var a=this;a.name="copy";a.G=function(){function b(){var a=W(r);return!(!a||a.collapsed)}function c(){Se(r,"beforeGetContent");v.warn("The copy/cut action will only work if a ClipboardEvent is passed. Limited to WEB right now and highly experimental!")}function d(a){a=B(a,{fullhtml:!1,html:!0,fullraw:!1,raw:!0,resources:!0,plain:!0});Se(r,"beforeGetContent");var b=W(r);return(a=e(r,b,a))?JSON.stringify(a):""}function e(b,c,d){d=B(d,{plain:!0,html:!1,fullhtml:!1,fullraw:!1,raw:!1,resources:!1});
if(!c||c.collapsed)return null;var e=of.Jc("rte").da(),h=e.Jc("query"),p=e.Jc("table"),C=h.ld(c.startContainer,c.startOffset),x=P(c.startContainer,"td.en-selected",b),r=0;null!==x&&(C=h.ld(x,0),x=p.vd(x),0<x.column&&(r=x.column));c.setStart(C[0],C[1]);x=P(c.endContainer,"td.en-selected",b);C=0;if(null!==x){var ga=h.pe(x,O(x));c.setEnd(ga[0],ga[1]);x=p.vd(x);(p=p.bf(x.table))&&p.columns>x.column&&(C=p.columns-x.column-1)}x=c.cloneContents();p=document.createElement("body");p.appendChild(x);(x=a.Qb("crypt"))&&
x.Jf(p);for(x=c.commonAncestorContainer;x&&h.M(x)&&h.Z(x);)J(x)&&Ec(p,x.cloneNode(!1)),x=x.parentNode;if(pc(p).some(function(a){return Q(a,"li,tr,td")})&&(b=P(c.startContainer,"table,ul,ol",b)))for(b=b.cloneNode(!1),p.insertBefore(b,p.firstChild);;)if((h=p.children[1])&&Q(h,"li,ol,ul,tr,td"))b.appendChild(h);else break;if(0<r||0<C){ga=U("tr",p);if(0<r&&0<ga.length){var Y=ga[0];for(b=0;b<r;b++)h=Y.firstChild.cloneNode(!1),x=M("div",{},[M("br")]),h.appendChild(x),Y.insertBefore(h,Y.firstChild)}if(0<
C&&0<ga.length)for(r=ga[ga.length-1],b=0;b<C;b++)h=r.lastChild.cloneNode(!1),x=M("div",{},[M("br")]),h.appendChild(x),r.appendChild(h)}var Aa={};d.plain&&zd(p.cloneNode(!0),function(b){var c=a.Qb("simpletext");c?(b=c.He(b))&&zd(b,function(a){Aa.plain=f(fb(Hc(a)))}):Aa.plain=f(fb(Hc(b)))});d.resources&&(e=e.Jc("resource"),Aa.resources=e?e.sg(p):g(p)||[]);if(d.raw||d.fullraw)e=p.cloneNode(!0),Mf(e),e=fb(wb(e.outerHTML)),d.raw&&(Aa.raw=e),d.fullraw&&(Aa.fullraw=Ac(p)?'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title></title></head><body>'+
e+"</body></html>":'<!DOCTYPE html><html><head><meta charset="UTF-8"><title></title></head><body>'+e+"</body></html>");if(d.html||d.fullhtml)a.H("transform").Od(p,3),e=Rc(c.startContainer),c=c.startContainer===c.endContainer?e:Rc(c.endContainer),l(p),Mf(p),m(p,e,c),c=fb(wb(p.outerHTML)),d.html&&(Aa.html=c),d.fullhtml&&(Aa.fullhtml=Ac(p)?'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title></title></head><body>'+
c+"</body></html>":'<!DOCTYPE html><html><head><meta charset="UTF-8"><title></title></head><body>'+c+"</body></html>");return Aa}function f(a){return a?a.replace(/\u00A0/g," "):""}function g(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],e=(d.getAttribute("id")||"").split(":");if(3<=e.length&&"en-media"===e[0]){var f=e[2];f&&(d.setAttribute("src","?hash="+f),-1===b.indexOf(f)&&b.push(f))}}return b}catch(g){v.error("Exception in collectResourcesAction <$>",
g.toString())}return null}function h(a){a=(a||"").split(":");return 3<=a.length&&"en-media"===a[0]?a[2]:null}function l(a){ud("embed[src][id]",a).forEach(function(b){var c=h(b.id);c&&(c=zc(a,"object",{type:"application/x-apple-msg-attachment",data:"cid:"+c}),uc(b,c))});ud("img[src]",a).forEach(function(a){var b=h(a.id);b&&(a.setAttribute("src","cid:"+b),a.removeAttribute("class"),a.removeAttribute("id"),a.removeAttribute("data-en-resource-reference"))})}function m(a,b,c){var d={},e={},f={},g={},h=
["font-family","font-size"];a instanceof Element&&(d=Rc(a));d&&d["font-family"]||(d=Rc(document.body));if(d)for(var l=0;l<h.length;l++){var m=h[l];e[m]=d[m]}if(b)for(l=0;l<h.length;l++)m=h[l],f[m]=b[m];if(c)for(l=0;l<h.length;l++)m=h[l],g[m]=c[m];b=pc(a);for(c=b.length-1;0<=c;c--){d=b[c];if(3===d.nodeType){if(0===d.textContent.length)continue;h=M("span");a.insertBefore(h,d);h.appendChild(d);d=h}for(l in e)h=e[l],m=hd(d,l),0===c&&f[l]?h=f[l]:c===b.length-1&&g[l]&&(h=g[l]),null===m&&void 0!==h&&T(d,
l,h)}}var p=a.H("context"),r=p.root;a.Ug=e;a.D.B({name:"copy",action:function(){c();return!0},value:function(a){if(b())return a=Pb(a),d(a)},enabled:function(){return b()}});a.D.B({name:"cut",action:function(){a.H("undo").Pa(function(){c();a.H("edit").ia()});return!0},value:function(){var c=null;b()&&a.H("undo").Pa(function(){c=d();null!=c&&a.H("edit").ia()});return c},enabled:function(){return p.hasFocus()&&b()}})}};function ig(){var a=this;a.name="paste";a.G=function(){function b(a,b,c){var d;c=ob(c||{},{keyCode:13,charCode:0},!0);if(a.fireEvent){d=document.createEventObject();ob(d,c);try{return!!a.fireEvent("on"+b,d,!1)}catch(e){}return!1}if(document.createEvent)try{d=document.createEvent("KeyEvents"),d.initKeyEvent(b,!0,!0,window,!1,!1,!1,!1,c.keyCode,c.charCode)}catch(f){d=document.createEvent("Events"),d.initEvent(b,!0,!0),d.keyCode=c.keyCode,d.charCode=c.charCode}else d=document.createEvent("UIEvents"),
d.initUIEvent&&d.initUIEvent(b,!0,!0,window,1),d.keyCode=c.keyCode,d.charCode=c.charCode;return!!a.dispatchEvent(d)}function c(a){var b=e.B(),c=b.startContainer,d={};if(P(c,"li")&&Q(a.firstChild,"ol,ul,li")){b={Qe:[],lastChild:null};d=P(e.B().startContainer,"li");f.Ab(d)&&tc(d);d=ud("ol,ul",a);for(c=0;c<d.length;c++){var g=d[c];if(null!=g){for(var h=!0,l=g.parentNode;l;){if(-1!==["ol","ul"].indexOf(L(l))){h=!1;break}l=l.parentNode}h&&vc(g)}}d=!1;1<O(a)&&Q(a.lastChild.previousSibling,"li")&&f.Ab(a.lastChild)&&
Q(a.lastChild,"li")&&(d=!0);c=a.querySelector("li");Q(c.parentNode,"ol,ul")||vc(c);b.lastChild=a.lastChild;b.li=d;b.Qe=f.xd(a);e.B().insertNode(a);d=b}else(c=P(c,"a"))&&a.querySelector("object.en-todo")&&(b.selectNode(c),b.collapse(0===b.startOffset)),d.lastChild=a.lastChild,d.Qe=f.xd(a),b.insertNode(a);return d}function d(a){var b=e.B();b||(b=Id(),b.selectNodeContents(m),b.collapse(!1),e.$b(b),e.Ia());a||l.ia();return e.B()}var e=a.H("context"),f=a.H("query"),g=a.H("block"),h=a.H("normalize"),l=
a.H("edit"),m=e.root,p=e.xa;a.A=function(a){l.ia({Cd:!1});if(!e.B())return v.warn("insertPlainText did fail due to missing content"),!1;var b;u(a)&&(b=a);var c;a instanceof DocumentFragment?c=a:a instanceof Node&&(c=document.createDocumentFragment(),c.appendChild(a));c&&zd(document.createElement("body"),function(a){a.appendChild(c);b=Hc(a).replace(/\u00A0/g," ")});a=b.split(/\n/gi);for(var d=e.W("insertparagraph").action,g=0;g<a.length;g++){var h=a[g];0<g&&d&&d();if(h&&h.length){var m=e.B(),p=m.startContainer,
m=m.startOffset;0<=m-1&&m-1<p.childNodes.length&&3===p.childNodes[m-1].nodeType&&(p=p.childNodes[m-1],m=O(p));0<=m&&m<p.childNodes.length&&3===p.childNodes[m].nodeType&&(p=p.childNodes[m],m=0);f.Y(p)&&f.Ab(p)&&(m=f.pe(p,m),p=m[0],m=m[1]);e.O(p,m);h.trim()&&(0===h.indexOf(" ")&&(h=h.replace(/^\s/gi,"\u00a0")),3===p.nodeType?(p.insertData(m,h),e.O(p,m+h.length)):(1===p.childNodes.length&&f.Vd(p.firstChild)&&p.removeChild(p.firstChild),p=document.createTextNode(h),e.B().insertNode(p),e.O(p,h.length)))}}e.B().collapse(!1);
return!0};a.insertNode=function(b,l,p,y){function t(a){[].filter.call(a.childNodes,function(a){return f.M(a)&&!f.Eg(a)&&K(a)>=e.B().startOffset}).forEach(function(a){a.parentNode.removeChild(a)})}if(!b)return v.warn("insertNode failed due to missing content"),!1;var A=d(),G;l&&(G=document.createTextNode("\u00a0"),A.insertNode(G),A.selectNode(G),e.W("removeformat").action(),e.O(G,1));var C;u(b)?C=yc(b,m):b instanceof DocumentFragment?C=b:b instanceof Node&&(C=document.createDocumentFragment(),C.appendChild(b));
p&&(a.H("transform").gc(C,3,y?{info:{source:y}}:void 0),h.mc());if(0<Ud(A,"table").length||P(A.startContainer,"table")||P(A.endContainer,"table"))if(p=U("table",C),0<p.length)for(y=a.H("simpletext"),b=0;b<p.length;b++){var x=p[b],F=x.nextSibling,ga=x.parentNode,Y=y.He(x);Oc(x,ga)&&ga.removeChild(x);F?ga.insertBefore(F,Y):ga.appendChild(Y)}A.collapse(!1);e.$b(A);e.Ia();if(null==C.childNodes||0===C.childNodes.length)return v.warn("insertNode failed to empty content argument"),!1;f.Y(e.B().startContainer)?
t(e.B().startContainer):l&&f.Y(e.B().startContainer.parentNode)&&t(e.B().startContainer.parentNode);A=c(C);C=A.Qe;l=A.lastChild;e.O(l.parentNode,K(l)+1);g.Rb(e.B().startContainer);g.Rb(l);for(b=0;b<C.length;b++)g.Wa(C[b]);G&&1===G.length&&e.removeNode(G);e.Ia();h.mc();A.li&&l&&l.previousSibling&&(G=l.previousSibling,I(l),l=G);l&&l.parentNode&&e.eh(l);return!0};p.inserthtml={U:!0,sa:!0,action:function(b){if(null!=b){var c=null;u(b)?(d(),c=yc(b,m)):c=b;null!=c&&(a.H("transform").gc(c,3),h.mc(),a.insertNode(c,
!1,!1))}return!0},value:function(){var a=e.B();if(!a||a.collapsed)return"";var b=f.ld(a.startContainer,a.startOffset);a.setStart(b[0],b[1]);a=a.cloneContents();return xb(a)}};p.inserttext={U:!0,action:function(b){return a.A(b)}};a.Kd=function(b,c){c=B(c,{value:"",selection:"",source:"",resources:[]},!1);c=B(Pb(b),c,!0);var f=c.mode,g=c.type,h=fb(c.value),l=c.selection,p=c.source,C=c.resources||[];C&&0<C.length&&a.H("resource").ge(C);l&&(Me(e.root,l),e.Qa());if(u(h)){if("raw"!==f&&vb(h.trim()))return f=
M("a",{href:h.trim()}),"html"===g?f.innerHTML=h:f.innerText=h,a.insertNode(f,!0,!1,p);if("pre"===f)for(var l=/\u00a0\u00a0/gi,h=h.replace(/\t/gi,"    "),C=/ {2,}/gi,x;x=C.exec(h);)var F=x[0].replace(/\s/gi,"\u00a0").replace(l,"\u00a0 "),h=h.substring(0,x.index)+F+h.substring(x.index+x[0].length);if("plain"===g)return a.A(h);d(!0);l=yc(h,m);if(!l)return!0;if("raw"===f)return a.insertNode(h,!0,!1,p);if("html"===g&&("plain"===f||"pre"===f||"simple"===f)){g=a.H("simpletext");if(g="simple"===f?g.Rg(l):
g.He(l))h=g.ownerDocument.createRange(),h.selectNodeContents(g),l=h.cloneContents();if("plain"===f||"pre"===f)return a.A(l)}return a.insertNode(l,!0,"rich"===f||"simple"===f,p)}return!0};p.paste={U:!0,action:function(b){return a.Kd(b,{type:"html",mode:"rich"})}};p.pasteraw={U:!0,action:function(b){Qa('Please use execCommand("paste", { type: "html", mode: "raw", "value": ... })');return a.Kd(b,{type:"html",mode:"raw"})}};p.pasteplain={U:!0,action:function(b){Qa('Please use execCommand("paste", { type: "plain", mode: "pre", "value": ... })');
return a.Kd(b,{type:"plain",mode:"pre"})}};p.pastesimple={U:!0,action:function(b){Qa('Please use execCommand("paste", { type: "html", mode: "simple", "value": ... })');return a.Kd(b,{type:"html",mode:"simple"})}};a.D.B({name:"type",action:function(c){for(var d=0;d<c.length;d++){var e=c.charCodeAt(d);if(b(m,"keydown",{keyCode:e})&&b(m,"keypress",{keyCode:e})&&b(m,"textInput",{keyCode:e})){try{document.execCommand("inserttext",!1,c[d])}catch(f){v.log("Using fallback for native inserttext command"),
a.A(c[d]),b(m,"input",{})}b(m,"keyup",{keyCode:e})}}return!0},enabled:Ma});a.D.B({name:"event",action:function(a){a=Pb(a);var b=new document.defaultView.CustomEvent(a.type,a);b.data=a.data;m.dispatchEvent(b);null!=a.html&&(m.innerHTML=a.html);null!=a.selection&&(b=W(m),a=Ke(m,a.selection),b&&a&&!Qd(b,a)&&Jd(a));return!0},enabled:Ma});a.D.B({name:"selection",action:function(a){Me(m,a);return!0},enabled:Ma})};a.S=function(){a.C=null}};function jg(){function a(a,b){var c=a.toString();(null!=b?b:1)&&(c=c.trim());return e.L()?c:c.substr(0,e.K.maxLength)}function b(a){try{document.execCommand("inserttext",!1,a.toString())}catch(b){v.error("InsertText did fail with",a),W(f).insertNode(document.createTextNode(a))}}function c(a){z(null!=a&&u(a),"textfield: provide a non-null string to attempt insert into textfield");a=a.replace(/\s+/gi," ");if(e.L())return e.A.Pa(function(){b(a)}),!0;var c=e.gd(!0);c<a.length&&d();var c=Math.max(0,c),
f=a.substr(0,c);return 0<f.length?(e.A.Pa(function(){b(f)}),!0):!1}function d(){!0===e.K.Hf&&af("warning",{module:e.K.name})}z(this instanceof jg,"Use `new` to instantiate this class");var e=this,f=null,g=!1;e.name="textfield-"+yb();e.K=null;e.A=null;e.$=null;e.G=function(g){e.K=B(g,{element:null,hg:!1,maxLength:0,placeholder:null,sf:!1,Fg:!0,Uf:!0,active:!0,Rf:["textfield"],Hc:null,ne:null,Vf:null,name:null,fontsize:null,Hf:!1});f=e.K.element;z(!!f&&J(f),'"element" option must be an HTMLElement');
!0===e.K.Hf&&z(null!=e.K.name,'"name" is required for warnings to be enabled');e.D.ad({Hb:e.K.Rf});e.V(e.K.placeholder);e.ga(e.K.fontsize);e.setActive(e.K.active);z(!(e.K.hg&&e.K.maxLength),"Max length not supported for multi line fields");e.D.listener(f,"input",function(){if(!(e.L()||0<=e.gd())){f.normalize();f.focus();var b=f.firstChild;if(null!=b){b.textContent=a(f.textContent,!1);var c=W(b);null!=c&&(c=Math.min(0!==c.endOffset?c.endOffset:e.K.maxLength,e.K.maxLength),Jd(Id(b,c)))}}e.K.Hc&&e.I(!0)});
e.D.listener(f,"textInput",function(a){return e.L()||0!==e.gd(!0)?!0:(d(),X(a))});e.K.ne&&e.K.name&&(e.D.listener(f,"blur",function(){df(e.K.name,{focus:e.hasFocus()})}),e.D.listener(f,"focus",function(){e.focus()}));e.K.Hc&&e.D.listener(f,"blur",function(){e.Ic()&&Nb(e.K.Hc,{target:f,value:e.C(!1),blur:!0})});e.K.Vf&&e.D.listener(f,"paste",function(a){if(a&&a.clipboardData){var b=a.clipboardData.getData("text/plain");c(b);return X(a)}});if(e.K.Uf){var l=function(a,b){b=B(Pb(a),b,!0);var d=b.value;
"html"===b.type&&(d=yc(d,f).textContent);return c(d)};e.D.B({name:"paste",action:function(a){if(e.hasFocus())return l(a,{type:"html",mode:"plain",value:""})},enabled:function(){return e.hasFocus()}});e.D.B({name:"pasteplain",action:function(a){if(e.hasFocus())return Qa('Please use execCommand("textfield.paste", { type: "plain", mode: "plain", "value": ... })'),l(a,{type:"plain",mode:"plain",value:""})},enabled:function(){return e.hasFocus()}});var m=function(){var a=W(f);return!(!a||a.collapsed)};
e.D.B({name:"copy",value:function(){if(!m())return null;var a=W(f);return{plain:fb(a.toString())}},enabled:m});e.D.B({name:"inserttext",action:function(a){if(e.hasFocus())return e.A.Pa(function(){b(a)}),!0},enabled:function(){return e.hasFocus()}});e.D.B({name:"delete",action:function(a){return"selection"===a?(document.execCommand("delete"),!0):!1},enabled:function(a){return"selection"===a?e.hasFocus():!1}});e.D.B({name:"placeholder",action:function(a){e.V(a||null)},enabled:function(){return!(!this.K||
!this.K.queryGroupName)}})}e.K.Fg&&(e.A=new Af,e.da().G(e.A,{element:f}));e.D.B({name:"content",action:function(b){!e.K.sf||b&&a(b)!==e.J()||(b="");e.R(b);return!0},value:function(a){g=B(Pb(a),{resetChangesState:!0});g.resetChangesState&&e.I(!1);return e.C()||(e.K.sf?e.J():"")},enabled:Ma,cc:!0});e.D.B({name:"active",action:function(a){e.setActive(Ob(a))},state:function(){return e.N()},enabled:Ma,cc:!0});e.D.B({name:"focus",action:function(){e.focus();return!0},state:function(){return e.hasFocus()},
enabled:Ma,cc:!0});e.D.B({name:"changes",action:function(a){a=Ob(a);e.I(a);return!0},state:function(){return e.Ic()},enabled:Ma,cc:!0});e.D.B({name:"selectall",action:function(){e.ca();return!0},enabled:function(){return e.hasFocus()}})};e.S=function(){e.setActive(!1);e.$=null;e.K=null;f.removeAttribute("data-en-placeholder");f=null};e.C=function(b){b&&e.I(!1);if(e.K.multiline)return Hc(f);f.normalize();b=f.firstChild;return null!=b?a(b.textContent):""};e.R=function(b){f.textContent=a(b);e.I(!1)};
e.hasFocus=function(){if(!e.N())return!1;var a=W(f);return a&&(a=Od(a))?!!P(a,$c):!1};e.focus=function(){f.focus();Jd(Id(f,O(f)));e.K.ne&&e.K.name&&df(e.K.name,{focus:e.hasFocus()})};e.ca=function(){f.focus();window.getSelection().selectAllChildren(f);e.K.ne&&e.K.name&&df(e.K.name,{focus:e.hasFocus()})};e.J=function(){return f.getAttribute("data-en-placeholder")||""};e.V=function(b){null!=b?f.setAttribute("data-en-placeholder",a(b)):f.removeAttribute("data-en-placeholder")};e.setActive=function(a){a!==
e.N()&&(null==W(f)&&Md(),ad(f,a))};e.N=function(){return $c(f)};e.I=function(a){g=!!a;!1===g&&e.A.flush();!0===e.Ic()&&e.K.Hc&&Nb(e.K.Hc,{target:f,value:e.C(!1)});oc(f,"en-note-is-empty",ke(f))};e.Ic=function(){return g&&e.N()};e.ga=function(a){(a=Fe(a,"px","px"))&&0<a.value&&T(f,"font-size",a.ec)};e.L=function(){return 0>=e.K.maxLength};e.gd=function(a){var b=e.K.maxLength-f.textContent.length,c=W(f),c=null!=c?c.endOffset-c.startOffset:0;a&&(b+=c);return Math.max(0,b)}};function kg(){function a(){Qa("Please use title.focus");return g.hasFocus()}function b(a){if("placeholder"===a)return g.J();if("focus"===a)return Qa("Please use title.focus"),g.hasFocus();Qa("Please use title.content");return g.C()||g.J()}function c(a){a=Pb(a);var b=!1,c=a.active;null!=c&&(Qa("Please use title.active"),g.setActive(c),b=!0);c=a.value;null!=c&&(Qa("Please use title.content"),d(c),b=!0);!0===a.focus&&(Qa("Please use title.focus"),g.focus(),b=!0);return b}function d(a){a&&a!==g.J()?g.C()!==
a&&g.R(a):g.R("");h=g.C()||g.J();g.I(!1)}z(this instanceof kg,"Use `new` to instantiate this class");var e=this;this.name="title";var f=document.querySelector("#en-title");z(J(f),"Node for title required");var g=null,h=null;this.G=function(l){l=B(l,{active:!0,value:"",placeholder:"Untitled",fontsize:null});this.D.ad({Hb:["title"]});g=new jg;this.da().G(g,{element:f,hg:!1,maxLength:255,placeholder:l.placeholder,sf:!0,Fg:!0,Uf:!0,active:l.active,Hc:"titlechanged",Rf:["title"],ne:!0,Vf:l.pasteEvent,
name:e.name,fontsize:l.fontsize,Hf:!0});this.D.A(function(){g=null});h=l.value;d(h);this.D.listener(f,"keydown",function(a){var b=!1,c=(a.shiftKey?1:0)+(a.altKey?2:0)+(a.metaKey?4:0)+(a.ctrlKey?8:0);9===a.keyCode?0===c?(Z.execCommand("content.focus",{pos:"top",force:!0}),b=!0):1===c&&(ff(e.name),b=!0):13===a.keyCode&&(0===c?(Z.execCommand("content.focus",{pos:"top",force:!0}),b=!0):1===c?(ff(e.name),b=!0):4!==c&&6!==c&&(b=!0));return b?X(a):!0});this.D.B({name:"title",action:c,value:b,state:a,enabled:Ma})}}
;function lg(){var a=this;a.name="crypt";a.G=function(){function b(a){if(a){var b=a.id;a=a.rev;if(b&&a)return h(b,a)}return(b=f())?g(b):null}function c(){var b=W(n);if(!b||b.collapsed)return v.error("No selection"),!1;b=a.H("copy").Ug(n,b,{html:!0});if(!b&&!b.html)return v.error("Failed to extract content",b),!1;b=b.html;if(0< !b.length)return v.error("Extracted content is empty",b),!1;var c=h();c.plainText=b;c.length="128";c.cipher="AES";c.hint="";var d=e(c);a.H("edit").ia();b=m.B();b.insertNode(d);
b=Id();b.selectNode(d);b.collapse(!1);Jd(b);v.log("pre post");a.D.timeout(function(){v.log("in post");af("encrypt",c);v.log("post post")},0);return!0}function d(b,c){var d=b.plainText;if(null!=d){var e=document.getElementById(b.id);if(e&&!D(e,"en-crypt-revealed")&&(m.de(e),m.B())){for(;e&&!p.Y(e.parentNode)&&!p.jc(e.parentNode);)r.Ha([e]);!0===c?a.H("paste").Kd({value:d,type:"html",mode:"rich"}):(e={"class":"en-crypt en-crypt-revealed en-container",id:b.id},e["data-en-crypt-rev"]=b.rev,e=M("div",
e),Bc(e,d),a.H("transform").gc(e,3),a.H("edit").tg(e),m.O(e,O(e)))}}}function e(a){var b={src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7","class":"en-crypt en-crypt-placeholder en-object-placeholder",id:a.id};b["data-en-crypt-rev"]=a.rev;return M("img",b)}function f(){var a=W(n);if(!a)return null;var b=Nd(a,".en-crypt",n);return b?b:(a=Ud(a,".en-crypt"))&&a.length?a[0]:null}function g(a){var b=a.id;a=a.getAttribute("data-en-crypt-rev");return b&&a?h(b,a):null}
function h(b,c){b=b||Ab(a.name);var d=t[b];null==d&&(d={},t[b]=d);c=c||Ab(b);var e=d[c];null==e&&(e={id:b,rev:c},d[c]=e);return e}var l=!1!==Yd.rte.cryptLegacy,m=a.H("context"),p=a.H("query"),r=a.H("block"),n=m.root,q=m.xa;a.D.listener(n,"click",function(a){a=a.target;D(a,"en-crypt-placeholder")&&(a=h(a.id,a.getAttribute("data-en-crypt-rev")),af("decrypt",a))});if(l){var y=function(){var a=m.B();if(!a||a.collapsed)return"";var b=p.ld(a.startContainer,a.startOffset);a.setStart(b[0],b[1]);a=a.cloneContents();
return xb(a)};q.insertcrypto={sa:!0,action:function(b){if(!m.B())return v.error("insertCryptoAction: No range",b),!1;a.H("edit").ia();a.H("paste").insertNode(b,!1,!0);return!0},value:y};q.revealcrypto={sa:!0,uc:!0,action:function(b){var c=m.B();if(!c)return!1;c=p.hc(c,J);if(!c&&0>=c.length)return!1;for(c=c[0];c&&!p.Y(c.parentNode)&&!p.jc(c.parentNode);)r.Ha([c]);b=yc(b);if(!b)return!1;b=b.firstChild;a.H("transform").gc(b,3);a.H("edit").tg(b);m.O(b,O(b));return!0},value:y}}var t={};a.Xg=function(){var a=
[],b,c;for(b in t)for(c in t[b]){var d=t[b][c];null!=d.plainText&&null==d.cipherText&&a.push(d)}return a};a.Lf=function(a){h(a.id,a.rev).cipherText=a.cipherText};a.D.ka(n,"beforeGetContent",function(){for(var a=Ta(n.getElementsByClassName("en-crypt-revealed")),b=a.length-1;0<=b;b--){var c=a[b],d=g(c);if(d){var e=c.innerHTML;if(d.plainText!==e){var f=h(d.id);c.setAttribute("data-en-crypt-rev",f.rev);ob(f,d,!0);f.plainText=e;delete f.cipherText;delete d.plainText}}}});a.D.B({name:"crypt",action:function(f){var g,
l;m.Qa();if(tb(f))return c();g=Pb(f);if(f=g.encrypt)a.Lf(f);else if(f=g.decrypt)g=f.id,l=f.rev,g=h(g,l),g.plainText=f.plainText,d(g,g.revert);else if(f=g.revert){g=b(f);if(!g)return!1;f.plainText&&(g.plainText=f.plainText);null!=g.plainText?d(g,!0):(g.revert=!0,af("decrypt",g))}else if(f=g.open){g=b(f);if(!g)return!1;f.plainText&&(g.plainText=f.plainText);null!=g.plainText?d(g,!1):af("decrypt",g)}else if(f=g.close){g=b(f);if(!g)return!1;a.H("undo").flush();(f=document.getElementById(g.id))&&!D(f,
"en-crypt-placeholder")&&(g=e(g),uc(f,g),m.de(g),m.B().collapse(!1))}else return v.error("Invalid crypt value",g),!1;m.Ia();return!0},state:function(a){var b=f();return b?"open"===a?D(b,"en-crypt-revealed"):"closed"===a?D(b,"en-crypt-placeholder")||!D(b,"en-crypt-revealed"):!0:!1},value:function(a){if("selected"===a){if(a=f()){var b=g(a);b.open=D(a,"en-crypt-revealed");return b}return""}return{count:{},items:{}}},enabled:function(a){if(!tb(a))return!0;a=W(n);return!(!a||a.collapsed||Nd(a,".en-crypt",
n)||!(0>=Ud(a,".en-crypt").length))}});a.Jf=function(a){l||ud(".en-crypt-revealed",a).forEach(function(a){var b=g(a);b&&(b=e(b),uc(a,b))})};a.Na=function(a,b){1===b?ud("en-crypt",a).forEach(function(a){var b;l?(b="en-crypt:"+a.textContent.trim()+":"+a.getAttribute("cipher")+":"+a.getAttribute("length")+":"+a.getAttribute("hint"),b=M("embed",{type:"evernote/x-crypto",align:"absmiddle",id:b})):(b=h(),b.cipherText=a.textContent,b.length=a.getAttribute("length"),b.cipher=a.getAttribute("cipher"),b.hint=
a.getAttribute("hint"),b=e(b));uc(a,b)}):2===b&&(l||ud('embed[type="evernote/x-crypto"]',a).forEach(function(a){var b=a.getAttribute("id").split(":"),c=h();c.cipherText=b[1];c.cipher=b[2];c.length=b[3];c.hint=b.slice(4).join(":");b=e(c);uc(a,b)}))};a.Ta=function(a,b,c){if(1===b)if(l){var d=c.crypto||{};z(d,"Expected a crypto info on Mac here",d);U("div.en-crypt-revealed,div.en-crypto-revealed",a).forEach(function(b){var c=b.getAttribute("id");d[c]?(c=d[c].split(":"),c=zc(a,"en-crypt",{cipher:c[2],
length:c[3],hint:c.slice(4).join(":")},[c[1]]),uc(b,c)):v.error("Found revealed crypto but not replacement. Key:",c)});ud('embed[type="evernote/x-crypto"]',a).forEach(function(b){var c=b.getAttribute("id").split(":"),c=zc(a,"en-crypt",{cipher:c[2],length:c[3],hint:c.slice(4).join(":")},[c[1]]);uc(b,c)})}else ud(".en-crypt",a).forEach(function(b){var c=g(b);c&&null!=c.cipherText?(c=zc(a,"en-crypt",{cipher:c.cipher,length:c.length,hint:c.hint},[c.cipherText]),uc(b,c)):I(b)});else 2===b?l||ud(".en-crypt",
a).forEach(function(b){var c=g(b);c&&null!=c.cipherText?(c=zc(a,"embed",{type:"evernote/x-crypto",id:"en-crypt:"+c.cipherText+":"+c.cipher+":"+c.length+":"+c.hint}),uc(b,c)):I(b)}):3!==b&&v.error("Other transformers EN-CRYPT!!!")}}};function mg(){var a=this;a.name="edit";a.G=function(){function b(a){function b(a){return Q(a,"ol,ul")}for(var c=null;Ta(a.childNodes).some(b);){var d=a.lastChild;b(d)||!c&&yd(d)?(c=null,a.parentNode.insertBefore(d,a.nextSibling)):(c||(c=M("li"),a.parentNode.insertBefore(c,a.nextSibling)),c.appendChild(d))}}function c(b){if(!b)return!1;a.ia({Cd:!1});var c=n.B();if(!q.M(n.B().startContainer)&&!q.yb(n.B().startContainer))return!0;q.Y(c.startContainer)&&1==c.startContainer.childNodes.length&&S(c.startContainer.firstChild)&&
0==c.startOffset&&c.startContainer.removeChild(c.startContainer.firstChild);c.insertNode(b);n.O(b.parentNode,1+K(b));return!0}function d(a){if(g())return!1;window.getSelection().isCollapsed&&(window.getSelection().modify("extend",a?"backward":"forward","lineboundary"),n.Qa());return n.W(a?"delete":"forwarddelete").action()}function e(a){if(g())return!1;if(!window.getSelection().isCollapsed)return n.W("delete").action();var b=P(n.B().startContainer,"li");t.Hd()&&null!=b&&q.Ab(b)||(window.getSelection().modify("extend",
a?"backward":"forward","word"),n.Qa());return n.W(a?"delete":"forwarddelete").action()}function f(){var b=n.B();if(b.collapsed){A.gh();var c=y.Cc();if(1!==O(c)||!R(c.firstChild,"div")||1!==O(c.firstChild)||!R(c.firstChild.firstChild,"br")){t.Bc(b.startContainer,b.startOffset);for(var d=b.startContainer,b=b.startOffset;;)if(0===b&&q.M(d.previousSibling)&&q.ya(d.previousSibling))d.parentNode.removeChild(d.previousSibling);else if(0<=b-1&&b-1<d.childNodes.length&&q.M(d.childNodes[b-1])&&q.ya(d.childNodes[b-
1]))d.removeChild(d.childNodes[b-1]),b--;else if(0==b&&q.Z(d)||q.ya(d))b=K(d),d=d.parentNode;else{if(0<=b-1&&b-1<d.childNodes.length&&q.M(d.childNodes[b-1])&&R(d.childNodes[b-1],"a")){t.Md(d.childNodes[b-1]);return}if(0<=b-1&&b-1<d.childNodes.length&&!q.Y(d.childNodes[b-1])&&!S(d.childNodes[b-1])&&!je(d.childNodes[b-1]))d=d.childNodes[b-1],b=O(d);else break}if(0<b&&3===d.nodeType)c=1,1<b&&bb(d.textContent.substring(b-2,b))&&(c=2),n.O(d,b-c,d,b),a.ia();else if(q.M(d)&&0<=b-1&&b-1<d.childNodes.length&&
(Q(d.childNodes[b-1],"br,hr")||je(d.childNodes[b-1])))n.O(d,b-1,d,b),a.ia();else if(!q.Z(d))if(Q(d,"li,dt,dd")&&d==d.parentNode.firstChild&&0==b){b=[];for(c=d.parentNode;c;c=c.parentNode)R(c,"li")&&b.unshift(c);for(c=0;c<b.length;c++)t.Yb(b[c]);b=y.Ja([d]);t.Ha([d]);y.za(b);Q(d,"dd,dt")&&q.Vb(d).every(function(a){return!q.ja(d,a)||!q.pa(d,a)})&&(d=n.Xa(d,"div"));t.Wa(d)}else{for(var c=d,e=b;;)if(0==e)e=K(c),c=c.parentNode;else if(0<=e-1&&e-1<c.childNodes.length&&q.M(c.childNodes[e-1])&&q.ya(c.childNodes[e-
1]))c.removeChild(c.childNodes[e-1]),e--;else break;if(0===b&&q.Yd(d,!0)&&q.Vb(d).concat(d).filter(function(a){return q.M(a)&&q.ja(a,d)&&q.lc(a)}).length)if(b=Id(d,0),b=q.Va(b),b=q.vb(b,function(a){return q.M(a)&&!q.rg(a)}),b.filter(function(a){return 3!==a.nodeType}).length)for(c=0;c<b.length;c++)p(b[c]);else p(d);else if(!Q(d,"table,img,div.en_module,div.en_crypt"))if(0<=e-1&&e-1<c.childNodes.length&&Q(c.childNodes[e-1],"table,img,div.en_module,div.en_crypt"))n.O(c,e-1,c,e);else if(0==b&&(R(c.childNodes[e-
1],"hr")||S(c.childNodes[e-1])&&(S(c.childNodes[e-1].previousSibling)||!q.Z(c.childNodes[e-1].previousSibling))))n.O(c,e-1,c,e),a.ia(),n.O(d,b);else if(Q(c.childNodes[e],"li,dt,dd")&&Q(c.childNodes[e].previousSibling,"li,dt,dd"))c=c.childNodes[e-1],e=O(c),d=c.nextSibling,n.O(c,e,d,0),a.ia();else{for(;0<=e-1&&e-1<c.childNodes.length;){var f=c.childNodes[e-1];q.M(f)&&q.ya(f)?(c.removeChild(f),e--):Q(f,"hr, div.en-container")?e--:(c=f,e=O(c))}n.O(c,e,d,b);a.ia({direction:"backward"})}}}}else a.ia()}
function g(){return!!a.H("textinput").Zg()}function h(a){A.Pc();for(var b=q.Va(n.B()),b=q.hc(b,function(a){return 1===a.nodeType&&q.M(a)&&(a.hasAttribute("align")||""!=a.style.textAlign)}),c=0;c<b.length;c++){var d=b[c];d.removeAttribute("align");id(d,"text-align")}if("left"!=a)for(b=q.Va(n.B()),b=q.vb(b,function(a){return q.M(a)&&R(a,"div")});b.length;)b.shift().setAttribute("style","text-align: "+a)}function l(a){var b=a.toLowerCase(),c="tl"===b,d=c?"ul":b,e=n.B();if(e){A.Pc();var f=t.xb()===b?
"disable":"enable",g=function(a){return q.xg(a,b)},h=function(a){return!g(a)&&Q(a,"ol,ul")},l=[];(function(){for(var a=e.endContainer;a!==e.commonAncestorContainer;a=a.parentNode)R(a,"li")&&l.unshift(a);for(a=e.startContainer;a;a=a.parentNode)R(a,"li")&&l.unshift(a)})();l.forEach(t.Yb);a=q.Va(e);"enable"===f&&q.hc(a,function(a){return q.M(a)&&h(a)}).forEach(function(a){if(q.M(a.previousSibling)&&g(a.previousSibling)||q.M(a.nextSibling)&&g(a.nextSibling)){a=[].slice.call(a.childNodes);var b=y.Ja(a);
t.Ha(a);y.Db(a,function(a){return g(a)});y.za(b)}else n.Xa(a,d),oc(a,"en-todo-list",c),T(a,"-evernote-list-type",c?"todo":null)});a=q.vb(a,function(a){return q.M(a)&&(Q(a,"ol,ul")||Q(a.parentNode,"ol,ul")||q.pa(a,"li"))});if(1<a.length){var k=a[a.length-1];""===k.textContent&&(S(k)||1===O(k)&&S(rc(k)))&&(a=a.slice(0,a.length-1))}"enable"==f&&(a=a.filter(function(a){return!Q(a,"ol,ul")||Q(a.parentNode,"ol,ul")}));if("disable"==f)for(;a.length;){var r=[];r.push(a.shift());if(g(r[0]))p(r[0]);else{for(;a.length&&
a[0]==r[r.length-1].nextSibling&&!g(a[0]);)r.push(a.shift());f=y.Ja(r);t.Ha(r);for(k=0;k<r.length;k++)t.Wa(r[k]);y.za(f);for(k=0;k<r.length;k++)Q(r[k].parentNode,"ol,ul")&&a.push(r.shift())}}else for(;a.length;){for(r=[];!r.length||a.length&&a[0]==r[r.length-1].nextSibling;)if(Q(a[0],"p,div"))a[0].style.margin="",a[0].style.textAlign="",a[0].removeAttribute("align"),gd(a[0]),r.push(n.Xa(a[0],"li")),a.shift();else if(Q(a[0],"li,ol,ul"))r.push(a.shift());else{for(f=[];!f.length||a.length&&a[0]==f[f.length-
1].nextSibling&&q.Z(a[0])&&q.Z(f[f.length-1])&&!S(f[f.length-1]);)f.push(a.shift());for(;f.length&&yd(f[f.length-1]);)f.pop();f.length&&r.push(y.Db(f,void 0,function(){return M("li")}))}if(!g(r[0].parentNode)&&!r.every(function(a){return Q(a,"ol,ul")}))if(h(r[0].parentNode)){var r=Ta(r[0].parentNode.childNodes),G=r[0].parentNode.getAttribute("type"),f=y.Ja(r);t.Ha(r);y.Db(r,function(a){return g(a)},function(){return m(b,G)});y.za(f)}else f=y.Db(r,function(a){return g(a)},function(){if(!(q.M(r[0].parentNode)&&
q.Jd(r[0].parentNode)&&q.M(r[0].parentNode.previousSibling)&&g(r[0].parentNode.previousSibling))){var a=r[0].parentNode.getAttribute("type");return m(b,a)}var c=r[0].parentNode.previousSibling;t.Yb(c.lastChild);q.M(c.lastChild)&&g(c.lastChild)||(a=c.getAttribute("type"),c.appendChild(m(b,a)));return c.lastChild}),t.Wa(f)}}}function m(a,b){z(0<=["ul","ol","tl"].indexOf(a.toLowerCase()));if("tl"===a)return M("ul",{"class":"en-todo-list",style:"-evernote-list-type:todo"});var c=M(a);b&&c.setAttribute("type",
b);return c}function p(a){if(q.M(a))if(R(a,"div")){var b=q.zd(a)-40;0<b?T(a,"margin-left",b+"px"):t.Md(a)}else if(q.Jd(a))t.Md(a);else if(q.lc(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"),n.Xa(a,"div");else{for(var b=a.parentNode,c=[];q.M(b)&&1==b.nodeType&&!q.Jd(b)&&!Q(b,"ol,ul");)c.push(b),b=b.parentNode;if(!q.M(b)||!q.Jd(b))for(b=
a.parentNode,c=[];q.M(b)&&1==b.nodeType&&!q.lc(b)&&!Q(b,"ol,ul");)c.push(b),b=b.parentNode;if(Q(a,"ol,ul")&&(!q.M(b)||!q.lc(b))){a.removeAttribute("reversed");a.removeAttribute("start");a.removeAttribute("type");b=[].slice.call(a.childNodes);if(Q(a.parentNode,"ol,ul")||Ta(a.parentNode.childNodes).every(function(){return Q(a,"ol,ul")||yd(a)}))c=y.Ja([].slice.call(a.childNodes)),t.Md(a),y.za(c);for(c=0;c<b.length;c++)t.Wa(b[c])}else if(q.M(b)&&q.lc(b)){c.push(b);for(var d=b;c.length;){var b=c.pop(),
e=a.parentNode==b?a:c[c.length-1];q.Z(e)&&!S(e)&&S(e.nextSibling)&&e.parentNode.removeChild(e.nextSibling);var f=[].slice.call(b.childNodes,1+K(e));r([].slice.call(b.childNodes,0,K(e)));r(f)}p(d)}}}function r(a){if(a.length){var b=a[0];if(Q(b.parentNode,"ol,ul")){var c=q.Ec(b.parentNode),d=b.parentNode.getAttribute("type");y.Db(a,function(a){return q.xg(a,c)},function(){return m(c,d)})}else{for(var b=!0,e=0;e<a.length;e++)D(a[e],"en-code")||P(a[e],".en-code")||(b=!1);for(;a.length;)e=a.shift(),R(e,
"div")?b&&D(e,"en-code")?e.insertBefore(document.createTextNode("\u00a0\u00a0\u00a0\u00a0\u00a0"),e.firstChild):t.ye(e):(e=y.Db([e],function(a){return q.Jd(a)?!0:!1},function(){return M("div",{style:"margin-left:40px;"})}),t.Wa(e))}}}var n=a.H("context"),q=a.H("query"),y=a.H("format"),t=a.H("block"),A=a.H("normalize"),G=n.xa;a.ia=function(b){if(n.B()){A.We();var c=0<Ud(n.B(),"td").length;t.Sg(b);c&&a.A();A.mc();Qc(n.B().startContainer)||n.Qa()}};a.A=function(){for(var a=U("td",n.root),b=0;b<a.length;b++)if(0===
O(a[b])){var c=M("div",{},[M("br")]);a[b].appendChild(c)}};G.deleteword={U:!0,Gb:!0,sa:!0,action:function(){return e(!0)}};G.forwarddeleteword={U:!0,Gb:!0,sa:!0,action:function(){return e(!1)}};G.deleteline={U:!0,Gb:!0,sa:!0,action:function(){return d(!0)}};G.forwarddeleteline={U:!0,Gb:!0,sa:!0,action:function(){return d(!1)}};G["delete"]={U:!1,Gb:!0,sa:!1,action:function(b){if(g())return!1;y.bh(function(){if("selection"===b)a.ia();else if("word"===b)e(!0);else if("line"===b)d(!0);else if(ha(b))for(var c=
0;c<b;c++)f();else f()});return!0}};G.forwarddelete={U:!1,Gb:!0,sa:!1,action:function(b){if(g())return!1;"selection"===b?a.ia():"word"===b?e(!1):"line"===b?d(!1):n.B().collapsed?(b=n.B(),window.getSelection().modify("extend","forward","character"),window.getSelection().collapseToEnd(),n.Qa(),Qd(b,n.B())||n.W("delete").action()):a.ia();n.Ia();return!0}};G.indent={U:!0,sa:!0,action:function(){A.Pc();for(var a=[],b=n.B().endContainer;b!=n.B().commonAncestorContainer;b=b.parentNode)R(b,"li")&&a.unshift(b);
for(b=n.B().startContainer;b!=n.B().commonAncestorContainer;b=b.parentNode)R(b,"li")&&a.unshift(b);for(b=n.B().commonAncestorContainer;b;b=b.parentNode)R(b,"li")&&a.unshift(b);for(b=0;b<a.length;b++)t.Yb(a[b]);a=q.Va(n.B());a=q.vb(a,function(a){return q.M(a)&&Q(a,"div,li")});b=a.filter(q.va)[0];if(R(b,"li")&&Q(b.parentNode,"ol,ul")){for(b=b.previousSibling;q.ya(b);)b=b.previousSibling;R(b,"li")&&t.Yb(b)}for(;a.length;){b=[];for(b.push(a.shift());a.length&&a[0]==b[b.length-1].nextSibling;)b.push(a.shift());
r(b)}return!0},enabled:function(){return n.hasFocus()&&!t.Bb()}};G.outdent={U:!0,sa:!0,action:function(){A.Pc();var a=y.Cc(),b=[];(function(){for(var a=n.B().endContainer;a!=n.B().commonAncestorContainer;a=a.parentNode)R(a,"li")&&b.unshift(a);for(a=n.B().startContainer;a;a=a.parentNode)R(a,"li")&&b.unshift(a)})();b.forEach(t.Yb);for(var c=q.Va(n.B()),c=q.vb(c,function(a){return q.M(a)&&(!q.xd(a).some(q.M)||Q(a,"ol,ul")||R(a,"li")&&Q(a.parentNode,"ol,ul"))}),d=!0,e=0;e<c.length;e++)D(c[e],"en-code")||
P(c[e],".en-code")||(d=!1);for(e=[];c.length;){for(;c.length&&R(Zc(c[0],a),"div");){var f=Zc(c.shift(),a);if(-1===e.indexOf(f))if(e.push(f),d&&D(f,"en-code"))f=rc(f),Nc(f)&&(f.textContent=f.textContent.replace(/\s{0,5}/,""));else{var g=q.zd(f)-40;0<g?T(f,"margin-left",g+"px"):(id(f,"margin-left"),id(f,"margin"))}}for(;c.length&&(Q(c[0],"ol,ul")||!Q(c[0].parentNode,"ol,ul"));)p(c.shift());if(!c.length)break;f=[];for(f.push(c.shift());c.length&&c[0]==f[f.length-1].nextSibling&&!Q(c[0],"ol,ul");)f.push(c.shift());
g=y.Ja(f);t.Ha(f);f.forEach(t.Wa);y.za(g)}return!0},enabled:function(){return n.hasFocus()&&!t.Bb()}};G.inserthorizontalrule={U:!0,sa:!0,action:function(){if(t.Xd())return!1;n.W("insertparagraph").action();var a=M("div",{},[M("hr")]),b=q.oa(n.B().startContainer);n.ba(a,b.parentNode,K(b));return!0},enabled:function(){return n.hasFocus()&&!t.Xd()&&!t.Bb()}};a.tg=c;G.insertimage={U:!0,sa:!0,action:function(a){if(""===a)return!1;a=M("img",{src:Rf(a)});c(a);a.removeAttribute("width");a.removeAttribute("height");
return!0}};G.insertlinebreak={sa:!0,action:function(){if(g())return!1;if(!t.Hd())return n.W("insertparagraph").action();a.ia({Cd:!1});if(!q.M(n.B().startContainer)&&!q.yb(n.B().startContainer)||1==n.B().startContainer.nodeType&&!q.pa("br",n.B().startContainer)||1!=n.B().startContainer.nodeType&&!q.pa("br",n.B().startContainer.parentNode))return!0;if(3==n.B().startContainer.nodeType&&0==n.B().startOffset){var b=n.B().startContainer.parentNode,c=K(n.B().startContainer);n.O(b,c)}3==n.B().startContainer.nodeType&&
n.B().startOffset==O(n.B().startContainer)&&(b=n.B().startContainer.parentNode,c=1+K(n.B().startContainer),n.O(b,c));b=M("br");n.B().insertNode(b);n.O(b.parentNode,1+K(b));q.Vd(b)&&(n.B().insertNode(M("br")),n.O(b.parentNode,1+K(b)));return!0}};G.insertparagraph={U:"before",sa:!0,action:function(){if(g())return!1;var b=a.Qb("todo");a.ia();var c=n.B().startContainer,d=n.B().startOffset;if(!q.M(c)&&!q.yb(c))return!0;3===c.nodeType&&0!==d&&d!==O(c)&&c.splitText(d);3===c.nodeType&&d===O(c)&&(d=1+K(c),
c=c.parentNode);3===c.nodeType&&(d=K(c),c=c.parentNode);n.O(c,d);for(var e=c;!q.Pe(e)&&q.M(e.parentNode)&&q.ja(c,e.parentNode);)e=e.parentNode;if(q.M(e)&&q.Pe(e)&&q.ja(c,e.parentNode)&&Q(e,"p,div")){for(var f=e;!Q(f,"dd,dt,li")&&q.M(f.parentNode);)f=f.parentNode;Q(f,"dd,dt,li")&&(e=f)}if(!q.M(e)||!q.ja(e,c)||!q.Pe(e)){f=q.Va(n.B());f=q.vb(f,function(a){return q.pa(a,"p")}).slice(0,1);if(!f.length){if(!q.pa("div",n.B().startContainer))return!0;e=Ic();n.B().insertNode(e);n.O(e,0);return!0}for(;f[f.length-
1].nextSibling&&q.pa(f[f.length-1].nextSibling,"p");)f.push(f[f.length-1].nextSibling);e=y.Db(f,La,function(){return M("div")})}var f=!1,h=b?b.lf(e):null;if(b&&null!=h){if(b.$g(e))return tc(e),e.appendChild(M("br")),n.O(e,0),!0;f=!0}if(Q(e,"address,listing,pre"))return b=M("br"),n.B().insertNode(b),n.O(c,d+1),Oc(q.nextNode(b),e)||(n.B().insertNode(M("br")),n.O(c,d+1)),!0;Q(e,"li,dt,dd")&&t.Yb(e);if(Q(e,"li,dt,dd")&&q.Ab(e))return t.Ha([e]),q.Fd(e)||(n.Mg(e),e.appendChild(M("br"))),Q(e,"dd,dt")&&q.Vb(e).every(function(a){return!q.ja(e,
a)||!q.pa(e,a)})&&(e=n.Xa(e,"div")),t.Wa(e),!0;for(d=Id(n.B().startContainer,n.B().startOffset,e,O(e));0===d.startOffset&&!q.Kc(d.startContainer);)d.setStart(d.startContainer.parentNode,K(d.startContainer));for(;d.startOffset===O(d.startContainer)&&!q.Kc(d.startContainer);)d.setStart(d.startContainer.parentNode,1+K(d.startContainer));var c=q.vb(d),h=!c.length||1===c.length&&S(c[0]),c=Od(n.B()),c=P(c,function(a){return 0>["a","tt"].indexOf(L(a))},y.Cc())||c,c=y.Ja([c]),l;Q(e,"h1,h2,h3,h4,h5,h6,tt")&&
h?l="div":R(e,"dt")&&h?l="dd":R(e,"dd")&&h?l="dt":l=e.tagName.toLowerCase();var m=M(l);for(l=0;l<e.attributes.length;l++)m.setAttributeNS(e.attributes[l].namespaceURI,e.attributes[l].name,e.attributes[l].value);m.removeAttribute("id");m.removeAttribute("class");D(e,"en-code")&&E(m,"en-code");e.parentNode.insertBefore(m,e.nextSibling);var h=q.hc(d),d=d.extractContents(),p=q.xd(d);for(l=0;l<p.length;l++)1===p[l].nodeType&&-1===h.indexOf(p[l])&&p[l].removeAttribute("id");for(l=d.childNodes.length-1;0<=
l;l--)h=d.childNodes[l],Nc(h)?yd(h)&&I(h):q.Ab(h)&&I(h);for(m.appendChild(d);q.Kc(e.lastChild);)e=e.lastChild;for(;q.Kc(m.lastChild);)m=m.lastChild;q.Fd(e)||(e.appendChild(M("br")),y.za(c.map(function(a){a[0]=e;return a})));if(q.Fd(m))m.children&&1===m.children.length&&S(m.children[0])&&y.za(c.map(function(a){a[0]=m;return a}));else{if(f)return tc(m),b=b.Je(m),n.O(b.parentNode,O(b)+1),y.za(c.map(function(a){a[0]=m;return a})),!0;m.appendChild(M("br"));y.za(c.map(function(a){a[0]=m;return a}))}l=0;
f&&!b.lf(m)&&(z(3!==m.nodeType,"newContainer for checkbox insertion cannot be text"),b.Je(m),l++);b=q.pe(m,l);m=b[0];l=b[1];n.O(m,l);return!0}};G.insertorderedlist={U:!0,sa:!0,action:function(){l("ol");return!0},ib:function(){return"mixed"===t.xb()},value:function(){return t.xb()},state:function(){return"ol"===t.xb()},enabled:function(){return n.hasFocus()&&!t.Bb()}};G.insertunorderedlist={U:!0,sa:!0,action:function(){l("ul");return!0},ib:function(){return"mixed"===t.xb()},value:function(){return t.xb()},
state:function(){return"ul"===t.xb()},enabled:function(){return n.hasFocus()&&!t.Bb()}};G.inserttodolist={U:!0,sa:!0,action:function(){l("tl");return!0},ib:function(){return"mixed"===t.xb()},value:function(){return t.xb()},state:function(){return"tl"===t.xb()},enabled:function(){return n.hasFocus()&&!t.Bb()}};[{name:"justifyfull",mode:"justify"},{name:"justifyleft",mode:"left"},{name:"justifycenter",mode:"center"},{name:"justifyright",mode:"right"}].forEach(function(a){G[a.name]={U:!0,sa:!0,action:function(){h(a.mode);
return!0},ib:function(){if(!n.B())return!1;var b=q.hc(q.Va(n.B()),function(a){return q.M(a)&&q.va(a)&&!a.hasChildNodes()});return b.some(function(b){return t.Qd(b)==a.mode})&&b.some(function(b){return t.Qd(b)!=a.mode})},state:function(){if(!n.B())return!1;var b=q.hc(q.Va(n.B()),function(a){return q.M(a)&&q.va(a)&&!a.hasChildNodes()});return b.length&&b.every(function(b){return t.Qd(b)==a.mode})},value:function(){if(!n.B())return"";var a=q.hc(q.Va(n.B()),function(a){return q.M(a)&&q.va(a)&&!a.hasChildNodes()});
return a.length?t.Qd(a[0]):"left"},enabled:function(){return n.hasFocus()&&!t.Hd()&&!t.Bb()}}});G.selectall={action:function(){window.getSelection().selectAllChildren(n.root);return!0},enabled:Ma,uc:!0};G.tab={U:!0,sa:!0,action:function(b){if(g())return!1;var c="true"===b||1===+b;if(t.Hd()||!n.B().collapsed)return n.W(c?"outdent":"indent").action();if(t.Dg()){var d=a.Qb("table");d&&(b=d.X(),d=d.Rd(),c?(b=wd(d,"td",b))&&n.O(b,0):(c=vd(d,"td",b),c||(n.W("inserttablerow").action("after"),c=vd(d,"td",
b)),n.O(c,0)))}else c||(n.W("inserthtml").action("\u00a0\u00a0\u00a0\u00a0\u00a0"),(b=W(n.root))&&b.endContainer&&b.endContainer.parentNode&&n.fh());return!0},enabled:function(){return n.hasFocus()&&!t.Bb()}};a.Na=function(a){function c(a,b,d){for(var e=a.getElementsByTagName("o:p"),f=e.length;f--;)I(e[f]);f=a.parentNode;a.removeAttribute("style");a=Gc(a,"div");e=null;a.previousElementSibling&&(1===b&&Q(a.previousElementSibling,d)||1<b&&Q(a.previousElementSibling,"ul,ol"))?e=a.previousElementSibling:
(e=zc(a,d),f.insertBefore(e,a));f=zc(e,"li");for(f.appendChild(a);1<b;){a=Hd(e);if(Q(a,"ol,ul"))e=a;else if(Q(a,"li")&&Q(Hd(a),"ol,ul"))e=Hd(a);else{var g=zc(e,d);a?a.appendChild(g):e.appendChild(g);e=g}b--}e.appendChild(f)}U("p",a).forEach(function(a){1===O(a)&&"o:p"===L(a.firstChild)&&(I(a.firstChild),a.appendChild(zc(a,"br")),Gc(a,"div"))});U('div[style*="mso-line-break-override"]',a).forEach(function(a){var b=U('span[style*="mso-special-format"]',a);if(0<b.length){var d="ul";"bullet"!==hd(b[0],
"mso-special-format").toLowerCase()&&(d="ol");1===O(b[0].parentNode)?I(b[0].parentNode):I(b[0]);c(a,1,d)}});U('div[style*="mso-list"],p[style*="mso-list"]',a).forEach(function(a){var b=hd(a,"mso-list").toLowerCase();if(0<=b.indexOf("level")&&(b=parseInt(b.substr(b.indexOf("level")+5,1),10),!isNaN(b))){var d="ul",e=U('span[style*="mso-list:"]',a);if(0<e.length)for(var f=0;f<e.length;f++){var g=e[0];"ignore"===hd(g,"mso-list").toLowerCase()&&(Hc(g).match(/[0-9]+.*/g)&&(d="ol"),Q(g.parentNode,"span")&&
1===O(g.parentNode)?I(g.parentNode):I(g))}c(a,b,d)}});ud('div[style~="margin-left:"]>ul,div[style~="margin-left:"]>ol',a).forEach(function(b){var c=b.parentElement;if(Q(c,"div")){for(var d=hd(c,"margin-left"),d=+d.replace(/(\d+)em/gi,"$1"),e=null;0<d;){var f=zc(a,b.tagName);e?e.appendChild(f):c.insertAdjacentElement("afterEnd",f);e=f;d-=2}e&&(wc(c,e),I(c))}});ud('li[style*="list-style:"]',a).forEach(function(a){"none"===hd(a,"list-style")&&vc(a)});ud("li",a).forEach(b);ud("ol,ul",a).forEach(function(b){var c=
null;Ta(b.childNodes).forEach(function(b){-1!==["li","ol","ul"].indexOf(L(b))?c=null:yd(b)?I(b):Uc(b)?Gc(b,"li"):(c||(c=zc(a,"li"),b.parentNode.insertBefore(c,b.nextSibling)),c.appendChild(b))})});ud('ul[style*="-evernote-list-type"]',a).forEach(function(a){E(a,"en-todo-list");pc(a).forEach(function(a){if(R(a,"li")){var b=!1,c=U("object.en-todo",a).shift();c&&(b=D(c,"en-todo-checked"),I(c));H(a,"en-todo-over");oc(a,"en-todo-checked",b)}})})};a.Ta=function(a){ud("ul.en-todo-list",a).forEach(function(b){pc(b).forEach(function(b){if(R(b,
"li")){var c=zc(a,"object",{"class":"en-todo"});oc(c,"en-todo-checked",D(b,"en-todo-checked"));b.insertBefore(c,b.firstChild)}})});ud("ol>ul,ul>ol,ul>ul,ol>ol",a).forEach(function(b){var c=b.previousSibling;R(c,"li")?c.appendChild(b):(c=zc(a,"li",{style:"display:inline;list-style:none;"}),b.parentNode.insertBefore(c,b),c.appendChild(b))})}}};function ng(){this.name="typebehind-email-"+yb();this.fb=function(){return"email"};this.A=function(){return[/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}/gi]};this.C=function(a,b,c){b=M("a");a.insertNode(b);z(null!=b,"new node is null");u(c)&&(b.setAttribute("href","mailto:"+c),b.textContent=c);return{node:b,nb:!1}};this.G=function(a){z(!0===a,"typebehind.email only accepts true as opt")}};function og(){function a(a){var c=null;Lb.sb.some(function(b){if(-1!==a.indexOf(b.icon)&&a.length===b.icon.length)return c=b,!0});return null==c?null:b(c)}function b(a){return M("object",{"class":"en-emoticon "+(c.color||c["default"]),contenteditable:"false"},[a.icon])}this.name="typebehind-emoticon-"+yb();var c={"default":"en-emoticon-yellow",yellow:"en-emoticon-yellow",orange:"en-emoticon-orange",pink:"en-emoticon-pink",purple:"en-emoticon-purple","dark-blue":"en-emoticon-dark-blue","light-blue":"en-emoticon-light-blue",
green:"en-emoticon-green",slate:"en-emoticon-slate",brown:"en-emoticon-brown",black:"en-emoticon-black"};this.fb=function(){return"emoticon"};this.A=function(){return Lb.wa.map(function(a){return new RegExp(a,"g")})};this.C=function(a,c){var f;f=Lb.get(c.source);f=null==f?null:b(f);z(null!=f,"typebehind: emoji node failed to be created");a.insertNode(f);return{node:f,nb:!1}};this.Na=function(b){sd(b).forEach(function(b){var c=a(b.textContent);null!=c&&uc(b,c)})};this.Ta=function(a){ud("object.en-emoticon",
a).forEach(function(a){uc(a,M("span",{style:"-evernote-sentoj-emoticon:true"},a.textContent))})};this.G=function(a){z(!0===a,"typebehind.emoticon only accepts true as opt")}};function pg(){this.name="typebehind-url-"+yb();this.fb=function(){return"url"};this.A=function(){return[/(?:(?: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]};
this.C=function(a,b,c){b=M("a");a.insertNode(b);z(null!=b,"new node is null");u(c)&&(b.setAttribute("href",c),b.textContent=c);return{node:b,nb:!1}};this.G=function(a){z(!0===a,"typebehind.url only accepts true as opt")}};function qg(a){var b=this;b.name="typebehind-list-"+yb();b.fb=function(){return"list"};b.A=function(){return[/^\s*\*/gi,/^\s*[0-9]+\./gi]};b.nd=function(){return!0};b.J=function(a){return null!=P(a.startContainer,"li")?!1:!0};b.L=function(a){var b,c,g=0;b=0;for(c=a.length-1;b<a.length;b+=1,--c)g+=Math.pow(26,c)*("ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(a[b])+1);return g};var c=[["M",1E3],["CM",900],["D",500],["CD",400],["C",100],["XC",90],["L",50],["XL",40],["X",10],["IX",9],["V",5],["IV",4],["I",1]];
b.N=function(a){for(var b=0,f=0;f<c.length;++f)for(var g=c[f],h=g[1],g=RegExp("^"+g[0]);a.match(g);)b+=h,a=a.replace(g,"");return b};b.C=function(c,e,f){c=b.A();e==c[0].toString()?a.W("insertunorderedlist").action():e==c[1].toString()&&(a.W("insertorderedlist").action(),e=W(),e=P(e.startContainer,"ol"),f=f.substr(0,f.length-1),1<f?e.setAttribute("start",f):e.removeAttribute("start"));return{node:null,nb:!0}};b.G=function(a){z(!0===a,"typebehind.list only accepts true as opt")}};function rg(a,b){this.name="typebehind-inline-"+yb();var c=/(?:\s+|\xa0+|^)\`(\S(?:.*\S)?)(?:[\xa0\\t ]*$)/gi,d=[{rx:/\*\*(\S(?:.*\S)?)\*/gi,cmd:"bold",len:2,value:"bold"},{rx:/\*(?!\*)(\S(?:.*\S)?)\*/gi,cmd:"italic",len:1,value:"italic"},{rx:/(?:\s+|\xa0+|^)__(\S(?:.*\S)?)__(?:[\xa0\\t ]*$)/gi,cmd:"underline",len:2,value:"underline"},{rx:/~~(\S(?:.*\S)?)~~/gi,cmd:"strikethrough",len:2,value:"line-through"},{rx:/(?:\s+|\xa0+|^)\!{2}(\S(?:.*\S)?)\!{2}(?:[\xa0\\t ]*$)/gi,cmd:"highlight",len:2,value:"rgb(255, 250, 165)"},
{rx:/(?:\s+|\xa0+|^)\`(?!\`)(\S(?:.*\S)?)\`(?:[\xa0\\t ]*$)/gi,cmd:"tt",len:1,value:"tt"}];this.fb=function(){return"inline"};this.A=function(){return[/(?!(\*{1,2}|_{1,2}|~{2}|\!{2}|\`)\s+\1)(\*{1,2}|_{1,2}|~{2}|\!{2}|\`)(\S(?:.*\S)?)\2/gi]};this.I=function(){return!0};this.C=function(e,f,g){var h=null,l=-1;f=null;for(var m=1,p=null,r=0;r<d.length;r++){f=d[r].cmd;var m=d[r].len,p=d[r].value,n=g.match(d[r].rx),h=null,l=-1;if(n&&0<n.length){h=n[0].trim();l=g.lastIndexOf(h);n=h[0];1<d[r].len&&(n+=n);
if(h.substr(h.length-n.length)!==n)return{node:null,nb:!1};if("tt"!==f&&g.match(c))r=d.length-2;else{r=Ya(n);if(h.match(new RegExp("^"+r+"\\s*"+r+"$")))return{node:null,nb:!1};break}}}if(null!=h){g=e.startContainer;for(r=0;Wc(g);){if(Nc(g)){if(r+g.textContent.length>l)break;r+=g.textContent.length}g=Mc(g)}g=rc(g);h=e.endContainer;l-=r;e=e.endOffset-m;g.textContent=g.textContent.slice(0,l)+g.textContent.slice(l+m);g===h&&(e-=m);h.textContent=h.textContent.slice(0,e)+h.textContent.slice(e+m);m=b.tf(!0);
e=Id(g,l,h,e);b.Ga(f,p,e);Jd(Id(e.endContainer,e.endOffset,e.endContainer,e.endOffset));a.W(f).action();b.Mb(m)}return{node:null,nb:!1}};this.G=function(a){z(!0===a,"typebehind.inline only accepts true as opt")}};function sg(){this.name="typebehind-todo-"+yb();this.fb=function(){return"todo"};this.A=function(){return[/\[[\sxX]?\]/gi]};this.C=function(a,b,c){b=M("object",{"class":"en-todo"});0<c.toLowerCase().indexOf("x")&&E(b,"en-todo-checked");a.insertNode(b);z(null!=b,"new node is null");u(c)&&(b.textContent=c.replace(/^\[[\sxX]?\]/,""));return{node:b,nb:!0}};this.G=function(a){z(!0===a,"typebehind.list only accepts true as opt")}};function tg(){this.name="typebehind-horizontalrule-"+yb();this.fb=function(){return"horizontalrule"};this.A=function(){return[/^\s*[\*\-\=]{3}[\s\*\-\=]*/gi]};this.J=function(a,b){return 13==b};this.nd=function(){return!0};this.C=function(a){var b=M("hr");a.insertNode(b);return{node:b,nb:!1}};this.G=function(a){z(!0===a,"typebehind.horizontalrule only accepts true as opt")}};function ug(){this.name="typebehind-code-"+yb();this.fb=function(){return"code"};this.A=function(){return[/\`{3}/gi]};this.nd=function(){return!0};this.J=function(a){return null!=P(a.startContainer,".en-code")?!1:!0};this.C=function(a){var b=M("div",{"class":"en-code"});b.appendChild(M("br"));a.insertNode(b);Jd(Id(b.firstChild,0));return{node:null,nb:!0}};this.G=function(a){z(!0===a,"typebehind.code only accepts true as opt")}};function vg(a){var b=this;b.name="typebehind-table-"+yb();b.fb=function(){return"table"};b.A=function(){return[/^\s*(\[\s*\]){2,}([xX][0-9]+)?/gi]};b.nd=function(){return!0};b.J=function(a){return null!=P(a.startContainer,"table,li")?!1:!0};b.C=function(c,d,e){b.A();c=e.split("][").length;e=e.match(/[0-9]+$/);d=1;e&&(d=parseInt(e[0],10));a.W("inserttable").action(c+","+d);a.Ia();return{node:null,nb:!1}};b.G=function(a){z(!0===a,"typebehind.table only accepts true as opt")}};function wg(){var a=this;a.name="typebehind";a.G=function(b){function c(){var a=W(p);if(a&&a.collapsed){var b=a.endContainer,c=null;if(!(n.get("code")&&(D(a.startContainer,"en-code")||P(a.startContainer,".en-code"))||n.get("inline")&&Nc(a.endContainer)&&"tt"===L(a.endContainer.parentNode))){var f=n.wa.slice();0<=f.indexOf("inline")&&f.splice(f.indexOf("inline"),1);if(32===y.currentlyProcessingCode)c=b.textContent.substring(0,a.endOffset);else if(9===y.currentlyProcessingCode)b=rc(b),Nc(b)&&(c=b.textContent,
a=Id(b,c.length,b,c.length));else if(13===y.currentlyProcessingCode)b=Jc(b),b===a.endContainer.parentNode&&(b=Jc(b)),Nc(b)&&(c=b.textContent,a=Id(b,c.length,b,c.length));else{b=a.endContainer;for(f=Jc(b);Wc(f)&&"tt"!==L(f)&&null==P(f,"tt",p);)b=f,f=Jc(b);a=Id(b,0,a.endContainer,a.endOffset);c=a.toString();f=["inline"]}var g=!1;if(0<q.length)for(var h=0;h<q.length;h++){var l=q[h];if(0<=f.indexOf(l)){g=!0;break}}b=g&&qc(b,p);if(null!=c)for(h=0;h<f.length;h++){var l=f[h],r=n.get(l);if(!(!r.ra||r.J&&
!r.J(a,y.currentlyProcessingCode)||r.nd&&!b)){var t=r.I&&!0,l=r.A(),xa=d(c,l,t);if(xa.possible){m.Pa(function(){var b;b=r;var d=a,f=xa.rx,g=c,h=t,l=d.endContainer;z(Nc(l),"typebehind: node must be text");z(null!=f,"must be given a regex to work");h?b=b.C(d,f,g):(g=e(g,f,h),d=g.matchString,g=g.index,l.replaceData(g,d.length,""),l=Id(l,g,l,g),b=b.C(l,f,d));null!=b.node&&(f=b.node,32===y.currentlyProcessingCode?Jd(Id(f.nextSibling,1)):9===y.currentlyProcessingCode&&Jd(Id(f.nextSibling,5)));b.nb&&(f=
W(),f.startContainer&&Nc(f.startContainer)&&(f.startContainer.textContent=f.startContainer.textContent.replace(/(\xa0)+$/gi,""),null===b.node||Q(b.node,"object.en-todo")))&&(b=f.startContainer.parentNode,b.appendChild(M("br")),f=O(b),Jd(Id(b,f,b,f)))});break}}}}}}function d(a,b,c){if(null==a||!u(a)||null==b)return{possible:!1,rx:null};for(var d=0;d<b.length;d++)if(e(a,b[d],c))return{possible:!0,rx:b[d]};return{possible:!1,rx:null}}function e(a,b,c){if(null==a||null==b)return null;b=b.source;c||(b=
"(?:\\s+|\u00a0+|^)("+b+")(?:[\u00a0\\t ]*$)");(c=a.match(new RegExp(b,"gi")))&&1<c.length&&v.warn("Should not be multiple matches here!");if(null==c||0>=c.length)return null;c=c[0].trim();return{matchString:c,index:a.lastIndexOf(c)}}function f(a){t.forEach(function(b){if(a.keyCode===b)return y.shouldProcess=!0,y.currentlyProcessingCode=b,!0})}var g=a.H("context"),h=a.H("format"),l=B(b,{emoticon:!1,url:!1,email:!1,list:!1,inline:!1,todo:!1,horizontalrule:!1,code:!1,table:!1}),m=a.H("undo"),p=g.root,
r=a.da(),n=new Db;n.set("emoticon",new og);n.set("url",new pg);n.set("email",new ng);n.set("list",new qg(g));n.set("inline",new rg(g,h));n.set("todo",new sg);n.set("horizontalrule",new tg);n.set("code",new ug);n.set("table",new vg(g));var q=[];n.wa.forEach(function(a){var b=n.get(a),c=b.fb(),d=l[c];null!=d&&!1!==d&&(r.G(b,l[c]),b.nd&&q.push(a))});var y={shouldProcess:!1,currentlyProcessingCode:null},t=[9,13,32];for(b=0;b<Da.length;b++)t.push(Da[b].charCodeAt(0));a.D.listener(p,"keypress",f);a.D.H("editingKeyEventOccurred",
f);a.D.listener(p,"keyup",function(){y.shouldProcess&&(y.shouldProcess=!1,c())});a.Na=function(a,b){n.wa.forEach(function(c){c=n.get(c);var d=l[c.fb()];null!=d&&!1!==d&&null!=c.Na&&c.Na(a,b)})};a.Ta=function(a,b){n.wa.forEach(function(c){c=n.get(c);var d=l[c.fb()];null!=d&&!1!==d&&null!=c.Ta&&c.Ta(a,b)})}}};function xg(){var a=this;a.name="enml";var b=/^<!DOCTYPE[^>]*>\n?/g,c=/ +xmlns="(http:\/\/www.w3.org\/1999\/xhtml)?"/g,d=/<en-todo([^>]*?)><\/en-todo>/g,e=/<en-media([^>]*?)><\/en-media>/g,f=/<en-(todo|media)([^>]*?)\/>/g;a.G=function(g){var h=B(g,{root:null}).root||a.H("context").root,l=!1;a.Ad=function(b){b=b.replace(f,"<en-$1$2></en-$1>");var c=new DOMParser,d=null;l||(d=c.parseFromString(b,"text/html"));if(l||null==d)l=!0,d=document.implementation.createHTMLDocument(""),b=b.replace(/(\s*<\?xml.*?\?>\s*|\s*<!DOCTYPE[^>]*?>\s*)*/gi,
""),d.body.innerHTML=b;if(null==d)return v.error("Was not able to parse",b),!1;var e=d.body&&d.body.firstElementChild;null==e&&(e=d.querySelector("en-note"));if(null==e)return v.error("Was not able to extract corrrect node",d),!1;if("en-note"!==L(e))return v.error("Invalid ENML. Expected en-note root node.",e),!1;na.forEach(function(a){e.hasAttribute(a)?h.setAttribute(a,e.getAttribute(a)):h.removeAttribute(a)});a.H("transform").gc(e,1);b=h.ownerDocument.importNode(e,!0);Dc(b,h);Se(h,"setDirty",!1);
return!0};a.oe=function(f){var g=B(f,{crypto:null,contentElement:h}),l=g.contentElement;f=document.implementation.createDocument("http://www.w3.org/1999/xhtml","en-note",document.implementation.createDocumentType("en-note","","http://xml.evernote.com/pub/enml2.dtd"));var n=f.documentElement;if(l.hasAttributes())for(var q=0;q<l.attributes.length;q++)-1!==na.indexOf(l.attributes[q].name.toLowerCase())&&n.setAttribute(l.attributes[q].name.toLowerCase(),l.attributes[q].value);Se(h,"beforeGetContent");
q=f.importNode(l,!0);null!=q&&wc(q,n);a.H("transform").Od(n,1,g);a.vc.A(!0).forEach(function(a){"transform"!==a.name&&a.Ta&&a.Ta(n,1,g)});l=n.querySelectorAll("*[id],*[class],*[data-en-overlay-id]");for(q=l.length-1;0<=q;q--){var y=l[q];y.removeAttribute("id");y.removeAttribute("class");y.removeAttribute("data");Ta(y.attributes).forEach(function(a){0===a.name.indexOf("data-")&&y.removeAttribute(a.name)})}f=(new XMLSerializer).serializeToString(f);return xc(fb(f).replace(b,'<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">').replace(c,
"").replace(d,"<en-todo$1 />").replace(e,"<en-media$1 />"))};a.D.B({name:"enml",action:function(b){if(!a.Ad(b))return!1;(b=a.Qb("undo"))&&b.clear();return!0},value:function(b){return a.oe(Pb(b))},enabled:Ma})}};function yg(){function a(){b.D.listener(c,"click",function(a){if(Q(a.target,"img:not(.en-object-placeholder)")){var b={};b.src=a.target.getAttribute("src")||"";b.name=a.target.getAttribute("name")||"";a=b||{};a.tagname="img";af("clicked",a)}});b.D.listener(c,"dblclick",function(a){if(Q(a.target,"img:not(.en-object-placeholder)")){var b={};b.src=a.target.getAttribute("src")||"";b.name=a.target.getAttribute("name")||"";a=b||{};a.tagname="img";af("doubleClicked",a)}})}var b=this;b.name="img";var c;b.G=
function(d){!0===d.imageClickEvents&&(c=b.H("context").root,a())}};function zg(){function a(a){null!=a&&a!=={}&&(g=a);U("img:not(.en-object-placeholder)",f).forEach(function(a){!0===a.complete?b(a):d.D.listener(a,"load",function(){b(a)})})}function b(a){d.og(a);var b=c(a),e=b.width,b=b.height;null==e&&null==b?a.style.height="auto":null!=e&&null!=b&&Math.round(a.naturalHeight/a.naturalWidth*10)===Math.round(b/e*10)&&(a.style.height="auto")}function c(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 d=this;d.name="img-dpi";var e,f,g=null;d.ig=function(a){if(null==g)return a.naturalWidth;var b;if(null==g["images-dpi"][a.getAttribute("src")])return a.naturalWidth;b=g["images-dpi"][a.getAttribute("src")][0];a=a.naturalWidth;return 144===b?Math.round(a/(b/72)):a};d.A=function(a){if(null==g)return a.naturalHeight;var b;if(null==g["images-dpi"][a.getAttribute("src")])return a.naturalHeight;
b=g["images-dpi"][a.getAttribute("src")][1];a=a.naturalHeight;return 144===b?Math.round(a/(b/72)):a};d.og=function(a){var b=a.naturalWidth,e=d.ig(a),f=a.naturalHeight,g=d.A(a),n=c(a);null==n.height&&null==n.width&&(b!==e&&T(a,"width",e+"px"),f!==g&&T(a,"height",g+"px"))};d.G=function(b){e=d.H("context");f=e.root;a(b.images);d.D.B({name:"images",action:function(b){null==b||ia(b)&&0===Object.keys(b).length||""===b?b=null:b=Pb(b);a(b);return!0},enabled:Ma})}};function Ag(){function a(a){if(null==a)return null;c.lastIndex=0;return(a=c.exec(a))&&a[1]?a[1]:null}var b=this;b.name="inline";var c=/^[\'\"]?(.*?)[\'\"]?(,|$)/;b.G=function(){function c(a){var b="";u(a)&&(-1<a.indexOf("+")||-1<a.indexOf("-"))&&(b=a[0],a=a.slice(1));a=Fe(a,"px","px");var f=null;if(a&&0<a.value){if(""===b)return f=a.ec,h.Ga("fontsize",f),!0;var g=e(a.kd);if(""!==g&&("+"===b?f=(parseInt(g,10)+a.value).toString()+a.kd:"-"===b&&(f=(parseInt(g,10)-a.value).toString()+a.kd),f))return c(f)}return!1}
function e(a,b){a||(a="px");if(!b){var c=f.B();if(!c)return"";var d=null;c.collapsed||(d=h.ic(c,g.jb));null===d&&(d=c.startContainer);b=h.ea(d,"fontsize")}return(c=Fe(b,a))&&c.value?c.value.toString():"0"}var f=b.H("context"),g=b.H("query"),h=b.H("format"),l=b.H("block"),m=b.H("editor"),p=f.root,r=f.xa;b.H("textinput");var n=null;b.D.ka(p,"beforeInput",function(){f.Qa();n=h.ae()},1E3);b.D.ka(p,"input",function(a){if(n){var b=n;n=null;a=Id(a.dc.Ua,a.dc.offset,a.Fa.endContainer,a.Fa.endOffset);Wa(a);
a&&!1===a.collapsed&&(f.$b(a),Wa(b),h.Mb(b),b=f.B(),b.collapse(!1),f.$b(b),f.Ia())}},-1E3);r.bold={U:!0,Ra:!0,action:function(a){a=null==a?!m.queryCommandState("bold"):+a;h.Ga("bold",a?"bold":"normal");return!0},La:["bold","600","700","800","900"],Ma:"fontWeight",bc:function(a,b){return a==b||"bold"==a&&"700"==b||"700"==a&&"bold"==b||"normal"==a&&"400"==b||"400"==a&&"normal"==b}};r.italic={U:!0,Ra:!0,action:function(a){a=null==a?!m.queryCommandState("italic"):+a;h.Ga("italic",a?"italic":"normal");
return!0},La:["italic","oblique"],Ma:"fontStyle"};r.underline={U:!0,Ra:!0,action:function(a){a=null==a?!m.queryCommandState("underline"):+a;h.Ga("underline",a?"underline":null);return!0},La:["underline"]};r.strikethrough={U:!0,Ra:!0,action:function(a){a=null==a?!m.queryCommandState("strikethrough"):+a;h.Ga("strikethrough",a?"line-through":null);return!0},La:["line-through"]};r.tt={U:!0,Ra:!0,action:function(a){a=null==a?!m.queryCommandState("tt"):+a;h.Ga("tt",a?"tt":null);return!0},La:["tt"]};r.fontname=
{U:!0,Ra:!0,action:function(a){h.Ga("fontname",a);return!0},value:function(){var b=f.B();if(!b)return"";var c=null;b.collapsed||(c=h.ic(b,g.jb));null===c&&(c=b.startContainer);b=h.ea(c,"fontname");return a(b)||""},Ma:"fontFamily",bc:function(b,c){return a(b)===a(c)}};r.fontsize={U:!0,Ra:!0,action:function(a){return c(a)},ib:function(){return 2<=h.ub(f.B(),g.jb).map(function(a){return h.ea(a,"fontsize")}).filter(function(a,b,c){return-1==c.slice(0,b).indexOf(a)}).length},value:function(a,b){return e(a,
b)},Ma:"fontSize",bc:function(a,b){if(a===b)return!0;var c=a;0<a.indexOf("pt")?c=Fe(a,"px").ec:0>a.indexOf("p")&&(c=a+"px");var d=b;0<b.indexOf("pt")?d=Fe(b,"px").ec:0>b.indexOf("p")&&(d=b+"px");return c===d}};r.forecolor={U:!0,Ra:!0,action:function(a){/^([0-9a-fA-F]{3}){1,2}$/.test(a)&&(a="#"+a);if(!/^(rgba?|hsla?)\(.*\)$/.test(a)&&!ye(a)&&"transparent"!=a.toLowerCase())return!1;h.Ga("forecolor",a);Nb("foreColorChanged",{color:a});return!0},Bg:!0,Ma:"color",bc:function(a,b){return xe(a)===xe(b)}};
r.backcolor={U:!0,Ra:!0,action:function(a){/^([0-9a-fA-F]{3}){1,2}$/.test(a)&&(a="#"+a);if(!/^(rgba?|hsla?)\(.*\)$/.test(a)&&!ye(a)&&"transparent"!=a.toLowerCase())return!1;h.Ga("backcolor",a);return!0},ib:function(){return 2<=h.ub(f.B(),function(a){return g.M(a)&&3===a.nodeType}).map(function(a){return h.ea(a,"backcolor")}).filter(function(a,b,c){return-1==c.slice(0,b).indexOf(a)}).length},Bg:!0,Ma:"backgroundColor",bc:function(a,b){return xe(a)===xe(b)}};r.highlight={U:!0,Ra:!0,action:function(a){a=
null==a?!m.queryCommandState("highlight"):+a;h.Ga("highlight",a?"rgb(255, 250, 165)":null);return!0},La:["rgb(255, 250, 165)","rgb(255, 204, 102)","rgb(246, 238, 150)"],Ma:"backgroundColor",bc:function(a,b){return xe(a)===xe(b)}};var q="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".split(" ");r.removeformat={U:!0,Ra:!0,action:function(){function a(b){return g.M(b)&&-1<q.indexOf(L(b))}h.ub(f.B(),a).forEach(function(a){for(;a.hasChildNodes();)f.ba(a.firstChild,
a.parentNode,K(a));a.parentNode.removeChild(a)});if(g.M(f.B().startContainer)&&3==f.B().startContainer.nodeType&&0!=f.B().startOffset&&f.B().startOffset!=O(f.B().startContainer))if(f.B().startContainer==f.B().endContainer){var b=f.B().endOffset-f.B().startOffset,c=f.B().startContainer.splitText(f.B().startOffset);f.O(c,0,c,b)}else f.ce(f.B().startContainer.splitText(f.B().startOffset),0);g.M(f.B().endContainer)&&3==f.B().endContainer.nodeType&&0!=f.B().endOffset&&f.B().endOffset!=O(f.B().endContainer)&&
(c=[f.B().startContainer,f.B().startOffset],b=[f.B().endContainer,f.B().endOffset],f.be(document.documentElement,0),b[0].splitText(b[1]),f.O(c[0],c[1],b[0],b[1]));h.ub(f.B(),g.M).forEach(function(b){for(;a(b.parentNode)&&g.ja(b.parentNode,b);)l.Ha([b])});"subscript superscript bold tt fontname fontsize forecolor highlight backcolor italic strikethrough underline".split(" ").forEach(function(a){h.Ga(a,null)});return!0}};["superscript","subscript"].forEach(function(a){r[a]={U:!0,Ra:!0,action:function(b){b=
null==b?!m.queryCommandState(a):+b;h.Ga(a,null);b&&h.Ga(a,a);return!0},ib:function(){var b=h.ub(f.B(),g.jb);return b.some(function(b){return h.ea(b,a)==a})&&b.some(function(b){return h.ea(b,a)!=a})||b.some(function(b){return"mixed"==h.ea(b,a)})},La:[a]}});if(!0===Yd.rte.highlightMagic)try{var y=null;b.D.listener(f.root,"mousedown",function(){y=Le(f.root)});b.D.listener(document,"mouseup",function(a){var b=W(f.root);b&&!b.collapsed&&y!==Le(f.root)&&(!a.metaKey||a.altKey||a.shiftKey||a.ctrlKey?a.metaKey&&
a.altKey&&!a.shiftKey&&!a.ctrlKey&&Z.execCommand("strikethrough"):Z.execCommand("highlight"));y=null})}catch(t){v.error("Exception in <$>:",t.toString)}}};function Bg(){var a=this;a.name="io";a.G=function(){function b(a){a=!!a;f!==a&&(f=a,!1===f&&d.flush())}var c=a.H("context"),d=a.H("undo"),e=c.root,c=!1!==Yd.rte.cryptLegacy,f=!1,g;a.Ic=function(){return f};a.D.ka(e,"setDirty",function(c){var d=!0;!1===c&&(d=!1);b(d);g=a.D.timeout(function(){f&&bf("content")},1E3,g)},1);c&&(a.A=function(c){var d=B(c,{html:!1,cleanup:!1,stripNS:!1,trim:!0,titleString:null,withInsertionPoint:!1,hiddenCryptoData:null,wrap:!1,resetChangesState:!1,value:"",type:""});d.resetChangesState&&
b(!1);if("enml"===(d.type||d.value||""))return a.H("enml").oe({crypto:d.hiddenCryptoData});var f=c=null,g=d.withInsertionPoint;Se(e,"beforeGetContent");var r=e,n=Le(r);if(d.cleanup||g)r=e.cloneNode(!0);!1!==Yd.rte.cryptLegacy&&U("div.en-crypt-revealed,div.en-crypto-revealed",r).forEach(function(a){var b=a.id;0===b.indexOf("en-revealed-crypto:")?d.hiddenCryptoData&&d.hiddenCryptoData[b]?uc(a,M("embed",{type:"evernote/x-crypto",id:d.hiddenCryptoData[b]})):v.error("Found revealed crypto but not replacement. Key:",
b):v.error("Unsupported revealed crypto element with ID:",b)});d.cleanup&&f&&g&&(f.insertNode(Tf()),g=!1);g&&n&&(f=Ke(r,n))&&f.insertNode(Tf());d.cleanup&&a.H("transform").Od(r,2);d.stripNS?c=wb(r.outerHTML):c=r.innerHTML;d.trim&&(c=c.trim());c=fb(c);d.html?c="<html><head><title></title></head><body>"+c+"</body></html>":d.wrap&&(c=cg(r,c));return c});a.bd=function(c,f){f&&d.flush();var g=M("div",{},c),g=a.H("transform").gc(g,2,{gf:!0});Dc(g,e);f?d.flush():d.clear();b(!1)};c?a.D.B({name:"content",
action:function(b){b=Pb(b);null!=b.value&&(Qa("rte.content called with non-JSON string.","String used as new content."),b.content=b.value,delete b.value);b=B(b,{scrollToTop:!0,content:"",undoable:!1,type:"html",placeholder:null,resources:null});tb(b.resources)||a.H("resource").ge(b.resources);null!=b.placeholder&&e.setAttribute("data-en-placeholder",b.placeholder);"enml"===b.type?a.H("enml").Ad(b.content||""):a.bd(b.content||"",!0===b.undoable);!0===b.scrollToTop&&Bd(0,0);ef();return!0},value:function(b){return a.A(Pb(b))},
enabled:Ma}):a.D.B({name:"content",action:function(b){var c=Pb(b);if(null==b)return v.error("To set content at least provide {value:}"),!1;c=B(c,{type:"enml",placeholder:null,scrollToTop:!0,resources:null,undoable:!1});tb(c.resources)||a.H("resource").ge(c.resources);null!=c.placeholder&&e.setAttribute("data-en-placeholder",c.placeholder);"enml"===c.type?a.H("enml").Ad(c.content||""):a.bd(c.content||"",!0===c.undoable);!0===c.scrollToTop&&Bd(0,0);ef();return!0},value:function(c){c=Pb(c);c=B(c,{type:"enml",
cryptInfo:null,withInsertionPoint:!1,resetChangesState:!1});var d=a.H("crypt"),f=c.cryptInfo;if(f&&f.length)for(var g=0;g<f.length;g++)d.Lf(f[g]);Se(e,"beforeGetContent");if((f=d.Xg())&&0<f.length)return{success:!1,cryptInfo:f};if("enml"===c.type||"enex"===c.type)return d=a.H("enml").oe({}),"enex"===c.type&&(f=Z.queryCommandValue("title.content"),d='<?xml version="1.0" encoding="UTF-8"?>\r\n<!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export3.dtd">\r\n<en-export application="Evernote" version="Common Editor Build '+
window.CE_VERSION_INFO.lastBuildNumber+'">\r\n<note><title>'+f+'</title><content><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">'+d+"]]\x3e</note></content>"),{success:null!=d,value:d,type:c.type};f=Le(e);g=e.cloneNode(!0);f&&c.withInsertionPoint&&(d=Ke(g,f))&&d.insertNode(Tf());a.H("transform").Od(g,2);d="plain"===c.type?Hc(g):Ac()?wb(g.outerHTML):g.innerHTML;null!=d&&(d=d.trim(),d=fb(d),"plain"!==c.type&&(d=cg(g,d)),
c.resetChangesState&&b(!1));return{success:null!=d,value:d,selectionPath:f,type:c.type?c.type:"html"}},enabled:Ma});a.D.B({name:"changes",action:function(a){b(Ob(a));return!0},state:function(){return f},enabled:Ma,cc:!0})}};function Cg(){var a=this;a.name="link";a.G=function(){function b(b){if(!b)return!1;a.H("edit").ia({Cd:!1});var c=e.B();if(!f.M(e.B().startContainer)&&!f.yb(e.B().startContainer))return!0;f.Y(c.startContainer)&&1==c.startContainer.childNodes.length&&S(c.startContainer.firstChild)&&0==c.startOffset&&c.startContainer.removeChild(c.startContainer.firstChild);c.insertNode(b);e.O(b.parentNode,1+K(b));return!0}function c(){if(!e.B()||!e.B().startContainer)return null;var a=window.getSelection().toString();
return vb(a)?a:null}function d(){if(!e.B()||!e.B().startContainer)return null;var a=P(e.B().startContainer,"a[href]",e.root);return a?a.href:null}var e=a.H("context"),f=a.H("query"),g=a.H("format"),h=e.xa;h.createlink={U:!0,action:function(a){if(!a)return!1;var c={};"{"===a[0]?c=B(a,{url:null,title:null}):(c.url=a,c.title=a);c.url=Rf(c.url);if(e.B().collapsed)return a=M("a",{href:Rf(c.url)}),a.textContent=c.title,b(a);g.ub(e.B()).forEach(function(a){f.Vb(a).forEach(function(a){f.M(a)&&R(a,"a")&&a.hasAttribute("href")&&
a.setAttribute("href",c.url)})});g.Ga("createlink",c.url);return!0},value:function(){return d()||c()||""},state:function(){return!!d()||!!c()}};h.unlink={U:!0,action:function(){for(var a=e.B(),b=[],c=a.startContainer;c;c=c.parentNode)R(c,"a")&&c.hasAttribute("href")&&b.unshift(c);for(c=a.startContainer;c!=f.kb(a.endContainer);c=f.nextNode(c))R(c,"a")&&c.hasAttribute("href")&&(f.Wd(c,a)||Oc(a.endContainer,c)||c==a.endContainer)&&b.push(c);for(a=0;a<b.length;a++)g.Ge(b[a],"unlink");return!0},value:function(){return d()||
""},state:function(){return!!d()}};a.Na=function(a){ud("*[href]",a).forEach(function(a){var b=a.getAttribute("href"),c=Rf(b);b!==c&&(v.info("Sanitized link:",c),a.setAttribute("href",c))});ud("*[src]",a).forEach(function(a){var b=a.getAttribute("src"),c=Rf(b);b!==c&&a.setAttribute("src",c)})};a.Ta=function(){}}};function Dg(){var a=this;a.name="misc";a.G=function(){var b=a.H("context"),c=a.H("normalize");b.xa.normalize={uc:!0,action:function(a){if(!a||"all"===a)return c.Wc(),!0;if(!b.B())return v.warn("Command normalize called without selection. Value:",a),!1;if("start"===a)return c.mc(),!0;if("end"===a)return c.Kg(),!0;if("selection"===a)return c.Pc(),!0;if("edges"===a)return c.We(),!0;v.warn("Command normalize called with unknown value:",a);return!1},enabled:Ma}};a.Na=function(a,c){if(1===c||2==c){var d=
a.querySelector('*[title="CommonEditorBuild"]');null!=d&&(d.textContent=la().toString(),d=a.querySelector('*[title="CommonEditorDate"]'),null!=d&&(d.textContent=ma().toString()))}}};function Eg(){function a(a){this.Sa=Ab(b.name);this.info={title:"Unknown",mime:"application/octet-stream",hash:"",filename:"",filesize:"",downloaded:"",progress:0,url:null,state:"unloaded",thumbnailURL:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",contextURL:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"};this.A=!1;this.O(a);this.ea=function(a){a.preventDefault()}}var b=this;b.name="resource";var c="img.en-media",c=c+",embed";a.prototype.L=
function(){this.B||(this.B=this.J(),this.update());return this.B};a.prototype.J=function(){var a=this.info.mime,b=-1!==["image/jpeg","image/png","image/gif","image/tiff","image/svg+xml"].indexOf(a),c="application/pdf"===a,g="application/vnd.evernote.ink"===a,h={src:this.info.url,"class":"en-media"},l=ob({},this.info.attrs||{});delete l.hash;delete l.type;var m="en-media:"+this.info.mime+":"+this.info.hash;b?h.id=m+":"+(l.width||"none")+":"+(l.height||"none"):(g?(h.type=a,h.border="1"):h.type=c?"evernote/x-pdf":
"evernote/x-attachment",h.id=m);ob(h,l,!0);a=M(this.N?"img":"embed",h);a.setAttribute("data-en-resource-reference",this.Sa);id(a,"height");return a};a.prototype.H=function(){return this.L()};a.prototype.O=function(a){a&&(z(lb(a)||lb(this.info),"Info param must be dictionary."),this.info=ob(this.info,a),this.info.url||(this.info.url="?hash="+this.info.hash),this.info.mime=this.info.mime.toLowerCase(),this.N=-1!==this.info.mime.indexOf("image/"))};a.prototype.update=function(a){var b=this.info,c=!(!a||
["hash","url","mime","width","height"].every(function(c){return!a.hasOwnProperty(c)||b[c]===a[c]}));this.O(a);if(!this.B)return c;this.X&&this.X.setAttribute("src",this.info.thumbnailURL);this.Y&&(this.Y.textContent=this.info.filename);this.I&&(this.I.textContent="loading"===this.info.state&&this.info.downloaded?this.info.downloaded+" / "+this.info.filesize:this.info.filesize);this.ba&&(this.ba.textContent=this.info.title);this.C&&this.C.setAttribute("src",this.info.contextURL);return c};a.prototype.toJSON=
function(){return{hash:this.info.hash,url:this.info.url,mime:this.info.mime,rect:N(this.B),reference:this.Sa,selected:this.A}};b.G=function(d){function e(a){var b=P(a.target,"a[href]");gf(this.info.url,"resource",{hash:this.info.hash,mime:this.info.mime,reference:this.Sa,anchorHref:b?b.getAttribute("href"):void 0,action:"open"});a.preventDefault()}function f(a){if(!q){q={};for(var b in n){var c=n[b],d=q[c.info.hash];d||(q[c.info.hash]=d=[]);d.push(c)}}return q[a]||[]}function g(a){var b=J(a)?a.getAttribute("data-en-resource-reference"):
a.reference,c=null;b&&(c=n[b]);c||(c=h(a));return c}function h(b){var c,d,f;if(b instanceof HTMLElement){"en-media"===L(b)?(c=b.getAttribute("hash"),d=b.getAttribute("type")):(f=b.getAttribute("id"),z(!!f,"ID for non image resources is mandatory!"),f=f.split(":"),d=f[1],c=f[2]);b.getAttribute("x-evernote-mime");f=r[c]||{};f.hash||(f.hash=c);!f.mime&&d&&(f.mime=d);d={};if(b&&(b=b.attributes))for(c=b.length;c--;)d[b[c].name.toLowerCase()]=b[c].value;f.attrs=d}else lb(b)&&(f=b);z(f&&f.hash,"Info data or hash inside is missing to create a resource element.");
b=new a(f);n[b.Sa]=b;b.ea=e;return b}var l=b.H("context"),m=l.root,p=l.xa,r=d.resources||{},n={},q=null;b.ge=function(a){q=null;if(fa(a)){var b=a;a={};for(var c=0;c<b.length;c++){var d=b[c];a[d.id]=d}}z(lb(a),"Expected dict for resourceInfoDefaults",a);ob(r,a)};b.sg=function(a){var b=window.getSelection();return U(c,a?a:m).map(function(a){var c=g(a);c.A=b&&!b.isCollapsed&&b.containsNode(a,!1);return c})};p.resources={U:!0,uc:!0,action:function(a){if(a=Qb(a)){var c=!1,d=!1;a.forEach(function(a){var e;
if("update"===a.action)c=!0,a.reference?(e=g(a))&&e.update(a)&&(d=!0):f(a.hash).forEach(function(b){b.update(a)&&(d=!0)});else if("insert"===a.action){if(l.Jb())return!1;l.hasFocus()||Z.execCommand("content.focus");l.Qa();l.dh();var m=b.H("paste");e=h(a);e=e.H();m.insertNode(e);Xd(e);d=!0}});d&&Se(m,"setDirty");c&&setTimeout(function(){b.H("layer").Pb()})}return!0},value:b.sg,enabled:Ma};b.Na=function(a,b){if(1===b)for(var c=a.getElementsByTagName("en-media"),d=c.length-1;0<=d;d--){var e=c[d],f=h(e);
z(!!f,"Failed to create resource for",e);uc(e,f.H())}else ud('embed[id^="en-media:"],img[id^="en-media:"]',a).forEach(function(a){var b=h(a);uc(a,b.H())})};b.Ta=function(a,b){1===b?ud(c,a).forEach(function(a){var b=g(a);b&&(a=Gc(a,"en-media"),a.removeAttribute("src"),a.removeAttribute("class"),a.removeAttribute("id"),a.removeAttribute("data-en-resource-reference"),a.setAttribute("type",b.info.mime),a.setAttribute("hash",b.info.hash))}):ud('embed[id^="en-media:"],img[id^="en-media:"],.en-object-placeholder',
a).forEach(function(a){a.removeAttribute("class");a.removeAttribute("data-en-resource-reference")})}}};function Fg(){function a(a){n.call(this,a)}function b(a){n.call(this,a)}function c(a){n.call(this,a)}function d(a){n.call(this,a)}function e(a){n.call(this,a)}function f(a){n.call(this,a)}function g(a){n.call(this,a)}function h(a){n.call(this,a)}function l(a){a.dg=!0;n.call(this,a)}function m(a){n.call(this,a)}function p(a){n.call(this,a)}function r(a){n.call(this,a)}function n(a){if(!(this instanceof n))return new n(a);this.B=a;this.G()}function q(a){var b=hd(a.Sf,"-evernote-context-name");b&&(T(a.lg,
"-evernote-context-name",b),a.lg.textContent=a.K.Sc[b+"-label"]||b)}function y(a,b){a.Sf=t(a.Ua,"context");a.lg=t(a.rf,"context");var c=a.Sf,d=hd(c,"-evernote-context-name");E(c,"en-editable-context");var e;tc(c);c.appendChild(e=M("span"));e.textContent=a.K.Sc[d+"-label"]||d;for(var f=[],g=0;g<b.length;g++){var h=b[g],l=M("option",{value:h},[a.K.Sc[h+"-label"]||h]);h===d&&l.setAttribute("selected","selected");f.push(l)}var m=M("select",{"class":"en-editable-select-context",tabindex:"-1"},f);c.insertBefore(m,
null);x.D.listener(m,"change",function(){var b=m.value;T(c,"-evernote-context-name",b);e.textContent=a.K.Sc[b+"-label"]||b;if(a.K.rd instanceof Object)try{var d=a.K.rd[a.name];d&&d(a)}catch(f){v.error("Exception on onDidChangeActions (2)",f.toString())}a.K.Ue=a.name;Y=!0});c.parentElement.style.textDecoration="none"}function t(a,b){for(var c=Ta(a.querySelectorAll("*[style*='x-evernote:']")),d=0;d<c.length;d++){var e=c[d];if(hd(e,"x-evernote")===b)return e}return null}function A(a){var b=a.node;E(b,
"en-editable");E(b,"en-editable-"+a.type);E(b,("en-"+a.K.hd+"-"+a.name).toLowerCase());b.setAttribute("title",(a.K.Sc[a.name+"-placeholder-title"]||"...")+"\u00a0\u00a0\u00a0");ad(b,!0);C(a);a.K.Cf&&b.removeAttribute("style");var c=null;x.D.listener(b,"focus",function(){c=a.object.H();Bb(function(){window.getSelection().selectAllChildren(b)})});x.D.listener(b,"input",function(){Y=!0});x.D.listener(b,"blur",function(){Md();C(a);var b=!1;if(a.K.rd instanceof Object)try{var d=a.K.rd[a.name];d&&d(a)&&
(b=!0)}catch(e){v.error("Exception on onDidChangeActions (1)",e.toString())}d=a.object.H();if(b||c!==d)a.K.Ue=a.name,Y=!0});x.D.listener(b,"keydown",function(c){var d=!1;13===c.keyCode?a.dg||(b.blur(),d=!0):8===c.keyCode&&(document.execCommand("delete"),d=!0);return d?X(c):!1})}function G(a,b){var c=Hc(a).trim();sb(c)?c="\u00a0":b?(c=c.split("\n"),c=c.map(function(a){return sb(a)?"<div><br/></div>":"<div>"+xb(a)+"</div>"}),c=c.join("")):c=xb(c.replace(/\n/g," "));return c}function C(a){z(!!a,"We need field info");
z(!!a.node,"We need an element to work on");var b=a.node;b.innerHTML=G(b,a.dg);sb(b.textContent)?E(b,"en-editable-placeholder"):H(b,"en-editable-placeholder");a.ef=b.innerHTML}var x=this,F=null;z(this instanceof Fg,"Use `new` to instantiate this class");x.name="template";var ga=!0,Y=!1;n.prototype.G=function(){};n.prototype.H=function(){return this.B.node.innerHTML};n.prototype.Id=function(a){var b=this.H();this.B.sd.innerHTML=b;a&&this.B.K.Ue===this.B.name&&this.B.sd.insertBefore(Tf(),null)};ka(r,
n);ka(p,n);p.prototype.H=function(){return G(this.B.node)};ka(m,n);m.prototype.G=function(){A(this.B)};m.prototype.H=function(){return G(this.B.node)};ka(l,m);l.prototype.H=function(){try{return G(this.B.node,!0)}catch(a){v.error("getHTML 'PlainTextArea.prototype.getHTML' failed ",a)}return null};ka(h,n);h.prototype.G=function(){this.B.node=t(this.B.Ua,"value");this.B.sd=t(this.B.rf,"value");z(!!this.B.node,"x-evernote:value element missing in phone field");A(this.B);y(this.B,"phone home work mobile main home-fax work-fax other".split(" "))};
h.prototype.H=function(){return G(this.B.node)};h.prototype.Id=function(a){h.Dd.Id.call(this,a);q(this.B)};ka(g,n);g.prototype.A=function(a,b){z(b instanceof Object);b.href=a;return M("a",b,[a])};g.prototype.C=function(){var a=this.B.node.textContent;return!a||sb(a)?"":a.trim()};g.prototype.G=function(){function a(){H(f,"en-editable-hidden");E(e,"en-editable-hidden");tc(g);var c=b.C();sb(c)?(H(e,"en-editable-hidden"),E(f,"en-editable-hidden")):g.appendChild(b.A(c,{tabindex:"-1"}));e.textContent=c}
var b=this;this.B.node=t(this.B.Ua,"value");this.B.sd=t(this.B.rf,"value");z(!!this.B.node,"x-evernote:value element missing in LinkField");var c=this.B.node,d=this.C();id(c,"text-decoration");tc(c);var e;c.appendChild(e=M("div"));e.textContent=d;this.B.node=e;A(this.B);var f,g;c.appendChild(f=M("div",{"class":"en-editable-preview"},[g=M("span")]));a();x.D.listener(f,"click",function(){e.focus()});x.D.listener(e,"focus",function(){H(e,"en-editable-hidden");E(f,"en-editable-hidden")});x.D.listener(e,
"blur",function(){a()});E(this.B.Ua,"en-editable-container")};g.prototype.H=function(){var a=this.B.node.textContent;return sb(a)?"\u00a0":xb(this.A(a,{}))};ka(f,g);f.prototype.G=function(){f.Dd.G.call(this);y(this.B,["email","home","work","other"])};f.prototype.Id=function(a){f.Dd.Id.call(this,a);q(this.B)};f.prototype.A=function(a,b){a=a.trim().replace(/^mailto:/,"");z(b instanceof Object);b.href="mailto:"+a;return M("a",b,[a])};ka(e,g);e.prototype.C=function(){var a=this.B.node.textContent;if(!a)return"";
a=a.trim().replace(/^\@/,"");return sb(a)?"":a};e.prototype.A=function(a,b){z(b instanceof Object);b.href="http://twitter.com/"+encodeURIComponent(a);return M("a",b,["@"+a])};ka(d,g);ka(c,g);ka(b,g);b.prototype.C=function(){var a=this.B.node.textContent;if(!a)return"";a=a.trim().replace(/^\@/,"");return sb(a)?"":a};b.prototype.A=function(a,b){z(b instanceof Object);return document.createTextNode("@"+a)};ka(a,g);a.prototype.A=function(a,b){a=a.trim();z(b instanceof Object);b.href="http://maps.google.com/?q="+
encodeURIComponent(a);return M("a",b,[a])};var Aa={title:p,field:m,textarea:l,phone:h,email:f,twitter:e,linkedin:d,facebook:c,weibo:b,address:a,"profile-image":r},ca=Object.keys(Aa);x.I=function(){F===document.body?(x.Lb=document.body.parentNode.cloneNode(!0),Ta(x.Lb.getElementsByTagName("head")).forEach(function(a){I(a)})):x.Lb=F.cloneNode(!0);var a=x.C(F),b=x.C(F===document.body?x.Lb.getElementsByTagName("body")[0]:x.Lb);x.eb=[];for(var c=0;c<a.length;c++)try{var d=a[c];d.index=c;d.sd=b[c].node;
d.K=this.K;d.Ua=d.node;d.rf=d.sd;d.object=new Aa[d.type](d);x.eb.push(d)}catch(e){v.error("A field failed during setup",e.toString())}};x.J=function(a){a=B(a,{ke:null,hd:null,he:null,Cf:!1,Df:null,Ef:null,qf:{},rd:{},Sc:{},Ue:null,root:null});x.K=a;F=a.root||document.getElementById("en-note");z(F&&J(F),"Root not valid!");bg(F);z(null!==x.K.ke,"Content Class is required");x.K.hd=x.K.hd||x.K.ke.replace(/[^\w]+/gi,"-");E(F,"en-template-style-on");E(F,x.K.hd);x.I();x.D.ka(F,"setDirty",function(a){var b=
!0;!1===a&&(b=!1);Y=!!b});null!==x.K.Ef&&x.A(x.K.Ef);x.N=function(a){x.A(a.value)};x.D.H("titlechanged",x.N);if(x.K.qf instanceof Object)for(var b=0;b<x.eb.length;b++)try{var c=x.eb[b],d=x.K.qf[c.name];d&&d(c)}catch(e){v.error("Exception on onDidInitActions (3)",e.toString())}b=this.da();b.G(new Jf,{root:F});b.G(new xg);b.G(new Eg);x.Nd();b=a.html;a=a.enml;z(!(null!=b&&null!=a),"You can only provide one content type: html or enml");u(b)?x.bd(b):u(a)&&z(!1,"ENML currently not supported for Templates")};
x.S=function(){H(F,"en-template-style-on");H(F,x.K.hd);x.eb=[]};x.hasFocus=function(){var a=W(F);return a&&(a=Od(a))?P(a,$c):!1};x.Nd=function(){function a(b,c){c=B(Pb(b),c,!0);var d=c.value;"html"===c.type&&(d=yc(d,F).textContent);try{document.execCommand("inserttext",!1,d.replace(/\s+/gi," "))}catch(e){}return!0}x.D.ad({Hb:["content","template"]});x.D.B({name:"focus",action:function(){x.focus();return!0},state:function(){return x.hasFocus()},value:function(){if(x.hasFocus())return x.name},enabled:Ma});
x.D.B({name:"paste",action:function(b){return a(b,{type:"html",mode:"plain",value:""})},enabled:Ma});x.D.B({name:"pasteplain",action:function(b){Qa('Please use execCommand("template.paste", { type: "plain", mode: "plain", "value": ... })');return a(b,{type:"plain",mode:"plain",value:""})},enabled:Ma});x.D.B({name:"copy",enabled:Ma,value:function(){var a=W(F);if(!a||a.collapsed)return"";var b={},a=a.cloneContents(),c=document.createElement("div");c.appendChild(a);zd(c,function(a){b.plain=Hc(a)});return JSON.stringify(b)}});
x.D.B({name:"content",action:function(a){a=Pb(a);null!=a.value&&(Qa("rte.content called with non-JSON string.","String used as new content."),a.content=a.value,delete a.value);a=B(a,{scrollToTop:!0,content:"",type:"html",resources:null});tb(a.resources)||x.H("resource").ge(a.resources);var b=a.content||"";"enml"===a.type?x.da().B("enml").Ad(b):x.bd(b);x.I();!0===a.scrollToTop&&Bd(0,0);ef();return!0},value:function(a){return x.L(Pb(a))},enabled:Ma});x.D.B({name:"changes",action:function(a){Y=!!Ob(a);
return!0},state:function(){return Y},enabled:Ma,cc:!0})};x.focus=function(a){for(a=+a||0;a<this.eb.length;a++){var b=this.eb[a];if(!b.eg){b.node.focus();break}}};x.A=function(a){if(a&&0<a.length&&255>=a.length){for(var b,c=0;c<this.eb.length;c++)if(!0===this.eb[c].eg){b=this.eb[c];break}b&&b.node.textContent!==a&&(b.node.textContent=a,b.ef=b.node.innerHTML)}};x.C=function(a){return Ta(a.querySelectorAll("*[style*='-evernote-editable:']")).map(function(a){var b=hd(a,"-evernote-editable");if(0<=ca.indexOf(b)){var c=
hd(a,"x-evernote"),d=this.K.Df&&this.K.Df===c;d&&(b="title");return d||null===this.K.he||this.K.he.some(function(a){return c===a})?{node:a,name:c,type:b,eg:d}:void 0}v.error("Invalid -evernote-editable field mode!",b)},this).filter(function(a){return a&&a.node})};x.bd=function(a){var b=M("div");b.innerHTML=a;Dc(b,F)};x.L=function(a){a=B(a,{html:!1,cleanup:!1,stripNS:!1,trim:!0,withInsertionPoint:!1,titleString:"",hiddenCryptoData:null,resetChangesState:!1,wrap:!1,type:""});v.log("template crypt legacy",
ga);a.resetChangesState&&(Y=!1);u(a.titleString)&&x.A(a.titleString);for(var b=0;b<this.eb.length;b++){var c=this.eb[b];try{c.object.Id(a.withInsertionPoint)}catch(d){v.error("Unable to extract data from field",d.toString(),c)}}if("enml"===(a.type||a.value||""))return b=x.da().B("enml").oe({crypto:a.hiddenCryptoData,contentElement:x.Lb.cloneNode(!0)}),ga?b:{success:null!=b,value:b,type:"enml"};if(ga)return b="html"===L(this.Lb)||a.stripNS?x.Lb.outerHTML:x.Lb.innerHTML,a.stripNS&&(b=wb(b)),b=b.trim(),
a.html?b="<html><head><title></title></head><body>"+b+"</body></html>":a.wrap&&(b=cg(F,b)),fb(b);a=x.Lb;b=Ac()?wb(a.outerHTML):a.innerHTML;null!=b&&(b=b.trim(),b=fb(b),b=cg(a,b));return{success:null!=b,value:b,type:"html"}};x.G=function(a){var b=a.contentClass,c=a.title,d=a.localization;ga=null==a.cryptLegacy?!0:a.cryptLegacy;if("evernote.food.meal.2"===b)x.J({root:a.root||null,ke:b,he:["caption-text","meal-review"],Cf:!0,Df:"title",Ef:c});else if("evernote.contact.1"===b){var e=function(a){return(a=
a.node.textContent)?a.replace(/\s+/g," ").trim():null},f=null,g=c;x.J({root:a.root||null,ke:b,he:"contact-title contact-org note-body weibo twitter phone email address display-as".split(" "),Cf:!1,Sc:d||{"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"},
qf:{"display-as":function(a){f=e(a)}},rd:{"display-as":function(a){g=nf.value("title.content");var b=!1;a=e(a);if(f&&a&&g){var c=new RegExp("\\b"+Ya(f)+"\\b","g");if(c=g.replace(c,a))255<c.length&&(c=g),nf.action("title.content",c),nf.action("title.changes",!0),b=!0,f=a}return b}}})}}};function Gg(a){a=L(a);return"p"===a||"div"===a}function Hg(a){a=L(a);return"ul"===a||"ol"===a}function Ig(a){return"td"===a||"th"===a}function Jg(a){return a?!!P(a,function(a){return a&&a.style?"rgb(255, 250, 165)"===a.style.backgroundColor:!1}):!1}function Kg(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 Lg(a,b,c){"undefined"===typeof c&&(c={});this.ma=c;z(null!=this.ma.Ed,"You have to provide tablePlugin config!");void 0!==c.cssBlockStyle?this.ba=c.cssBlockStyle:this.ba=this.Mf;this.async=!!c.async;if(!a)a=document.body;else if(a instanceof DocumentFragment||!Qc(a))c=M("div"),c.appendChild(a),document.body.appendChild(c),this.$=a=c;this.O=a;this.Xc=b;this.ze()}aa=Lg.prototype;aa.Ae="div";aa.Mf=null;
aa.ze=function(){var a=this;this.ja=this.pa=this.I=this.X=this.H=this.B=null;this.J=M("div");this.R=this.C=null;this.A=!1;this.Y=[];var b=Rc(document.body);this.ya=b&&b.fontSize?.8*+b.fontSize.replace(/px/gi,""):16;if(this.async){this.ea=this.ia=this.V=0;this.L=!1;this.ca=this.oa=(new Date).getTime();for(var b=document.createNodeIterator(this.O,-1,null,!0),c=0;b.nextNode();)++c;this.ga=c}this.za=document.createTreeWalker(this.O,-1,{acceptNode:function(b){for(var c=0;c<a.Y.length;c++)if(Oc(b,a.Y[c]))return 2;
return 1}},!0);Mg(this)};
function Mg(a){if(a.na)a.S();else{var b;try{for(;(b=a.za.nextNode())&&!(3===b.nodeType?Ng(a,b):1===b.nodeType&&a.ag(b),a.async&&(++a.V,150<(new Date).getTime()-a.oa)););++a.ia}catch(c){b=null}if(b&&a.async){a.ea=Math.min(1,a.V/a.ga);a.L||(b=((new Date).getTime()-a.ca)/a.ea,b+=10*(Math.ceil(a.ia/a.ea)-a.ia),2E3<=b&&(a.L=!0));if(a.L&&a.ma.onprogress)a.ma.onprogress(a,a.ea);window.setTimeout(function(){a.oa=(new Date).getTime();Mg(a)},10)}else{a.Y=null;Og(a.B);if(a.L&&a.ma.onprogress)a.ma.onprogress(a,1);
a.nf()}}}aa.nf=function(){this.Xc?Dc(this.J,this.Xc):this.Xc=this.J;this.S();if(this.ma.onready)this.ma.onready(this)};aa.S=function(){this.$&&document.body.removeChild(this.$)};
function Og(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);)Nc(b)?b.parentNode.appendChild(M("br")):b.appendChild(M("br"));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++)Nc(b)?b.parentNode.appendChild(M("br")):b.appendChild(M("br"));a.normalize()}}
aa.pc=function(a){a=M(a?a:this.Ae);this.ba&&a.setAttribute("style",this.ba);return a};function Pg(a){var b=a.pc();b.appendChild(M("br"));a.J.appendChild(b);a.A=!1}function Qg(a,b){var c=a.pc();null!=b&&(u(b)?c=a.pc(b):J(b)&&(c=b));if(a.J.hasChildNodes&&a.A){var d=a.J.lastElementChild;d&&d.textContent.length&&Gg(d)&&Gg(c)&&Pg(a)}a.A=!1;a.J.appendChild(c);return c}function Rg(a){Og(a.B);a.B=null;a.H=null}
function Sg(a,b){var c=document.createRange();c.selectNodeContents(b);c=c.getBoundingClientRect();a.R&&c&&!Oc(b,a.H)&&Math.abs(c.top-a.R.bottom)>=a.ya&&(a.A=!0);c&&(a.R=c)}
aa.cb=function(a,b,c,d){c=!Oc(a,this.H);if(d&&c)return null;b||(b=a.cloneNode(!1));"br"!==L(a)&&Sg(this,a);c&&(J(this.H)&&(d=L(this.H),Ig(d)&&(this.A=!0)),Rg(this));for(c=a;c!==this.O&&(c=c.parentNode);){this.H=c;d=L(c);if("li"===d)break;if(Ig(d))break;if(Tc(c))break}if(P(a,"table"))if(d=P(a,"table"),c=this.ma.Ed,null!=d&&null!=c&&J(d)&&"table"===L(d)){var e=c.bf(d);-1!==e.rows&&(this.pa!==d&&(this.pa=d,this.ja=c.Tf(e),Qg(this,this.ja),this.I=null),d=c.vd(a),null!=d.table&&(d=c=this.ja.querySelectorAll("tr")[d.row].querySelectorAll("td")[d.column],
null==c?v.warn("Something crazy happened with table simplify: <$>"):(1===c.childNodes.length&&"div"===L(c.childNodes[0])&&(d=c.childNodes[0],1===d.childNodes.length&&"br"===L(d.childNodes[0])&&tc(d)),this.I&&"td"===L(this.I.parentNode)&&this.I.parentNode===c&&"td"!==L(d)&&Nc(a)&&!Wc(a)&&!Wc(a.parentNode)&&(c=this.pc(),P(d,"td").appendChild(c),d=c),this.B=this.I=d)))}else v.warn("Couldn't simplify table. Look into this!");if(P(a,"li"))a:if(d=P(a,"li"),null==d)this.X=null;else{if(Nc(a)){if(-1!==a.textContent.search(/^\s*$/i))break a;
a.textContent.replace(/\s+/gi," ")}if(this.C&&this.X===d)this.B=this.C,Wc(this.C.lastChild)&&Wc(a)||this.B.appendChild(M("br"));else{var f=0;c=null;for(var g=d;g&&g!==this.O;)Hg(g)&&(++f,c||(c=L(g))),g=g.parentNode;f=Math.max(0,f);e=null;for(this.B&&0<this.B.childNodes.length?g=this.B:g=this.J;;){g=g.lastElementChild;if(!g)break;if(Hg(g)&&(e=g,--f,1>f))break}if(0<f&&e)g=e.lastElementChild,e=Qg(this,c||"ol"),g.appendChild(e);else if(!e)null!=this.B?(e=M(c||"ol"),this.B.appendChild(e)):e=Qg(this,c||
"ol"),d&&d.parentNode&&D(d.parentNode,"en-todo-list")&&(e.className="en-todo-list");else if(this.A||c&&c!==L(e))null!=this.B?(e=M(c||"ol"),this.B.appendChild(e)):e=Qg(this,c||"ol");if(null===this.B&&0<f)for(--f;f--;)g=Qg(this,c||"ol"),e.appendChild(g),e=g;this.B=this.pc("li");d&&D(d,"en-todo-checked")&&(this.B.className="en-todo-checked");e.appendChild(this.B);this.X=d;this.C=this.B}}a=this.af(a);this.B||(this.B=Qg(this));this.B.appendChild(this.Bf(b,a));return b};
function Ng(a,b){if(b){var c;if((c=Rc(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 e=a.cb(b,document.createTextNode(c));if(e)for(var f=1;f<d.length;f++){var g=e.parentNode;g.appendChild(M("br"));c=d[f].replace(/\s/gi," ").replace(/\s\s/gi,"\u00a0 ");g.appendChild(document.createTextNode(c))}}}else c=b.textContent.replace(/[\ \n\r\t]+/gi," "),d=!1,-1!==c.search(/^[\ \t\n]*$/i)&&
(d=!0),a.cb(b,document.createTextNode(c),!1,d)}else v.warn("Node missing",b)}
aa.ag=function(a){if(a){var b=L(a);if("div"===b&&/^en-revealed-crypto:\d+$/.test(a.id))Rg(this),this.cb(a,a.cloneNode(!0),!0),Rg(this),this.Y.push(a);else if("embed"===b)b=Yc(a,"type").toLowerCase(),"evernote/x-crypto"!==b&&"evernote/x-todo"!==b&&"evernote/x-attachment"!==b&&"evernote/x-pdf"!==b||this.cb(a);else if("script"===b||"style"===b)this.Y.push(a);else if("object"===b&&Q(a,"object.en-todo"))this.cb(a);else if("img"===b&&a.src)Rg(this),b=M("img"),Kg(b,a,"src"),Kg(b,a,"alt",""),Kg(b,a,"id"),
this.cb(a,b,!0),Rg(this);else if("hr"===b)Rg(this),b={},"true"===hd(a,"-evernote-encp-section-break")&&(b={style:"display:none;-evernote-encp-section-break:true;"}),this.cb(a,M("hr",b),!0),Rg(this);else{if("br"===b)if(Rg(this),P(a,"table"))b=this.pc(),b.appendChild(M("br")),this.cb(a,b,!0);else{Pg(this);return}this.B&&a&&(Tc(a)||!Pc(this.H,a))&&Rg(this)}}else v.warn("Node missing",a)};
aa.af=function(a){for(var b={ed:0,Tc:0,e:0,Qf:0,bg:0,xe:0,uf:0};a||a===this.O;){var c=L(a);"del"===c||"strike"===c||"s"===c?b.uf=1:"mark"===c?b.Tc=1:"a"===c&&(c=a.href+"")&&c.length&&(b.ed=c,b.e=0===c.indexOf("evernote://"));if(c=Rc(a)){var d=c.backgroundColor.toLowerCase();if("rgb(255, 204, 102)"===d||"rgb(255, 250, 165)"===d||"rgb(246, 238, 150)"===d||Jg(a))b.Tc=1;var d=c.fontWeight.toLowerCase(),e=c.fontStyle.toLowerCase(),c=c.textDecoration.toLowerCase();if("bold"===d||"bolder"===d||"700"===d)b.Qf=
1;if("italic"===e||"oblique"===e)b.bg=1;!b.ed&&0<=c.indexOf("underline")&&(b.xe=1);0<=c.indexOf("line-through")&&(b.uf=1)}a=a.parentNode}b.ed&&b.xe&&delete b.xe;return b};
aa.Bf=function(a,b){var c;b.ed&&(c=M("a"),c.setAttribute("href",b.ed),b.e&&c.setAttribute("style","color:rgb(105, 170, 53);"),c.appendChild(a),a=c);b.Qf&&(c=M("b"),c.appendChild(a),a=c);b.bg&&(c=M("i"),c.appendChild(a),a=c);b.xe&&(c=M("u"),c.appendChild(a),a=c);b.uf&&(c=M("s"),c.appendChild(a),a=c);b.Tc&&(c=M("span",{style:"-evernote-highlight:true; background-color:rgb(255, 250, 165);"}),c.appendChild(a),a=c);return a};
function Tg(a,b,c){if(!(this instanceof Tg))return new Tg(a,b,c);Lg.call(this,a,b,c)}ka(Tg,Lg);function Ug(a,b,c){if(!(this instanceof Ug))return new Ug(a,b,c);Lg.call(this,a,b,c)}ka(Ug,Lg);aa=Ug.prototype;aa.Ae="div";aa.Mf='font-family: Courier, "Courier New", monospace;';aa.ze=function(){this.N=[];Ug.Dd.ze.call(this)};aa.nf=function(){this.A=!0;for(var a=0;a<this.N.length;a++)this.B=Qg(this),this.B.appendChild(this.N[a]);Ug.Dd.nf.call(this)};
aa.pc=function(){var a=M(this.Ae);this.ba&&a.setAttribute("style",this.ba);return a};
aa.cb=function(a,b,c,d){c=!Oc(a,this.H);if(d&&c)return null;b||(b=a.cloneNode(!1));Sg(this,a);c&&(J(this.H)&&(d=L(this.H),Ig(d)&&(this.A=!0)),Rg(this));for(c=a;c!==this.O&&(c=c.parentNode);){this.H=c;d=L(c);if("li"===d)break;if(Ig(d))break;if(Tc(c))break}d=P(a,"li");if(!this.B&&d)if(this.C&&this.X===d)this.B=this.C,this.B.appendChild(M("br"));else{c=0;for(var e=d;e&&e!==this.O;)Hg(e)&&++c,e=e.parentNode;c=Math.max(0,c);this.B=Qg(this);e="- ";for(P(d,"ul.en-todo-list")&&(e=D(d,"en-todo-checked")?"[x] ":
"[ ] ");1<c;)e="\u00a0 \u00a0 "+e,--c;this.B.appendChild(document.createTextNode(e));this.X=d;this.C=this.B}else this.X=null,this.B||(this.B=Qg(this));a=this.af(a);this.B.appendChild(this.Bf(b,a));return b};
aa.ag=function(a){var b;b=L(a);"object"===b&&Q(a,"object.en-todo")?(b=D(a,"en-todo-checked"),this.cb(a,document.createTextNode(b?"[x] ":"[ ] "))):"embed"===b?(b=Yc(a,"type").toLowerCase(),"evernote/x-todo"===b?(b="true"===(Yc(a,"todo-checked")+"").toLowerCase(),this.cb(a,document.createTextNode(b?"[x] ":"[ ] "))):"evernote/x-attachment"!==b&&"evernote/x-pdf"!==b||this.N.push(a.cloneNode(!0))):("script"!==b&&"style"!==b||this.Y.push(a),"img"!==b&&("hr"===b?Rg(this):"br"===b?Rg(this):Ig(b)?(Rg(this),
this.A=!0):!this.B||!Tc(a)&&Pc(this.H,a)||Rg(this)))};aa.af=function(){return{}};aa.Bf=function(a){return a};
function Vg(){var a=this;this.name="simpletext";this.G=function(){function b(b,f){var l=c.B(),m,p,r;if(l&&!l.collapsed){d.We();p=ae(l,"td",e);p=p[0]===p[1]&&"td"===L(p[0])?ae(l,"div",e):ae(l,"table,ul,ol",e);m=p[0];var n=p[1];r=n.nextSibling;p=n.parentNode;m===n?c.de(m):c.O(m,0,n,n.childNodes.length);m=c.B().cloneContents()}if(m){var q=(new b(m,null,f)).Xc.childNodes;m=q[0];var n=q[q.length-1],y=l.startContainer,l=l.endContainer;for(r&&Nc(r)&&0===r.length&&(r=null);0<q.length;)null!==r?c.insertBefore(q[0],
p,r):c.zc(q[0],p);a.H("edit").ia({Cd:!0});l!==p&&l!==e&&l!==y&&c.removeNode(l);y!==e&&y!==p&&c.removeNode(y);l=sc(n);c.O(rc(m),0,l,l.length)}else new b(e,e,f),c.O(e,0),c.Ia();return!0}var c=a.H("context");a.H("query");var d=a.H("normalize"),e=c.root,f=c.xa;f.simpletext={U:!0,action:function(c){null!=c&&Qa("simpletext called with an argument!");return b(Tg,{Ed:a.H("table")})},enabled:Ma};f.plaintext={U:!0,action:function(d){var e=null,f=null,f="",e=null;d=Pb(d);null!=d.value&&(Qa("plaintext called with non-JSON string"),
d={});d=B(d,{fontStyle:"fixed width"});"fixed width"===d.fontStyle?(e=M("tt",{style:"position: absolute;"}),document.body.appendChild(e),f=Rc(e),f="font-family:"+f.fontFamily+"; font-size:"+f.fontSize+"; font-weight:"+f.fontWeight,I(e)):"none"===d.fontStyle&&c.W("removeformat").action();e={cssBlockStyle:f,Ed:a.H("table")};return b(Ug,e)},enabled:Ma}};this.Rg=function(b){return(new Tg(b,null,{Ed:a.H("table")})).Xc};this.He=function(b){return(new Ug(b,null,{Ed:a.H("table"),cssBlockStyle:""})).Xc}};function Wg(){this.name="spellcheck";this.root=null;this.G=function(){function a(a,b){var c;null!=a&&null!=b&&3===a.nodeType&&a===b.startContainer&&a===b.endContainer&&!0!==b.collapsed&&(c=a.data.substr(b.startOffset,b.endOffset-b.startOffset),a.replaceData(b.startOffset,c.length,c))}var b=this.H("context"),c=this.H("format");this.root=b.root;this.Gb=function(){var d=c.ae(),e,f=W(),g=Le(b.root);null!=f&&f.startContainer===f.endContainer&&3===f.startContainer.nodeType&&!1!==f.collapsed&&(f=f.startContainer,
e=window.getSelection(),e.modify("move","backward","word"),e.modify("extend","forward","word"),e=W(),a(f,e),Me(b.root,g),e=window.getSelection(),e.modify("move","forward","word"),e.modify("extend","backward","word"),e=W(),a(f,e),Me(b.root,g));b.Qa();c.Mb(d)};return this};this.S=function(){this.root=this.Gb=null}};function Xg(){var a=this;a.name="stats";a.G=function(){var b=a.H("context"),c=a.H("query"),d=a.H("todo"),e=b.root;a.getStats=function(b){var g={};b=B(b,{stats:["todo","firstLine","isEmpty","isDirty"]});b=b.stats;z(fa(b));-1!==b.indexOf("todo")&&(g.todo=d.df().length);if(-1!==b.indexOf("firstLine"))for(var h;h=Mc(h,e);)if(h&&!sb(h.textContent)){g.firstLine=Hc(c.oa(h)).substr(0,255).trim();break}-1!==b.indexOf("isEmpty")&&(g.isEmpty=me(e));-1!==b.indexOf("isDirty")&&(g.isDirty=a.H("io").Ic());return g};
a.D.B({name:"stats",U:!1,value:function(b){return a.getStats(Pb(b))},enabled:Ma,uc:!0})}};function Yg(){this.name="table";this.G=function(){var a=this,b=a.H("context"),c=a.H("query"),d=a.H("block"),e=b.root,f=b.xa;a.X=function(){var a=b.B();if(!a)return null;var c=P(a.startContainer,"table",e),a=P(a.endContainer,"table",e);return!c||a&&a!==c?null:c};a.A=function(){return a.X()?P(b.B().startContainer,"tr",e):null};a.Rd=function(){return a.X()?P(b.B().startContainer,"td",e):null};a.C=function(){var b;if(null==b&&(b=a.X(),null==b))return[];var c=window.getSelection(),d=[],e=[],f=[];mb(b.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};a.vd=function(a){var b={table:null,cell:null,row:-1,column:-1},c=P(a,"table"),d=P(a,"tr");a=P(a,"td,th");if(null==c||null==d||null==a)return b;for(var e=-1,f=-1,n=c.querySelectorAll("tr"),q=0;q<n.length;q++)n[q]===d&&(e=q);if(-1===e)return b;d=d.querySelectorAll("td,th");for(q=0;q<d.length;q++)d[q]===a&&(f=q);return-1===f?b:{table:c,cell:a,row:e,column:f}};a.J=function(a){var b=Rc(a.querySelector("td")),
c=parseInt(b.borderWidth,10)||1,d=b.borderColor||"black";mb(Ta(a.style),function(b){0<=b.indexOf("border")&&id(a,b)});a.removeAttribute("border");T(a,"border-style","solid");T(a,"border-width",c+"px");T(a,"border-color",d);T(a,"border-collapse","collapse");mb(a.querySelectorAll("tr"),function(a){mb(Ta(a.style),function(b){0<=b.indexOf("border")&&id(a,b)})});mb(a.querySelectorAll("td"),function(a){mb(Ta(a.style),function(b){0<=b.indexOf("border")&&id(a,b)});T(a,"border-style","solid");T(a,"border-width",
c+"px");T(a,"border-color",d)})};a.Pd=function(a){var b=hd(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};a.bf=function(a){if(null==a||!J(a)||"table"!==L(a)||null!=a.querySelector("table"))return{rows:-1,columns:-1};a=a.querySelectorAll("tr");return 0>=a.length?{rows:0,columns:0}:{rows:a.length,columns:a[0].querySelectorAll("td,th").length}};
a.Tf=function(a){for(var b=+a.columns||2,c=+a.rows||2,d=a.borderColor||"rgb(211,211,211)",e=+a.borderWidth||1,f=M("table",{style:"-evernote-table:true;border-collapse:collapse;width:100%;table-layout:fixed;"}),n=Math.round(1E4/b)/100,q=0;q<c;q++){var y=M("tr");f.appendChild(y);for(var t=0;t<b;t++){var A=M("td",{style:"border-style:solid;border-width:"+e+"px;border-color:"+d+";padding:10px;margin:0px;width:"+n+"%;"},[Ic()]);a.cellColor&&(A.style.backgroundColor=a.cellColor);y.appendChild(A)}}return f};
f.inserttable={U:!0,action:function(f){if(!b.B()||d.Xd())return!1;var h={};"{"===f[0]?h=B(f,{columns:2,rows:2,borderColor:"rgb(211,211,211)",borderWidth:1,cellColor:null,alignment:"left"}):(f=f.split(","),h.columns=+f[0].trim(),h.rows=+f[1].trim());b.W("insertparagraph").action();f=h.align||"left";var h=a.Tf(h),l=c.oa(b.B().startContainer);l.parentNode.insertBefore(h,l);d.Wa(h);b.O(h.querySelector("div"),0);b.W("tablealign").action(f);Se(e,"TABLE_ADDED",{target:h});return!0},state:function(){return!!a.X()},
enabled:function(){return b.hasFocus()&&!d.Xd()&&!d.Bb()}};f.inserttablerow={U:!0,action:function(c){var d=a.X();if(null==d)return!1;c="before"===c.toString().toLowerCase().trim();var f=P(b.B().startContainer,"tr",e),m=P(b.B().endContainer,"tr",e);if(!f&&!m)return!1;f=f.compareDocumentPosition(m)&(c?4:2)?f:m;if(!f)return!1;var m=f.cloneNode(!0),p=[];mb(m.querySelectorAll("td"),function(a){p.push(a);tc(a);a.appendChild(Ic())});b.ba(m,f.parentNode,K(f)+(c?0:1));Se(e,"TABLE_INSERT_ROW",{target:d});return!0},
state:function(){return!!a.X()},enabled:function(){return b.hasFocus()&&!!a.X()}};f.inserttablecol={U:!0,action:function(c){var d=a.X();if(!d)return!1;var f=b.B(),m="before"===c.toString().toLowerCase().trim();c=P(f.startContainer,"td",e);var p=P(f.endContainer,"td",e);if(!c&&!p)return!1;if("div"===L(f.endContainer)&&"td"===L(f.endContainer.parentNode)&&0===f.endOffset){var r=a.vd(f.startContainer),n=a.vd(f.endContainer),q=a.bf(d);if(0<q.rows&&r.row===n.row&&r.column+1===n.column||r.row+1===n.row&&
r.column===q.columns-1&&0===n.column)p=c;null==P(f.endContainer,"td")&&(p=c)}else null==p&&(p=c);var f=null,y=c.compareDocumentPosition(p)&(m?4:2)?c:p;if(null==y)return!1;var t=[],A=y.cellIndex;mb(Ta(d.querySelectorAll("td")),function(a){if(a.cellIndex===A&&d===P(y,"table")){var c=a.cloneNode(!0);tc(c);c.appendChild(Ic());t.push(c);var e=hd(a,"width"),e=window.parseFloat(e)||0;0<e&&(T(c,"width",e/2+"%"),T(a,"width",e/2+"%"));b.ba(c,a.parentNode,K(a)+(m?0:1))}});Se(e,"TABLE_INSERT_COLUMN",{target:d});
return!0},state:function(){return!!a.X()},enabled:function(){return b.hasFocus()&&!!a.X()}};f.deletetablerow={U:!0,action:function(){var c=a.A();if(!c)return!1;var d=a.X();if(!d)return!1;var f=U("tr",d);if(1===f.length)return b.W("deletetable").action();f.indexOf(c)===f.length-1?(f=U("td",f[f.length-2]).pop(),b.O(f,O(f))):(f=U("td",f[f.indexOf(c)+1]).shift(),b.O(f,0));b.removeNode(c);Se(e,"TABLE_DELETE_ROW",{target:d});return!0},state:function(){return!!a.A()},enabled:function(){return b.hasFocus()&&
!!a.A()}};f.deletetablecol={U:!0,action:function(){var c=a.Rd();if(!c)return!1;var d=c.cellIndex,f=a.X();if(!f)return!1;var m=U("td",f);if(m.every(function(a){return a.cellIndex===d}))return b.W("deletetable").action();var p=m.filter(function(a){return a.cellIndex===d+1});p&&p.length||(p=m.filter(function(a){return a.cellIndex===d-1}));for(var r=U("tr",f),n=0,q=0;q<r.length;q++)for(var y=U("td",r[q]),t=0;t<y.length;t++)y[t]===c&&(n=q);b.O(p[n],0);for(q=m.length-1;0<=q;q--)c=m[q],c.cellIndex===d&&
b.removeNode(c);Se(e,"TABLE_DELETE_COLUMN",{target:f});return!0},state:function(){return!!a.Rd()},enabled:function(){return b.hasFocus()&&!!a.Rd()}};f.deletetable={U:!0,action:function(){var c=a.X();if(!c)return!1;b.O(c.parentNode,K(c),c.parentNode,K(c)+1);a.H("edit").ia();Se(e,"TABLE_REMOVED",{target:c});return!0},state:function(){return!!a.X()},enabled:function(){return b.hasFocus()&&!!a.X()}};f.tablebordercolor={U:!0,action:function(b){var c=b||"black";b=a.X();if(null==b)return!1;a.J(b);T(b,"border-color",
c);mb(b.querySelectorAll("td"),function(a){T(a,"border-color",c)});return!0},value:function(){var b=a.X();return null==b?"":(b=Rc(b.querySelector("td")).borderColor)?""+b:""},state:function(){return!!a.X()},enabled:function(){return b.hasFocus()&&!!a.X()}};f.tableborderwidth={U:!0,action:function(b){var c=parseInt(b,10);if(isNaN(c)||0>c)return v.warn("Invalid value given to tableborderwidth <$>",Ua(c)),!1;b=a.X();if(null==b)return!1;a.J(b);T(b,"border-width",c+"px");mb(b.querySelectorAll("td"),function(a){T(a,
"border-width",c+"px")});Se(e,"TABLE_BORDER_WIDTH",{target:b,value:c});return!0},value:function(){var b=a.X();if(null==b)return"";b=Rc(b.querySelector("td"));return(b=parseInt(b.borderWidth,10))?""+b:"0"},state:function(){return!!a.X()},enabled:function(){return b.hasFocus()&&!!a.X()}};f.tablealign={U:!0,action:function(b){if("left"!==b&&"right"!==b&&"center"!==b)return v.warn("Invalid value given to tablealign <$>"),!1;var c=a.X();if(null==c)return!1;c.removeAttribute("align");id(c,"float");id(c,
"margin");id(c,"margin-right");id(c,"margin-left");"left"===b?T(c,"margin-left","0px"):"right"===b?(T(c,"margin-left","auto"),T(c,"margin-right","0px")):"center"===b&&(T(c,"margin-left","auto"),T(c,"margin-right","auto"));Se(e,"TABLE_ALIGN",{target:c,value:b});return!0},value:function(){var b=a.X();return null==b?"":a.Pd(b)},state:function(){return!!a.X()},enabled:function(){return b.hasFocus()&&!!a.X()}};f.tablecellcolor={U:!0,action:function(b){b=b||"transparent";var c=a.C();if(0===c.length)return!1;
mb(c,function(a){id(a,"background");id(a,"background-image");id(a,"background-attachment");id(a,"background-position");id(a,"background-clip");id(a,"background-repeat");T(a,"background-color",b)});return!0},value:function(){var b=a.C();if(0===b.length)return"";b=b[0].style;return b.backgroundColor?(b=xe(b.backgroundColor),null!=b?b:""):""},state:function(){return!!a.X()},enabled:function(){return b.hasFocus()&&!!a.X()}};a.Na=function(a,b,c){3===b&&("msexcel"===c.source&&ud('table[border="0"]',a).forEach(function(a){a.setAttribute("border",
"1");hd(a,"border")||T(a,"border","1px solid rgb(211,211,211)")}),U("table td:empty",a).forEach(function(a){0===O(a)&&(a.appendChild(M("br")),a.getAttribute(a,"style")||"0"===P(a,"table").getAttribute("cellpadding")&&a.previousElementSibling&&hd(a.previousElementSibling,"padding")&&T(a,"padding",hd(a.previousElementSibling,"padding")))}))}}};function Zg(){var a=this;this.name="tableselection";this.G=function(){function b(a,b){var c=[],d=[],e=Ud(a,"td");if(0<e.length)for(var f=0;f<e.length;f++){var g=e[f];b.containsNode(g,!1)?d.push(g):b.containsNode(g,!0)&&c.push(g)}return{Ne:d,se:c}}function c(){for(var a=e.getElementsByClassName("en-selected");0<a.length;)H(a[0],"en-selected")}var d=this.H("context"),e=d.root,f=!1,g,h=Id();this.D.ka(e,"selectionChanged",function(){if(W(e)&&!f&&0!==e.getElementsByTagName("table").length){var a=window.getSelection(),
d=W();h=Id(d.startContainer,d.startOffset,d.endContainer,d.endOffset);c();d&&!d.collapsed&&(a=b(d,a),1>=a.se.length&&0===a.Ne.length||(mb(e.querySelectorAll("table"),function(a){E(a,"en-selected")}),mb(a.se,function(a){E(a,"en-selected")}),mb(a.Ne,function(a){E(a,"en-selected")})))}});this.D.listener(document,"contextmenu",function(e){f=!0;g=a.D.timeout(function(){f=!1},1E3,g);e=e.target;var l=window.getSelection(),r=W();c();Qd(r,h)||(l=b(r,l),2!==l.se.length&&1!==l.se.length||0!==l.Ne.length||P(r.startContainer,
"td")===P(r.endContainer,"td")||(r=document.createRange(),r.selectNodeContents(e),d.$b(r),d.Ia()));return!0});c();var l=M("style",{type:"text/css"});l.textContent="td.en-selected { background-color: "+tf()+" !important;}";document.querySelector("head").appendChild(l)}};function $g(){var a=this;this.name="texttransform";this.G=function(){function b(a){void 0===a&&(a=document.body);c(a);f(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=Le(a,!0);a.normalize();Me(a,b)}function d(a){void 0===a&&(a=document.body);f(a,function(a){return a.toLocaleLowerCase()})}function e(a){void 0===a&&(a=document.body);f(a,function(a){return a.toLocaleUpperCase()})}
function f(a,b){var c;void 0===a&&(a=document.body);var d=W();if(d&&!(1>d.toString().length)){Nc(d.endContainer)&&0<d.endOffset&&d.endOffset<d.endContainer.textContent.length&&(c=d.endContainer.splitText(d.endOffset),d.setEnd(c,0));Nc(d.startContainer)&&0<d.startOffset&&(c=d.startContainer.splitText(d.startOffset),d.setStart(c,0));Jd(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();)Nc(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);Jd(d)}}var g=a.H("context"),h=g.root,g=g.xa;g.lowercase={U:!0,action:function(){d(h);return!0}};g.uppercase={U:!0,action:function(){e(h);return!0}};g.capitalize={U:!0,action:function(){b(h);return!0}}}};function ah(){var a=this;a.name="todo";var b;a.G=function(){function c(a,b){for(var c=0;c<a.length;c++){var d=a[c];b?E(d,"en-todo-checked"):H(d,"en-todo-checked")}}function d(a,c){oc(a,"en-todo-checked");Se(b,"setDirty",{pd:!0===c})}function e(a){var c=a.target;if(!g.Jb()){var d=U("li.en-todo-over",b);(a=f(a))&&E(c,"en-todo-over");for(var e=0;e<d.length;e++){var h=d[e];a&&h.isEqualNode(c)||H(h,"en-todo-over")}}}function f(a){var b=a.target;return R(b,"li")&&D(b.parentNode,"en-todo-list")&&40>a.clientX-
b.getBoundingClientRect().left}var g=a.H("context"),h=a.H("query"),l=a.H("block"),m=a.H("normalize"),p=a.H("undo");b=g.root;var r=g.xa;a.lf=function(a){var b=null;vd(a,function(a){return Q(a,"object.en-todo")?(b=a,!0):yd(a)||h.Z(a)?!1:!0},a);return b};a.$g=function(b){if(!Q(b,"div,li"))return!1;var c=a.lf(b);if(!c)return!1;for(var d=b.childNodes.length-1;0<=d;d--){var e=b.childNodes[d];if(e!==c&&(Nc(e)&&!yd(e)||!h.Ab(e)))return!1}return!0};a.A=function(){return M("object",{"class":"en-todo"})};a.Je=
function(b){var c=a.A();g.ba(c,b,0);l.Rb(b);return c};a.df=function(){return U("object.en-todo",b)};a.C=function(a){if(a&&a.parentNode){var b=a.parentNode,c=a.nextSibling;if(c&&Nc(c)){var d=c.textContent,e=d.trimLeft(d);d!==e&&(0==e.length?g.removeNode(c):c.textContent=e)}g.removeNode(a);l.Rb(b)}};a.D.listener(b,"mousemove",e);a.D.listener(b,"mouseout",e);a.D.listener(b,"blur",e);a.D.listener(b,"mouseup",function(a){if(Q(a.target,"object.en-todo")||f(a))g.Jb()||p.Pa(function(){d(a.target,!0)})});
r.controltodos={U:!0,action:function(d){var e=g.B();if(!e||!$c(b))return!1;var f=a.df();e.collapsed||(f=Ud(e,"object.en-todo"),e=Od(e),(e=wd(e,"object.en-todo",h.oa(e)||b))&&f.push(e));if(d&&"toggle"!=d)if("on"==d)c(f,!0);else if("off"==d)c(f,!1);else return!1;else for(d=f,f=0;f<d.length;f++)oc(d[f],"en-todo-checked");return!0}};r.inserttodo={U:!0,action:function(c){var e=g.B();if(!e||!$c(b))return!1;if("toggle"===c){c=Od(e);var f=P(c,"ul.en-todo-list > li",b);if(f||(f=wd(c,"object.en-todo",h.oa(c)||
b)))return d(f,!1),!0}if(e.collapsed)return c=a.A(),a.H("paste").insertNode(c),l.Rb(c),!0;m.Pc();if((c=a.df().filter(function(a){return e.intersectsNode(a)}).reverse())&&0<c.length)return c.map(function(b){a.C(b)}),!0;(c=U("div,li",b).filter(function(a){return e.intersectsNode(a)}))&&0<c.length&&(c.map(function(b){sb(b.textContent)||a.Je(b)}),e=g.B(),g.O(c[0],0,e.endContainer,e.endOffset));return!0},enabled:function(){return g.hasFocus()&&!l.Bb()}}};a.Na=function(b,d){1===d?ud("en-todo",b).forEach(function(b){var c=
a.A();oc(c,"en-todo-checked","true"==b.getAttribute("checked"));v.log("en-todo",c.outerHTML);uc(b,c)}):(ud("input[type=checkbox]",b).forEach(function(b){var c=a.A();oc(c,"en-todo-checked",b.checked);uc(b,c)}),ud('span[data-en-input-type="checkbox"]',b).forEach(function(b){var c=a.A(),d=b.getAttribute("data-en-checked");oc(c,"en-todo-checked","true"===d);uc(b,c)}),ud('embed[type="evernote/x-todo"]',b).forEach(function(a){var d=zc(b,"object",{"class":"en-todo"});"true"===a.getAttribute("todo-checked")&&
E(d,"en-todo-checked");uc(a,d)}))};a.Ta=function(a,b){if(1===b)ud("object.en-todo",a).forEach(function(b){var d=zc(a,"en-todo");D(b,"en-todo-checked")&&d.setAttribute("checked","true");uc(b,d)});else{var e;3===b&&(e=function(b){var d=zc(a,"span",{"data-en-input-type":"checkbox"});D(b,"en-todo-checked")?(d.setAttribute("data-en-checked","true"),d.appendChild(document.createTextNode("\u2713"))):d.appendChild(document.createTextNode("\u2610"));uc(b,d)});e&&ud("object.en-todo",a).forEach(function(a){e(a)})}}}
;function bh(){var a=this;a.name="transform";a.gc=function(b,c,d){function e(b){var d=[];3===c&&(ud("meta",b).forEach(function(a){d.push(a)}),ud("title,script,style,link,base,meta",b).forEach(I));var e=f.info||{};0<d.length&&(e.meta=d);Sf(b);1!==c&&Mf(b);Of(b);Pf(b);Nf(b);a.vc.A(!0).forEach(function(d){d!==a&&d.Na&&d.Na(b,c,e)});return b}z(0<c,"You need to set mode for export!");var f=B(d,{info:{},gf:3===c});if(b instanceof DocumentFragment)return f.gf=!0,e(b);Qc(b)?(d=b.ownerDocument.createRange(),
d.selectNodeContents(b),d=d.extractContents(),e(d),b.appendChild(d)):e(b);f.gf||bg(b);return b};a.Od=function(b,c,d){z(0<c,"You need to set mode for export!");var e=B(d,{info:{}});ad(b,!1);a.vc.A(!0).forEach(function(d){d!==a&&d.Ta&&d.Ta(b,c,e.info||{})});1===c&&Mf(b)}};function ch(){var a=this;a.name="clearly";a.K=null;a.G=function(b){a.K=B(b);E(a.K.root,"en-clearly-style-on")};a.S=function(){H(a.K.root,"en-clearly-style-on")}};function dh(){this.name="hello";this.Na=function(a,b){var c=a.querySelectorAll("span[style='x-evernote:hello-encounter']");if(!(null==c||1!==b&&2!==b||0>=c.length)){c&&1<c.length&&v.warn("Hello note with multiple span style markers?");for(var c=c[0],d=0;d<c.childNodes.length;d++){var e=c.childNodes[d],f=hd(e,"margin-top");f&&0>parseInt(f,10)&&T(e,"margin-top","0px")}}}};var eh=function(){function a(a,b){this.Za=a;this.ma=b;this.lh=b.baseURL+"/";this.le={};this.Bd={}}var b=0;a.prototype.registerStringTable=function(a,b){z(!this.Bd[a],"Table is already defined",this.Za,a);this.Bd[a]=b};a.prototype.installCSS=function(a){var d="module-css-"+b++;a=M("link",{rel:"stylesheet",type:"text/css",id:d,href:a});document.querySelector("head").appendChild(a);this.le[d]=a;return d};a.prototype.removeCSS=function(a){z(this.le[a],"Could not find CSS with ID: "+a)};a.prototype.Vh=
function(a,b){z(u(a),"tableName must be a string.");z(ia(b),"stringMap must be a string map object.");z(!this.Bd[a],"This table already exists.");this.Bd[a]=b};a.prototype.localizedStringFromTable=function(a,b){z(a&&a.length&&b&&b.length,"Table and key must be valid strings.");return this.Bd[a][b]};a.prototype.localizedString=function(a,b){return this.localizedStringFromTable("default",a,b)};a.prototype.S=function(){Object.keys(this.le).forEach(function(a){this.removeCSS(a)},this);this.le={}};a.prototype.bundleURL=
function(a){return this.lh+a};return a}();var fh=function(){function a(a){this.Za=a}a.prototype.Oe=function(){return"Module '"+this.Za+"': "};a.prototype.info=function(){var a=Array.prototype.slice.call(arguments);a.unshift(this.Oe());v.info.apply(null,a)};a.prototype.warn=function(a){var c=Array.prototype.slice.call(arguments);c.unshift(this.Oe());v.warn.apply(null,c)};a.prototype.error=function(a){var c=Array.prototype.slice.call(arguments);c.unshift(this.Oe());v.error.apply(null,c)};return a}();function hh(){this.draggingPasteData=this.draggingElement=this.draggingLocationY=this.draggingLocationX=this.draggingType=this.draggingState=null}
var ih=function(){function a(a,c){this.A=c;this.H=[];this.B=[];this.D=a}a.prototype.Og=3;a.prototype.X=function(a){for(var c=0;c<this.H.length;c++){var d=this.H[c];if(d.element===a)return d}return null};a.prototype.Kh=function(a,c,d,e,f){function g(a,b){var f=new hh;f.draggingType=d;f.draggingLocationX=a;f.draggingLocationY=b;f.draggingElement=c;f.draggingPasteData=e;return f}if(this.X(c))z(!1,"The draggable element ",c," already registered.");else{var h=this,l=!1,m=0,p=null,r=!1,n=0,q=0,y=[],y=this.D.listener(c,
"mousedown",function(d){var e=d.pageX,t=d.pageY;l=!0;n=e;q=t;m=c.style.zIndex;c.style.zIndex=1E3;d=h.C(e,t);var y=h.O(d),e=g(e,t);e.draggingState=0;f(e);e.draggingState=0;y?(r=!y(e),p=d):h.A(a,e)}),t=this.D.listener(c,"mousemove",function(d){if(l){d.preventDefault();var e=d.pageX;d=d.pageY;var m=h.C(e,d),t=h.O(m),y=h.O(p),A=g(e,d);c.style.webkitTransform="translate("+(e-n)+"px, "+(d-q)+"px)";A.draggingState=1;f(A);r&&p?p=m:m?(p==m?(A.draggingState=1,t(A)):(A.draggingState=2,p?y&&y(A):h.A(a,A),A.draggingState=
0,r=!t(A)),p=m):(p?(y&&(A.draggingState=2,y(A)),A.draggingState=0):A.draggingState=1,h.A(a,A),p=null,r=!1)}}),A=this.D.listener(c,"mouseup",function(d){var e=d.pageX,n=d.pageY;l&&(d=h.C(e,n),d=h.O(d),e=g(e,n),n=!1,e.draggingState=3,n=!r&&d?!d(e):!h.A(a,e),e.draggingState=n?3:2,f(e),c.style.webkitTransform="",c.style.zIndex=m,p=null,l=!1)}),y=[y,t,A];this.H.push({element:c,Za:a,mh:y})}};a.prototype.Wh=function(a){for(var c=0;c<this.H.length;c++){var d=this.H[c];if(d.element===a){var e=this;d.mh.forEach(function(a){e.D.remove(a)});
this.H.splice(c,1);break}}};a.prototype.Y=function(a,c,d){a=a.getBoundingClientRect();return c<a.left+document.body.scrollLeft||c>a.right+document.body.scrollLeft||d<a.top+document.body.scrollTop||d>a.bottom+document.body.scrollTop?!1:!0};a.prototype.C=function(a,c){for(var d=0;d<this.B.length;d++){var e=this.B[d];if(this.Y(e.element,a,c))return e.element}return null};a.prototype.J=function(a){if(!a)return null;for(var c=0;c<this.B.length;c++){var d=this.B[c];if(d.element===a||Oc(a,d.element))return d}return null};
a.prototype.O=function(a){return(a=this.J(a))?a.Gh:null};a.prototype.Lh=function(a,c,d){this.J(c)?z(!1,"The drop handler for ",c," already registered."):this.B.push({element:c,Za:a,Gh:d})};a.prototype.Xh=function(a){for(var c=0;c<this.B.length;c++)if(this.B[c].element===a){this.B.splice(c,1);break}};return a}(),jh=function(){function a(a,c){this.Za=a;this.C=c}a.prototype.DRAGGING_SOURCE_STATE_STARTED=0;a.prototype.DRAGGING_SOURCE_STATE_MOVED=1;a.prototype.DRAGGING_SOURCE_STATE_ENDED=2;a.prototype.DRAGGING_SOURCE_STATE_CANCELED=
3;a.prototype.DRAGGING_DESTINATION_STATE_ENTERED=0;a.prototype.DRAGGING_DESTINATION_STATE_MOVED=1;a.prototype.DRAGGING_DESTINATION_STATE_EXITED=2;a.prototype.DRAGGING_DESTINATION_STATE_RELEASED=3;a.prototype.makeElementDraggable=function(a,c,d,e){this.C.Kh(this.Za,a,c,d,e)};a.prototype.removeDraggableElement=function(a){this.C.Wh(a)};a.prototype.makeElementDropContainer=function(a,c){this.C.Lh(this.Za,a,c)};a.prototype.removeDropContainer=function(a){this.C.Xh(a)};return a}();var kh=function(){function a(a){this.zb=a}a.prototype.getContentClass=function(a){return a.getAttribute("en-content-class")};a.prototype.setContentClass=function(a,c){a.setAttribute("en-content-class",c)};a.prototype.removeContentClass=function(a){a.removeAttribute("en-content-class")};a.prototype.getAppDataValue=function(a,c){return nd(a,c)};a.prototype.setAppDataValue=function(a,c,d){pd(a,c,d)};a.prototype.removeAppDataValue=function(a,c){od(a,c)};return a}();var lh=function(){function a(a){this.H=a;this.D=new xf}a.prototype.G=function(){this.D.G({name:this.H+"-gesture-recognizer"})};a.prototype.S=function(){this.D.S()};a.prototype.B=function(a,c,d){return this.D.listener(a,"tap",c,d)};a.prototype.tapGestureRecognizer=function(a,c,d){return this.B(a,c,d?{touchCount:d}:d)};a.prototype.pinchGestureRecognizer=function(a,c){return this.D.listener(a,"pinch",c,null)};a.prototype.rotationGestureRecognizer=function(a,c){return this.D.listener(a,"rotate",c,null)};
a.prototype.swipeGestureRecognizer=function(a,c){return this.D.listener(a,"swipe",c,null)};a.prototype.panGestureRecognizer=function(a,c){return this.D.listener(a,"pan",c,null)};a.prototype.longPressGestureRecognizer=function(a,c,d){return this.D.listener(a,"press",c,d?{time:d}:null)};a.prototype.removeGestureRecognizerReference=function(a){this.D.remove(a)};return a}();var mh=function(){function a(a){this.zb=a;this.Yc=null}a.prototype.G=function(){Ec(this.zb,document.createElement("div")).classList.add("en-module-content")};a.prototype.of=function(a,c){this.Yc&&this.zb.removeChild(this.Yc);H(this.zb,"en-module-unknown");E(this.zb,a);var d=M("div",{});Bc(d,c);this.Yc=M("div",{"class":"en-module-overlay"});this.Yc.appendChild(d);this.zb.appendChild(this.Yc)};a.prototype.zf=function(){this.of("en-module-broken","Broken module")};a.prototype.ii=function(){var a=this.zb.getAttribute("data-en-module-title"),
a=a&&a.length?a:"Unknown module";this.of("en-module-unknown",a)};a.prototype.Ag=function(a){z(u(a),"Module title is required");this.of("en-module-loading",'Loading "'+a+'"')};a.Hg=function(a){var c=a.querySelector(".en-module-content");z(c,"Element is not wrapped");Ta(a.childNodes).forEach(function(d){d!=c&&a.removeChild(d)});vc(c)};a.Xf=function(a){a.style.cssText="border: 2px solid #CCC; background-color: #EEE; padding: 10px; color: #888;"};a.prototype.S=function(){var b=this.zb;H(b,"en-module-loading");
a.Hg(b);this.Yc=this.zb=null;return b};return a}();var nh=function(){function a(a,e,f){z(J(e),"Container required",e);this.H=e.cloneNode(!0);this.B=!1;this.module=null;this.element=e;this.elementID=f;this.scriptHandler=a;this.node=new c(this);this.gestureRecognizer=new b(f)}var b=lh,c=kh;a.prototype.G=function(){var a=this,b=this.scriptHandler.script;z(b,"ScriptHandler has no script?");z(!this.module,"Already setup?");this.gestureRecognizer.G();var c=null;Cb(function(){c=b.createModule(a)},function(b){v.error("Could not create new module.",a.scriptHandler.moduleName,
b)});if(!c)return!1;["setupFromStore","setupWithInsertionData","saveENML"].forEach(function(a){z("function"==ea(c[a]),"Expected a module method",a,c.moduleName,c)});this.module=c;return!0};a.prototype.ei=function(){var a=this,b=!1;if(!this.G())return b;Cb(function(){b=a.module.setupFromStore()},function(b){v.error("Could not setup module",a.scriptHandler.moduleName,b)});return b};a.prototype.hi=function(a){var b=this,c=!1;if(!this.G())return c;Cb(function(){c=b.module.setupWithInsertionData(a)},function(a){v.error("Could not setup module",
b.scriptHandler.moduleName,a)});return c};a.prototype.S=function(){this.gestureRecognizer.S();var a=this.module;if(a){a.cleanup&&Cb(function(){a.cleanup()},function(a){v.error("Could not cleanup module.",this.scriptHandler.moduleName,a)});var b=this.scriptHandler.script;b.removedModule&&Cb(function(){b.removedModule(a)},function(a){v.error("Could not remove module.",a)});this.module=null}};a.prototype.Zh=function(){function a(){for(var d=b.H.cloneNode(!0);d.firstChild;)c.appendChild(d.firstChild)}
var b=this,c=document.createElement("div");if(this.B){var g=document.createDocumentFragment();Cb(function(){b.module.saveENML(g,!0);c.appendChild(g)},function(b){v.error("Could not serialize module. Using original content.",b);a()})}else a();var h=this.node;h.setAppDataValue(c,"en-module-name",this.scriptHandler.moduleName);h.setAppDataValue(c,"en-module-title",this.scriptHandler.Xe());h.setContentClass(c,"evernote.module");return c};a.prototype.removeModule=function(){this.element.parentElement.removeChild(this.element);
this.me()};a.prototype.me=function(){this.scriptHandler.Yh(this);this.S()};a.prototype.markAsDirty=function(){this.B=!0};a.prototype.purgeContent=function(){for(var a=this.element;a.firstChild;)a.removeChild(a.firstChild)};a.prototype.genericPreview=function(){var a=document.createElement("div");this.node.setContentClass(a,"en-module-generic-preview");a.appendChild(document.createTextNode('Unknown module : "'+this.scriptHandler.Xe()+'"'));a.style.cssText="text-align: center; padding: 20px";return a};
return a}();var oh=function(){function a(a,c){this.Za=a;this.I=c;this.B={};c.Th(this)}a.prototype.S=function(){this.I.mi(this)};a.prototype.sendMessage=function(a,c,d){this.I.sendMessage(this,a,c,d)};a.prototype.registerMessageHandler=function(a,c){this.B[a]=c};a.prototype.Eh=function(a,c,d){var e=this.B[a];if(!e)return v.log("Unexpected message received",a),!1;1==e.length?(e(c),d({})):e(c,d);return!0};return a}();var ph=function(){function a(){this.B={};this.H={};this.A={}}var b=0;a.prototype.Th=function(a){var b=a.Za.toLowerCase();z(!this.B[b],b,"App channel is already registered");this.B[b]=a};a.prototype.mi=function(a){a=a.Za.toLowerCase();z(!!this.B[a],a,"App channel is not registered");delete this.B[a]};a.prototype.sendMessage=function(a,d,e,f){a=a.Za.toLowerCase();v.log("Module",a,"sendMessage",d,e);d={type:"message",moduleName:a,messageName:d,data:e?e:{}};f&&(e=""+b++,this.H[a+":"+e]=f?f:null,d.messageID=
e);af("modulePublished",d)};a.prototype.Bh=function(a){v.log("Module receives",a);z(lb(a),"Bad message payload",a);switch(a.type){case "message":this.O(a);break;case "reply":this.C(a)}};a.prototype.O=function(a){var b=this,e=a.moduleName,f=a.messageName,g=a.messageID,h=a.data;z(e&&f&&h,"Bad native message payload",a);if(a=this.B[e.toLowerCase()]){var l=function(){};if(g){var m=e+":"+g;this.A[m]=e;l=function(a){a={type:"reply",moduleName:e,messageName:f,messageID:g,data:a?a:{}};delete b.A[m];af("modulePublished",
a)}}a.Eh(f,h,l)||l({})}else v.log("Module call failed - not loaded",e)};a.prototype.C=function(a){var b=a.moduleName,e=a.messageName,f=a.messageID,g=a.data;z(b&&e&&f&&g,"Bad native response payload",a);b=b+":"+f;(e=this.H[b])?(e(a.data),delete this.H[b]):v.log("Unexpected response received",a)};return a}();var qh=function(){function a(a,g,h,l,m){z(u(m.baseURL),"baseURL is required");z(fa(m.urls),"Array of urls is required");z(u(m.title),"Module title is required");this.C=a;this.ma=m;this.B={};this.script=this.A=this.H=null;this.moduleName=g;this.bundle=new c(g,m);this.console=new d(g);this.dragAndDrop=new e(g,l);this.nativeChannel=new b(g,h)}a.Nf=0;a.Ce=1;a.ee=2;a.Be=3;var b=oh,c=eh,d=fh,e=jh;a.prototype.Jh=function(){function a(c){e.forEach(function(a){a=M("script",{type:"text/javascript",src:d+"/"+
a});a["data-en-module-name"]=b.moduleName;a.scriptHandler=b;c.appendChild(a)})}var b=this,c=this.ma.mode,d=this.ma.baseURL,e=this.ma.urls;z(fa(e),"No script URLs provided");z(!this.H,"Scripts are already loaded?");this.H=e;switch(c){default:case "iframe":var c=M("script",{type:"text/javascript"},["var scriptHandler = frameElement.scriptHandler;"]),p=M("iframe",{style:"position:absolute;width:1px;height:1px;top:-999px;left:-999px;display:none;"});p["data-en-module-name"]=b.moduleName;p.scriptHandler=
b;document.body.appendChild(p);p.contentDocument.head.appendChild(c);a(p.contentDocument.head);break;case "script":a(document.head)}};a.prototype.registerModuleScript=function(b){var c=this;z(this.state()==a.Ce,"Modules can only be registered once!",this.moduleName,b);z(this.moduleName===b.moduleName,"Module names do not match");z(!this.script,"Module is already setup?");["createModule","setup"].forEach(function(a){z("function"==ea(b[a]),'Expected a module method "'+a+'"',b.moduleName,b)});this.script=
b;window.TEST&&(z(!!window.testHook_registerModuleScript,"Test hook provided by TestModuleEnvironment is missing"),window.testHook_registerModuleScript(this,b));Cb(function(){b.setup(c)},function(a){v.error("Could not setup script",c.moduleName,a);c.A=a});this.C.kh(this.moduleName)};a.prototype.registerModuleLocalization=function(a,b,c){z(this.moduleName===a,"Module names do not match");window.TEST&&(z(!!window.testHook_registerModuleLocalization,"Test hook provided by TestModuleEnvironment is missing"),
window.testHook_registerModuleLocalization(a,b,c));this.bundle.Vh(b,c)};a.prototype.state=function(){return this.A?a.Be:this.script?a.ee:this.H?a.Ce:a.Nf};a.prototype.isReady=function(){return this.state()==a.ee};a.prototype.S=function(){var a=this;Cb(function(){a.script.cleanup()},function(b){v.error("Could not cleanup script",a.moduleName,b)});this.bundle.S();this.H=this.script=null};a.prototype.Hh=function(a){return!!this.B[a]};a.prototype.$h=function(a){var b=this.B[a];return b?b.Zh():(v.error("Could not serialize module. (Module could not be loaded?)",
this.moduleName,a),null)};a.prototype.gi=function(a,b){var c=!1,d=new nh(this,a,b);d&&(this.B[b]=d,(c=d.ei())||d.me());return c};a.prototype.fi=function(a,b,c){var d=!1;if(a=new nh(this,a,b))this.B[b]=a,(d=a.hi(c))||a.me();return d};a.prototype.O=function(){var a=this;return Ta(document.getElementsByClassName("en-module")).filter(function(b){return b.getAttribute("data-en-module-name")==a.moduleName})};a.prototype.Yf=function(){var a=this.ma.localizedTitle;return a&&(z(u(a),"Title must be a string"),
a.length)?a:this.Xe()};a.prototype.Xe=function(){return this.ma.title};a.prototype.allModuleIDs=function(){return this.O().map(function(a){return a.getAttribute("id")})};a.prototype.moduleHandlerWithID=function(a){a=this.B[a];return a?a:(v.warn("Requested module handler doesn't exist. Probably it is not loaded yet."),null)};a.prototype.Yh=function(a){delete this.B[a.elementID]};a.prototype.ki=function(a){var b=this.script.supportDropIntoEditorForType;return b?b(a):!1};return a}();function rh(){var a=this;a.name="module";a.G=function(b){function c(b,c,d){var e=Ab("en-module"),g=M("div",{id:e,"class":"en-module",contentEditable:"false"});g.setAttribute("data-en-module-name",b);g.classList.add("en-module-newly-inserted");c&&(a.L[e]=c);d.parentNode.insertBefore(g,d);h.Wa(g);f.de(g)}function d(b){z(b.ownerDocument==window.document,"Trying to setup loader for module of element that is not in DOM");var c=b.id;z(!a.J[c],"Loader is already setup?");b=new mh(b);b.G();return a.J[c]=
b}function e(b,c){var e=c.id;z(a.J[e].zb==c,"Bad loader configuration");if(b.state()==qh.Be)a.J[e].zf();else{z(b.state()==qh.ee,"Unexpected script state");var f=a.J[e];z(f,"This module did not go through the loader phase?");f=f.S();delete a.J[e];if(f.classList.contains("en-module-newly-inserted")){var g=a.L[e];delete a.L[e];if(b.fi(f,e,g)){H(f,"en-module-newly-inserted");return}}else if(b.gi(f,e))return;d(f).zf()}}var f=a.H("context"),g=a.H("query"),h=a.H("block"),l=f.root;b=B(b,{pf:null});a.C=new ih(a.D,
function(b,d){var e=a.A[b];if(!e||!e.ki(d.draggingType))return!1;switch(d.draggingState){case a.C.Og:var e=d.draggingElement.style,f=e.display;e.display="none";var h=document.elementFromPoint(d.draggingLocationX,d.draggingLocationY);e.display=f;if(P(h,".en-module"))return!1;e=g.oa(h);f=document.getElementById("en-note");f===e&&(e=Ic(),0>=d.draggingLocationY?f.insertBefore(e,f.children[0]):f.appendChild(e));c(b,{type:d.draggingType,data:d.draggingPasteData},e)}return!0});a.I=new ph;a.A={};a.J={};a.L=
{};if(lb(b.pf)){var m=b.pf;Object.keys(m).forEach(function(b){var c=m[b];z(!a.A[b],"Script handler is already registered",b);a.A[b]=new qh(a,b,a.I,a.C,c)})}a.D.H("moduleScript",function(b){var c=b.moduleName;z(u(c)&&0<c.length,'Expected "moduleName" for module!',b);c=a.A[c];z(c,"Unexpected script registration",b);c.registerModuleScript(b)});a.D.H("moduleLocalization",function(b){var c=b.moduleName,d=b.tableName,e=b.stringMap;z(u(c),"moduleName must be a string.");var f=a.A[c];z(f,"Localization for unknown module",
b);f.registerModuleLocalization(c,d,e)});a.D.B({name:"module",action:function(a){a=Qb(a);if(null==a)return!1;for(var b=0;b<a.length;b++){var d=a[b];if("insert"===d.action){var e=d.moduleName;u(e)?(f.W("insertparagraph").action(),d=g.oa(f.B().startContainer),c(e,null,d)):v.error("No name for insert provided",d)}}return!0},value:function(a){var b=[];a&&(b=U("div.en-module",l).filter(function(b){return b.getAttribute("data-en-module-name")===a}).map(function(a){return a.id}));return{result:b}},enabled:Ma});
a.D.B({name:"module-channel",value:function(b){a.I.Bh(b);return null},enabled:Ma});a.kh=function(b){var c=a.A[b];z(c,"Unknown module",b);U("div.en-module",l).forEach(function(a){a.getAttribute("data-en-module-name")==b&&e(c,a)})};a.H("observer").ff("div.en-module",function(b){var c=b.getAttribute("data-en-module-name");if(b.getAttribute("data-en-module-name")){var f=d(b);if(c=a.A[c])switch(c.state()){case qh.Be:f.zf();break;case qh.ee:e(c,b);break;case qh.Ce:f.Ag(c.Yf());break;case qh.Nf:f.Ag(c.Yf()),
c.Jh()}else f.ii()}else v.warn("Found module without a name.")},function(b){var c=b.getAttribute("data-en-module-name"),d=a.A[c];d?(b=d.ui(b.id))?b.me():v.error("Could not find module handler.",b):v.error("Could not find script handler.",c)});a.Na=function(a){U('div[en-content-class="evernote.module"]',a).forEach(function(a){var b="en-module-"+yb().toString(),c=nd(a,"en-module-name"),d=nd(a,"en-module-title");c?(a.removeAttribute("en-content-class"),a.removeAttribute("en-app-data"),a.removeAttribute("style"),
a.classList.add("en-module"),a.setAttribute("data-en-module-name",c),d?a.setAttribute("data-en-module-title",d):v.warn("Could not read module's title.",c),a.setAttribute("id",b),a.setAttribute("contentEditable","false")):(v.error("Stripped damaged module without a type"),a.parentElement.removeChild(a))})};a.Ta=function(b){U("div.en-module",b).forEach(function(b){var c=b.id,d=b.getAttribute("data-en-module-name"),e=b.getAttribute("data-en-module-title");if(b.classList.contains("en-module-newly-inserted"))b.parentNode.removeChild(b);
else{z(0!=d.length,"Malformed module found");var f=a.A[d];f&&f.Hh(c)?(c=f.$h(c))?(mh.Xf(c),b.parentNode.replaceChild(c,b)):(v.error("Could not serialize module. Discarding module content!",d),b.parentNode.removeChild(b)):(z(a.J[c],"Element must be either handled by application or in unloaded state."),mh.Hg(b),b.removeAttribute("class"),b.removeAttribute("data-en-module-name"),b.removeAttribute("id"),b.removeAttribute("contenteditable"),b.setAttribute("en-content-class","evernote.module"),pd(b,"en-module-name",
d),e&&pd(b,"en-module-title",e),mh.Xf(b))}})}}};function sh(){var a=this;z(this instanceof sh,"Use `new` to instantiate this class");a.name="rte";a.G=function(b){a.K=B(b,{active:!0,highlightMagic:!1,skipMarkupTransform:!1,placeholder:"",trackStateChanges:null,trackValueChanges:null,trackEnabledChanges:null,tableResizing:!1,imageResizing:!1,tableSelection:!1,typebehind:{emoticon:!1,url:!1,email:!1,list:!1,inline:!1,todo:!1,horizontalrule:!1,code:!1,table:!1},mutationObserver:!1,undoOnIdle:6,cryptLegacy:!0,resources:null,smartScroll:!1,smartHeight:!1,
smartDelete:!1,smartPlaceholder:!0,imageConfig:{},selector:null,html:null,enml:null,modules:null,clearly:null,root:null});a.K.imageConfig=B(a.K.imageConfig,{annotate:!1,imageClickEvents:!1,images:null,preview:!1,resize:!1,rotate:!1});var c=a.K.imageConfig;c.bubbleImageClicks=c.resize;u(a.K.selector)?a.root=document.querySelector(a.K.selector):a.root=a.K.root||document.getElementById("en-note")||document.body;z(a.root&&J(a.root),"Root not valid!");z(J(a.root),"RTE root node required to be an HTML element! <$>");
var d=a.da();a.D.ad({Hb:["rte","content"]});d.J(function(a){a.D.ad({Hb:["rte","content"]})});a.$=null;a.ua=!!(a.K.trackStateChanges||a.K.trackValueChanges||a.K.trackEnabledChanges);var e=new Jf;d.G(e,{root:a.root});e.zg(!a.K.active);d.G(new Lf);var f=new dg;d.G(f);d.G(new Kf);d.G(new eg);a.A=!0===a.K.mutationObserver?new Bf:new Af;d.G(a.A,{element:a.root,tb:function(){e.Qa();return JSON.stringify(f.ae())},$c:function(a){e.Qa();f.Mb(JSON.parse(a))}});a.C=new fg;d.G(a.C);var g=a.K.tableResizing;a.K.imageResizing&&
(c.resize=!0);var h=a.K.tableSelection;d.G(new Ne);a.N=new Pe;d.load(a.N);d.G(new Cf,{element:a.root});d.G(new Ag);d.G(new mg);d.G(new hg);d.G(new ig);d.G(new Yg);d.G(new ah);d.G(new lg);d.G(new Dg);d.G(new Cg);d.G(new Xg);d.G(new $g);d.G(new Vg);d.G(new Wg);d.G(new dh);d.G(new Te);null!=a.K.modules&&d.G(new rh,{pf:b.modules});a.K.emoticons&&(Qa("Use typebehind: { emoticon: true } instead of adding","emoticons: true directly to the rte options."),a.K.typebehind.emoticon=!0);d.G(new wg,a.K.typebehind);
lb(a.K.resources)&&d.G(new Eg,{resources:a.K.resources});b=new bh;d.G(b);var l=new Bg;d.G(l);d.G(new xg);a.K.skipMarkupTransform||b.gc(a.root,2);c&&c.imageClickEvents&&d.G(new yg,c);c&&d.G(new zg,c);c&&c.resize&&(a.I=new Re,e.Jb()||d.G(a.I,c));c&&(c.annotate||c.preview||c.rotate)&&(a.J=new lf,e.Jb()||d.G(a.J,c));h&&d.G(new Zg);g&&(a.L=new gg,e.Jb()||d.G(a.L));a.N&&d.G(a.N);null!=a.K.clearly&&d.G(new ch,{root:a.root});e.Jb()||ad(a.root,!0);e.Nd();a.Nd();a.D.ka(a.root,"setDirty",function(b){a.ga(b)});
0<a.K.undoOnIdle&&a.D.C(function(){l.Ic()&&a.A.flush()},a.K.undoOnIdle);a.Ea=function(){var b=e.hasFocus();b!==a.V&&(Nb("focusChanged",{focus:b}),df("content",{focus:b}));if(a.ua){var c=a.Da(),d=JSON.stringify(c);d!==a.ca&&(a.ca=d,Nb("styleChanged",c),c=c||{},c.module="content",af("styleChanged",c))}a.V=b};a.D.listener(a.root.ownerDocument,"selectionchange",a.R.bind(a));a.K.smartHeight&&(c=function(){var a=window.innerHeight;document.body.style.minHeight="";a>document.body.clientHeight&&(document.body.style.minHeight=
a+"px")},a.D.listener(window,"resize",c),c());a.qa();a.K.placeholder&&a.root.setAttribute("data-en-placeholder",a.K.placeholder);c=a.K.html;d=a.K.enml;z(!(null!=c&&null!=d),"You can only provide one content type: html or enml");u(c)?a.da().B("io").bd(c):u(d)&&a.da().B("enml").Ad(d);a.A.clear();Se(a.root,"contentReady")};a.qa=function(){if(a.K.smartPlaceholder){var b=function(){oc(a.root,"en-note-is-empty",le(a.root))};b();a.D.ka(a.root,"setDirty",b);a.D.ka(a.root,"anyInput",b)}a.K.smartDelete&&a.D.ka(a.root,
"beforeInput",function(b){var d=b.Fa;d&&!1===d.collapsed&&(a.A.flush(),Z.execCommand("delete"),b.Fa=W(b.element),b.dc.Ua=b.Fa.startContainer,b.dc.offset=b.Fa.startOffset)},0);a.D.ka(a.root,"input",function(){Se(a.root,"setDirty")})};a.S=function(){a.ca=null;Md();a.sc=null;a.V=null;ad(a.root,!1);a.N=null;a.L=null;a.K=null;a.root=null;a.C=null};a.R=function(){try{var b={sc:a.sc},c=W(a.root);null!=c&&(a.sc=Rd(c));b.Fa=c;Se(a.root,"selectionChanged",b);a.$=a.D.timeout(a.Ea,50,a.$)}catch(d){v.error("Exception in en.rte.didChangeStyle <$>:",
d.toString())}};a.ga=function(b){b=b||{};a.K.smartScroll&&!b.pd&&setTimeout(function(){Xd(W())},0);a.D.O();a.R()};a.Da=function(){function b(a,b,d){if(a&&a.length){for(var h={},l=0;l<a.length;l++){var m=a[l];h[m]=d(m)}h&&(c[b]=h)}}var c={},d=nf;b(a.K.trackStateChanges,"state",d.state);b(a.K.trackValueChanges,"value",d.value);b(a.K.trackEnabledChanges,"enabled",d.enabled);return c};a.selection=function(b){var c=W(a.root);b&&(a.sc&&Jd(Sd(a.sc)),a.root.focus(),c=W(a.root));return c};a.na=function(b,
c){return Cb(function(){function d(){e=!1!==c();!0!==b.uc&&Se(a.root,"setDirty")}!0===b.focus&&a.selection(!0);var e=!0;!0===b.U?a.A.Pa(d,b.K.title):("before"===b.U&&a.A.flush(),d(),"after"===b.U&&a.A.flush(b.K.title));return e})||!1};a.hasFocus=function(){return a.da().B("context").hasFocus()};a.Nd=function(){var b=a.C.yh();Object.keys(b).forEach(function(c){var d=b[c];d.name=c;var e={name:c,U:d.U,uc:d.uc,Ra:d.Ra,enabled:null,action:function(b){b=a.C.execCommand.bind(a.C,c,!1,b);return a.na(e,b)},
state:function(){return a.C.queryCommandState(c)},value:function(b){return a.C.queryCommandValue(c,b)}};d.enabled?e.enabled=function(b){return!!a.C.queryCommandEnabled(c,b)}:e.enabled=function(){return!(!a.da().B("context").hasFocus()||!a.C.queryCommandEnabled(c))};a.D.B(e)});a.D.B({name:"diff",value:function(b){var d=Pb(b);b=yc(d.base);var e=yc(d.theirs),f=yc(d.mine),g=a.Zb.Jc("normalize");g&&(g.Wc(b),g.Wc(e),g.Wc(f));for(var h,d=d.showChanges,l=Ye(e,b),m=Ye(f,b),f=[],e=[],l=l.slice(0),m=m.slice(0),
p=0,r=l.length;p<r;p++){for(var n=l[p],q=0,y=m.length;q<y;q++){h=m[q];var t=!1;if(n.baseIndex===h.baseIndex){var t=n,A=h;if(t.baseIndex===A.baseIndex&&t.sourceIndex===A.sourceIndex&&t.action===A.action&&t.name===A.name&&t._deleted===A._deleted&&t._inserted===A._inserted&&(null==t.element&&null==A.element||R(t.element)&&R(A.element)&&t.element.isEqualNode(A.element))){e.push(h);break}else t=!0}else t="removeChildElement"===n.action,A="removeChildElement"===h.action,t=We(n,h)&&A&&!t||We(h,n)&&!A&&t;
if(t){n._conflict=!0;n._owner="theirs";n._conflictedWith=h;h._conflict=!0;h._owner="mine";h._conflictedWith=n;f.push(n);f.push(h);break}h=null}h?m.splice(q,1):e.push(n)}0<m.length&&(e=e.concat(m));0<f.length&&(e=e.concat(f));e.sort(Ze);h=$e(e,b,d);g&&g.Wc(b);return{conflicts:h.conflicts.length,result:h,html:xb(b)}},enabled:Ma});a.D.B({name:"focus",action:function(b){b=B(Pb(b),{pos:"top",force:!1,scroll:!1,animate:!1,value:null});if(!W(a.root)||b.force)if(a.root.focus(),a.sc&&!b.force)Jd(Sd(a.sc));
else if("bottom"===b.pos){var d=document.createRange();d.selectNodeContents(a.root);d.collapse(!1);Jd(d)}else Jd(Id(a.root,0));b.scroll&&0!=O(a.root)&&Xd(W());return!0},state:function(){return a.da().B("context").hasFocus()},value:function(b){var d=a.da().B("context").hasFocus();if(d&&b&&"position"===b.type)return b=W(),null==b?b=null:(b=Vd(b),b=null==b?null:Sc(b)),b;if(d)return a.name},cc:!0,enabled:Ma});a.D.B({name:"active",action:function(b){b=Ob(b);var d=a.da(),e=d.B("context"),f=!e.Jb();f!==
b&&window.getSelection().containsNode(a.root,!0)&&Md();e.zg(!b);f&&!b&&(ad(a.root,!1),a.J&&a.J.ra&&d.S(a.J),a.I&&a.I.ra&&d.S(a.I),a.L&&d.S(a.L));!f&&b&&(Md(),ad(a.root,!0),a.J&&!a.J.ra&&d.G(a.J,a.K.imageConfig),a.I&&!a.I.ra&&d.G(a.I,a.K.imageConfig),a.L&&d.G(a.L));return!0},state:function(){return!a.da().B("context").Jb()},enabled:Ma})}};var th,uh;
(function(){function a(a){mb(f.querySelectorAll("embed"),function(b){var c=M("div");E(c,"en-print");switch(b.getAttribute("type")){case "evernote/x-pdf":E(c,"pdf");c.textContent=a.pdf_file;break;case "evernote/x-attachment":var d=b.getAttribute("id");null!=d&&d.match(/.*en-media:audio.*/)?(E(c,"audio"),c.textContent=a.audio_file):(E(c,"generic-attachment"),c.textContent=a.generic_file);break;default:v.warn("Found <embed> with unknown type! "+b),E(c,"generic-attachment"),c.textContent=a.generic_file}uc(b,c)});
mb(f.querySelectorAll("object"),function(a){var b=M("div");E(b,"en-print");D(a,"en-todo")&&E(b,"checkbox");D(a,"en-todo-checked")&&E(b,"checked");uc(a,b)})}function b(){var a=c();null!=a&&null!=f||v.error("Couldnt find note body or print container!");f.innerHTML=f.innerHTML+a.innerHTML;mb(f.childNodes,function(a){E(a,"en-print")})}function c(){var a=document.querySelector("#en-note");return null==a?(v.warn("Could not find note!"),null):a}function d(){var a=M("br");E(a,"en-print");f.appendChild(a)}
function e(a,b){for(var c=M("table"),d,e,r=0;4>r;r++){d=M("tr");c.appendChild(d);for(var n=0;2>n;n++)e=M("td"),d.appendChild(e)}c.setAttribute("id","header-table");E(c,"en-print");f.appendChild(c);var q=c.querySelectorAll("td");mb([[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"]],function(b){if(null!=a[b[2]]){q[b[0]].innerHTML="";var c=M("span");E(c,"header-table-label");
c.textContent=b[1];var d=M("span");E(d,"header-table-text");d.textContent=" "+a[b[2]];q[b[0]].appendChild(c);q[b[0]].appendChild(d)}})}var f=null;th=function(c,h){null!=f&&(v.warn("Multiple unnecessary calls to setup print."),uh());for(var l=0;l<document.body.childNodes.length;l++)J(document.body.childNodes[l])&&qd(document.body.childNodes[l],!1);f=M("div");f.setAttribute("id","print-container");E(f,"en-print");l=document.querySelector("#container");l.parentNode.insertBefore(f,l);var m=B(h,{title:null,
notebook:null,created:null,updated:null,deleted:null,author:null,location:null,tags:null,url:null}),l=B(c,{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!=h&&""!==h&&(e(m,l),m=M("hr"),f.appendChild(m),d());m=document.querySelector("#en-title");if(null!=m&&null!=m.textContent){var m=m.textContent,p=M("div");p.setAttribute("id",
"header-title");E(p,"en-print");p.textContent=m;f.appendChild(p);d()}b();a(l);af("printReady",{module:"print"})};uh=function(){null==f?v.warn("Print module teardown called while it was off!"):(I(f),f=null)}})();function vh(a){z(a.F,"argument should implement en.ui.toolkit.basic.Basic");wh(a.F())}function wh(a){null!=a&&E(a,"en-ui-toolkit-display-none")}function xh(a){z(a.F,"argument should implement en.ui.toolkit.basic.Basic");yh(a.F())}function yh(a){null!=a&&H(a,"en-ui-toolkit-display-none")}function zh(a){z(a.F,"argument should implement en.ui.toolkit.basic.Basic");Ah(a.F())}function Ah(a){E(a,"en-ui-toolkit-visibility-hidden")}function Bh(a){H(a,"en-ui-toolkit-visibility-hidden")};function Ch(a){var b=this;b.name="boxwithbeahvior-"+yb();z(b instanceof Ch,"use `new` to instantiate");b.C=a||function(){};b.J=M("div");b.G=function(a){z(null==a||0===Object.keys(a).length,"boxwithbeahvior does not take any setup opt")};b.S=function(){b.C=null};b.Ba=function(a){z(null!=a.F,"argument missing getDOMNode method");b.N(a.F())};b.N=function(a){var d=-2;b.C(a);var e=pc(b.A());0>d?(d=Math.abs(d),d=e.length-d,Fc(a,e[d])):b.A().insertBefore(a,e[d])};b.T=function(a){z(null!=a.F,"argument missing getDOMNode method");
b.Ca(a.F())};b.Ca=function(a){b.C(a);b.A().appendChild(a)};b.ha=function(a){z(null!=a.F,"argument missing getDOMNode method");b.ng(a.F())};b.ng=function(a){b.C(a);b.A().insertBefore(a,b.A().firstChild)};b.F=function(){return b.J};b.A=function(){return b.F()};b.aa=function(a){E(b.F(),a);E(b.A(),a)};b.R=function(a,d){z(null!=a.F&&null!=d.F,"arguments missing getDOMNode method");z(Oc(d.F(),b.A()),"refObj's node should be a member of the box");b.L(a.F(),d.F())};b.mg=function(a,d){z(null!=a.F&&null!=d.F,
"arguments missing getDOMNode method");z(Oc(d.F(),b.A()),"refObj's node should be a member of the box");b.I(a.F(),d.F())};b.L=function(a,d){b.C(a);b.A().insertBefore(a,d)};b.I=function(a,d){b.C(a);Fc(a,d)}};function Dh(){return new Ch(function(){})}Dh.prototype.F=function(){};function Eh(){function a(a,c){c=b(c);ed(a);T(a,"left",c.left);T(a,"top",c.top);T(a,"right",c.right);T(a,"bottom",c.bottom);fd(a)}function b(a){a=JSON.parse(JSON.stringify(a));a=B(a,{top:null,left:null,right:null,bottom:null});Object.keys(a).forEach(function(b){ha(a[b])&&(a[b]+="px")});return a}z(this instanceof Eh,"please use new to instantiate");var c=this;c.name="overflowbox-"+yb();c.C=new Dh;c.A=null;c.I=new Dh;c.N=new Dh;c.L=new Dh;c.vg=function(){var a=0;9<pc(c.N.F()).filter(function(b){return D(b,
"divider")?(a+=1,!1):!0}).length&&pc(c.N.F()).slice(9+a).forEach(c.L.ng);9>=pc(c.N.F()).filter(function(a){return D(a,"divider")?!1:!0}).concat(pc(c.L.F()).filter(function(a){return D(a,"divider")?!1:!0})).length&&pc(c.L.F()).forEach(c.N.Ca);var b=N(c.Zf().F());null!=b&&(c.$f().F().style.width=b.width+"px");0>=pc(c.L.F()).length?(vh(c.L),c.I.F().style.height="34px"):(xh(c.L),c.I.F().style.height="68px")};c.ha=function(a){z(a.F);c.N.ha(a);c.vg()};c.R=null;c.G=function(a){a=B(a,{boxPosition:{left:null,
top:null,right:null,bottom:null},arrowPosition:{left:null,top:null,right:null,bottom:null},hasArrow:!1,cssClassDeep:null});var b=c.da();b.G(c.C);b.G(c.I);a.hasArrow&&c.V();c.ue(a.boxPosition);c.te(a.arrowPosition);E(c.C.F(),"en-toolbar-overflowbox");E(c.A,"en-toolbar-overflowbox-arrow");E(c.I.F(),"en-toolbar-widgetgroup");E(c.I.F(),"en-toolbar-overflowbox-widgetgroup");E(c.N.F(),"en-toolbar-overflowbox-widgetgroup-row1");E(c.L.F(),"en-toolbar-overflowbox-widgetgroup-row2");null!=a.cssClassDeep&&c.aa(a.cssClassDeep);
c.J()};c.F=function(){return c.C.F()};c.ca=function(){return c.I};c.$=function(){return c.A};c.Zf=function(){return c.N};c.$f=function(){return c.L};c.J=function(){c.I.T(c.N);c.I.T(c.L);c.C.T(c.I)};c.V=function(){null!=c.A&&Ia(c.name,"already has arrow");c.A=M("div");c.C.Ca(c.A)};c.ga=function(){I(c.A);c.A=null};c.show=function(a,b){null!=a&&c.ue(a);null!=b&&c.te(b);var f=c.C;z(f.F,"argument should implement en.ui.toolkit.basic.Basic");Bh(f.F());c.R=!0};c.Ib=function(a,b){zh(c.C);c.R=!1;null!=a&&
c.ue(a);null!=b&&c.te(b)};c.va=function(){return c.R};c.ue=function(b){a(c.C.F(),b)};c.te=function(b){null!=c.A&&a(c.A,b)};c.S=function(){c.A=null};c.aa=function(a){c.C.aa(a);E(c.A,a);c.I.aa(a)}};function Fh(){var a=this;z(this instanceof Fh,"use `new` to instantiate");a.name="twogroupbar-"+yb();a.A=new Dh;a.C=new Dh;a.I=new Dh;a.G=function(b){b=B(b,{cssClassDeep:null});var c=a.da();c.G(a.A);c.G(a.C);c.G(a.I);E(a.A.F(),"en-toolbar-twogroupbar");E(a.C.F(),"en-toolbar-twogroupbar-leftbox");E(a.I.F(),"en-toolbar-twogroupbar-rightbox");a.J();null!=b.cssClassDeep&&a.aa(b.cssClassDeep)};a.S=function(){};a.J=function(){a.A.T(a.C);a.A.T(a.I)};a.F=function(){return a.A.F()};a.md=function(){return a.C};
a.$e=function(){return a.I};a.aa=function(b){a.A.aa(b);a.C.aa(b);a.I.aa(b)}};function Gh(a){var b=this;z(this instanceof Gh,"use `new` to instantiate");z(null!=a,"coreInstance is required");b.name="widget-"+yb();b.A=new Dh;b.C=a;b.I=!1;b.G=function(a){a=B(a,{core:{},cssClassDeep:null,disabled:!1});a.core&&null==a.core.cssClassDeep&&(a.core.cssClassDeep=a.cssClassDeep);var d=b.da();d.G(b.A);d.G(b.C,a.core);E(b.A.F(),"en-ui-toolkit-widget");b.J();null!=a.cssClassDeep&&b.aa(a.cssClassDeep);b.ve(a.disabled)};b.F=function(){return b.A.F()};b.J=function(){b.A.T(b.C)};b.P=function(){return b.C};
b.aa=function(a){b.A.aa(a)};b.V=function(){return b.I};b.ve=function(a){b.I=a}};function Hh(){var a=this;z(this instanceof Hh,"use `new` to instantiate");a.name="singleiconcore-"+yb();a.A=new Dh;a.I=M("div");a.F=function(){return a.A.F()};a.gb=function(){return a.I};a.G=function(b){b=B(b,{cssClassDeep:null});a.da().G(a.A);E(a.A.F(),"en-ui-toolkit-core");E(a.A.F(),"en-ui-toolkit-singleiconcore");E(a.I,"en-ui-toolkit-singleiconcore-icon");a.J();null!=b.cssClassDeep&&a.aa(b.cssClassDeep)};a.S=function(){a.I=null};a.J=function(){a.A.Ca(a.I)};a.aa=function(b){a.A.aa(b);E(a.I,b)}}
;function Ih(){var a=this;z(this instanceof Ih,"use `new` to instantiate");a.name="selectmenucore-"+yb();a.A=new Dh;a.I=M("div");a.C=M("select");a.F=function(){return a.A.F()};a.N=function(){return a.I};a.hb=function(){return a.C};a.G=function(b){b=B(b,{menuOptions:[],cssClassDeep:null});a.da().G(a.A);E(a.A.F(),"en-ui-toolkit-core");E(a.A.F(),"en-ui-toolkit-selectmenucore");E(a.I,"en-ui-toolkit-selectmenucore-menuwrapper");E(a.C,"en-ui-toolkit-selectmenucore-menu");b.menuOptions.forEach(a.Dc);a.J();
null!=b.cssClassDeep&&a.aa(b.cssClassDeep)};a.S=function(){a.I=null;a.C=null};a.Dc=function(b,c){null==b.text&&(b.text=b.value);null==b.selected&&(b.selected=!1);var d=M("option",{value:b.value},[b.text]);!0===b.selected&&d.setAttribute("selected","selected");a.C.add(d,c)};a.Ze=function(){return Ta(a.C.options).map(function(a){return a.getAttribute("value")})};a.L=function(b){return a.Ze().indexOf(b)};a.Ye=function(b){b=a.L(b);return-1===b?null:a.C.item(b)};a.di=function(b){var c;null==c&&(c=!0);
u(b)&&(b=a.Ye(b));null!=b&&(c&&Ta(a.C.selectedOptions).forEach(function(a){a.removeAttribute("selected")}),b.setAttribute("selected","selected"))};a.J=function(){a.I.appendChild(a.C);a.A.Ca(a.I)};a.aa=function(b){a.A.aa(b);E(a.I,b);E(a.C,b)}};function Jh(){var a=this;z(this instanceof Jh,"use `new` to instantiate");a.name="icontextcore-"+yb();a.Aa=new Dh;a.L=new Dh;a.A=new Dh;a.C=M("div");a.I=M("div");a.G=function(b){b=B(b,{packContentFirst:!1,cssClassDeep:null});var c=a.da();c.G(a.Aa);c.G(a.L);c.G(a.A);E(a.Aa.F(),"en-ui-toolkit-core");E(a.Aa.F(),"en-ui-toolkit-icontextcore");E(a.L.F(),"en-ui-toolkit-icontextcore-textwrapper");E(a.A.F(),"en-ui-toolkit-icontextcore-iconwrapper");E(a.C,"en-ui-toolkit-icontextcore-text");E(a.I,"en-ui-toolkit-icontextcore-icon");
null!=b.cssClassDeep&&a.aa(b.cssClassDeep);a.J(b.packContentFirst)};a.S=function(){a.C=null;a.I=null};a.J=function(b){null==b&&(b=!1);a.L.Ca(a.C);a.A.Ca(a.I);!0===b?(a.Aa.T(a.L),a.Aa.T(a.A)):(a.Aa.T(a.A),a.Aa.T(a.L))};a.F=function(){return a.Aa.F()};a.aa=function(b){a.Aa.aa(b);a.L.aa(b);a.A.aa(b);E(a.I,b);E(a.C,b)};a.Ka=function(){return a.L};a.Lc=function(){return a.A};a.qe=function(){return a.C};a.gb=function(){return a.I};a.ta=function(b){null!=b&&(a.C.textContent=b.toString())}};function Kh(){var a=this;z(this instanceof Kh,"use `new` to instantiate");a.name="textlabelcore-"+yb();a.A=new Dh;a.C=M("div");a.F=function(){return a.A.F()};a.qe=function(){return a.C};a.G=function(b){b=B(b,{text:null,cssClassDeep:null});a.da().G(a.A);E(a.A.F(),"en-ui-toolkit-core");E(a.A.F(),"en-ui-toolkit-textlabelcore");E(a.C,"en-ui-toolkit-textlabelcore-text");a.J();null!=b.cssClassDeep&&a.aa(b.cssClassDeep);a.ta(b.text)};a.S=function(){a.C=null};a.J=function(){a.A.Ca(a.C)};a.ta=function(b){null!=
b&&(a.C.textContent=b.toString())};a.aa=function(b){a.A.aa(b);E(a.C,b)}};function Lh(){var a=this;a.name="detailednotebooktypecore-"+yb();z(this instanceof Lh,"use `new` to instantiate");var b={personal:"personal",business:"business"};a.Aa=new Dh;a.A=new Dh;a.R=new Dh;a.N=M("div");a.C=M("div");a.I=M("div");a.L=M("div");a.F=function(){return this.Aa.F()};a.ci=function(c){null!=c&&(c=b[c],z(null!=c,"unknown notebook type"),E(a.ca(),c))};a.qe=function(){return a.C};a.ca=function(){return a.N};a.V=function(){return a.I};a.rh=function(b){!0===b?Bh(a.V()):Ah(a.V())};a.sh=function(b){!0===
b?Bh(a.$()):Ah(a.$())};a.ta=function(b){null!=b&&(a.C.textContent=b)};a.$=function(){return a.L};a.G=function(b){b=B(b,{cssClassDeep:null});a.da().G(a.Aa);E(a.Aa.F(),"en-ui-toolkit-core");E(a.Aa.F(),"en-toolbar-detailednotebooktypecore");E(a.A.F(),"en-toolbar-detailednotebooktypecore-notebookinfowrapper");E(a.R.F(),"en-toolbar-detailednotebooktypecore-jumpericonwrapper");E(a.N,"en-toolbar-detailednotebooktypecore-typeicon");E(a.C,"en-toolbar-detailednotebooktypecore-text");E(a.I,"en-toolbar-detailednotebooktypecore-dropdownicon");
E(a.L,"en-toolbar-detailednotebooktypecore-jumpericon");a.J();null!=b.cssClassDeep&&a.aa(b.cssClassDeep)};a.S=function(){b=null;a.N=null;a.C=null;a.I=null;a.L=null};a.J=function(){a.A.Ca(a.N);a.A.Ca(a.C);a.A.Ca(a.I);a.R.Ca(a.L);a.Aa.T(a.A);a.Aa.T(a.R)};a.aa=function(b){a.Aa.aa(b);a.A.aa(b);a.R.aa(b);E(a.N,b);E(a.C,b);E(a.I,b);E(a.L,b)}};function Mh(){var a=this;a.name="toolbarbutton-"+yb();var b=null,c=null;z(this instanceof Mh,"use `new` to instantiate");a.A=new Gh(new Hh);var d={normal:["normal"],disabled:["disabled","en-ui-toolkit-prevent-click"],highlighted:["highlighted"]};a.C=function(){b.click?b.click():(null!=b.execCommand&&Z.execCommand(b.execCommand),b.track&&b.track.click&&kf(b.track.click),b.postBoundingBoxNotification&&b.postBoundingBoxNotification.click&&cf(a.F(),b.postBoundingBoxNotification.click))};a.G=function(d){b=
d=B(d,{cssClassDeep:null,stateAtSetup:"normal",execCommand:null,tooltipLocalizationKey:null,click:null,track:null,postBoundingBoxNotification:null,getState:null});d.tooltipLocalizationKey&&(a.Gd=d.tooltipLocalizationKey);a.la(d.stateAtSetup);a.D.listener(a.A.F(),"mousedown",function(a){Z.execCommand("content.focus");return X(a)});c=a.D.listener(a.A.F(),"click",a.C);d={cssClassDeep:d.cssClassDeep,core:{cssClassDeep:d.cssClassDeep}};a.da().G(a.A,d)};a.S=function(){d=null};a.J=function(b){Object.keys(d);
var c=a.A.P().gb();d[b].forEach(function(a){E(c,a)})};a.yd=function(b){Object.keys(d);var c=a.A.P().gb();d[b].forEach(function(a){H(c,a)})};a.la=function(e,f){!e&&b.getState&&(e=b.getState());Object.keys(d);null!=f&&!1!==f||Object.keys(d).forEach(a.yd);a.J(e);a.A.ve("disabled"===e);"disabled"===e?(a.D.remove(c),c=null):null==c&&(c=a.D.listener(a.A.F(),"click",a.C))};a.F=function(){return a.A.F()};a.P=function(){return a.A.P()};a.gb=function(){return a.A.P().gb()}};function Nh(){var a=this;z(this instanceof Nh,"use `new` to instantiate");a.name="selectmenubutton-"+yb();a.A=new Gh(new Ih);a.C=null;a.hb=function(){return a.A.P().hb()};a.G=function(b){b=B(b,{action:function(){},cssClassDeep:null,menuOptions:[]});var c=a.da(),d={cssClassDeep:b.cssClassDeep,core:{cssClassDeep:b.cssClassDeep,menuOptions:b.menuOptions}};a.we(b.menuOptions);a.D.listener(a.A.P().hb(),"change",function(a){a.target.blur();Z.execCommand("content.focus");b.action(a)});c.G(a.A,d);E(a.A.F(),
"en-toolbar-selectmenubutton")};a.S=function(){a.C=null};a.we=function(b){a.C=b.map(function(a){return a.value})};a.yg=function(b,c){var d=a.A.P().Ye(b);if(null==d){var d=M("option",{value:b},[b]),e=a.A.P().Ze();e.push(b);e=e.sort(c).indexOf(b);a.A.P().hb().add(d,a.A.P().hb()[e])}a.A.P().di(d);a.refresh()};a.Dc=a.A.P().Dc;a.wg=function(b,c){a.yg(b,c);a.J([b])};a.la=function(b){null==b&&(b="normal");var c=a.A.P().hb();"normal"===b?(c.removeAttribute("disabled"),a.A.ve(!1)):"disabled"===b&&(c.setAttribute("disabled",
"disabled"),a.A.ve(!0))};a.refresh=function(){Cc(a.A.P().hb(),a.A.P().hb())};a.J=function(b){null==b&&(b=[]);null!=a.C&&a.A.P().Ze().filter(function(c){return-1===a.C.concat(b).indexOf(c)}).forEach(function(b){I(a.A.P().Ye(b))})};a.F=function(){return a.A.F()}};function Oh(){var a=this;a.name="textinfo-"+yb();a.C=null;z(this instanceof Oh,"use `new` to instantiate");a.A=new Gh(new Kh);a.G=function(b){b=B(b,{cssClassDeep:null});a.da().G(a.A,{cssClassDeep:b.cssClassDeep,core:{cssClassDeep:b.cssClassDeep}})};a.S=function(){a.D.remove(a.C);a.C=null};a.ta=function(b){null!=b&&a.A.P().ta(b)};a.F=function(){return a.A.F()};a.J=function(b){!0===b?E(a.A.P().qe(),"underlined"):H(a.A.P().qe(),"underlined")}};function Ph(){var a=this;z(this instanceof Ph,"use `new` to instantiate");a.name="presenceperson-"+yb();var b=function(){var a=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||a.backingStorePixelRatio||1)}(),c=1/(2*Math.PI);a.info=null;a.A=new Dh;a.C=null;a.I=M("div");a.L=null;a.F=function(){return a.A.F()};a.R=function(){return a.I};a.cf=function(){return a.info.type};
a.V=function(){return a.C};a.na=function(b){z("consolidated"===a.cf(),"presece: should be consolidated type");a.info.consolidatedNum=b;a.I.textContent=""+a.info.consolidatedNum};a.$=function(){z("consolidated"===a.cf(),"presece: should be consolidated type");return a.info.consolidatedNum};a.G=function(b){b=B(b,{name:null,imageUrl:null,id:null,status:null,type:"single",consolidatedNum:null,localizations:{nameEditingNote:"",nameViewingNote:""}});a.da().G(a.A);E(a.A.F(),"en-toolbar-presenceperson");
E(a.I,"en-toolbar-presenceperson-avatar");a.fa(b);a.J()};a.J=function(){a.A.Ca(a.I)};a.tc=function(){var b="";"single"===a.info.type&&("viewing"===a.info.status?b=a.info.localizations.nameViewingNote:"editing"===a.info.status&&(b=a.info.localizations.nameEditingNote));a.A.F().setAttribute("title",b)};a.fa=function(b){b=B(b,{name:null,imageUrl:null,id:null,status:null,type:"single",consolidatedNum:null,consolidatedIds:null,localizations:{nameEditingNote:"",nameViewingNote:""}});a.info=b;"consolidated"===
a.info.type?(a.I.textContent=""+a.info.consolidatedNum,a.aa("consolidated")):"single"===a.info.type?(null!=a.info.imageUrl?a.I.style.backgroundImage="url("+a.info.imageUrl+")":E(a.I,"unknown-image"),"editing"===a.info.status&&a.Pf(),a.L=M("div",{"class":"hovered-layer"}),a.I.appendChild(a.L),a.tc(),a.aa("single")):z(!1,"unknown presence type");a.D.listener(a.I,"click",function(){var b=N(a.I,!0),b={left:b.left,top:b.top,width:b.width,height:b.height,type:a.info.type,id:null,name:null,consolidatedIds:null};
"single"===a.info.type?(b.id=a.info.id,b.name=a.info.name):"consolidated"===a.info.type&&(b.consolidatedIds=a.info.consolidatedIds);af("presenceClicked",b)})};a.S=function(){a.C=null;a.I=null;a.L=null};a.N=function(){a.C=M("canvas");var d=a.C.getContext("2d");E(a.C,"en-toolbar-presenceperson-canvas");a.C.width=28*b;a.C.height=28*b;a.C.style.width="28px";a.C.style.height="28px";d.setTransform(b,0,0,b,0,0);(function(){var b=0;return function(){d.clearRect(0,0,a.C.width,a.C.height);d.save();d.translate(14,
14);b=(b+c)%(2*Math.PI);d.rotate(b);var f=0+13*Math.cos(0),g=0+13*Math.sin(0),h=0+13*Math.cos(2*Math.PI),l=0+13*Math.sin(2*Math.PI);d.beginPath();d.strokeStyle=d.createLinearGradient(f,h,g,l);d.strokeStyle.addColorStop(0,"rgb(242,248,252)");d.strokeStyle.addColorStop(1,"rgb(0,167,237)");d.arc(0,0,13,0,2*Math.PI);d.lineWidth=1;d.stroke();d.closePath();d.restore()}})()()};a.Pf=function(){null==a.C&&a.N();a.A.Ca(a.C)};a.ga=function(){null==a.C?v.warn("presenceheadcore: no spinner exists","returning"):
a.A.F().removeChild(a.C)};a.ca=function(){return 28};a.aa=function(b){a.A.aa(b);E(a.C,b);E(a.I,b);E(a.L,b)}};function Qh(){function a(a,f){e.J=a;var l;l=a.num-f;e.C=a.clampedList.slice(0,f).map(function(a){return d(a)});if(0<l){l+=1;var m=e.J.clampedList.slice(-l).map(function(a){return a.id});e.C.splice(-1,1,d({type:"consolidated",consolidatedNum:l,consolidatedIds:m}))}b()&&1===e.C.length&&"consolidated"===e.C[0].cf()&&e.C[0].Pf();c()}function b(){return e.J.clampedList.some(function(a){return"editing"===a.status})}function c(){tc(e.A.F());e.C.forEach(function(a){e.A.ha(a)});0===e.C.length?vh(e.A):xh(e.A)}
function d(a){var b=new Ph;f.G(b,a);return b}var e=this;z(this instanceof Qh,"use `new` to instantiate");e.name="presencemanager-"+yb();e.A=new Dh;var f=null;e.I=3;e.J=null;e.C=null;e.L=function(a){e.I=Math.min(Math.max(1,a),3)};e.fa=function(b){b=B(b,{clampedList:[],num:0});a(b,e.I)};e.G=function(){e.C=[];f=e.da();f.G(e.A);E(e.A.F(),"en-toolbar-presencemanager")};e.S=function(){f=e.C=null};e.je=function(){return 1<e.C.length};e.ie=function(){return e.I>e.C.length&&e.J.clampedList.length>e.C.length};
e.Nb=function(){return 28};e.R=function(b){if(!e.je())return{didShrink:!1,shrunkBy:0};if(null==b)return e.L(e.C.length-1),a(e.J,e.I),{didShrink:!0,shrunkBy:e.Nb()};for(var c=0;e.je()&&c<=b;){e.L(e.C.length-1);a(e.J,e.I);var d=e.Nb(),c=c+d;b-=d}return{didShrink:0<c,shrunkBy:c}};e.expand=function(b){null==b&&(b=Number.POSITIVE_INFINITY);if(!e.ie()||e.Nb()>b)return{didExpand:!1,expandedBy:0};console.log("here");for(var c=0;e.ie()&&e.Nb()<b&&c<=b;){e.L(e.C.length+1);a(e.J,e.I);var d=e.Nb(),c=c+d;b-=d}return{didExpand:0<
c,expandedBy:c}};e.F=function(){return e.A.F()}};function Rh(){z(this instanceof Rh,"please use `new` to instantiate");var a=this;a.name="shield-"+yb();a.A=null;a.G=function(b){b=B(b,{style:"top:0;left:0;bottom:0;right:0;background:transparent;position:fixed;z-index:2147483147;"});a.A=M("div",{style:b.style});a.D.listener(a.A,"contextmenu",function(a){return X(a)})};a.F=function(){return a.A};a.S=function(){a.A=null}};function Sh(){z(this instanceof Sh,"use new to instantiate");var a=this;a.name="tagseditablebox-"+yb();a.C=new Dh;a.A=null;a.F=function(){return a.C.F()};a.rc=function(){return a.C.F()};a.clear=function(){tc(a.A)};a.Ib=function(){vh(a.C)};a.Ff=function(){a.ug();xh(a.C)};a.G=function(b){b=B(b,{contenteditable:!1,cssClassDeep:null,spellcheck:null,autocomplete:null,autocapitalize:null,autocorrect:null});a.da().G(a.C);a.A=a.C.F();z(null!=a.A,"tagseditablebox: editable node should exist in the box");E(a.C.F(),
"en-toolbar-tagseditablebox");E(a.A,"en-toolbar-tagseditablebox-editablediv");null!=b.spellcheck&&a.A.setAttribute("spellcheck",""+b.spellcheck);if(null!=b.autocomplete){var c=b.autocomplete?"on":"off";a.A.setAttribute("autocomplete",c)}null!=b.autocapitalize&&(c=b.autocapitalize?"on":"off",a.A.setAttribute("autocapitalize",c));null!=b.autocorrect&&(c=b.autocorrect?"on":"off",a.A.setAttribute("autocorrect",c));a.xf(b.contenteditable);null!=b.cssClassDeep&&a.aa(b.cssClassDeep)};a.L=function(){a.M()?
(H(a.A,"viewing"),E(a.A,"editing"),E(a.A.parentNode,"editing")):(H(a.A,"editing"),E(a.A,"viewing"),H(a.A.parentNode,"editing"))};a.M=function(){return $c(a.A)};a.ai=function(b){ad(a.A,b)};a.xf=function(b){ad(a.A,b);a.L()};a.td=function(b){a.C.Ca(b)};a.S=function(){};a.aa=function(b){a.C.aa(b)};a.I=function(){var b={},b=B(b,{left:null,right:null,top:null,bottom:null});Object.keys(b).forEach(function(a){ha(b[a])&&(b[a]+="px")});ed(a.A);T(a.A,"left",b.left);T(a.A,"top",b.top);T(a.A,"right",b.right);
T(a.A,"bottom",b.bottom);fd(a.A)};a.J=function(){return!D(a.A,"en-ui-toolkit-display-none")};a.hasFocus=function(){if(!a.M())return!1;var b=W(a.A);return b&&(b=Od(b))?!!P(b,$c):!1};a.ug=function(){var b;b=document.querySelector(".en-ui-toolkit-widget.smalltags");z(null!=b,"should be able to located small tags button");b=N(b,!0);z(null!=b,"tagseditablebox: bBox for small tags button should exist");a.I()};a.focus=function(){a.J()||Ia("tagseditablebox: calling focus may have no effect","becasue the node is not displayed");
a.A.focus();Jd(Id(a.A,O(a.A)))}};function Th(){function a(a){var b={type:"html",mode:"plain",value:""},b=B(Pb(a),b,!0),c=W();a=null;null!=c&&(a=c.endContainer);c=b.value;"html"===b.type&&(c=yc(c,w.N.F()).textContent);b=null;oa(a)?b=ta(a):(a=w.I().filter(jd),0<a.length&&(b=gc(a[0]),a.forEach(function(a){g(a)})),C(a));var d=[];c.split(",").forEach(function(a){a=a.trim();sb(a)||-1!==Object.keys(w.C).indexOf(a)||(a=be(a),d.push(a),d.push(Hb()),w.ua(hc(a),a))});(function(a,b){z(null!=b,"starting space node should exist");for(var c=0,
d=a.length;c<d;)Fc(a[c],b),b=a[c],c+=1})(d,b);if(0>=d.length)return!1;b=d.filter(oa);0<b.length&&(Sa(b[b.length-1]),Bd(w.A.F().scrollHeight,250,w.A.F()));x(d.filter(pb));return!0}function b(a){if(D(a.target,"en-toolbar-tagsmanager-suggestionslist-item")){var b=a.target.textContent;d();var c=W().endContainer;if(oa(c))return c=ta(c),-1===Object.keys(w.C).indexOf(b)?(b=h(c,b),Sa(Kc(b))):(Uf(c),Sa(c)),X(a)}}function c(a){a.filter(function(a){return"characterData"===a.type&&oa(a.target)}).forEach(function(a){a=
ta(a.target);a=ic(a);sb(a)?d():af("requireTagSuggestionsForPhrase",{phrase:a})})}function d(){pc(w.R).forEach(function(a){E(a,"selected")});wh(w.L)}function e(a){tc(w.R);a.forEach(function(a){null==a&&(a="");a=M("li",{"class":"en-toolbar-tagsmanager-suggestionslist-item"},[a]);w.R.appendChild(a)})}function f(){Xh().filter(function(a){return/\S+/.test(a.textContent)}).forEach(function(a){a=ta(a);h(a)})}function g(a){var b=Kc(a);ce(b)||I(b);I(a);b.previousSibling&&oa(b.previousSibling)&&I(b);a=hc(a);
w.ob(a)}function h(a,b){a=ta(a);b=null==b?ic(a):b;var c=b.match(/\S+/);z(null!=c,"match should exist for tag text");c=be(b);uc(a,c);w.A.F().normalize();var d=Kc(c),e=gc(c),f=c.nextSibling,g=c.previousSibling;null==d&&z(null==f,"if nextSpaceNode is null","so should nextNode");null!=d&&oa(f)||(d=Hb(),Fc(d,c));null!=e&&oa(g)||(e=Hb(),c.parentNode.insertBefore(e,c));w.A.F().normalize();w.ua(hc(c),c);x([c]);return c}function l(a){var b=Id(a,0);g(a);C(a);a=Hb();b.collapse(!1);b.insertNode(a);b=document.createRange();
b.selectNode(a);b.collapse(!1);oa(gc(a))&&I(ta(gc(a)));return a}function m(){var a=Yd.note;0===a.active||a.deleted||a.isTagsReadOnly||(Vf(),w.N.T(de),w.A.xf(!0),a=w.D.listener(ee,"mousedown",function(a){p();return X(a)}),w.qa.add(a))}function p(){w.A.M()&&(w.qa.ji(),I(ee),Ra(),f(),d(),w.A.F().scrollTop=0,"0"===w.ca("numTags")&&(w.A.Ib(),yh(w.V)),w.A.xf(!1),w.Af())}function r(){var a=null;return w.I().filter(function(a){return!D(a,"ellipsis")}).some(function(b){b=N(b);null==a&&null!=b&&(a=b.top);if(null!=
b&&b.top!==a)return!0})}function n(){var a=null,b=null;w.I().filter(function(a){return!D(a,"ellipsis")}).some(function(c){var d=N(c);null==a&&null!=d&&(a=d.top);if(null!=d&&d.top!==a)return!0;b=c});return b}function q(){return function(a){if(w.A.M())return!0;m();f();w.A.F().focus();Bd(w.A.F().scrollHeight,250,w.A.F());var b=zb();Sa(b[b.length-1]);X(a);return!1}}function y(){return function(){wh(w.V);m();w.A.Ff();var a=zb();0<a.length?Sa(a[0]):(a=Hb(),w.A.td(a),Sa(a))}}function t(){wh(w.V);m();w.A.Ff();
w.A.F().focus();Bd(w.A.F().scrollHeight,250,w.A.F())}function A(){var a=zb();0<a.length?Sa(a[a.length-1]):(a=Hb(),w.A.td(a),Sa(a))}function G(a){w.ga("readOnly",""+a)}function C(a){fa(a)||(a=[a]);a={names:a.map(hc)};af("tagRemoved",a);a=Object.keys(w.C);Nb("tagsChanged",a)}function x(a){fa(a)||(a=[a]);a={names:a.map(hc)};af("tagAdded",a);a=Object.keys(w.C);Nb("tagsChanged",a)}function F(a){w.ga("numTags",""+a.length);w.A.F().setAttribute("title",a.join(", "));0===a.length&&(w.A.Ib(),yh(w.V),p())}
function ga(){return function(a){if(!pb(a.target)||!0===a.metaKey||!0===a.ctrlKey||!0===a.shiftKey)return!0;var b=Ib(a.target);if(-1!==Wf.indexOf(a.which||a.keyCode||0))return X(a),!1;a=l(b);Ld(a);return!0}}function Y(){function a(b){X(b);return!1}var b={27:function(a){if(Fb())return d(),X(a),!1;p();X(a);return!1},9:function(a){if(9===a.keyCode)return p(),X(a)}};b["40"]=a;b["38"]=a;return function(a){var c=""+(a.which||a.keycode||0);return null==b[c]?!0:b[c](a)}}function Aa(){return function(a){if(!fe)return!0;
fe=!1;var b=W(w.A.F()).endContainer,b=ta(b),c=null;if(13===a.keyCode&&kd(b))return p(),Z.execCommand("title.focus"),X(a),!1;Fb()&&null!=ec()?(c=ec().textContent,d()):c=ic(b);-1===Object.keys(w.C).indexOf(c)?(b=h(b,c),Sa(Kc(b))):(Uf(b),Sa(b));X(a);return!1}}function ca(){return function(a){return-1!==Wf.indexOf(a.which||a.keyCode||0)?(fe=!0,X(a),!1):!0}}function xa(){return function(a){if(!w.A.M())return!0;d();var b=W()&&W().endContainer;return b&&oa(b)&&ta(b).hasAttribute("active")?(Ra(),!0):b&&oa(b)?
(f(),Ra(),Sa(ta(b)),X(a),!1):!0}}function cb(){return function(a){if(!w.A.M())return!0;var b=W()&&W().endContainer;if(b&&oa(b)&&sb(ic(b)))return Sa(ta(b)),X(a),!1}}function k(){function a(b){var c=37===(b.which||b.keycode),d=!c,e=W(),g=Pd(e);if(oa(g)){var h=ta(g),k=g.textContent,g=k.slice(0,e.startOffset),e=k.substring(e.endOffset);if(d&&(" "===e||""===e)){if(ce(h))return X(b),!1;Ra();hb(ge(h));f();X(b);return!1}if(c&&""===g){if(Xf(h))return X(b),!1;Ra();hb(Yf(h));f();X(b);return!1}}return!0}var b=
{};b["37"]=a;b["39"]=a;b["8"]=function(a){var b=W(w.A.F());z(oa(b.endContainer),"how did this not end up in a space node?");if(oa(b.endContainer)){var c=ta(b.endContainer);if(Xf(c)&&kd(c))return X(a),!1;if(b.collapsed&&0===b.startOffset)return Ra(),hb(Yf(c)),f(),X(a),!1;ld(c,b.startOffset,b.endOffset)}return!0};b["46"]=function(a){var b=W(w.A.F());z(oa(b.endContainer),"how did this not end up in a space node?");if(oa(b.endContainer)){var c=ta(b.endContainer);if(ce(c)&&kd(c))return X(a),!1;if(b.collapsed&&
b.endOffset>=ic(c).length-1)return Ra(),hb(ge(c)),f(),X(a),!1;ld(c,b.startOffset,b.endOffset)}return!0};b["65"]=function(a){if(!a.metaKey)return!0;var b=ta(W().endContainer);kd(b)?w.I().forEach(hb):Zf(ta(W().endContainer));X(a);return!1};return function(a){var c=""+(a.which||a.keycode||0);if(null==b[c])return!0;d();return b[c](a)}}function qa(){return function(a){if(!pb(a.target))return!0;d();var b=Ib(a.target),c=b.textContent,b=l(b);z(oa(b),b,"should be space node");null==c&&(c="");var e=ta(b);e.normalize();
e.textContent=c+" ";e.normalize();Zf(b);X(a);return!1}}function db(){function a(b){f();var c=Ib(b.target);if(!w.A.M())return m(),Ra(),hb(c),X(b),!1;if(jd(c))return Ra(),hb(c),X(b),!1;if(b.metaKey)return hb(c),X(b),!1;if(b.shiftKey){var d=w.I(),e=d.indexOf($f),c=d.indexOf(c);-1!==e&&(e>=c?w.I().slice(c,e+1):w.I().slice(e,c+1)).forEach(hb);X(b);return!1}Ra();hb(c)}return function(b){if(!pb(b.target))return!0;if(D(b.target,"ellipsis"))return A(),!0;d();return a(b)}}function V(){function a(b){var c=w.I().filter(jd);
z(0!==c.length,"at least one selection must exist");var d=gc(c[0]);c.forEach(g);C(c);Sa(d);X(b);return!1}var b={};b["46"]=a;b["8"]=a;b["37"]=function(a){Ra();Sa(gc(Ib(a.target)));X(a);return!1};b["39"]=function(a){Ra();Sa(Kc(Ib(a.target)));X(a);return!1};b["65"]=function(a){if(!a.metaKey)return!0;f();w.I().forEach(hb);X(a);return!1};return function(a){if(!pb(a.target))return!0;var c=""+(a.which||a.keycode||0);if(null==b[c])return!0;d();return b[c](a)}}function Ba(){var a={38:function(){var a=ec();
null==a?Lc(0):null==a.previousSibling?Lc(O(w.R)-1):he(a.previousSibling)},40:function(){var a=ec();null==a?Lc(0):null==a.nextSibling?Lc(0):he(a.nextSibling)}};return function(b){var c=a[""+(b.which||b.keycode||0)];return null==c?!0:c(b)}}function ec(){var a=U(".en-toolbar-tagsmanager-suggestionslist-item.selected",w.R);z(1>=a.length);return 1===a.length?a[0]:null}function Fb(){return!D(w.L,"en-ui-toolkit-display-none")}function gb(){function a(d){var e,f=d.type;e=b[f];z(null!=e,"how did an unregistered event trigger?");
e.some(function(a){return!1===a(d)});e=c[f];null!=e&&e.forEach(function(a){a(d)})}var b={},c={};this.register=function(c,d){d=d.toLowerCase();null==b[d]&&(b[d]=[],w.D.listener(w.A.F(),d,a));b[d].push(c)}}function zb(){return U(".en-toolbar-tagseditablebox-space",w.A.rc())}function Ra(){w.I().forEach(gh)}function gh(a){z(pb(a),"arg should be tag pill");a=Ib(a);H(a,"selected");a.blur()}function hb(a){z(pb(a),"arg should be tag pill");a=Ib(a);a.focus();E(a,"selected");$f=a}function jd(a){z(pb(a),"arg should be tag pill");
a=Ib(a);return D(a,"selected")}function ld(a,b,c){z(oa(a),"argument should be a spacing element");a=ta(a);Ra();zb().forEach(Yh);var d=a;z(oa(d));d=ta(d);d.setAttribute("active","true");Jd(Id(a.firstChild,b,a.firstChild,c))}function Zf(a){var b=ta(a);ld(a,0,O(b.firstChild)-1)}function Sa(a){a=ta(a);ld(a,0,0)}function Yh(a){z(oa(a));a=ta(a);a.removeAttribute("active")}function ta(a){z(oa(a),"call only if you're sure spaceNode is a space node","or if spaceNode is the child node of a space node root");
return D(a.parentNode,"en-toolbar-tagseditablebox-space")?a.parentNode:a}function oa(a){return null==a?!1:D(a,"en-toolbar-tagseditablebox-space")||D(a.parentNode,"en-toolbar-tagseditablebox-space")}function Hb(){return M("span",{"class":"en-toolbar-tagseditablebox-space","tab-index":"-1"},[" "])}function ic(a){z(oa(a),a,"should be space node");a=ta(a);return a.textContent.substring(0,a.textContent.length-1)}function kd(a){z(oa(a),"should be space node");return" "===ta(a).textContent}function Uf(a){z(oa(a),
"should be space node");ta(a).textContent=" "}function Xh(){return pc(w.A.F()).filter(function(a){return oa(a)})}function ce(a){z(oa(a),"argument should be space node");return ta(a)===w.A.F().lastChild}function Xf(a){z(oa(a),"argument should be space node");return ta(a)===w.A.F().firstChild}function gc(a){return wd(a,".en-toolbar-tagseditablebox-space",w.A.rc())}function Kc(a){return vd(a,".en-toolbar-tagseditablebox-space",w.A.rc())}function hc(a){z(pb(a),"call only if you're sure pillNode is a tag pill node",
"or if pillNode is the child node of a tag pill node");return a.textContent}function Ib(a){z(pb(a),"call only if you're sure pillNode is a tag pill node","or if pillNode is the child node of a tag pill node");return D(a,"en-toolbar-tagpill-text")||D(a.parentNode,"en-toolbar-tagpill-text")?a.parentNode:a}function Yf(a){return wd(a,".en-toolbar-tagpill",w.A.rc())}function ge(a){return vd(a,".en-toolbar-tagpill",w.A.rc())}function pb(a){return D(a,"en-toolbar-tagpill")||D(a,"en-toolbar-tagpill-text")||
D(a.parentNode,"en-toolbar-tagpill-text")}function be(a){z(null!=a&&0<a.length&&!/^\s+$/.test(a),"should not be white-space only string");var b=M("div",{"class":"en-toolbar-tagpill","data-status":"normal",contenteditable:"false",tabindex:"-1"});a=M("div",{"class":"en-toolbar-tagpill-text"},[a.trim()]);b.appendChild(a);return b}function Lc(a){he(pc(w.R)[a])}function he(a){pc(w.R).forEach(function(a){H(a,"selected")});E(a,"selected")}function Vf(){w.A.clear();w.A.td(Hb());Object.keys(w.C).forEach(function(a){w.A.td(w.C[a]);
w.A.td(Hb())})}function Zh(a){!0===a.focus&&p()}function $h(){var a=[];this.add=function(b){a.push(b)};this.ji=function(){a.forEach(function(a){w.D.remove(a)})}}var w=this;w.name="tagsmanager-"+yb();z(this instanceof Th,"use new to instantiate");var ag=window.MutationObserver||window.webkitMutationObserver;z(null!=ag,"tagsmanager: mutation observer is required");var md=null;w.N=new Dh;w.A=new Sh;w.L=M("div");w.R=M("ul");w.V=M("div");w.$=function(){var a=M("div",{"class":"en-toolbar-tagpill ellipsis",
"data-status":"normal",contenteditable:"false"}),b=M("div",{"class":"en-toolbar-tagpill-text ellipsis"},["..."]);a.appendChild(b);return a}();w.ma=null;w.na=null;w.C={};w.Da=[];w.qa=null;var fe=!1,Wf=[9,13,44],de=new Rh,ee=null;w.ca=function(a){return w.N.F().dataset[a]};w.ga=function(a,b){w.N.F().dataset[a]=b};w.ua=function(a,b){w.C[a]=b};w.ob=function(a){w.C[a]=null;delete w.C[a]};w.Ya=function(a){w.C={};a.forEach(function(a){z(null==w.C[a],"should be the first time we insert","that is, no repeats are allowed in the tag list");
w.C[a]=be(a)})};w.I=function(){return U(".en-toolbar-tagpill",w.A.rc())};w.rb=function(){return U(".en-toolbar-tagpill.selected",w.A.rc())};var $f=null;w.Qh=function(a){t();!0===a.edit&&A()};w.Fh=function(){t();A()};w.Ea=function(){yh(w.$)};w.ab=function(){wh(w.$)};w.bb=function(){var a;a=w.$;a=null!=a?null==a.parentNode||D(a,"en-ui-toolkit-display-none"):void 0;return a};w.Af=function(){console.log(r());if(r()){w.bb()&&w.Ea();var a=n(),b=ge(a),c=N(a),b=N(b);c.top!==b.top&&(Fc(w.$,a),N(w.$).top!==
c.top&&a.parentNode.insertBefore(w.$,a));w.Ea()}else w.ab()};w.zh=function(){return w.A};w.F=function(){return w.N.F()};w.pb=function(a){z(null!=a,"typingWord should be a non null string");return w.Da.filter(function(b){var c=a.toLowerCase();b=b.toLowerCase();console.log(c);return 0===b.indexOf(c)})};w.tc=function(a){w.na=a.tagsPlaceholder;null!=w.na&&(w.V.textContent=w.na,w.V.normalize())};w.Ch=function(a){a=B(a,{clampedList:[],num:0});w.Da=a.clampedList};w.fa=function(a){if(!w.A.hasFocus()){w.ma=
a;var b=a.clampedList;a=Object.keys(w.C).every(function(a){return-1!==b.indexOf(a)})&&Object.keys(w.C).length===b.length;w.ga("numTags",""+b.length);a||(w.Ya(b),Nb("tagsChanged",b),Vf());0>=b.length?w.A.Ib():w.A.Ff()}};w.Dh=function(a){var b=W(),c=null;null!=b&&(c=b.endContainer);if(!c||oa(c))if(b=ta(c),c=ic(b),a.phrase===c){for(var c=[],f=0;10>c.length&&f<a.suggestions.length;)-1===Object.keys(w.C).indexOf(a.suggestions[f])&&c.push(a.suggestions[f]),f+=1;0<c.length?(e(c),a=N(b,!0),a=JSON.parse(JSON.stringify(a)),
a.top+=25,null!=a&&(ed(w.L),T(w.L,"left",a.left+"px"),T(w.L,"top",a.top+"px"),fd(w.L)),yh(w.L),Lc(0)):d()}};w.G=function(d){d=B(d,{readOnly:!1});md=w.da();md.G(w.N);md.G(w.A,{contenteditable:!1,spellcheck:!1,autocomplete:!1,autocapitalize:!1,autocorrect:!1});md.G(de);ee=de.F();w.qa=new $h;E(w.N.F(),"en-toolbar-tagsmanager-all");E(w.L,"en-toolbar-tagsmanager-suggestionslist-wrapper");E(w.R,"en-toolbar-tagsmanager-suggestionslist");E(w.V,"en-toolbar-tagsmanager-placeholder");G(d.readOnly);w.D.H("noteReadOnlyStateChanged",
function(a){G(a.readOnly)});w.D.H("noteInfoChanged",function(a){var b=w.ca("readOnly");G(a.isTagsReadOnly||a.deleted||0===a.active);b!=w.ca("readOnly")&&w.A.ai(!w.ca("readOnly"))});w.D.H("focusChanged",Zh);w.D.listener(w.V,"click",y());var e=new gb,f=V(),g=Y(),h=k(),l=ga(),m=db(),n=qa(),p=xa(),r=cb(),t=q(),Ra=ca(),x=Aa();e.register(Ba(),"keydown");e.register(f,"keydown");e.register(h,"keydown");e.register(g,"keydown");e.register(l,"keypress");e.register(Ra,"keypress");e.register(g,"keydown");(new ag(c)).observe(w.A.F(),
{childList:!0,characterData:!0,subtree:!0});e.register(m,"mousedown");e.register(n,"dblclick");e.register(p,"click");e.register(r,"dblclick");e.register(t,"mousedown");w.D.listener(w.A.F(),"keyup",x);w.D.listener(w.R,"mousedown",b);w.D.listener(window,"resize",function(){w.Af()});w.D.H("tagsChanged",F);wh(w.L);w.ga("readOnly",d.readOnly+"");w.D.B({name:"paste",action:function(b){console.log(b);if(w.A.M())return a(b)},enabled:function(){return w.A.M()}});w.D.B({name:"copy",value:function(){var a=W(),
b=null;null!=a&&(b=a.endContainer);return oa(b)?{plain:fb(a.toString())}:{plain:w.I().filter(jd).map(hc).join(",")}},enabled:function(){return w.A.M()}});w.J()};w.qb=function(){return w.A.M()};w.J=function(){w.N.Ca(w.V);w.N.T(w.A);w.L.appendChild(w.R);w.N.Ca(w.L)};w.S=function(){}};function Uh(){function a(){k.pb.T(k.A);k.pb.T(k.Uc);k.pb.T(k.Se);k.pb.T(k.Zd);k.pb.T(k.yc);k.pb.T(k.R[6]);k.qb.T(k.Ld);k.qb.T(k.I);k.qb.T(k.na);k.qb.T(k.ga);k.qb.T(k.L);k.qb.ha(k.R[7]);k.C.T(k.ua);k.C.T(k.R[0]);k.C.T(k.ca);k.C.T(k.R[1]);k.C.T(k.Sb);k.C.T(k.R[2]);k.C.T(k.Tb);k.C.T(k.R[3]);k.C.T(k.Ac);k.C.T(k.Mc);k.C.T(k.Vc);k.C.T(k.V);k.C.T(k.Gc);k.C.T(k.R[4]);k.C.T(k.ob);var a=Fb();k.C.T(k.Qc);F(a,!0);F(a,!1);k.bb.T(k.$);k.bb.T(k.ca);k.bb.T(k.ab);k.rb.T(k.qa);k.rb.T(k.Oc);k.rb.T(k.Xb);k.Ya.md().T(k.pb);
k.Ya.$e().T(k.qb);1200<Fb()?Y():ga();k.qd.T(k.Ya);k.qd.T(k.Ub);k.Da.T(k.qd);k.Da.T(k.Ee);k.Da.T(k.J);k.Da.T(k.Ea);a=document.querySelector(".en-note-container");a.parentNode.insertBefore(k.Da.F(),a)}function b(){k.qa=new Oh;V.G(k.qa,{cssClassDeep:"notesourcemetadata"});k.qa.href=null;k.qa.clickRef=null;k.qa.fa=function(a){k.qa.ta(a.text);k.qa.href=a.href;k.D.remove(k.qa.clickRef);k.qa.clickRef=null;null!=k.qa.href&&(k.qa.clickRef=k.D.listener(k.qa.F(),"click",function(){gf(a.href,"noteSourceMetadata",
null)}))};qa.noteSourceMetadata=function(a){k.qa.fa(a)};k.Oc=new Oh;V.G(k.Oc,{cssClassDeep:"lastsavetimemetadata"});k.Oc.fa=function(a){k.Oc.ta(a.savedDate)};qa.lastSaved=function(a){k.Oc.fa(a)};k.Xb=new Gh(new Hh);V.G(k.Xb,{cssClassDeep:"lock"});k.Xb.fa=function(a){!0===a?xh(k.Xb):vh(k.Xb)};qa.readOnly=function(a){k.Xb.fa(a)};gb(k.Xb,"readOnlyButtonClicked")}function c(){k.$=new Gh(new Lh);V.G(k.$,{cssClassDeep:"detailednotebooktype"});k.$.fa=function(a){k.$.P().ci(a.type);k.$.P().ta(a.name);k.$.P().rh(a.showDropdownArrow);
k.$.P().sh(a.showJumperArrow);!1===a.showDropdownArrow?(E(k.$.P().F(),"disabled"),E(k.$.P().F(),"en-ui-toolkit-prevent-click")):(H(k.$.P().F(),"disabled"),H(k.$.P().F(),"en-ui-toolkit-prevent-click"));null!=a.name&&k.$.F().setAttribute("title",a.name)};qa.notebookInfo=function(a){k.$.fa(a);k.ua.fa(a)};k.D.listener(k.$.F(),"click",function(a){kf({category:"note",action:"note_action",label:"change_notebook"});null!=P(a.target,".en-toolbar-detailednotebooktypecore-notebookinfowrapper")?cf(a.target,"showNotebookSheet"):
D(a.target,"en-toolbar-detailednotebooktypecore-jumpericon")&&cf(a.target,"jumpToNotebook")});k.ca=new Mh;k.ca.jg=null;V.G(k.ca,{cssClassDeep:"smalltags",getState:function(){return 0===Ba.note.active||Ba.note.deleted?"disabled":!0===k.Lg||!0===Ba.note.isTagsReadOnly?"normal":0<k.ca.jg?"highlighted":"normal"}});k.ca.I=function(a){k.ca.jg=a.length;k.ca.F().setAttribute("title",a.join(", "));k.ca.la()};k.D.H("tagsChanged",k.ca.I);k.ab=new Th;V.G(k.ab,{readOnly:Ba.noteLocked.readOnly||Ba.note.isTagsReadOnly});
qa.tags=function(a){k.ab.fa(a)};qa.tagSuggestions=function(a){k.ab.Ch(a)};qa.tagSuggestionsForPhrase=function(a){k.ab.Dh(a)};qa.openTagsField=function(a){C();k.ab.Qh(a)};k.D.listener(k.ca.F(),"click",function(){C();k.ab.Fh()})}function d(){k.ua=new Gh(new Hh);V.G(k.ua,{cssClassDeep:"smallnotebooktype"});k.D.listener(k.ua.F(),"mousedown",function(a){ca();return X(a)});gb(k.ua,"showNotebookSheet");k.ua.fa=function(a){null!=a.type&&(E(k.ua.P().gb(),a.type),!1===a.showDropdownArrow?(E(k.ua.P().F(),"disabled"),
E(k.ua.P().F(),"en-ui-toolkit-prevent-click")):(H(k.ua.P().F(),"disabled"),H(k.ua.P().F(),"en-ui-toolkit-prevent-click")),null!=a.name&&k.ua.F().setAttribute("title",a.name))};k.ua.fa(Ba.notebookInfo);k.Sb=new Nh;V.G(k.Sb,{action:function(a){Z.execCommand("fontname",a.target.value)},cssClassDeep:"fontfamily"});k.Tb=new Nh;V.G(k.Tb,{action:function(a){Z.execCommand("fontsize",a.target.value)},cssClassDeep:"fontsize"});k.Sb.fa=function(a){a=a.map(function(a){return u(a)||ha(a)?{value:""+a}:a});a.forEach(k.Sb.Dc);
k.Sb.we(a)};k.Tb.fa=function(a){a=a.map(function(a){return u(a)||ha(a)?{value:""+a}:a});a.forEach(k.Tb.Dc);k.Tb.we(a)};qa.fontFamilies=function(a){k.Sb.fa(a)};qa.fontSizes=function(a){k.Tb.fa(a)};k.Ac=new Mh;V.G(k.Ac,{execCommand:"bold",cssClassDeep:"bold",tooltipLocalizationKey:"bold"});k.Mc=new Mh;V.G(k.Mc,{execCommand:"italic",cssClassDeep:"italic",tooltipLocalizationKey:"italic"});k.Vc=new Mh;V.G(k.Vc,{execCommand:"underline",cssClassDeep:"underline",tooltipLocalizationKey:"underline"});k.ob=
new Mh;V.G(k.ob,{execCommand:"insertorderedlist",cssClassDeep:"orderedlist",tooltipLocalizationKey:"applyOrderedList"});k.ac=new Mh;V.G(k.ac,{execCommand:"insertunorderedlist",cssClassDeep:"unorderedlist",tooltipLocalizationKey:"applyUnorderedList"});l();h();k.Gc=new Mh;V.G(k.Gc,{execCommand:"highlight",cssClassDeep:"highlight",tooltipLocalizationKey:"highlight"});k.cd=new Mh;V.G(k.cd,{cssClassDeep:"table",tooltipLocalizationKey:"insertTable",postBoundingBoxNotification:{click:"showTableSizePicker"}});
qa.tableSizePickerClosed=function(){H(k.cd.gb(),"active")};k.fe=new Mh;V.G(k.fe,{execCommand:"inserttodo",cssClassDeep:"todo",tooltipLocalizationKey:"insertTodo"});k.Ud=new Mh;V.G(k.Ud,{execCommand:"inserthorizontalrule",cssClassDeep:"horizontalrule",tooltipLocalizationKey:"insertHorizontalRule"});k.De=new Mh;V.G(k.De,{cssClassDeep:"attachment",tooltipLocalizationKey:"attachFile",track:{click:{category:"note",action:"note_editor_action",label:"attachment"}},postBoundingBoxNotification:{click:"attachmentRequested"}});
k.Te=new Mh;V.G(k.Te,{cssClassDeep:"microphone",tooltipLocalizationKey:"recordAudio",track:{click:{category:"note",action:"note_editor_action",label:"audio_note"}},postBoundingBoxNotification:{click:"microphoneRequested"}});k.Fe=new Mh;V.G(k.Fe,{cssClassDeep:"camera",tooltipLocalizationKey:"takeSnapshot",track:{click:{category:"note",action:"note_editor_action",label:"snapshot"}},postBoundingBoxNotification:{click:"cameraRequested"}});k.Qc=new Mh;V.G(k.Qc,{cssClassDeep:"overflowdropdown",click:n()})}
function e(){k.Ld=new Qh;V.G(k.Ld);qa.presence=k.Ld.fa;k.D.listener(k.Ld.F(),"mousedown",function(a){ca();return X(a)});k.I=new Gh(new Hh);V.G(k.I,{cssClassDeep:"publiclink"});k.I.href=null;k.I.dblClickRef=null;k.I.clickRef=null;k.D.listener(k.I.F(),"mousedown",function(a){ca();return X(a)});k.I.je=function(){return!D(k.I.F(),"en-ui-toolkit-display-none")};k.I.Nb=function(){return 26};k.I.ie=function(){return D(k.I.F(),"en-ui-toolkit-display-none")};k.I.R=function(){if(!k.I.je())return{didShrink:!1,
shrunkBy:0};vh(k.I);return{didShrink:!0,shrunkBy:k.I.Nb()}};k.I.expand=function(a){console.log(a);if(!k.I.ie()||a<k.I.Nb())return{didExpand:!1,expandedBy:0};xh(k.I);return{didExpand:!0,expandedBy:k.I.Nb()}};k.I.Gf=function(){vh(k.I)};k.I.fa=function(a){k.I.href=a.href;k.I.Gf()};qa.publicLink=function(a){k.I.fa(a)};gb(k.I,"publicLinkClicked");k.ga=new Gh(new Jh);V.G(k.ga,{cssClassDeep:"workchattedwith"});gb(k.ga,"showWorkChattedList");k.ga.qc=!0;k.ga.fa=function(a){0===a.num?vh(k.ga):(xh(k.ga),k.ga.P().ta(a.num));
k.ga.qc||(E(k.ga.P().F(),"highlighted"),k.D.timeout(function(){H(k.ga.P().F(),"highlighted")},1E3));k.ga.qc&&(k.ga.qc=!1)};k.D.listener(k.ga.F(),"mousedown",function(a){ca();return X(a)});qa.workChattedWith=function(a){k.ga.fa(a)};k.na=new Gh(new Jh);V.G(k.na,{cssClassDeep:"sharedwith"});gb(k.na,"showSharedList");k.na.qc=!0;k.D.listener(k.na.F(),"mousedown",function(a){ca();return X(a)});k.na.fa=function(a){0===a.num?vh(k.na):(xh(k.na),k.na.P().ta(a.num));k.L.qc||(E(k.na.P().F(),"highlighted"),k.D.timeout(function(){H(k.na.P().F(),
"highlighted")},1E3));k.na.qc&&(k.na.qc=!1)};qa.sharedWith=function(a){k.na.fa(a)};g()}function f(){m();k.Uc=new Mh;V.G(k.Uc,{cssClassDeep:"presentation",tooltipLocalizationKey:"showFullScreenPresentation",track:{click:{category:"note",action:"note_action",label:"presentation"}},postBoundingBoxNotification:{click:"presentationRequested"},getState:function(){return 0===Ba.note.active||!0===Ba.note.deleted?"disabled":"normal"}});k.Zd=new Mh;V.G(k.Zd,{cssClassDeep:"info",tooltipLocalizationKey:"noteInfo",
track:{click:{category:"note",action:"note_action",label:"note_info"}},postBoundingBoxNotification:{click:"showNoteInfo"}});qa.noteInfo=function(a){a.requestPosition&&cf(k.Zd.F(),"noteInfoPosition")};k.Se=new Mh;V.G(k.Se,{cssClassDeep:"annotation",tooltipLocalizationKey:"annotateNote",track:{click:{category:"note",action:"note_action",label:"markup"}},postBoundingBoxNotification:{click:"annotationRequested"}});k.yc=new Mh;V.G(k.yc,{cssClassDeep:"delete",tooltipLocalizationKey:"moveNoteToTrash",track:{click:{category:"note",
action:"note_action",label:"delete"}},postBoundingBoxNotification:{click:"noteDeleteRequested"},getState:function(){return 0===Ba.note.active||!0===Ba.note.deleted||!0===Ba.noteLocked.readOnly&&!1===Ba.note.isLocal?"disabled":"normal"}});k.Uc.la();k.yc.la()}function g(){k.L=new Gh(new Jh);V.G(k.L,{cssClassDeep:"share",core:{packContentFirst:!0}});k.L.kf=["normal","en-ui-toolkit-disable-click","disabled"];k.L.la=function(){var a=k.L.F(),b=k.L.P().Ka().F(),c=k.L.P().gb();k.L.kf.forEach(function(d){H(a,
d);H(b,d);H(c,d)});!0===Ba.note.isLocal||0===Ba.note.active||!0===Ba.note.deleted?(E(a,"en-ui-toolkit-prevent-click"),E(b,"disabled"),E(c,"disabled")):E(a,"normal")};k.L.la();k.D.listener(k.L.F(),"mousedown",function(a){ca();return X(a)});k.L.N=k.L.P().Ka().F();k.L.L=k.L.P().Lc().F();k.D.listener(k.L.L,"mousedown",function(a){E(k.L.P().Lc().F(),"active");xa(a,"showShareDropdownMenu")});gb(k.L.N,"showShareDialog");k.L.tc=function(a){k.L.P().ta(a.shareButton)};k.D.listener(k.L.F(),"click",function(){kf({category:"note",
action:"note_action",label:"share"})});qa.shareDropDownMenuClosed=function(){H(k.L.P().Lc().F(),"active")}}function h(){k.V=new Gh(new Hh);var a=/(\.st0\s*\{\s*fill:)(.*?)(;\})/,b=/(\.st1\s*\{\s*fill:)(.*?)(;\})/,c='url(\'data:image/svg+xml;utf8,<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 12 12" style="enable-background:new 0 0 12 12;" xml:space="preserve"><style type="text/css">.st0{fill:'+db.normal+';}.st1{fill:#000000;}</style><path id="XMLID_3_" class="st0" d="M7,8L7,8c0,0,0-0.3,0-0.8C6.5,7.6,5.8,8,5,8C3.9,8,3,7.1,3,6s0.9-2,2-2c0.2,0,2,0,2,0s0-0.4,0-0.5C7,2.7,6.3,2,5.5,2C5,2,4.5,2.3,4.2,2.7l-1-0.3C3.7,1.6,4.5,1,5.5,1C6.9,1,8,2.1,8,3.5C8,4,8,8,8,8l0,0H7L7,8z M7,5c0,0-1.4,0-2,0S4,5.4,4,6s0.4,1,1,1C6,7,7,6,7,5L7,5z"/><rect x="2" y="9" class="st1" width="7" height="3"/></svg>\')',
d=!1;V.G(k.V,{cssClassDeep:"color"});k.V.Gd="color";k.D.listener(k.V.F(),"mousedown",function(a){ca();return X(a)});k.D.H("foreColorChanged",function(a){k.V.setStrokeColor(a.color)});gb(k.V,"showColorPicker");k.D.listener(k.V.F(),"mousedown",function(){d=!0;k.V.yf(db.active)});k.D.listener(k.V.F(),"mouseleave",function(){d&&(k.V.yf(db.normal),d=!1)});k.V.yf=function(b){b||(b=db.normal);var d=k.V.P().gb();b=(d.style.backgroundImage||c).replace(a,"$1"+b+"$3");d.style.backgroundImage=b};k.V.setStrokeColor=
function(a){a||(a="#000000");var d=k.V.P().gb();a=(d.style.backgroundImage||c).replace(b,"$1"+a+"$3");d.style.backgroundImage=a};k.V.yf(db.normal);k.V.setStrokeColor("#000000")}function l(){k.N=new Nh;k.N.Kb=["alignleft","aligncenter","alignright","alignjustify"];var a=["align-left","align-center","align-right","align-justify"],b={"align-left":k.N.Kb[0],"align-center":k.N.Kb[1],"align-right":k.N.Kb[2],"align-justify":k.N.Kb[3]},c={"align-left":"justifyleft","align-center":"justifycenter","align-right":"justifyright",
"align-justify":"justifyfull"},d={"align-left":"alignLeft","align-center":"alignCenter","align-right":"alignRight","align-justify":"alignJustify"};V.G(k.N,{cssClassDeep:"textalign",action:function(a){var d=a.target,e=b[a.target.value];D(d,e)||(Object.keys(b).forEach(function(a){H(d,b[a])}),E(d,e));Z.execCommand(c[a.target.value])}});k.N.Gd="changeTextAlignment";k.N.bi=function(a){var b=k.N.hb();k.N.Kb.forEach(function(a){H(b,a)});E(b,a)};k.N.fa=function(a){a.forEach(k.N.Dc);k.N.we(a)};k.N.tc=function(b){var c=
a.map(function(a){return{value:a,text:b[d[a]]}});k.N.fa(c)}}function m(){k.A=new Gh(new Jh);V.G(k.A,{cssClassDeep:"reminder"});k.A.ma=null;k.A.kf=["normal","highlighted","struck-thru","disabled","en-ui-toolkit-prevent-click"];k.A.la=function(){var a=k.A.P().F();k.A.kf.forEach(function(b){H(a,b)});!0===k.Lg?(E(a,"disabled"),E(a,"en-ui-toolkit-prevent-click")):"set"===k.A.ma.status?E(a,"highlighted"):"cleared"===k.A.ma.status?E(a,"normal"):"done"===k.A.ma.status&&(E(a,"normal"),E(a,"struck-thru"))};
k.A.ma=null;k.A.$a=[];k.A.Mh=null;k.A.gg=null;k.A.mf=null;k.A.tc=function(a){k.A.P().gb().setAttribute("title",a.addReminderToNote);k.A.mf=a.markReminderDone};k.A.Gf=function(){var a=k.A.ma;if("set"===a.status){null==a.date||sb(a.date)?(k.A.P().ta(""),vh(k.A.P().Ka())):(k.A.P().ta(a.date),xh(k.A.P().Ka()));k.A.$a.forEach(k.D.remove);var b=k.D.listener(k.A.P().Ka().F(),"mouseenter",function(){k.A.P().ta(k.A.mf)});k.A.$a.push(b);b=k.A.gg=k.D.listener(k.A.P().Ka().F(),"mouseleave",function(){k.A.P().ta(a.date)});
k.A.$a.push(b)}else"cleared"===a.status?(k.A.P().ta(""),vh(k.A.P().Ka()),k.A.$a.forEach(k.D.remove),b=k.A.gg=k.D.listener(k.A.P().Ka().F(),"mouseenter",function(){k.A.P().ta(k.A.mf)}),k.A.$a.push(b),b=k.A.Mh=k.D.listener(k.A.P().Ka().F(),"mouseleave",function(){k.A.P().ta(a.date)}),k.A.$a.push(b)):"done"===a.status&&(null==a.date||sb(a.date)?(k.A.P().ta(""),vh(k.A.P().Ka())):(k.A.P().ta(a.date),xh(k.A.P().Ka())),k.A.$a.forEach(k.D.remove))};k.A.fa=function(a){k.A.ma=a;k.A.la();k.A.Gf()};k.D.listener(k.A.P().F(),
"click",function(){kf({category:"note",action:"note_action",label:"reminder"})});gb(k.A.P().Lc(),"showReminderSettings");gb(k.A.P().Ka(),"reminderTextClicked");k.D.listener(k.A.F(),"mousedown",function(a){ca();return X(a)});qa.reminder=function(a){k.A.fa(a)}}function p(){k.pb=new Dh;k.qb=new Dh;k.C=new Dh;k.bb=new Dh;k.rb=new Dh;var a=[k.pb,k.qb,k.C,k.bb,k.rb];a.forEach(function(a){V.G(a)});E(k.pb.F(),"en-toolbar-widgetgroup1");E(k.qb.F(),"en-toolbar-widgetgroup2");E(k.C.F(),"en-toolbar-widgetgroup3");
E(k.bb.F(),"en-toolbar-widgetgroup4");E(k.rb.F(),"en-toolbar-widgetgroup5");a.forEach(function(a){E(a.F(),"en-toolbar-widgetgroup")})}function r(){var a;k.R=[];for(a=0;8>a;a++)k.R.push(new Gh(new Hh)),V.G(k.R[a],{cssClassDeep:"divider"})}function n(){function a(){var d=k.D.listener(window,"keyup",function(a){27===a.keyCode&&("select"===L(document.activeElement)?ca(!0):(b(),k.J.Ib()))}),e=k.D.listener(window,"resize",function(){b();k.J.Ib()}),f=k.D.listener(window,"blur",function(){b();k.J.Ib()});
c.push(d);c.push(e);c.push(f)}function b(){c.forEach(function(a){k.D.remove(a)})}var c=[];return function(){if(k.J.va())b(),k.J.Ib();else{var c;c=k.J.F().clientWidth;c=Fb()-35-c;0>=c&&(c=10);c={left:c};k.J.ue(c);var d=N(k.Qc.P().F());k.J.te({left:Math.abs(d.left+d.width/4-c.left)});c=N(k.J.Zf().F());null!=c&&(k.J.$f().F().style.width=c.width+"px");k.J.show();a()}}}function q(a){1200<a.width?Y():ga();k.ab.zh().ug()}function y(a){!0===a.focus?(k.C.mg(k.ca,k.R[0]),vh(k.bb),vh(k.rb),xh(k.C),xh(k.R[6]),
xh(k.R[7])):!1===a.focus?(C(),k.J.Ib()):z(!1,"toolbarPlugin notif: Neither true nor false.","Has the CE focus changed notification API changed?")}function t(){var a={inserthorizontalrule:[k.Ud],inserttable:[k.cd],inserttodo:[k.fe],insertunorderedlist:[k.ac,k.ob],justifyleft:[k.N]},b={bold:k.Ac,highlight:k.Gc,italic:k.Mc,underline:k.Vc},c={left:k.N.Kb[0],center:k.N.Kb[1],right:k.N.Kb[2],justify:k.N.Kb[3]},d={left:"align-left",center:"align-center",right:"align-right",justify:"align-justify"};return function(e){var f=
e.enabled,g=e.state;e=e.value;Object.keys(f).forEach(function(b){var c=f[b];null!=a[b]&&a[b].forEach(function(a){a.la&&(!0===c?a.la("normal"):a.la("disabled"))})});Object.keys(g).forEach(function(a){var c=g[a];a=b[a];null!=a&&(!0===c?a.la("highlighted"):a.la("normal"))});k.Sb.wg(e.fontname);k.Tb.wg(e.fontsize,function(a,b){return parseInt(a,10)-parseInt(b,10)});k.V.setStrokeColor(e.forecolor);"none"===e.insertunorderedlist?(k.ob.yd("highlighted"),k.ac.yd("highlighted")):"ul"===e.insertunorderedlist?
(k.ac.la("highlighted"),k.ob.yd("highlighted")):"ol"===e.insertunorderedlist&&(k.ob.la("highlighted"),k.ac.yd("highlighted"));null!=e.justifyleft&&""!==e.justifyleft&&"none"!==e.justifyleft&&(k.N.bi(c[e.justifyleft]),k.N.yg(d[e.justifyleft]))}}function A(a){ob(Ba.note,a);k.L.la();k.yc.la();k.ca.la();k.Uc.la();k.A.la()}function G(a){k.Lg=a.readOnly;k.ca.la();k.A.la();k.Uc.la();k.yc.la()}function C(){vh(k.C);k.bb.mg(k.ca,k.$);xh(k.bb);xh(k.rb);xh(k.R[6]);xh(k.R[7])}function x(a){F(a.width,a.greater)}
function F(a,b){var c=Object.keys(zb).map(function(a){return parseInt(a,10)}),c=c.filter(function(c){return b?c<a:c>=a}).sort(function(a,c){return b?a-c:c-a});c.forEach(function(a){b?zb[a.toString()].greater():zb[a.toString()].lesser()});k.J.vg()}function ga(){H(k.Ya.F(),"wide");k.Ub.md().T(k.C);k.Ub.md().T(k.bb);k.Ub.$e().T(k.rb);xh(k.Ub)}function Y(){E(k.Ya.F(),"wide");vh(k.Ub);k.Ya.md().T(k.C);k.Ya.md().T(k.bb);k.Ya.$e().ha(k.rb)}function Aa(){var a=[],b=M("div",{"class":"en-toolbar-bars-underlay"});
k.Da.F().appendChild(b);k.D.listener(k.Da.F(),"contextmenu",function(b){if(!a.some(function(a){return D(b.target,a)}))return X(b)},{capture:!0});k.D.listener(k.Da.F(),"mousedown",function(a){if(2===a.button)return X(a)});k.D.listener(b,"mousedown",function(a){if(2===a.button)return X(a);ca();return X(a)})}function ca(a){a&&document.querySelector("#en-note").focus();Z.queryCommandState("content.focus")?Z.execCommand("content.focus"):Z.queryCommandState("title.focus")&&Z.execCommand("title.focus")}
function xa(a,b){af(b,{left:a.clientX,top:a.clientY})}function cb(a,b){function c(a,b){a.greater=b>a.breakpoint;a.width=b}var d=fa(a)?a:[a],e=[],f,g=null;for(f=0;f<d.length;f++)e[f]={},e[f].breakpoint=d[f],c(e[f],Fb());this.start=function(){return g=k.D.listener(window,"resize",function(){var a,f=Fb();for(a=0;a<d.length;a++){var g=JSON.parse(JSON.stringify(e[a]));c(e[a],f);e[a].greater!==g.greater&&(fa(b)?b[a](e[a],g):b(e[a],g))}})}}z(this instanceof Uh,"toolbar plugin: use `new` to instantiate");
var k=this;k.name="toolbar";var qa={},db={},V=null,Ba=null;db.normal="#787878";db.active="#444444";db.highlighted="#0888e9";db.disabled="#d8d8d8";E(document.body,"en-feature-toolbar");var ec={notebookInfo:{type:null,name:"",showDropdownArrow:!0,showJumperArrow:!1},fontFamilies:"Andale Mono;Arial;Arial Black;Brush Script MT;Comic Sans MS;Courier New;Georgia;Helvetica Neue;Impact;Times New Roman;Trebuchet;Verdana".split(";"),fontSizes:"9 10 11 12 13 14 18 24 36 48 64 72".split(" "),publicLink:{href:null},
noteSourceMetadata:{text:null,href:null},lastSaved:{savedDate:null},readOnly:{},noteLocked:{readOnly:!0},note:{isLocal:!1},reminder:{status:"done",date:null},sharedWith:{num:0},workChattedWith:{num:0},tags:{clampedList:[],num:0},presence:{clampedList:[],num:0},localizations:{alignLeft:"Align Left",alignCenter:"Center",alignRight:"Align Right",alignJustify:"Justify",bold:"Bold",italic:"Italic",underline:"Underline",highlight:"Highlight",color:"Color",applyUnorderedList:"Apply or remove bulleted list",
applyOrderedList:"Apply or remove numbered list",insertTodo:"Insert To-do",insertHorizontalRule:"Insert horizontal rule",changeTextAlignment:"Change text alignment",insertTable:"Insert table",recordAudio:"Record Audio",takeSnapshot:"Take Snapshot",attachFile:"Attach File",tagsPlaceholder:"click to add tags",addReminderToNote:"Add a reminder to this note",markReminderDone:"DONE",showFullScreenPresentation:"Show your note in full-screen Presentation Mode",annotateNote:"Annotate this note",noteInfo:"Note info",
moveNoteToTrash:"Move note to trash",shareButton:"Share"}},Fb=function(a){null!=a&&null!=a.clientWidth||Ia("width w/o scrollbars:",a,"has no clientWidth property");return a.clientWidth}.bind(null,document.querySelector("html")),gb=function(a,b,c){b.F&&(b=b.F());return k.D.listener(b,a,function(){cf(b,c)})}.bind(null,"click");(function(a,b,c){b.F&&(b=b.F());return k.D.listener(b,a,function(a){xa(a,c)})}).bind(null,"click");var zb={695:{greater:function(){k.C.Ba(k.Te);k.C.Ba(k.Fe);k.Ea.T(k.Qc)},lesser:function(){k.J.ha(k.Fe);
k.J.ha(k.Te);k.C.T(k.Qc)}},668:{greater:function(){k.C.Ba(k.De)},lesser:function(){k.J.ha(k.De)}},645:{greater:function(){k.C.Ba(k.Ud)},lesser:function(){k.J.ha(k.Ud)}},620:{greater:function(){k.C.Ba(k.cd)},lesser:function(){k.J.ha(k.cd)}},597:{greater:function(){k.N.hb().style.paddingRight="";k.C.Ba(k.R[5]);k.C.Ba(k.fe)},lesser:function(){k.J.ha(k.fe);k.Ea.ha(k.R[5]);k.N.hb().style.paddingRight="28px"}},560:{greater:function(){k.Ea.ha(k.R[5]);k.C.Ba(k.N)},lesser:function(){k.J.ha(k.R[5]);k.J.ha(k.N)}},
520:{greater:function(){k.C.Ba(k.ac)},lesser:function(){k.J.ha(k.ac)}},500:{greater:function(){k.C.Ba(k.R[4]);k.C.Ba(k.ob)},lesser:function(){k.Ea.ha(k.R[4]);k.J.ha(k.ob)}},470:{greater:function(){k.Ea.ha(k.R[4]);k.C.Ba(k.Gc)},lesser:function(){k.J.ha(k.R[4]);k.J.ha(k.Gc)}},440:{greater:function(){k.C.Ba(k.V)},lesser:function(){k.J.ha(k.V)}},420:{greater:function(){k.C.Ba(k.Vc)},lesser:function(){k.J.ha(k.Vc)}},395:{greater:function(){k.C.Ba(k.Mc)},lesser:function(){k.J.ha(k.Mc)}},369:{greater:function(){k.Ea.ha(k.R[3]);
k.C.Ba(k.R[3]);k.C.Ba(k.Ac)},lesser:function(){k.Ea.ha(k.R[3]);k.J.ha(k.Ac)}}};k.G=function(g){function h(a,b){var c=!1;mb(a,function(a,d){var e=qa[a];e?(e(d),c=!0):b&&Ia("Toolbar: Unknown property",a,"with content",d)});return c}Ba=B(g,ec);V=k.da();k.D.ad({Hb:["toolbar"],cc:!1});qa.localizations=function(a){var b=k.da().A();b.filter(function(a){return!!a.tc}).forEach(function(b){b.tc(a)});b.forEach(function(b){null!=b.Gd&&null!=a[b.Gd]&&b.F().setAttribute("title",a[b.Gd])})};k.Da=new Dh;k.qd=new Dh;
k.Ya=new Fh;k.Ub=new Fh;k.Ee=new Dh;k.J=new Eh;k.Ea=new Dh;V.G(k.Da);V.G(k.qd);V.G(k.Ub);V.G(k.Ya);V.G(k.Ee);V.G(k.J,{cssClassDeep:"edit",hasArrow:!0});V.G(k.Ea);E(k.Da.F(),"en-toolbar");E(k.qd.F(),"en-toolbar-bars");E(k.Ya.F(),"en-toolbar-actionbar");E(k.Ub.F(),"en-toolbar-formattingbar");E(k.Ee.F(),"en-toolbar-borderbottom");E(k.J.F(),"en-toolbar-editingoverflowbox");E(k.Ea.F(),"en-toolbar-tempholderbox");vh(k.Ea);p();r();f();e();d();c();b();a();g=t();C();zh(k.J);Aa();k.D.H("noteReadOnlyStateChanged",
G);k.D.H("noteInfoChanged",A);k.D.H("styleChanged",g);k.D.H("focusChanged",y);(new cb(1200,q)).start();(new cb(Object.keys(zb).map(function(a){return parseInt(a,10)}),x)).start();var l={reminder:k.A.F,reminderIcon:k.A.P().Lc().F,reminderText:k.A.P().Ka().F,presentation:k.Uc.F,markup:k.Se.F,noteInfo:k.Zd.F,"delete":k.yc.F,presence:k.Ld.F,publicLink:k.I.F,workChatted:k.ga.F,sharedWith:k.na.F,share:k.L.F,shareText:k.L.P().Ka().F,shareDropdownIcon:k.L.P().Lc().F,smallNotebook:k.ua.F,smallTags:k.ca.F,
fontFamily:k.Sb.F,fontSize:k.Tb.F,bold:k.Ac.F,italic:k.Mc.F,underline:k.Vc.F,color:k.V.F,highlight:k.Gc.F,orderedList:k.ob.F,unorderedlist:k.ac.F,detailedNotebook:k.$.F,tagsField:k.ab.F,noteSource:k.qa.F,lastUpdated:k.Oc.F,lock:k.Xb.F,formattingBarOverflow:k.Qc.F};qa.requestPosition=function(a){var b={};a=a.value;b.buttonName=a;b.box=null;null!=l[a]&&(a=l[a](),b.box=N(a,!0));af("toolbarButtonPosition",b)};k.D.B({name:k.name,action:function(a){return(a=Pb(a))?h(a,!0):!1},enabled:Ma});h(Ba);G(Ba.noteLocked);
k.ab.Af();E(k.Da.F(),"fixed")};k.S=function(){db=qa=V=Ba=null}};var Z={},Vh=null,Wh=null;Z.ra=!1;
Z.G=function(a){!0===Z.ra&&Z.S();return Cb(function(){a=B(a);nf=new Mb;sf(a);of=Vh=new yf({B:nf,K:a,uid:(new Date).getTime()});Wh=new xf;Wh.G({name:"document"});var b,c;a.template?(b=new Fg,c=a.template):a.rte&&(b=new sh,c=a.rte);b?(Vh.G(b,c),Wh.B({name:"bounds",enabled:Ma,value:function(){var a=N(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)}})):v.error('Settings for "rte" or "template" are obligatory!');
null!=a.title&&(Vh.G(new kg,a.title),Wh.H("titlechanged",function(a){bf("title",{blur:!0===a.blur})}));null!=a.shared&&Vh.G(new Df,a.shared);null!=a.context&&Vh.G(new Ef,a.context);null!=a["context-upsell"]&&Vh.G(new Ff,a["context-upsell"]);null!=a["context-info"]&&Vh.G(new Gf,a["context-info"]);null!=a.find&&Vh.G(new Hf,a.find);null!=a.keyboard&&Vh.G(new If,a.keyboard);a.toolbar&&(a.toolbar=a.toolbar||{},a.toolbar=ob(a.toolbar,{noteLocked:{readOnly:!(a.rte&&a.rte.active)},note:{active:a.note&&a.note.active,
isLocal:a.note&&a.note.isLocal,isTagsReadOnly:a.note&&a.note.isTagsReadOnly}},!0),Vh.G(new Uh,a.toolbar));a.analytics&&Vh.G(new mf,a.analytics);Wh.B({name:"note",action:function(a){var b=Yd;a=Pb(a);if(!lb(a)||!lb(b))return!1;b.note||(b.note={});ob(b.note,a);Nb("noteInfoChanged",b.note);return!0},value:function(a){var b=Yd;if(!lb(b))return null;b=b.note;return lb(b)?u(a)?b[a]:b:{}},enabled:Ma});Wh.B({name:"env",action:function(a){var b=Yd;if(!lb(a)||!lb(b))return!1;b.env||(b.env={});ob(b.env,a);return!0},
value:function(a){var b=Yd;if(!lb(b))return null;b=b.env;return lb(b)?u(a)?b[a]:b:{}},enabled:Ma});document.body.setAttribute("data-en-lang",qb());return Z.ra=!0})};Z.S=function(){!0!==Z.ra?v.error("Someone tried to call cleanup before setup!"):(Cb(function(){nf.Gg();Vh.C();Vh=null;Wh.S();of=nf=null;Rb.C();Yd={}}),Z.ra=!1)};Z.execCommand=function(a,b,c){z(Z.ra,"Calling EN.setup before using commands is required");return Cb(function(){a=a.toLowerCase();return nf.action(a,b,c)||!1})};
Z.queryCommandState=function(a,b,c){z(Z.ra,"Calling EN.setup before using commands is required");return Cb(function(){a=a.toLowerCase();return nf.state(a,b,c)||!1})};Z.queryCommandValue=function(a,b,c){z(Z.ra,"Calling EN.setup before using commands is required");return Cb(function(){a=a.toLowerCase();return nf.value(a,b,c)||""})};Z.queryCommandEnabled=function(a,b,c){z(Z.ra,"Calling EN.setup before using commands is required");return Cb(function(){a=a.toLowerCase();return nf.enabled(a,b,c)||!1})};ja("EN.setup",Z.G);ja("EN.cleanup",Z.S);ja("EN.execCommand",Z.execCommand);ja("EN.queryCommandState",Z.queryCommandState);ja("EN.queryCommandValue",Z.queryCommandValue);ja("EN.queryCommandEnabled",Z.queryCommandEnabled);ja("EN.registerModuleScript",function(a){Nb("moduleScript",a)});ja("EN.registerModuleLocalization",function(a,b,c){Nb("moduleLocalization",{moduleName:a,tableName:b,stringMap:c})});ja("EN.getLastBuildNumber",la);ja("EN.getLastCommitDate",ma);ja("EN.isCompiled",function(){return!0});ja("EN.enablePrint",th);ja("EN.disablePrint",uh); }).call(window); window.enLoadState = 'didLoad'; }
catch(ex) { window.enLoadState = "Exception: " + ex.toString() + '\n' + ex.stack + ''; }

