Adds extra features to the original Markdown syntax.
\n"+i+"\n
","\n\n"+i+"\n\n"+r}),e=e.replace(/~0/,"")}function v(e){return e=e.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(O.push(e)-1)+"K\n\n"}function b(e){return e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,t,n,i){var r=i;return r=r.replace(/^([ \t]*)/g,""),r=r.replace(/[ \t]*$/g,""),r=y(r),r=r.replace(/:\/\//g,"~P"),t+""+r+"
"})}function y(e){return e=e.replace(/&/g,"&"),e=e.replace(//g,">"),e=L(e,"*_{}[]\\",!1)}function x(e){return e=e.replace(/([\W_]|^)(\*\*|__)(?=\S)([^\r]*?\S[\*_]*)\2([\W_]|$)/g,"$1$3$4"),e=e.replace(/([\W_]|^)(\*|_)(?=\S)([^\r\*_]*?\S)\2([\W_]|$)/g,"$1$3$4")}function w(e){return e=e.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(e,t){var n=t;return n=n.replace(/^[ \t]*>[ \t]?/gm,"~0"),n=n.replace(/~0/g,""),n=n.replace(/^[ \t]+$/gm,""),n=o(n),n=n.replace(/(^|\n)/g,"$1 "),n=n.replace(/(\s*[^\r]+?<\/pre>)/gm,function(e,t){var n=t;return n=n.replace(/^ /gm,"~0"),n=n.replace(/~0/g,"")}),v("\n"+n+"\n")})}function S(e,t){e=e.replace(/^\n+/g,""),e=e.replace(/\n+$/g,"");for(var n=e.split(/\n{2,}/g),i=[],r=/~K(\d+)K/,o=n.length,s=0;o>s;s++){var l=n[s];r.test(l)?i.push(l):/\S/.test(l)&&(l=a(l),l=l.replace(/^([ \t]*)/g,""),l+="
",i.push(l))}if(!t){o=i.length;for(var s=0;o>s;s++)for(var c=!0;c;)c=!1,i[s]=i[s].replace(/~K(\d+)K/g,function(e,t){return c=!0,O[t]})}return i.join("\n\n")}function C(e){return e=e.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"),e=e.replace(/<(?![a-z\/?!]|~D)/gi,"<")}function T(e){return e=e.replace(/\\(\\)/g,M),e=e.replace(/\\([`*_{}\[\]()>#+-.!])/g,M)}function E(e,t,n,i){if(t)return e;if(")"!==i.charAt(i.length-1))return"<"+n+i+">";for(var r=i.match(/[()]/g),o=0,a=0;a=o?o=1:o++:o--;var s="";if(0>o){var l=new RegExp("\\){1,"+-o+"}$");i=i.replace(l,function(e){return s=e,""})}if(s){var c=i.charAt(i.length-1);U.test(c)||(s=c+s,i=i.substr(0,i.length-1))}return"<"+n+i+">"+s}function k(e){e=e.replace(H,E);var t=function(e,t){return''+R.plainLinkText(t)+""};return e=e.replace(/<((https?|ftp):[^'">\s]+)>/gi,t)}function _(e){return e=e.replace(/~E(\d+)E/g,function(e,t){var n=parseInt(t);return String.fromCharCode(n)})}function I(e){return e=e.replace(/^(\t|[ ]{1,4})/gm,"~0"),e=e.replace(/~0/g,"")}function D(e){if(!/\t/.test(e))return e;var t,n=[" "," "," "," "],i=0;return e.replace(/[\n\t]/g,function(e,r){return"\n"===e?(i=r+1,e):(t=(r-i)%4,i=r+1,n[t])})}function N(e){if(!e)return"";e.length;return e.replace(z,function(e){return"~D"==e?"%24":":"==e?":":"%"+e.charCodeAt(0).toString(16)})}function L(e,t,n){var i="(["+t.replace(/([\[\]\\])/g,"\\$1")+"])";n&&(i="\\\\"+i);var r=new RegExp(i,"g");return e=e.replace(r,M)}function M(e,t){var n=t.charCodeAt(0);return"~E"+n+"E"}var A={};this.setOptions=function(e){A=e};var R=this.hooks=new n;R.addNoop("plainLinkText"),R.addNoop("preConversion"),R.addNoop("postNormalization"),R.addNoop("preBlockGamut"),R.addNoop("postBlockGamut"),R.addNoop("preSpanGamut"),R.addNoop("postSpanGamut"),R.addNoop("postConversion");var P,F,O,B;this.makeHtml=function(n){if(P)throw new Error("Recursive call to converter.makeHtml");return P=new i,F=new i,O=[],B=0,n=R.preConversion(n),n=n.replace(/~/g,"~T"),n=n.replace(/\$/g,"~D"),n=n.replace(/\r\n/g,"\n"),n=n.replace(/\r/g,"\n"),n="\n\n"+n+"\n\n",n=D(n),n=n.replace(/^[ \t]+$/gm,""),n=R.postNormalization(n),n=t(n),n=e(n),n=o(n),n=_(n),n=n.replace(/~D/g,"$$"),n=n.replace(/~T/g,"~"),n=R.postConversion(n),O=F=P=null,n};var j=function(e){return o(e)},$={ol:"\\d+[.]",ul:"[*+-]"},G="[-A-Z0-9+&@#/%?=~_|[\\]()!:,.;]",q="[-A-Z0-9+&@#/%=~_|[\\])]",H=new RegExp('(="|<)?\\b(https?|ftp)(://'+G+"*"+q+")(?=$|\\W)","gi"),U=new RegExp(q,"i"),z=/(?:["'*()[\]:]|~D)/g}}(),define("libs/Markdown.Converter",function(){}),function(){function e(e){return e.replace(/^\s+|\s+$/g,"")}function t(e){return e.replace(/\s+$/g,"")}function n(e){return e.replace(new RegExp("^(\\t|[ ]{1,4})","gm"),"")}function i(e,t){return-1!=e.indexOf(t)}function r(e,t){return e.replace(/<[^>]*>?/gi,function(e){return e.match(t)?e:""})}function o(e,t){for(var n={},i=0;i ]*>|","<(br)\\s?\\/?>)$"].join(""),"i");Array.indexOf||(Array.prototype.indexOf=function(e){for(var t=0;t ~X"+(this.hashBlocks.push(e)-1)+"X\n"},Markdown.Extra.prototype.hashExtraInline=function(e){return"~X"+(this.hashBlocks.push(e)-1)+"X"},Markdown.Extra.prototype.unHashExtraBlocks=function(e){function t(){var i=!1;e=e.replace(/(?: )?~X(\d+)X(?:<\/p>)?/g,function(e,t){i=!0;var r=parseInt(t,10);return n.hashBlocks[r]}),i===!0&&t()}var n=this;return t(),e},Markdown.Extra.prototype.wrapHeaders=function(e){function t(e){return"\n"+e+"\n"}return e=e.replace(/^.+[ \t]*\n=+[ \t]*\n+/gm,t),e=e.replace(/^.+[ \t]*\n-+[ \t]*\n+/gm,t),e=e.replace(/^\#{1,6}[ \t]*.+?[ \t]*\#*\n+/gm,t)};var g="\\{[ \\t]*((?:[#.][-_:a-zA-Z0-9]+[ \\t]*)+)\\}",v=new RegExp("^(#{1,6}.*#{0,6})[ \\t]+"+g+"[ \\t]*(?:\\n|0x03)","gm"),b=new RegExp("^(.*)[ \\t]+"+g+"[ \\t]*\\n(?=[\\-|=]+\\s*(?:\\n|0x03))","gm"),y=new RegExp("^(```[ \\t]*[^{\\s]*)[ \\t]+"+g+"[ \\t]*\\n(?=([\\s\\S]*?)\\n```[ \\t]*(\\n|0x03))","gm");Markdown.Extra.prototype.hashHeaderAttributeBlocks=function(e){function t(e,t,i){return"
~XX"+(n.hashBlocks.push(i)-1)+"XX
\n"+t+"\n"}var n=this;return e=e.replace(v,t),e=e.replace(b,t)},Markdown.Extra.prototype.hashFcbAttributeBlocks=function(e){function t(e,t,i){return"~XX"+(n.hashBlocks.push(i)-1)+"XX
\n"+t+"\n"}var n=this;return e.replace(y,t)},Markdown.Extra.prototype.applyAttributeBlocks=function(e){var t=this,n=new RegExp('~XX(\\d+)XX
[\\s]*(?:<(h[1-6]|pre)(?: +class="(\\S+)")?(>[\\s\\S]*?\\2>))',"gm");return e=e.replace(n,function(e,n,i,r,a){if(!i)return"";for(var s=parseInt(n,10),l=t.hashBlocks[s],c=l.match(/#[^\s#.]+/g)||[],u=c[0]?' id="'+c[0].substr(1,c[0].length-1)+'"':"",d=l.match(/\.[^\s#.]+/g)||[],p=0;p0&&(f=' class="'+d.join(" ")+'"'),"<"+i+u+f+a})},Markdown.Extra.prototype.tables=function(t){function n(t,n,r,o){n=n.replace(/^ *[|]/m,""),r=r.replace(/^ *[|]/m,""),o=o.replace(/^ *[|]/gm,""),n=n.replace(/[|] *$/m,""),r=r.replace(/[|] *$/m,""),o=o.replace(/[|] *$/gm,""),alignspecs=r.split(/ *[|] */),align=[];for(var a=0;a \n","\n"," \n"].join("");for(a=0;u>a;a++){var f=l(e(c[a]),i);p+=[" \n\n";var h=o.split("\n");for(a=0;a",f," \n"].join("")}p+="v;v++)m.push("");for(p+=" \n",v=0;u>v;v++){var b=l(e(m[v]),i);p+=[" \n"}return p+="\n",i.hashExtraBlock(p)}var i=this,r=new RegExp(["^","[ ]{0,3}","[|]","(.+)\\n","[ ]{0,3}","[|]([ ]*[-:]+[-| :]*)\\n","(","(?:[ ]*[|].*\\n?)*",")","(?:\\n|$)"].join(""),"gm"),o=new RegExp(["^","[ ]{0,3}","(\\S.*[|].*)\\n","[ ]{0,3}","([-:]+[ ]*[|][-| :]*)\\n","(","(?:.*[|].*\\n?)*",")","(?:\\n|$)"].join(""),"gm");return t=t.replace(r,n),t=t.replace(o,n)},Markdown.Extra.prototype.stripFootnoteDefinitions=function(e){var t=this;return e=e.replace(/\n[ ]{0,3}\[\^(.+?)\]\:[ \t]*\n?([\s\S]*?)\n{1,2}((?=\n[ ]{0,3}\S)|$)/g,function(e,n,i){return n=f(n),i+="\n",i=i.replace(/^[ ]{0,3}/g,""),t.footnotes[n]=i,"\n"})},Markdown.Extra.prototype.doFootnotes=function(e){var t=this;if(t.isConvertingFootnote===!0)return e;var n=0;return e=e.replace(/\[\^(.+?)\]/g,function(e,i){var r=f(i),o=t.footnotes[r];if(void 0===o)return e;n++,t.usedFootnotes.push(r);var a=''+n+"";return t.hashExtraInline(a)})},Markdown.Extra.prototype.printFootnotes=function(e){var t=this; -if(0===t.usedFootnotes.length)return e;e+='\n\n",b," \n"].join("")}p+="\n"},Markdown.Extra.prototype.fencedCodeBlocks=function(e){function t(e){return e=e.replace(/&/g,"&"),e=e.replace(//g,">"),e=e.replace(/~D/g,"$$"),e=e.replace(/~T/g,"~")}var n=this;return e=e.replace(/(?:^|\n)```[ \t]*(\S*)[ \t]*\n([\s\S]*?)\n```[ \t]*(?=\n)/g,function(e,i,r){var o=i,a=r,s=n.googleCodePrettify?' class="prettyprint"':"",l="";o&&(l=n.googleCodePrettify||n.highlightJs?' class="language-'+o+'"':' class="'+o+'"');var c=["
\n\n\n';for(var n=0;n
\n'+o+' ↩\n\n'}return e+=" "].join("");return n.hashExtraBlock(c)})},Markdown.Extra.prototype.educatePants=function(e){var t=this,n="",i=0;e.replace(/(?:)|(<)([a-zA-Z1-6]+)([^\n]*?>)([\s\S]*?)(<\/\2>)/g,function(r,o,a,s,l,c,u){var d=e.substring(i,u);return n+=t.applyPants(d),t.smartyPantsLastChar=n.substring(n.length-1),i=u+r.length,o?(/code|kbd|pre|script|noscript|iframe|math|ins|del|pre/i.test(a)?t.smartyPantsLastChar=l.substring(l.length-1):l=t.educatePants(l),void(n+=o+a+s+l+c)):void(n+=r)});var r=e.substring(i);return n+=t.applyPants(r),t.smartyPantsLastChar=n.substring(n.length-1),n},Markdown.Extra.prototype.applyPants=function(e){return e=e.replace(/---/g,"—").replace(/--/g,"–"),e=e.replace(/\.\.\./g,"…").replace(/\.\s\.\s\./g,"…"),e=e.replace(/``/g,"“").replace(/''/g,"”"),/^'$/.test(e)?/\S/.test(this.smartyPantsLastChar)?"’":"‘":/^"$/.test(e)?/\S/.test(this.smartyPantsLastChar)?"”":"“":(e=e.replace(/^'(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/,"’"),e=e.replace(/^"(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/,"”"),e=e.replace(/"'(?=\w)/g,"“‘"),e=e.replace(/'"(?=\w)/g,"‘“"),e=e.replace(/'(?=\d{2}s)/g,"’"),e=e.replace(/(\s| |--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)'(?=\w)/g,"$1‘"),e=e.replace(/([^\s\[\{\(\-])'/g,"$1’"),e=e.replace(/'(?=\s|s\b)/g,"’"),e=e.replace(/'/g,"‘"),e=e.replace(/(\s| |--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)"(?=\w)/g,"$1“"),e=e.replace(/([^\s\[\{\(\-])"/g,"$1”"),e=e.replace(/"(?=\s)/g,"”"),e=e.replace(/"/gi,"“"))},Markdown.Extra.prototype.runSmartyPants=function(e){return this.smartyPantsLastChar="",e=this.educatePants(e),e=e.replace(/(<([a-zA-Z1-6]+)\b([^\n>]*?)(\/)?>)/g,h)},Markdown.Extra.prototype.definitionLists=function(t){var n=new RegExp(["(\\x02\\n?|\\n\\n)","(?:","(","(","[ ]{0,3}","((?:[ \\t]*\\S.*\\n)+)","\\n?","[ ]{0,3}:[ ]+",")","([\\s\\S]+?)","(","(?=\\0x03)","|","(?=","\\n{2,}","(?=\\S)","(?!","[ ]{0,3}","(?:\\S.*\\n)+?","\\n?","[ ]{0,3}:[ ]+",")","(?!","[ ]{0,3}:[ ]+",")",")",")",")",")"].join(""),"gm"),i=this;return t=a(t),t=t.replace(n,function(t,n,r){var o=e(i.processDefListItems(r));return o="",t(a),"
\n"+o+"\n
",n+i.hashExtraBlock(o)+"\n\n"}),s(t)},Markdown.Extra.prototype.processDefListItems=function(i){var r=this,o=new RegExp(["(\\x02\\n?|\\n\\n+)","(","[ ]{0,3}","(?![:][ ]|[ ])","(?:\\S.*\\n)+?",")","(?=\\n?[ ]{0,3}:[ ])"].join(""),"gm"),u=new RegExp(["\\n(\\n+)?","(","[ ]{0,3}","[:][ ]+",")","([\\s\\S]+?)","(?=\\n*","(?:","\\n[ ]{0,3}[:][ ]|","|\\x03",")",")"].join(""),"gm");return i=a(i),i=i.replace(/\n{2,}(?=\\x03)/,"\n"),i=i.replace(o,function(t,n,i){for(var o=e(i).split("\n"),a="",s=0;s "}return a+"\n"}),i=i.replace(u,function(e,i,o,a){return i||a.match(/\n{2,}/)?(a=Array(o.length+1).join(" ")+a,a=n(a)+"\n\n",a="\n"+c(a,r)+"\n"):(a=t(a),a=l(n(a),r)),"\n"+c+" "+a+" \n"}),s(i)},Markdown.Extra.prototype.strikethrough=function(e){return e.replace(/([\W_]|^)~T~T(?=\S)([^\r]*?\S[\*_]*)~T~T([\W_]|$)/g,"$1$2$3")},Markdown.Extra.prototype.newlines=function(e){return e.replace(/(<(?:br|\/li)>)?\n/g,function(e,t){return t?e:"
\n"})}}(),define("pagedown-extra",function(){}),define("extensions/markdownExtra",["jquery","underscore","utils","classes/Extension","text!html/markdownExtraSettingsBlock.html","google-code-prettify","highlightjs","pagedown-extra"],function(e,t,n,i,r,o,a){var s=new i("markdownExtra","Markdown Extra",!0);s.settingsBlock=r,s.defaultConfig={extensions:["fenced_code_gfm","tables","def_list","attr_list","footnotes","smartypants","strikethrough","newlines"],intraword:!0,comments:!0,highlighter:"prettify"},s.onLoadSettings=function(){function e(e){return t.some(s.config.extensions,function(t){return t==e})}n.setInputChecked("#input-markdownextra-fencedcodegfm",e("fenced_code_gfm")),n.setInputChecked("#input-markdownextra-tables",e("tables")),n.setInputChecked("#input-markdownextra-deflist",e("def_list")),n.setInputChecked("#input-markdownextra-attrlist",e("attr_list")),n.setInputChecked("#input-markdownextra-footnotes",e("footnotes")),n.setInputChecked("#input-markdownextra-smartypants",e("smartypants")),n.setInputChecked("#input-markdownextra-strikethrough",e("strikethrough")),n.setInputChecked("#input-markdownextra-newlines",e("newlines")),n.setInputChecked("#input-markdownextra-intraword",s.config.intraword),n.setInputChecked("#input-markdownextra-comments",s.config.comments),n.setInputValue("#input-markdownextra-highlighter",s.config.highlighter)},s.onSaveSettings=function(e){e.extensions=[],n.getInputChecked("#input-markdownextra-fencedcodegfm")&&e.extensions.push("fenced_code_gfm"),n.getInputChecked("#input-markdownextra-tables")&&e.extensions.push("tables"),n.getInputChecked("#input-markdownextra-deflist")&&e.extensions.push("def_list"),n.getInputChecked("#input-markdownextra-attrlist")&&e.extensions.push("attr_list"),n.getInputChecked("#input-markdownextra-footnotes")&&e.extensions.push("footnotes"),n.getInputChecked("#input-markdownextra-smartypants")&&e.extensions.push("smartypants"),n.getInputChecked("#input-markdownextra-strikethrough")&&e.extensions.push("strikethrough"),n.getInputChecked("#input-markdownextra-newlines")&&e.extensions.push("newlines"),e.intraword=n.getInputChecked("#input-markdownextra-intraword"),e.comments=n.getInputChecked("#input-markdownextra-comments"),e.highlighter=n.getInputValue("#input-markdownextra-highlighter")};var l;return s.onEventMgrCreated=function(e){l=e},s.onPagedownConfigure=function(e){var n=e.getConverter();if(s.config.intraword===!0){var i={_DoItalicsAndBold:function(e){return e=e.replace(/([^\w*]|^)(\*\*|__)(?=\S)(.+?[*_]*)(?=\S)\2(?=[^\w*]|$)/g,"$1$3"),e=e.replace(/([^\w*]|^)(\*|_)(?=\S)(.+?)(?=\S)\2(?=[^\w*]|$)/g,"$1$3")}};n.setOptions(i)}s.config.comments===!0&&n.hooks.chain("postConversion",function(e){return e.replace(//g,function(e){return e.replace(/^$/,' $1 ')})});var r={extensions:s.config.extensions};if("highlight"==s.config.highlighter){r.highlighter="prettify";var l=document.getElementById("preview-contents");e.hooks.chain("onPreviewRefresh",function(){t.each(l.querySelectorAll(".prettyprint > code"),function(e){!e.highlighted&&a.highlightBlock(e),e.highlighted=!0})})}else"prettify"==s.config.highlighter&&(r.highlighter="prettify",e.hooks.chain("onPreviewRefresh",o.prettyPrint));Markdown.Extra.init(n,r)},s}),define("text!html/mathJaxSettingsBlock.html",[],function(){return'Allows StackEdit to interpret LaTeX mathematical expressions.
\n\n\nMore info'}),define("text!libs/mathjax_config.js",[],function(){return'MathJax.Hub.Config({\n "HTML-CSS": {\n preferredFont: "TeX",\n availableFonts: [\n "STIX",\n "TeX"\n ],\n linebreaks: {\n automatic: true\n },\n EqnChunk: 10,\n imageFont: null\n },\n tex2jax: <%= tex2jax || \'{ inlineMath: [["$","$"],["\\\\\\\\\\\\\\\\(","\\\\\\\\\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\\\\\[","\\\\\\\\]"]], processEscapes: true }\' %>,\n TeX: $.extend({\n noUndefined: {\n attributes: {\n mathcolor: "red",\n mathbackground: "#FFEEEE",\n mathsize: "90%"\n }\n },\n Safe: {\n allow: {\n URLs: "safe",\n classes: "safe",\n cssIDs: "safe",\n styles: "safe",\n fontsize: "all"\n }\n }\n }, <%= tex %>),\n messageStyle: "none"\n});\n'}),define("libs/mathjax_init",["settings","text!libs/mathjax_config.js"],function(e,t){var n=document.createElement("script");n.type="text/x-mathjax-config",n.innerHTML=_.template(t,{tex:e.extensionSettings.mathJax?e.extensionSettings.mathJax.tex:"undefined",tex2jax:e.extensionSettings.mathJax?e.extensionSettings.mathJax.tex2jax:void 0}),document.getElementsByTagName("head")[0].appendChild(n)}),define("extensions/mathJax",["utils","classes/Extension","text!html/mathJaxSettingsBlock.html","mathjax"],function(e,t,n){function i(e,t,n){var i=u.slice(e,t+1).join("").replace(/&/g,"&").replace(//g,">");for(x.Browser.isMSIE&&(i=i.replace(/(%[^\n]*)\n/g,"$1\n \n\n\n \n\n\n \n\n\n \n\n
\n"));t>e;)u[t]="",t--;u[e]="@@"+m.length+"@@",n&&(i=n(i)),m.push(i),d=p=f=null}function r(e){d=p=f=null,m=[];var t;/`/.test(e)?(e=e.replace(/~/g,"~T").replace(/(^|[^\\])(`+)([^\n]*?[^`\n])\2(?!`)/gm,function(e){return e.replace(/\$/g,"~D")}),t=function(e){return e.replace(/~([TD])/g,function(e,t){return{T:"~",D:"$"}[t]})}):t=function(e){return e},u=w(e.replace(/\r\n?/g,"\n"),S);for(var e=1,n=u.length;n>e;e+=2){var r=u[e];"@"===r.charAt(0)?(u[e]="@@"+m.length+"@@",m.push(r)):d?r===p?h?f=e:i(d,e,t):r.match(/\n.*\n/)?(f&&(e=f,i(d,e,t)),d=p=f=null,h=0):"{"===r?h++:"}"===r&&h&&h--:r===y||"$$"===r?(d=e,p=r,h=0):"begin"===r.substr(1,5)&&(d=e,p="\\end"+r.substr(6),h=0)}return f&&i(d,f,t),t(u.join(""))}function o(e){return e=e.replace(/@@(\d+)@@/g,function(e,t){return m[t]}),m=null,e}function a(){v=!1,x.cancelTypeset=!1,x.Queue(["Typeset",x,b]),x.Queue(c)}function s(){!v&&(v=!0,x.Cancel(),x.Queue(a))}var l=new t("mathJax","MathJax",!0);l.settingsBlock=n,l.defaultConfig={tex:"{}",tex2jax:'{ inlineMath: [["$","$"],["\\\\\\\\(","\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\[","\\\\]"]], processEscapes: true }'},l.onLoadSettings=function(){e.setInputValue("#input-mathjax-config-tex",l.config.tex),e.setInputValue("#input-mathjax-config-tex2jax",l.config.tex2jax)},l.onSaveSettings=function(t,n){t.tex=e.getInputJsValue("#input-mathjax-config-tex",n),t.tex2jax=e.getInputJsValue("#input-mathjax-config-tex2jax",n)},l.onPagedownConfigure=function(e){b=document.getElementById("preview-contents");var t=e.getConverter();t.hooks.chain("preConversion",r),t.hooks.chain("postConversion",o)};var c;l.onAsyncPreview=function(e){c=e,s()};var u,d,p,f,h,m,g=!1,v=!1,b=null,y="$",x=MathJax.Hub;x.Queue(function(){g=!0,x.processUpdateTime=50,x.Config({"HTML-CSS":{EqnChunk:10,EqnChunkFactor:1},SVG:{EqnChunk:10,EqnChunkFactor:1}})});var w,S=/(\$\$|\\(?:begin|end)\{[a-z]*\*?\}|\\[\\{}$]|[{}]|(?:\n\s*)+|@@\d+@@)/i;return w=3==="aba".split(/(b)/).length?function(e,t){return e.split(t)}:function(e,t){var n,i=[];if(!t.global){n=t.toString();var r="";n=n.replace(/^\/(.*)\/([im]*)$/,function(e,t,n){return r=n,t}),t=RegExp(n,r+"g")}for(var o=t.lastIndex=0;n=t.exec(e);)i.push(e.substring(o,n.index)),i.push.apply(i,n.slice(1)),o=n.index+n[0].length;return i.push(e.substring(o)),i},function(){var e=MathJax.Hub;if(!e.Cancel){e.cancelTypeset=!1,e.Register.StartupHook("HTML-CSS Jax Config",function(){var t=MathJax.OutputJax["HTML-CSS"],n=t.Translate;t.Augment({Translate:function(i,r){if(e.cancelTypeset||r.cancelled)throw Error("MathJax Canceled");return n.call(t,i,r)}})}),e.Register.StartupHook("SVG Jax Config",function(){var t=MathJax.OutputJax.SVG,n=t.Translate;t.Augment({Translate:function(i,r){if(e.cancelTypeset||r.cancelled)throw Error("MathJax Canceled");return n.call(t,i,r)}})}),e.Register.StartupHook("TeX Jax Config",function(){var t=MathJax.InputJax.TeX,n=t.Translate;t.Augment({Translate:function(i,r){if(e.cancelTypeset||r.cancelled)throw Error("MathJax Canceled");return n.call(t,i,r)}})});var t=e.processError;e.processError=function(n,i,r){return"MathJax Canceled"!==n.message?t.call(e,n,i,r):(MathJax.Message.Clear(0,0),i.jaxIDs=[],i.jax={},i.scripts=[],i.i=i.j=0,i.cancelled=!0,null)},e.Cancel=function(){this.cancelTypeset=!0}}}(),l}),define("text!html/partialRenderingSettingsBlock.html",[],function(){return"Renders modified sections only.
\n\n Note: Document sections are based on title elements (h1, h2...). Therefore if\n your document does not contain any title, performance will not be increased.\n"}),define("extensions/partialRendering",["underscore","crel","extensions/markdownExtra","classes/Extension","text!html/partialRenderingSettingsBlock.html"],function(e,t,n,i,r){function o(){var t=[],n="\n";if(m=!1,e.each(g,function(e){var i='\n\n\n'+e.text+"\n\n";h&&(i=i.replace(/^```.*\n[\s\S]*?\n```|\n[ ]{0,3}\[\^(.+?)\]\:[ \t]*\n?([\s\S]*?)\n{1,2}((?=\n[ ]{0,3}\S)|$)/gm,function(e,t){return t?(m=!0,n+=e.replace(/^\s*\n/gm,"")+"\n",""):e})),i=i.replace(/^```.*\n[\s\S]*?\n```|^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm,function(e,t){return t?(n+=e.replace(/^\s*\n/gm,"")+"\n",""):e}),t.push({id:e.id,text:i+"\n"})}),y=[],b=[],d=void 0,x===!0||u!=n)return x=!1,u=n,b=v,v=t,void(y=t);var i=v.length;e.some(v,function(e,n){return n>=t.length||e.text!=t[n].text?(i=n,!0):void 0});var r=-v.length;e.some(v.slice().reverse(),function(e,n){return n>=t.length||e.text!=t[t.length-n-1].text?(r=-n,!0):void 0}),i-r>v.length&&(r=i-v.length);var o=v.slice(0,i);y=t.slice(i,t.length+r);var a=v.slice(v.length+r,v.length);d=e.first(a),b=v.slice(i,v.length+r),v=o.concat(y).concat(a)}function a(e){var t=e.id.substring(3);w[t]=e}function s(){function n(n){for(var i=t("div",{id:"wmd-preview-section-"+n.id,"class":"wmd-preview-section preview-content"}),o=!1;r;){var s=r.nextSibling,l="se-preview-section-delimiter"==r.className;if(o===!0&&"DIV"==r.tagName&&l)break;o=!0,"DIV"==r.tagName&&"footnotes"==r.className?e.each(r.querySelectorAll("ol > li"),a):l||i.appendChild(r),r=s}return i}e.each(b,function(e){var t=document.getElementById("wmd-preview-section-"+e.id);f.removeChild(t)});var i=document.getElementById("wmd-preview"),r=i.firstChild,o=document.createDocumentFragment();e.each(y,function(e){o.appendChild(n(e))}),i.innerHTML="";var s=p;void 0!==d&&(s=document.getElementById("wmd-preview-section-"+d.id)),f.insertBefore(o,s),p.innerHTML="";var l=[];if(m===!0){var c=t("ol");e.each(f.querySelectorAll("a.footnote"),function(e,t){e.textContent=t+1;var n=e.id.substring(6);l.push(n),c.appendChild(w[n].cloneNode(!0))}),l.length>0&&p.appendChild(t("div",{"class":"footnotes"},t("hr"),c)),w=e.pick(w,l)}}var l=new i("partialRendering","Partial Rendering",!0);l.settingsBlock=r;var c,u,d,p,f,h=!1,m=!1,g=[],v=[],b=[],y=[],x=!1,w={};return l.onSectionsCreated=function(e){g=e},l.onPagedownConfigure=function(t){c=t.getConverter(),c.hooks.chain("preConversion",function(){o();var t=e.map(y,function(e){return e.text});return t.push(u+"\n\n"),t.join("")}),t.hooks.chain("onPreviewRefresh",function(){s()})},l.onInit=function(){n.enabled&&e.some(n.config.extensions,function(e){return"footnotes"==e})&&(h=!0)},l.onReady=function(){p=t("div",{id:"wmd-preview-section-footnotes","class":"preview-content"}),f=document.getElementById("preview-contents"),f.appendChild(p)},l.onFileSelected=function(){x=!0},l}),define("extensions/markdownSectionParser",["underscore","extensions/markdownExtra","extensions/mathJax","extensions/partialRendering","classes/Extension","crel"],function(e,t,n,i,r,o){function a(e,t){function n(e,t){var n=o.substring(a,t);u.push({id:++f,text:n,textWithFrontMatter:i+n}),i=""}if(e===p){var i=(p.frontMatter||{})._frontMatter||"",r=t.substring(i.length),o=r+"\n\n";u=[];var a=0;o.replace(d,function(e,t){n(a,t),a=t}),n(a,r.length),s.onSectionsCreated(u)}}var s,l=new r("markdownSectionParser","Markdown section parser");l.onEventMgrCreated=function(e){s=e};var c,u=[],d="^.+[ \\t]*\\n=+[ \\t]*\\n+|^.+[ \\t]*\\n-+[ \\t]*\\n+|^\\#{1,6}[ \\t]*.+?[ \\t]*\\#*\\n+";l.onPagedownConfigure=function(r){t.enabled&&e.some(t.config.extensions,function(e){return"fenced_code_gfm"==e})&&(d="^```.*\\n[\\s\\S]*?\\n```|"+d),n.enabled&&(d="^[ \\t]*\\n\\$\\$[\\s\\S]*?\\$\\$|"+d,d="^[ \\t]*\\n\\\\\\\\[[\\s\\S]*?\\\\\\\\]|"+d,d="^[ \\t]*\\n\\\\?\\\\begin\\{[a-z]*\\*?\\}[\\s\\S]*?\\\\end\\{[a-z]*\\*?\\}|"+d),d=new RegExp(d,"gm");var a=r.getConverter();i.enabled||(a.hooks.chain("preConversion",function(){return e.reduce(u,function(e,t){return e+'\n\n\n'+t.text+"\n\n"},"")}),r.hooks.chain("onPreviewRefresh",function(){function e(){for(var e=o("div",{"class":"wmd-preview-section preview-content"}),t=!1;n;){var i=n.nextSibling,r="se-preview-section-delimiter"==n.className;if(t===!0&&"DIV"==n.tagName&&r)break;t=!0,r||e.appendChild(n),n=i}return e}var t=document.getElementById("wmd-preview"),n=t.firstChild,i=document.createDocumentFragment();u.forEach(function(t){i.appendChild(e(t))}),c.innerHTML="",c.appendChild(t),c.appendChild(i)}))},l.onReady=function(){c=document.getElementById("preview-contents")};var p;l.onFileSelected=function(e){p=e};var f=0;return l.onFileOpen=a,l.onContentChanged=a,l}),define("text!html/buttonMarkdownSyntax.html",[],function(){return'\n \n'}),define("extensions/buttonMarkdownSyntax",["jquery","classes/Extension","text!html/buttonMarkdownSyntax.html"],function(e,t,n){var i=new t("buttonMarkdownSyntax",'Button "Markdown syntax',!0,!0);return i.settingsBlock='Adds a "Markdown syntax" button over the preview.
',i.onCreatePreviewButton=function(){return n},i}),define("extensions/googleAnalytics",["jquery","underscore","constants","utils","classes/Extension","settings"],function(e,t,n,i,r,o){function a(){i.currentTime-d>18e4&&(_gaq.push(["_trackPageview"]),d=i.currentTime)}var s=new r("googleAnalytics","Google Analytics",!0);s.settingsBlock="Sends anonymous statistics about usage and errors to help improve StackEdit.
";var l=!1,c=!1;window._gaq=[];var u=function(){if(l===!1&&c===!1){var t="/ga.js";location.search.match(/(\?|&)console/)&&(t="/u/ga_debug.js"),e.ajax({url:"https://ssl.google-analytics.com"+t,dataType:"script"}).done(function(){l=!0})}},d=0;s.onPeriodicRun=function(){a()},s.onReady=function(){_gaq.push(["_setAccount",n.GOOGLE_ANALYTICS_ACCOUNT_ID]),a(),_gaq.push(["_trackEvent","About","version",n.VERSION]),_gaq.push(["_trackEvent","Settings","layoutOrientation",""+o.layoutOrientation]),_gaq.push(["_trackEvent","Settings","theme",""+window.theme]),_gaq.push(["_trackEvent","Settings","lazyRendering",""+o.lazyRendering]),_gaq.push(["_trackEvent","Settings","editorFontFamily",""+o.editorFontFamily]),_gaq.push(["_trackEvent","Settings","editorFontSize",""+o.editorFontSize]),_gaq.push(["_trackEvent","Settings","defaultContent backlink",""+(-1!==o.defaultContent.indexOf(n.MAIN_URL))]),_gaq.push(["_trackEvent","Settings","commitMsg backlink",""+(-1!==o.commitMsg.indexOf(n.MAIN_URL))]),_gaq.push(["_trackEvent","Settings","sshProxy unchanged",""+(o.sshProxy==n.SSH_PROXY_URL)]),t.each(o.extensionSettings,function(e,t){_gaq.push(["_trackEvent","Extensions",t+" enabled",""+(e.enabled===!0)])}),window.onerror=function(e,t,n){_gaq.push(["_trackEvent","Error",e,t+":"+n+i.formatEventList()])},u()},s.onOfflineChanged=function(e){c=e,u()};var p=0;return s.onSyncRunning=function(e){e===!0&&(p=(new Date).getTime())},s.onPublishRunning=function(e){e===!0&&(p=(new Date).getTime())},s.onSyncSuccess=function(){var e=(new Date).getTime();_gaq.push(["_trackTiming","Sync","SyncTime",e-p])},s.onSyncImportSuccess=function(e,t){_gaq.push(["_trackEvent","Sync","SyncImport"]),_gaq.push(["_trackEvent","Sync","SyncImport provider",t.providerId])},s.onSyncExportSuccess=function(e,t){_gaq.push(["_trackEvent","Sync","SyncExport"]),_gaq.push(["_trackEvent","Sync","SyncExport provider",t.provider.providerId])},s.onPublishSuccess=function(e){var n=(new Date).getTime();_gaq.push(["_trackTiming","Publish","PublishSuccess",n-p]),t.each(e.publishLocations,function(e){_gaq.push(["_trackEvent","Publish","PublishSuccess provider",e.provider.providerId])})},s.onNewPublishSuccess=function(e,t){_gaq.push(["_trackEvent","Publish","NewPublish provider",t.provider.providerId])},s.onError=function(e){!t.isString(e)&&e.message&&_gaq.push(["_trackEvent","Error","message",e.message+i.formatEventList()])},s}),define("extensions/twitter",["jquery","underscore","constants","utils","classes/Extension"],function(e,t,n,i,r){var o=new r("twitter","Twitter",!1,!0),a=!1,s=!1,l=function(){a===!1&&s===!1&&e.ajax({url:"https://platform.twitter.com/widgets.js",dataType:"script"}).done(function(){a=!0})};return o.onReady=function(){l()},o.onOfflineChanged=function(e){s=e,l()},o.onTweet=function(){a&&window.twttr.widgets.load()},o}),define("text!html/dialogAbout.html",[],function(){return'\n\n'}),define("extensions/dialogAbout",["underscore","constants","utils","classes/Extension","text!html/dialogAbout.html"],function(e,t,n,i,r){var o=new i("dialogAbout",'Dialog "About"'),a={Bootstrap:"http://getbootstrap.com/","Bootstrap Tour":"http://bootstraptour.com/",crel:"https://github.com/KoryNunn/crel","FileSaver.js":"https://github.com/eligrey/FileSaver.js/",Fontello:"http://fontello.com/","Font Awesome and others...":"res/libs/fontello/LICENSE.txt",Gatekeeper:"https://github.com/prose/gatekeeper","Github.js":"https://github.com/michael/github","Hammer.js":"http://eightmedia.github.io/hammer.js/","Highlight.js":"http://softwaremaniacs.org/soft/highlight/en/",jGrowl:"https://github.com/stanlemon/jGrowl/",jQuery:"http://jquery.com/",jsondiffpatch:"https://github.com/benjamine/jsondiffpatch",MathJax:"http://www.mathjax.org/",Mousetrap:"http://craig.is/killing/mice",PageDown:"https://code.google.com/p/pagedown/","PageDown Extra":"https://github.com/jmcmanus/pagedown-extra/",Prettify:"https://code.google.com/p/google-code-prettify/",Prism:"http://prismjs.com/",Rangy:"https://code.google.com/p/rangy/",RequireJS:"http://requirejs.org/","RequireJS LESS plugin":"https://github.com/guybedford/require-less","stacktrace.js":"http://stacktracejs.com/","to-markdown":"https://github.com/domchristie/to-markdown","Underscore.js":"http://underscorejs.org/",waitForImages:"https://github.com/alexanderdickson/waitForImages",XRegExp:"https://github.com/slevithan/xregexp","yaml.js":"https://github.com/jeremyfa/yaml.js"},s={"StackEdit Download Proxy":"https://github.com/benweet/stackedit-download-proxy","StackEdit HTMLtoPDF":"https://github.com/benweet/stackedit-htmltopdf","StackEdit Picasa Proxy":"https://github.com/benweet/stackedit-picasa-proxy","StackEdit SSH Proxy":"https://github.com/benweet/stackedit-ssh-proxy","StackEdit Tumblr Proxy":"https://github.com/benweet/stackedit-tumblr-proxy","StackEdit WordPress Proxy":"https://github.com/benweet/stackedit-wordpress-proxy"};return o.onReady=function(){n.addModal("modal-about",e.template(r,{libraries:a,projects:s,version:t.VERSION}))},o}),define("text!html/dialogManagePublicationLocation.html",[],function(){return' \n\n'}),define("extensions/dialogManagePublication",["jquery","underscore","classes/Extension","text!html/dialogManagePublicationLocation.html"],function(e,t,n,i){var r,o=new n("dialogManagePublication",'Dialog "Manage publication"',!1,!0);o.onEventMgrCreated=function(e){r=e};var a,s,l,c=function(n){if(void 0===n||n===a){l.toggleClass("hide",0===t.size(a.publishLocations));var o=t.reduce(a.publishLocations,function(e,n){var r=t.omit(n,"provider","publishIndex","sharingLink");return r.password&&(r.password="********"),r=JSON.stringify(r).replace(/{|}|"/g,"").replace(/,/g,", "),e+t.template(i,{publishAttributes:n,publishDesc:r})},"");s.innerHTML=o,t.each(s.querySelectorAll(".remove-button"),function(t){var n=e(t),i=a.publishLocations[n.data("publishIndex")];n.click(function(){a.removePublishLocation(i),r.onPublishRemoved(a,i)})})}};return o.onFileSelected=function(e){a=e,c(e)},o.onNewPublishSuccess=c,o.onPublishRemoved=c,o.onReady=function(){var t=document.querySelector(".modal-manage-publish");s=t.querySelector(".publish-list"),l=e(document.querySelectorAll(".show-already-published"))},o}),define("text!html/dialogManageSynchronizationLocation.html",[],function(){return'\n' -}),define("extensions/dialogManageSynchronization",["jquery","underscore","classes/Extension","text!html/dialogManageSynchronizationLocation.html"],function(e,t,n,i){var r,o=new n("dialogManageSynchronization",'Dialog "Manage synchronization"',!1,!0);o.onEventMgrCreated=function(e){r=e};var a;o.onSynchronizerCreated=function(e){a=e};var s,l,c,u=function(n){if(void 0===n||n===s){c.toggleClass("hide",0===t.size(s.syncLocations));var o=t.reduce(s.syncLocations,function(e,n){return e+t.template(i,{syncAttributes:n,syncDesc:n.id||n.path})},"");l.innerHTML=o,t.each(l.querySelectorAll(".remove-button"),function(t){var n=e(t),i=s.syncLocations[n.data("syncIndex")];n.click(function(){s.removeSyncLocation(i),r.onSyncRemoved(s,i)})})}};return o.onFileSelected=function(e){s=e,u(e)},o.onSyncExportSuccess=u,o.onSyncRemoved=u,o.onReady=function(){var t=document.querySelector(".modal-manage-sync");l=t.querySelector(".sync-list"),c=e(document.querySelectorAll(".show-already-synchronized"))},o}),define("text!html/dialogManageSharingLocation.html",[],function(){return' \n\n'}),define("extensions/dialogManageSharing",["jquery","underscore","classes/Extension","text!html/dialogManageSharingLocation.html"],function(e,t,n,i){var r,o=new n("dialogManageSharing",'Button "Share"',!1,!0);o.onEventMgrCreated=function(e){r=e};var a,s,l,c,u=function(e){if(void 0===e||e===a){var n=t.reduce(a.publishLocations,function(e,n){return n.sharingLink&&(e+=t.template(i,{link:n.sharingLink,title:a.title})),e},"");s.innerHTML=n,r.onTweet(),l.toggleClass("hide",0===n.length),c.toggleClass("hide",0!==n.length)}};return o.onFileSelected=function(e){a=e,u(e)},o.onNewPublishSuccess=function(t,n){u(t),n.sharingLink&&(e(".modal").modal("hide"),e(".modal-manage-sharing").modal("show"))},o.onPublishRemoved=u,o.onReady=function(){var t=document.querySelector(".modal-manage-sharing");s=t.querySelector(".share-list"),l=e(t.querySelectorAll(".msg-share-list")),c=e(t.querySelectorAll(".msg-no-share"))},o}),function(){var e=this,t={},n=!1;"undefined"!=typeof module&&module.exports?(module.exports=t,e.toMarkdown=t,n=!0):e.toMarkdown=t,t.converter=function(e){e&&e.elements&&$.isArray(e.elements)&&(c=c.concat(e.elements)),this.makeMd=function(e,t){var r;if(n){var o=require("jsdom");o.env({html:e,scripts:["http://code.jquery.com/jquery-1.6.4.min.js"],done:function(n,r){"function"==typeof t&&t(i(e,r.$))}})}else r=i(e,$);return r}};var i=function(e,t){e=e.replace(/(\d+)\. /g,"$1\\. ");var n=t(""),i=n.html(e);i.find("*:not(pre, code)").contents().filter(function(){return 3===this.nodeType&&/^\s+$/.test(this.nodeValue)}).remove();for(var r=[],o=0,s=c.length;s>o;o++)r.push(c[o].selector);for(r=r.join(",");i.find(r).length;)for(var o=0,s=c.length;s>o;o++)$matches=i.find(c[o].selector+':not(:has("'+r+'"))'),$matches.each(function(e,n){var i=t(n);i.before(c[o].replacement(i.html(),i)).remove()});return a(i.html())},r=function(e){return e.replace(/^[\n\r\f]+|[\n\r\f]+$/g,"")},o=function(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')},a=function(e){return e=e.replace(/^[\t\r\n]+|[\t\r\n]+$/g,""),e=e.replace(/\n\s+\n/g,"\n\n"),e=e.replace(/\n{3,}/g,"\n\n"),e=o(e)},s=function(e){return e=r(e),e?"**"+e+"**":""},l=function(e){return e=r(e),e?"_"+e+"_":""},c=[{selector:"p",replacement:function(e){return e=$.trim(e),e?"\n\n"+e+"\n\n":""}},{selector:"br",replacement:function(){return"\n"}},{selector:"h1,h2,h3,h4,h5,h6",replacement:function(e,t){e=$.trim(e);for(var n=t.prop("nodeName").charAt(1),i="",r=0;n>r;r++)i+="#";return e?"\n\n"+i+" "+e+"\n\n":""}},{selector:"hr",replacement:function(){return"\n\n* * *\n\n"}},{selector:"a[href]",replacement:function(e,t){if(e){e=r(e);var n=t.attr("href"),i=t.attr("title")||"";return"["+e+"]("+n+(i?' "'+i+'"':"")+")"}return!1}},{selector:"b",replacement:s},{selector:"strong",replacement:s},{selector:"i",replacement:l},{selector:"em",replacement:l},{selector:"code",replacement:function(e){return e=r(e),e?"`"+e+"`":""}},{selector:"img",replacement:function(e,t){var n=t.attr("alt")||"",i=t.attr("src")||"",r=t.attr("title")||"";return"!["+n+"]("+i+(r?' "'+r+'"':"")+")"}},{selector:"pre",replacement:function(e){return/^\s*\`/.test(e)?(e=e.replace(/\`/g,"")," "+e.replace(/\n/g,"\n ")):""}},{selector:"li",replacement:function(e,t){e=e.replace(/^\s+|\s+$/,"").replace(/\n/gm,"\n ");var n="* ",i="",r=t.parent(),o=r.contents().filter(function(){return 1===this.nodeType&&"LI"===this.nodeName||3===this.nodeType}),a=o.index(t)+1;return n=r.is("ol")?a+". ":"* ",a==o.length&&(t.parents("li").length||(i="\n"),e=e.replace(/\s+$/,""),t.unwrap()),n+e+i+"\n"}},{selector:"blockquote",replacement:function(e){return e=e=$.trim(e).replace(/\n{3,}/g,"\n\n"),e=e.replace(/\n/g,"\n> "),"> "+e}}]}(),define("toMarkdown",["jquery"],function(e){return function(){var t;return t||e.toMarkdown}}(this)),define("extensions/dialogOpenHarddrive",["jquery","underscore","constants","utils","classes/Extension","toMarkdown"],function(e,t,n,i,r,o){function a(i){i.stopPropagation(),i.preventDefault();var r=(i.dataTransfer||i.target).files;e(".modal-import-harddrive-markdown, .modal-import-harddrive-html").modal("hide"),t.each(r,function(t){if(!e(i.target).is("#wmd-input *")||!t.name.match(/.(jpe?g|png|gif)$/i)){var r=new FileReader;r.onload=function(e){return function(t){var n=t.target.result;if(n.match(/\uFFFD/))return void p.onError(e.name+" is a binary file.");if(n=f?f(n):n,void 0===n)return void p.onError(e.name+" is not a valid HTML file.");var i=e.name,r=i.lastIndexOf(".");i=-1!==r?i.substring(0,r):i;var o=u.createFile(i,n);u.selectFile(o)}}(t);var o=t.slice(0,n.IMPORT_FILE_MAX_CONTENT_SIZE);r.readAsText(o)}})}function s(e){f=void 0,a(e)}function l(e){f=m,a(e)}function c(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy"}var u,d=new r("dialogOpenHarddrive",'Dialog "Open from"');d.onFileMgrCreated=function(e){u=e};var p;d.onEventMgrCreated=function(e){p=e};var f,h,m=function(e){return h.makeMd(e)};return d.onReady=function(){h=new o.converter,e("#input-file-import-harddrive-markdown").change(s),e("#dropzone-import-harddrive-markdown, #wmd-input").each(function(){this.addEventListener("dragover",c,!1),this.addEventListener("drop",s,!1)}),e("#input-file-import-harddrive-html").change(l),e("#dropzone-import-harddrive-html").each(function(){this.addEventListener("dragover",c,!1),this.addEventListener("drop",l,!1)}),e(".action-convert-html").click(function(e){var t=i.getInputTextValue("#input-convert-html",e);if(void 0!==t){if(t=h.makeMd(t),void 0===t)return void p.onError("Invalid HTML code.");var n=u.createFile(void 0,t);u.selectFile(n)}})},d}),define("extensions/documentTitle",["jquery","underscore","classes/Extension"],function(e,t,n){var i,r,o=new n("documentTitle","Document Title"),a=t.debounce(function(t){if(t===i){var n=i.title;document.title="StackEdit – "+n,r.html(i.composeTitle()),e(".file-title").text(n),e(".input-file-title").val(n)}},50);return o.onFileSelected=function(e){i=e,a(e)},o.onTitleChanged=a,o.onSyncExportSuccess=a,o.onSyncRemoved=a,o.onNewPublishSuccess=a,o.onPublishRemoved=a,o.onReady=a,o.onReady=function(){r=e(".file-title-navbar"),r.hover(function(){var e=r[0].scrollWidth-r.outerWidth();r.stop(!0,!0).animate({scrollLeft:e},15*e,"linear")},function(){r.stop(!0,!0).scrollLeft(0)}).click(function(){r.stop(!0,!0).scrollLeft(0)})},o}),function(e,t){function n(e,t,n){return e.addEventListener?void e.addEventListener(t,n,!1):void e.attachEvent("on"+t,n)}function i(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return T[e.which]?T[e.which]:E[e.which]?E[e.which]:String.fromCharCode(e.which).toLowerCase()}function r(e,t){return e.sort().join(",")===t.sort().join(",")}function o(e){e=e||{};var t,n=!1;for(t in N)e[t]?n=!0:N[t]=0;n||(A=!1)}function a(e,t,n,i,o,a){var s,l,c=[],u=n.type;if(!I[e])return[];for("keyup"==u&&f(e)&&(t=[e]),s=0;s95&&112>e||T.hasOwnProperty(e)&&(S[T[e]]=e)}return S}function g(e,t,n){return n||(n=m()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function v(e,t,n,r){function a(t){return function(){A=t,++N[e],h()}}function s(t){u(n,t,e),"keyup"!==r&&(L=i(t)),setTimeout(o,10)}N[e]=0;for(var l=0;l1?void v(e,s,t,n):(o=y(e,n),I[o.key]=I[o.key]||[],a(o.key,o.modifiers,{type:o.action},i,e,r),void I[o.key][i?"unshift":"push"]({callback:t,modifiers:o.modifiers,action:o.action,seq:i,level:r,combo:e}))}function w(e,t,n){for(var i=0;i ":".","?":"/","|":"\\"},_={option:"alt",command:"meta","return":"enter",escape:"esc",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},I={},D={},N={},L=!1,M=!1,A=!1,R=1;20>R;++R)T[111+R]="f"+R;for(R=0;9>=R;++R)T[R+96]=R;n(t,"keypress",p),n(t,"keydown",p),n(t,"keyup",p);var P={bind:function(e,t,n){return e=e instanceof Array?e:[e],w(e,t,n),this},unbind:function(e,t){return P.bind(e,function(){},t)},trigger:function(e,t){return D[e+":"+t]&&D[e+":"+t]({},e),this},reset:function(){return I={},D={},this},stopCallback:function(e,t){return(" "+t.className+" ").indexOf(" mousetrap ")>-1?!1:"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},handleKey:d};e.Mousetrap=P,"function"==typeof define&&define.amd&&define("mousetrap",P)}(window,document),define("classes/FileDescriptor",["underscore","utils","storage"],function(e,t,n){function i(e,t,i,r){this.fileIndex=e,this._title=t||n[e+".title"],this._editorScrollTop=parseInt(n[e+".editorScrollTop"])||0,this._editorStart=parseInt(n[e+".editorEnd"])||0,this._editorEnd=parseInt(n[e+".editorEnd"])||0,this._previewScrollTop=parseInt(n[e+".previewScrollTop"])||0,this._selectTime=parseInt(n[e+".selectTime"])||0,this._discussionList=JSON.parse(n[e+".discussionList"]||"{}"),this.syncLocations=i||{},this.publishLocations=r||{},Object.defineProperty(this,"title",{get:function(){return this._title},set:function(e){this._title=e,n[this.fileIndex+".title"]=e}}),Object.defineProperty(this,"content",{get:function(){return n[this.fileIndex+".content"]},set:function(e){n[this.fileIndex+".content"]=e}}),Object.defineProperty(this,"editorScrollTop",{get:function(){return this._editorScrollTop},set:function(e){this._editorScrollTop=e,n[this.fileIndex+".editorScrollTop"]=e}}),Object.defineProperty(this,"editorStart",{get:function(){return this._editorStart},set:function(e){this._editorStart=e,n[this.fileIndex+".editorStart"]=e}}),Object.defineProperty(this,"editorEnd",{get:function(){return this._editorEnd},set:function(e){this._editorEnd=e,n[this.fileIndex+".editorEnd"]=e}}),Object.defineProperty(this,"previewScrollTop",{get:function(){return this._previewScrollTop},set:function(e){this._previewScrollTop=e,n[this.fileIndex+".previewScrollTop"]=e}}),Object.defineProperty(this,"selectTime",{get:function(){return this._selectTime},set:function(e){this._selectTime=e,n[this.fileIndex+".selectTime"]=e}}),Object.defineProperty(this,"discussionList",{get:function(){return this._discussionList},set:function(e){this._discussionList=e,n[this.fileIndex+".discussionList"]=JSON.stringify(e)}}),Object.defineProperty(this,"discussionListJSON",{get:function(){return n[this.fileIndex+".discussionList"]||"{}"},set:function(e){this._discussionList=JSON.parse(e),n[this.fileIndex+".discussionList"]=e}})}return i.prototype.addSyncLocation=function(e){t.storeAttributes(e),t.appendIndexToArray(this.fileIndex+".sync",e.syncIndex),this.syncLocations[e.syncIndex]=e},i.prototype.removeSyncLocation=function(e){t.removeIndexFromArray(this.fileIndex+".sync",e.syncIndex),delete this.syncLocations[e.syncIndex]},i.prototype.addPublishLocation=function(e){t.storeAttributes(e),t.appendIndexToArray(this.fileIndex+".publish",e.publishIndex),this.publishLocations[e.publishIndex]=e},i.prototype.removePublishLocation=function(e){t.removeIndexFromArray(this.fileIndex+".publish",e.publishIndex),delete this.publishLocations[e.publishIndex]},i.prototype.composeTitle=function(){var t=[];return e.chain(this.syncLocations).sortBy(function(e){return e.provider.providerId}).each(function(e){t.push('')}),0!==e.size(this.syncLocations)&&t.push(''),e.chain(this.publishLocations).sortBy(function(e){return e.provider.providerId}).each(function(e){t.push('')}),0!==e.size(this.publishLocations)&&t.push(''),t.push(e.escape(this.title)),t.join("")},i}),define("fileSystem",["underscore","utils","classes/FileDescriptor","storage"],function(e,t,n,i){var r={};return t.retrieveIndexArray("file.list").forEach(function(e){r[e]=new n(e)}),Object.keys(i).forEach(function(e){var t=e.match(/(file\.\S+?)\.\S+/);t&&!r.hasOwnProperty(t[1])&&i.removeItem(e)}),r}),define("text!html/documentSelectorSettingsBlock.html",[],function(){return' Allows toggling document with keyboard shortcuts.
\n\n'}),define("extensions/documentSelector",["jquery","underscore","crel","utils","classes/Extension","mousetrap","fileSystem","text!html/documentSelectorSettingsBlock.html"],function(e,t,n,i,r,o,a,s){var l=new r("documentSelector","Document Selector",!0);l.settingsBlock=s,l.defaultConfig={orderBy:"mru",shortcutPrevious:"Ctrl+[",shortcutNext:"Ctrl+]"},l.onLoadSettings=function(){i.setInputValue("#select-document-selector-orderby",l.config.orderBy),i.setInputValue("#input-document-selector-shortcut-previous",l.config.shortcutPrevious),i.setInputValue("#input-document-selector-shortcut-next",l.config.shortcutNext)},l.onSaveSettings=function(e,t){e.orderBy=i.getInputValue("#select-document-selector-orderby"),e.shortcutPrevious=i.getInputTextValue("#input-document-selector-shortcut-previous",t),e.shortcutNext=i.getInputTextValue("#input-document-selector-shortcut-next",t)};var c;l.onFileMgrCreated=function(e){c=e};var u,d,p,f,h,m,g,v=['\n \n\n\n \n\n\n \n\n\n \n\n\n \n\n\n \n\n" data-file-index="<%= fileDesc.fileIndex %>">',' '," <%= fileDesc.composeTitle() %>"," "," "].join(""),b=t.debounce(function(){var n=t.chain(a).sortBy(f).reduce(function(e,n){return e+t.template(v,{fileDesc:n,isCurrent:n===h})},"").value();u.innerHTML=n,p=[],d={},t.each(u.querySelectorAll("li"),function(t){var n=e(t);p.push(n);var i=a[n.data("fileIndex")];d[i.fileIndex]=n,n.find("a").click(function(){m=void 0,n.hasClass("disabled")?g.focus():c.selectFile(i)})})},50);return l.onFileSelected=function(e){h=e,b()},l.onFileCreated=b,l.onFileDeleted=b,l.onTitleChanged=b,l.onSyncExportSuccess=b,l.onSyncRemoved=b,l.onNewPublishSuccess=b,l.onPublishRemoved=b,l.onReady=function(){g=e("#wmd-input"),"title"==l.config.orderBy?f=function(e){return e.title.toLowerCase()}:"mru"==l.config.orderBy&&(f=function(e){return-e.selectTime}),u=n("ul",{"class":"dropdown-menu dropdown-file-selector"}),document.querySelector(".navbar").appendChild(n("div",n("div",{"data-toggle":"dropdown"}),u));var i=e(u).dropdown(),r=e(".document-panel .collapse-button");r.prop("title",t.template("<%= title %> <%= shortcutPrevious %> <%= shortcutNext %>",{title:r.prop("title"),shortcutPrevious:l.config.shortcutPrevious,shortcutNext:l.config.shortcutNext}));var a=l.config.shortcutPrevious.toLowerCase();o.bind(a,function(){void 0===m&&(i.dropdown("toggle"),m=d[h.fileIndex]);var e=t.indexOf(p,m)-1;return-2===e&&(e=-1),m=p[(e+p.length)%p.length],setTimeout(function(){m.find("a").focus()},10),!1});var s=l.config.shortcutNext.toLowerCase();o.bind(l.config.shortcutNext.toLowerCase(),function(){void 0===m&&(i.dropdown("toggle"),m=d[h.fileIndex]);var e=t.indexOf(p,m)+1;return m=p[e%p.length],setTimeout(function(){m.find("a").focus()},10),!1});var c=a.indexOf("+"),v=-1===c?a:a.substring(0,c),b=s.indexOf("+"),y=-1===b?s:s.substring(0,b);o.bind([v,y],function(){void 0!==m&&m.find("a").click()},"keyup")},l}),define("classes/FolderDescriptor",["underscore","utils","storage","fileSystem"],function(e,t,n,i){function r(r,o){this.folderIndex=r,this._name=o||n[r+".name"],this.fileList={},e.each(t.retrieveIndexArray(r+".files"),function(e){try{var n=i[e];n.folder=this,this.fileList[e]=n}catch(o){t.removeIndexFromArray(r+".files",e)}},this),Object.defineProperty(this,"name",{get:function(){return this._name},set:function(e){this._name=e,n[this.folderIndex+".name"]=e}})}return r.prototype.addFile=function(e){e.folder=this,t.appendIndexToArray(this.folderIndex+".files",e.fileIndex),this.fileList[e.fileIndex]=e},r.prototype.removeFile=function(e){e.folder=void 0,t.removeIndexFromArray(this.folderIndex+".files",e.fileIndex),delete this.fileList[e.fileIndex]},r}),define("folderList",["underscore","utils","storage","classes/FolderDescriptor","storage"],function(e,t,n,i){var r={};return t.retrieveIndexArray("folder.list").forEach(function(e){r[e]=new i(e)}),Object.keys(n).forEach(function(e){var t=e.match(/(folder\.\S+?)\.\S+/);t&&!r.hasOwnProperty(t[1])&&n.removeItem(e)}),r}),define("extensions/documentPanel",["jquery","underscore","utils","classes/Extension","folderList","fileSystem"],function(e,t,n,i,r,o){function a(n){if(n!=y){if(y=n,b.scrollTop=0,!n)return f.addClass("hide"),void d.removeClass("hide");var i=n.toLowerCase().split(/\s+/);t.each(p.querySelectorAll(".file"),function(n){var r=e(n),o=r.text().toLowerCase();r.toggle(!t.some(i,function(e){return-1===o.indexOf(e)}))}),f.removeClass("hide"),d.addClass("hide")}}var s,l=new i("documentPanel","Document Panel");l.onFileMgrCreated=function(e){s=e};var c,u,d,p,f,h,m=['',''," <%= _.size(folderDesc.fileList) %>","",' <%= folderDesc.name %>',"",''," <%= fileListHtml %>",""].join(""),g=['"',' data-file-index="<%= fileDesc.fileIndex %>">'," <%= fileDesc.composeTitle() %>",""].join(""),v=t.debounce(function(){var n=t.filter(o,function(e){return void 0===e.folder}),i=t.chain(n).sortBy(function(e){return e.title.toLowerCase()}).reduce(function(e,n){return e+""+t.template(g,{fileDesc:n,selectedFileDesc:h})+" "},"").value();i=i&&' ",t.chain(r).sortBy(function(e){return e.name.toLowerCase()}).each(function(e){var n=t.chain(e.fileList).sortBy(function(e){return e.title.toLowerCase()}).reduce(function(e,n){return e+""+t.template(g,{fileDesc:n,selectedFileDesc:h})+" "},"").value();n=n&&' ",i+=t.template(m,{folderDesc:e,fileListHtml:n,id:e.folderIndex.replace(".","")})}),u.innerHTML=i;var a=t.chain(o).sortBy(function(e){return e.title.toLowerCase()}).reduce(function(e,n){return e+""+t.template(g,{fileDesc:n,selectedFileDesc:h})+" "},"").value();a=' ",p.innerHTML=a,t.each(c.querySelectorAll(".file"),function(t){var n=e(t);n.click(function(){var e=o[n.data("fileIndex")];e&&e!==h&&s.selectFile(e)})})},50);l.onFileSelected=function(e){h=e,v()},l.onFileCreated=v,l.onFileDeleted=v,l.onTitleChanged=v,l.onSyncExportSuccess=v,l.onSyncRemoved=v,l.onNewPublishSuccess=v,l.onPublishRemoved=v,l.onFoldersChanged=v;var b,y="";return l.onReady=function(){c=document.querySelector(".document-panel"),b=c.querySelector(".panel-content"),u=c.querySelector(".document-list"),d=e(u),p=c.querySelector(".document-list-filtered"),f=e(p),e(c).on("show.layout.toggle",function(){var t=h.folder;void 0!==t&&e(c.querySelector(".file-list."+t.folderIndex.replace(".",""))).collapse("show")}).on("shown.layout.toggle",function(){var e=u.querySelector(".file.active");e&&(b.scrollTop+=e.getBoundingClientRect().top-240)}).on("hidden.layout.toggle",function(){t.val(""),a("")});var t=e(c.querySelector(".search-bar .form-control"));t.bind("propertychange keyup input paste",function(){a(t.val())})},l}),define("extensions/documentManager",["jquery","underscore","constants","utils","storage","classes/Extension","classes/FolderDescriptor","folderList","fileSystem"],function(e,t,n,i,r,o,a,s,l){function c(){N=[],D=[],t.each(b.querySelectorAll('input[type="checkbox"]:checked'),function(t){var n=e(t.parentNode.parentNode),i=s[n.data("folderIndex")],r=l[n.data("fileIndex")];void 0!==i?N.push(i):void 0!==r&&D.push(r)})}function u(){if(0===t.size(D))return void d();var n=t.chain(D).sortBy(function(e){return e.title.toLowerCase()}).reduce(function(e,n){return e+t.template(I,{fileDesc:n})},"").value();y.innerHTML=''+n+"
",e(v.querySelectorAll(".document-list")).addClass("hide"),e(v.querySelectorAll(".confirm-delete, .selected-document-list")).removeClass("hide")}function d(){t.each(D,function(e){e.folder&&e.folder.removeFile(e),f.deleteFile(e)}),t.each(N,function(e){i.removeIndexFromArray("folder.list",e.folderIndex),delete s[e.folderIndex]}),m.onFoldersChanged()}function p(){c(),x.toggleClass("disabled",0===t.size(s)||0===t.size(D)),w.toggleClass("disabled",0===t.size(N)&&0===t.size(D))}var f,h=new o("documentManager","Document Manager",!1,!0);h.onFileMgrCreated=function(e){f=e};var m;h.onEventMgrCreated=function(e){m=e};var g,v,b,y,x,w,S,C,T,E=['','','','','<%= _.size(folderDesc.fileList) %>','',"<%= folderDesc.name %>",'','<%= fileListHtml %>'].join(""),k=['','','','',' '].join(""),_=['','<%= fileDesc.composeTitle() %>','<%= _.size(folderDesc.fileList) %>','',"<%= folderDesc.name %>"].join(""),I=['',' '].join(""),D=[],N=[],L=t.debounce(function(){if(g!==!1){p(),C.text(t.size(l)),T.text(t.size(s)+1),S=t.filter(l,function(e){return void 0===e.folder});var n=['','','<%= fileDesc.composeTitle() %>',t.size(S),"",'',"ROOT folder"].join(""),i=t.chain(S).sortBy(function(e){return e.title.toLowerCase()}).reduce(function(e,n){return e+t.template(k,{fileDesc:n})},"").value();i=i&&' ",n+=''+i+"",t.chain(s).sortBy(function(e){return e.name.toLowerCase()}).each(function(e){var i=t.chain(e.fileList).sortBy(function(e){return e.title.toLowerCase()}).reduce(function(e,n){return e+t.template(k,{fileDesc:n})},"").value();i=i&&' ",n+=t.template(E,{folderDesc:e,fileListHtml:i,id:e.folderIndex.replace(".","")})}),b.innerHTML=n,t.each(b.querySelectorAll(".button-delete"),function(t){var n=e(t);n.click(function(e){e.stopPropagation();var t=n.parent(),i=s[t.data("folderIndex")],r=l[t.data("fileIndex")];D=[],N=[],i?(N.push(i),D=i.fileList):r&&D.push(r),u()})}),t.each(b.querySelectorAll(".button-rename"),function(t){var n=e(t);n.click(function(e){e.stopPropagation();var t,i=n.parent(),r=s[i.data("folderIndex")],o=l[i.data("fileIndex")];r?t=r.name:o&&(t=o.title),i.find(".name").addClass("hide"),i.find(".input-rename").removeClass("hide").val(t)[0].select()})}),t.each(b.querySelectorAll(".input-rename"),function(t){function n(){var t=i.parent(),n=e.trim(i.val()),r=s[t.data("folderIndex")],o=l[t.data("fileIndex")];n&&r&&n!=r.name?(r.name=n,m.onFoldersChanged()):n&&o&&n!=o.title?(o.title=n,m.onTitleChanged(o)):(i.addClass("hide"),t.find(".name").removeClass("hide"))}var i=e(t);i.blur(function(){n()}).keyup(function(e){13==e.keyCode&&(n(),e.stopPropagation()),27==e.keyCode&&(i.val(""),n(),e.stopPropagation())})}),t.each(b.querySelectorAll(".file .checkbox"),function(t){var n=e(t);n.click(function(e){e.stopPropagation()}).find("[type=checkbox]").change(function(){n.parents(".list-group").find(".folder [type=checkbox]").prop("checked",!1)})}),t.each(b.querySelectorAll(".folder .checkbox"),function(t){var n=e(t);n.click(function(e){e.stopPropagation()}).find("[type=checkbox]").change(function(){n.parent().next().find("[type=checkbox]").prop("checked",this.checked)})}),e(b.querySelectorAll("[type=checkbox]")).change(p)}},50);return h.onFileCreated=L,h.onFileDeleted=L,h.onSyncExportSuccess=L,h.onSyncRemoved=L,h.onNewPublishSuccess=L,h.onPublishRemoved=L,h.onFoldersChanged=L,h.onTitleChanged=function(t){g!==!1&&(e(b).find('[data-file-index="'+t.fileIndex+'"] .name').html(t.composeTitle()).removeClass("hide"),e(b.querySelectorAll(".input-rename")).addClass("hide"))},h.onReady=function(){v=document.querySelector(".modal-document-manager"),b=v.querySelector(".list-group.document-list"),C=e(v.querySelectorAll(".document-count")),T=e(v.querySelectorAll(".folder-count")),y=v.querySelector(".list-group.selected-document-list");var o=v.querySelector(".list-group.select-folder-list");e(v).on("show.bs.modal",function(){g=!0,L(),setTimeout(function(){e(b.querySelectorAll(".root-folder")).click()},250)}).on("hide.bs.modal",function(){g=!1,b.innerHTML=""}),e(v.querySelectorAll(".action-create-folder")).click(function(){var o;do o="folder."+i.randomString();while(t.has(s,o));r[o+".name"]=n.DEFAULT_FOLDER_NAME;var l=new a(o,n.DEFAULT_FOLDER_NAME);i.appendIndexToArray("folder.list",o),s[o]=l,m.onFoldersChanged(),setTimeout(function(){var t=e(v.querySelector('[data-folder-index="'+o+'"] .button-rename')).click();v.scrollTop+=t.offset().top-50},60)}),e(v.querySelectorAll(".action-select-all")).click(function(){e(b.querySelectorAll('input[type="checkbox"]')).prop("checked",!0).change()}),e(v.querySelectorAll(".action-unselect-all")).click(function(){e(b.querySelectorAll('input[type="checkbox"]')).prop("checked",!1).change()});var l=e(v.querySelectorAll(".action-delete-items")).click(function(){w.hasClass("disabled")||(c(),u())});w=l.parent(),e(v.querySelectorAll(".action-delete-items-confirm")).click(function(){d(),e(v.querySelectorAll(".document-list")).removeClass("hide"),e(v.querySelectorAll(".confirm-delete, .selected-document-list")).addClass("hide")});var p=e(v.querySelectorAll(".action-move-items")).click(function(){if(!x.hasClass("disabled")){c();var n=['','',t.size(S),"",'',"ROOT folder"].join("");n+=t.chain(s).sortBy(function(e){return e.name.toLowerCase()}).reduce(function(e,n){return e+t.template(_,{folderDesc:n})},"").value(),o.innerHTML=n,t.each(o.querySelectorAll(".folder"),function(n){n=e(n),n.click(function(){var i=s[n.data("folderIndex")];t.each(D,function(e){e.folder&&e.folder.removeFile(e),i&&i.addFile(e)}),m.onFoldersChanged(),e(v.querySelectorAll(".document-list")).removeClass("hide"),e(v.querySelectorAll(".choose-folder, .select-folder-list")).addClass("hide") -})}),e(v.querySelectorAll(".document-list")).addClass("hide"),e(v.querySelectorAll(".choose-folder, .select-folder-list")).removeClass("hide")}});x=p.parent(),e(v.querySelectorAll(".action-cancel")).click(function(){e(v.querySelectorAll(".document-list")).removeClass("hide"),e(v.querySelectorAll(".confirm-delete, .choose-folder, .selected-document-list, .select-folder-list")).addClass("hide")})},h}),define("extensions/workingIndicator",["jquery","underscore","crel","classes/Extension"],function(e,t,n,i){var r,o,a=new i("workingIndicator","Working Indicator"),s=["@<%= prefix %>keyframes <%= name %> {"," 0% { opacity:<%= z %>; }"," <%= start %>.01% { opacity:<%= alpha %>; }"," <%= start %>.02% { opacity:1; }"," <%= ((start + trail) % 100) %>.01% { opacity:<%= alpha %>; }"," 100% { opacity:<%= z %>; }","}"].join("\n");return a.onAsyncRunning=function(e){r.toggleClass("working",e),o.toggleClass("hide",!e)},a.onReady=function(){function i(e){e.z=Math.max(1-(1-e.alpha)/e.trail*(100-e.start),e.alpha),a+=t.template(s,t.extend({prefix:""},e)),a+=t.template(s,t.extend({prefix:"-webkit-"},e))}var a="";r=e(document.body),o=e(''),e(".working-indicator").append(o);for(var l=0;3>l;l++){var c="working-indicator-bar"+l;i({name:c,alpha:.25,start:20*l,trail:50});var u=c+" 0.7s linear infinite";o.append(e('\n\n '),this.interval=setInterval(function(){e(n).data("jGrowl.instance").update()},parseInt(this.defaults.check)),t&&e(this.element).addClass("ie6")},shutdown:function(){e(this.element).removeClass("jGrowl").find("div.jGrowl-notification").remove(),clearInterval(this.interval)},close:function(){e(this.element).find("div.jGrowl-notification").each(function(){e(this).trigger("jGrowl.beforeClose")})}}),e.jGrowl.defaults=e.fn.jGrowl.prototype.defaults}(jQuery),define("jgrowl",["jquery"],function(e){return function(){var t;return t||e.jQuery.jGrowl}}(this)),define("text!html/notificationsSettingsBlock.html",[],function(){return'Shows notification messages in the bottom-right corner of the\n screen.
\n\n'}),define("extensions/notifications",["jquery","underscore","utils","logger","classes/Extension","jgrowl","text!html/notificationsSettingsBlock.html"],function(e,t,n,i,r,o,a){function s(){f===!1&&(o.defaults.life=u.config.timeout,o.defaults.closer=!1,o.defaults.closeTemplate="",o.defaults.position="bottom-right",f=!0)}function l(e,n,r){if(i.info(e),s(),e){var a=e.indexOf("|");(-1===a||(e=e.substring(0,a)))&&(r=r||{},n=n||"icon-info-circled",o(" "+t.escape(e).replace(/\n/g,"\n \n\n\n ms\n\n
"),r))}}function c(){h!==!1&&(d.toggleClass("hide",!m),p.toggleClass("hide",m))}var u=new r("notifications","Notifications");u.settingsBlock=a,u.defaultConfig={timeout:8e3},u.onLoadSettings=function(){n.setInputValue("#input-notifications-timeout",u.config.timeout)},u.onSaveSettings=function(e,t){e.timeout=n.getInputIntValue("#input-notifications-timeout",t,1,6e4)};var d,p,f=!1,h=!1;u.onReady=function(){h=!0,d=e(".navbar .offline-status"),p=e(".navbar .extension-buttons"),c()},u.onMessage=function(e){l(e)},u.onError=function(e){i.error(e),t.isString(e)?l(e,"icon-attention"):t.isObject(e)&&l(e.message,"icon-attention")};var m=!1;return u.onOfflineChanged=function(e){m=e,c(),m===!0?l("You are offline.","icon-attention-circled msg-offline"):l("You are back online!","icon-signal")},u.onSyncImportSuccess=function(e,n){var i=t.map(e,function(e){return e.title}).join(", ");l(i+" imported successfully from "+n.providerName+".")},u.onSyncExportSuccess=function(e,t){l('"'+e.title+'" will now be synchronized on '+t.provider.providerName+".")},u.onSyncRemoved=function(e,t){l(t.provider.providerName+" synchronized location has been removed.")},u.onPublishSuccess=function(e){l('"'+e.title+'" successfully published.')},u.onNewPublishSuccess=function(e,t){l('"'+e.title+'" is now published on '+t.provider.providerName+".")},u.onPublishRemoved=function(e,t){l(t.provider.providerName+" publish location has been removed.")},u}),define("text!html/buttonToc.html",[],function(){return'\n \n'}),define("text!html/tocSettingsBlock.html",[],function(){return'Generates a table of contents when a [TOC] marker is found.
\n\n'}),define("extensions/toc",["jquery","underscore","utils","classes/Extension","text!html/buttonToc.html","text!html/tocSettingsBlock.html"],function(e,t,n,i,r,o){function a(e,t,n){this.tagName=e,this.anchor=t,this.text=n,this.children=[]}function s(e,n){function i(){void 0!==r&&(r.children.length>0&&(r.children=s(r.children,n+1)),l.push(r))}n=n||1;var r,o="H"+n,l=[];return t.each(e,function(e){e.tagName!=o?n!==c.config.maxDepth&&(void 0===r&&(r=new a),r.children.push(e)):(i(),r=e)}),i(),l}function l(){function e(e){for(var r=e.id||n.slugify(e.textContent)||"title",o=r,a=0;t.has(i,o);)o=r+"-"+ ++a;return i[o]=!0,e.id=o,o}var i={},r=[];return t.each(u.querySelectorAll("h1, h2, h3, h4, h5, h6"),function(t){r.push(new a(t.tagName,e(t),t.textContent))}),r=s(r),'\n \n\n\n \n \n\n\n \n\n\n \n\n\n \n\n \n\n\n\n \n\n\n\n"}var c=new i("toc","Table of Contents",!0);c.settingsBlock=o,c.defaultConfig={marker:"\\[(TOC|toc)\\]",maxDepth:6,button:!0},c.onLoadSettings=function(){n.setInputValue("#input-toc-marker",c.config.marker),n.setInputValue("#input-toc-maxdepth",c.config.maxDepth),n.setInputChecked("#input-toc-button",c.config.button)},c.onSaveSettings=function(e,t){e.marker=n.getInputRegExpValue("#input-toc-marker",t),e.maxDepth=n.getInputIntValue("#input-toc-maxdepth"),e.button=n.getInputChecked("#input-toc-button")},c.onCreatePreviewButton=function(){return c.config.button?r:void 0},a.prototype.childrenToString=function(){if(0===this.children.length)return"";var e="\n'+r.join("")+"
\n\n";return t.each(this.children,function(t){e+=t.toString()}),e+="
\n"},a.prototype.toString=function(){var e="";return this.anchor&&this.text&&(e+=''+this.text+""),e+=this.childrenToString()+" \n"};var u;return c.onPagedownConfigure=function(e){u=document.getElementById("preview-contents");var n=new RegExp("^\\s*"+c.config.marker+"\\s*$");e.hooks.chain("onPreviewRefresh",function(){var e=document.querySelectorAll(".table-of-contents, .toc"),i=l();t.each(u.getElementsByTagName("p"),function(e){n.test(e.innerHTML)&&(e.innerHTML=i)}),t.each(e,function(e){e.innerHTML=i})})},c}),define("extensions/emailConverter",["classes/Extension"],function(e){var t=new e("emailConverter","Markdown Email",!0);return t.settingsBlock="Converts email adresses in the form <email@example.com> into clickable links.
",t.onPagedownConfigure=function(e){e.getConverter().hooks.chain("postConversion",function(e){return e.replace(/<(mailto\:)?([^\s>]+@[^\s>]+\.\S+?)>/g,function(e,t,n){return''+n+""})})},t}),define("text!html/scrollSyncSettingsBlock.html",[],function(){return"Binds together editor and preview scrollbars.
\n\n Note: The mapping between Markdown and HTML is based on the\n position of the title elements (h1, h2...) in the page. Therefore if\n your document does not contain any title, the mapping will be linear and\n consequently less accurate.\n"}),define("extensions/scrollSync",["jquery","underscore","classes/Extension","text!html/scrollSyncSettingsBlock.html"],function(e,t,n,i){var r=new n("scrollSync","Scroll Sync",!0,!0);r.settingsBlock=i,e.easing.easeOutSine=function(e){return Math.cos((1-e)*Math.PI/2)};var o;r.onSectionsCreated=function(e){o=e};var a,s,l,c,u=!0,d=[],p=[],f=t.debounce(function(){if(u){d=[];var t,n,i=a.scrollTop();a.find(".wmd-input-section").each(function(){if(void 0===t)return void(t=0);var n=e(this.firstChild),r=n.position().top+i;d.push({startOffset:t,endOffset:r,height:r-t}),t=r}),n=a.prop("scrollHeight"),d.push({startOffset:t,endOffset:n,height:n-t}),p=[];var r,o=s.scrollTop();s.find(".wmd-preview-section").each(function(){if(void 0===r)return void(r=0);var t=e(this),n=t.position().top+o;p.push({startOffset:r,endOffset:n,height:n-r}),r=n}),n=s.prop("scrollHeight"),p.push({startOffset:r,endOffset:n,height:n-r}),l=-10,c=-10,y()}},500),h=!1,m=!1,g=!1,v=!1,b=e(""),y=t.throttle(function(){function e(e,n,i){var r,o=t.find(n,function(t,n){return r=n,e'}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},t.prototype.tip=function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip};var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var i=e(this),r=i.data("bs.popover"),o="object"==typeof n&&n;r||i.data("bs.popover",r=new t(this,o)),"string"==typeof n&&r[n]()})},e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(jQuery),+function(e){function t(n,i){var r,o=e.proxy(this.process,this);this.$element=e(e(n).is("body")?window:n),this.$body=e("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",o),this.options=e.extend({},t.DEFAULTS,i),this.selector=(this.options.target||(r=e(n).attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=e([]),this.targets=e([]),this.activeTarget=null,this.refresh(),this.process()}t.DEFAULTS={offset:10},t.prototype.refresh=function(){var t=this.$element[0]==window?"offset":"position";this.offsets=e([]),this.targets=e([]);{var n=this;this.$body.find(this.selector).map(function(){var i=e(this),r=i.data("target")||i.attr("href"),o=/^#\w/.test(r)&&e(r);return o&&o.length&&[[o[t]().top+(!e.isWindow(n.$scrollElement.get(0))&&n.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){n.offsets.push(this[0]),n.targets.push(this[1])})}},t.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,i=n-this.$scrollElement.height(),r=this.offsets,o=this.targets,a=this.activeTarget;if(t>=i)return a!=(e=o.last()[0])&&this.activate(e);for(e=r.length;e--;)a!=o[e]&&t>=r[e]&&(!r[e+1]||t<=r[e+1])&&this.activate(o[e])},t.prototype.activate=function(t){this.activeTarget=t,e(this.selector).parents(".active").removeClass("active");var n=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=e(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var i=e(this),r=i.data("bs.scrollspy"),o="object"==typeof n&&n;r||i.data("bs.scrollspy",r=new t(this,o)),"string"==typeof n&&r[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(jQuery),+function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=n.find(".active:last a")[0],o=e.Event("show.bs.tab",{relatedTarget:r});if(t.trigger(o),!o.isDefaultPrevented()){var a=e(i);this.activate(t.parent("li"),n),this.activate(a,a.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:r})})}}},t.prototype.activate=function(t,n,i){function r(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),a?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),i&&i()}var o=n.find("> .active"),a=i&&e.support.transition&&o.hasClass("fade");a?o.one(e.support.transition.end,r).emulateTransitionEnd(150):r(),o.removeClass("in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var i=e(this),r=i.data("bs.tab");r||i.data("bs.tab",r=new t(this)),"string"==typeof n&&r[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(jQuery),+function(e){var t=function(n,i){this.options=e.extend({},t.DEFAULTS,i),this.$window=e(window).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=this.unpin=null,this.checkPosition()};t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=e(document).height(),i=this.$window.scrollTop(),r=this.$element.offset(),o=this.options.offset,a=o.top,s=o.bottom;"object"!=typeof o&&(s=a=o),"function"==typeof a&&(a=o.top()),"function"==typeof s&&(s=o.bottom());var l=null!=this.unpin&&i+this.unpin<=r.top?!1:null!=s&&r.top+this.$element.height()>=n-s?"bottom":null!=a&&a>=i?"top":!1;this.affixed!==l&&(this.unpin&&this.$element.css("top",""),this.affixed=l,this.unpin="bottom"==l?r.top-i:null,this.$element.removeClass(t.RESET).addClass("affix"+(l?"-"+l:"")),"bottom"==l&&this.$element.offset({top:document.body.offsetHeight-s-this.$element.height()}))}};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var i=e(this),r=i.data("bs.affix"),o="object"==typeof n&&n;r||i.data("bs.affix",r=new t(this,o)),"string"==typeof n&&r[n]()})},e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(jQuery),define("bootstrap",function(){}),function(e,t){var n,i;return i=t.document,n=function(){function n(n){this._options=e.extend({name:"tour",container:"body",keyboard:!0,storage:t.localStorage,debug:!1,backdrop:!1,redirect:!0,orphan:!1,duration:!1,basePath:"",template:"n&&(n=0);var i,r=s.scrollTop();if(h===!0){if(Math.abs(n-l)<=9)return;if(h=!1,l=n,i=e(n,d,p),i=t.min([i,s.prop("scrollHeight")-s.outerHeight()]),Math.abs(i-r)<=9)return void(c=r);b.stop("scrollSyncFx",!0).css("value",0).animate({value:i-r},{easing:"easeOutSine",duration:200,queue:"scrollSyncFx",step:function(e){v=!0,c=r+e,s.scrollTop(c)},done:function(){setTimeout(function(){v=!1},10)}}).dequeue("scrollSyncFx")}else if(m===!0){if(Math.abs(r-c)<=9)return;if(m=!1,c=r,i=e(r,p,d),i=t.min([i,a.prop("scrollHeight")-a.outerHeight()]),Math.abs(i-n)<=9)return void(l=n);b.stop("scrollSyncFx",!0).css("value",0).animate({value:i-n},{easing:"easeOutSine",duration:200,queue:"scrollSyncFx",step:function(e){g=!0,l=n+e,a.scrollTop(l)},done:function(){setTimeout(function(){g=!1},10)}}).dequeue("scrollSyncFx")}}},100);r.onLayoutResize=function(){h=!0,f()},r.onFileClosed=function(){d=[]};var x=!1;r.onReady=function(){s=e(".preview-container"),a=e("#wmd-input"),s.scroll(function(){v===!1&&x===!1&&(m=!0,h=!1,y()),x=!1}),a.scroll(function(){g===!1&&(h=!0,m=!1,y())}),s.on("hide.layout.toggle",function(){u=!1}),s.on("shown.layout.toggle",function(){u=!0})};var w;return r.onPagedownConfigure=function(t){w=e("#preview-contents"),t.getConverter().hooks.chain("postConversion",function(e){return w.height(w.height()),e})},r.onPreviewFinished=function(){var e=w.height();w.height("auto");var t=w.height();h=!0,e>t&&(x=!0),f()},r}),define("text!html/buttonSyncSettingsBlock.html",[],function(){return' Adds a "Synchronize documents" button in the navigation bar.
\n\n'}),define("extensions/buttonSync",["jquery","underscore","crel","utils","classes/Extension","mousetrap","text!html/buttonSyncSettingsBlock.html"],function(e,t,n,i,r,o,a){var s=new r("buttonSync",'Button "Synchronize"',!1,!0);s.settingsBlock=a,s.defaultConfig={syncPeriod:18e4,syncShortcut:"mod+s"},s.onLoadSettings=function(){i.setInputValue("#input-sync-period",s.config.syncPeriod),i.setInputValue("#input-sync-shortcut",s.config.syncShortcut)},s.onSaveSettings=function(e,t){e.syncPeriod=i.getInputIntValue("#input-sync-period",t,0),e.syncShortcut=i.getInputTextValue("#input-sync-shortcut",t)};var l;s.onSynchronizerCreated=function(e){l=e};var c,u=!1,d=!1,p=function(){void 0!==c&&(u===!0||l.hasSync()===!1||d?c.addClass("disabled"):c.removeClass("disabled"))},f=0;return s.onPeriodicRun=function(){!s.config.syncPeriod||f+s.config.syncPeriod>i.currentTime||l.sync()&&(f=i.currentTime)},s.onCreateButton=function(){var t=n("a",{"class":"btn btn-success button-synchronize",title:"Force synchronization Ctrl/Cmd+S"},n("i",{"class":"icon-refresh"}));return c=e(t),c.click(function(){c.hasClass("disabled")||l.sync()&&(f=i.currentTime)}),t},s.onReady=p,s.onFileCreated=p,s.onFileDeleted=p,s.onSyncImportSuccess=p,s.onSyncExportSuccess=p,s.onSyncRemoved=p,s.onSyncRunning=function(e){u=e,p()},s.onOfflineChanged=function(e){d=e,p()},s.onReady=function(){o.bind(s.config.syncShortcut,function(e){l.sync()&&(f=i.currentTime),e.preventDefault()}),e(".action-force-synchronization").click(function(){l.sync()&&(f=i.currentTime)})},s}),define("extensions/buttonPublish",["jquery","underscore","crel","classes/Extension"],function(e,t,n,i){function r(){void 0!==o&&(c===!0||u===!1||d===!0?o.addClass("disabled"):o.removeClass("disabled"))}var o,a,s,l=new i("buttonPublish",'Button "Publish"'),c=!1,u=!1,d=!1;l.onPublisherCreated=function(e){s=e},l.onCreateButton=function(){var t=n("a",{"class":"btn btn-success button-publish",title:"Update document publication"},n("i",{"class":"icon-upload"}));return o=e(t).click(function(){o.hasClass("disabled")||s.publish()}),t},l.onPublishRunning=function(e){c=e,r()},l.onOfflineChanged=function(e){d=e,r()};var p=function(){u=0===t.size(a.publishLocations)?!1:!0,r()};return l.onFileSelected=function(e){a=e,p()},l.onReady=function(){e(".action-update-publication").click(s.publish)},l.onPublishRemoved=p,l.onNewPublishSuccess=p,l}),define("text!html/buttonStat.html",[],function(){return'\n \n'}),define("text!html/buttonStatSettingsBlock.html",[],function(){return'\n \n\n\n ms\n\n\n \n\n\n \n\nAdds a "Document statistics" button over the preview.
\n\n\n'}),define("extensions/buttonStat",["jquery","underscore","utils","classes/Extension","text!html/buttonStat.html","text!html/buttonStatSettingsBlock.html"],function(e,t,n,i,r,o){var a=new i("buttonStat",'Button "Statistics"',!0,!0);a.settingsBlock=o,a.defaultConfig={name1:"Characters",value1:"\\S",name2:"Words",value2:"\\S+",name3:"Paragraphs",value3:"\\S.*"},a.onLoadSettings=function(){t.each([1,2,3],function(e){n.setInputValue("#input-stat-name"+e,a.config["name"+e]),n.setInputValue("#input-stat-value"+e,a.config["value"+e])})},a.onSaveSettings=function(e,i){t.each([1,2,3],function(t){e["name"+t]=n.getInputTextValue("#input-stat-name"+t,i),e["value"+t]=n.getInputRegExpValue("#input-stat-value"+t,i)})},a.onCreatePreviewButton=function(){return t.template(r,a.config)};var s,l,c,u;return a.onReady=function(){s=document.getElementById("preview-contents"),l=document.getElementById("span-stat-value1"),c=document.getElementById("span-stat-value2"),u=document.getElementById("span-stat-value3")},a.onPreviewFinished=function(){for(var e=s.cloneNode(!0),t=e.getElementsByTagName("script"),n=t.length-1;n>=0;n--){var i=t[n];i.parentNode.removeChild(i)}var r=e.textContent;l.textContent=(r.match(new RegExp(a.config.value1,"g"))||[]).length,c.textContent=(r.match(new RegExp(a.config.value2,"g"))||[]).length,u.textContent=(r.match(new RegExp(a.config.value3,"g"))||[]).length},a}),define("text!html/buttonHtmlCode.html",[],function(){return'\n \n'}),define("text!html/buttonHtmlCodeSettingsBlock.html",[],function(){return'\n \n\n\n \n\n\n \n\nAdds a "HTML code" button over the preview.
\n\n'}),define("extensions/buttonHtmlCode",["jquery","underscore","utils","classes/Extension","text!html/buttonHtmlCode.html","text!html/buttonHtmlCodeSettingsBlock.html"],function(e,t,n,i,r,o){var a=new i("buttonHtmlCode",'Button "HTML code"',!0,!0);a.settingsBlock=o,a.defaultConfig={template:"<%= documentHTML %>"},a.onLoadSettings=function(){n.setInputValue("#textarea-html-code-template",a.config.template)},a.onSaveSettings=function(e){e.template=n.getInputValue("#textarea-html-code-template")};var s;a.onEventMgrCreated=function(e){s=e},a.onCreatePreviewButton=function(){return r};var l;a.onFileSelected=function(e){l=e};var c,u;return a.onPreviewFinished=function(e,t){c=e,u=t},a.onReady=function(){var n=document.getElementById("input-html-code");e(".action-html-code").click(function(){setTimeout(function(){e("#input-html-code").each(function(){e(this).is(":hidden")||this.select()})},10)}).parent().on("show.bs.dropdown",function(){try{var e=t.template(a.config.template,{documentTitle:l.title,documentMarkdown:l.content,strippedDocumentMarkdown:l.content.substring(l.frontMatter?l.frontMatter._frontMatter.length:0),documentHTML:u,documentHTMLWithComments:c,frontMatter:l.frontMatter,publishAttributes:void 0});n.value=e}catch(i){s.onError(i)}})},a}),define("text!html/buttonViewer.html",[],function(){return'\n \n\n'}),define("extensions/buttonViewer",["jquery","classes/Extension","text!html/buttonViewer.html"],function(e,t,n){var i=new t("buttonViewer",'Button "Viewer"',!0,!0);return i.settingsBlock='\n \n\n\n \n\nAdds a "Viewer" button over the preview.
',i.onCreatePreviewButton=function(){return n},i}),"undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");+function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,i=this;e(this).one(e.support.transition.end,function(){n=!0});var r=function(){n||e(i).trigger(e.support.transition.end)};return setTimeout(r,t),this},e(function(){e.support.transition=t()})}(jQuery),+function(e){var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function n(){o.trigger("closed.bs.alert").remove()}var i=e(this),r=i.attr("data-target");r||(r=i.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var o=e(r);t&&t.preventDefault(),o.length||(o=i.hasClass("alert")?i:i.parent()),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one(e.support.transition.end,n).emulateTransitionEnd(150):n())};var i=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var i=e(this),r=i.data("bs.alert");r||i.data("bs.alert",r=new n(this)),"string"==typeof t&&r[t].call(i)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=i,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(jQuery),+function(e){var t=function(n,i){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,i)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,i=n.is("input")?"val":"html",r=n.data();e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){"loadingText"==e?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons"]'),t=!0;if(e.length){var n=this.$element.find("input");"radio"===n.prop("type")&&(n.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&n.prop("checked",!this.$element.hasClass("active")).trigger("change")}t&&this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var i=e(this),r=i.data("bs.button"),o="object"==typeof n&&n;r||i.data("bs.button",r=new t(this,o)),"toggle"==n?r.toggle():n&&r.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle"),t.preventDefault()})}(jQuery),+function(e){var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},t.prototype.to=function(t){var n=this,i=this.getActiveIndex();return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){n.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(this.$items[t]))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){return this.sliding?void 0:this.slide("next")},t.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},t.prototype.slide=function(t,n){var i=this.$element.find(".item.active"),r=n||i[t](),o=this.interval,a="next"==t?"left":"right",s="next"==t?"first":"last",l=this;if(!r.length){if(!this.options.wrap)return;r=this.$element.find(".item")[s]()}this.sliding=!0,o&&this.pause();var c=e.Event("slide.bs.carousel",{relatedTarget:r[0],direction:a});if(!r.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var t=e(l.$indicators.children()[l.getActiveIndex()]);t&&t.addClass("active")})),e.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(c),c.isDefaultPrevented())return;r.addClass(t),r[0].offsetWidth,i.addClass(a),r.addClass(a),i.one(e.support.transition.end,function(){r.removeClass([t,a].join(" ")).addClass("active"),i.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(c),c.isDefaultPrevented())return;i.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")}return o&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var i=e(this),r=i.data("bs.carousel"),o=e.extend({},t.DEFAULTS,i.data(),"object"==typeof n&&n),a="string"==typeof n?n:o.slide;r||i.data("bs.carousel",r=new t(this,o)),"number"==typeof n?r.to(n):a?r[a]():o.interval&&r.pause().cycle()})},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n,i=e(this),r=e(i.attr("data-target")||(n=i.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"")),o=e.extend({},r.data(),i.data()),a=i.attr("data-slide-to");a&&(o.interval=!1),r.carousel(o),(a=i.attr("data-slide-to"))&&r.data("bs.carousel").to(a),t.preventDefault()}),e(window).on("load",function(){e('[data-ride="carousel"]').each(function(){var t=e(this);t.carousel(t.data())})})}(jQuery),+function(e){var t=function(n,i){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,i),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e=this.$element.hasClass("width");return e?"width":"height"},t.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t=e.Event("show.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.$parent&&this.$parent.find("> .panel > .in");if(n&&n.length){var i=n.data("bs.collapse");if(i&&i.transitioning)return;n.collapse("hide"),i||n.data("bs.collapse",null)}var r=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[r](0),this.transitioning=1;var o=function(){this.$element.removeClass("collapsing").addClass("in")[r]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse") -};if(!e.support.transition)return o.call(this);var a=e.camelCase(["scroll",r].join("-"));this.$element.one(e.support.transition.end,e.proxy(o,this)).emulateTransitionEnd(350)[r](this.$element[0][a])}}},t.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=e.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return e.support.transition?void this.$element[n](0).one(e.support.transition.end,e.proxy(i,this)).emulateTransitionEnd(350):i.call(this)}}},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var i=e(this),r=i.data("bs.collapse"),o=e.extend({},t.DEFAULTS,i.data(),"object"==typeof n&&n);r||i.data("bs.collapse",r=new t(this,o)),"string"==typeof n&&r[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(t){var n,i=e(this),r=i.attr("data-target")||t.preventDefault()||(n=i.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""),o=e(r),a=o.data("bs.collapse"),s=a?"toggle":i.data(),l=i.attr("data-parent"),c=l&&e(l);a&&a.transitioning||(c&&c.find('[data-toggle=collapse][data-parent="'+l+'"]').not(i).addClass("collapsed"),i[o.hasClass("in")?"addClass":"removeClass"]("collapsed")),o.collapse(s)})}(jQuery),+function(e){function t(){e(i).remove(),e(r).each(function(t){var i=n(e(this));i.hasClass("open")&&(i.trigger(t=e.Event("hide.bs.dropdown")),t.isDefaultPrevented()||i.removeClass("open").trigger("hidden.bs.dropdown"))})}function n(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&e(n);return i&&i.length?i:t.parent()}var i=".dropdown-backdrop",r="[data-toggle=dropdown]",o=function(t){e(t).on("click.bs.dropdown",this.toggle)};o.prototype.toggle=function(i){var r=e(this);if(!r.is(".disabled, :disabled")){var o=n(r),a=o.hasClass("open");if(t(),!a){if("ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&e('').insertAfter(e(this)).on("click",t),o.trigger(i=e.Event("show.bs.dropdown")),i.isDefaultPrevented())return;o.toggleClass("open").trigger("shown.bs.dropdown"),r.focus()}return!1}},o.prototype.keydown=function(t){if(/(38|40|27)/.test(t.keyCode)){var i=e(this);if(t.preventDefault(),t.stopPropagation(),!i.is(".disabled, :disabled")){var o=n(i),a=o.hasClass("open");if(!a||a&&27==t.keyCode)return 27==t.which&&o.find(r).focus(),i.click();var s=e("[role=menu] li:not(.divider):visible a",o);if(s.length){var l=s.index(s.filter(":focus"));38==t.keyCode&&l>0&&l--,40==t.keyCode&&l').appendTo(document.body),this.$element.on("click.dismiss.modal",e.proxy(function(e){e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,i){return this.each(function(){var r=e(this),o=r.data("bs.modal"),a=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n);o||r.data("bs.modal",o=new t(this,a)),"string"==typeof n?o[n](i):a.show&&o.show(i)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),i=n.attr("href"),r=e(n.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),o=r.data("modal")?"toggle":e.extend({remote:!/#/.test(i)&&i},r.data(),n.data());t.preventDefault(),r.modal(o,this).one("hide",function(){n.is(":visible")&&n.focus()})}),e(document).on("show.bs.modal",".modal",function(){e(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){e(document.body).removeClass("modal-open")})}(jQuery),+function(e){var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:' ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,n,i){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(i);for(var r=this.options.trigger.split(" "),o=r.length;o--;){var a=r[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focus",l="hover"==a?"mouseleave":"blur";this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,i){n[e]!=i&&(t[e]=i)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show()},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},t.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(t),t.isDefaultPrevented())return;var n=this.tip();this.setContent(),this.options.animation&&n.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,r=/\s?auto?\s?/i,o=r.test(i);o&&(i=i.replace(r,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass(i),this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var a=this.getPosition(),s=n[0].offsetWidth,l=n[0].offsetHeight;if(o){var c=this.$element.parent(),u=i,d=document.documentElement.scrollTop||document.body.scrollTop,p="body"==this.options.container?window.innerWidth:c.outerWidth(),f="body"==this.options.container?window.innerHeight:c.outerHeight(),h="body"==this.options.container?0:c.offset().left;i="bottom"==i&&a.top+a.height+l-d>f?"top":"top"==i&&a.top-d-l<0?"bottom":"right"==i&&a.right+s>p?"left":"left"==i&&a.left-s",afterSetState:function(){},afterGetState:function(){},afterRemoveState:function(){},onStart:function(){},onEnd:function(){},onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNext:function(){},onPrev:function(){},onPause:function(){},onResume:function(){}},n),this._force=!1,this._inited=!1,this._steps=[],this.backdrop={overlay:null,$element:null,$background:null,backgroundShown:!1,overlayElementShown:!1}}return n.prototype.setState=function(e,t){var n,i;if(this._options.storage){i=""+this._options.name+"_"+e;try{this._options.storage.setItem(i,t)}catch(r){n=r,n.code===DOMException.QUOTA_EXCEEDED_ERR&&this.debug("LocalStorage quota exceeded. setState failed.")}return this._options.afterSetState(i,t)}return null==this._state&&(this._state={}),this._state[e]=t},n.prototype.removeState=function(e){var t;return this._options.storage?(t=""+this._options.name+"_"+e,this._options.storage.removeItem(t),this._options.afterRemoveState(t)):null!=this._state?delete this._state[e]:void 0},n.prototype.getState=function(e){var t,n;return this._options.storage?(t=""+this._options.name+"_"+e,n=this._options.storage.getItem(t)):null!=this._state&&(n=this._state[e]),(void 0===n||"null"===n)&&(n=null),this._options.afterGetState(e,n),n},n.prototype.addSteps=function(e){var t,n,i,r;for(r=[],n=0,i=e.length;i>n;n++)t=e[n],r.push(this.addStep(t));return r},n.prototype.addStep=function(e){return this._steps.push(e)},n.prototype.getStep=function(t){return null!=this._steps[t]?e.extend({id:"step-"+t,path:"",placement:"right",title:"",content:"",next:t===this._steps.length-1?-1:t+1,prev:t-1,animation:!0,container:this._options.container,backdrop:this._options.backdrop,redirect:this._options.redirect,orphan:this._options.orphan,duration:this._options.duration,template:this._options.template,onShow:this._options.onShow,onShown:this._options.onShown,onHide:this._options.onHide,onHidden:this._options.onHidden,onNext:this._options.onNext,onPrev:this._options.onPrev,onPause:this._options.onPause,onResume:this._options.onResume},this._steps[t]):void 0},n.prototype.init=function(e){var t=this;return this._force=e,this.ended()?this._debug("Tour ended, init prevented."):(this.setCurrentStep(),this._setupMouseNavigation(),this._setupKeyboardNavigation(),this._onResize(function(){return t.showStep(t._current)}),null!==this._current&&this.showStep(this._current),this._inited=!0,this)},n.prototype.start=function(e){var t;return null==e&&(e=!1),this._inited||this.init(e),null===this._current?(t=this._makePromise(null!=this._options.onStart?this._options.onStart(this):void 0),this._callOnPromiseDone(t,this.showStep,0)):void 0},n.prototype.next=function(){var e;return this.ended()?this._debug("Tour ended, next prevented."):(e=this.hideStep(this._current),this._callOnPromiseDone(e,this._showNextStep))},n.prototype.prev=function(){var e;return this.ended()?this._debug("Tour ended, prev prevented."):(e=this.hideStep(this._current),this._callOnPromiseDone(e,this._showPrevStep))},n.prototype.goTo=function(e){var t;return this.ended()?this._debug("Tour ended, goTo prevented."):(t=this.hideStep(this._current),this._callOnPromiseDone(t,this.showStep,e))},n.prototype.end=function(){var n,r,o=this;return n=function(){return e(i).off("click.tour-"+o._options.name),e(i).off("keyup.tour-"+o._options.name),e(t).off("resize.tour-"+o._options.name),o.setState("end","yes"),o._inited=!1,o._force=!1,o._clearTimer(),null!=o._options.onEnd?o._options.onEnd(o):void 0},r=this.hideStep(this._current),this._callOnPromiseDone(r,n)},n.prototype.ended=function(){return!this.force&&!!this.getState("end")},n.prototype.restart=function(){return this.removeState("current_step"),this.removeState("end"),this.setCurrentStep(0),this.start()},n.prototype.pause=function(){var e;return e=this.getStep(this._current),e&&e.duration?(this._paused=!0,this._duration-=(new Date).getTime()-this._start,t.clearTimeout(this._timer),this._debug("Paused/Stopped step "+(this._current+1)+" timer ("+this._duration+" remaining)."),null!=e.onPause?e.onPause(this,this._duration):void 0):void 0},n.prototype.resume=function(){var e,n=this;return e=this.getStep(this._current),e&&e.duration?(this._paused=!1,this._start=(new Date).getTime(),this._duration=this._duration||e.duration,this._timer=t.setTimeout(function(){return n._isLast()?n.next():n.end()},this._duration),this._debug("Started step "+(this._current+1)+" timer with duration "+this._duration),null!=e.onResume&&this._duration!==e.duration?e.onResume(this,this._duration):void 0):void 0},n.prototype.hideStep=function(t){var n,i,r,o=this;return(r=this.getStep(t))?(this._clearTimer(),i=this._makePromise(null!=r.onHide?r.onHide(this,t):void 0),n=function(){var t;return t=e(r.element),t.data("bs.popover")||t.data("popover")||(t=e("body")),t.popover("destroy"),r.reflex&&t.css("cursor","").off("click.tour-"+o._options.name),r.backdrop&&o._hideBackdrop(),null!=r.onHidden?r.onHidden(o):void 0},this._callOnPromiseDone(i,n),i):void 0},n.prototype.showStep=function(t){var n,r,o,a,s=this;return(a=this.getStep(t))?(o=t").parent().html(),i.popover({placement:t.placement,trigger:"manual",title:t.title,content:t.content,html:!0,animation:t.animation,container:t.container,template:t.template,selector:t.element}).popover("show"),a=i.data("bs.popover")?i.data("bs.popover").tip():i.data("popover").tip(),a.attr("id",t.id),this._reposition(a,t),s?this._center(a):void 0},n.prototype._reposition=function(t,n){var r,o,a,s,l,c,u;if(s=t[0].offsetWidth,o=t[0].offsetHeight,u=t.offset(),l=u.left,c=u.top,r=e(i).outerHeight()-u.top-t.outerHeight(),0>r&&(u.top=u.top+r),a=e("html").outerWidth()-u.left-t.outerWidth(),0>a&&(u.left=u.left+a),u.top<0&&(u.top=0),u.left<0&&(u.left=0),t.offset(u),"bottom"===n.placement||"top"===n.placement){if(l!==u.left)return this._replaceArrow(t,2*(u.left-l),s,"left")}else if(c!==u.top)return this._replaceArrow(t,2*(u.top-c),o,"top")},n.prototype._center=function(n){return n.css("top",e(t).outerHeight()/2-n.outerHeight()/2)},n.prototype._replaceArrow=function(e,t,n,i){return e.find(".arrow").css(i,t?50*(1-t/n)+"%":"")},n.prototype._scrollIntoView=function(n,i){var r,o,a,s,l,c=this;return n?(r=e(n),o=e(t),a=r.offset().top,l=o.height(),s=Math.max(0,a-l/2),this._debug("Scroll into view. ScrollTop: "+s+". Element offset: "+a+". Window height: "+l+"."),e("body").stop().animate({scrollTop:Math.ceil(s)},function(){return i(),c._debug("Scroll into view. Animation end element offset: "+r.offset().top+". Window height: "+o.height()+".")})):i()},n.prototype._onResize=function(n,i){return e(t).on("resize.tour-"+this._options.name,function(){return clearTimeout(i),i=setTimeout(n,100)})},n.prototype._setupMouseNavigation=function(){var t=this;return t=this,e(i).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role=next]:not(.disabled)").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role=next]:not(.disabled)",function(e){return e.preventDefault(),t.next()}),e(i).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role=prev]:not(.disabled)").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role=prev]:not(.disabled)",function(e){return e.preventDefault(),t.prev()}),e(i).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role=end]").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role=end]",function(e){return e.preventDefault(),t.end()}),e(i).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role=pause-resume]").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role=pause-resume]",function(n){var i; -return n.preventDefault(),i=e(this),i.text(i.data(t._paused?"pause-text":"resume-text")),t._paused?t.resume():t.pause()})},n.prototype._setupKeyboardNavigation=function(){var t=this;if(this._options.keyboard)return e(i).on("keyup.tour-"+this._options.name,function(e){if(e.which)switch(e.which){case 39:return e.preventDefault(),t._isLast()?t.next():t.end();case 37:if(e.preventDefault(),t._current>0)return t.prev();break;case 27:return e.preventDefault(),t.end()}})},n.prototype._makePromise=function(t){return t&&e.isFunction(t.then)?t:null},n.prototype._callOnPromiseDone=function(e,t,n){var i=this;return e?e.then(function(){return t.call(i,n)}):t.call(this,n)},n.prototype._showBackdrop=function(){return this.backdrop.backgroundShown?void 0:(this.backdrop=e("",{"class":"tour-backdrop"}),this.backdrop.backgroundShown=!0,e("body").append(this.backdrop))},n.prototype._hideBackdrop=function(){return this._hideOverlayElement(),this._hideBackground()},n.prototype._hideBackground=function(){return this.backdrop.remove(),this.backdrop.overlay=null,this.backdrop.backgroundShown=!1},n.prototype._showOverlayElement=function(t){var n,i,r;if(!this.backdrop.overlayElementShown)return this.backdrop.overlayElementShown=!0,i=e(t),n=e(""),r=i.offset(),r.top=r.top,r.left=r.left,n.width(i.innerWidth()).height(i.innerHeight()).addClass("tour-step-background").offset(r),i.addClass("tour-step-backdrop"),e("body").append(n),this.backdrop.$element=i,this.backdrop.$background=n},n.prototype._hideOverlayElement=function(){return this.backdrop.overlayElementShown?(this.backdrop.$element.removeClass("tour-step-backdrop"),this.backdrop.$background.remove(),this.backdrop.$element=null,this.backdrop.$background=null,this.backdrop.overlayElementShown=!1):void 0},n.prototype._clearTimer=function(){return t.clearTimeout(this._timer),this._timer=null,this._duration=null},n}(),t.Tour=n}(jQuery,window),define("bootstrap-tour",["bootstrap"],function(e){return function(){var t;return t||e.Tour}}(this)),define("extensions/welcomeTour",["underscore","jquery","storage","classes/Extension","bootstrap-tour"],function(e,t,n,i,r){var o,a=new i("welcomeTour","Welcome tour",!1,!0);return a.onEventMgrCreated=function(e){o=e},a.onReady=function(){function i(e,n,i){var r=t(e).tooltip({html:!0,placement:i,trigger:"manual",title:n}).tooltip("show").addClass("info-tooltip");r.one("click",function(){r.tooltip("hide").removeClass("info-tooltip")}),setTimeout(function(){r.tooltip("hide").removeClass("info-tooltip")},2e4)}var a=new r({keyboard:!1,storage:{getItem:function(){},setItem:function(){},removeItem:function(){}},onEnd:function(){n.welcomeTour="done",i(".menu-panel .toggle-button *","Synchronize, publish and more...","right"),i(".document-panel .toggle-button *","Create and manage documents","left"),i(".extension-preview-buttons .btn-group:first","Need help with Markdown syntax?","left"),i(".layout-toggler-preview","Toggle preview","right")},template:[' ',' ',' ',' ',' ",""].join("")});a.addSteps([{element:".navbar-inner",title:"StackEdit 4 beta preview!",content:["What's new?
","","
",'- New contenteditable based editor (credit to Dabblet, Editorially...)
","- New layout with CSS3 transitions (lighter supposedly)
","- Comments/discussions support (see the new icon in the navigation bar)
","- Auto-merge and conflict detection using standard synchronization
","- Dropped real time sync support :( since you can collaborate simultaneously using standard synchronization
","Please provide your feedback here... Thanks!
',''].join(""),placement:"bottom",onShown:function(){o.onTweet()}}]),e.has(n,"welcomeTour")||a.start(),t(".action-welcome-tour").click(function(){a.restart()})},a}),define("text!extensions/shortcutsDefaultMapping.settings",[],function(){return"{\n 'mod+b': bindPagedownButton('bold'),\n 'mod+i': bindPagedownButton('italic'),\n 'mod+l': bindPagedownButton('link'),\n 'mod+q': bindPagedownButton('quote'),\n 'mod+k': bindPagedownButton('code'),\n 'mod+g': bindPagedownButton('image'),\n 'mod+o': bindPagedownButton('olist'),\n 'mod+u': bindPagedownButton('ulist'),\n 'mod+h': bindPagedownButton('heading'),\n 'mod+r': bindPagedownButton('hr'),\n 'mod+z': bindPagedownButton('undo'),\n 'mod+y': bindPagedownButton('redo'),\n 'mod+shift+z': bindPagedownButton('redo'),\n 'mod+m': function(evt) {\n $('.button-open-discussion').click();\n evt.preventDefault();\n },\n '= = > space': function() {\n expand('==> ', '⇒ ');\n },\n '< = = space': function() {\n expand('<== ', '⇐ ');\n },\n 'S t a c k E d i t': function() {\n eventMgr.onMessage(\"You are stunned!!! Aren't you?\");\n }\n}\n"}),define("text!html/shortcutsSettingsBlock.html",[],function(){return'Maps keyboard shortcuts to JavaScript functions.
\n\n\n'}),define("extensions/shortcuts",["jquery","underscore","utils","mousetrap","classes/Extension","text!extensions/shortcutsDefaultMapping.settings","text!html/shortcutsSettingsBlock.html"],function($,_,utils,mousetrap,Extension,shortcutsDefaultMapping,shortcutsSettingsBlockHTML){function bindPagedownButton(e){return function(t){pagedownEditor.uiManager.doClick(pagedownEditor.uiManager.buttons[e]),t.preventDefault()}}function expand(e,t){utils.defer(function(){require("editor").replacePreviousText(e,t)})}var shortcuts=new Extension("shortcuts","Shortcuts",!0,!0);shortcuts.settingsBlock=shortcutsSettingsBlockHTML,shortcuts.defaultConfig={mapping:shortcutsDefaultMapping};var eventMgr,pagedownEditor;return shortcuts.onEventMgrCreated=function(e){eventMgr=e,eventMgr.addListener("onPagedownConfigure",function(e){pagedownEditor=e})},shortcuts.onLoadSettings=function(){utils.setInputValue("#textarea-shortcuts-mapping",shortcuts.config.mapping)},shortcuts.onSaveSettings=function(newConfig,event){newConfig.code=utils.getInputValue("#textarea-shortcuts-mapping");try{eval("var test = "+newConfig.code)}catch(e){eventMgr.onError(e),utils.getInputTextValue("#textarea-shortcuts-mapping",event,/^$/)}},shortcuts.onInit=function(){try{var shortcutMap;eval("shortcutMap = "+shortcuts.config.mapping),_.each(shortcutMap,function(e,t){mousetrap.bind(t,e)})}catch(e){console.error(e)}},shortcuts}),define("text!html/userCustomSettingsBlock.html",[],function(){return'\n \n\n\n \n\nAllows users to implement their own extension.
\n\n\nMore info'}),define("extensions/userCustom",["jquery","underscore","utils","classes/Extension","fileSystem","settings","text!html/userCustomSettingsBlock.html"],function($,_,utils,Extension,fileSystem,settings,userCustomSettingsBlockHTML){var userCustom=new Extension("userCustom","UserCustom extension",!0);userCustom.settingsBlock=userCustomSettingsBlockHTML,userCustom.defaultConfig={code:""};var fileMgr;userCustom.onFileMgrCreated=function(e){fileMgr=e};var synchronizer;userCustom.onSynchronizerCreated=function(e){synchronizer=e};var publisher;userCustom.onPublisherCreated=function(e){publisher=e};var eventMgr;return userCustom.onEventMgrCreated=function(e){eventMgr=e},userCustom.onLoadSettings=function(){utils.setInputValue("#textarea-usercustom-code",userCustom.config.code)},userCustom.onSaveSettings=function(newConfig,event){newConfig.code=utils.getInputValue("#textarea-usercustom-code");try{eval(newConfig.code)}catch(e){eventMgr.onError(e),utils.getInputTextValue("#textarea-usercustom-code",event,/^$/)}},userCustom.onInit=function(){try{eval(userCustom.config.code)}catch(e){console.error(e)}},userCustom}),define("text!html/commentsPopoverContent.html",[],function(){return'\n \n\n\n \n\n\n\n<%= commentList %>\n\n\n\n \n \n\n\n \n\n
\n'}),define("extensions/comments",["jquery","underscore","utils","storage","crel","rangy","classes/Extension","text!html/commentsPopoverContent.html","bootstrap"],function(e,t,n,i,r,o,a,s){function l(e,t,n){t=Math.round(t);for(var i=t-21;t+22>i;)w[i]&&(t=i+22),i++;!n&&(w[t]=1);var r=-8;-1!==e.className.indexOf(" icon-split")&&(r=-12);var o=t+r;e.style.top=o+"px",e.style.right="12px"}function c(t,n){this.commentElt=t,this.$commentElt=e(t).addClass("active"),this.fileDesc=n,this.discussionIndex=t.discussionIndex}function u(e){var t=C.getPopoverElt(),n=0;t.offsetWidthi&&(t.style.top=parseInt(t.style.top)+i+"px")}function d(){C&&C.$commentElt.popover("toggle").popover("destroy")}function p(){var e=C.getDiscussion(),n=i["author.name"],r=[];return e.commentList&&(r=e.commentList.map(function(e){var i=e.author||"Anonymous";return t.template(m,{author:i,content:e.content,reply:e.author!=n})})),"conflict"==e.type&&r.unshift(t.template(m,{author:"StackEdit",content:"Multiple users have made conflicting modifications.",reply:!0})),r.join("")}var f,h=new a("comments","Comments",!1,!0),m=[" \">",'"].join(""),g=[' ',' ',' ',' '," "," “<%- title %>”",""].join("");h.onEventMgrCreated=function(e){f=e};var v,b;h.onEditorCreated=function(e){v=e,b=v.selectionMgr};var y,x,w=[],S=r("a",{"class":"discussion icon-comment new"});c.prototype.getDiscussion=function(){return this.discussionIndex?this.fileDesc.discussionList[this.discussionIndex]:this.fileDesc.newDiscussion},c.prototype.getPopoverElt=function(){return document.querySelector(".comments-popover .popover:last-child")};var C,T,E,k,_,I,D={},N=[],L=!1,M=t.debounce(function(){function e(){var i;if(0===o.length)return t.filter(D,function(e,n){return!t.has(E.discussionList,n)}).forEach(function(e){x.removeChild(e),delete D[e.discussionIndex]}),C&&!C.discussionIndex&&(i=b.getCoordinates(C.getDiscussion().selectionEnd),l(S,i.y,!0),y.scrollTop+=parseInt(S.style.top)-y.scrollTop-3*y.offsetHeight/4,u(S)),N=t.sortBy(D,function(e){return e.selectionEnd}),_.toggleClass("some",0!==N.length),_.toggleClass("replied",L),void I.toggleClass("icon-chat",0!==N.length);var a=o.shift(),s=D[a.discussionIndex];s||(s=r("a"));var c="discussion",d=!a.commentList||!n||t.last(a.commentList).author!=n;d&&(L=!0),c+="conflict"==a.type?" icon-split":" icon-comment",c+=d?" replied":" added",s.className=c,s.discussionIndex=a.discussionIndex,s.selectionEnd=a.selectionEnd,i=b.getCoordinates(a.selectionEnd),l(s,i.y),x.appendChild(s),D[a.discussionIndex]=s,C&&C.getDiscussion()===a&&(y.scrollTop+=parseInt(s.style.top)-y.scrollTop-3*y.offsetHeight/4,u(s)),k=setTimeout(e,5)}if(void 0!==E){L=!1,N=[];var n=i["author.name"];w=[];var o=t.sortBy(E.discussionList,function(e){return e.selectionEnd});clearTimeout(k),k=setTimeout(e,5)}},50);return h.onLayoutResize=M,h.onFileOpen=function(e){E=e,M()},h.onContentChanged=function(e){E===e&&M()},h.onCommentsChanged=function(e){if(E===e){if(void 0!==C){var t=C;t.discussionIndex&&(t.getPopoverElt().querySelector(".discussion-comment-list").innerHTML=p());try{T.undoToRange(t.rangyRange)}catch(n){}var i=t.getDiscussion();t.selectionRange=b.createRange(i.selectionStart,i.selectionEnd),t.rangyRange=o.createRange(),t.rangyRange.setStart(t.selectionRange.startContainer,t.selectionRange.startOffset),t.rangyRange.setEnd(t.selectionRange.endContainer,t.selectionRange.endOffset),setTimeout(function(){C===t&&T.applyToRange(t.rangyRange)},50)}M()}},h.onDiscussionCreated=function(e){E===e&&M()},h.onDiscussionRemoved=function(e,t){E===e&&(void 0!==C&&C.discussionIndex==t.discussionIndex&&d(),M())},h.onReady=function(){T=o.createCssClassApplier("comment-highlight",{normalize:!1});var a="";y=document.getElementById("wmd-input"),x=document.querySelector("#wmd-input > .editor-margin"),x.appendChild(S);var h=e(r("div",{"class":"comments-popover"}));e(document.body).append(h).on("click",function(e){C&&C.$commentElt[0]!==e.target&&d()}).popover({placement:"auto top",container:".comments-popover",html:!0,title:function(){if(!C)return!0;var e=C.getDiscussion(),n=e.selectionEnd-e.selectionStart,i=v.getValue().substr(e.selectionStart,n>20?20:n);return n>20&&(i+="..."),t.template(g,{title:i})},content:function(){var e=t.template(s,{commentList:p()});return e},selector:"#wmd-input > .editor-margin > .discussion"}),e(x).on("show.bs.popover",function(e){d();var t=new c(e.target,E);C=t;var n=t.getDiscussion();if(!n){var i=Math.min(b.selectionStart,b.selectionEnd),r=Math.max(b.selectionStart,b.selectionEnd);if(i===r){var o=b.getClosestWordOffset(i);i=o.start,r=o.end}n={selectionStart:i,selectionEnd:r,commentList:[]},E.newDiscussion=n;var a=b.getCoordinates(i);l(S,a.y,!0)}t.selectionRange=b.createRange(n.selectionStart,n.selectionEnd),y.scrollTop+=parseInt(e.target.style.top)-y.scrollTop-3*y.offsetHeight/4}).on("shown.bs.popover",function(r){var s=C,l=s.getPopoverElt();s.$authorInputElt=e(l.querySelector(".input-comment-author")).val(i["author.name"]),s.$contentInputElt=e(l.querySelector(".input-comment-content")),s.hr=l.querySelector("hr"),u(s.commentElt),l.querySelector(".scrollport").scrollTop=9999999;var c=e(l.querySelector(".action-add-comment"));e().add(s.$contentInputElt).add(s.$authorInputElt).keydown(function(e){switch(e.which){case 13:return e.preventDefault(),void c.click();case 27:return e.preventDefault(),d(),v.focus(),void v.adjustCursorPosition()}}),c.click(function(e){var i=n.getInputTextValue(s.$authorInputElt),r=n.getInputTextValue(s.$contentInputElt,e);if(!e.isPropagationStopped()){var o=s.getDiscussion();s.$contentInputElt.val(""),d(),o.commentList=o.commentList||[],o.commentList.push({author:i,content:r});var a=s.fileDesc.discussionList||{};if(o.discussionIndex)s.fileDesc.discussionList=a,f.onCommentsChanged(s.fileDesc);else{var l;do l=n.randomString();while(t.has(a,l));o.discussionIndex=l,a[l]=o,s.fileDesc.discussionList=a,f.onDiscussionCreated(s.fileDesc,o)}y.focus()}});var p=e(l.querySelector(".action-remove-discussion"));r.target.discussionIndex?p.click(function(){d();var e=s.getDiscussion();delete s.fileDesc.discussionList[e.discussionIndex],s.fileDesc.discussionList=s.fileDesc.discussionList,f.onDiscussionRemoved(s.fileDesc,e),y.focus()}):p.hide(),s.rangyRange=o.createRange(),s.rangyRange.setStart(s.selectionRange.startContainer,s.selectionRange.startOffset),s.rangyRange.setEnd(s.selectionRange.endContainer,s.selectionRange.endOffset),setTimeout(function(){C===s&&T.applyToRange(s.rangyRange)},50),s.$contentInputElt.focus().val(a)}).on("hide.bs.popover",function(){C&&(C.$commentElt.removeClass("active"),a=C.$contentInputElt.val(),i["author.name"]=C.$authorInputElt.val(),T.undoToRange(C.rangyRange),C=void 0,delete E.newDiscussion)}),h.on("click",".popover",function(e){e.stopPropagation()});var m=e(S);_=e(".button-open-discussion").click(function(n){var i=m;if(C)if(C.discussionIndex){var r=-1;N.some(function(e,t){return e===C.commentElt?(r=t,!0):void 0}),i=e(N[r+1])}else i=e(t.first(N));0===i.length?(d(),v.focus(),v.adjustCursorPosition()):i.click(),n.stopPropagation()}),I=_.find("i")},h}),function(e){var t="waitForImages";e.waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage"]},e.expr[":"].uncached=function(t){if(!e(t).is('img[src!=""]'))return!1;var n=new Image;return n.src=t.src,!n.complete},e.fn.waitForImages=function(n,i,r){var o=0,a=0;if(e.isPlainObject(arguments[0])&&(r=arguments[0].waitForAll,i=arguments[0].each,n=arguments[0].finished),n=n||e.noop,i=i||e.noop,r=!!r,!e.isFunction(n)||!e.isFunction(i))throw new TypeError("An invalid callback was supplied.");return this.each(function(){var s=e(this),l=[],c=e.waitForImages.hasImageProperties||[],u=/url\(\s*(['"]?)(.*?)\1\s*\)/g;r?s.find("*").andSelf().each(function(){var t=e(this);t.is("img:uncached")&&l.push({src:t.attr("src"),element:t[0]}),e.each(c,function(e,n){var i,r=t.css(n);if(!r)return!0;for(;i=u.exec(r);)l.push({src:i[2],element:t[0]})})}):s.find("img:uncached").each(function(){l.push({src:this.src,element:this})}),o=l.length,a=0,0===o&&n.call(s[0]),e.each(l,function(r,l){var c=new Image;e(c).bind("load."+t+" error."+t,function(e){return a++,i.call(l.element,a,o,"load"==e.type),a==o?(n.call(s[0]),!1):void 0}),c.src=l.src})})}}(jQuery),define("jquery-waitforimages",function(){}),define("eventMgr",["jquery","underscore","crel","utils","logger","classes/Extension","settings","text!html/settingsExtensionsAccordion.html","extensions/yamlFrontMatterParser","extensions/markdownSectionParser","extensions/partialRendering","extensions/buttonMarkdownSyntax","extensions/googleAnalytics","extensions/twitter","extensions/dialogAbout","extensions/dialogManagePublication","extensions/dialogManageSynchronization","extensions/dialogManageSharing","extensions/dialogOpenHarddrive","extensions/documentTitle","extensions/documentSelector","extensions/documentPanel","extensions/documentManager","extensions/workingIndicator","extensions/notifications","extensions/markdownExtra","extensions/toc","extensions/mathJax","extensions/emailConverter","extensions/scrollSync","extensions/buttonSync","extensions/buttonPublish","extensions/buttonStat","extensions/buttonHtmlCode","extensions/buttonViewer","extensions/welcomeTour","extensions/shortcuts","extensions/userCustom","extensions/comments","bootstrap","jquery-waitforimages"],function(e,t,n,i,r,o,a,s){function l(e){return t.chain(p).map(function(t){return t.enabled&&t[e]}).compact().value()}function c(e){return h[e]=l(e),function(){r.log(e,arguments);var n=arguments;t.each(h[e],function(e){try{e.apply(null,n)}catch(i){console.error(t.isObject(i)?i.stack:i)}})}}function u(e){d[e]=c(e)}var d={},p=t.chain(arguments).map(function(e){return e instanceof o&&e}).compact().value(),f=a.extensionSettings||{};t.each(p,function(e){e.config=t.extend({},e.defaultConfig,f[e.extensionId]),e.enabled=window.viewerMode===!0&&e.disableInViewer===!0?!1:!e.isOptional||void 0===e.config.enabled||e.config.enabled===!0});var h={};d.addListener=function(e,t){try{h[e].push(t)}catch(n){console.error("No event listener called "+e)}},c("onInit")(),d.onLoadSettings=function(){r.log("onLoadSettings"),t.each(p,function(e){var t=!e.isOptional||void 0===e.config.enabled||e.config.enabled===!0;i.setInputChecked("#input-enable-extension-"+e.extensionId,t),"markdownExtra"==e.extensionId?i.setInputChecked("#input-settings-markdown-extra",t):"mathJax"==e.extensionId&&i.setInputChecked("#input-settings-mathjax",t);var n=e.onLoadSettings;n&&n()})},d.onSaveSettings=function(e,n){r.log("onSaveSettings"),t.each(p,function(r){var o=t.extend({},r.defaultConfig);o.enabled=i.getInputChecked("#input-enable-extension-"+r.extensionId);var a;"markdownExtra"==r.extensionId?(a=i.getInputChecked("#input-settings-markdown-extra"),a!=r.enabled&&(o.enabled=a)):"mathJax"==r.extensionId&&(a=i.getInputChecked("#input-settings-mathjax"),a!=r.enabled&&(o.enabled=a));var s=r.onSaveSettings;s&&s(o,n),e[r.extensionId]=o})},u("onMessage"),u("onError"),u("onOfflineChanged"),u("onUserActive"),u("onAsyncRunning"),u("onPeriodicRun"),u("onEditorCreated"),u("onFileMgrCreated"),u("onSynchronizerCreated"),u("onPublisherCreated"),u("onEventMgrCreated"),u("onFileCreated"),u("onFileDeleted"),u("onFileSelected"),u("onFileOpen"),u("onFileClosed"),u("onContentChanged"),u("onTitleChanged"),u("onFoldersChanged"),u("onSyncRunning"),u("onSyncSuccess"),u("onSyncImportSuccess"),u("onSyncExportSuccess"),u("onSyncRemoved"),u("onPublishRunning"),u("onPublishSuccess"),u("onNewPublishSuccess"),u("onPublishRemoved"),u("onLayoutCreated"),u("onLayoutResize"),u("onPagedownConfigure"),u("onSectionsCreated"),u("onCursorCoordinates"),u("onDiscussionCreated"),u("onDiscussionRemoved"),u("onCommentsChanged"),u("onTweet");var m,g,v=c("onPreviewFinished"),b=l("onAsyncPreview");d.onAsyncPreview=function(){function e(n){var r=n.length?n.shift():function(){setTimeout(function(){var e="";t.each(m.children,function(t){e+=t.innerHTML});var n=i.trim(e),r=n.replace(/ .*?<\/span> /g,"");v(n,r)},10)};r(function(){e(n)})}r.log("onAsyncPreview"),e(b.concat([function(e){g.waitForImages(e)}]))};var y=c("onReady");return d.onReady=function(){m=document.getElementById("preview-contents"),g=e(m);var i=function(e){var i=n("div",{"class":"btn-group"}),r=e();return t.isString(r)?i.innerHTML=r:t.isElement(r)&&i.appendChild(r),i};if(window.viewerMode===!1){var o=t.chain(p).sortBy(function(e){return e.extensionName.toLowerCase()}).reduce(function(e,n){return e+(n.settingsBlock?t.template(s,{extensionId:n.extensionId,extensionName:n.extensionName,isOptional:n.isOptional,settingsBlock:n.settingsBlock}):"")},"").value();document.querySelector(".accordion-extensions").innerHTML=o,r.log("onCreateButton");var a=l("onCreateButton"),c=document.createDocumentFragment();t.each(a,function(e){c.appendChild(i(e))}),document.querySelector(".extension-buttons").appendChild(c)}r.log("onCreatePreviewButton");var u=l("onCreatePreviewButton"),d=document.createDocumentFragment();t.each(u,function(e){d.appendChild(i(e))});var f=document.querySelector(".extension-preview-buttons");f.appendChild(d),y()},d.onEventMgrCreated(d),d}),function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){var n=t.util.type(e);switch(n){case"Object":var i={};for(var r in e)e.hasOwnProperty(r)&&(i[r]=t.util.clone(e[r]));return i;case"Array":return e.slice()}return e}},languages:{extend:function(e,n){var i=t.util.clone(t.languages[e]);for(var r in n)i[r]=n[r];return i},insertBefore:function(e,n,i,r){r=r||t.languages;var o=r[e],a={};for(var s in o)if(o.hasOwnProperty(s)){if(s==n)for(var l in i)i.hasOwnProperty(l)&&(a[l]=i[l]);a[s]=o[s]}return r[e]=a},DFS:function(e,n){for(var i in e)n.call(e,i,e[i]),"Object"===t.util.type(e)&&t.languages.DFS(e[i],n)}},highlightAll:function(e,n){for(var i,r=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'),o=0;i=r[o++];)t.highlightElement(i,e===!0,n)},highlightElement:function(i,r,o){for(var a,s,l=i;l&&!e.test(l.className);)l=l.parentNode;if(l&&(a=(l.className.match(e)||[,""])[1],s=t.languages[a]),s){i.className=i.className.replace(e,"").replace(/\s+/g," ")+" language-"+a,l=i.parentNode,/pre/i.test(l.nodeName)&&(l.className=l.className.replace(e,"").replace(/\s+/g," ")+" language-"+a);var c=i.textContent;if(c){c=c.replace(/&/g,"&").replace(/e.length)break e;if(!(p instanceof i)){s.lastIndex=0;var f=s.exec(p);if(f){c&&(u=f[1].length);var h=f.index-1+u,f=f[0].slice(u),m=f.length,g=h+m,v=p.slice(0,h+1),b=p.slice(g+1),y=[d,1];v&&y.push(v);var x=new i(a,l?t.tokenize(f,l):f);y.push(x),b&&y.push(b),Array.prototype.splice.apply(r,y)}}}}return r},hooks:{all:{},add:function(e,n){var i=t.hooks.all;i[e]=i[e]||[],i[e].push(n)},run:function(e,n){var i=t.hooks.all[e];if(i&&i.length)for(var r,o=0;r=i[o++];)r(n)}}},n=t.Token=function(e,t){this.type=e,this.content=t};if(n.stringify=function(e,i,r){if("string"==typeof e)return e;if("[object Array]"==Object.prototype.toString.call(e))return e.map(function(t){return n.stringify(t,i,e)}).join("");var o={type:e.type,content:n.stringify(e.content,i,r),tag:"span",classes:["token",e.type],attributes:{},language:i,parent:r};"comment"==o.type&&(o.attributes.spellcheck="true"),t.hooks.run("wrap",o);var a="";for(var s in o.attributes)a+=s+'="'+(o.attributes[s]||"")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'" '+a+">"+o.content+""+o.tag+">"},!self.document)return void self.addEventListener("message",function(e){var n=JSON.parse(e.data),i=n.language,r=n.code;self.postMessage(JSON.stringify(t.tokenize(r,t.languages[i]))),self.close()},!1);var i=document.getElementsByTagName("script");i=i[i.length-1],i&&(t.filename=i.src,document.addEventListener&&!i.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll))}(),define("prism-core",function(e){return function(){var t;return t||e.Prism}}(this));var DIFF_DELETE=-1,DIFF_INSERT=1,DIFF_EQUAL=0;diff_match_patch.Diff,diff_match_patch.prototype.diff_main=function(e,t,n,i){"undefined"==typeof i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var r=i;if(null==e||null==t)throw new Error("Null input. (diff_main)");if(e==t)return e?[[DIFF_EQUAL,e]]:[];"undefined"==typeof n&&(n=!0);var o=n,a=this.diff_commonPrefix(e,t),s=e.substring(0,a);e=e.substring(a),t=t.substring(a),a=this.diff_commonSuffix(e,t);var l=e.substring(e.length-a);e=e.substring(0,e.length-a),t=t.substring(0,t.length-a);var c=this.diff_compute_(e,t,o,r);return s&&c.unshift([DIFF_EQUAL,s]),l&&c.push([DIFF_EQUAL,l]),this.diff_cleanupMerge(c),c},diff_match_patch.prototype.diff_compute_=function(e,t,n,i){var r;if(!e)return[[DIFF_INSERT,t]];if(!t)return[[DIFF_DELETE,e]];var o=e.length>t.length?e:t,a=e.length>t.length?t:e,s=o.indexOf(a);if(-1!=s)return r=[[DIFF_INSERT,o.substring(0,s)],[DIFF_EQUAL,a],[DIFF_INSERT,o.substring(s+a.length)]],e.length>t.length&&(r[0][0]=r[2][0]=DIFF_DELETE),r;if(1==a.length)return[[DIFF_DELETE,e],[DIFF_INSERT,t]];var l=this.diff_halfMatch_(e,t);if(l){var c=l[0],u=l[1],d=l[2],p=l[3],f=l[4],h=this.diff_main(c,d,n,i),m=this.diff_main(u,p,n,i);return h.concat([[DIFF_EQUAL,f]],m)}return n&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,i):this.diff_bisect_(e,t,i)},diff_match_patch.prototype.diff_lineMode_=function(e,t,n){var i=this.diff_linesToChars_(e,t);e=i.chars1,t=i.chars2;var r=i.lineArray,o=this.diff_main(e,t,!1,n);this.diff_charsToLines_(o,r),this.diff_cleanupSemantic(o),o.push([DIFF_EQUAL,""]);for(var a=0,s=0,l=0,c="",u="";a<%= content %>',"=1&&l>=1){o.splice(a-s-l,s+l),a=a-s-l;for(var i=this.diff_main(c,u,!1,n),d=i.length-1;d>=0;d--)o.splice(a,0,i[d]);a+=i.length}l=0,s=0,c="",u=""}a++}return o.pop(),o},diff_match_patch.prototype.diff_bisect_=function(e,t,n){for(var i=e.length,r=t.length,o=Math.ceil((i+r)/2),a=o,s=2*o,l=new Array(s),c=new Array(s),u=0;s>u;u++)l[u]=-1,c[u]=-1;l[a+1]=0,c[a+1]=0;for(var d=i-r,p=d%2!=0,f=0,h=0,m=0,g=0,v=0;o>v&&!((new Date).getTime()>n);v++){for(var b=-v+f;v-h>=b;b+=2){var y,x=a+b;y=b==-v||b!=v&&l[x-1] y&&r>w&&e.charAt(y)==t.charAt(w);)y++,w++;if(l[x]=y,y>i)h+=2;else if(w>r)f+=2;else if(p){var S=a+d-b;if(S>=0&&s>S&&-1!=c[S]){var C=i-c[S];if(y>=C)return this.diff_bisectSplit_(e,t,y,w,n)}}}for(var T=-v+m;v-g>=T;T+=2){var C,S=a+T;C=T==-v||T!=v&&c[S-1] C&&r>E&&e.charAt(i-C-1)==t.charAt(r-E-1);)C++,E++;if(c[S]=C,C>i)g+=2;else if(E>r)m+=2;else if(!p){var x=a+d-T;if(x>=0&&s>x&&-1!=l[x]){var y=l[x],w=a+y-x;if(C=i-C,y>=C)return this.diff_bisectSplit_(e,t,y,w,n)}}}}return[[DIFF_DELETE,e],[DIFF_INSERT,t]]},diff_match_patch.prototype.diff_bisectSplit_=function(e,t,n,i,r){var o=e.substring(0,n),a=t.substring(0,i),s=e.substring(n),l=t.substring(i),c=this.diff_main(o,a,!1,r),u=this.diff_main(s,l,!1,r);return c.concat(u)},diff_match_patch.prototype.diff_linesToChars_=function(e,t){function n(e){for(var t="",n=0,o=-1,a=i.length;o n;)e.substring(o,r)==t.substring(o,r)?(n=r,o=n):i=r,r=Math.floor((i-n)/2+n);return r},diff_match_patch.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,i=Math.min(e.length,t.length),r=i,o=0;r>n;)e.substring(e.length-r,e.length-o)==t.substring(t.length-r,t.length-o)?(n=r,o=n):i=r,r=Math.floor((i-n)/2+n);return r},diff_match_patch.prototype.diff_commonOverlap_=function(e,t){var n=e.length,i=t.length;if(0==n||0==i)return 0;n>i?e=e.substring(n-i):i>n&&(t=t.substring(0,n));var r=Math.min(n,i);if(e==t)return r;for(var o=0,a=1;;){var s=e.substring(r-a),l=t.indexOf(s);if(-1==l)return o;a+=l,(0==l||e.substring(r-a)==t.substring(0,a))&&(o=a,a++)}},diff_match_patch.prototype.diff_halfMatch_=function(e,t){function n(e,t,n){for(var i,r,o,s,l=e.substring(n,n+Math.floor(e.length/4)),c=-1,u="";-1!=(c=t.indexOf(l,c+1));){var d=a.diff_commonPrefix(e.substring(n),t.substring(c)),p=a.diff_commonSuffix(e.substring(0,n),t.substring(0,c));u.length =e.length?[i,r,o,s,u]:null}if(this.Diff_Timeout<=0)return null;var i=e.length>t.length?e:t,r=e.length>t.length?t:e;if(i.length<4||2*r.length
l[4].length?s:l:l:s;var c,u,d,p;e.length>t.length?(c=o[0],u=o[1],d=o[2],p=o[3]):(d=o[0],p=o[1],c=o[2],u=o[3]);var f=o[4];return[c,u,d,p,f]},diff_match_patch.prototype.diff_cleanupSemantic=function(e){for(var t=!1,n=[],i=0,r=null,o=0,a=0,s=0,l=0,c=0;o 0?n[i-1]:-1,a=0,s=0,l=0,c=0,r=null,t=!0)),o++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),o=1;o =f?(p>=u.length/2||p>=d.length/2)&&(e.splice(o,0,[DIFF_EQUAL,d.substring(0,p)]),e[o-1][1]=u.substring(0,u.length-p),e[o+1][1]=d.substring(p),o++):(f>=u.length/2||f>=d.length/2)&&(e.splice(o,0,[DIFF_EQUAL,u.substring(0,f)]),e[o-1][0]=DIFF_INSERT,e[o-1][1]=d.substring(0,d.length-f),e[o+1][0]=DIFF_DELETE,e[o+1][1]=u.substring(f),o++),o++}o++}},diff_match_patch.prototype.diff_cleanupSemanticLossless=function(e){function t(e,t){if(!e||!t)return 6;var n=e.charAt(e.length-1),i=t.charAt(0),r=n.match(diff_match_patch.nonAlphaNumericRegex_),o=i.match(diff_match_patch.nonAlphaNumericRegex_),a=r&&n.match(diff_match_patch.whitespaceRegex_),s=o&&i.match(diff_match_patch.whitespaceRegex_),l=a&&n.match(diff_match_patch.linebreakRegex_),c=s&&i.match(diff_match_patch.linebreakRegex_),u=l&&e.match(diff_match_patch.blanklineEndRegex_),d=c&&t.match(diff_match_patch.blanklineStartRegex_);return u||d?5:l||c?4:r&&!a&&s?3:a||s?2:r||o?1:0}for(var n=1;n =d&&(d=p,l=i,c=r,u=o)}e[n-1][1]!=l&&(l?e[n-1][1]=l:(e.splice(n-1,1),n--),e[n][1]=c,u?e[n+1][1]=u:(e.splice(n+1,1),n--))}n++}},diff_match_patch.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,diff_match_patch.whitespaceRegex_=/\s/,diff_match_patch.linebreakRegex_=/[\r\n]/,diff_match_patch.blanklineEndRegex_=/\n\r?\n$/,diff_match_patch.blanklineStartRegex_=/^\r?\n\r?\n/,diff_match_patch.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,n=[],i=0,r=null,o=0,a=!1,s=!1,l=!1,c=!1;o 0?n[i-1]:-1,l=c=!1),t=!0)),o++;t&&this.diff_cleanupMerge(e)},diff_match_patch.prototype.diff_cleanupMerge=function(e){e.push([DIFF_EQUAL,""]);for(var t,n=0,i=0,r=0,o="",a="";n 1?(0!==i&&0!==r&&(t=this.diff_commonPrefix(a,o),0!==t&&(n-i-r>0&&e[n-i-r-1][0]==DIFF_EQUAL?e[n-i-r-1][1]+=a.substring(0,t):(e.splice(0,0,[DIFF_EQUAL,a.substring(0,t)]),n++),a=a.substring(t),o=o.substring(t)),t=this.diff_commonSuffix(a,o),0!==t&&(e[n][1]=a.substring(a.length-t)+e[n][1],a=a.substring(0,a.length-t),o=o.substring(0,o.length-t))),0===i?e.splice(n-r,i+r,[DIFF_INSERT,a]):0===r?e.splice(n-i,i+r,[DIFF_DELETE,o]):e.splice(n-i-r,i+r,[DIFF_DELETE,o],[DIFF_INSERT,a]),n=n-i-r+(i?1:0)+(r?1:0)+1):0!==n&&e[n-1][0]==DIFF_EQUAL?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++,r=0,i=0,o="",a=""}""===e[e.length-1][1]&&e.pop();var s=!1;for(n=1;n t));n++)o=i,a=r;return e.length!=n&&e[n][0]===DIFF_DELETE?a:a+(t-o)},diff_match_patch.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,i=//g,o=/\n/g,a=0;a ");switch(s){case DIFF_INSERT:t[a]=''+c+"";break;case DIFF_DELETE:t[a]=' '+c+"";break;case DIFF_EQUAL:t[a]=""+c+""}}return t.join("")},diff_match_patch.prototype.diff_text1=function(e){for(var t=[],n=0;nc)throw new Error("Invalid number in diff_fromDelta: "+s);var u=e.substring(r,r+=c);n[i++]="="==o[a].charAt(0)?[DIFF_EQUAL,u]:[DIFF_DELETE,u];break;default:if(o[a])throw new Error("Invalid diff operation in diff_fromDelta: "+o[a])}}if(r!=e.length)throw new Error("Delta length ("+r+") does not equal source text length ("+e.length+").");return n},diff_match_patch.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},diff_match_patch.prototype.match_bitap_=function(e,t,n){function i(e,i){var r=e/t.length,a=Math.abs(n-i);return o.Match_Distance?r+a/o.Match_Distance:a?1:r}if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),o=this,a=this.Match_Threshold,s=e.indexOf(t,n);-1!=s&&(a=Math.min(i(0,s),a),s=e.lastIndexOf(t,n+t.length),-1!=s&&(a=Math.min(i(0,s),a)));var l=1< c;)i(f,n+u)<=a?c=u:p=u,u=Math.floor((p-c)/2+c);p=u;var h=Math.max(1,n-u+1),m=Math.min(n+u,e.length)+t.length,g=Array(m+2);g[m+1]=(1< =h;v--){var b=r[e.charAt(v-1)];if(g[v]=0===f?(g[v+1]<<1|1)&b:(g[v+1]<<1|1)&b|((d[v+1]|d[v])<<1|1)|d[v+1],g[v]&l){var y=i(f,v-1);if(a>=y){if(a=y,s=v-1,!(s>n))break;h=Math.max(1,2*n-s)}}}if(i(f+1,n)>a)break;d=g}return s},diff_match_patch.prototype.match_alphabet_=function(e){for(var t={},n=0;n 2&&(this.diff_cleanupSemantic(r),this.diff_cleanupEfficiency(r));else if(e&&"object"==typeof e&&"undefined"==typeof t&&"undefined"==typeof n)r=e,i=this.diff_text1(r);else if("string"==typeof e&&t&&"object"==typeof t&&"undefined"==typeof n)i=e,r=t;else{if("string"!=typeof e||"string"!=typeof t||!n||"object"!=typeof n)throw new Error("Unknown call format to patch_make.");i=e,r=n}if(0===r.length)return[];for(var o=[],a=new diff_match_patch.patch_obj,s=0,l=0,c=0,u=i,d=i,p=0;p =2*this.Patch_Margin&&s&&(this.patch_addContext_(a,u),o.push(a),a=new diff_match_patch.patch_obj,s=0,u=d,l=c)}f!==DIFF_INSERT&&(l+=h.length),f!==DIFF_DELETE&&(c+=h.length)}return s&&(this.patch_addContext_(a,u),o.push(a)),o},diff_match_patch.prototype.patch_deepCopy=function(e){for(var t=[],n=0;n this.Match_MaxBits?(a=this.match_main(t,l.substring(0,this.Match_MaxBits),s),-1!=a&&(c=this.match_main(t,l.substring(l.length-this.Match_MaxBits),s+l.length-this.Match_MaxBits),(-1==c||a>=c)&&(a=-1))):a=this.match_main(t,l,s),-1==a)r[o]=!1,i-=e[o].length2-e[o].length1;else{r[o]=!0,i=a-s;var u;if(u=-1==c?t.substring(a,a+l.length):t.substring(a,c+this.Match_MaxBits),l==u)t=t.substring(0,a)+this.diff_text2(e[o].diffs)+t.substring(a+l.length);else{var d=this.diff_main(l,u,!1);if(l.length>this.Match_MaxBits&&this.diff_levenshtein(d)/l.length>this.Patch_DeleteThreshold)r[o]=!1;else{this.diff_cleanupSemanticLossless(d);for(var p,f=0,h=0;h =i;i++)n+=String.fromCharCode(i);for(var i=0;i o[0][1].length){var a=t-o[0][1].length;o[0][1]=n.substring(o[0][1].length)+o[0][1],r.start1-=a,r.start2-=a,r.length1+=a,r.length2+=a}if(r=e[e.length-1],o=r.diffs,0==o.length||o[o.length-1][0]!=DIFF_EQUAL)o.push([DIFF_EQUAL,n]),r.length1+=t,r.length2+=t;else if(t>o[o.length-1][1].length){var a=t-o[o.length-1][1].length;o[o.length-1][1]+=n.substring(0,a),r.length1+=a,r.length2+=a}return n},diff_match_patch.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,n=0;n 2*t?(s.length1+=u.length,r+=u.length,l=!1,s.diffs.push([c,u]),i.diffs.shift()):(u=u.substring(0,t-s.length1-this.Patch_Margin),s.length1+=u.length,r+=u.length,c===DIFF_EQUAL?(s.length2+=u.length,o+=u.length):l=!1,s.diffs.push([c,u]),u==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(u.length))}a=this.diff_text2(s.diffs),a=a.substring(a.length-this.Patch_Margin);var d=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);""!==d&&(s.length1+=d.length,s.length2+=d.length,0!==s.diffs.length&&s.diffs[s.diffs.length-1][0]===DIFF_EQUAL?s.diffs[s.diffs.length-1][1]+=d:s.diffs.push([DIFF_EQUAL,d])),l||e.splice(++n,0,s)}}},diff_match_patch.prototype.patch_toText=function(e){for(var t=[],n=0;n 0)){var i=n.shift();i()}},!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")}},{}],2:[function(e,t,n){var i=e("../pipe").Pipe,r=function(){};r.prototype.setResult=function(e){return this.result=e,this.hasResult=!0,this},r.prototype.exit=function(){return this.exiting=!0,this},r.prototype.switchTo=function(e,t){return"string"==typeof e||e instanceof i?this.nextPipe=e:(this.next=e,t&&(this.nextPipe=t)),this},r.prototype.push=function(e,t){return e.parent=this,"undefined"!=typeof t&&(e.childName=t),e.root=this.root||this,e.options=e.options||this.options,this.children?(this.children[this.children.length-1].next=e,this.children.push(e)):(this.children=[e],this.nextAfterChildren=this.next||null,this.next=e),e.next=this,this},n.Context=r},{"../pipe":15}],3:[function(e,t,n){var i=e("./context").Context,r=function(e,t){this.left=e,this.right=t,this.pipe="diff"};r.prototype=new i,n.DiffContext=r},{"./context":2}],4:[function(e,t,n){var i=e("./context").Context,r=function(e,t){this.left=e,this.delta=t,this.pipe="patch"};r.prototype=new i,n.PatchContext=r},{"./context":2}],5:[function(e,t,n){var i=e("./context").Context,r=function(e){this.delta=e,this.pipe="reverse"};r.prototype=new i,n.ReverseContext=r},{"./context":2}],6:[function(e,t){t.exports=function(e,t){var n;return"string"==typeof t&&(n=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)(Z|([+\-])(\d{2}):(\d{2}))$/.exec(t))?new Date(Date.UTC(+n[1],+n[2]-1,+n[3],+n[4],+n[5],+n[6])):t}},{}],7:[function(e,t,n){var i=e("./processor").Processor,r=e("./pipe").Pipe,o=e("./contexts/diff").DiffContext,a=e("./contexts/patch").PatchContext,s=e("./contexts/reverse").ReverseContext,l=e("./filters/trivial"),c=e("./filters/nested"),u=e("./filters/arrays"),d=e("./filters/dates"),p=e("./filters/texts"),f=function(e){this.processor=new i(e),this.processor.pipe(new r("diff").append(c.collectChildrenDiffFilter,l.diffFilter,d.diffFilter,p.diffFilter,c.objectsDiffFilter,u.diffFilter).shouldHaveResult()),this.processor.pipe(new r("patch").append(c.collectChildrenPatchFilter,u.collectChildrenPatchFilter,l.patchFilter,p.patchFilter,c.patchFilter,u.patchFilter).shouldHaveResult()),this.processor.pipe(new r("reverse").append(c.collectChildrenReverseFilter,u.collectChildrenReverseFilter,l.reverseFilter,p.reverseFilter,c.reverseFilter,u.reverseFilter).shouldHaveResult())};f.prototype.options=function(){return this.processor.options.apply(this.processor,arguments)},f.prototype.diff=function(e,t){return this.processor.process(new o(e,t))},f.prototype.patch=function(e,t){return this.processor.process(new a(e,t))},f.prototype.reverse=function(e){return this.processor.process(new s(e))},f.prototype.unpatch=function(e,t){return this.patch(e,this.reverse(t))},n.DiffPatcher=f},{"./contexts/diff":3,"./contexts/patch":4,"./contexts/reverse":5,"./filters/arrays":9,"./filters/dates":10,"./filters/nested":12,"./filters/texts":13,"./filters/trivial":14,"./pipe":15,"./processor":16}],8:[function(e,t,n){(function(t){var i=e("./diffpatcher").DiffPatcher;n.DiffPatcher=i,n.create=function(e){return new i(e)},n.dateReviver=e("./date-reviver");var r;n.diff=function(){return r||(r=new i),r.diff.apply(r,arguments)},n.patch=function(){return r||(r=new i),r.patch.apply(r,arguments)},n.unpatch=function(){return r||(r=new i),r.unpatch.apply(r,arguments)},n.reverse=function(){return r||(r=new i),r.reverse.apply(r,arguments)};var o="undefined"!=typeof t&&"string"==typeof t.execPath;if(o){var a=e("./formatters/index");n.formatters=a,n.console=a.console}else n.homepage="https://github.com/benjamine/jsondiffpatch",n.version="0.1.5"}).call(this,e("/home/sheila/proj/JsonDiffPatch/node_modules/gulp-browserify/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"./date-reviver":6,"./diffpatcher":7,"/home/sheila/proj/JsonDiffPatch/node_modules/gulp-browserify/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":1}],9:[function(e,t,n){var i=e("../contexts/diff").DiffContext,r=e("../contexts/patch").PatchContext,o=e("../contexts/reverse").ReverseContext,a=e("./lcs"),s=3,l="function"==typeof Array.isArray?Array.isArray:function(e){return e instanceof Array},c="function"==typeof Array.prototype.indexOf?function(e,t){return e.indexOf(t)}:function(e,t){for(var n=e.length,i=0;n>i;i++)if(e[i]===t)return i;return-1},u=function(e){if(e.leftIsArray){for(var t,n,r,o,l=e.options&&e.options.objectHash,u=function(e,t,n,i,r){var o=e[n],a=t[i];if(o===a)return!0;if("object"!=typeof o||"object"!=typeof a)return!1;if(!l)return!1;var s,c;return"number"==typeof n?(r.hashCache1=r.hashCache1||[],s=r.hashCache1[n],"undefined"==typeof s&&(r.hashCache1[n]=s=l(o,n))):s=l(o),"undefined"==typeof s?!1:("number"==typeof i?(r.hashCache2=r.hashCache2||[],c=r.hashCache2[i],"undefined"==typeof c&&(r.hashCache2[i]=c=l(a,i))):c=l(a),"undefined"==typeof c?!1:s===c)},d={},p=0,f=0,h=e.left,m=e.right,g=h.length,v=m.length;g>p&&v>p&&u(h,m,p,p,d);)t=p,o=new i(e.left[t],e.right[t]),e.push(o,t),p++;for(;g>f+p&&v>f+p&&u(h,m,g-1-f,v-1-f,d);)n=g-1-f,r=v-1-f,o=new i(e.left[n],e.right[r]),e.push(o,r),f++;var b;if(p+f===g){if(g===v)return void e.setResult(void 0).exit();for(b=b||{_t:"a"},t=p;v-f>t;t++)b[t]=[m[t]];return void e.setResult(b).exit()}if(p+f===v){for(b=b||{_t:"a"},t=p;g-f>t;t++)b["_"+t]=[h[t],0,0];return void e.setResult(b).exit()}d={};var y=h.slice(p,g-f),x=m.slice(p,v-f),w=a.get(y,x,u,d),S=[];for(b=b||{_t:"a"},t=p;g-f>t;t++)c(w.indices1,t-p)<0&&(b["_"+t]=[h[t],0,0],S.push(t));var C=!0;e.options&&e.options.arrays&&e.options.arrays.detectMove===!1&&(C=!1);var T=!1;e.options&&e.options.arrays&&e.options.arrays.includeValueOnMove&&(T=!0);var E=S.length;for(t=p;v-f>t;t++){var k=c(w.indices2,t-p);if(0>k){var _=!1;if(C&&E>0)for(n=0;E>n;n++)if(u(y,x,S[n]-p,t-p,d)){b["_"+S[n]].splice(1,2,t,s),T||(b["_"+S[n]][0]=""),n=S[n],r=t,o=new i(e.left[n],e.right[r]),e.push(o,r),S.splice(n,1),_=!0;break}_||(b[t]=[m[t]])}else n=w.indices1[k]+p,r=w.indices2[k]+p,o=new i(e.left[n],e.right[r]),e.push(o,r)}e.setResult(b).exit()}};u.filterName="arrays";var d={numerically:function(e,t){return e-t},numericallyBy:function(e){return function(t,n){return t[e]-n[e]}}},p=function(e){if(e.nested&&"a"===e.delta._t){var t,n,i=e.delta,o=e.left,a=[],l=[],c=[];for(t in i)if("_t"!==t)if("_"===t[0]){if(0!==i[t][2]&&i[t][2]!==s)throw new Error("only removal or move can be applied at original array indices, invalid diff type: "+i[t][2]);a.push(parseInt(t.slice(1),10))}else 1===i[t].length?l.push({index:parseInt(t,10),value:i[t][0]}):c.push({index:parseInt(t,10),delta:i[t]});for(a=a.sort(d.numerically),t=a.length-1;t>=0;t--){n=a[t];var u=i["_"+n],p=o.splice(n,1)[0];u[2]===s&&l.push({index:u[1],value:p})}l=l.sort(d.numericallyBy("index"));var f=l.length;for(t=0;f>t;t++){var h=l[t];o.splice(h.index,0,h.value)}var m,g=c.length;if(g>0)for(t=0;g>t;t++){var v=c[t];m=new r(e.left[v.index],v.delta),e.push(m,v.index)}return e.children?void e.exit():void e.setResult(e.left).exit()}};p.filterName="arrays";var f=function(e){if(e&&e.children&&"a"===e.delta._t){for(var t,n=e.children.length,i=0;n>i;i++)t=e.children[i],e.left[t.childName]=t.result;e.setResult(e.left).exit()}};f.filterName="arraysCollectChildren";var h=function(e){if(!e.nested)return void(e.delta[2]===s&&(e.newName="_"+e.delta[1],e.setResult([e.delta[0],parseInt(e.childName.substr(1),10),s]).exit()));if("a"===e.delta._t){var t,n;for(t in e.delta)"_t"!==t&&(n=new o(e.delta[t]),e.push(n,t));e.exit()}};h.filterName="arrays";var m=function(e,t,n){var i=t;if("string"==typeof t&&"_"===t[0])i=parseInt(t.substr(1),10);else{var r="_"+t;if(l(n)&&0===n[2])i=r;else for(var o in e){var a=e[o];l(a)&&a[2]===s&&a[1].toString()===t&&(i=o.substr(1))}}return i},g=function(e){if(e&&e.children&&"a"===e.delta._t){for(var t,n=e.children.length,i={_t:"a"},r=0;n>r;r++){t=e.children[r];var o=t.newName;"undefined"==typeof o&&(o=m(e.delta,t.childName,t.result)),i[o]!==t.result&&(i[o]=t.result)}e.setResult(i).exit()}};g.filterName="arraysCollectChildren",n.diffFilter=u,n.patchFilter=p,n.collectChildrenPatchFilter=f,n.reverseFilter=h,n.collectChildrenReverseFilter=g},{"../contexts/diff":3,"../contexts/patch":4,"../contexts/reverse":5,"./lcs":11}],10:[function(e,t,n){var i=function(e){e.left instanceof Date?(e.setResult(e.right instanceof Date?e.left.getTime()!==e.right.getTime()?[e.left,e.right]:void 0:[e.left,e.right]),e.exit()):e.right instanceof Date&&e.setResult([e.left,e.right]).exit()};i.filterName="dates",n.diffFilter=i},{}],11:[function(e,t,n){var i=function(e,t,n,i){return e[n]===t[i]},r=function(e,t,n,i){var r,o,a=e.length,s=t.length,l=[a+1];for(r=0;a+1>r;r++)for(l[r]=[s+1],o=0;s+1>o;o++)l[r][o]=0;for(l.match=n,r=1;a+1>r;r++)for(o=1;s+1>o;o++)l[r][o]=n(e,t,r-1,o-1,i)?l[r-1][o-1]+1:Math.max(l[r-1][o],l[r][o-1]);return l},o=function(e,t,n,i,r,a){if(0===i||0===r)return{sequence:[],indices1:[],indices2:[]};if(e.match(t,n,i-1,r-1,a)){var s=o(e,t,n,i-1,r-1,a);return s.sequence.push(t[i-1]),s.indices1.push(i-1),s.indices2.push(r-1),s}return e[i][r-1]>e[i-1][r]?o(e,t,n,i,r-1,a):o(e,t,n,i-1,r,a)},a=function(e,t,n,a){a=a||{};var s=r(e,t,n||i,a),l=o(s,e,t,e.length,t.length,a);return"string"==typeof e&&"string"==typeof t&&(l.sequence=l.sequence.join("")),l};n.get=a},{}],12:[function(e,t,n){var i=e("../contexts/diff").DiffContext,r=e("../contexts/patch").PatchContext,o=e("../contexts/reverse").ReverseContext,a=function(e){if(e&&e.children){for(var t,n=e.children.length,i=e.result,r=0;n>r;r++)t=e.children[r],"undefined"!=typeof t.result&&(i=i||{},i[t.childName]=t.result);i&&e.leftIsArray&&(i._t="a"),e.setResult(i).exit()}};a.filterName="collectChildren";var s=function(e){if(!e.leftIsArray&&"object"===e.leftType){var t,n;for(t in e.left)n=new i(e.left[t],e.right[t]),e.push(n,t);for(t in e.right)"undefined"==typeof e.left[t]&&(n=new i(void 0,e.right[t]),e.push(n,t));return e.children&&0!==e.children.length?void e.exit():void e.setResult(void 0).exit()}};s.filterName="objects";var l=function(e){if(e.nested&&!e.delta._t){var t,n;for(t in e.delta)n=new r(e.left[t],e.delta[t]),e.push(n,t);e.exit()}};l.filterName="objects";var c=function(e){if(e&&e.children&&!e.delta._t){for(var t,n=e.children.length,i=0;n>i;i++)t=e.children[i],e.left[t.childName]!==t.result&&(e.left[t.childName]=t.result);e.setResult(e.left).exit()}};c.filterName="collectChildren";var u=function(e){if(e.nested&&!e.delta._t){var t,n;for(t in e.delta)n=new o(e.delta[t]),e.push(n,t);e.exit()}};u.filterName="objects";var d=function(e){if(e&&e.children&&!e.delta._t){for(var t,n=e.children.length,i={},r=0;n>r;r++)t=e.children[r],i[t.childName]!==t.result&&(i[t.childName]=t.result);e.setResult(i).exit()}};d.filterName="collectChildren",n.collectChildrenDiffFilter=a,n.objectsDiffFilter=s,n.patchFilter=l,n.collectChildrenPatchFilter=c,n.reverseFilter=u,n.collectChildrenReverseFilter=d},{"../contexts/diff":3,"../contexts/patch":4,"../contexts/reverse":5}],13:[function(e,t,n){var i=2,r=60,o=null,a=function(){if(!o){var t;if("undefined"!=typeof diff_match_patch)t=new diff_match_patch;else if("function"==typeof e){var n=e("../../external/diff_match_patch_uncompressed");t=new n.diff_match_patch}if(!t){var i=new Error("text diff_match_patch library not found");throw i.diff_match_patch_not_found=!0,i}o={diff:function(e,n){return t.patch_toText(t.patch_make(e,n))},patch:function(e,n){for(var i=t.patch_apply(t.patch_fromText(n),e),r=0;rt;t++){r=i[t];var d=r.slice(0,1);"@"===d?(c=u.exec(r),a=t,s=null,l=null,i[a]="@@ -"+c[3]+","+c[4]+" +"+c[1]+","+c[2]+" @@"):"+"===d?(s=t,i[t]="-"+i[t].slice(1),"+"===i[t-1].slice(0,1)&&(o=i[t],i[t]=i[t-1],i[t-1]=o)):"-"===d&&(l=t,i[t]="+"+i[t].slice(1))}return i.join("\n")},u=function(e){e.nested||e.delta[2]===i&&e.setResult([c(e.delta[0]),0,i]).exit()};u.filterName="texts",n.diffFilter=s,n.patchFilter=l,n.reverseFilter=u},{}],14:[function(e,t,n){var i="function"==typeof Array.isArray?Array.isArray:function(e){return e instanceof Array},r=function(e){if(e.left===e.right)return void e.setResult(void 0).exit();if("undefined"==typeof e.left){if("function"==typeof e.right)throw new Error("functions are not supported");return void e.setResult([e.right]).exit()}if("undefined"==typeof e.right)return void e.setResult([e.left,0,0]).exit();if("function"==typeof e.left||"function"==typeof e.right)throw new Error("functions are not supported");return e.leftType=null===e.left?"null":typeof e.left,e.rightType=null===e.right?"null":typeof e.right,e.leftType!==e.rightType?void e.setResult([e.left,e.right]).exit():"boolean"===e.leftType||"number"===e.leftType?void e.setResult([e.left,e.right]).exit():("object"===e.leftType&&(e.leftIsArray=i(e.left)),"object"===e.rightType&&(e.rightIsArray=i(e.right)),e.leftIsArray!==e.rightIsArray?void e.setResult([e.left,e.right]).exit():void 0)};r.filterName="trivial";var o=function(e){return"undefined"==typeof e.delta?void e.setResult(e.left).exit():(e.nested=!i(e.delta),e.nested?void 0:1===e.delta.length?void e.setResult(e.delta[0]).exit():2===e.delta.length?void e.setResult(e.delta[1]).exit():3===e.delta.length&&0===e.delta[2]?void e.setResult(void 0).exit():void 0)};o.filterName="trivial";var a=function(e){return"undefined"==typeof e.delta?void e.setResult(e.delta).exit():(e.nested=!i(e.delta),e.nested?void 0:1===e.delta.length?void e.setResult([e.delta[0],0,0]).exit():2===e.delta.length?void e.setResult([e.delta[1],e.delta[0]]).exit():3===e.delta.length&&0===e.delta[2]?void e.setResult([e.delta[0]]).exit():void 0)};a.filterName="trivial",n.diffFilter=r,n.patchFilter=o,n.reverseFilter=a},{}],15:[function(e,t,n){var i=function(e){this.name=e,this.filters=[]};i.prototype.process=function(e){if(!this.processor)throw new Error("add this pipe to a processor before using it");for(var t=this.debug,n=this.filters.length,i=e,r=0;n>r;r++){var o=this.filters[r];if(t&&this.log("filter: "+o.filterName),o(i),"object"==typeof i&&i.exiting){i.exiting=!1;break}}!i.next&&this.resultCheck&&this.resultCheck(i)},i.prototype.log=function(e){console.log("[jsondiffpatch] "+this.name+" pipe, "+e)},i.prototype.append=function(){return this.filters.push.apply(this.filters,arguments),this},i.prototype.prepend=function(){return this.filters.unshift.apply(this.filters,arguments),this},i.prototype.indexOf=function(e){if(!e)throw new Error("a filter name is required");for(var t=0;t >>0)+(t++ +"__")};n.prototype={set:function(t,n){var i=t[this.name];i&&i[0]===t?i[1]=n:e(t,this.name,{value:[t,n],writable:!0})},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){this.set(e,void 0)}},window.WeakMap=n}(),define("WeakMap",function(){}),function(e){function t(e){x.push(e),y||(y=!0,g(i))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function i(){y=!1;var e=x;x=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();r(e),n.length&&(e.callback_(n,e),t=!0)}),t&&i()}function r(e){e.nodes_.forEach(function(t){var n=m.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function o(e,t){for(var n=e;n;n=n.parentNode){var i=m.get(n);if(i)for(var r=0;r 0){var r=n[i-1],o=f(r,e);if(o)return void(n[i-1]=o)}else t(this.observer);n[i]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=m.get(e);t||m.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=m.get(e),n=0;n /g,prolog:/<\?.+?\?>/,doctype:/<!DOCTYPE.+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+))?\s*)*\/?>/gi,inside:{tag:{pattern:/^<\/?[\w:-]+/i,inside:{punctuation:/^<\/?/,namespace:/^[\w-]+?:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/gi,inside:{punctuation:/=|>|"/g}},punctuation:/\/?>/g,"attr-name":{pattern:/[\w:-]+/g,inside:{namespace:/^[\w-]+?:/}}}},entity:/&#?[\da-z]{1,8};/gi},Prism.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),define("bower-libs/prism/components/prism-markup",function(){}),Prism.languages.latex={keyword:/\\(?:[^a-zA-Z]|[a-zA-Z]+)/g,lparen:/[[({]/g,rparen:/[\])}]/g,comment:/%.*/g},define("libs/prism-latex",function(){}),Prism.languages.md=function(){var e=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>\[\]'"]+|\([^\s()<>\[\]'"]*\))+(?:\([^\s()<>\[\]'"]*\)|[^\s`!()\[\]{}:'".,<>?«»“”‘’]))/gi,t=/[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2}|com|org|net|edu|gov|mil|biz|info|mobi|name|aero|asia|jobs|museum)\b/gi,n=Prism.languages.latex,i={};i.pre={pattern:/(^|(?:^|(?:^|\n)(?![ \t]*([*+\-]|\d+\.)[ \t]).*\n)\s*?\n)(\s*(?: {4}|\t).*(?:\n|$))+/g,lookbehind:!0,inside:{}},i["pre gfm"]={pattern:/^ {0,3}`{3}.*?\n(.*?\n)*? {0,3}`{3} *$/gm,inside:{"md md-pre":/`{3}/}},i["h1 alt"]={pattern:/^(.+)[ \t]*\n=+[ \t]*$/gm,inside:{}},i["h2 alt"]={pattern:/^(.+)[ \t]*\n-+[ \t]*$/gm,inside:{}},i.hr={pattern:/^([*\-_] *){3,}$/gm},i.li={pattern:/^[ \t]*([*+\-]|\d+\.)[ \t].+$/gm,inside:{"md md-li":/^ ?([*+\-]|\d+\.)[ \t]/m,"md md-li2":/^ ?(?: {2}|\t{1})([*+\-]|\d+\.)[ \t]/m,"md md-li3":/^ ?(?: {4}|\t{2})([*+\-]|\d+\.)[ \t]/m,"md md-li4":/^ ?(?: {6}|\t{3})([*+\-]|\d+\.)[ \t]/m,"md md-li5":/^ ?(?: {8}|\t{4})([*+\-]|\d+\.)[ \t]/m,"md md-li6":/^ ?(?: {10}|\t{5})([*+\-]|\d+\.)[ \t]/m,"md md-li7":/^ ?(?: {12}|\t{6})([*+\-]|\d+\.)[ \t]/m,"md md-li8":/^ ?(?: {14}|\t{7})([*+\-]|\d+\.)[ \t]/m,"md md-li9":/^ ?(?: {16}|\t{8})([*+\-]|\d+\.)[ \t]/m,"md md-li10":/^ ?(?: {18}|\t{9})([*+\-]|\d+\.)[ \t]/m,"md md-li11":/^ ?(?: {20}|\t{10})([*+\-]|\d+\.)[ \t]/m}};for(var r=6;r>=1;r--)i["h"+r]={pattern:new RegExp("^#{"+r+"}.+$","gm"),inside:{"md md-hash":new RegExp("^#{"+r+"} ")}};i.blockquote={pattern:/^ {0,3}> *[^\n]+$/gm,inside:{"md md-gt":/^ {0,3}> */,li:i.li}},i["math block"]={pattern:/(\$\$|\\\\\[|\\\\\\\\\()[\s\S]*?(\$\$|\\\\\]|\\\\\\\\\))/g,inside:{"md md-bracket-start":/^(\$\$|\\\\\[|\\\\\\\\\()/,"md md-bracket-end":/(\$\$|\\\\\]|\\\\\\\\\))/,lf:/\n/gm,rest:n}},i["latex block"]={pattern:/\\?\\begin\{[a-z]*\*?\}[\s\S]*?\\?\\end\{[a-z]*\*?\}/g,inside:{keyword:/\\?\\(begin|end)/,lf:/\n/gm,rest:n}},i.fndef={pattern:/^ {0,3}\[\^.*?\]:[ \t]+.*$/gm,inside:{"ref-id":{pattern:/\[\^.*?\]/,inside:{"md md-bracket-start":/\[/,"md md-bracket-end":/\]/}}}},i.linkdef={pattern:/^ {0,3}\[.*?\]:[ \t]+.*$/gm,inside:{"link-id":{pattern:/\[.*?\]/,inside:{"md md-bracket-start":/\[/,"md md-bracket-end":/\]/}},url:e,linktitle:/['\"\(][^\'\"\)]*['\"\)]/}},i.p={pattern:/.+/g,inside:{"md md-toc":/^\s*\[(toc|TOC)\]\s*$/g}},i.lf=/^\n$/gm,i.img={pattern:/!\[[^\]]*\]\([^\)]+\)/g,inside:{"md md-bang":/^!/,"md md-bracket-start":/\[/,"md md-alt":/[^\[]+(?=\])/,"md md-bracket-end":/\](?=\()/,"md img-parens":{pattern:/\([^\)]+\)/,inside:{"md md-paren-start":/^\(/,"md md-title":/(['‘][^'’]*['’]|["“][^"”]*["”])(?=\)$)/,"md md-src":/[^\('" \t]+(?=[\)'" \t])/,"md md-paren-end":/\)$/}}}},i.link={pattern:/\[(?:(\\.)|[^\[\]])*\]\([^\(\)\s]+(\(\S*?\))??[^\(\)\s]*?(\s(['‘][^'’]*['’]|["“][^"”]*["”]))?\)/gm,inside:{"md md-bracket-start":{pattern:/(^|[^\\])\[/,lookbehind:!0},"md md-underlined-text":{pattern:/(?:(\\.)|[^\[\]])+(?=\])/},"md md-bracket-end":/\]\s?\(/,"md md-paren-end":/\)$/,"md md-href":/.*/}},i.fn={pattern:/\[\^(.*?)\]/g,inside:{ref:{pattern:/^\[[^\[\]]+\] ?/,inside:{"md md-bracket-start":/\[/,"md md-ref":/^[^\[\]]+/,"md md-bracket-end":/\]/}}}},i.imgref={pattern:/!\[(.*?)\] ?\[(.*?)\]/g,inside:{"md md-bang":/^!/,"ref-end":{pattern:/\[[^\[\]]+\]$/,inside:{"md md-bracket-start":/\[/,"md md-href":/[^\[\]]+(?=]$)/,"md md-bracket-end":/\]/}},"ref-start":{pattern:/^\[[^\[\]]+\] ?/,inside:{"md md-bracket-start":/\[/,"md md-alt":/^[^\[\]]+/,"md md-bracket-end":/\]/}}}},i.linkref={pattern:/\[(.*?)\] ?\[(.*?)\]/g,inside:{"ref-end":{pattern:/\[[^\[\]]+\]$/,inside:{"md md-bracket-start":/\[/,"md md-href":/[^\[\]]+(?=]$)/,"md md-bracket-end":/\]/}},"ref-start":{pattern:/^\[[^\[\]]+\] ?/,inside:{"md md-bracket-start":/\[/,"md md-underlined-text":/^[^\[\]]+/,"md md-bracket-end":/\]/}}}},i.email={pattern:t},i.code={pattern:/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/g,lookbehind:!0,inside:{"md md-code":/`/}},i.math={pattern:/\$.*?\$/g,inside:{"md md-bracket-start":/^\$/,"md md-bracket-end":/\$$/,rest:n}},i.strong={pattern:/([_\*])\1((?!\1{2}).)*\1{2}/g,inside:{"md md-strong":/([_\*])\1/g}},i.em={pattern:/(^|[^\\])(\*|_)(\S[^\2]*?)??[^\s\\]+?\2/g,lookbehind:!0,inside:{"md md-em md-start":/^(\*|_)/,"md md-em md-close":/(\*|_)$/}},i.strike={pattern:/(^|\n|\W)(~~)(?=\S)([^\r]*?\S)\2/gm,lookbehind:!0,inside:{"md md-s":/(~~)/,"md-strike-text":/[^~]+/}};for(var o={code:i.code,math:i.math,fn:i.fn,img:i.img,link:i.link,imgref:i.imgref,linkref:i.linkref,url:i.url,email:i.email,strong:i.strong,em:i.em,strike:i.strike,conflict:/⧸⧸/g,comment:Prism.languages.markup.comment,tag:Prism.languages.markup.tag,entity:Prism.languages.markup.entity},a=6;a>=1;a--)i["h"+a].inside.rest=o;i["h1 alt"].inside.rest=o,i["h2 alt"].inside.rest=o,i.p.inside.rest=o,i.blockquote.inside.rest=o,i.li.inside.rest=o,i.fndef.inside.rest=o,o={code:i.code,fn:i.fn,link:i.link,linkref:i.linkref,conflict:/⧸⧸/g},i.strong.inside.rest=o,i.em.inside.rest=o,i.strike.inside.rest=o;var s={code:i.code,strong:i.strong,em:i.em,strike:i.strike,conflict:/⧸⧸/g,comment:Prism.languages.markup.comment,tag:Prism.languages.markup.tag,entity:Prism.languages.markup.entity};return i.link.inside["md md-underlined-text"].inside=s,i.linkref.inside["ref-start"].inside["md md-underlined-text"].inside=s,i}(),define("libs/prism-markdown",function(){}),define("editor",["jquery","underscore","utils","settings","eventMgr","prism-core","diff_match_patch_uncompressed","jsondiffpatch","crel","rangy","MutationObservers","libs/prism-markdown"],function(e,t,n,i,r,o,a,s,l,c){function u(){this.isWatching=!1;var e;this.startWatching=function(){this.isWatching=!0,e=e||new MutationObserver(y),e.observe(_,{childList:!0,subtree:!0,characterData:!0})},this.stopWatching=function(){e.disconnect(),this.isWatching=!1},this.noWatch=function(e){this.isWatching===!0?(this.stopWatching(),e(),this.startWatching()):e()}}function d(){var e=this;this.selectionStart=0,this.selectionEnd=0,this.cursorY=0,this.findOffset=function(e){for(var t=document.createTreeWalker(_,4),n="";t.nextNode();){if(n=t.currentNode.nodeValue||"",n.length>e)return{container:t.currentNode,offset:e};e-=n.length}return{container:t.currentNode,offset:n.length}},this.createRange=function(e,n){e=0>e?0:e,n=0>n?0:n;var i=document.createRange(),r=t.isObject(e)?e:this.findOffset(e);return i.setStart(r.container,r.offset),n&&n!=e&&(r=t.isObject(n)?n:this.findOffset(n)),i.setEnd(r.container,r.offset),i},this.setSelectionStartEnd=function(e,t,n,i){void 0===e&&(e=this.selectionStart),void 0===t&&(t=this.selectionEnd),this.selectionStart=e,this.selectionEnd=t;var o=Math.min(e,t),a=Math.max(e,t);if(n=n||this.createRange(o,a),!i){var s=c.getSelection();s.removeAllRanges(),s.addRange(n,e>t)}F.editorStart=this.selectionStart,F.editorEnd=this.selectionEnd,k.toggleClass("has-selection",this.selectionStart!==this.selectionEnd);var l=this.getCoordinates(this.selectionEnd,this.selectionEndContainer,this.selectionEndOffset);return this.cursorY!==l.y&&(this.cursorY=l.y,r.onCursorCoordinates(l.x,l.y)),n},this.saveSelectionState=function(){function t(){if(O===!1){var t,n=e.selectionStart,i=e.selectionEnd,r=c.getSelection();if(r.rangeCount>0){var o=r.getRangeAt(0),a=o.startContainer;if(16&_.compareDocumentPosition(a)){t=o;var s=a,l=t.startOffset;do{for(;a=a.previousSibling;)a.textContent&&(l+=a.textContent.length);a=s=s.parentNode}while(a&&a!=E);r.isBackwards()?(n=l+(t+"").length,i=l):(n=l,i=l+(t+"").length)}}e.setSelectionStartEnd(n,i,t,!0)}U.saveSelectionState()}var i=n.debounce(t);return function(e){e?i():t()}}(),this.getCoordinates=function(e,t,n){t||(n=this.findOffset(e),t=n.container,n=n.offset);var i=0,r=0;if("\n"==t.textContent)r=t.parentNode.offsetTop+t.parentNode.offsetHeight/2;else{var o=H[e],a={container:t,offset:n},s={container:t,offset:n};e>0&&(void 0===o||"\n"==o)?0===a.offset?a=e-1:a.offset-=1:s.offset===t.textContent.length?s=e+1:s.offset+=1;var l=this.createRange(a,s),c=l.getBoundingClientRect();r=c.top+c.height/2-E.getBoundingClientRect().top+E.scrollTop,l.detach()}return{x:i,y:r}},this.getClosestWordOffset=function(e){var t=0,n=0,i=0;return H.split(/\s/).some(function(r){return r&&(t=i,n=i+r.length,n>e)?!0:void(i+=r.length+1)}),{start:t,end:n}}}function p(e){var t=j.diff_commonPrefix(H,e);t===H.length&&t--;var n=Math.min(j.diff_commonSuffix(H,e),H.length-t,e.length-t),i=e.substring(t,e.length-n),r=G.createRange(t,H.length-n);r.deleteContents(),r.insertNode(document.createTextNode(i))}function f(e,t){var n=G.selectionStart;if(n!==G.selectionEnd)return!1;var i=G.createRange(n-e.length,n);return""+i!=e?!1:(i.deleteContents(),i.insertNode(document.createTextNode(t)),n=n-e.length+t.length,G.setSelectionStartEnd(n,n),!0)}function h(e){p(e),H=e}function m(){return H}function g(){I.focus(),G.setSelectionStartEnd(),E.scrollTop=R}function v(){function e(e,n,i){B.noWatch(function(){H!=e.content&&(h(e.content),F.content=e.content,r.onContentChanged(F,e.content)),G.setSelectionStartEnd(n,i);var o=F.discussionListJSON;if(o!=e.discussionListJSON){var a=F.discussionList;F.discussionListJSON=e.discussionListJSON;var s=F.discussionList,l=$.diff(a,s),c=!1;t.each(l,function(e,n){t.isArray(e)?1===e.length?r.onDiscussionCreated(F,s[n]):r.onDiscussionRemoved(F,a[n]):c=!0}),c&&r.onCommentsChanged(F)}}),s=n,l=i,a=e,this.currentMode=void 0,o=void 0,this.onButtonStateChange(),q()}var i,o,a,s,l,c=[],u=[];this.setCommandMode=function(){this.currentMode="command"},this.setMode=function(){},this.onButtonStateChange=function(){},this.saveState=n.debounce(function(){u=[];var e=Date.now();"comment"==this.currentMode||this.currentMode!=o&&"newlines"!=o||e-i>1e3?(c.push(a),100===c.length&&c.shift()):(s=a.selectionStartBefore,l=a.selectionEndBefore),a={selectionStartBefore:s,selectionEndBefore:l,selectionStartAfter:G.selectionStart,selectionEndAfter:G.selectionEnd,content:H,discussionListJSON:F.discussionListJSON},i=e,o=this.currentMode,this.currentMode=void 0,this.onButtonStateChange()},this),this.saveSelectionState=t.debounce(function(){void 0===this.currentMode&&(s=G.selectionStart,l=G.selectionEnd)},10),this.canUndo=function(){return c.length},this.canRedo=function(){return u.length},this.undo=function(){var t=c.pop();t&&(u.push(a),e.call(this,t,a.selectionStartBefore,a.selectionEndBefore))},this.redo=function(){var t=u.pop();t&&(c.push(a),e.call(this,t,t.selectionStartAfter,t.selectionEndAfter))},this.init=function(){var e=F.content;c=[],u=[],i=0,a={selectionStartAfter:F.selectionStart,selectionEndAfter:F.selectionEnd,content:e,discussionListJSON:F.discussionListJSON},this.currentMode=void 0,o=void 0,_.textContent=e,y()}}function b(){B.isWatching===!0&&(U.currentMode=U.currentMode||"comment",U.saveState())}function y(){var e=E.textContent;if(_.lastChild===z&&"\n"==z.textContent.slice(-1)&&(e=e.slice(0,-1)),e=e.replace(/\r\n/g,"\n"),e=e.replace(/\r/g,"\n"),O===!1){if(e==H)return void(0===_.children.length&&(_.innerHTML="",W.forEach(function(e){_.appendChild(e.elt)}),C()));U.currentMode=U.currentMode||"typing";var n=t.values(F.discussionList);F.newDiscussion&&n.push(F.newDiscussion);var i=x(H,e,n);H=e,i===!0&&(F.discussionList=F.discussionList),F.content=H,G.saveSelectionState(),r.onContentChanged(F,H),i&&r.onCommentsChanged(F),U.saveState()}else H=e,F.content=H,G.setSelectionStartEnd(F.editorStart,F.editorEnd),G.saveSelectionState(),r.onFileOpen(F,H),L.scrollTop=F.previewScrollTop,R=F.editorScrollTop,E.scrollTop=R,O=!1}function x(e,t,n){if(n.length){var i=j.diff_main(e,t),r=!1,o=0;return i.forEach(function(e){var t=e[0],i=e[1];if(0===t)return void(o+=i.length);var a=o,s=i.length;-1===t&&(a+=s,s=-s),n.forEach(function(e){e.selectionEnd>a?(e.selectionEnd+=s,e.discussionIndex&&(r=!0)):e.selectionEnd>o&&(e.selectionEnd=o,e.discussionIndex&&(r=!0)),e.selectionStart>=a?(e.selectionStart+=s,e.discussionIndex&&(r=!0)):e.selectionStart>o&&(e.selectionStart=o,e.discussionIndex&&(r=!0))}),1===t&&(o+=i.length)}),r}}function w(e){if(X=[],Q=[],V=void 0,O===!0)return Q=W,W=e,void(X=e);var n=W.length;t.some(W,function(t,i){var r=e[i];return i>=e.length||t.textWithFrontMatter!=r.textWithFrontMatter||t.elt.parentNode!==_||t.elt.textContent!=r.textWithFrontMatter?(n=i,!0):void 0});var i=-W.length;t.some(W.slice().reverse(),function(t,n){var r=e[e.length-n-1];return n>=e.length||t.textWithFrontMatter!=r.textWithFrontMatter||t.elt.parentNode!==_||t.elt.textContent!=r.textWithFrontMatter?(i=-n,!0):void 0}),n-i>W.length&&(i=n-W.length);var r=W.slice(0,n);X=e.slice(n,e.length+i);var o=W.slice(W.length+i,W.length);V=t.first(o),Q=W.slice(n,W.length+i),W=r.concat(X).concat(o)}function S(){var e=document.createDocumentFragment();X.forEach(function(t){T(t),e.appendChild(t.elt)}),B.noWatch(function(){if(O===!0)_.innerHTML="",_.appendChild(e);else{Q.forEach(function(e){e.elt.parentNode===_&&_.removeChild(e.elt)}),void 0!==V?_.insertBefore(e,V.elt):_.appendChild(e);for(var t=_.firstChild;t;){var n=t.nextSibling;t.generated||_.removeChild(t),t=n}}C(),G.setSelectionStartEnd()})}function C(){z=l("span",{"class":"token lf"}),z.textContent="\n",_.appendChild(z)}function T(e){var t=K(e.text);window.viewerMode||(t=o.highlight(t,o.languages.md));var n=e.textWithFrontMatter.substring(0,e.textWithFrontMatter.length-e.text.length);n.length&&(n=K(n),n=n.replace(/\n/g,'\n'),t=''+n+""+t);var i=l("span",{id:"wmd-input-section-"+e.id,"class":"wmd-input-section"});i.generated=!0,i.innerHTML=t,e.elt=i}var E,k,_,I,D,N,L,M,A={},R=0,P=function(){var e=0,n=function(){var t=Date.now();M.refreshPreview(),e=Date.now()-t};return i.lazyRendering===!0?t.debounce(n,500):function(){setTimeout(n,2e3>e?e:2e3)}}();r.addListener("onPagedownConfigure",function(e){M=e}),r.addListener("onSectionsCreated",function(e){w(e),S(),O===!0?M.refreshPreview():P()});var F,O=!0;r.addListener("onFileSelected",function(e){O=!0,F=e});var B=new u;A.watcher=B;var j=new a,$=s.create({objectHash:function(e){return JSON.stringify(e)},arrays:{detectMove:!1},textDiff:{minLength:9999999}}),G=new d;A.selectionMgr=G,e(document).on("selectionchange",".editor-content",t.bind(G.saveSelectionState,G,!0));var q=function(){var e=n.debounce(function(){var e=E.offsetHeight/2;e>130&&(e=130);var t=E.scrollTop+e,n=E.scrollTop+E.offsetHeight-e;G.cursorY n&&(E.scrollTop+=G.cursorY-n)});return function(){void 0!==E&&(G.saveSelectionState(!0),e())}}();A.adjustCursorPosition=q;var H;A.setValue=p,A.replacePreviousText=f,A.setValueNoWatch=h,A.getValue=m,A.focus=g;var U=new v;A.undoMgr=U,r.addListener("onDiscussionCreated",b),r.addListener("onDiscussionRemoved",b),r.addListener("onCommentsChanged",b);var z;A.adjustCommentOffsets=x,A.init=function(){if(E=document.getElementById("wmd-input"),k=e(E),_=E.querySelector(".editor-content"),I=e(_),D=E.querySelector(".editor-margin"),N=e(D),L=document.querySelector(".preview-container"),k.addClass(i.editorFontClass),B.startWatching(),e(E).scroll(function(){R=E.scrollTop,O===!1&&(F.editorScrollTop=R)}),e(L).scroll(function(){O===!1&&(F.previewScrollTop=L.scrollTop)}),/AppleWebKit\/([\d.]+)/.exec(navigator.userAgent)){var n=e('').appendTo("html");I.blur(function(){n[0].setSelectionRange(0,0),n.blur()})}E.focus=g,Object.defineProperty(E,"value",{get:function(){return H},set:p}),Object.defineProperty(E,"selectionStart",{get:function(){return Math.min(G.selectionStart,G.selectionEnd)},set:function(e){G.setSelectionStartEnd(e)},enumerable:!0,configurable:!0}),Object.defineProperty(E,"selectionEnd",{get:function(){return Math.max(G.selectionStart,G.selectionEnd)},set:function(e){G.setSelectionStartEnd(void 0,e)},enumerable:!0,configurable:!0});var r=!1;I.on("keydown",function(e){if(17!==e.which&&91!==e.which&&18!==e.which&&16!==e.which){G.saveSelectionState();var t=e.metaKey||e.ctrlKey;switch(t||q(),e.which){case 9:t||(o("indent",{inverse:e.shiftKey}),e.preventDefault());break;case 13:o("newline"),e.preventDefault()}13!==e.which&&(r=!1)}}).on("mouseup",t.bind(G.saveSelectionState,G,!0)).on("paste",function(){U.currentMode="paste",q()}).on("cut",function(){U.currentMode="cut",q()});var o=function(e,t){t=t||{};var n=m(),i=t.start||G.selectionStart,r=t.end||G.selectionEnd,o={selectionStart:i,selectionEnd:r,before:n.slice(0,i),after:n.slice(r),selection:n.slice(i,r)};a[e](o,t),p(o.before+o.selection+o.after),G.setSelectionStartEnd(o.selectionStart,o.selectionEnd)},a={indent:function(e,t){function n(e,t,n,i){return n=+n||0,i=i||"",e.slice(0,t)+i+e.slice(t+n)}var i=e.before.lastIndexOf("\n")+1;if(t.inverse)/\s/.test(e.before.charAt(i))&&(e.before=n(e.before,i,1),e.selectionStart--,e.selectionEnd--),e.selection=e.selection.replace(/^[ \t]/gm,"");else{if(!e.selection)return e.before+=" ",e.selectionStart++,void e.selectionEnd++;e.before=n(e.before,i,0," "),e.selection=e.selection.replace(/\r?\n(?=[\s\S])/g,"\n "),e.selectionStart++,e.selectionEnd++}e.selectionEnd=e.selectionStart+e.selection.length},newline:function(e){var t=e.before.lastIndexOf("\n")+1;if(r)return e.before=e.before.substring(0,t),e.selection="",e.selectionStart=t,e.selectionEnd=t,void(r=!1);r=!1;var n=e.before.slice(t),i=n.match(/^ {0,3}>[ ]*|^[ \t]*(?:[*+\-]|(\d+)\.)[ \t]|^\s+/),o=(i||[""])[0];if(i&&i[1]){var a=parseInt(i[1],10);o=o.replace(/\d+/,a+1)}o.length&&(r=!0),U.currentMode="newlines",e.before+="\n"+o,e.selection="",e.selectionStart+=o.length+1,e.selectionEnd=e.selectionStart}}};var V,W=[],Q=[],X=[],K=function(){var e={"&":"&","<":"<"," ":" "};return function(t){return t.replace(/[&<\u00a0]/g,function(t){return e[t]})}}();return r.onEditorCreated(A),A}),function(e,t){function n(){i.READY||(b.determineEventTypes(),h.each(i.gestures,function(e){x.register(e)}),b.onTouch(i.DOCUMENT,p,x.detect),b.onTouch(i.DOCUMENT,f,x.detect),i.READY=!0)}var i=function(e,t){return new i.Instance(e,t||{})};i.VERSION="1.0.10",i.defaults={stop_browser_behavior:{userSelect:"none",touchAction:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},i.HAS_POINTEREVENTS=e.navigator.pointerEnabled||e.navigator.msPointerEnabled,i.HAS_TOUCHEVENTS="ontouchstart"in e,i.MOBILE_REGEX=/mobile|tablet|ip(ad|hone|od)|android|silk/i,i.NO_MOUSEEVENTS=i.HAS_TOUCHEVENTS&&e.navigator.userAgent.match(i.MOBILE_REGEX),i.EVENT_TYPES={},i.UPDATE_VELOCITY_INTERVAL=16,i.DOCUMENT=e.document;var r=i.DIRECTION_DOWN="down",o=i.DIRECTION_LEFT="left",a=i.DIRECTION_UP="up",s=i.DIRECTION_RIGHT="right",l=i.POINTER_MOUSE="mouse",c=i.POINTER_TOUCH="touch",u=i.POINTER_PEN="pen",d=i.EVENT_START="start",p=i.EVENT_MOVE="move",f=i.EVENT_END="end";i.plugins=i.plugins||{},i.gestures=i.gestures||{},i.READY=!1;var h=i.utils={extend:function(e,n,i){for(var r in n)e[r]!==t&&i||(e[r]=n[r]);return e},each:function(e,n,i){var r,o;if("forEach"in e)e.forEach(n,i);else if(e.length!==t){for(r=-1;o=e[++r];)if(n.call(i,o,r,e)===!1)return}else for(r in e)if(e.hasOwnProperty(r)&&n.call(i,e[r],r,e)===!1)return},inStr:function(e,t){return e.indexOf(t)>-1},hasParent:function(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1},getCenter:function(e){var t=[],n=[],i=[],r=[],o=Math.min,a=Math.max;return 1===e.length?{pageX:e[0].pageX,pageY:e[0].pageY,clientX:e[0].clientX,clientY:e[0].clientY}:(h.each(e,function(e){t.push(e.pageX),n.push(e.pageY),i.push(e.clientX),r.push(e.clientY)}),{pageX:(o.apply(Math,t)+a.apply(Math,t))/2,pageY:(o.apply(Math,n)+a.apply(Math,n))/2,clientX:(o.apply(Math,i)+a.apply(Math,i))/2,clientY:(o.apply(Math,r)+a.apply(Math,r))/2})},getVelocity:function(e,t,n){return{x:Math.abs(t/e)||0,y:Math.abs(n/e)||0}},getAngle:function(e,t){var n=t.clientX-e.clientX,i=t.clientY-e.clientY;return 180*Math.atan2(i,n)/Math.PI},getDirection:function(e,t){var n=Math.abs(e.clientX-t.clientX),i=Math.abs(e.clientY-t.clientY);return n>=i?e.clientX-t.clientX>0?o:s:e.clientY-t.clientY>0?a:r},getDistance:function(e,t){var n=t.clientX-e.clientX,i=t.clientY-e.clientY;return Math.sqrt(n*n+i*i)},getScale:function(e,t){return e.length>=2&&t.length>=2?this.getDistance(t[0],t[1])/this.getDistance(e[0],e[1]):1},getRotation:function(e,t){return e.length>=2&&t.length>=2?this.getAngle(t[1],t[0])-this.getAngle(e[1],e[0]):0},isVertical:function(e){return e==a||e==r},toggleDefaultBehavior:function(e,t,n){if(t&&e&&e.style){h.each(["webkit","moz","Moz","ms","o",""],function(i){h.each(t,function(t,r){i&&(r=i+r.substring(0,1).toUpperCase()+r.substring(1)),r in e.style&&(e.style[r]=!n&&t)})});var i=function(){return!1};"none"==t.userSelect&&(e.onselectstart=!n&&i),"none"==t.userDrag&&(e.ondragstart=!n&&i)}}};i.Instance=function(e,t){var r=this;return n(),this.element=e,this.enabled=!0,this.options=h.extend(h.extend({},i.defaults),t||{}),this.options.stop_browser_behavior&&h.toggleDefaultBehavior(this.element,this.options.stop_browser_behavior,!1),this.eventStartHandler=b.onTouch(e,d,function(e){r.enabled&&x.startDetect(r,e)}),this.eventHandlers=[],this},i.Instance.prototype={on:function(e,t){var n=e.split(" ");return h.each(n,function(e){this.element.addEventListener(e,t,!1),this.eventHandlers.push({gesture:e,handler:t})},this),this},off:function(e,t){var n,i,r=e.split(" ");return h.each(r,function(e){for(this.element.removeEventListener(e,t,!1),n=-1;i=this.eventHandlers[++n];)i.gesture===e&&i.handler===t&&this.eventHandlers.splice(n,1)},this),this},trigger:function(e,t){t||(t={});var n=i.DOCUMENT.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t;var r=this.element;return h.hasParent(t.target,r)&&(r=t.target),r.dispatchEvent(n),this},enable:function(e){return this.enabled=e,this},dispose:function(){var e,t;for(this.options.stop_browser_behavior&&h.toggleDefaultBehavior(this.element,this.options.stop_browser_behavior,!0),e=-1;t=this.eventHandlers[++e];)this.element.removeEventListener(t.gesture,t.handler,!1);return this.eventHandlers=[],b.unbindDom(this.element,i.EVENT_TYPES[d],this.eventStartHandler),null}};var m=null,g=!1,v=!1,b=i.event={bindDom:function(e,t,n){var i=t.split(" ");h.each(i,function(t){e.addEventListener(t,n,!1)})},unbindDom:function(e,t,n){var i=t.split(" ");h.each(i,function(t){e.removeEventListener(t,n,!1)})},onTouch:function(e,t,n){var r=this,o=function(o){var a=o.type.toLowerCase();if(!h.inStr(a,"mouse")||!v){h.inStr(a,"touch")||h.inStr(a,"pointerdown")||h.inStr(a,"mouse")&&1===o.which?g=!0:h.inStr(a,"mouse")&&!o.which&&(g=!1),(h.inStr(a,"touch")||h.inStr(a,"pointer"))&&(v=!0);var s=0;g&&(i.HAS_POINTEREVENTS&&t!=f?s=y.updatePointer(t,o):h.inStr(a,"touch")?s=o.touches.length:v||(s=h.inStr(a,"up")?0:1),s>0&&t==f?t=p:s||(t=f),(s||null===m)&&(m=o),n.call(x,r.collectEventData(e,t,r.getTouchList(m,t),o)),i.HAS_POINTEREVENTS&&t==f&&(s=y.updatePointer(t,o))),s||(m=null,g=!1,v=!1,y.reset())}};return this.bindDom(e,i.EVENT_TYPES[t],o),o},determineEventTypes:function(){var e;e=i.HAS_POINTEREVENTS?y.getEvents():i.NO_MOUSEEVENTS?["touchstart","touchmove","touchend touchcancel"]:["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"],i.EVENT_TYPES[d]=e[0],i.EVENT_TYPES[p]=e[1],i.EVENT_TYPES[f]=e[2]},getTouchList:function(e){return i.HAS_POINTEREVENTS?y.getTouchList():e.touches?e.touches:(e.identifier=1,[e])},collectEventData:function(e,t,n,i){var r=c;return(h.inStr(i.type,"mouse")||y.matchType(l,i))&&(r=l),{center:h.getCenter(n),timeStamp:Date.now(),target:i.target,touches:n,eventType:t,pointerType:r,srcEvent:i,preventDefault:function(){var e=this.srcEvent;e.preventManipulation&&e.preventManipulation(),e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return x.stopDetect()}}}},y=i.PointerEvent={pointers:{},getTouchList:function(){var e=[];return h.each(this.pointers,function(t){e.push(t)}),e},updatePointer:function(e,t){return e==f?delete this.pointers[t.pointerId]:(t.identifier=t.pointerId,this.pointers[t.pointerId]=t),Object.keys(this.pointers).length},matchType:function(e,t){if(!t.pointerType)return!1;var n=t.pointerType,i={};return i[l]=n===l,i[c]=n===c,i[u]=n===u,i[e]},getEvents:function(){return["pointerdown MSPointerDown","pointermove MSPointerMove","pointerup pointercancel MSPointerUp MSPointerCancel"]},reset:function(){this.pointers={}}},x=i.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(e,t){this.current||(this.stopped=!1,this.current={inst:e,startEvent:h.extend({},t),lastEvent:!1,lastVelocityEvent:!1,velocity:!1,name:""},this.detect(t)) -},detect:function(e){if(this.current&&!this.stopped){e=this.extendEventData(e);var t=this.current.inst,n=t.options;return h.each(this.gestures,function(i){return this.stopped||n[i.name]===!1||t.enabled===!1||i.handler.call(i,e,t)!==!1?void 0:(this.stopDetect(),!1)},this),this.current&&(this.current.lastEvent=e),e.eventType==f&&!e.touches.length-1&&this.stopDetect(),e}},stopDetect:function(){this.previous=h.extend({},this.current),this.current=null,this.stopped=!0},getVelocityData:function(e,t,n,r){var o=this.current,a=o.lastVelocityEvent,s=o.velocity;a&&e.timeStamp-a.timeStamp>i.UPDATE_VELOCITY_INTERVAL?(s=h.getVelocity(e.timeStamp-a.timeStamp,e.center.clientX-a.center.clientX,e.center.clientY-a.center.clientY),o.lastVelocityEvent=e):o.velocity||(s=h.getVelocity(t,n,r),o.lastVelocityEvent=e),o.velocity=s,e.velocityX=s.x,e.velocityY=s.y},getInterimData:function(e){var t,n,i=this.current.lastEvent;e.eventType==f?(t=i&&i.interimAngle,n=i&&i.interimDirection):(t=i&&h.getAngle(i.center,e.center),n=i&&h.getDirection(i.center,e.center)),e.interimAngle=t,e.interimDirection=n},extendEventData:function(e){var t=this.current,n=t.startEvent;(e.touches.length!=n.touches.length||e.touches===n.touches)&&(n.touches=[],h.each(e.touches,function(e){n.touches.push(h.extend({},e))}));var i=e.timeStamp-n.timeStamp,r=e.center.clientX-n.center.clientX,o=e.center.clientY-n.center.clientY;return this.getVelocityData(e,i,r,o),this.getInterimData(e),h.extend(e,{startEvent:n,deltaTime:i,deltaX:r,deltaY:o,distance:h.getDistance(n.center,e.center),angle:h.getAngle(n.center,e.center),direction:h.getDirection(n.center,e.center),scale:h.getScale(n.touches,e.touches),rotation:h.getRotation(n.touches,e.touches)}),e},register:function(e){var n=e.defaults||{};return n[e.name]===t&&(n[e.name]=!0),h.extend(i.defaults,n,!0),e.index=e.index||1e3,this.gestures.push(e),this.gestures.sort(function(e,t){return e.index t.index?1:0}),this.gestures}};i.gestures.Drag={name:"drag",index:50,defaults:{drag_min_distance:10,correct_for_drag_min_distance:!0,drag_max_touches:1,drag_block_horizontal:!1,drag_block_vertical:!1,drag_lock_to_axis:!1,drag_lock_min_distance:25},triggered:!1,handler:function(e,t){var n=x.current;if(n.name!=this.name&&this.triggered)return t.trigger(this.name+"end",e),void(this.triggered=!1);if(!(t.options.drag_max_touches>0&&e.touches.length>t.options.drag_max_touches))switch(e.eventType){case d:this.triggered=!1;break;case p:if(e.distance 0)){var l=Math.abs(t.options.drag_min_distance/e.distance);i.pageX+=e.deltaX*l,i.pageY+=e.deltaY*l,i.clientX+=e.deltaX*l,i.clientY+=e.deltaY*l,e=x.extendEventData(e)}(n.lastEvent.drag_locked_to_axis||t.options.drag_lock_to_axis&&t.options.drag_lock_min_distance<=e.distance)&&(e.drag_locked_to_axis=!0);var c=n.lastEvent.direction;e.drag_locked_to_axis&&c!==e.direction&&(e.direction=h.isVertical(c)?e.deltaY<0?a:r:e.deltaX<0?o:s),this.triggered||(t.trigger(this.name+"start",e),this.triggered=!0),t.trigger(this.name,e),t.trigger(this.name+e.direction,e);var u=h.isVertical(e.direction);(t.options.drag_block_vertical&&u||t.options.drag_block_horizontal&&!u)&&e.preventDefault();break;case f:this.triggered&&t.trigger(this.name+"end",e),this.triggered=!1}}},i.gestures.Hold={name:"hold",index:10,defaults:{hold_timeout:500,hold_threshold:2},timer:null,handler:function(e,t){switch(e.eventType){case d:clearTimeout(this.timer),x.current.name=this.name,this.timer=setTimeout(function(){"hold"==x.current.name&&t.trigger("hold",e)},t.options.hold_timeout);break;case p:e.distance>t.options.hold_threshold&&clearTimeout(this.timer);break;case f:clearTimeout(this.timer)}}},i.gestures.Release={name:"release",index:1/0,handler:function(e,t){e.eventType==f&&t.trigger(this.name,e)}},i.gestures.Swipe={name:"swipe",index:40,defaults:{swipe_min_touches:1,swipe_max_touches:1,swipe_velocity:.7},handler:function(e,t){if(e.eventType==f){if(e.touches.length t.options.swipe_max_touches)return;(e.velocityX>t.options.swipe_velocity||e.velocityY>t.options.swipe_velocity)&&(t.trigger(this.name,e),t.trigger(this.name+e.direction,e))}}},i.gestures.Tap={name:"tap",index:100,defaults:{tap_max_touchtime:250,tap_max_distance:10,tap_always:!0,doubletap_distance:20,doubletap_interval:300},has_moved:!1,handler:function(e,t){var n,i,r;e.eventType==d?this.has_moved=!1:e.eventType!=p||this.moved?e.eventType==f&&"touchcancel"!=e.srcEvent.type&&e.deltaTime t.options.tap_max_distance}},i.gestures.Touch={name:"touch",index:-1/0,defaults:{prevent_default:!1,prevent_mouseevents:!1},handler:function(e,t){return t.options.prevent_mouseevents&&e.pointerType==l?void e.stopDetect():(t.options.prevent_default&&e.preventDefault(),void(e.eventType==d&&t.trigger(this.name,e)))}},i.gestures.Transform={name:"transform",index:45,defaults:{transform_min_scale:.01,transform_min_rotation:1,transform_always_block:!1,transform_within_instance:!1},triggered:!1,handler:function(e,t){if(x.current.name!=this.name&&this.triggered)return t.trigger(this.name+"end",e),void(this.triggered=!1);if(!(e.touches.length<2)){if(t.options.transform_always_block&&e.preventDefault(),t.options.transform_within_instance)for(var n=-1;e.touches[++n];)if(!h.hasParent(e.touches[n].target,t.element))return;switch(e.eventType){case d:this.triggered=!1;break;case p:var i=Math.abs(1-e.scale),r=Math.abs(e.rotation);if(i t.options.transform_min_rotation&&t.trigger("rotate",e),i>t.options.transform_min_scale&&(t.trigger("pinch",e),t.trigger("pinch"+(e.scale<1?"in":"out"),e));break;case f:this.triggered&&t.trigger(this.name+"end",e),this.triggered=!1}}}},"function"==typeof define&&define.amd?define("hammerjs",[],function(){return i}):"object"==typeof module&&module.exports?module.exports=i:e.Hammer=i}(window),define("layout",["jquery","underscore","utils","constants","settings","eventMgr","crel","mousetrap","hammerjs"],function(e,t,n,i,r,o,a,s,l){function c(){$=!0,v.$elt.addClass("layout-animate")}function u(){$=!1,v.$elt.removeClass("layout-animate")}function d(t){this.selector=t,this.elt=document.querySelector(t),this.$elt=e(this.elt)}function p(e){e&&e.target!==v.elt&&e.target!==b.elt&&e.target!==T.elt||(G.forEach(function(e){e()}),u(),0!==G.length&&h(),G=[])}function f(){return t.find(J,function(e){return g.width>e.screenWidth}).maxWidth}function h(){var e=y.height-60,t=(C.elt.offsetWidth-f())/2;t \n \n\n \n\n \n \n\n\n\n\n \n\n\n \n\n \n\n\n\n\n \n\n\n \n\n \n\n \n \n\n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n' -}),define("text!html/bodyViewer.html",[],function(){return'\n\n \n\n\n\n\n\n\n \n\n \n \n\n\n\n\n \n\n\n\n\n\n\n \n\n\n \n\n \n\n \n \n\n\n\n'}),define("text!html/settingsTemplateTooltip.html",[],function(){return'Available variables:\n\n\n \n
\n\n
\nExamples:\n- \n documentTitle: document title
\n- \n documentMarkdown: document in Markdown format
\n- \n strippedDocumentMarkdown: document without front matter
\n- \n documentHTML: document in HTML format
\n- \n frontMatter: YAML front matter object (undefined if not present)
\n- \n publishAttributes: attributes of the publish location (undefined if\n not publishing)
\n
<title><%= documentTitle %></title>\n
<div><%- documentHTML %></div>\n
<%\n
if(publishAttributes.provider.providerId == "github") print(documentMarkdown);\n
%>\n
\n
\nMore\n info\n
\n
\n\n Careful! Template is subject to malicious code. Don\'t copy/paste untrusted\n content.\n'}),define("text!html/settingsShortcutsExtensionTooltip.html",[],function(){return'You can create expanding macros like this:\n
\n
\n\'- - > space\': function() {\n
\n expand(\'--> \', \'→ \');\n
\n}\n
\n
\nMore\n info\n
\n
\n Careful! This is subject to malicious code. Don\'t copy/paste untrusted content.\n'}),define("text!html/settingsUserCustomExtensionTooltip.html",[],function(){return'Extension variable name:\nuserCustom\n
\n
\nExample:\n
\nuserCustom.onPreviewFinished = function() {\n
\n eventMgr.onMessage("Finished!");\n
\n};\n
\n
\nMore\n info\n
\n
\n Careful! This is subject to malicious code. Don\'t copy/paste untrusted content.'}),function(){function e(){}function t(e){this.buttonBar=d.getElementById("wmd-button-bar"+e),this.preview=d.getElementById("wmd-preview"+e),this.input=d.getElementById("wmd-input"+e)}function n(e,t){var n,r,o,a=this,s=[],c=0,u="none",d=function(e,t){u!=e&&(u=e,t||f()),m.isIE&&"moving"==u?o=null:r=setTimeout(p,1)},p=function(e){o=new i(t,e),r=void 0};this.setCommandMode=function(){u="command",f(),r=setTimeout(p,0)},this.canUndo=function(){return c>1},this.canRedo=function(){return s[c+1]?!0:!1},this.undo=function(){a.canUndo()&&(n?(n.restore(),n=null):(s[c]=new i(t),s[--c].restore(),e&&e())),u="none",t.input.focus(),p()},this.redo=function(){a.canRedo()&&(s[++c].restore(),e&&e()),u="none",t.input.focus(),p()};var f=function(){var r=o||new i(t);return r?"moving"==u?void(n||(n=r)):(n&&(s[c-1].text!=n.text&&(s[c++]=n),n=null),s[c++]=r,s[c+1]=null,void(e&&e())):!1},h=function(e){if(!e.ctrlKey&&!e.metaKey){var t=e.keyCode;t>=33&&40>=t||t>=63232&&63235>=t?d("moving"):8==t||46==t||127==t?d("deleting"):13==t?d("newlines"):27==t?d("escape"):(16>t||t>20)&&91!=t&&d("typing")}},g=function(){l.addEvent(t.input,"keypress",function(e){!e.ctrlKey&&!e.metaKey||e.altKey||89!=e.keyCode&&90!=e.keyCode||e.preventDefault()});var e=function(){(m.isIE||o&&o.text!=t.input.value)&&void 0==r&&(u="paste",f(),p())};l.addEvent(t.input,"keydown",h),l.addEvent(t.input,"mousedown",function(){d("moving")}),t.input.onpaste=e,t.input.ondrop=e},v=function(){g(),p(!0)};this.reinit=function(e,t,i,a){s=[],c=0,u="none",n=void 0,r=void 0,p(),o.text=e,o.start=t,o.end=i,o.scrollTop=a,o.setInputAreaSelection(),f()},this.setMode=d,v()}function i(t){var n=this,i=t.input;this.init=function(){l.isVisible(i)&&(this.setInputAreaSelectionStartEnd(),this.scrollTop=i.scrollTop,(!this.text&&i.selectionStart||0===i.selectionStart)&&(this.text=i.value))},this.setInputAreaSelection=function(){if(l.isVisible(i))if(void 0===i.selectionStart||m.isOpera){if(d.selection){i.focus();var e=i.createTextRange();e.moveStart("character",-i.value.length),e.moveEnd("character",-i.value.length),e.moveEnd("character",n.end),e.moveStart("character",n.start),e.select()}}else i.focus(),i.selectionStart=n.start,i.selectionEnd=n.end,i.scrollTop=n.scrollTop},this.setInputAreaSelectionStartEnd=function(){if(t.ieCachedRange||!i.selectionStart&&0!==i.selectionStart){if(d.selection){n.text=l.fixEolChars(i.value);var e=t.ieCachedRange||d.selection.createRange(),r=l.fixEolChars(e.text),o="",a=o+r+o;e.text=a;var s=l.fixEolChars(i.value);e.moveStart("character",-a.length),e.text=r,n.start=s.indexOf(o),n.end=s.lastIndexOf(o)-o.length;var c=n.text.length-l.fixEolChars(i.value).length;if(c){for(e.moveStart("character",-r.length);c--;)r+="\n",n.end+=1;e.text=r}t.ieCachedRange&&(n.scrollTop=t.ieCachedScrollTop),t.ieCachedRange=null,this.setInputAreaSelection()}}else n.start=i.selectionStart,n.end=i.selectionEnd},this.restore=function(){void 0!=n.text&&n.text!=i.value&&(i.value=n.text),this.setInputAreaSelection(),setTimeout(function(){i.scrollTop=n.scrollTop},0)},this.getChunks=function(){var t=new e;return t.before=l.fixEolChars(n.text.substring(0,n.start)),t.startTag="",t.selection=l.fixEolChars(n.text.substring(n.start,n.end)),t.endTag="",t.after=l.fixEolChars(n.text.substring(n.end)),t.scrollTop=n.scrollTop,t},this.setChunks=function(e){e.before=e.before+e.startTag,e.after=e.endTag+e.after,this.start=e.before.length,this.end=e.before.length+e.selection.length,this.text=e.before+e.selection+e.after,this.scrollTop=e.scrollTop},this.init()}function r(e,t,n){var i,r,o,a=3e3,s="manual",c=function(e,t){l.addEvent(e,"input",t),e.onpaste=t,e.ondrop=t,l.addEvent(e,"keypress",t),l.addEvent(e,"keydown",t)},u=function(){if(t.preview){var n=t.input.value;if(!n||n!=o){o=n;var i=(new Date).getTime();n=e.makeHtml(n);var a=(new Date).getTime();r=a-i,g(n)}}},d=function(){if(i&&(clearTimeout(i),i=void 0),"manual"!==s){var e=0;"delayed"===s&&(e=r),e>a&&(e=a),i=setTimeout(u,e)}};this.refresh=function(e){e?(o="",u()):d()},this.processingTime=function(){return r};var p,f=function(e){var n=t.preview,i=n.parentNode,r=n.nextSibling;i.removeChild(n),n.innerHTML=e,r?i.insertBefore(n,r):i.appendChild(n)},h=function(e){t.preview.innerHTML=e},m=function(e){if(p)return p(e);try{h(e),p=h}catch(t){p=f,p(e)}},g=function(e){t.preview&&(m(e),n())},v=function(){c(t.input,d),t.preview&&(t.preview.scrollTop=0)};v()}function o(e,t,n,r,o,a,s){function l(e){f.focus();var o="wmd-link-button"==e.id||"wmd-image-button"==e.id;if(e.textOp){n&&!o&&n.setCommandMode();var a=new i(t);if(!a)return;var s=a.getChunks(),l=function(){f.focus(),s&&a.setChunks(s),a.restore(),r.refresh()},c=e.textOp(s,l);c||(l(),o||f.dispatchEvent(new Event("keydown")))}e.execute&&e.execute(n)}function c(e,n){var i="0px",r="-20px",o="-40px",a=e.getElementsByTagName("span")[0];n?(a.style.backgroundPosition=e.XShift+" "+i,e.onmouseover=function(){a.style.backgroundPosition=this.XShift+" "+o},e.onmouseout=function(){a.style.backgroundPosition=this.XShift+" "+i},m.isIE&&(e.onmousedown=function(){t.ieCachedRange=document.selection.createRange(),t.ieCachedScrollTop=t.input.scrollTop}),e.isHelp||(e.onclick=function(){return this.onmouseout&&this.onmouseout(),l(this),!1}),e.className=e.className.replace(/ disabled/g,"")):(a.style.backgroundPosition=e.XShift+" "+r,e.onmouseover=e.onmouseout=e.onclick=function(){},e.className+=" disabled")}function u(e){return"string"==typeof e&&(e=o[e]),function(){e.apply(o,arguments)}}function d(){var n=t.buttonBar,i=document.createElement("ul");i.id="wmd-button-row"+e,i.className="wmd-button-row",i=n.appendChild(i);var r=0,o=function(t,n,o,a){var s=document.createElement("li");s.className="wmd-button",s.style.left=r+"px",r+=25;var l=document.createElement("span");return s.id=t+e,s.appendChild(l),s.title=n,s.XShift=o,a&&(s.textOp=a),c(s,!0),i.appendChild(s),s},l=function(t){var n=document.createElement("li");n.className="wmd-spacer wmd-spacer"+t,n.id="wmd-spacer"+t+e,i.appendChild(n),r+=25};if(h.bold=o("wmd-bold-button",s("bold"),"0px",u("doBold")),h.italic=o("wmd-italic-button",s("italic"),"-20px",u("doItalic")),l(1),h.link=o("wmd-link-button",s("link"),"-40px",u(function(e,t){return this.doLinkOrImage(e,t,!1)})),h.quote=o("wmd-quote-button",s("quote"),"-60px",u("doBlockquote")),h.code=o("wmd-code-button",s("code"),"-80px",u("doCode")),h.image=o("wmd-image-button",s("image"),"-100px",u(function(e,t){return this.doLinkOrImage(e,t,!0)})),l(2),h.olist=o("wmd-olist-button",s("olist"),"-120px",u(function(e,t){this.doList(e,t,!0)})),h.ulist=o("wmd-ulist-button",s("ulist"),"-140px",u(function(e,t){this.doList(e,t,!1)})),h.heading=o("wmd-heading-button",s("heading"),"-160px",u("doHeading")),h.hr=o("wmd-hr-button",s("hr"),"-180px",u("doHorizontalRule")),l(3),h.undo=o("wmd-undo-button",s("undo"),"-200px",null),h.undo.execute=function(e){e&&e.undo()},h.redo=o("wmd-redo-button",s("redo"),"-220px",null),h.redo.execute=function(e){e&&e.redo()},a){var d=document.createElement("li"),f=document.createElement("span");d.appendChild(f),d.className="wmd-button wmd-help-button",d.id="wmd-help-button"+e,d.XShift="-240px",d.isHelp=!0,d.style.right="0px",d.title=s("help"),d.onclick=a.handler,c(d,!0),i.appendChild(d),h.help=d}p()}function p(){n&&(c(h.undo,n.canUndo()),c(h.redo,n.canRedo()))}var f=t.input,h={};d();var g="keydown";m.isOpera&&(g="keypress"),this.setUndoRedoButtonStates=p,this.buttons=h,this.doClick=l}function a(e,t){this.hooks=e,this.getString=t}function s(e){return e.replace(/^\s*(.*?)(?:\s+"(.+)")?\s*$/,function(e,t,n){return t=t.replace(/\?.*$/,function(e){return e.replace(/\+/g," ")}),t=decodeURIComponent(t),t=encodeURI(t).replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29"),t=t.replace(/\?.*$/,function(e){return e.replace(/\+/g,"%2b")}),n&&(n=n.trim?n.trim():n.replace(/^\s*/,"").replace(/\s*$/,""),n=n.replace(/"/g,"quot;").replace(/\(/g,"(").replace(/\)/g,")").replace(//g,">")),n?t+' "'+n+'"':t})}var l={},c={},u={},d=window.document,p=window.RegExp,f=window.navigator,h={lineLength:72},m={isIE:/msie/.test(f.userAgent.toLowerCase()),isIE_5or6:/msie 6/.test(f.userAgent.toLowerCase())||/msie 5/.test(f.userAgent.toLowerCase()),isOpera:/opera/.test(f.userAgent.toLowerCase())},g={bold:"Strong Ctrl/Cmd+B",boldexample:"strong text",italic:"Emphasis Ctrl/Cmd+I",italicexample:"emphasized text",link:"Hyperlink Ctrl/Cmd+L",linkdescription:"enter link description here",linkdialog:'Insert Hyperlink
http://example.com/ "optional title"
',quote:"BlockquoteCtrl/Cmd+Q",quoteexample:"Blockquote",code:"Code Sample"),e=e.replace(/(\*|_)(?=\S)(.+?)(?=\S)\1/g,"$2")}};n.setOptions(r),M=new Markdown.Editor(n,void 0,{undoManager:i.undoMgr}),M.hooks.set("insertLinkDialog",function(t){return T.insertLinkCallback=t,a.resetModalInputs(),e(".modal-insert-link").modal(),!0}),M.hooks.set("insertImageDialog",function(t){return T.insertLinkCallback=t,T.catchModal?!0:(a.resetModalInputs(),e(".modal-insert-image").modal(),!0)}),c.onPagedownConfigure(M),M.hooks.chain("onPreviewRefresh",c.onAsyncPreview),M.run(),i.undoMgr.init(),e(".wmd-button-row li").addClass("btn btn-success").css("left",0).find("span").hide();var o=e(".wmd-button-group1");e("#wmd-bold-button").append(e('')).appendTo(o),e("#wmd-italic-button").append(e('')).appendTo(o),o=e(".wmd-button-group2"),e("#wmd-link-button").append(e('')).appendTo(o),e("#wmd-quote-button").append(e('')).appendTo(o),e("#wmd-code-button").append(e('')).appendTo(o),e("#wmd-image-button").append(e('')).appendTo(o),o=e(".wmd-button-group3"),e("#wmd-olist-button").append(e('')).appendTo(o),e("#wmd-ulist-button").append(e('')).appendTo(o),e("#wmd-heading-button").append(e('')).appendTo(o),e("#wmd-hr-button").append(e('')).appendTo(o),o=e(".wmd-button-group5"),e("#wmd-undo-button").append(e('')).appendTo(o),e("#wmd-redo-button").append(e('')).appendTo(o)},T.onReady=function(){document.body.className+=" "+l.editMode,document.body.innerHTML=window.viewerMode===!0?d:u,a.init(),e(window).on("offline",T.setOffline),e(window).on("online",b),navigator.onLine===!1&&T.setOffline(),e(document).mousemove(m).keypress(m),r.init(),i.init(),S=window.setInterval(function(){a.updateCurrentTime(),v(),(g()===!0||window.viewerMode===!0)&&(c.onPeriodicRun(),y())},1e3),c.onReady()},c.addListener("onReady",function(){function n(e){if(e=e||"default",u!=e){var t="less!themes/"+e;-1!==window.baseDir.indexOf("-min")&&(t="css!themes/"+e),requirejs.undef(t),require([t]),u=e}}function r(n,i){t.each(document.querySelectorAll(n),function(t){var n=e(t);n.tooltip({html:!0,container:n.parents(".modal-content"),placement:"right",trigger:"manual",title:i}).click(function(){var t=this;m&&m[0]===t||a.defer(function(){e(document).on("click.close-tooltip",function(){m&&m.tooltip("hide"),m=void 0,e(document).off("click.close-tooltip")}),m=e(t).tooltip("show")})})})}e(".modal").on("shown.bs.modal",function(){var t=e(this);setTimeout(function(){t.find(".btn:first").focus(),t.find("button:first").focus(),t.find("input:enabled:visible:first").focus()},50)}).on("hidden.bs.modal",function(){i.focus(),n(window.theme)}).keyup(function(t){13!=t.which||e(t.target).is("textarea")||e(this).find(".modal-footer a:last").click()}),e(".action-insert-link").click(function(t){var n=a.getInputTextValue(e("#input-insert-link"),t);void 0!==n&&(T.insertLinkCallback(n),T.insertLinkCallback=void 0)}),e(".action-insert-image").click(function(t){var n=a.getInputTextValue(e("#input-insert-image"),t);void 0!==n&&(T.insertLinkCallback(n),T.insertLinkCallback=void 0)}),e(".modal-insert-link, .modal-insert-image").on("hidden.bs.modal",function(){void 0!==T.insertLinkCallback&&(T.insertLinkCallback(null),T.insertLinkCallback=void 0)}),e(".action-load-settings").click(function(){x()}),e(".action-apply-settings").click(function(e){w(e),e.isPropagationStopped()||window.location.reload()}),e(".action-add-google-drive-account").click(function(){3!==l.gdriveMultiAccount&&(l.gdriveMultiAccount++,s.settings=JSON.stringify(l),window.location.reload())});var u=window.theme;L=e("#input-settings-theme"),L.on("change",function(){n(this.value)}),e(".action-import-docs-settings").click(function(){e("#input-file-import-docs-settings").click()});var d;e("#input-file-import-docs-settings").change(function(n){var i=(n.dataTransfer||n.target).files;e(".modal-settings").modal("hide"),t.each(i,function(t){var n=new FileReader;n.onload=function(t){return function(n){try{d=JSON.parse(n.target.result);var i=parseInt(d.version.match(/^v(\d+)$/)[1],10),r=parseInt(s.version.match(/^v(\d+)$/)[1],10);i>r?c.onError("Incompatible version. Please upgrade StackEdit."):e(".modal-import-docs-settings").modal("show")}catch(o){c.onError("Wrong format: "+t.name)}e("#input-file-import-docs-settings").val("")}}(t),n.readAsText(t)})}),e(".action-import-docs-settings-confirm").click(function(){s.clear();var e=/^file\.|^folder\.|^publish\.|^settings$|^sync\.|^google\.|^author\.|^themeV3$|^version$/;t.each(d,function(t,n){e.test(n)&&(s[n]=t)}),window.location.reload()}),e(".action-export-docs-settings").click(function(){a.saveAs(JSON.stringify(s),"StackEdit local storage.json")}),e(".action-default-settings").click(function(){s.removeItem("settings"),s.removeItem("theme"),l.dropboxFullAccess||s.removeItem("dropbox.lastChangeId"),window.location.reload()}),e(".action-app-reset").click(function(){s.clear(),window.location.reload()}),e(".action-reset-input").click(function(){a.resetModalInputs()});var m;if(r(".tooltip-lazy-rendering","Disable preview rendering while typing in order to offload CPU. Refresh preview after 500 ms of inactivity."),r(".tooltip-default-content",["Thanks for supporting StackEdit by adding a backlink in your documents!Ctrl/Cmd+K",codeexample:"enter code here",image:"Image Ctrl/Cmd+G",imagedescription:"enter image description here",imagedialog:"
Insert Image
http://example.com/images/diagram.jpg \"optional title\"
",olist:"Numbered List
Need free image hosting?Ctrl/Cmd+O",ulist:"Bulleted List
Ctrl/Cmd+U",litem:"List item",heading:"Heading
/
Ctrl/Cmd+H",headingexample:"Heading",hr:"Horizontal Rule
Ctrl/Cmd+R",undo:"Undo - Ctrl/Cmd+Z",redo:"Redo - Ctrl/Cmd+Y",help:"Markdown Editing Help"},v="http://",b="http://";Markdown.Editor=function(e,i,s){s=s||{},"function"==typeof s.handler&&(s={helpButton:s}),s.strings=s.strings||{},s.helpButton&&(s.strings.help=s.strings.help||s.helpButton.title);var l=function(e){return s.strings[e]||g[e]};i=i||"";var c=this.hooks=new Markdown.HookCollection;c.addNoop("onPreviewRefresh"),c.addNoop("postBlockquoteCreation"),c.addFalse("insertImageDialog"),c.addFalse("insertLinkDialog"),this.getConverter=function(){return e};var u,p,f=this;this.run=function(){if(!u){u=new t(i);var h,m=new a(c,l),g=new r(e,u,function(){c.onPreviewRefresh()});s.undoManager?(p=s.undoManager,p.onButtonStateChange=function(){h.setUndoRedoButtonStates()},h&&h.setUndoRedoButtonStates()):/\?noundo/.test(d.location.href)||(p=new n(function(){g.refresh(),h&&h.setUndoRedoButtonStates()},u),this.textOperation=function(e){p.setCommandMode(),e(),f.refreshPreview()}),h=new o(i,u,p,g,m,s.helpButton,l),h.setUndoRedoButtonStates();{f.refreshPreview=function(){g.refresh(!0)}}f.undoManager=p,f.uiManager=h}}},e.prototype.findTags=function(e,t){var n,i=this;e&&(n=l.extendRegExp(e,"","$"),this.before=this.before.replace(n,function(e){return i.startTag=i.startTag+e,""}),n=l.extendRegExp(e,"^",""),this.selection=this.selection.replace(n,function(e){return i.startTag=i.startTag+e,""})),t&&(n=l.extendRegExp(t,"","$"),this.selection=this.selection.replace(n,function(e){return i.endTag=e+i.endTag,""}),n=l.extendRegExp(t,"^",""),this.after=this.after.replace(n,function(e){return i.endTag=e+i.endTag,""}))},e.prototype.trimWhitespace=function(e){var t,n,i=this;e?t=n="":(t=function(e){return i.before+=e,""},n=function(e){return i.after=e+i.after,""}),this.selection=this.selection.replace(/^(\s*)/,t).replace(/(\s*)$/,n)},e.prototype.skipLines=function(e,t,n){void 0===e&&(e=1),void 0===t&&(t=1),e++,t++;var i,r;if(navigator.userAgent.match(/Chrome/)&&"X".match(/()./),this.selection=this.selection.replace(/(^\n*)/,""),this.startTag=this.startTag+p.$1,this.selection=this.selection.replace(/(\n*$)/,""),this.endTag=this.endTag+p.$1,this.startTag=this.startTag.replace(/(^\n*)/,""),this.before=this.before+p.$1,this.endTag=this.endTag.replace(/(\n*$)/,""),this.after=this.after+p.$1,this.before){for(i=r="";e--;)i+="\\n?",r+="\n";n&&(i="\\n*"),this.before=this.before.replace(new p(i+"$",""),r)}if(this.after){for(i=r="";t--;)i+="\\n?",r+="\n";n&&(i="\\n*"),this.after=this.after.replace(new p(i,""),r)}},l.isVisible=function(e){return window.getComputedStyle?"none"!==window.getComputedStyle(e,null).getPropertyValue("display"):e.currentStyle?"none"!==e.currentStyle.display:void 0},l.addEvent=function(e,t,n){e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener(t,n,!1)},l.removeEvent=function(e,t,n){e.detachEvent?e.detachEvent("on"+t,n):e.removeEventListener(t,n,!1)},l.fixEolChars=function(e){return e=e.replace(/\r\n/g,"\n"),e=e.replace(/\r/g,"\n")},l.extendRegExp=function(e,t,n){(null===t||void 0===t)&&(t=""),(null===n||void 0===n)&&(n="");var i,r=e.toString();return r=r.replace(/\/([gim]*)$/,function(e,t){return i=t,""}),r=r.replace(/(^\/|\/$)/g,""),r=t+r+n,new p(r,i)},c.getTop=function(e,t){var n=e.offsetTop;if(!t)for(;e=e.offsetParent;)n+=e.offsetTop;return n},c.getHeight=function(e){return e.offsetHeight||e.scrollHeight},c.getWidth=function(e){return e.offsetWidth||e.scrollWidth},c.getPageSize=function(){var e,t,n,i;self.innerHeight&&self.scrollMaxY?(e=d.body.scrollWidth,t=self.innerHeight+self.scrollMaxY):d.body.scrollHeight>d.body.offsetHeight?(e=d.body.scrollWidth,t=d.body.scrollHeight):(e=d.body.offsetWidth,t=d.body.offsetHeight),self.innerHeight?(n=self.innerWidth,i=self.innerHeight):d.documentElement&&d.documentElement.clientHeight?(n=d.documentElement.clientWidth,i=d.documentElement.clientHeight):d.body&&(n=d.body.clientWidth,i=d.body.clientHeight);var r=Math.max(e,n),o=Math.max(t,i);return[r,o,n,i]},u.createBackground=function(){var e=d.createElement("div"),t=e.style;e.className="wmd-prompt-background",t.position="absolute",t.top="0",t.zIndex="1000",m.isIE?t.filter="alpha(opacity=50)":t.opacity="0.5";var n=c.getPageSize();return t.height=n[1]+"px",m.isIE?(t.left=d.documentElement.scrollLeft,t.width=d.documentElement.clientWidth):(t.left="0",t.width="100%"),d.body.appendChild(e),e},u.prompt=function(e,t,n){var i,r;void 0===t&&(t="");var o=function(e){var t=e.charCode||e.keyCode;27===t&&a(!0)},a=function(e){l.removeEvent(d.body,"keydown",o);var t=r.value;return e?t=null:(t=t.replace(/^http:\/\/(https?|ftp):\/\//,"$1://"),/^(?:https?|ftp):\/\//.test(t)||(t="http://"+t)),i.parentNode.removeChild(i),n(t),!1},s=function(){i=d.createElement("div"),i.className="wmd-prompt-dialog",i.style.padding="10px;",i.style.position="fixed",i.style.width="400px",i.style.zIndex="1001";var n=d.createElement("div");n.innerHTML=e,n.style.padding="5px",i.appendChild(n);var s=d.createElement("form"),u=s.style;s.onsubmit=function(){return a(!1)},u.padding="0",u.margin="0",u.cssFloat="left",u.width="100%",u.textAlign="center",u.position="relative",i.appendChild(s),r=d.createElement("input"),r.type="text",r.value=t,u=r.style,u.display="block",u.width="80%",u.marginLeft=u.marginRight="auto",s.appendChild(r);var p=d.createElement("input");p.type="button",p.onclick=function(){return a(!1)},p.value="OK",u=p.style,u.margin="10px",u.display="inline",u.width="7em";var f=d.createElement("input");f.type="button",f.onclick=function(){return a(!0)},f.value="Cancel",u=f.style,u.margin="10px",u.display="inline",u.width="7em",s.appendChild(p),s.appendChild(f),l.addEvent(d.body,"keydown",o),i.style.top="50%",i.style.left="50%",i.style.display="block",m.isIE_5or6&&(i.style.position="absolute",i.style.top=d.documentElement.scrollTop+200+"px",i.style.left="50%"),d.body.appendChild(i),i.style.marginTop=-(c.getHeight(i)/2)+"px",i.style.marginLeft=-(c.getWidth(i)/2)+"px"};setTimeout(function(){s();var e=t.length;if(void 0!==r.selectionStart)r.selectionStart=0,r.selectionEnd=e;else if(r.createTextRange){var n=r.createTextRange();n.collapse(!1),n.moveStart("character",-e),n.moveEnd("character",e),n.select()}r.focus()},0)};var y=a.prototype;y.prefixes="(?:\\s{4,}|\\s*>|\\s*-\\s+|\\s*\\d+\\.|=|\\+|-|_|\\*|#|\\s*\\[[^\n]]+\\]:)",y.unwrap=function(e){var t=new p("([^\\n])\\n(?!(\\n|"+this.prefixes+"))","g");e.selection=e.selection.replace(t,"$1 $2")},y.wrap=function(e,t){this.unwrap(e);var n=new p("(.{1,"+t+"})( +|$\\n?)","gm"),i=this;e.selection=e.selection.replace(n,function(e,t){return new p("^"+i.prefixes,"").test(e)?e:t+"\n"}),e.selection=e.selection.replace(/\s+$/,"")},y.doBold=function(e,t){return this.doBorI(e,t,2,this.getString("boldexample"))},y.doItalic=function(e,t){return this.doBorI(e,t,1,this.getString("italicexample"))},y.doBorI=function(e,t,n,i){e.trimWhitespace(),e.selection=e.selection.replace(/\n{2,}/g,"\n");var r=/(\**$)/.exec(e.before)[0],o=/(^\**)/.exec(e.after)[0],a=Math.min(r.length,o.length);if(a>=n&&(2!=a||1!=n))e.before=e.before.replace(p("[*]{"+n+"}$",""),""),e.after=e.after.replace(p("^[*]{"+n+"}",""),"");else if(!e.selection&&o){e.after=e.after.replace(/^([*_]*)/,""),e.before=e.before.replace(/(\s?)$/,"");var s=p.$1;e.before=e.before+o+s}else{e.selection||o||(e.selection=i);var l=1>=n?"*":"**";e.before=e.before+l,e.after=l+e.after}},y.stripLinkDefs=function(e,t){return e=e.replace(/^[ ]{0,3}\[(\d+)\]:[ \t]*\n?[ \t]*(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|$)/gm,function(e,n,i,r,o){return t[n]=e.replace(/\s*$/,""),r?(t[n]=e.replace(/["(](.+?)[")]$/,""),r+o):""})},y.addLinkDef=function(e,t){var n=0,i={};e.before=this.stripLinkDefs(e.before,i),e.selection=this.stripLinkDefs(e.selection,i),e.after=this.stripLinkDefs(e.after,i);var r="",o=/(\[)((?:\[[^\]]*\]|[^\[\]])*)(\][ ]?(?:\n[ ]*)?\[)(\d+)(\])/g,a=function(e){n++,e=e.replace(/^[ ]{0,3}\[(\d+)\]:/," ["+n+"]:"),r+="\n"+e},s=function(e,t,r,l,c,u){return r=r.replace(o,s),i[c]?(a(i[c]),t+r+l+n+u):e};e.before=e.before.replace(o,s),t?a(t):e.selection=e.selection.replace(o,s);var l=n;return e.after=e.after.replace(o,s),e.after&&(e.after=e.after.replace(/\n*$/,"")),e.after||(e.selection=e.selection.replace(/\n*$/,"")),e.after+="\n\n"+r,l},y.doLinkOrImage=function(e,t,n){e.trimWhitespace(),e.findTags(/\s*!?\[/,/\][ ]?(?:\n[ ]*)?(\(.*?\))?/);var i;if(!(e.endTag.length>1&&e.startTag.length>0)){if(e.selection=e.startTag+e.selection+e.endTag,e.startTag=e.endTag="",/\n\n/.test(e.selection))return void this.addLinkDef(e,null);var r=this,o=function(o){i.parentNode.removeChild(i),null!==o&&(e.selection=(" "+e.selection).replace(/([^\\](?:\\\\)*)(?=[[\]])/g,"$1\\").substr(1),e.startTag=n?"![":"[",e.endTag="]("+s(o)+")",e.selection||(e.selection=r.getString(n?"imagedescription":"linkdescription"))),t()};return i=u.createBackground(),n?this.hooks.insertImageDialog(o)||u.prompt(this.getString("imagedialog"),v,o):this.hooks.insertLinkDialog(o)||u.prompt(this.getString("linkdialog"),b,o),!0}e.startTag=e.startTag.replace(/!?\[/,""),e.endTag="",this.addLinkDef(e,null)},y.doAutoindent=function(e){var t=this,n=!1;e.before=e.before.replace(/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]*\n$/,"\n\n"),e.before=e.before.replace(/(\n|^)[ ]{0,3}>[ \t]*\n$/,"\n\n"),e.before=e.before.replace(/(\n|^)[ \t]+\n$/,"\n\n"),e.selection||/^[ \t]*(?:\n|$)/.test(e.after)||(e.after=e.after.replace(/^[^\n]*/,function(t){return e.selection=t,""}),n=!0),/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]+.*\n$/.test(e.before)&&t.doList&&t.doList(e),/(\n|^)[ ]{0,3}>[ \t]+.*\n$/.test(e.before)&&t.doBlockquote&&t.doBlockquote(e),/(\n|^)(\t|[ ]{4,}).*\n$/.test(e.before)&&t.doCode&&t.doCode(e),n&&(e.after=e.selection+e.after,e.selection="")},y.doBlockquote=function(e){e.selection=e.selection.replace(/^(\n*)([^\r]+?)(\n*)$/,function(t,n,i,r){return e.before+=n,e.after=r+e.after,i}),e.before=e.before.replace(/(>[ \t]*)$/,function(t,n){return e.selection=n+e.selection,""}),e.selection=e.selection.replace(/^(\s|>)+$/,""),e.selection=e.selection||this.getString("quoteexample");var t,n="",i="";if(e.before){for(var r=e.before.replace(/\n$/,"").split("\n"),o=!1,a=0;a0,/^>/.test(t)?(s=!0,!o&&t.length>1&&(o=!0)):s=/^[ \t]*$/.test(t)?!0:o,s?n+=t+"\n":(i+=n+t,n="\n")}/(^|\n)>/.test(n)||(i+=n,n="")}e.startTag=n,e.before=i,e.after&&(e.after=e.after.replace(/^\n?/,"\n")),e.after=e.after.replace(/^(((\n|^)(\n[ \t]*)*>(.+\n)*.*)+(\n[ \t]*)*)/,function(t){return e.endTag=t,""});var l=function(t){var n=t?"> ":"";e.startTag&&(e.startTag=e.startTag.replace(/\n((>|\s)*)\n$/,function(e,t){return"\n"+t.replace(/^[ ]{0,3}>?[ \t]*$/gm,n)+"\n"})),e.endTag&&(e.endTag=e.endTag.replace(/^\n((>|\s)*)\n/,function(e,t){return"\n"+t.replace(/^[ ]{0,3}>?[ \t]*$/gm,n)+"\n"}))};/^(?![ ]{0,3}>)/m.test(e.selection)?(this.wrap(e,h.lineLength-2),e.selection=e.selection.replace(/^/gm,"> "),l(!0),e.skipLines()):(e.selection=e.selection.replace(/^[ ]{0,3}> ?/gm,""),this.unwrap(e),l(!1),!/^(\n|^)[ ]{0,3}>/.test(e.selection)&&e.startTag&&(e.startTag=e.startTag.replace(/\n{0,2}$/,"\n\n")),!/(\n|^)[ ]{0,3}>.*$/.test(e.selection)&&e.endTag&&(e.endTag=e.endTag.replace(/^\n{0,2}/,"\n\n"))),e.selection=this.hooks.postBlockquoteCreation(e.selection),/\n/.test(e.selection)||(e.selection=e.selection.replace(/^(> *)/,function(t,n){return e.startTag+=n,""}))},y.doCode=function(e){var t=/\S[ ]*$/.test(e.before),n=/^[ ]*\S/.test(e.after);if(!n&&!t||/\n/.test(e.selection)){e.before=e.before.replace(/[ ]{4}$/,function(t){return e.selection=t+e.selection,""});var i=1,r=1;/(\n|^)(\t|[ ]{4,}).*\n$/.test(e.before)&&(i=0),/^\n(\t|[ ]{4,})/.test(e.after)&&(r=0),e.skipLines(i,r),e.selection?/^[ ]{0,3}\S/m.test(e.selection)?/\n/.test(e.selection)?e.selection=e.selection.replace(/^/gm," "):e.before+=" ":e.selection=e.selection.replace(/^(?:[ ]{4}|[ ]{0,3}\t)/gm,""):(e.startTag=" ",e.selection=this.getString("codeexample"))}else e.trimWhitespace(),e.findTags(/`/,/`/),e.startTag||e.endTag?e.endTag&&!e.startTag?(e.before+=e.endTag,e.endTag=""):e.startTag=e.endTag="":(e.startTag=e.endTag="`",e.selection||(e.selection=this.getString("codeexample")))},y.doList=function(e,t,n){var i=/(\n|^)(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*$/,r=/^\n*(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*/,o="-",a=1,s=function(){var e;return n?(e=" "+a+". ",a++):e=" "+o+" ",e},l=function(e){return void 0===n&&(n=/^\s*\d/.test(e)),e=e.replace(/^[ ]{0,3}([*+-]|\d+[.])\s/gm,function(){return s()})};if(e.findTags(/(\n|^)*[ ]{0,3}([*+-]|\d+[.])\s+/,null),!e.before||/\n$/.test(e.before)||/^\n/.test(e.startTag)||(e.before+=e.startTag,e.startTag=""),e.startTag){var c=/\d+[.]/.test(e.startTag);if(e.startTag="",e.selection=e.selection.replace(/\n[ ]{4}/g,"\n"),this.unwrap(e),e.skipLines(),c&&(e.after=e.after.replace(r,l)),n==c)return}var u=1;e.before=e.before.replace(i,function(e){return/^\s*([*+-])/.test(e)&&(o=p.$1),u=/[^\n]\n\n[^\n]/.test(e)?1:0,l(e)}),e.selection||(e.selection=this.getString("litem"));var d=s(),f=1;e.after=e.after.replace(r,function(e){return f=/[^\n]\n\n[^\n]/.test(e)?1:0,l(e)}),e.trimWhitespace(!0),e.skipLines(u,f,!0),e.startTag=d;var m=d.replace(/./g," ");this.wrap(e,h.lineLength-m.length),e.selection=e.selection.replace(/\n/g,"\n"+m)},y.doHeading=function(e){if(e.selection=e.selection.replace(/\s+/g," "),e.selection=e.selection.replace(/(^\s+|\s+$)/g,""),!e.selection)return e.startTag="## ",e.selection=this.getString("headingexample"),void(e.endTag=" ##");var t=0;e.findTags(/#+[ ]*/,/[ ]*#+/),/#+/.test(e.startTag)&&(t=p.lastMatch.length),e.startTag=e.endTag="",e.findTags(null,/\s?(-+|=+)/),/=+/.test(e.endTag)&&(t=1),/-+/.test(e.endTag)&&(t=2),e.startTag=e.endTag="",e.skipLines(1,1);var n=0==t?2:t-1;if(n>0){var i=n>=2?"-":"=",r=e.selection.length;for(r>h.lineLength&&(r=h.lineLength),e.endTag="\n";r--;)e.endTag+=i}},y.doHorizontalRule=function(e){e.startTag="----------\n",e.selection="",e.skipLines(2,1,!0)}}(),define("pagedown",function(){}),define("core",["jquery","underscore","crel","editor","layout","constants","utils","storage","settings","eventMgr","text!html/bodyIndex.html","text!html/bodyViewer.html","text!html/settingsTemplateTooltip.html","text!html/settingsShortcutsExtensionTooltip.html","text!html/settingsUserCustomExtensionTooltip.html","storage","pagedown"],function(e,t,n,i,r,o,a,s,l,c,u,d,p,f,h){function m(){E=!0,k=!0;var e=a.currentTime;e>I+1e3&&(I=e,c.onUserActive())}function g(){return a.currentTime-I>o.USER_IDLE_THRESHOLD&&(k=!1),k&&_}function v(){if(E!==!1&&_!==!1){void 0===C&&(C=a.randomString(),s.frontWindowId=C);var t=s.frontWindowId;t!=C&&(_=!1,void 0!==S&&clearInterval(S),e(".modal").modal("hide"),e(".modal-non-unique").modal("show"),window.close())}}function b(){D===!0&&(D=!1,c.onOfflineChanged(!1))}function y(){D===!0&&navigator.onLine===!0&&N+o.CHECK_ONLINE_PERIOD $2
",'NOTE: Backlinks in Stack Exchange Q/A are not welcome.'].join("")),r(".tooltip-shortcuts-extension",f),r(".tooltip-usercustom-extension",h),r(".tooltip-template",p),e("div.dropdown-menu").click(function(e){e.stopPropagation()}),e(".modal-non-unique").modal({backdrop:"static",keyboard:!1,show:!1}),t.each(document.querySelectorAll("img"),function(t){var n=e(t),i=n.data("stackeditSrc");i&&n.attr("src",window.baseDir+"/img/"+i)}),window.viewerMode===!1){var g=t.reduce(o.THEME_LIST,function(e,t,n){return e+'"},"");document.getElementById("input-settings-theme").innerHTML=g}e(".modal-header").append(' ')}),T}),define("text!WELCOME.md",[],function(){return'Welcome to StackEdit! {#welcome}\n====================\n\n\nHello, I am your first Markdown document within **StackEdit**[^stackedit]. Don\'t delete me, I can be helpful. I can be recovered anyway in the `Utils` tab of the `Settings` dialog.\n\n----------\n\n\nDocuments\n--------------\n\n**StackEdit** stores your documents in your browser, which means all your documents are automatically saved locally and are accessible **offline!**\n\n> **Note:**\n\n> - StackEdit is accessible offline after the application has been loaded for the first time.\n> - Your local documents are not shared between different browsers or computers.\n> - Clearing your browser\'s data may **delete all your local documents!** Make sure your documents are backed up using **Google Drive** or **Dropbox** synchronization (see [ Synchronization](#synchronization) section).\n\n#### Create a document\n\nThe document panel is accessible using button in the navigation bar. You can create a new document by clicking the `New document` sub-menu in the document panel.\n\n#### Switch to another document\n\nAll your local documents are listed in the document panel. You can switch from one to another by clicking a document in the document panel or you can also use Ctrl+[ and Ctrl+] to toggle documents by most recently used.\n\n#### Rename a document\n\nYou can rename the current document by clicking the document title in the navigation bar.\n\n#### Delete a document\n\nYou can delete the current document by clicking the `Delete document` sub-menu in the document panel.\n\n#### Export a document\n\nYou can save the current document to a file using the `Export to disk` sub-menu from the menu panel.\n\n> **Tip:** See [ Publish a document](#publish-a-document) section for a description of the different output formats.\n\n\n----------\n\n\nSynchronization\n--------------------\n\n**StackEdit** can be combined with **Google Drive** and **Dropbox** to have your documents centralized in the *Cloud*. The synchronization mechanism will take care of uploading your modifications or downloading the latest version of your documents.\n\n> **Note:**\n\n> - Full access to **Google Drive** or **Dropbox** is required to be able to import any document in StackEdit. Permission restrictions can be configured in the settings.\n> - Imported documents are downloaded in your browser and are not transmitted to a server.\n> - If you experience problems saving your documents on Google Drive, check and optionally disable browser extensions, such as Disconnect.\n\n#### Open a document\n\nYou can open a document from **Google Drive** or the **Dropbox** by opening the `Synchronize` sub-menu and by clicking `Open from...`. Once opened, any modification in your document will be automatically synchronized with the **Google Drive** / **Dropbox** file.\n\n#### Save a document\n\nYou can save any document by opening the `Synchronize` sub-menu and by clicking `Save on...`. Even if your document is already synchronized with **Google Drive** or **Dropbox**, you can export it to a another location. **StackEdit** can synchronize one document with multiple locations.\n\n#### Synchronize a document\n\nOnce your document is linked to a **Google Drive** or a **Dropbox** file, **StackEdit** will periodically (every 3 minutes) synchronize it by downloading/uploading any modification. Any conflict will be detected, and a local copy of your document will be created as a backup if necessary.\n\nIf you just have modified your document and you want to force the synchronization, click the button in the navigation bar.\n\n> **Note:** The button is disabled when you have no document to synchronize.\n\n#### Manage document synchronization\n\nSince one document can be synchronized with multiple locations, you can list and manage synchronized locations by clicking `Manage synchronization` in the `Synchronize` sub-menu. This will let you remove synchronization locations that are associated to your document.\n\n> **Note:** If you delete the file from **Google Drive** or from **Dropbox**, the document will no longer be synchronized with that location.\n\n----------\n\n\nPublication\n--------------\n\nOnce you are happy with your document, you can publish it on different websites directly from **StackEdit**. As for now, **StackEdit** can publish on **Blogger**, **Dropbox**, **Gist**, **GitHub**, **Google Drive**, **Tumblr**, **WordPress** and on any SSH server.\n\n#### Publish a document\n\nYou can publish your document by opening the `Publish` sub-menu and by choosing a website. In the dialog box, you can choose the publication format:\n\n- Markdown, to publish the Markdown text on a website that can interpret it (**GitHub** for example),\n- HTML, to publish the document converted into HTML (on a blog for example),\n- Template, to have a full control of the output.\n\n> **Note:** The default template is a simple webpage wrapping your document in HTML format. You can customize it in the `Advanced` tab of the `Settings` dialog.\n\n#### Update a publication\n\nAfter publishing, **StackEdit** will keep your document linked to that publication which makes it easy for you to update it. Once you have modified your document and you want to update your publication, click on the button in the navigation bar.\n\n> **Note:** The button is disabled when your document has not been published yet.\n\n#### Manage document publication\n\nSince one document can be published on multiple locations, you can list and manage publish locations by clicking `Manage publication` in the menu. This will let you remove publication locations that are associated to your document.\n\n> **Note:** In some cases, if the file has been removed from the website or the blog, the document will no longer be published on that location.\n\n----------\n\n\nMarkdown Extra\n--------------------\n\n**StackEdit** supports **Markdown Extra**, which extends **Markdown** syntax with some nice features.\n\n> **Tip:** You can disable any **Markdown Extra** feature in the `Extensions` tab of the `Settings` dialog.\n\n\n### Tables\n\n**Markdown Extra** has a special syntax for tables:\n\nItem | Value\n--- | ---\nComputer | $1600\nPhone | $12\nPipe | $1\n\nYou can specify column alignment with one or two colons:\n\n| Item | Value | Qty |\n| :--- | ---: | :---: |\n| Computer | $1600 | 5 |\n| Phone | $12 | 12 |\n| Pipe | $1 | 234 |\n\n\n### Definition Lists\n\n**Markdown Extra** has a special syntax for definition lists too:\n\nTerm 1\nTerm 2\n: Definition A\n: Definition B\n\nTerm 3\n\n: Definition C\n\n: Definition D\n\n > part of definition D\n\n\n### Fenced code blocks\n\nGitHub\'s fenced code blocks[^gfm] are also supported with **Prettify** syntax highlighting:\n\n```\n// Foo\nvar bar = 0;\n```\n\n> **Tip:** To use **Highlight.js** instead of **Prettify**, just configure the `Markdown Extra` extension in the `Settings` dialog.\n\n\n### Footnotes\n\nYou can create footnotes like this[^footnote].\n\n [^footnote]: Here is the *text* of the **footnote**.\n\n\n### SmartyPants\n\nSmartyPants converts ASCII punctuation characters into "smart" typographic punctuation HTML entities. For example:\n\n| | ASCII | HTML |\n---|---|---\n| Single backticks | `\'Isn\'t this fun?\'` | \'Isn\'t this fun?\' |\n| Quotes | `"Isn\'t this fun?"` | "Isn\'t this fun?" |\n| Dashes | `-- is en-dash, --- is em-dash` | -- is en-dash, --- is em-dash |\n\n\n### Table of contents\n\nYou can insert a table of contents using the marker `[TOC]`:\n\n[TOC]\n\n\n### MathJax\n\nYou can render *LaTeX* mathematical expressions using **MathJax**, as on [math.stackexchange.com][1]:\n\nThe *Gamma function* satisfying $\\Gamma(n) = (n-1)!\\quad\\forall n\\in\\mathbb N$ is via the Euler integral\n\n$$\n\\Gamma(z) = \\int_0^\\infty t^{z-1}e^{-t}dt\\,.\n$$\n\n> **Tip:** Make sure you include **MathJax** into your publications to render mathematical expression correctly. Your page/template should include something like:\n\n```\n\n```\n\n> **NOTE:** You can find more information:\n\n> - about **Markdown** syntax [here][2],\n> - about **Markdown Extra** extension [here][3],\n> - about **LaTeX** mathematical expressions [here][4],\n> - about **Prettify** syntax highlighting [here][5],\n> - about **Highlight.js** syntax highlighting [here][6].\n\n [^stackedit]: [StackEdit](https://stackedit.io/) is a full-featured, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.\n\n [^gfm]: **GitHub Flavored Markdown** (GFM) is supported by StackEdit.\n\n\n [1]: http://math.stackexchange.com/\n [2]: http://daringfireball.net/projects/markdown/syntax "Markdown"\n [3]: https://github.com/jmcmanus/pagedown-extra "Pagedown Extra"\n [4]: http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference\n [5]: https://code.google.com/p/google-code-prettify/\n [6]: http://highlightjs.org/\n'}),define("fileMgr",["jquery","underscore","constants","core","utils","storage","settings","eventMgr","fileSystem","classes/FileDescriptor","text!WELCOME.md"],function(e,t,n,i,r,o,a,s,l,c,u){var d={};return d.currentFile=void 0,d.selectFile=function(r){if(r=r||d.currentFile,void 0===r){var o=t.size(l);r=0===o?d.createFile(n.WELCOME_DOCUMENT_TITLE,u):t.max(l,function(e){return e.selectTime||0})}d.currentFile!==r&&(d.currentFile=r,r.selectTime=(new Date).getTime(),s.onFileSelected(r),e(".action-edit-document").toggleClass("hide",r.fileIndex!=n.TEMPORARY_FILE_INDEX)),i.initEditor(r)},d.createFile=function(e,i,u,d,p){if(i=void 0!==i?i:a.defaultContent,!e){e=n.DEFAULT_FILE_TITLE;for(var f=2,h=function(t){return t.title==e};t.some(l,h);)e=n.DEFAULT_FILE_TITLE+f++}var m=n.TEMPORARY_FILE_INDEX;if(!p)do m="file."+r.randomString();while(t.has(l,m));d=d||{};var g=t.reduce(d,function(e,t){return r.storeAttributes(t),e+t.syncIndex+";"},";");o[m+".title"]=e,o[m+".content"]=i,o[m+".sync"]=g,o[m+".publish"]=";";var v=new c(m,e,d);return u&&(v.discussionListJSON=u),p||(r.appendIndexToArray("file.list",m),l[m]=v,s.onFileCreated(v)),v},d.deleteFile=function(e){e=e||d.currentFile,e.folder&&(e.folder.removeFile(e),s.onFoldersChanged()),r.removeIndexFromArray("file.list",e.fileIndex),delete l[e.fileIndex],d.currentFile===e&&(d.currentFile=void 0,d.selectFile()),s.onFileDeleted(e)},d.getFileFromSyncIndex=function(e){return t.find(l,function(n){return t.has(n.syncLocations,e)})},d.getFileFromPublishIndex=function(e){return t.find(l,function(n){return t.has(n.publishLocations,e)})},s.addListener("onReady",function(){function t(){o.addClass("hide"),r.removeClass("hide");var t=e.trim(o.val()),n=d.currentFile;t&&t!=n.title&&(n.title=t,s.onTitleChanged(n)),o.val(n.title),i.focus()}var i=e("#wmd-input");d.selectFile();var r=e(".file-title-navbar"),o=e(".input-file-title");e(".action-create-file").click(function(){setTimeout(function(){var e=d.createFile();d.selectFile(e),r.click()},400)}),e(".action-remove-file-confirm").click(function(){e(".modal-remove-file-confirm").modal("show")}),e(".action-remove-file").click(function(){d.deleteFile()}),r.click(function(){if(window.viewerMode!==!0){r.addClass("hide");var e=o.removeClass("hide");setTimeout(function(){e.focus().get(0).select()},10)}}),o.blur(function(){t()}).keyup(function(e){13==e.keyCode&&t(),27==e.keyCode&&(o.val(""),t())}),e(".action-open-stackedit").click(function(){window.location.href="."}),e(".action-edit-document").click(function(){var e=i.val(),t=d.currentFile.title,n=d.createFile(t,e);d.selectFile(n),window.location.href="."}),e(".action-welcome-file").click(function(){var e=d.createFile(n.WELCOME_DOCUMENT_TITLE,u);d.selectFile(e)})}),s.onFileMgrCreated(d),d}),define("classes/Provider",["underscore","utils","settings","eventMgr","fileMgr","editor","diff_match_patch_uncompressed","jsondiffpatch"],function(e,t,n,i,r,o,a,s){function l(e,t){this.providerId=e,this.providerName=t,this.isPublishEnabled=!0}l.prototype.parseDiscussionList=function(t){try{var n=JSON.parse(t);return e.each(n,function(t,n){if(t.discussionIndex!=n||!e.isNumber(t.selectionStart)||!e.isNumber(t.selectionEnd))throw"invalid";t.commentList&&t.commentList.forEach(function(t){if(t.author&&!e.isString(t.author)||!e.isString(t.content))throw"invalid"})}),n}catch(i){}},l.prototype.serializeContent=function(e,t){return t.length>2?e+"":e},l.prototype.parseContent=function(e){var t,n="{}",i=/$/.exec(e);return i&&(t=this.parseDiscussionList(i[1]))&&(e=e.substring(0,i.index),n=i[1]),{content:e,discussionList:t||{},discussionListJSON:n}};var c=new a;c.Match_Threshold=0,c.Patch_DeleteThreshold=0;var u=s.create({objectHash:function(e){return JSON.stringify(e)},textDiff:{minLength:9999999}}),d="merge"==n.conflictMode;return l.prototype.syncMerge=function(n,a,s,l,p,f){function h(e){function t(){(i[1]||r[1])&&(i[1]&&r[1]?(i[1]="⧸⧸"+i[1]+"⧸⧸",r[1]+="⧸⧸",n.push(i),n.push(r)):n.push([0,i[1]+r[1]]),i=[-1,""],r=[1,""])}var n=[],i=[-1,""],r=[1,""],o=20;return e.forEach(function(a,s){function l(){return 0===s||s===e.length-1}var c=a[0],u=a[1];if(0===c)if(l()||u.length>o){if(i[1]||r[1]){var d=/\s/.exec(u);if(d){var p=d.index,f=u.substring(0,p);u=u.substring(p),i[1]+=f,r[1]+=f}}if(u){for(var h=u.length;h&&/\S/.test(u[h-1]);)h--;var m=u.substring(h);u=u.substring(0,h),l()||u.length>o?(t(),n.push([0,u])):(i[1]+=u,r[1]+=u),i[1]+=m,r[1]+=m}}else i[1]+=u,r[1]+=u;else-1===c?i[1]+=u:1===c&&(r[1]+=u)}),i[1]==r[1]?n.push([0,r[1]]):t(),n}var m=n.content,g=n.title,v=n.discussionListJSON,b=n.discussionList,y=t.crc32(m),x=t.crc32(g),w=t.crc32(v),S=t.crc32(s),C=t.crc32(l),T=t.crc32(f),E=a.contentCRC!=y,k=a.contentCRC!=S,_=m!=s&&k,I=_&&E;a.titleCRC=a.titleCRC||x;var D,N,L=a.titleCRC!=x,M=a.titleCRC!=C,A=g!=l&&M,R=A&&L,P=a.discussionListCRC!=w,F=a.discussionListCRC!=T,O=v!=f&&F,B=O&&P,j=[],$=s,G=l,q=p,H=!1,U=!1,z=!1;if(!d&&(I||R||B)||I&&void 0===a.content||R&&void 0===a.title||B&&void 0===a.discussionList)r.createFile(g+" (backup)",m,v),i.onMessage('Conflict detected on "'+g+'". A backup has been created locally.');else{if(I){var V=a.content;D=c.diff_main(V,m),c.diff_cleanupSemantic(D),N=c.patch_make(V,D);var W=c.patch_apply(N,s);if($=W[0],!W[1].every(e.identity)){D=c.diff_main(m,$),D=h(D),$="";var Q;D.forEach(function(e){var t=e[0],n=e[1];0===t||Q?0===t&&Q&&(Q.selectionEnd=$.length,j.push(Q),Q=void 0):Q={selectionStart:$.length,type:"conflict"},$+=n}),Q&&(Q.selectionEnd=$.length,j.push(Q))}}_&&(P&&(H=!0),F?U=!0:(H=!0,q=b)),B&&(z=!0),R&&(N=c.patch_make(a.title,g),G=c.patch_apply(N,l)[0])}var X;if(_){var K=[];r.currentFile===n&&(X={selectionStart:o.selectionMgr.selectionStart,selectionEnd:o.selectionMgr.selectionEnd},K.push(X),n.newDiscussion&&K.push(n.newDiscussion)),H&&(K=K.concat(e.values(b))),O|=o.adjustCommentOffsets(m,$,K)}if(U){var J=e.values(p);o.adjustCommentOffsets(s,$,J)}if(z){var Y=JSON.parse(a.discussionList);D=u.diff(Y,b),u.patch(p,D),e.each(p,function(e,t){e||delete p[t]})}return j.length&&(O=!0,j.forEach(function(n){var i;do i=t.randomString()+t.randomString();while(e.has(q,i));n.discussionIndex=i,q[i]=n})),A&&(n.title=G,i.onTitleChanged(n),i.onMessage('"'+g+'" has been renamed to "'+G+'" on '+this.providerName+".")),(_||O)&&o.watcher.noWatch(e.bind(function(){if(_&&(r.currentFile===n&&(o.setValueNoWatch($),X&&o.selectionMgr.setSelectionStartEnd(X.selectionStart,X.selectionEnd)),n.content=$,i.onContentChanged(n,$)),O){n.discussionList=q;var t=u.diff(b,q),a=!1;e.each(t,function(t,r){e.isArray(t)?1===t.length?i.onDiscussionCreated(n,q[r]):i.onDiscussionRemoved(n,b[r]):a=!0}),a&&i.onCommentsChanged(n)}o.undoMgr.currentMode="sync",o.undoMgr.saveState(),i.onMessage('"'+l+'" has been updated from '+this.providerName+"."),j.length&&i.onMessage('"'+l+'" has conflicts that you have to review.')},this)),{contentCRC:S,titleCRC:C,discussionListCRC:T}},l}),define("classes/AsyncTask",["underscore","constants","utils","eventMgr"],function(e,t,n,i){function r(e){this.finished=!1,this.timeout=t.ASYNC_TASK_DEFAULT_TIMEOUT,this.retryCounter=0,this.runCallbacks=[],this.successCallbacks=[],this.errorCallbacks=[],this.force=e}function o(){if(c===!0)return void(l+u.timeout=t)return void this.error(e);var i=1e3*Math.pow(2,this.retryCounter++);l=n.currentTime+i,c=!1,o()}},r.prototype.enqueue=function(){s.push(this),o()};var u,d=!1,p=!1;return i.addListener("onUserActive",function(){p=!0}),i.addListener("onPeriodicRun",o),r}),define("helpers/dropboxHelper",["jquery","underscore","constants","core","utils","storage","logger","settings","eventMgr","classes/AsyncTask"],function(e,t,n,i,r,o,a,s,l,c){function u(t){t.onRun(function(){return v===!0?(h=void 0,void t.error(new Error("Operation not available in offline mode.|stopPublish"))):void 0!==h?void t.chain():void e.ajax({url:"libs/dropbox.min.js",dataType:"script",timeout:n.AJAX_TIMEOUT}).done(function(){h=new Dropbox.Client({key:s.dropboxFullAccess===!0?n.DROPBOX_APP_KEY:n.DROPBOX_RESTRICTED_APP_KEY,secret:s.dropboxFullAccess===!0?n.DROPBOX_APP_SECRET:n.DROPBOX_RESTRICTED_APP_SECRET}),h.authDriver(new Dropbox.AuthDriver.Popup({receiverUrl:n.BASE_URL+"html/dropbox-oauth-receiver.html",rememberUser:!0})),t.chain()}).fail(function(e){var n={status:e.status,responseText:e.statusText};p(n,t)})})}function d(e){e.onRun(function(){function t(){r.redirectConfirm("You are being redirected to Dropbox authorization page.",function(){e.chain(i)},function(){e.error(new Error("Operation canceled."))})}function i(){o===!1?e.timeout=n.ASYNC_TASK_LONG_TIMEOUT:h.reset(),h.authenticate({interactive:!o},function(n,i){return i.isAuthenticated()===!0?(m=!0,void e.chain()):o===!0?(o=!1,void e.chain(t)):void e.error(new Error("Access to Dropbox account is not authorized."))})}if(m===!0)return void e.chain();var o=!0;e.chain(i)})}function p(e,n){var r=!0;if(e)if(a.error(e),"string"==typeof e)r=e;else{if(r="Dropbox error ("+e.status+": "+e.responseText+").",401===e.status||403===e.status)return m=!1,r="Access to Dropbox account is not authorized.",void n.retry(new Error(r),1);if(400===e.status&&-1!==e.responseText.indexOf("oauth_nonce"))return t.each(t.keys(o),function(e){0===e.indexOf("dropbox-auth")&&o.removeItem(e)}),m=!1,void n.retry(new Error(r),1);e.status<=0&&(h=void 0,m=!1,i.setOffline(),r="|stopPublish")}n.error(new Error(r))}function f(t){t.onRun(function(){function i(){r.redirectConfirm("You are being redirected to Dropbox Chooser page.",function(){t.chain()},function(){t.error(new Error("Operation canceled."))})}return b===!0?void t.chain():void e.ajax({url:"https://www.dropbox.com/static/api/1/dropbox.js",dataType:"script",timeout:n.AJAX_TIMEOUT}).done(function(){b=!0,t.chain(i)}).fail(function(e){var n={status:e.status,responseText:e.statusText};p(n,t)})})}var h,m=!1,g={},v=!1;l.addListener("onOfflineChanged",function(e){v=e}),g.upload=function(e,t,n){var i,r=new c;u(r),d(r),r.onRun(function(){h.writeFile(e,t,function(t,n){return t?(400===t.status&&(t='Could not upload document into path "'+e+'".'),void p(t,r)):(i=n,void r.chain())})}),r.onSuccess(function(){n(void 0,i)}),r.onError(function(e){n(e)}),r.enqueue()},g.checkChanges=function(e,t){var n=[],i=e||0,r=new c;u(r),d(r),r.onRun(function(){function e(){h.pullChanges(i,function(t,o){return t?void p(t,r):(i=o.cursor(),void 0!==o.changes&&(n=n.concat(o.changes)),void(o.shouldPullAgain?r.chain(e):r.chain()))})}r.chain(e)}),r.onSuccess(function(){t(void 0,n,i)}),r.onError(function(e){t(e)}),r.enqueue()},g.downloadMetadata=function(e,t){var n=[],i=new c;u(i),d(i),i.onRun(function(){function t(){if(0===e.length)return void i.chain();var r=e[0];h.stat(r,function(r,o){return o?(n.push(o),e.shift(),void i.chain(t)):void p(r,i)})}i.chain(t)}),i.onSuccess(function(){t(void 0,n)}),i.onError(function(e){t(e)}),i.enqueue()},g.downloadContent=function(e,n){var i=[],r=new c;u(r),d(r),r.onRun(function(){function n(){if(0===e.length)return void r.chain();var o=e[0];i.push(o);var a;return o.isFile===!0?a=o:void 0!==o.wasRemoved&&(a=o.stat),a?void h.readFile(a.path,function(i,o){return t.isString(o)?(a.content=o,e.shift(),void r.chain(n)):void p(i,r)}):(e.shift(),void r.chain(n))}r.chain(n)}),r.onSuccess(function(){n(void 0,i)}),r.onError(function(e){n(e)}),r.enqueue()};var b=!1;return g.picker=function(e){var t=[],i=new c;i.timeout=n.ASYNC_TASK_LONG_TIMEOUT,u(i),f(i),i.onRun(function(){var e={};e.multiselect=!0,e.linkType="direct",e.success=function(e){for(var n=0;n :"\|?\*]+$/)?0!==e.indexOf("/")?"/"+e:e:void o.onError('"'+e+'" contains invalid characters.')}function c(e){return"sync."+p+"."+encodeURIComponent(e.toLowerCase())}function u(e,n,i,r){r=r||"{}";var o={};return o.provider=f,o.path=e,o.version=n,o.contentCRC=t.crc32(i),o.discussionListCRC=t.crc32(r),o.syncIndex=c(e),h===!0&&(o.content=i,o.discussionList=r),o}function d(t){s.downloadMetadata(t,function(t,n){t||s.downloadContent(n,function(t,n){if(!t){var i=[];e.each(n,function(e){var t=f.parseContent(e.content),n=u(e.path,e.versionTag,t.content,t.discussionListJSON),r={};r[n.syncIndex]=n;var o=a.createFile(e.name,t.content,t.discussionListJSON,r);a.selectFile(o),i.push(o)}),0!==i.length&&o.onSyncImportSuccess(i,f)}})})}var p="dropbox",f=new r(p,"Dropbox");f.defaultPublishFormat="template";var h="merge"==i.conflictMode;return f.importFiles=function(){s.picker(function(t,n){if(!t&&0!==n.length){var i=[];e.each(n,function(e){var t=c(e),n=a.getFileFromSyncIndex(t);return void 0!==n?o.onError('"'+n.title+'" was already imported.'):void i.push(e)}),d(i)}})},f.exportFile=function(e,n,i,r,d){var p=t.getInputTextValue("#input-sync-export-dropbox-path",e);if(p=l(p),void 0===p)return d(!0);var h=c(p),m=a.getFileFromSyncIndex(h);if(void 0!==m){var g=m.title;return o.onError('File path is already synchronized with "'+g+'".'),d(!0)}var v=f.serializeContent(i,r);s.upload(p,v,function(e,t){if(e)return d(e);var n=u(t.path,t.versionTag,i,r);d(void 0,n)})},f.syncUp=function(e,t,n,i,r,o,a,l){if(a.contentCRC==t&&a.discussionListCRC==o)return l(void 0,!1);var c=f.serializeContent(e,r);s.upload(a.path,c,function(n,s){return n?l(n,!0):(a.version=s.versionTag,h===!0&&(a.content=e,a.discussionList=r),a.contentCRC=t,a.titleCRC=i,a.discussionListCRC=o,void l(void 0,!0))})},f.syncDown=function(i){var r=n[p+".lastChangeId"];s.checkChanges(r,function(r,l,u){if(r)return i(r);var d=[];e.each(l,function(e){var t=c(e.path),n=a.getFileFromSyncIndex(t),i=n&&n.syncLocations[t]; -return i?(e.fileDesc=n,e.syncAttributes=i,e.wasRemoved===!0?void d.push(e):void(i.version!=e.stat.versionTag&&d.push(e))):void 0}),s.downloadContent(d,function(e,r){function a(){if(0===r.length)return n[p+".lastChangeId"]=u,i();var e=r.pop(),s=e.fileDesc,l=e.syncAttributes;if(e.wasRemoved===!0)return o.onError('"'+s.title+'" has been removed from Dropbox.'),s.removeSyncLocation(l),o.onSyncRemoved(s,l);var c=e.stat,d=f.parseContent(c.content),m=d.content,g=d.discussionListJSON,v=d.discussionList,b=f.syncMerge(s,l,m,s.title,v,g);l.version=c.versionTag,h===!0&&(l.content=m,l.discussionList=v),l.contentCRC=b.contentCRC,l.discussionListCRC=b.discussionListCRC,t.storeAttributes(l),setTimeout(a,5)}return e?void i(e):void setTimeout(a,5)})})},f.publish=function(e,t,n,i,r){var o=l(e.path);return void 0===o?r(!0):void s.upload(o,i,r)},f.newPublishAttributes=function(e){var n={};return n.path=t.getInputTextValue("#input-publish-dropbox-path",e),e.isPropagationStopped()?void 0:n},f}),define("helpers/googleHelper",["underscore","jquery","constants","core","utils","storage","logger","settings","eventMgr","classes/AsyncTask"],function(e,t,n,i,r,o,a,s,l,c){function u(t){var n={profile:!0},i=!0;e.each((o[t+".permissions"]||"").split(";"),function(e){e&&(n[e]=!0)}),this.setRefreshFlag=function(){i=!0},this.isAuthorized=function(t){return i===!1&&e.has(n,t)},this.add=function(r){n[r]=!0,o[t+".permissions"]=e.keys(n).join(";"),i=!1},this.getListWithNew=function(t){var i=e.keys(n);return e.has(n,t)||i.push(t),i};var r=o[t+".userId"];this.setUserId=function(e){r=e,o[t+".userId"]=r},this.getUserId=function(){return r}}function d(e){e.onRun(function(){return y===!0?(g=!1,void e.error(new Error("Operation not available in offline mode.|stopPublish"))):g===!0?void e.chain():(window.delayedFunction=function(){gapi.load("client",function(){gapi.client.load("drive","v2",function(){g=!0,e.chain()})})},void t.ajax({url:"https://apis.google.com/js/api.js?onload=runDelayedFunction",dataType:"script",timeout:n.AJAX_TIMEOUT}).fail(function(t){var n={code:t.status,message:t.statusText};h(n,e)}))})}function p(i,o,a){var s=v[a];s||(s=new u(a),v[a]=s),i.onRun(function(){function a(){t.ajax({url:"https://www.googleapis.com/oauth2/v1/tokeninfo",data:{access_token:d.access_token},timeout:n.AJAX_TIMEOUT,type:"GET"}).done(function(e){s.getUserId()&&s.getUserId()!=e.user_id?u():(s.setUserId(e.user_id),s.add(o),s.token=d,i.chain())}).fail(function(e){var t={code:e.status,message:e.statusText};h(t,i)})}function l(){if(m>5)return void i.error(new Error("Unable to authenticate user "+s.getUserId()+", please sign in with Google."));p===!1&&(i.timeout=n.ASYNC_TASK_LONG_TIMEOUT);var t=e.chain(x).pick(s.getListWithNew(o)).flatten().value();gapi.auth.authorize({client_id:n.GOOGLE_CLIENT_ID,scope:t,immediate:p,authuser:p===!1?"":m},function(e){d=gapi.auth.getToken(),gapi.auth.setToken(f),!e||e.error?g===!0&&p===!0?(p=!1,i.chain(c)):i.error(new Error("Access to Google account is not authorized.")):(p===!0&&m++,i.chain(a))})}function c(){return p===!0?void i.chain(l):void r.redirectConfirm("You are being redirected to Google authorization page.",function(){i.chain(l)},function(){i.error(new Error("Operation canceled."))})}function u(){return p=!0,s.token&&s.isAuthorized(o)?void i.chain():(s.getUserId()||(p=!1),void i.chain(c))}var d,p,f=gapi.auth.getToken(),m=0;u()})}function f(e,t){var n=gapi.auth.getToken(),i=v[e];gapi.auth.setToken(i.token),t(),gapi.auth.setToken(n)}function h(t,n){var r;if(t)if(a.error(t),"string"==typeof t)r=t;else{if(r="Google error ("+t.code+": "+t.message+").",t.code>=500&&t.code<600)return void n.retry(new Error(r));if(401===t.code||403===t.code||"token_refresh_required"==t.code)return e.each(v,function(e){e.setRefreshFlag()}),r="Access to Google account is not authorized.",void n.retry(new Error(r),1);(0===t.code||-1===t.code)&&(g=!1,e.each(v,function(e){e.setRefreshFlag()}),i.setOffline(),r="|stopPublish")}n.error(new Error(r))}function m(e){e.onRun(function(){return w===!0?void e.chain():void t.ajax({url:"//www.google.com/jsapi",data:{key:n.GOOGLE_API_KEY},dataType:"script",timeout:n.AJAX_TIMEOUT}).done(function(){google.load("picker","1",{callback:function(){e.chain()}}),w=!0}).fail(function(t){var n={code:t.status,message:t.statusText};h(n,e)})})}var g=!1,v={},b={},y=!1;l.addListener("onOfflineChanged",function(e){y=e});var x={profile:["https://www.googleapis.com/auth/userinfo.profile"],gdrive:["https://www.googleapis.com/auth/drive.install",s.gdriveFullAccess===!0?"https://www.googleapis.com/auth/drive":"https://www.googleapis.com/auth/drive.file"],blogger:["https://www.googleapis.com/auth/blogger"],picasa:["https://www.googleapis.com/auth/photos"]};b.refreshGdriveToken=function(e){var t=new c;d(t);var n=v[e];n&&n.setRefreshFlag(),p(t,"gdrive",e),t.enqueue()},b.upload=function(e,t,n,i,a,l,u,m){var g,v=new c;d(v),p(v,"gdrive",u),v.onRun(function(){var l="-------314159265358979323846",c="\r\n--"+l+"\r\n",d="\r\n--"+l+"--";a=a||s.markdownMimeType;var p={title:n,mimeType:a};t&&(p.parents=[{kind:"drive#fileLink",id:t}]);var m="/upload/drive/v2/files",b="POST";e&&(m+="/"+e,b="PUT");var y={"Content-Type":'multipart/mixed; boundary="'+l+'"'},x=r.encodeBase64(i),w=[c,"Content-Type: application/json\r\n\r\n",JSON.stringify(p),c,"Content-Type: ",a,"\r\n","Content-Transfer-Encoding: base64\r\n","\r\n",x,d].join("");f(u,function(){var t=gapi.client.request({path:m,method:b,params:{uploadType:"multipart"},headers:y,body:w});t.execute(function(t){if(t&&t.id)return g=t,g.content=i,void v.chain();var n=t.error;void 0!==n&&void 0!==e&&(404===n.code?n='File ID "'+e+'" not found on Google Drive.|removePublish':412===n.code&&(o.removeItem(u+".gdrive.lastChangeId"),n='Conflict on file ID "'+e+'". Please restart the synchronization.')),h(n,v)})})}),v.onSuccess(function(){m(void 0,g)}),v.onError(function(e){m(e)}),v.enqueue()},b.rename=function(e,t,n,i){var r,o=new c;d(o),p(o,"gdrive",n),o.onRun(function(){var i={title:t};f(n,function(){var t=gapi.client.drive.files.patch({fileId:e,resource:i});t.execute(function(t){if(t&&t.id)return r=t,void o.chain();var n=t.error;void 0!==n&&void 0!==e&&404===n.code&&(n='File ID "'+e+'" not found on Google Drive.|removePublish'),h(n,o)})})}),o.onSuccess(function(){i(void 0,r)}),o.onError(function(e){i(e)}),o.enqueue()},b.checkChanges=function(e,t,n){var i=[],r=e||0,o=new c;d(o),p(o,"gdrive",t),o.onRun(function(){function e(){f(t,function(){var t;t=gapi.client.drive.changes.list(void 0===n?{startChangeId:r+1}:{pageToken:n}),t.execute(function(t){return t&&t.largestChangeId?(r=t.largestChangeId,n=t.nextPageToken,void 0!==t.items&&(i=i.concat(t.items)),void(void 0!==n?o.chain(e):o.chain())):void h(t.error,o)})})}var n;o.chain(e)}),o.onSuccess(function(){n(void 0,i,r)}),o.onError(function(e){n(e)}),o.enqueue()},b.downloadMetadata=function(e,i,r,o){var a=[],s=new c;d(s),o||p(s,"gdrive",i),s.onRun(function(){function r(){if(0===e.length)return void s.chain();var o=e[0],l={},c=v[i];c&&c.token&&(l.Authorization="Bearer "+c.token.access_token),t.ajax({url:"https://www.googleapis.com/drive/v2/files/"+o,headers:l,data:{key:n.GOOGLE_API_KEY},dataType:"json",timeout:n.AJAX_TIMEOUT}).done(function(t){a.push(t),e.shift(),s.chain(r)}).fail(function(e){var t={code:e.status,message:e.statusText};404===t.code&&(t='File ID "'+o+'" not found on Google Drive.'),h(t,s)})}s.chain(r)}),s.onSuccess(function(){r(void 0,a)}),s.onError(function(e){r(e)}),s.enqueue()},b.downloadContent=function(e,i,r,o){var a=[],s=new c;s.timeout=n.ASYNC_TASK_LONG_TIMEOUT,d(s),o||p(s,"gdrive",i),s.onRun(function(){function r(){if(0===e.length)return void s.chain();var o=e[0];a.push(o);var l;if("drive#file"==o.kind?l=o:"drive#change"==o.kind&&(l=o.file),!l)return e.shift(),void s.chain(r);var c=l.downloadUrl;0===l.mimeType.indexOf("application/vnd.google-apps.drive-sdk")&&(l.isRealtime=!0,c="https://www.googleapis.com/drive/v2/files/"+l.id+"/realtime");var u={},d=v[i];d&&d.token&&(u.Authorization="Bearer "+d.token.access_token),t.ajax({url:c,headers:u,data:{key:n.GOOGLE_API_KEY},dataType:l.isRealtime?"json":"text",timeout:n.AJAX_TIMEOUT}).done(function(t){l.content=l.isRealtime?t.data.value.content.value:t,e.shift(),s.chain(r)}).fail(function(e){var t={code:e.status,message:e.statusText};h(t,s)})}s.chain(r)}),s.onSuccess(function(){r(void 0,a)}),s.onError(function(e){r(e)}),s.enqueue()},b.uploadImg=function(e,i,r,o){var a,s="google.picasa0",l=new c;d(l),p(l,"picasa",s),l.onRun(function(){var o={Slug:e};e.match(/.jpe?g$/i)?o["Content-Type"]="image/jpeg":e.match(/.png$/i)?o["Content-Type"]="image/png":e.match(/.gif$/i)&&(o["Content-Type"]="image/gif");var c=v[s];c&&c.token&&(o.Authorization="Bearer "+c.token.access_token),t.ajax({url:n.PICASA_PROXY_URL+"upload/"+r,headers:o,data:i,processData:!1,dataType:"xml",timeout:n.AJAX_TIMEOUT,type:"POST"}).done(function(e){a=e,l.chain()}).fail(function(e){var t={code:e.status,message:e.statusText};200==t.code&&(t.message=e.responseText),h(t,l)})}),l.onSuccess(function(){o(void 0,a)}),l.onError(function(e){o(e)}),l.enqueue()};var w=!1;return b.picker=function(e,i,o){function a(){void 0!==s&&(s.setVisible(!1),t(".modal-backdrop, .picker").remove())}var s,l=[],u=new c;u.timeout=n.ASYNC_TASK_LONG_TIMEOUT,d(u),"doc"==i||"folder"==i?p(u,"gdrive",o):(o="google.picasa0",p(u,"picasa",o)),m(u),u.onRun(function(){var e=v[o],c=new google.picker.PickerBuilder;c.setAppId(n.GOOGLE_DRIVE_APP_ID);var d;"doc"==i?(d=new google.picker.DocsView(google.picker.ViewId.DOCS),d.setParent("root"),d.setIncludeFolders(!0),d.setMimeTypes(["text/x-markdown","text/plain","application/octet-stream","application/vnd.google-apps.drive-sdk."+n.GOOGLE_DRIVE_APP_ID].join(",")),c.enableFeature(google.picker.Feature.NAV_HIDDEN),c.enableFeature(google.picker.Feature.MULTISELECT_ENABLED),c.addView(d),e&&e.token&&c.setOAuthToken(e.token.access_token)):"folder"==i?(d=new google.picker.DocsView(google.picker.ViewId.FOLDERS),d.setParent("root"),d.setIncludeFolders(!0),d.setSelectFolderEnabled(!0),d.setMimeTypes("application/vnd.google-apps.folder"),c.enableFeature(google.picker.Feature.NAV_HIDDEN),c.addView(d),e&&e.token&&c.setOAuthToken(e.token.access_token)):"img"==i&&(d=new google.picker.PhotosView,d.setType("flat"),c.addView(d),d=new google.picker.PhotosView,d.setType("ofuser"),c.addView(d),c.addView(google.picker.ViewId.PHOTO_UPLOAD),e&&e.token&&c.setOAuthToken(e.token.access_token)),c.setCallback(function(e){(e.action==google.picker.Action.PICKED||e.action==google.picker.Action.CANCEL)&&(e.action==google.picker.Action.PICKED&&(l=e.docs),a(),u.chain())}),s=c.build(),t(r.createBackdrop()).click(function(){a(),u.chain()}),s.setVisible(!0)}),u.onSuccess(function(){e(void 0,l)}),u.onError(function(t){a(),e(t)}),u.enqueue()},b.uploadBlogger=function(e,i,r,o,a,s,l,u,f){var m="google.blogger0",g=new c;d(g),p(g,"blogger",m),g.onRun(function(){function c(){var e="https://www.googleapis.com/blogger/v3/blogs/"+i+"/posts/",a={kind:"blogger#post",blog:{id:i},labels:o,title:l,content:u};s&&(a.published=s.toISOString());var c="POST";void 0!==r&&(e+=r,a.id=r,c="PUT"),t.ajax({url:e,data:JSON.stringify(a),headers:f,type:c,contentType:"application/json",dataType:"json",timeout:n.AJAX_TIMEOUT}).done(function(e){r=e.id,g.chain(d)}).fail(function(e){var t={code:e.status,message:e.statusText};404===t.code&&void 0!==r&&(t="Post "+r+" not found on Blogger.|removePublish"),h(t,g)})}function d(){var e="https://www.googleapis.com/blogger/v3/blogs/"+i+"/posts/"+r;a?e+="/revert":(e+="/publish",s&&(e+="?publishDate="+s.toISOString())),t.ajax({url:e,headers:f,type:"POST",dataType:"json",timeout:n.AJAX_TIMEOUT}).done(function(){g.chain()}).fail(function(e){var t={code:e.status,message:e.statusText};404===t.code&&(t="Post "+r+" not found on Blogger.|removePublish"),h(t,g)})}function p(){return void 0!==i?void g.chain(c):void t.ajax({url:"https://www.googleapis.com/blogger/v3/blogs/byurl",data:{url:e},headers:f,dataType:"json",timeout:n.AJAX_TIMEOUT}).done(function(e){i=e.id,g.chain(c)}).fail(function(t){var n={code:t.status,message:t.statusText};404===n.code&&(n='Blog "'+e+'" not found on Blogger.|removePublish'),h(n,g)})}var f={},b=v[m];b&&b.token&&(f.Authorization="Bearer "+b.token.access_token),g.chain(p)}),g.onSuccess(function(){f(void 0,i,r)}),g.onError(function(e){f(e)}),g.enqueue()},b.uploadBloggerPage=function(e,i,r,o,a,s,l,u){var f="google.blogger0",m=new c;d(m),p(m,"blogger",f),m.onRun(function(){function o(){var e="https://www.googleapis.com/blogger/v3/blogs/"+i+"/pages/",o={kind:"blogger#page",blog:{id:i},title:s,content:l},a="POST";void 0!==r&&(e+=r,o.id=r,a="PUT"),t.ajax({url:e,data:JSON.stringify(o),headers:c,type:a,contentType:"application/json",dataType:"json",timeout:n.AJAX_TIMEOUT}).done(function(e){r=e.id,m.chain()}).fail(function(e){var t={code:e.status,message:e.statusText};404===t.code&&void 0!==r&&(t="Page "+r+" not found on Blogger.|removePublish"),h(t,m)})}function a(){return void 0!==i?void m.chain(o):void t.ajax({url:"https://www.googleapis.com/blogger/v3/blogs/byurl",data:{url:e},headers:c,dataType:"json",timeout:n.AJAX_TIMEOUT}).done(function(e){i=e.id,m.chain(o)}).fail(function(t){var n={code:t.status,message:t.statusText};404===n.code&&(n='Blog "'+e+'" not found on Blogger.|removePublish'),h(n,m)})}var c={},u=v[f];u&&u.token&&(c.Authorization="Bearer "+u.token.access_token),m.chain(a)}),m.onSuccess(function(){u(void 0,i,r)}),m.onError(function(e){u(e)}),m.enqueue()},window.delayedFunction=void 0,window.runDelayedFunction=function(){void 0!==window.delayedFunction&&window.delayedFunction()},b}),define("text!html/dialogExportGdrive.html",[],function(){return' \n\n'}),define("text!html/dialogAutoSyncGdrive.html",[],function(){return' \n\n\n'}),define("providers/gdriveProviderBuilder",["jquery","underscore","constants","utils","storage","logger","classes/Provider","settings","eventMgr","fileMgr","editor","helpers/googleHelper","text!html/dialogExportGdrive.html","text!html/dialogAutoSyncGdrive.html"],function(e,t,n,i,r,o,a,s,l,c,u,d,p,f){return function(o,u,h){function m(e){return"sync."+o+"."+e}function g(e,t,n,r,o){o=o||"{}";var a={};return a.provider=y,a.id=e,a.etag=t,a.contentCRC=i.crc32(n),a.titleCRC=i.crc32(r),a.discussionListCRC=i.crc32(o),a.syncIndex=m(e),x===!0&&(a.content=n,a.title=r,a.discussionList=o),a}function v(e){d.downloadMetadata(e,b,function(e,n){e||d.downloadContent(n,b,function(e,n){if(!e){var i,r=[];t.each(n,function(e){var t,n=y.parseContent(e.content);if(e.isRealtime)l.onError("Real time synchronization is not supported anymore. Please use standard synchronization.");else{var o=g(e.id,e.etag,n.content,e.title,n.discussionListJSON);t={},t[o.syncIndex]=o}i=c.createFile(e.title,n.content,n.discussionListJSON,t),r.push(i)}),void 0!==i&&(l.onSyncImportSuccess(r,y),c.selectFile(i))}})})}var b="google.gdrive"+h,y=new a(o,u);y.defaultPublishFormat="template",y.exportPreferencesInputIds=[o+"-parentid"];var x="merge"==s.conflictMode;return y.importFiles=function(){d.picker(function(e,n){if(!e&&0!==n.length){var i=[];t.each(n,function(e){var t=m(e.id),n=c.getFileFromSyncIndex(t);return void 0!==n?void l.onError('"'+n.title+'" was already imported.'):void i.push(e.id)}),v(i)}},"doc",b)},y.exportFile=function(e,t,n,r,a){var s=i.getInputTextValue("#input-sync-export-"+o+"-fileid");if(s){var u=m(s),p=c.getFileFromSyncIndex(u);if(void 0!==p)return l.onError('File ID is already synchronized with "'+p.title+'".'),void a(!0)}var f=i.getInputTextValue("#input-sync-export-"+o+"-parentid"),h=y.serializeContent(n,r);d.upload(s,f,t,h,void 0,void 0,b,function(e,i){if(e)return void a(e);var o=g(i.id,i.etag,n,t,r);a(void 0,o)})},y.syncUp=function(e,t,n,i,r,o,a,s){if(a.contentCRC==t&&a.titleCRC==i&&a.discussionListCRC==o)return s(void 0,!1);if(a.isRealtime){var u=c.getFileFromSyncIndex(a.syncIndex);return u.removeSyncLocation(a),l.onSyncRemoved(u,a),l.onError("Real time synchronization is not supported anymore. Please use standard synchronization.")}var p=y.serializeContent(e,r);d.upload(a.id,void 0,n,p,void 0,a.etag,b,function(l,c){return l?void s(l,!0):(a.etag=c.etag,delete a.isRealtime,x===!0&&(a.content=e,a.title=n,a.discussionList=r),a.contentCRC=t,a.titleCRC=i,a.discussionListCRC=o,void s(void 0,!0))})},y.syncDown=function(e){var n=parseInt(r[b+".gdrive.lastChangeId"],10);d.checkChanges(n,b,function(n,o,a){if(n)return void e(n);var s=[];t.each(o,function(e){var t=m(e.fileId),n=c.getFileFromSyncIndex(t),i=n&&n.syncLocations[t];return i?(e.fileDesc=n,e.syncAttributes=i,e.deleted===!0?void s.push(e):void(i.etag!=e.file.etag&&s.push(e))):void 0}),d.downloadContent(s,b,function(t,n){function o(){if(0===n.length)return r[b+".gdrive.lastChangeId"]=a,e();var t=n.pop(),s=t.fileDesc,c=t.syncAttributes;if(t.deleted===!0)return l.onError('"'+s.title+'" has been removed from '+u+"."),s.removeSyncLocation(c),l.onSyncRemoved(s,c);var d=t.file,p=y.parseContent(d.content),f=p.content,h=d.title,m=p.discussionListJSON,g=p.discussionList,v=y.syncMerge(s,c,f,h,g,m);c.etag=d.etag,x===!0&&(c.content=f,c.title=h,c.discussionList=m),c.contentCRC=v.contentCRC,c.titleCRC=v.titleCRC,c.discussionListCRC=v.discussionListCRC,i.storeAttributes(c),setTimeout(o,5)}return t?void e(t):void setTimeout(o,5)})})},y.publish=function(e,t,n,i,r){var o="markdown"!=e.format?"text/html":void 0;d.upload(e.id,void 0,e.fileName||n,i,o,void 0,b,function(t,n){return t?void r(t):(e.id=n.id,void r())})},y.newPublishAttributes=function(e){var t={};return t.id=i.getInputTextValue("#input-publish-"+o+"-fileid"),t.fileName=i.getInputTextValue("#input-publish-"+o+"-filename"),e.isPropagationStopped()?void 0:t},y.setAutosyncDialogConfig=function(){var e=y.autosyncConfig;i.setInputRadio("radio-autosync-"+o+"-mode",e.mode||"off"),i.setInputValue("#input-autosync-"+o+"-parentid",e.parentId)},y.getAutosyncDialogConfig=function(){var e={};return e.mode=i.getInputRadio("radio-autosync-"+o+"-mode"),e.parentId=i.getInputTextValue("#input-autosync-"+o+"-parentid"),e},y.autosyncFile=function(e,t,n,i,r){var o=i.parentId;d.upload(void 0,o,e,t,void 0,void 0,b,function(i,o){if(i)return void r(i);var a=g(o.id,o.etag,t,e,n);r(void 0,a)})},y.isPublishEnabled=s.gdriveMultiAccount>h,l.addListener("onReady",function(){e(".submenu-sync-"+o).toggle(s.gdriveMultiAccount>h);var a=document.querySelector(".modal-upload-"+o);a&&(a.innerHTML=t.template(p,{providerId:o,providerName:u}));var y=document.querySelector(".modal-autosync-"+o);if(y&&(y.innerHTML=t.template(f,{providerId:o,providerName:u})),e(".action-export-"+o+"-choose-folder").click(function(){d.picker(function(t,n){t||0===n.length||(e(".modal-upload-"+o).modal(),i.setInputValue("#input-sync-export-"+o+"-parentid",n[0].id))},"folder",b)}),e(".action-autosync-"+o+"-choose-folder").click(function(){d.picker(function(t,n){t||0===n.length||(e(".modal-autosync-"+o).modal(),i.setInputValue("#input-autosync-"+o+"-parentid",n[0].id))},"folder",b)}),e(".action-remove-google-drive-state").click(function(){r.removeItem("gdrive.state")}),!(h>=s.gdriveMultiAccount)){var x=i.retrieveIgnoreError("gdrive.state"),w=r[b+".userId"];if(void 0!==x){if(w&&x.userId!=w)return void(h===s.gdriveMultiAccount-1&&(3===s.gdriveMultiAccount?(l.onError("None of your 3 Google Drive accounts is able to perform this request."),r.removeItem("gdrive.state")):e(".modal-add-google-drive-account").modal()));if(r.removeItem("gdrive.state"),"create"==x.action)d.upload(void 0,x.folderId,n.GDRIVE_DEFAULT_FILE_TITLE,s.defaultContent,void 0,void 0,b,function(e,t){if(!e){var n=g(t.id,t.etag,t.content,t.title),i={};i[n.syncIndex]=n;var r=c.createFile(t.title,t.content,void 0,i);c.selectFile(r),l.onMessage('"'+t.title+'" created successfully on '+u+".")}});else if("open"==x.action){var S=[];t.each(x.ids,function(e){var t=m(e),n=c.getFileFromSyncIndex(t);void 0!==n?n!==c.currentFile&&c.selectFile(n):S.push(e)}),v(S)}}}}),y}}),define("providers/gdriveProvider",["providers/gdriveProviderBuilder"],function(e){return e("gdrive","Google Drive",0)}),define("providers/gdrivesecProvider",["providers/gdriveProviderBuilder"],function(e){return e("gdrivesec","Google Drive (2nd account)",1)}),define("providers/gdriveterProvider",["providers/gdriveProviderBuilder"],function(e){return e("gdriveter","Google Drive (3rd account)",2)}),define("synchronizer",["jquery","underscore","utils","storage","eventMgr","fileSystem","fileMgr","classes/Provider","providers/dropboxProvider","providers/gdriveProvider","providers/gdrivesecProvider","providers/gdriveterProvider"],function(e,t,n,i,r,o,a,s){function l(e){function i(){function o(){if(0===s.length)return i();var t=s.pop();t.provider.syncUp(c,u,d,p,f,m,t,function(i,r){return r===!0&&(h=!0),i?e(i):(r&&n.storeAttributes(t),void o())})}if(0===r.length)return l(e);var a=r.pop(),s=t.values(a.syncLocations);if(0===s.length)return i();var c=a.content,u=n.crc32(c),d=a.title,p=n.crc32(d),f=a.discussionListJSON,m=n.crc32(f);o()}var r=[];h===!0?(h=!1,r=t.values(o),i()):e()}function c(e){function n(){if(0===i.length)return e();var t=i.pop();return p.hasSync(t)?void t.syncDown(function(t){return t?e(t):void n()}):n()}var i=t.values(f);n()}function u(e){function n(){function o(){if(0===s.length)return n();var t=s.pop();t.autosyncFile(a.title,a.content,a.discussionListJSON,t.autosyncConfig,function(t,n){return t?e(t):(a.addSyncLocation(n),r.onSyncExportSuccess(a,n),void o())})}if(0===i.length)return e();var a=i.pop(),s=t.filter(f,function(e){return"all"==e.autosyncConfig.mode});o()}var i=t.filter(o,function(e){return 0===t.size(e.syncLocations)});n()}function d(i){n.resetModalInputs();var r=n.retrieveIgnoreError(i.providerId+".exportPreferences");r&&t.each(i.exportPreferencesInputIds,function(e){var i=r[e];t.isBoolean(i)?n.setInputChecked("#input-sync-export-"+e,i):n.setInputValue("#input-sync-export-"+e,i)}),e(".modal-upload-"+i.providerId).modal()}var p={},f=t.chain(arguments).map(function(e){return e instanceof s&&[e.providerId,e]}).compact().object().value();!function(){var e={};t.each(o,function(t){n.retrieveIndexArray(t.fileIndex+".sync").forEach(function(o){try{var a=JSON.parse(i[o]);a.syncIndex=o;var s=f[a.provider];if(!s)throw new Error("Invalid provider ID: "+a.provider);a.provider=s,t.syncLocations[o]=a,e[o]=a}catch(l){r.onError(l),n.removeIndexFromArray(t.fileIndex+".sync",o)}})}),Object.keys(i).forEach(function(t){var n=t.match(/sync\.\S+/);n&&!e.hasOwnProperty(n[0])&&i.removeItem(t)})}(),t.each(f,function(e){e.autosyncConfig=n.retrieveIgnoreError(e.providerId+".autosyncConfig")||{}}),p.hasSync=function(e){return t.some(o,function(n){return t.some(n.syncLocations,function(t){return void 0===e||t.provider===e})})};var h=!1,m=!1;r.addListener("onOfflineChanged",function(e){m=e});var g=!1;return p.sync=function(){function e(e){return void 0!==e?(g=!1,r.onSyncRunning(!1),!0):!1}return g===!0||m===!0?!1:(g=!0,r.onSyncRunning(!0),h=!0,u(function(t){e(t)||c(function(t){e(t)||l(function(t){e(t)||(g=!1,r.onSyncRunning(!1),r.onSyncSuccess())})})}),!0)},r.addListener("onFileCreated",function(e){0===t.size(e.syncLocations)&&t.each(f,function(t){"new"==t.autosyncConfig.mode&&t.autosyncFile(e.title,e.content,e.discussionListJSON,t.autosyncConfig,function(t,n){t||(e.addSyncLocation(n),r.onSyncExportSuccess(e,n))})})}),r.addListener("onReady",function(){t.each(f,function(o){e(".action-sync-import-"+o.providerId).click(function(e){o.importFiles(e)}),e(".action-sync-export-dialog-"+o.providerId).click(function(){d(o)}),e(".action-autosync-dialog-"+o.providerId).click(function(){n.resetModalInputs(),o.setAutosyncDialogConfig(o),e(".modal-autosync-"+o.providerId).modal()}),e(".action-sync-export-"+o.providerId).click(function(e){var n=a.currentFile;o.exportFile(e,n.title,n.content,n.discussionListJSON,function(e,t){e||(n.addSyncLocation(t),r.onSyncExportSuccess(n,t))});var s={};t.each(o.exportPreferencesInputIds,function(e){var t=document.getElementById("input-sync-export-"+e);s[e]="checkbox"==t.type?t.checked:t.value}),i[o.providerId+".exportPreferences"]=JSON.stringify(s)}),e(".action-autosync-"+o.providerId).click(function(e){var t=o.getAutosyncDialogConfig(e);void 0!==t&&(i[o.providerId+".autosyncConfig"]=JSON.stringify(t),o.autosyncConfig=t)})})}),r.onSynchronizerCreated(p),p}),define("providers/downloadProvider",["jquery","constants","eventMgr","utils","fileMgr","classes/Provider","classes/AsyncTask"],function(e,t,n,i,r,o,a){var s=new o("download");return s.sharingAttributes=["url"],s.importPublic=function(n,i){var r,o,s=new a(!0);s.onRun(function(){var i=n.url,a=i.lastIndexOf("/");return-1===a?void s.error(new Error("Invalid URL parameter.")):(r=i.substring(a+1),void e.ajax({url:t.DOWNLOAD_PROXY_URL+"download?url="+i,type:"GET",dataType:"text",timeout:t.AJAX_TIMEOUT}).done(function(e){o=e,s.chain()}).fail(function(){s.error(new Error("Unable to access URL "+i))}))}),s.onSuccess(function(){i(void 0,r,o)}),s.onError(function(e){i(e)}),s.enqueue()},n.addListener("onReady",function(){e(".action-import-url").click(function(e){var t=i.getInputTextValue("#input-import-url",e);t&&s.importPublic({url:t},function(e,t,n){if(!e){var i=r.createFile(t,n);r.selectFile(i)}})})}),s}),define("helpers/githubHelper",["jquery","constants","core","utils","storage","logger","settings","eventMgr","classes/AsyncTask"],function(e,t,n,i,r,o,a,s,l){function c(n){n.onRun(function(){return m===!0?(p=!1,void n.error(new Error("Operation not available in offline mode.|stopPublish"))):p===!0?void n.chain():void e.ajax({url:"libs/github.js",dataType:"script",timeout:t.AJAX_TIMEOUT}).done(function(){p=!0,n.chain()}).fail(function(e){var t={error:e.status,message:e.statusText};d(t,n)})})}function u(n){var o,s;n.onRun(function(){function l(){i.redirectConfirm("You are being redirected to GitHub authorization page.",function(){n.chain(c)},function(){n.error(new Error("Operation canceled."))})}function c(){r.removeItem("githubCode");var e=a.githubFullAccess?"repo,gist":"public_repo,gist";o=i.popupWindow("html/github-oauth-client.html?client_id="+t.GITHUB_CLIENT_ID+"&scope="+e,"stackedit-github-oauth",960,600),o.focus(),s=setInterval(function(){if(o.closed===!0){if(clearInterval(s),o=void 0,s=void 0,h=r.githubCode,void 0===h)return void n.error(new Error(p));r.removeItem("githubCode"),n.chain(u)}},500)}function u(){e.getJSON(t.GATEKEEPER_URL+"authenticate/"+h,function(e){void 0!==e.token?(d=e.token,r.githubToken=d,f=new Github({token:d,auth:"oauth"}),n.chain()):n.error(new Error(p))})}if(void 0!==f)return void n.chain();var d=r.githubToken;if(void 0!==d)return f=new Github({token:d,auth:"oauth"}),void n.chain();var p="Failed to retrieve a token from GitHub.";n.timeout=t.ASYNC_TASK_LONG_TIMEOUT;var h;n.chain(l)}),n.onError(function(){void 0!==s&&clearInterval(s),void 0!==o&&o.close()})}function d(e,t){var i;if(e)if(o.error(e),"string"==typeof e)i=e;else{if(i="Could not publish on GitHub.",401===e.error||403===e.error)return f=void 0,r.removeItem("githubToken"),i="Access to GitHub account is not authorized.",void t.retry(new Error(i),1); -e.error<=0&&(p=!1,f=void 0,n.setOffline(),i="|stopPublish")}t.error(new Error(i))}var p,f,h={},m=!1;return s.addListener("onOfflineChanged",function(e){m=e}),h.upload=function(e,t,n,i,r,o,a){var s=new l;c(s),u(s),s.onRun(function(){function a(){var e=f.getUser();e.show(void 0,function(e,n){return e?void d(e,s):(t=n.login,void s.chain(l))})}function l(){var a=f.getRepo(t,e);a.write(n,i,r,o,function(e){return e?void d(e,s):void s.chain()})}s.chain(t?l:a)}),s.onSuccess(function(){a()}),s.onError(function(e){a(e)}),s.enqueue()},h.uploadGist=function(e,t,n,i,r,o){var a=new l;c(a),u(a),a.onRun(function(){var o=f.getGist(e),s={};s[t]={content:r};var l=o.update;void 0===e&&(l=o.create),l({description:i,"public":n,files:s},function(t,n){return t?(404===t.error&&void 0!==e&&(t="Gist "+e+" not found on GitHub.|removePublish"),void d(t,a)):(e=n.id,void a.chain())})}),a.onSuccess(function(){o(void 0,e)}),a.onError(function(e){o(e)}),a.enqueue()},h.downloadGist=function(e,t,n){var i=new l(!0);c(i);var r,o;i.onRun(function(){var n=new Github({}),a=n.getGist(e);a.read(function(n,a){if(n)return void i.error(new Error("Error trying to access Gist "+e+"."));r=a.description;var s=a.files[t];return void 0===s?void i.error(new Error("Gist "+e+' does not contain "'+t+'".')):(o=s.content,void i.chain())})}),i.onSuccess(function(){n(void 0,r,o)}),i.onError(function(e){n(e)}),i.enqueue()},h}),define("providers/gistProvider",["utils","classes/Provider","helpers/githubHelper"],function(e,t,n){var i=new t("gist","Gist");return i.publishPreferencesInputIds=["gist-public"],i.sharingAttributes=["gistId","filename"],i.publish=function(e,t,i,r,o){n.uploadGist(e.gistId,e.filename,e.isPublic,i,r,function(t,n){return t?void o(t):(e.gistId=n,void o())})},i.newPublishAttributes=function(t){var n={};return n.gistId=e.getInputTextValue("#input-publish-gist-id"),n.filename=e.getInputTextValue("#input-publish-filename",t),n.isPublic=e.getInputChecked("#input-publish-gist-public"),t.isPropagationStopped()?void 0:n},i.importPublic=function(e,t){n.downloadGist(e.gistId,e.filename,t)},i}),define("sharing",["jquery","underscore","constants","utils","eventMgr","fileMgr","classes/AsyncTask","classes/Provider","providers/downloadProvider","providers/gistProvider"],function(e,t,n,i,r,o,a,s){var l={},c=t.chain(arguments).map(function(e){return e instanceof s&&[e.providerId,e]}).compact().object().value(),u=!1;return r.addListener("onOfflineChanged",function(e){u=e}),l.createLink=function(e,i){var r=c[e.provider.providerId];if(void 0!==e.sharingLink||void 0===r||"markdown"!=e.format)return void i();var o=[n.MAIN_URL,"viewer#!provider=",r.providerId];t.each(r.sharingAttributes,function(t){o.push("&"),o.push(t),o.push("="),o.push(encodeURIComponent(e[t]))}),e.sharingLink=o.join(""),i()},r.addListener("onReady",function(){if(window.viewerMode!==!1){var n=i.getURLParameter("provider");void 0===n&&(n="download");var r=c[n];if(void 0!==r){var a={};t.each(r.sharingAttributes,function(e){var t=i.getURLParameter(e);return t?void(a[e]=t):void(a=void 0)}),void 0!==a&&(e("#preview-contents, .navbar .file-title-navbar").hide(),r.importPublic(a,function(t,n,i){if(e("#preview-contents, .navbar .file-title-navbar").show(),!t){var r=o.createFile(n,i,void 0,void 0,!0);o.selectFile(r)}}))}}}),l}),define("providers/bloggerProvider",["underscore","utils","classes/Provider","helpers/googleHelper"],function(e,t,n,i){var r=new n("blogger","Blogger");return r.defaultPublishFormat="html",r.publishPreferencesInputIds=["blogger-url"],r.publish=function(t,n,r,o,a){var s=t.labelList||[];n&&void 0!==n.tags&&(s=n.tags),e.isString(s)&&(s=e.compact(s.split(/[\s,]/)));var l=n&&n.published===!1,c=n&&n.date;i.uploadBlogger(t.blogUrl,t.blogId,t.postId,s,l,c,r,o,function(e,n,i){return e?void a(e):(t.blogId=n,t.postId=i,void a())})},r.newPublishAttributes=function(e){var n={},i=t.getInputTextValue("#input-publish-blogger-url",e);return void 0!==i&&(n.blogUrl=t.checkUrl(i)),n.postId=t.getInputTextValue("#input-publish-postid"),e.isPropagationStopped()?void 0:n},r}),define("providers/bloggerPageProvider",["underscore","utils","classes/Provider","helpers/googleHelper"],function(e,t,n,i){var r=new n("bloggerpage","Blogger Page");return r.defaultPublishFormat="html",r.publishPreferencesInputIds=["blogger-url"],r.publish=function(e,t,n,r,o){var a=t&&t.published===!1,s=t&&t.date;i.uploadBloggerPage(e.blogUrl,e.blogId,e.pageId,a,s,n,r,function(t,n,i){return t?void o(t):(e.blogId=n,e.pageId=i,void o())})},r.newPublishAttributes=function(e){var n={},i=t.getInputTextValue("#input-publish-blogger-url",e);return void 0!==i&&(n.blogUrl=t.checkUrl(i)),n.pageId=t.getInputTextValue("#input-publish-pageid"),e.isPropagationStopped()?void 0:n},r}),define("providers/githubProvider",["utils","classes/Provider","settings","helpers/githubHelper"],function(e,t,n,i){var r=new t("github","GitHub");return r.publishPreferencesInputIds=["github-reponame","github-username","github-branch"],r.publish=function(e,t,r,o,a){var s=n.commitMsg;i.upload(e.repository,e.username,e.branch,e.path,o,s,a)},r.newPublishAttributes=function(t){var n={};return n.repository=e.getInputTextValue("#input-publish-github-reponame",t),n.username=e.getInputTextValue("#input-publish-github-username"),n.branch=e.getInputTextValue("#input-publish-github-branch",t),n.path=e.getInputTextValue("#input-publish-file-path",t),t.isPropagationStopped()?void 0:n},r}),define("helpers/sshHelper",["jquery","constants","core","logger","eventMgr","settings","classes/AsyncTask"],function(e,t,n,i,r,o,a){function s(e){e.onRun(function(){return u===!0?void e.error(new Error("Operation not available in offline mode.|stopPublish")):void e.chain()})}function l(e,t){var r;e&&(i.error(e),"string"==typeof e?r="SSH error: "+e+".":(r="Could not publish on SSH server.",e.code<=0&&(n.setOffline(),r="|stopPublish"))),t.error(new Error(r))}var c={},u=!1;return r.addListener("onOfflineChanged",function(e){u=e}),c.upload=function(n,i,r,c,u,d,p,f){var h=new a;s(h),h.onRun(function(){var a=o.sshProxy+"upload",s={host:n,port:i,username:r,password:c,path:u,title:d,content:p};e.ajax({url:a,data:s,type:"POST",dataType:"json",timeout:t.AJAX_TIMEOUT}).done(function(e){return void 0===e.error?void h.chain():void l(e.error,h)}).fail(function(e){var t={code:e.status,message:e.statusText};l(t,h)})}),h.onSuccess(function(){f()}),h.onError(function(e){f(e)}),h.enqueue()},c}),define("providers/sshProvider",["utils","classes/Provider","helpers/sshHelper"],function(e,t,n){var i=new t("ssh","SSH server");return i.publishPreferencesInputIds=["ssh-host","ssh-port","ssh-username","ssh-password"],i.publish=function(e,t,i,r,o){n.upload(e.host,e.port,e.username,e.password,e.path,i,r,o)},i.newPublishAttributes=function(t){var n={};return n.host=e.getInputTextValue("#input-publish-ssh-host",t,/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/),n.port=e.getInputIntValue("#input-publish-ssh-port",void 0,0),n.username=e.getInputTextValue("#input-publish-ssh-username",t),n.password=e.getInputTextValue("#input-publish-ssh-password",t),n.path=e.getInputTextValue("#input-publish-file-path",t),t.isPropagationStopped()?void 0:n},i}),define("helpers/tumblrHelper",["jquery","constants","core","utils","storage","logger","eventMgr","classes/AsyncTask"],function(e,t,n,i,r,o,a,s){function l(e){e.onRun(function(){return f===!0?void e.error(new Error("Operation not available in offline mode.|stopPublish")):void e.chain()})}function c(n){var o,a;n.onRun(function(){function s(){e.getJSON(t.TUMBLR_PROXY_URL+"request_token",function(e){void 0!==e.oauth_token?(h=e,n.chain(l)):n.error(new Error(f))})}function l(){i.redirectConfirm("You are being redirected to Tumblr authorization page.",function(){n.chain(c)},function(){n.error(new Error("Operation canceled."))})}function c(){r.removeItem("tumblrVerifier"),o=i.popupWindow("html/tumblr-oauth-client.html?oauth_token="+h.oauth_token,"stackedit-tumblr-oauth",800,600),o.focus(),a=setInterval(function(){if(o.closed===!0){if(clearInterval(a),o=void 0,a=void 0,h.oauth_verifier=r.tumblrVerifier,void 0===h.oauth_verifier)return void n.error(new Error(f));r.removeItem("tumblrVerifier"),n.chain(u)}},500)}function u(){e.getJSON(t.TUMBLR_PROXY_URL+"access_token",h,function(e){void 0!==e.access_token&&void 0!==e.access_token_secret?(r.tumblrOauthParams=JSON.stringify(e),d=e,n.chain()):n.error(new Error(f))})}if(void 0!==d)return void n.chain();var p=r.tumblrOauthParams;if(void 0!==p)return d=JSON.parse(p),void n.chain();var f="Failed to retrieve a token from Tumblr.";n.timeout=t.ASYNC_TASK_LONG_TIMEOUT;var h;n.chain(s)}),n.onError(function(){void 0!==a&&clearInterval(a),void 0!==o&&o.close()})}function u(e,t){var i;if(e)if(o.error(e),"string"==typeof e)i=e;else{if(i="Could not publish on Tumblr.",401===e.code||403===e.code)return d=void 0,r.removeItem("tumblrOauthParams"),i="Access to Tumblr account is not authorized.",void t.retry(new Error(i),1);e.code<=0&&(n.setOffline(),i="|stopPublish")}t.error(new Error(i))}var d,p={},f=!1;return a.addListener("onOfflineChanged",function(e){f=e}),p.upload=function(n,i,r,o,a,p,f,h,m){var g=new s;l(g),c(g),g.onRun(function(){var s=e.extend({blog_hostname:n,post_id:i,tags:r,format:o,state:a,date:p,title:f,content:h},d);e.ajax({url:t.TUMBLR_PROXY_URL+"post",data:s,type:"POST",dataType:"json",timeout:t.AJAX_TIMEOUT}).done(function(e){i=e.id,g.chain()}).fail(function(e){var t={code:e.status,message:e.statusText};404===t.code&&void 0!==i&&(t="Post "+i+" not found on Tumblr.|removePublish"),u(t,g)})}),g.onSuccess(function(){m(void 0,i)}),g.onError(function(e){m(e)}),g.enqueue()},p}),define("providers/tumblrProvider",["underscore","settings","utils","classes/Provider","helpers/tumblrHelper"],function(e,t,n,i,r){var o=new i("tumblr","Tumblr");return o.publishPreferencesInputIds=["tumblr-hostname"],o.publish=function(n,i,o,a,s){var l=n.tags||[];i&&void 0!==i.tags&&(l=i.tags),e.isString(l)&&(l=e.compact(l.split(/[\s,]/)));var c=function(){if("html"==n.format)return"html";if("template"==n.format){var e=n.customTmpl||t.template;if(-1!==e.indexOf("documentHTML"))return"html"}return"markdown"}(),u=i&&i.published===!1?"draft":"published",d=i&&i.date;r.upload(n.blogHostname,n.postId,l.join(","),c,u,d,o,a,function(e,t){return e?void s(e):(n.postId=t,void s())})},o.newPublishAttributes=function(e){var t={};return t.blogHostname=n.getInputTextValue("#input-publish-tumblr-hostname",e,/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/),t.postId=n.getInputTextValue("#input-publish-postid"),e.isPropagationStopped()?void 0:t},o}),define("helpers/wordpressHelper",["jquery","constants","core","utils","storage","logger","eventMgr","classes/AsyncTask"],function(e,t,n,i,r,o,a,s){function l(e){e.onRun(function(){return f===!0?void e.error(new Error("Operation not available in offline mode.|stopPublish")):void e.chain()})}function c(n){var o,a;n.onRun(function(){function s(){i.redirectConfirm("You are being redirected to WordPress authorization page.",function(){n.chain(l)},function(){n.error(new Error("Operation canceled."))})}function l(){r.removeItem("wordpressCode"),o=i.popupWindow("html/wordpress-oauth-client.html?client_id="+t.WORDPRESS_CLIENT_ID,"stackedit-wordpress-oauth",960,600),o.focus(),a=setInterval(function(){if(o.closed===!0){if(clearInterval(a),o=void 0,a=void 0,p=r.wordpressCode,void 0===p)return void n.error(new Error(u));r.removeItem("wordpressCode"),n.chain(c)}},500)}function c(){e.getJSON(t.WORDPRESS_PROXY_URL+"authenticate/"+p,function(e){void 0!==e.token?(d=e.token,r.wordpressToken=d,n.chain()):n.error(new Error(u))})}if(d=r.wordpressToken,void 0!==d)return void n.chain();var u="Failed to retrieve a token from Wordpress.";n.timeout=t.ASYNC_TASK_LONG_TIMEOUT;var p;n.chain(s)}),n.onError(function(){void 0!==a&&clearInterval(a),void 0!==o&&o.close()})}function u(e,t){var i;if(e)if(o.error(e),"string"==typeof e)i=e;else{if(i="Could not publish on WordPress.",400===e.code&&"invalid_token"==e.message||401===e.code||403===e.code)return r.removeItem("wordpressToken"),i="Access to WordPress account is not authorized.",void t.retry(new Error(i),1);e.code<=0&&(n.setOffline(),i="|stopPublish")}t.error(new Error(i))}var d,p={},f=!1;return a.addListener("onOfflineChanged",function(e){f=e}),p.upload=function(n,i,r,o,a,p,f,h){var m=new s;l(m),c(m),m.onRun(function(){var s=t.WORDPRESS_PROXY_URL+"post",l={token:d,site:n,postId:i,tags:r,status:o,date:a,title:p,content:f};e.ajax({url:s,data:l,type:"POST",dataType:"json",timeout:t.AJAX_TIMEOUT}).done(function(e){if(e.body.ID)return i=e.body.ID,void m.chain();var t={code:e.code,message:e.body.error};404===t.code&&("unknown_blog"==t.message?t='Site "'+n+'" not found on WordPress.|removePublish':"unknown_post"==t.message&&(t="Post "+i+" not found on WordPress.|removePublish")),u(t,m)}).fail(function(e){var t={code:e.status,message:e.statusText};u(t,m)})}),m.onSuccess(function(){h(void 0,i)}),m.onError(function(e){h(e)}),m.enqueue()},p}),define("providers/wordpressProvider",["underscore","utils","classes/Provider","helpers/wordpressHelper"],function(e,t,n,i){var r=new n("wordpress","WordPress");return r.defaultPublishFormat="html",r.publishPreferencesInputIds=["wordpress-site"],r.publish=function(t,n,r,o,a){var s=t.tags||[];n&&void 0!==n.tags&&(s=n.tags);var l=n&&n.published===!1?"draft":"publish",c=n&&n.date;e.isString(s)&&(s=e.compact(s.split(/[\s,]/))),i.upload(t.site,t.postId,s.join(","),l,c,r,o,function(e,n){return e?void a(e):(t.postId=n,void a())})},r.newPublishAttributes=function(e){var n={};return n.site=t.getInputTextValue("#input-publish-wordpress-site",e,/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/),n.postId=t.getInputTextValue("#input-publish-postid"),e.isPropagationStopped()?void 0:n},r}),define("publisher",["jquery","underscore","constants","utils","storage","settings","eventMgr","fileSystem","fileMgr","sharing","classes/Provider","classes/AsyncTask","providers/bloggerProvider","providers/bloggerPageProvider","providers/dropboxProvider","providers/gistProvider","providers/githubProvider","providers/gdriveProvider","providers/gdrivesecProvider","providers/gdriveterProvider","providers/sshProvider","providers/tumblrProvider","providers/wordpressProvider"],function(e,t,n,i,r,o,a,s,l,c,u,d){function p(e,t,n){return void 0===t.format&&(t.format=i.getInputRadio("radio-publish-format"),"template"==t.format&&i.getInputChecked("#checkbox-publish-custom-template")&&(t.customTmpl=i.getInputValue("#textarea-publish-custom-template"))),"markdown"==t.format?e.content:"html"==t.format?n.withoutComments:v.applyTemplate(e,t,n)}function f(e,t){if(0===S.length)return void e(t);var n=S.pop(),i=p(y,n,x),r=(y.frontMatter||{}).title||y.title;n.provider.publish(n,y.frontMatter,r,i,function(i){if(void 0!==i){var r=i.toString();if(-1!==r.indexOf("|removePublish")&&(y.removePublishLocation(n),a.onPublishRemoved(y,n)),-1!==r.indexOf("|stopPublish"))return void e(i)}f(e,t||i)})}function h(e,n){var o;do o="publish."+i.randomString();while(t.has(r,o));n.publishIndex=o,e.addPublishLocation(n),a.onNewPublishSuccess(e,n)}function m(n){var r=n.defaultPublishFormat||"markdown";E=n,e(".publish-provider-name").text(n.providerName),e('.modal-publish [class*=" modal-publish-"]').hide().filter(".modal-publish-"+n.providerId).show(),i.resetModalInputs(),i.setInputRadio("radio-publish-format",r),i.setInputChecked("#checkbox-publish-custom-template",!1),i.setInputValue("#textarea-publish-custom-template",o.template);var a=i.retrieveIgnoreError(n.providerId+".publishPreferences");a&&(t.each(n.publishPreferencesInputIds,function(e){var n=a[e];t.isBoolean(n)?i.setInputChecked("#input-publish-"+e,n):i.setInputValue("#input-publish-"+e,n)}),i.setInputRadio("radio-publish-format",a.format),i.setInputChecked("#checkbox-publish-custom-template",void 0!==a.customTmpl),i.setInputValue("#textarea-publish-custom-template",a.customTmpl||o.template)),e(".modal-publish").modal()}function g(e){var n=E,i=n.newPublishAttributes(e);if(void 0!==i){var o=l.currentFile,a=p(o,i,w),s=o.frontMatter&&o.frontMatter.title||o.title;n.publish(i,o.frontMatter,s,a,function(e){void 0===e&&(i.provider=n,c.createLink(i,function(){h(o,i)}))});var u={};t.each(n.publishPreferencesInputIds,function(e){var t=document.getElementById("input-publish-"+e);u[e]="checkbox"==t.type?t.checked:t.value}),u.format=i.format,u.customTmpl=i.customTmpl,r[n.providerId+".publishPreferences"]=JSON.stringify(u)}}var v={},b=t.chain(arguments).map(function(e){return e instanceof u&&e.isPublishEnabled===!0&&[e.providerId,e]}).compact().object().value();!function(){var e={};t.each(s,function(t){i.retrieveIndexArray(t.fileIndex+".publish").forEach(function(n){try{var o=JSON.parse(r[n]);o.publishIndex=n;var s=b[o.provider];if(!s)throw new Error("Invalid provider ID: "+o.provider);o.provider=s,t.publishLocations[n]=o,e[n]=o}catch(l){a.onError(l),i.removeIndexFromArray(t.fileIndex+".publish",n)}})}),Object.keys(r).forEach(function(t){var n=t.match(/publish\.\S+/);n&&!e.hasOwnProperty(n[0])&&r.removeItem(t)})}(),v.applyTemplate=function(e,n,i){try{var r=n&&n.customTmpl||o.template;return t.template(r,{documentTitle:e.title,documentMarkdown:e.content,strippedDocumentMarkdown:e.content.substring(e.frontMatter?e.frontMatter._frontMatter.length:0),documentHTML:i.withoutComments,documentHTMLWithComments:i.withComments,frontMatter:e.frontMatter,publishAttributes:n})}catch(s){return a.onError(s),s.message}};var y,x,w,S=[];a.addListener("onPreviewFinished",function(e,t){w={withComments:e,withoutComments:t}});var C=!1;a.addListener("onOfflineChanged",function(e){C=e});var T=!1;v.publish=function(){T!==!0&&C!==!0&&(T=!0,a.onPublishRunning(!0),y=l.currentFile,x=w,S=t.values(y.publishLocations),f(function(e){T=!1,a.onPublishRunning(!1),void 0===e&&a.onPublishSuccess(y)}))};var E,k=[" \n",' ',' <%= provider.providerName %>'," "," "].join("");return a.addListener("onReady",function(){if(window.viewerMode===!1){var r=document.querySelector(".menu-panel .publish-on-provider-list"),s=t.reduce(b,function(e,n){return e+t.template(k,{provider:n})},"");r.innerHTML=s,t.each(b,function(t){e(r.querySelector(".action-init-publish-"+t.providerId)).click(function(){m(t)}),e(".action-publish-"+t.providerId).click(function(){m(t)})})}e(".action-process-publish").click(g);var c=e(".publish-custom-template-collapse").collapse({toggle:!1}),u=e("#textarea-publish-custom-template"),p=t.debounce(function(){c.collapse("template"==i.getInputRadio("radio-publish-format")?"show":"hide")},100);e("#checkbox-publish-custom-template").change(function(){u.prop("disabled",!this.checked)}),e("input:radio[name=radio-publish-format]").change(function(){p()}),e(".modal-publish").on("hidden.bs.modal",function(){c.collapse("hide")}),e(".action-download-md").click(function(){var e=l.currentFile.content,t=l.currentFile.title;i.saveAs(e,t+".md")}),e(".action-download-html").click(function(){var e=l.currentFile.title;i.saveAs(w.withoutComments,e+".html")}),e(".action-download-template").click(function(){var e=l.currentFile,t=v.applyTemplate(e,void 0,w);i.saveAs(t,e.title+(-1===o.template.indexOf("documentHTML")?".md":".html"))}),e(".action-download-pdf").click(function(){var e,t=l.currentFile,r=v.applyTemplate(t,{customTmpl:o.pdfTemplate},w),s=new d;s.onRun(function(){if(C===!0)return a.onError("Operation not available in offline mode."),void s.chain();var t=new XMLHttpRequest;t.open("POST",n.HTMLTOPDF_URL,!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.setRequestHeader("page-size",o.pdfPageSize),t.responseType="blob",t.onreadystatechange=function(){4==this.readyState&&(200==this.status?e=this.response:a.onError("Error when trying to generate PDF: "+this.status),s.chain())},t.send(r)}),s.onSuccess(function(){void 0!==e&&i.saveAs(e,l.currentFile.title+".pdf")}),s.enqueue()})}),a.onPublisherCreated(v),v}),define("providers/gplusProvider",["jquery","underscore","utils","storage","classes/Provider","eventMgr","helpers/googleHelper"],function(e,t,n,i,r,o,a){function s(e,n){var i;return t.find(e.thumbnails,function(e){var t=!1;return e.url.replace(/^(.*[\/=]s)\d.*?(\/[^\/]+)?$/,function(e,r,o){i=r+n+(o||""),t=!0}),t}),i}function l(){return c.thumbnails?(n.resetModalInputs(),e(".modal-import-image img").prop("src",s(c,128)),n.setInputValue("#input-import-image-title",c.name),f&&n.setInputValue("#input-import-image-size",f.size),void e(".modal-import-image").modal()):(o.onError("Image "+c.name+" is not accessible."),void u(!0))}var c,u,d="gplus",p=new r(d,"Google+"),f=n.retrieveIgnoreError(d+".importImagePreferences");return p.importImage=function(e){u=e,a.picker(function(t,n){return t||0===n.length?void e(t):(c=n[0],void l())},"img")},p.uploadImage=function(t,n,i){u=i,a.uploadImg(t,n,"default",function(n,r){return n||!r?void i(n):(c={name:t,thumbnails:[]},e(r).find("thumbnail").each(function(){c.thumbnails.push({url:e(this).attr("url")})}),void l())})},o.addListener("onReady",function(){e(".action-import-image").click(function(){var e=n.getInputIntValue("#input-import-image-size",void 0,0)||0,t=n.getInputTextValue("#input-import-image-title"),r=s(c,e);t&&(r+=' "'+t+'"'),u(void 0,r),f={},e&&(f.size=e),i[d+".importImagePreferences"]=JSON.stringify(f)})}),p}),define("mediaImporter",["jquery","underscore","constants","classes/Provider","core","eventMgr","providers/gplusProvider"],function(e,t,n,i,r,o){var a={},s=t.chain(arguments).map(function(e){return e instanceof i&&[e.providerId,e]}).compact().object().value();return o.addListener("onReady",function(){function i(i){var o=(i.dataTransfer||i.target).files,a=t.first(o);if(a.name.match(/.(jpe?g|png|gif)$/i)){i.stopPropagation(),i.preventDefault();var l=new FileReader;l.onload=function(t){return function(n){var i=new Uint8Array(n.target.result);s.gplus.uploadImage(t.name,i,function(t,n){if(!t){r.catchModal=!0,e("#wmd-image-button").click(),r.catchModal=!1;var i=r.insertLinkCallback;r.insertLinkCallback=void 0,i(n||null)}})}}(a);var c=a.slice(0,n.IMPORT_IMG_MAX_CONTENT_SIZE);l.readAsArrayBuffer(c)}}function o(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy"}t.each(s,function(t){e(".action-import-image-"+t.providerId).click(function(){var e=r.insertLinkCallback;r.insertLinkCallback=void 0,t.importImage(function(t,n){return t?void e(null):void e(n||null)})})}),e("#wmd-input").each(function(){this.addEventListener("dragover",o,!1),this.addEventListener("drop",i,!1)})}),a}),define("css/css",[],function(){if("undefined"==typeof window)return{load:function(e,t,n){n()}};var e=document.getElementsByTagName("head")[0],t=window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)/)||0,n=!1,i=!0;t[1]||t[7]?n=parseInt(t[1])<6||parseInt(t[7])<=9:t[2]?i=!1:t[4]&&(n=parseInt(t[4])<18);var r={};r.pluginBuilder="./css-builder";var o,a,s,l=function(){o=document.createElement("style"),e.appendChild(o),a=o.styleSheet||o.sheet},c=0,u=[],d=function(e){c++,32==c&&(l(),c=0),a.addImport(e),o.onload=p},p=function(){s();var e=u.shift();e&&(s=e[1],d(e[0]))},f=function(e,t){if(a&&a.addImport||l(),a&&a.addImport)s?u.push([e,t]):(d(e),s=t);else{o.textContent='@import "'+e+'";';var n=setInterval(function(){try{o.sheet.cssRules,clearInterval(n),t()}catch(e){}},10)}},h=function(t,n){var r=document.createElement("link");if(r.type="text/css",r.rel="stylesheet",i)r.onload=function(){r.onload=function(){},setTimeout(n,7)};else var o=setInterval(function(){for(var e=0;eo;++o)if(n=e.attributes[o],r=n.name,"class"!=r){if(i=t.attributes.getNamedItem(r),n.specified!=i.specified)return!1;if(n.specified&&n.nodeValue!==i.nodeValue)return!1}return!0}function p(e,t){for(var n,i=0,r=e.attributes.length;r>i;++i)if(n=e.attributes[i].name,(!t||!k.arrayContains(t,n))&&e.attributes[i].specified&&"class"!=n)return!0;return!1}function f(e,t){for(var n in t)if(t.hasOwnProperty(n)&&e[n]!==t[n])return!1;return!0}function h(e){var t;return e&&1==e.nodeType&&((t=e.parentNode)&&9==t.nodeType&&"on"==t.designMode||D(e)&&!D(e.parentNode))}function m(e){return(D(e)||1!=e.nodeType&&D(e.parentNode))&&!h(e)}function g(e){return e&&1==e.nodeType&&!N.test(E(e,"display"))}function v(e){if(0==e.data.length)return!0;if(L.test(e.data))return!1;var t=E(e.parentNode,"whiteSpace");switch(t){case"pre":case"pre-wrap":case"-moz-pre-wrap":return!1;case"pre-line":if(/[\r\n]/.test(e.data))return!1}return g(e.previousSibling)||g(e.nextSibling)}function b(e,t){return k.isCharacterDataNode(e)?0==t?!!e.previousSibling:t==e.length?!!e.nextSibling:!0:t>0&&t a;++a)"*"==i[a]?this.applyToAnyTagName=!0:this.tagNames.push(i[a].toLowerCase());else this.tagNames=[this.elementTagName]}function T(e,t,n){return new C(e,t,n)}e.requireModules(["WrappedSelection","WrappedRange"]);var E,k=e.dom,_="span",I=function(){function e(e,t,n){return t&&n?" ":""}return function(t,n){t.className&&(t.className=t.className.replace(new RegExp("(?:^|\\s)"+n+"(?:\\s|$)"),e))}}();"undefined"!=typeof window.getComputedStyle?E=function(e,t){return k.getWindow(e).getComputedStyle(e,null)[t]}:"undefined"!=typeof document.documentElement.currentStyle?E=function(e,t){return e.currentStyle[t]}:t.fail("No means of obtaining computed style properties found");var D;!function(){var e=document.createElement("div");D="boolean"==typeof e.isContentEditable?function(e){return e&&1==e.nodeType&&e.isContentEditable}:function(e){return e&&1==e.nodeType&&"false"!=e.contentEditable?"true"==e.contentEditable||D(e.parentNode):!1}}();var N=/^inline(-block|-table)?$/i,L=/[^\r\n\t\f \u200B]/,M=w(!1),A=w(!0);S.prototype={doMerge:function(){for(var e,t,n,i=[],r=0,o=this.textNodes.length;o>r;++r)e=this.textNodes[r],t=e.parentNode,i[r]=e.data,r&&(t.removeChild(e),t.hasChildNodes()||t.parentNode.removeChild(t));return this.firstTextNode.data=n=i.join(""),n},getLength:function(){for(var e=this.textNodes.length,t=0;e--;)t+=this.textNodes[e].length;return t},toString:function(){for(var e=[],t=0,n=this.textNodes.length;n>t;++t)e[t]="'"+this.textNodes[t].data+"'";return"[Merge("+e.join(",")+")]"}};var R=["elementTagName","ignoreWhiteSpace","applyToEditableOnly"],P={"class":"className"};C.prototype={elementTagName:_,elementProperties:{},ignoreWhiteSpace:!0,applyToEditableOnly:!1,hasClass:function(e){return 1==e.nodeType&&k.arrayContains(this.tagNames,e.tagName.toLowerCase())&&i(e,this.cssClass)},getSelfOrAncestorWithClass:function(e){for(;e;){if(this.hasClass(e,this.cssClass))return e;e=e.parentNode}return null},isModifiable:function(e){return!this.applyToEditableOnly||m(e)},isIgnorableWhiteSpaceNode:function(e){return this.ignoreWhiteSpace&&e&&3==e.nodeType&&v(e)},postApply:function(e,t,n){for(var i,r,o,a=e[0],s=e[e.length-1],l=[],c=a,u=s,d=0,p=s.length,f=0,h=e.length;h>f;++f)r=e[f],o=M(r,!n),o?(i||(i=new S(o),l.push(i)),i.textNodes.push(r),r===a&&(c=i.firstTextNode,d=c.length),r===s&&(u=i.firstTextNode,p=i.getLength())):i=null;var m=A(s,!n);if(m&&(i||(i=new S(s),l.push(i)),i.textNodes.push(m)),l.length){for(f=0,h=l.length;h>f;++f)l[f].doMerge();t.setStart(c,d),t.setEnd(u,p)}},createContainer:function(t){var n=t.createElement(this.elementTagName);return e.util.extend(n,this.elementProperties),r(n,this.cssClass),n},applyToTextNode:function(e){var t=e.parentNode;if(1==t.childNodes.length&&k.arrayContains(this.tagNames,t.tagName.toLowerCase()))r(t,this.cssClass);else{var n=this.createContainer(k.getDocument(e));e.parentNode.insertBefore(n,e),n.appendChild(e)}},isRemovable:function(e){return e.tagName.toLowerCase()==this.elementTagName&&a(e)==this.elementSortedClassName&&f(e,this.elementProperties)&&!p(e,this.attrExceptions)&&this.isModifiable(e)},undoToTextNode:function(e,t,n){if(!t.containsNode(n)){var i=t.cloneRange();i.selectNode(n),i.isPointInRange(t.endContainer,t.endOffset)&&(y(n,t.endContainer,t.endOffset,[t]),t.setEndAfter(n)),i.isPointInRange(t.startContainer,t.startOffset)&&(n=y(n,t.startContainer,t.startOffset,[t]))}this.isRemovable(n)?l(n):I(n,this.cssClass)},applyToRange:function(e){e.splitBoundaries();var t=u(e);if(t.length){for(var n,i=0,r=t.length;r>i;++i)n=t[i],this.isIgnorableWhiteSpaceNode(n)||this.getSelfOrAncestorWithClass(n)||!this.isModifiable(n)||this.applyToTextNode(n);e.setStart(t[0],0),n=t[t.length-1],e.setEnd(n,n.length),this.normalize&&this.postApply(t,e,!1)}},applyToSelection:function(t){t=t||window;var n,i=e.getSelection(t),r=i.getAllRanges();i.removeAllRanges();for(var o=r.length;o--;)n=r[o],this.applyToRange(n),i.addRange(n)},undoToRange:function(e){e.splitBoundaries();var t,n,i=u(e),r=i[i.length-1];if(i.length){for(var o=0,a=i.length;a>o;++o)t=i[o],n=this.getSelfOrAncestorWithClass(t),n&&this.isModifiable(t)&&this.undoToTextNode(t,e,n),e.setStart(i[0],0),e.setEnd(r,r.length); -this.normalize&&this.postApply(i,e,!0)}},undoToSelection:function(t){t=t||window;var n,i=e.getSelection(t),r=i.getAllRanges();i.removeAllRanges();for(var o=0,a=r.length;a>o;++o)n=r[o],this.undoToRange(n),i.addRange(n)},getTextSelectedByRange:function(e,t){var n=t.cloneRange();n.selectNodeContents(e);var i=n.intersection(t),r=i?i.toString():"";return n.detach(),r},isAppliedToRange:function(e){if(e.collapsed)return!!this.getSelfOrAncestorWithClass(e.commonAncestorContainer);for(var t,n=e.getNodes([3]),i=0;t=n[i++];)if(!this.isIgnorableWhiteSpaceNode(t)&&c(e,t)&&this.isModifiable(t)&&!this.getSelfOrAncestorWithClass(t))return!1;return!0},isAppliedToSelection:function(t){t=t||window;for(var n=e.getSelection(t),i=n.getAllRanges(),r=i.length;r--;)if(!this.isAppliedToRange(i[r]))return!1;return!0},toggleRange:function(e){this.isAppliedToRange(e)?this.undoToRange(e):this.applyToRange(e)},toggleSelection:function(e){this.isAppliedToSelection(e)?this.undoToSelection(e):this.applyToSelection(e)},detach:function(){}},C.util={hasClass:i,addClass:r,removeClass:I,hasSameClasses:s,replaceWithOwnChildren:l,elementsHaveSameNonClassAttributes:d,elementHasNonClassAttributes:p,splitNodeAt:y,isEditableElement:D,isEditingHost:h,isEditable:m},e.CssClassApplier=C,e.createCssClassApplier=T}),define("rangy-cssclassapplier",function(){}),requirejs.config({waitSeconds:0,packages:[{name:"css",location:"bower-libs/require-css",main:"css"},{name:"less",location:"bower-libs/require-less",main:"less"}],paths:{jquery:"bower-libs/jquery/jquery",underscore:"bower-libs/underscore/underscore",crel:"bower-libs/crel/crel",jgrowl:"bower-libs/jgrowl/jquery.jgrowl",mousetrap:"bower-libs/mousetrap/mousetrap","mousetrap-record":"bower-libs/mousetrap/plugins/record/mousetrap-record",toMarkdown:"bower-libs/to-markdown/src/to-markdown",text:"bower-libs/requirejs-text/text",mathjax:"../libs/MathJax/MathJax.js?config=TeX-AMS_HTML",bootstrap:"bower-libs/bootstrap/dist/js/bootstrap",requirejs:"bower-libs/requirejs/require","google-code-prettify":"bower-libs/google-code-prettify/src/prettify",highlightjs:"libs/highlight/highlight.pack","jquery-waitforimages":"bower-libs/waitForImages/src/jquery.waitforimages","jquery-ui":"bower-libs/jquery-ui/ui/jquery-ui","jquery-ui-core":"bower-libs/jquery-ui/ui/jquery.ui.core","jquery-ui-widget":"bower-libs/jquery-ui/ui/jquery.ui.widget","jquery-ui-mouse":"bower-libs/jquery-ui/ui/jquery.ui.mouse","jquery-ui-draggable":"bower-libs/jquery-ui/ui/jquery.ui.draggable","jquery-ui-effect":"bower-libs/jquery-ui/ui/jquery.ui.effect","jquery-ui-effect-slide":"bower-libs/jquery-ui/ui/jquery.ui.effect-slide",FileSaver:"bower-libs/FileSaver/FileSaver",stacktrace:"bower-libs/stacktrace/stacktrace","requirejs-text":"bower-libs/requirejs-text/text","bootstrap-tour":"bower-libs/bootstrap-tour/build/js/bootstrap-tour",css_browser_selector:"bower-libs/css_browser_selector/css_browser_selector","pagedown-extra":"bower-libs/pagedown-extra/Markdown.Extra",pagedown:"libs/Markdown.Editor","require-css":"bower-libs/require-css/css",xregexp:"bower-libs/xregexp/xregexp-all",yaml:"bower-libs/yaml.js","yaml.js":"bower-libs/yaml.js","yaml-js":"bower-libs/yaml.js/bin/yaml",css:"bower-libs/require-css/css","css-builder":"bower-libs/require-css/css-builder",normalize:"bower-libs/require-css/normalize",prism:"bower-libs/prism/prism","prism-core":"bower-libs/prism/components/prism-core",MutationObservers:"bower-libs/MutationObservers/MutationObserver",WeakMap:"bower-libs/WeakMap/weakmap",rangy:"bower-libs/rangy/rangy-core","rangy-cssclassapplier":"bower-libs/rangy/rangy-cssclassapplier",diff_match_patch:"bower-libs/google-diff-match-patch-js/diff_match_patch",diff_match_patch_uncompressed:"bower-libs/google-diff-match-patch-js/diff_match_patch_uncompressed",jsondiffpatch:"bower-libs/jsondiffpatch/build/bundle",hammerjs:"bower-libs/hammerjs/hammer"},shim:{underscore:{exports:"_"},mathjax:["libs/mathjax_init"],jgrowl:{deps:["jquery"],exports:"jQuery.jGrowl"},diff_match_patch_uncompressed:{exports:"diff_match_patch"},jsondiffpatch:["diff_match_patch_uncompressed"],rangy:{exports:"rangy"},"rangy-cssclassapplier":["rangy"],mousetrap:{exports:"Mousetrap"},"yaml-js":{exports:"YAML"},"prism-core":{exports:"Prism"},"bower-libs/prism/components/prism-markup":["prism-core"],"libs/prism-latex":["prism-core"],"libs/prism-markdown":["bower-libs/prism/components/prism-markup","libs/prism-latex"],"bootstrap-record":["mousetrap"],toMarkdown:{deps:["jquery"],exports:"toMarkdown"},stacktrace:{exports:"printStackTrace"},FileSaver:{exports:"saveAs"},MutationObservers:["WeakMap"],highlightjs:{exports:"hljs"},"bootstrap-tour":{deps:["bootstrap"],exports:"Tour"},bootstrap:["jquery"],"jquery-waitforimages":["jquery"],pagedown:["libs/Markdown.Converter"],"pagedown-extra":["libs/Markdown.Converter"]}});try{var test="seLocalStorageCheck";localStorage.setItem(test,test),localStorage.removeItem(test);var obj={};Object.defineProperty(obj,"prop",{get:function(){},set:function(){}})}catch(e){throw alert("Your browser is not supported, sorry!"),e}window.viewerMode=/(^| )viewer($| )/.test(document.body.className),window.theme=localStorage.themeV3||"default";var themeModule="less!themes/"+window.theme;-1!==window.baseDir.indexOf("-min")&&(themeModule="css!themes/"+window.theme),require(["jquery","rangy","core","eventMgr","synchronizer","publisher","mediaImporter","css","rangy-cssclassapplier",themeModule],function(e,t,n,i){window.noStart||e(function(){t.init(),n.onReady(),window.applicationCache&&window.applicationCache.addEventListener("updateready",function(){window.applicationCache.status===window.applicationCache.UPDATEREADY&&(window.applicationCache.swapCache(),i.onMessage("New version available!\nJust refresh the page to upgrade."))},!1)})}),define("main",function(){}); -======= -function printStackTrace(e){e=e||{guess:!0};var t=e.e||null,n=!!e.guess,i=new printStackTrace.implementation,r=i.run(t);return n?i.guessAnonymousFunctions(r):r}function diff_match_patch(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32}!function(e,t){function n(e){var t=e.length,n=ot.type(e);return ot.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function i(e){var t=ht[e]={};return ot.each(e.match(st)||[],function(e,n){t[n]=!0}),t}function r(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=ot.expando+Math.random()}function o(e,n,i){var r;if(i===t&&1===e.nodeType)if(r="data-"+n.replace(bt,"-$1").toLowerCase(),i=e.getAttribute(r),"string"==typeof i){try{i="true"===i?!0:"false"===i?!1:"null"===i?null:+i+""===i?+i:vt.test(i)?JSON.parse(i):i}catch(o){}mt.set(e,n,i)}else i=t;return i}function a(){return!0}function s(){return!1}function l(){try{return z.activeElement}catch(e){}}function c(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function u(e,t,n){if(ot.isFunction(t))return ot.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return ot.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(It.test(t))return ot.filter(t,e,n);t=ot.filter(t,e)}return ot.grep(e,function(e){return tt.call(t,e)>=0!==n})}function d(e,t){return ot.nodeName(e,"table")&&ot.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function p(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function f(e){var t=jt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function h(e,t){for(var n=e.length,i=0;n>i;i++)gt.set(e[i],"globalEval",!t||gt.get(t[i],"globalEval"))}function m(e,t){var n,i,r,o,a,s,l,c;if(1===t.nodeType){if(gt.hasData(e)&&(o=gt.access(e),a=gt.set(t,o),c=o.events)){delete a.handle,a.events={};for(r in c)for(n=0,i=c[r].length;i>n;n++)ot.event.add(t,r,c[r][n])}mt.hasData(e)&&(s=mt.access(e),l=ot.extend({},s),mt.set(t,l))}}function g(e,n){var i=e.getElementsByTagName?e.getElementsByTagName(n||"*"):e.querySelectorAll?e.querySelectorAll(n||"*"):[];return n===t||n&&ot.nodeName(e,n)?ot.merge([e],i):i}function v(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ft.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function b(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),i=t,r=Zt.length;r--;)if(t=Zt[r]+n,t in e)return t;return i}function y(e,t){return e=t||e,"none"===ot.css(e,"display")||!ot.contains(e.ownerDocument,e)}function x(t){return e.getComputedStyle(t,null)}function w(e,t){for(var n,i,r,o=[],a=0,s=e.length;s>a;a++)i=e[a],i.style&&(o[a]=gt.get(i,"olddisplay"),n=i.style.display,t?(o[a]||"none"!==n||(i.style.display=""),""===i.style.display&&y(i)&&(o[a]=gt.access(i,"olddisplay",E(i.nodeName)))):o[a]||(r=y(i),(n&&"none"!==n||!r)&>.set(i,"olddisplay",r?n:ot.css(i,"display"))));for(a=0;s>a;a++)i=e[a],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?o[a]||"":"none"));return e}function S(e,t,n){var i=Vt.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function C(e,t,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=ot.css(e,n+Yt[o],!0,r)),i?("content"===n&&(a-=ot.css(e,"padding"+Yt[o],!0,r)),"margin"!==n&&(a-=ot.css(e,"border"+Yt[o]+"Width",!0,r))):(a+=ot.css(e,"padding"+Yt[o],!0,r),"padding"!==n&&(a+=ot.css(e,"border"+Yt[o]+"Width",!0,r)));return a}function T(e,t,n){var i=!0,r="width"===t?e.offsetWidth:e.offsetHeight,o=x(e),a=ot.support.boxSizing&&"border-box"===ot.css(e,"boxSizing",!1,o);if(0>=r||null==r){if(r=qt(e,t,o),(0>r||null==r)&&(r=e.style[t]),Wt.test(r))return r;i=a&&(ot.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+C(e,t,n||(a?"border":"content"),i,o)+"px"}function E(e){var t=z,n=Xt[e];return n||(n=k(e,t),"none"!==n&&n||(Ht=(Ht||ot("").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Ht[0].contentWindow||Ht[0].contentDocument).document,t.write(""),t.close(),n=k(e,t),Ht.detach()),Xt[e]=n),n}function k(e,t){var n=ot(t.createElement(e)).appendTo(t.body),i=ot.css(n[0],"display");return n.remove(),i}function _(e,t,n,i){var r;if(ot.isArray(t))ot.each(t,function(t,r){n||tn.test(e)?i(e,r):_(e+"["+("object"==typeof r?t:"")+"]",r,n,i)});else if(n||"object"!==ot.type(t))i(e,t);else for(r in t)_(e+"["+r+"]",t[r],n,i)}function I(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(st)||[];if(ot.isFunction(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function D(e,t,n,i){function r(s){var l;return o[s]=!0,ot.each(e[s]||[],function(e,s){var c=s(t,n,i);return"string"!=typeof c||a||o[c]?a?!(l=c):void 0:(t.dataTypes.unshift(c),r(c),!1)}),l}var o={},a=e===yn;return r(t.dataTypes[0])||!o["*"]&&r("*")}function N(e,n){var i,r,o=ot.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&ot.extend(!0,e,r),e}function L(e,n,i){for(var r,o,a,s,l=e.contents,c=e.dataTypes;"*"===c[0];)c.shift(),r===t&&(r=e.mimeType||n.getResponseHeader("Content-Type"));if(r)for(o in l)if(l[o]&&l[o].test(r)){c.unshift(o);break}if(c[0]in i)a=c[0];else{for(o in i){if(!c[0]||e.converters[o+" "+c[0]]){a=o;break}s||(s=o)}a=a||s}return a?(a!==c[0]&&c.unshift(a),i[a]):void 0}function M(e,t,n,i){var r,o,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=c[l+" "+o]||c["* "+o],!a)for(r in c)if(s=r.split(" "),s[1]===o&&(a=c[l+" "+s[0]]||c["* "+s[0]])){a===!0?a=c[r]:c[r]!==!0&&(o=s[0],u.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function A(){return setTimeout(function(){In=t}),In=ot.now()}function R(e,t,n){for(var i,r=(Rn[t]||[]).concat(Rn["*"]),o=0,a=r.length;a>o;o++)if(i=r[o].call(n,t,e))return i}function P(e,t,n){var i,r,o=0,a=An.length,s=ot.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=In||A(),n=Math.max(0,c.startTime+c.duration-t),i=n/c.duration||0,o=1-i,a=0,l=c.tweens.length;l>a;a++)c.tweens[a].run(o);return s.notifyWith(e,[c,o,n]),1>o&&l?n:(s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:ot.extend({},t),opts:ot.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:In||A(),duration:n.duration,tweens:[],createTween:function(t,n){var i=ot.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)c.tweens[n].run(1);return t?s.resolveWith(e,[c,t]):s.rejectWith(e,[c,t]),this}}),u=c.props;for(F(u,c.opts.specialEasing);a>o;o++)if(i=An[o].call(c,e,u,c.opts))return i;return ot.map(u,R,c),ot.isFunction(c.opts.start)&&c.opts.start.call(e,c),ot.fx.timer(ot.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function F(e,t){var n,i,r,o,a;for(n in e)if(i=ot.camelCase(n),r=t[i],o=e[n],ot.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),a=ot.cssHooks[i],a&&"expand"in a){o=a.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=r)}else t[i]=r}function O(e,n,i){var r,o,a,s,l,c,u=this,d={},p=e.style,f=e.nodeType&&y(e),h=gt.get(e,"fxshow");i.queue||(l=ot._queueHooks(e,"fx"),null==l.unqueued&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,u.always(function(){u.always(function(){l.unqueued--,ot.queue(e,"fx").length||l.empty.fire()})})),1===e.nodeType&&("height"in n||"width"in n)&&(i.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===ot.css(e,"display")&&"none"===ot.css(e,"float")&&(p.display="inline-block")),i.overflow&&(p.overflow="hidden",u.always(function(){p.overflow=i.overflow[0],p.overflowX=i.overflow[1],p.overflowY=i.overflow[2]}));for(r in n)if(o=n[r],Nn.exec(o)){if(delete n[r],a=a||"toggle"===o,o===(f?"hide":"show")){if("show"!==o||!h||h[r]===t)continue;f=!0}d[r]=h&&h[r]||ot.style(e,r)}if(!ot.isEmptyObject(d)){h?"hidden"in h&&(f=h.hidden):h=gt.access(e,"fxshow",{}),a&&(h.hidden=!f),f?ot(e).show():u.done(function(){ot(e).hide()}),u.done(function(){var t;gt.remove(e,"fxshow");for(t in d)ot.style(e,t,d[t])});for(r in d)s=R(f?h[r]:0,r,u),r in h||(h[r]=s.start,f&&(s.end=s.start,s.start="width"===r||"height"===r?1:0))}}function B(e,t,n,i,r){return new B.prototype.init(e,t,n,i,r)}function j(e,t){var n,i={height:e},r=0;for(t=t?1:0;4>r;r+=2-t)n=Yt[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function $(e){return ot.isWindow(e)?e:9===e.nodeType&&e.defaultView}var G,q,H=typeof t,U=e.location,z=e.document,V=z.documentElement,W=e.jQuery,Q=e.$,X={},K=[],J="2.0.3",Y=K.concat,Z=K.push,et=K.slice,tt=K.indexOf,nt=X.toString,it=X.hasOwnProperty,rt=J.trim,ot=function(e,t){return new ot.fn.init(e,t,G)},at=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,st=/\S+/g,lt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ct=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ut=/^-ms-/,dt=/-([\da-z])/gi,pt=function(e,t){return t.toUpperCase()},ft=function(){z.removeEventListener("DOMContentLoaded",ft,!1),e.removeEventListener("load",ft,!1),ot.ready()};ot.fn=ot.prototype={jquery:J,constructor:ot,init:function(e,n,i){var r,o;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:lt.exec(e),!r||!r[1]&&n)return!n||n.jquery?(n||i).find(e):this.constructor(n).find(e);if(r[1]){if(n=n instanceof ot?n[0]:n,ot.merge(this,ot.parseHTML(r[1],n&&n.nodeType?n.ownerDocument||n:z,!0)),ct.test(r[1])&&ot.isPlainObject(n))for(r in n)ot.isFunction(this[r])?this[r](n[r]):this.attr(r,n[r]);return this}return o=z.getElementById(r[2]),o&&o.parentNode&&(this.length=1,this[0]=o),this.context=z,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ot.isFunction(e)?i.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),ot.makeArray(e,this))},selector:"",length:0,toArray:function(){return et.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=ot.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return ot.each(this,e,t)},ready:function(e){return ot.ready.promise().done(e),this},slice:function(){return this.pushStack(et.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(ot.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:Z,sort:[].sort,splice:[].splice},ot.fn.init.prototype=ot.fn,ot.extend=ot.fn.extend=function(){var e,n,i,r,o,a,s=arguments[0]||{},l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),"object"==typeof s||ot.isFunction(s)||(s={}),c===l&&(s=this,--l);c>l;l++)if(null!=(e=arguments[l]))for(n in e)i=s[n],r=e[n],s!==r&&(u&&r&&(ot.isPlainObject(r)||(o=ot.isArray(r)))?(o?(o=!1,a=i&&ot.isArray(i)?i:[]):a=i&&ot.isPlainObject(i)?i:{},s[n]=ot.extend(u,a,r)):r!==t&&(s[n]=r));return s},ot.extend({expando:"jQuery"+(J+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===ot&&(e.$=Q),t&&e.jQuery===ot&&(e.jQuery=W),ot},isReady:!1,readyWait:1,holdReady:function(e){e?ot.readyWait++:ot.ready(!0)},ready:function(e){(e===!0?--ot.readyWait:ot.isReady)||(ot.isReady=!0,e!==!0&&--ot.readyWait>0||(q.resolveWith(z,[ot]),ot.fn.trigger&&ot(z).trigger("ready").off("ready")))},isFunction:function(e){return"function"===ot.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):"object"==typeof e||"function"==typeof e?X[nt.call(e)]||"object":typeof e},isPlainObject:function(e){if("object"!==ot.type(e)||e.nodeType||ot.isWindow(e))return!1;try{if(e.constructor&&!it.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||z;var i=ct.exec(e),r=!n&&[];return i?[t.createElement(i[1])]:(i=ot.buildFragment([e],t,r),r&&ot(r).remove(),ot.merge([],i.childNodes))},parseJSON:JSON.parse,parseXML:function(e){var n,i;if(!e||"string"!=typeof e)return null;try{i=new DOMParser,n=i.parseFromString(e,"text/xml")}catch(r){n=t}return(!n||n.getElementsByTagName("parsererror").length)&&ot.error("Invalid XML: "+e),n},noop:function(){},globalEval:function(e){var t,n=eval;e=ot.trim(e),e&&(1===e.indexOf("use strict")?(t=z.createElement("script"),t.text=e,z.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(ut,"ms-").replace(dt,pt)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,i){var r,o=0,a=e.length,s=n(e);if(i){if(s)for(;a>o&&(r=t.apply(e[o],i),r!==!1);o++);else for(o in e)if(r=t.apply(e[o],i),r===!1)break}else if(s)for(;a>o&&(r=t.call(e[o],o,e[o]),r!==!1);o++);else for(o in e)if(r=t.call(e[o],o,e[o]),r===!1)break;return e},trim:function(e){return null==e?"":rt.call(e)},makeArray:function(e,t){var i=t||[];return null!=e&&(n(Object(e))?ot.merge(i,"string"==typeof e?[e]:e):Z.call(i,e)),i},inArray:function(e,t,n){return null==t?-1:tt.call(t,e,n)},merge:function(e,n){var i=n.length,r=e.length,o=0;if("number"==typeof i)for(;i>o;o++)e[r++]=n[o];else for(;n[o]!==t;)e[r++]=n[o++];return e.length=r,e},grep:function(e,t,n){var i,r=[],o=0,a=e.length;for(n=!!n;a>o;o++)i=!!t(e[o],o),n!==i&&r.push(e[o]);return r},map:function(e,t,i){var r,o=0,a=e.length,s=n(e),l=[];if(s)for(;a>o;o++)r=t(e[o],o,i),null!=r&&(l[l.length]=r);else for(o in e)r=t(e[o],o,i),null!=r&&(l[l.length]=r);return Y.apply([],l)},guid:1,proxy:function(e,n){var i,r,o;return"string"==typeof n&&(i=e[n],n=e,e=i),ot.isFunction(e)?(r=et.call(arguments,2),o=function(){return e.apply(n||this,r.concat(et.call(arguments)))},o.guid=e.guid=e.guid||ot.guid++,o):t},access:function(e,n,i,r,o,a,s){var l=0,c=e.length,u=null==i;if("object"===ot.type(i)){o=!0;for(l in i)ot.access(e,n,l,i[l],!0,a,s)}else if(r!==t&&(o=!0,ot.isFunction(r)||(s=!0),u&&(s?(n.call(e,r),n=null):(u=n,n=function(e,t,n){return u.call(ot(e),n)})),n))for(;c>l;l++)n(e[l],i,s?r:r.call(e[l],l,n(e[l],i)));return o?e:u?n.call(e):c?n(e[0],i):a},now:Date.now,swap:function(e,t,n,i){var r,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];r=n.apply(e,i||[]);for(o in t)e.style[o]=a[o];return r}}),ot.ready.promise=function(t){return q||(q=ot.Deferred(),"complete"===z.readyState?setTimeout(ot.ready):(z.addEventListener("DOMContentLoaded",ft,!1),e.addEventListener("load",ft,!1))),q.promise(t)},ot.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){X["[object "+t+"]"]=t.toLowerCase()}),G=ot(z),function(e,t){function n(e,t,n,i){var r,o,a,s,l,c,u,d,h,m;if((t?t.ownerDocument||t:$)!==M&&L(t),t=t||M,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(R&&!i){if(r=yt.exec(e))if(a=r[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&B(t,o)&&o.id===a)return n.push(o),n}else{if(r[2])return et.apply(n,t.getElementsByTagName(e)),n;if((a=r[3])&&C.getElementsByClassName&&t.getElementsByClassName)return et.apply(n,t.getElementsByClassName(a)),n}if(C.qsa&&(!P||!P.test(e))){if(d=u=j,h=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=p(e),(u=t.getAttribute("id"))?d=u.replace(St,"\\$&"):t.setAttribute("id",d),d="[id='"+d+"'] ",l=c.length;l--;)c[l]=d+f(c[l]);h=ft.test(e)&&t.parentNode||t,m=c.join(",")}if(m)try{return et.apply(n,h.querySelectorAll(m)),n}catch(g){}finally{u||t.removeAttribute("id")}}}return w(e.replace(ut,"$1"),t,n,i)}function i(){function e(n,i){return t.push(n+=" ")>E.cacheLength&&delete e[t.shift()],e[n]=i}var t=[];return e}function r(e){return e[j]=!0,e}function o(e){var t=M.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var n=e.split("|"),i=e.length;i--;)E.attrHandle[n[i]]=t}function s(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function l(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function c(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return r(function(t){return t=+t,r(function(n,i){for(var r,o=e([],n.length,t),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function d(){}function p(e,t){var i,r,o,a,s,l,c,u=U[e+" "];if(u)return t?0:u.slice(0);for(s=e,l=[],c=E.preFilter;s;){(!i||(r=dt.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(o=[])),i=!1,(r=pt.exec(s))&&(i=r.shift(),o.push({value:i,type:r[0].replace(ut," ")}),s=s.slice(i.length));for(a in E.filter)!(r=vt[a].exec(s))||c[a]&&!(r=c[a](r))||(i=r.shift(),o.push({value:i,type:a,matches:r}),s=s.slice(i.length));if(!i)break}return t?s.length:s?n.error(e):U(e,l).slice(0)}function f(e){for(var t=0,n=e.length,i="";n>t;t++)i+=e[t].value;return i}function h(e,t,n){var i=t.dir,r=n&&"parentNode"===i,o=q++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||r)return e(t,n,o)}:function(t,n,a){var s,l,c,u=G+" "+o;if(a){for(;t=t[i];)if((1===t.nodeType||r)&&e(t,n,a))return!0}else for(;t=t[i];)if(1===t.nodeType||r)if(c=t[j]||(t[j]={}),(l=c[i])&&l[0]===u){if((s=l[1])===!0||s===T)return s===!0}else if(l=c[i]=[u],l[1]=e(t,n,a)||T,l[1]===!0)return!0}}function m(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function g(e,t,n,i,r){for(var o,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(o=e[s])&&(!n||n(o,i,r))&&(a.push(o),c&&t.push(s));return a}function v(e,t,n,i,o,a){return i&&!i[j]&&(i=v(i)),o&&!o[j]&&(o=v(o,a)),r(function(r,a,s,l){var c,u,d,p=[],f=[],h=a.length,m=r||x(t||"*",s.nodeType?[s]:s,[]),v=!e||!r&&t?m:g(m,p,e,s,l),b=n?o||(r?e:h||i)?[]:a:v;if(n&&n(v,b,s,l),i)for(c=g(b,f),i(c,[],s,l),u=c.length;u--;)(d=c[u])&&(b[f[u]]=!(v[f[u]]=d));if(r){if(o||e){if(o){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(v[u]=d);o(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=o?nt.call(r,d):p[u])>-1&&(r[c]=!(a[c]=d))}}else b=g(b===a?b.splice(h,b.length):b),o?o(null,a,b,l):et.apply(a,b)})}function b(e){for(var t,n,i,r=e.length,o=E.relative[e[0].type],a=o||E.relative[" "],s=o?1:0,l=h(function(e){return e===t},a,!0),c=h(function(e){return nt.call(t,e)>-1},a,!0),u=[function(e,n,i){return!o&&(i||n!==D)||((t=n).nodeType?l(e,n,i):c(e,n,i))}];r>s;s++)if(n=E.relative[e[s].type])u=[h(m(u),n)];else{if(n=E.filter[e[s].type].apply(null,e[s].matches),n[j]){for(i=++s;r>i&&!E.relative[e[i].type];i++);return v(s>1&&m(u),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ut,"$1"),n,i>s&&b(e.slice(s,i)),r>i&&b(e=e.slice(i)),r>i&&f(e))}u.push(n)}return m(u)}function y(e,t){var i=0,o=t.length>0,a=e.length>0,s=function(r,s,l,c,u){var d,p,f,h=[],m=0,v="0",b=r&&[],y=null!=u,x=D,w=r||a&&E.find.TAG("*",u&&s.parentNode||s),S=G+=null==x?1:Math.random()||.1;for(y&&(D=s!==M&&s,T=i);null!=(d=w[v]);v++){if(a&&d){for(p=0;f=e[p++];)if(f(d,s,l)){c.push(d);break}y&&(G=S,T=++i)}o&&((d=!f&&d)&&m--,r&&b.push(d))}if(m+=v,o&&v!==m){for(p=0;f=t[p++];)f(b,h,s,l);if(r){if(m>0)for(;v--;)b[v]||h[v]||(h[v]=Y.call(c));h=g(h)}et.apply(c,h),y&&!r&&h.length>0&&m+t.length>1&&n.uniqueSort(c)}return y&&(G=S,D=x),b};return o?r(s):s}function x(e,t,i){for(var r=0,o=t.length;o>r;r++)n(e,t[r],i);return i}function w(e,t,n,i){var r,o,a,s,l,c=p(e);if(!i&&1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&C.getById&&9===t.nodeType&&R&&E.relative[o[1].type]){if(t=(E.find.ID(a.matches[0].replace(Ct,Tt),t)||[])[0],!t)return n;e=e.slice(o.shift().value.length)}for(r=vt.needsContext.test(e)?0:o.length;r--&&(a=o[r],!E.relative[s=a.type]);)if((l=E.find[s])&&(i=l(a.matches[0].replace(Ct,Tt),ft.test(o[0].type)&&t.parentNode||t))){if(o.splice(r,1),e=i.length&&f(o),!e)return et.apply(n,i),n;break}}return I(e,c)(i,t,!R,n,ft.test(e)),n}var S,C,T,E,k,_,I,D,N,L,M,A,R,P,F,O,B,j="sizzle"+-new Date,$=e.document,G=0,q=0,H=i(),U=i(),z=i(),V=!1,W=function(e,t){return e===t?(V=!0,0):0},Q=typeof t,X=1<<31,K={}.hasOwnProperty,J=[],Y=J.pop,Z=J.push,et=J.push,tt=J.slice,nt=J.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},it="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",rt="[\\x20\\t\\r\\n\\f]",at="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",st=at.replace("w","w#"),lt="\\["+rt+"*("+at+")"+rt+"*(?:([*^$|!~]?=)"+rt+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+st+")|)|)"+rt+"*\\]",ct=":("+at+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+lt.replace(3,8)+")*)|.*)\\)|)",ut=new RegExp("^"+rt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+rt+"+$","g"),dt=new RegExp("^"+rt+"*,"+rt+"*"),pt=new RegExp("^"+rt+"*([>+~]|"+rt+")"+rt+"*"),ft=new RegExp(rt+"*[+~]"),ht=new RegExp("="+rt+"*([^\\]'\"]*)"+rt+"*\\]","g"),mt=new RegExp(ct),gt=new RegExp("^"+st+"$"),vt={ID:new RegExp("^#("+at+")"),CLASS:new RegExp("^\\.("+at+")"),TAG:new RegExp("^("+at.replace("w","w*")+")"),ATTR:new RegExp("^"+lt),PSEUDO:new RegExp("^"+ct),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+rt+"*(even|odd|(([+-]|)(\\d*)n|)"+rt+"*(?:([+-]|)"+rt+"*(\\d+)|))"+rt+"*\\)|)","i"),bool:new RegExp("^(?:"+it+")$","i"),needsContext:new RegExp("^"+rt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+rt+"*((?:-\\d)?\\d*)"+rt+"*\\)|)(?=[^-]|$)","i")},bt=/^[^{]+\{\s*\[native \w/,yt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,xt=/^(?:input|select|textarea|button)$/i,wt=/^h\d$/i,St=/'|\\/g,Ct=new RegExp("\\\\([\\da-f]{1,6}"+rt+"?|("+rt+")|.)","ig"),Tt=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(55296|i>>10,56320|1023&i)};try{et.apply(J=tt.call($.childNodes),$.childNodes),J[$.childNodes.length].nodeType}catch(Et){et={apply:J.length?function(e,t){Z.apply(e,tt.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}_=n.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},C=n.support={},L=n.setDocument=function(e){var t=e?e.ownerDocument||e:$,n=t.defaultView;return t!==M&&9===t.nodeType&&t.documentElement?(M=t,A=t.documentElement,R=!_(t),n&&n.attachEvent&&n!==n.top&&n.attachEvent("onbeforeunload",function(){L()}),C.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),C.getElementsByTagName=o(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),C.getElementsByClassName=o(function(e){return e.innerHTML="",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),C.getById=o(function(e){return A.appendChild(e).id=j,!t.getElementsByName||!t.getElementsByName(j).length}),C.getById?(E.find.ID=function(e,t){if(typeof t.getElementById!==Q&&R){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},E.filter.ID=function(e){var t=e.replace(Ct,Tt);return function(e){return e.getAttribute("id")===t}}):(delete E.find.ID,E.filter.ID=function(e){var t=e.replace(Ct,Tt);return function(e){var n=typeof e.getAttributeNode!==Q&&e.getAttributeNode("id");return n&&n.value===t}}),E.find.TAG=C.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==Q?t.getElementsByTagName(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},E.find.CLASS=C.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==Q&&R?t.getElementsByClassName(e):void 0},F=[],P=[],(C.qsa=bt.test(t.querySelectorAll))&&(o(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||P.push("\\["+rt+"*(?:value|"+it+")"),e.querySelectorAll(":checked").length||P.push(":checked")}),o(function(e){var n=t.createElement("input");n.setAttribute("type","hidden"),e.appendChild(n).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&P.push("[*^$]="+rt+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(C.matchesSelector=bt.test(O=A.webkitMatchesSelector||A.mozMatchesSelector||A.oMatchesSelector||A.msMatchesSelector))&&o(function(e){C.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),F.push("!=",ct)}),P=P.length&&new RegExp(P.join("|")),F=F.length&&new RegExp(F.join("|")),B=bt.test(A.contains)||A.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},W=A.compareDocumentPosition?function(e,n){if(e===n)return V=!0,0;var i=n.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(n);return i?1&i||!C.sortDetached&&n.compareDocumentPosition(e)===i?e===t||B($,e)?-1:n===t||B($,n)?1:N?nt.call(N,e)-nt.call(N,n):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,n){var i,r=0,o=e.parentNode,a=n.parentNode,l=[e],c=[n];if(e===n)return V=!0,0;if(!o||!a)return e===t?-1:n===t?1:o?-1:a?1:N?nt.call(N,e)-nt.call(N,n):0;if(o===a)return s(e,n);for(i=e;i=i.parentNode;)l.unshift(i);for(i=n;i=i.parentNode;)c.unshift(i);for(;l[r]===c[r];)r++;return r?s(l[r],c[r]):l[r]===$?-1:c[r]===$?1:0},t):M},n.matches=function(e,t){return n(e,null,null,t)},n.matchesSelector=function(e,t){if((e.ownerDocument||e)!==M&&L(e),t=t.replace(ht,"='$1']"),!(!C.matchesSelector||!R||F&&F.test(t)||P&&P.test(t)))try{var i=O.call(e,t);if(i||C.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(r){}return n(t,M,null,[e]).length>0},n.contains=function(e,t){return(e.ownerDocument||e)!==M&&L(e),B(e,t)},n.attr=function(e,n){(e.ownerDocument||e)!==M&&L(e);var i=E.attrHandle[n.toLowerCase()],r=i&&K.call(E.attrHandle,n.toLowerCase())?i(e,n,!R):t;return r===t?C.attributes||!R?e.getAttribute(n):(r=e.getAttributeNode(n))&&r.specified?r.value:null:r},n.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},n.uniqueSort=function(e){var t,n=[],i=0,r=0;if(V=!C.detectDuplicates,N=!C.sortStable&&e.slice(0),e.sort(W),V){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return e},k=n.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=k(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i];i++)n+=k(t);return n},E=n.selectors={cacheLength:50,createPseudo:r,match:vt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Ct,Tt),e[3]=(e[4]||e[5]||"").replace(Ct,Tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||n.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&n.error(e[0]),e},PSEUDO:function(e){var n,i=!e[5]&&e[2];return vt.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:i&&mt.test(i)&&(n=p(i,!0))&&(n=i.indexOf(")",i.length-n)-i.length)&&(e[0]=e[0].slice(0,n),e[2]=i.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Ct,Tt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=H[e+" "];return t||(t=new RegExp("(^|"+rt+")"+e+"("+rt+"|$)"))&&H(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Q&&e.getAttribute("class")||"")})},ATTR:function(e,t,i){return function(r){var o=n.attr(r,e);return null==o?"!="===t:t?(o+="","="===t?o===i:"!="===t?o!==i:"^="===t?i&&0===o.indexOf(i):"*="===t?i&&o.indexOf(i)>-1:"$="===t?i&&o.slice(-i.length)===i:"~="===t?(" "+o+" ").indexOf(i)>-1:"|="===t?o===i||o.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,p,f,h,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),b=!l&&!s;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?g.firstChild:g.lastChild],a&&b){for(u=g[j]||(g[j]={}),c=u[e]||[],f=c[0]===G&&c[1],p=c[0]===G&&c[2],d=f&&g.childNodes[f];d=++f&&d&&d[m]||(p=f=0)||h.pop();)if(1===d.nodeType&&++p&&d===t){u[e]=[G,f,p];break}}else if(b&&(c=(t[j]||(t[j]={}))[e])&&c[0]===G)p=c[1];else for(;(d=++f&&d&&d[m]||(p=f=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++p||(b&&((d[j]||(d[j]={}))[e]=[G,p]),d!==t)););return p-=r,p===i||0===p%i&&p/i>=0}}},PSEUDO:function(e,t){var i,o=E.pseudos[e]||E.setFilters[e.toLowerCase()]||n.error("unsupported pseudo: "+e);return o[j]?o(t):o.length>1?(i=[e,e,"",t],E.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,n){for(var i,r=o(e,t),a=r.length;a--;)i=nt.call(e,r[a]),e[i]=!(n[i]=r[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=I(e.replace(ut,"$1"));return i[j]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(e){return function(t){return n(e,t).length>0}}),contains:r(function(e){return function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:r(function(e){return gt.test(e||"")||n.error("unsupported lang: "+e),e=e.replace(Ct,Tt).toLowerCase(),function(t){var n;do if(n=R?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===A},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!E.pseudos.empty(e)},header:function(e){return wt.test(e.nodeName)},input:function(e){return xt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:u(function(){return[0]}),last:u(function(e,t){return[t-1] -}),eq:u(function(e,t,n){return[0>n?n+t:n]}),even:u(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:u(function(e,t,n){for(var i=0>n?n+t:n;++i l;l++)if(c[l].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}o=!1,c&&(u?u.length&&d(u.shift()):n?c=[]:p.disable())},p={add:function(){if(c){var t=c.length;!function i(t){ot.each(t,function(t,n){var r=ot.type(n);"function"===r?e.unique&&p.has(n)||c.push(n):n&&n.length&&"string"!==r&&i(n)})}(arguments),o?s=c.length:n&&(a=t,d(n))}return this},remove:function(){return c&&ot.each(arguments,function(e,t){for(var n;(n=ot.inArray(t,c,n))>-1;)c.splice(n,1),o&&(s>=n&&s--,l>=n&&l--)}),this},has:function(e){return e?ot.inArray(e,c)>-1:!(!c||!c.length)},empty:function(){return c=[],s=0,this},disable:function(){return c=u=n=t,this},disabled:function(){return!c},lock:function(){return u=t,n||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!c||r&&!u||(t=t||[],t=[e,t.slice?t.slice():t],o?u.push(t):d(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!r}};return p},ot.extend({Deferred:function(e){var t=[["resolve","done",ot.Callbacks("once memory"),"resolved"],["reject","fail",ot.Callbacks("once memory"),"rejected"],["notify","progress",ot.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ot.Deferred(function(n){ot.each(t,function(t,o){var a=o[0],s=ot.isFunction(e[t])&&e[t];r[o[1]](function(){var e=s&&s.apply(this,arguments);e&&ot.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===i?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ot.extend(e,i):i}},r={};return i.pipe=i.then,ot.each(t,function(e,o){var a=o[2],s=o[3];i[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=a.fireWith}),i.promise(r),e&&e.call(r,r),r},when:function(e){var t,n,i,r=0,o=et.call(arguments),a=o.length,s=1!==a||e&&ot.isFunction(e.promise)?a:0,l=1===s?e:ot.Deferred(),c=function(e,n,i){return function(r){n[e]=this,i[e]=arguments.length>1?et.call(arguments):r,i===t?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(a>1)for(t=new Array(a),n=new Array(a),i=new Array(a);a>r;r++)o[r]&&ot.isFunction(o[r].promise)?o[r].promise().done(c(r,i,o)).fail(l.reject).progress(c(r,n,t)):--s;return s||l.resolveWith(i,o),l.promise()}}),ot.support=function(t){var n=z.createElement("input"),i=z.createDocumentFragment(),r=z.createElement("div"),o=z.createElement("select"),a=o.appendChild(z.createElement("option"));return n.type?(n.type="checkbox",t.checkOn=""!==n.value,t.optSelected=a.selected,t.reliableMarginRight=!0,t.boxSizingReliable=!0,t.pixelPosition=!1,n.checked=!0,t.noCloneChecked=n.cloneNode(!0).checked,o.disabled=!0,t.optDisabled=!a.disabled,n=z.createElement("input"),n.value="t",n.type="radio",t.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),i.appendChild(n),t.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,t.focusinBubbles="onfocusin"in e,r.style.backgroundClip="content-box",r.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===r.style.backgroundClip,ot(function(){var n,i,o="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",a=z.getElementsByTagName("body")[0];a&&(n=z.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(r),r.innerHTML="",r.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",ot.swap(a,null!=a.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===r.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(r,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(r,null)||{width:"4px"}).width,i=r.appendChild(z.createElement("div")),i.style.cssText=r.style.cssText=o,i.style.marginRight=i.style.width="0",r.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(i,null)||{}).marginRight)),a.removeChild(n))}),t):t}({});var mt,gt,vt=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,bt=/([A-Z])/g;r.uid=1,r.accepts=function(e){return e.nodeType?1===e.nodeType||9===e.nodeType:!0},r.prototype={key:function(e){if(!r.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=r.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(i){t[this.expando]=n,ot.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var i,r=this.key(e),o=this.cache[r];if("string"==typeof t)o[t]=n;else if(ot.isEmptyObject(o))ot.extend(this.cache[r],t);else for(i in t)o[i]=t[i];return o},get:function(e,n){var i=this.cache[this.key(e)];return n===t?i:i[n]},access:function(e,n,i){var r;return n===t||n&&"string"==typeof n&&i===t?(r=this.get(e,n),r!==t?r:this.get(e,ot.camelCase(n))):(this.set(e,n,i),i!==t?i:n)},remove:function(e,n){var i,r,o,a=this.key(e),s=this.cache[a];if(n===t)this.cache[a]={};else{ot.isArray(n)?r=n.concat(n.map(ot.camelCase)):(o=ot.camelCase(n),n in s?r=[n,o]:(r=o,r=r in s?[r]:r.match(st)||[])),i=r.length;for(;i--;)delete s[r[i]]}},hasData:function(e){return!ot.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}},mt=new r,gt=new r,ot.extend({acceptData:r.accepts,hasData:function(e){return mt.hasData(e)||gt.hasData(e)},data:function(e,t,n){return mt.access(e,t,n)},removeData:function(e,t){mt.remove(e,t)},_data:function(e,t,n){return gt.access(e,t,n)},_removeData:function(e,t){gt.remove(e,t)}}),ot.fn.extend({data:function(e,n){var i,r,a=this[0],s=0,l=null;if(e===t){if(this.length&&(l=mt.get(a),1===a.nodeType&&!gt.get(a,"hasDataAttrs"))){for(i=a.attributes;s 1,null,!0)},removeData:function(e){return this.each(function(){mt.remove(this,e)})}}),ot.extend({queue:function(e,t,n){var i;return e?(t=(t||"fx")+"queue",i=gt.get(e,t),n&&(!i||ot.isArray(n)?i=gt.access(e,t,ot.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=ot.queue(e,t),i=n.length,r=n.shift(),o=ot._queueHooks(e,t),a=function(){ot.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return gt.get(e,n)||gt.access(e,n,{empty:ot.Callbacks("once memory").add(function(){gt.remove(e,[t+"queue",n])})})}}),ot.fn.extend({queue:function(e,n){var i=2;return"string"!=typeof e&&(n=e,e="fx",i--),arguments.length1)},removeAttr:function(e){return this.each(function(){ot.removeAttr(this,e)})},prop:function(e,t){return ot.access(this,ot.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[ot.propFix[e]||e]})},addClass:function(e){var t,n,i,r,o,a=0,s=this.length,l="string"==typeof e&&e;if(ot.isFunction(e))return this.each(function(t){ot(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(st)||[];s>a;a++)if(n=this[a],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(wt," "):" ")){for(o=0;r=t[o++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");n.className=ot.trim(i)}return this},removeClass:function(e){var t,n,i,r,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(ot.isFunction(e))return this.each(function(t){ot(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(st)||[];s>a;a++)if(n=this[a],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(wt," "):"")){for(o=0;r=t[o++];)for(;i.indexOf(" "+r+" ")>=0;)i=i.replace(" "+r+" "," ");n.className=e?ot.trim(i):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):ot.isFunction(e)?this.each(function(n){ot(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,i=0,r=ot(this),o=e.match(st)||[];t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else(n===H||"boolean"===n)&&(this.className&>.set(this,"__className__",this.className),this.className=this.className||e===!1?"":gt.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(wt," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,i,r,o=this[0];{if(arguments.length)return r=ot.isFunction(e),this.each(function(i){var o;1===this.nodeType&&(o=r?e.call(this,i,ot(this).val()):e,null==o?o="":"number"==typeof o?o+="":ot.isArray(o)&&(o=ot.map(o,function(e){return null==e?"":e+""})),n=ot.valHooks[this.type]||ot.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,o,"value")!==t||(this.value=o))});if(o)return n=ot.valHooks[o.type]||ot.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(i=n.get(o,"value"))!==t?i:(i=o.value,"string"==typeof i?i.replace(St,""):null==i?"":i)}}}),ot.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,o="select-one"===e.type||0>r,a=o?null:[],s=o?r+1:i.length,l=0>r?s:o?r:0;s>l;l++)if(n=i[l],!(!n.selected&&l!==r||(ot.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&ot.nodeName(n.parentNode,"optgroup"))){if(t=ot(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,i,r=e.options,o=ot.makeArray(t),a=r.length;a--;)i=r[a],(i.selected=ot.inArray(ot(i).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,i){var r,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return typeof e.getAttribute===H?ot.prop(e,n,i):(1===a&&ot.isXMLDoc(e)||(n=n.toLowerCase(),r=ot.attrHooks[n]||(ot.expr.match.bool.test(n)?xt:yt)),i===t?r&&"get"in r&&null!==(o=r.get(e,n))?o:(o=ot.find.attr(e,n),null==o?t:o):null!==i?r&&"set"in r&&(o=r.set(e,i,n))!==t?o:(e.setAttribute(n,i+""),i):(ot.removeAttr(e,n),void 0))},removeAttr:function(e,t){var n,i,r=0,o=t&&t.match(st);if(o&&1===e.nodeType)for(;n=o[r++];)i=ot.propFix[n]||n,ot.expr.match.bool.test(n)&&(e[i]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!ot.support.radioValue&&"radio"===t&&ot.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,i){var r,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!ot.isXMLDoc(e),a&&(n=ot.propFix[n]||n,o=ot.propHooks[n]),i!==t?o&&"set"in o&&(r=o.set(e,i,n))!==t?r:e[n]=i:o&&"get"in o&&null!==(r=o.get(e,n))?r:e[n]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||Ct.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),xt={set:function(e,t,n){return t===!1?ot.removeAttr(e,n):e.setAttribute(n,n),n}},ot.each(ot.expr.match.bool.source.match(/\w+/g),function(e,n){var i=ot.expr.attrHandle[n]||ot.find.attr;ot.expr.attrHandle[n]=function(e,n,r){var o=ot.expr.attrHandle[n],a=r?t:(ot.expr.attrHandle[n]=t)!=i(e,n,r)?n.toLowerCase():null;return ot.expr.attrHandle[n]=o,a}}),ot.support.optSelected||(ot.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),ot.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ot.propFix[this.toLowerCase()]=this}),ot.each(["radio","checkbox"],function(){ot.valHooks[this]={set:function(e,t){return ot.isArray(t)?e.checked=ot.inArray(ot(e).val(),t)>=0:void 0}},ot.support.checkOn||(ot.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Tt=/^key/,Et=/^(?:mouse|contextmenu)|click/,kt=/^(?:focusinfocus|focusoutblur)$/,_t=/^([^.]*)(?:\.(.+)|)$/;ot.event={global:{},add:function(e,n,i,r,o){var a,s,l,c,u,d,p,f,h,m,g,v=gt.get(e);if(v){for(i.handler&&(a=i,i=a.handler,o=a.selector),i.guid||(i.guid=ot.guid++),(c=v.events)||(c=v.events={}),(s=v.handle)||(s=v.handle=function(e){return typeof ot===H||e&&ot.event.triggered===e.type?t:ot.event.dispatch.apply(s.elem,arguments)},s.elem=e),n=(n||"").match(st)||[""],u=n.length;u--;)l=_t.exec(n[u])||[],h=g=l[1],m=(l[2]||"").split(".").sort(),h&&(p=ot.event.special[h]||{},h=(o?p.delegateType:p.bindType)||h,p=ot.event.special[h]||{},d=ot.extend({type:h,origType:g,data:r,handler:i,guid:i.guid,selector:o,needsContext:o&&ot.expr.match.needsContext.test(o),namespace:m.join(".")},a),(f=c[h])||(f=c[h]=[],f.delegateCount=0,p.setup&&p.setup.call(e,r,m,s)!==!1||e.addEventListener&&e.addEventListener(h,s,!1)),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=i.guid)),o?f.splice(f.delegateCount++,0,d):f.push(d),ot.event.global[h]=!0);e=null}},remove:function(e,t,n,i,r){var o,a,s,l,c,u,d,p,f,h,m,g=gt.hasData(e)&>.get(e);if(g&&(l=g.events)){for(t=(t||"").match(st)||[""],c=t.length;c--;)if(s=_t.exec(t[c])||[],f=m=s[1],h=(s[2]||"").split(".").sort(),f){for(d=ot.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,p=l[f]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)u=p[o],!r&&m!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(p.splice(o,1),u.selector&&p.delegateCount--,d.remove&&d.remove.call(e,u));a&&!p.length&&(d.teardown&&d.teardown.call(e,h,g.handle)!==!1||ot.removeEvent(e,f,g.handle),delete l[f])}else for(f in l)ot.event.remove(e,f+t[c],n,i,!0);ot.isEmptyObject(l)&&(delete g.handle,gt.remove(e,"events"))}},trigger:function(n,i,r,o){var a,s,l,c,u,d,p,f=[r||z],h=it.call(n,"type")?n.type:n,m=it.call(n,"namespace")?n.namespace.split("."):[];if(s=l=r=r||z,3!==r.nodeType&&8!==r.nodeType&&!kt.test(h+ot.event.triggered)&&(h.indexOf(".")>=0&&(m=h.split("."),h=m.shift(),m.sort()),u=h.indexOf(":")<0&&"on"+h,n=n[ot.expando]?n:new ot.Event(h,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=r),i=null==i?[n]:ot.makeArray(i,[n]),p=ot.event.special[h]||{},o||!p.trigger||p.trigger.apply(r,i)!==!1)){if(!o&&!p.noBubble&&!ot.isWindow(r)){for(c=p.delegateType||h,kt.test(c+h)||(s=s.parentNode);s;s=s.parentNode)f.push(s),l=s;l===(r.ownerDocument||z)&&f.push(l.defaultView||l.parentWindow||e)}for(a=0;(s=f[a++])&&!n.isPropagationStopped();)n.type=a>1?c:p.bindType||h,d=(gt.get(s,"events")||{})[n.type]&>.get(s,"handle"),d&&d.apply(s,i),d=u&&s[u],d&&ot.acceptData(s)&&d.apply&&d.apply(s,i)===!1&&n.preventDefault();return n.type=h,o||n.isDefaultPrevented()||p._default&&p._default.apply(f.pop(),i)!==!1||!ot.acceptData(r)||u&&ot.isFunction(r[h])&&!ot.isWindow(r)&&(l=r[u],l&&(r[u]=null),ot.event.triggered=h,r[h](),ot.event.triggered=t,l&&(r[u]=l)),n.result}},dispatch:function(e){e=ot.event.fix(e);var n,i,r,o,a,s=[],l=et.call(arguments),c=(gt.get(this,"events")||{})[e.type]||[],u=ot.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(s=ot.event.handlers.call(this,e,c),n=0;(o=s[n++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,i=0;(a=o.handlers[i++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(a.namespace))&&(e.handleObj=a,e.data=a.data,r=((ot.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,n){var i,r,o,a,s=[],l=n.delegateCount,c=e.target;if(l&&c.nodeType&&(!e.button||"click"!==e.type))for(;c!==this;c=c.parentNode||this)if(c.disabled!==!0||"click"!==e.type){for(r=[],i=0;l>i;i++)a=n[i],o=a.selector+" ",r[o]===t&&(r[o]=a.needsContext?ot(o,this).index(c)>=0:ot.find(o,this,null,[c]).length),r[o]&&r.push(a);r.length&&s.push({elem:c,handlers:r})}return l t;t++)if(ot.contains(i[t],this))return!0}));for(t=0;r>t;t++)ot.find(e,i[t],n);return n=this.pushStack(r>1?ot.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t=ot(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(ot.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(u(this,e||[],!0))},filter:function(e){return this.pushStack(u(this,e||[],!1))},is:function(e){return!!u(this,"string"==typeof e&&Nt.test(e)?ot(e):e||[],!1).length},closest:function(e,t){for(var n,i=0,r=this.length,o=[],a=Nt.test(e)||"string"!=typeof e?ot(e,t||this.context):0;r>i;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&ot.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?ot.unique(o):o)},index:function(e){return e?"string"==typeof e?tt.call(ot(e),this[0]):tt.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?ot(e,t):ot.makeArray(e&&e.nodeType?[e]:e),i=ot.merge(this.get(),n);return this.pushStack(ot.unique(i))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ot.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ot.dir(e,"parentNode")},parentsUntil:function(e,t,n){return ot.dir(e,"parentNode",n)},next:function(e){return c(e,"nextSibling")},prev:function(e){return c(e,"previousSibling")},nextAll:function(e){return ot.dir(e,"nextSibling")},prevAll:function(e){return ot.dir(e,"previousSibling")},nextUntil:function(e,t,n){return ot.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return ot.dir(e,"previousSibling",n)},siblings:function(e){return ot.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return ot.sibling(e.firstChild)},contents:function(e){return e.contentDocument||ot.merge([],e.childNodes)}},function(e,t){ot.fn[e]=function(n,i){var r=ot.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=ot.filter(i,r)),this.length>1&&(Lt[e]||ot.unique(r),Dt.test(e)&&r.reverse()),this.pushStack(r)}}),ot.extend({filter:function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?ot.find.matchesSelector(i,e)?[i]:[]:ot.find.matches(e,ot.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,i){for(var r=[],o=i!==t;(e=e[n])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&ot(e).is(i))break;r.push(e)}return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var Mt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,At=/<([\w:]+)/,Rt=/<|?\w+;/,Pt=/<(?:script|style|link)/i,Ft=/^(?:checkbox|radio)$/i,Ot=/checked\s*(?:[^=]|=\s*.checked.)/i,Bt=/^$|\/(?:java|ecma)script/i,jt=/^true\/(.*)/,$t=/^\s*\s*$/g,Gt={option:[1,""],thead:[1," ","
"],col:[2,""],tr:[2,"
"," ","
"],td:[3,""],_default:[0,"",""]};Gt.optgroup=Gt.option,Gt.tbody=Gt.tfoot=Gt.colgroup=Gt.caption=Gt.thead,Gt.th=Gt.td,ot.fn.extend({text:function(e){return ot.access(this,function(e){return e===t?ot.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=d(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=d(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,i=e?ot.filter(e,this):this,r=0;null!=(n=i[r]);r++)t||1!==n.nodeType||ot.cleanData(g(n)),n.parentNode&&(t&&ot.contains(n.ownerDocument,n)&&h(g(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ot.cleanData(g(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return ot.clone(this,e,t)})},html:function(e){return ot.access(this,function(e){var n=this[0]||{},i=0,r=this.length;if(e===t&&1===n.nodeType)return n.innerHTML;if("string"==typeof e&&!Pt.test(e)&&!Gt[(At.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Mt,"<$1>$2>");try{for(;r>i;i++)n=this[i]||{},1===n.nodeType&&(ot.cleanData(g(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=ot.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var i=e[t++],r=e[t++];r&&(i&&i.parentNode!==r&&(i=this.nextSibling),ot(this).remove(),r.insertBefore(n,i))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=Y.apply([],e);var i,r,o,a,s,l,c=0,u=this.length,d=this,h=u-1,m=e[0],v=ot.isFunction(m);if(v||!(1>=u||"string"!=typeof m||ot.support.checkClone)&&Ot.test(m))return this.each(function(i){var r=d.eq(i);v&&(e[0]=m.call(this,i,r.html())),r.domManip(e,t,n)});if(u&&(i=ot.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=i.firstChild,1===i.childNodes.length&&(i=r),r)){for(o=ot.map(g(i,"script"),p),a=o.length;u>c;c++)s=i,c!==h&&(s=ot.clone(s,!0,!0),a&&ot.merge(o,g(s,"script"))),t.call(this[c],s,c);if(a)for(l=o[o.length-1].ownerDocument,ot.map(o,f),c=0;a>c;c++)s=o[c],Bt.test(s.type||"")&&!gt.access(s,"globalEval")&&ot.contains(l,s)&&(s.src?ot._evalUrl(s.src):ot.globalEval(s.textContent.replace($t,"")))}return this}}),ot.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){ot.fn[e]=function(e){for(var n,i=[],r=ot(e),o=r.length-1,a=0;o>=a;a++)n=a===o?this:this.clone(!0),ot(r[a])[t](n),Z.apply(i,n.get());return this.pushStack(i)}}),ot.extend({clone:function(e,t,n){var i,r,o,a,s=e.cloneNode(!0),l=ot.contains(e.ownerDocument,e);if(!(ot.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ot.isXMLDoc(e)))for(a=g(s),o=g(e),i=0,r=o.length;r>i;i++)v(o[i],a[i]);if(t)if(n)for(o=o||g(e),a=a||g(s),i=0,r=o.length;r>i;i++)m(o[i],a[i]);else m(e,s);return a=g(s,"script"),a.length>0&&h(a,!l&&g(e,"script")),s},buildFragment:function(e,t,n,i){for(var r,o,a,s,l,c,u=0,d=e.length,p=t.createDocumentFragment(),f=[];d>u;u++)if(r=e[u],r||0===r)if("object"===ot.type(r))ot.merge(f,r.nodeType?[r]:r);else if(Rt.test(r)){for(o=o||p.appendChild(t.createElement("div")),a=(At.exec(r)||["",""])[1].toLowerCase(),s=Gt[a]||Gt._default,o.innerHTML=s[1]+r.replace(Mt,"<$1>$2>")+s[2],c=s[0];c--;)o=o.lastChild;ot.merge(f,o.childNodes),o=p.firstChild,o.textContent=""}else f.push(t.createTextNode(r));for(p.textContent="",u=0;r=f[u++];)if((!i||-1===ot.inArray(r,i))&&(l=ot.contains(r.ownerDocument,r),o=g(p.appendChild(r),"script"),l&&h(o),n))for(c=0;r=o[c++];)Bt.test(r.type||"")&&n.push(r);return p},cleanData:function(e){for(var n,i,o,a,s,l,c=ot.event.special,u=0;(i=e[u])!==t;u++){if(r.accepts(i)&&(s=i[gt.expando],s&&(n=gt.cache[s]))){if(o=Object.keys(n.events||{}),o.length)for(l=0;(a=o[l])!==t;l++)c[a]?ot.event.remove(i,a):ot.removeEvent(i,a,n.handle);gt.cache[s]&&delete gt.cache[s]}delete mt.cache[i[mt.expando]]}},_evalUrl:function(e){return ot.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),ot.fn.extend({wrapAll:function(e){var t;return ot.isFunction(e)?this.each(function(t){ot(this).wrapAll(e.call(this,t))}):(this[0]&&(t=ot(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return ot.isFunction(e)?this.each(function(t){ot(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ot(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ot.isFunction(e);return this.each(function(n){ot(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){ot.nodeName(this,"body")||ot(this).replaceWith(this.childNodes) -}).end()}});var qt,Ht,Ut=/^(none|table(?!-c[ea]).+)/,zt=/^margin/,Vt=new RegExp("^("+at+")(.*)$","i"),Wt=new RegExp("^("+at+")(?!px)[a-z%]+$","i"),Qt=new RegExp("^([+-])=("+at+")","i"),Xt={BODY:"block"},Kt={position:"absolute",visibility:"hidden",display:"block"},Jt={letterSpacing:0,fontWeight:400},Yt=["Top","Right","Bottom","Left"],Zt=["Webkit","O","Moz","ms"];ot.fn.extend({css:function(e,n){return ot.access(this,function(e,n,i){var r,o,a={},s=0;if(ot.isArray(n)){for(r=x(e),o=n.length;o>s;s++)a[n[s]]=ot.css(e,n[s],!1,r);return a}return i!==t?ot.style(e,n,i):ot.css(e,n)},e,n,arguments.length>1)},show:function(){return w(this,!0)},hide:function(){return w(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){y(this)?ot(this).show():ot(this).hide()})}}),ot.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=qt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,n,i,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=ot.camelCase(n),c=e.style;return n=ot.cssProps[l]||(ot.cssProps[l]=b(c,l)),s=ot.cssHooks[n]||ot.cssHooks[l],i===t?s&&"get"in s&&(o=s.get(e,!1,r))!==t?o:c[n]:(a=typeof i,"string"===a&&(o=Qt.exec(i))&&(i=(o[1]+1)*o[2]+parseFloat(ot.css(e,n)),a="number"),null==i||"number"===a&&isNaN(i)||("number"!==a||ot.cssNumber[l]||(i+="px"),ot.support.clearCloneStyle||""!==i||0!==n.indexOf("background")||(c[n]="inherit"),s&&"set"in s&&(i=s.set(e,i,r))===t||(c[n]=i)),void 0)}},css:function(e,n,i,r){var o,a,s,l=ot.camelCase(n);return n=ot.cssProps[l]||(ot.cssProps[l]=b(e.style,l)),s=ot.cssHooks[n]||ot.cssHooks[l],s&&"get"in s&&(o=s.get(e,!0,i)),o===t&&(o=qt(e,n,r)),"normal"===o&&n in Jt&&(o=Jt[n]),""===i||i?(a=parseFloat(o),i===!0||ot.isNumeric(a)?a||0:o):o}}),qt=function(e,n,i){var r,o,a,s=i||x(e),l=s?s.getPropertyValue(n)||s[n]:t,c=e.style;return s&&(""!==l||ot.contains(e.ownerDocument,e)||(l=ot.style(e,n)),Wt.test(l)&&zt.test(n)&&(r=c.width,o=c.minWidth,a=c.maxWidth,c.minWidth=c.maxWidth=c.width=l,l=s.width,c.width=r,c.minWidth=o,c.maxWidth=a)),l},ot.each(["height","width"],function(e,t){ot.cssHooks[t]={get:function(e,n,i){return n?0===e.offsetWidth&&Ut.test(ot.css(e,"display"))?ot.swap(e,Kt,function(){return T(e,t,i)}):T(e,t,i):void 0},set:function(e,n,i){var r=i&&x(e);return S(e,n,i?C(e,t,i,ot.support.boxSizing&&"border-box"===ot.css(e,"boxSizing",!1,r),r):0)}}}),ot(function(){ot.support.reliableMarginRight||(ot.cssHooks.marginRight={get:function(e,t){return t?ot.swap(e,{display:"inline-block"},qt,[e,"marginRight"]):void 0}}),!ot.support.pixelPosition&&ot.fn.position&&ot.each(["top","left"],function(e,t){ot.cssHooks[t]={get:function(e,n){return n?(n=qt(e,t),Wt.test(n)?ot(e).position()[t]+"px":n):void 0}}})}),ot.expr&&ot.expr.filters&&(ot.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},ot.expr.filters.visible=function(e){return!ot.expr.filters.hidden(e)}),ot.each({margin:"",padding:"",border:"Width"},function(e,t){ot.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];4>i;i++)r[e+Yt[i]+t]=o[i]||o[i-2]||o[0];return r}},zt.test(e)||(ot.cssHooks[e+t].set=S)});var en=/%20/g,tn=/\[\]$/,nn=/\r?\n/g,rn=/^(?:submit|button|image|reset|file)$/i,on=/^(?:input|select|textarea|keygen)/i;ot.fn.extend({serialize:function(){return ot.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ot.prop(this,"elements");return e?ot.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ot(this).is(":disabled")&&on.test(this.nodeName)&&!rn.test(e)&&(this.checked||!Ft.test(e))}).map(function(e,t){var n=ot(this).val();return null==n?null:ot.isArray(n)?ot.map(n,function(e){return{name:t.name,value:e.replace(nn,"\r\n")}}):{name:t.name,value:n.replace(nn,"\r\n")}}).get()}}),ot.param=function(e,n){var i,r=[],o=function(e,t){t=ot.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=ot.ajaxSettings&&ot.ajaxSettings.traditional),ot.isArray(e)||e.jquery&&!ot.isPlainObject(e))ot.each(e,function(){o(this.name,this.value)});else for(i in e)_(i,e[i],n,o);return r.join("&").replace(en,"+")},ot.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){ot.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ot.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var an,sn,ln=ot.now(),cn=/\?/,un=/#.*$/,dn=/([?&])_=[^&]*/,pn=/^(.*?):[ \t]*([^\r\n]*)$/gm,fn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,hn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,vn=ot.fn.load,bn={},yn={},xn="*/".concat("*");try{sn=U.href}catch(wn){sn=z.createElement("a"),sn.href="",sn=sn.href}an=gn.exec(sn.toLowerCase())||[],ot.fn.load=function(e,n,i){if("string"!=typeof e&&vn)return vn.apply(this,arguments);var r,o,a,s=this,l=e.indexOf(" ");return l>=0&&(r=e.slice(l),e=e.slice(0,l)),ot.isFunction(n)?(i=n,n=t):n&&"object"==typeof n&&(o="POST"),s.length>0&&ot.ajax({url:e,type:o,dataType:"html",data:n}).done(function(e){a=arguments,s.html(r?ot("
"," ").append(ot.parseHTML(e)).find(r):e)}).complete(i&&function(e,t){s.each(i,a||[e.responseText,t,e])}),this},ot.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ot.fn[t]=function(e){return this.on(t,e)}}),ot.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:sn,type:"GET",isLocal:fn.test(an[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":xn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ot.parseJSON,"text xml":ot.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?N(N(e,ot.ajaxSettings),t):N(ot.ajaxSettings,e)},ajaxPrefilter:I(bn),ajaxTransport:I(yn),ajax:function(e,n){function i(e,n,i,s){var c,d,b,y,w,C=n;2!==x&&(x=2,l&&clearTimeout(l),r=t,a=s||"",S.readyState=e>0?4:0,c=e>=200&&300>e||304===e,i&&(y=L(p,S,i)),y=M(p,y,S,c),c?(p.ifModified&&(w=S.getResponseHeader("Last-Modified"),w&&(ot.lastModified[o]=w),w=S.getResponseHeader("etag"),w&&(ot.etag[o]=w)),204===e||"HEAD"===p.type?C="nocontent":304===e?C="notmodified":(C=y.state,d=y.data,b=y.error,c=!b)):(b=C,(e||!C)&&(C="error",0>e&&(e=0))),S.status=e,S.statusText=(n||C)+"",c?m.resolveWith(f,[d,C,S]):m.rejectWith(f,[S,C,b]),S.statusCode(v),v=t,u&&h.trigger(c?"ajaxSuccess":"ajaxError",[S,p,c?d:b]),g.fireWith(f,[S,C]),u&&(h.trigger("ajaxComplete",[S,p]),--ot.active||ot.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var r,o,a,s,l,c,u,d,p=ot.ajaxSetup({},n),f=p.context||p,h=p.context&&(f.nodeType||f.jquery)?ot(f):ot.event,m=ot.Deferred(),g=ot.Callbacks("once memory"),v=p.statusCode||{},b={},y={},x=0,w="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!s)for(s={};t=pn.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=y[n]=y[n]||e,b[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)v[t]=[v[t],e[t]];else S.always(e[S.status]);return this},abort:function(e){var t=e||w;return r&&r.abort(t),i(0,t),this}};if(m.promise(S).complete=g.add,S.success=S.done,S.error=S.fail,p.url=((e||p.url||sn)+"").replace(un,"").replace(mn,an[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=ot.trim(p.dataType||"*").toLowerCase().match(st)||[""],null==p.crossDomain&&(c=gn.exec(p.url.toLowerCase()),p.crossDomain=!(!c||c[1]===an[1]&&c[2]===an[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(an[3]||("http:"===an[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=ot.param(p.data,p.traditional)),D(bn,p,n,S),2===x)return S;u=p.global,u&&0===ot.active++&&ot.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!hn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(cn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=dn.test(o)?o.replace(dn,"$1_="+ln++):o+(cn.test(o)?"&":"?")+"_="+ln++)),p.ifModified&&(ot.lastModified[o]&&S.setRequestHeader("If-Modified-Since",ot.lastModified[o]),ot.etag[o]&&S.setRequestHeader("If-None-Match",ot.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&S.setRequestHeader("Content-Type",p.contentType),S.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+xn+"; q=0.01":""):p.accepts["*"]);for(d in p.headers)S.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(p.beforeSend.call(f,S,p)===!1||2===x))return S.abort();w="abort";for(d in{success:1,error:1,complete:1})S[d](p[d]);if(r=D(yn,p,n,S)){S.readyState=1,u&&h.trigger("ajaxSend",[S,p]),p.async&&p.timeout>0&&(l=setTimeout(function(){S.abort("timeout")},p.timeout));try{x=1,r.send(b,i)}catch(C){if(!(2>x))throw C;i(-1,C)}}else i(-1,"No Transport");return S},getJSON:function(e,t,n){return ot.get(e,t,n,"json")},getScript:function(e,n){return ot.get(e,t,n,"script")}}),ot.each(["get","post"],function(e,n){ot[n]=function(e,i,r,o){return ot.isFunction(i)&&(o=o||r,r=i,i=t),ot.ajax({url:e,type:n,dataType:o,data:i,success:r})}}),ot.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return ot.globalEval(e),e}}}),ot.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ot.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,r){t=ot("\n',"\n",'<%= documentHTML %>\n',""].join(""),pdfTemplate:["\n","\n","\n",'\n',"<%= documentTitle %> \n",'\n','\n",'\n',"\n",'<%= documentHTML %>\n',""].join(""),pdfPageSize:"A4",sshProxy:t.SSH_PROXY_URL,extensionSettings:{}};try{e.extend(i,JSON.parse(n.settings))}catch(r){}return i}),define("logger",[],function(){var e={log:function(){},info:function(){},warn:function(){},error:function(){}};return/(\?|&)console($|&)/.test(location.search)?console:e}),define("classes/Extension",[],function(){function e(e,t,n,i){this.extensionId=e,this.extensionName=t,this.isOptional=n,this.disableInViewer=i}return e}),define("text",["module"],function(e){var t,n,i,r,o,a=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],s=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,l=/]*>\s*([\s\S]+)\s*<\/body>/im,c="undefined"!=typeof location&&location.href,u=c&&location.protocol&&location.protocol.replace(/\:/,""),d=c&&location.hostname,p=c&&(location.port||void 0),f={},h=e.config&&e.config()||{};return t={version:"2.0.10",strip:function(e){if(e){e=e.replace(s,"");var t=e.match(l);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:h.createXhr||function(){var e,t,n;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(t=0;3>t;t+=1){n=a[t];try{e=new ActiveXObject(n)}catch(i){}if(e){a=[n];break}}return e},parseName:function(e){var t,n,i,r=!1,o=e.indexOf("."),a=0===e.indexOf("./")||0===e.indexOf("../");return-1!==o&&(!a||o>1)?(t=e.substring(0,o),n=e.substring(o+1,e.length)):t=e,i=n||t,o=i.indexOf("!"),-1!==o&&(r="strip"===i.substring(o+1),i=i.substring(0,o),n?n=i:t=i),{moduleName:t,ext:n,strip:r}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,i,r){var o,a,s,l=t.xdRegExp.exec(e);return l?(o=l[2],a=l[3],a=a.split(":"),s=a[1],a=a[0],!(o&&o!==n||a&&a.toLowerCase()!==i.toLowerCase()||(s||a)&&s!==r)):!0},finishLoad:function(e,n,i,r){i=n?t.strip(i):i,h.isBuild&&(f[e]=i),r(i)},load:function(e,n,i,r){if(r.isBuild&&!r.inlineText)return i(),void 0;h.isBuild=r.isBuild;var o=t.parseName(e),a=o.moduleName+(o.ext?"."+o.ext:""),s=n.toUrl(a),l=h.useXhr||t.useXhr;return 0===s.indexOf("empty:")?(i(),void 0):(!c||l(s,u,d,p)?t.get(s,function(n){t.finishLoad(e,o.strip,n,i)},function(e){i.error&&i.error(e)}):n([a],function(e){t.finishLoad(o.moduleName+"."+o.ext,o.strip,e,i)}),void 0)},write:function(e,n,i){if(f.hasOwnProperty(n)){var r=t.jsEscape(f[n]);i.asModule(e+"!"+n,"define(function () { return '"+r+"';});\n")}},writeFile:function(e,n,i,r,o){var a=t.parseName(n),s=a.ext?"."+a.ext:"",l=a.moduleName+s,c=i.toUrl(a.moduleName+s)+".js";t.load(l,i,function(){var n=function(e){return r(c,e)};n.asModule=function(e,t){return r.asModule(e,c,t)},t.write(e,l,n,o)},o)}},"node"===h.env||!h.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]?(n=require.nodeRequire("fs"),t.get=function(e,t,i){try{var r=n.readFileSync(e,"utf8");0===r.indexOf("")&&(r=r.substring(1)),t(r)}catch(o){i(o)}}):"xhr"===h.env||!h.env&&t.createXhr()?t.get=function(e,n,i,r){var o,a=t.createXhr();if(a.open("GET",e,!0),r)for(o in r)r.hasOwnProperty(o)&&a.setRequestHeader(o.toLowerCase(),r[o]);h.onXhr&&h.onXhr(a,e),a.onreadystatechange=function(){var t,r;4===a.readyState&&(t=a.status,t>399&&600>t?(r=new Error(e+" HTTP status: "+t),r.xhr=a,i(r)):n(a.responseText),h.onXhrComplete&&h.onXhrComplete(a,e))},a.send(null)}:"rhino"===h.env||!h.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?t.get=function(e,t){var n,i,r="utf-8",o=new java.io.File(e),a=java.lang.System.getProperty("line.separator"),s=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(o),r)),l="";try{for(n=new java.lang.StringBuffer,i=s.readLine(),i&&i.length()&&65279===i.charAt(0)&&(i=i.substring(1)),null!==i&&n.append(i);null!==(i=s.readLine());)n.append(a),n.append(i);l=String(n.toString())}finally{s.close()}t(l)}:("xpconnect"===h.env||!h.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(i=Components.classes,r=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),o="@mozilla.org/windows-registry-key;1"in i,t.get=function(e,t){var n,a,s,l={};o&&(e=e.replace(/\//g,"\\")),s=new FileUtils.File(e);try{n=i["@mozilla.org/network/file-input-stream;1"].createInstance(r.nsIFileInputStream),n.init(s,1,0,!1),a=i["@mozilla.org/intl/converter-input-stream;1"].createInstance(r.nsIConverterInputStream),a.init(n,"utf-8",n.available(),r.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),a.readString(n.available(),l),a.close(),n.close(),t(l.value)}catch(c){throw new Error((s&&s.path||"")+": "+c)}}),t}),define("text!html/settingsExtensionsAccordion.html",[],function(){return'\n\n'}),function(){var e=function(e,t,n,i){this.rawMessage=e,this.parsedLine=void 0!==t?t:-1,this.snippet=void 0!==n?n:null,this.parsedFile=void 0!==i?i:null,this.updateRepr(),this.message=e};e.prototype={name:"YamlParseException",message:null,parsedFile:null,parsedLine:-1,snippet:null,rawMessage:null,isDefined:function(e){return void 0!=e&&null!=e},getSnippet:function(){return this.snippet},setSnippet:function(e){this.snippet=e,this.updateRepr()},getParsedFile:function(){return this.parsedFile},setParsedFile:function(e){this.parsedFile=e,this.updateRepr()},getParsedLine:function(){return this.parsedLine},setParsedLine:function(e){this.parsedLine=e,this.updateRepr()},updateRepr:function(){this.message=this.rawMessage;var e=!1;"."===this.message.charAt(this.message.length-1)&&(this.message=this.message.substring(0,this.message.length-1),e=!0),null!==this.parsedFile&&(this.message+=" in "+JSON.stringify(this.parsedFile)),this.parsedLine>=0&&(this.message+=" at line "+this.parsedLine),this.snippet&&(this.message+=' (near "'+this.snippet+'")'),e&&(this.message+=".")}};var t=!1,n=function(){};n.prototype={parseFile:function(t,i){if(null==i){var r=this.getFileContents(t),o=null;try{o=this.parse(r)}catch(a){throw a instanceof e&&a.setParsedFile(t),a}return o}this.getFileContents(t,function(e){i((new n).parse(e))})},parse:function(e){var t=new o;return t.parse(e)},dump:function(e,t,n){null==t&&(t=2);var i=new s;return n&&(i.numSpacesForIndentation=n),i.dump(e,t)},getXHR:function(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)for(var e=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP"],t=0;4>t;t++)try{return new ActiveXObject(e[t])}catch(n){}return null},getFileContents:function(e,n){if(t){var i=require("fs");if(null==n){var r=i.readFileSync(e);return null==r?null:""+r}i.readFile(e,function(e,t){e?n(null):n(t)})}else{var o=this.getXHR();if(null==n)return o.open("GET",e,!1),o.send(null),200==o.status||0==o.status?o.responseText:null;o.onreadystatechange=function(){4==o.readyState&&(200==o.status||0==o.status?n(o.responseText):n(null))},o.open("GET",e,!0),o.send(null)}}};var i={stringify:function(e,t,i){return(new n).dump(e,t,i)},parse:function(e){return(new n).parse(e)},load:function(e,t){return(new n).parseFile(e,t)}};"undefined"!=typeof exports&&"undefined"!=typeof module&&module.exports&&(exports=module.exports=i,t=!0,function(){var e=function(e,t){e.exports=i.load(t)};void 0!==require.extensions&&(require.extensions[".yml"]=e,require.extensions[".yaml"]=e)}()),"undefined"!=typeof window&&(window.YAML=i);var r=function(){};r.prototype={i:null,parse:function(t){var n=null;if(t=this.trim(t),0==t.length)return"";switch(t.charAt(0)){case"[":n=this.parseSequence(t);break;case"{":n=this.parseMapping(t);break;default:n=this.parseScalar(t)}if(""!=t.substr(this.i+1).replace(/^\s*#.*$/,""))throw console.log("oups "+t.substr(this.i+1)),new e('Unexpected characters near "'+t.substr(this.i)+'".');return n},dump:function(e){if(void 0==e||null==e)return"null";if(e instanceof Date)return e.toISOString();if("object"==typeof e)return this.dumpObject(e);if("boolean"==typeof e)return e?"true":"false";if(/^\d+$/.test(e))return"string"==typeof e?"'"+e+"'":parseInt(e);if(this.isNumeric(e))return"string"==typeof e?"'"+e+"'":parseFloat(e);if("number"==typeof e)return 1/0==e?".Inf":e==-1/0?"-.Inf":isNaN(e)?".NAN":e;var t=new YamlEscaper;return t.requiresDoubleQuoting(e)?t.escapeWithDoubleQuotes(e):t.requiresSingleQuoting(e)?t.escapeWithSingleQuotes(e):""==e?"":this.getTimestampRegex().test(e)?"'"+e+"'":this.inArray(e.toLowerCase(),["null","~","true","false"])?"'"+e+"'":e},dumpObject:function(e){var t,n=this.getKeys(e),i=null,r=n.length;if(e instanceof Array){for(i=[],t=0;r>t;t++)i.push(this.dump(e[n[t]]));return"["+i.join(", ")+"]"}for(i=[],t=0;r>t;t++)i.push(this.dump(n[t])+": "+this.dump(e[n[t]]));return"{ "+i.join(", ")+" }"},parseScalar:function(t,n,i,r,o){void 0==n&&(n=null),void 0==i&&(i=['"',"'"]),void 0==r&&(r=0),void 0==o&&(o=!0);var a=null,s=null,l=null;if(this.inArray(t[r],i)){if(a=this.parseQuotedScalar(t,r),r=this.i,null!==n){var c=t.substr(r).replace(/^\s+/,"");if(!this.inArray(c.charAt(0),n))throw new e("Unexpected characters ("+t.substr(r)+").")}}else{if(n){if(!(l=new RegExp("^(.+?)("+n.join("|")+")").exec((t+"").substring(r))))throw new e("Malformed inline YAML string ("+t+").");a=l[1],r+=a.length}else a=(t+"").substring(r),r+=a.length,s=a.indexOf(" #"),-1!=s&&(a=a.substr(0,s).replace(/\s+$/g,""));a=o?this.evaluateScalar(a):a}return this.i=r,a},parseQuotedScalar:function(t,n){var i=null;if(!(i=new RegExp("^"+r.REGEX_QUOTED_STRING).exec((t+"").substring(n))))throw new e("Malformed inline YAML string ("+(t+"").substring(n)+").");var o=i[0].substr(1,i[0].length-2),s=new a;return o='"'==(t+"").charAt(n)?s.unescapeDoubleQuotedString(o):s.unescapeSingleQuotedString(o),n+=i[0].length,this.i=n,o},parseSequence:function(t,n){void 0==n&&(n=0);var i=[],r=t.length;for(n+=1;r>n;){switch(t.charAt(n)){case"[":i.push(this.parseSequence(t,n)),n=this.i;break;case"{":i.push(this.parseMapping(t,n)),n=this.i;break;case"]":return this.i=n,i;case",":case" ":break;default:var o=this.inArray(t.charAt(n),['"',"'"]),a=this.parseScalar(t,[",","]"],['"',"'"],n);if(n=this.i,!o&&-1!=(a+"").indexOf(": "))try{a=this.parseMapping("{"+a+"}")}catch(s){if(!(s instanceof e))throw s}i.push(a),n--}n++}throw new e('Malformed inline YAML string "'+t+'"')},parseMapping:function(t,n){void 0==n&&(n=0);var i={},r=t.length;n+=1;for(var o=!1,a=!1;r>n;){switch(a=!1,t.charAt(n)){case" ":case",":n++,a=!0;break;case"}":return this.i=n,i}if(!a){var s=this.parseScalar(t,[":"," "],['"',"'"],n,!1);for(n=this.i,o=!1;r>n;){switch(t.charAt(n)){case"[":i[s]=this.parseSequence(t,n),n=this.i,o=!0;break;case"{":i[s]=this.parseMapping(t,n),n=this.i,o=!0;break;case":":case" ":break;default:i[s]=this.parseScalar(t,[",","}"],['"',"'"],n),n=this.i,o=!0,n--}if(++n,o){a=!0;break}}}}throw new e('Malformed inline YAML string "'+t+'"')},evaluateScalar:function(e){e=this.trim(e);var t=null,n=null;return"null"==e.toLowerCase()||""==e||"~"==e?null:0==(e+"").indexOf("!str ")?(""+e).substring(5):0==(e+"").indexOf("! ")?parseInt(this.parseScalar((e+"").substr(2))):/^\d+$/.test(e)?(t=e,n=parseInt(e),"0"==e.charAt(0)?this.octdec(e):""+t==""+n?n:t):"true"==(e+"").toLowerCase()?!0:"false"==(e+"").toLowerCase()?!1:this.isNumeric(e)?"0x"==(e+"").substr(0,2)?this.hexdec(e):parseFloat(e):".inf"==e.toLowerCase()?1/0:".nan"==e.toLowerCase()?0/0:"-.inf"==e.toLowerCase()?-1/0:/^(-|\+)?[0-9,]+(\.[0-9]+)?$/.test(e)?parseFloat(e.split(",").join("")):this.getTimestampRegex().test(e)?new Date(this.strtotime(e)):""+e -},getTimestampRegex:function(){return new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ ]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:.([0-9]*))?(?:[ ]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$","gi")},trim:function(e){return(e+"").replace(/^\s+/,"").replace(/\s+$/,"")},isNumeric:function(e){return e-0==e&&e.length>0&&""!=e.replace(/\s+/g,"")},inArray:function(e,t){var n,i=t.length;for(n=0;i>n;n++)if(e==t[n])return!0;return!1},getKeys:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},octdec:function(e){return parseInt((e+"").replace(/[^0-7]/gi,""),8)},hexdec:function(e){return e=this.trim(e),"0x"==(e+"").substr(0,2)&&(e=(e+"").substring(2)),parseInt((e+"").replace(/[^a-f0-9]/gi,""),16)},strtotime:function(e,t){var n,i,r,o,a="";if(e=(e+"").replace(/\s{2,}|^\s|\s$/g," ").replace(/[\t\r\n]/g,""),"now"===e)return null===t||isNaN(t)?(new Date).getTime()||0:t||0;if(!isNaN(a=Date.parse(e)))return a||0;t=t?new Date(t):new Date,e=e.toLowerCase();var s={day:{sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},mon:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]},l=function(e){var n=e[2]&&"ago"===e[2],i=(i="last"===e[0]?-1:1)*(n?-1:1);switch(e[0]){case"last":case"next":switch(e[1].substring(0,3)){case"yea":t.setFullYear(t.getFullYear()+i);break;case"wee":t.setDate(t.getDate()+7*i);break;case"day":t.setDate(t.getDate()+i);break;case"hou":t.setHours(t.getHours()+i);break;case"min":t.setMinutes(t.getMinutes()+i);break;case"sec":t.setSeconds(t.getSeconds()+i);break;case"mon":if("month"===e[1]){t.setMonth(t.getMonth()+i);break}default:var r=s.day[e[1].substring(0,3)];if("undefined"!=typeof r){var o=r-t.getDay();0===o?o=7*i:o>0?"last"===e[0]&&(o-=7):"next"===e[0]&&(o+=7),t.setDate(t.getDate()+o),t.setHours(0,0,0,0)}}break;default:if(!/\d+/.test(e[0]))return!1;switch(i*=parseInt(e[0],10),e[1].substring(0,3)){case"yea":t.setFullYear(t.getFullYear()+i);break;case"mon":t.setMonth(t.getMonth()+i);break;case"wee":t.setDate(t.getDate()+7*i);break;case"day":t.setDate(t.getDate()+i);break;case"hou":t.setHours(t.getHours()+i);break;case"min":t.setMinutes(t.getMinutes()+i);break;case"sec":t.setSeconds(t.getSeconds()+i)}}return!0};if(r=e.match(/^(\d{2,4}-\d{2}-\d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/),null!==r)return r[2]?r[3]||(r[2]+=":00"):r[2]="00:00:00",o=r[1].split(/-/g),o[1]=s.mon[o[1]-1]||o[1],o[0]=+o[0],o[0]=o[0]>=0&&o[0]<=69?"20"+(o[0]<10?"0"+o[0]:o[0]+""):o[0]>=70&&o[0]<=99?"19"+o[0]:o[0]+"",parseInt(this.strtotime(o[2]+" "+o[1]+" "+o[0]+" "+r[2])+(r[4]?r[4]:""),10);var c="([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday)|(last|next)\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday))(\\sago)?";if(r=e.match(new RegExp(c,"gi")),null===r)return!1;for(n=0,i=r.length;i>n;n++)if(!l(r[n].split(" ")))return!1;return t.getTime()||0}},r.REGEX_QUOTED_STRING="(?:\"(?:[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\"|'(?:[^']*(?:''[^']*)*)')";var o=function(e){this.offset=void 0!==e?e:0};o.prototype={offset:0,lines:[],currentLineNb:-1,currentLine:"",refs:{},parse:function(t){this.currentLineNb=-1,this.currentLine="",this.lines=this.cleanup(t).split("\n");for(var n=null,i=null;this.moveToNextLine();)if(!this.isCurrentLineEmpty()){if(" "==this.currentLine.charAt(0))throw new e("A YAML file cannot contain tabs as indentation.",this.getRealCurrentLineNb()+1,this.currentLine);var a=!1,s=!1,l=!1,c=null,u=null,d=null,p=null,f=null,h=null,m=null,g=null,v=null;if(c=/^\-((\s+)(.+?))?\s*$/.exec(this.currentLine)){if(i&&"mapping"==i)throw new e("You cannot define a sequence item when in a mapping",this.getRealCurrentLineNb()+1,this.currentLine);i="sequence",this.isDefined(n)||(n=[]),c={leadspaces:c[2],value:c[3]},this.isDefined(c.value)&&(u=/^&([^ ]+) *(.*)/.exec(c.value))&&(u={ref:u[1],value:u[2]},a=u.ref,c.value=u.value),this.isDefined(c.value)&&""!=this.trim(c.value)&&"#"!=c.value.replace(/^ +/,"").charAt(0)?this.isDefined(c.leadspaces)&&" "==c.leadspaces&&(u=new RegExp("^("+r.REGEX_QUOTED_STRING+"|[^ '\"{[].*?) *:(\\s+(.+?))?\\s*$").exec(c.value))?(u={key:u[1],value:u[3]},d=this.getRealCurrentLineNb(),p=new o(d),p.refs=this.refs,f=c.value,this.isNextLineIndented()||(f+="\n"+this.getNextEmbedBlock(this.getCurrentLineIndentation()+2)),n.push(p.parse(f)),this.refs=p.refs):n.push(this.parseValue(c.value)):(d=this.getRealCurrentLineNb()+1,p=new o(d),p.refs=this.refs,n.push(p.parse(this.getNextEmbedBlock())),this.refs=p.refs)}else{if(!(c=new RegExp("^("+r.REGEX_QUOTED_STRING+"|[^ '\"[{].*?) *:(\\s+(.+?))?\\s*$").exec(this.currentLine))){if(2==this.lines.length&&this.isEmpty(this.lines[1])){try{t=(new r).parse(this.lines[0])}catch(b){throw b instanceof e&&(b.setParsedLine(this.getRealCurrentLineNb()+1),b.setSnippet(this.currentLine)),b}if(this.isObject(t)){var y=t[0];if("string"==typeof t&&"*"==y.charAt(0)){n=[],g=t.length;for(var x=0;g>x;x++)n.push(this.refs[t[x].substr(1)]);t=n}}return t}throw new e("Unable to parse.",this.getRealCurrentLineNb()+1,this.currentLine)}if(this.isDefined(n)||(n={}),i&&"sequence"==i)throw new e("You cannot define a mapping item when in a sequence",this.getRealCurrentLineNb()+1,this.currentLine);i="mapping",c={key:c[1],value:c[3]};try{h=(new r).parseScalar(c.key)}catch(b){throw b instanceof e&&(b.setParsedLine(this.getRealCurrentLineNb()+1),b.setSnippet(this.currentLine)),b}if("<<"==h)if(this.isDefined(c.value)&&"*"==(c.value+"").charAt(0)){if(s=c.value.substr(1),void 0==this.refs[s])throw new e('Reference "'+t+'" does not exist',this.getRealCurrentLineNb()+1,this.currentLine)}else{t=this.isDefined(c.value)&&""!=c.value?c.value:this.getNextEmbedBlock(),d=this.getRealCurrentLineNb()+1,p=new o(d),p.refs=this.refs,m=p.parse(t),this.refs=p.refs;var w=[];if(!this.isObject(m))throw new e("YAML merge keys used with a scalar value instead of an array",this.getRealCurrentLineNb()+1,this.currentLine);if(this.isDefined(m[0])){v=this.reverseArray(m),g=v.length;for(var x=0;g>x;x++){if(v[x],!this.isObject(v[x]))throw new e("Merge items must be arrays",this.getRealCurrentLineNb()+1,this.currentLine);w=this.mergeObject(v[x],w)}}else w=this.mergeObject(w,m);l=w}else this.isDefined(c.value)&&(u=/^&([^ ]+) *(.*)/.exec(c.value))&&(u={ref:u[1],value:u[2]},a=u.ref,c.value=u.value);l?n=l:this.isDefined(c.value)&&""!=this.trim(c.value)&&"#"!=this.trim(c.value).charAt(0)?s?n=this.refs[s]:n[h]=this.parseValue(c.value):this.isNextLineIndented()&&!this.isNextLineUnIndentedCollection()?n[h]=null:(d=this.getRealCurrentLineNb()+1,p=new o(d),p.refs=this.refs,n[h]=p.parse(this.getNextEmbedBlock()),this.refs=p.refs)}if(a)if(n instanceof Array)this.refs[a]=n[n.length-1];else{var S=null;for(var C in n)n.hasOwnProperty(C)&&(S=C);this.refs[a]=n[C]}}return this.isEmpty(n)?null:n},getRealCurrentLineNb:function(){return this.currentLineNb+this.offset},getCurrentLineIndentation:function(){return this.currentLine.length-this.currentLine.replace(/^ +/g,"").length},getNextEmbedBlock:function(t){this.moveToNextLine();var n=null,i=null;if(this.isDefined(t))n=t;else{n=this.getCurrentLineIndentation();var r=this.isStringUnIndentedCollectionItem(this.currentLine);if(!this.isCurrentLineEmpty()&&0==n&&!r)throw new e("Indentation problem A",this.getRealCurrentLineNb()+1,this.currentLine)}var o=[this.currentLine.substr(n)],a=this.isStringUnIndentedCollectionItem(this.currentLine),s=-1;for(a===!0&&(s=1+/^\-((\s+)(.+?))?\s*$/.exec(this.currentLine)[2].length);this.moveToNextLine();){if(a&&!this.isStringUnIndentedCollectionItem(this.currentLine)&&this.getCurrentLineIndentation()!=s){this.moveToPreviousLine();break}if(this.isCurrentLineEmpty())this.isCurrentLineBlank()&&o.push(this.currentLine.substr(n));else{i=this.getCurrentLineIndentation();var l;if(l=/^( *)$/.exec(this.currentLine))o.push(l[1]);else{if(!(i>=n)){if(0==i){this.moveToPreviousLine();break}throw new e("Indentation problem B",this.getRealCurrentLineNb()+1,this.currentLine)}o.push(this.currentLine.substr(n))}}}return o.join("\n")},moveToNextLine:function(){return this.currentLineNb>=this.lines.length-1?!1:(this.currentLineNb++,this.currentLine=this.lines[this.currentLineNb],!0)},moveToPreviousLine:function(){this.currentLineNb--,this.currentLine=this.lines[this.currentLineNb]},parseValue:function(t){if("*"==(t+"").charAt(0)){if(t="#"==this.trim(t).charAt(0)?(t+"").substr(1,t.indexOf("#")-2):(t+"").substr(1),void 0==this.refs[t])throw new e('Reference "'+t+'" does not exist',this.getRealCurrentLineNb()+1,this.currentLine);return this.refs[t]}var n=null;if(n=/^(\||>)(\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?( +#.*)?$/.exec(t)){n={separator:n[1],modifiers:n[2],comments:n[3]};var i=this.isDefined(n.modifiers)?n.modifiers:"";return this.parseFoldedScalar(n.separator,i.replace(/\d+/g,""),Math.abs(parseInt(i)))}try{return(new r).parse(t)}catch(o){throw o instanceof e&&(o.setParsedLine(this.getRealCurrentLineNb()+1),o.setSnippet(this.currentLine)),o}},parseFoldedScalar:function(e,t,n){void 0==t&&(t=""),void 0==n&&(n=0),e="|"==e?"\n":" ";for(var i="",r=null,o=this.moveToNextLine();o&&this.isCurrentLineBlank();)i+="\n",o=this.moveToNextLine();if(!o)return"";var a=null;if(!(a=new RegExp("^("+(n?this.strRepeat(" ",n):" +")+")(.*)$").exec(this.currentLine)))return this.moveToPreviousLine(),"";a={indent:a[1],text:a[2]};var s=a.indent,l=0;for(i+=a.text+e;this.currentLineNb+1\n\n\n \n\n \n <%= extensionName %> \n\n\n<%= settingsBlock %>\n=0;i--)t.push(e[i]);return t},merge:function(e,t){var n,i={};for(n in e)e.hasOwnProperty(n)&&(/^\d+$/.test(n)?i.push(e):i[n]=e[n]);for(n in t)t.hasOwnProperty(n)&&(/^\d+$/.test(n)?i.push(t):i[n]=t[n]);return i},strRepeat:function(e,t){var n,i="";for(n=0;t>n;n++)i+=e;return i},subStrCount:function(e,t,n,i){var r=0;e=""+e,t=""+t,void 0!=n&&(e=e.substr(n)),void 0!=i&&(e=e.substr(0,i));for(var o=e.length,a=t.length,s=0;o>s;s++)t==e.substr(s,a)&&r++,s+=a-1;return r},trim:function(e){return(e+"").replace(/^ +/,"").replace(/ +$/,"")}},YamlEscaper=function(){},YamlEscaper.prototype={requiresDoubleQuoting:function(e){return new RegExp(YamlEscaper.REGEX_CHARACTER_TO_ESCAPE).test(e)},escapeWithDoubleQuotes:function(e){e+="";for(var t=YamlEscaper.escapees.length,n=YamlEscaper.escaped.length,i=YamlEscaper.escaped,r=0;t>r;++r)r>=n&&i.push("");var o="";return o=e.replace(new RegExp(YamlEscaper.escapees.join("|"),"g"),function(e){for(var n=0;t>n;++n)if(e==YamlEscaper.escapees[n])return i[n]}),'"'+o+'"'},requiresSingleQuoting:function(e){return/[\s'":{}[\],&*#?]|^[-?|<>=!%@`]/.test(e)},escapeWithSingleQuotes:function(e){return"'"+e.replace(/'/g,"''")+"'"}},YamlEscaper.REGEX_CHARACTER_TO_ESCAPE="[\\x00-\\x1f]| | |â¨|â©",YamlEscaper.escapees=["\\\\",'\\"','"',"\x00","","","","","","","","\b"," ","\n","","\f","\r","","","","","","","","","","","","","","","","","",""," "," ","â¨","â©"],YamlEscaper.escaped=['\\"',"\\\\",'\\"',"\\0","\\x01","\\x02","\\x03","\\x04","\\x05","\\x06","\\a","\\b","\\t","\\n","\\v","\\f","\\r","\\x0e","\\x0f","\\x10","\\x11","\\x12","\\x13","\\x14","\\x15","\\x16","\\x17","\\x18","\\x19","\\x1a","\\e","\\x1c","\\x1d","\\x1e","\\x1f","\\N","\\_","\\L","\\P"];var a=function(){};a.prototype={unescapeSingleQuotedString:function(e){return e.replace(/''/g,"'")},unescapeDoubleQuotedString:function(e){var t=function(e){return(new a).unescapeCharacter(e)};return e.replace(new RegExp(a.REGEX_ESCAPED_CHARACTER,"g"),t)},unescapeCharacter:function(e){switch(e.charAt(1)){case"0":return String.fromCharCode(0);case"a":return String.fromCharCode(7);case"b":return String.fromCharCode(8);case"t":return" ";case" ":return" ";case"n":return"\n";case"v":return String.fromCharCode(11);case"f":return String.fromCharCode(12);case"r":return String.fromCharCode(13);case"e":return"";case" ":return" ";case'"':return'"';case"/":return"/";case"\\":return"\\";case"N":return"\x00 ";case"_":return"\x00 ";case"L":return" (";case"P":return" )";case"x":return this.pack("n",(new r).hexdec(e.substr(2,2)));case"u":return this.pack("n",(new r).hexdec(e.substr(2,4)));case"U":return this.pack("N",(new r).hexdec(e.substr(2,8)))}},pack:function(e){for(var t,n,i=0,r=1,o="",a=0;i arguments.length-r)throw new Error("Warning: pack() Type "+t+": too few arguments");for(a=0;n>a;a++)o+=String.fromCharCode(255&arguments[r]>>8),o+=String.fromCharCode(255&arguments[r]),r++;break;case"N":if("*"===n&&(n=arguments.length-r),n>arguments.length-r)throw new Error("Warning: pack() Type "+t+": too few arguments");for(a=0;n>a;a++)o+=String.fromCharCode(255&arguments[r]>>24),o+=String.fromCharCode(255&arguments[r]>>16),o+=String.fromCharCode(255&arguments[r]>>8),o+=String.fromCharCode(255&arguments[r]),r++;break;default:throw new Error("Warning: pack() Type "+t+": unknown format code")}}if(r =t||!this.isObject(e)||this.isEmpty(e))i=new r,o+=a+i.dump(e);else{var s,l=!this.arrayEquals(this.getKeys(e),this.range(0,e.length-1));for(var c in e)e.hasOwnProperty(c)&&(s=0>=t-1||!this.isObject(e[c])||this.isEmpty(e[c]),l&&(i=new r),o+=a+""+(l?i.dump(c)+":":"-")+(s?" ":"\n")+this.dump(e[c],t-1,s?0:n+this.numSpacesForIndentation)+(s?"\n":""))}return o},strRepeat:function(e,t){var n,i="";for(n=0;t>n;n++)i+=e;return i},isObject:function(e){return this.isDefined(e)&&"object"==typeof e},isEmpty:function(e){var t=void 0==e||null==e||""==e||0==e||"0"==e||0==e;if(!(t||"object"!=typeof e||e instanceof Array)){var n=0;for(var i in e)e.hasOwnProperty(i)&&n++;t=!n}return t},isDefined:function(e){return void 0!=e&&null!=e},getKeys:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},range:function(e,t){if(e>t)return[];for(var n=[],i=e;t>=i;i++)n.push(i);return n},arrayEquals:function(e,t){if(e.length!=t.length)return!1;for(var n=e.length,i=0;n>i;i++)if(e[i]!=t[i])return!1;return!0}}}(),define("yaml-js",function(e){return function(){var t;return t||e.YAML}}(this)),define("extensions/yamlFrontMatterParser",["underscore","classes/Extension","yaml-js"],function(e,t,n){function i(t,i){if(t===a){var r=s.exec(i),o=r[2];if(o){if(!a.frontMatter||a.frontMatter._yaml!=o){a.frontMatter=void 0;try{a.frontMatter=n.parse(o),e.isObject(a.frontMatter)||(a.frontMatter=void 0),a.frontMatter._yaml=o,a.frontMatter._frontMatter=r[1]}catch(l){}}}else a.frontMatter=void 0}}var r,o=new t("yamlFrontMatterParser","YAML front matter");o.onEventMgrCreated=function(e){r=e};var a;o.onFileSelected=function(e){a=e};var s=/^(\s*-{3}\s*\n([\w\W]+?)\n\s*-{3}\s*?\n)?([\w\W]*)$/;return o.onFileOpen=i,o.onContentChanged=i,o}),define("text!html/markdownExtraSettingsBlock.html",[],function(){return' Adds extra features to the original Markdown syntax.
\n\n\nMore info'}),window.PR_SHOULD_USE_CONTINUATION=!0;var prettyPrintOne,prettyPrint;!function(){function e(e){function t(e){var t=e.charCodeAt(0);if(92!==t)return t;var n=e.charAt(1);return t=d[n],t?t:n>="0"&&"7">=n?parseInt(e.substring(1),8):"u"===n||"x"===n?parseInt(e.substring(2),16):e.charCodeAt(1)}function n(e){if(32>e)return(16>e?"\\x0":"\\x")+e.toString(16);var t=String.fromCharCode(e);return"\\"===t||"-"===t||"]"===t||"^"===t?"\\"+t:t}function i(e){var i=e.substring(1,e.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),r=[],o="^"===i[0],a=["["];o&&a.push("^");for(var s=o?1:0,l=i.length;l>s;++s){var c=i[s];if(/\\[bdsw]/i.test(c))a.push(c);else{var u,d=t(c);l>s+2&&"-"===i[s+1]?(u=t(i[s+2]),s+=2):u=d,r.push([d,u]),65>u||d>122||(65>u||d>90||r.push([32|Math.max(65,d),32|Math.min(u,90)]),97>u||d>122||r.push([-33&Math.max(97,d),-33&Math.min(u,122)]))}}r.sort(function(e,t){return e[0]-t[0]||t[1]-e[1]});for(var p=[],f=[],s=0;s\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n \n\nh[0]&&(h[1]+1>h[0]&&a.push("-"),a.push(n(h[1])))}return a.push("]"),a.join("")}function r(e){for(var t=e.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),r=t.length,s=[],l=0,c=0;r>l;++l){var u=t[l];if("("===u)++c;else if("\\"===u.charAt(0)){var d=+u.substring(1);d&&(c>=d?s[d]=-1:t[l]=n(d))}}for(var l=1;l l;++l){var u=t[l];if("("===u)++c,s[c]||(t[l]="(?:");else if("\\"===u.charAt(0)){var d=+u.substring(1);d&&c>=d&&(t[l]="\\"+s[d])}}for(var l=0;r>l;++l)"^"===t[l]&&"^"!==t[l+1]&&(t[l]="");if(e.ignoreCase&&a)for(var l=0;r>l;++l){var u=t[l],p=u.charAt(0);u.length>=2&&"["===p?t[l]=i(u):"\\"!==p&&(t[l]=u.replace(/[a-zA-Z]/g,function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(-33&t,32|t)+"]"}))}return t.join("")}for(var o=0,a=!1,s=!1,l=0,c=e.length;c>l;++l){var u=e[l];if(u.ignoreCase)s=!0;else if(/[a-z]/i.test(u.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){a=!0,s=!1;break}}for(var d={b:8,t:9,n:10,v:11,f:12,r:13},p=[],l=0,c=e.length;c>l;++l){var u=e[l];if(u.global||u.multiline)throw new Error(""+u);p.push("(?:"+r(u)+")")}return new RegExp(p.join("|"),s?"gi":"g")}function t(e,t){function n(e){switch(e.nodeType){case 1:if(i.test(e.className))return;for(var l=e.firstChild;l;l=l.nextSibling)n(l);var c=e.nodeName.toLowerCase();("br"===c||"li"===c)&&(r[s]="\n",a[s<<1]=o++,a[1|s++<<1]=e);break;case 3:case 4:var u=e.nodeValue;u.length&&(u=t?u.replace(/\r\n?/g,"\n"):u.replace(/[ \t\r\n]+/g," "),r[s]=u,a[s<<1]=o,o+=u.length,a[1|s++<<1]=e)}}var i=/(?:^|\s)nocode(?:\s|$)/,r=[],o=0,a=[],s=0;return n(e),{sourceCode:r.join("").replace(/\n$/,""),spans:a}}function n(e,t,n,i){if(t){var r={sourceCode:t,basePos:e};n(r),i.push.apply(i,r.decorations)}}function i(e){for(var t=void 0,n=e.firstChild;n;n=n.nextSibling){var i=n.nodeType;t=1===i?t?e:n:3===i?q.test(n.nodeValue)?e:t:t}return t===e?void 0:t}function r(t,i){var r,o={};!function(){for(var n=t.concat(i),a=[],s={},l=0,c=n.length;c>l;++l){var u=n[l],d=u[3];if(d)for(var p=d.length;--p>=0;)o[d.charAt(p)]=u;var f=u[1],h=""+f;s.hasOwnProperty(h)||(a.push(f),s[h]=null)}a.push(/[\0-\uffff]/),r=e(a)}();var a=i.length,s=function(e){for(var t=e.sourceCode,l=e.basePos,u=[l,R],d=0,p=t.match(r)||[],f={},h=0,m=p.length;m>h;++h){var g,v=p[h],b=f[v],y=void 0;if("string"==typeof b)g=!1;else{var x=o[v.charAt(0)];if(x)y=v.match(x[1]),b=x[0];else{for(var w=0;a>w;++w)if(x=i[w],y=v.match(x[1])){b=x[0];break}y||(b=R)}g=b.length>=5&&"lang-"===b.substring(0,5),!g||y&&"string"==typeof y[1]||(g=!1,b=O),g||(f[v]=b)}var S=d;if(d+=v.length,g){var C=y[1],T=v.indexOf(C),E=T+C.length;y[2]&&(E=v.length-y[2].length,T=E-C.length);var k=b.substring(5);n(l+S,v.substring(0,T),s,u),n(l+S+T,C,c(k,C),u),n(l+S+E,v.substring(E),s,u)}else u.push(l+S,b)}e.decorations=u};return s}function o(e){var t=[],n=[];e.tripleQuotedStrings?t.push([I,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push([I,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push([I,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push([I,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var i=e.hashComments;if(i&&(e.cStyleComments?(i>1?t.push([N,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):t.push([N,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push([I,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):t.push([N,/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push([N,/^\/\/[^\r\n]*/,null]),n.push([N,/^\/\*[\s\S]*?(?:\*\/|$)/,null])),e.regexLiterals){var o="/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/";n.push(["lang-regex",new RegExp("^"+G+"("+o+")")])}var a=e.types;a&&n.push([L,a]);var s=(""+e.keywords).replace(/^ | $/g,"");s.length&&n.push([D,new RegExp("^(?:"+s.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push([R,/^\s+/,null," \r\n "]);var l=/^.[^\s\w\.$@\'\"\`\/\\]*/;return n.push([M,/^@[a-z_$][a-z_$@0-9]*/i,null],[L,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[R,/^[a-z_$][a-z_$@0-9]*/i,null],[M,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[R,/^\\[\s\S]?/,null],[A,l,null]),r(t,n)}function a(e,t,n){function i(e){switch(e.nodeType){case 1:if(o.test(e.className))break;if("br"===e.nodeName)r(e),e.parentNode&&e.parentNode.removeChild(e);else for(var t=e.firstChild;t;t=t.nextSibling)i(t);break;case 3:case 4:if(n){var l=e.nodeValue,c=l.match(a);if(c){var u=l.substring(0,c.index);e.nodeValue=u;var d=l.substring(c.index+c[0].length);if(d){var p=e.parentNode;p.insertBefore(s.createTextNode(d),e.nextSibling)}r(e),u||e.parentNode.removeChild(e)}}}}function r(e){function t(e,n){var i=n?e.cloneNode(!1):e,r=e.parentNode;if(r){var o=t(r,1),a=e.nextSibling;o.appendChild(i);for(var s=a;s;s=a)a=s.nextSibling,o.appendChild(s)}return i}for(;!e.nextSibling;)if(e=e.parentNode,!e)return;for(var n,i=t(e.nextSibling,0);(n=i.parentNode)&&1===n.nodeType;)i=n;c.push(i)}for(var o=/(?:^|\s)nocode(?:\s|$)/,a=/\r\n?|\n/,s=e.ownerDocument,l=s.createElement("li");e.firstChild;)l.appendChild(e.firstChild);for(var c=[l],u=0;u u;++u)l=c[u],l.className="L"+(u+p)%10,l.firstChild||l.appendChild(s.createTextNode(" ")),d.appendChild(l);e.appendChild(d)}function s(e){var t=/\bMSIE\s(\d+)/.exec(navigator.userAgent);t=t&&+t[1]<=8;var n=/\n/g,i=e.sourceCode,r=i.length,o=0,a=e.spans,s=a.length,l=0,c=e.decorations,u=c.length,d=0;c[u]=r;var p,f;for(f=p=0;u>f;)c[f]!==c[f+2]?(c[p++]=c[f++],c[p++]=c[f++]):f+=2;for(u=p,f=p=0;u>f;){for(var h=c[f],m=c[f+1],g=f+2;u>=g+2&&c[g+1]===m;)g+=2;c[p++]=h,c[p++]=m,f=g}u=c.length=p;var v,b=e.sourceNode;b&&(v=b.style.display,b.style.display="none");try{for(;s>l;){a[l];var y,x=a[l+2]||r,w=c[d+2]||r,g=Math.min(x,w),S=a[l+1];if(1!==S.nodeType&&(y=i.substring(o,g))){t&&(y=y.replace(n,"\r")),S.nodeValue=y;var C=S.ownerDocument,T=C.createElement("span");T.className=c[d+1];var E=S.parentNode;E.replaceChild(T,S),T.appendChild(S),x>o&&(a[l+1]=S=C.createTextNode(i.substring(g,x)),E.insertBefore(S,T.nextSibling))}o=g,o>=x&&(l+=2),o>=w&&(d+=2)}}finally{b&&(b.style.display=v)}}function l(e,t){for(var n=t.length;--n>=0;){var i=t[n];U.hasOwnProperty(i)?f.console&&console.warn("cannot override language handler %s",i):U[i]=e}}function c(e,t){return e&&U.hasOwnProperty(e)||(e=/^\s*l;++l)o.push(r[s][l]);r=null;var d=Date;d.now||(d={now:function(){return+new Date}});var p,h=0,m=/\blang(?:uage)?-([\w.]+)(?!\S)/,g=/\bprettyprint\b/,v=/\bprettyprinted\b/,b=/pre|xmp/i,y=/^code$/i,x=/^(?:pre|code|xmp)$/i;n()}var f=window,h=["break,continue,do,else,for,if,return,while"],m=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],g=[m,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],v=[g,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],b=[g,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],y=[b,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],x="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",w=[g,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],S="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",C=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],T=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],E=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],k=[v,y,w,S+C,T,E],_=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,I="str",D="kwd",N="com",L="typ",M="lit",A="pun",R="pln",P="tag",F="dec",O="src",B="atn",j="atv",$="nocode",G="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*",q=/\S/,H=o({keywords:k,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),U={}; -l(H,["default-code"]),l(r([],[[R,/^[^]+/],[F,/^]*(?:>|$)/],[N,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[A,/^(?:<[%?]|[%?]>)/],["lang-",/^ ]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^",rE:!0,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},t,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"?",e:"/?>",c:[{cN:"title",b:"[^ /><]+",r:0},n]}]}}),hljs.registerLanguage("markdown",function(){return{c:[{cN:"header",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].+?[\\)\\]]",rB:!0,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:"^\\[.+\\]:",e:"$",rB:!0,c:[{cN:"link_reference",b:"\\[",e:"\\]",eB:!0,eE:!0},{cN:"link_url",b:"\\s",e:"$"}]}]} -}),hljs.registerLanguage("css",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",n={cN:"function",b:t+"\\(",e:"\\)",c:["self",e.NM,e.ASM,e.QSM]};return{cI:!0,i:"[=/|']",c:[e.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[n,e.ASM,e.QSM,e.NM]}]},{cN:"tag",b:t,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[e.CBLCLM,{cN:"rule",b:"[^\\s]",rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{cN:"value",eW:!0,eE:!0,c:[n,e.NM,e.QSM,e.ASM,e.CBLCLM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}}),hljs.registerLanguage("lisp",function(e){var t="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*",n="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?",i={cN:"shebang",b:"^#!",e:"$"},r={cN:"literal",b:"\\b(t{1}|nil)\\b"},o={cN:"number",v:[{b:n,r:0},{b:"#b[0-1]+(/[0-1]+)?"},{b:"#o[0-7]+(/[0-7]+)?"},{b:"#x[0-9a-f]+(/[0-9a-f]+)?"},{b:"#c\\("+n+" +"+n,e:"\\)"}]},a=e.inherit(e.QSM,{i:null}),s={cN:"comment",b:";",e:"$"},l={cN:"variable",b:"\\*",e:"\\*"},c={cN:"keyword",b:"[:&]"+t},u={b:"\\(",e:"\\)",c:["self",r,a,o]},d={cN:"quoted",c:[o,a,l,c,u],v:[{b:"['`]\\(",e:"\\)"},{b:"\\(quote ",e:"\\)",k:{title:"quote"}}]},p={cN:"list",b:"\\(",e:"\\)"},f={eW:!0,r:0};return p.c=[{cN:"title",b:t},f],f.c=[d,p,r,o,a,s,l,c],{i:/\S/,c:[o,i,r,a,s,d,p]}}),hljs.registerLanguage("profile",function(e){return{c:[e.CNM,{cN:"built_in",b:"{",e:"}$",eB:!0,eE:!0,c:[e.ASM,e.QSM],r:0},{cN:"filename",b:"[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",e:":",eE:!0},{cN:"header",b:"(ncalls|tottime|cumtime)",e:"$",k:"ncalls tottime|10 cumtime|10 filename",r:10},{cN:"summary",b:"function calls",e:"$",c:[e.CNM],r:10},e.ASM,e.QSM,{cN:"function",b:"\\(",e:"\\)$",c:[e.UTM],r:0}]}}),hljs.registerLanguage("http",function(){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:!0}}]}}),hljs.registerLanguage("java",function(e){var t="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws";return{k:t,i:/<\//,c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"(^|\\s)@[A-Za-z]+"}],r:10},e.CLCM,e.CBLCLM,e.ASM,e.QSM,{bK:"protected public private",e:/[{;=]/,k:t,c:[{cN:"class",bK:"class interface",eW:!0,i:/[:"<>]/,c:[{bK:"extends implements",r:10},e.UTM]},{b:e.UIR+"\\s*\\(",rB:!0,c:[e.UTM]}]},e.CNM,{cN:"annotation",b:"@[A-Za-z]+"}]}}),hljs.registerLanguage("fsharp",function(e){return{k:"abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",c:[{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},{cN:"string",b:'"""',e:'"""'},{cN:"comment",b:"\\(\\*",e:"\\*\\)"},{cN:"class",bK:"type",e:"\\(|=|$",c:[e.UTM]},{cN:"annotation",b:"\\[<",e:">\\]"},{cN:"attribute",b:"\\B('[A-Za-z])\\b",c:[e.BE]},e.CLCM,e.inherit(e.QSM,{i:null}),e.CNM]}}),hljs.registerLanguage("mathematica",function(e){return{aliases:["mma"],l:"(\\$|\\b)"+e.IR+"\\b",k:"AbelianGroup Abort AbortKernels AbortProtect Above Abs Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Active ActiveItem ActiveStyle AcyclicGraphQ AddOnHelpPath AddTo AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AffineTransform After AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowedDimensions AllowGroupClose AllowInlineCells AllowKernelInitialization AllowReverseGroupClose AllowScriptLevelChange AlphaChannel AlternatingGroup AlternativeHypothesis Alternatives AmbientLight Analytic AnchoredSearch And AndersonDarlingTest AngerJ AngleBracket AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotation Annuity AnnuityDue Antialiasing Antisymmetric Apart ApartSquareFree Appearance AppearanceElements AppellF1 Append AppendTo Apply ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess ARProcess Array ArrayComponents ArrayDepth ArrayFlatten ArrayPad ArrayPlot ArrayQ ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads AspectRatio AspectRatioFixed Assert Assuming Assumptions AstronomicalData Asynchronous AsynchronousTaskObject AsynchronousTasks AtomQ Attributes AugmentedSymmetricPolynomial AutoAction AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords Axes AxesEdge AxesLabel AxesOrigin AxesStyle Axis BabyMonsterGroupB Back Background BackgroundTasksSettings Backslash Backsubstitution Backward Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseForm Baseline BaselinePosition BaseStyle BatesDistribution BattleLemarieWavelet Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized BetweennessCentrality BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms Booleans BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryStyle Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BubbleChart BubbleChart3D BubbleScale BubbleSizes BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteCount ByteOrdering C CachedValue CacheGraphics CalendarData CalendarType CallPacket CanberraDistance Cancel CancelButton CandlestickChart Cap CapForm CapitalDifferentialD CardinalBSplineBasis CarmichaelLambda Cases Cashflow Casoratian Catalan CatalanNumber Catch CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterDot CentralMoment CentralMomentGeneratingFunction CForm ChampernowneNumber ChanVeseBinarize Character CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop Circle CircleBox CircleDot CircleMinus CirclePlus CircleTimes CirculantGraph CityData Clear ClearAll ClearAttributes ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent ClusteringComponents CMYKColor Coarse Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorCombine ColorConvert ColorData ColorDataFunction ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorSpace Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CommonDefaultFormatTypes Commonest CommonestFilter CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledFunction Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComponentMeasurements ComponentwiseContextMenu Compose ComposeList ComposeSeries Composition CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath Congruent Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphQ ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray Constants ConstrainedMax ConstrainedMin ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFilename ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean Control ControlActive ControlAlignment ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateDialog CreateDirectory CreateDocument CreateIntermediateDirectories CreatePalette CreatePalettePacket CreateScheduledTask CreateTemporary CreateWindow CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossingDetect CrossMatrix Csc Csch CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrentImage CurrentlySpeakingPacket CurrentValue CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition D DagumDistribution DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DataCompression DataDistribution DataRange DataReversed Date DateDelimiters DateDifference DateFunction DateList DateListLogPlot DateListPlot DatePattern DatePlus DateRange DateString DateTicksFormat DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayMatchQ DayName DayPlus DayRange DayRound DeBruijnGraph Debug DebugTag Decimal DeclareKnownSymbols DeclarePackage Decompose Decrement DedekindEta Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic Deinitialization Del Deletable Delete DeleteBorderComponents DeleteCases DeleteContents DeleteDirectory DeleteDuplicates DeleteFile DeleteSmallComponents DeleteWithContents DeletionWarning Delimiter DelimiterFlashTime DelimiterMatching Delimiters Denominator DensityGraphics DensityHistogram DensityPlot DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DescriptorStateSpace DesignMatrix Det DGaussianWavelet DiacriticalPositioning Diagonal DiagonalMatrix Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DifferenceDelta DifferenceOrder DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralGroup Dilation Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletCharacter DirichletConvolve DirichletDistribution DirichletL DirichletTransform DirichletWindow DisableConsolePrintPacket DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform DiscreteWaveletTransform Discriminant Disjunction Disk DiskBox DiskMatrix Dispatch DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentNotebook DominantColors DOSTextFormat Dot DotDashed DotEqual Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DSolve Dt DualLinearProgramming DualSystemsModel DumpGet DumpSave DuplicateFreeQ Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions E EccentricityCentrality EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeCost EdgeCount EdgeCoverQ EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData Eliminate EliminationOrder EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EnableConsolePrintPacket Enabled Encode End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfFile EndOfLine EndOfString EndPackage EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entropy EntropyFilter Environment Epilog Equal EqualColumns EqualRows EqualTilde EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerE EulerGamma EulerianGraphQ EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluationCell EvaluationCompletionAction EvaluationElements EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpToTrig ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalCall ExternalDataCharacterEncoding Extract ExtractArchive ExtremeValueDistribution FaceForm FaceGrids FaceGridsStyle Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail FailureDistribution False FARIMAProcess FEDisableConsolePrintPacket FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket Fibonacci FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileDate FileExistsQ FileExtension FileFormat FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileType FilledCurve FilledCurveBox Filling FillingStyle FillingTransform FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindArgMax FindArgMin FindClique FindClusters FindCurvePath FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEulerianCycle FindFaces FindFile FindFit FindGeneratingFunction FindGeoLocation FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMaximum FindMaximumFlow FindMaxValue FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindPermutation FindPostmanTour FindProcessParameters FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindThreshold FindVertexCover FindVertexCut Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstPassageTimeDistribution FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FittedModel FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlatTopWindow FlipView Floor FlushPrintOutputPacket Fold FoldList Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrequencySamplingFilterKernel FresnelC FresnelS Friday FrobeniusNumber FrobeniusSolve FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullOptions FullSimplify Function FunctionExpand FunctionInterpolation FunctionSpace FussellVeselyImportance GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins Gamma GammaDistribution GammaRegularized GapPenalty Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateConditions GeneratedCell GeneratedParameters GeneratingFunction Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDistance GeoGridPosition GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoPosition GeoPositionENU GeoPositionXYZ GeoProjectionData GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter Graph GraphAssortativity GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel GreatCircleDistance Greater GreaterEqual GreaterEqualLess GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterTilde Green Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain Gudermannian GumbelDistribution HaarWavelet HadamardMatrix HalfNormalDistribution HamiltonianGraphQ HammingDistance HammingWindow HankelH1 HankelH2 HankelMatrix HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash HashTable Haversine HazardFunction Head HeadCompose Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenSurface HighlightGraph HighlightImage HighpassFilter HigmanSimsGroupHS HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HitMissTransform HITSCentrality HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HotellingTSquareDistribution HoytDistribution HTMLSave Hue HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData I Identity IdentityMatrix If IgnoreCase Im Image Image3D Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageAspectRatio ImageAssemble ImageCache ImageCacheValid ImageCapture ImageChannels ImageClip ImageColorSpace ImageCompose ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDataPacket ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDistance ImageEffect ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageForestingComponents ImageForwardTransformation ImageHistogram ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarkers ImageMeasurements ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImageQ ImageRangeCache ImageReflect ImageRegion ImageResize ImageResolution ImageRotate ImageRotated ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions Implies Import ImportAutoReplacements ImportString ImprovementImportance In IncidenceGraph IncidenceList IncidenceMatrix IncludeConstantBasis IncludeFileExtension IncludePods IncludeSingularTerm Increment Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentUnit IndependentVertexSetQ Indeterminate IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers Infinity Infix Information Inherited InheritScope Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InlineCounterAssignments InlineCounterIncrements InlineRules Inner Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionPointObject InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Install InstallService InString Integer IntegerDigits IntegerExponent IntegerLength IntegerPart IntegerPartitions IntegerQ Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction InterpretTemplate InterquartileRange Interrupt InterruptSettings Intersection Interval IntervalIntersection IntervalMemberQ IntervalUnion Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHaversine InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InversePermutation InverseRadon InverseSeries InverseSurvivalFunction InverseWaveletTransform InverseWeierstrassP InverseZTransform Invisible InvisibleApplication InvisibleTimes IrreduciblePolynomialQ IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join Joined JoinedCurve JoinedCurveBox JoinForm JordanDecomposition JordanModelDecomposition K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelMixtureDistribution KernelObject Kernels Ket Khinchin KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnightTourGraph KnotData KnownUnitQ KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter Label Labeled LabeledSlider LabelingFunction LabelStyle LaguerreL LambdaComponents LambertW LanczosWindow LandauDistribution Language LanguageCategory LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCM LeafCount LeapYearQ LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessFullEqual LessGreater LessLess LessSlantEqual LessTilde LetterCharacter LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox LinearFilter LinearFractionalTransform LinearModelFit LinearOffsetFunction LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBreak LinebreakAdjustments LineBreakChart LineBreakWithin LineColor LineForm LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRead LinkReadHeld LinkReadyQ Links LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot Listen ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalClusteringCoefficient LocalizeVariables LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestAscendingSequence LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow Loopback LoopFreeGraphQ LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LyapunovSolve LyonsGroupLy MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules MangoldtLambda ManhattanDistance Manipulate Manipulator MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixPlot MatrixPower MatrixQ MatrixRank Max MaxBend MaxDetect MaxExtraBandwidths MaxExtraConditions MaxFeatures MaxFilter Maximize MaxIterations MaxMemoryUsed MaxMixtureKernels MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxValue MaxwellDistribution McLaughlinGroupMcL Mean MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter Median MedianDeviation MedianFilter Medium MeijerG MeixnerDistribution MemberQ MemoryConstrained MemoryInUse Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuPacket MenuSortingValue MenuStyle MenuView MergeDifferences Mesh MeshFunctions MeshRange MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation Method MethodOptions MexicanHatWavelet MeyerWavelet Min MinDetect MinFilter MinimalPolynomial MinimalStateSpaceModel Minimize Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingDataMethod MittagLefflerE MixedRadix MixedRadixQuantity MixtureDistribution Mod Modal Mode Modular ModularLambda Module Modulus MoebiusMu Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction Monday Monitor MonomialList MonomialOrder MonsterGroupM MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform Most MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovingAverage MovingMedian MoyalDistribution MultiedgeStyle MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution N NakagamiDistribution NameQ Names NamespaceBox Nand NArgMax NArgMin NBernoulliB NCache NDSolve NDSolveValue Nearest NearestFunction NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeMultinomialDistribution NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestList NestWhile NestWhileList NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextPrime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants None NonlinearModelFit NonlocalMeansFilter NonNegative NonPositive Nor NorlundB Norm Normal NormalDistribution NormalGrouping Normalize NormalizedSquaredEuclideanDistance NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde NotHumpDownHump NotHumpEqual NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms Null NullRecords NullSpace NullWords Number NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator NumberSigns NumberString Numerator NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OddQ Off Offset OLEData On ONanGroupON OneIdentity Opacity Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering Orderless OrnsteinUhlenbeckProcess Orthogonalize Out Outer OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OwenT OwnValues PackingMethod PaddedForm Padding PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageWidth PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParetoDistribution Part PartialCorrelationFunction PartialD ParticleData Partition PartitionsP PartitionsQ ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PerformanceGoal PeriodicInterpolation Periodogram PeriodogramArray PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PERTDistribution PetersenGraph PhaseMargins Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest Pink Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarGraphQ Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangePadding PlotRegion PlotStyle Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox PointBox PointFigureChart PointForm PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonBox PolygonBoxOptions PolygonHoleScale PolygonIntersections PolygonScale PolyhedronData PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position Positive PositiveDefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement PredictionRoot PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependTo PreserveImageOptions Previous PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitiveRoot PrincipalComponents PrincipalValue Print PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessEstimator ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions QBinomial QFactorial QGamma QHypergeometricPFQ QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ Quantile QuantilePlot Quantity QuantityForm QuantityMagnitude QuantityQ QuantityUnit Quartics QuartileDeviation Quartiles QuartileSkewness QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Random RandomChoice RandomComplex RandomFunction RandomGraph RandomImage RandomInteger RandomPermutation RandomPrime RandomReal RandomSample RandomSeed RandomVariate RandomWalkProcess Range RangeFilter RangeSpecification RankedMax RankedMin Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios Raw RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadList ReadProtected Real RealBlockDiagonalForm RealDigits RealExponent Reals Reap Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate RegionBinarize RegionFunction RegionPlot RegionPlot3D RegularExpression Regularization Reinstall Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot Remove RemoveAlphaChannel RemoveAsynchronousTask Removed RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart Repeated RepeatedNull RepeatedString Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated Resampling Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask Residue Resolve Rest Resultant ResumePacket Return ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulerUnits Run RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity SameQ SameTest SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveDefinitions SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTaskActiveQ ScheduledTaskData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition Sec Sech SechDistribution SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemialgebraicComponentInstances SendMail Sequence SequenceAlignment SequenceForm SequenceHold SequenceLimit Series SeriesCoefficient SeriesData SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPrecision SetProperty SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share Sharpen ShearingMatrix ShearingTransform ShenCastanMatrix Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortUpArrow Show ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiegelTheta SiegelTukeyTest Sign Signature SignedRankTest SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution Skip SliceDistribution Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDelayCompensator SmithWatermanSimilarity SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SocialMediaData Socket SokalSneathDissimilarity Solve SolveAlways SolveDelayed Sort SortBy Sound SoundAndGraphics SoundNote SoundVolume Sow Space SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution Speak SpeakTextPacket SpearmanRankTest SpearmanRho Spectrogram SpectrogramArray Specularity SpellingCorrection SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackInhibit StandardDeviation StandardDeviationFilter StandardForm Standardize StandbyDistribution Star StarGraph StartAsynchronousTask StartingStepSize StartOfLine StartOfString StartScheduledTask StartupSound StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringCount StringDrop StringExpression StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPosition StringQ StringReplace StringReplaceList StringReplacePart StringReverse StringRotateLeft StringRotateRight StringSkeleton StringSplit StringTake StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleBoxOptions StyleData StyleDefinitions StyleForm StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subset SubsetEqual Subsets SubStar Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde SuchThat Sum SumConvergence Sunday SuperDagger SuperMinus SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceColor SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SystemDialogInput SystemException SystemHelpPath SystemInformation SystemInformationData SystemOpen SystemOptions SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemStub Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeWhile Tally Tan Tanh TargetFunctions TargetUnits TautologyQ TelegraphProcess TemplateBox TemplateBoxOptions TemplateSlotSequence TemporalData Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCell TextClipboardType TextData TextForm TextJustification TextLine TextPacket TextParagraph TextRecognize TextRendering TextStyle Texture TextureCoordinateFunction TextureCoordinateScaling Therefore ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreeJSymbol Threshold Through Throw Thumbnail Thursday Ticks TicksStyle Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint Times TimesBy TimeSeriesForecast TimeSeriesInvertibility TimeUsed TimeValue TimeZone Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate ToDiscreteTimeModel ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform TopologicalSort ToRadicals ToRules ToString Total TotalHeight TotalVariationFilter TotalWidth TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField Translate TranslationTransform TransparentColor Transpose TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle TriangleWave TriangularDistribution Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean True TrueQ TruncatedDistribution TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow Tuples TuranGraph TuringMachine Transparent UnateQ Uncompress Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UndirectedEdge UndirectedGraph UndirectedGraphQ UndocumentedTestFEParserPacket UndocumentedTestGetSelectionPacket Unequal Unevaluated UniformDistribution UniformGraphDistribution UniformSumDistribution Uninstall Union UnionPlus Unique UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitTriangle UnitVector Unprotect UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpValues URL URLFetch URLFetchAsynchronous URLSave URLSaveAsynchronous UseGraphicsRange Using UsingFrontEnd V2Get ValidationLength Value ValueBox ValueBoxOptions ValueForm ValueQ ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerifyConvergence VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoigtDistribution VonMisesDistribution WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeberE Wedge Wednesday WeibullDistribution WeierstrassHalfPeriods WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WilksW WilksWTest WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult Word WordBoundary WordCharacter WordData WordSearch WordSeparators WorkingPrecision Write WriteString Wronskian XMLElement XMLObject Xnor Xor Yellow YuleDissimilarity ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZipfDistribution ZTest ZTransform $Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AssertFunction $Assumptions $AsynchronousTask $BaseDirectory $BatchInput $BatchOutput $BoxForms $ByteOrdering $Canceled $CharacterEncoding $CharacterEncodings $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $CreationDate $CurrentLink $DateStringFormat $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $Epilog $ExportFormats $Failed $FinancialDataSource $FormatType $FrontEnd $FrontEndSession $GeoLocation $HistoryLength $HomeDirectory $HTTPCookies $IgnoreEOF $ImagingDevices $ImportFormats $InitialDirectory $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $ModuleNumber $NetworkLicense $NewMessage $NewSymbol $Notebooks $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $PipeSupported $Post $Pre $PreferencesDirectory $PrePrint $PreRead $PrintForms $PrintLiteral $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $RandomState $RecursionLimit $ReleaseNumber $RootDirectory $ScheduledTask $ScriptCommandLine $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemWordLength $TemporaryDirectory $TemporaryPrefix $TextStyle $TimedOut $TimeUnit $TimeZone $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $Urgent $UserAddOnsDirectory $UserBaseDirectory $UserDocumentsDirectory $UserName $Version $VersionNumber",c:[{cN:"comment",b:/\(\*/,e:/\*\)/},e.ASM,e.QSM,e.CNM,{cN:"list",b:/\{/,e:/\}/,i:/:/}]} -}),hljs.registerLanguage("php",function(e){var t={cN:"variable",b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},n={cN:"preprocessor",b:/<\?(php)?|\?>/},i={cN:"string",c:[e.BE,n],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},r={v:[e.BNM,e.CNM]};return{cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.CLCM,e.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"},n]},{cN:"comment",b:"__halt_compiler.+?;",eW:!0,k:"__halt_compiler",l:e.UIR},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[e.BE]},n,t,{cN:"function",bK:"function",e:/[;{]/,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",t,e.CBLCLM,i,r]}]},{cN:"class",bK:"class interface",e:"{",i:/[:\(\$"]/,c:[{bK:"extends implements",r:10},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},i,r]}}),hljs.registerLanguage("haskell",function(e){var t={cN:"comment",v:[{b:"--",e:"$"},{b:"{-",e:"-}",c:["self"]}]},n={cN:"pragma",b:"{-#",e:"#-}"},i={cN:"preprocessor",b:"^#",e:"$"},r={cN:"type",b:"\\b[A-Z][\\w']*",r:0},o={cN:"container",b:"\\(",e:"\\)",i:'"',c:[n,t,i,{cN:"type",b:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TM,{b:"[_a-z][\\w']*"})]},a={cN:"container",b:"{",e:"}",c:o.c};return{k:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",c:[{cN:"module",b:"\\bmodule\\b",e:"where",k:"module where",c:[o,t],i:"\\W\\.|;"},{cN:"import",b:"\\bimport\\b",e:"$",k:"import|0 qualified as hiding",c:[o,t],i:"\\W\\.|;"},{cN:"class",b:"^(\\s*)?(class|instance)\\b",e:"where",k:"class family instance where",c:[r,o,t]},{cN:"typedef",b:"\\b(data|(new)?type)\\b",e:"$",k:"data family type newtype deriving",c:[n,t,r,o,a]},{cN:"default",bK:"default",e:"$",c:[r,o,t]},{cN:"infix",bK:"infix infixl infixr",e:"$",c:[e.CNM,t]},{cN:"foreign",b:"\\bforeign\\b",e:"$",k:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",c:[r,e.QSM,t]},{cN:"shebang",b:"#!\\/usr\\/bin\\/env runhaskell",e:"$"},n,t,i,e.QSM,e.CNM,r,e.inherit(e.TM,{b:"^[_a-z][\\w']*"}),{b:"->|<-"}]}}),hljs.registerLanguage("1c",function(e){var t="[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*",n="возврат дата для если и или иначе иначеесли исключение конецесли конецпопытки конецпроцедуры конецфункции конеццикла константа не перейти перем перечисление по пока попытка прервать продолжить процедура строка тогда фс функция цикл число экспорт",i="ansitooem oemtoansi ввестивидсубконто ввестидату ввестизначение ввестиперечисление ввестипериод ввестиплансчетов ввестистроку ввестичисло вопрос восстановитьзначение врег выбранныйплансчетов вызватьисключение датагод датамесяц датачисло добавитьмесяц завершитьработусистемы заголовоксистемы записьжурналарегистрации запуститьприложение зафиксироватьтранзакцию значениевстроку значениевстрокувнутр значениевфайл значениеизстроки значениеизстрокивнутр значениеизфайла имякомпьютера имяпользователя каталогвременныхфайлов каталогиб каталогпользователя каталогпрограммы кодсимв командасистемы конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лев лог лог10 макс максимальноеколичествосубконто мин монопольныйрежим названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найти найтипомеченныенаудаление найтиссылки началопериодаби началостандартногоинтервала начатьтранзакцию начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода нрег обработкаожидания окр описаниеошибки основнойжурналрасчетов основнойплансчетов основнойязык открытьформу открытьформумодально отменитьтранзакцию очиститьокносообщений периодстр полноеимяпользователя получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта прав праводоступа предупреждение префиксавтонумерации пустаястрока пустоезначение рабочаядаттьпустоезначение рабочаядата разделительстраниц разделительстрок разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо сигнал симв символтабуляции создатьобъект сокрл сокрлп сокрп сообщить состояние сохранитьзначение сред статусвозврата стрдлина стрзаменить стрколичествострок стрполучитьстроку стрчисловхождений сформироватьпозициюдокумента счетпокоду текущаядата текущеевремя типзначения типзначениястр удалитьобъекты установитьтана установитьтапо фиксшаблон формат цел шаблон",r={cN:"dquote",b:'""'},o={cN:"string",b:'"',e:'"|$',c:[r]},a={cN:"string",b:"\\|",e:'"|$',c:[r]};return{cI:!0,l:t,k:{keyword:n,built_in:i},c:[e.CLCM,e.NM,o,a,{cN:"function",b:"(процедура|функция)",e:"$",l:t,k:"процедура функция",c:[e.inherit(e.TM,{b:t}),{cN:"tail",eW:!0,c:[{cN:"params",b:"\\(",e:"\\)",l:t,k:"знач",c:[o,a]},{cN:"export",b:"экспорт",eW:!0,l:t,k:"экспорт",c:[e.CLCM]}]},e.CLCM]},{cN:"preprocessor",b:"#",e:"$"},{cN:"date",b:"'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})'"}]}}),hljs.registerLanguage("python",function(e){var t={cN:"prompt",b:/^(>>>|\.\.\.) /},n={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[t],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[t],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},i={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},r={cN:"params",b:/\(/,e:/\)/,c:["self",t,i,n]},o={e:/:/,i:/[${=;\n]/,c:[e.UTM,r]};return{k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[t,i,n,e.HCM,e.inherit(o,{cN:"function",bK:"def",r:10}),e.inherit(o,{cN:"class",bK:"class"}),{cN:"decorator",b:/@/,e:/$/},{b:/\b(print|exec)\(/}]}}),hljs.registerLanguage("smalltalk",function(e){var t="[a-z][a-zA-Z0-9_]*",n={cN:"char",b:"\\$.{1}"},i={cN:"symbol",b:"#"+e.UIR};return{k:"self super nil true false thisContext",c:[{cN:"comment",b:'"',e:'"'},e.ASM,{cN:"class",b:"\\b[A-Z][A-Za-z0-9_]*",r:0},{cN:"method",b:t+":",r:0},e.CNM,i,n,{cN:"localvars",b:"\\|[ ]*"+t+"([ ]+"+t+")*[ ]*\\|",rB:!0,e:/\|/,i:/\S/,c:[{b:"(\\|[ ]*)?"+t}]},{cN:"array",b:"\\#\\(",e:"\\)",c:[e.ASM,n,e.CNM,i]}]}}),hljs.registerLanguage("tex",function(){var e={cN:"command",b:"\\\\[a-zA-Zа-яА-я]+[\\*]?"},t={cN:"command",b:"\\\\[^a-zA-Zа-яА-я0-9]"},n={cN:"special",b:"[{}\\[\\]\\~]",r:0};return{c:[{b:"\\\\[a-zA-Zа-яА-я]+[\\*]? *= *-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",rB:!0,c:[e,t,{cN:"number",b:" *=",e:"-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",eB:!0}],r:10},e,t,n,{cN:"formula",b:"\\$\\$",e:"\\$\\$",c:[e,t,n],r:0},{cN:"formula",b:"\\$",e:"\\$",c:[e,t,n],r:0},{cN:"comment",b:"%",e:"$",r:0}]}}),hljs.registerLanguage("actionscript",function(e){var t="[a-zA-Z_$][a-zA-Z0-9_$]*",n="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)",i={cN:"rest_arg",b:"[.]{3}",e:t,r:10};return{k:{keyword:"as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",literal:"true false null undefined"},c:[e.ASM,e.QSM,e.CLCM,e.CBLCLM,e.CNM,{cN:"package",bK:"package",e:"{",c:[e.TM]},{cN:"class",bK:"class interface",e:"{",c:[{bK:"extends implements"},e.TM]},{cN:"preprocessor",bK:"import include",e:";"},{cN:"function",bK:"function",e:"[{;]",i:"\\S",c:[e.TM,{cN:"params",b:"\\(",e:"\\)",c:[e.ASM,e.QSM,e.CLCM,e.CBLCLM,i]},{cN:"type",b:":",e:n,r:10}]}]}}),hljs.registerLanguage("sql",function(e){return{cI:!0,i:/[<>]/,c:[{cN:"operator",b:"\\b(begin|end|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant|merge)\\b(?!:)",e:";",eW:!0,k:{keyword:"all partial global month current_timestamp using go revoke smallint indicator end-exec disconnect zone with character assertion to add current_user usage input local alter match collate real then rollback get read timestamp session_user not integer bit unique day minute desc insert execute like ilike|2 level decimal drop continue isolation found where constraints domain right national some module transaction relative second connect escape close system_user for deferred section cast current sqlstate allocate intersect deallocate numeric public preserve full goto initially asc no key output collation group by union session both last language constraint column of space foreign deferrable prior connection unknown action commit view or first into float year primary cascaded except restrict set references names table outer open select size are rows from prepare distinct leading create only next inner authorization schema corresponding option declare precision immediate else timezone_minute external varying translation true case exception join hour default double scroll value cursor descriptor values dec fetch procedure delete and false int is describe char as at in varchar null trailing any absolute current_time end grant privileges when cross check write current_date pad begin temporary exec time update catalog user sql date on identity timezone_hour natural whenever interval work order cascade diagnostics nchar having left call do handler load replace truncate start lock show pragma exists number trigger if before after each row merge matched database",aggregate:"count sum min max avg"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM]},e.CBLCLM,{cN:"comment",b:"--",e:"$"}]}}),hljs.registerLanguage("handlebars",function(){var e="each in with if else unless bindattr action collection debugger log outlet template unbound view yield";return{cI:!0,sL:"xml",subLanguageMode:"continuous",c:[{cN:"expression",b:"{{",e:"}}",c:[{cN:"begin-block",b:"#[a-zA-Z- .]+",k:e},{cN:"string",b:'"',e:'"'},{cN:"end-block",b:"\\/[a-zA-Z- .]+",k:e},{cN:"variable",b:"[a-zA-Z-.]+",k:e}]}]}}),hljs.registerLanguage("vala",function(e){return{k:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object",literal:"false true null"},c:[{cN:"class",bK:"class interface delegate namespace",e:"{",i:"[^,:\\n\\s\\.]",c:[e.UTM]},e.CLCM,e.CBLCLM,{cN:"string",b:'"""',e:'"""',r:5},e.ASM,e.QSM,e.CNM,{cN:"preprocessor",b:"^#",e:"$",r:2},{cN:"constant",b:" [A-Z_]+ ",r:0}]}}),hljs.registerLanguage("ini",function(e){return{cI:!0,i:/\S/,c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:!0,k:"on off true false yes no",c:[e.QSM,e.NM],r:0}]}]}}),hljs.registerLanguage("livecodeserver",function(e){var t={cN:"variable",b:"\\b[gtps][A-Z]+[A-Za-z0-9_\\-]*\\b|\\$_[A-Z]+",r:0},n={cN:"comment",e:"$",v:[e.CBLCLM,e.HCM,{b:"--"},{b:"[^:]//"}]},i=e.inherit(e.TM,{v:[{b:"\\b_*rig[A-Z]+[A-Za-z0-9_\\-]*"},{b:"\\b_[a-z0-9\\-]+"}]}),r=e.inherit(e.TM,{b:"\\b([A-Za-z0-9_\\-]+)\\b"});return{cI:!1,k:{keyword:"after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if",constant:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",operator:"div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg base64Decode base64Encode baseConvert binaryDecode binaryEncode byteToNum cachedURL cachedURLs charToNum cipherNames commandNames compound compress constantNames cos date dateFormat decompress directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames global globals hasMemory hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge millisec millisecs millisecond milliseconds min monthNames num number numToByte numToChar offset open openfiles openProcesses openProcessIDs openSockets paramCount param params peerAddress pendingMessages platform processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_Execute revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sec secs seconds sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName tick ticks time to toLower toUpper transpose trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus value variableNames version waitDepth weekdayNames wordOffset add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load multiply socket process post seek rel relative read from process rename replace require resetAll revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split subtract union unload wait write"},c:[t,{cN:"keyword",b:"\\bend\\sif\\b"},{cN:"function",bK:"function",e:"$",c:[t,r,e.ASM,e.QSM,e.BNM,e.CNM,i]},{cN:"function",bK:"end",e:"$",c:[r,i]},{cN:"command",bK:"command on",e:"$",c:[t,r,e.ASM,e.QSM,e.BNM,e.CNM,i]},{cN:"command",bK:"end",e:"$",c:[r,i]},{cN:"preprocessor",b:"<\\?rev|<\\?lc|<\\?livecode",r:10},{cN:"preprocessor",b:"<\\?"},{cN:"preprocessor",b:"\\?>"},n,e.ASM,e.QSM,e.BNM,e.CNM,i],i:";$|^\\[|^="}}),hljs.registerLanguage("d",function(e){var t={keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},n="(0|[1-9][\\d_]*)",i="(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)",r="0[bB][01_]+",o="([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)",a="0[xX]"+o,s="([eE][+-]?"+i+")",l="("+i+"(\\.\\d*|"+s+")|\\d+\\."+i+i+"|\\."+n+s+"?)",c="(0[xX]("+o+"\\."+o+"|\\.?"+o+")[pP][+-]?"+i+")",u="("+n+"|"+r+"|"+a+")",d="("+c+"|"+l+")",p="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",f={cN:"number",b:"\\b"+u+"(L|u|U|Lu|LU|uL|UL)?",r:0},h={cN:"number",b:"\\b("+d+"([fF]|L|i|[fF]i|Li)?|"+u+"(i|[fF]i|Li))",r:0},m={cN:"string",b:"'("+p+"|.)",e:"'",i:"."},g={b:p,r:0},v={cN:"string",b:'"',c:[g],e:'"[cwd]?'},b={cN:"string",b:'[rq]"',e:'"[cwd]?',r:5},y={cN:"string",b:"`",e:"`[cwd]?"},x={cN:"string",b:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',r:10},w={cN:"string",b:'q"\\{',e:'\\}"'},S={cN:"shebang",b:"^#!",e:"$",r:5},C={cN:"preprocessor",b:"#(line)",e:"$",r:5},T={cN:"keyword",b:"@[a-zA-Z_][a-zA-Z_\\d]*"},E={cN:"comment",b:"\\/\\+",c:["self"],e:"\\+\\/",r:10};return{l:e.UIR,k:t,c:[e.CLCM,e.CBLCLM,E,x,v,b,y,w,h,f,m,S,C,T]}}),hljs.registerLanguage("vbnet",function(e){return{cI:!0,k:{keyword:"addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor",built_in:"boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort",literal:"true false nothing"},i:"//|{|}|endif|gosub|variant|wend",c:[e.inherit(e.QSM,{c:[{b:'""'}]}),{cN:"comment",b:"'",e:"$",rB:!0,c:[{cN:"xmlDocTag",b:"'''|"},{cN:"xmlDocTag",b:"?",e:">"}]},e.CNM,{cN:"preprocessor",b:"#",e:"$",k:"if else elseif end region externalsource"}]}}),hljs.registerLanguage("axapta",function(e){return{k:"false int abstract private char boolean static null if for true while long throw finally protected final return void enum else break new catch byte super case short default double public try this switch continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count order group by asc desc index hint like dispaly edit client server ttsbegin ttscommit str real date container anytype common div mod",c:[e.CLCM,e.CBLCLM,e.ASM,e.QSM,e.CNM,{cN:"preprocessor",b:"#",e:"$"},{cN:"class",bK:"class interface",e:"{",i:":",c:[{cN:"inheritance",bK:"extends implements",r:10},e.UTM]}]}}),hljs.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",n={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},i={b:"->{",e:"}"},r={cN:"variable",v:[{b:/\$\d/},{b:/[\$\%\@\*](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/},{b:/[\$\%\@\*][^\s\w{]/,r:0}]},o={cN:"comment",b:"^(__END__|__DATA__)",e:"\\n$",r:5},a=[e.BE,n,r],s=[r,e.HCM,o,{cN:"comment",b:"^\\=\\w",e:"\\=cut",eW:!0},i,{cN:"string",c:a,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,o,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"sub",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",r:5},{cN:"operator",b:"-\\w\\b",r:0}];return n.c=s,i.c=s,{k:t,c:s}}),hljs.registerLanguage("scala",function(e){var t={cN:"annotation",b:"@[A-Za-z]+"},n={cN:"string",b:'u?r?"""',e:'"""',r:10};return{k:"type yield lazy override def with val var false true sealed abstract private trait object null if for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws",c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"@[A-Za-z]+"}],r:10},e.CLCM,e.CBLCLM,n,e.ASM,e.QSM,{cN:"class",b:"((case )?class |object |trait )",e:"({|$)",i:":",k:"case class trait object",c:[{bK:"extends with",r:10},e.UTM,{cN:"params",b:"\\(",e:"\\)",c:[e.ASM,e.QSM,n,t]}]},e.CNM,t]}}),hljs.registerLanguage("cmake",function(e){return{cI:!0,k:{keyword:"add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_minimum_required cmake_policy configure_file create_test_sourcelist define_property else elseif enable_language enable_testing endforeach endfunction endif endmacro endwhile execute_process export find_file find_library find_package find_path find_program fltk_wrap_ui foreach function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install link_directories load_cache load_command macro mark_as_advanced message option output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_link_libraries try_compile try_run unset variable_watch while build_name exec_program export_library_dependencies install_files install_programs install_targets link_libraries make_directory remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or",operator:"equal less greater strless strgreater strequal matches"},c:[{cN:"envvar",b:"\\${",e:"}"},e.HCM,e.QSM,e.NM]}}),hljs.registerLanguage("ocaml",function(e){return{k:{keyword:"and as assert asr begin class constraint do done downto else end exception external false for fun function functor if in include inherit initializer land lazy let lor lsl lsr lxor match method mod module mutable new object of open or private rec ref sig struct then to true try type val virtual when while with parser value",built_in:"bool char float int list unit array exn option int32 int64 nativeint format4 format6 lazy_t in_channel out_channel string"},i:/\/\//,c:[{cN:"string",b:'"""',e:'"""'},{cN:"comment",b:"\\(\\*",e:"\\*\\)",c:["self"]},{cN:"class",bK:"type",e:"\\(|=|$",c:[e.UTM]},{cN:"annotation",b:"\\[<",e:">\\]"},e.CBLCLM,e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null}),e.CNM]}}),hljs.registerLanguage("autohotkey",function(e){var t={cN:"escape",b:"`[\\s\\S]"},n={cN:"comment",b:";",e:"$",r:0},i=[{cN:"built_in",b:"A_[a-zA-Z0-9]+"},{cN:"built_in",bK:"ComSpec Clipboard ClipboardAll ErrorLevel"}];return{cI:!0,k:{keyword:"Break Continue Else Gosub If Loop Return While",literal:"A true false NOT AND OR"},c:i.concat([t,e.inherit(e.QSM,{c:[t]}),n,{cN:"number",b:e.NR,r:0},{cN:"var_expand",b:"%",e:"%",i:"\\n",c:[t]},{cN:"label",c:[t],v:[{b:'^[^\\n";]+::(?!=)'},{b:'^[^\\n";]+:(?!=)',r:0}]},{b:",\\s*,",r:10}])}}),hljs.registerLanguage("objectivec",function(e){var t={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign self synchronized id nonatomic super unichar IBOutlet IBAction strong weak @private @protected @public @try @property @end @throw @catch @finally @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"NSString NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController UINavigationBar UINavigationController UITabBarController UIPopoverController UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor UIFont UIApplication NSNotFound NSNotificationCenter NSNotification UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection UIInterfaceOrientation MPMoviePlayerController dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,i="@interface @class @protocol @implementation";return{k:t,l:n,i:"",c:[e.CLCM,e.CBLCLM,e.CNM,e.QSM,{cN:"string",b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"},{cN:"preprocessor",b:"#import",e:"$",c:[{cN:"title",b:'"',e:'"'},{cN:"title",b:"<",e:">"}]},{cN:"preprocessor",b:"#",e:"$"},{cN:"class",b:"("+i.split(" ").join("|")+")\\b",e:"({|$)",k:i,l:n,c:[e.UTM]},{cN:"variable",b:"\\."+e.UIR,r:0}]}}),hljs.registerLanguage("avrasm",function(e){return{cI:!0,k:{keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf"},c:[e.CBLCLM,{cN:"comment",b:";",e:"$",r:0},e.CNM,e.BNM,{cN:"number",b:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},e.QSM,{cN:"string",b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"},{cN:"label",b:"^[A-Za-z0-9_.$]+:"},{cN:"preprocessor",b:"#",e:"$"},{cN:"preprocessor",b:"\\.[a-zA-Z]+"},{cN:"localvars",b:"@[0-9]+"}]} -}),hljs.registerLanguage("vhdl",function(e){return{cI:!0,k:{keyword:"abs access after alias all and architecture array assert attribute begin block body buffer bus case component configuration constant context cover disconnect downto default else elsif end entity exit fairness file for force function generate generic group guarded if impure in inertial inout is label library linkage literal loop map mod nand new next nor not null of on open or others out package port postponed procedure process property protected pure range record register reject release rem report restrict restrict_guarantee return rol ror select sequence severity shared signal sla sll sra srl strong subtype then to transport type unaffected units until use variable vmode vprop vunit wait when while with xnor xor",typename:"boolean bit character severity_level integer time delay_length natural positive string bit_vector file_open_kind file_open_status std_ulogic std_ulogic_vector std_logic std_logic_vector unsigned signed boolean_vector integer_vector real_vector time_vector"},i:"{",c:[e.CBLCLM,{cN:"comment",b:"--",e:"$"},e.QSM,e.CNM,{cN:"literal",b:"'(U|X|0|1|Z|W|L|H|-)'",c:[e.BE]},{cN:"attribute",b:"'[A-Za-z](_?[A-Za-z0-9])*",c:[e.BE]}]}}),hljs.registerLanguage("coffeescript",function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",reserved:"case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf",built_in:"npm require console print module exports global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",i=e.inherit(e.TM,{b:n}),r={cN:"subst",b:/#\{/,e:/}/,k:t},o=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,r]},{b:/"/,e:/"/,c:[e.BE,r]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[r,e.HCM]},{b:"//[gim]*",r:0},{b:"/\\S(\\\\.|[^\\n])*?/[gim]*(?=\\s|\\W|$)"}]},{cN:"property",b:"@"+n},{b:"`",e:"`",eB:!0,eE:!0,sL:"javascript"}];return r.c=o,{k:t,c:o.concat([{cN:"comment",b:"###",e:"###"},e.HCM,{cN:"function",b:"("+n+"\\s*=\\s*)?(\\(.*\\))?\\s*\\B[-=]>",e:"[-=]>",rB:!0,c:[i,{cN:"params",b:"\\(",rB:!0,c:[{b:/\(/,e:/\)/,k:t,c:["self"].concat(o)}]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[i]},i]},{cN:"attribute",b:n+":",e:":",rB:!0,eE:!0,r:0}])}}),hljs.registerLanguage("mizar",function(){return{k:["environ vocabularies notations constructors definitions registrations theorems schemes requirements","begin end definition registration cluster existence pred func defpred deffunc theorem proof","let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from","be being by means equals implies iff redefine define now not or attr is mode suppose per cases set","thesis contradiction scheme reserve struct","correctness compatibility coherence symmetry assymetry reflexivity irreflexivity","connectedness uniqueness commutativity idempotence involutiveness projectivity"].join(" "),c:[{cN:"comment",b:"::",e:"$"}]}}),hljs.registerLanguage("nginx",function(e){var t={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},n={eW:!0,l:"[a-z/_]+",k:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,t],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{cN:"url",b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0},{cN:"regexp",c:[e.BE,t],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},t]};return{c:[e.HCM,{b:e.UIR+"\\s",e:";|{",rB:!0,c:[e.inherit(e.UTM,{starts:n})],r:0}],i:"[^\\s\\}]"}}),hljs.registerLanguage("erlang-repl",function(e){return{k:{special_functions:"spawn spawn_link self",reserved:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},c:[{cN:"prompt",b:"^[0-9]+> ",r:10},{cN:"comment",b:"%",e:"$"},{cN:"number",b:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",r:0},e.ASM,e.QSM,{cN:"constant",b:"\\?(::)?([A-Z]\\w*(::)?)+"},{cN:"arrow",b:"->"},{cN:"ok",b:"ok"},{cN:"exclamation_mark",b:"!"},{cN:"function_or_atom",b:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",r:0},{cN:"variable",b:"[A-Z][a-zA-Z0-9_']*",r:0}]}}),hljs.registerLanguage("r",function(e){var t="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{c:[e.HCM,{b:t,l:t,k:{keyword:"function if in break next repeat else for return switch while try tryCatch|10 stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...|10",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},r:0},{cN:"number",b:"0[xX][0-9a-fA-F]+[Li]?\\b",r:0},{cN:"number",b:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",r:0},{cN:"number",b:"\\d+\\.(?!\\d)(?:i\\b)?",r:0},{cN:"number",b:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{cN:"number",b:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{b:"`",e:"`",r:0},{cN:"string",c:[e.BE],v:[{b:'"',e:'"'},{b:"'",e:"'"}]}]}}),hljs.registerLanguage("json",function(e){var t={literal:"true false null"},n=[e.QSM,e.CNM],i={cN:"value",e:",",eW:!0,eE:!0,c:n,k:t},r={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:!0,eE:!0,c:[e.BE],i:"\\n",starts:i}],i:"\\S"},o={b:"\\[",e:"\\]",c:[e.inherit(i,{cN:null})],i:"\\S"};return n.splice(n.length,0,r,o),{c:n,k:t,i:"\\S"}}),hljs.registerLanguage("django",function(){var e={cN:"filter",b:/\|[A-Za-z]+\:?/,k:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone",c:[{cN:"argument",b:/"/,e:/"/},{cN:"argument",b:/'/,e:/'/}]};return{cI:!0,sL:"xml",subLanguageMode:"continuous",c:[{cN:"template_comment",b:/\{%\s*comment\s*%}/,e:/\{%\s*endcomment\s*%}/},{cN:"template_comment",b:/\{#/,e:/#}/},{cN:"template_tag",b:/\{%/,e:/%}/,k:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor in ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup by as ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim",c:[e]},{cN:"variable",b:/\{\{/,e:/}}/,c:[e]}]}}),hljs.registerLanguage("delphi",function(e){var t="exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure",n={cN:"comment",v:[{b:/\{/,e:/\}/,r:0},{b:/\(\*/,e:/\*\)/,r:10}]},i={cN:"string",b:/'/,e:/'/,c:[{b:/''/}]},r={cN:"string",b:/(#\d+)+/},o={b:e.IR+"\\s*=\\s*class\\s*\\(",rB:!0,c:[e.TM]},a={cN:"function",bK:"function constructor destructor procedure",e:/[:;]/,k:"function constructor|10 destructor|10 procedure|10",c:[e.TM,{cN:"params",b:/\(/,e:/\)/,k:t,c:[i,r]},n]};return{cI:!0,k:t,i:/("|\$[G-Zg-z]|\/\*|<\/)/,c:[n,e.CLCM,i,r,e.NM,o,a]}}),hljs.registerLanguage("vbscript",function(e){return{cI:!0,k:{keyword:"call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto",built_in:"lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion scriptengine split scriptengineminorversion cint sin datepart ltrim sqr scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw chrw regexp server response request cstr err",literal:"true false null nothing empty"},i:"//",c:[e.inherit(e.QSM,{c:[{b:'""'}]}),{cN:"comment",b:/'/,e:/$/,r:0},e.CNM]}}),hljs.registerLanguage("oxygene",function(e){var t="abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained",n={cN:"comment",b:"{",e:"}",r:0},i={cN:"comment",b:"\\(\\*",e:"\\*\\)",r:10},r={cN:"string",b:"'",e:"'",c:[{b:"''"}]},o={cN:"string",b:"(#\\d+)+"},a={cN:"function",bK:"function constructor destructor procedure method",e:"[:;]",k:"function constructor|10 destructor|10 procedure|10 method|10",c:[e.TM,{cN:"params",b:"\\(",e:"\\)",k:t,c:[r,o]},n,i]};return{cI:!0,k:t,i:'("|\\$[G-Zg-z]|\\/\\*|)',c:[n,i,e.CLCM,r,o,e.NM,a,{cN:"class",b:"=\\bclass\\b",e:"end;",k:t,c:[r,o,n,i,e.CLCM,a]}]}}),hljs.registerLanguage("mel",function(e){return{k:"int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration panelHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType selectedNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFromName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform",i:"",c:[e.CNM,e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE]},{cN:"variable",v:[{b:"\\$\\d"},{b:"[\\$\\%\\@](\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)"},{b:"\\*(\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)",r:0}]},e.CLCM,e.CBLCLM]}}),hljs.registerLanguage("dos",function(){return{cI:!0,k:{flow:"if else goto for in do call exit not exist errorlevel defined equ neq lss leq gtr geq",keyword:"shift cd dir echo setlocal endlocal set pause copy",stream:"prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux",winutils:"ping net ipconfig taskkill xcopy ren del"},c:[{cN:"envvar",b:"%%[^ ]"},{cN:"envvar",b:"%[^ ]+?%"},{cN:"envvar",b:"![^ ]+?!"},{cN:"number",b:"\\b\\d+",r:0},{cN:"comment",b:"@?rem",e:"$"}]}}),hljs.registerLanguage("apache",function(e){var t={cN:"number",b:"[\\$%]\\d+"};return{cI:!0,c:[e.HCM,{cN:"tag",b:"?",e:">"},{cN:"keyword",b:/\w+/,r:0,k:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"sqbracket",b:"\\s\\[",e:"\\]$"},{cN:"cbracket",b:"[\\$%]\\{",e:"\\}",c:["self",t]},t,e.QSM]}}],i:/\S/}}),hljs.registerLanguage("scss",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",n={cN:"function",b:t+"\\(",e:"\\)",c:["self",e.NM,e.ASM,e.QSM]},i={cN:"hexcolor",b:"#[0-9A-Fa-f]+"};return{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{cN:"value",eW:!0,eE:!0,c:[n,i,e.NM,e.QSM,e.ASM,e.CBLCLM,{cN:"important",b:"!important"}]}},{cI:!0,i:"[=/|']",c:[e.CLCM,e.CBLCLM,{cN:"function",b:t+"\\(",e:"\\)",c:["self",e.NM,e.ASM,e.QSM]},{cN:"id",b:"\\#[A-Za-z0-9_-]+",r:0},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"tag",b:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",r:0},{cN:"pseudo",b:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{cN:"pseudo",b:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},{cN:"attribute",b:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",i:"[^\\s]"},{cN:"value",b:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{cN:"value",b:":",e:";",c:[i,e.NM,e.QSM,e.ASM,{cN:"important",b:"!important"}]},{cN:"at_rule",b:"@",e:"[{;]",k:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",c:[n,e.QSM,e.ASM,i,e.NM,{cN:"preprocessor",b:"\\s[A-Za-z0-9_.-]+",r:0}]}]} -}),hljs.registerLanguage("applescript",function(e){var t=e.inherit(e.QSM,{i:""}),n={cN:"params",b:"\\(",e:"\\)",c:["self",e.CNM,t]},i=[{cN:"comment",b:"--",e:"$"},{cN:"comment",b:"\\(\\*",e:"\\*\\)",c:["self",{b:"--",e:"$"}]},e.HCM];return{k:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the then third through thru timeout times to transaction try until where while whose with without",constant:"AppleScript false linefeed return pi quote result space tab true",type:"alias application boolean class constant date file integer list number real record string text",command:"activate beep count delay launch log offset read round run say summarize write",property:"character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},c:[t,e.CNM,{cN:"type",b:"\\bPOSIX file\\b"},{cN:"command",b:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{cN:"constant",b:"\\b(text item delimiters|current application|missing value)\\b"},{cN:"keyword",b:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference))\\b"},{cN:"property",b:"\\b(POSIX path|(date|time) string|quoted form)\\b"},{cN:"function_start",bK:"on",i:"[${=;\\n]",c:[e.UTM,n]}].concat(i),i:"//"}}),hljs.registerLanguage("lasso",function(e){var t="[a-zA-Z_][a-zA-Z0-9_.]*",n="<\\?(lasso(script)?|=)",i="\\]|\\?>",r={literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null bytes list queue set stack staticarray tie local var variable global data self inherited",keyword:"error_code error_msg error_pop error_push error_reset cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},o={cN:"comment",b:"",r:0},a={cN:"preprocessor",b:"\\[noprocess\\]",starts:{cN:"markup",e:"\\[/noprocess\\]",rE:!0,c:[o]}},s={cN:"preprocessor",b:"\\[/noprocess|"+n},l={cN:"variable",b:"'"+t+"'"},c=[e.CLCM,{cN:"javadoc",b:"/\\*\\*!",e:"\\*/"},e.CBLCLM,e.inherit(e.CNM,{b:e.CNR+"|-?(infinity|nan)\\b"}),e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null}),{cN:"string",b:"`",e:"`"},{cN:"variable",v:[{b:"[#$]"+t},{b:"#",e:"\\d+",i:"\\W"}]},{cN:"tag",b:"::\\s*",e:t,i:"\\W"},{cN:"attribute",b:"\\.\\.\\.|-"+e.UIR},{cN:"subst",v:[{b:"->\\s*",c:[l]},{b:":=|/(?!\\w)=?|[-+*%=<>&|!?\\\\]+",r:0}]},{cN:"built_in",b:"\\.\\.?",r:0,c:[l]},{cN:"class",bK:"define",rE:!0,e:"\\(|=>",c:[e.inherit(e.TM,{b:e.UIR+"(=(?!>))?"})]}];return{aliases:["ls","lassoscript"],cI:!0,l:t+"|&[lg]t;",k:r,c:[{cN:"preprocessor",b:i,r:0,starts:{cN:"markup",e:"\\[|"+n,rE:!0,r:0,c:[o]}},a,s,{cN:"preprocessor",b:"\\[no_square_brackets",starts:{e:"\\[/no_square_brackets\\]",l:t+"|&[lg]t;",k:r,c:[{cN:"preprocessor",b:i,r:0,starts:{cN:"markup",e:n,rE:!0,c:[o]}},a,s].concat(c)}},{cN:"preprocessor",b:"\\[",r:0},{cN:"shebang",b:"^#!.+lasso9\\b",r:10}].concat(c)}}),hljs.registerLanguage("cpp",function(e){var t={keyword:"false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long throw volatile static protected bool template mutable if public friend do return goto auto void enum else break new extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary",built_in:"std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf"};return{aliases:["c"],k:t,i:"",c:[e.CLCM,e.CBLCLM,e.QSM,{cN:"string",b:"'\\\\?.",e:"'",i:"."},{cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},e.CNM,{cN:"preprocessor",b:"#",e:"$",c:[{b:"include\\s*<",e:">",i:"\\n"},e.CLCM]},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:t,r:10,c:["self"]}]}}),hljs.registerLanguage("matlab",function(e){var t=[e.CNM,{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]}];return{k:{keyword:"break case catch classdef continue else elseif end enumerated events for function global if methods otherwise parfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson"},i:'(//|"|#|/\\*|\\s+/\\w+)',c:[{cN:"function",bK:"function",e:"$",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)"},{cN:"params",b:"\\[",e:"\\]"}]},{cN:"transposed_variable",b:"[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)",e:"",r:0},{cN:"matrix",b:"\\[",e:"\\]'*[\\.']*",c:t,r:0},{cN:"cell",b:"\\{",e:"\\}'*[\\.']*",c:t,i:/:/},{cN:"comment",b:"\\%",e:"$"}].concat(t)}}),hljs.registerLanguage("scilab",function(e){var t=[e.CNM,{cN:"string",b:"'|\"",e:"'|\"",c:[e.BE,{b:"''"}]}];return{k:{keyword:"abort break case clear catch continue do elseif else endfunction end for functionglobal if pause return resume select try then while%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp errorexec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isemptyisinfisnan isvector lasterror length load linspace list listfiles log10 log2 logmax min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand realround sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tantype typename warning zeros matrix"},i:'("|#|/\\*|\\s+/\\w+)',c:[{cN:"function",bK:"function endfunction",e:"$",k:"function endfunction|10",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)"}]},{cN:"transposed_variable",b:"[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)",e:"",r:0},{cN:"matrix",b:"\\[",e:"\\]'*[\\.']*",r:0,c:t},{cN:"comment",b:"//",e:"$"}].concat(t)}}),hljs.registerLanguage("makefile",function(e){var t={cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]};return{c:[e.HCM,{b:/^\w+\s*\W*=/,rB:!0,r:0,starts:{cN:"constant",e:/\s*\W*=/,eE:!0,starts:{e:/$/,r:0,c:[t]}}},{cN:"title",b:/^[\w]+:\s*$/},{cN:"phony",b:/^\.PHONY:/,e:/$/,k:".PHONY",l:/[\.\w]+/},{b:/^\t+/,e:/$/,c:[e.QSM,t]}]}}),hljs.registerLanguage("asciidoc",function(){return{c:[{cN:"comment",b:"^/{4,}\\n",e:"\\n/{4,}$",r:10},{cN:"comment",b:"^//",e:"$",r:0},{cN:"title",b:"^\\.\\w.*$"},{b:"^[=\\*]{4,}\\n",e:"\\n^[=\\*]{4,}$",r:10},{cN:"header",b:"^(={1,5}) .+?( \\1)?$",r:10},{cN:"header",b:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$",r:10},{cN:"attribute",b:"^:.+?:",e:"\\s",eE:!0,r:10},{cN:"attribute",b:"^\\[.+?\\]$",r:0},{cN:"blockquote",b:"^_{4,}\\n",e:"\\n_{4,}$",r:10},{cN:"code",b:"^[\\-\\.]{4,}\\n",e:"\\n[\\-\\.]{4,}$",r:10},{b:"^\\+{4,}\\n",e:"\\n\\+{4,}$",c:[{b:"<",e:">",sL:"xml",r:0}],r:10},{cN:"bullet",b:"^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+"},{cN:"label",b:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",r:10},{cN:"strong",b:"\\B\\*(?![\\*\\s])",e:"(\\n{2}|\\*)",c:[{b:"\\\\*\\w",r:0}]},{cN:"emphasis",b:"\\B'(?!['\\s])",e:"(\\n{2}|')",c:[{b:"\\\\'\\w",r:0}],r:0},{cN:"emphasis",b:"_(?![_\\s])",e:"(\\n{2}|_)",r:0},{cN:"smartquote",b:"``.+?''",r:10},{cN:"smartquote",b:"`.+?'",r:10},{cN:"code",b:"(`.+?`|\\+.+?\\+)",r:0},{cN:"code",b:"^[ \\t]",e:"$",r:0},{cN:"horizontal_rule",b:"^'{3,}[ \\t]*$",r:10},{b:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]",rB:!0,c:[{b:"(link|image:?):",r:0},{cN:"link_url",b:"\\w",e:"[^\\[]+",r:0},{cN:"link_label",b:"\\[",e:"\\]",eB:!0,eE:!0,r:0}],r:10}]}}),hljs.registerLanguage("parser3",function(e){return{sL:"xml",r:0,c:[{cN:"comment",b:"^#",e:"$"},{cN:"comment",b:"\\^rem{",e:"}",r:10,c:[{b:"{",e:"}",c:["self"]}]},{cN:"preprocessor",b:"^@(?:BASE|USE|CLASS|OPTIONS)$",r:10},{cN:"title",b:"@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"},{cN:"variable",b:"\\$\\{?[\\w\\-\\.\\:]+\\}?"},{cN:"keyword",b:"\\^[\\w\\-\\.\\:]+"},{cN:"number",b:"\\^#[0-9a-fA-F]+"},e.CNM]}}),hljs.registerLanguage("clojure",function(e){var t={built_in:"def cond apply if-not if-let if not not= = < < > <= <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},n="[a-zA-Z_0-9\\!\\.\\?\\-\\+\\*\\/\\<\\=\\>\\&\\#\\$';]+",i="[\\s:\\(\\{]+\\d+(\\.\\d+)?",r={cN:"number",b:i,r:0},o=e.inherit(e.QSM,{i:null}),a={cN:"comment",b:";",e:"$",r:0},s={cN:"collection",b:"[\\[\\{]",e:"[\\]\\}]"},l={cN:"comment",b:"\\^"+n},c={cN:"comment",b:"\\^\\{",e:"\\}"},u={cN:"attribute",b:"[:]"+n},d={cN:"list",b:"\\(",e:"\\)"},p={eW:!0,k:{literal:"true false nil"},r:0},f={k:t,l:n,cN:"title",b:n,starts:p};return d.c=[{cN:"comment",b:"comment"},f,p],p.c=[d,o,l,c,a,u,s,r],s.c=[d,o,l,a,u,s,r],{i:/\S/,c:[a,d,{cN:"prompt",b:/^=> /,starts:{e:/\n\n|\Z/}}]}}),hljs.registerLanguage("go",function(e){var t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer",constant:"true false iota nil",typename:"bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],k:t,i:"",c:[e.CLCM,e.CBLCLM,e.QSM,{cN:"string",b:"'",e:"[^\\\\]'"},{cN:"string",b:"`",e:"`"},{cN:"number",b:"[^a-zA-Z_0-9](\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?",r:0},e.CNM]}}),define("highlightjs",function(e){return function(){var t;return t||e.hljs}}(this));var Markdown;if(Markdown="object"==typeof exports&&"function"==typeof require?exports:{},function(){function e(e){return e}function t(){return!1}function n(){}function i(){}n.prototype={chain:function(t,n){var i=this[t];if(!i)throw new Error("unknown hook "+t);this[t]=i===e?n:function(){var e=Array.prototype.slice.call(arguments,0);return e[0]=i.apply(null,e),n.apply(null,e)}},set:function(e,t){if(!this[e])throw new Error("unknown hook "+e);this[e]=t},addNoop:function(t){this[t]=e},addFalse:function(e){this[e]=t}},Markdown.HookCollection=n,i.prototype={set:function(e,t){this["s_"+e]=t},get:function(e){return this["s_"+e]}},Markdown.Converter=function(){function e(e){return e=e.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm,function(e,t,n,i,r,o){return t=t.toLowerCase(),P.set(t,C(n)),r?i:(o&&F.set(t,o.replace(/"/g,""")),"")})}function t(e){return e=e.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,r),e=e.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm,r),e=e.replace(/\n[ ]{0,3}((<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,r),e=e.replace(/\n\n[ ]{0,3}(-]|-[^>])(?:[^-]|-[^-])*)--)>[ \t]*(?=\n{2,}))/g,r),e=e.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,r)}function r(e,t){var n=t;return n=n.replace(/^\n+/,""),n=n.replace(/\n+$/g,""),n="\n\n~K"+(O.push(n)-1)+"K\n\n"}function o(e,n){e=R.preBlockGamut(e,j),e=f(e);var i="
\n";return e=e.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,i),e=e.replace(/^[ ]{0,2}([ ]?-[ ]?){3,}[ \t]*$/gm,i),e=e.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm,i),e=h(e),e=g(e),e=w(e),e=R.postBlockGamut(e,j),e=t(e),e=S(e,n)}function a(e){return e=R.preSpanGamut(e),e=b(e),e=s(e),e=T(e),e=u(e),e=l(e),e=k(e),e=e.replace(/~P/g,"://"),e=C(e),e=A._DoItalicsAndBold?A._DoItalicsAndBold(e):x(e),e=e.replace(/ +\n/g,"
\n"),e=R.postSpanGamut(e)}function s(e){var t=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|-]|-[^>])(?:[^-]|-[^-])*)--)>)/gi;return e=e.replace(t,function(e){var t=e.replace(/(.)<\/?code>(?=.)/g,"$1`");return t=L(t,"!"==e.charAt(1)?"\\`*_/":"\\`*_")})}function l(e){return e=e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,c),e=e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()((?:\([^)]*\)|[^()\s])*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,c),e=e.replace(/(\[([^\[\]]+)\])()()()()()/g,c)}function c(e,t,n,i,r,o,a,s){void 0==s&&(s="");var l=t,c=n.replace(/:\/\//g,"~P"),u=i.toLowerCase(),p=r,f=s;if(""==p)if(""==u&&(u=c.toLowerCase().replace(/ ?\n/g," ")),p="#"+u,void 0!=P.get(u))p=P.get(u),void 0!=F.get(u)&&(f=F.get(u));else{if(!(l.search(/\(\s*\)$/m)>-1))return l;p=""}p=N(p),p=L(p,"*_");var h='"+c+""}function u(e){return e=e.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,p),e=e.replace(/(!\[(.*?)\]\s?\([ \t]*()(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,p)}function d(e){return e.replace(/>/g,">").replace(/"}function f(e){return e=e.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,function(e,t){return""+a(t)+"
\n\n"}),e=e.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(e,t){return""+a(t)+"
\n\n"}),e=e.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(e,t,n){var i=t.length;return""+a(n)+" \n\n"})}function h(e,t){e+="~0";var n=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;return B?e=e.replace(n,function(e,n,i){var r=n,o=i.search(/[*+-]/g)>-1?"ul":"ol",a=m(r,o,t);return a=a.replace(/\s+$/,""),a="<"+o+">"+a+""+o+">\n"}):(n=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g,e=e.replace(n,function(e,t,n,i){var r=t,o=n,a=i.search(/[*+-]/g)>-1?"ul":"ol",s=m(o,a);return s=r+"<"+a+">\n"+s+""+a+">\n"})),e=e.replace(/~0/,"")}function m(e,t,n){B++,e=e.replace(/\n{2,}$/,"\n"),e+="~0";var i=$[t],r=new RegExp("(^[ \\t]*)("+i+")[ \\t]+([^\\r]+?(\\n+))(?=(~0|\\1("+i+")[ \\t]+))","gm"),s=!1;return e=e.replace(r,function(e,t,i,r){var l=r,c=/\n\n$/.test(l),u=c||l.search(/\n{2,}/)>-1;return u||s?l=o(I(l),!0):(l=h(I(l),!0),l=l.replace(/\n$/,""),n||(l=a(l))),s=c,""+l+" \n"}),e=e.replace(/~0/g,""),B--,e}function g(e){return e+="~0",e=e.replace(/(?:\n\n|^\n?)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,function(e,t,n){var i=t,r=n;return i=y(I(i)),i=D(i),i=i.replace(/^\n+/g,""),i=i.replace(/\n+$/g,""),i="","\n\n"+i+"\n\n"+r}),e=e.replace(/~0/,"")}function v(e){return e=e.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(O.push(e)-1)+"K\n\n"}function b(e){return e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,t,n,i){var r=i;return r=r.replace(/^([ \t]*)/g,""),r=r.replace(/[ \t]*$/g,""),r=y(r),r=r.replace(/:\/\//g,"~P"),t+""+i+"\n
"+r+"
"})}function y(e){return e=e.replace(/&/g,"&"),e=e.replace(//g,">"),e=L(e,"*_{}[]\\",!1)}function x(e){return e=e.replace(/([\W_]|^)(\*\*|__)(?=\S)([^\r]*?\S[\*_]*)\2([\W_]|$)/g,"$1$3$4"),e=e.replace(/([\W_]|^)(\*|_)(?=\S)([^\r\*_]*?\S)\2([\W_]|$)/g,"$1$3$4")}function w(e){return e=e.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(e,t){var n=t;return n=n.replace(/^[ \t]*>[ \t]?/gm,"~0"),n=n.replace(/~0/g,""),n=n.replace(/^[ \t]+$/gm,""),n=o(n),n=n.replace(/(^|\n)/g,"$1 "),n=n.replace(/(\s*[^\r]+?<\/pre>)/gm,function(e,t){var n=t;return n=n.replace(/^ /gm,"~0"),n=n.replace(/~0/g,"")}),v("\n"+n+"\n")})}function S(e,t){e=e.replace(/^\n+/g,""),e=e.replace(/\n+$/g,"");for(var n=e.split(/\n{2,}/g),i=[],r=/~K(\d+)K/,o=n.length,s=0;o>s;s++){var l=n[s];r.test(l)?i.push(l):/\S/.test(l)&&(l=a(l),l=l.replace(/^([ \t]*)/g,""),l+="
",i.push(l))}if(!t){o=i.length;for(var s=0;o>s;s++)for(var c=!0;c;)c=!1,i[s]=i[s].replace(/~K(\d+)K/g,function(e,t){return c=!0,O[t]})}return i.join("\n\n")}function C(e){return e=e.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"),e=e.replace(/<(?![a-z\/?!]|~D)/gi,"<")}function T(e){return e=e.replace(/\\(\\)/g,M),e=e.replace(/\\([`*_{}\[\]()>#+-.!])/g,M)}function E(e,t,n,i){if(t)return e;if(")"!==i.charAt(i.length-1))return"<"+n+i+">";for(var r=i.match(/[()]/g),o=0,a=0;a=o?o=1:o++:o--;var s="";if(0>o){var l=new RegExp("\\){1,"+-o+"}$");i=i.replace(l,function(e){return s=e,""})}if(s){var c=i.charAt(i.length-1);U.test(c)||(s=c+s,i=i.substr(0,i.length-1))}return"<"+n+i+">"+s}function k(e){e=e.replace(H,E);var t=function(e,t){return''+R.plainLinkText(t)+""};return e=e.replace(/<((https?|ftp):[^'">\s]+)>/gi,t)}function _(e){return e=e.replace(/~E(\d+)E/g,function(e,t){var n=parseInt(t);return String.fromCharCode(n)})}function I(e){return e=e.replace(/^(\t|[ ]{1,4})/gm,"~0"),e=e.replace(/~0/g,"")}function D(e){if(!/\t/.test(e))return e;var t,n=[" "," "," "," "],i=0;return e.replace(/[\n\t]/g,function(e,r){return"\n"===e?(i=r+1,e):(t=(r-i)%4,i=r+1,n[t])})}function N(e){return e?(e.length,e.replace(z,function(e){return"~D"==e?"%24":":"==e?":":"%"+e.charCodeAt(0).toString(16)})):""}function L(e,t,n){var i="(["+t.replace(/([\[\]\\])/g,"\\$1")+"])";n&&(i="\\\\"+i);var r=new RegExp(i,"g");return e=e.replace(r,M)}function M(e,t){var n=t.charCodeAt(0);return"~E"+n+"E"}var A={};this.setOptions=function(e){A=e};var R=this.hooks=new n;R.addNoop("plainLinkText"),R.addNoop("preConversion"),R.addNoop("postNormalization"),R.addNoop("preBlockGamut"),R.addNoop("postBlockGamut"),R.addNoop("preSpanGamut"),R.addNoop("postSpanGamut"),R.addNoop("postConversion");var P,F,O,B;this.makeHtml=function(n){if(P)throw new Error("Recursive call to converter.makeHtml");return P=new i,F=new i,O=[],B=0,n=R.preConversion(n),n=n.replace(/~/g,"~T"),n=n.replace(/\$/g,"~D"),n=n.replace(/\r\n/g,"\n"),n=n.replace(/\r/g,"\n"),n="\n\n"+n+"\n\n",n=D(n),n=n.replace(/^[ \t]+$/gm,""),n=R.postNormalization(n),n=t(n),n=e(n),n=o(n),n=_(n),n=n.replace(/~D/g,"$$"),n=n.replace(/~T/g,"~"),n=R.postConversion(n),O=F=P=null,n};var j=function(e){return o(e)},$={ol:"\\d+[.]",ul:"[*+-]"},G="[-A-Z0-9+&@#/%?=~_|[\\]()!:,.;]",q="[-A-Z0-9+&@#/%=~_|[\\])]",H=new RegExp('(="|<)?\\b(https?|ftp)(://'+G+"*"+q+")(?=$|\\W)","gi"),U=new RegExp(q,"i"),z=/(?:["'*()[\]:]|~D)/g}}(),define("libs/Markdown.Converter",function(){}),function(){function e(e){return e.replace(/^\s+|\s+$/g,"")}function t(e){return e.replace(/\s+$/g,"")}function n(e){return e.replace(new RegExp("^(\\t|[ ]{1,4})","gm"),"")}function i(e,t){return-1!=e.indexOf(t)}function r(e,t){return e.replace(/<[^>]*>?/gi,function(e){return e.match(t)?e:""})}function o(e,t){for(var n={},i=0;i ]*>|","<(br)\\s?\\/?>)$"].join(""),"i");Array.indexOf||(Array.prototype.indexOf=function(e){for(var t=0;t ~X"+(this.hashBlocks.push(e)-1)+"X\n"},Markdown.Extra.prototype.hashExtraInline=function(e){return"~X"+(this.hashBlocks.push(e)-1)+"X"},Markdown.Extra.prototype.unHashExtraBlocks=function(e){function t(){var i=!1;e=e.replace(/(?: )?~X(\d+)X(?:<\/p>)?/g,function(e,t){i=!0;var r=parseInt(t,10);return n.hashBlocks[r]}),i===!0&&t()}var n=this;return t(),e},Markdown.Extra.prototype.wrapHeaders=function(e){function t(e){return"\n"+e+"\n"}return e=e.replace(/^.+[ \t]*\n=+[ \t]*\n+/gm,t),e=e.replace(/^.+[ \t]*\n-+[ \t]*\n+/gm,t),e=e.replace(/^\#{1,6}[ \t]*.+?[ \t]*\#*\n+/gm,t)};var g="\\{[ \\t]*((?:[#.][-_:a-zA-Z0-9]+[ \\t]*)+)\\}",v=new RegExp("^(#{1,6}.*#{0,6})[ \\t]+"+g+"[ \\t]*(?:\\n|0x03)","gm"),b=new RegExp("^(.*)[ \\t]+"+g+"[ \\t]*\\n"+"(?=[\\-|=]+\\s*(?:\\n|0x03))","gm"),y=new RegExp("^(```[ \\t]*[^{\\s]*)[ \\t]+"+g+"[ \\t]*\\n"+"(?=([\\s\\S]*?)\\n```[ \\t]*(\\n|0x03))","gm");Markdown.Extra.prototype.hashHeaderAttributeBlocks=function(e){function t(e,t,i){return"
~XX"+(n.hashBlocks.push(i)-1)+"XX
\n"+t+"\n"}var n=this;return e=e.replace(v,t),e=e.replace(b,t)},Markdown.Extra.prototype.hashFcbAttributeBlocks=function(e){function t(e,t,i){return"~XX"+(n.hashBlocks.push(i)-1)+"XX
\n"+t+"\n"}var n=this;return e.replace(y,t)},Markdown.Extra.prototype.applyAttributeBlocks=function(e){var t=this,n=new RegExp('~XX(\\d+)XX
[\\s]*(?:<(h[1-6]|pre)(?: +class="(\\S+)")?(>[\\s\\S]*?\\2>))',"gm");return e=e.replace(n,function(e,n,i,r,a){if(!i)return"";for(var s=parseInt(n,10),l=t.hashBlocks[s],c=l.match(/#[^\s#.]+/g)||[],u=c[0]?' id="'+c[0].substr(1,c[0].length-1)+'"':"",d=l.match(/\.[^\s#.]+/g)||[],p=0;p0&&(f=' class="'+d.join(" ")+'"'),"<"+i+u+f+a})},Markdown.Extra.prototype.tables=function(t){function n(t,n,r,o){n=n.replace(/^ *[|]/m,""),r=r.replace(/^ *[|]/m,""),o=o.replace(/^ *[|]/gm,""),n=n.replace(/[|] *$/m,""),r=r.replace(/[|] *$/m,""),o=o.replace(/[|] *$/gm,""),alignspecs=r.split(/ *[|] */),align=[];for(var a=0;a \n","\n"," \n"].join("");for(a=0;u>a;a++){var f=l(e(c[a]),i);p+=[" \n\n";var h=o.split("\n");for(a=0;a",f," \n"].join("")}p+="v;v++)m.push("");for(p+=" \n",v=0;u>v;v++){var b=l(e(m[v]),i);p+=[" \n"}return p+="\n",i.hashExtraBlock(p)}var i=this,r=new RegExp(["^","[ ]{0,3}","[|]","(.+)\\n","[ ]{0,3}","[|]([ ]*[-:]+[-| :]*)\\n","(","(?:[ ]*[|].*\\n?)*",")","(?:\\n|$)"].join(""),"gm"),o=new RegExp(["^","[ ]{0,3}","(\\S.*[|].*)\\n","[ ]{0,3}","([-:]+[ ]*[|][-| :]*)\\n","(","(?:.*[|].*\\n?)*",")","(?:\\n|$)"].join(""),"gm");return t=t.replace(r,n),t=t.replace(o,n)},Markdown.Extra.prototype.stripFootnoteDefinitions=function(e){var t=this;return e=e.replace(/\n[ ]{0,3}\[\^(.+?)\]\:[ \t]*\n?([\s\S]*?)\n{1,2}((?=\n[ ]{0,3}\S)|$)/g,function(e,n,i){return n=f(n),i+="\n",i=i.replace(/^[ ]{0,3}/g,""),t.footnotes[n]=i,"\n"})},Markdown.Extra.prototype.doFootnotes=function(e){var t=this;if(t.isConvertingFootnote===!0)return e;var n=0;return e=e.replace(/\[\^(.+?)\]/g,function(e,i){var r=f(i),o=t.footnotes[r];if(void 0===o)return e;n++,t.usedFootnotes.push(r);var a=''+n+"";return t.hashExtraInline(a)})},Markdown.Extra.prototype.printFootnotes=function(e){var t=this; -if(0===t.usedFootnotes.length)return e;e+='\n\n",b," \n"].join("")}p+="\n"},Markdown.Extra.prototype.fencedCodeBlocks=function(e){function t(e){return e=e.replace(/&/g,"&"),e=e.replace(//g,">"),e=e.replace(/~D/g,"$$"),e=e.replace(/~T/g,"~")}var n=this;return e=e.replace(/(?:^|\n)```[ \t]*(\S*)[ \t]*\n([\s\S]*?)\n```[ \t]*(?=\n)/g,function(e,i,r){var o=i,a=r,s=n.googleCodePrettify?' class="prettyprint"':"",l="";o&&(l=n.googleCodePrettify||n.highlightJs?' class="language-'+o+'"':' class="'+o+'"');var c=["
\n\n\n';for(var n=0;n
\n'+o+' ↩\n\n'}return e+=" "].join("");return n.hashExtraBlock(c)})},Markdown.Extra.prototype.educatePants=function(e){var t=this,n="",i=0;e.replace(/(?:)|(<)([a-zA-Z1-6]+)([^\n]*?>)([\s\S]*?)(<\/\2>)/g,function(r,o,a,s,l,c,u){var d=e.substring(i,u);return n+=t.applyPants(d),t.smartyPantsLastChar=n.substring(n.length-1),i=u+r.length,o?(/code|kbd|pre|script|noscript|iframe|math|ins|del|pre/i.test(a)?t.smartyPantsLastChar=l.substring(l.length-1):l=t.educatePants(l),n+=o+a+s+l+c,void 0):(n+=r,void 0)});var r=e.substring(i);return n+=t.applyPants(r),t.smartyPantsLastChar=n.substring(n.length-1),n},Markdown.Extra.prototype.applyPants=function(e){return e=e.replace(/---/g,"—").replace(/--/g,"–"),e=e.replace(/\.\.\./g,"…").replace(/\.\s\.\s\./g,"…"),e=e.replace(/``/g,"“").replace(/''/g,"”"),/^'$/.test(e)?/\S/.test(this.smartyPantsLastChar)?"’":"‘":/^"$/.test(e)?/\S/.test(this.smartyPantsLastChar)?"”":"“":(e=e.replace(/^'(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/,"’"),e=e.replace(/^"(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/,"”"),e=e.replace(/"'(?=\w)/g,"“‘"),e=e.replace(/'"(?=\w)/g,"‘“"),e=e.replace(/'(?=\d{2}s)/g,"’"),e=e.replace(/(\s| |--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)'(?=\w)/g,"$1‘"),e=e.replace(/([^\s\[\{\(\-])'/g,"$1’"),e=e.replace(/'(?=\s|s\b)/g,"’"),e=e.replace(/'/g,"‘"),e=e.replace(/(\s| |--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)"(?=\w)/g,"$1“"),e=e.replace(/([^\s\[\{\(\-])"/g,"$1”"),e=e.replace(/"(?=\s)/g,"”"),e=e.replace(/"/gi,"“"))},Markdown.Extra.prototype.runSmartyPants=function(e){return this.smartyPantsLastChar="",e=this.educatePants(e),e=e.replace(/(<([a-zA-Z1-6]+)\b([^\n>]*?)(\/)?>)/g,h)},Markdown.Extra.prototype.definitionLists=function(t){var n=new RegExp(["(\\x02\\n?|\\n\\n)","(?:","(","(","[ ]{0,3}","((?:[ \\t]*\\S.*\\n)+)","\\n?","[ ]{0,3}:[ ]+",")","([\\s\\S]+?)","(","(?=\\0x03)","|","(?=","\\n{2,}","(?=\\S)","(?!","[ ]{0,3}","(?:\\S.*\\n)+?","\\n?","[ ]{0,3}:[ ]+",")","(?!","[ ]{0,3}:[ ]+",")",")",")",")",")"].join(""),"gm"),i=this;return t=a(t),t=t.replace(n,function(t,n,r){var o=e(i.processDefListItems(r));return o="",t(a),"
\n"+o+"\n
",n+i.hashExtraBlock(o)+"\n\n"}),s(t)},Markdown.Extra.prototype.processDefListItems=function(i){var r=this,o=new RegExp(["(\\x02\\n?|\\n\\n+)","(","[ ]{0,3}","(?![:][ ]|[ ])","(?:\\S.*\\n)+?",")","(?=\\n?[ ]{0,3}:[ ])"].join(""),"gm"),u=new RegExp(["\\n(\\n+)?","(","[ ]{0,3}","[:][ ]+",")","([\\s\\S]+?)","(?=\\n*","(?:","\\n[ ]{0,3}[:][ ]|","|\\x03",")",")"].join(""),"gm");return i=a(i),i=i.replace(/\n{2,}(?=\\x03)/,"\n"),i=i.replace(o,function(t,n,i){for(var o=e(i).split("\n"),a="",s=0;s "}return a+"\n"}),i=i.replace(u,function(e,i,o,a){return i||a.match(/\n{2,}/)?(a=Array(o.length+1).join(" ")+a,a=n(a)+"\n\n",a="\n"+c(a,r)+"\n"):(a=t(a),a=l(n(a),r)),"\n"+c+" "+a+" \n"}),s(i)},Markdown.Extra.prototype.strikethrough=function(e){return e.replace(/([\W_]|^)~T~T(?=\S)([^\r]*?\S[\*_]*)~T~T([\W_]|$)/g,"$1$2$3")},Markdown.Extra.prototype.newlines=function(e){return e.replace(/(<(?:br|\/li)>)?\n/g,function(e,t){return t?e:"
\n"})}}(),define("pagedown-extra",function(){}),define("extensions/markdownExtra",["jquery","underscore","utils","classes/Extension","text!html/markdownExtraSettingsBlock.html","google-code-prettify","highlightjs","pagedown-extra"],function(e,t,n,i,r,o,a){var s=new i("markdownExtra","Markdown Extra",!0);s.settingsBlock=r,s.defaultConfig={extensions:["fenced_code_gfm","tables","def_list","attr_list","footnotes","smartypants","strikethrough","newlines"],intraword:!0,comments:!0,highlighter:"prettify"},s.onLoadSettings=function(){function e(e){return t.some(s.config.extensions,function(t){return t==e})}n.setInputChecked("#input-markdownextra-fencedcodegfm",e("fenced_code_gfm")),n.setInputChecked("#input-markdownextra-tables",e("tables")),n.setInputChecked("#input-markdownextra-deflist",e("def_list")),n.setInputChecked("#input-markdownextra-attrlist",e("attr_list")),n.setInputChecked("#input-markdownextra-footnotes",e("footnotes")),n.setInputChecked("#input-markdownextra-smartypants",e("smartypants")),n.setInputChecked("#input-markdownextra-strikethrough",e("strikethrough")),n.setInputChecked("#input-markdownextra-newlines",e("newlines")),n.setInputChecked("#input-markdownextra-intraword",s.config.intraword),n.setInputChecked("#input-markdownextra-comments",s.config.comments),n.setInputValue("#input-markdownextra-highlighter",s.config.highlighter)},s.onSaveSettings=function(e){e.extensions=[],n.getInputChecked("#input-markdownextra-fencedcodegfm")&&e.extensions.push("fenced_code_gfm"),n.getInputChecked("#input-markdownextra-tables")&&e.extensions.push("tables"),n.getInputChecked("#input-markdownextra-deflist")&&e.extensions.push("def_list"),n.getInputChecked("#input-markdownextra-attrlist")&&e.extensions.push("attr_list"),n.getInputChecked("#input-markdownextra-footnotes")&&e.extensions.push("footnotes"),n.getInputChecked("#input-markdownextra-smartypants")&&e.extensions.push("smartypants"),n.getInputChecked("#input-markdownextra-strikethrough")&&e.extensions.push("strikethrough"),n.getInputChecked("#input-markdownextra-newlines")&&e.extensions.push("newlines"),e.intraword=n.getInputChecked("#input-markdownextra-intraword"),e.comments=n.getInputChecked("#input-markdownextra-comments"),e.highlighter=n.getInputValue("#input-markdownextra-highlighter")};var l;return s.onEventMgrCreated=function(e){l=e},s.onPagedownConfigure=function(e){var n=e.getConverter();if(s.config.intraword===!0){var i={_DoItalicsAndBold:function(e){return e=e.replace(/([^\w*]|^)(\*\*|__)(?=\S)(.+?[*_]*)(?=\S)\2(?=[^\w*]|$)/g,"$1$3"),e=e.replace(/([^\w*]|^)(\*|_)(?=\S)(.+?)(?=\S)\2(?=[^\w*]|$)/g,"$1$3")}};n.setOptions(i)}s.config.comments===!0&&n.hooks.chain("postConversion",function(e){return e.replace(//g,function(e){return e.replace(/^$/,' $1 ')})});var r={extensions:s.config.extensions};if("highlight"==s.config.highlighter){r.highlighter="prettify";var l=document.getElementById("preview-contents");e.hooks.chain("onPreviewRefresh",function(){t.each(l.querySelectorAll(".prettyprint > code"),function(e){!e.highlighted&&a.highlightBlock(e),e.highlighted=!0})})}else"prettify"==s.config.highlighter&&(r.highlighter="prettify",e.hooks.chain("onPreviewRefresh",o.prettyPrint));Markdown.Extra.init(n,r)},s}),define("text!html/mathJaxSettingsBlock.html",[],function(){return'Allows StackEdit to interpret LaTeX mathematical expressions.
\n\n\nMore info'}),define("text!libs/mathjax_config.js",[],function(){return'MathJax.Hub.Config({\n "HTML-CSS": {\n preferredFont: "TeX",\n availableFonts: [\n "STIX",\n "TeX"\n ],\n linebreaks: {\n automatic: true\n },\n EqnChunk: 10,\n imageFont: null\n },\n tex2jax: <%= tex2jax || \'{ inlineMath: [["$","$"],["\\\\\\\\\\\\\\\\(","\\\\\\\\\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\\\\\[","\\\\\\\\]"]], processEscapes: true }\' %>,\n TeX: $.extend({\n noUndefined: {\n attributes: {\n mathcolor: "red",\n mathbackground: "#FFEEEE",\n mathsize: "90%"\n }\n },\n Safe: {\n allow: {\n URLs: "safe",\n classes: "safe",\n cssIDs: "safe",\n styles: "safe",\n fontsize: "all"\n }\n }\n }, <%= tex %>),\n messageStyle: "none"\n});\n'}),define("libs/mathjax_init",["settings","text!libs/mathjax_config.js"],function(e,t){var n=document.createElement("script");n.type="text/x-mathjax-config",n.innerHTML=_.template(t,{tex:e.extensionSettings.mathJax?e.extensionSettings.mathJax.tex:"undefined",tex2jax:e.extensionSettings.mathJax?e.extensionSettings.mathJax.tex2jax:void 0}),document.getElementsByTagName("head")[0].appendChild(n)}),define("extensions/mathJax",["utils","classes/Extension","text!html/mathJaxSettingsBlock.html","mathjax"],function(e,t,n){function i(e,t,n){var i=u.slice(e,t+1).join("").replace(/&/g,"&").replace(//g,">");for(x.Browser.isMSIE&&(i=i.replace(/(%[^\n]*)\n/g,"$1\n \n\n\n \n\n\n \n\n\n \n\n
\n"));t>e;)u[t]="",t--;u[e]="@@"+m.length+"@@",n&&(i=n(i)),m.push(i),d=p=f=null}function r(e){d=p=f=null,m=[];var t;/`/.test(e)?(e=e.replace(/~/g,"~T").replace(/(^|[^\\])(`+)([^\n]*?[^`\n])\2(?!`)/gm,function(e){return e.replace(/\$/g,"~D")}),t=function(e){return e.replace(/~([TD])/g,function(e,t){return{T:"~",D:"$"}[t]})}):t=function(e){return e},u=w(e.replace(/\r\n?/g,"\n"),S);for(var e=1,n=u.length;n>e;e+=2){var r=u[e];"@"===r.charAt(0)?(u[e]="@@"+m.length+"@@",m.push(r)):d?r===p?h?f=e:i(d,e,t):r.match(/\n.*\n/)?(f&&(e=f,i(d,e,t)),d=p=f=null,h=0):"{"===r?h++:"}"===r&&h&&h--:r===y||"$$"===r?(d=e,p=r,h=0):"begin"===r.substr(1,5)&&(d=e,p="\\end"+r.substr(6),h=0)}return f&&i(d,f,t),t(u.join(""))}function o(e){return e=e.replace(/@@(\d+)@@/g,function(e,t){return m[t]}),m=null,e}function a(){v=!1,x.cancelTypeset=!1,x.Queue(["Typeset",x,b]),x.Queue(c)}function s(){!v&&(v=!0,x.Cancel(),x.Queue(a))}var l=new t("mathJax","MathJax",!0);l.settingsBlock=n,l.defaultConfig={tex:"{}",tex2jax:'{ inlineMath: [["$","$"],["\\\\\\\\(","\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\[","\\\\]"]], processEscapes: true }'},l.onLoadSettings=function(){e.setInputValue("#input-mathjax-config-tex",l.config.tex),e.setInputValue("#input-mathjax-config-tex2jax",l.config.tex2jax)},l.onSaveSettings=function(t,n){t.tex=e.getInputJsValue("#input-mathjax-config-tex",n),t.tex2jax=e.getInputJsValue("#input-mathjax-config-tex2jax",n)},l.onPagedownConfigure=function(e){b=document.getElementById("preview-contents");var t=e.getConverter();t.hooks.chain("preConversion",r),t.hooks.chain("postConversion",o)};var c;l.onAsyncPreview=function(e){c=e,s()};var u,d,p,f,h,m,g=!1,v=!1,b=null,y="$",x=MathJax.Hub;x.Queue(function(){g=!0,x.processUpdateTime=50,x.Config({"HTML-CSS":{EqnChunk:10,EqnChunkFactor:1},SVG:{EqnChunk:10,EqnChunkFactor:1}})});var w,S=/(\$\$|\\(?:begin|end)\{[a-z]*\*?\}|\\[\\{}$]|[{}]|(?:\n\s*)+|@@\d+@@)/i;return w=3==="aba".split(/(b)/).length?function(e,t){return e.split(t)}:function(e,t){var n,i=[];if(!t.global){n=t.toString();var r="";n=n.replace(/^\/(.*)\/([im]*)$/,function(e,t,n){return r=n,t}),t=RegExp(n,r+"g")}for(var o=t.lastIndex=0;n=t.exec(e);)i.push(e.substring(o,n.index)),i.push.apply(i,n.slice(1)),o=n.index+n[0].length;return i.push(e.substring(o)),i},function(){var e=MathJax.Hub;if(!e.Cancel){e.cancelTypeset=!1,e.Register.StartupHook("HTML-CSS Jax Config",function(){var t=MathJax.OutputJax["HTML-CSS"],n=t.Translate;t.Augment({Translate:function(i,r){if(e.cancelTypeset||r.cancelled)throw Error("MathJax Canceled");return n.call(t,i,r)}})}),e.Register.StartupHook("SVG Jax Config",function(){var t=MathJax.OutputJax.SVG,n=t.Translate;t.Augment({Translate:function(i,r){if(e.cancelTypeset||r.cancelled)throw Error("MathJax Canceled");return n.call(t,i,r)}})}),e.Register.StartupHook("TeX Jax Config",function(){var t=MathJax.InputJax.TeX,n=t.Translate;t.Augment({Translate:function(i,r){if(e.cancelTypeset||r.cancelled)throw Error("MathJax Canceled");return n.call(t,i,r)}})});var t=e.processError;e.processError=function(n,i,r){return"MathJax Canceled"!==n.message?t.call(e,n,i,r):(MathJax.Message.Clear(0,0),i.jaxIDs=[],i.jax={},i.scripts=[],i.i=i.j=0,i.cancelled=!0,null)},e.Cancel=function(){this.cancelTypeset=!0}}}(),l}),define("text!html/partialRenderingSettingsBlock.html",[],function(){return"Renders modified sections only.
\n\n Note: Document sections are based on title elements (h1, h2...). Therefore if\n your document does not contain any title, performance will not be increased.\n"}),define("extensions/partialRendering",["underscore","crel","extensions/markdownExtra","classes/Extension","text!html/partialRenderingSettingsBlock.html"],function(e,t,n,i,r){function o(){var t=[],n="\n";if(m=!1,e.each(g,function(e){var i='\n\n\n'+e.text+"\n\n";h&&(i=i.replace(/^```.*\n[\s\S]*?\n```|\n[ ]{0,3}\[\^(.+?)\]\:[ \t]*\n?([\s\S]*?)\n{1,2}((?=\n[ ]{0,3}\S)|$)/gm,function(e,t){return t?(m=!0,n+=e.replace(/^\s*\n/gm,"")+"\n",""):e})),i=i.replace(/^```.*\n[\s\S]*?\n```|^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm,function(e,t){return t?(n+=e.replace(/^\s*\n/gm,"")+"\n",""):e}),t.push({id:e.id,text:i+"\n"})}),y=[],b=[],d=void 0,x===!0||u!=n)return x=!1,u=n,b=v,v=t,y=t,void 0;var i=v.length;e.some(v,function(e,n){return n>=t.length||e.text!=t[n].text?(i=n,!0):void 0});var r=-v.length;e.some(v.slice().reverse(),function(e,n){return n>=t.length||e.text!=t[t.length-n-1].text?(r=-n,!0):void 0}),i-r>v.length&&(r=i-v.length);var o=v.slice(0,i);y=t.slice(i,t.length+r);var a=v.slice(v.length+r,v.length);d=e.first(a),b=v.slice(i,v.length+r),v=o.concat(y).concat(a)}function a(e){var t=e.id.substring(3);w[t]=e}function s(){function n(n){for(var i=t("div",{id:"wmd-preview-section-"+n.id,"class":"wmd-preview-section preview-content"}),o=!1;r;){var s=r.nextSibling,l="se-preview-section-delimiter"==r.className;if(o===!0&&"DIV"==r.tagName&&l)break;o=!0,"DIV"==r.tagName&&"footnotes"==r.className?e.each(r.querySelectorAll("ol > li"),a):l||i.appendChild(r),r=s}return i}e.each(b,function(e){var t=document.getElementById("wmd-preview-section-"+e.id);f.removeChild(t)});var i=document.getElementById("wmd-preview"),r=i.firstChild,o=document.createDocumentFragment();e.each(y,function(e){o.appendChild(n(e))}),i.innerHTML="";var s=p;void 0!==d&&(s=document.getElementById("wmd-preview-section-"+d.id)),f.insertBefore(o,s),p.innerHTML="";var l=[];if(m===!0){var c=t("ol");e.each(f.querySelectorAll("a.footnote"),function(e,t){e.textContent=t+1;var n=e.id.substring(6);l.push(n),c.appendChild(w[n].cloneNode(!0))}),l.length>0&&p.appendChild(t("div",{"class":"footnotes"},t("hr"),c)),w=e.pick(w,l)}}var l=new i("partialRendering","Partial Rendering",!0);l.settingsBlock=r;var c,u,d,p,f,h=!1,m=!1,g=[],v=[],b=[],y=[],x=!1,w={};return l.onSectionsCreated=function(e){g=e},l.onPagedownConfigure=function(t){c=t.getConverter(),c.hooks.chain("preConversion",function(){o();var t=e.map(y,function(e){return e.text});return t.push(u+"\n\n"),t.join("")}),t.hooks.chain("onPreviewRefresh",function(){s()})},l.onInit=function(){n.enabled&&e.some(n.config.extensions,function(e){return"footnotes"==e})&&(h=!0)},l.onReady=function(){p=t("div",{id:"wmd-preview-section-footnotes","class":"preview-content"}),f=document.getElementById("preview-contents"),f.appendChild(p)},l.onFileSelected=function(){x=!0},l}),define("extensions/markdownSectionParser",["underscore","extensions/markdownExtra","extensions/mathJax","extensions/partialRendering","classes/Extension","crel"],function(e,t,n,i,r,o){function a(e,t){function n(e,t){var n=o.substring(a,t);u.push({id:++f,text:n,textWithFrontMatter:i+n}),i=""}if(e===p){var i=(p.frontMatter||{})._frontMatter||"",r=t.substring(i.length),o=r+"\n\n";u=[];var a=0;o.replace(d,function(e,t){n(a,t),a=t}),n(a,r.length),s.onSectionsCreated(u)}}var s,l=new r("markdownSectionParser","Markdown section parser");l.onEventMgrCreated=function(e){s=e};var c,u=[],d="^.+[ \\t]*\\n=+[ \\t]*\\n+|^.+[ \\t]*\\n-+[ \\t]*\\n+|^\\#{1,6}[ \\t]*.+?[ \\t]*\\#*\\n+";l.onPagedownConfigure=function(r){t.enabled&&e.some(t.config.extensions,function(e){return"fenced_code_gfm"==e})&&(d="^```.*\\n[\\s\\S]*?\\n```|"+d),n.enabled&&(d="^[ \\t]*\\n\\$\\$[\\s\\S]*?\\$\\$|"+d,d="^[ \\t]*\\n\\\\\\\\[[\\s\\S]*?\\\\\\\\]|"+d,d="^[ \\t]*\\n\\\\?\\\\begin\\{[a-z]*\\*?\\}[\\s\\S]*?\\\\end\\{[a-z]*\\*?\\}|"+d),d=new RegExp(d,"gm");var a=r.getConverter();i.enabled||(a.hooks.chain("preConversion",function(){return e.reduce(u,function(e,t){return e+'\n\n\n'+t.text+"\n\n"},"")}),r.hooks.chain("onPreviewRefresh",function(){function e(){for(var e=o("div",{"class":"wmd-preview-section preview-content"}),t=!1;n;){var i=n.nextSibling,r="se-preview-section-delimiter"==n.className;if(t===!0&&"DIV"==n.tagName&&r)break;t=!0,r||e.appendChild(n),n=i}return e}var t=document.getElementById("wmd-preview"),n=t.firstChild,i=document.createDocumentFragment();u.forEach(function(t){i.appendChild(e(t))}),c.innerHTML="",c.appendChild(t),c.appendChild(i)}))},l.onReady=function(){c=document.getElementById("preview-contents")};var p;l.onFileSelected=function(e){p=e};var f=0;return l.onFileOpen=a,l.onContentChanged=a,l}),define("text!html/buttonMarkdownSyntax.html",[],function(){return'\n \n'}),define("extensions/buttonMarkdownSyntax",["jquery","classes/Extension","text!html/buttonMarkdownSyntax.html"],function(e,t,n){var i=new t("buttonMarkdownSyntax",'Button "Markdown syntax',!0,!0);return i.settingsBlock='Adds a "Markdown syntax" button over the preview.
',i.onCreatePreviewButton=function(){return n},i}),define("extensions/googleAnalytics",["jquery","underscore","constants","utils","classes/Extension","settings"],function(e,t,n,i,r,o){function a(){i.currentTime-d>18e4&&(_gaq.push(["_trackPageview"]),d=i.currentTime)}var s=new r("googleAnalytics","Google Analytics",!0);s.settingsBlock="Sends anonymous statistics about usage and errors to help improve StackEdit.
";var l=!1,c=!1;window._gaq=[];var u=function(){if(l===!1&&c===!1){var t="/ga.js";location.search.match(/(\?|&)console/)&&(t="/u/ga_debug.js"),e.ajax({url:"https://ssl.google-analytics.com"+t,dataType:"script"}).done(function(){l=!0})}},d=0;s.onPeriodicRun=function(){a()},s.onReady=function(){_gaq.push(["_setAccount",n.GOOGLE_ANALYTICS_ACCOUNT_ID]),a(),_gaq.push(["_trackEvent","About","version",n.VERSION]),_gaq.push(["_trackEvent","Settings","layoutOrientation",""+o.layoutOrientation]),_gaq.push(["_trackEvent","Settings","theme",""+window.theme]),_gaq.push(["_trackEvent","Settings","lazyRendering",""+o.lazyRendering]),_gaq.push(["_trackEvent","Settings","editorFontFamily",""+o.editorFontFamily]),_gaq.push(["_trackEvent","Settings","editorFontSize",""+o.editorFontSize]),_gaq.push(["_trackEvent","Settings","defaultContent backlink",""+(-1!==o.defaultContent.indexOf(n.MAIN_URL))]),_gaq.push(["_trackEvent","Settings","commitMsg backlink",""+(-1!==o.commitMsg.indexOf(n.MAIN_URL))]),_gaq.push(["_trackEvent","Settings","sshProxy unchanged",""+(o.sshProxy==n.SSH_PROXY_URL)]),t.each(o.extensionSettings,function(e,t){_gaq.push(["_trackEvent","Extensions",t+" enabled",""+(e.enabled===!0)])}),window.onerror=function(e,t,n){_gaq.push(["_trackEvent","Error",e,t+":"+n+i.formatEventList()])},u()},s.onOfflineChanged=function(e){c=e,u()};var p=0;return s.onSyncRunning=function(e){e===!0&&(p=(new Date).getTime())},s.onPublishRunning=function(e){e===!0&&(p=(new Date).getTime())},s.onSyncSuccess=function(){var e=(new Date).getTime();_gaq.push(["_trackTiming","Sync","SyncTime",e-p])},s.onSyncImportSuccess=function(e,t){_gaq.push(["_trackEvent","Sync","SyncImport"]),_gaq.push(["_trackEvent","Sync","SyncImport provider",t.providerId])},s.onSyncExportSuccess=function(e,t){_gaq.push(["_trackEvent","Sync","SyncExport"]),_gaq.push(["_trackEvent","Sync","SyncExport provider",t.provider.providerId])},s.onPublishSuccess=function(e){var n=(new Date).getTime();_gaq.push(["_trackTiming","Publish","PublishSuccess",n-p]),t.each(e.publishLocations,function(e){_gaq.push(["_trackEvent","Publish","PublishSuccess provider",e.provider.providerId])})},s.onNewPublishSuccess=function(e,t){_gaq.push(["_trackEvent","Publish","NewPublish provider",t.provider.providerId])},s.onError=function(e){!t.isString(e)&&e.message&&_gaq.push(["_trackEvent","Error","message",e.message+i.formatEventList()])},s}),define("extensions/twitter",["jquery","underscore","constants","utils","classes/Extension"],function(e,t,n,i,r){var o=new r("twitter","Twitter",!1,!0),a=!1,s=!1,l=function(){a===!1&&s===!1&&e.ajax({url:"https://platform.twitter.com/widgets.js",dataType:"script"}).done(function(){a=!0})};return o.onReady=function(){l()},o.onOfflineChanged=function(e){s=e,l()},o.onTweet=function(){a&&window.twttr.widgets.load()},o}),define("text!html/dialogAbout.html",[],function(){return'\n\n'}),define("extensions/dialogAbout",["underscore","constants","utils","classes/Extension","text!html/dialogAbout.html"],function(e,t,n,i,r){var o=new i("dialogAbout",'Dialog "About"'),a={Bootstrap:"http://getbootstrap.com/","Bootstrap Tour":"http://bootstraptour.com/",crel:"https://github.com/KoryNunn/crel","FileSaver.js":"https://github.com/eligrey/FileSaver.js/",Fontello:"http://fontello.com/","Font Awesome and others...":"res/libs/fontello/LICENSE.txt",Gatekeeper:"https://github.com/prose/gatekeeper","Github.js":"https://github.com/michael/github","Hammer.js":"http://eightmedia.github.io/hammer.js/","Highlight.js":"http://softwaremaniacs.org/soft/highlight/en/",jGrowl:"https://github.com/stanlemon/jGrowl/",jQuery:"http://jquery.com/",jsondiffpatch:"https://github.com/benjamine/jsondiffpatch",MathJax:"http://www.mathjax.org/",Mousetrap:"http://craig.is/killing/mice",PageDown:"https://code.google.com/p/pagedown/","PageDown Extra":"https://github.com/jmcmanus/pagedown-extra/",Prettify:"https://code.google.com/p/google-code-prettify/",Prism:"http://prismjs.com/",Rangy:"https://code.google.com/p/rangy/",RequireJS:"http://requirejs.org/","RequireJS LESS plugin":"https://github.com/guybedford/require-less","stacktrace.js":"http://stacktracejs.com/","to-markdown":"https://github.com/domchristie/to-markdown","Underscore.js":"http://underscorejs.org/",waitForImages:"https://github.com/alexanderdickson/waitForImages",XRegExp:"https://github.com/slevithan/xregexp","yaml.js":"https://github.com/jeremyfa/yaml.js"},s={"StackEdit Download Proxy":"https://github.com/benweet/stackedit-download-proxy","StackEdit HTMLtoPDF":"https://github.com/benweet/stackedit-htmltopdf","StackEdit Picasa Proxy":"https://github.com/benweet/stackedit-picasa-proxy","StackEdit SSH Proxy":"https://github.com/benweet/stackedit-ssh-proxy","StackEdit Tumblr Proxy":"https://github.com/benweet/stackedit-tumblr-proxy","StackEdit WordPress Proxy":"https://github.com/benweet/stackedit-wordpress-proxy"};return o.onReady=function(){n.addModal("modal-about",e.template(r,{libraries:a,projects:s,version:t.VERSION}))},o}),define("text!html/dialogManagePublicationLocation.html",[],function(){return' \n\n'}),define("extensions/dialogManagePublication",["jquery","underscore","classes/Extension","text!html/dialogManagePublicationLocation.html"],function(e,t,n,i){var r,o=new n("dialogManagePublication",'Dialog "Manage publication"',!1,!0);o.onEventMgrCreated=function(e){r=e};var a,s,l,c=function(n){if(void 0===n||n===a){l.toggleClass("hide",0===t.size(a.publishLocations));var o=t.reduce(a.publishLocations,function(e,n){var r=t.omit(n,"provider","publishIndex","sharingLink");return r.password&&(r.password="********"),r=JSON.stringify(r).replace(/{|}|"/g,"").replace(/,/g,", "),e+t.template(i,{publishAttributes:n,publishDesc:r})},"");s.innerHTML=o,t.each(s.querySelectorAll(".remove-button"),function(t){var n=e(t),i=a.publishLocations[n.data("publishIndex")];n.click(function(){a.removePublishLocation(i),r.onPublishRemoved(a,i)})})}};return o.onFileSelected=function(e){a=e,c(e)},o.onNewPublishSuccess=c,o.onPublishRemoved=c,o.onReady=function(){var t=document.querySelector(".modal-manage-publish");s=t.querySelector(".publish-list"),l=e(document.querySelectorAll(".show-already-published"))},o}),define("text!html/dialogManageSynchronizationLocation.html",[],function(){return'\n' -}),define("extensions/dialogManageSynchronization",["jquery","underscore","classes/Extension","text!html/dialogManageSynchronizationLocation.html"],function(e,t,n,i){var r,o=new n("dialogManageSynchronization",'Dialog "Manage synchronization"',!1,!0);o.onEventMgrCreated=function(e){r=e};var a;o.onSynchronizerCreated=function(e){a=e};var s,l,c,u,d,p=function(n){if(void 0===n||n===s){t.size(s.syncLocations)>0?(c.removeClass("hide"),u.addClass("hide")):(c.addClass("hide"),u.removeClass("hide")),d.toggleClass("hide",0===t.size(s.syncLocations));var o=t.reduce(s.syncLocations,function(e,n){return e+t.template(i,{syncAttributes:n,syncDesc:n.id||n.path})},"");l.innerHTML=o,t.each(l.querySelectorAll(".remove-button"),function(t){var n=e(t),i=s.syncLocations[n.data("syncIndex")];n.click(function(){s.removeSyncLocation(i),r.onSyncRemoved(s,i)})})}};return o.onFileSelected=function(e){s=e,p(e)},o.onSyncExportSuccess=p,o.onSyncRemoved=p,o.onReady=function(){var t=document.querySelector(".modal-manage-sync");l=t.querySelector(".sync-list"),c=e(t.querySelectorAll(".msg-sync-list")),u=e(t.querySelectorAll(".msg-no-sync")),d=e(document.querySelectorAll(".show-already-synchronized"))},o}),define("text!html/dialogManageSharingLocation.html",[],function(){return' \n\n'}),define("extensions/dialogManageSharing",["jquery","underscore","classes/Extension","text!html/dialogManageSharingLocation.html"],function(e,t,n,i){var r,o=new n("dialogManageSharing",'Button "Share"',!1,!0);o.onEventMgrCreated=function(e){r=e};var a,s,l,c,u=function(e){if(void 0===e||e===a){var n=t.reduce(a.publishLocations,function(e,n){return n.sharingLink&&(e+=t.template(i,{link:n.sharingLink,title:a.title})),e},"");s.innerHTML=n,r.onTweet(),l.toggleClass("hide",0===n.length),c.toggleClass("hide",0!==n.length)}};return o.onFileSelected=function(e){a=e,u(e)},o.onNewPublishSuccess=function(t,n){u(t),n.sharingLink&&(e(".modal").modal("hide"),e(".modal-manage-sharing").modal("show"))},o.onPublishRemoved=u,o.onReady=function(){var t=document.querySelector(".modal-manage-sharing");s=t.querySelector(".share-list"),l=e(t.querySelectorAll(".msg-share-list")),c=e(t.querySelectorAll(".msg-no-share"))},o}),function(){var e=this,t={},n=!1;"undefined"!=typeof module&&module.exports?(module.exports=t,e.toMarkdown=t,n=!0):e.toMarkdown=t,t.converter=function(e){e&&e.elements&&$.isArray(e.elements)&&(c=c.concat(e.elements)),this.makeMd=function(e,t){var r;if(n){var o=require("jsdom");o.env({html:e,scripts:["http://code.jquery.com/jquery-1.6.4.min.js"],done:function(n,r){"function"==typeof t&&t(i(e,r.$))}})}else r=i(e,$);return r}};var i=function(e,t){e=e.replace(/(\d+)\. /g,"$1\\. ");var n=t(""),i=n.html(e);i.find("*:not(pre, code)").contents().filter(function(){return 3===this.nodeType&&/^\s+$/.test(this.nodeValue)}).remove();for(var r=[],o=0,s=c.length;s>o;o++)r.push(c[o].selector);for(r=r.join(",");i.find(r).length;)for(var o=0,s=c.length;s>o;o++)$matches=i.find(c[o].selector+':not(:has("'+r+'"))'),$matches.each(function(e,n){var i=t(n);i.before(c[o].replacement(i.html(),i)).remove()});return a(i.html())},r=function(e){return e.replace(/^[\n\r\f]+|[\n\r\f]+$/g,"")},o=function(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')},a=function(e){return e=e.replace(/^[\t\r\n]+|[\t\r\n]+$/g,""),e=e.replace(/\n\s+\n/g,"\n\n"),e=e.replace(/\n{3,}/g,"\n\n"),e=o(e)},s=function(e){return e=r(e),e?"**"+e+"**":""},l=function(e){return e=r(e),e?"_"+e+"_":""},c=[{selector:"p",replacement:function(e){return e=$.trim(e),e?"\n\n"+e+"\n\n":""}},{selector:"br",replacement:function(){return"\n"}},{selector:"h1,h2,h3,h4,h5,h6",replacement:function(e,t){e=$.trim(e);for(var n=t.prop("nodeName").charAt(1),i="",r=0;n>r;r++)i+="#";return e?"\n\n"+i+" "+e+"\n\n":""}},{selector:"hr",replacement:function(){return"\n\n* * *\n\n"}},{selector:"a[href]",replacement:function(e,t){if(e){e=r(e);var n=t.attr("href"),i=t.attr("title")||"";return"["+e+"]"+"("+n+(i?' "'+i+'"':"")+")"}return!1}},{selector:"b",replacement:s},{selector:"strong",replacement:s},{selector:"i",replacement:l},{selector:"em",replacement:l},{selector:"code",replacement:function(e){return e=r(e),e?"`"+e+"`":""}},{selector:"img",replacement:function(e,t){var n=t.attr("alt")||"",i=t.attr("src")||"",r=t.attr("title")||"";return"!["+n+"]"+"("+i+(r?' "'+r+'"':"")+")"}},{selector:"pre",replacement:function(e){return/^\s*\`/.test(e)?(e=e.replace(/\`/g,"")," "+e.replace(/\n/g,"\n ")):""}},{selector:"li",replacement:function(e,t){e=e.replace(/^\s+|\s+$/,"").replace(/\n/gm,"\n ");var n="* ",i="",r=t.parent(),o=r.contents().filter(function(){return 1===this.nodeType&&"LI"===this.nodeName||3===this.nodeType}),a=o.index(t)+1;return n=r.is("ol")?a+". ":"* ",a==o.length&&(t.parents("li").length||(i="\n"),e=e.replace(/\s+$/,""),t.unwrap()),n+e+i+"\n"}},{selector:"blockquote",replacement:function(e){return e=e=$.trim(e).replace(/\n{3,}/g,"\n\n"),e=e.replace(/\n/g,"\n> "),"> "+e}}]}(),define("toMarkdown",["jquery"],function(e){return function(){var t;return t||e.toMarkdown}}(this)),define("extensions/dialogOpenHarddrive",["jquery","underscore","constants","utils","classes/Extension","toMarkdown"],function(e,t,n,i,r,o){function a(i){i.stopPropagation(),i.preventDefault();var r=(i.dataTransfer||i.target).files;e(".modal-import-harddrive-markdown, .modal-import-harddrive-html").modal("hide"),t.each(r,function(t){if(!e(i.target).is("#wmd-input *")||!t.name.match(/.(jpe?g|png|gif)$/i)){var r=new FileReader;r.onload=function(e){return function(t){var n=t.target.result;if(n.match(/\uFFFD/))return p.onError(e.name+" is a binary file."),void 0;if(n=f?f(n):n,void 0===n)return p.onError(e.name+" is not a valid HTML file."),void 0;var i=e.name,r=i.lastIndexOf(".");i=-1!==r?i.substring(0,r):i;var o=u.createFile(i,n);u.selectFile(o)}}(t);var o=t.slice(0,n.IMPORT_FILE_MAX_CONTENT_SIZE);r.readAsText(o)}})}function s(e){f=void 0,a(e)}function l(e){f=m,a(e)}function c(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy"}var u,d=new r("dialogOpenHarddrive",'Dialog "Open from"');d.onFileMgrCreated=function(e){u=e};var p;d.onEventMgrCreated=function(e){p=e};var f,h,m=function(e){return h.makeMd(e)};return d.onReady=function(){h=new o.converter,e("#input-file-import-harddrive-markdown").change(s),e("#dropzone-import-harddrive-markdown, #wmd-input").each(function(){this.addEventListener("dragover",c,!1),this.addEventListener("drop",s,!1)}),e("#input-file-import-harddrive-html").change(l),e("#dropzone-import-harddrive-html").each(function(){this.addEventListener("dragover",c,!1),this.addEventListener("drop",l,!1)}),e(".action-convert-html").click(function(e){var t=i.getInputTextValue("#input-convert-html",e);if(void 0!==t){if(t=h.makeMd(t),void 0===t)return p.onError("Invalid HTML code."),void 0;var n=u.createFile(void 0,t);u.selectFile(n)}})},d}),define("extensions/documentTitle",["jquery","underscore","classes/Extension"],function(e,t,n){var i,r,o=new n("documentTitle","Document Title"),a=t.debounce(function(t){if(t===i){var n=i.title;document.title="StackEdit – "+n,r.html(i.composeTitle()),e(".file-title").text(n),e(".input-file-title").val(n)}},50);return o.onFileSelected=function(e){i=e,a(e)},o.onTitleChanged=a,o.onSyncExportSuccess=a,o.onSyncRemoved=a,o.onNewPublishSuccess=a,o.onPublishRemoved=a,o.onReady=a,o.onReady=function(){r=e(".file-title-navbar"),r.hover(function(){var e=r[0].scrollWidth-r.outerWidth();r.stop(!0,!0).animate({scrollLeft:e},15*e,"linear")},function(){r.stop(!0,!0).scrollLeft(0)}).click(function(){r.stop(!0,!0).scrollLeft(0)})},o}),function(e,t){function n(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),void 0):(e.attachEvent("on"+t,n),void 0)}function i(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return T[e.which]?T[e.which]:E[e.which]?E[e.which]:String.fromCharCode(e.which).toLowerCase()}function r(e,t){return e.sort().join(",")===t.sort().join(",")}function o(e){e=e||{};var t,n=!1;for(t in N)e[t]?n=!0:N[t]=0;n||(A=!1)}function a(e,t,n,i,o,a){var s,l,c=[],u=n.type;if(!I[e])return[];for("keyup"==u&&f(e)&&(t=[e]),s=0;s95&&112>e||T.hasOwnProperty(e)&&(S[T[e]]=e)}return S}function g(e,t,n){return n||(n=m()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function v(e,t,n,r){function a(t){return function(){A=t,++N[e],h()}}function s(t){u(n,t,e),"keyup"!==r&&(L=i(t)),setTimeout(o,10)}N[e]=0;for(var l=0;l1?(v(e,s,t,n),void 0):(o=y(e,n),I[o.key]=I[o.key]||[],a(o.key,o.modifiers,{type:o.action},i,e,r),I[o.key][i?"unshift":"push"]({callback:t,modifiers:o.modifiers,action:o.action,seq:i,level:r,combo:e}),void 0)}function w(e,t,n){for(var i=0;i ":".","?":"/","|":"\\"},_={option:"alt",command:"meta","return":"enter",escape:"esc",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},I={},D={},N={},L=!1,M=!1,A=!1,R=1;20>R;++R)T[111+R]="f"+R;for(R=0;9>=R;++R)T[R+96]=R;n(t,"keypress",p),n(t,"keydown",p),n(t,"keyup",p);var P={bind:function(e,t,n){return e=e instanceof Array?e:[e],w(e,t,n),this},unbind:function(e,t){return P.bind(e,function(){},t)},trigger:function(e,t){return D[e+":"+t]&&D[e+":"+t]({},e),this},reset:function(){return I={},D={},this},stopCallback:function(e,t){return(" "+t.className+" ").indexOf(" mousetrap ")>-1?!1:"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},handleKey:d};e.Mousetrap=P,"function"==typeof define&&define.amd&&define("mousetrap",P)}(window,document),define("classes/FileDescriptor",["underscore","utils","storage"],function(e,t,n){function i(e,t,i,r){this.fileIndex=e,this._title=t||n[e+".title"],this._editorScrollTop=parseInt(n[e+".editorScrollTop"])||0,this._editorStart=parseInt(n[e+".editorEnd"])||0,this._editorEnd=parseInt(n[e+".editorEnd"])||0,this._previewScrollTop=parseInt(n[e+".previewScrollTop"])||0,this._selectTime=parseInt(n[e+".selectTime"])||0,this._discussionList=JSON.parse(n[e+".discussionList"]||"{}"),this.syncLocations=i||{},this.publishLocations=r||{},Object.defineProperty(this,"title",{get:function(){return this._title},set:function(e){this._title=e,n[this.fileIndex+".title"]=e}}),Object.defineProperty(this,"content",{get:function(){return n[this.fileIndex+".content"]},set:function(e){n[this.fileIndex+".content"]=e}}),Object.defineProperty(this,"editorScrollTop",{get:function(){return this._editorScrollTop},set:function(e){this._editorScrollTop=e,n[this.fileIndex+".editorScrollTop"]=e}}),Object.defineProperty(this,"editorStart",{get:function(){return this._editorStart},set:function(e){this._editorStart=e,n[this.fileIndex+".editorStart"]=e}}),Object.defineProperty(this,"editorEnd",{get:function(){return this._editorEnd},set:function(e){this._editorEnd=e,n[this.fileIndex+".editorEnd"]=e}}),Object.defineProperty(this,"previewScrollTop",{get:function(){return this._previewScrollTop},set:function(e){this._previewScrollTop=e,n[this.fileIndex+".previewScrollTop"]=e}}),Object.defineProperty(this,"selectTime",{get:function(){return this._selectTime},set:function(e){this._selectTime=e,n[this.fileIndex+".selectTime"]=e}}),Object.defineProperty(this,"discussionList",{get:function(){return this._discussionList},set:function(e){this._discussionList=e,n[this.fileIndex+".discussionList"]=JSON.stringify(e)}}),Object.defineProperty(this,"discussionListJSON",{get:function(){return n[this.fileIndex+".discussionList"]||"{}"},set:function(e){this._discussionList=JSON.parse(e),n[this.fileIndex+".discussionList"]=e}})}return i.prototype.addSyncLocation=function(e){t.storeAttributes(e),t.appendIndexToArray(this.fileIndex+".sync",e.syncIndex),this.syncLocations[e.syncIndex]=e},i.prototype.removeSyncLocation=function(e){t.removeIndexFromArray(this.fileIndex+".sync",e.syncIndex),delete this.syncLocations[e.syncIndex]},i.prototype.addPublishLocation=function(e){t.storeAttributes(e),t.appendIndexToArray(this.fileIndex+".publish",e.publishIndex),this.publishLocations[e.publishIndex]=e},i.prototype.removePublishLocation=function(e){t.removeIndexFromArray(this.fileIndex+".publish",e.publishIndex),delete this.publishLocations[e.publishIndex]},i.prototype.composeTitle=function(){var t=[];return e.chain(this.syncLocations).sortBy(function(e){return e.provider.providerId}).each(function(e){t.push('')}),0!==e.size(this.syncLocations)&&t.push(''),e.chain(this.publishLocations).sortBy(function(e){return e.provider.providerId}).each(function(e){t.push('')}),0!==e.size(this.publishLocations)&&t.push(''),t.push(e.escape(this.title)),t.join("")},i}),define("fileSystem",["underscore","utils","classes/FileDescriptor","storage"],function(e,t,n,i){var r={};return t.retrieveIndexArray("file.list").forEach(function(e){r[e]=new n(e)}),Object.keys(i).forEach(function(e){var t=e.match(/(file\.\S+?)\.\S+/);t&&!r.hasOwnProperty(t[1])&&i.removeItem(e)}),r}),define("text!html/documentSelectorSettingsBlock.html",[],function(){return' Allows toggling document with keyboard shortcuts.
\n\n'}),define("extensions/documentSelector",["jquery","underscore","crel","utils","classes/Extension","mousetrap","fileSystem","text!html/documentSelectorSettingsBlock.html"],function(e,t,n,i,r,o,a,s){var l=new r("documentSelector","Document Selector",!0);l.settingsBlock=s,l.defaultConfig={orderBy:"mru",shortcutPrevious:"Ctrl+[",shortcutNext:"Ctrl+]"},l.onLoadSettings=function(){i.setInputValue("#select-document-selector-orderby",l.config.orderBy),i.setInputValue("#input-document-selector-shortcut-previous",l.config.shortcutPrevious),i.setInputValue("#input-document-selector-shortcut-next",l.config.shortcutNext)},l.onSaveSettings=function(e,t){e.orderBy=i.getInputValue("#select-document-selector-orderby"),e.shortcutPrevious=i.getInputTextValue("#input-document-selector-shortcut-previous",t),e.shortcutNext=i.getInputTextValue("#input-document-selector-shortcut-next",t)};var c;l.onFileMgrCreated=function(e){c=e};var u,d,p,f,h,m,g,v=['\n \n\n\n \n\n\n \n\n\n \n\n\n \n\n\n \n\n" data-file-index="<%= fileDesc.fileIndex %>">',' '," <%= fileDesc.composeTitle() %>"," "," "].join(""),b=t.debounce(function(){var n=t.chain(a).sortBy(f).reduce(function(e,n){return e+t.template(v,{fileDesc:n,isCurrent:n===h})},"").value();u.innerHTML=n,p=[],d={},t.each(u.querySelectorAll("li"),function(t){var n=e(t);p.push(n);var i=a[n.data("fileIndex")];d[i.fileIndex]=n,n.find("a").click(function(){m=void 0,n.hasClass("disabled")?g.focus():c.selectFile(i)})})},50);return l.onFileSelected=function(e){h=e,b()},l.onFileCreated=b,l.onFileDeleted=b,l.onTitleChanged=b,l.onSyncExportSuccess=b,l.onSyncRemoved=b,l.onNewPublishSuccess=b,l.onPublishRemoved=b,l.onReady=function(){g=e("#wmd-input"),"title"==l.config.orderBy?f=function(e){return e.title.toLowerCase()}:"mru"==l.config.orderBy&&(f=function(e){return-e.selectTime}),u=n("ul",{"class":"dropdown-menu dropdown-file-selector"}),document.querySelector(".navbar").appendChild(n("div",n("div",{"data-toggle":"dropdown"}),u));var i=e(u).dropdown(),r=e(".document-panel .collapse-button");r.prop("title",t.template("<%= title %> <%= shortcutPrevious %> <%= shortcutNext %>",{title:r.prop("title"),shortcutPrevious:l.config.shortcutPrevious,shortcutNext:l.config.shortcutNext}));var a=l.config.shortcutPrevious.toLowerCase();o.bind(a,function(){void 0===m&&(i.dropdown("toggle"),m=d[h.fileIndex]);var e=t.indexOf(p,m)-1;return-2===e&&(e=-1),m=p[(e+p.length)%p.length],setTimeout(function(){m.find("a").focus()},10),!1});var s=l.config.shortcutNext.toLowerCase();o.bind(l.config.shortcutNext.toLowerCase(),function(){void 0===m&&(i.dropdown("toggle"),m=d[h.fileIndex]);var e=t.indexOf(p,m)+1;return m=p[e%p.length],setTimeout(function(){m.find("a").focus()},10),!1});var c=a.indexOf("+"),v=-1===c?a:a.substring(0,c),b=s.indexOf("+"),y=-1===b?s:s.substring(0,b);o.bind([v,y],function(){void 0!==m&&m.find("a").click()},"keyup")},l}),define("classes/FolderDescriptor",["underscore","utils","storage","fileSystem"],function(e,t,n,i){function r(r,o){this.folderIndex=r,this._name=o||n[r+".name"],this.fileList={},e.each(t.retrieveIndexArray(r+".files"),function(e){try{var n=i[e];n.folder=this,this.fileList[e]=n}catch(o){t.removeIndexFromArray(r+".files",e)}},this),Object.defineProperty(this,"name",{get:function(){return this._name},set:function(e){this._name=e,n[this.folderIndex+".name"]=e}})}return r.prototype.addFile=function(e){e.folder=this,t.appendIndexToArray(this.folderIndex+".files",e.fileIndex),this.fileList[e.fileIndex]=e},r.prototype.removeFile=function(e){e.folder=void 0,t.removeIndexFromArray(this.folderIndex+".files",e.fileIndex),delete this.fileList[e.fileIndex]},r}),define("folderList",["underscore","utils","storage","classes/FolderDescriptor","storage"],function(e,t,n,i){var r={};return t.retrieveIndexArray("folder.list").forEach(function(e){r[e]=new i(e)}),Object.keys(n).forEach(function(e){var t=e.match(/(folder\.\S+?)\.\S+/);t&&!r.hasOwnProperty(t[1])&&n.removeItem(e)}),r}),define("extensions/documentPanel",["jquery","underscore","utils","classes/Extension","folderList","fileSystem"],function(e,t,n,i,r,o){function a(n){if(n!=y){if(y=n,b.scrollTop=0,!n)return f.addClass("hide"),d.removeClass("hide"),void 0;var i=n.toLowerCase().split(/\s+/);t.each(p.querySelectorAll(".file"),function(n){var r=e(n),o=r.text().toLowerCase();r.toggle(!t.some(i,function(e){return-1===o.indexOf(e)}))}),f.removeClass("hide"),d.addClass("hide")}}var s,l=new i("documentPanel","Document Panel");l.onFileMgrCreated=function(e){s=e};var c,u,d,p,f,h,m=['',''," <%= _.size(folderDesc.fileList) %>","",' <%= folderDesc.name %>',"",''," <%= fileListHtml %>",""].join(""),g=['"',' data-file-index="<%= fileDesc.fileIndex %>">'," <%= fileDesc.composeTitle() %>",""].join(""),v=t.debounce(function(){var n=t.filter(o,function(e){return void 0===e.folder}),i=t.chain(n).sortBy(function(e){return e.title.toLowerCase()}).reduce(function(e,n){return e+""+t.template(g,{fileDesc:n,selectedFileDesc:h})+" "},"").value();i=i&&' ",t.chain(r).sortBy(function(e){return e.name.toLowerCase()}).each(function(e){var n=t.chain(e.fileList).sortBy(function(e){return e.title.toLowerCase()}).reduce(function(e,n){return e+""+t.template(g,{fileDesc:n,selectedFileDesc:h})+" "},"").value();n=n&&' ",i+=t.template(m,{folderDesc:e,fileListHtml:n,id:e.folderIndex.replace(".","")})}),u.innerHTML=i;var a=t.chain(o).sortBy(function(e){return e.title.toLowerCase()}).reduce(function(e,n){return e+""+t.template(g,{fileDesc:n,selectedFileDesc:h})+" "},"").value();a=' ",p.innerHTML=a,t.each(c.querySelectorAll(".file"),function(t){var n=e(t);n.click(function(){var e=o[n.data("fileIndex")];e&&e!==h&&s.selectFile(e)})})},50);l.onFileSelected=function(e){h=e,v()},l.onFileCreated=v,l.onFileDeleted=v,l.onTitleChanged=v,l.onSyncExportSuccess=v,l.onSyncRemoved=v,l.onNewPublishSuccess=v,l.onPublishRemoved=v,l.onFoldersChanged=v;var b,y="";return l.onReady=function(){c=document.querySelector(".document-panel"),b=c.querySelector(".panel-content"),u=c.querySelector(".document-list"),d=e(u),p=c.querySelector(".document-list-filtered"),f=e(p),e(c).on("show.layout.toggle",function(){var t=h.folder;void 0!==t&&e(c.querySelector(".file-list."+t.folderIndex.replace(".",""))).collapse("show")}).on("shown.layout.toggle",function(){var e=u.querySelector(".file.active");e&&(b.scrollTop+=e.getBoundingClientRect().top-240)}).on("hidden.layout.toggle",function(){t.val(""),a("")});var t=e(c.querySelector(".search-bar .form-control"));t.bind("propertychange keyup input paste",function(){a(t.val())})},l}),define("extensions/documentManager",["jquery","underscore","constants","utils","storage","classes/Extension","classes/FolderDescriptor","folderList","fileSystem"],function(e,t,n,i,r,o,a,s,l){function c(){N=[],D=[],t.each(b.querySelectorAll('input[type="checkbox"]:checked'),function(t){var n=e(t.parentNode.parentNode),i=s[n.data("folderIndex")],r=l[n.data("fileIndex")];void 0!==i?N.push(i):void 0!==r&&D.push(r)})}function u(){if(0===t.size(D))return d(),void 0;var n=t.chain(D).sortBy(function(e){return e.title.toLowerCase()}).reduce(function(e,n){return e+t.template(I,{fileDesc:n})},"").value();y.innerHTML=''+n+"
",e(v.querySelectorAll(".document-list")).addClass("hide"),e(v.querySelectorAll(".confirm-delete, .selected-document-list")).removeClass("hide")}function d(){t.each(D,function(e){e.folder&&e.folder.removeFile(e),f.deleteFile(e)}),t.each(N,function(e){i.removeIndexFromArray("folder.list",e.folderIndex),delete s[e.folderIndex]}),m.onFoldersChanged()}function p(){c(),x.toggleClass("disabled",0===t.size(s)||0===t.size(D)),w.toggleClass("disabled",0===t.size(N)&&0===t.size(D))}var f,h=new o("documentManager","Document Manager",!1,!0);h.onFileMgrCreated=function(e){f=e};var m;h.onEventMgrCreated=function(e){m=e};var g,v,b,y,x,w,S,C,T,E=['','','','','<%= _.size(folderDesc.fileList) %>','',"<%= folderDesc.name %>",'','<%= fileListHtml %>'].join(""),k=['','','','',' '].join(""),_=['','<%= fileDesc.composeTitle() %>','<%= _.size(folderDesc.fileList) %>','',"<%= folderDesc.name %>"].join(""),I=['',' '].join(""),D=[],N=[],L=t.debounce(function(){if(g!==!1){p(),C.text(t.size(l)),T.text(t.size(s)+1),S=t.filter(l,function(e){return void 0===e.folder});var n=['','','<%= fileDesc.composeTitle() %>',t.size(S),"",'',"ROOT folder"].join(""),i=t.chain(S).sortBy(function(e){return e.title.toLowerCase()}).reduce(function(e,n){return e+t.template(k,{fileDesc:n})},"").value();i=i&&' ",n+=''+i+"",t.chain(s).sortBy(function(e){return e.name.toLowerCase()}).each(function(e){var i=t.chain(e.fileList).sortBy(function(e){return e.title.toLowerCase()}).reduce(function(e,n){return e+t.template(k,{fileDesc:n})},"").value();i=i&&' ",n+=t.template(E,{folderDesc:e,fileListHtml:i,id:e.folderIndex.replace(".","")})}),b.innerHTML=n,t.each(b.querySelectorAll(".button-delete"),function(t){var n=e(t);n.click(function(e){e.stopPropagation();var t=n.parent(),i=s[t.data("folderIndex")],r=l[t.data("fileIndex")];D=[],N=[],i?(N.push(i),D=i.fileList):r&&D.push(r),u()})}),t.each(b.querySelectorAll(".button-rename"),function(t){var n=e(t);n.click(function(e){e.stopPropagation();var t,i=n.parent(),r=s[i.data("folderIndex")],o=l[i.data("fileIndex")];r?t=r.name:o&&(t=o.title),i.find(".name").addClass("hide"),i.find(".input-rename").removeClass("hide").val(t)[0].select()})}),t.each(b.querySelectorAll(".input-rename"),function(t){function n(){var t=i.parent(),n=e.trim(i.val()),r=s[t.data("folderIndex")],o=l[t.data("fileIndex")];n&&r&&n!=r.name?(r.name=n,m.onFoldersChanged()):n&&o&&n!=o.title?(o.title=n,m.onTitleChanged(o)):(i.addClass("hide"),t.find(".name").removeClass("hide"))}var i=e(t);i.blur(function(){n()}).keyup(function(e){13==e.keyCode&&(n(),e.stopPropagation()),27==e.keyCode&&(i.val(""),n(),e.stopPropagation())})}),t.each(b.querySelectorAll(".file .checkbox"),function(t){var n=e(t);n.click(function(e){e.stopPropagation()}).find("[type=checkbox]").change(function(){n.parents(".list-group").find(".folder [type=checkbox]").prop("checked",!1)})}),t.each(b.querySelectorAll(".folder .checkbox"),function(t){var n=e(t);n.click(function(e){e.stopPropagation()}).find("[type=checkbox]").change(function(){n.parent().next().find("[type=checkbox]").prop("checked",this.checked)})}),e(b.querySelectorAll("[type=checkbox]")).change(p)}},50);return h.onFileCreated=L,h.onFileDeleted=L,h.onSyncExportSuccess=L,h.onSyncRemoved=L,h.onNewPublishSuccess=L,h.onPublishRemoved=L,h.onFoldersChanged=L,h.onTitleChanged=function(t){g!==!1&&(e(b).find('[data-file-index="'+t.fileIndex+'"] .name').html(t.composeTitle()).removeClass("hide"),e(b.querySelectorAll(".input-rename")).addClass("hide"))},h.onReady=function(){v=document.querySelector(".modal-document-manager"),b=v.querySelector(".list-group.document-list"),C=e(v.querySelectorAll(".document-count")),T=e(v.querySelectorAll(".folder-count")),y=v.querySelector(".list-group.selected-document-list");var o=v.querySelector(".list-group.select-folder-list");e(v).on("show.bs.modal",function(){g=!0,L(),setTimeout(function(){e(b.querySelectorAll(".root-folder")).click()},250)}).on("hide.bs.modal",function(){g=!1,b.innerHTML=""}),e(v.querySelectorAll(".action-create-folder")).click(function(){var o;do o="folder."+i.randomString();while(t.has(s,o));r[o+".name"]=n.DEFAULT_FOLDER_NAME;var l=new a(o,n.DEFAULT_FOLDER_NAME);i.appendIndexToArray("folder.list",o),s[o]=l,m.onFoldersChanged(),setTimeout(function(){var t=e(v.querySelector('[data-folder-index="'+o+'"] .button-rename')).click();v.scrollTop+=t.offset().top-50},60)}),e(v.querySelectorAll(".action-select-all")).click(function(){e(b.querySelectorAll('input[type="checkbox"]')).prop("checked",!0).change()}),e(v.querySelectorAll(".action-unselect-all")).click(function(){e(b.querySelectorAll('input[type="checkbox"]')).prop("checked",!1).change()});var l=e(v.querySelectorAll(".action-delete-items")).click(function(){w.hasClass("disabled")||(c(),u())});w=l.parent(),e(v.querySelectorAll(".action-delete-items-confirm")).click(function(){d(),e(v.querySelectorAll(".document-list")).removeClass("hide"),e(v.querySelectorAll(".confirm-delete, .selected-document-list")).addClass("hide")});var p=e(v.querySelectorAll(".action-move-items")).click(function(){if(!x.hasClass("disabled")){c();var n=['','',t.size(S),"",'',"ROOT folder"].join("");n+=t.chain(s).sortBy(function(e){return e.name.toLowerCase()}).reduce(function(e,n){return e+t.template(_,{folderDesc:n})},"").value(),o.innerHTML=n,t.each(o.querySelectorAll(".folder"),function(n){n=e(n),n.click(function(){var i=s[n.data("folderIndex")]; -t.each(D,function(e){e.folder&&e.folder.removeFile(e),i&&i.addFile(e)}),m.onFoldersChanged(),e(v.querySelectorAll(".document-list")).removeClass("hide"),e(v.querySelectorAll(".choose-folder, .select-folder-list")).addClass("hide")})}),e(v.querySelectorAll(".document-list")).addClass("hide"),e(v.querySelectorAll(".choose-folder, .select-folder-list")).removeClass("hide")}});x=p.parent(),e(v.querySelectorAll(".action-cancel")).click(function(){e(v.querySelectorAll(".document-list")).removeClass("hide"),e(v.querySelectorAll(".confirm-delete, .choose-folder, .selected-document-list, .select-folder-list")).addClass("hide")})},h}),define("extensions/workingIndicator",["jquery","underscore","crel","classes/Extension"],function(e,t,n,i){var r,o,a=new i("workingIndicator","Working Indicator"),s=["@<%= prefix %>keyframes <%= name %> {"," 0% { opacity:<%= z %>; }"," <%= start %>.01% { opacity:<%= alpha %>; }"," <%= start %>.02% { opacity:1; }"," <%= ((start + trail) % 100) %>.01% { opacity:<%= alpha %>; }"," 100% { opacity:<%= z %>; }","}"].join("\n");return a.onAsyncRunning=function(e){r.toggleClass("working",e),o.toggleClass("hide",!e)},a.onReady=function(){function i(e){e.z=Math.max(1-(1-e.alpha)/e.trail*(100-e.start),e.alpha),a+=t.template(s,t.extend({prefix:""},e)),a+=t.template(s,t.extend({prefix:"-webkit-"},e))}var a="";r=e(document.body),o=e(''),e(".working-indicator").append(o);for(var l=0;3>l;l++){var c="working-indicator-bar"+l;i({name:c,alpha:.25,start:20*l,trail:50});var u=c+" 0.7s linear infinite";o.append(e('\n\n '),this.interval=setInterval(function(){e(n).data("jGrowl.instance").update()},parseInt(this.defaults.check)),t&&e(this.element).addClass("ie6")},shutdown:function(){e(this.element).removeClass("jGrowl").find("div.jGrowl-notification").remove(),clearInterval(this.interval)},close:function(){e(this.element).find("div.jGrowl-notification").each(function(){e(this).trigger("jGrowl.beforeClose")})}}),e.jGrowl.defaults=e.fn.jGrowl.prototype.defaults}(jQuery),define("jgrowl",["jquery"],function(e){return function(){var t;return t||e.jQuery.jGrowl}}(this)),define("text!html/notificationsSettingsBlock.html",[],function(){return'Shows notification messages in the bottom-right corner of the\n screen.
\n\n'}),define("extensions/notifications",["jquery","underscore","utils","logger","classes/Extension","jgrowl","text!html/notificationsSettingsBlock.html"],function(e,t,n,i,r,o,a){function s(){f===!1&&(o.defaults.life=u.config.timeout,o.defaults.closer=!1,o.defaults.closeTemplate="",o.defaults.position="bottom-right",f=!0)}function l(e,n,r){if(i.info(e),s(),e){var a=e.indexOf("|");(-1===a||(e=e.substring(0,a)))&&(r=r||{},n=n||"icon-info-circled",o(" "+t.escape(e).replace(/\n/g,"\n \n\n\n ms\n\n
"),r))}}function c(){h!==!1&&(d.toggleClass("hide",!m),p.toggleClass("hide",m))}var u=new r("notifications","Notifications");u.settingsBlock=a,u.defaultConfig={timeout:8e3},u.onLoadSettings=function(){n.setInputValue("#input-notifications-timeout",u.config.timeout)},u.onSaveSettings=function(e,t){e.timeout=n.getInputIntValue("#input-notifications-timeout",t,1,6e4)};var d,p,f=!1,h=!1;u.onReady=function(){h=!0,d=e(".navbar .offline-status"),p=e(".navbar .extension-buttons"),c()},u.onMessage=function(e){l(e)},u.onError=function(e){i.error(e),t.isString(e)?l(e,"icon-attention"):t.isObject(e)&&l(e.message,"icon-attention")};var m=!1;return u.onOfflineChanged=function(e){m=e,c(),m===!0?l("You are offline.","icon-attention-circled msg-offline"):l("You are back online!","icon-signal")},u.onSyncImportSuccess=function(e,n){var i=t.map(e,function(e){return e.title}).join(", ");l(i+" imported successfully from "+n.providerName+".")},u.onSyncExportSuccess=function(e,t){l('"'+e.title+'" will now be synchronized on '+t.provider.providerName+".")},u.onSyncRemoved=function(e,t){l(t.provider.providerName+" synchronized location has been removed.")},u.onPublishSuccess=function(e){l('"'+e.title+'" successfully published.')},u.onNewPublishSuccess=function(e,t){l('"'+e.title+'" is now published on '+t.provider.providerName+".")},u.onPublishRemoved=function(e,t){l(t.provider.providerName+" publish location has been removed.")},u}),define("text!html/buttonToc.html",[],function(){return'\n \n'}),define("text!html/tocSettingsBlock.html",[],function(){return'Generates a table of contents when a [TOC] marker is found.
\n\n'}),define("extensions/toc",["jquery","underscore","utils","classes/Extension","text!html/buttonToc.html","text!html/tocSettingsBlock.html"],function(e,t,n,i,r,o){function a(e,t,n){this.tagName=e,this.anchor=t,this.text=n,this.children=[]}function s(e,n){function i(){void 0!==r&&(r.children.length>0&&(r.children=s(r.children,n+1)),l.push(r))}n=n||1;var r,o="H"+n,l=[];return t.each(e,function(e){e.tagName!=o?n!==c.config.maxDepth&&(void 0===r&&(r=new a),r.children.push(e)):(i(),r=e)}),i(),l}function l(){function e(e){for(var r=e.id||n.slugify(e.textContent)||"title",o=r,a=0;t.has(i,o);)o=r+"-"+ ++a;return i[o]=!0,e.id=o,o}var i={},r=[];return t.each(u.querySelectorAll("h1, h2, h3, h4, h5, h6"),function(t){r.push(new a(t.tagName,e(t),t.textContent))}),r=s(r),'\n \n\n\n \n \n\n\n \n\n\n \n\n\n \n\n \n\n\n\n \n\n\n\n"}var c=new i("toc","Table of Contents",!0);c.settingsBlock=o,c.defaultConfig={marker:"\\[(TOC|toc)\\]",maxDepth:6,button:!0},c.onLoadSettings=function(){n.setInputValue("#input-toc-marker",c.config.marker),n.setInputValue("#input-toc-maxdepth",c.config.maxDepth),n.setInputChecked("#input-toc-button",c.config.button)},c.onSaveSettings=function(e,t){e.marker=n.getInputRegExpValue("#input-toc-marker",t),e.maxDepth=n.getInputIntValue("#input-toc-maxdepth"),e.button=n.getInputChecked("#input-toc-button")},c.onCreatePreviewButton=function(){return c.config.button?r:void 0},a.prototype.childrenToString=function(){if(0===this.children.length)return"";var e="\n'+r.join("")+"
\n\n";return t.each(this.children,function(t){e+=t.toString()}),e+="
\n"},a.prototype.toString=function(){var e="";return this.anchor&&this.text&&(e+=''+this.text+""),e+=this.childrenToString()+" \n"};var u;return c.onPagedownConfigure=function(e){u=document.getElementById("preview-contents");var n=new RegExp("^\\s*"+c.config.marker+"\\s*$");e.hooks.chain("onPreviewRefresh",function(){var e=document.querySelectorAll(".table-of-contents, .toc"),i=l();t.each(u.getElementsByTagName("p"),function(e){n.test(e.innerHTML)&&(e.innerHTML=i)}),t.each(e,function(e){e.innerHTML=i})})},c}),define("extensions/emailConverter",["classes/Extension"],function(e){var t=new e("emailConverter","Markdown Email",!0);return t.settingsBlock="Converts email adresses in the form <email@example.com> into clickable links.
",t.onPagedownConfigure=function(e){e.getConverter().hooks.chain("postConversion",function(e){return e.replace(/<(mailto\:)?([^\s>]+@[^\s>]+\.\S+?)>/g,function(e,t,n){return''+n+""})})},t}),define("text!html/scrollSyncSettingsBlock.html",[],function(){return"Binds together editor and preview scrollbars.
\n\n Note: The mapping between Markdown and HTML is based on the\n position of the title elements (h1, h2...) in the page. Therefore if\n your document does not contain any title, the mapping will be linear and\n consequently less accurate.\n"}),define("extensions/scrollSync",["jquery","underscore","classes/Extension","text!html/scrollSyncSettingsBlock.html"],function(e,t,n,i){var r=new n("scrollSync","Scroll Sync",!0,!0);r.settingsBlock=i,e.easing.easeOutSine=function(e){return Math.cos((1-e)*Math.PI/2)};var o;r.onSectionsCreated=function(e){o=e};var a,s,l,c,u=!0,d=[],p=[],f=t.debounce(function(){if(u){d=[];var t,n,i=a.scrollTop();a.find(".wmd-input-section").each(function(){if(void 0===t)return t=0,void 0;var n=e(this.firstChild),r=n.position().top+i;d.push({startOffset:t,endOffset:r,height:r-t}),t=r}),n=a.prop("scrollHeight"),d.push({startOffset:t,endOffset:n,height:n-t}),p=[];var r,o=s.scrollTop();s.find(".wmd-preview-section").each(function(){if(void 0===r)return r=0,void 0;var t=e(this),n=t.position().top+o;p.push({startOffset:r,endOffset:n,height:n-r}),r=n}),n=s.prop("scrollHeight"),p.push({startOffset:r,endOffset:n,height:n-r}),l=-10,c=-10,y()}},500),h=!1,m=!1,g=!1,v=!1,b=e(""),y=t.throttle(function(){function e(e,n,i){var r,o=t.find(n,function(t,n){return r=n,e'}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},t.prototype.tip=function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip};var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var i=e(this),r=i.data("bs.popover"),o="object"==typeof n&&n;r||i.data("bs.popover",r=new t(this,o)),"string"==typeof n&&r[n]()})},e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(jQuery),+function(e){function t(n,i){var r,o=e.proxy(this.process,this);this.$element=e(n).is("body")?e(window):e(n),this.$body=e("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",o),this.options=e.extend({},t.DEFAULTS,i),this.selector=(this.options.target||(r=e(n).attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=e([]),this.targets=e([]),this.activeTarget=null,this.refresh(),this.process()}t.DEFAULTS={offset:10},t.prototype.refresh=function(){var t=this.$element[0]==window?"offset":"position";this.offsets=e([]),this.targets=e([]);var n=this;this.$body.find(this.selector).map(function(){var i=e(this),r=i.data("target")||i.attr("href"),o=/^#\w/.test(r)&&e(r);return o&&o.length&&[[o[t]().top+(!e.isWindow(n.$scrollElement.get(0))&&n.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){n.offsets.push(this[0]),n.targets.push(this[1])})},t.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,i=n-this.$scrollElement.height(),r=this.offsets,o=this.targets,a=this.activeTarget;if(t>=i)return a!=(e=o.last()[0])&&this.activate(e);for(e=r.length;e--;)a!=o[e]&&t>=r[e]&&(!r[e+1]||t<=r[e+1])&&this.activate(o[e])},t.prototype.activate=function(t){this.activeTarget=t,e(this.selector).parents(".active").removeClass("active");var n=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=e(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var i=e(this),r=i.data("bs.scrollspy"),o="object"==typeof n&&n;r||i.data("bs.scrollspy",r=new t(this,o)),"string"==typeof n&&r[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(jQuery),+function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=n.find(".active:last a")[0],o=e.Event("show.bs.tab",{relatedTarget:r});if(t.trigger(o),!o.isDefaultPrevented()){var a=e(i);this.activate(t.parent("li"),n),this.activate(a,a.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:r})})}}},t.prototype.activate=function(t,n,i){function r(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),a?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),i&&i()}var o=n.find("> .active"),a=i&&e.support.transition&&o.hasClass("fade");a?o.one(e.support.transition.end,r).emulateTransitionEnd(150):r(),o.removeClass("in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var i=e(this),r=i.data("bs.tab");r||i.data("bs.tab",r=new t(this)),"string"==typeof n&&r[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(jQuery),+function(e){var t=function(n,i){this.options=e.extend({},t.DEFAULTS,i),this.$window=e(window).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=this.unpin=null,this.checkPosition()};t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=e(document).height(),i=this.$window.scrollTop(),r=this.$element.offset(),o=this.options.offset,a=o.top,s=o.bottom;"object"!=typeof o&&(s=a=o),"function"==typeof a&&(a=o.top()),"function"==typeof s&&(s=o.bottom());var l=null!=this.unpin&&i+this.unpin<=r.top?!1:null!=s&&r.top+this.$element.height()>=n-s?"bottom":null!=a&&a>=i?"top":!1;this.affixed!==l&&(this.unpin&&this.$element.css("top",""),this.affixed=l,this.unpin="bottom"==l?r.top-i:null,this.$element.removeClass(t.RESET).addClass("affix"+(l?"-"+l:"")),"bottom"==l&&this.$element.offset({top:document.body.offsetHeight-s-this.$element.height()}))}};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var i=e(this),r=i.data("bs.affix"),o="object"==typeof n&&n;r||i.data("bs.affix",r=new t(this,o)),"string"==typeof n&&r[n]()})},e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(jQuery),define("bootstrap",function(){}),function(e,t){var n,i;return i=t.document,n=function(){function n(n){this._options=e.extend({name:"tour",container:"body",keyboard:!0,storage:t.localStorage,debug:!1,backdrop:!1,redirect:!0,orphan:!1,duration:!1,basePath:"",template:"n&&(n=0);var i,r=s.scrollTop();if(h===!0){if(Math.abs(n-l)<=9)return;if(h=!1,l=n,i=e(n,d,p),i=t.min([i,s.prop("scrollHeight")-s.outerHeight()]),Math.abs(i-r)<=9)return c=r,void 0;b.stop("scrollSyncFx",!0).css("value",0).animate({value:i-r},{easing:"easeOutSine",duration:200,queue:"scrollSyncFx",step:function(e){v=!0,c=r+e,s.scrollTop(c)},done:function(){setTimeout(function(){v=!1},10)}}).dequeue("scrollSyncFx")}else if(m===!0){if(Math.abs(r-c)<=9)return;if(m=!1,c=r,i=e(r,p,d),i=t.min([i,a.prop("scrollHeight")-a.outerHeight()]),Math.abs(i-n)<=9)return l=n,void 0;b.stop("scrollSyncFx",!0).css("value",0).animate({value:i-n},{easing:"easeOutSine",duration:200,queue:"scrollSyncFx",step:function(e){g=!0,l=n+e,a.scrollTop(l)},done:function(){setTimeout(function(){g=!1},10)}}).dequeue("scrollSyncFx")}}},100);r.onLayoutResize=function(){h=!0,f()},r.onFileClosed=function(){d=[]};var x=!1;r.onReady=function(){s=e(".preview-container"),a=e("#wmd-input"),s.scroll(function(){v===!1&&x===!1&&(m=!0,h=!1,y()),x=!1}),a.scroll(function(){g===!1&&(h=!0,m=!1,y())}),s.on("hide.layout.toggle",function(){u=!1}),s.on("shown.layout.toggle",function(){u=!0})};var w;return r.onPagedownConfigure=function(t){w=e("#preview-contents"),t.getConverter().hooks.chain("postConversion",function(e){return w.height(w.height()),e})},r.onPreviewFinished=function(){var e=w.height();w.height("auto");var t=w.height();h=!0,e>t&&(x=!0),f()},r}),define("text!html/buttonSyncSettingsBlock.html",[],function(){return' Adds a "Synchronize documents" button in the navigation bar.
\n\n'}),define("extensions/buttonSync",["jquery","underscore","crel","utils","classes/Extension","mousetrap","text!html/buttonSyncSettingsBlock.html"],function(e,t,n,i,r,o,a){var s=new r("buttonSync",'Button "Synchronize"',!1,!0);s.settingsBlock=a,s.defaultConfig={syncPeriod:18e4,syncShortcut:"mod+s"},s.onLoadSettings=function(){i.setInputValue("#input-sync-period",s.config.syncPeriod),i.setInputValue("#input-sync-shortcut",s.config.syncShortcut)},s.onSaveSettings=function(e,t){e.syncPeriod=i.getInputIntValue("#input-sync-period",t,0),e.syncShortcut=i.getInputTextValue("#input-sync-shortcut",t)};var l;s.onSynchronizerCreated=function(e){l=e};var c,u=!1,d=!1,p=function(){void 0!==c&&(u===!0||l.hasSync()===!1||d?c.addClass("disabled"):c.removeClass("disabled"))},f=0;return s.onPeriodicRun=function(){!s.config.syncPeriod||f+s.config.syncPeriod>i.currentTime||l.sync()&&(f=i.currentTime)},s.onCreateButton=function(){var t=n("a",{"class":"btn btn-success button-synchronize",title:"Force synchronization Ctrl/Cmd+S"},n("i",{"class":"icon-refresh"}));return c=e(t),c.click(function(){c.hasClass("disabled")||l.sync()&&(f=i.currentTime)}),t},s.onReady=p,s.onFileCreated=p,s.onFileDeleted=p,s.onSyncImportSuccess=p,s.onSyncExportSuccess=p,s.onSyncRemoved=p,s.onSyncRunning=function(e){u=e,p()},s.onOfflineChanged=function(e){d=e,p()},s.onReady=function(){o.bind(s.config.syncShortcut,function(e){l.sync()&&(f=i.currentTime),e.preventDefault()}),e(".action-force-synchronization").click(function(){l.sync()&&(f=i.currentTime)})},s}),define("extensions/buttonPublish",["jquery","underscore","crel","classes/Extension"],function(e,t,n,i){function r(){void 0!==o&&(c===!0||u===!1||d===!0?o.addClass("disabled"):o.removeClass("disabled"))}var o,a,s,l=new i("buttonPublish",'Button "Publish"'),c=!1,u=!1,d=!1;l.onPublisherCreated=function(e){s=e},l.onCreateButton=function(){var t=n("a",{"class":"btn btn-success button-publish",title:"Update document publication"},n("i",{"class":"icon-upload"}));return o=e(t).click(function(){o.hasClass("disabled")||s.publish()}),t},l.onPublishRunning=function(e){c=e,r()},l.onOfflineChanged=function(e){d=e,r()};var p=function(){u=0===t.size(a.publishLocations)?!1:!0,r()};return l.onFileSelected=function(e){a=e,p()},l.onReady=function(){e(".action-update-publication").click(s.publish)},l.onPublishRemoved=p,l.onNewPublishSuccess=p,l}),define("text!html/buttonStat.html",[],function(){return'\n \n'}),define("text!html/buttonStatSettingsBlock.html",[],function(){return'\n \n\n\n ms\n\n\n \n\n\n \n\nAdds a "Document statistics" button over the preview.
\n\n\n'}),define("extensions/buttonStat",["jquery","underscore","utils","classes/Extension","text!html/buttonStat.html","text!html/buttonStatSettingsBlock.html"],function(e,t,n,i,r,o){var a=new i("buttonStat",'Button "Statistics"',!0,!0);a.settingsBlock=o,a.defaultConfig={name1:"Characters",value1:"\\S",name2:"Words",value2:"\\S+",name3:"Paragraphs",value3:"\\S.*"},a.onLoadSettings=function(){t.each([1,2,3],function(e){n.setInputValue("#input-stat-name"+e,a.config["name"+e]),n.setInputValue("#input-stat-value"+e,a.config["value"+e])})},a.onSaveSettings=function(e,i){t.each([1,2,3],function(t){e["name"+t]=n.getInputTextValue("#input-stat-name"+t,i),e["value"+t]=n.getInputRegExpValue("#input-stat-value"+t,i)})},a.onCreatePreviewButton=function(){return t.template(r,a.config)};var s,l,c,u;return a.onReady=function(){s=document.getElementById("preview-contents"),l=document.getElementById("span-stat-value1"),c=document.getElementById("span-stat-value2"),u=document.getElementById("span-stat-value3")},a.onPreviewFinished=function(){for(var e=s.cloneNode(!0),t=e.getElementsByTagName("script"),n=t.length-1;n>=0;n--){var i=t[n];i.parentNode.removeChild(i)}var r=e.textContent;l.textContent=(r.match(new RegExp(a.config.value1,"g"))||[]).length,c.textContent=(r.match(new RegExp(a.config.value2,"g"))||[]).length,u.textContent=(r.match(new RegExp(a.config.value3,"g"))||[]).length},a}),define("text!html/buttonHtmlCode.html",[],function(){return'\n \n'}),define("text!html/buttonHtmlCodeSettingsBlock.html",[],function(){return'\n \n\n\n \n\n\n \n\nAdds a "HTML code" button over the preview.
\n\n'}),define("extensions/buttonHtmlCode",["jquery","underscore","utils","classes/Extension","text!html/buttonHtmlCode.html","text!html/buttonHtmlCodeSettingsBlock.html"],function(e,t,n,i,r,o){var a=new i("buttonHtmlCode",'Button "HTML code"',!0,!0);a.settingsBlock=o,a.defaultConfig={template:"<%= documentHTML %>"},a.onLoadSettings=function(){n.setInputValue("#textarea-html-code-template",a.config.template)},a.onSaveSettings=function(e){e.template=n.getInputValue("#textarea-html-code-template")};var s;a.onEventMgrCreated=function(e){s=e},a.onCreatePreviewButton=function(){return r};var l;a.onFileSelected=function(e){l=e};var c,u;return a.onPreviewFinished=function(e,t){c=e,u=t},a.onReady=function(){var n=document.getElementById("input-html-code");e(".action-html-code").click(function(){setTimeout(function(){e("#input-html-code").each(function(){e(this).is(":hidden")||this.select()})},10)}).parent().on("show.bs.dropdown",function(){try{var e=t.template(a.config.template,{documentTitle:l.title,documentMarkdown:l.content,strippedDocumentMarkdown:l.content.substring(l.frontMatter?l.frontMatter._frontMatter.length:0),documentHTML:u,documentHTMLWithComments:c,frontMatter:l.frontMatter,publishAttributes:void 0});n.value=e}catch(i){s.onError(i)}})},a}),define("text!html/buttonViewer.html",[],function(){return'\n \n\n'}),define("extensions/buttonViewer",["jquery","classes/Extension","text!html/buttonViewer.html"],function(e,t,n){var i=new t("buttonViewer",'Button "Viewer"',!0,!0);return i.settingsBlock='\n \n\n\n \n\nAdds a "Viewer" button over the preview.
',i.onCreatePreviewButton=function(){return n},i}),"undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");+function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,i=this;e(this).one(e.support.transition.end,function(){n=!0});var r=function(){n||e(i).trigger(e.support.transition.end)};return setTimeout(r,t),this},e(function(){e.support.transition=t()})}(jQuery),+function(e){var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function n(){o.trigger("closed.bs.alert").remove()}var i=e(this),r=i.attr("data-target");r||(r=i.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var o=e(r);t&&t.preventDefault(),o.length||(o=i.hasClass("alert")?i:i.parent()),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one(e.support.transition.end,n).emulateTransitionEnd(150):n())};var i=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var i=e(this),r=i.data("bs.alert");r||i.data("bs.alert",r=new n(this)),"string"==typeof t&&r[t].call(i)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=i,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(jQuery),+function(e){var t=function(n,i){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,i)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,i=n.is("input")?"val":"html",r=n.data();e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){"loadingText"==e?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons"]'),t=!0;if(e.length){var n=this.$element.find("input");"radio"===n.prop("type")&&(n.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&n.prop("checked",!this.$element.hasClass("active")).trigger("change")}t&&this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var i=e(this),r=i.data("bs.button"),o="object"==typeof n&&n;r||i.data("bs.button",r=new t(this,o)),"toggle"==n?r.toggle():n&&r.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle"),t.preventDefault()})}(jQuery),+function(e){var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},t.prototype.to=function(t){var n=this,i=this.getActiveIndex();return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){n.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(this.$items[t]))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){return this.sliding?void 0:this.slide("next")},t.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},t.prototype.slide=function(t,n){var i=this.$element.find(".item.active"),r=n||i[t](),o=this.interval,a="next"==t?"left":"right",s="next"==t?"first":"last",l=this;if(!r.length){if(!this.options.wrap)return;r=this.$element.find(".item")[s]()}this.sliding=!0,o&&this.pause();var c=e.Event("slide.bs.carousel",{relatedTarget:r[0],direction:a});if(!r.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var t=e(l.$indicators.children()[l.getActiveIndex()]);t&&t.addClass("active")})),e.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(c),c.isDefaultPrevented())return;r.addClass(t),r[0].offsetWidth,i.addClass(a),r.addClass(a),i.one(e.support.transition.end,function(){r.removeClass([t,a].join(" ")).addClass("active"),i.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(c),c.isDefaultPrevented())return;i.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")}return o&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var i=e(this),r=i.data("bs.carousel"),o=e.extend({},t.DEFAULTS,i.data(),"object"==typeof n&&n),a="string"==typeof n?n:o.slide;r||i.data("bs.carousel",r=new t(this,o)),"number"==typeof n?r.to(n):a?r[a]():o.interval&&r.pause().cycle()})},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n,i=e(this),r=e(i.attr("data-target")||(n=i.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"")),o=e.extend({},r.data(),i.data()),a=i.attr("data-slide-to");a&&(o.interval=!1),r.carousel(o),(a=i.attr("data-slide-to"))&&r.data("bs.carousel").to(a),t.preventDefault()}),e(window).on("load",function(){e('[data-ride="carousel"]').each(function(){var t=e(this);t.carousel(t.data())})})}(jQuery),+function(e){var t=function(n,i){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,i),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e=this.$element.hasClass("width");return e?"width":"height"},t.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t=e.Event("show.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.$parent&&this.$parent.find("> .panel > .in");if(n&&n.length){var i=n.data("bs.collapse");if(i&&i.transitioning)return; -n.collapse("hide"),i||n.data("bs.collapse",null)}var r=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[r](0),this.transitioning=1;var o=function(){this.$element.removeClass("collapsing").addClass("in")[r]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return o.call(this);var a=e.camelCase(["scroll",r].join("-"));this.$element.one(e.support.transition.end,e.proxy(o,this)).emulateTransitionEnd(350)[r](this.$element[0][a])}}},t.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=e.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return e.support.transition?(this.$element[n](0).one(e.support.transition.end,e.proxy(i,this)).emulateTransitionEnd(350),void 0):i.call(this)}}},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var i=e(this),r=i.data("bs.collapse"),o=e.extend({},t.DEFAULTS,i.data(),"object"==typeof n&&n);r||i.data("bs.collapse",r=new t(this,o)),"string"==typeof n&&r[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(t){var n,i=e(this),r=i.attr("data-target")||t.preventDefault()||(n=i.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""),o=e(r),a=o.data("bs.collapse"),s=a?"toggle":i.data(),l=i.attr("data-parent"),c=l&&e(l);a&&a.transitioning||(c&&c.find('[data-toggle=collapse][data-parent="'+l+'"]').not(i).addClass("collapsed"),i[o.hasClass("in")?"addClass":"removeClass"]("collapsed")),o.collapse(s)})}(jQuery),+function(e){function t(){e(i).remove(),e(r).each(function(t){var i=n(e(this));i.hasClass("open")&&(i.trigger(t=e.Event("hide.bs.dropdown")),t.isDefaultPrevented()||i.removeClass("open").trigger("hidden.bs.dropdown"))})}function n(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&e(n);return i&&i.length?i:t.parent()}var i=".dropdown-backdrop",r="[data-toggle=dropdown]",o=function(t){e(t).on("click.bs.dropdown",this.toggle)};o.prototype.toggle=function(i){var r=e(this);if(!r.is(".disabled, :disabled")){var o=n(r),a=o.hasClass("open");if(t(),!a){if("ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&e('').insertAfter(e(this)).on("click",t),o.trigger(i=e.Event("show.bs.dropdown")),i.isDefaultPrevented())return;o.toggleClass("open").trigger("shown.bs.dropdown"),r.focus()}return!1}},o.prototype.keydown=function(t){if(/(38|40|27)/.test(t.keyCode)){var i=e(this);if(t.preventDefault(),t.stopPropagation(),!i.is(".disabled, :disabled")){var o=n(i),a=o.hasClass("open");if(!a||a&&27==t.keyCode)return 27==t.which&&o.find(r).focus(),i.click();var s=e("[role=menu] li:not(.divider):visible a",o);if(s.length){var l=s.index(s.filter(":focus"));38==t.keyCode&&l>0&&l--,40==t.keyCode&&l').appendTo(document.body),this.$element.on("click.dismiss.modal",e.proxy(function(e){e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,i){return this.each(function(){var r=e(this),o=r.data("bs.modal"),a=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n);o||r.data("bs.modal",o=new t(this,a)),"string"==typeof n?o[n](i):a.show&&o.show(i)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),i=n.attr("href"),r=e(n.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),o=r.data("modal")?"toggle":e.extend({remote:!/#/.test(i)&&i},r.data(),n.data());t.preventDefault(),r.modal(o,this).one("hide",function(){n.is(":visible")&&n.focus()})}),e(document).on("show.bs.modal",".modal",function(){e(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){e(document.body).removeClass("modal-open")})}(jQuery),+function(e){var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:' ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,n,i){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(i);for(var r=this.options.trigger.split(" "),o=r.length;o--;){var a=r[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focus",l="hover"==a?"mouseleave":"blur";this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,i){n[e]!=i&&(t[e]=i)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show),void 0):n.show()},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide),void 0):n.hide()},t.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(t),t.isDefaultPrevented())return;var n=this.tip();this.setContent(),this.options.animation&&n.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,r=/\s?auto?\s?/i,o=r.test(i);o&&(i=i.replace(r,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass(i),this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var a=this.getPosition(),s=n[0].offsetWidth,l=n[0].offsetHeight;if(o){var c=this.$element.parent(),u=i,d=document.documentElement.scrollTop||document.body.scrollTop,p="body"==this.options.container?window.innerWidth:c.outerWidth(),f="body"==this.options.container?window.innerHeight:c.outerHeight(),h="body"==this.options.container?0:c.offset().left;i="bottom"==i&&a.top+a.height+l-d>f?"top":"top"==i&&a.top-d-l<0?"bottom":"right"==i&&a.right+s>p?"left":"left"==i&&a.left-s",afterSetState:function(){},afterGetState:function(){},afterRemoveState:function(){},onStart:function(){},onEnd:function(){},onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNext:function(){},onPrev:function(){},onPause:function(){},onResume:function(){}},n),this._force=!1,this._inited=!1,this._steps=[],this.backdrop={overlay:null,$element:null,$background:null,backgroundShown:!1,overlayElementShown:!1}}return n.prototype.setState=function(e,t){var n,i;if(this._options.storage){i=""+this._options.name+"_"+e;try{this._options.storage.setItem(i,t)}catch(r){n=r,n.code===DOMException.QUOTA_EXCEEDED_ERR&&this.debug("LocalStorage quota exceeded. setState failed.")}return this._options.afterSetState(i,t)}return null==this._state&&(this._state={}),this._state[e]=t},n.prototype.removeState=function(e){var t;return this._options.storage?(t=""+this._options.name+"_"+e,this._options.storage.removeItem(t),this._options.afterRemoveState(t)):null!=this._state?delete this._state[e]:void 0},n.prototype.getState=function(e){var t,n;return this._options.storage?(t=""+this._options.name+"_"+e,n=this._options.storage.getItem(t)):null!=this._state&&(n=this._state[e]),(void 0===n||"null"===n)&&(n=null),this._options.afterGetState(e,n),n},n.prototype.addSteps=function(e){var t,n,i,r;for(r=[],n=0,i=e.length;i>n;n++)t=e[n],r.push(this.addStep(t));return r},n.prototype.addStep=function(e){return this._steps.push(e)},n.prototype.getStep=function(t){return null!=this._steps[t]?e.extend({id:"step-"+t,path:"",placement:"right",title:"",content:"",next:t===this._steps.length-1?-1:t+1,prev:t-1,animation:!0,container:this._options.container,backdrop:this._options.backdrop,redirect:this._options.redirect,orphan:this._options.orphan,duration:this._options.duration,template:this._options.template,onShow:this._options.onShow,onShown:this._options.onShown,onHide:this._options.onHide,onHidden:this._options.onHidden,onNext:this._options.onNext,onPrev:this._options.onPrev,onPause:this._options.onPause,onResume:this._options.onResume},this._steps[t]):void 0},n.prototype.init=function(e){var t=this;return this._force=e,this.ended()?this._debug("Tour ended, init prevented."):(this.setCurrentStep(),this._setupMouseNavigation(),this._setupKeyboardNavigation(),this._onResize(function(){return t.showStep(t._current)}),null!==this._current&&this.showStep(this._current),this._inited=!0,this)},n.prototype.start=function(e){var t;return null==e&&(e=!1),this._inited||this.init(e),null===this._current?(t=this._makePromise(null!=this._options.onStart?this._options.onStart(this):void 0),this._callOnPromiseDone(t,this.showStep,0)):void 0},n.prototype.next=function(){var e;return this.ended()?this._debug("Tour ended, next prevented."):(e=this.hideStep(this._current),this._callOnPromiseDone(e,this._showNextStep))},n.prototype.prev=function(){var e;return this.ended()?this._debug("Tour ended, prev prevented."):(e=this.hideStep(this._current),this._callOnPromiseDone(e,this._showPrevStep))},n.prototype.goTo=function(e){var t;return this.ended()?this._debug("Tour ended, goTo prevented."):(t=this.hideStep(this._current),this._callOnPromiseDone(t,this.showStep,e))},n.prototype.end=function(){var n,r,o=this;return n=function(){return e(i).off("click.tour-"+o._options.name),e(i).off("keyup.tour-"+o._options.name),e(t).off("resize.tour-"+o._options.name),o.setState("end","yes"),o._inited=!1,o._force=!1,o._clearTimer(),null!=o._options.onEnd?o._options.onEnd(o):void 0},r=this.hideStep(this._current),this._callOnPromiseDone(r,n)},n.prototype.ended=function(){return!this.force&&!!this.getState("end")},n.prototype.restart=function(){return this.removeState("current_step"),this.removeState("end"),this.setCurrentStep(0),this.start()},n.prototype.pause=function(){var e;return e=this.getStep(this._current),e&&e.duration?(this._paused=!0,this._duration-=(new Date).getTime()-this._start,t.clearTimeout(this._timer),this._debug("Paused/Stopped step "+(this._current+1)+" timer ("+this._duration+" remaining)."),null!=e.onPause?e.onPause(this,this._duration):void 0):void 0},n.prototype.resume=function(){var e,n=this;return e=this.getStep(this._current),e&&e.duration?(this._paused=!1,this._start=(new Date).getTime(),this._duration=this._duration||e.duration,this._timer=t.setTimeout(function(){return n._isLast()?n.next():n.end()},this._duration),this._debug("Started step "+(this._current+1)+" timer with duration "+this._duration),null!=e.onResume&&this._duration!==e.duration?e.onResume(this,this._duration):void 0):void 0},n.prototype.hideStep=function(t){var n,i,r,o=this;return(r=this.getStep(t))?(this._clearTimer(),i=this._makePromise(null!=r.onHide?r.onHide(this,t):void 0),n=function(){var t;return t=e(r.element),t.data("bs.popover")||t.data("popover")||(t=e("body")),t.popover("destroy"),r.reflex&&t.css("cursor","").off("click.tour-"+o._options.name),r.backdrop&&o._hideBackdrop(),null!=r.onHidden?r.onHidden(o):void 0},this._callOnPromiseDone(i,n),i):void 0},n.prototype.showStep=function(t){var n,r,o,a,s=this;return(a=this.getStep(t))?(o=t").parent().html(),i.popover({placement:t.placement,trigger:"manual",title:t.title,content:t.content,html:!0,animation:t.animation,container:t.container,template:t.template,selector:t.element}).popover("show"),a=i.data("bs.popover")?i.data("bs.popover").tip():i.data("popover").tip(),a.attr("id",t.id),this._reposition(a,t),s?this._center(a):void 0},n.prototype._reposition=function(t,n){var r,o,a,s,l,c,u;if(s=t[0].offsetWidth,o=t[0].offsetHeight,u=t.offset(),l=u.left,c=u.top,r=e(i).outerHeight()-u.top-t.outerHeight(),0>r&&(u.top=u.top+r),a=e("html").outerWidth()-u.left-t.outerWidth(),0>a&&(u.left=u.left+a),u.top<0&&(u.top=0),u.left<0&&(u.left=0),t.offset(u),"bottom"===n.placement||"top"===n.placement){if(l!==u.left)return this._replaceArrow(t,2*(u.left-l),s,"left")}else if(c!==u.top)return this._replaceArrow(t,2*(u.top-c),o,"top")},n.prototype._center=function(n){return n.css("top",e(t).outerHeight()/2-n.outerHeight()/2)},n.prototype._replaceArrow=function(e,t,n,i){return e.find(".arrow").css(i,t?50*(1-t/n)+"%":"")},n.prototype._scrollIntoView=function(n,i){var r,o,a,s,l,c=this;return n?(r=e(n),o=e(t),a=r.offset().top,l=o.height(),s=Math.max(0,a-l/2),this._debug("Scroll into view. ScrollTop: "+s+". Element offset: "+a+". Window height: "+l+"."),e("body").stop().animate({scrollTop:Math.ceil(s)},function(){return i(),c._debug("Scroll into view. Animation end element offset: "+r.offset().top+". Window height: "+o.height()+".")})):i()},n.prototype._onResize=function(n,i){return e(t).on("resize.tour-"+this._options.name,function(){return clearTimeout(i),i=setTimeout(n,100)})},n.prototype._setupMouseNavigation=function(){var t=this;return t=this,e(i).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role=next]:not(.disabled)").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role=next]:not(.disabled)",function(e){return e.preventDefault(),t.next()}),e(i).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role=prev]:not(.disabled)").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role=prev]:not(.disabled)",function(e){return e.preventDefault(),t.prev()}),e(i).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role=end]").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role=end]",function(e){return e.preventDefault(),t.end() -}),e(i).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role=pause-resume]").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role=pause-resume]",function(n){var i;return n.preventDefault(),i=e(this),i.text(t._paused?i.data("pause-text"):i.data("resume-text")),t._paused?t.resume():t.pause()})},n.prototype._setupKeyboardNavigation=function(){var t=this;if(this._options.keyboard)return e(i).on("keyup.tour-"+this._options.name,function(e){if(e.which)switch(e.which){case 39:return e.preventDefault(),t._isLast()?t.next():t.end();case 37:if(e.preventDefault(),t._current>0)return t.prev();break;case 27:return e.preventDefault(),t.end()}})},n.prototype._makePromise=function(t){return t&&e.isFunction(t.then)?t:null},n.prototype._callOnPromiseDone=function(e,t,n){var i=this;return e?e.then(function(){return t.call(i,n)}):t.call(this,n)},n.prototype._showBackdrop=function(){return this.backdrop.backgroundShown?void 0:(this.backdrop=e("",{"class":"tour-backdrop"}),this.backdrop.backgroundShown=!0,e("body").append(this.backdrop))},n.prototype._hideBackdrop=function(){return this._hideOverlayElement(),this._hideBackground()},n.prototype._hideBackground=function(){return this.backdrop.remove(),this.backdrop.overlay=null,this.backdrop.backgroundShown=!1},n.prototype._showOverlayElement=function(t){var n,i,r;if(!this.backdrop.overlayElementShown)return this.backdrop.overlayElementShown=!0,i=e(t),n=e(""),r=i.offset(),r.top=r.top,r.left=r.left,n.width(i.innerWidth()).height(i.innerHeight()).addClass("tour-step-background").offset(r),i.addClass("tour-step-backdrop"),e("body").append(n),this.backdrop.$element=i,this.backdrop.$background=n},n.prototype._hideOverlayElement=function(){return this.backdrop.overlayElementShown?(this.backdrop.$element.removeClass("tour-step-backdrop"),this.backdrop.$background.remove(),this.backdrop.$element=null,this.backdrop.$background=null,this.backdrop.overlayElementShown=!1):void 0},n.prototype._clearTimer=function(){return t.clearTimeout(this._timer),this._timer=null,this._duration=null},n}(),t.Tour=n}(jQuery,window),define("bootstrap-tour",["bootstrap"],function(e){return function(){var t;return t||e.Tour}}(this)),define("extensions/welcomeTour",["underscore","jquery","storage","classes/Extension","bootstrap-tour"],function(e,t,n,i,r){var o,a=new i("welcomeTour","Welcome tour",!1,!0);return a.onEventMgrCreated=function(e){o=e},a.onReady=function(){function i(e,n,i){var r=t(e).tooltip({html:!0,placement:i,trigger:"manual",title:n}).tooltip("show").addClass("info-tooltip");r.one("click",function(){r.tooltip("hide").removeClass("info-tooltip")}),setTimeout(function(){r.tooltip("hide").removeClass("info-tooltip")},2e4)}var a=new r({keyboard:!1,storage:{getItem:function(){},setItem:function(){},removeItem:function(){}},onEnd:function(){n.welcomeTour="done",i(".menu-panel .toggle-button *","Synchronize, publish...","right"),i(".document-panel .toggle-button *","Create, manage documents","left"),i(".extension-preview-buttons .btn-group:first","Need help with Markdown syntax?","left"),i(".layout-toggler-preview","Toggle preview","right")},template:[' ',' ',' ',' ',' ",""].join("")});a.addSteps([{element:".navbar-inner",title:"StackEdit 4 beta preview!",content:["What's new?
","","
",'- New contenteditable based editor (credit to Dabblet, Editorially...)
","- New layout with CSS3 transitions (lighter supposedly)
","- Comments/discussions support (see the new icon in the navigation bar)
","- Auto-merge and conflict detection using standard synchronization
","- Dropped real time sync support :( since you can collaborate simultaneously using standard synchronization
","Please provide your feedback here and declare issues on GitHub... Thanks!
',''].join(""),placement:"bottom",onShown:function(){o.onTweet()}}]),e.has(n,"welcomeTour")||a.start(),t(".action-welcome-tour").click(function(){a.restart()})},a}),define("text!extensions/shortcutsDefaultMapping.settings",[],function(){return"{\n 'mod+b': bindPagedownButton('bold'),\n 'mod+i': bindPagedownButton('italic'),\n 'mod+l': bindPagedownButton('link'),\n 'mod+q': bindPagedownButton('quote'),\n 'mod+k': bindPagedownButton('code'),\n 'mod+g': bindPagedownButton('image'),\n 'mod+o': bindPagedownButton('olist'),\n 'mod+u': bindPagedownButton('ulist'),\n 'mod+h': bindPagedownButton('heading'),\n 'mod+r': bindPagedownButton('hr'),\n 'mod+z': bindPagedownButton('undo'),\n 'mod+y': bindPagedownButton('redo'),\n 'mod+shift+z': bindPagedownButton('redo'),\n 'mod+m': function(evt) {\n $('.button-open-discussion').click();\n evt.preventDefault();\n },\n '= = > space': function() {\n expand('==> ', '⇒ ');\n },\n '< = = space': function() {\n expand('<== ', '⇐ ');\n },\n 'S t a c k E d i t': function() {\n eventMgr.onMessage(\"You are stunned!!! Aren't you?\");\n }\n}\n"}),define("text!html/shortcutsSettingsBlock.html",[],function(){return'Maps keyboard shortcuts to JavaScript functions.
\n\n\n'}),define("extensions/shortcuts",["jquery","underscore","utils","mousetrap","classes/Extension","text!extensions/shortcutsDefaultMapping.settings","text!html/shortcutsSettingsBlock.html"],function($,_,utils,mousetrap,Extension,shortcutsDefaultMapping,shortcutsSettingsBlockHTML){function bindPagedownButton(e){return function(t){pagedownEditor.uiManager.doClick(pagedownEditor.uiManager.buttons[e]),t.preventDefault()}}function expand(e,t){utils.defer(function(){require("editor").replacePreviousText(e,t)})}var shortcuts=new Extension("shortcuts","Shortcuts",!0,!0);shortcuts.settingsBlock=shortcutsSettingsBlockHTML,shortcuts.defaultConfig={mapping:shortcutsDefaultMapping};var eventMgr,pagedownEditor;return shortcuts.onEventMgrCreated=function(e){eventMgr=e,eventMgr.addListener("onPagedownConfigure",function(e){pagedownEditor=e})},shortcuts.onLoadSettings=function(){utils.setInputValue("#textarea-shortcuts-mapping",shortcuts.config.mapping)},shortcuts.onSaveSettings=function(newConfig,event){newConfig.code=utils.getInputValue("#textarea-shortcuts-mapping");try{eval("var test = "+newConfig.code)}catch(e){eventMgr.onError(e),utils.getInputTextValue("#textarea-shortcuts-mapping",event,/^$/)}},shortcuts.onInit=function(){try{var shortcutMap;eval("shortcutMap = "+shortcuts.config.mapping),_.each(shortcutMap,function(e,t){mousetrap.bind(t,e)})}catch(e){console.error(e)}},shortcuts}),define("text!html/userCustomSettingsBlock.html",[],function(){return'\n \n\n\n \n\nAllows users to implement their own extension.
\n\n\nMore info'}),define("extensions/userCustom",["jquery","underscore","utils","classes/Extension","fileSystem","settings","text!html/userCustomSettingsBlock.html"],function($,_,utils,Extension,fileSystem,settings,userCustomSettingsBlockHTML){var userCustom=new Extension("userCustom","UserCustom extension",!0);userCustom.settingsBlock=userCustomSettingsBlockHTML,userCustom.defaultConfig={code:""};var fileMgr;userCustom.onFileMgrCreated=function(e){fileMgr=e};var synchronizer;userCustom.onSynchronizerCreated=function(e){synchronizer=e};var publisher;userCustom.onPublisherCreated=function(e){publisher=e};var eventMgr;return userCustom.onEventMgrCreated=function(e){eventMgr=e},userCustom.onLoadSettings=function(){utils.setInputValue("#textarea-usercustom-code",userCustom.config.code)},userCustom.onSaveSettings=function(newConfig,event){newConfig.code=utils.getInputValue("#textarea-usercustom-code");try{eval(newConfig.code)}catch(e){eventMgr.onError(e),utils.getInputTextValue("#textarea-usercustom-code",event,/^$/)}},userCustom.onInit=function(){try{eval(userCustom.config.code)}catch(e){console.error(e)}},userCustom}),define("text!html/commentsPopoverContent.html",[],function(){return'\n \n\n\n \n\n\n\n<%= commentList %>\n\n\n\n \n \n\n\n \n\n
\n'}),define("extensions/comments",["jquery","underscore","utils","storage","crel","rangy","classes/Extension","text!html/commentsPopoverContent.html","bootstrap"],function(e,t,n,i,r,o,a,s){function l(e,t,n){t=Math.round(t);for(var i=t-21;t+22>i;)w[i]&&(t=i+22),i++;!n&&(w[t]=1);var r=-8;-1!==e.className.indexOf(" icon-split")&&(r=-12);var o=t+r;e.style.top=o+"px",e.style.right="12px"}function c(t,n){this.commentElt=t,this.$commentElt=e(t).addClass("active"),this.fileDesc=n,this.discussionIndex=t.discussionIndex}function u(e){var t=C.getPopoverElt(),n=0;t.offsetWidthi&&(t.style.top=parseInt(t.style.top)+i+"px")}function d(){C&&C.$commentElt.popover("toggle").popover("destroy")}function p(){var e=C.getDiscussion(),n=i["author.name"],r=[];return e.commentList&&(r=e.commentList.map(function(e){var i=e.author||"Anonymous";return t.template(m,{author:i,content:e.content,reply:e.author!=n})})),"conflict"==e.type&&r.unshift(t.template(m,{author:"StackEdit",content:"Multiple users have made conflicting modifications.",reply:!0})),r.join("")}var f,h=new a("comments","Comments",!1,!0),m=[" \">",'"].join(""),g=[' ',' ',' ',' '," "," “<%- title %>”",""].join("");h.onEventMgrCreated=function(e){f=e};var v,b;h.onEditorCreated=function(e){v=e,b=v.selectionMgr};var y,x,w=[],S=r("a",{"class":"discussion icon-comment new"});c.prototype.getDiscussion=function(){return this.discussionIndex?this.fileDesc.discussionList[this.discussionIndex]:this.fileDesc.newDiscussion},c.prototype.getPopoverElt=function(){return document.querySelector(".comments-popover .popover:last-child")};var C,T,E,k,_,I,D={},N=[],L=!1,M=t.debounce(function(){function e(){var i;if(0===o.length)return t.filter(D,function(e,n){return!t.has(E.discussionList,n)}).forEach(function(e){x.removeChild(e),delete D[e.discussionIndex]}),C&&!C.discussionIndex&&(i=b.getCoordinates(C.getDiscussion().selectionEnd),l(S,i.y,!0),y.scrollTop+=parseInt(S.style.top)-y.scrollTop-3*y.offsetHeight/4,u(S)),N=t.sortBy(D,function(e){return e.selectionEnd}),_.toggleClass("some",0!==N.length),_.toggleClass("replied",L),I.toggleClass("icon-chat",0!==N.length),void 0;var a=o.shift(),s=D[a.discussionIndex];s||(s=r("a"));var c="discussion",d=!a.commentList||!n||t.last(a.commentList).author!=n;d&&(L=!0),c+="conflict"==a.type?" icon-split":" icon-comment",c+=d?" replied":" added",s.className=c,s.discussionIndex=a.discussionIndex,s.selectionEnd=a.selectionEnd,i=b.getCoordinates(a.selectionEnd),l(s,i.y),x.appendChild(s),D[a.discussionIndex]=s,C&&C.getDiscussion()===a&&(y.scrollTop+=parseInt(s.style.top)-y.scrollTop-3*y.offsetHeight/4,u(s)),k=setTimeout(e,5)}if(void 0!==E){L=!1,N=[];var n=i["author.name"];w=[];var o=t.sortBy(E.discussionList,function(e){return e.selectionEnd});clearTimeout(k),k=setTimeout(e,5)}},50);return h.onLayoutResize=M,h.onFileOpen=function(e){E=e,M()},h.onContentChanged=function(e){E===e&&M()},h.onCommentsChanged=function(e){if(E===e){if(void 0!==C){var t=C;t.discussionIndex&&(t.getPopoverElt().querySelector(".discussion-comment-list").innerHTML=p());try{T.undoToRange(t.rangyRange)}catch(n){}var i=t.getDiscussion();t.selectionRange=b.createRange(i.selectionStart,i.selectionEnd),t.rangyRange=o.createRange(),t.rangyRange.setStart(t.selectionRange.startContainer,t.selectionRange.startOffset),t.rangyRange.setEnd(t.selectionRange.endContainer,t.selectionRange.endOffset),setTimeout(function(){C===t&&T.applyToRange(t.rangyRange)},50)}M()}},h.onDiscussionCreated=function(e){E===e&&M()},h.onDiscussionRemoved=function(e,t){E===e&&(void 0!==C&&C.discussionIndex==t.discussionIndex&&d(),M())},h.onReady=function(){T=o.createCssClassApplier("comment-highlight",{normalize:!1});var a="";y=document.getElementById("wmd-input"),x=document.querySelector("#wmd-input > .editor-margin"),x.appendChild(S);var h=e(r("div",{"class":"comments-popover"}));e(document.body).append(h).on("click",function(e){C&&C.$commentElt[0]!==e.target&&d()}).popover({placement:"auto top",container:".comments-popover",html:!0,title:function(){if(!C)return!0;var e=C.getDiscussion(),n=e.selectionEnd-e.selectionStart,i=v.getValue().substr(e.selectionStart,n>20?20:n);return n>20&&(i+="..."),t.template(g,{title:i})},content:function(){var e=t.template(s,{commentList:p()});return e},selector:"#wmd-input > .editor-margin > .discussion"}),e(x).on("show.bs.popover",function(e){d();var t=new c(e.target,E);C=t;var n=t.getDiscussion();if(!n){var i=Math.min(b.selectionStart,b.selectionEnd),r=Math.max(b.selectionStart,b.selectionEnd);if(i===r){var o=b.getClosestWordOffset(i);i=o.start,r=o.end}n={selectionStart:i,selectionEnd:r,commentList:[]},E.newDiscussion=n;var a=b.getCoordinates(i);l(S,a.y,!0)}t.selectionRange=b.createRange(n.selectionStart,n.selectionEnd),y.scrollTop+=parseInt(e.target.style.top)-y.scrollTop-3*y.offsetHeight/4}).on("shown.bs.popover",function(r){var s=C,l=s.getPopoverElt();s.$authorInputElt=e(l.querySelector(".input-comment-author")).val(i["author.name"]),s.$contentInputElt=e(l.querySelector(".input-comment-content")),s.hr=l.querySelector("hr"),u(s.commentElt),l.querySelector(".scrollport").scrollTop=9999999;var c=e(l.querySelector(".action-add-comment"));e().add(s.$contentInputElt).add(s.$authorInputElt).keydown(function(e){switch(e.which){case 13:return e.preventDefault(),c.click(),void 0;case 27:return e.preventDefault(),d(),v.focus(),v.adjustCursorPosition(),void 0}}),c.click(function(e){var i=n.getInputTextValue(s.$authorInputElt),r=n.getInputTextValue(s.$contentInputElt,e);if(!e.isPropagationStopped()){var o=s.getDiscussion();s.$contentInputElt.val(""),d(),o.commentList=o.commentList||[],o.commentList.push({author:i,content:r});var a=s.fileDesc.discussionList||{};if(o.discussionIndex)s.fileDesc.discussionList=a,f.onCommentsChanged(s.fileDesc);else{var l;do l=n.randomString();while(t.has(a,l));o.discussionIndex=l,a[l]=o,s.fileDesc.discussionList=a,f.onDiscussionCreated(s.fileDesc,o)}y.focus()}});var p=e(l.querySelector(".action-remove-discussion"));r.target.discussionIndex?p.click(function(){d();var e=s.getDiscussion();delete s.fileDesc.discussionList[e.discussionIndex],s.fileDesc.discussionList=s.fileDesc.discussionList,f.onDiscussionRemoved(s.fileDesc,e),y.focus()}):p.hide(),s.rangyRange=o.createRange(),s.rangyRange.setStart(s.selectionRange.startContainer,s.selectionRange.startOffset),s.rangyRange.setEnd(s.selectionRange.endContainer,s.selectionRange.endOffset),setTimeout(function(){C===s&&T.applyToRange(s.rangyRange)},50),s.$contentInputElt.focus().val(a)}).on("hide.bs.popover",function(){C&&(C.$commentElt.removeClass("active"),a=C.$contentInputElt.val(),i["author.name"]=C.$authorInputElt.val(),T.undoToRange(C.rangyRange),C=void 0,delete E.newDiscussion)}),h.on("click",".popover",function(e){e.stopPropagation()});var m=e(S);_=e(".button-open-discussion").click(function(n){var i=m;if(C)if(C.discussionIndex){var r=-1;N.some(function(e,t){return e===C.commentElt?(r=t,!0):void 0}),i=e(N[r+1])}else i=e(t.first(N));0===i.length?(d(),v.focus(),v.adjustCursorPosition()):i.click(),n.stopPropagation()}),I=_.find("i")},h}),function(e){var t="waitForImages";e.waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage"]},e.expr[":"].uncached=function(t){if(!e(t).is('img[src!=""]'))return!1;var n=new Image;return n.src=t.src,!n.complete},e.fn.waitForImages=function(n,i,r){var o=0,a=0;if(e.isPlainObject(arguments[0])&&(r=arguments[0].waitForAll,i=arguments[0].each,n=arguments[0].finished),n=n||e.noop,i=i||e.noop,r=!!r,!e.isFunction(n)||!e.isFunction(i))throw new TypeError("An invalid callback was supplied.");return this.each(function(){var s=e(this),l=[],c=e.waitForImages.hasImageProperties||[],u=/url\(\s*(['"]?)(.*?)\1\s*\)/g;r?s.find("*").andSelf().each(function(){var t=e(this);t.is("img:uncached")&&l.push({src:t.attr("src"),element:t[0]}),e.each(c,function(e,n){var i,r=t.css(n);if(!r)return!0;for(;i=u.exec(r);)l.push({src:i[2],element:t[0]})})}):s.find("img:uncached").each(function(){l.push({src:this.src,element:this})}),o=l.length,a=0,0===o&&n.call(s[0]),e.each(l,function(r,l){var c=new Image;e(c).bind("load."+t+" error."+t,function(e){return a++,i.call(l.element,a,o,"load"==e.type),a==o?(n.call(s[0]),!1):void 0}),c.src=l.src})})}}(jQuery),define("jquery-waitforimages",function(){}),define("eventMgr",["jquery","underscore","crel","utils","logger","classes/Extension","settings","text!html/settingsExtensionsAccordion.html","extensions/yamlFrontMatterParser","extensions/markdownSectionParser","extensions/partialRendering","extensions/buttonMarkdownSyntax","extensions/googleAnalytics","extensions/twitter","extensions/dialogAbout","extensions/dialogManagePublication","extensions/dialogManageSynchronization","extensions/dialogManageSharing","extensions/dialogOpenHarddrive","extensions/documentTitle","extensions/documentSelector","extensions/documentPanel","extensions/documentManager","extensions/workingIndicator","extensions/notifications","extensions/markdownExtra","extensions/toc","extensions/mathJax","extensions/emailConverter","extensions/scrollSync","extensions/buttonSync","extensions/buttonPublish","extensions/buttonStat","extensions/buttonHtmlCode","extensions/buttonViewer","extensions/welcomeTour","extensions/shortcuts","extensions/userCustom","extensions/comments","bootstrap","jquery-waitforimages"],function(e,t,n,i,r,o,a,s){function l(e){return t.chain(p).map(function(t){return t.enabled&&t[e]}).compact().value()}function c(e){return h[e]=l(e),function(){r.log(e,arguments);var n=arguments;t.each(h[e],function(e){try{e.apply(null,n)}catch(i){console.error(t.isObject(i)?i.stack:i)}})}}function u(e){d[e]=c(e)}var d={},p=t.chain(arguments).map(function(e){return e instanceof o&&e}).compact().value(),f=a.extensionSettings||{};t.each(p,function(e){e.config=t.extend({},e.defaultConfig,f[e.extensionId]),e.enabled=window.viewerMode===!0&&e.disableInViewer===!0?!1:!e.isOptional||void 0===e.config.enabled||e.config.enabled===!0});var h={};d.addListener=function(e,t){try{h[e].push(t)}catch(n){console.error("No event listener called "+e)}},c("onInit")(),d.onLoadSettings=function(){r.log("onLoadSettings"),t.each(p,function(e){var t=!e.isOptional||void 0===e.config.enabled||e.config.enabled===!0;i.setInputChecked("#input-enable-extension-"+e.extensionId,t),"markdownExtra"==e.extensionId?i.setInputChecked("#input-settings-markdown-extra",t):"mathJax"==e.extensionId&&i.setInputChecked("#input-settings-mathjax",t);var n=e.onLoadSettings;n&&n()})},d.onSaveSettings=function(e,n){r.log("onSaveSettings"),t.each(p,function(r){var o=t.extend({},r.defaultConfig);o.enabled=i.getInputChecked("#input-enable-extension-"+r.extensionId);var a;"markdownExtra"==r.extensionId?(a=i.getInputChecked("#input-settings-markdown-extra"),a!=r.enabled&&(o.enabled=a)):"mathJax"==r.extensionId&&(a=i.getInputChecked("#input-settings-mathjax"),a!=r.enabled&&(o.enabled=a));var s=r.onSaveSettings;s&&s(o,n),e[r.extensionId]=o})},u("onMessage"),u("onError"),u("onOfflineChanged"),u("onUserActive"),u("onAsyncRunning"),u("onPeriodicRun"),u("onEditorCreated"),u("onFileMgrCreated"),u("onSynchronizerCreated"),u("onPublisherCreated"),u("onEventMgrCreated"),u("onFileCreated"),u("onFileDeleted"),u("onFileSelected"),u("onFileOpen"),u("onFileClosed"),u("onContentChanged"),u("onTitleChanged"),u("onFoldersChanged"),u("onSyncRunning"),u("onSyncSuccess"),u("onSyncImportSuccess"),u("onSyncExportSuccess"),u("onSyncRemoved"),u("onPublishRunning"),u("onPublishSuccess"),u("onNewPublishSuccess"),u("onPublishRemoved"),u("onLayoutCreated"),u("onLayoutResize"),u("onPagedownConfigure"),u("onSectionsCreated"),u("onCursorCoordinates"),u("onDiscussionCreated"),u("onDiscussionRemoved"),u("onCommentsChanged"),u("onTweet");var m,g,v=c("onPreviewFinished"),b=l("onAsyncPreview");d.onAsyncPreview=function(){function e(n){var r=n.length?n.shift():function(){setTimeout(function(){var e="";t.each(m.children,function(t){e+=t.innerHTML});var n=i.trim(e),r=n.replace(/ .*?<\/span> /g,"");v(n,r)},10)};r(function(){e(n)})}r.log("onAsyncPreview"),e(b.concat([function(e){g.waitForImages(e)}]))};var y=c("onReady");return d.onReady=function(){m=document.getElementById("preview-contents"),g=e(m);var i=function(e){var i=n("div",{"class":"btn-group"}),r=e();return t.isString(r)?i.innerHTML=r:t.isElement(r)&&i.appendChild(r),i};if(window.viewerMode===!1){var o=t.chain(p).sortBy(function(e){return e.extensionName.toLowerCase()}).reduce(function(e,n){return e+(n.settingsBlock?t.template(s,{extensionId:n.extensionId,extensionName:n.extensionName,isOptional:n.isOptional,settingsBlock:n.settingsBlock}):"")},"").value();document.querySelector(".accordion-extensions").innerHTML=o,r.log("onCreateButton");var a=l("onCreateButton"),c=document.createDocumentFragment();t.each(a,function(e){c.appendChild(i(e))}),document.querySelector(".extension-buttons").appendChild(c)}r.log("onCreatePreviewButton");var u=l("onCreatePreviewButton"),d=document.createDocumentFragment();t.each(u,function(e){d.appendChild(i(e))});var f=document.querySelector(".extension-preview-buttons");f.appendChild(d),y()},d.onEventMgrCreated(d),d}),function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){var n=t.util.type(e);switch(n){case"Object":var i={};for(var r in e)e.hasOwnProperty(r)&&(i[r]=t.util.clone(e[r]));return i;case"Array":return e.slice()}return e}},languages:{extend:function(e,n){var i=t.util.clone(t.languages[e]);for(var r in n)i[r]=n[r];return i},insertBefore:function(e,n,i,r){r=r||t.languages;var o=r[e],a={};for(var s in o)if(o.hasOwnProperty(s)){if(s==n)for(var l in i)i.hasOwnProperty(l)&&(a[l]=i[l]);a[s]=o[s]}return r[e]=a},DFS:function(e,n){for(var i in e)n.call(e,i,e[i]),"Object"===t.util.type(e)&&t.languages.DFS(e[i],n)}},highlightAll:function(e,n){for(var i,r=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'),o=0;i=r[o++];)t.highlightElement(i,e===!0,n)},highlightElement:function(i,r,o){for(var a,s,l=i;l&&!e.test(l.className);)l=l.parentNode;if(l&&(a=(l.className.match(e)||[,""])[1],s=t.languages[a]),s){i.className=i.className.replace(e,"").replace(/\s+/g," ")+" language-"+a,l=i.parentNode,/pre/i.test(l.nodeName)&&(l.className=l.className.replace(e,"").replace(/\s+/g," ")+" language-"+a);var c=i.textContent;if(c){c=c.replace(/&/g,"&").replace(/e.length)break e;if(!(p instanceof i)){s.lastIndex=0;var f=s.exec(p);if(f){c&&(u=f[1].length);var h=f.index-1+u,f=f[0].slice(u),m=f.length,g=h+m,v=p.slice(0,h+1),b=p.slice(g+1),y=[d,1];v&&y.push(v);var x=new i(a,l?t.tokenize(f,l):f);y.push(x),b&&y.push(b),Array.prototype.splice.apply(r,y)}}}}return r},hooks:{all:{},add:function(e,n){var i=t.hooks.all;i[e]=i[e]||[],i[e].push(n)},run:function(e,n){var i=t.hooks.all[e];if(i&&i.length)for(var r,o=0;r=i[o++];)r(n)}}},n=t.Token=function(e,t){this.type=e,this.content=t};if(n.stringify=function(e,i,r){if("string"==typeof e)return e;if("[object Array]"==Object.prototype.toString.call(e))return e.map(function(t){return n.stringify(t,i,e)}).join("");var o={type:e.type,content:n.stringify(e.content,i,r),tag:"span",classes:["token",e.type],attributes:{},language:i,parent:r};"comment"==o.type&&(o.attributes.spellcheck="true"),t.hooks.run("wrap",o);var a="";for(var s in o.attributes)a+=s+'="'+(o.attributes[s]||"")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'" '+a+">"+o.content+""+o.tag+">"},!self.document)return self.addEventListener("message",function(e){var n=JSON.parse(e.data),i=n.language,r=n.code;self.postMessage(JSON.stringify(t.tokenize(r,t.languages[i]))),self.close()},!1),void 0;var i=document.getElementsByTagName("script");i=i[i.length-1],i&&(t.filename=i.src,document.addEventListener&&!i.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll))}(),define("prism-core",function(e){return function(){var t;return t||e.Prism}}(this));var DIFF_DELETE=-1,DIFF_INSERT=1,DIFF_EQUAL=0;diff_match_patch.Diff,diff_match_patch.prototype.diff_main=function(e,t,n,i){"undefined"==typeof i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var r=i;if(null==e||null==t)throw new Error("Null input. (diff_main)");if(e==t)return e?[[DIFF_EQUAL,e]]:[];"undefined"==typeof n&&(n=!0);var o=n,a=this.diff_commonPrefix(e,t),s=e.substring(0,a);e=e.substring(a),t=t.substring(a),a=this.diff_commonSuffix(e,t);var l=e.substring(e.length-a);e=e.substring(0,e.length-a),t=t.substring(0,t.length-a);var c=this.diff_compute_(e,t,o,r);return s&&c.unshift([DIFF_EQUAL,s]),l&&c.push([DIFF_EQUAL,l]),this.diff_cleanupMerge(c),c},diff_match_patch.prototype.diff_compute_=function(e,t,n,i){var r;if(!e)return[[DIFF_INSERT,t]];if(!t)return[[DIFF_DELETE,e]];var o=e.length>t.length?e:t,a=e.length>t.length?t:e,s=o.indexOf(a);if(-1!=s)return r=[[DIFF_INSERT,o.substring(0,s)],[DIFF_EQUAL,a],[DIFF_INSERT,o.substring(s+a.length)]],e.length>t.length&&(r[0][0]=r[2][0]=DIFF_DELETE),r;if(1==a.length)return[[DIFF_DELETE,e],[DIFF_INSERT,t]];var l=this.diff_halfMatch_(e,t);if(l){var c=l[0],u=l[1],d=l[2],p=l[3],f=l[4],h=this.diff_main(c,d,n,i),m=this.diff_main(u,p,n,i);return h.concat([[DIFF_EQUAL,f]],m)}return n&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,i):this.diff_bisect_(e,t,i)},diff_match_patch.prototype.diff_lineMode_=function(e,t,n){var i=this.diff_linesToChars_(e,t);e=i.chars1,t=i.chars2;var r=i.lineArray,o=this.diff_main(e,t,!1,n);this.diff_charsToLines_(o,r),this.diff_cleanupSemantic(o),o.push([DIFF_EQUAL,""]);for(var a=0,s=0,l=0,c="",u="";a<%= content %>',"=1&&l>=1){o.splice(a-s-l,s+l),a=a-s-l;for(var i=this.diff_main(c,u,!1,n),d=i.length-1;d>=0;d--)o.splice(a,0,i[d]);a+=i.length}l=0,s=0,c="",u=""}a++}return o.pop(),o},diff_match_patch.prototype.diff_bisect_=function(e,t,n){for(var i=e.length,r=t.length,o=Math.ceil((i+r)/2),a=o,s=2*o,l=new Array(s),c=new Array(s),u=0;s>u;u++)l[u]=-1,c[u]=-1;l[a+1]=0,c[a+1]=0;for(var d=i-r,p=0!=d%2,f=0,h=0,m=0,g=0,v=0;o>v&&!((new Date).getTime()>n);v++){for(var b=-v+f;v-h>=b;b+=2){var y,x=a+b;y=b==-v||b!=v&&l[x-1] y&&r>w&&e.charAt(y)==t.charAt(w);)y++,w++;if(l[x]=y,y>i)h+=2;else if(w>r)f+=2;else if(p){var S=a+d-b;if(S>=0&&s>S&&-1!=c[S]){var C=i-c[S];if(y>=C)return this.diff_bisectSplit_(e,t,y,w,n)}}}for(var T=-v+m;v-g>=T;T+=2){var C,S=a+T;C=T==-v||T!=v&&c[S-1] C&&r>E&&e.charAt(i-C-1)==t.charAt(r-E-1);)C++,E++;if(c[S]=C,C>i)g+=2;else if(E>r)m+=2;else if(!p){var x=a+d-T;if(x>=0&&s>x&&-1!=l[x]){var y=l[x],w=a+y-x;if(C=i-C,y>=C)return this.diff_bisectSplit_(e,t,y,w,n)}}}}return[[DIFF_DELETE,e],[DIFF_INSERT,t]]},diff_match_patch.prototype.diff_bisectSplit_=function(e,t,n,i,r){var o=e.substring(0,n),a=t.substring(0,i),s=e.substring(n),l=t.substring(i),c=this.diff_main(o,a,!1,r),u=this.diff_main(s,l,!1,r);return c.concat(u)},diff_match_patch.prototype.diff_linesToChars_=function(e,t){function n(e){for(var t="",n=0,o=-1,a=i.length;o n;)e.substring(o,r)==t.substring(o,r)?(n=r,o=n):i=r,r=Math.floor((i-n)/2+n);return r},diff_match_patch.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,i=Math.min(e.length,t.length),r=i,o=0;r>n;)e.substring(e.length-r,e.length-o)==t.substring(t.length-r,t.length-o)?(n=r,o=n):i=r,r=Math.floor((i-n)/2+n);return r},diff_match_patch.prototype.diff_commonOverlap_=function(e,t){var n=e.length,i=t.length;if(0==n||0==i)return 0;n>i?e=e.substring(n-i):i>n&&(t=t.substring(0,n));var r=Math.min(n,i);if(e==t)return r;for(var o=0,a=1;;){var s=e.substring(r-a),l=t.indexOf(s);if(-1==l)return o;a+=l,(0==l||e.substring(r-a)==t.substring(0,a))&&(o=a,a++)}},diff_match_patch.prototype.diff_halfMatch_=function(e,t){function n(e,t,n){for(var i,r,o,s,l=e.substring(n,n+Math.floor(e.length/4)),c=-1,u="";-1!=(c=t.indexOf(l,c+1));){var d=a.diff_commonPrefix(e.substring(n),t.substring(c)),p=a.diff_commonSuffix(e.substring(0,n),t.substring(0,c)); -u.length =e.length?[i,r,o,s,u]:null}if(this.Diff_Timeout<=0)return null;var i=e.length>t.length?e:t,r=e.length>t.length?t:e;if(i.length<4||2*r.length
l[4].length?s:l:l:s;var c,u,d,p;e.length>t.length?(c=o[0],u=o[1],d=o[2],p=o[3]):(d=o[0],p=o[1],c=o[2],u=o[3]);var f=o[4];return[c,u,d,p,f]},diff_match_patch.prototype.diff_cleanupSemantic=function(e){for(var t=!1,n=[],i=0,r=null,o=0,a=0,s=0,l=0,c=0;o 0?n[i-1]:-1,a=0,s=0,l=0,c=0,r=null,t=!0)),o++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),o=1;o =f?(p>=u.length/2||p>=d.length/2)&&(e.splice(o,0,[DIFF_EQUAL,d.substring(0,p)]),e[o-1][1]=u.substring(0,u.length-p),e[o+1][1]=d.substring(p),o++):(f>=u.length/2||f>=d.length/2)&&(e.splice(o,0,[DIFF_EQUAL,u.substring(0,f)]),e[o-1][0]=DIFF_INSERT,e[o-1][1]=d.substring(0,d.length-f),e[o+1][0]=DIFF_DELETE,e[o+1][1]=u.substring(f),o++),o++}o++}},diff_match_patch.prototype.diff_cleanupSemanticLossless=function(e){function t(e,t){if(!e||!t)return 6;var n=e.charAt(e.length-1),i=t.charAt(0),r=n.match(diff_match_patch.nonAlphaNumericRegex_),o=i.match(diff_match_patch.nonAlphaNumericRegex_),a=r&&n.match(diff_match_patch.whitespaceRegex_),s=o&&i.match(diff_match_patch.whitespaceRegex_),l=a&&n.match(diff_match_patch.linebreakRegex_),c=s&&i.match(diff_match_patch.linebreakRegex_),u=l&&e.match(diff_match_patch.blanklineEndRegex_),d=c&&t.match(diff_match_patch.blanklineStartRegex_);return u||d?5:l||c?4:r&&!a&&s?3:a||s?2:r||o?1:0}for(var n=1;n =d&&(d=p,l=i,c=r,u=o)}e[n-1][1]!=l&&(l?e[n-1][1]=l:(e.splice(n-1,1),n--),e[n][1]=c,u?e[n+1][1]=u:(e.splice(n+1,1),n--))}n++}},diff_match_patch.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,diff_match_patch.whitespaceRegex_=/\s/,diff_match_patch.linebreakRegex_=/[\r\n]/,diff_match_patch.blanklineEndRegex_=/\n\r?\n$/,diff_match_patch.blanklineStartRegex_=/^\r?\n\r?\n/,diff_match_patch.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,n=[],i=0,r=null,o=0,a=!1,s=!1,l=!1,c=!1;o 0?n[i-1]:-1,l=c=!1),t=!0)),o++;t&&this.diff_cleanupMerge(e)},diff_match_patch.prototype.diff_cleanupMerge=function(e){e.push([DIFF_EQUAL,""]);for(var t,n=0,i=0,r=0,o="",a="";n 1?(0!==i&&0!==r&&(t=this.diff_commonPrefix(a,o),0!==t&&(n-i-r>0&&e[n-i-r-1][0]==DIFF_EQUAL?e[n-i-r-1][1]+=a.substring(0,t):(e.splice(0,0,[DIFF_EQUAL,a.substring(0,t)]),n++),a=a.substring(t),o=o.substring(t)),t=this.diff_commonSuffix(a,o),0!==t&&(e[n][1]=a.substring(a.length-t)+e[n][1],a=a.substring(0,a.length-t),o=o.substring(0,o.length-t))),0===i?e.splice(n-r,i+r,[DIFF_INSERT,a]):0===r?e.splice(n-i,i+r,[DIFF_DELETE,o]):e.splice(n-i-r,i+r,[DIFF_DELETE,o],[DIFF_INSERT,a]),n=n-i-r+(i?1:0)+(r?1:0)+1):0!==n&&e[n-1][0]==DIFF_EQUAL?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++,r=0,i=0,o="",a=""}""===e[e.length-1][1]&&e.pop();var s=!1;for(n=1;n t));n++)o=i,a=r;return e.length!=n&&e[n][0]===DIFF_DELETE?a:a+(t-o)},diff_match_patch.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,i=//g,o=/\n/g,a=0;a ");switch(s){case DIFF_INSERT:t[a]=''+c+"";break;case DIFF_DELETE:t[a]=' '+c+"";break;case DIFF_EQUAL:t[a]=""+c+""}}return t.join("")},diff_match_patch.prototype.diff_text1=function(e){for(var t=[],n=0;nc)throw new Error("Invalid number in diff_fromDelta: "+s);var u=e.substring(r,r+=c);n[i++]="="==o[a].charAt(0)?[DIFF_EQUAL,u]:[DIFF_DELETE,u];break;default:if(o[a])throw new Error("Invalid diff operation in diff_fromDelta: "+o[a])}}if(r!=e.length)throw new Error("Delta length ("+r+") does not equal source text length ("+e.length+").");return n},diff_match_patch.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},diff_match_patch.prototype.match_bitap_=function(e,t,n){function i(e,i){var r=e/t.length,a=Math.abs(n-i);return o.Match_Distance?r+a/o.Match_Distance:a?1:r}if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),o=this,a=this.Match_Threshold,s=e.indexOf(t,n);-1!=s&&(a=Math.min(i(0,s),a),s=e.lastIndexOf(t,n+t.length),-1!=s&&(a=Math.min(i(0,s),a)));var l=1< c;)i(f,n+u)<=a?c=u:p=u,u=Math.floor((p-c)/2+c);p=u;var h=Math.max(1,n-u+1),m=Math.min(n+u,e.length)+t.length,g=Array(m+2);g[m+1]=(1< =h;v--){var b=r[e.charAt(v-1)];if(g[v]=0===f?(1|g[v+1]<<1)&b:(1|g[v+1]<<1)&b|(1|(d[v+1]|d[v])<<1)|d[v+1],g[v]&l){var y=i(f,v-1);if(a>=y){if(a=y,s=v-1,!(s>n))break;h=Math.max(1,2*n-s)}}}if(i(f+1,n)>a)break;d=g}return s},diff_match_patch.prototype.match_alphabet_=function(e){for(var t={},n=0;n 2&&(this.diff_cleanupSemantic(r),this.diff_cleanupEfficiency(r));else if(e&&"object"==typeof e&&"undefined"==typeof t&&"undefined"==typeof n)r=e,i=this.diff_text1(r);else if("string"==typeof e&&t&&"object"==typeof t&&"undefined"==typeof n)i=e,r=t;else{if("string"!=typeof e||"string"!=typeof t||!n||"object"!=typeof n)throw new Error("Unknown call format to patch_make.");i=e,r=n}if(0===r.length)return[];for(var o=[],a=new diff_match_patch.patch_obj,s=0,l=0,c=0,u=i,d=i,p=0;p =2*this.Patch_Margin&&s&&(this.patch_addContext_(a,u),o.push(a),a=new diff_match_patch.patch_obj,s=0,u=d,l=c)}f!==DIFF_INSERT&&(l+=h.length),f!==DIFF_DELETE&&(c+=h.length)}return s&&(this.patch_addContext_(a,u),o.push(a)),o},diff_match_patch.prototype.patch_deepCopy=function(e){for(var t=[],n=0;n this.Match_MaxBits?(a=this.match_main(t,l.substring(0,this.Match_MaxBits),s),-1!=a&&(c=this.match_main(t,l.substring(l.length-this.Match_MaxBits),s+l.length-this.Match_MaxBits),(-1==c||a>=c)&&(a=-1))):a=this.match_main(t,l,s),-1==a)r[o]=!1,i-=e[o].length2-e[o].length1;else{r[o]=!0,i=a-s;var u;if(u=-1==c?t.substring(a,a+l.length):t.substring(a,c+this.Match_MaxBits),l==u)t=t.substring(0,a)+this.diff_text2(e[o].diffs)+t.substring(a+l.length);else{var d=this.diff_main(l,u,!1);if(l.length>this.Match_MaxBits&&this.diff_levenshtein(d)/l.length>this.Patch_DeleteThreshold)r[o]=!1;else{this.diff_cleanupSemanticLossless(d);for(var p,f=0,h=0;h =i;i++)n+=String.fromCharCode(i);for(var i=0;i o[0][1].length){var a=t-o[0][1].length;o[0][1]=n.substring(o[0][1].length)+o[0][1],r.start1-=a,r.start2-=a,r.length1+=a,r.length2+=a}if(r=e[e.length-1],o=r.diffs,0==o.length||o[o.length-1][0]!=DIFF_EQUAL)o.push([DIFF_EQUAL,n]),r.length1+=t,r.length2+=t;else if(t>o[o.length-1][1].length){var a=t-o[o.length-1][1].length;o[o.length-1][1]+=n.substring(0,a),r.length1+=a,r.length2+=a}return n},diff_match_patch.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,n=0;n 2*t?(s.length1+=u.length,r+=u.length,l=!1,s.diffs.push([c,u]),i.diffs.shift()):(u=u.substring(0,t-s.length1-this.Patch_Margin),s.length1+=u.length,r+=u.length,c===DIFF_EQUAL?(s.length2+=u.length,o+=u.length):l=!1,s.diffs.push([c,u]),u==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(u.length))}a=this.diff_text2(s.diffs),a=a.substring(a.length-this.Patch_Margin);var d=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);""!==d&&(s.length1+=d.length,s.length2+=d.length,0!==s.diffs.length&&s.diffs[s.diffs.length-1][0]===DIFF_EQUAL?s.diffs[s.diffs.length-1][1]+=d:s.diffs.push([DIFF_EQUAL,d])),l||e.splice(++n,0,s)}}},diff_match_patch.prototype.patch_toText=function(e){for(var t=[],n=0;n 0)){var i=n.shift();i()}},!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")}},{}],2:[function(e,t,n){var i=e("../pipe").Pipe,r=function(){};r.prototype.setResult=function(e){return this.result=e,this.hasResult=!0,this},r.prototype.exit=function(){return this.exiting=!0,this},r.prototype.switchTo=function(e,t){return"string"==typeof e||e instanceof i?this.nextPipe=e:(this.next=e,t&&(this.nextPipe=t)),this},r.prototype.push=function(e,t){return e.parent=this,"undefined"!=typeof t&&(e.childName=t),e.root=this.root||this,e.options=e.options||this.options,this.children?(this.children[this.children.length-1].next=e,this.children.push(e)):(this.children=[e],this.nextAfterChildren=this.next||null,this.next=e),e.next=this,this},n.Context=r},{"../pipe":15}],3:[function(e,t,n){var i=e("./context").Context,r=function(e,t){this.left=e,this.right=t,this.pipe="diff"};r.prototype=new i,n.DiffContext=r},{"./context":2}],4:[function(e,t,n){var i=e("./context").Context,r=function(e,t){this.left=e,this.delta=t,this.pipe="patch"};r.prototype=new i,n.PatchContext=r},{"./context":2}],5:[function(e,t,n){var i=e("./context").Context,r=function(e){this.delta=e,this.pipe="reverse"};r.prototype=new i,n.ReverseContext=r},{"./context":2}],6:[function(e,t){t.exports=function(e,t){var n;return"string"==typeof t&&(n=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)(Z|([+\-])(\d{2}):(\d{2}))$/.exec(t))?new Date(Date.UTC(+n[1],+n[2]-1,+n[3],+n[4],+n[5],+n[6])):t}},{}],7:[function(e,t,n){var i=e("./processor").Processor,r=e("./pipe").Pipe,o=e("./contexts/diff").DiffContext,a=e("./contexts/patch").PatchContext,s=e("./contexts/reverse").ReverseContext,l=e("./filters/trivial"),c=e("./filters/nested"),u=e("./filters/arrays"),d=e("./filters/dates"),p=e("./filters/texts"),f=function(e){this.processor=new i(e),this.processor.pipe(new r("diff").append(c.collectChildrenDiffFilter,l.diffFilter,d.diffFilter,p.diffFilter,c.objectsDiffFilter,u.diffFilter).shouldHaveResult()),this.processor.pipe(new r("patch").append(c.collectChildrenPatchFilter,u.collectChildrenPatchFilter,l.patchFilter,p.patchFilter,c.patchFilter,u.patchFilter).shouldHaveResult()),this.processor.pipe(new r("reverse").append(c.collectChildrenReverseFilter,u.collectChildrenReverseFilter,l.reverseFilter,p.reverseFilter,c.reverseFilter,u.reverseFilter).shouldHaveResult())};f.prototype.options=function(){return this.processor.options.apply(this.processor,arguments)},f.prototype.diff=function(e,t){return this.processor.process(new o(e,t))},f.prototype.patch=function(e,t){return this.processor.process(new a(e,t))},f.prototype.reverse=function(e){return this.processor.process(new s(e))},f.prototype.unpatch=function(e,t){return this.patch(e,this.reverse(t))},n.DiffPatcher=f},{"./contexts/diff":3,"./contexts/patch":4,"./contexts/reverse":5,"./filters/arrays":9,"./filters/dates":10,"./filters/nested":12,"./filters/texts":13,"./filters/trivial":14,"./pipe":15,"./processor":16}],8:[function(e,t,n){(function(t){var i=e("./diffpatcher").DiffPatcher;n.DiffPatcher=i,n.create=function(e){return new i(e)},n.dateReviver=e("./date-reviver");var r;n.diff=function(){return r||(r=new i),r.diff.apply(r,arguments)},n.patch=function(){return r||(r=new i),r.patch.apply(r,arguments)},n.unpatch=function(){return r||(r=new i),r.unpatch.apply(r,arguments)},n.reverse=function(){return r||(r=new i),r.reverse.apply(r,arguments)};var o="undefined"!=typeof t&&"string"==typeof t.execPath;if(o){var a=e("./formatters/index");n.formatters=a,n.console=a.console}else n.homepage="https://github.com/benjamine/jsondiffpatch",n.version="0.1.5"}).call(this,e("/home/sheila/proj/JsonDiffPatch/node_modules/gulp-browserify/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"./date-reviver":6,"./diffpatcher":7,"/home/sheila/proj/JsonDiffPatch/node_modules/gulp-browserify/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":1}],9:[function(e,t,n){var i=e("../contexts/diff").DiffContext,r=e("../contexts/patch").PatchContext,o=e("../contexts/reverse").ReverseContext,a=e("./lcs"),s=3,l="function"==typeof Array.isArray?Array.isArray:function(e){return e instanceof Array},c="function"==typeof Array.prototype.indexOf?function(e,t){return e.indexOf(t)}:function(e,t){for(var n=e.length,i=0;n>i;i++)if(e[i]===t)return i;return-1},u=function(e){if(e.leftIsArray){for(var t,n,r,o,l=e.options&&e.options.objectHash,u=function(e,t,n,i,r){var o=e[n],a=t[i];if(o===a)return!0;if("object"!=typeof o||"object"!=typeof a)return!1;if(!l)return!1;var s,c;return"number"==typeof n?(r.hashCache1=r.hashCache1||[],s=r.hashCache1[n],"undefined"==typeof s&&(r.hashCache1[n]=s=l(o,n))):s=l(o),"undefined"==typeof s?!1:("number"==typeof i?(r.hashCache2=r.hashCache2||[],c=r.hashCache2[i],"undefined"==typeof c&&(r.hashCache2[i]=c=l(a,i))):c=l(a),"undefined"==typeof c?!1:s===c)},d={},p=0,f=0,h=e.left,m=e.right,g=h.length,v=m.length;g>p&&v>p&&u(h,m,p,p,d);)t=p,o=new i(e.left[t],e.right[t]),e.push(o,t),p++;for(;g>f+p&&v>f+p&&u(h,m,g-1-f,v-1-f,d);)n=g-1-f,r=v-1-f,o=new i(e.left[n],e.right[r]),e.push(o,r),f++;var b;if(p+f===g){if(g===v)return e.setResult(void 0).exit(),void 0;for(b=b||{_t:"a"},t=p;v-f>t;t++)b[t]=[m[t]];return e.setResult(b).exit(),void 0}if(p+f===v){for(b=b||{_t:"a"},t=p;g-f>t;t++)b["_"+t]=[h[t],0,0];return e.setResult(b).exit(),void 0}d={};var y=h.slice(p,g-f),x=m.slice(p,v-f),w=a.get(y,x,u,d),S=[];for(b=b||{_t:"a"},t=p;g-f>t;t++)c(w.indices1,t-p)<0&&(b["_"+t]=[h[t],0,0],S.push(t));var C=!0;e.options&&e.options.arrays&&e.options.arrays.detectMove===!1&&(C=!1);var T=!1;e.options&&e.options.arrays&&e.options.arrays.includeValueOnMove&&(T=!0);var E=S.length;for(t=p;v-f>t;t++){var k=c(w.indices2,t-p);if(0>k){var _=!1;if(C&&E>0)for(n=0;E>n;n++)if(u(y,x,S[n]-p,t-p,d)){b["_"+S[n]].splice(1,2,t,s),T||(b["_"+S[n]][0]=""),n=S[n],r=t,o=new i(e.left[n],e.right[r]),e.push(o,r),S.splice(n,1),_=!0;break}_||(b[t]=[m[t]])}else n=w.indices1[k]+p,r=w.indices2[k]+p,o=new i(e.left[n],e.right[r]),e.push(o,r)}e.setResult(b).exit()}};u.filterName="arrays";var d={numerically:function(e,t){return e-t},numericallyBy:function(e){return function(t,n){return t[e]-n[e]}}},p=function(e){if(e.nested&&"a"===e.delta._t){var t,n,i=e.delta,o=e.left,a=[],l=[],c=[];for(t in i)if("_t"!==t)if("_"===t[0]){if(0!==i[t][2]&&i[t][2]!==s)throw new Error("only removal or move can be applied at original array indices, invalid diff type: "+i[t][2]);a.push(parseInt(t.slice(1),10))}else 1===i[t].length?l.push({index:parseInt(t,10),value:i[t][0]}):c.push({index:parseInt(t,10),delta:i[t]});for(a=a.sort(d.numerically),t=a.length-1;t>=0;t--){n=a[t];var u=i["_"+n],p=o.splice(n,1)[0];u[2]===s&&l.push({index:u[1],value:p})}l=l.sort(d.numericallyBy("index"));var f=l.length;for(t=0;f>t;t++){var h=l[t];o.splice(h.index,0,h.value)}var m,g=c.length;if(g>0)for(t=0;g>t;t++){var v=c[t];m=new r(e.left[v.index],v.delta),e.push(m,v.index)}return e.children?(e.exit(),void 0):(e.setResult(e.left).exit(),void 0)}};p.filterName="arrays";var f=function(e){if(e&&e.children&&"a"===e.delta._t){for(var t,n=e.children.length,i=0;n>i;i++)t=e.children[i],e.left[t.childName]=t.result;e.setResult(e.left).exit()}};f.filterName="arraysCollectChildren";var h=function(e){if(!e.nested)return e.delta[2]===s&&(e.newName="_"+e.delta[1],e.setResult([e.delta[0],parseInt(e.childName.substr(1),10),s]).exit()),void 0;if("a"===e.delta._t){var t,n;for(t in e.delta)"_t"!==t&&(n=new o(e.delta[t]),e.push(n,t));e.exit()}};h.filterName="arrays";var m=function(e,t,n){var i=t;if("string"==typeof t&&"_"===t[0])i=parseInt(t.substr(1),10);else{var r="_"+t;if(l(n)&&0===n[2])i=r;else for(var o in e){var a=e[o];l(a)&&a[2]===s&&a[1].toString()===t&&(i=o.substr(1))}}return i},g=function(e){if(e&&e.children&&"a"===e.delta._t){for(var t,n=e.children.length,i={_t:"a"},r=0;n>r;r++){t=e.children[r];var o=t.newName;"undefined"==typeof o&&(o=m(e.delta,t.childName,t.result)),i[o]!==t.result&&(i[o]=t.result)}e.setResult(i).exit()}};g.filterName="arraysCollectChildren",n.diffFilter=u,n.patchFilter=p,n.collectChildrenPatchFilter=f,n.reverseFilter=h,n.collectChildrenReverseFilter=g},{"../contexts/diff":3,"../contexts/patch":4,"../contexts/reverse":5,"./lcs":11}],10:[function(e,t,n){var i=function(e){e.left instanceof Date?(e.right instanceof Date?e.left.getTime()!==e.right.getTime()?e.setResult([e.left,e.right]):e.setResult(void 0):e.setResult([e.left,e.right]),e.exit()):e.right instanceof Date&&e.setResult([e.left,e.right]).exit()};i.filterName="dates",n.diffFilter=i},{}],11:[function(e,t,n){var i=function(e,t,n,i){return e[n]===t[i]},r=function(e,t,n,i){var r,o,a=e.length,s=t.length,l=[a+1];for(r=0;a+1>r;r++)for(l[r]=[s+1],o=0;s+1>o;o++)l[r][o]=0;for(l.match=n,r=1;a+1>r;r++)for(o=1;s+1>o;o++)l[r][o]=n(e,t,r-1,o-1,i)?l[r-1][o-1]+1:Math.max(l[r-1][o],l[r][o-1]);return l},o=function(e,t,n,i,r,a){if(0===i||0===r)return{sequence:[],indices1:[],indices2:[]};if(e.match(t,n,i-1,r-1,a)){var s=o(e,t,n,i-1,r-1,a);return s.sequence.push(t[i-1]),s.indices1.push(i-1),s.indices2.push(r-1),s}return e[i][r-1]>e[i-1][r]?o(e,t,n,i,r-1,a):o(e,t,n,i-1,r,a)},a=function(e,t,n,a){a=a||{};var s=r(e,t,n||i,a),l=o(s,e,t,e.length,t.length,a);return"string"==typeof e&&"string"==typeof t&&(l.sequence=l.sequence.join("")),l};n.get=a},{}],12:[function(e,t,n){var i=e("../contexts/diff").DiffContext,r=e("../contexts/patch").PatchContext,o=e("../contexts/reverse").ReverseContext,a=function(e){if(e&&e.children){for(var t,n=e.children.length,i=e.result,r=0;n>r;r++)t=e.children[r],"undefined"!=typeof t.result&&(i=i||{},i[t.childName]=t.result);i&&e.leftIsArray&&(i._t="a"),e.setResult(i).exit()}};a.filterName="collectChildren";var s=function(e){if(!e.leftIsArray&&"object"===e.leftType){var t,n;for(t in e.left)n=new i(e.left[t],e.right[t]),e.push(n,t);for(t in e.right)"undefined"==typeof e.left[t]&&(n=new i(void 0,e.right[t]),e.push(n,t));return e.children&&0!==e.children.length?(e.exit(),void 0):(e.setResult(void 0).exit(),void 0)}};s.filterName="objects";var l=function(e){if(e.nested&&!e.delta._t){var t,n;for(t in e.delta)n=new r(e.left[t],e.delta[t]),e.push(n,t);e.exit()}};l.filterName="objects";var c=function(e){if(e&&e.children&&!e.delta._t){for(var t,n=e.children.length,i=0;n>i;i++)t=e.children[i],e.left[t.childName]!==t.result&&(e.left[t.childName]=t.result);e.setResult(e.left).exit()}};c.filterName="collectChildren";var u=function(e){if(e.nested&&!e.delta._t){var t,n;for(t in e.delta)n=new o(e.delta[t]),e.push(n,t);e.exit()}};u.filterName="objects";var d=function(e){if(e&&e.children&&!e.delta._t){for(var t,n=e.children.length,i={},r=0;n>r;r++)t=e.children[r],i[t.childName]!==t.result&&(i[t.childName]=t.result);e.setResult(i).exit()}};d.filterName="collectChildren",n.collectChildrenDiffFilter=a,n.objectsDiffFilter=s,n.patchFilter=l,n.collectChildrenPatchFilter=c,n.reverseFilter=u,n.collectChildrenReverseFilter=d},{"../contexts/diff":3,"../contexts/patch":4,"../contexts/reverse":5}],13:[function(e,t,n){var i=2,r=60,o=null,a=function(){if(!o){var t;if("undefined"!=typeof diff_match_patch)t=new diff_match_patch;else if("function"==typeof e){var n=e("../../external/diff_match_patch_uncompressed");t=new n.diff_match_patch}if(!t){var i=new Error("text diff_match_patch library not found");throw i.diff_match_patch_not_found=!0,i}o={diff:function(e,n){return t.patch_toText(t.patch_make(e,n))},patch:function(e,n){for(var i=t.patch_apply(t.patch_fromText(n),e),r=0;rt;t++){r=i[t];var d=r.slice(0,1);"@"===d?(c=u.exec(r),a=t,s=null,l=null,i[a]="@@ -"+c[3]+","+c[4]+" +"+c[1]+","+c[2]+" @@"):"+"===d?(s=t,i[t]="-"+i[t].slice(1),"+"===i[t-1].slice(0,1)&&(o=i[t],i[t]=i[t-1],i[t-1]=o)):"-"===d&&(l=t,i[t]="+"+i[t].slice(1))}return i.join("\n")},u=function(e){e.nested||e.delta[2]===i&&e.setResult([c(e.delta[0]),0,i]).exit()};u.filterName="texts",n.diffFilter=s,n.patchFilter=l,n.reverseFilter=u},{}],14:[function(e,t,n){var i="function"==typeof Array.isArray?Array.isArray:function(e){return e instanceof Array},r=function(e){if(e.left===e.right)return e.setResult(void 0).exit(),void 0;if("undefined"==typeof e.left){if("function"==typeof e.right)throw new Error("functions are not supported");return e.setResult([e.right]).exit(),void 0}if("undefined"==typeof e.right)return e.setResult([e.left,0,0]).exit(),void 0;if("function"==typeof e.left||"function"==typeof e.right)throw new Error("functions are not supported");return e.leftType=null===e.left?"null":typeof e.left,e.rightType=null===e.right?"null":typeof e.right,e.leftType!==e.rightType?(e.setResult([e.left,e.right]).exit(),void 0):"boolean"===e.leftType||"number"===e.leftType?(e.setResult([e.left,e.right]).exit(),void 0):("object"===e.leftType&&(e.leftIsArray=i(e.left)),"object"===e.rightType&&(e.rightIsArray=i(e.right)),e.leftIsArray!==e.rightIsArray?(e.setResult([e.left,e.right]).exit(),void 0):void 0)};r.filterName="trivial";var o=function(e){return"undefined"==typeof e.delta?(e.setResult(e.left).exit(),void 0):(e.nested=!i(e.delta),e.nested?void 0:1===e.delta.length?(e.setResult(e.delta[0]).exit(),void 0):2===e.delta.length?(e.setResult(e.delta[1]).exit(),void 0):3===e.delta.length&&0===e.delta[2]?(e.setResult(void 0).exit(),void 0):void 0)};o.filterName="trivial";var a=function(e){return"undefined"==typeof e.delta?(e.setResult(e.delta).exit(),void 0):(e.nested=!i(e.delta),e.nested?void 0:1===e.delta.length?(e.setResult([e.delta[0],0,0]).exit(),void 0):2===e.delta.length?(e.setResult([e.delta[1],e.delta[0]]).exit(),void 0):3===e.delta.length&&0===e.delta[2]?(e.setResult([e.delta[0]]).exit(),void 0):void 0)};a.filterName="trivial",n.diffFilter=r,n.patchFilter=o,n.reverseFilter=a},{}],15:[function(e,t,n){var i=function(e){this.name=e,this.filters=[]};i.prototype.process=function(e){if(!this.processor)throw new Error("add this pipe to a processor before using it");for(var t=this.debug,n=this.filters.length,i=e,r=0;n>r;r++){var o=this.filters[r];if(t&&this.log("filter: "+o.filterName),o(i),"object"==typeof i&&i.exiting){i.exiting=!1;break}}!i.next&&this.resultCheck&&this.resultCheck(i)},i.prototype.log=function(e){console.log("[jsondiffpatch] "+this.name+" pipe, "+e)},i.prototype.append=function(){return this.filters.push.apply(this.filters,arguments),this},i.prototype.prepend=function(){return this.filters.unshift.apply(this.filters,arguments),this},i.prototype.indexOf=function(e){if(!e)throw new Error("a filter name is required");for(var t=0;t >>0)+(t++ +"__")};n.prototype={set:function(t,n){var i=t[this.name];i&&i[0]===t?i[1]=n:e(t,this.name,{value:[t,n],writable:!0})},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){this.set(e,void 0)}},window.WeakMap=n}(),define("WeakMap",function(){}),function(e){function t(e){x.push(e),y||(y=!0,g(i))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function i(){y=!1;var e=x;x=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();r(e),n.length&&(e.callback_(n,e),t=!0)}),t&&i()}function r(e){e.nodes_.forEach(function(t){var n=m.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function o(e,t){for(var n=e;n;n=n.parentNode){var i=m.get(n);if(i)for(var r=0;r 0){var r=n[i-1],o=f(r,e);if(o)return n[i-1]=o,void 0}else t(this.observer);n[i]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=m.get(e);t||m.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=m.get(e),n=0;n /g,prolog:/<\?.+?\?>/,doctype:/<!DOCTYPE.+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+))?\s*)*\/?>/gi,inside:{tag:{pattern:/^<\/?[\w:-]+/i,inside:{punctuation:/^<\/?/,namespace:/^[\w-]+?:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/gi,inside:{punctuation:/=|>|"/g}},punctuation:/\/?>/g,"attr-name":{pattern:/[\w:-]+/g,inside:{namespace:/^[\w-]+?:/}}}},entity:/&#?[\da-z]{1,8};/gi},Prism.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),define("bower-libs/prism/components/prism-markup",function(){}),Prism.languages.latex={keyword:/\\(?:[^a-zA-Z]|[a-zA-Z]+)/g,lparen:/[[({]/g,rparen:/[\])}]/g,comment:/%.*/g},define("libs/prism-latex",function(){}),Prism.languages.md=function(){var e=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>\[\]'"]+|\([^\s()<>\[\]'"]*\))+(?:\([^\s()<>\[\]'"]*\)|[^\s`!()\[\]{}:'".,<>?«»“”‘’]))/gi,t=/[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2}|com|org|net|edu|gov|mil|biz|info|mobi|name|aero|asia|jobs|museum)\b/gi,n=Prism.languages.latex,i={};i.pre={pattern:/(^|(?:^|(?:^|\n)(?![ \t]*([*+\-]|\d+\.)[ \t]).*\n)\s*?\n)(\s*(?: {4}|\t).*(?:\n|$))+/g,lookbehind:!0,inside:{}},i["pre gfm"]={pattern:/^ {0,3}`{3}.*?\n(.*?\n)*? {0,3}`{3} *$/gm,inside:{"md md-pre":/`{3}/}},i["h1 alt"]={pattern:/^(.+)[ \t]*\n=+[ \t]*$/gm,inside:{}},i["h2 alt"]={pattern:/^(.+)[ \t]*\n-+[ \t]*$/gm,inside:{}},i.hr={pattern:/^([*\-_] *){3,}$/gm},i.li={pattern:/^[ \t]*([*+\-]|\d+\.)[ \t].+$/gm,inside:{"md md-li":/^ ?([*+\-]|\d+\.)[ \t]/m,"md md-li2":/^ ?(?: {2}|\t{1})([*+\-]|\d+\.)[ \t]/m,"md md-li3":/^ ?(?: {4}|\t{2})([*+\-]|\d+\.)[ \t]/m,"md md-li4":/^ ?(?: {6}|\t{3})([*+\-]|\d+\.)[ \t]/m,"md md-li5":/^ ?(?: {8}|\t{4})([*+\-]|\d+\.)[ \t]/m,"md md-li6":/^ ?(?: {10}|\t{5})([*+\-]|\d+\.)[ \t]/m,"md md-li7":/^ ?(?: {12}|\t{6})([*+\-]|\d+\.)[ \t]/m,"md md-li8":/^ ?(?: {14}|\t{7})([*+\-]|\d+\.)[ \t]/m,"md md-li9":/^ ?(?: {16}|\t{8})([*+\-]|\d+\.)[ \t]/m,"md md-li10":/^ ?(?: {18}|\t{9})([*+\-]|\d+\.)[ \t]/m,"md md-li11":/^ ?(?: {20}|\t{10})([*+\-]|\d+\.)[ \t]/m}};for(var r=6;r>=1;r--)i["h"+r]={pattern:new RegExp("^#{"+r+"}.+$","gm"),inside:{"md md-hash":new RegExp("^#{"+r+"} ")}};i.blockquote={pattern:/^ {0,3}> *[^\n]+$/gm,inside:{"md md-gt":/^ {0,3}> */,li:i.li}},i["math block"]={pattern:/(\$\$|\\\\\[|\\\\\\\\\()[\s\S]*?(\$\$|\\\\\]|\\\\\\\\\))/g,inside:{"md md-bracket-start":/^(\$\$|\\\\\[|\\\\\\\\\()/,"md md-bracket-end":/(\$\$|\\\\\]|\\\\\\\\\))/,lf:/\n/gm,rest:n}},i["latex block"]={pattern:/\\?\\begin\{[a-z]*\*?\}[\s\S]*?\\?\\end\{[a-z]*\*?\}/g,inside:{keyword:/\\?\\(begin|end)/,lf:/\n/gm,rest:n}},i.fndef={pattern:/^ {0,3}\[\^.*?\]:[ \t]+.*$/gm,inside:{"ref-id":{pattern:/\[\^.*?\]/,inside:{"md md-bracket-start":/\[/,"md md-bracket-end":/\]/}}}},i.linkdef={pattern:/^ {0,3}\[.*?\]:[ \t]+.*$/gm,inside:{"link-id":{pattern:/\[.*?\]/,inside:{"md md-bracket-start":/\[/,"md md-bracket-end":/\]/}},url:e,linktitle:/['\"\(][^\'\"\)]*['\"\)]/}},i.p={pattern:/.+/g,inside:{"md md-toc":/^\s*\[(toc|TOC)\]\s*$/g}},i.lf=/^\n$/gm,i.img={pattern:/!\[[^\]]*\]\([^\)]+\)/g,inside:{"md md-bang":/^!/,"md md-bracket-start":/\[/,"md md-alt":/[^\[]+(?=\])/,"md md-bracket-end":/\](?=\()/,"md img-parens":{pattern:/\([^\)]+\)/,inside:{"md md-paren-start":/^\(/,"md md-title":/(['‘][^'’]*['’]|["“][^"”]*["”])(?=\)$)/,"md md-src":/[^\('" \t]+(?=[\)'" \t])/,"md md-paren-end":/\)$/}}}},i.link={pattern:/\[(?:(\\.)|[^\[\]])*\]\([^\(\)\s]+(\(\S*?\))??[^\(\)\s]*?(\s(['‘][^'’]*['’]|["“][^"”]*["”]))?\)/gm,inside:{"md md-bracket-start":{pattern:/(^|[^\\])\[/,lookbehind:!0},"md md-underlined-text":{pattern:/(?:(\\.)|[^\[\]])+(?=\])/},"md md-bracket-end":/\]\s?\(/,"md md-paren-end":/\)$/,"md md-href":/.*/}},i.fn={pattern:/\[\^(.*?)\]/g,inside:{ref:{pattern:/^\[[^\[\]]+\] ?/,inside:{"md md-bracket-start":/\[/,"md md-ref":/^[^\[\]]+/,"md md-bracket-end":/\]/}}}},i.imgref={pattern:/!\[(.*?)\] ?\[(.*?)\]/g,inside:{"md md-bang":/^!/,"ref-end":{pattern:/\[[^\[\]]+\]$/,inside:{"md md-bracket-start":/\[/,"md md-href":/[^\[\]]+(?=]$)/,"md md-bracket-end":/\]/}},"ref-start":{pattern:/^\[[^\[\]]+\] ?/,inside:{"md md-bracket-start":/\[/,"md md-alt":/^[^\[\]]+/,"md md-bracket-end":/\]/}}}},i.linkref={pattern:/\[(.*?)\] ?\[(.*?)\]/g,inside:{"ref-end":{pattern:/\[[^\[\]]+\]$/,inside:{"md md-bracket-start":/\[/,"md md-href":/[^\[\]]+(?=]$)/,"md md-bracket-end":/\]/}},"ref-start":{pattern:/^\[[^\[\]]+\] ?/,inside:{"md md-bracket-start":/\[/,"md md-underlined-text":/^[^\[\]]+/,"md md-bracket-end":/\]/}}}},i.email={pattern:t},i.code={pattern:/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/g,lookbehind:!0,inside:{"md md-code":/`/}},i.math={pattern:/\$.*?\$/g,inside:{"md md-bracket-start":/^\$/,"md md-bracket-end":/\$$/,rest:n}},i.strong={pattern:/([_\*])\1((?!\1{2}).)*\1{2}/g,inside:{"md md-strong":/([_\*])\1/g}},i.em={pattern:/(^|[^\\])(\*|_)(\S[^\2]*?)??[^\s\\]+?\2/g,lookbehind:!0,inside:{"md md-em md-start":/^(\*|_)/,"md md-em md-close":/(\*|_)$/}},i.strike={pattern:/(^|\n|\W)(~~)(?=\S)([^\r]*?\S)\2/gm,lookbehind:!0,inside:{"md md-s":/(~~)/,"md-strike-text":/[^~]+/}};for(var o={code:i.code,math:i.math,fn:i.fn,img:i.img,link:i.link,imgref:i.imgref,linkref:i.linkref,url:i.url,email:i.email,strong:i.strong,em:i.em,strike:i.strike,conflict:/⧸⧸/g,comment:Prism.languages.markup.comment,tag:Prism.languages.markup.tag,entity:Prism.languages.markup.entity},a=6;a>=1;a--)i["h"+a].inside.rest=o;i["h1 alt"].inside.rest=o,i["h2 alt"].inside.rest=o,i.p.inside.rest=o,i.blockquote.inside.rest=o,i.li.inside.rest=o,i.fndef.inside.rest=o,o={code:i.code,fn:i.fn,link:i.link,linkref:i.linkref,conflict:/⧸⧸/g},i.strong.inside.rest=o,i.em.inside.rest=o,i.strike.inside.rest=o;var s={code:i.code,strong:i.strong,em:i.em,strike:i.strike,conflict:/⧸⧸/g,comment:Prism.languages.markup.comment,tag:Prism.languages.markup.tag,entity:Prism.languages.markup.entity};return i.link.inside["md md-underlined-text"].inside=s,i.linkref.inside["ref-start"].inside["md md-underlined-text"].inside=s,i}(),define("libs/prism-markdown",function(){}),define("editor",["jquery","underscore","utils","settings","eventMgr","prism-core","diff_match_patch_uncompressed","jsondiffpatch","crel","rangy","MutationObservers","libs/prism-markdown"],function(e,t,n,i,r,o,a,s,l,c){function u(){this.isWatching=!1;var e;this.startWatching=function(){this.isWatching=!0,e=e||new MutationObserver(y),e.observe(_,{childList:!0,subtree:!0,characterData:!0})},this.stopWatching=function(){e.disconnect(),this.isWatching=!1},this.noWatch=function(e){this.isWatching===!0?(this.stopWatching(),e(),this.startWatching()):e()}}function d(){var e=this;this.selectionStart=0,this.selectionEnd=0,this.cursorY=0,this.findOffset=function(e){for(var t=document.createTreeWalker(_,4,null,!1),n="";t.nextNode();){if(n=t.currentNode.nodeValue||"",n.length>e)return{container:t.currentNode,offset:e};e-=n.length}return{container:t.currentNode,offset:n.length}},this.createRange=function(e,n){e=0>e?0:e,n=0>n?0:n;var i=document.createRange(),r=t.isObject(e)?e:this.findOffset(e);return i.setStart(r.container,r.offset),n&&n!=e&&(r=t.isObject(n)?n:this.findOffset(n)),i.setEnd(r.container,r.offset),i},this.setSelectionStartEnd=function(e,t,n,i){void 0===e&&(e=this.selectionStart),0>e&&(e=0),void 0===t&&(t=this.selectionEnd),0>t&&(t=0),this.selectionStart=e,this.selectionEnd=t;var o=Math.min(e,t),a=Math.max(e,t);if(n=n||this.createRange(o,a),!i){var s=c.getSelection();s.removeAllRanges(),s.addRange(n,e>t)}F.editorStart=this.selectionStart,F.editorEnd=this.selectionEnd,k.toggleClass("has-selection",this.selectionStart!==this.selectionEnd);var l=this.getCoordinates(this.selectionEnd,this.selectionEndContainer,this.selectionEndOffset);return this.cursorY!==l.y&&(this.cursorY=l.y,r.onCursorCoordinates(l.x,l.y)),n},this.saveSelectionState=function(){function t(){if(O===!1){var t,n=e.selectionStart,i=e.selectionEnd,r=c.getSelection();if(r.rangeCount>0){var o=r.getRangeAt(0),a=o.startContainer;if(16&_.compareDocumentPosition(a)){t=o;var s=a,l=t.startOffset;do{for(;a=a.previousSibling;)a.textContent&&(l+=a.textContent.length);a=s=s.parentNode}while(a&&a!=E);r.isBackwards()?(n=l+(t+"").length,i=l):(n=l,i=l+(t+"").length)}}e.setSelectionStartEnd(n,i,t,!0)}U.saveSelectionState()}var i=n.debounce(t);return function(e){e?i():t()}}(),this.getCoordinates=function(e,t,n){t||(n=this.findOffset(e),t=n.container,n=n.offset);var i=0,r=0;if("\n"==t.textContent)r=t.parentNode.offsetTop+t.parentNode.offsetHeight/2;else{var o=H[e],a={container:t,offset:n},s={container:t,offset:n};e>0&&(void 0===o||"\n"==o)?0===a.offset?a=e-1:a.offset-=1:s.offset===t.textContent.length?s=e+1:s.offset+=1;var l=this.createRange(a,s),c=l.getBoundingClientRect();r=c.top+c.height/2-E.getBoundingClientRect().top+E.scrollTop,l.detach()}return{x:i,y:r}},this.getClosestWordOffset=function(e){var t=0,n=0,i=0;return H.split(/\s/).some(function(r){return r&&(t=i,n=i+r.length,n>e)?!0:(i+=r.length+1,void 0)}),{start:t,end:n}}}function p(e){var t=j.diff_commonPrefix(H,e);t===H.length&&t--;var n=Math.min(j.diff_commonSuffix(H,e),H.length-t,e.length-t),i=e.substring(t,e.length-n),r=G.createRange(t,H.length-n);r.deleteContents(),r.insertNode(document.createTextNode(i))}function f(e,t){var n=G.selectionStart;if(n!==G.selectionEnd)return!1;var i=G.createRange(n-e.length,n);return""+i!=e?!1:(i.deleteContents(),i.insertNode(document.createTextNode(t)),n=n-e.length+t.length,G.setSelectionStartEnd(n,n),!0)}function h(e){p(e),H=e}function m(){return H}function g(){I.focus(),G.setSelectionStartEnd(),E.scrollTop=R}function v(){function e(e,n,i){B.noWatch(function(){H!=e.content&&(h(e.content),F.content=e.content,r.onContentChanged(F,e.content)),G.setSelectionStartEnd(n,i);var o=F.discussionListJSON;if(o!=e.discussionListJSON){var a=F.discussionList;F.discussionListJSON=e.discussionListJSON;var s=F.discussionList,l=$.diff(a,s),c=!1;t.each(l,function(e,n){t.isArray(e)?1===e.length?r.onDiscussionCreated(F,s[n]):r.onDiscussionRemoved(F,a[n]):c=!0}),c&&r.onCommentsChanged(F)}}),s=n,l=i,a=e,this.currentMode=void 0,o=void 0,this.onButtonStateChange(),q()}var i,o,a,s,l,c=[],u=[];this.setCommandMode=function(){this.currentMode="command"},this.setMode=function(){},this.onButtonStateChange=function(){},this.saveState=n.debounce(function(){u=[];var e=Date.now();"comment"==this.currentMode||this.currentMode!=o&&"newlines"!=o||e-i>1e3?(c.push(a),100===c.length&&c.shift()):(s=a.selectionStartBefore,l=a.selectionEndBefore),a={selectionStartBefore:s,selectionEndBefore:l,selectionStartAfter:G.selectionStart,selectionEndAfter:G.selectionEnd,content:H,discussionListJSON:F.discussionListJSON},i=e,o=this.currentMode,this.currentMode=void 0,this.onButtonStateChange()},this),this.saveSelectionState=t.debounce(function(){void 0===this.currentMode&&(s=G.selectionStart,l=G.selectionEnd)},10),this.canUndo=function(){return c.length},this.canRedo=function(){return u.length},this.undo=function(){var t=c.pop();t&&(u.push(a),e.call(this,t,a.selectionStartBefore,a.selectionEndBefore))},this.redo=function(){var t=u.pop();t&&(c.push(a),e.call(this,t,t.selectionStartAfter,t.selectionEndAfter))},this.init=function(){var e=F.content;c=[],u=[],i=0,a={selectionStartAfter:F.selectionStart,selectionEndAfter:F.selectionEnd,content:e,discussionListJSON:F.discussionListJSON},this.currentMode=void 0,o=void 0,_.textContent=e,y()}}function b(){B.isWatching===!0&&(U.currentMode=U.currentMode||"comment",U.saveState())}function y(){var e=E.textContent;if(_.lastChild===z&&"\n"==z.textContent.slice(-1)&&(e=e.slice(0,-1)),O===!1){if(e==H)return 0===_.children.length&&(_.innerHTML="",W.forEach(function(e){_.appendChild(e.elt)}),C()),void 0;U.currentMode=U.currentMode||"typing";var n=t.values(F.discussionList);F.newDiscussion&&n.push(F.newDiscussion);var i=x(H,e,n);H=e,i===!0&&(F.discussionList=F.discussionList),F.content=H,G.saveSelectionState(),r.onContentChanged(F,H),i&&r.onCommentsChanged(F),U.saveState()}else H=e,G.setSelectionStartEnd(F.editorStart,F.editorEnd),G.saveSelectionState(),r.onFileOpen(F,H),L.scrollTop=F.previewScrollTop,R=F.editorScrollTop,E.scrollTop=R,O=!1}function x(e,t,n){if(n.length){var i=j.diff_main(e,t),r=!1,o=0;return i.forEach(function(e){var t=e[0],i=e[1];if(0===t)return o+=i.length,void 0;var a=o,s=i.length;-1===t&&(a+=s,s=-s),n.forEach(function(e){e.selectionEnd>a?(e.selectionEnd+=s,e.discussionIndex&&(r=!0)):e.selectionEnd>o&&(e.selectionEnd=o,e.discussionIndex&&(r=!0)),e.selectionStart>=a?(e.selectionStart+=s,e.discussionIndex&&(r=!0)):e.selectionStart>o&&(e.selectionStart=o,e.discussionIndex&&(r=!0))}),1===t&&(o+=i.length)}),r}}function w(e){if(X=[],Q=[],V=void 0,O===!0)return Q=W,W=e,X=e,void 0;var n=W.length;t.some(W,function(t,i){var r=e[i];return i>=e.length||t.textWithFrontMatter!=r.textWithFrontMatter||t.elt.parentNode!==_||t.elt.textContent!=r.textWithFrontMatter?(n=i,!0):void 0});var i=-W.length;t.some(W.slice().reverse(),function(t,n){var r=e[e.length-n-1];return n>=e.length||t.textWithFrontMatter!=r.textWithFrontMatter||t.elt.parentNode!==_||t.elt.textContent!=r.textWithFrontMatter?(i=-n,!0):void 0}),n-i>W.length&&(i=n-W.length);var r=W.slice(0,n);X=e.slice(n,e.length+i);var o=W.slice(W.length+i,W.length);V=t.first(o),Q=W.slice(n,W.length+i),W=r.concat(X).concat(o)}function S(){var e=document.createDocumentFragment();X.forEach(function(t){T(t),e.appendChild(t.elt)}),B.noWatch(function(){if(O===!0)_.innerHTML="",_.appendChild(e);else{Q.forEach(function(e){e.elt.parentNode===_&&_.removeChild(e.elt)}),void 0!==V?_.insertBefore(e,V.elt):_.appendChild(e);for(var t=_.firstChild;t;){var n=t.nextSibling;t.generated||_.removeChild(t),t=n}}C(),G.setSelectionStartEnd()})}function C(){z=l("span",{"class":"token lf"}),z.textContent="\n",_.appendChild(z)}function T(e){var t=K(e.text);window.viewerMode||(t=o.highlight(t,o.languages.md));var n=e.textWithFrontMatter.substring(0,e.textWithFrontMatter.length-e.text.length);n.length&&(n=K(n),n=n.replace(/\n/g,'\n'),t=''+n+""+t);var i=l("span",{id:"wmd-input-section-"+e.id,"class":"wmd-input-section"});i.generated=!0,i.innerHTML=t,e.elt=i}var E,k,_,I,D,N,L,M,A={},R=0,P=function(){var e=0,n=function(){var t=Date.now();M.refreshPreview(),e=Date.now()-t};return i.lazyRendering===!0?t.debounce(n,500):function(){setTimeout(n,2e3>e?e:2e3)}}();r.addListener("onPagedownConfigure",function(e){M=e}),r.addListener("onSectionsCreated",function(e){w(e),S(),O===!0?M.refreshPreview():P()});var F,O=!0;r.addListener("onFileSelected",function(e){O=!0,F=e});var B=new u;A.watcher=B;var j=new a,$=s.create({objectHash:function(e){return JSON.stringify(e)},arrays:{detectMove:!1},textDiff:{minLength:9999999}}),G=new d;A.selectionMgr=G,e(document).on("selectionchange",".editor-content",t.bind(G.saveSelectionState,G,!0));var q=function(){var e=n.debounce(function(){var e=E.offsetHeight/2;e>130&&(e=130);var t=E.scrollTop+e,n=E.scrollTop+E.offsetHeight-e;G.cursorY n&&(E.scrollTop+=G.cursorY-n)});return function(){void 0!==E&&(G.saveSelectionState(!0),e())}}();A.adjustCursorPosition=q;var H;A.setValue=p,A.replacePreviousText=f,A.setValueNoWatch=h,A.getValue=m,A.focus=g;var U=new v;A.undoMgr=U,r.addListener("onDiscussionCreated",b),r.addListener("onDiscussionRemoved",b),r.addListener("onCommentsChanged",b);var z;A.adjustCommentOffsets=x,A.init=function(){if(E=document.getElementById("wmd-input"),k=e(E),_=E.querySelector(".editor-content"),I=e(_),D=E.querySelector(".editor-margin"),N=e(D),L=document.querySelector(".preview-container"),k.addClass(i.editorFontClass),B.startWatching(),e(E).scroll(function(){R=E.scrollTop,O===!1&&(F.editorScrollTop=R)}),e(L).scroll(function(){O===!1&&(F.previewScrollTop=L.scrollTop)}),/AppleWebKit\/([\d.]+)/.exec(navigator.userAgent)){var n=e('').appendTo("html");I.blur(function(){n[0].setSelectionRange(0,0),n.blur()})}E.focus=g,Object.defineProperty(E,"value",{get:function(){return H},set:p}),Object.defineProperty(E,"selectionStart",{get:function(){return Math.min(G.selectionStart,G.selectionEnd)},set:function(e){G.setSelectionStartEnd(e)},enumerable:!0,configurable:!0}),Object.defineProperty(E,"selectionEnd",{get:function(){return Math.max(G.selectionStart,G.selectionEnd)},set:function(e){G.setSelectionStartEnd(void 0,e)},enumerable:!0,configurable:!0});var r=!1;I.on("keydown",function(e){if(17!==e.which&&91!==e.which&&18!==e.which&&16!==e.which){G.saveSelectionState();var t=e.metaKey||e.ctrlKey;switch(t||q(),e.which){case 9:t||(o("indent",{inverse:e.shiftKey}),e.preventDefault());break;case 13:o("newline"),e.preventDefault()}13!==e.which&&(r=!1)}}).on("mouseup",t.bind(G.saveSelectionState,G,!0)).on("paste",function(){U.currentMode="paste",q()}).on("cut",function(){U.currentMode="cut",q()});var o=function(e,t){t=t||{};var n=m(),i=t.start||G.selectionStart,r=t.end||G.selectionEnd,o={selectionStart:i,selectionEnd:r,before:n.slice(0,i),after:n.slice(r),selection:n.slice(i,r)};a[e](o,t),p(o.before+o.selection+o.after),G.setSelectionStartEnd(o.selectionStart,o.selectionEnd)},a={indent:function(e,t){function n(e,t,n,i){return n=+n||0,i=i||"",e.slice(0,t)+i+e.slice(t+n)}var i=e.before.lastIndexOf("\n")+1;if(t.inverse)/\s/.test(e.before.charAt(i))&&(e.before=n(e.before,i,1),e.selectionStart--,e.selectionEnd--),e.selection=e.selection.replace(/^[ \t]/gm,"");else{if(!e.selection)return e.before+=" ",e.selectionStart++,e.selectionEnd++,void 0;e.before=n(e.before,i,0," "),e.selection=e.selection.replace(/\r?\n(?=[\s\S])/g,"\n "),e.selectionStart++,e.selectionEnd++}e.selectionEnd=e.selectionStart+e.selection.length},newline:function(e){var t=e.before.lastIndexOf("\n")+1;if(r)return e.before=e.before.substring(0,t),e.selection="",e.selectionStart=t,e.selectionEnd=t,r=!1,void 0;r=!1;var n=e.before.slice(t),i=n.match(/^ {0,3}>[ ]*|^[ \t]*(?:[*+\-]|(\d+)\.)[ \t]|^\s+/),o=(i||[""])[0];if(i&&i[1]){var a=parseInt(i[1],10);o=o.replace(/\d+/,a+1)}o.length&&(r=!0),U.currentMode="newlines",e.before+="\n"+o,e.selection="",e.selectionStart+=o.length+1,e.selectionEnd=e.selectionStart}}};var V,W=[],Q=[],X=[],K=function(){var e={"&":"&","<":"<"," ":" "};return function(t){return t.replace(/[&<\u00a0]/g,function(t){return e[t]})}}();return r.onEditorCreated(A),A}),function(e,t){function n(){i.READY||(b.determineEventTypes(),h.each(i.gestures,function(e){x.register(e)}),b.onTouch(i.DOCUMENT,p,x.detect),b.onTouch(i.DOCUMENT,f,x.detect),i.READY=!0)}var i=function(e,t){return new i.Instance(e,t||{})};i.VERSION="1.0.10",i.defaults={stop_browser_behavior:{userSelect:"none",touchAction:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},i.HAS_POINTEREVENTS=e.navigator.pointerEnabled||e.navigator.msPointerEnabled,i.HAS_TOUCHEVENTS="ontouchstart"in e,i.MOBILE_REGEX=/mobile|tablet|ip(ad|hone|od)|android|silk/i,i.NO_MOUSEEVENTS=i.HAS_TOUCHEVENTS&&e.navigator.userAgent.match(i.MOBILE_REGEX),i.EVENT_TYPES={},i.UPDATE_VELOCITY_INTERVAL=16,i.DOCUMENT=e.document;var r=i.DIRECTION_DOWN="down",o=i.DIRECTION_LEFT="left",a=i.DIRECTION_UP="up",s=i.DIRECTION_RIGHT="right",l=i.POINTER_MOUSE="mouse",c=i.POINTER_TOUCH="touch",u=i.POINTER_PEN="pen",d=i.EVENT_START="start",p=i.EVENT_MOVE="move",f=i.EVENT_END="end";i.plugins=i.plugins||{},i.gestures=i.gestures||{},i.READY=!1;var h=i.utils={extend:function(e,n,i){for(var r in n)e[r]!==t&&i||(e[r]=n[r]);return e},each:function(e,n,i){var r,o;if("forEach"in e)e.forEach(n,i);else if(e.length!==t){for(r=-1;o=e[++r];)if(n.call(i,o,r,e)===!1)return}else for(r in e)if(e.hasOwnProperty(r)&&n.call(i,e[r],r,e)===!1)return},inStr:function(e,t){return e.indexOf(t)>-1},hasParent:function(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1},getCenter:function(e){var t=[],n=[],i=[],r=[],o=Math.min,a=Math.max;return 1===e.length?{pageX:e[0].pageX,pageY:e[0].pageY,clientX:e[0].clientX,clientY:e[0].clientY}:(h.each(e,function(e){t.push(e.pageX),n.push(e.pageY),i.push(e.clientX),r.push(e.clientY)}),{pageX:(o.apply(Math,t)+a.apply(Math,t))/2,pageY:(o.apply(Math,n)+a.apply(Math,n))/2,clientX:(o.apply(Math,i)+a.apply(Math,i))/2,clientY:(o.apply(Math,r)+a.apply(Math,r))/2})},getVelocity:function(e,t,n){return{x:Math.abs(t/e)||0,y:Math.abs(n/e)||0}},getAngle:function(e,t){var n=t.clientX-e.clientX,i=t.clientY-e.clientY;return 180*Math.atan2(i,n)/Math.PI},getDirection:function(e,t){var n=Math.abs(e.clientX-t.clientX),i=Math.abs(e.clientY-t.clientY);return n>=i?e.clientX-t.clientX>0?o:s:e.clientY-t.clientY>0?a:r},getDistance:function(e,t){var n=t.clientX-e.clientX,i=t.clientY-e.clientY;return Math.sqrt(n*n+i*i)},getScale:function(e,t){return e.length>=2&&t.length>=2?this.getDistance(t[0],t[1])/this.getDistance(e[0],e[1]):1},getRotation:function(e,t){return e.length>=2&&t.length>=2?this.getAngle(t[1],t[0])-this.getAngle(e[1],e[0]):0},isVertical:function(e){return e==a||e==r},toggleDefaultBehavior:function(e,t,n){if(t&&e&&e.style){h.each(["webkit","moz","Moz","ms","o",""],function(i){h.each(t,function(t,r){i&&(r=i+r.substring(0,1).toUpperCase()+r.substring(1)),r in e.style&&(e.style[r]=!n&&t)})});var i=function(){return!1};"none"==t.userSelect&&(e.onselectstart=!n&&i),"none"==t.userDrag&&(e.ondragstart=!n&&i)}}};i.Instance=function(e,t){var r=this;return n(),this.element=e,this.enabled=!0,this.options=h.extend(h.extend({},i.defaults),t||{}),this.options.stop_browser_behavior&&h.toggleDefaultBehavior(this.element,this.options.stop_browser_behavior,!1),this.eventStartHandler=b.onTouch(e,d,function(e){r.enabled&&x.startDetect(r,e)}),this.eventHandlers=[],this},i.Instance.prototype={on:function(e,t){var n=e.split(" ");return h.each(n,function(e){this.element.addEventListener(e,t,!1),this.eventHandlers.push({gesture:e,handler:t})},this),this},off:function(e,t){var n,i,r=e.split(" ");return h.each(r,function(e){for(this.element.removeEventListener(e,t,!1),n=-1;i=this.eventHandlers[++n];)i.gesture===e&&i.handler===t&&this.eventHandlers.splice(n,1)},this),this},trigger:function(e,t){t||(t={});var n=i.DOCUMENT.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t;var r=this.element;return h.hasParent(t.target,r)&&(r=t.target),r.dispatchEvent(n),this},enable:function(e){return this.enabled=e,this},dispose:function(){var e,t;for(this.options.stop_browser_behavior&&h.toggleDefaultBehavior(this.element,this.options.stop_browser_behavior,!0),e=-1;t=this.eventHandlers[++e];)this.element.removeEventListener(t.gesture,t.handler,!1);return this.eventHandlers=[],b.unbindDom(this.element,i.EVENT_TYPES[d],this.eventStartHandler),null}};var m=null,g=!1,v=!1,b=i.event={bindDom:function(e,t,n){var i=t.split(" ");h.each(i,function(t){e.addEventListener(t,n,!1)})},unbindDom:function(e,t,n){var i=t.split(" ");h.each(i,function(t){e.removeEventListener(t,n,!1)})},onTouch:function(e,t,n){var r=this,o=function(o){var a=o.type.toLowerCase();if(!h.inStr(a,"mouse")||!v){h.inStr(a,"touch")||h.inStr(a,"pointerdown")||h.inStr(a,"mouse")&&1===o.which?g=!0:h.inStr(a,"mouse")&&!o.which&&(g=!1),(h.inStr(a,"touch")||h.inStr(a,"pointer"))&&(v=!0);var s=0;g&&(i.HAS_POINTEREVENTS&&t!=f?s=y.updatePointer(t,o):h.inStr(a,"touch")?s=o.touches.length:v||(s=h.inStr(a,"up")?0:1),s>0&&t==f?t=p:s||(t=f),(s||null===m)&&(m=o),n.call(x,r.collectEventData(e,t,r.getTouchList(m,t),o)),i.HAS_POINTEREVENTS&&t==f&&(s=y.updatePointer(t,o))),s||(m=null,g=!1,v=!1,y.reset())}};return this.bindDom(e,i.EVENT_TYPES[t],o),o},determineEventTypes:function(){var e;e=i.HAS_POINTEREVENTS?y.getEvents():i.NO_MOUSEEVENTS?["touchstart","touchmove","touchend touchcancel"]:["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"],i.EVENT_TYPES[d]=e[0],i.EVENT_TYPES[p]=e[1],i.EVENT_TYPES[f]=e[2]},getTouchList:function(e){return i.HAS_POINTEREVENTS?y.getTouchList():e.touches?e.touches:(e.identifier=1,[e])},collectEventData:function(e,t,n,i){var r=c;return(h.inStr(i.type,"mouse")||y.matchType(l,i))&&(r=l),{center:h.getCenter(n),timeStamp:Date.now(),target:i.target,touches:n,eventType:t,pointerType:r,srcEvent:i,preventDefault:function(){var e=this.srcEvent;e.preventManipulation&&e.preventManipulation(),e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return x.stopDetect()}}}},y=i.PointerEvent={pointers:{},getTouchList:function(){var e=[];return h.each(this.pointers,function(t){e.push(t)}),e},updatePointer:function(e,t){return e==f?delete this.pointers[t.pointerId]:(t.identifier=t.pointerId,this.pointers[t.pointerId]=t),Object.keys(this.pointers).length},matchType:function(e,t){if(!t.pointerType)return!1;var n=t.pointerType,i={};return i[l]=n===l,i[c]=n===c,i[u]=n===u,i[e]},getEvents:function(){return["pointerdown MSPointerDown","pointermove MSPointerMove","pointerup pointercancel MSPointerUp MSPointerCancel"]},reset:function(){this.pointers={} -}},x=i.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(e,t){this.current||(this.stopped=!1,this.current={inst:e,startEvent:h.extend({},t),lastEvent:!1,lastVelocityEvent:!1,velocity:!1,name:""},this.detect(t))},detect:function(e){if(this.current&&!this.stopped){e=this.extendEventData(e);var t=this.current.inst,n=t.options;return h.each(this.gestures,function(i){return this.stopped||n[i.name]===!1||t.enabled===!1||i.handler.call(i,e,t)!==!1?void 0:(this.stopDetect(),!1)},this),this.current&&(this.current.lastEvent=e),e.eventType==f&&!e.touches.length-1&&this.stopDetect(),e}},stopDetect:function(){this.previous=h.extend({},this.current),this.current=null,this.stopped=!0},getVelocityData:function(e,t,n,r){var o=this.current,a=o.lastVelocityEvent,s=o.velocity;a&&e.timeStamp-a.timeStamp>i.UPDATE_VELOCITY_INTERVAL?(s=h.getVelocity(e.timeStamp-a.timeStamp,e.center.clientX-a.center.clientX,e.center.clientY-a.center.clientY),o.lastVelocityEvent=e):o.velocity||(s=h.getVelocity(t,n,r),o.lastVelocityEvent=e),o.velocity=s,e.velocityX=s.x,e.velocityY=s.y},getInterimData:function(e){var t,n,i=this.current.lastEvent;e.eventType==f?(t=i&&i.interimAngle,n=i&&i.interimDirection):(t=i&&h.getAngle(i.center,e.center),n=i&&h.getDirection(i.center,e.center)),e.interimAngle=t,e.interimDirection=n},extendEventData:function(e){var t=this.current,n=t.startEvent;(e.touches.length!=n.touches.length||e.touches===n.touches)&&(n.touches=[],h.each(e.touches,function(e){n.touches.push(h.extend({},e))}));var i=e.timeStamp-n.timeStamp,r=e.center.clientX-n.center.clientX,o=e.center.clientY-n.center.clientY;return this.getVelocityData(e,i,r,o),this.getInterimData(e),h.extend(e,{startEvent:n,deltaTime:i,deltaX:r,deltaY:o,distance:h.getDistance(n.center,e.center),angle:h.getAngle(n.center,e.center),direction:h.getDirection(n.center,e.center),scale:h.getScale(n.touches,e.touches),rotation:h.getRotation(n.touches,e.touches)}),e},register:function(e){var n=e.defaults||{};return n[e.name]===t&&(n[e.name]=!0),h.extend(i.defaults,n,!0),e.index=e.index||1e3,this.gestures.push(e),this.gestures.sort(function(e,t){return e.index t.index?1:0}),this.gestures}};i.gestures.Drag={name:"drag",index:50,defaults:{drag_min_distance:10,correct_for_drag_min_distance:!0,drag_max_touches:1,drag_block_horizontal:!1,drag_block_vertical:!1,drag_lock_to_axis:!1,drag_lock_min_distance:25},triggered:!1,handler:function(e,t){var n=x.current;if(n.name!=this.name&&this.triggered)return t.trigger(this.name+"end",e),this.triggered=!1,void 0;if(!(t.options.drag_max_touches>0&&e.touches.length>t.options.drag_max_touches))switch(e.eventType){case d:this.triggered=!1;break;case p:if(e.distance 0)){var l=Math.abs(t.options.drag_min_distance/e.distance);i.pageX+=e.deltaX*l,i.pageY+=e.deltaY*l,i.clientX+=e.deltaX*l,i.clientY+=e.deltaY*l,e=x.extendEventData(e)}(n.lastEvent.drag_locked_to_axis||t.options.drag_lock_to_axis&&t.options.drag_lock_min_distance<=e.distance)&&(e.drag_locked_to_axis=!0);var c=n.lastEvent.direction;e.drag_locked_to_axis&&c!==e.direction&&(e.direction=h.isVertical(c)?e.deltaY<0?a:r:e.deltaX<0?o:s),this.triggered||(t.trigger(this.name+"start",e),this.triggered=!0),t.trigger(this.name,e),t.trigger(this.name+e.direction,e);var u=h.isVertical(e.direction);(t.options.drag_block_vertical&&u||t.options.drag_block_horizontal&&!u)&&e.preventDefault();break;case f:this.triggered&&t.trigger(this.name+"end",e),this.triggered=!1}}},i.gestures.Hold={name:"hold",index:10,defaults:{hold_timeout:500,hold_threshold:2},timer:null,handler:function(e,t){switch(e.eventType){case d:clearTimeout(this.timer),x.current.name=this.name,this.timer=setTimeout(function(){"hold"==x.current.name&&t.trigger("hold",e)},t.options.hold_timeout);break;case p:e.distance>t.options.hold_threshold&&clearTimeout(this.timer);break;case f:clearTimeout(this.timer)}}},i.gestures.Release={name:"release",index:1/0,handler:function(e,t){e.eventType==f&&t.trigger(this.name,e)}},i.gestures.Swipe={name:"swipe",index:40,defaults:{swipe_min_touches:1,swipe_max_touches:1,swipe_velocity:.7},handler:function(e,t){if(e.eventType==f){if(e.touches.length t.options.swipe_max_touches)return;(e.velocityX>t.options.swipe_velocity||e.velocityY>t.options.swipe_velocity)&&(t.trigger(this.name,e),t.trigger(this.name+e.direction,e))}}},i.gestures.Tap={name:"tap",index:100,defaults:{tap_max_touchtime:250,tap_max_distance:10,tap_always:!0,doubletap_distance:20,doubletap_interval:300},has_moved:!1,handler:function(e,t){var n,i,r;e.eventType==d?this.has_moved=!1:e.eventType!=p||this.moved?e.eventType==f&&"touchcancel"!=e.srcEvent.type&&e.deltaTime t.options.tap_max_distance}},i.gestures.Touch={name:"touch",index:-1/0,defaults:{prevent_default:!1,prevent_mouseevents:!1},handler:function(e,t){return t.options.prevent_mouseevents&&e.pointerType==l?(e.stopDetect(),void 0):(t.options.prevent_default&&e.preventDefault(),e.eventType==d&&t.trigger(this.name,e),void 0)}},i.gestures.Transform={name:"transform",index:45,defaults:{transform_min_scale:.01,transform_min_rotation:1,transform_always_block:!1,transform_within_instance:!1},triggered:!1,handler:function(e,t){if(x.current.name!=this.name&&this.triggered)return t.trigger(this.name+"end",e),this.triggered=!1,void 0;if(!(e.touches.length<2)){if(t.options.transform_always_block&&e.preventDefault(),t.options.transform_within_instance)for(var n=-1;e.touches[++n];)if(!h.hasParent(e.touches[n].target,t.element))return;switch(e.eventType){case d:this.triggered=!1;break;case p:var i=Math.abs(1-e.scale),r=Math.abs(e.rotation);if(i t.options.transform_min_rotation&&t.trigger("rotate",e),i>t.options.transform_min_scale&&(t.trigger("pinch",e),t.trigger("pinch"+(e.scale<1?"in":"out"),e));break;case f:this.triggered&&t.trigger(this.name+"end",e),this.triggered=!1}}}},"function"==typeof define&&define.amd?define("hammerjs",[],function(){return i}):"object"==typeof module&&module.exports?module.exports=i:e.Hammer=i}(window),define("layout",["jquery","underscore","utils","constants","settings","eventMgr","crel","mousetrap","hammerjs"],function(e,t,n,i,r,o,a,s,l){function c(){j=!0,g.$elt.addClass("layout-animate")}function u(){j=!1,g.$elt.removeClass("layout-animate")}function d(t){this.selector=t,this.elt=document.querySelector(t),this.$elt=e(this.elt)}function p(){return t.find(K,function(e){return m.width>e.screenWidth}).maxWidth}function f(){var e=b.height-60,t=(S.elt.offsetWidth-p())/2;t \n \n\n \n\n \n \n\n\n\n\n \n\n\n \n\n \n\n\n\n\n \n\n\n \n\n \n\n \n \n\n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n\n\n\n' -}),define("text!html/bodyViewer.html",[],function(){return'\n\n \n\n\n\n\n\n\n \n\n \n \n\n\n\n\n \n\n\n\n\n\n\n \n\n\n \n\n \n\n \n \n\n\n\n'}),define("text!html/settingsTemplateTooltip.html",[],function(){return'Available variables:\n\n\n \n
\n\n
\nExamples:\n- \n documentTitle: document title
\n- \n documentMarkdown: document in Markdown format
\n- \n strippedDocumentMarkdown: document without front matter
\n- \n documentHTML: document in HTML format
\n- \n frontMatter: YAML front matter object (undefined if not present)
\n- \n publishAttributes: attributes of the publish location (undefined if\n not publishing)
\n
<title><%= documentTitle %></title>\n
<div><%- documentHTML %></div>\n
<%\n
if(publishAttributes.provider.providerId == "github") print(documentMarkdown);\n
%>\n
\n
\nMore\n info\n
\n
\n\n Careful! Template is subject to malicious code. Don\'t copy/paste untrusted\n content.\n'}),define("text!html/settingsShortcutsExtensionTooltip.html",[],function(){return'You can create expanding macros like this:\n
\n
\n\'- - > space\': function() {\n
\n expand(\'--> \', \'→ \');\n
\n}\n
\n
\nMore\n info\n
\n
\n Careful! This is subject to malicious code. Don\'t copy/paste untrusted content.\n'}),define("text!html/settingsUserCustomExtensionTooltip.html",[],function(){return'Extension variable name:\nuserCustom\n
\n
\nExample:\n
\nuserCustom.onPreviewFinished = function() {\n
\n eventMgr.onMessage("Finished!");\n
\n};\n
\n
\nMore\n info\n
\n
\n Careful! This is subject to malicious code. Don\'t copy/paste untrusted content.'}),function(){function e(){}function t(e){this.buttonBar=d.getElementById("wmd-button-bar"+e),this.preview=d.getElementById("wmd-preview"+e),this.input=d.getElementById("wmd-input"+e)}function n(e,t){var n,r,o,a=this,s=[],c=0,u="none",d=function(e,t){u!=e&&(u=e,t||f()),m.isIE&&"moving"==u?o=null:r=setTimeout(p,1)},p=function(e){o=new i(t,e),r=void 0};this.setCommandMode=function(){u="command",f(),r=setTimeout(p,0)},this.canUndo=function(){return c>1},this.canRedo=function(){return s[c+1]?!0:!1},this.undo=function(){a.canUndo()&&(n?(n.restore(),n=null):(s[c]=new i(t),s[--c].restore(),e&&e())),u="none",t.input.focus(),p()},this.redo=function(){a.canRedo()&&(s[++c].restore(),e&&e()),u="none",t.input.focus(),p()};var f=function(){var r=o||new i(t);return r?"moving"==u?(n||(n=r),void 0):(n&&(s[c-1].text!=n.text&&(s[c++]=n),n=null),s[c++]=r,s[c+1]=null,e&&e(),void 0):!1},h=function(e){if(!e.ctrlKey&&!e.metaKey){var t=e.keyCode;t>=33&&40>=t||t>=63232&&63235>=t?d("moving"):8==t||46==t||127==t?d("deleting"):13==t?d("newlines"):27==t?d("escape"):(16>t||t>20)&&91!=t&&d("typing")}},g=function(){l.addEvent(t.input,"keypress",function(e){!e.ctrlKey&&!e.metaKey||e.altKey||89!=e.keyCode&&90!=e.keyCode||e.preventDefault()});var e=function(){(m.isIE||o&&o.text!=t.input.value)&&void 0==r&&(u="paste",f(),p())};l.addEvent(t.input,"keydown",h),l.addEvent(t.input,"mousedown",function(){d("moving")}),t.input.onpaste=e,t.input.ondrop=e},v=function(){g(),p(!0)};this.reinit=function(e,t,i,a){s=[],c=0,u="none",n=void 0,r=void 0,p(),o.text=e,o.start=t,o.end=i,o.scrollTop=a,o.setInputAreaSelection(),f()},this.setMode=d,v()}function i(t){var n=this,i=t.input;this.init=function(){l.isVisible(i)&&(this.setInputAreaSelectionStartEnd(),this.scrollTop=i.scrollTop,(!this.text&&i.selectionStart||0===i.selectionStart)&&(this.text=i.value))},this.setInputAreaSelection=function(){l.isVisible(i)&&(i.focus(),i.selectionStart=n.start,i.selectionEnd=n.end,i.scrollTop=n.scrollTop)},this.setInputAreaSelectionStartEnd=function(){n.start=i.selectionStart,n.end=i.selectionEnd},this.restore=function(){void 0!=n.text&&n.text!=i.value&&(i.value=n.text),this.setInputAreaSelection(),setTimeout(function(){i.scrollTop=n.scrollTop},0)},this.getChunks=function(){var t=new e;return t.before=l.fixEolChars(n.text.substring(0,n.start)),t.startTag="",t.selection=l.fixEolChars(n.text.substring(n.start,n.end)),t.endTag="",t.after=l.fixEolChars(n.text.substring(n.end)),t.scrollTop=n.scrollTop,t},this.setChunks=function(e){e.before=e.before+e.startTag,e.after=e.endTag+e.after,this.start=e.before.length,this.end=e.before.length+e.selection.length,this.text=e.before+e.selection+e.after,this.scrollTop=e.scrollTop},this.init()}function r(e,t,n){var i,r,o,a=3e3,s="manual",c=function(e,t){l.addEvent(e,"input",t),e.onpaste=t,e.ondrop=t,l.addEvent(e,"keypress",t),l.addEvent(e,"keydown",t)},u=function(){if(t.preview){var n=t.input.value;if(!n||n!=o){o=n;var i=(new Date).getTime();n=e.makeHtml(n);var a=(new Date).getTime();r=a-i,g(n)}}},d=function(){if(i&&(clearTimeout(i),i=void 0),"manual"!==s){var e=0;"delayed"===s&&(e=r),e>a&&(e=a),i=setTimeout(u,e)}};this.refresh=function(e){e?(o="",u()):d()},this.processingTime=function(){return r};var p,f=function(e){var n=t.preview,i=n.parentNode,r=n.nextSibling;i.removeChild(n),n.innerHTML=e,r?i.insertBefore(n,r):i.appendChild(n)},h=function(e){t.preview.innerHTML=e},m=function(e){if(p)return p(e);try{h(e),p=h}catch(t){p=f,p(e)}},g=function(e){t.preview&&(m(e),n())},v=function(){c(t.input,d),t.preview&&(t.preview.scrollTop=0)};v()}function o(e,t,n,r,o,a,s){function l(e){f.focus();var o="wmd-link-button"==e.id||"wmd-image-button"==e.id;if(e.textOp){n&&!o&&n.setCommandMode();var a=new i(t);if(!a)return;var s=a.getChunks(),l=function(){f.focus(),s&&a.setChunks(s),a.restore(),r.refresh()},c=e.textOp(s,l);c||l()}e.execute&&e.execute(n)}function c(e,n){var i="0px",r="-20px",o="-40px",a=e.getElementsByTagName("span")[0];n?(a.style.backgroundPosition=e.XShift+" "+i,e.onmouseover=function(){a.style.backgroundPosition=this.XShift+" "+o},e.onmouseout=function(){a.style.backgroundPosition=this.XShift+" "+i},m.isIE&&(e.onmousedown=function(){t.ieCachedRange=document.selection.createRange(),t.ieCachedScrollTop=t.input.scrollTop}),e.isHelp||(e.onclick=function(){return this.onmouseout&&this.onmouseout(),l(this),!1}),e.className=e.className.replace(/ disabled/g,"")):(a.style.backgroundPosition=e.XShift+" "+r,e.onmouseover=e.onmouseout=e.onclick=function(){},e.className+=" disabled")}function u(e){return"string"==typeof e&&(e=o[e]),function(){e.apply(o,arguments)}}function d(){var n=t.buttonBar,i=document.createElement("ul");i.id="wmd-button-row"+e,i.className="wmd-button-row",i=n.appendChild(i);var r=0,o=function(t,n,o,a){var s=document.createElement("li");s.className="wmd-button",s.style.left=r+"px",r+=25;var l=document.createElement("span");return s.id=t+e,s.appendChild(l),s.title=n,s.XShift=o,a&&(s.textOp=a),c(s,!0),i.appendChild(s),s},l=function(t){var n=document.createElement("li");n.className="wmd-spacer wmd-spacer"+t,n.id="wmd-spacer"+t+e,i.appendChild(n),r+=25};if(h.bold=o("wmd-bold-button",s("bold"),"0px",u("doBold")),h.italic=o("wmd-italic-button",s("italic"),"-20px",u("doItalic")),l(1),h.link=o("wmd-link-button",s("link"),"-40px",u(function(e,t){return this.doLinkOrImage(e,t,!1)})),h.quote=o("wmd-quote-button",s("quote"),"-60px",u("doBlockquote")),h.code=o("wmd-code-button",s("code"),"-80px",u("doCode")),h.image=o("wmd-image-button",s("image"),"-100px",u(function(e,t){return this.doLinkOrImage(e,t,!0)})),l(2),h.olist=o("wmd-olist-button",s("olist"),"-120px",u(function(e,t){this.doList(e,t,!0)})),h.ulist=o("wmd-ulist-button",s("ulist"),"-140px",u(function(e,t){this.doList(e,t,!1)})),h.heading=o("wmd-heading-button",s("heading"),"-160px",u("doHeading")),h.hr=o("wmd-hr-button",s("hr"),"-180px",u("doHorizontalRule")),l(3),h.undo=o("wmd-undo-button",s("undo"),"-200px",null),h.undo.execute=function(e){e&&e.undo()},h.redo=o("wmd-redo-button",s("redo"),"-220px",null),h.redo.execute=function(e){e&&e.redo()},a){var d=document.createElement("li"),f=document.createElement("span");d.appendChild(f),d.className="wmd-button wmd-help-button",d.id="wmd-help-button"+e,d.XShift="-240px",d.isHelp=!0,d.style.right="0px",d.title=s("help"),d.onclick=a.handler,c(d,!0),i.appendChild(d),h.help=d}p()}function p(){n&&(c(h.undo,n.canUndo()),c(h.redo,n.canRedo()))}var f=t.input,h={};d();var g="keydown";m.isOpera&&(g="keypress"),this.setUndoRedoButtonStates=p,this.buttons=h,this.doClick=l}function a(e,t){this.hooks=e,this.getString=t}function s(e){return e.replace(/^\s*(.*?)(?:\s+"(.+)")?\s*$/,function(e,t,n){return t=t.replace(/\?.*$/,function(e){return e.replace(/\+/g," ")}),t=decodeURIComponent(t),t=encodeURI(t).replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29"),t=t.replace(/\?.*$/,function(e){return e.replace(/\+/g,"%2b")}),n&&(n=n.trim?n.trim():n.replace(/^\s*/,"").replace(/\s*$/,""),n=n.replace(/"/g,"quot;").replace(/\(/g,"(").replace(/\)/g,")").replace(//g,">")),n?t+' "'+n+'"':t})}var l={},c={},u={},d=window.document,p=window.RegExp,f=window.navigator,h={lineLength:72},m={isIE:/msie/.test(f.userAgent.toLowerCase()),isIE_5or6:/msie 6/.test(f.userAgent.toLowerCase())||/msie 5/.test(f.userAgent.toLowerCase()),isOpera:/opera/.test(f.userAgent.toLowerCase())},g={bold:"Strong Ctrl/Cmd+B",boldexample:"strong text",italic:"Emphasis Ctrl/Cmd+I",italicexample:"emphasized text",link:"Hyperlink Ctrl/Cmd+L",linkdescription:"enter link description here",linkdialog:'Insert Hyperlink
http://example.com/ "optional title"
',quote:"BlockquoteCtrl/Cmd+Q",quoteexample:"Blockquote",code:"Code Sample"),e=e.replace(/(\*|_)(?=\S)(.+?)(?=\S)\1/g,"$2")}};n.setOptions(r),M=new Markdown.Editor(n,void 0,{undoManager:i.undoMgr}),M.hooks.set("insertLinkDialog",function(t){return T.insertLinkCallback=t,a.resetModalInputs(),e(".modal-insert-link").modal(),!0}),M.hooks.set("insertImageDialog",function(t){return T.insertLinkCallback=t,T.catchModal?!0:(a.resetModalInputs(),e(".modal-insert-image").modal(),!0)}),c.onPagedownConfigure(M),M.hooks.chain("onPreviewRefresh",c.onAsyncPreview),M.run(),i.undoMgr.init(),e(".wmd-button-row li").addClass("btn btn-success").css("left",0).find("span").hide();var o=e(".wmd-button-group1");e("#wmd-bold-button").append(e('')).appendTo(o),e("#wmd-italic-button").append(e('')).appendTo(o),o=e(".wmd-button-group2"),e("#wmd-link-button").append(e('')).appendTo(o),e("#wmd-quote-button").append(e('')).appendTo(o),e("#wmd-code-button").append(e('')).appendTo(o),e("#wmd-image-button").append(e('')).appendTo(o),o=e(".wmd-button-group3"),e("#wmd-olist-button").append(e('')).appendTo(o),e("#wmd-ulist-button").append(e('')).appendTo(o),e("#wmd-heading-button").append(e('')).appendTo(o),e("#wmd-hr-button").append(e('')).appendTo(o),o=e(".wmd-button-group5"),e("#wmd-undo-button").append(e('')).appendTo(o),e("#wmd-redo-button").append(e('')).appendTo(o)},T.onReady=function(){document.body.className+=" "+l.editMode,document.body.innerHTML=window.viewerMode===!0?d:u,a.init(),e(window).on("offline",T.setOffline),e(window).on("online",b),navigator.onLine===!1&&T.setOffline(),e(document).mousemove(m).keypress(m),r.init(),i.init(),S=window.setInterval(function(){a.updateCurrentTime(),v(),(g()===!0||window.viewerMode===!0)&&(c.onPeriodicRun(),y())},1e3),c.onReady()},c.addListener("onReady",function(){function n(e){if(e=e||"default",u!=e){var t="less!themes/"+e;-1!==window.baseDir.indexOf("-min")&&(t="css!themes/"+e),requirejs.undef(t),require([t]),u=e}}function r(n,i){t.each(document.querySelectorAll(n),function(t){var n=e(t);n.tooltip({html:!0,container:n.parents(".modal-content"),placement:"right",trigger:"manual",title:i}).click(function(){var t=this;m&&m[0]===t||a.defer(function(){e(document).on("click.close-tooltip",function(){m&&m.tooltip("hide"),m=void 0,e(document).off("click.close-tooltip")}),m=e(t).tooltip("show")})})})}e(".modal").on("shown.bs.modal",function(){var t=e(this);setTimeout(function(){t.find(".btn:first").focus(),t.find("button:first").focus(),t.find("input:enabled:visible:first").focus()},50)}).on("hidden.bs.modal",function(){i.focus(),n(window.theme)}).keyup(function(t){13!=t.which||e(t.target).is("textarea")||e(this).find(".modal-footer a:last").click()}),e(".action-insert-link").click(function(t){var n=a.getInputTextValue(e("#input-insert-link"),t);void 0!==n&&(T.insertLinkCallback(n),T.insertLinkCallback=void 0)}),e(".action-insert-image").click(function(t){var n=a.getInputTextValue(e("#input-insert-image"),t);void 0!==n&&(T.insertLinkCallback(n),T.insertLinkCallback=void 0)}),e(".modal-insert-link, .modal-insert-image").on("hidden.bs.modal",function(){void 0!==T.insertLinkCallback&&(T.insertLinkCallback(null),T.insertLinkCallback=void 0)}),e(".action-load-settings").click(function(){x()}),e(".action-apply-settings").click(function(e){w(e),e.isPropagationStopped()||window.location.reload()}),e(".action-add-google-drive-account").click(function(){3!==l.gdriveMultiAccount&&(l.gdriveMultiAccount++,s.settings=JSON.stringify(l),window.location.reload())});var u=window.theme;L=e("#input-settings-theme"),L.on("change",function(){n(this.value)}),e(".action-import-docs-settings").click(function(){e("#input-file-import-docs-settings").click()});var d;e("#input-file-import-docs-settings").change(function(n){var i=(n.dataTransfer||n.target).files;e(".modal-settings").modal("hide"),t.each(i,function(t){var n=new FileReader;n.onload=function(t){return function(n){try{d=JSON.parse(n.target.result);var i=parseInt(d.version.match(/^v(\d+)$/)[1],10),r=parseInt(s.version.match(/^v(\d+)$/)[1],10);i>r?c.onError("Incompatible version. Please upgrade StackEdit."):e(".modal-import-docs-settings").modal("show")}catch(o){c.onError("Wrong format: "+t.name)}e("#input-file-import-docs-settings").val("")}}(t),n.readAsText(t)})}),e(".action-import-docs-settings-confirm").click(function(){s.clear();var e=/^file\.|^folder\.|^publish\.|^settings$|^sync\.|^google\.|^author\.|^themeV3$|^version$/;t.each(d,function(t,n){e.test(n)&&(s[n]=t)}),window.location.reload()}),e(".action-export-docs-settings").click(function(){a.saveAs(JSON.stringify(s),"StackEdit local storage.json")}),e(".action-default-settings").click(function(){s.removeItem("settings"),s.removeItem("theme"),l.dropboxFullAccess||s.removeItem("dropbox.lastChangeId"),window.location.reload()}),e(".action-app-reset").click(function(){s.clear(),window.location.reload()}),e(".action-reset-input").click(function(){a.resetModalInputs()});var m;if(r(".tooltip-lazy-rendering","Disable preview rendering while typing in order to offload CPU. Refresh preview after 500 ms of inactivity."),r(".tooltip-default-content",["Thanks for supporting StackEdit by adding a backlink in your documents!Ctrl/Cmd+K",codeexample:"enter code here",image:"Image Ctrl/Cmd+G",imagedescription:"enter image description here",imagedialog:"
Insert Image
http://example.com/images/diagram.jpg \"optional title\"
",olist:"Numbered List
Need free image hosting?Ctrl/Cmd+O",ulist:"Bulleted List
Ctrl/Cmd+U",litem:"List item",heading:"Heading
/
Ctrl/Cmd+H",headingexample:"Heading",hr:"Horizontal Rule
Ctrl/Cmd+R",undo:"Undo - Ctrl/Cmd+Z",redo:"Redo - Ctrl/Cmd+Y",help:"Markdown Editing Help"},v="http://",b="http://";Markdown.Editor=function(e,i,s){s=s||{},"function"==typeof s.handler&&(s={helpButton:s}),s.strings=s.strings||{},s.helpButton&&(s.strings.help=s.strings.help||s.helpButton.title);var l=function(e){return s.strings[e]||g[e]};i=i||"";var c=this.hooks=new Markdown.HookCollection;c.addNoop("onPreviewRefresh"),c.addNoop("postBlockquoteCreation"),c.addFalse("insertImageDialog"),c.addFalse("insertLinkDialog"),this.getConverter=function(){return e};var u,p,f=this;this.run=function(){if(!u){u=new t(i);var h,m=new a(c,l),g=new r(e,u,function(){c.onPreviewRefresh()});s.undoManager?(p=s.undoManager,p.onButtonStateChange=function(){h.setUndoRedoButtonStates()},h&&h.setUndoRedoButtonStates()):/\?noundo/.test(d.location.href)||(p=new n(function(){g.refresh(),h&&h.setUndoRedoButtonStates()},u),this.textOperation=function(e){p.setCommandMode(),e(),f.refreshPreview()}),h=new o(i,u,p,g,m,s.helpButton,l),h.setUndoRedoButtonStates(),f.refreshPreview=function(){g.refresh(!0)},f.undoManager=p,f.uiManager=h}}},e.prototype.findTags=function(e,t){var n,i=this;e&&(n=l.extendRegExp(e,"","$"),this.before=this.before.replace(n,function(e){return i.startTag=i.startTag+e,""}),n=l.extendRegExp(e,"^",""),this.selection=this.selection.replace(n,function(e){return i.startTag=i.startTag+e,""})),t&&(n=l.extendRegExp(t,"","$"),this.selection=this.selection.replace(n,function(e){return i.endTag=e+i.endTag,""}),n=l.extendRegExp(t,"^",""),this.after=this.after.replace(n,function(e){return i.endTag=e+i.endTag,""}))},e.prototype.trimWhitespace=function(e){var t,n,i=this;e?t=n="":(t=function(e){return i.before+=e,""},n=function(e){return i.after=e+i.after,""}),this.selection=this.selection.replace(/^(\s*)/,t).replace(/(\s*)$/,n)},e.prototype.skipLines=function(e,t,n){void 0===e&&(e=1),void 0===t&&(t=1),e++,t++;var i,r;if(navigator.userAgent.match(/Chrome/)&&"X".match(/()./),this.selection=this.selection.replace(/(^\n*)/,""),this.startTag=this.startTag+p.$1,this.selection=this.selection.replace(/(\n*$)/,""),this.endTag=this.endTag+p.$1,this.startTag=this.startTag.replace(/(^\n*)/,""),this.before=this.before+p.$1,this.endTag=this.endTag.replace(/(\n*$)/,""),this.after=this.after+p.$1,this.before){for(i=r="";e--;)i+="\\n?",r+="\n";n&&(i="\\n*"),this.before=this.before.replace(new p(i+"$",""),r)}if(this.after){for(i=r="";t--;)i+="\\n?",r+="\n";n&&(i="\\n*"),this.after=this.after.replace(new p(i,""),r)}},l.isVisible=function(e){return window.getComputedStyle?"none"!==window.getComputedStyle(e,null).getPropertyValue("display"):e.currentStyle?"none"!==e.currentStyle.display:void 0},l.addEvent=function(e,t,n){e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener(t,n,!1)},l.removeEvent=function(e,t,n){e.detachEvent?e.detachEvent("on"+t,n):e.removeEventListener(t,n,!1)},l.fixEolChars=function(e){return e=e.replace(/\r\n/g,"\n"),e=e.replace(/\r/g,"\n")},l.extendRegExp=function(e,t,n){(null===t||void 0===t)&&(t=""),(null===n||void 0===n)&&(n="");var i,r=e.toString();return r=r.replace(/\/([gim]*)$/,function(e,t){return i=t,""}),r=r.replace(/(^\/|\/$)/g,""),r=t+r+n,new p(r,i)},c.getTop=function(e,t){var n=e.offsetTop;if(!t)for(;e=e.offsetParent;)n+=e.offsetTop;return n},c.getHeight=function(e){return e.offsetHeight||e.scrollHeight},c.getWidth=function(e){return e.offsetWidth||e.scrollWidth},c.getPageSize=function(){var e,t,n,i;self.innerHeight&&self.scrollMaxY?(e=d.body.scrollWidth,t=self.innerHeight+self.scrollMaxY):d.body.scrollHeight>d.body.offsetHeight?(e=d.body.scrollWidth,t=d.body.scrollHeight):(e=d.body.offsetWidth,t=d.body.offsetHeight),self.innerHeight?(n=self.innerWidth,i=self.innerHeight):d.documentElement&&d.documentElement.clientHeight?(n=d.documentElement.clientWidth,i=d.documentElement.clientHeight):d.body&&(n=d.body.clientWidth,i=d.body.clientHeight);var r=Math.max(e,n),o=Math.max(t,i);return[r,o,n,i]},u.createBackground=function(){var e=d.createElement("div"),t=e.style;e.className="wmd-prompt-background",t.position="absolute",t.top="0",t.zIndex="1000",m.isIE?t.filter="alpha(opacity=50)":t.opacity="0.5";var n=c.getPageSize();return t.height=n[1]+"px",m.isIE?(t.left=d.documentElement.scrollLeft,t.width=d.documentElement.clientWidth):(t.left="0",t.width="100%"),d.body.appendChild(e),e},u.prompt=function(e,t,n){var i,r;void 0===t&&(t="");var o=function(e){var t=e.charCode||e.keyCode;27===t&&a(!0)},a=function(e){l.removeEvent(d.body,"keydown",o);var t=r.value;return e?t=null:(t=t.replace(/^http:\/\/(https?|ftp):\/\//,"$1://"),/^(?:https?|ftp):\/\//.test(t)||(t="http://"+t)),i.parentNode.removeChild(i),n(t),!1},s=function(){i=d.createElement("div"),i.className="wmd-prompt-dialog",i.style.padding="10px;",i.style.position="fixed",i.style.width="400px",i.style.zIndex="1001";var n=d.createElement("div");n.innerHTML=e,n.style.padding="5px",i.appendChild(n);var s=d.createElement("form"),u=s.style;s.onsubmit=function(){return a(!1)},u.padding="0",u.margin="0",u.cssFloat="left",u.width="100%",u.textAlign="center",u.position="relative",i.appendChild(s),r=d.createElement("input"),r.type="text",r.value=t,u=r.style,u.display="block",u.width="80%",u.marginLeft=u.marginRight="auto",s.appendChild(r);var p=d.createElement("input");p.type="button",p.onclick=function(){return a(!1)},p.value="OK",u=p.style,u.margin="10px",u.display="inline",u.width="7em";var f=d.createElement("input");f.type="button",f.onclick=function(){return a(!0)},f.value="Cancel",u=f.style,u.margin="10px",u.display="inline",u.width="7em",s.appendChild(p),s.appendChild(f),l.addEvent(d.body,"keydown",o),i.style.top="50%",i.style.left="50%",i.style.display="block",m.isIE_5or6&&(i.style.position="absolute",i.style.top=d.documentElement.scrollTop+200+"px",i.style.left="50%"),d.body.appendChild(i),i.style.marginTop=-(c.getHeight(i)/2)+"px",i.style.marginLeft=-(c.getWidth(i)/2)+"px"};setTimeout(function(){s();var e=t.length;if(void 0!==r.selectionStart)r.selectionStart=0,r.selectionEnd=e;else if(r.createTextRange){var n=r.createTextRange();n.collapse(!1),n.moveStart("character",-e),n.moveEnd("character",e),n.select()}r.focus()},0)};var y=a.prototype;y.prefixes="(?:\\s{4,}|\\s*>|\\s*-\\s+|\\s*\\d+\\.|=|\\+|-|_|\\*|#|\\s*\\[[^\n]]+\\]:)",y.unwrap=function(e){var t=new p("([^\\n])\\n(?!(\\n|"+this.prefixes+"))","g");e.selection=e.selection.replace(t,"$1 $2")},y.wrap=function(e,t){this.unwrap(e);var n=new p("(.{1,"+t+"})( +|$\\n?)","gm"),i=this;e.selection=e.selection.replace(n,function(e,t){return new p("^"+i.prefixes,"").test(e)?e:t+"\n"}),e.selection=e.selection.replace(/\s+$/,"")},y.doBold=function(e,t){return this.doBorI(e,t,2,this.getString("boldexample"))},y.doItalic=function(e,t){return this.doBorI(e,t,1,this.getString("italicexample"))},y.doBorI=function(e,t,n,i){e.trimWhitespace(),e.selection=e.selection.replace(/\n{2,}/g,"\n");var r=/(\**$)/.exec(e.before)[0],o=/(^\**)/.exec(e.after)[0],a=Math.min(r.length,o.length);if(a>=n&&(2!=a||1!=n))e.before=e.before.replace(p("[*]{"+n+"}$",""),""),e.after=e.after.replace(p("^[*]{"+n+"}",""),"");else if(!e.selection&&o){e.after=e.after.replace(/^([*_]*)/,""),e.before=e.before.replace(/(\s?)$/,"");var s=p.$1;e.before=e.before+o+s}else{e.selection||o||(e.selection=i);var l=1>=n?"*":"**";e.before=e.before+l,e.after=l+e.after}},y.stripLinkDefs=function(e,t){return e=e.replace(/^[ ]{0,3}\[(\d+)\]:[ \t]*\n?[ \t]*(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|$)/gm,function(e,n,i,r,o){return t[n]=e.replace(/\s*$/,""),r?(t[n]=e.replace(/["(](.+?)[")]$/,""),r+o):""})},y.addLinkDef=function(e,t){var n=0,i={};e.before=this.stripLinkDefs(e.before,i),e.selection=this.stripLinkDefs(e.selection,i),e.after=this.stripLinkDefs(e.after,i);var r="",o=/(\[)((?:\[[^\]]*\]|[^\[\]])*)(\][ ]?(?:\n[ ]*)?\[)(\d+)(\])/g,a=function(e){n++,e=e.replace(/^[ ]{0,3}\[(\d+)\]:/," ["+n+"]:"),r+="\n"+e},s=function(e,t,r,l,c,u){return r=r.replace(o,s),i[c]?(a(i[c]),t+r+l+n+u):e};e.before=e.before.replace(o,s),t?a(t):e.selection=e.selection.replace(o,s);var l=n;return e.after=e.after.replace(o,s),e.after&&(e.after=e.after.replace(/\n*$/,"")),e.after||(e.selection=e.selection.replace(/\n*$/,"")),e.after+="\n\n"+r,l},y.doLinkOrImage=function(e,t,n){e.trimWhitespace(),e.findTags(/\s*!?\[/,/\][ ]?(?:\n[ ]*)?(\(.*?\))?/);var i;if(!(e.endTag.length>1&&e.startTag.length>0)){if(e.selection=e.startTag+e.selection+e.endTag,e.startTag=e.endTag="",/\n\n/.test(e.selection))return this.addLinkDef(e,null),void 0;var r=this,o=function(o){i.parentNode.removeChild(i),null!==o&&(e.selection=(" "+e.selection).replace(/([^\\](?:\\\\)*)(?=[[\]])/g,"$1\\").substr(1),e.startTag=n?"![":"[",e.endTag="]("+s(o)+")",e.selection||(e.selection=n?r.getString("imagedescription"):r.getString("linkdescription"))),t()};return i=u.createBackground(),n?this.hooks.insertImageDialog(o)||u.prompt(this.getString("imagedialog"),v,o):this.hooks.insertLinkDialog(o)||u.prompt(this.getString("linkdialog"),b,o),!0}e.startTag=e.startTag.replace(/!?\[/,""),e.endTag="",this.addLinkDef(e,null)},y.doAutoindent=function(e){var t=this,n=!1;e.before=e.before.replace(/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]*\n$/,"\n\n"),e.before=e.before.replace(/(\n|^)[ ]{0,3}>[ \t]*\n$/,"\n\n"),e.before=e.before.replace(/(\n|^)[ \t]+\n$/,"\n\n"),e.selection||/^[ \t]*(?:\n|$)/.test(e.after)||(e.after=e.after.replace(/^[^\n]*/,function(t){return e.selection=t,""}),n=!0),/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]+.*\n$/.test(e.before)&&t.doList&&t.doList(e),/(\n|^)[ ]{0,3}>[ \t]+.*\n$/.test(e.before)&&t.doBlockquote&&t.doBlockquote(e),/(\n|^)(\t|[ ]{4,}).*\n$/.test(e.before)&&t.doCode&&t.doCode(e),n&&(e.after=e.selection+e.after,e.selection="")},y.doBlockquote=function(e){e.selection=e.selection.replace(/^(\n*)([^\r]+?)(\n*)$/,function(t,n,i,r){return e.before+=n,e.after=r+e.after,i}),e.before=e.before.replace(/(>[ \t]*)$/,function(t,n){return e.selection=n+e.selection,""}),e.selection=e.selection.replace(/^(\s|>)+$/,""),e.selection=e.selection||this.getString("quoteexample");var t,n="",i="";if(e.before){for(var r=e.before.replace(/\n$/,"").split("\n"),o=!1,a=0;a0,/^>/.test(t)?(s=!0,!o&&t.length>1&&(o=!0)):s=/^[ \t]*$/.test(t)?!0:o,s?n+=t+"\n":(i+=n+t,n="\n")}/(^|\n)>/.test(n)||(i+=n,n="")}e.startTag=n,e.before=i,e.after&&(e.after=e.after.replace(/^\n?/,"\n")),e.after=e.after.replace(/^(((\n|^)(\n[ \t]*)*>(.+\n)*.*)+(\n[ \t]*)*)/,function(t){return e.endTag=t,""});var l=function(t){var n=t?"> ":"";e.startTag&&(e.startTag=e.startTag.replace(/\n((>|\s)*)\n$/,function(e,t){return"\n"+t.replace(/^[ ]{0,3}>?[ \t]*$/gm,n)+"\n"})),e.endTag&&(e.endTag=e.endTag.replace(/^\n((>|\s)*)\n/,function(e,t){return"\n"+t.replace(/^[ ]{0,3}>?[ \t]*$/gm,n)+"\n"}))};/^(?![ ]{0,3}>)/m.test(e.selection)?(this.wrap(e,h.lineLength-2),e.selection=e.selection.replace(/^/gm,"> "),l(!0),e.skipLines()):(e.selection=e.selection.replace(/^[ ]{0,3}> ?/gm,""),this.unwrap(e),l(!1),!/^(\n|^)[ ]{0,3}>/.test(e.selection)&&e.startTag&&(e.startTag=e.startTag.replace(/\n{0,2}$/,"\n\n")),!/(\n|^)[ ]{0,3}>.*$/.test(e.selection)&&e.endTag&&(e.endTag=e.endTag.replace(/^\n{0,2}/,"\n\n"))),e.selection=this.hooks.postBlockquoteCreation(e.selection),/\n/.test(e.selection)||(e.selection=e.selection.replace(/^(> *)/,function(t,n){return e.startTag+=n,""}))},y.doCode=function(e){var t=/\S[ ]*$/.test(e.before),n=/^[ ]*\S/.test(e.after);if(!n&&!t||/\n/.test(e.selection)){e.before=e.before.replace(/[ ]{4}$/,function(t){return e.selection=t+e.selection,""});var i=1,r=1;/(\n|^)(\t|[ ]{4,}).*\n$/.test(e.before)&&(i=0),/^\n(\t|[ ]{4,})/.test(e.after)&&(r=0),e.skipLines(i,r),e.selection?/^[ ]{0,3}\S/m.test(e.selection)?/\n/.test(e.selection)?e.selection=e.selection.replace(/^/gm," "):e.before+=" ":e.selection=e.selection.replace(/^(?:[ ]{4}|[ ]{0,3}\t)/gm,""):(e.startTag=" ",e.selection=this.getString("codeexample"))}else e.trimWhitespace(),e.findTags(/`/,/`/),e.startTag||e.endTag?e.endTag&&!e.startTag?(e.before+=e.endTag,e.endTag=""):e.startTag=e.endTag="":(e.startTag=e.endTag="`",e.selection||(e.selection=this.getString("codeexample")))},y.doList=function(e,t,n){var i=/(\n|^)(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*$/,r=/^\n*(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*/,o="-",a=1,s=function(){var e;return n?(e=" "+a+". ",a++):e=" "+o+" ",e},l=function(e){return void 0===n&&(n=/^\s*\d/.test(e)),e=e.replace(/^[ ]{0,3}([*+-]|\d+[.])\s/gm,function(){return s()})};if(e.findTags(/(\n|^)*[ ]{0,3}([*+-]|\d+[.])\s+/,null),!e.before||/\n$/.test(e.before)||/^\n/.test(e.startTag)||(e.before+=e.startTag,e.startTag=""),e.startTag){var c=/\d+[.]/.test(e.startTag);if(e.startTag="",e.selection=e.selection.replace(/\n[ ]{4}/g,"\n"),this.unwrap(e),e.skipLines(),c&&(e.after=e.after.replace(r,l)),n==c)return}var u=1;e.before=e.before.replace(i,function(e){return/^\s*([*+-])/.test(e)&&(o=p.$1),u=/[^\n]\n\n[^\n]/.test(e)?1:0,l(e)}),e.selection||(e.selection=this.getString("litem"));var d=s(),f=1;e.after=e.after.replace(r,function(e){return f=/[^\n]\n\n[^\n]/.test(e)?1:0,l(e)}),e.trimWhitespace(!0),e.skipLines(u,f,!0),e.startTag=d;var m=d.replace(/./g," ");this.wrap(e,h.lineLength-m.length),e.selection=e.selection.replace(/\n/g,"\n"+m)},y.doHeading=function(e){if(e.selection=e.selection.replace(/\s+/g," "),e.selection=e.selection.replace(/(^\s+|\s+$)/g,""),!e.selection)return e.startTag="## ",e.selection=this.getString("headingexample"),e.endTag=" ##",void 0;var t=0;e.findTags(/#+[ ]*/,/[ ]*#+/),/#+/.test(e.startTag)&&(t=p.lastMatch.length),e.startTag=e.endTag="",e.findTags(null,/\s?(-+|=+)/),/=+/.test(e.endTag)&&(t=1),/-+/.test(e.endTag)&&(t=2),e.startTag=e.endTag="",e.skipLines(1,1);var n=0==t?2:t-1;if(n>0){var i=n>=2?"-":"=",r=e.selection.length;for(r>h.lineLength&&(r=h.lineLength),e.endTag="\n";r--;)e.endTag+=i}},y.doHorizontalRule=function(e){e.startTag="----------\n",e.selection="",e.skipLines(2,1,!0)}}(),define("pagedown",function(){}),define("core",["jquery","underscore","crel","editor","layout","constants","utils","storage","settings","eventMgr","text!html/bodyIndex.html","text!html/bodyViewer.html","text!html/settingsTemplateTooltip.html","text!html/settingsShortcutsExtensionTooltip.html","text!html/settingsUserCustomExtensionTooltip.html","storage","pagedown"],function(e,t,n,i,r,o,a,s,l,c,u,d,p,f,h){function m(){E=!0,k=!0;var e=a.currentTime;e>I+1e3&&(I=e,c.onUserActive())}function g(){return a.currentTime-I>o.USER_IDLE_THRESHOLD&&(k=!1),k&&_}function v(){if(E!==!1&&_!==!1){void 0===C&&(C=a.randomString(),s.frontWindowId=C);var t=s.frontWindowId;t!=C&&(_=!1,void 0!==S&&clearInterval(S),e(".modal").modal("hide"),e(".modal-non-unique").modal("show"),window.close())}}function b(){D===!0&&(D=!1,c.onOfflineChanged(!1))}function y(){D===!0&&navigator.onLine===!0&&N+o.CHECK_ONLINE_PERIOD $2
",'NOTE: Backlinks in Stack Exchange Q/A are not welcome.'].join("")),r(".tooltip-shortcuts-extension",f),r(".tooltip-usercustom-extension",h),r(".tooltip-template",p),e("div.dropdown-menu").click(function(e){e.stopPropagation()}),e(".modal-non-unique").modal({backdrop:"static",keyboard:!1,show:!1}),t.each(document.querySelectorAll("img"),function(t){var n=e(t),i=n.data("stackeditSrc");i&&n.attr("src",window.baseDir+"/img/"+i)}),window.viewerMode===!1){var g=t.reduce(o.THEME_LIST,function(e,t,n){return e+'"},"");document.getElementById("input-settings-theme").innerHTML=g}}),T}),define("text!WELCOME.md",[],function(){return'Welcome to StackEdit! {#welcome}\n=====================\n\n\nHello, I am your first Markdown document within **StackEdit**[^stackedit]. Don\'t delete me, I can be helpful. I can be recovered anyway in the `Utils` tab of the `Settings` dialog.\n\n----------\n\n\nDocuments\n---------\n\n**StackEdit** stores your documents in your browser, which means all your documents are automatically saved locally and are accessible **offline!**\n\n> **NOTE:**\n> \n> - StackEdit is accessible offline after the application has been loaded for the first time.\n> - Your local documents are not shared between different browsers or computers.\n> - Clearing your browser\'s data may **delete all your local documents!** Make sure your documents are backed up using **Google Drive** or **Dropbox** synchronization (see [ Synchronization](#synchronization) section).\n\n#### Create a document\n\nYou can create a new document by clicking the button in the navigation bar. It will switch from the current document to the new one.\n\n#### Switch to another document\n\nYou can list all your local documents and switch from one to another by clicking the button in the navigation bar.\n\n#### Rename a document\n\nYou can rename the current document by clicking the document title in the navigation bar.\n\n#### Delete a document\n\nYou can delete the current document by clicking the button in the navigation bar.\n\n#### Save a document\n\nYou can save the current document to a file using the `Save as...` sub-menu from the menu.\n\n> **Tip:** See [ Publish a document](#publish-a-document) section for a description of the different output formats.\n\n\n----------\n\n\nSynchronization\n---------------\n\n**StackEdit** can be combined with **Google Drive** and **Dropbox** to have your documents centralized in the *Cloud*. The synchronization mechanism will take care of uploading your modifications or downloading the latest version of your documents.\n\n> **NOTE:**\n> \n> - Full access to **Google Drive** or **Dropbox** is required to be able to import any document in StackEdit.\n> - Imported documents are downloaded in your browser and are not transmitted to a server.\n> - If you experience problems exporting documents to Google Drive, check and optionally disable browser extensions, such as Disconnect.\n\n#### Import a document\n\nYou can import a document from the *Cloud* by going to the `Google Drive` or the `Dropbox` sub-menu and by clicking `Import from...`. Once imported, your document will be automatically synchronized with the **Google Drive** / **Dropbox** file.\n\n#### Export a document\n\nYou can export any document by going to the `Google Drive` or the `Dropbox` sub-menu and by clicking `Export to...`. Even if your document is already synchronized with **Google Drive** or **Dropbox**, you can export it to a another location. **StackEdit** can synchronize one document with multiple locations.\n\n> **Tip:** Using **Google Drive**, you can create collaborative documents to work in real time with other users. Just check the box `Create a real time collaborative document` in the dialog options when exporting to Google Drive.\n\n#### Synchronize a document\n\nOnce your document is linked to a **Google Drive** or a **Dropbox** file, **StackEdit** will periodically (every 3 minutes) synchronize it by downloading/uploading any modification. Any conflict will be detected, and a local copy of your document will be created as a backup if necessary.\n\nIf you just have modified your document and you want to force the synchronization, click the button in the navigation bar.\n\n> **NOTE:** The button is disabled when you have no document to synchronize.\n\n#### Manage document synchronization\n\nSince one document can be synchronized with multiple locations, you can list and manage synchronized locations by clicking `Manage synchronization` in the menu. This will open a dialog box allowing you to add or remove synchronization links that are associated to your document.\n\n> **NOTE:** If you delete the file from **Google Drive** or from **Dropbox**, the document will no longer be synchronized with that location.\n\n----------\n\n\nPublication\n-----------\n\nOnce you are happy with your document, you can publish it on different websites directly from **StackEdit**. As for now, **StackEdit** can publish on **Blogger**, **Dropbox**, **Gist**, **GitHub**, **Google Drive**, **Tumblr**, **WordPress** and on any SSH server.\n\n#### Publish a document\n\nYou can publish your document by going to the `Publish on` sub-menu and by choosing a website. In the dialog box, you can choose the publication format:\n\n- Markdown, to publish the Markdown text on a website that can interpret it (**GitHub** for instance),\n- HTML, to publish the document converted into HTML (on a blog for instance),\n- Template, to have a full control of the output.\n\n> **NOTE:** The default template is a simple webpage wrapping your document in HTML format. You can customize it in the `Services` tab of the `Settings` dialog.\n\n#### Update a publication\n\nAfter publishing, **StackEdit** will keep your document linked to that publish location so that you can update it easily. Once you have modified your document and you want to update your publication, click on the button in the navigation bar.\n\n> **NOTE:** The button is disabled when the document has not been published yet.\n\n#### Manage document publication\n\nSince one document can be published on multiple locations, you can list and manage publish locations by clicking `Manage publication` in the menu. This will open a dialog box allowing you to remove publication links that are associated to your document.\n\n> **NOTE:** In some cases, if the file has been removed from the website or the blog, the document will no longer be published on that location.\n\n----------\n\n\nMarkdown Extra\n--------------\n\n**StackEdit** supports **Markdown Extra**, which extends **Markdown** syntax with some nice features.\n\n> **Tip:** You can disable any **Markdown Extra** feature in the `Extensions` tab of the `Settings` dialog.\n\n\n### Tables\n\n**Markdown Extra** has a special syntax for tables:\n\nItem | Value\n--------- | -----\nComputer | 1600 USD\nPhone | 12 USD\nPipe | 1 USD\n\nYou can specify column alignment with one or two colons:\n\n| Item | Value | Qty |\n| :-------- | --------:| :--: |\n| Computer | 1600 USD | 5 |\n| Phone | 12 USD | 12 |\n| Pipe | 1 USD | 234 |\n\n\n### Definition Lists\n\n**Markdown Extra** has a special syntax for definition lists too:\n\nTerm 1\nTerm 2\n: Definition A\n: Definition B\n\nTerm 3\n\n: Definition C\n\n: Definition D\n\n > part of definition D\n\n\n### Fenced code blocks\n\nGitHub\'s fenced code blocks[^gfm] are also supported with **Prettify** syntax highlighting:\n\n```\n// Foo\nvar bar = 0;\n```\n\n> **Tip:** To use **Highlight.js** instead of **Prettify**, just configure the `Markdown Extra` extension in the `Settings` dialog.\n\n\n### Footnotes\n\nYou can create footnotes like this[^footnote].\n\n [^footnote]: Here is the *text* of the **footnote**.\n\n\n### SmartyPants\n\nSmartyPants converts ASCII punctuation characters into "smart" typographic punctuation HTML entities. For example:\n\n| | ASCII | HTML |\n ------------------|------------------------------------------|-------------------------------------\n| Single backticks | `\'Isn\'t this fun?\'` | ‘Isn’t this fun?’ |\n| Quotes | `"Isn\'t this fun?"` | “Isn’t this fun?” |\n| Dashes | `-- is an en-dash and --- is an em-dash` | – is an en-dash and — is an em-dash |\n\n\n### Table of contents\n\nYou can insert a table of contents using the marker `[TOC]`:\n\n[TOC]\n\n\n### Comments\n\nUsually, comments in Markdown are just standard HTML comments. \n**StackEdit** extends HTML comments in order to produce useful, highlighted comments in the preview but not in your exported documents. \n\n\n### MathJax\n \nYou can render *LaTeX* mathematical expressions using **MathJax**, as on [math.stackexchange.com][1]:\n\nThe *Gamma function* satisfying $\\Gamma(n) = (n-1)!\\quad\\forall\nn\\in\\mathbb N$ is via the Euler integral\n\n$$\n\\Gamma(z) = \\int_0^\\infty t^{z-1}e^{-t}dt\\,.\n$$\n\n> **Tip:** Make sure you include MathJax into your publications to render mathematical expression correctly. Your page/template should include something like: \n\n```\n\n```\n\n> **NOTE:** You can find more information:\n>\n> - about **Markdown** syntax [here][2],\n> - about **Markdown Extra** extension [here][3],\n> - about **LaTeX** mathematical expressions [here][4],\n> - about **Prettify** syntax highlighting [here][5],\n> - about **Highlight.js** syntax highlighting [here][6].\n\n [^stackedit]: [StackEdit](https://stackedit.io/) is a full-featured, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.\n\n [^gfm]: **GitHub Flavored Markdown** (GFM) is supported by StackEdit.\n\n\n [1]: http://math.stackexchange.com/\n [2]: http://daringfireball.net/projects/markdown/syntax "Markdown"\n [3]: https://github.com/jmcmanus/pagedown-extra "Pagedown Extra"\n [4]: http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference\n [5]: https://code.google.com/p/google-code-prettify/\n [6]: http://highlightjs.org/'}),define("fileMgr",["jquery","underscore","constants","core","utils","storage","settings","eventMgr","fileSystem","classes/FileDescriptor","text!WELCOME.md"],function(e,t,n,i,r,o,a,s,l,c,u){var d={};return d.currentFile=void 0,d.selectFile=function(r){if(r=r||d.currentFile,void 0===r){var o=t.size(l);r=0===o?d.createFile(n.WELCOME_DOCUMENT_TITLE,u):t.max(l,function(e){return e.selectTime||0})}d.currentFile!==r&&(d.currentFile=r,r.selectTime=(new Date).getTime(),s.onFileSelected(r),e(".action-edit-document").toggleClass("hide",r.fileIndex!=n.TEMPORARY_FILE_INDEX)),i.initEditor(r)},d.createFile=function(e,i,u,d,p){if(i=void 0!==i?i:a.defaultContent,!e){e=n.DEFAULT_FILE_TITLE;for(var f=2,h=function(t){return t.title==e};t.some(l,h);)e=n.DEFAULT_FILE_TITLE+f++}var m=n.TEMPORARY_FILE_INDEX;if(!p)do m="file."+r.randomString();while(t.has(l,m));d=d||{};var g=t.reduce(d,function(e,t){return r.storeAttributes(t),e+t.syncIndex+";"},";");o[m+".title"]=e,o[m+".content"]=i,o[m+".sync"]=g,o[m+".publish"]=";";var v=new c(m,e,d);return u&&(v.discussionListJSON=u),p||(r.appendIndexToArray("file.list",m),l[m]=v,s.onFileCreated(v)),v},d.deleteFile=function(e){e=e||d.currentFile,e.folder&&(e.folder.removeFile(e),s.onFoldersChanged()),r.removeIndexFromArray("file.list",e.fileIndex),delete l[e.fileIndex],d.currentFile===e&&(d.currentFile=void 0,d.selectFile()),s.onFileDeleted(e)},d.getFileFromSyncIndex=function(e){return t.find(l,function(n){return t.has(n.syncLocations,e)})},d.getFileFromPublishIndex=function(e){return t.find(l,function(n){return t.has(n.publishLocations,e)})},s.addListener("onReady",function(){function t(){o.addClass("hide"),r.removeClass("hide");var t=e.trim(o.val()),n=d.currentFile;t&&t!=n.title&&(n.title=t,s.onTitleChanged(n)),o.val(n.title),i.focus()}var i=e("#wmd-input");d.selectFile();var r=e(".file-title-navbar"),o=e(".input-file-title");e(".action-create-file").click(function(){setTimeout(function(){var e=d.createFile();d.selectFile(e),r.click()},400)}),e(".action-remove-file-confirm").click(function(){e(".modal-remove-file-confirm").modal("show")}),e(".action-remove-file").click(function(){d.deleteFile()}),r.click(function(){if(window.viewerMode!==!0){r.addClass("hide");var e=o.removeClass("hide");setTimeout(function(){e.focus().get(0).select()},10)}}),o.blur(function(){t()}).keyup(function(e){13==e.keyCode&&t(),27==e.keyCode&&(o.val(""),t())}),e(".action-open-stackedit").click(function(){window.location.href="."}),e(".action-edit-document").click(function(){var e=i.val(),t=d.currentFile.title,n=d.createFile(t,e);d.selectFile(n),window.location.href="."}),e(".action-welcome-file").click(function(){var e=d.createFile(n.WELCOME_DOCUMENT_TITLE,u);d.selectFile(e)})}),s.onFileMgrCreated(d),d}),define("classes/Provider",["underscore","utils","settings","eventMgr","fileMgr","editor","diff_match_patch_uncompressed","jsondiffpatch"],function(e,t,n,i,r,o,a,s){function l(e,t){this.providerId=e,this.providerName=t,this.isPublishEnabled=!0}l.prototype.parseDiscussionList=function(t){try{var n=JSON.parse(t);return e.each(n,function(t,n){if(t.discussionIndex!=n||!e.isNumber(t.selectionStart)||!e.isNumber(t.selectionEnd))throw"invalid";t.commentList&&t.commentList.forEach(function(t){if(t.author&&!e.isString(t.author)||!e.isString(t.content))throw"invalid"})}),n}catch(i){}},l.prototype.serializeContent=function(e,t){return t.length>2?e+"":e},l.prototype.parseContent=function(e){var t,n="{}",i=/$/.exec(e);return i&&(t=this.parseDiscussionList(i[1]))&&(e=e.substring(0,i.index),n=i[1]),{content:e,discussionList:t||{},discussionListJSON:n}};var c=new a;c.Match_Threshold=0,c.Patch_DeleteThreshold=0;var u=s.create({objectHash:function(e){return JSON.stringify(e)},textDiff:{minLength:9999999}}),d="merge"==n.conflictMode;return l.prototype.syncMerge=function(n,a,s,l,p,f){function h(e){function t(){(i[1]||r[1])&&(i[1]&&r[1]?(i[1]="⧸⧸"+i[1]+"⧸⧸",r[1]+="⧸⧸",n.push(i),n.push(r)):n.push([0,i[1]+r[1]]),i=[-1,""],r=[1,""])}var n=[],i=[-1,""],r=[1,""],o=20;return e.forEach(function(a,s){function l(){return 0===s||s===e.length-1}var c=a[0],u=a[1];if(0===c)if(l()||u.length>o){if(i[1]||r[1]){var d=/\s/.exec(u);if(d){var p=d.index,f=u.substring(0,p);u=u.substring(p),i[1]+=f,r[1]+=f}}if(u){for(var h=u.length;h&&/\S/.test(u[h-1]);)h--;var m=u.substring(h);u=u.substring(0,h),l()||u.length>o?(t(),n.push([0,u])):(i[1]+=u,r[1]+=u),i[1]+=m,r[1]+=m}}else i[1]+=u,r[1]+=u;else-1===c?i[1]+=u:1===c&&(r[1]+=u)}),i[1]==r[1]?n.push([0,r[1]]):t(),n}var m=n.content,g=n.title,v=n.discussionListJSON,b=n.discussionList,y=t.crc32(m),x=t.crc32(g),w=t.crc32(v),S=t.crc32(s),C=t.crc32(l),T=t.crc32(f),E=a.contentCRC!=y,k=a.contentCRC!=S,_=m!=s&&k,I=_&&E;a.titleCRC=a.titleCRC||x;var D,N,L=a.titleCRC!=x,M=a.titleCRC!=C,A=g!=l&&M,R=A&&L,P=a.discussionListCRC!=w,F=a.discussionListCRC!=T,O=v!=f&&F,B=O&&P,j=[],$=s,G=l,q=p,H=!1,U=!1,z=!1;if(!d&&(I||R||B)||I&&void 0===a.content||R&&void 0===a.title||B&&void 0===a.discussionList)r.createFile(g+" (backup)",m,v),i.onMessage('Conflict detected on "'+g+'". A backup has been created locally.');else{if(I){var V=a.content;D=c.diff_main(V,m),c.diff_cleanupSemantic(D),N=c.patch_make(V,D);var W=c.patch_apply(N,s);if($=W[0],!W[1].every(e.identity)){D=c.diff_main(m,$),D=h(D),$="";var Q;D.forEach(function(e){var t=e[0],n=e[1];0===t||Q?0===t&&Q&&(Q.selectionEnd=$.length,j.push(Q),Q=void 0):Q={selectionStart:$.length,type:"conflict"},$+=n}),Q&&(Q.selectionEnd=$.length,j.push(Q))}}_&&(P&&(H=!0),F?U=!0:(H=!0,q=b)),B&&(z=!0),R&&(N=c.patch_make(a.title,g),G=c.patch_apply(N,l)[0])}var X;if(_){var K=[];r.currentFile===n&&(X={selectionStart:o.selectionMgr.selectionStart,selectionEnd:o.selectionMgr.selectionEnd},K.push(X),n.newDiscussion&&K.push(n.newDiscussion)),H&&(K=K.concat(e.values(b))),O|=o.adjustCommentOffsets(m,$,K)}if(U){var J=e.values(p);o.adjustCommentOffsets(s,$,J)}if(z){var Y=JSON.parse(a.discussionList);D=u.diff(Y,b),u.patch(p,D),e.each(p,function(e,t){e||delete p[t]})}return j.length&&(O=!0,j.forEach(function(n){var i;do i=t.randomString()+t.randomString();while(e.has(q,i));n.discussionIndex=i,q[i]=n})),A&&(n.title=G,i.onTitleChanged(n),i.onMessage('"'+g+'" has been renamed to "'+G+'" on '+this.providerName+".")),(_||O)&&o.watcher.noWatch(e.bind(function(){if(_&&(r.currentFile===n&&(o.setValueNoWatch($),X&&o.selectionMgr.setSelectionStartEnd(X.selectionStart,X.selectionEnd)),n.content=$,i.onContentChanged(n,$)),O){n.discussionList=q;var t=u.diff(b,q),a=!1;e.each(t,function(t,r){e.isArray(t)?1===t.length?i.onDiscussionCreated(n,q[r]):i.onDiscussionRemoved(n,b[r]):a=!0}),a&&i.onCommentsChanged(n)}o.undoMgr.currentMode="sync",o.undoMgr.saveState(),i.onMessage('"'+l+'" has been updated from '+this.providerName+"."),j.length&&i.onMessage('"'+l+'" has conflicts that you have to review.')},this)),{contentCRC:S,titleCRC:C,discussionListCRC:T}},l}),define("classes/AsyncTask",["underscore","constants","utils","eventMgr"],function(e,t,n,i){function r(e){this.finished=!1,this.timeout=t.ASYNC_TASK_DEFAULT_TIMEOUT,this.retryCounter=0,this.runCallbacks=[],this.successCallbacks=[],this.errorCallbacks=[],this.force=e}function o(){if(c===!0)return l+u.timeout=t)return this.error(e),void 0;var i=1e3*Math.pow(2,this.retryCounter++);l=n.currentTime+i,c=!1,o()}},r.prototype.enqueue=function(){s.push(this),o()};var u,d=!1,p=!1;return i.addListener("onUserActive",function(){p=!0}),i.addListener("onPeriodicRun",o),r}),define("helpers/dropboxHelper",["jquery","underscore","constants","core","utils","storage","logger","settings","eventMgr","classes/AsyncTask"],function(e,t,n,i,r,o,a,s,l,c){function u(t){t.onRun(function(){return v===!0?(h=void 0,t.error(new Error("Operation not available in offline mode.|stopPublish")),void 0):void 0!==h?(t.chain(),void 0):(e.ajax({url:"libs/dropbox.min.js",dataType:"script",timeout:n.AJAX_TIMEOUT}).done(function(){h=new Dropbox.Client({key:s.dropboxFullAccess===!0?n.DROPBOX_APP_KEY:n.DROPBOX_RESTRICTED_APP_KEY,secret:s.dropboxFullAccess===!0?n.DROPBOX_APP_SECRET:n.DROPBOX_RESTRICTED_APP_SECRET}),h.authDriver(new Dropbox.AuthDriver.Popup({receiverUrl:n.BASE_URL+"html/dropbox-oauth-receiver.html",rememberUser:!0})),t.chain()}).fail(function(e){var n={status:e.status,responseText:e.statusText};p(n,t)}),void 0)})}function d(e){e.onRun(function(){function t(){r.redirectConfirm("You are being redirected to Dropbox authorization page.",function(){e.chain(i)},function(){e.error(new Error("Operation canceled."))})}function i(){o===!1?e.timeout=n.ASYNC_TASK_LONG_TIMEOUT:h.reset(),h.authenticate({interactive:!o},function(n,i){return i.isAuthenticated()===!0?(m=!0,e.chain(),void 0):o===!0?(o=!1,e.chain(t),void 0):(e.error(new Error("Access to Dropbox account is not authorized.")),void 0)})}if(m===!0)return e.chain(),void 0;var o=!0;e.chain(i)})}function p(e,n){var r=!0;if(e)if(a.error(e),"string"==typeof e)r=e;else{if(r="Dropbox error ("+e.status+": "+e.responseText+").",401===e.status||403===e.status)return m=!1,r="Access to Dropbox account is not authorized.",n.retry(new Error(r),1),void 0;if(400===e.status&&-1!==e.responseText.indexOf("oauth_nonce"))return t.each(t.keys(o),function(e){0===e.indexOf("dropbox-auth")&&o.removeItem(e)}),m=!1,n.retry(new Error(r),1),void 0;e.status<=0&&(h=void 0,m=!1,i.setOffline(),r="|stopPublish")}n.error(new Error(r))}function f(t){t.onRun(function(){function i(){r.redirectConfirm("You are being redirected to Dropbox Chooser page.",function(){t.chain()},function(){t.error(new Error("Operation canceled."))})}return b===!0?(t.chain(),void 0):(e.ajax({url:"https://www.dropbox.com/static/api/1/dropbox.js",dataType:"script",timeout:n.AJAX_TIMEOUT}).done(function(){b=!0,t.chain(i)}).fail(function(e){var n={status:e.status,responseText:e.statusText};p(n,t)}),void 0)})}var h,m=!1,g={},v=!1;l.addListener("onOfflineChanged",function(e){v=e}),g.upload=function(e,t,n){var i,r=new c;u(r),d(r),r.onRun(function(){h.writeFile(e,t,function(t,n){return t?(400===t.status&&(t='Could not upload document into path "'+e+'".'),p(t,r),void 0):(i=n,r.chain(),void 0)})}),r.onSuccess(function(){n(void 0,i)}),r.onError(function(e){n(e)}),r.enqueue()},g.checkChanges=function(e,t){var n=[],i=e||0,r=new c;u(r),d(r),r.onRun(function(){function e(){h.pullChanges(i,function(t,o){return t?(p(t,r),void 0):(i=o.cursor(),void 0!==o.changes&&(n=n.concat(o.changes)),o.shouldPullAgain?r.chain(e):r.chain(),void 0)})}r.chain(e)}),r.onSuccess(function(){t(void 0,n,i)}),r.onError(function(e){t(e)}),r.enqueue()},g.downloadMetadata=function(e,t){var n=[],i=new c;u(i),d(i),i.onRun(function(){function t(){if(0===e.length)return i.chain(),void 0;var r=e[0];h.stat(r,function(r,o){return o?(n.push(o),e.shift(),i.chain(t),void 0):(p(r,i),void 0)})}i.chain(t)}),i.onSuccess(function(){t(void 0,n)}),i.onError(function(e){t(e)}),i.enqueue()},g.downloadContent=function(e,n){var i=[],r=new c;u(r),d(r),r.onRun(function(){function n(){if(0===e.length)return r.chain(),void 0;var o=e[0];i.push(o);var a;return o.isFile===!0?a=o:void 0!==o.wasRemoved&&(a=o.stat),a?(h.readFile(a.path,function(i,o){return t.isString(o)?(a.content=o,e.shift(),r.chain(n),void 0):(p(i,r),void 0)}),void 0):(e.shift(),r.chain(n),void 0)}r.chain(n)}),r.onSuccess(function(){n(void 0,i)}),r.onError(function(e){n(e)}),r.enqueue()};var b=!1;return g.picker=function(e){var t=[],i=new c;i.timeout=n.ASYNC_TASK_LONG_TIMEOUT,u(i),f(i),i.onRun(function(){var e={};e.multiselect=!0,e.linkType="direct",e.success=function(e){for(var n=0;n :"\|?\*]+$/)?0!==e.indexOf("/")?"/"+e:e:(o.onError('"'+e+'" contains invalid characters.'),void 0)}function c(e){return"sync."+p+"."+encodeURIComponent(e.toLowerCase())}function u(e,n,i,r){r=r||"{}";var o={};return o.provider=f,o.path=e,o.version=n,o.contentCRC=t.crc32(i),o.discussionListCRC=t.crc32(r),o.syncIndex=c(e),h===!0&&(o.content=i,o.discussionList=r),o}function d(t){s.downloadMetadata(t,function(t,n){t||s.downloadContent(n,function(t,n){if(!t){var i=[];e.each(n,function(e){var t=f.parseContent(e.content),n=u(e.path,e.versionTag,t.content,t.discussionListJSON),r={};r[n.syncIndex]=n;var o=a.createFile(e.name,t.content,t.discussionListJSON,r);a.selectFile(o),i.push(o)}),0!==i.length&&o.onSyncImportSuccess(i,f)}})})}var p="dropbox",f=new r(p,"Dropbox");f.defaultPublishFormat="template";var h="merge"==i.conflictMode;return f.importFiles=function(){s.picker(function(t,n){if(!t&&0!==n.length){var i=[];e.each(n,function(e){var t=c(e),n=a.getFileFromSyncIndex(t);return void 0!==n?o.onError('"'+n.title+'" was already imported.'):(i.push(e),void 0)}),d(i)}})},f.exportFile=function(e,n,i,r,d){var p=t.getInputTextValue("#input-sync-export-dropbox-path",e);if(p=l(p),void 0===p)return d(!0);var h=c(p),m=a.getFileFromSyncIndex(h);if(void 0!==m){var g=m.title;return o.onError('File path is already synchronized with "'+g+'".'),d(!0)}var v=f.serializeContent(i,r);s.upload(p,v,function(e,t){if(e)return d(e);var n=u(t.path,t.versionTag,i,r);d(void 0,n)})},f.syncUp=function(e,t,n,i,r,o,a,l){if(a.contentCRC==t&&a.discussionListCRC==o)return l(void 0,!1);var c=f.serializeContent(e,r);s.upload(a.path,c,function(n,s){return n?l(n,!0):(a.version=s.versionTag,h===!0&&(a.content=e,a.discussionList=r),a.contentCRC=t,a.titleCRC=i,a.discussionListCRC=o,l(void 0,!0),void 0) -})},f.syncDown=function(i){var r=n[p+".lastChangeId"];s.checkChanges(r,function(r,l,u){if(r)return i(r);var d=[];e.each(l,function(e){var t=c(e.path),n=a.getFileFromSyncIndex(t),i=n&&n.syncLocations[t];return i?(e.fileDesc=n,e.syncAttributes=i,e.wasRemoved===!0?(d.push(e),void 0):(i.version!=e.stat.versionTag&&d.push(e),void 0)):void 0}),s.downloadContent(d,function(e,r){function a(){if(0===r.length)return n[p+".lastChangeId"]=u,i();var e=r.pop(),s=e.fileDesc,l=e.syncAttributes;if(e.wasRemoved===!0)return o.onError('"'+s.title+'" has been removed from Dropbox.'),s.removeSyncLocation(l),o.onSyncRemoved(s,l);var c=e.stat,d=f.parseContent(c.content),h=d.content,m=d.discussionListJSON,g=d.discussionList,v=f.syncMerge(s,l,h,s.title,g,m);l.version=c.versionTag,a===!0&&(l.content=h,l.discussionList=g),l.contentCRC=v.contentCRC,l.discussionListCRC=v.discussionListCRC,t.storeAttributes(l),setTimeout(a,5)}return e?(i(e),void 0):(setTimeout(a,5),void 0)})})},f.publish=function(e,t,n,i,r){var o=l(e.path);return void 0===o?r(!0):(s.upload(o,i,r),void 0)},f.newPublishAttributes=function(e){var n={};return n.path=t.getInputTextValue("#input-publish-dropbox-path",e),e.isPropagationStopped()?void 0:n},f}),define("helpers/googleHelper",["underscore","jquery","constants","core","utils","storage","logger","settings","eventMgr","classes/AsyncTask"],function(e,t,n,i,r,o,a,s,l,c){function u(t){var n={profile:!0},i=!0;e.each((o[t+".permissions"]||"").split(";"),function(e){e&&(n[e]=!0)}),this.setRefreshFlag=function(){i=!0},this.isAuthorized=function(t){return i===!1&&e.has(n,t)},this.add=function(r){n[r]=!0,o[t+".permissions"]=e.keys(n).join(";"),i=!1},this.getListWithNew=function(t){var i=e.keys(n);return e.has(n,t)||i.push(t),i};var r=o[t+".userId"];this.setUserId=function(e){r=e,o[t+".userId"]=r},this.getUserId=function(){return r}}function d(e){e.onRun(function(){return y===!0?(g=!1,e.error(new Error("Operation not available in offline mode.|stopPublish")),void 0):g===!0?(e.chain(),void 0):(window.delayedFunction=function(){gapi.load("client",function(){gapi.client.load("drive","v2",function(){g=!0,e.chain()})})},t.ajax({url:"https://apis.google.com/js/api.js?onload=runDelayedFunction",dataType:"script",timeout:n.AJAX_TIMEOUT}).fail(function(t){var n={code:t.status,message:t.statusText};h(n,e)}),void 0)})}function p(i,o,a){var s=v[a];s||(s=new u(a),v[a]=s),i.onRun(function(){function a(){t.ajax({url:"https://www.googleapis.com/oauth2/v1/tokeninfo",data:{access_token:d.access_token},timeout:n.AJAX_TIMEOUT,type:"GET"}).done(function(e){s.getUserId()&&s.getUserId()!=e.user_id?u():(s.setUserId(e.user_id),s.add(o),s.token=d,i.chain())}).fail(function(e){var t={code:e.status,message:e.statusText};h(t,i)})}function l(){if(m>5)return i.error(new Error("Unable to authenticate user "+s.getUserId()+", please sign in with Google.")),void 0;p===!1&&(i.timeout=n.ASYNC_TASK_LONG_TIMEOUT);var t=e.chain(x).pick(s.getListWithNew(o)).flatten().value();gapi.auth.authorize({client_id:n.GOOGLE_CLIENT_ID,scope:t,immediate:p,authuser:p===!1?"":m},function(e){d=gapi.auth.getToken(),gapi.auth.setToken(f),!e||e.error?g===!0&&p===!0?(p=!1,i.chain(c)):i.error(new Error("Access to Google account is not authorized.")):(p===!0&&m++,i.chain(a))})}function c(){return p===!0?(i.chain(l),void 0):(r.redirectConfirm("You are being redirected to Google authorization page.",function(){i.chain(l)},function(){i.error(new Error("Operation canceled."))}),void 0)}function u(){return p=!0,s.token&&s.isAuthorized(o)?(i.chain(),void 0):(s.getUserId()||(p=!1),i.chain(c),void 0)}var d,p,f=gapi.auth.getToken(),m=0;u()})}function f(e,t){var n=gapi.auth.getToken(),i=v[e];gapi.auth.setToken(i.token),t(),gapi.auth.setToken(n)}function h(t,n){var r;if(t)if(a.error(t),"string"==typeof t)r=t;else{if(r="Google error ("+t.code+": "+t.message+").",t.code>=500&&t.code<600)return n.retry(new Error(r)),void 0;if(401===t.code||403===t.code||"token_refresh_required"==t.code)return e.each(v,function(e){e.setRefreshFlag()}),r="Access to Google account is not authorized.",n.retry(new Error(r),1),void 0;(0===t.code||-1===t.code)&&(g=!1,e.each(v,function(e){e.setRefreshFlag()}),i.setOffline(),r="|stopPublish")}n.error(new Error(r))}function m(e){e.onRun(function(){return w===!0?(e.chain(),void 0):(t.ajax({url:"//www.google.com/jsapi",data:{key:n.GOOGLE_API_KEY},dataType:"script",timeout:n.AJAX_TIMEOUT}).done(function(){google.load("picker","1",{callback:function(){e.chain()}}),w=!0}).fail(function(t){var n={code:t.status,message:t.statusText};h(n,e)}),void 0)})}var g=!1,v={},b={},y=!1;l.addListener("onOfflineChanged",function(e){y=e});var x={profile:["https://www.googleapis.com/auth/userinfo.profile"],gdrive:["https://www.googleapis.com/auth/drive.install",s.gdriveFullAccess===!0?"https://www.googleapis.com/auth/drive":"https://www.googleapis.com/auth/drive.file"],blogger:["https://www.googleapis.com/auth/blogger"],picasa:["https://picasaweb.google.com/data/"]};b.refreshGdriveToken=function(e){var t=new c;d(t);var n=v[e];n&&n.setRefreshFlag(),p(t,"gdrive",e),t.enqueue()},b.upload=function(e,t,n,i,a,s,l,u){var m,g=new c;d(g),p(g,"gdrive",l),g.onRun(function(){var s="-------314159265358979323846",c="\r\n--"+s+"\r\n",u="\r\n--"+s+"--";a=a||"text/x-markdown";var d={title:n,mimeType:a};t&&(d.parents=[{kind:"drive#fileLink",id:t}]);var p="/upload/drive/v2/files",v="POST";e&&(p+="/"+e,v="PUT");var b={"Content-Type":'multipart/mixed; boundary="'+s+'"'},y=r.encodeBase64(i),x=[c,"Content-Type: application/json\r\n\r\n",JSON.stringify(d),c,"Content-Type: ",a,"\r\n","Content-Transfer-Encoding: base64\r\n","\r\n",y,u].join("");f(l,function(){var t=gapi.client.request({path:p,method:v,params:{uploadType:"multipart"},headers:b,body:x});t.execute(function(t){if(t&&t.id)return m=t,m.content=i,g.chain(),void 0;var n=t.error;void 0!==n&&void 0!==e&&(404===n.code?n='File ID "'+e+'" not found on Google Drive.|removePublish':412===n.code&&(o.removeItem(l+".gdrive.lastChangeId"),n='Conflict on file ID "'+e+'". Please restart the synchronization.')),h(n,g)})})}),g.onSuccess(function(){u(void 0,m)}),g.onError(function(e){u(e)}),g.enqueue()},b.rename=function(e,t,n,i){var r,o=new c;d(o),p(o,"gdrive",n),o.onRun(function(){var i={title:t};f(n,function(){var t=gapi.client.drive.files.patch({fileId:e,resource:i});t.execute(function(t){if(t&&t.id)return r=t,o.chain(),void 0;var n=t.error;void 0!==n&&void 0!==e&&404===n.code&&(n='File ID "'+e+'" not found on Google Drive.|removePublish'),h(n,o)})})}),o.onSuccess(function(){i(void 0,r)}),o.onError(function(e){i(e)}),o.enqueue()},b.checkChanges=function(e,t,n){var i=[],r=e||0,o=new c;d(o),p(o,"gdrive",t),o.onRun(function(){function e(){f(t,function(){var t;t=void 0===n?gapi.client.drive.changes.list({startChangeId:r+1}):gapi.client.drive.changes.list({pageToken:n}),t.execute(function(t){return t&&t.largestChangeId?(r=t.largestChangeId,n=t.nextPageToken,void 0!==t.items&&(i=i.concat(t.items)),void 0!==n?o.chain(e):o.chain(),void 0):(h(t.error,o),void 0)})})}var n;o.chain(e)}),o.onSuccess(function(){n(void 0,i,r)}),o.onError(function(e){n(e)}),o.enqueue()},b.downloadMetadata=function(e,i,r,o){var a=[],s=new c;d(s),o||p(s,"gdrive",i),s.onRun(function(){function r(){if(0===e.length)return s.chain(),void 0;var o=e[0],l={},c=v[i];c&&c.token&&(l.Authorization="Bearer "+c.token.access_token),t.ajax({url:"https://www.googleapis.com/drive/v2/files/"+o,headers:l,data:{key:n.GOOGLE_API_KEY},dataType:"json",timeout:n.AJAX_TIMEOUT}).done(function(t){a.push(t),e.shift(),s.chain(r)}).fail(function(e){var t={code:e.status,message:e.statusText};404===t.code&&(t='File ID "'+o+'" not found on Google Drive.'),h(t,s)})}s.chain(r)}),s.onSuccess(function(){r(void 0,a)}),s.onError(function(e){r(e)}),s.enqueue()},b.downloadContent=function(e,i,r,o){var a=[],s=new c;s.timeout=n.ASYNC_TASK_LONG_TIMEOUT,d(s),o||p(s,"gdrive",i),s.onRun(function(){function r(){if(0===e.length)return s.chain(),void 0;var o=e[0];a.push(o);var l;if("drive#file"==o.kind?l=o:"drive#change"==o.kind&&(l=o.file),!l)return e.shift(),s.chain(r),void 0;var c=l.downloadUrl;0===l.mimeType.indexOf("application/vnd.google-apps.drive-sdk")&&(l.isRealtime=!0,c="https://www.googleapis.com/drive/v2/files/"+l.id+"/realtime");var u={},d=v[i];d&&d.token&&(u.Authorization="Bearer "+d.token.access_token),t.ajax({url:c,headers:u,data:{key:n.GOOGLE_API_KEY},dataType:l.isRealtime?"json":"text",timeout:n.AJAX_TIMEOUT}).done(function(t){l.content=l.isRealtime?t.data.value.content.value:t,e.shift(),s.chain(r)}).fail(function(e){var t={code:e.status,message:e.statusText};h(t,s)})}s.chain(r)}),s.onSuccess(function(){r(void 0,a)}),s.onError(function(e){r(e)}),s.enqueue()},b.uploadImg=function(e,i,r,o){var a,s="google.picasa0",l=new c;d(l),p(l,"picasa",s),l.onRun(function(){var o={Slug:e};e.match(/.jpe?g$/i)?o["Content-Type"]="image/jpeg":e.match(/.png$/i)?o["Content-Type"]="image/png":e.match(/.gif$/i)&&(o["Content-Type"]="image/gif");var c=v[s];c&&c.token&&(o.Authorization="Bearer "+c.token.access_token),t.ajax({url:n.PICASA_PROXY_URL+"upload/"+r,headers:o,data:i,processData:!1,dataType:"xml",timeout:n.AJAX_TIMEOUT,type:"POST"}).done(function(e){a=e,l.chain()}).fail(function(e){var t={code:e.status,message:e.statusText};200==t.code&&(t.message=e.responseText),h(t,l)})}),l.onSuccess(function(){o(void 0,a)}),l.onError(function(e){o(e)}),l.enqueue()};var w=!1;return b.picker=function(e,i,o){function a(){void 0!==s&&(s.setVisible(!1),t(".modal-backdrop, .picker").remove())}var s,l=[],u=new c;u.timeout=n.ASYNC_TASK_LONG_TIMEOUT,d(u),"doc"==i||"folder"==i?p(u,"gdrive",o):(o="google.picasa0",p(u,"picasa",o)),m(u),u.onRun(function(){var e=v[o],c=new google.picker.PickerBuilder;c.setAppId(n.GOOGLE_DRIVE_APP_ID);var d;"doc"==i?(d=new google.picker.DocsView(google.picker.ViewId.DOCS),d.setParent("root"),d.setIncludeFolders(!0),d.setMimeTypes(["text/x-markdown","text/plain","application/octet-stream","application/vnd.google-apps.drive-sdk."+n.GOOGLE_DRIVE_APP_ID].join(",")),c.enableFeature(google.picker.Feature.NAV_HIDDEN),c.enableFeature(google.picker.Feature.MULTISELECT_ENABLED),c.addView(d),e&&e.token&&c.setOAuthToken(e.token.access_token)):"folder"==i?(d=new google.picker.DocsView(google.picker.ViewId.FOLDERS),d.setParent("root"),d.setIncludeFolders(!0),d.setSelectFolderEnabled(!0),d.setMimeTypes("application/vnd.google-apps.folder"),c.enableFeature(google.picker.Feature.NAV_HIDDEN),c.addView(d),e&&e.token&&c.setOAuthToken(e.token.access_token)):"img"==i&&(d=new google.picker.PhotosView,d.setType("flat"),c.addView(d),d=new google.picker.PhotosView,d.setType("ofuser"),c.addView(d),c.addView(google.picker.ViewId.PHOTO_UPLOAD),e&&e.token&&c.setOAuthToken(e.token.access_token)),c.setCallback(function(e){(e.action==google.picker.Action.PICKED||e.action==google.picker.Action.CANCEL)&&(e.action==google.picker.Action.PICKED&&(l=e.docs),a(),u.chain())}),s=c.build(),t(r.createBackdrop()).click(function(){a(),u.chain()}),s.setVisible(!0)}),u.onSuccess(function(){e(void 0,l)}),u.onError(function(t){a(),e(t)}),u.enqueue()},b.uploadBlogger=function(e,i,r,o,a,s,l,u,f){var m="google.blogger0",g=new c;d(g),p(g,"blogger",m),g.onRun(function(){function c(){var e="https://www.googleapis.com/blogger/v3/blogs/"+i+"/posts/",a={kind:"blogger#post",blog:{id:i},labels:o,title:l,content:u},s="POST";void 0!==r&&(e+=r,a.id=r,s="PUT"),t.ajax({url:e,data:JSON.stringify(a),headers:f,type:s,contentType:"application/json",dataType:"json",timeout:n.AJAX_TIMEOUT}).done(function(e){r=e.id,g.chain(d)}).fail(function(e){var t={code:e.status,message:e.statusText};404===t.code&&void 0!==r&&(t="Post "+r+" not found on Blogger.|removePublish"),h(t,g)})}function d(){var e="https://www.googleapis.com/blogger/v3/blogs/"+i+"/posts/"+r;a?e+="/revert":(e+="/publish",s&&(e+="?publishDate="+s.toISOString())),t.ajax({url:e,headers:f,type:"POST",dataType:"json",timeout:n.AJAX_TIMEOUT}).done(function(){g.chain()}).fail(function(e){var t={code:e.status,message:e.statusText};404===t.code&&(t="Post "+r+" not found on Blogger.|removePublish"),h(t,g)})}function p(){return void 0!==i?(g.chain(c),void 0):(t.ajax({url:"https://www.googleapis.com/blogger/v3/blogs/byurl",data:{url:e},headers:f,dataType:"json",timeout:n.AJAX_TIMEOUT}).done(function(e){i=e.id,g.chain(c)}).fail(function(t){var n={code:t.status,message:t.statusText};404===n.code&&(n='Blog "'+e+'" not found on Blogger.|removePublish'),h(n,g)}),void 0)}var f={},b=v[m];b&&b.token&&(f.Authorization="Bearer "+b.token.access_token),g.chain(p)}),g.onSuccess(function(){f(void 0,i,r)}),g.onError(function(e){f(e)}),g.enqueue()},b.uploadBloggerPage=function(e,i,r,o,a,s,l,u){var f="google.blogger0",m=new c;d(m),p(m,"blogger",f),m.onRun(function(){function o(){var e="https://www.googleapis.com/blogger/v3/blogs/"+i+"/pages/",o={kind:"blogger#page",blog:{id:i},title:s,content:l},a="POST";void 0!==r&&(e+=r,o.id=r,a="PUT"),t.ajax({url:e,data:JSON.stringify(o),headers:c,type:a,contentType:"application/json",dataType:"json",timeout:n.AJAX_TIMEOUT}).done(function(e){r=e.id,m.chain()}).fail(function(e){var t={code:e.status,message:e.statusText};404===t.code&&void 0!==r&&(t="Page "+r+" not found on Blogger.|removePublish"),h(t,m)})}function a(){return void 0!==i?(m.chain(o),void 0):(t.ajax({url:"https://www.googleapis.com/blogger/v3/blogs/byurl",data:{url:e},headers:c,dataType:"json",timeout:n.AJAX_TIMEOUT}).done(function(e){i=e.id,m.chain(o)}).fail(function(t){var n={code:t.status,message:t.statusText};404===n.code&&(n='Blog "'+e+'" not found on Blogger.|removePublish'),h(n,m)}),void 0)}var c={},u=v[f];u&&u.token&&(c.Authorization="Bearer "+u.token.access_token),m.chain(a)}),m.onSuccess(function(){u(void 0,i,r)}),m.onError(function(e){u(e)}),m.enqueue()},window.delayedFunction=void 0,window.runDelayedFunction=function(){void 0!==window.delayedFunction&&window.delayedFunction()},b}),define("text!html/dialogExportGdrive.html",[],function(){return' \n\n'}),define("text!html/dialogAutoSyncGdrive.html",[],function(){return' \n\n\n'}),define("providers/gdriveProviderBuilder",["jquery","underscore","constants","utils","storage","logger","classes/Provider","settings","eventMgr","fileMgr","editor","helpers/googleHelper","text!html/dialogExportGdrive.html","text!html/dialogAutoSyncGdrive.html"],function(e,t,n,i,r,o,a,s,l,c,u,d,p,f){return function(o,u,h){function m(e){return"sync."+o+"."+e}function g(e,t,n,r,o){o=o||"{}";var a={};return a.provider=y,a.id=e,a.etag=t,a.contentCRC=i.crc32(n),a.titleCRC=i.crc32(r),a.discussionListCRC=i.crc32(o),a.syncIndex=m(e),x===!0&&(a.content=n,a.title=r,a.discussionList=o),a}function v(e){d.downloadMetadata(e,b,function(e,n){e||d.downloadContent(n,b,function(e,n){if(!e){var i,r=[];t.each(n,function(e){var t,n=y.parseContent(e.content);if(e.isRealtime)l.onError("Real time synchronization is not supported anymore. Please use standard synchronization.");else{var o=g(e.id,e.etag,n.content,e.title,n.discussionListJSON);t={},t[o.syncIndex]=o}i=c.createFile(e.title,n.content,n.discussionListJSON,t),r.push(i)}),void 0!==i&&(l.onSyncImportSuccess(r,y),c.selectFile(i))}})})}var b="google.gdrive"+h,y=new a(o,u);y.defaultPublishFormat="template",y.exportPreferencesInputIds=[o+"-parentid"];var x="merge"==s.conflictMode;return y.importFiles=function(){d.picker(function(e,n){if(!e&&0!==n.length){var i=[];t.each(n,function(e){var t=m(e.id),n=c.getFileFromSyncIndex(t);return void 0!==n?(l.onError('"'+n.title+'" was already imported.'),void 0):(i.push(e.id),void 0)}),v(i)}},"doc",b)},y.exportFile=function(e,t,n,r,a){var s=i.getInputTextValue("#input-sync-export-"+o+"-fileid");if(s){var u=m(s),p=c.getFileFromSyncIndex(u);if(void 0!==p)return l.onError('File ID is already synchronized with "'+p.title+'".'),a(!0),void 0}var f=i.getInputTextValue("#input-sync-export-"+o+"-parentid"),h=y.serializeContent(n,r);d.upload(s,f,t,h,void 0,void 0,b,function(e,i){if(e)return a(e),void 0;var o=g(i.id,i.etag,n,t,r);a(void 0,o)})},y.syncUp=function(e,t,n,i,r,o,a,s){if(a.contentCRC==t&&a.titleCRC==i&&a.discussionListCRC==o)return s(void 0,!1);if(a.isRealtime){var u=c.getFileFromSyncIndex(a.syncIndex);return u.removeSyncLocation(a),l.onSyncRemoved(u,a),l.onError("Real time synchronization is not supported anymore. Please use standard synchronization.")}var p=y.serializeContent(e,r);d.upload(a.id,void 0,n,p,void 0,a.etag,b,function(l,c){return l?(s(l,!0),void 0):(a.etag=c.etag,delete a.isRealtime,x===!0&&(a.content=e,a.title=n,a.discussionList=r),a.contentCRC=t,a.titleCRC=i,a.discussionListCRC=o,s(void 0,!0),void 0)})},y.syncDown=function(e){var n=parseInt(r[b+".gdrive.lastChangeId"],10);d.checkChanges(n,b,function(n,o,a){if(n)return e(n),void 0;var s=[];t.each(o,function(e){var t=m(e.fileId),n=c.getFileFromSyncIndex(t),i=n&&n.syncLocations[t];return i?(e.fileDesc=n,e.syncAttributes=i,e.deleted===!0?(s.push(e),void 0):(i.etag!=e.file.etag&&s.push(e),void 0)):void 0}),d.downloadContent(s,b,function(t,n){function o(){if(0===n.length)return r[b+".gdrive.lastChangeId"]=a,e();var t=n.pop(),s=t.fileDesc,c=t.syncAttributes;if(t.deleted===!0)return l.onError('"'+s.title+'" has been removed from '+u+"."),s.removeSyncLocation(c),l.onSyncRemoved(s,c);var d=t.file,p=y.parseContent(d.content),f=p.content,h=d.title,m=p.discussionListJSON,g=p.discussionList,v=y.syncMerge(s,c,f,h,g,m);c.etag=d.etag,o===!0&&(c.content=f,c.title=h,c.discussionList=m),c.contentCRC=v.contentCRC,c.titleCRC=v.titleCRC,c.discussionListCRC=v.discussionListCRC,i.storeAttributes(c),setTimeout(o,5)}return t?(e(t),void 0):(setTimeout(o,5),void 0)})})},y.publish=function(e,t,n,i,r){var o="markdown"!=e.format?"text/html":void 0;d.upload(e.id,void 0,e.fileName||n,i,o,void 0,b,function(t,n){return t?(r(t),void 0):(e.id=n.id,r(),void 0)})},y.newPublishAttributes=function(e){var t={};return t.id=i.getInputTextValue("#input-publish-"+o+"-fileid"),t.fileName=i.getInputTextValue("#input-publish-"+o+"-filename"),e.isPropagationStopped()?void 0:t},y.setAutosyncDialogConfig=function(){var e=y.autosyncConfig;i.setInputRadio("radio-autosync-"+o+"-mode",e.mode||"off"),i.setInputValue("#input-autosync-"+o+"-parentid",e.parentId)},y.getAutosyncDialogConfig=function(){var e={};return e.mode=i.getInputRadio("radio-autosync-"+o+"-mode"),e.parentId=i.getInputTextValue("#input-autosync-"+o+"-parentid"),e},y.autosyncFile=function(e,t,n,i,r){var o=i.parentId;d.upload(void 0,o,e,t,void 0,void 0,b,function(i,o){if(i)return r(i),void 0;var a=g(o.id,o.etag,t,e,n);r(void 0,a)})},y.isPublishEnabled=s.gdriveMultiAccount>h,l.addListener("onReady",function(){e(".submenu-sync-"+o).toggle(s.gdriveMultiAccount>h);var a=document.querySelector(".modal-upload-"+o);a&&(a.innerHTML=t.template(p,{providerId:o,providerName:u}));var y=document.querySelector(".modal-autosync-"+o);if(y&&(y.innerHTML=t.template(f,{providerId:o,providerName:u})),e(".action-export-"+o+"-choose-folder").click(function(){d.picker(function(t,n){t||0===n.length||(e(".modal-upload-"+o).modal(),i.setInputValue("#input-sync-export-"+o+"-parentid",n[0].id))},"folder",b)}),e(".action-autosync-"+o+"-choose-folder").click(function(){d.picker(function(t,n){t||0===n.length||(e(".modal-autosync-"+o).modal(),i.setInputValue("#input-autosync-"+o+"-parentid",n[0].id))},"folder",b)}),e(".action-remove-google-drive-state").click(function(){r.removeItem("gdrive.state")}),!(h>=s.gdriveMultiAccount)){var x=i.retrieveIgnoreError("gdrive.state"),w=r[b+".userId"];if(void 0!==x){if(w&&x.userId!=w)return h===s.gdriveMultiAccount-1&&(3===s.gdriveMultiAccount?(l.onError("None of your 3 Google Drive accounts is able to perform this request."),r.removeItem("gdrive.state")):e(".modal-add-google-drive-account").modal()),void 0;if(r.removeItem("gdrive.state"),"create"==x.action)d.upload(void 0,x.folderId,n.GDRIVE_DEFAULT_FILE_TITLE,s.defaultContent,void 0,void 0,b,function(e,t){if(!e){var n=g(t.id,t.etag,t.content,t.title),i={};i[n.syncIndex]=n;var r=c.createFile(t.title,t.content,void 0,i);c.selectFile(r),l.onMessage('"'+t.title+'" created successfully on '+u+".")}});else if("open"==x.action){var S=[];t.each(x.ids,function(e){var t=m(e),n=c.getFileFromSyncIndex(t);void 0!==n?n!==c.currentFile&&c.selectFile(n):S.push(e)}),v(S)}}}}),y}}),define("providers/gdriveProvider",["providers/gdriveProviderBuilder"],function(e){return e("gdrive","Google Drive",0)}),define("providers/gdrivesecProvider",["providers/gdriveProviderBuilder"],function(e){return e("gdrivesec","Google Drive (2nd account)",1)}),define("providers/gdriveterProvider",["providers/gdriveProviderBuilder"],function(e){return e("gdriveter","Google Drive (3rd account)",2)}),define("synchronizer",["jquery","underscore","utils","storage","eventMgr","fileSystem","fileMgr","classes/Provider","providers/dropboxProvider","providers/gdriveProvider","providers/gdrivesecProvider","providers/gdriveterProvider"],function(e,t,n,i,r,o,a,s){function l(e){function i(){function o(){if(0===s.length)return i();var t=s.pop();t.provider.syncUp(c,u,d,p,f,m,t,function(i,r){return r===!0&&(h=!0),i?e(i):(r&&n.storeAttributes(t),o(),void 0)})}if(0===r.length)return l(e);var a=r.pop(),s=t.values(a.syncLocations);if(0===s.length)return i();var c=a.content,u=n.crc32(c),d=a.title,p=n.crc32(d),f=a.discussionListJSON,m=n.crc32(f);o()}var r=[];h===!0?(h=!1,r=t.values(o),i()):e()}function c(e){function n(){if(0===i.length)return e();var t=i.pop();return p.hasSync(t)?(t.syncDown(function(t){return t?e(t):(n(),void 0)}),void 0):n()}var i=t.values(f);n()}function u(e){function n(){function o(){if(0===s.length)return n();var t=s.pop();t.autosyncFile(a.title,a.content,a.discussionListJSON,t.autosyncConfig,function(t,n){return t?e(t):(a.addSyncLocation(n),r.onSyncExportSuccess(a,n),o(),void 0)})}if(0===i.length)return e();var a=i.pop(),s=t.filter(f,function(e){return"all"==e.autosyncConfig.mode});o()}var i=t.filter(o,function(e){return 0===t.size(e.syncLocations)});n()}function d(i){n.resetModalInputs();var r=n.retrieveIgnoreError(i.providerId+".exportPreferences");r&&t.each(i.exportPreferencesInputIds,function(e){var i=r[e];t.isBoolean(i)?n.setInputChecked("#input-sync-export-"+e,i):n.setInputValue("#input-sync-export-"+e,i)}),e(".modal-upload-"+i.providerId).modal()}var p={},f=t.chain(arguments).map(function(e){return e instanceof s&&[e.providerId,e]}).compact().object().value();!function(){var e={};t.each(o,function(t){n.retrieveIndexArray(t.fileIndex+".sync").forEach(function(o){try{var a=JSON.parse(i[o]);a.syncIndex=o;var s=f[a.provider];if(!s)throw new Error("Invalid provider ID: "+a.provider);a.provider=s,t.syncLocations[o]=a,e[o]=a}catch(l){r.onError(l),n.removeIndexFromArray(t.fileIndex+".sync",o)}})}),Object.keys(i).forEach(function(t){var n=t.match(/sync\.\S+/);n&&!e.hasOwnProperty(n[0])&&i.removeItem(t)})}(),t.each(f,function(e){e.autosyncConfig=n.retrieveIgnoreError(e.providerId+".autosyncConfig")||{}}),p.hasSync=function(e){return t.some(o,function(n){return t.some(n.syncLocations,function(t){return void 0===e||t.provider===e})})};var h=!1,m=!1;r.addListener("onOfflineChanged",function(e){m=e});var g=!1;return p.sync=function(){function e(e){return void 0!==e?(g=!1,r.onSyncRunning(!1),!0):!1}return g===!0||m===!0?!1:(g=!0,r.onSyncRunning(!0),h=!0,u(function(t){e(t)||c(function(t){e(t)||l(function(t){e(t)||(g=!1,r.onSyncRunning(!1),r.onSyncSuccess())})})}),!0)},r.addListener("onFileCreated",function(e){0===t.size(e.syncLocations)&&t.each(f,function(t){"new"==t.autosyncConfig.mode&&t.autosyncFile(e.title,e.content,e.discussionListJSON,t.autosyncConfig,function(t,n){t||(e.addSyncLocation(n),r.onSyncExportSuccess(e,n))})})}),r.addListener("onReady",function(){t.each(f,function(o){e(".action-sync-import-"+o.providerId).click(function(e){o.importFiles(e)}),e(".action-sync-export-dialog-"+o.providerId).click(function(){d(o)}),e(".action-autosync-dialog-"+o.providerId).click(function(){n.resetModalInputs(),o.setAutosyncDialogConfig(o),e(".modal-autosync-"+o.providerId).modal()}),e(".action-sync-export-"+o.providerId).click(function(e){var n=a.currentFile;o.exportFile(e,n.title,n.content,n.discussionListJSON,function(e,t){e||(n.addSyncLocation(t),r.onSyncExportSuccess(n,t))});var s={};t.each(o.exportPreferencesInputIds,function(e){var t=document.getElementById("input-sync-export-"+e);s[e]="checkbox"==t.type?t.checked:t.value}),i[o.providerId+".exportPreferences"]=JSON.stringify(s)}),e(".action-autosync-"+o.providerId).click(function(e){var t=o.getAutosyncDialogConfig(e);void 0!==t&&(i[o.providerId+".autosyncConfig"]=JSON.stringify(t),o.autosyncConfig=t)})})}),r.onSynchronizerCreated(p),p}),define("providers/downloadProvider",["jquery","constants","eventMgr","utils","fileMgr","classes/Provider","classes/AsyncTask"],function(e,t,n,i,r,o,a){var s=new o("download");return s.sharingAttributes=["url"],s.importPublic=function(n,i){var r,o,s=new a(!0);s.onRun(function(){var i=n.url,a=i.lastIndexOf("/");return-1===a?(s.error(new Error("Invalid URL parameter.")),void 0):(r=i.substring(a+1),e.ajax({url:t.DOWNLOAD_PROXY_URL+"download?url="+i,type:"GET",dataType:"text",timeout:t.AJAX_TIMEOUT}).done(function(e){o=e,s.chain()}).fail(function(){s.error(new Error("Unable to access URL "+i))}),void 0)}),s.onSuccess(function(){i(void 0,r,o)}),s.onError(function(e){i(e)}),s.enqueue()},n.addListener("onReady",function(){e(".action-import-url").click(function(e){var t=i.getInputTextValue("#input-import-url",e);t&&s.importPublic({url:t},function(e,t,n){if(!e){var i=r.createFile(t,n);r.selectFile(i)}})})}),s}),define("helpers/githubHelper",["jquery","constants","core","utils","storage","logger","settings","eventMgr","classes/AsyncTask"],function(e,t,n,i,r,o,a,s,l){function c(n){n.onRun(function(){return m===!0?(p=!1,n.error(new Error("Operation not available in offline mode.|stopPublish")),void 0):p===!0?(n.chain(),void 0):(e.ajax({url:"libs/github.js",dataType:"script",timeout:t.AJAX_TIMEOUT}).done(function(){p=!0,n.chain()}).fail(function(e){var t={error:e.status,message:e.statusText};d(t,n)}),void 0)})}function u(n){var o,s;n.onRun(function(){function l(){i.redirectConfirm("You are being redirected to GitHub authorization page.",function(){n.chain(c)},function(){n.error(new Error("Operation canceled."))})}function c(){r.removeItem("githubCode");var e=a.githubFullAccess?"repo,gist":"public_repo,gist";o=i.popupWindow("html/github-oauth-client.html?client_id="+t.GITHUB_CLIENT_ID+"&scope="+e,"stackedit-github-oauth",960,600),o.focus(),s=setInterval(function(){if(o.closed===!0){if(clearInterval(s),o=void 0,s=void 0,h=r.githubCode,void 0===h)return n.error(new Error(p)),void 0;r.removeItem("githubCode"),n.chain(u)}},500)}function u(){e.getJSON(t.GATEKEEPER_URL+"authenticate/"+h,function(e){void 0!==e.token?(d=e.token,r.githubToken=d,f=new Github({token:d,auth:"oauth"}),n.chain()):n.error(new Error(p))})}if(void 0!==f)return n.chain(),void 0;var d=r.githubToken;if(void 0!==d)return f=new Github({token:d,auth:"oauth"}),n.chain(),void 0;var p="Failed to retrieve a token from GitHub."; -n.timeout=t.ASYNC_TASK_LONG_TIMEOUT;var h;n.chain(l)}),n.onError(function(){void 0!==s&&clearInterval(s),void 0!==o&&o.close()})}function d(e,t){var i;if(e)if(o.error(e),"string"==typeof e)i=e;else{if(i="Could not publish on GitHub.",401===e.error||403===e.error)return f=void 0,r.removeItem("githubToken"),i="Access to GitHub account is not authorized.",t.retry(new Error(i),1),void 0;e.error<=0&&(p=!1,f=void 0,n.setOffline(),i="|stopPublish")}t.error(new Error(i))}var p,f,h={},m=!1;return s.addListener("onOfflineChanged",function(e){m=e}),h.upload=function(e,t,n,i,r,o,a){var s=new l;c(s),u(s),s.onRun(function(){function a(){var e=f.getUser();e.show(void 0,function(e,n){return e?(d(e,s),void 0):(t=n.login,s.chain(l),void 0)})}function l(){var a=f.getRepo(t,e);a.write(n,i,r,o,function(e){return e?(d(e,s),void 0):(s.chain(),void 0)})}t?s.chain(l):s.chain(a)}),s.onSuccess(function(){a()}),s.onError(function(e){a(e)}),s.enqueue()},h.uploadGist=function(e,t,n,i,r,o){var a=new l;c(a),u(a),a.onRun(function(){var o=f.getGist(e),s={};s[t]={content:r};var l=o.update;void 0===e&&(l=o.create),l({description:i,"public":n,files:s},function(t,n){return t?(404===t.error&&void 0!==e&&(t="Gist "+e+" not found on GitHub.|removePublish"),d(t,a),void 0):(e=n.id,a.chain(),void 0)})}),a.onSuccess(function(){o(void 0,e)}),a.onError(function(e){o(e)}),a.enqueue()},h.downloadGist=function(e,t,n){var i=new l(!0);c(i);var r,o;i.onRun(function(){var n=new Github({}),a=n.getGist(e);a.read(function(n,a){if(n)return i.error(new Error("Error trying to access Gist "+e+".")),void 0;r=a.description;var s=a.files[t];return void 0===s?(i.error(new Error("Gist "+e+' does not contain "'+t+'".')),void 0):(o=s.content,i.chain(),void 0)})}),i.onSuccess(function(){n(void 0,r,o)}),i.onError(function(e){n(e)}),i.enqueue()},h}),define("providers/gistProvider",["utils","classes/Provider","helpers/githubHelper"],function(e,t,n){var i=new t("gist","Gist");return i.publishPreferencesInputIds=["gist-public"],i.sharingAttributes=["gistId","filename"],i.publish=function(e,t,i,r,o){n.uploadGist(e.gistId,e.filename,e.isPublic,i,r,function(t,n){return t?(o(t),void 0):(e.gistId=n,o(),void 0)})},i.newPublishAttributes=function(t){var n={};return n.gistId=e.getInputTextValue("#input-publish-gist-id"),n.filename=e.getInputTextValue("#input-publish-filename",t),n.isPublic=e.getInputChecked("#input-publish-gist-public"),t.isPropagationStopped()?void 0:n},i.importPublic=function(e,t){n.downloadGist(e.gistId,e.filename,t)},i}),define("sharing",["jquery","underscore","constants","utils","eventMgr","fileMgr","classes/AsyncTask","classes/Provider","providers/downloadProvider","providers/gistProvider"],function(e,t,n,i,r,o,a,s){var l={},c=t.chain(arguments).map(function(e){return e instanceof s&&[e.providerId,e]}).compact().object().value(),u=!1;return r.addListener("onOfflineChanged",function(e){u=e}),l.createLink=function(e,i){var r=c[e.provider.providerId];if(void 0!==e.sharingLink||void 0===r||"markdown"!=e.format)return i(),void 0;var o=[n.MAIN_URL,"viewer#!provider=",r.providerId];t.each(r.sharingAttributes,function(t){o.push("&"),o.push(t),o.push("="),o.push(encodeURIComponent(e[t]))}),e.sharingLink=o.join(""),i()},r.addListener("onReady",function(){if(window.viewerMode!==!1){var n=i.getURLParameter("provider");void 0===n&&(n="download");var r=c[n];if(void 0!==r){var a={};t.each(r.sharingAttributes,function(e){var t=i.getURLParameter(e);return t?(a[e]=t,void 0):(a=void 0,void 0)}),void 0!==a&&(e("#preview-contents, .navbar .file-title-navbar").hide(),r.importPublic(a,function(t,n,i){if(e("#preview-contents, .navbar .file-title-navbar").show(),!t){var r=o.createFile(n,i,void 0,void 0,!0);o.selectFile(r)}}))}}}),l}),define("providers/bloggerProvider",["underscore","utils","classes/Provider","helpers/googleHelper"],function(e,t,n,i){var r=new n("blogger","Blogger");return r.defaultPublishFormat="html",r.publishPreferencesInputIds=["blogger-url"],r.publish=function(t,n,r,o,a){var s=t.labelList||[];n&&void 0!==n.tags&&(s=n.tags),e.isString(s)&&(s=e.compact(s.split(/[\s,]/)));var l=n&&n.published===!1,c=n&&n.date;i.uploadBlogger(t.blogUrl,t.blogId,t.postId,s,l,c,r,o,function(e,n,i){return e?(a(e),void 0):(t.blogId=n,t.postId=i,a(),void 0)})},r.newPublishAttributes=function(e){var n={},i=t.getInputTextValue("#input-publish-blogger-url",e);return void 0!==i&&(n.blogUrl=t.checkUrl(i)),n.postId=t.getInputTextValue("#input-publish-postid"),e.isPropagationStopped()?void 0:n},r}),define("providers/bloggerPageProvider",["underscore","utils","classes/Provider","helpers/googleHelper"],function(e,t,n,i){var r=new n("bloggerpage","Blogger Page");return r.defaultPublishFormat="html",r.publishPreferencesInputIds=["blogger-url"],r.publish=function(e,t,n,r,o){var a=t&&t.published===!1,s=t&&t.date;i.uploadBloggerPage(e.blogUrl,e.blogId,e.pageId,a,s,n,r,function(t,n,i){return t?(o(t),void 0):(e.blogId=n,e.pageId=i,o(),void 0)})},r.newPublishAttributes=function(e){var n={},i=t.getInputTextValue("#input-publish-blogger-url",e);return void 0!==i&&(n.blogUrl=t.checkUrl(i)),n.pageId=t.getInputTextValue("#input-publish-pageid"),e.isPropagationStopped()?void 0:n},r}),define("providers/githubProvider",["utils","classes/Provider","settings","helpers/githubHelper"],function(e,t,n,i){var r=new t("github","GitHub");return r.publishPreferencesInputIds=["github-reponame","github-username","github-branch"],r.publish=function(e,t,r,o,a){var s=n.commitMsg;i.upload(e.repository,e.username,e.branch,e.path,o,s,a)},r.newPublishAttributes=function(t){var n={};return n.repository=e.getInputTextValue("#input-publish-github-reponame",t),n.username=e.getInputTextValue("#input-publish-github-username"),n.branch=e.getInputTextValue("#input-publish-github-branch",t),n.path=e.getInputTextValue("#input-publish-file-path",t),t.isPropagationStopped()?void 0:n},r}),define("helpers/sshHelper",["jquery","constants","core","logger","eventMgr","settings","classes/AsyncTask"],function(e,t,n,i,r,o,a){function s(e){e.onRun(function(){return u===!0?(e.error(new Error("Operation not available in offline mode.|stopPublish")),void 0):(e.chain(),void 0)})}function l(e,t){var r;e&&(i.error(e),"string"==typeof e?r="SSH error: "+e+".":(r="Could not publish on SSH server.",e.code<=0&&(n.setOffline(),r="|stopPublish"))),t.error(new Error(r))}var c={},u=!1;return r.addListener("onOfflineChanged",function(e){u=e}),c.upload=function(n,i,r,c,u,d,p,f){var h=new a;s(h),h.onRun(function(){var a=o.sshProxy+"upload",s={host:n,port:i,username:r,password:c,path:u,title:d,content:p};e.ajax({url:a,data:s,type:"POST",dataType:"json",timeout:t.AJAX_TIMEOUT}).done(function(e){return void 0===e.error?(h.chain(),void 0):(l(e.error,h),void 0)}).fail(function(e){var t={code:e.status,message:e.statusText};l(t,h)})}),h.onSuccess(function(){f()}),h.onError(function(e){f(e)}),h.enqueue()},c}),define("providers/sshProvider",["utils","classes/Provider","helpers/sshHelper"],function(e,t,n){var i=new t("ssh","SSH server");return i.publishPreferencesInputIds=["ssh-host","ssh-port","ssh-username","ssh-password"],i.publish=function(e,t,i,r,o){n.upload(e.host,e.port,e.username,e.password,e.path,i,r,o)},i.newPublishAttributes=function(t){var n={};return n.host=e.getInputTextValue("#input-publish-ssh-host",t,/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/),n.port=e.getInputIntValue("#input-publish-ssh-port",void 0,0),n.username=e.getInputTextValue("#input-publish-ssh-username",t),n.password=e.getInputTextValue("#input-publish-ssh-password",t),n.path=e.getInputTextValue("#input-publish-file-path",t),t.isPropagationStopped()?void 0:n},i}),define("helpers/tumblrHelper",["jquery","constants","core","utils","storage","logger","eventMgr","classes/AsyncTask"],function(e,t,n,i,r,o,a,s){function l(e){e.onRun(function(){return f===!0?(e.error(new Error("Operation not available in offline mode.|stopPublish")),void 0):(e.chain(),void 0)})}function c(n){var o,a;n.onRun(function(){function s(){e.getJSON(t.TUMBLR_PROXY_URL+"request_token",function(e){void 0!==e.oauth_token?(h=e,n.chain(l)):n.error(new Error(f))})}function l(){i.redirectConfirm("You are being redirected to Tumblr authorization page.",function(){n.chain(c)},function(){n.error(new Error("Operation canceled."))})}function c(){r.removeItem("tumblrVerifier"),o=i.popupWindow("html/tumblr-oauth-client.html?oauth_token="+h.oauth_token,"stackedit-tumblr-oauth",800,600),o.focus(),a=setInterval(function(){if(o.closed===!0){if(clearInterval(a),o=void 0,a=void 0,h.oauth_verifier=r.tumblrVerifier,void 0===h.oauth_verifier)return n.error(new Error(f)),void 0;r.removeItem("tumblrVerifier"),n.chain(u)}},500)}function u(){e.getJSON(t.TUMBLR_PROXY_URL+"access_token",h,function(e){void 0!==e.access_token&&void 0!==e.access_token_secret?(r.tumblrOauthParams=JSON.stringify(e),d=e,n.chain()):n.error(new Error(f))})}if(void 0!==d)return n.chain(),void 0;var p=r.tumblrOauthParams;if(void 0!==p)return d=JSON.parse(p),n.chain(),void 0;var f="Failed to retrieve a token from Tumblr.";n.timeout=t.ASYNC_TASK_LONG_TIMEOUT;var h;n.chain(s)}),n.onError(function(){void 0!==a&&clearInterval(a),void 0!==o&&o.close()})}function u(e,t){var i;if(e)if(o.error(e),"string"==typeof e)i=e;else{if(i="Could not publish on Tumblr.",401===e.code||403===e.code)return d=void 0,r.removeItem("tumblrOauthParams"),i="Access to Tumblr account is not authorized.",t.retry(new Error(i),1),void 0;e.code<=0&&(n.setOffline(),i="|stopPublish")}t.error(new Error(i))}var d,p={},f=!1;return a.addListener("onOfflineChanged",function(e){f=e}),p.upload=function(n,i,r,o,a,p,f,h,m){var g=new s;l(g),c(g),g.onRun(function(){var s=e.extend({blog_hostname:n,post_id:i,tags:r,format:o,state:a,date:p,title:f,content:h},d);e.ajax({url:t.TUMBLR_PROXY_URL+"post",data:s,type:"POST",dataType:"json",timeout:t.AJAX_TIMEOUT}).done(function(e){i=e.id,g.chain()}).fail(function(e){var t={code:e.status,message:e.statusText};404===t.code&&void 0!==i&&(t="Post "+i+" not found on Tumblr.|removePublish"),u(t,g)})}),g.onSuccess(function(){m(void 0,i)}),g.onError(function(e){m(e)}),g.enqueue()},p}),define("providers/tumblrProvider",["underscore","settings","utils","classes/Provider","helpers/tumblrHelper"],function(e,t,n,i,r){var o=new i("tumblr","Tumblr");return o.publishPreferencesInputIds=["tumblr-hostname"],o.publish=function(n,i,o,a,s){var l=n.tags||[];i&&void 0!==i.tags&&(l=i.tags),e.isString(l)&&(l=e.compact(l.split(/[\s,]/)));var c=function(){if("html"==n.format)return"html";if("template"==n.format){var e=n.customTmpl||t.template;if(-1!==e.indexOf("documentHTML"))return"html"}return"markdown"}(),u=i&&i.published===!1?"draft":"published",d=i&&i.date;r.upload(n.blogHostname,n.postId,l.join(","),c,u,d,o,a,function(e,t){return e?(s(e),void 0):(n.postId=t,s(),void 0)})},o.newPublishAttributes=function(e){var t={};return t.blogHostname=n.getInputTextValue("#input-publish-tumblr-hostname",e,/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/),t.postId=n.getInputTextValue("#input-publish-postid"),e.isPropagationStopped()?void 0:t},o}),define("helpers/wordpressHelper",["jquery","constants","core","utils","storage","logger","eventMgr","classes/AsyncTask"],function(e,t,n,i,r,o,a,s){function l(e){e.onRun(function(){return f===!0?(e.error(new Error("Operation not available in offline mode.|stopPublish")),void 0):(e.chain(),void 0)})}function c(n){var o,a;n.onRun(function(){function s(){i.redirectConfirm("You are being redirected to WordPress authorization page.",function(){n.chain(l)},function(){n.error(new Error("Operation canceled."))})}function l(){r.removeItem("wordpressCode"),o=i.popupWindow("html/wordpress-oauth-client.html?client_id="+t.WORDPRESS_CLIENT_ID,"stackedit-wordpress-oauth",960,600),o.focus(),a=setInterval(function(){if(o.closed===!0){if(clearInterval(a),o=void 0,a=void 0,p=r.wordpressCode,void 0===p)return n.error(new Error(u)),void 0;r.removeItem("wordpressCode"),n.chain(c)}},500)}function c(){e.getJSON(t.WORDPRESS_PROXY_URL+"authenticate/"+p,function(e){void 0!==e.token?(d=e.token,r.wordpressToken=d,n.chain()):n.error(new Error(u))})}if(d=r.wordpressToken,void 0!==d)return n.chain(),void 0;var u="Failed to retrieve a token from Wordpress.";n.timeout=t.ASYNC_TASK_LONG_TIMEOUT;var p;n.chain(s)}),n.onError(function(){void 0!==a&&clearInterval(a),void 0!==o&&o.close()})}function u(e,t){var i;if(e)if(o.error(e),"string"==typeof e)i=e;else{if(i="Could not publish on WordPress.",400===e.code&&"invalid_token"==e.message||401===e.code||403===e.code)return r.removeItem("wordpressToken"),i="Access to WordPress account is not authorized.",t.retry(new Error(i),1),void 0;e.code<=0&&(n.setOffline(),i="|stopPublish")}t.error(new Error(i))}var d,p={},f=!1;return a.addListener("onOfflineChanged",function(e){f=e}),p.upload=function(n,i,r,o,a,p,f,h){var m=new s;l(m),c(m),m.onRun(function(){var s=t.WORDPRESS_PROXY_URL+"post",l={token:d,site:n,postId:i,tags:r,status:o,date:a,title:p,content:f};e.ajax({url:s,data:l,type:"POST",dataType:"json",timeout:t.AJAX_TIMEOUT}).done(function(e){if(e.body.ID)return i=e.body.ID,m.chain(),void 0;var t={code:e.code,message:e.body.error};404===t.code&&("unknown_blog"==t.message?t='Site "'+n+'" not found on WordPress.|removePublish':"unknown_post"==t.message&&(t="Post "+i+" not found on WordPress.|removePublish")),u(t,m)}).fail(function(e){var t={code:e.status,message:e.statusText};u(t,m)})}),m.onSuccess(function(){h(void 0,i)}),m.onError(function(e){h(e)}),m.enqueue()},p}),define("providers/wordpressProvider",["underscore","utils","classes/Provider","helpers/wordpressHelper"],function(e,t,n,i){var r=new n("wordpress","WordPress");return r.defaultPublishFormat="html",r.publishPreferencesInputIds=["wordpress-site"],r.publish=function(t,n,r,o,a){var s=t.tags||[];n&&void 0!==n.tags&&(s=n.tags);var l=n&&n.published===!1?"draft":"publish",c=n&&n.date;e.isString(s)&&(s=e.compact(s.split(/[\s,]/))),i.upload(t.site,t.postId,s.join(","),l,c,r,o,function(e,n){return e?(a(e),void 0):(t.postId=n,a(),void 0)})},r.newPublishAttributes=function(e){var n={};return n.site=t.getInputTextValue("#input-publish-wordpress-site",e,/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/),n.postId=t.getInputTextValue("#input-publish-postid"),e.isPropagationStopped()?void 0:n},r}),define("publisher",["jquery","underscore","constants","utils","storage","settings","eventMgr","fileSystem","fileMgr","sharing","classes/Provider","classes/AsyncTask","providers/bloggerProvider","providers/bloggerPageProvider","providers/dropboxProvider","providers/gistProvider","providers/githubProvider","providers/gdriveProvider","providers/gdrivesecProvider","providers/gdriveterProvider","providers/sshProvider","providers/tumblrProvider","providers/wordpressProvider"],function(e,t,n,i,r,o,a,s,l,c,u,d){function p(e,t,n){return void 0===t.format&&(t.format=i.getInputRadio("radio-publish-format"),"template"==t.format&&i.getInputChecked("#checkbox-publish-custom-template")&&(t.customTmpl=i.getInputValue("#textarea-publish-custom-template"))),"markdown"==t.format?e.content:"html"==t.format?n.withoutComments:v.applyTemplate(e,t,n)}function f(e,t){if(0===S.length)return e(t),void 0;var n=S.pop(),i=p(y,n,x),r=(y.frontMatter||{}).title||y.title;n.provider.publish(n,y.frontMatter,r,i,function(i){if(void 0!==i){var r=i.toString();if(-1!==r.indexOf("|removePublish")&&(y.removePublishLocation(n),a.onPublishRemoved(y,n)),-1!==r.indexOf("|stopPublish"))return e(i),void 0}f(e,t||i)})}function h(e,n){var o;do o="publish."+i.randomString();while(t.has(r,o));n.publishIndex=o,e.addPublishLocation(n),a.onNewPublishSuccess(e,n)}function m(n){var r=n.defaultPublishFormat||"markdown";E=n,e(".publish-provider-name").text(n.providerName),e('.modal-publish [class*=" modal-publish-"]').hide().filter(".modal-publish-"+n.providerId).show(),i.resetModalInputs(),i.setInputRadio("radio-publish-format",r),i.setInputChecked("#checkbox-publish-custom-template",!1),i.setInputValue("#textarea-publish-custom-template",o.template);var a=i.retrieveIgnoreError(n.providerId+".publishPreferences");a&&(t.each(n.publishPreferencesInputIds,function(e){var n=a[e];t.isBoolean(n)?i.setInputChecked("#input-publish-"+e,n):i.setInputValue("#input-publish-"+e,n)}),i.setInputRadio("radio-publish-format",a.format),i.setInputChecked("#checkbox-publish-custom-template",void 0!==a.customTmpl),i.setInputValue("#textarea-publish-custom-template",a.customTmpl||o.template)),e(".modal-publish").modal()}function g(e){var n=E,i=n.newPublishAttributes(e);if(void 0!==i){var o=l.currentFile,a=p(o,i,w),s=o.frontMatter&&o.frontMatter.title||o.title;n.publish(i,o.frontMatter,s,a,function(e){void 0===e&&(i.provider=n,c.createLink(i,function(){h(o,i)}))});var u={};t.each(n.publishPreferencesInputIds,function(e){var t=document.getElementById("input-publish-"+e);u[e]="checkbox"==t.type?t.checked:t.value}),u.format=i.format,u.customTmpl=i.customTmpl,r[n.providerId+".publishPreferences"]=JSON.stringify(u)}}var v={},b=t.chain(arguments).map(function(e){return e instanceof u&&e.isPublishEnabled===!0&&[e.providerId,e]}).compact().object().value();!function(){var e={};t.each(s,function(t){i.retrieveIndexArray(t.fileIndex+".publish").forEach(function(n){try{var o=JSON.parse(r[n]);o.publishIndex=n;var s=b[o.provider];if(!s)throw new Error("Invalid provider ID: "+o.provider);o.provider=s,t.publishLocations[n]=o,e[n]=o}catch(l){a.onError(l),i.removeIndexFromArray(t.fileIndex+".publish",n)}})}),Object.keys(r).forEach(function(t){var n=t.match(/publish\.\S+/);n&&!e.hasOwnProperty(n[0])&&r.removeItem(t)})}(),v.applyTemplate=function(e,n,i){try{var r=n&&n.customTmpl||o.template;return t.template(r,{documentTitle:e.title,documentMarkdown:e.content,strippedDocumentMarkdown:e.content.substring(e.frontMatter?e.frontMatter._frontMatter.length:0),documentHTML:i.withoutComments,documentHTMLWithComments:i.withComments,frontMatter:e.frontMatter,publishAttributes:n})}catch(s){return a.onError(s),s.message}};var y,x,w,S=[];a.addListener("onPreviewFinished",function(e,t){w={withComments:e,withoutComments:t}});var C=!1;a.addListener("onOfflineChanged",function(e){C=e});var T=!1;v.publish=function(){T!==!0&&C!==!0&&(T=!0,a.onPublishRunning(!0),y=l.currentFile,x=w,S=t.values(y.publishLocations),f(function(e){T=!1,a.onPublishRunning(!1),void 0===e&&a.onPublishSuccess(y)}))};var E,k=[" \n",' ',' <%= provider.providerName %>'," "," "].join("");return a.addListener("onReady",function(){if(window.viewerMode===!1){var r=document.querySelector(".menu-panel .publish-on-provider-list"),s=t.reduce(b,function(e,n){return e+t.template(k,{provider:n})},"");r.innerHTML=s,t.each(b,function(t){e(r.querySelector(".action-init-publish-"+t.providerId)).click(function(){m(t)}),e(".action-publish-"+t.providerId).click(function(){m(t)})})}e(".action-process-publish").click(g);var c=e(".publish-custom-template-collapse").collapse({toggle:!1}),u=e("#textarea-publish-custom-template"),p=t.debounce(function(){c.collapse("template"==i.getInputRadio("radio-publish-format")?"show":"hide")},100);e("#checkbox-publish-custom-template").change(function(){u.prop("disabled",!this.checked)}),e("input:radio[name=radio-publish-format]").change(function(){p()}),e(".modal-publish").on("hidden.bs.modal",function(){c.collapse("hide")}),e(".action-download-md").click(function(){var e=l.currentFile.content,t=l.currentFile.title;i.saveAs(e,t+".md")}),e(".action-download-html").click(function(){var e=l.currentFile.title;i.saveAs(w.withoutComments,e+".html")}),e(".action-download-template").click(function(){var e=l.currentFile,t=v.applyTemplate(e,void 0,w);i.saveAs(t,e.title+(-1===o.template.indexOf("documentHTML")?".md":".html"))}),e(".action-download-pdf").click(function(){var e,t=l.currentFile,r=v.applyTemplate(t,{customTmpl:o.pdfTemplate},w),s=new d;s.onRun(function(){if(C===!0)return a.onError("Operation not available in offline mode."),s.chain(),void 0;var t=new XMLHttpRequest;t.open("POST",n.HTMLTOPDF_URL,!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.setRequestHeader("page-size",o.pdfPageSize),t.responseType="blob",t.onreadystatechange=function(){4==this.readyState&&(200==this.status?e=this.response:a.onError("Error when trying to generate PDF: "+this.status),s.chain())},t.send(r)}),s.onSuccess(function(){void 0!==e&&i.saveAs(e,l.currentFile.title+".pdf")}),s.enqueue()})}),a.onPublisherCreated(v),v}),define("providers/gplusProvider",["jquery","underscore","utils","storage","classes/Provider","eventMgr","helpers/googleHelper"],function(e,t,n,i,r,o,a){function s(e,n){var i;return t.find(e.thumbnails,function(e){var t=!1;return e.url.replace(/^(.*[\/=]s)\d.*?(\/[^\/]+)?$/,function(e,r,o){i=r+n+(o||""),t=!0}),t}),i}function l(){return c.thumbnails?(n.resetModalInputs(),e(".modal-import-image img").prop("src",s(c,128)),n.setInputValue("#input-import-image-title",c.name),f&&n.setInputValue("#input-import-image-size",f.size),e(".modal-import-image").modal(),void 0):(o.onError("Image "+c.name+" is not accessible."),u(!0),void 0)}var c,u,d="gplus",p=new r(d,"Google+"),f=n.retrieveIgnoreError(d+".importImagePreferences");return p.importImage=function(e){u=e,a.picker(function(t,n){return t||0===n.length?(e(t),void 0):(c=n[0],l(),void 0)},"img")},p.uploadImage=function(t,n,i){u=i,a.uploadImg(t,n,"default",function(n,r){return n||!r?(i(n),void 0):(c={name:t,thumbnails:[]},e(r).find("thumbnail").each(function(){c.thumbnails.push({url:e(this).attr("url")})}),l(),void 0)})},o.addListener("onReady",function(){e(".action-import-image").click(function(){var e=n.getInputIntValue("#input-import-image-size",void 0,0)||0,t=n.getInputTextValue("#input-import-image-title"),r=s(c,e);t&&(r+=' "'+t+'"'),u(void 0,r),f={},e&&(f.size=e),i[d+".importImagePreferences"]=JSON.stringify(f)})}),p}),define("mediaImporter",["jquery","underscore","constants","classes/Provider","core","eventMgr","providers/gplusProvider"],function(e,t,n,i,r,o){var a={},s=t.chain(arguments).map(function(e){return e instanceof i&&[e.providerId,e]}).compact().object().value();return o.addListener("onReady",function(){function i(i){var o=(i.dataTransfer||i.target).files,a=t.first(o);if(a.name.match(/.(jpe?g|png|gif)$/i)){i.stopPropagation(),i.preventDefault();var l=new FileReader;l.onload=function(t){return function(n){var i=new Uint8Array(n.target.result);s.gplus.uploadImage(t.name,i,function(t,n){if(!t){r.catchModal=!0,e("#wmd-image-button").click(),r.catchModal=!1;var i=r.insertLinkCallback;r.insertLinkCallback=void 0,i(n||null)}})}}(a);var c=a.slice(0,n.IMPORT_IMG_MAX_CONTENT_SIZE);l.readAsArrayBuffer(c)}}function o(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy"}t.each(s,function(t){e(".action-import-image-"+t.providerId).click(function(){var e=r.insertLinkCallback;r.insertLinkCallback=void 0,t.importImage(function(t,n){return t?(e(null),void 0):(e(n||null),void 0)})})}),e("#wmd-input").each(function(){this.addEventListener("dragover",o,!1),this.addEventListener("drop",i,!1)})}),a}),define("css/css",[],function(){if("undefined"==typeof window)return{load:function(e,t,n){n()}};var e=document.getElementsByTagName("head")[0],t=window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)/)||0,n=!1,i=!0;t[1]||t[7]?n=parseInt(t[1])<6||parseInt(t[7])<=9:t[2]?i=!1:t[4]&&(n=parseInt(t[4])<18);var r={};r.pluginBuilder="./css-builder";var o,a,s,l=function(){o=document.createElement("style"),e.appendChild(o),a=o.styleSheet||o.sheet},c=0,u=[],d=function(e){c++,32==c&&(l(),c=0),a.addImport(e),o.onload=p},p=function(){s();var e=u.shift();e&&(s=e[1],d(e[0]))},f=function(e,t){if(a&&a.addImport||l(),a&&a.addImport)s?u.push([e,t]):(d(e),s=t);else{o.textContent='@import "'+e+'";';var n=setInterval(function(){try{o.sheet.cssRules,clearInterval(n),t()}catch(e){}},10)}},h=function(t,n){var r=document.createElement("link");if(r.type="text/css",r.rel="stylesheet",i)r.onload=function(){r.onload=function(){},setTimeout(n,7)};else var o=setInterval(function(){for(var e=0;eo;++o)if(n=e.attributes[o],r=n.name,"class"!=r){if(i=t.attributes.getNamedItem(r),n.specified!=i.specified)return!1;if(n.specified&&n.nodeValue!==i.nodeValue)return!1}return!0}function p(e,t){for(var n,i=0,r=e.attributes.length;r>i;++i)if(n=e.attributes[i].name,(!t||!k.arrayContains(t,n))&&e.attributes[i].specified&&"class"!=n)return!0;return!1}function f(e,t){for(var n in t)if(t.hasOwnProperty(n)&&e[n]!==t[n])return!1;return!0}function h(e){var t;return e&&1==e.nodeType&&((t=e.parentNode)&&9==t.nodeType&&"on"==t.designMode||D(e)&&!D(e.parentNode))}function m(e){return(D(e)||1!=e.nodeType&&D(e.parentNode))&&!h(e)}function g(e){return e&&1==e.nodeType&&!N.test(E(e,"display"))}function v(e){if(0==e.data.length)return!0;if(L.test(e.data))return!1;var t=E(e.parentNode,"whiteSpace");switch(t){case"pre":case"pre-wrap":case"-moz-pre-wrap":return!1;case"pre-line":if(/[\r\n]/.test(e.data))return!1}return g(e.previousSibling)||g(e.nextSibling)}function b(e,t){return k.isCharacterDataNode(e)?0==t?!!e.previousSibling:t==e.length?!!e.nextSibling:!0:t>0&&t a;++a)"*"==i[a]?this.applyToAnyTagName=!0:this.tagNames.push(i[a].toLowerCase());else this.tagNames=[this.elementTagName]}function T(e,t,n){return new C(e,t,n)}e.requireModules(["WrappedSelection","WrappedRange"]);var E,k=e.dom,_="span",I=function(){function e(e,t,n){return t&&n?" ":""}return function(t,n){t.className&&(t.className=t.className.replace(new RegExp("(?:^|\\s)"+n+"(?:\\s|$)"),e))}}();"undefined"!=typeof window.getComputedStyle?E=function(e,t){return k.getWindow(e).getComputedStyle(e,null)[t]}:"undefined"!=typeof document.documentElement.currentStyle?E=function(e,t){return e.currentStyle[t]}:t.fail("No means of obtaining computed style properties found");var D;!function(){var e=document.createElement("div");D="boolean"==typeof e.isContentEditable?function(e){return e&&1==e.nodeType&&e.isContentEditable}:function(e){return e&&1==e.nodeType&&"false"!=e.contentEditable?"true"==e.contentEditable||D(e.parentNode):!1}}();var N=/^inline(-block|-table)?$/i,L=/[^\r\n\t\f \u200B]/,M=w(!1),A=w(!0);S.prototype={doMerge:function(){for(var e,t,n,i=[],r=0,o=this.textNodes.length;o>r;++r)e=this.textNodes[r],t=e.parentNode,i[r]=e.data,r&&(t.removeChild(e),t.hasChildNodes()||t.parentNode.removeChild(t));return this.firstTextNode.data=n=i.join(""),n},getLength:function(){for(var e=this.textNodes.length,t=0;e--;)t+=this.textNodes[e].length;return t},toString:function(){for(var e=[],t=0,n=this.textNodes.length;n>t;++t)e[t]="'"+this.textNodes[t].data+"'";return"[Merge("+e.join(",")+")]"}};var R=["elementTagName","ignoreWhiteSpace","applyToEditableOnly"],P={"class":"className"};C.prototype={elementTagName:_,elementProperties:{},ignoreWhiteSpace:!0,applyToEditableOnly:!1,hasClass:function(e){return 1==e.nodeType&&k.arrayContains(this.tagNames,e.tagName.toLowerCase())&&i(e,this.cssClass)},getSelfOrAncestorWithClass:function(e){for(;e;){if(this.hasClass(e,this.cssClass))return e;e=e.parentNode}return null},isModifiable:function(e){return!this.applyToEditableOnly||m(e)},isIgnorableWhiteSpaceNode:function(e){return this.ignoreWhiteSpace&&e&&3==e.nodeType&&v(e)},postApply:function(e,t,n){for(var i,r,o,a=e[0],s=e[e.length-1],l=[],c=a,u=s,d=0,p=s.length,f=0,h=e.length;h>f;++f)r=e[f],o=M(r,!n),o?(i||(i=new S(o),l.push(i)),i.textNodes.push(r),r===a&&(c=i.firstTextNode,d=c.length),r===s&&(u=i.firstTextNode,p=i.getLength())):i=null;var m=A(s,!n);if(m&&(i||(i=new S(s),l.push(i)),i.textNodes.push(m)),l.length){for(f=0,h=l.length;h>f;++f)l[f].doMerge();t.setStart(c,d),t.setEnd(u,p)}},createContainer:function(t){var n=t.createElement(this.elementTagName);return e.util.extend(n,this.elementProperties),r(n,this.cssClass),n},applyToTextNode:function(e){var t=e.parentNode;if(1==t.childNodes.length&&k.arrayContains(this.tagNames,t.tagName.toLowerCase()))r(t,this.cssClass);else{var n=this.createContainer(k.getDocument(e));e.parentNode.insertBefore(n,e),n.appendChild(e)}},isRemovable:function(e){return e.tagName.toLowerCase()==this.elementTagName&&a(e)==this.elementSortedClassName&&f(e,this.elementProperties)&&!p(e,this.attrExceptions)&&this.isModifiable(e)},undoToTextNode:function(e,t,n){if(!t.containsNode(n)){var i=t.cloneRange();i.selectNode(n),i.isPointInRange(t.endContainer,t.endOffset)&&(y(n,t.endContainer,t.endOffset,[t]),t.setEndAfter(n)),i.isPointInRange(t.startContainer,t.startOffset)&&(n=y(n,t.startContainer,t.startOffset,[t]))}this.isRemovable(n)?l(n):I(n,this.cssClass)},applyToRange:function(e){e.splitBoundaries();var t=u(e);if(t.length){for(var n,i=0,r=t.length;r>i;++i)n=t[i],this.isIgnorableWhiteSpaceNode(n)||this.getSelfOrAncestorWithClass(n)||!this.isModifiable(n)||this.applyToTextNode(n); -e.setStart(t[0],0),n=t[t.length-1],e.setEnd(n,n.length),this.normalize&&this.postApply(t,e,!1)}},applyToSelection:function(t){t=t||window;var n,i=e.getSelection(t),r=i.getAllRanges();i.removeAllRanges();for(var o=r.length;o--;)n=r[o],this.applyToRange(n),i.addRange(n)},undoToRange:function(e){e.splitBoundaries();var t,n,i=u(e),r=i[i.length-1];if(i.length){for(var o=0,a=i.length;a>o;++o)t=i[o],n=this.getSelfOrAncestorWithClass(t),n&&this.isModifiable(t)&&this.undoToTextNode(t,e,n),e.setStart(i[0],0),e.setEnd(r,r.length);this.normalize&&this.postApply(i,e,!0)}},undoToSelection:function(t){t=t||window;var n,i=e.getSelection(t),r=i.getAllRanges();i.removeAllRanges();for(var o=0,a=r.length;a>o;++o)n=r[o],this.undoToRange(n),i.addRange(n)},getTextSelectedByRange:function(e,t){var n=t.cloneRange();n.selectNodeContents(e);var i=n.intersection(t),r=i?i.toString():"";return n.detach(),r},isAppliedToRange:function(e){if(e.collapsed)return!!this.getSelfOrAncestorWithClass(e.commonAncestorContainer);for(var t,n=e.getNodes([3]),i=0;t=n[i++];)if(!this.isIgnorableWhiteSpaceNode(t)&&c(e,t)&&this.isModifiable(t)&&!this.getSelfOrAncestorWithClass(t))return!1;return!0},isAppliedToSelection:function(t){t=t||window;for(var n=e.getSelection(t),i=n.getAllRanges(),r=i.length;r--;)if(!this.isAppliedToRange(i[r]))return!1;return!0},toggleRange:function(e){this.isAppliedToRange(e)?this.undoToRange(e):this.applyToRange(e)},toggleSelection:function(e){this.isAppliedToSelection(e)?this.undoToSelection(e):this.applyToSelection(e)},detach:function(){}},C.util={hasClass:i,addClass:r,removeClass:I,hasSameClasses:s,replaceWithOwnChildren:l,elementsHaveSameNonClassAttributes:d,elementHasNonClassAttributes:p,splitNodeAt:y,isEditableElement:D,isEditingHost:h,isEditable:m},e.CssClassApplier=C,e.createCssClassApplier=T}),define("rangy-cssclassapplier",function(){}),requirejs.config({waitSeconds:0,packages:[{name:"css",location:"bower-libs/require-css",main:"css"},{name:"less",location:"bower-libs/require-less",main:"less"}],paths:{jquery:"bower-libs/jquery/jquery",underscore:"bower-libs/underscore/underscore",crel:"bower-libs/crel/crel",jgrowl:"bower-libs/jgrowl/jquery.jgrowl",mousetrap:"bower-libs/mousetrap/mousetrap","mousetrap-record":"bower-libs/mousetrap/plugins/record/mousetrap-record",toMarkdown:"bower-libs/to-markdown/src/to-markdown",text:"bower-libs/requirejs-text/text",mathjax:"../libs/MathJax/MathJax.js?config=TeX-AMS_HTML",bootstrap:"bower-libs/bootstrap/dist/js/bootstrap",requirejs:"bower-libs/requirejs/require","google-code-prettify":"bower-libs/google-code-prettify/src/prettify",highlightjs:"libs/highlight/highlight.pack","jquery-waitforimages":"bower-libs/waitForImages/src/jquery.waitforimages","jquery-ui":"bower-libs/jquery-ui/ui/jquery-ui","jquery-ui-core":"bower-libs/jquery-ui/ui/jquery.ui.core","jquery-ui-widget":"bower-libs/jquery-ui/ui/jquery.ui.widget","jquery-ui-mouse":"bower-libs/jquery-ui/ui/jquery.ui.mouse","jquery-ui-draggable":"bower-libs/jquery-ui/ui/jquery.ui.draggable","jquery-ui-effect":"bower-libs/jquery-ui/ui/jquery.ui.effect","jquery-ui-effect-slide":"bower-libs/jquery-ui/ui/jquery.ui.effect-slide",FileSaver:"bower-libs/FileSaver/FileSaver",stacktrace:"bower-libs/stacktrace/stacktrace","requirejs-text":"bower-libs/requirejs-text/text","bootstrap-tour":"bower-libs/bootstrap-tour/build/js/bootstrap-tour",css_browser_selector:"bower-libs/css_browser_selector/css_browser_selector","pagedown-extra":"bower-libs/pagedown-extra/Markdown.Extra",pagedown:"libs/Markdown.Editor","require-css":"bower-libs/require-css/css",xregexp:"bower-libs/xregexp/xregexp-all",yaml:"bower-libs/yaml.js","yaml.js":"bower-libs/yaml.js","yaml-js":"bower-libs/yaml.js/bin/yaml",css:"bower-libs/require-css/css","css-builder":"bower-libs/require-css/css-builder",normalize:"bower-libs/require-css/normalize",prism:"bower-libs/prism/prism","prism-core":"bower-libs/prism/components/prism-core",MutationObservers:"bower-libs/MutationObservers/MutationObserver",WeakMap:"bower-libs/WeakMap/weakmap",rangy:"bower-libs/rangy/rangy-core","rangy-cssclassapplier":"bower-libs/rangy/rangy-cssclassapplier",diff_match_patch:"bower-libs/google-diff-match-patch-js/diff_match_patch",diff_match_patch_uncompressed:"bower-libs/google-diff-match-patch-js/diff_match_patch_uncompressed",jsondiffpatch:"bower-libs/jsondiffpatch/build/bundle",hammerjs:"bower-libs/hammerjs/hammer"},shim:{underscore:{exports:"_"},mathjax:["libs/mathjax_init"],jgrowl:{deps:["jquery"],exports:"jQuery.jGrowl"},diff_match_patch_uncompressed:{exports:"diff_match_patch"},jsondiffpatch:["diff_match_patch_uncompressed"],rangy:{exports:"rangy"},"rangy-cssclassapplier":["rangy"],mousetrap:{exports:"Mousetrap"},"yaml-js":{exports:"YAML"},"prism-core":{exports:"Prism"},"bower-libs/prism/components/prism-markup":["prism-core"],"libs/prism-latex":["prism-core"],"libs/prism-markdown":["bower-libs/prism/components/prism-markup","libs/prism-latex"],"bootstrap-record":["mousetrap"],toMarkdown:{deps:["jquery"],exports:"toMarkdown"},stacktrace:{exports:"printStackTrace"},FileSaver:{exports:"saveAs"},MutationObservers:["WeakMap"],highlightjs:{exports:"hljs"},"bootstrap-tour":{deps:["bootstrap"],exports:"Tour"},bootstrap:["jquery"],"jquery-waitforimages":["jquery"],pagedown:["libs/Markdown.Converter"],"pagedown-extra":["libs/Markdown.Converter"]}});try{var test="seLocalStorageCheck";localStorage.setItem(test,test),localStorage.removeItem(test);var obj={};Object.defineProperty(obj,"prop",{get:function(){},set:function(){}})}catch(e){throw alert("Your browser is not supported, sorry!"),e}window.viewerMode=/(^| )viewer($| )/.test(document.body.className),window.theme=localStorage.themeV3||"default";var themeModule="less!themes/"+window.theme;-1!==window.baseDir.indexOf("-min")&&(themeModule="css!themes/"+window.theme),require(["jquery","rangy","core","eventMgr","synchronizer","publisher","mediaImporter","css","rangy-cssclassapplier",themeModule],function(e,t,n,i){window.noStart||e(function(){t.init(),n.onReady(),window.applicationCache&&window.applicationCache.addEventListener("updateready",function(){window.applicationCache.status===window.applicationCache.UPDATEREADY&&(window.applicationCache.swapCache(),i.onMessage("New version available!\nJust refresh the page to upgrade."))},!1)})}),define("main",function(){}); ->>>>>>> 754d9153095ec89be57ca8bd2144ddbac1b0eebb + */ + +function printStackTrace(e) { + e = e || { + guess: !0 + }; + var t = e.e || null, + n = !! e.guess, + i = new printStackTrace.implementation, + r = i.run(t); + return n ? i.guessAnonymousFunctions(r) : r +} + +function diff_match_patch() { + this.Diff_Timeout = 1, this.Diff_EditCost = 4, this.Match_Threshold = .5, this.Match_Distance = 1e3, this.Patch_DeleteThreshold = .5, this.Patch_Margin = 4, this.Match_MaxBits = 32 +}! function(e, t) { + function n(e) { + var t = e.length, + n = ot.type(e); + return ot.isWindow(e) ? !1 : 1 === e.nodeType && t ? !0 : "array" === n || "function" !== n && (0 === t || "number" == typeof t && t > 0 && t - 1 in e) + } + + function i(e) { + var t = ht[e] = {}; + return ot.each(e.match(st) || [], function(e, n) { + t[n] = !0 + }), t + } + + function r() { + Object.defineProperty(this.cache = {}, 0, { + get: function() { + return {} + } + }), this.expando = ot.expando + Math.random() + } + + function o(e, n, i) { + var r; + if(i === t && 1 === e.nodeType) + if(r = "data-" + n.replace(bt, "-$1").toLowerCase(), i = e.getAttribute(r), "string" == typeof i) { + try { + i = "true" === i ? !0 : "false" === i ? !1 : "null" === i ? null : +i + "" === i ? +i : vt.test(i) ? JSON.parse(i) : i + } catch(o) {} + mt.set(e, n, i) + } else i = t; + return i + } + + function a() { + return !0 + } + + function s() { + return !1 + } + + function l() { + try { + return z.activeElement + } catch(e) {} + } + + function c(e, t) { + for(; + (e = e[t]) && 1 !== e.nodeType;); + return e + } + + function u(e, t, n) { + if(ot.isFunction(t)) return ot.grep(e, function(e, i) { + return !!t.call(e, i, e) !== n + }); + if(t.nodeType) return ot.grep(e, function(e) { + return e === t !== n + }); + if("string" == typeof t) { + if(It.test(t)) return ot.filter(t, e, n); + t = ot.filter(t, e) + } + return ot.grep(e, function(e) { + return tt.call(t, e) >= 0 !== n + }) + } + + function d(e, t) { + return ot.nodeName(e, "table") && ot.nodeName(1 === t.nodeType ? t : t.firstChild, "tr") ? e.getElementsByTagName("tbody")[0] || e.appendChild(e.ownerDocument.createElement("tbody")) : e + } + + function p(e) { + return e.type = (null !== e.getAttribute("type")) + "/" + e.type, e + } + + function f(e) { + var t = jt.exec(e.type); + return t ? e.type = t[1] : e.removeAttribute("type"), e + } + + function h(e, t) { + for(var n = e.length, i = 0; n > i; i++) gt.set(e[i], "globalEval", !t || gt.get(t[i], "globalEval")) + } + + function m(e, t) { + var n, i, r, o, a, s, l, c; + if(1 === t.nodeType) { + if(gt.hasData(e) && (o = gt.access(e), a = gt.set(t, o), c = o.events)) { + delete a.handle, a.events = {}; + for(r in c) + for(n = 0, i = c[r].length; i > n; n++) ot.event.add(t, r, c[r][n]) + } + mt.hasData(e) && (s = mt.access(e), l = ot.extend({}, s), mt.set(t, l)) + } + } + + function g(e, n) { + var i = e.getElementsByTagName ? e.getElementsByTagName(n || "*") : e.querySelectorAll ? e.querySelectorAll(n || "*") : []; + return n === t || n && ot.nodeName(e, n) ? ot.merge([e], i) : i + } + + function v(e, t) { + var n = t.nodeName.toLowerCase(); + "input" === n && Ft.test(e.type) ? t.checked = e.checked : ("input" === n || "textarea" === n) && (t.defaultValue = e.defaultValue) + } + + function b(e, t) { + if(t in e) return t; + for(var n = t.charAt(0).toUpperCase() + t.slice(1), i = t, r = Zt.length; r--;) + if(t = Zt[r] + n, t in e) return t; + return i + } + + function y(e, t) { + return e = t || e, "none" === ot.css(e, "display") || !ot.contains(e.ownerDocument, e) + } + + function x(t) { + return e.getComputedStyle(t, null) + } + + function w(e, t) { + for(var n, i, r, o = [], a = 0, s = e.length; s > a; a++) i = e[a], i.style && (o[a] = gt.get(i, "olddisplay"), n = i.style.display, t ? (o[a] || "none" !== n || (i.style.display = ""), "" === i.style.display && y(i) && (o[a] = gt.access(i, "olddisplay", E(i.nodeName)))) : o[a] || (r = y(i), (n && "none" !== n || !r) && gt.set(i, "olddisplay", r ? n : ot.css(i, "display")))); + for(a = 0; s > a; a++) i = e[a], i.style && (t && "none" !== i.style.display && "" !== i.style.display || (i.style.display = t ? o[a] || "" : "none")); + return e + } + + function S(e, t, n) { + var i = Vt.exec(t); + return i ? Math.max(0, i[1] - (n || 0)) + (i[2] || "px") : t + } + + function C(e, t, n, i, r) { + for(var o = n === (i ? "border" : "content") ? 4 : "width" === t ? 1 : 0, a = 0; 4 > o; o += 2) "margin" === n && (a += ot.css(e, n + Yt[o], !0, r)), i ? ("content" === n && (a -= ot.css(e, "padding" + Yt[o], !0, r)), "margin" !== n && (a -= ot.css(e, "border" + Yt[o] + "Width", !0, r))) : (a += ot.css(e, "padding" + Yt[o], !0, r), "padding" !== n && (a += ot.css(e, "border" + Yt[o] + "Width", !0, r))); + return a + } + + function T(e, t, n) { + var i = !0, + r = "width" === t ? e.offsetWidth : e.offsetHeight, + o = x(e), + a = ot.support.boxSizing && "border-box" === ot.css(e, "boxSizing", !1, o); + if(0 >= r || null == r) { + if(r = Ht(e, t, o), (0 > r || null == r) && (r = e.style[t]), Wt.test(r)) return r; + i = a && (ot.support.boxSizingReliable || r === e.style[t]), r = parseFloat(r) || 0 + } + return r + C(e, t, n || (a ? "border" : "content"), i, o) + "px" + } + + function E(e) { + var t = z, + n = Xt[e]; + return n || (n = k(e, t), "none" !== n && n || (qt = (qt || ot("").css("cssText", "display:block !important")).appendTo(t.documentElement), t = (qt[0].contentWindow || qt[0].contentDocument).document, t.write(""), t.close(), n = k(e, t), qt.detach()), Xt[e] = n), n + } + + function k(e, t) { + var n = ot(t.createElement(e)).appendTo(t.body), + i = ot.css(n[0], "display"); + return n.remove(), i + } + + function _(e, t, n, i) { + var r; + if(ot.isArray(t)) ot.each(t, function(t, r) { + n || tn.test(e) ? i(e, r) : _(e + "[" + ("object" == typeof r ? t : "") + "]", r, n, i) + }); + else if(n || "object" !== ot.type(t)) i(e, t); + else + for(r in t) _(e + "[" + r + "]", t[r], n, i) + } + + function I(e) { + return function(t, n) { + "string" != typeof t && (n = t, t = "*"); + var i, r = 0, + o = t.toLowerCase().match(st) || []; + if(ot.isFunction(n)) + for(; i = o[r++];) "+" === i[0] ? (i = i.slice(1) || "*", (e[i] = e[i] || []).unshift(n)) : (e[i] = e[i] || []).push(n) + } + } + + function D(e, t, n, i) { + function r(s) { + var l; + return o[s] = !0, ot.each(e[s] || [], function(e, s) { + var c = s(t, n, i); + return "string" != typeof c || a || o[c] ? a ? !(l = c) : void 0 : (t.dataTypes.unshift(c), r(c), !1) + }), l + } + var o = {}, a = e === yn; + return r(t.dataTypes[0]) || !o["*"] && r("*") + } + + function N(e, n) { + var i, r, o = ot.ajaxSettings.flatOptions || {}; + for(i in n) n[i] !== t && ((o[i] ? e : r || (r = {}))[i] = n[i]); + return r && ot.extend(!0, e, r), e + } + + function L(e, n, i) { + for(var r, o, a, s, l = e.contents, c = e.dataTypes; + "*" === c[0];) c.shift(), r === t && (r = e.mimeType || n.getResponseHeader("Content-Type")); + if(r) + for(o in l) + if(l[o] && l[o].test(r)) { + c.unshift(o); + break + } + if(c[0] in i) a = c[0]; + else { + for(o in i) { + if(!c[0] || e.converters[o + " " + c[0]]) { + a = o; + break + } + s || (s = o) + } + a = a || s + } + return a ? (a !== c[0] && c.unshift(a), i[a]) : void 0 + } + + function M(e, t, n, i) { + var r, o, a, s, l, c = {}, u = e.dataTypes.slice(); + if(u[1]) + for(a in e.converters) c[a.toLowerCase()] = e.converters[a]; + for(o = u.shift(); o;) + if(e.responseFields[o] && (n[e.responseFields[o]] = t), !l && i && e.dataFilter && (t = e.dataFilter(t, e.dataType)), l = o, o = u.shift()) + if("*" === o) o = l; + else if("*" !== l && l !== o) { + if(a = c[l + " " + o] || c["* " + o], !a) + for(r in c) + if(s = r.split(" "), s[1] === o && (a = c[l + " " + s[0]] || c["* " + s[0]])) { + a === !0 ? a = c[r] : c[r] !== !0 && (o = s[0], u.unshift(s[1])); + break + } + if(a !== !0) + if(a && e["throws"]) t = a(t); + else try { + t = a(t) + } catch(d) { + return { + state: "parsererror", + error: a ? d : "No conversion from " + l + " to " + o + } + } + } + return { + state: "success", + data: t + } + } + + function A() { + return setTimeout(function() { + In = t + }), In = ot.now() + } + + function R(e, t, n) { + for(var i, r = (Rn[t] || []).concat(Rn["*"]), o = 0, a = r.length; a > o; o++) + if(i = r[o].call(n, t, e)) return i + } + + function P(e, t, n) { + var i, r, o = 0, + a = An.length, + s = ot.Deferred().always(function() { + delete l.elem + }), + l = function() { + if(r) return !1; + for(var t = In || A(), n = Math.max(0, c.startTime + c.duration - t), i = n / c.duration || 0, o = 1 - i, a = 0, l = c.tweens.length; l > a; a++) c.tweens[a].run(o); + return s.notifyWith(e, [c, o, n]), 1 > o && l ? n : (s.resolveWith(e, [c]), !1) + }, c = s.promise({ + elem: e, + props: ot.extend({}, t), + opts: ot.extend(!0, { + specialEasing: {} + }, n), + originalProperties: t, + originalOptions: n, + startTime: In || A(), + duration: n.duration, + tweens: [], + createTween: function(t, n) { + var i = ot.Tween(e, c.opts, t, n, c.opts.specialEasing[t] || c.opts.easing); + return c.tweens.push(i), i + }, + stop: function(t) { + var n = 0, + i = t ? c.tweens.length : 0; + if(r) return this; + for(r = !0; i > n; n++) c.tweens[n].run(1); + return t ? s.resolveWith(e, [c, t]) : s.rejectWith(e, [c, t]), this + } + }), + u = c.props; + for(F(u, c.opts.specialEasing); a > o; o++) + if(i = An[o].call(c, e, u, c.opts)) return i; + return ot.map(u, R, c), ot.isFunction(c.opts.start) && c.opts.start.call(e, c), ot.fx.timer(ot.extend(l, { + elem: e, + anim: c, + queue: c.opts.queue + })), c.progress(c.opts.progress).done(c.opts.done, c.opts.complete).fail(c.opts.fail).always(c.opts.always) + } + + function F(e, t) { + var n, i, r, o, a; + for(n in e) + if(i = ot.camelCase(n), r = t[i], o = e[n], ot.isArray(o) && (r = o[1], o = e[n] = o[0]), n !== i && (e[i] = o, delete e[n]), a = ot.cssHooks[i], a && "expand" in a) { + o = a.expand(o), delete e[i]; + for(n in o) n in e || (e[n] = o[n], t[n] = r) + } else t[i] = r + } + + function O(e, n, i) { + var r, o, a, s, l, c, u = this, + d = {}, p = e.style, + f = e.nodeType && y(e), + h = gt.get(e, "fxshow"); + i.queue || (l = ot._queueHooks(e, "fx"), null == l.unqueued && (l.unqueued = 0, c = l.empty.fire, l.empty.fire = function() { + l.unqueued || c() + }), l.unqueued++, u.always(function() { + u.always(function() { + l.unqueued--, ot.queue(e, "fx").length || l.empty.fire() + }) + })), 1 === e.nodeType && ("height" in n || "width" in n) && (i.overflow = [p.overflow, p.overflowX, p.overflowY], "inline" === ot.css(e, "display") && "none" === ot.css(e, "float") && (p.display = "inline-block")), i.overflow && (p.overflow = "hidden", u.always(function() { + p.overflow = i.overflow[0], p.overflowX = i.overflow[1], p.overflowY = i.overflow[2] + })); + for(r in n) + if(o = n[r], Nn.exec(o)) { + if(delete n[r], a = a || "toggle" === o, o === (f ? "hide" : "show")) { + if("show" !== o || !h || h[r] === t) continue; + f = !0 + } + d[r] = h && h[r] || ot.style(e, r) + } + if(!ot.isEmptyObject(d)) { + h ? "hidden" in h && (f = h.hidden) : h = gt.access(e, "fxshow", {}), a && (h.hidden = !f), f ? ot(e).show() : u.done(function() { + ot(e).hide() + }), u.done(function() { + var t; + gt.remove(e, "fxshow"); + for(t in d) ot.style(e, t, d[t]) + }); + for(r in d) s = R(f ? h[r] : 0, r, u), r in h || (h[r] = s.start, f && (s.end = s.start, s.start = "width" === r || "height" === r ? 1 : 0)) + } + } + + function B(e, t, n, i, r) { + return new B.prototype.init(e, t, n, i, r) + } + + function j(e, t) { + var n, i = { + height: e + }, r = 0; + for(t = t ? 1 : 0; 4 > r; r += 2 - t) n = Yt[r], i["margin" + n] = i["padding" + n] = e; + return t && (i.opacity = i.width = e), i + } + + function $(e) { + return ot.isWindow(e) ? e : 9 === e.nodeType && e.defaultView + } + var G, H, q = typeof t, + U = e.location, + z = e.document, + V = z.documentElement, + W = e.jQuery, + Q = e.$, + X = {}, K = [], + J = "2.0.3", + Y = K.concat, + Z = K.push, + et = K.slice, + tt = K.indexOf, + nt = X.toString, + it = X.hasOwnProperty, + rt = J.trim, + ot = function(e, t) { + return new ot.fn.init(e, t, G) + }, at = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, + st = /\S+/g, + lt = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + ct = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + ut = /^-ms-/, + dt = /-([\da-z])/gi, + pt = function(e, t) { + return t.toUpperCase() + }, ft = function() { + z.removeEventListener("DOMContentLoaded", ft, !1), e.removeEventListener("load", ft, !1), ot.ready() + }; + ot.fn = ot.prototype = { + jquery: J, + constructor: ot, + init: function(e, n, i) { + var r, o; + if(!e) return this; + if("string" == typeof e) { + if(r = "<" === e.charAt(0) && ">" === e.charAt(e.length - 1) && e.length >= 3 ? [null, e, null] : lt.exec(e), !r || !r[1] && n) return !n || n.jquery ? (n || i).find(e) : this.constructor(n).find(e); + if(r[1]) { + if(n = n instanceof ot ? n[0] : n, ot.merge(this, ot.parseHTML(r[1], n && n.nodeType ? n.ownerDocument || n : z, !0)), ct.test(r[1]) && ot.isPlainObject(n)) + for(r in n) ot.isFunction(this[r]) ? this[r](n[r]) : this.attr(r, n[r]); + return this + } + return o = z.getElementById(r[2]), o && o.parentNode && (this.length = 1, this[0] = o), this.context = z, this.selector = e, this + } + return e.nodeType ? (this.context = this[0] = e, this.length = 1, this) : ot.isFunction(e) ? i.ready(e) : (e.selector !== t && (this.selector = e.selector, this.context = e.context), ot.makeArray(e, this)) + }, + selector: "", + length: 0, + toArray: function() { + return et.call(this) + }, + get: function(e) { + return null == e ? this.toArray() : 0 > e ? this[this.length + e] : this[e] + }, + pushStack: function(e) { + var t = ot.merge(this.constructor(), e); + return t.prevObject = this, t.context = this.context, t + }, + each: function(e, t) { + return ot.each(this, e, t) + }, + ready: function(e) { + return ot.ready.promise().done(e), this + }, + slice: function() { + return this.pushStack(et.apply(this, arguments)) + }, + first: function() { + return this.eq(0) + }, + last: function() { + return this.eq(-1) + }, + eq: function(e) { + var t = this.length, + n = +e + (0 > e ? t : 0); + return this.pushStack(n >= 0 && t > n ? [this[n]] : []) + }, + map: function(e) { + return this.pushStack(ot.map(this, function(t, n) { + return e.call(t, n, t) + })) + }, + end: function() { + return this.prevObject || this.constructor(null) + }, + push: Z, + sort: [].sort, + splice: [].splice + }, ot.fn.init.prototype = ot.fn, ot.extend = ot.fn.extend = function() { + var e, n, i, r, o, a, s = arguments[0] || {}, l = 1, + c = arguments.length, + u = !1; + for("boolean" == typeof s && (u = s, s = arguments[1] || {}, l = 2), "object" == typeof s || ot.isFunction(s) || (s = {}), c === l && (s = this, --l); c > l; l++) + if(null != (e = arguments[l])) + for(n in e) i = s[n], r = e[n], s !== r && (u && r && (ot.isPlainObject(r) || (o = ot.isArray(r))) ? (o ? (o = !1, a = i && ot.isArray(i) ? i : []) : a = i && ot.isPlainObject(i) ? i : {}, s[n] = ot.extend(u, a, r)) : r !== t && (s[n] = r)); + return s + }, ot.extend({ + expando: "jQuery" + (J + Math.random()).replace(/\D/g, ""), + noConflict: function(t) { + return e.$ === ot && (e.$ = Q), t && e.jQuery === ot && (e.jQuery = W), ot + }, + isReady: !1, + readyWait: 1, + holdReady: function(e) { + e ? ot.readyWait++ : ot.ready(!0) + }, + ready: function(e) { + (e === !0 ? --ot.readyWait : ot.isReady) || (ot.isReady = !0, e !== !0 && --ot.readyWait > 0 || (H.resolveWith(z, [ot]), ot.fn.trigger && ot(z).trigger("ready").off("ready"))) + }, + isFunction: function(e) { + return "function" === ot.type(e) + }, + isArray: Array.isArray, + isWindow: function(e) { + return null != e && e === e.window + }, + isNumeric: function(e) { + return !isNaN(parseFloat(e)) && isFinite(e) + }, + type: function(e) { + return null == e ? String(e) : "object" == typeof e || "function" == typeof e ? X[nt.call(e)] || "object" : typeof e + }, + isPlainObject: function(e) { + if("object" !== ot.type(e) || e.nodeType || ot.isWindow(e)) return !1; + try { + if(e.constructor && !it.call(e.constructor.prototype, "isPrototypeOf")) return !1 + } catch(t) { + return !1 + } + return !0 + }, + isEmptyObject: function(e) { + var t; + for(t in e) return !1; + return !0 + }, + error: function(e) { + throw new Error(e) + }, + parseHTML: function(e, t, n) { + if(!e || "string" != typeof e) return null; + "boolean" == typeof t && (n = t, t = !1), t = t || z; + var i = ct.exec(e), + r = !n && []; + return i ? [t.createElement(i[1])] : (i = ot.buildFragment([e], t, r), r && ot(r).remove(), ot.merge([], i.childNodes)) + }, + parseJSON: JSON.parse, + parseXML: function(e) { + var n, i; + if(!e || "string" != typeof e) return null; + try { + i = new DOMParser, n = i.parseFromString(e, "text/xml") + } catch(r) { + n = t + } + return(!n || n.getElementsByTagName("parsererror").length) && ot.error("Invalid XML: " + e), n + }, + noop: function() {}, + globalEval: function(e) { + var t, n = eval; + e = ot.trim(e), e && (1 === e.indexOf("use strict") ? (t = z.createElement("script"), t.text = e, z.head.appendChild(t).parentNode.removeChild(t)) : n(e)) + }, + camelCase: function(e) { + return e.replace(ut, "ms-").replace(dt, pt) + }, + nodeName: function(e, t) { + return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase() + }, + each: function(e, t, i) { + var r, o = 0, + a = e.length, + s = n(e); + if(i) { + if(s) + for(; a > o && (r = t.apply(e[o], i), r !== !1); o++); + else + for(o in e) + if(r = t.apply(e[o], i), r === !1) break + } else if(s) + for(; a > o && (r = t.call(e[o], o, e[o]), r !== !1); o++); + else + for(o in e) + if(r = t.call(e[o], o, e[o]), r === !1) break; return e + }, + trim: function(e) { + return null == e ? "" : rt.call(e) + }, + makeArray: function(e, t) { + var i = t || []; + return null != e && (n(Object(e)) ? ot.merge(i, "string" == typeof e ? [e] : e) : Z.call(i, e)), i + }, + inArray: function(e, t, n) { + return null == t ? -1 : tt.call(t, e, n) + }, + merge: function(e, n) { + var i = n.length, + r = e.length, + o = 0; + if("number" == typeof i) + for(; i > o; o++) e[r++] = n[o]; + else + for(; n[o] !== t;) e[r++] = n[o++]; + return e.length = r, e + }, + grep: function(e, t, n) { + var i, r = [], + o = 0, + a = e.length; + for(n = !! n; a > o; o++) i = !! t(e[o], o), n !== i && r.push(e[o]); + return r + }, + map: function(e, t, i) { + var r, o = 0, + a = e.length, + s = n(e), + l = []; + if(s) + for(; a > o; o++) r = t(e[o], o, i), null != r && (l[l.length] = r); + else + for(o in e) r = t(e[o], o, i), null != r && (l[l.length] = r); + return Y.apply([], l) + }, + guid: 1, + proxy: function(e, n) { + var i, r, o; + return "string" == typeof n && (i = e[n], n = e, e = i), ot.isFunction(e) ? (r = et.call(arguments, 2), o = function() { + return e.apply(n || this, r.concat(et.call(arguments))) + }, o.guid = e.guid = e.guid || ot.guid++, o) : t + }, + access: function(e, n, i, r, o, a, s) { + var l = 0, + c = e.length, + u = null == i; + if("object" === ot.type(i)) { + o = !0; + for(l in i) ot.access(e, n, l, i[l], !0, a, s) + } else if(r !== t && (o = !0, ot.isFunction(r) || (s = !0), u && (s ? (n.call(e, r), n = null) : (u = n, n = function(e, t, n) { + return u.call(ot(e), n) + })), n)) + for(; c > l; l++) n(e[l], i, s ? r : r.call(e[l], l, n(e[l], i))); + return o ? e : u ? n.call(e) : c ? n(e[0], i) : a + }, + now: Date.now, + swap: function(e, t, n, i) { + var r, o, a = {}; + for(o in t) a[o] = e.style[o], e.style[o] = t[o]; + r = n.apply(e, i || []); + for(o in t) e.style[o] = a[o]; + return r + } + }), ot.ready.promise = function(t) { + return H || (H = ot.Deferred(), "complete" === z.readyState ? setTimeout(ot.ready) : (z.addEventListener("DOMContentLoaded", ft, !1), e.addEventListener("load", ft, !1))), H.promise(t) + }, ot.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(e, t) { + X["[object " + t + "]"] = t.toLowerCase() + }), G = ot(z), + function(e, t) { + function n(e, t, n, i) { + var r, o, a, s, l, c, u, d, h, m; + if((t ? t.ownerDocument || t : $) !== M && L(t), t = t || M, n = n || [], !e || "string" != typeof e) return n; + if(1 !== (s = t.nodeType) && 9 !== s) return []; + if(R && !i) { + if(r = yt.exec(e)) + if(a = r[1]) { + if(9 === s) { + if(o = t.getElementById(a), !o || !o.parentNode) return n; + if(o.id === a) return n.push(o), n + } else if(t.ownerDocument && (o = t.ownerDocument.getElementById(a)) && B(t, o) && o.id === a) return n.push(o), n + } else { + if(r[2]) return et.apply(n, t.getElementsByTagName(e)), n; + if((a = r[3]) && C.getElementsByClassName && t.getElementsByClassName) return et.apply(n, t.getElementsByClassName(a)), n + } + if(C.qsa && (!P || !P.test(e))) { + if(d = u = j, h = t, m = 9 === s && e, 1 === s && "object" !== t.nodeName.toLowerCase()) { + for(c = p(e), (u = t.getAttribute("id")) ? d = u.replace(St, "\\$&") : t.setAttribute("id", d), d = "[id='" + d + "'] ", l = c.length; l--;) c[l] = d + f(c[l]); + h = ft.test(e) && t.parentNode || t, m = c.join(",") + } + if(m) try { + return et.apply(n, h.querySelectorAll(m)), n + } catch(g) {} finally { + u || t.removeAttribute("id") + } + } + } + return w(e.replace(ut, "$1"), t, n, i) + } + + function i() { + function e(n, i) { + return t.push(n += " ") > E.cacheLength && delete e[t.shift()], e[n] = i + } + var t = []; + return e + } + + function r(e) { + return e[j] = !0, e + } + + function o(e) { + var t = M.createElement("div"); + try { + return !!e(t) + } catch(n) { + return !1 + } finally { + t.parentNode && t.parentNode.removeChild(t), t = null + } + } + + function a(e, t) { + for(var n = e.split("|"), i = e.length; i--;) E.attrHandle[n[i]] = t + } + + function s(e, t) { + var n = t && e, + i = n && 1 === e.nodeType && 1 === t.nodeType && (~t.sourceIndex || X) - (~e.sourceIndex || X); + if(i) return i; + if(n) + for(; n = n.nextSibling;) + if(n === t) return -1; + return e ? 1 : -1 + } + + function l(e) { + return function(t) { + var n = t.nodeName.toLowerCase(); + return "input" === n && t.type === e + } + } + + function c(e) { + return function(t) { + var n = t.nodeName.toLowerCase(); + return("input" === n || "button" === n) && t.type === e + } + } + + function u(e) { + return r(function(t) { + return t = +t, r(function(n, i) { + for(var r, o = e([], n.length, t), a = o.length; a--;) n[r = o[a]] && (n[r] = !(i[r] = n[r])) + }) + }) + } + + function d() {} + + function p(e, t) { + var i, r, o, a, s, l, c, u = U[e + " "]; + if(u) return t ? 0 : u.slice(0); + for(s = e, l = [], c = E.preFilter; s;) { + (!i || (r = dt.exec(s))) && (r && (s = s.slice(r[0].length) || s), l.push(o = [])), i = !1, (r = pt.exec(s)) && (i = r.shift(), o.push({ + value: i, + type: r[0].replace(ut, " ") + }), s = s.slice(i.length)); + for(a in E.filter)!(r = vt[a].exec(s)) || c[a] && !(r = c[a](r)) || (i = r.shift(), o.push({ + value: i, + type: a, + matches: r + }), s = s.slice(i.length)); + if(!i) break + } + return t ? s.length : s ? n.error(e) : U(e, l).slice(0) + } + + function f(e) { + for(var t = 0, n = e.length, i = ""; n > t; t++) i += e[t].value; + return i + } + + function h(e, t, n) { + var i = t.dir, + r = n && "parentNode" === i, + o = H++; + return t.first ? function(t, n, o) { + for(; t = t[i];) + if(1 === t.nodeType || r) return e(t, n, o) + } : function(t, n, a) { + var s, l, c, u = G + " " + o; + if(a) { + for(; t = t[i];) + if((1 === t.nodeType || r) && e(t, n, a)) return !0 + } else + for(; t = t[i];) + if(1 === t.nodeType || r) + if(c = t[j] || (t[j] = {}), (l = c[i]) && l[0] === u) { + if((s = l[1]) === !0 || s === T) return s === !0 + } else if(l = c[i] = [u], l[1] = e(t, n, a) || T, l[1] === !0) return !0 + } + } + + function m(e) { + return e.length > 1 ? function(t, n, i) { + for(var r = e.length; r--;) + if(!e[r](t, n, i)) return !1; + return !0 + } : e[0] + } + + function g(e, t, n, i, r) { + for(var o, a = [], s = 0, l = e.length, c = null != t; l > s; s++)(o = e[s]) && (!n || n(o, i, r)) && (a.push(o), c && t.push(s)); + return a + } + + function v(e, t, n, i, o, a) { + return i && !i[j] && (i = v(i)), o && !o[j] && (o = v(o, a)), r(function(r, a, s, l) { + var c, u, d, p = [], + f = [], + h = a.length, + m = r || x(t || "*", s.nodeType ? [s] : s, []), + v = !e || !r && t ? m : g(m, p, e, s, l), + b = n ? o || (r ? e : h || i) ? [] : a : v; + if(n && n(v, b, s, l), i) + for(c = g(b, f), i(c, [], s, l), u = c.length; u--;)(d = c[u]) && (b[f[u]] = !(v[f[u]] = d)); + if(r) { + if(o || e) { + if(o) { + for(c = [], u = b.length; u--;)(d = b[u]) && c.push(v[u] = d); + o(null, b = [], c, l) + } + for(u = b.length; u--;)(d = b[u]) && (c = o ? nt.call(r, d) : p[u]) > -1 && (r[c] = !(a[c] = d)) + } + } else b = g(b === a ? b.splice(h, b.length) : b), o ? o(null, a, b, l) : et.apply(a, b) + }) + } + + function b(e) { + for(var t, n, i, r = e.length, o = E.relative[e[0].type], a = o || E.relative[" "], s = o ? 1 : 0, l = h(function(e) { + return e === t + }, a, !0), c = h(function(e) { + return nt.call(t, e) > -1 + }, a, !0), u = [ + function(e, n, i) { + return !o && (i || n !== D) || ((t = n).nodeType ? l(e, n, i) : c(e, n, i)) + }]; r > s; s++) + if(n = E.relative[e[s].type]) u = [h(m(u), n)]; + else { + if(n = E.filter[e[s].type].apply(null, e[s].matches), n[j]) { + for(i = ++s; r > i && !E.relative[e[i].type]; i++); + return v(s > 1 && m(u), s > 1 && f(e.slice(0, s - 1).concat({ + value: " " === e[s - 2].type ? "*" : "" + })).replace(ut, "$1"), n, i > s && b(e.slice(s, i)), r > i && b(e = e.slice(i)), r > i && f(e)) + } + u.push(n) + } + return m(u) + } + + function y(e, t) { + var i = 0, + o = t.length > 0, + a = e.length > 0, + s = function(r, s, l, c, u) { + var d, p, f, h = [], + m = 0, + v = "0", + b = r && [], + y = null != u, + x = D, + w = r || a && E.find.TAG("*", u && s.parentNode || s), + S = G += null == x ? 1 : Math.random() || .1; + for(y && (D = s !== M && s, T = i); null != (d = w[v]); v++) { + if(a && d) { + for(p = 0; f = e[p++];) + if(f(d, s, l)) { + c.push(d); + break + } + y && (G = S, T = ++i) + } + o && ((d = !f && d) && m--, r && b.push(d)) + } + if(m += v, o && v !== m) { + for(p = 0; f = t[p++];) f(b, h, s, l); + if(r) { + if(m > 0) + for(; v--;) b[v] || h[v] || (h[v] = Y.call(c)); + h = g(h) + } + et.apply(c, h), y && !r && h.length > 0 && m + t.length > 1 && n.uniqueSort(c) + } + return y && (G = S, D = x), b + }; + return o ? r(s) : s + } + + function x(e, t, i) { + for(var r = 0, o = t.length; o > r; r++) n(e, t[r], i); + return i + } + + function w(e, t, n, i) { + var r, o, a, s, l, c = p(e); + if(!i && 1 === c.length) { + if(o = c[0] = c[0].slice(0), o.length > 2 && "ID" === (a = o[0]).type && C.getById && 9 === t.nodeType && R && E.relative[o[1].type]) { + if(t = (E.find.ID(a.matches[0].replace(Ct, Tt), t) || [])[0], !t) return n; + e = e.slice(o.shift().value.length) + } + for(r = vt.needsContext.test(e) ? 0 : o.length; r-- && (a = o[r], !E.relative[s = a.type]);) + if((l = E.find[s]) && (i = l(a.matches[0].replace(Ct, Tt), ft.test(o[0].type) && t.parentNode || t))) { + if(o.splice(r, 1), e = i.length && f(o), !e) return et.apply(n, i), n; + break + } + } + return I(e, c)(i, t, !R, n, ft.test(e)), n + } + var S, C, T, E, k, _, I, D, N, L, M, A, R, P, F, O, B, j = "sizzle" + -new Date, + $ = e.document, + G = 0, + H = 0, + q = i(), + U = i(), + z = i(), + V = !1, + W = function(e, t) { + return e === t ? (V = !0, 0) : 0 + }, Q = typeof t, + X = 1 << 31, + K = {}.hasOwnProperty, + J = [], + Y = J.pop, + Z = J.push, + et = J.push, + tt = J.slice, + nt = J.indexOf || function(e) { + for(var t = 0, n = this.length; n > t; t++) + if(this[t] === e) return t; + return -1 + }, it = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + rt = "[\\x20\\t\\r\\n\\f]", + at = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + st = at.replace("w", "w#"), + lt = "\\[" + rt + "*(" + at + ")" + rt + "*(?:([*^$|!~]?=)" + rt + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + st + ")|)|)" + rt + "*\\]", + ct = ":(" + at + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + lt.replace(3, 8) + ")*)|.*)\\)|)", + ut = new RegExp("^" + rt + "+|((?:^|[^\\\\])(?:\\\\.)*)" + rt + "+$", "g"), + dt = new RegExp("^" + rt + "*," + rt + "*"), + pt = new RegExp("^" + rt + "*([>+~]|" + rt + ")" + rt + "*"), + ft = new RegExp(rt + "*[+~]"), + ht = new RegExp("=" + rt + "*([^\\]'\"]*)" + rt + "*\\]", "g"), + mt = new RegExp(ct), + gt = new RegExp("^" + st + "$"), + vt = { + ID: new RegExp("^#(" + at + ")"), + CLASS: new RegExp("^\\.(" + at + ")"), + TAG: new RegExp("^(" + at.replace("w", "w*") + ")"), + ATTR: new RegExp("^" + lt), + PSEUDO: new RegExp("^" + ct), + CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + rt + "*(even|odd|(([+-]|)(\\d*)n|)" + rt + "*(?:([+-]|)" + rt + "*(\\d+)|))" + rt + "*\\)|)", "i"), + bool: new RegExp("^(?:" + it + ")$", "i"), + needsContext: new RegExp("^" + rt + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + rt + "*((?:-\\d)?\\d*)" + rt + "*\\)|)(?=[^-]|$)", "i") + }, bt = /^[^{]+\{\s*\[native \w/, + yt = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + xt = /^(?:input|select|textarea|button)$/i, + wt = /^h\d$/i, + St = /'|\\/g, + Ct = new RegExp("\\\\([\\da-f]{1,6}" + rt + "?|(" + rt + ")|.)", "ig"), + Tt = function(e, t, n) { + var i = "0x" + t - 65536; + return i !== i || n ? t : 0 > i ? String.fromCharCode(i + 65536) : String.fromCharCode(i >> 10 | 55296, 1023 & i | 56320) + }; + try { + et.apply(J = tt.call($.childNodes), $.childNodes), J[$.childNodes.length].nodeType + } catch(Et) { + et = { + apply: J.length ? function(e, t) { + Z.apply(e, tt.call(t)) + } : function(e, t) { + for(var n = e.length, i = 0; e[n++] = t[i++];); + e.length = n - 1 + } + } + } + _ = n.isXML = function(e) { + var t = e && (e.ownerDocument || e).documentElement; + return t ? "HTML" !== t.nodeName : !1 + }, C = n.support = {}, L = n.setDocument = function(e) { + var t = e ? e.ownerDocument || e : $, + n = t.defaultView; + return t !== M && 9 === t.nodeType && t.documentElement ? (M = t, A = t.documentElement, R = !_(t), n && n.attachEvent && n !== n.top && n.attachEvent("onbeforeunload", function() { + L() + }), C.attributes = o(function(e) { + return e.className = "i", !e.getAttribute("className") + }), C.getElementsByTagName = o(function(e) { + return e.appendChild(t.createComment("")), !e.getElementsByTagName("*").length + }), C.getElementsByClassName = o(function(e) { + return e.innerHTML = "", e.firstChild.className = "i", 2 === e.getElementsByClassName("i").length + }), C.getById = o(function(e) { + return A.appendChild(e).id = j, !t.getElementsByName || !t.getElementsByName(j).length + }), C.getById ? (E.find.ID = function(e, t) { + if(typeof t.getElementById !== Q && R) { + var n = t.getElementById(e); + return n && n.parentNode ? [n] : [] + } + }, E.filter.ID = function(e) { + var t = e.replace(Ct, Tt); + return function(e) { + return e.getAttribute("id") === t + } + }) : (delete E.find.ID, E.filter.ID = function(e) { + var t = e.replace(Ct, Tt); + return function(e) { + var n = typeof e.getAttributeNode !== Q && e.getAttributeNode("id"); + return n && n.value === t + } + }), E.find.TAG = C.getElementsByTagName ? function(e, t) { + return typeof t.getElementsByTagName !== Q ? t.getElementsByTagName(e) : void 0 + } : function(e, t) { + var n, i = [], + r = 0, + o = t.getElementsByTagName(e); + if("*" === e) { + for(; n = o[r++];) 1 === n.nodeType && i.push(n); + return i + } + return o + }, E.find.CLASS = C.getElementsByClassName && function(e, t) { + return typeof t.getElementsByClassName !== Q && R ? t.getElementsByClassName(e) : void 0 + }, F = [], P = [], (C.qsa = bt.test(t.querySelectorAll)) && (o(function(e) { + e.innerHTML = "", e.querySelectorAll("[selected]").length || P.push("\\[" + rt + "*(?:value|" + it + ")"), e.querySelectorAll(":checked").length || P.push(":checked") + }), o(function(e) { + var n = t.createElement("input"); + n.setAttribute("type", "hidden"), e.appendChild(n).setAttribute("t", ""), e.querySelectorAll("[t^='']").length && P.push("[*^$]=" + rt + "*(?:''|\"\")"), e.querySelectorAll(":enabled").length || P.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), P.push(",.*:") + })), (C.matchesSelector = bt.test(O = A.webkitMatchesSelector || A.mozMatchesSelector || A.oMatchesSelector || A.msMatchesSelector)) && o(function(e) { + C.disconnectedMatch = O.call(e, "div"), O.call(e, "[s!='']:x"), F.push("!=", ct) + }), P = P.length && new RegExp(P.join("|")), F = F.length && new RegExp(F.join("|")), B = bt.test(A.contains) || A.compareDocumentPosition ? function(e, t) { + var n = 9 === e.nodeType ? e.documentElement : e, + i = t && t.parentNode; + return e === i || !(!i || 1 !== i.nodeType || !(n.contains ? n.contains(i) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(i))) + } : function(e, t) { + if(t) + for(; t = t.parentNode;) + if(t === e) return !0; + return !1 + }, W = A.compareDocumentPosition ? function(e, n) { + if(e === n) return V = !0, 0; + var i = n.compareDocumentPosition && e.compareDocumentPosition && e.compareDocumentPosition(n); + return i ? 1 & i || !C.sortDetached && n.compareDocumentPosition(e) === i ? e === t || B($, e) ? -1 : n === t || B($, n) ? 1 : N ? nt.call(N, e) - nt.call(N, n) : 0 : 4 & i ? -1 : 1 : e.compareDocumentPosition ? -1 : 1 + } : function(e, n) { + var i, r = 0, + o = e.parentNode, + a = n.parentNode, + l = [e], + c = [n]; + if(e === n) return V = !0, 0; + if(!o || !a) return e === t ? -1 : n === t ? 1 : o ? -1 : a ? 1 : N ? nt.call(N, e) - nt.call(N, n) : 0; + if(o === a) return s(e, n); + for(i = e; i = i.parentNode;) l.unshift(i); + for(i = n; i = i.parentNode;) c.unshift(i); + for(; l[r] === c[r];) r++; + return r ? s(l[r], c[r]) : l[r] === $ ? -1 : c[r] === $ ? 1 : 0 + }, t) : M + }, n.matches = function(e, t) { + return n(e, null, null, t) + }, n.matchesSelector = function(e, t) { + if((e.ownerDocument || e) !== M && L(e), t = t.replace(ht, "='$1']"), !(!C.matchesSelector || !R || F && F.test(t) || P && P.test(t))) try { + var i = O.call(e, t); + if(i || C.disconnectedMatch || e.document && 11 !== e.document.nodeType) return i + } catch(r) {} + return n(t, M, null, [e]).length > 0 + }, n.contains = function(e, t) { + return(e.ownerDocument || e) !== M && L(e), B(e, t) + }, n.attr = function(e, n) { + (e.ownerDocument || e) !== M && L(e); + var i = E.attrHandle[n.toLowerCase()], + r = i && K.call(E.attrHandle, n.toLowerCase()) ? i(e, n, !R) : t; + return r === t ? C.attributes || !R ? e.getAttribute(n) : (r = e.getAttributeNode(n)) && r.specified ? r.value : null : r + }, n.error = function(e) { + throw new Error("Syntax error, unrecognized expression: " + e) + }, n.uniqueSort = function(e) { + var t, n = [], + i = 0, + r = 0; + if(V = !C.detectDuplicates, N = !C.sortStable && e.slice(0), e.sort(W), V) { + for(; t = e[r++];) t === e[r] && (i = n.push(r)); + for(; i--;) e.splice(n[i], 1) + } + return e + }, k = n.getText = function(e) { + var t, n = "", + i = 0, + r = e.nodeType; + if(r) { + if(1 === r || 9 === r || 11 === r) { + if("string" == typeof e.textContent) return e.textContent; + for(e = e.firstChild; e; e = e.nextSibling) n += k(e) + } else if(3 === r || 4 === r) return e.nodeValue + } else + for(; t = e[i]; i++) n += k(t); + return n + }, E = n.selectors = { + cacheLength: 50, + createPseudo: r, + match: vt, + attrHandle: {}, + find: {}, + relative: { + ">": { + dir: "parentNode", + first: !0 + }, + " ": { + dir: "parentNode" + }, + "+": { + dir: "previousSibling", + first: !0 + }, + "~": { + dir: "previousSibling" + } + }, + preFilter: { + ATTR: function(e) { + return e[1] = e[1].replace(Ct, Tt), e[3] = (e[4] || e[5] || "").replace(Ct, Tt), "~=" === e[2] && (e[3] = " " + e[3] + " "), e.slice(0, 4) + }, + CHILD: function(e) { + return e[1] = e[1].toLowerCase(), "nth" === e[1].slice(0, 3) ? (e[3] || n.error(e[0]), e[4] = +(e[4] ? e[5] + (e[6] || 1) : 2 * ("even" === e[3] || "odd" === e[3])), e[5] = +(e[7] + e[8] || "odd" === e[3])) : e[3] && n.error(e[0]), e + }, + PSEUDO: function(e) { + var n, i = !e[5] && e[2]; + return vt.CHILD.test(e[0]) ? null : (e[3] && e[4] !== t ? e[2] = e[4] : i && mt.test(i) && (n = p(i, !0)) && (n = i.indexOf(")", i.length - n) - i.length) && (e[0] = e[0].slice(0, n), e[2] = i.slice(0, n)), e.slice(0, 3)) + } + }, + filter: { + TAG: function(e) { + var t = e.replace(Ct, Tt).toLowerCase(); + return "*" === e ? function() { + return !0 + } : function(e) { + return e.nodeName && e.nodeName.toLowerCase() === t + } + }, + CLASS: function(e) { + var t = q[e + " "]; + return t || (t = new RegExp("(^|" + rt + ")" + e + "(" + rt + "|$)")) && q(e, function(e) { + return t.test("string" == typeof e.className && e.className || typeof e.getAttribute !== Q && e.getAttribute("class") || "") + }) + }, + ATTR: function(e, t, i) { + return function(r) { + var o = n.attr(r, e); + return null == o ? "!=" === t : t ? (o += "", "=" === t ? o === i : "!=" === t ? o !== i : "^=" === t ? i && 0 === o.indexOf(i) : "*=" === t ? i && o.indexOf(i) > -1 : "$=" === t ? i && o.slice(-i.length) === i : "~=" === t ? (" " + o + " ").indexOf(i) > -1 : "|=" === t ? o === i || o.slice(0, i.length + 1) === i + "-" : !1) : !0 + } + }, + CHILD: function(e, t, n, i, r) { + var o = "nth" !== e.slice(0, 3), + a = "last" !== e.slice(-4), + s = "of-type" === t; + return 1 === i && 0 === r ? function(e) { + return !!e.parentNode + } : function(t, n, l) { + var c, u, d, p, f, h, m = o !== a ? "nextSibling" : "previousSibling", + g = t.parentNode, + v = s && t.nodeName.toLowerCase(), + b = !l && !s; + if(g) { + if(o) { + for(; m;) { + for(d = t; d = d[m];) + if(s ? d.nodeName.toLowerCase() === v : 1 === d.nodeType) return !1; + h = m = "only" === e && !h && "nextSibling" + } + return !0 + } + if(h = [a ? g.firstChild : g.lastChild], a && b) { + for(u = g[j] || (g[j] = {}), c = u[e] || [], f = c[0] === G && c[1], p = c[0] === G && c[2], d = f && g.childNodes[f]; d = ++f && d && d[m] || (p = f = 0) || h.pop();) + if(1 === d.nodeType && ++p && d === t) { + u[e] = [G, f, p]; + break + } + } else if(b && (c = (t[j] || (t[j] = {}))[e]) && c[0] === G) p = c[1]; + else + for(; + (d = ++f && d && d[m] || (p = f = 0) || h.pop()) && ((s ? d.nodeName.toLowerCase() !== v : 1 !== d.nodeType) || !++p || (b && ((d[j] || (d[j] = {}))[e] = [G, p]), d !== t));); + return p -= r, p === i || p % i === 0 && p / i >= 0 + } + } + }, + PSEUDO: function(e, t) { + var i, o = E.pseudos[e] || E.setFilters[e.toLowerCase()] || n.error("unsupported pseudo: " + e); + return o[j] ? o(t) : o.length > 1 ? (i = [e, e, "", t], E.setFilters.hasOwnProperty(e.toLowerCase()) ? r(function(e, n) { + for(var i, r = o(e, t), a = r.length; a--;) i = nt.call(e, r[a]), e[i] = !(n[i] = r[a]) + }) : function(e) { + return o(e, 0, i) + }) : o + } + }, + pseudos: { + not: r(function(e) { + var t = [], + n = [], + i = I(e.replace(ut, "$1")); + return i[j] ? r(function(e, t, n, r) { + for(var o, a = i(e, null, r, []), s = e.length; s--;)(o = a[s]) && (e[s] = !(t[s] = o)) + }) : function(e, r, o) { + return t[0] = e, i(t, null, o, n), !n.pop() + } + }), + has: r(function(e) { + return function(t) { + return n(e, t).length > 0 + } + }), + contains: r(function(e) { + return function(t) { + return(t.textContent || t.innerText || k(t)).indexOf(e) > -1 + } + }), + lang: r(function(e) { + return gt.test(e || "") || n.error("unsupported lang: " + e), e = e.replace(Ct, Tt).toLowerCase(), + function(t) { + var n; + do + if(n = R ? t.lang : t.getAttribute("xml:lang") || t.getAttribute("lang")) return n = n.toLowerCase(), n === e || 0 === n.indexOf(e + "-"); while((t = t.parentNode) && 1 === t.nodeType); + return !1 + } + }), + target: function(t) { + var n = e.location && e.location.hash; + return n && n.slice(1) === t.id + }, + root: function(e) { + return e === A + }, + focus: function(e) { + return e === M.activeElement && (!M.hasFocus || M.hasFocus()) && !! (e.type || e.href || ~e.tabIndex) + }, + enabled: function(e) { + return e.disabled === !1 + }, + disabled: function(e) { + return e.disabled === !0 + }, + checked: function(e) { + var t = e.nodeName.toLowerCase(); + return "input" === t && !! e.checked || "option" === t && !! e.selected + }, + selected: function(e) { + return e.parentNode && e.parentNode.selectedIndex, e.selected === !0 + }, + empty: function(e) { + for(e = e.firstChild; e; e = e.nextSibling) + if(e.nodeName > "@" || 3 === e.nodeType || 4 === e.nodeType) return !1; + return !0 + }, + parent: function(e) { + return !E.pseudos.empty(e) + }, + header: function(e) { + return wt.test(e.nodeName) + }, + input: function(e) { + return xt.test(e.nodeName) + }, + button: function(e) { + var t = e.nodeName.toLowerCase(); + return "input" === t && "button" === e.type || "button" === t + }, + text: function(e) { + var t; + return "input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (t = e.getAttribute("type")) || t.toLowerCase() === e.type) + }, + first: u(function() { + return [0] + }), + last: u(function(e, t) { + return [t - 1] + }), + eq: u(function(e, t, n) { + return [0 > n ? n + t : n] + }), + even: u(function(e, t) { + for(var n = 0; t > n; n += 2) e.push(n); + return e + }), + odd: u(function(e, t) { + for(var n = 1; t > n; n += 2) e.push(n); + return e + }), + lt: u(function(e, t, n) { + for(var i = 0 > n ? n + t : n; --i >= 0;) e.push(i); + return e + }), + gt: u(function(e, t, n) { + for(var i = 0 > n ? n + t : n; ++i < t;) e.push(i); + return e + }) + } + }, E.pseudos.nth = E.pseudos.eq; + for(S in { + radio: !0, + checkbox: !0, + file: !0, + password: !0, + image: !0 + }) E.pseudos[S] = l(S); + for(S in { + submit: !0, + reset: !0 + }) E.pseudos[S] = c(S); + d.prototype = E.filters = E.pseudos, E.setFilters = new d, I = n.compile = function(e, t) { + var n, i = [], + r = [], + o = z[e + " "]; + if(!o) { + for(t || (t = p(e)), n = t.length; n--;) o = b(t[n]), o[j] ? i.push(o) : r.push(o); + o = z(e, y(r, i)) + } + return o + }, C.sortStable = j.split("").sort(W).join("") === j, C.detectDuplicates = V, L(), C.sortDetached = o(function(e) { + return 1 & e.compareDocumentPosition(M.createElement("div")) + }), o(function(e) { + return e.innerHTML = "", "#" === e.firstChild.getAttribute("href") + }) || a("type|href|height|width", function(e, t, n) { + return n ? void 0 : e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2) + }), C.attributes && o(function(e) { + return e.innerHTML = "", e.firstChild.setAttribute("value", ""), "" === e.firstChild.getAttribute("value") + }) || a("value", function(e, t, n) { + return n || "input" !== e.nodeName.toLowerCase() ? void 0 : e.defaultValue + }), o(function(e) { + return null == e.getAttribute("disabled") + }) || a(it, function(e, t, n) { + var i; + return n ? void 0 : (i = e.getAttributeNode(t)) && i.specified ? i.value : e[t] === !0 ? t.toLowerCase() : null + }), ot.find = n, ot.expr = n.selectors, ot.expr[":"] = ot.expr.pseudos, ot.unique = n.uniqueSort, ot.text = n.getText, ot.isXMLDoc = n.isXML, ot.contains = n.contains + }(e); + var ht = {}; + ot.Callbacks = function(e) { + e = "string" == typeof e ? ht[e] || i(e) : ot.extend({}, e); + var n, r, o, a, s, l, c = [], + u = !e.once && [], + d = function(t) { + for(n = e.memory && t, r = !0, l = a || 0, a = 0, s = c.length, o = !0; c && s > l; l++) + if(c[l].apply(t[0], t[1]) === !1 && e.stopOnFalse) { + n = !1; + break + } + o = !1, c && (u ? u.length && d(u.shift()) : n ? c = [] : p.disable()) + }, p = { + add: function() { + if(c) { + var t = c.length; + ! function i(t) { + ot.each(t, function(t, n) { + var r = ot.type(n); + "function" === r ? e.unique && p.has(n) || c.push(n) : n && n.length && "string" !== r && i(n) + }) + }(arguments), o ? s = c.length : n && (a = t, d(n)) + } + return this + }, + remove: function() { + return c && ot.each(arguments, function(e, t) { + for(var n; + (n = ot.inArray(t, c, n)) > -1;) c.splice(n, 1), o && (s >= n && s--, l >= n && l--) + }), this + }, + has: function(e) { + return e ? ot.inArray(e, c) > -1 : !(!c || !c.length) + }, + empty: function() { + return c = [], s = 0, this + }, + disable: function() { + return c = u = n = t, this + }, + disabled: function() { + return !c + }, + lock: function() { + return u = t, n || p.disable(), this + }, + locked: function() { + return !u + }, + fireWith: function(e, t) { + return !c || r && !u || (t = t || [], t = [e, t.slice ? t.slice() : t], o ? u.push(t) : d(t)), this + }, + fire: function() { + return p.fireWith(this, arguments), this + }, + fired: function() { + return !!r + } + }; + return p + }, ot.extend({ + Deferred: function(e) { + var t = [["resolve", "done", ot.Callbacks("once memory"), "resolved"], ["reject", "fail", ot.Callbacks("once memory"), "rejected"], ["notify", "progress", ot.Callbacks("memory")]], + n = "pending", + i = { + state: function() { + return n + }, + always: function() { + return r.done(arguments).fail(arguments), this + }, + then: function() { + var e = arguments; + return ot.Deferred(function(n) { + ot.each(t, function(t, o) { + var a = o[0], + s = ot.isFunction(e[t]) && e[t]; + r[o[1]](function() { + var e = s && s.apply(this, arguments); + e && ot.isFunction(e.promise) ? e.promise().done(n.resolve).fail(n.reject).progress(n.notify) : n[a + "With"](this === i ? n.promise() : this, s ? [e] : arguments) + }) + }), e = null + }).promise() + }, + promise: function(e) { + return null != e ? ot.extend(e, i) : i + } + }, r = {}; + return i.pipe = i.then, ot.each(t, function(e, o) { + var a = o[2], + s = o[3]; + i[o[1]] = a.add, s && a.add(function() { + n = s + }, t[1 ^ e][2].disable, t[2][2].lock), r[o[0]] = function() { + return r[o[0] + "With"](this === r ? i : this, arguments), this + }, r[o[0] + "With"] = a.fireWith + }), i.promise(r), e && e.call(r, r), r + }, + when: function(e) { + var t, n, i, r = 0, + o = et.call(arguments), + a = o.length, + s = 1 !== a || e && ot.isFunction(e.promise) ? a : 0, + l = 1 === s ? e : ot.Deferred(), + c = function(e, n, i) { + return function(r) { + n[e] = this, i[e] = arguments.length > 1 ? et.call(arguments) : r, i === t ? l.notifyWith(n, i) : --s || l.resolveWith(n, i) + } + }; + if(a > 1) + for(t = new Array(a), n = new Array(a), i = new Array(a); a > r; r++) o[r] && ot.isFunction(o[r].promise) ? o[r].promise().done(c(r, i, o)).fail(l.reject).progress(c(r, n, t)) : --s; + return s || l.resolveWith(i, o), l.promise() + } + }), ot.support = function(t) { + var n = z.createElement("input"), + i = z.createDocumentFragment(), + r = z.createElement("div"), + o = z.createElement("select"), + a = o.appendChild(z.createElement("option")); + return n.type ? (n.type = "checkbox", t.checkOn = "" !== n.value, t.optSelected = a.selected, t.reliableMarginRight = !0, t.boxSizingReliable = !0, t.pixelPosition = !1, n.checked = !0, t.noCloneChecked = n.cloneNode(!0).checked, o.disabled = !0, t.optDisabled = !a.disabled, n = z.createElement("input"), n.value = "t", n.type = "radio", t.radioValue = "t" === n.value, n.setAttribute("checked", "t"), n.setAttribute("name", "t"), i.appendChild(n), t.checkClone = i.cloneNode(!0).cloneNode(!0).lastChild.checked, t.focusinBubbles = "onfocusin" in e, r.style.backgroundClip = "content-box", r.cloneNode(!0).style.backgroundClip = "", t.clearCloneStyle = "content-box" === r.style.backgroundClip, ot(function() { + var n, i, o = "padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box", + a = z.getElementsByTagName("body")[0]; + a && (n = z.createElement("div"), n.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px", a.appendChild(n).appendChild(r), r.innerHTML = "", r.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%", ot.swap(a, null != a.style.zoom ? { + zoom: 1 + } : {}, function() { + t.boxSizing = 4 === r.offsetWidth + }), e.getComputedStyle && (t.pixelPosition = "1%" !== (e.getComputedStyle(r, null) || {}).top, t.boxSizingReliable = "4px" === (e.getComputedStyle(r, null) || { + width: "4px" + }).width, i = r.appendChild(z.createElement("div")), i.style.cssText = r.style.cssText = o, i.style.marginRight = i.style.width = "0", r.style.width = "1px", t.reliableMarginRight = !parseFloat((e.getComputedStyle(i, null) || {}).marginRight)), a.removeChild(n)) + }), t) : t + }({}); + var mt, gt, vt = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, + bt = /([A-Z])/g; + r.uid = 1, r.accepts = function(e) { + return e.nodeType ? 1 === e.nodeType || 9 === e.nodeType : !0 + }, r.prototype = { + key: function(e) { + if(!r.accepts(e)) return 0; + var t = {}, n = e[this.expando]; + if(!n) { + n = r.uid++; + try { + t[this.expando] = { + value: n + }, Object.defineProperties(e, t) + } catch(i) { + t[this.expando] = n, ot.extend(e, t) + } + } + return this.cache[n] || (this.cache[n] = {}), n + }, + set: function(e, t, n) { + var i, r = this.key(e), + o = this.cache[r]; + if("string" == typeof t) o[t] = n; + else if(ot.isEmptyObject(o)) ot.extend(this.cache[r], t); + else + for(i in t) o[i] = t[i]; + return o + }, + get: function(e, n) { + var i = this.cache[this.key(e)]; + return n === t ? i : i[n] + }, + access: function(e, n, i) { + var r; + return n === t || n && "string" == typeof n && i === t ? (r = this.get(e, n), r !== t ? r : this.get(e, ot.camelCase(n))) : (this.set(e, n, i), i !== t ? i : n) + }, + remove: function(e, n) { + var i, r, o, a = this.key(e), + s = this.cache[a]; + if(n === t) this.cache[a] = {}; + else { + ot.isArray(n) ? r = n.concat(n.map(ot.camelCase)) : (o = ot.camelCase(n), n in s ? r = [n, o] : (r = o, r = r in s ? [r] : r.match(st) || [])), i = r.length; + for(; i--;) delete s[r[i]] + } + }, + hasData: function(e) { + return !ot.isEmptyObject(this.cache[e[this.expando]] || {}) + }, + discard: function(e) { + e[this.expando] && delete this.cache[e[this.expando]] + } + }, mt = new r, gt = new r, ot.extend({ + acceptData: r.accepts, + hasData: function(e) { + return mt.hasData(e) || gt.hasData(e) + }, + data: function(e, t, n) { + return mt.access(e, t, n) + }, + removeData: function(e, t) { + mt.remove(e, t) + }, + _data: function(e, t, n) { + return gt.access(e, t, n) + }, + _removeData: function(e, t) { + gt.remove(e, t) + } + }), ot.fn.extend({ + data: function(e, n) { + var i, r, a = this[0], + s = 0, + l = null; + if(e === t) { + if(this.length && (l = mt.get(a), 1 === a.nodeType && !gt.get(a, "hasDataAttrs"))) { + for(i = a.attributes; s < i.length; s++) r = i[s].name, 0 === r.indexOf("data-") && (r = ot.camelCase(r.slice(5)), o(a, r, l[r])); + gt.set(a, "hasDataAttrs", !0) + } + return l + } + return "object" == typeof e ? this.each(function() { + mt.set(this, e) + }) : ot.access(this, function(n) { + var i, r = ot.camelCase(e); + if(a && n === t) { + if(i = mt.get(a, e), i !== t) return i; + if(i = mt.get(a, r), i !== t) return i; + if(i = o(a, r, t), i !== t) return i + } else this.each(function() { + var i = mt.get(this, r); + mt.set(this, r, n), -1 !== e.indexOf("-") && i !== t && mt.set(this, e, n) + }) + }, null, n, arguments.length > 1, null, !0) + }, + removeData: function(e) { + return this.each(function() { + mt.remove(this, e) + }) + } + }), ot.extend({ + queue: function(e, t, n) { + var i; + return e ? (t = (t || "fx") + "queue", i = gt.get(e, t), n && (!i || ot.isArray(n) ? i = gt.access(e, t, ot.makeArray(n)) : i.push(n)), i || []) : void 0 + }, + dequeue: function(e, t) { + t = t || "fx"; + var n = ot.queue(e, t), + i = n.length, + r = n.shift(), + o = ot._queueHooks(e, t), + a = function() { + ot.dequeue(e, t) + }; + "inprogress" === r && (r = n.shift(), i--), r && ("fx" === t && n.unshift("inprogress"), delete o.stop, r.call(e, a, o)), !i && o && o.empty.fire() + }, + _queueHooks: function(e, t) { + var n = t + "queueHooks"; + return gt.get(e, n) || gt.access(e, n, { + empty: ot.Callbacks("once memory").add(function() { + gt.remove(e, [t + "queue", n]) + }) + }) + } + }), ot.fn.extend({ + queue: function(e, n) { + var i = 2; + return "string" != typeof e && (n = e, e = "fx", i--), arguments.length < i ? ot.queue(this[0], e) : n === t ? this : this.each(function() { + var t = ot.queue(this, e, n); + ot._queueHooks(this, e), "fx" === e && "inprogress" !== t[0] && ot.dequeue(this, e) + }) + }, + dequeue: function(e) { + return this.each(function() { + ot.dequeue(this, e) + }) + }, + delay: function(e, t) { + return e = ot.fx ? ot.fx.speeds[e] || e : e, t = t || "fx", this.queue(t, function(t, n) { + var i = setTimeout(t, e); + n.stop = function() { + clearTimeout(i) + } + }) + }, + clearQueue: function(e) { + return this.queue(e || "fx", []) + }, + promise: function(e, n) { + var i, r = 1, + o = ot.Deferred(), + a = this, + s = this.length, + l = function() { + --r || o.resolveWith(a, [a]) + }; + for("string" != typeof e && (n = e, e = t), e = e || "fx"; s--;) i = gt.get(a[s], e + "queueHooks"), i && i.empty && (r++, i.empty.add(l)); + return l(), o.promise(n) + } + }); + var yt, xt, wt = /[\t\r\n\f]/g, + St = /\r/g, + Ct = /^(?:input|select|textarea|button)$/i; + ot.fn.extend({ + attr: function(e, t) { + return ot.access(this, ot.attr, e, t, arguments.length > 1) + }, + removeAttr: function(e) { + return this.each(function() { + ot.removeAttr(this, e) + }) + }, + prop: function(e, t) { + return ot.access(this, ot.prop, e, t, arguments.length > 1) + }, + removeProp: function(e) { + return this.each(function() { + delete this[ot.propFix[e] || e] + }) + }, + addClass: function(e) { + var t, n, i, r, o, a = 0, + s = this.length, + l = "string" == typeof e && e; + if(ot.isFunction(e)) return this.each(function(t) { + ot(this).addClass(e.call(this, t, this.className)) + }); + if(l) + for(t = (e || "").match(st) || []; s > a; a++) + if(n = this[a], i = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(wt, " ") : " ")) { + for(o = 0; r = t[o++];) i.indexOf(" " + r + " ") < 0 && (i += r + " "); + n.className = ot.trim(i) + } + return this + }, + removeClass: function(e) { + var t, n, i, r, o, a = 0, + s = this.length, + l = 0 === arguments.length || "string" == typeof e && e; + if(ot.isFunction(e)) return this.each(function(t) { + ot(this).removeClass(e.call(this, t, this.className)) + }); + if(l) + for(t = (e || "").match(st) || []; s > a; a++) + if(n = this[a], i = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(wt, " ") : "")) { + for(o = 0; r = t[o++];) + for(; i.indexOf(" " + r + " ") >= 0;) i = i.replace(" " + r + " ", " "); + n.className = e ? ot.trim(i) : "" + } + return this + }, + toggleClass: function(e, t) { + var n = typeof e; + return "boolean" == typeof t && "string" === n ? t ? this.addClass(e) : this.removeClass(e) : this.each(ot.isFunction(e) ? function(n) { + ot(this).toggleClass(e.call(this, n, this.className, t), t) + } : function() { + if("string" === n) + for(var t, i = 0, r = ot(this), o = e.match(st) || []; t = o[i++];) r.hasClass(t) ? r.removeClass(t) : r.addClass(t); + else(n === q || "boolean" === n) && (this.className && gt.set(this, "__className__", this.className), this.className = this.className || e === !1 ? "" : gt.get(this, "__className__") || "") + }) + }, + hasClass: function(e) { + for(var t = " " + e + " ", n = 0, i = this.length; i > n; n++) + if(1 === this[n].nodeType && (" " + this[n].className + " ").replace(wt, " ").indexOf(t) >= 0) return !0; + return !1 + }, + val: function(e) { + var n, i, r, o = this[0]; { + if(arguments.length) return r = ot.isFunction(e), this.each(function(i) { + var o; + 1 === this.nodeType && (o = r ? e.call(this, i, ot(this).val()) : e, null == o ? o = "" : "number" == typeof o ? o += "" : ot.isArray(o) && (o = ot.map(o, function(e) { + return null == e ? "" : e + "" + })), n = ot.valHooks[this.type] || ot.valHooks[this.nodeName.toLowerCase()], n && "set" in n && n.set(this, o, "value") !== t || (this.value = o)) + }); + if(o) return n = ot.valHooks[o.type] || ot.valHooks[o.nodeName.toLowerCase()], n && "get" in n && (i = n.get(o, "value")) !== t ? i : (i = o.value, "string" == typeof i ? i.replace(St, "") : null == i ? "" : i) + } + } + }), ot.extend({ + valHooks: { + option: { + get: function(e) { + var t = e.attributes.value; + return !t || t.specified ? e.value : e.text + } + }, + select: { + get: function(e) { + for(var t, n, i = e.options, r = e.selectedIndex, o = "select-one" === e.type || 0 > r, a = o ? null : [], s = o ? r + 1 : i.length, l = 0 > r ? s : o ? r : 0; s > l; l++) + if(n = i[l], !(!n.selected && l !== r || (ot.support.optDisabled ? n.disabled : null !== n.getAttribute("disabled")) || n.parentNode.disabled && ot.nodeName(n.parentNode, "optgroup"))) { + if(t = ot(n).val(), o) return t; + a.push(t) + } + return a + }, + set: function(e, t) { + for(var n, i, r = e.options, o = ot.makeArray(t), a = r.length; a--;) i = r[a], (i.selected = ot.inArray(ot(i).val(), o) >= 0) && (n = !0); + return n || (e.selectedIndex = -1), o + } + } + }, + attr: function(e, n, i) { + var r, o, a = e.nodeType; + if(e && 3 !== a && 8 !== a && 2 !== a) return typeof e.getAttribute === q ? ot.prop(e, n, i) : (1 === a && ot.isXMLDoc(e) || (n = n.toLowerCase(), r = ot.attrHooks[n] || (ot.expr.match.bool.test(n) ? xt : yt)), i === t ? r && "get" in r && null !== (o = r.get(e, n)) ? o : (o = ot.find.attr(e, n), null == o ? t : o) : null !== i ? r && "set" in r && (o = r.set(e, i, n)) !== t ? o : (e.setAttribute(n, i + ""), i) : void ot.removeAttr(e, n)) + }, + removeAttr: function(e, t) { + var n, i, r = 0, + o = t && t.match(st); + if(o && 1 === e.nodeType) + for(; n = o[r++];) i = ot.propFix[n] || n, ot.expr.match.bool.test(n) && (e[i] = !1), e.removeAttribute(n) + }, + attrHooks: { + type: { + set: function(e, t) { + if(!ot.support.radioValue && "radio" === t && ot.nodeName(e, "input")) { + var n = e.value; + return e.setAttribute("type", t), n && (e.value = n), t + } + } + } + }, + propFix: { + "for": "htmlFor", + "class": "className" + }, + prop: function(e, n, i) { + var r, o, a, s = e.nodeType; + if(e && 3 !== s && 8 !== s && 2 !== s) return a = 1 !== s || !ot.isXMLDoc(e), a && (n = ot.propFix[n] || n, o = ot.propHooks[n]), i !== t ? o && "set" in o && (r = o.set(e, i, n)) !== t ? r : e[n] = i : o && "get" in o && null !== (r = o.get(e, n)) ? r : e[n] + }, + propHooks: { + tabIndex: { + get: function(e) { + return e.hasAttribute("tabindex") || Ct.test(e.nodeName) || e.href ? e.tabIndex : -1 + } + } + } + }), xt = { + set: function(e, t, n) { + return t === !1 ? ot.removeAttr(e, n) : e.setAttribute(n, n), n + } + }, ot.each(ot.expr.match.bool.source.match(/\w+/g), function(e, n) { + var i = ot.expr.attrHandle[n] || ot.find.attr; + ot.expr.attrHandle[n] = function(e, n, r) { + var o = ot.expr.attrHandle[n], + a = r ? t : (ot.expr.attrHandle[n] = t) != i(e, n, r) ? n.toLowerCase() : null; + return ot.expr.attrHandle[n] = o, a + } + }), ot.support.optSelected || (ot.propHooks.selected = { + get: function(e) { + var t = e.parentNode; + return t && t.parentNode && t.parentNode.selectedIndex, null + } + }), ot.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() { + ot.propFix[this.toLowerCase()] = this + }), ot.each(["radio", "checkbox"], function() { + ot.valHooks[this] = { + set: function(e, t) { + return ot.isArray(t) ? e.checked = ot.inArray(ot(e).val(), t) >= 0 : void 0 + } + }, ot.support.checkOn || (ot.valHooks[this].get = function(e) { + return null === e.getAttribute("value") ? "on" : e.value + }) + }); + var Tt = /^key/, + Et = /^(?:mouse|contextmenu)|click/, + kt = /^(?:focusinfocus|focusoutblur)$/, + _t = /^([^.]*)(?:\.(.+)|)$/; + ot.event = { + global: {}, + add: function(e, n, i, r, o) { + var a, s, l, c, u, d, p, f, h, m, g, v = gt.get(e); + if(v) { + for(i.handler && (a = i, i = a.handler, o = a.selector), i.guid || (i.guid = ot.guid++), (c = v.events) || (c = v.events = {}), (s = v.handle) || (s = v.handle = function(e) { + return typeof ot === q || e && ot.event.triggered === e.type ? t : ot.event.dispatch.apply(s.elem, arguments) + }, s.elem = e), n = (n || "").match(st) || [""], u = n.length; u--;) l = _t.exec(n[u]) || [], h = g = l[1], m = (l[2] || "").split(".").sort(), h && (p = ot.event.special[h] || {}, h = (o ? p.delegateType : p.bindType) || h, p = ot.event.special[h] || {}, d = ot.extend({ + type: h, + origType: g, + data: r, + handler: i, + guid: i.guid, + selector: o, + needsContext: o && ot.expr.match.needsContext.test(o), + namespace: m.join(".") + }, a), (f = c[h]) || (f = c[h] = [], f.delegateCount = 0, p.setup && p.setup.call(e, r, m, s) !== !1 || e.addEventListener && e.addEventListener(h, s, !1)), p.add && (p.add.call(e, d), d.handler.guid || (d.handler.guid = i.guid)), o ? f.splice(f.delegateCount++, 0, d) : f.push(d), ot.event.global[h] = !0); + e = null + } + }, + remove: function(e, t, n, i, r) { + var o, a, s, l, c, u, d, p, f, h, m, g = gt.hasData(e) && gt.get(e); + if(g && (l = g.events)) { + for(t = (t || "").match(st) || [""], c = t.length; c--;) + if(s = _t.exec(t[c]) || [], f = m = s[1], h = (s[2] || "").split(".").sort(), f) { + for(d = ot.event.special[f] || {}, f = (i ? d.delegateType : d.bindType) || f, p = l[f] || [], s = s[2] && new RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)"), a = o = p.length; o--;) u = p[o], !r && m !== u.origType || n && n.guid !== u.guid || s && !s.test(u.namespace) || i && i !== u.selector && ("**" !== i || !u.selector) || (p.splice(o, 1), u.selector && p.delegateCount--, d.remove && d.remove.call(e, u)); + a && !p.length && (d.teardown && d.teardown.call(e, h, g.handle) !== !1 || ot.removeEvent(e, f, g.handle), delete l[f]) + } else + for(f in l) ot.event.remove(e, f + t[c], n, i, !0); + ot.isEmptyObject(l) && (delete g.handle, gt.remove(e, "events")) + } + }, + trigger: function(n, i, r, o) { + var a, s, l, c, u, d, p, f = [r || z], + h = it.call(n, "type") ? n.type : n, + m = it.call(n, "namespace") ? n.namespace.split(".") : []; + if(s = l = r = r || z, 3 !== r.nodeType && 8 !== r.nodeType && !kt.test(h + ot.event.triggered) && (h.indexOf(".") >= 0 && (m = h.split("."), h = m.shift(), m.sort()), u = h.indexOf(":") < 0 && "on" + h, n = n[ot.expando] ? n : new ot.Event(h, "object" == typeof n && n), n.isTrigger = o ? 2 : 3, n.namespace = m.join("."), n.namespace_re = n.namespace ? new RegExp("(^|\\.)" + m.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, n.result = t, n.target || (n.target = r), i = null == i ? [n] : ot.makeArray(i, [n]), p = ot.event.special[h] || {}, o || !p.trigger || p.trigger.apply(r, i) !== !1)) { + if(!o && !p.noBubble && !ot.isWindow(r)) { + for(c = p.delegateType || h, kt.test(c + h) || (s = s.parentNode); s; s = s.parentNode) f.push(s), l = s; + l === (r.ownerDocument || z) && f.push(l.defaultView || l.parentWindow || e) + } + for(a = 0; + (s = f[a++]) && !n.isPropagationStopped();) n.type = a > 1 ? c : p.bindType || h, d = (gt.get(s, "events") || {})[n.type] && gt.get(s, "handle"), d && d.apply(s, i), d = u && s[u], d && ot.acceptData(s) && d.apply && d.apply(s, i) === !1 && n.preventDefault(); + return n.type = h, o || n.isDefaultPrevented() || p._default && p._default.apply(f.pop(), i) !== !1 || !ot.acceptData(r) || u && ot.isFunction(r[h]) && !ot.isWindow(r) && (l = r[u], l && (r[u] = null), ot.event.triggered = h, r[h](), ot.event.triggered = t, l && (r[u] = l)), n.result + } + }, + dispatch: function(e) { + e = ot.event.fix(e); + var n, i, r, o, a, s = [], + l = et.call(arguments), + c = (gt.get(this, "events") || {})[e.type] || [], + u = ot.event.special[e.type] || {}; + if(l[0] = e, e.delegateTarget = this, !u.preDispatch || u.preDispatch.call(this, e) !== !1) { + for(s = ot.event.handlers.call(this, e, c), n = 0; + (o = s[n++]) && !e.isPropagationStopped();) + for(e.currentTarget = o.elem, i = 0; + (a = o.handlers[i++]) && !e.isImmediatePropagationStopped();)(!e.namespace_re || e.namespace_re.test(a.namespace)) && (e.handleObj = a, e.data = a.data, r = ((ot.event.special[a.origType] || {}).handle || a.handler).apply(o.elem, l), r !== t && (e.result = r) === !1 && (e.preventDefault(), e.stopPropagation())); + return u.postDispatch && u.postDispatch.call(this, e), e.result + } + }, + handlers: function(e, n) { + var i, r, o, a, s = [], + l = n.delegateCount, + c = e.target; + if(l && c.nodeType && (!e.button || "click" !== e.type)) + for(; c !== this; c = c.parentNode || this) + if(c.disabled !== !0 || "click" !== e.type) { + for(r = [], i = 0; l > i; i++) a = n[i], o = a.selector + " ", r[o] === t && (r[o] = a.needsContext ? ot(o, this).index(c) >= 0 : ot.find(o, this, null, [c]).length), r[o] && r.push(a); + r.length && s.push({ + elem: c, + handlers: r + }) + } + return l < n.length && s.push({ + elem: this, + handlers: n.slice(l) + }), s + }, + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + fixHooks: {}, + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function(e, t) { + return null == e.which && (e.which = null != t.charCode ? t.charCode : t.keyCode), e + } + }, + mouseHooks: { + props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function(e, n) { + var i, r, o, a = n.button; + return null == e.pageX && null != n.clientX && (i = e.target.ownerDocument || z, r = i.documentElement, o = i.body, e.pageX = n.clientX + (r && r.scrollLeft || o && o.scrollLeft || 0) - (r && r.clientLeft || o && o.clientLeft || 0), e.pageY = n.clientY + (r && r.scrollTop || o && o.scrollTop || 0) - (r && r.clientTop || o && o.clientTop || 0)), e.which || a === t || (e.which = 1 & a ? 1 : 2 & a ? 3 : 4 & a ? 2 : 0), e + } + }, + fix: function(e) { + if(e[ot.expando]) return e; + var t, n, i, r = e.type, + o = e, + a = this.fixHooks[r]; + for(a || (this.fixHooks[r] = a = Et.test(r) ? this.mouseHooks : Tt.test(r) ? this.keyHooks : {}), i = a.props ? this.props.concat(a.props) : this.props, e = new ot.Event(o), t = i.length; t--;) n = i[t], e[n] = o[n]; + return e.target || (e.target = z), 3 === e.target.nodeType && (e.target = e.target.parentNode), a.filter ? a.filter(e, o) : e + }, + special: { + load: { + noBubble: !0 + }, + focus: { + trigger: function() { + return this !== l() && this.focus ? (this.focus(), !1) : void 0 + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + return this === l() && this.blur ? (this.blur(), !1) : void 0 + }, + delegateType: "focusout" + }, + click: { + trigger: function() { + return "checkbox" === this.type && this.click && ot.nodeName(this, "input") ? (this.click(), !1) : void 0 + }, + _default: function(e) { + return ot.nodeName(e.target, "a") + } + }, + beforeunload: { + postDispatch: function(e) { + e.result !== t && (e.originalEvent.returnValue = e.result) + } + } + }, + simulate: function(e, t, n, i) { + var r = ot.extend(new ot.Event, n, { + type: e, + isSimulated: !0, + originalEvent: {} + }); + i ? ot.event.trigger(r, null, t) : ot.event.dispatch.call(t, r), r.isDefaultPrevented() && n.preventDefault() + } + }, ot.removeEvent = function(e, t, n) { + e.removeEventListener && e.removeEventListener(t, n, !1) + }, ot.Event = function(e, t) { + return this instanceof ot.Event ? (e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || e.getPreventDefault && e.getPreventDefault() ? a : s) : this.type = e, t && ot.extend(this, t), this.timeStamp = e && e.timeStamp || ot.now(), void(this[ot.expando] = !0)) : new ot.Event(e, t) + }, ot.Event.prototype = { + isDefaultPrevented: s, + isPropagationStopped: s, + isImmediatePropagationStopped: s, + preventDefault: function() { + var e = this.originalEvent; + this.isDefaultPrevented = a, e && e.preventDefault && e.preventDefault() + }, + stopPropagation: function() { + var e = this.originalEvent; + this.isPropagationStopped = a, e && e.stopPropagation && e.stopPropagation() + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = a, this.stopPropagation() + } + }, ot.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" + }, function(e, t) { + ot.event.special[e] = { + delegateType: t, + bindType: t, + handle: function(e) { + var n, i = this, + r = e.relatedTarget, + o = e.handleObj; + return(!r || r !== i && !ot.contains(i, r)) && (e.type = o.origType, n = o.handler.apply(this, arguments), e.type = t), n + } + } + }), ot.support.focusinBubbles || ot.each({ + focus: "focusin", + blur: "focusout" + }, function(e, t) { + var n = 0, + i = function(e) { + ot.event.simulate(t, e.target, ot.event.fix(e), !0) + }; + ot.event.special[t] = { + setup: function() { + 0 === n++ && z.addEventListener(e, i, !0) + }, + teardown: function() { + 0 === --n && z.removeEventListener(e, i, !0) + } + } + }), ot.fn.extend({ + on: function(e, n, i, r, o) { + var a, l; + if("object" == typeof e) { + "string" != typeof n && (i = i || n, n = t); + for(l in e) this.on(l, n, i, e[l], o); + return this + } + if(null == i && null == r ? (r = n, i = n = t) : null == r && ("string" == typeof n ? (r = i, i = t) : (r = i, i = n, n = t)), r === !1) r = s; + else if(!r) return this; + return 1 === o && (a = r, r = function(e) { + return ot().off(e), a.apply(this, arguments) + }, r.guid = a.guid || (a.guid = ot.guid++)), this.each(function() { + ot.event.add(this, e, r, i, n) + }) + }, + one: function(e, t, n, i) { + return this.on(e, t, n, i, 1) + }, + off: function(e, n, i) { + var r, o; + if(e && e.preventDefault && e.handleObj) return r = e.handleObj, ot(e.delegateTarget).off(r.namespace ? r.origType + "." + r.namespace : r.origType, r.selector, r.handler), this; + if("object" == typeof e) { + for(o in e) this.off(o, n, e[o]); + return this + } + return(n === !1 || "function" == typeof n) && (i = n, n = t), i === !1 && (i = s), this.each(function() { + ot.event.remove(this, e, i, n) + }) + }, + trigger: function(e, t) { + return this.each(function() { + ot.event.trigger(e, t, this) + }) + }, + triggerHandler: function(e, t) { + var n = this[0]; + return n ? ot.event.trigger(e, t, n, !0) : void 0 + } + }); + var It = /^.[^:#\[\.,]*$/, + Dt = /^(?:parents|prev(?:Until|All))/, + Nt = ot.expr.match.needsContext, + Lt = { + children: !0, + contents: !0, + next: !0, + prev: !0 + }; + ot.fn.extend({ + find: function(e) { + var t, n = [], + i = this, + r = i.length; + if("string" != typeof e) return this.pushStack(ot(e).filter(function() { + for(t = 0; r > t; t++) + if(ot.contains(i[t], this)) return !0 + })); + for(t = 0; r > t; t++) ot.find(e, i[t], n); + return n = this.pushStack(r > 1 ? ot.unique(n) : n), n.selector = this.selector ? this.selector + " " + e : e, n + }, + has: function(e) { + var t = ot(e, this), + n = t.length; + return this.filter(function() { + for(var e = 0; n > e; e++) + if(ot.contains(this, t[e])) return !0 + }) + }, + not: function(e) { + return this.pushStack(u(this, e || [], !0)) + }, + filter: function(e) { + return this.pushStack(u(this, e || [], !1)) + }, + is: function(e) { + return !!u(this, "string" == typeof e && Nt.test(e) ? ot(e) : e || [], !1).length + }, + closest: function(e, t) { + for(var n, i = 0, r = this.length, o = [], a = Nt.test(e) || "string" != typeof e ? ot(e, t || this.context) : 0; r > i; i++) + for(n = this[i]; n && n !== t; n = n.parentNode) + if(n.nodeType < 11 && (a ? a.index(n) > -1 : 1 === n.nodeType && ot.find.matchesSelector(n, e))) { + n = o.push(n); + break + } + return this.pushStack(o.length > 1 ? ot.unique(o) : o) + }, + index: function(e) { + return e ? "string" == typeof e ? tt.call(ot(e), this[0]) : tt.call(this, e.jquery ? e[0] : e) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1 + }, + add: function(e, t) { + var n = "string" == typeof e ? ot(e, t) : ot.makeArray(e && e.nodeType ? [e] : e), + i = ot.merge(this.get(), n); + return this.pushStack(ot.unique(i)) + }, + addBack: function(e) { + return this.add(null == e ? this.prevObject : this.prevObject.filter(e)) + } + }), ot.each({ + parent: function(e) { + var t = e.parentNode; + return t && 11 !== t.nodeType ? t : null + }, + parents: function(e) { + return ot.dir(e, "parentNode") + }, + parentsUntil: function(e, t, n) { + return ot.dir(e, "parentNode", n) + }, + next: function(e) { + return c(e, "nextSibling") + }, + prev: function(e) { + return c(e, "previousSibling") + }, + nextAll: function(e) { + return ot.dir(e, "nextSibling") + }, + prevAll: function(e) { + return ot.dir(e, "previousSibling") + }, + nextUntil: function(e, t, n) { + return ot.dir(e, "nextSibling", n) + }, + prevUntil: function(e, t, n) { + return ot.dir(e, "previousSibling", n) + }, + siblings: function(e) { + return ot.sibling((e.parentNode || {}).firstChild, e) + }, + children: function(e) { + return ot.sibling(e.firstChild) + }, + contents: function(e) { + return e.contentDocument || ot.merge([], e.childNodes) + } + }, function(e, t) { + ot.fn[e] = function(n, i) { + var r = ot.map(this, t, n); + return "Until" !== e.slice(-5) && (i = n), i && "string" == typeof i && (r = ot.filter(i, r)), this.length > 1 && (Lt[e] || ot.unique(r), Dt.test(e) && r.reverse()), this.pushStack(r) + } + }), ot.extend({ + filter: function(e, t, n) { + var i = t[0]; + return n && (e = ":not(" + e + ")"), 1 === t.length && 1 === i.nodeType ? ot.find.matchesSelector(i, e) ? [i] : [] : ot.find.matches(e, ot.grep(t, function(e) { + return 1 === e.nodeType + })) + }, + dir: function(e, n, i) { + for(var r = [], o = i !== t; + (e = e[n]) && 9 !== e.nodeType;) + if(1 === e.nodeType) { + if(o && ot(e).is(i)) break; + r.push(e) + } + return r + }, + sibling: function(e, t) { + for(var n = []; e; e = e.nextSibling) 1 === e.nodeType && e !== t && n.push(e); + return n + } + }); + var Mt = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + At = /<([\w:]+)/, + Rt = /<|?\w+;/, + Pt = /<(?:script|style|link)/i, + Ft = /^(?:checkbox|radio)$/i, + Ot = /checked\s*(?:[^=]|=\s*.checked.)/i, + Bt = /^$|\/(?:java|ecma)script/i, + jt = /^true\/(.*)/, + $t = /^\s*\s*$/g, + Gt = { + option: [1, ""], + thead: [1, " ", "
"], + col: [2, ""], + tr: [2, "
", " ", "
"], + td: [3, ""], + _default: [0, "", ""] + }; + Gt.optgroup = Gt.option, Gt.tbody = Gt.tfoot = Gt.colgroup = Gt.caption = Gt.thead, Gt.th = Gt.td, ot.fn.extend({ + text: function(e) { + return ot.access(this, function(e) { + return e === t ? ot.text(this) : this.empty().append((this[0] && this[0].ownerDocument || z).createTextNode(e)) + }, null, e, arguments.length) + }, + append: function() { + return this.domManip(arguments, function(e) { + if(1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { + var t = d(this, e); + t.appendChild(e) + } + }) + }, + prepend: function() { + return this.domManip(arguments, function(e) { + if(1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { + var t = d(this, e); + t.insertBefore(e, t.firstChild) + } + }) + }, + before: function() { + return this.domManip(arguments, function(e) { + this.parentNode && this.parentNode.insertBefore(e, this) + }) + }, + after: function() { + return this.domManip(arguments, function(e) { + this.parentNode && this.parentNode.insertBefore(e, this.nextSibling) + }) + }, + remove: function(e, t) { + for(var n, i = e ? ot.filter(e, this) : this, r = 0; null != (n = i[r]); r++) t || 1 !== n.nodeType || ot.cleanData(g(n)), n.parentNode && (t && ot.contains(n.ownerDocument, n) && h(g(n, "script")), n.parentNode.removeChild(n)); + return this + }, + empty: function() { + for(var e, t = 0; null != (e = this[t]); t++) 1 === e.nodeType && (ot.cleanData(g(e, !1)), e.textContent = ""); + return this + }, + clone: function(e, t) { + return e = null == e ? !1 : e, t = null == t ? e : t, this.map(function() { + return ot.clone(this, e, t) + }) + }, + html: function(e) { + return ot.access(this, function(e) { + var n = this[0] || {}, i = 0, + r = this.length; + if(e === t && 1 === n.nodeType) return n.innerHTML; + if("string" == typeof e && !Pt.test(e) && !Gt[(At.exec(e) || ["", ""])[1].toLowerCase()]) { + e = e.replace(Mt, "<$1>$2>"); + try { + for(; r > i; i++) n = this[i] || {}, 1 === n.nodeType && (ot.cleanData(g(n, !1)), n.innerHTML = e); + n = 0 + } catch(o) {} + } + n && this.empty().append(e) + }, null, e, arguments.length) + }, + replaceWith: function() { + var e = ot.map(this, function(e) { + return [e.nextSibling, e.parentNode] + }), + t = 0; + return this.domManip(arguments, function(n) { + var i = e[t++], + r = e[t++]; + r && (i && i.parentNode !== r && (i = this.nextSibling), ot(this).remove(), r.insertBefore(n, i)) + }, !0), t ? this : this.remove() + }, + detach: function(e) { + return this.remove(e, !0) + }, + domManip: function(e, t, n) { + e = Y.apply([], e); + var i, r, o, a, s, l, c = 0, + u = this.length, + d = this, + h = u - 1, + m = e[0], + v = ot.isFunction(m); + if(v || !(1 >= u || "string" != typeof m || ot.support.checkClone) && Ot.test(m)) return this.each(function(i) { + var r = d.eq(i); + v && (e[0] = m.call(this, i, r.html())), r.domManip(e, t, n) + }); + if(u && (i = ot.buildFragment(e, this[0].ownerDocument, !1, !n && this), r = i.firstChild, 1 === i.childNodes.length && (i = r), r)) { + for(o = ot.map(g(i, "script"), p), a = o.length; u > c; c++) s = i, c !== h && (s = ot.clone(s, !0, !0), a && ot.merge(o, g(s, "script"))), t.call(this[c], s, c); + if(a) + for(l = o[o.length - 1].ownerDocument, ot.map(o, f), c = 0; a > c; c++) s = o[c], Bt.test(s.type || "") && !gt.access(s, "globalEval") && ot.contains(l, s) && (s.src ? ot._evalUrl(s.src) : ot.globalEval(s.textContent.replace($t, ""))) + } + return this + } + }), ot.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" + }, function(e, t) { + ot.fn[e] = function(e) { + for(var n, i = [], r = ot(e), o = r.length - 1, a = 0; o >= a; a++) n = a === o ? this : this.clone(!0), ot(r[a])[t](n), Z.apply(i, n.get()); + return this.pushStack(i) + } + }), ot.extend({ + clone: function(e, t, n) { + var i, r, o, a, s = e.cloneNode(!0), + l = ot.contains(e.ownerDocument, e); + if(!(ot.support.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || ot.isXMLDoc(e))) + for(a = g(s), o = g(e), i = 0, r = o.length; r > i; i++) v(o[i], a[i]); + if(t) + if(n) + for(o = o || g(e), a = a || g(s), i = 0, r = o.length; r > i; i++) m(o[i], a[i]); + else m(e, s); + return a = g(s, "script"), a.length > 0 && h(a, !l && g(e, "script")), s + }, + buildFragment: function(e, t, n, i) { + for(var r, o, a, s, l, c, u = 0, d = e.length, p = t.createDocumentFragment(), f = []; d > u; u++) + if(r = e[u], r || 0 === r) + if("object" === ot.type(r)) ot.merge(f, r.nodeType ? [r] : r); + else if(Rt.test(r)) { + for(o = o || p.appendChild(t.createElement("div")), a = (At.exec(r) || ["", ""])[1].toLowerCase(), s = Gt[a] || Gt._default, o.innerHTML = s[1] + r.replace(Mt, "<$1>$2>") + s[2], c = s[0]; c--;) o = o.lastChild; + ot.merge(f, o.childNodes), o = p.firstChild, o.textContent = "" + } else f.push(t.createTextNode(r)); + for(p.textContent = "", u = 0; r = f[u++];) + if((!i || -1 === ot.inArray(r, i)) && (l = ot.contains(r.ownerDocument, r), o = g(p.appendChild(r), "script"), l && h(o), n)) + for(c = 0; r = o[c++];) Bt.test(r.type || "") && n.push(r); + return p + }, + cleanData: function(e) { + for(var n, i, o, a, s, l, c = ot.event.special, u = 0; + (i = e[u]) !== t; u++) { + if(r.accepts(i) && (s = i[gt.expando], s && (n = gt.cache[s]))) { + if(o = Object.keys(n.events || {}), o.length) + for(l = 0; + (a = o[l]) !== t; l++) c[a] ? ot.event.remove(i, a) : ot.removeEvent(i, a, n.handle); + gt.cache[s] && delete gt.cache[s] + } + delete mt.cache[i[mt.expando]] + } + }, + _evalUrl: function(e) { + return ot.ajax({ + url: e, + type: "GET", + dataType: "script", + async: !1, + global: !1, + "throws": !0 + }) + } + }), ot.fn.extend({ + wrapAll: function(e) { + var t; + return ot.isFunction(e) ? this.each(function(t) { + ot(this).wrapAll(e.call(this, t)) + }) : (this[0] && (t = ot(e, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && t.insertBefore(this[0]), t.map(function() { + for(var e = this; e.firstElementChild;) e = e.firstElementChild; + return e + }).append(this)), this) + }, + wrapInner: function(e) { + return this.each(ot.isFunction(e) ? function(t) { + ot(this).wrapInner(e.call(this, t)) + } : function() { + var t = ot(this), + n = t.contents(); + n.length ? n.wrapAll(e) : t.append(e) + }) + }, + wrap: function(e) { + var t = ot.isFunction(e); + return this.each(function(n) { + ot(this).wrapAll(t ? e.call(this, n) : e) + }) + }, + unwrap: function() { + return this.parent().each(function() { + ot.nodeName(this, "body") || ot(this).replaceWith(this.childNodes) + }).end() + } + }); + var Ht, qt, Ut = /^(none|table(?!-c[ea]).+)/, + zt = /^margin/, + Vt = new RegExp("^(" + at + ")(.*)$", "i"), + Wt = new RegExp("^(" + at + ")(?!px)[a-z%]+$", "i"), + Qt = new RegExp("^([+-])=(" + at + ")", "i"), + Xt = { + BODY: "block" + }, Kt = { + position: "absolute", + visibility: "hidden", + display: "block" + }, Jt = { + letterSpacing: 0, + fontWeight: 400 + }, Yt = ["Top", "Right", "Bottom", "Left"], + Zt = ["Webkit", "O", "Moz", "ms"]; + ot.fn.extend({ + css: function(e, n) { + return ot.access(this, function(e, n, i) { + var r, o, a = {}, s = 0; + if(ot.isArray(n)) { + for(r = x(e), o = n.length; o > s; s++) a[n[s]] = ot.css(e, n[s], !1, r); + return a + } + return i !== t ? ot.style(e, n, i) : ot.css(e, n) + }, e, n, arguments.length > 1) + }, + show: function() { + return w(this, !0) + }, + hide: function() { + return w(this) + }, + toggle: function(e) { + return "boolean" == typeof e ? e ? this.show() : this.hide() : this.each(function() { + y(this) ? ot(this).show() : ot(this).hide() + }) + } + }), ot.extend({ + cssHooks: { + opacity: { + get: function(e, t) { + if(t) { + var n = Ht(e, "opacity"); + return "" === n ? "1" : n + } + } + } + }, + cssNumber: { + columnCount: !0, + fillOpacity: !0, + fontWeight: !0, + lineHeight: !0, + opacity: !0, + order: !0, + orphans: !0, + widows: !0, + zIndex: !0, + zoom: !0 + }, + cssProps: { + "float": "cssFloat" + }, + style: function(e, n, i, r) { + if(e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) { + var o, a, s, l = ot.camelCase(n), + c = e.style; + return n = ot.cssProps[l] || (ot.cssProps[l] = b(c, l)), s = ot.cssHooks[n] || ot.cssHooks[l], i === t ? s && "get" in s && (o = s.get(e, !1, r)) !== t ? o : c[n] : (a = typeof i, "string" === a && (o = Qt.exec(i)) && (i = (o[1] + 1) * o[2] + parseFloat(ot.css(e, n)), a = "number"), null == i || "number" === a && isNaN(i) || ("number" !== a || ot.cssNumber[l] || (i += "px"), ot.support.clearCloneStyle || "" !== i || 0 !== n.indexOf("background") || (c[n] = "inherit"), s && "set" in s && (i = s.set(e, i, r)) === t || (c[n] = i)), void 0) + } + }, + css: function(e, n, i, r) { + var o, a, s, l = ot.camelCase(n); + return n = ot.cssProps[l] || (ot.cssProps[l] = b(e.style, l)), s = ot.cssHooks[n] || ot.cssHooks[l], s && "get" in s && (o = s.get(e, !0, i)), o === t && (o = Ht(e, n, r)), "normal" === o && n in Jt && (o = Jt[n]), "" === i || i ? (a = parseFloat(o), i === !0 || ot.isNumeric(a) ? a || 0 : o) : o + } + }), Ht = function(e, n, i) { + var r, o, a, s = i || x(e), + l = s ? s.getPropertyValue(n) || s[n] : t, + c = e.style; + return s && ("" !== l || ot.contains(e.ownerDocument, e) || (l = ot.style(e, n)), Wt.test(l) && zt.test(n) && (r = c.width, o = c.minWidth, a = c.maxWidth, c.minWidth = c.maxWidth = c.width = l, l = s.width, c.width = r, c.minWidth = o, c.maxWidth = a)), l + }, ot.each(["height", "width"], function(e, t) { + ot.cssHooks[t] = { + get: function(e, n, i) { + return n ? 0 === e.offsetWidth && Ut.test(ot.css(e, "display")) ? ot.swap(e, Kt, function() { + return T(e, t, i) + }) : T(e, t, i) : void 0 + }, + set: function(e, n, i) { + var r = i && x(e); + return S(e, n, i ? C(e, t, i, ot.support.boxSizing && "border-box" === ot.css(e, "boxSizing", !1, r), r) : 0) + } + } + }), ot(function() { + ot.support.reliableMarginRight || (ot.cssHooks.marginRight = { + get: function(e, t) { + return t ? ot.swap(e, { + display: "inline-block" + }, Ht, [e, "marginRight"]) : void 0 + } + }), !ot.support.pixelPosition && ot.fn.position && ot.each(["top", "left"], function(e, t) { + ot.cssHooks[t] = { + get: function(e, n) { + return n ? (n = Ht(e, t), Wt.test(n) ? ot(e).position()[t] + "px" : n) : void 0 + } + } + }) + }), ot.expr && ot.expr.filters && (ot.expr.filters.hidden = function(e) { + return e.offsetWidth <= 0 && e.offsetHeight <= 0 + }, ot.expr.filters.visible = function(e) { + return !ot.expr.filters.hidden(e) + }), ot.each({ + margin: "", + padding: "", + border: "Width" + }, function(e, t) { + ot.cssHooks[e + t] = { + expand: function(n) { + for(var i = 0, r = {}, o = "string" == typeof n ? n.split(" ") : [n]; 4 > i; i++) r[e + Yt[i] + t] = o[i] || o[i - 2] || o[0]; + return r + } + }, zt.test(e) || (ot.cssHooks[e + t].set = S) + }); + var en = /%20/g, + tn = /\[\]$/, + nn = /\r?\n/g, + rn = /^(?:submit|button|image|reset|file)$/i, + on = /^(?:input|select|textarea|keygen)/i; + ot.fn.extend({ + serialize: function() { + return ot.param(this.serializeArray()) + }, + serializeArray: function() { + return this.map(function() { + var e = ot.prop(this, "elements"); + return e ? ot.makeArray(e) : this + }).filter(function() { + var e = this.type; + return this.name && !ot(this).is(":disabled") && on.test(this.nodeName) && !rn.test(e) && (this.checked || !Ft.test(e)) + }).map(function(e, t) { + var n = ot(this).val(); + return null == n ? null : ot.isArray(n) ? ot.map(n, function(e) { + return { + name: t.name, + value: e.replace(nn, "\r\n") + } + }) : { + name: t.name, + value: n.replace(nn, "\r\n") + } + }).get() + } + }), ot.param = function(e, n) { + var i, r = [], + o = function(e, t) { + t = ot.isFunction(t) ? t() : null == t ? "" : t, r[r.length] = encodeURIComponent(e) + "=" + encodeURIComponent(t) + }; + if(n === t && (n = ot.ajaxSettings && ot.ajaxSettings.traditional), ot.isArray(e) || e.jquery && !ot.isPlainObject(e)) ot.each(e, function() { + o(this.name, this.value) + }); + else + for(i in e) _(i, e[i], n, o); + return r.join("&").replace(en, "+") + }, ot.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function(e, t) { + ot.fn[t] = function(e, n) { + return arguments.length > 0 ? this.on(t, null, e, n) : this.trigger(t) + } + }), ot.fn.extend({ + hover: function(e, t) { + return this.mouseenter(e).mouseleave(t || e) + }, + bind: function(e, t, n) { + return this.on(e, null, t, n) + }, + unbind: function(e, t) { + return this.off(e, null, t) + }, + delegate: function(e, t, n, i) { + return this.on(t, e, n, i) + }, + undelegate: function(e, t, n) { + return 1 === arguments.length ? this.off(e, "**") : this.off(t, e || "**", n) + } + }); + var an, sn, ln = ot.now(), + cn = /\?/, + un = /#.*$/, + dn = /([?&])_=[^&]*/, + pn = /^(.*?):[ \t]*([^\r\n]*)$/gm, + fn = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + hn = /^(?:GET|HEAD)$/, + mn = /^\/\//, + gn = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, + vn = ot.fn.load, + bn = {}, yn = {}, xn = "*/".concat("*"); + try { + sn = U.href + } catch(wn) { + sn = z.createElement("a"), sn.href = "", sn = sn.href + } + an = gn.exec(sn.toLowerCase()) || [], ot.fn.load = function(e, n, i) { + if("string" != typeof e && vn) return vn.apply(this, arguments); + var r, o, a, s = this, + l = e.indexOf(" "); + return l >= 0 && (r = e.slice(l), e = e.slice(0, l)), ot.isFunction(n) ? (i = n, n = t) : n && "object" == typeof n && (o = "POST"), s.length > 0 && ot.ajax({ + url: e, + type: o, + dataType: "html", + data: n + }).done(function(e) { + a = arguments, s.html(r ? ot("
", " ").append(ot.parseHTML(e)).find(r) : e) + }).complete(i && function(e, t) { + s.each(i, a || [e.responseText, t, e]) + }), this + }, ot.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(e, t) { + ot.fn[t] = function(e) { + return this.on(t, e) + } + }), ot.extend({ + active: 0, + lastModified: {}, + etag: {}, + ajaxSettings: { + url: sn, + type: "GET", + isLocal: fn.test(an[1]), + global: !0, + processData: !0, + async: !0, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + accepts: { + "*": xn, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + contents: { + xml: /xml/, + html: /html/, + json: /json/ + }, + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON" + }, + converters: { + "* text": String, + "text html": !0, + "text json": ot.parseJSON, + "text xml": ot.parseXML + }, + flatOptions: { + url: !0, + context: !0 + } + }, + ajaxSetup: function(e, t) { + return t ? N(N(e, ot.ajaxSettings), t) : N(ot.ajaxSettings, e) + }, + ajaxPrefilter: I(bn), + ajaxTransport: I(yn), + ajax: function(e, n) { + function i(e, n, i, s) { + var c, d, b, y, w, C = n; + 2 !== x && (x = 2, l && clearTimeout(l), r = t, a = s || "", S.readyState = e > 0 ? 4 : 0, c = e >= 200 && 300 > e || 304 === e, i && (y = L(p, S, i)), y = M(p, y, S, c), c ? (p.ifModified && (w = S.getResponseHeader("Last-Modified"), w && (ot.lastModified[o] = w), w = S.getResponseHeader("etag"), w && (ot.etag[o] = w)), 204 === e || "HEAD" === p.type ? C = "nocontent" : 304 === e ? C = "notmodified" : (C = y.state, d = y.data, b = y.error, c = !b)) : (b = C, (e || !C) && (C = "error", 0 > e && (e = 0))), S.status = e, S.statusText = (n || C) + "", c ? m.resolveWith(f, [d, C, S]) : m.rejectWith(f, [S, C, b]), S.statusCode(v), v = t, u && h.trigger(c ? "ajaxSuccess" : "ajaxError", [S, p, c ? d : b]), g.fireWith(f, [S, C]), u && (h.trigger("ajaxComplete", [S, p]), --ot.active || ot.event.trigger("ajaxStop"))) + } + "object" == typeof e && (n = e, e = t), n = n || {}; + var r, o, a, s, l, c, u, d, p = ot.ajaxSetup({}, n), + f = p.context || p, + h = p.context && (f.nodeType || f.jquery) ? ot(f) : ot.event, + m = ot.Deferred(), + g = ot.Callbacks("once memory"), + v = p.statusCode || {}, b = {}, y = {}, x = 0, + w = "canceled", + S = { + readyState: 0, + getResponseHeader: function(e) { + var t; + if(2 === x) { + if(!s) + for(s = {}; t = pn.exec(a);) s[t[1].toLowerCase()] = t[2]; + t = s[e.toLowerCase()] + } + return null == t ? null : t + }, + getAllResponseHeaders: function() { + return 2 === x ? a : null + }, + setRequestHeader: function(e, t) { + var n = e.toLowerCase(); + return x || (e = y[n] = y[n] || e, b[e] = t), this + }, + overrideMimeType: function(e) { + return x || (p.mimeType = e), this + }, + statusCode: function(e) { + var t; + if(e) + if(2 > x) + for(t in e) v[t] = [v[t], e[t]]; + else S.always(e[S.status]); + return this + }, + abort: function(e) { + var t = e || w; + return r && r.abort(t), i(0, t), this + } + }; + if(m.promise(S).complete = g.add, S.success = S.done, S.error = S.fail, p.url = ((e || p.url || sn) + "").replace(un, "").replace(mn, an[1] + "//"), p.type = n.method || n.type || p.method || p.type, p.dataTypes = ot.trim(p.dataType || "*").toLowerCase().match(st) || [""], null == p.crossDomain && (c = gn.exec(p.url.toLowerCase()), p.crossDomain = !(!c || c[1] === an[1] && c[2] === an[2] && (c[3] || ("http:" === c[1] ? "80" : "443")) === (an[3] || ("http:" === an[1] ? "80" : "443")))), p.data && p.processData && "string" != typeof p.data && (p.data = ot.param(p.data, p.traditional)), D(bn, p, n, S), 2 === x) return S; + u = p.global, u && 0 === ot.active++ && ot.event.trigger("ajaxStart"), p.type = p.type.toUpperCase(), p.hasContent = !hn.test(p.type), o = p.url, p.hasContent || (p.data && (o = p.url += (cn.test(o) ? "&" : "?") + p.data, delete p.data), p.cache === !1 && (p.url = dn.test(o) ? o.replace(dn, "$1_=" + ln++) : o + (cn.test(o) ? "&" : "?") + "_=" + ln++)), p.ifModified && (ot.lastModified[o] && S.setRequestHeader("If-Modified-Since", ot.lastModified[o]), ot.etag[o] && S.setRequestHeader("If-None-Match", ot.etag[o])), (p.data && p.hasContent && p.contentType !== !1 || n.contentType) && S.setRequestHeader("Content-Type", p.contentType), S.setRequestHeader("Accept", p.dataTypes[0] && p.accepts[p.dataTypes[0]] ? p.accepts[p.dataTypes[0]] + ("*" !== p.dataTypes[0] ? ", " + xn + "; q=0.01" : "") : p.accepts["*"]); + for(d in p.headers) S.setRequestHeader(d, p.headers[d]); + if(p.beforeSend && (p.beforeSend.call(f, S, p) === !1 || 2 === x)) return S.abort(); + w = "abort"; + for(d in { + success: 1, + error: 1, + complete: 1 + }) S[d](p[d]); + if(r = D(yn, p, n, S)) { + S.readyState = 1, u && h.trigger("ajaxSend", [S, p]), p.async && p.timeout > 0 && (l = setTimeout(function() { + S.abort("timeout") + }, p.timeout)); + try { + x = 1, r.send(b, i) + } catch(C) { + if(!(2 > x)) throw C; + i(-1, C) + } + } else i(-1, "No Transport"); + return S + }, + getJSON: function(e, t, n) { + return ot.get(e, t, n, "json") + }, + getScript: function(e, n) { + return ot.get(e, t, n, "script") + } + }), ot.each(["get", "post"], function(e, n) { + ot[n] = function(e, i, r, o) { + return ot.isFunction(i) && (o = o || r, r = i, i = t), ot.ajax({ + url: e, + type: n, + dataType: o, + data: i, + success: r + }) + } + }), ot.ajaxSetup({ + accepts: { + script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /(?:java|ecma)script/ + }, + converters: { + "text script": function(e) { + return ot.globalEval(e), e + } + } + }), ot.ajaxPrefilter("script", function(e) { + e.cache === t && (e.cache = !1), e.crossDomain && (e.type = "GET") + }), ot.ajaxTransport("script", function(e) { + if(e.crossDomain) { + var t, n; + return { + send: function(i, r) { + t = ot("\n', "\n", '- -<%= documentHTML %>\n', ""].join(""), + pdfTemplate: ["\n", "\n", "\n", '\n', "<%= documentTitle %> \n", '\n', '\n", '\n', "\n", '<%= documentHTML %>\n', ""].join(""), + pdfPageSize: "A4", + sshProxy: t.SSH_PROXY_URL, + extensionSettings: {} + }; + try { + e.extend(i, JSON.parse(n.settings)) + } catch(r) {} + return i +}), define("logger", [], function() { + var e = { + log: function() {}, + info: function() {}, + warn: function() {}, + error: function() {} + }; + return /(\?|&)console($|&)/.test(location.search) ? console : e +}), define("classes/Extension", [], function() { + function e(e, t, n, i) { + this.extensionId = e, this.extensionName = t, this.isOptional = n, this.disableInViewer = i + } + return e +}), define("text", ["module"], function(e) { + var t, n, i, r, o, a = ["Msxml2.XMLHTTP", "Microsoft.XMLHTTP", "Msxml2.XMLHTTP.4.0"], + s = /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, + l = /]*>\s*([\s\S]+)\s*<\/body>/im, + c = "undefined" != typeof location && location.href, + u = c && location.protocol && location.protocol.replace(/\:/, ""), + d = c && location.hostname, + p = c && (location.port || void 0), + f = {}, h = e.config && e.config() || {}; + return t = { + version: "2.0.12", + strip: function(e) { + if(e) { + e = e.replace(s, ""); + var t = e.match(l); + t && (e = t[1]) + } else e = ""; + return e + }, + jsEscape: function(e) { + return e.replace(/(['\\])/g, "\\$1").replace(/[\f]/g, "\\f").replace(/[\b]/g, "\\b").replace(/[\n]/g, "\\n").replace(/[\t]/g, "\\t").replace(/[\r]/g, "\\r").replace(/[\u2028]/g, "\\u2028").replace(/[\u2029]/g, "\\u2029") + }, + createXhr: h.createXhr || function() { + var e, t, n; + if("undefined" != typeof XMLHttpRequest) return new XMLHttpRequest; + if("undefined" != typeof ActiveXObject) + for(t = 0; 3 > t; t += 1) { + n = a[t]; + try { + e = new ActiveXObject(n) + } catch(i) {} + if(e) { + a = [n]; + break + } + } + return e + }, + parseName: function(e) { + var t, n, i, r = !1, + o = e.indexOf("."), + a = 0 === e.indexOf("./") || 0 === e.indexOf("../"); + return -1 !== o && (!a || o > 1) ? (t = e.substring(0, o), n = e.substring(o + 1, e.length)) : t = e, i = n || t, o = i.indexOf("!"), -1 !== o && (r = "strip" === i.substring(o + 1), i = i.substring(0, o), n ? n = i : t = i), { + moduleName: t, + ext: n, + strip: r + } + }, + xdRegExp: /^((\w+)\:)?\/\/([^\/\\]+)/, + useXhr: function(e, n, i, r) { + var o, a, s, l = t.xdRegExp.exec(e); + return l ? (o = l[2], a = l[3], a = a.split(":"), s = a[1], a = a[0], !(o && o !== n || a && a.toLowerCase() !== i.toLowerCase() || (s || a) && s !== r)) : !0 + }, + finishLoad: function(e, n, i, r) { + i = n ? t.strip(i) : i, h.isBuild && (f[e] = i), r(i) + }, + load: function(e, n, i, r) { + if(r && r.isBuild && !r.inlineText) return void i(); + h.isBuild = r && r.isBuild; + var o = t.parseName(e), + a = o.moduleName + (o.ext ? "." + o.ext : ""), + s = n.toUrl(a), + l = h.useXhr || t.useXhr; + return 0 === s.indexOf("empty:") ? void i() : void(!c || l(s, u, d, p) ? t.get(s, function(n) { + t.finishLoad(e, o.strip, n, i) + }, function(e) { + i.error && i.error(e) + }) : n([a], function(e) { + t.finishLoad(o.moduleName + "." + o.ext, o.strip, e, i) + })) + }, + write: function(e, n, i) { + if(f.hasOwnProperty(n)) { + var r = t.jsEscape(f[n]); + i.asModule(e + "!" + n, "define(function () { return '" + r + "';});\n") + } + }, + writeFile: function(e, n, i, r, o) { + var a = t.parseName(n), + s = a.ext ? "." + a.ext : "", + l = a.moduleName + s, + c = i.toUrl(a.moduleName + s) + ".js"; + t.load(l, i, function() { + var n = function(e) { + return r(c, e) + }; + n.asModule = function(e, t) { + return r.asModule(e, c, t) + }, t.write(e, l, n, o) + }, o) + } + }, "node" === h.env || !h.env && "undefined" != typeof process && process.versions && process.versions.node && !process.versions["node-webkit"] ? (n = require.nodeRequire("fs"), t.get = function(e, t, i) { + try { + var r = n.readFileSync(e, "utf8"); + 0 === r.indexOf("") && (r = r.substring(1)), t(r) + } catch(o) { + i && i(o) + } + }) : "xhr" === h.env || !h.env && t.createXhr() ? t.get = function(e, n, i, r) { + var o, a = t.createXhr(); + if(a.open("GET", e, !0), r) + for(o in r) r.hasOwnProperty(o) && a.setRequestHeader(o.toLowerCase(), r[o]); + h.onXhr && h.onXhr(a, e), a.onreadystatechange = function() { + var t, r; + 4 === a.readyState && (t = a.status || 0, t > 399 && 600 > t ? (r = new Error(e + " HTTP status: " + t), r.xhr = a, i && i(r)) : n(a.responseText), h.onXhrComplete && h.onXhrComplete(a, e)) + }, a.send(null) + } : "rhino" === h.env || !h.env && "undefined" != typeof Packages && "undefined" != typeof java ? t.get = function(e, t) { + var n, i, r = "utf-8", + o = new java.io.File(e), + a = java.lang.System.getProperty("line.separator"), + s = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(o), r)), + l = ""; + try { + for(n = new java.lang.StringBuffer, i = s.readLine(), i && i.length() && 65279 === i.charAt(0) && (i = i.substring(1)), null !== i && n.append(i); null !== (i = s.readLine());) n.append(a), n.append(i); + l = String(n.toString()) + } finally { + s.close() + } + t(l) + } : ("xpconnect" === h.env || !h.env && "undefined" != typeof Components && Components.classes && Components.interfaces) && (i = Components.classes, r = Components.interfaces, Components.utils["import"]("resource://gre/modules/FileUtils.jsm"), o = "@mozilla.org/windows-registry-key;1" in i, t.get = function(e, t) { + var n, a, s, l = {}; + o && (e = e.replace(/\//g, "\\")), s = new FileUtils.File(e); + try { + n = i["@mozilla.org/network/file-input-stream;1"].createInstance(r.nsIFileInputStream), n.init(s, 1, 0, !1), a = i["@mozilla.org/intl/converter-input-stream;1"].createInstance(r.nsIConverterInputStream), a.init(n, "utf-8", n.available(), r.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER), a.readString(n.available(), l), a.close(), n.close(), t(l.value) + } catch(c) { + throw new Error((s && s.path || "") + ": " + c) + } + }), t +}), define("text!html/settingsExtensionsAccordion.html", [], function() { + return '\n\n' +}), +function() { + var e = function(e, t, n, i) { + this.rawMessage = e, this.parsedLine = void 0 !== t ? t : -1, this.snippet = void 0 !== n ? n : null, this.parsedFile = void 0 !== i ? i : null, this.updateRepr(), this.message = e + }; + e.prototype = { + name: "YamlParseException", + message: null, + parsedFile: null, + parsedLine: -1, + snippet: null, + rawMessage: null, + isDefined: function(e) { + return void 0 != e && null != e + }, + getSnippet: function() { + return this.snippet + }, + setSnippet: function(e) { + this.snippet = e, this.updateRepr() + }, + getParsedFile: function() { + return this.parsedFile + }, + setParsedFile: function(e) { + this.parsedFile = e, this.updateRepr() + }, + getParsedLine: function() { + return this.parsedLine + }, + setParsedLine: function(e) { + this.parsedLine = e, this.updateRepr() + }, + updateRepr: function() { + this.message = this.rawMessage; + var e = !1; + "." === this.message.charAt(this.message.length - 1) && (this.message = this.message.substring(0, this.message.length - 1), e = !0), null !== this.parsedFile && (this.message += " in " + JSON.stringify(this.parsedFile)), this.parsedLine >= 0 && (this.message += " at line " + this.parsedLine), this.snippet && (this.message += ' (near "' + this.snippet + '")'), e && (this.message += ".") + } + }; + var t = !1, + n = function() {}; + n.prototype = { + parseFile: function(t, i) { + if(null == i) { + var r = this.getFileContents(t), + o = null; + try { + o = this.parse(r) + } catch(a) { + throw a instanceof e && a.setParsedFile(t), a + } + return o + } + this.getFileContents(t, function(e) { + i((new n).parse(e)) + }) + }, + parse: function(e) { + var t = new o; + return t.parse(e) + }, + dump: function(e, t, n) { + null == t && (t = 2); + var i = new s; + return n && (i.numSpacesForIndentation = n), i.dump(e, t) + }, + getXHR: function() { + if(window.XMLHttpRequest) return new XMLHttpRequest; + if(window.ActiveXObject) + for(var e = ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.3.0", "Msxml2.XMLHTTP", "Microsoft.XMLHTTP"], t = 0; 4 > t; t++) try { + return new ActiveXObject(e[t]) + } catch(n) {} + return null + }, + getFileContents: function(e, n) { + if(t) { + var i = require("fs"); + if(null == n) { + var r = i.readFileSync(e); + return null == r ? null : "" + r + } + i.readFile(e, function(e, t) { + n(e ? null : t) + }) + } else { + var o = this.getXHR(); + if(null == n) return o.open("GET", e, !1), o.send(null), 200 == o.status || 0 == o.status ? o.responseText : null; + o.onreadystatechange = function() { + 4 == o.readyState && n(200 == o.status || 0 == o.status ? o.responseText : null) + }, o.open("GET", e, !0), o.send(null) + } + } + }; + var i = { + stringify: function(e, t, i) { + return(new n).dump(e, t, i) + }, + parse: function(e) { + return(new n).parse(e) + }, + load: function(e, t) { + return(new n).parseFile(e, t) + } + }; + "undefined" != typeof exports && "undefined" != typeof module && module.exports && (exports = module.exports = i, t = !0, function() { + var e = function(e, t) { + e.exports = i.load(t) + }; + void 0 !== require.extensions && (require.extensions[".yml"] = e, require.extensions[".yaml"] = e) + }()), "undefined" != typeof window && (window.YAML = i); + var r = function() {}; + r.prototype = { + i: null, + parse: function(t) { + var n = null; + if(t = this.trim(t), 0 == t.length) return ""; + switch(t.charAt(0)) { + case "[": + n = this.parseSequence(t); + break; + case "{": + n = this.parseMapping(t); + break; + default: + n = this.parseScalar(t) + } + if("" != t.substr(this.i + 1).replace(/^\s*#.*$/, "")) throw console.log("oups " + t.substr(this.i + 1)), new e('Unexpected characters near "' + t.substr(this.i) + '".'); + return n + }, + dump: function(e) { + if(void 0 == e || null == e) return "null"; + if(e instanceof Date) return e.toISOString(); + if("object" == typeof e) return this.dumpObject(e); + if("boolean" == typeof e) return e ? "true" : "false"; + if(/^\d+$/.test(e)) return "string" == typeof e ? "'" + e + "'" : parseInt(e); + if(this.isNumeric(e)) return "string" == typeof e ? "'" + e + "'" : parseFloat(e); + if("number" == typeof e) return 1 / 0 == e ? ".Inf" : e == -1 / 0 ? "-.Inf" : isNaN(e) ? ".NAN" : e; + var t = new YamlEscaper; + return t.requiresDoubleQuoting(e) ? t.escapeWithDoubleQuotes(e) : t.requiresSingleQuoting(e) ? t.escapeWithSingleQuotes(e) : "" == e ? "" : this.getTimestampRegex().test(e) ? "'" + e + "'" : this.inArray(e.toLowerCase(), ["null", "~", "true", "false"]) ? "'" + e + "'" : e + }, + dumpObject: function(e) { + var t, n = this.getKeys(e), + i = null, + r = n.length; + if(e instanceof Array) { + for(i = [], t = 0; r > t; t++) i.push(this.dump(e[n[t]])); + return "[" + i.join(", ") + "]" + } + for(i = [], t = 0; r > t; t++) i.push(this.dump(n[t]) + ": " + this.dump(e[n[t]])); + return "{ " + i.join(", ") + " }" + }, + parseScalar: function(t, n, i, r, o) { + void 0 == n && (n = null), void 0 == i && (i = ['"', "'"]), void 0 == r && (r = 0), void 0 == o && (o = !0); + var a = null, + s = null, + l = null; + if(this.inArray(t[r], i)) { + if(a = this.parseQuotedScalar(t, r), r = this.i, null !== n) { + var c = t.substr(r).replace(/^\s+/, ""); + if(!this.inArray(c.charAt(0), n)) throw new e("Unexpected characters (" + t.substr(r) + ").") + } + } else { + if(n) { + if(!(l = new RegExp("^(.+?)(" + n.join("|") + ")").exec((t + "").substring(r)))) throw new e("Malformed inline YAML string (" + t + ")."); + a = l[1], r += a.length + } else a = (t + "").substring(r), r += a.length, s = a.indexOf(" #"), -1 != s && (a = a.substr(0, s).replace(/\s+$/g, "")); + a = o ? this.evaluateScalar(a) : a + } + return this.i = r, a + }, + parseQuotedScalar: function(t, n) { + var i = null; + if(!(i = new RegExp("^" + r.REGEX_QUOTED_STRING).exec((t + "").substring(n)))) throw new e("Malformed inline YAML string (" + (t + "").substring(n) + ")."); + var o = i[0].substr(1, i[0].length - 2), + s = new a; + return o = '"' == (t + "").charAt(n) ? s.unescapeDoubleQuotedString(o) : s.unescapeSingleQuotedString(o), n += i[0].length, this.i = n, o + }, + parseSequence: function(t, n) { + void 0 == n && (n = 0); + var i = [], + r = t.length; + for(n += 1; r > n;) { + switch(t.charAt(n)) { + case "[": + i.push(this.parseSequence(t, n)), n = this.i; + break; + case "{": + i.push(this.parseMapping(t, n)), n = this.i; + break; + case "]": + return this.i = n, i; + case ",": + case " ": + break; + default: + var o = this.inArray(t.charAt(n), ['"', "'"]), + a = this.parseScalar(t, [",", "]"], ['"', "'"], n); + if(n = this.i, !o && -1 != (a + "").indexOf(": ")) try { + a = this.parseMapping("{" + a + "}") + } catch(s) { + if(!(s instanceof e)) throw s + } + i.push(a), n-- + } + n++ + } + throw new e('Malformed inline YAML string "' + t + '"') + }, + parseMapping: function(t, n) { + void 0 == n && (n = 0); + var i = {}, r = t.length; + n += 1; + for(var o = !1, a = !1; r > n;) { + switch(a = !1, t.charAt(n)) { + case " ": + case ",": + n++, a = !0; + break; + case "}": + return this.i = n, i + } + if(!a) { + var s = this.parseScalar(t, [":", " "], ['"', "'"], n, !1); + for(n = this.i, o = !1; r > n;) { + switch(t.charAt(n)) { + case "[": + i[s] = this.parseSequence(t, n), n = this.i, o = !0; + break; + case "{": + i[s] = this.parseMapping(t, n), n = this.i, o = !0; + break; + case ":": + case " ": + break; + default: + i[s] = this.parseScalar(t, [",", "}"], ['"', "'"], n), n = this.i, o = !0, n-- + } + if(++n, o) { + a = !0; + break + } + } + } + } + throw new e('Malformed inline YAML string "' + t + '"') + }, + evaluateScalar: function(e) { + e = this.trim(e); + var t = null, + n = null; + return "null" == e.toLowerCase() || "" == e || "~" == e ? null : 0 == (e + "").indexOf("!str ") ? ("" + e).substring(5) : 0 == (e + "").indexOf("! ") ? parseInt(this.parseScalar((e + "").substr(2))) : /^\d+$/.test(e) ? (t = e, n = parseInt(e), "0" == e.charAt(0) ? this.octdec(e) : "" + t == "" + n ? n : t) : "true" == (e + "").toLowerCase() ? !0 : "false" == (e + "").toLowerCase() ? !1 : this.isNumeric(e) ? "0x" == (e + "").substr(0, 2) ? this.hexdec(e) : parseFloat(e) : ".inf" == e.toLowerCase() ? 1 / 0 : ".nan" == e.toLowerCase() ? 0 / 0 : "-.inf" == e.toLowerCase() ? -1 / 0 : /^(-|\+)?[0-9,]+(\.[0-9]+)?$/.test(e) ? parseFloat(e.split(",").join("")) : this.getTimestampRegex().test(e) ? new Date(this.strtotime(e)) : "" + e + }, + getTimestampRegex: function() { + return new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ ]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:.([0-9]*))?(?:[ ]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$", "gi") + }, + trim: function(e) { + return(e + "").replace(/^\s+/, "").replace(/\s+$/, "") + }, + isNumeric: function(e) { + return e - 0 == e && e.length > 0 && "" != e.replace(/\s+/g, "") + }, + inArray: function(e, t) { + var n, i = t.length; + for(n = 0; i > n; n++) + if(e == t[n]) return !0; + return !1 + }, + getKeys: function(e) { + var t = []; + for(var n in e) e.hasOwnProperty(n) && t.push(n); + return t + }, + octdec: function(e) { + return parseInt((e + "").replace(/[^0-7]/gi, ""), 8) + }, + hexdec: function(e) { + return e = this.trim(e), "0x" == (e + "").substr(0, 2) && (e = (e + "").substring(2)), parseInt((e + "").replace(/[^a-f0-9]/gi, ""), 16) + }, + strtotime: function(e, t) { + var n, i, r, o, a = ""; + if(e = (e + "").replace(/\s{2,}|^\s|\s$/g, " ").replace(/[\t\r\n]/g, ""), "now" === e) return null === t || isNaN(t) ? (new Date).getTime() || 0 : t || 0; + if(!isNaN(a = Date.parse(e))) return a || 0; + t = t ? new Date(t) : new Date, e = e.toLowerCase(); + var s = { + day: { + sun: 0, + mon: 1, + tue: 2, + wed: 3, + thu: 4, + fri: 5, + sat: 6 + }, + mon: ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"] + }, l = function(e) { + var n = e[2] && "ago" === e[2], + i = (i = "last" === e[0] ? -1 : 1) * (n ? -1 : 1); + switch(e[0]) { + case "last": + case "next": + switch(e[1].substring(0, 3)) { + case "yea": + t.setFullYear(t.getFullYear() + i); + break; + case "wee": + t.setDate(t.getDate() + 7 * i); + break; + case "day": + t.setDate(t.getDate() + i); + break; + case "hou": + t.setHours(t.getHours() + i); + break; + case "min": + t.setMinutes(t.getMinutes() + i); + break; + case "sec": + t.setSeconds(t.getSeconds() + i); + break; + case "mon": + if("month" === e[1]) { + t.setMonth(t.getMonth() + i); + break + } + default: + var r = s.day[e[1].substring(0, 3)]; + if("undefined" != typeof r) { + var o = r - t.getDay(); + 0 === o ? o = 7 * i : o > 0 ? "last" === e[0] && (o -= 7) : "next" === e[0] && (o += 7), t.setDate(t.getDate() + o), t.setHours(0, 0, 0, 0) + } + } + break; + default: + if(!/\d+/.test(e[0])) return !1; + switch(i *= parseInt(e[0], 10), e[1].substring(0, 3)) { + case "yea": + t.setFullYear(t.getFullYear() + i); + break; + case "mon": + t.setMonth(t.getMonth() + i); + break; + case "wee": + t.setDate(t.getDate() + 7 * i); + break; + case "day": + t.setDate(t.getDate() + i); + break; + case "hou": + t.setHours(t.getHours() + i); + break; + case "min": + t.setMinutes(t.getMinutes() + i); + break; + case "sec": + t.setSeconds(t.getSeconds() + i) + } + } + return !0 + }; + if(r = e.match(/^(\d{2,4}-\d{2}-\d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/), null !== r) return r[2] ? r[3] || (r[2] += ":00") : r[2] = "00:00:00", o = r[1].split(/-/g), o[1] = s.mon[o[1] - 1] || o[1], o[0] = +o[0], o[0] = o[0] >= 0 && o[0] <= 69 ? "20" + (o[0] < 10 ? "0" + o[0] : o[0] + "") : o[0] >= 70 && o[0] <= 99 ? "19" + o[0] : o[0] + "", parseInt(this.strtotime(o[2] + " " + o[1] + " " + o[0] + " " + r[2]) + (r[4] ? r[4] : ""), 10); + var c = "([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday)|(last|next)\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday))(\\sago)?"; + if(r = e.match(new RegExp(c, "gi")), null === r) return !1; + for(n = 0, i = r.length; i > n; n++) + if(!l(r[n].split(" "))) return !1; + return t.getTime() || 0 + } + }, r.REGEX_QUOTED_STRING = "(?:\"(?:[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\"|'(?:[^']*(?:''[^']*)*)')"; + var o = function(e) { + this.offset = void 0 !== e ? e : 0 + }; + o.prototype = { + offset: 0, + lines: [], + currentLineNb: -1, + currentLine: "", + refs: {}, + parse: function(t) { + this.currentLineNb = -1, this.currentLine = "", this.lines = this.cleanup(t).split("\n"); + for(var n = null, i = null; this.moveToNextLine();) + if(!this.isCurrentLineEmpty()) { + if(" " == this.currentLine.charAt(0)) throw new e("A YAML file cannot contain tabs as indentation.", this.getRealCurrentLineNb() + 1, this.currentLine); + var a = !1, + s = !1, + l = !1, + c = null, + u = null, + d = null, + p = null, + f = null, + h = null, + m = null, + g = null, + v = null; + if(c = /^\-((\s+)(.+?))?\s*$/.exec(this.currentLine)) { + if(i && "mapping" == i) throw new e("You cannot define a sequence item when in a mapping", this.getRealCurrentLineNb() + 1, this.currentLine); + i = "sequence", this.isDefined(n) || (n = []), c = { + leadspaces: c[2], + value: c[3] + }, this.isDefined(c.value) && (u = /^&([^ ]+) *(.*)/.exec(c.value)) && (u = { + ref: u[1], + value: u[2] + }, a = u.ref, c.value = u.value), this.isDefined(c.value) && "" != this.trim(c.value) && "#" != c.value.replace(/^ +/, "").charAt(0) ? this.isDefined(c.leadspaces) && " " == c.leadspaces && (u = new RegExp("^(" + r.REGEX_QUOTED_STRING + "|[^ '\"{[].*?) *:(\\s+(.+?))?\\s*$").exec(c.value)) ? (u = { + key: u[1], + value: u[3] + }, d = this.getRealCurrentLineNb(), p = new o(d), p.refs = this.refs, f = c.value, this.isNextLineIndented() || (f += "\n" + this.getNextEmbedBlock(this.getCurrentLineIndentation() + 2)), n.push(p.parse(f)), this.refs = p.refs) : n.push(this.parseValue(c.value)) : (d = this.getRealCurrentLineNb() + 1, p = new o(d), p.refs = this.refs, n.push(p.parse(this.getNextEmbedBlock())), this.refs = p.refs) + } else { + if(!(c = new RegExp("^(" + r.REGEX_QUOTED_STRING + "|[^ '\"[{].*?) *:(\\s+(.+?))?\\s*$").exec(this.currentLine))) { + if(2 == this.lines.length && this.isEmpty(this.lines[1])) { + try { + t = (new r).parse(this.lines[0]) + } catch(b) { + throw b instanceof e && (b.setParsedLine(this.getRealCurrentLineNb() + 1), b.setSnippet(this.currentLine)), b + } + if(this.isObject(t)) { + var y = t[0]; + if("string" == typeof t && "*" == y.charAt(0)) { + n = [], g = t.length; + for(var x = 0; g > x; x++) n.push(this.refs[t[x].substr(1)]); + t = n + } + } + return t + } + throw new e("Unable to parse.", this.getRealCurrentLineNb() + 1, this.currentLine) + } + if(this.isDefined(n) || (n = {}), i && "sequence" == i) throw new e("You cannot define a mapping item when in a sequence", this.getRealCurrentLineNb() + 1, this.currentLine); + i = "mapping", c = { + key: c[1], + value: c[3] + }; + try { + h = (new r).parseScalar(c.key) + } catch(b) { + throw b instanceof e && (b.setParsedLine(this.getRealCurrentLineNb() + 1), b.setSnippet(this.currentLine)), b + } + if("<<" == h) + if(this.isDefined(c.value) && "*" == (c.value + "").charAt(0)) { + if(s = c.value.substr(1), void 0 == this.refs[s]) throw new e('Reference "' + t + '" does not exist', this.getRealCurrentLineNb() + 1, this.currentLine) + } else { + t = this.isDefined(c.value) && "" != c.value ? c.value : this.getNextEmbedBlock(), d = this.getRealCurrentLineNb() + 1, p = new o(d), p.refs = this.refs, m = p.parse(t), this.refs = p.refs; + var w = []; + if(!this.isObject(m)) throw new e("YAML merge keys used with a scalar value instead of an array", this.getRealCurrentLineNb() + 1, this.currentLine); + if(this.isDefined(m[0])) { + v = this.reverseArray(m), g = v.length; + for(var x = 0; g > x; x++) { + { + v[x] + } + if(!this.isObject(v[x])) throw new e("Merge items must be arrays", this.getRealCurrentLineNb() + 1, this.currentLine); + w = this.mergeObject(v[x], w) + } + } else w = this.mergeObject(w, m); + l = w + } else this.isDefined(c.value) && (u = /^&([^ ]+) *(.*)/.exec(c.value)) && (u = { + ref: u[1], + value: u[2] + }, a = u.ref, c.value = u.value); + l ? n = l : this.isDefined(c.value) && "" != this.trim(c.value) && "#" != this.trim(c.value).charAt(0) ? s ? n = this.refs[s] : n[h] = this.parseValue(c.value) : this.isNextLineIndented() && !this.isNextLineUnIndentedCollection() ? n[h] = null : (d = this.getRealCurrentLineNb() + 1, p = new o(d), p.refs = this.refs, n[h] = p.parse(this.getNextEmbedBlock()), this.refs = p.refs) + } if(a) + if(n instanceof Array) this.refs[a] = n[n.length - 1]; + else { + var S = null; + for(var C in n) n.hasOwnProperty(C) && (S = C); + this.refs[a] = n[C] + } + } + return this.isEmpty(n) ? null : n + }, + getRealCurrentLineNb: function() { + return this.currentLineNb + this.offset + }, + getCurrentLineIndentation: function() { + return this.currentLine.length - this.currentLine.replace(/^ +/g, "").length + }, + getNextEmbedBlock: function(t) { + this.moveToNextLine(); + var n = null, + i = null; + if(this.isDefined(t)) n = t; + else { + n = this.getCurrentLineIndentation(); + var r = this.isStringUnIndentedCollectionItem(this.currentLine); + if(!this.isCurrentLineEmpty() && 0 == n && !r) throw new e("Indentation problem A", this.getRealCurrentLineNb() + 1, this.currentLine) + } + var o = [this.currentLine.substr(n)], + a = this.isStringUnIndentedCollectionItem(this.currentLine), + s = -1; + for(a === !0 && (s = 1 + /^\-((\s+)(.+?))?\s*$/.exec(this.currentLine)[2].length); this.moveToNextLine();) { + if(a && !this.isStringUnIndentedCollectionItem(this.currentLine) && this.getCurrentLineIndentation() != s) { + this.moveToPreviousLine(); + break + } + if(this.isCurrentLineEmpty()) this.isCurrentLineBlank() && o.push(this.currentLine.substr(n)); + else { + i = this.getCurrentLineIndentation(); + var l; + if(l = /^( *)$/.exec(this.currentLine)) o.push(l[1]); + else { + if(!(i >= n)) { + if(0 == i) { + this.moveToPreviousLine(); + break + } + throw new e("Indentation problem B", this.getRealCurrentLineNb() + 1, this.currentLine) + } + o.push(this.currentLine.substr(n)) + } + } + } + return o.join("\n") + }, + moveToNextLine: function() { + return this.currentLineNb >= this.lines.length - 1 ? !1 : (this.currentLineNb++, this.currentLine = this.lines[this.currentLineNb], !0) + }, + moveToPreviousLine: function() { + this.currentLineNb--, this.currentLine = this.lines[this.currentLineNb] + }, + parseValue: function(t) { + if("*" == (t + "").charAt(0)) { + if(t = "#" == this.trim(t).charAt(0) ? (t + "").substr(1, t.indexOf("#") - 2) : (t + "").substr(1), void 0 == this.refs[t]) throw new e('Reference "' + t + '" does not exist', this.getRealCurrentLineNb() + 1, this.currentLine); + return this.refs[t] + } + var n = null; + if(n = /^(\||>)(\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?( +#.*)?$/.exec(t)) { + n = { + separator: n[1], + modifiers: n[2], + comments: n[3] + }; + var i = this.isDefined(n.modifiers) ? n.modifiers : ""; + return this.parseFoldedScalar(n.separator, i.replace(/\d+/g, ""), Math.abs(parseInt(i))) + } + try { + return(new r).parse(t) + } catch(o) { + throw o instanceof e && (o.setParsedLine(this.getRealCurrentLineNb() + 1), o.setSnippet(this.currentLine)), o + } + }, + parseFoldedScalar: function(e, t, n) { + void 0 == t && (t = ""), void 0 == n && (n = 0), e = "|" == e ? "\n" : " "; + for(var i = "", r = null, o = this.moveToNextLine(); o && this.isCurrentLineBlank();) i += "\n", o = this.moveToNextLine(); + if(!o) return ""; + var a = null; + if(!(a = new RegExp("^(" + (n ? this.strRepeat(" ", n) : " +") + ")(.*)$").exec(this.currentLine))) return this.moveToPreviousLine(), ""; + a = { + indent: a[1], + text: a[2] + }; + var s = a.indent, + l = 0; + for(i += a.text + e; this.currentLineNb + 1 < this.lines.length;) + if(this.moveToNextLine(), a = new RegExp("^( {" + s.length + ",})(.+)$").exec(this.currentLine)) a = { + indent: a[1], + text: a[2] + }, " " == e && l != a.indent && (i = i.substr(0, i.length - 1) + "\n"), l = a.indent, r = a.indent.length - s.length, i += this.strRepeat(" ", r) + a.text + (0 != r ? "\n" : e); + else { + if(!(a = /^( *)$/.exec(this.currentLine))) { + this.moveToPreviousLine(); + break + } + i += a[1].replace(new RegExp("^ {1," + s.length + "}", "g"), "") + "\n" + } + switch(" " == e && (i = i.replace(/ (\n*)$/g, "\n$1")), t) { + case "": + i = i.replace(/\n+$/g, "\n"); + break; + case "+": + break; + case "-": + i = i.replace(/\n+$/g, "") + } + return i + }, + isNextLineIndented: function() { + for(var e = this.getCurrentLineIndentation(), t = this.moveToNextLine(); t && this.isCurrentLineEmpty();) t = this.moveToNextLine(); + if(0 == t) return !1; + var n = !1; + return this.getCurrentLineIndentation() <= e && (n = !0), this.moveToPreviousLine(), n + }, + isCurrentLineEmpty: function() { + return this.isCurrentLineBlank() || this.isCurrentLineComment() + }, + isCurrentLineBlank: function() { + return "" == this.trim(this.currentLine) + }, + isCurrentLineComment: function() { + var e = this.currentLine.replace(/^ +/g, ""); + return "#" == e.charAt(0) + }, + cleanup: function(e) { + e = e.split("\r\n").join("\n").split("\r").join("\n"), /\n$/.test(e) || (e += "\n"); + for(var t = 0, n = /^\%YAML[: ][\d\.]+.*\n/; n.test(e);) e = e.replace(n, ""), t++; + if(this.offset += t, n = /^(#.*?\n)+/, n.test(e)) { + var i = e.replace(n, ""); + this.offset += this.subStrCount(e, "\n") - this.subStrCount(i, "\n"), e = i + } + return n = /^\-\-\-.*?\n/, n.test(e) && (i = e.replace(n, ""), this.offset += this.subStrCount(e, "\n") - this.subStrCount(i, "\n"), e = i, e = e.replace(/\.\.\.\s*$/g, "")), e + }, + isNextLineUnIndentedCollection: function() { + for(var e = this.getCurrentLineIndentation(), t = this.moveToNextLine(); t && this.isCurrentLineEmpty();) t = this.moveToNextLine(); + if(!1 === t) return !1; + var n = !1; + return this.getCurrentLineIndentation() == e && this.isStringUnIndentedCollectionItem(this.currentLine) && (n = !0), this.moveToPreviousLine(), n + }, + isStringUnIndentedCollectionItem: function() { + return 0 === this.currentLine.indexOf("- ") + }, + isObject: function(e) { + return "object" == typeof e && this.isDefined(e) + }, + isEmpty: function(e) { + return void 0 == e || null == e || "" == e || 0 == e || "0" == e || 0 == e + }, + isDefined: function(e) { + return void 0 != e && null != e + }, + reverseArray: function(e) { + for(var t = [], n = e.length, i = n - 1; i >= 0; i--) t.push(e[i]); + return t + }, + merge: function(e, t) { + var n, i = {}; + for(n in e) e.hasOwnProperty(n) && (/^\d+$/.test(n) ? i.push(e) : i[n] = e[n]); + for(n in t) t.hasOwnProperty(n) && (/^\d+$/.test(n) ? i.push(t) : i[n] = t[n]); + return i + }, + strRepeat: function(e, t) { + var n, i = ""; + for(n = 0; t > n; n++) i += e; + return i + }, + subStrCount: function(e, t, n, i) { + var r = 0; + e = "" + e, t = "" + t, void 0 != n && (e = e.substr(n)), void 0 != i && (e = e.substr(0, i)); + for(var o = e.length, a = t.length, s = 0; o > s; s++) t == e.substr(s, a) && r++, s += a - 1; + return r + }, + trim: function(e) { + return(e + "").replace(/^ +/, "").replace(/ +$/, "") + } + }, YamlEscaper = function() {}, YamlEscaper.prototype = { + requiresDoubleQuoting: function(e) { + return new RegExp(YamlEscaper.REGEX_CHARACTER_TO_ESCAPE).test(e) + }, + escapeWithDoubleQuotes: function(e) { + e += ""; + for(var t = YamlEscaper.escapees.length, n = YamlEscaper.escaped.length, i = YamlEscaper.escaped, r = 0; t > r; ++r) r >= n && i.push(""); + var o = ""; + return o = e.replace(new RegExp(YamlEscaper.escapees.join("|"), "g"), function(e) { + for(var n = 0; t > n; ++n) + if(e == YamlEscaper.escapees[n]) return i[n] + }), '"' + o + '"' + }, + requiresSingleQuoting: function(e) { + return /[\s'":{}[\],&*#?]|^[-?|<>=!%@`]/.test(e) + }, + escapeWithSingleQuotes: function(e) { + return "'" + e.replace(/'/g, "''") + "'" + } + }, YamlEscaper.REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]| | |â¨|â©", YamlEscaper.escapees = ["\\\\", '\\"', '"', "\x00", "", "", "", "", "", "", "", "\b", " ", "\n", "", "\f", "\r", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", " ", " ", "â¨", "â©"], YamlEscaper.escaped = ['\\"', "\\\\", '\\"', "\\0", "\\x01", "\\x02", "\\x03", "\\x04", "\\x05", "\\x06", "\\a", "\\b", "\\t", "\\n", "\\v", "\\f", "\\r", "\\x0e", "\\x0f", "\\x10", "\\x11", "\\x12", "\\x13", "\\x14", "\\x15", "\\x16", "\\x17", "\\x18", "\\x19", "\\x1a", "\\e", "\\x1c", "\\x1d", "\\x1e", "\\x1f", "\\N", "\\_", "\\L", "\\P"]; + var a = function() {}; + a.prototype = { + unescapeSingleQuotedString: function(e) { + return e.replace(/''/g, "'") + }, + unescapeDoubleQuotedString: function(e) { + var t = function(e) { + return(new a).unescapeCharacter(e) + }; + return e.replace(new RegExp(a.REGEX_ESCAPED_CHARACTER, "g"), t) + }, + unescapeCharacter: function(e) { + switch(e.charAt(1)) { + case "0": + return String.fromCharCode(0); + case "a": + return String.fromCharCode(7); + case "b": + return String.fromCharCode(8); + case "t": + return " "; + case " ": + return " "; + case "n": + return "\n"; + case "v": + return String.fromCharCode(11); + case "f": + return String.fromCharCode(12); + case "r": + return String.fromCharCode(13); + case "e": + return ""; + case " ": + return " "; + case '"': + return '"'; + case "/": + return "/"; + case "\\": + return "\\"; + case "N": + return "\x00 "; + case "_": + return "\x00 "; + case "L": + return " ("; + case "P": + return " )"; + case "x": + return this.pack("n", (new r).hexdec(e.substr(2, 2))); + case "u": + return this.pack("n", (new r).hexdec(e.substr(2, 4))); + case "U": + return this.pack("N", (new r).hexdec(e.substr(2, 8))) + } + }, + pack: function(e) { + for(var t, n, i = 0, r = 1, o = "", a = 0; i < e.length;) { + for(t = e.charAt(i), n = "", i++; i < e.length && null !== e.charAt(i).match(/[\d\*]/);) n += e.charAt(i), i++; + switch("" === n && (n = "1"), t) { + case "n": + if("*" === n && (n = arguments.length - r), n > arguments.length - r) throw new Error("Warning: pack() Type " + t + ": too few arguments"); + for(a = 0; n > a; a++) o += String.fromCharCode(arguments[r] >> 8 & 255), o += String.fromCharCode(255 & arguments[r]), r++; + break; + case "N": + if("*" === n && (n = arguments.length - r), n > arguments.length - r) throw new Error("Warning: pack() Type " + t + ": too few arguments"); + for(a = 0; n > a; a++) o += String.fromCharCode(arguments[r] >> 24 & 255), o += String.fromCharCode(arguments[r] >> 16 & 255), o += String.fromCharCode(arguments[r] >> 8 & 255), o += String.fromCharCode(255 & arguments[r]), r++; + break; + default: + throw new Error("Warning: pack() Type " + t + ": unknown format code") + } + } + if(r < arguments.length) throw new Error("Warning: pack(): " + (arguments.length - r) + " arguments unused"); + return o + } + }, a.REGEX_ESCAPED_CHARACTER = '\\\\([0abt nvfre "\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})'; + var s = function() {}; + s.prototype = { + dump: function(e, t, n) { + null == t && (t = 0), null == n && (n = 0); + var i, o = "", + a = n ? this.strRepeat(" ", n) : ""; + if(this.numSpacesForIndentation || (this.numSpacesForIndentation = 2), 0 >= t || !this.isObject(e) || this.isEmpty(e)) i = new r, o += a + i.dump(e); + else { + var s, l = !this.arrayEquals(this.getKeys(e), this.range(0, e.length - 1)); + for(var c in e) e.hasOwnProperty(c) && (s = 0 >= t - 1 || !this.isObject(e[c]) || this.isEmpty(e[c]), l && (i = new r), o += a + "" + (l ? i.dump(c) + ":" : "-") + (s ? " " : "\n") + this.dump(e[c], t - 1, s ? 0 : n + this.numSpacesForIndentation) + (s ? "\n" : "")) + } + return o + }, + strRepeat: function(e, t) { + var n, i = ""; + for(n = 0; t > n; n++) i += e; + return i + }, + isObject: function(e) { + return this.isDefined(e) && "object" == typeof e + }, + isEmpty: function(e) { + var t = void 0 == e || null == e || "" == e || 0 == e || "0" == e || 0 == e; + if(!(t || "object" != typeof e || e instanceof Array)) { + var n = 0; + for(var i in e) e.hasOwnProperty(i) && n++; + t = !n + } + return t + }, + isDefined: function(e) { + return void 0 != e && null != e + }, + getKeys: function(e) { + var t = []; + for(var n in e) e.hasOwnProperty(n) && t.push(n); + return t + }, + range: function(e, t) { + if(e > t) return []; + for(var n = [], i = e; t >= i; i++) n.push(i); + return n + }, + arrayEquals: function(e, t) { + if(e.length != t.length) return !1; + for(var n = e.length, i = 0; n > i; i++) + if(e[i] != t[i]) return !1; + return !0 + } + } +}(), define("yaml-js", function(e) { + return function() { + var t; + return t || e.YAML + } +}(this)), define("extensions/yamlFrontMatterParser", ["underscore", "classes/Extension", "yaml-js"], function(e, t, n) { + function i(t, i) { + if(t === a) { + var r = s.exec(i), + o = r[1], + l = r[2]; + if(l) { + if(!a.frontMatter || a.frontMatter._frontMatter != o) { + a.frontMatter = void 0; + try { + a.frontMatter = n.parse(l), e.isObject(a.frontMatter) || (a.frontMatter = void 0), a.frontMatter._yaml = l, a.frontMatter._frontMatter = o + } catch(c) {} + } + } else a.frontMatter = void 0 + } + } + var r, o = new t("yamlFrontMatterParser", "YAML front matter"); + o.onEventMgrCreated = function(e) { + r = e + }; + var a; + o.onFileSelected = function(e) { + a = e + }; + var s = /^(\s*-{3}\s*\n([\w\W]+?)\n\s*-{3}\s*?\n)?([\w\W]*)$/; + return o.onFileOpen = i, o.onContentChanged = i, o +}), define("text!html/markdownExtraSettingsBlock.html", [], function() { + return '\n\n\n \n\n \n <%= extensionName %> \n\n\n<%= settingsBlock %>\nAdds extra features to the original Markdown syntax.
\n\n\nMore info' +}), window.PR_SHOULD_USE_CONTINUATION = !0; +var prettyPrintOne, prettyPrint; +! function() { + function e(e) { + function t(e) { + var t = e.charCodeAt(0); + if(92 !== t) return t; + var n = e.charAt(1); + return t = d[n], t ? t : n >= "0" && "7" >= n ? parseInt(e.substring(1), 8) : "u" === n || "x" === n ? parseInt(e.substring(2), 16) : e.charCodeAt(1) + } + + function n(e) { + if(32 > e) return(16 > e ? "\\x0" : "\\x") + e.toString(16); + var t = String.fromCharCode(e); + return "\\" === t || "-" === t || "]" === t || "^" === t ? "\\" + t : t + } + + function i(e) { + var i = e.substring(1, e.length - 1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]", "g")), + r = [], + o = "^" === i[0], + a = ["["]; + o && a.push("^"); + for(var s = o ? 1 : 0, l = i.length; l > s; ++s) { + var c = i[s]; + if(/\\[bdsw]/i.test(c)) a.push(c); + else { + var u, d = t(c); + l > s + 2 && "-" === i[s + 1] ? (u = t(i[s + 2]), s += 2) : u = d, r.push([d, u]), 65 > u || d > 122 || (65 > u || d > 90 || r.push([32 | Math.max(65, d), 32 | Math.min(u, 90)]), 97 > u || d > 122 || r.push([-33 & Math.max(97, d), -33 & Math.min(u, 122)])) + } + } + r.sort(function(e, t) { + return e[0] - t[0] || t[1] - e[1] + }); + for(var p = [], f = [], s = 0; s < r.length; ++s) { + var h = r[s]; + h[0] <= f[1] + 1 ? f[1] = Math.max(f[1], h[1]) : p.push(f = h) + } + for(var s = 0; s < p.length; ++s) { + var h = p[s]; + a.push(n(h[0])), h[1] > h[0] && (h[1] + 1 > h[0] && a.push("-"), a.push(n(h[1]))) + } + return a.push("]"), a.join("") + } + + function r(e) { + for(var t = e.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)", "g")), r = t.length, s = [], l = 0, c = 0; r > l; ++l) { + var u = t[l]; + if("(" === u)++c; + else if("\\" === u.charAt(0)) { + var d = +u.substring(1); + d && (c >= d ? s[d] = -1 : t[l] = n(d)) + } + } + for(var l = 1; l < s.length; ++l) - 1 === s[l] && (s[l] = ++o); + for(var l = 0, c = 0; r > l; ++l) { + var u = t[l]; + if("(" === u)++c, s[c] || (t[l] = "(?:"); + else if("\\" === u.charAt(0)) { + var d = +u.substring(1); + d && c >= d && (t[l] = "\\" + s[d]) + } + } + for(var l = 0; r > l; ++l) "^" === t[l] && "^" !== t[l + 1] && (t[l] = ""); + if(e.ignoreCase && a) + for(var l = 0; r > l; ++l) { + var u = t[l], + p = u.charAt(0); + u.length >= 2 && "[" === p ? t[l] = i(u) : "\\" !== p && (t[l] = u.replace(/[a-zA-Z]/g, function(e) { + var t = e.charCodeAt(0); + return "[" + String.fromCharCode(-33 & t, 32 | t) + "]" + })) + } + return t.join("") + } + for(var o = 0, a = !1, s = !1, l = 0, c = e.length; c > l; ++l) { + var u = e[l]; + if(u.ignoreCase) s = !0; + else if(/[a-z]/i.test(u.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ""))) { + a = !0, s = !1; + break + } + } + for(var d = { + b: 8, + t: 9, + n: 10, + v: 11, + f: 12, + r: 13 + }, p = [], l = 0, c = e.length; c > l; ++l) { + var u = e[l]; + if(u.global || u.multiline) throw new Error("" + u); + p.push("(?:" + r(u) + ")") + } + return new RegExp(p.join("|"), s ? "gi" : "g") + } + + function t(e, t) { + function n(e) { + switch(e.nodeType) { + case 1: + if(i.test(e.className)) return; + for(var l = e.firstChild; l; l = l.nextSibling) n(l); + var c = e.nodeName.toLowerCase(); + ("br" === c || "li" === c) && (r[s] = "\n", a[s << 1] = o++, a[s++ << 1 | 1] = e); + break; + case 3: + case 4: + var u = e.nodeValue; + u.length && (u = t ? u.replace(/\r\n?/g, "\n") : u.replace(/[ \t\r\n]+/g, " "), r[s] = u, a[s << 1] = o, o += u.length, a[s++ << 1 | 1] = e) + } + } + var i = /(?:^|\s)nocode(?:\s|$)/, + r = [], + o = 0, + a = [], + s = 0; + return n(e), { + sourceCode: r.join("").replace(/\n$/, ""), + spans: a + } + } + + function n(e, t, n, i) { + if(t) { + var r = { + sourceCode: t, + basePos: e + }; + n(r), i.push.apply(i, r.decorations) + } + } + + function i(e) { + for(var t = void 0, n = e.firstChild; n; n = n.nextSibling) { + var i = n.nodeType; + t = 1 === i ? t ? e : n : 3 === i ? H.test(n.nodeValue) ? e : t : t + } + return t === e ? void 0 : t + } + + function r(t, i) { + var r, o = {}; + ! function() { + for(var n = t.concat(i), a = [], s = {}, l = 0, c = n.length; c > l; ++l) { + var u = n[l], + d = u[3]; + if(d) + for(var p = d.length; --p >= 0;) o[d.charAt(p)] = u; + var f = u[1], + h = "" + f; + s.hasOwnProperty(h) || (a.push(f), s[h] = null) + } + a.push(/[\0-\uffff]/), r = e(a) + }(); + var a = i.length, + s = function(e) { + for(var t = e.sourceCode, l = e.basePos, u = [l, R], d = 0, p = t.match(r) || [], f = {}, h = 0, m = p.length; m > h; ++h) { + var g, v = p[h], + b = f[v], + y = void 0; + if("string" == typeof b) g = !1; + else { + var x = o[v.charAt(0)]; + if(x) y = v.match(x[1]), b = x[0]; + else { + for(var w = 0; a > w; ++w) + if(x = i[w], y = v.match(x[1])) { + b = x[0]; + break + } + y || (b = R) + } + g = b.length >= 5 && "lang-" === b.substring(0, 5), !g || y && "string" == typeof y[1] || (g = !1, b = O), g || (f[v] = b) + } + var S = d; + if(d += v.length, g) { + var C = y[1], + T = v.indexOf(C), + E = T + C.length; + y[2] && (E = v.length - y[2].length, T = E - C.length); + var k = b.substring(5); + n(l + S, v.substring(0, T), s, u), n(l + S + T, C, c(k, C), u), n(l + S + E, v.substring(E), s, u) + } else u.push(l + S, b) + } + e.decorations = u + }; + return s + } + + function o(e) { + var t = [], + n = []; + t.push(e.tripleQuotedStrings ? [I, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\""] : e.multiLineStrings ? [I, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, "'\"`"] : [I, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'"]), e.verbatimStrings && n.push([I, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]); + var i = e.hashComments; + if(i && (e.cStyleComments ? (t.push(i > 1 ? [N, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, "#"] : [N, /^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/, null, "#"]), n.push([I, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/, null])) : t.push([N, /^#[^\r\n]*/, null, "#"])), e.cStyleComments && (n.push([N, /^\/\/[^\r\n]*/, null]), n.push([N, /^\/\*[\s\S]*?(?:\*\/|$)/, null])), e.regexLiterals) { + var o = "/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/"; + n.push(["lang-regex", new RegExp("^" + G + "(" + o + ")")]) + } + var a = e.types; + a && n.push([L, a]); + var s = ("" + e.keywords).replace(/^ | $/g, ""); + s.length && n.push([D, new RegExp("^(?:" + s.replace(/[\s,]+/g, "|") + ")\\b"), null]), t.push([R, /^\s+/, null, " \r\n "]); + var l = /^.[^\s\w\.$@\'\"\`\/\\]*/; + return n.push([M, /^@[a-z_$][a-z_$@0-9]*/i, null], [L, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null], [R, /^[a-z_$][a-z_$@0-9]*/i, null], [M, new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*", "i"), null, "0123456789"], [R, /^\\[\s\S]?/, null], [A, l, null]), r(t, n) + } + + function a(e, t, n) { + function i(e) { + switch(e.nodeType) { + case 1: + if(o.test(e.className)) break; + if("br" === e.nodeName) r(e), e.parentNode && e.parentNode.removeChild(e); + else + for(var t = e.firstChild; t; t = t.nextSibling) i(t); + break; + case 3: + case 4: + if(n) { + var l = e.nodeValue, + c = l.match(a); + if(c) { + var u = l.substring(0, c.index); + e.nodeValue = u; + var d = l.substring(c.index + c[0].length); + if(d) { + var p = e.parentNode; + p.insertBefore(s.createTextNode(d), e.nextSibling) + } + r(e), u || e.parentNode.removeChild(e) + } + } + } + } + + function r(e) { + function t(e, n) { + var i = n ? e.cloneNode(!1) : e, + r = e.parentNode; + if(r) { + var o = t(r, 1), + a = e.nextSibling; + o.appendChild(i); + for(var s = a; s; s = a) a = s.nextSibling, o.appendChild(s) + } + return i + } + for(; !e.nextSibling;) + if(e = e.parentNode, !e) return; + for(var n, i = t(e.nextSibling, 0); + (n = i.parentNode) && 1 === n.nodeType;) i = n; + c.push(i) + } + for(var o = /(?:^|\s)nocode(?:\s|$)/, a = /\r\n?|\n/, s = e.ownerDocument, l = s.createElement("li"); e.firstChild;) l.appendChild(e.firstChild); + for(var c = [l], u = 0; u < c.length; ++u) i(c[u]); + t === (0 | t) && c[0].setAttribute("value", t); + var d = s.createElement("ol"); + d.className = "linenums"; + for(var p = Math.max(0, t - 1 | 0) || 0, u = 0, f = c.length; f > u; ++u) l = c[u], l.className = "L" + (u + p) % 10, l.firstChild || l.appendChild(s.createTextNode(" ")), d.appendChild(l); + e.appendChild(d) + } + + function s(e) { + var t = /\bMSIE\s(\d+)/.exec(navigator.userAgent); + t = t && +t[1] <= 8; + var n = /\n/g, + i = e.sourceCode, + r = i.length, + o = 0, + a = e.spans, + s = a.length, + l = 0, + c = e.decorations, + u = c.length, + d = 0; + c[u] = r; + var p, f; + for(f = p = 0; u > f;) c[f] !== c[f + 2] ? (c[p++] = c[f++], c[p++] = c[f++]) : f += 2; + for(u = p, f = p = 0; u > f;) { + for(var h = c[f], m = c[f + 1], g = f + 2; u >= g + 2 && c[g + 1] === m;) g += 2; + c[p++] = h, c[p++] = m, f = g + } + u = c.length = p; + var v, b = e.sourceNode; + b && (v = b.style.display, b.style.display = "none"); + try { + for(; s > l;) { + var y, x = (a[l], a[l + 2] || r), + w = c[d + 2] || r, + g = Math.min(x, w), + S = a[l + 1]; + if(1 !== S.nodeType && (y = i.substring(o, g))) { + t && (y = y.replace(n, "\r")), S.nodeValue = y; + var C = S.ownerDocument, + T = C.createElement("span"); + T.className = c[d + 1]; + var E = S.parentNode; + E.replaceChild(T, S), T.appendChild(S), x > o && (a[l + 1] = S = C.createTextNode(i.substring(g, x)), E.insertBefore(S, T.nextSibling)) + } + o = g, o >= x && (l += 2), o >= w && (d += 2) + } + } finally { + b && (b.style.display = v) + } + } + + function l(e, t) { + for(var n = t.length; --n >= 0;) { + var i = t[n]; + U.hasOwnProperty(i) ? f.console && console.warn("cannot override language handler %s", i) : U[i] = e + } + } + + function c(e, t) { + return e && U.hasOwnProperty(e) || (e = /^\s* l; ++l) o.push(r[s][l]); + r = null; + var d = Date; + d.now || (d = { + now: function() { + return +new Date + } + }); + var p, h = 0, + m = /\blang(?:uage)?-([\w.]+)(?!\S)/, + g = /\bprettyprint\b/, + v = /\bprettyprinted\b/, + b = /pre|xmp/i, + y = /^code$/i, + x = /^(?:pre|code|xmp)$/i; + n() + } + var f = window, + h = ["break,continue,do,else,for,if,return,while"], + m = [h, "auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], + g = [m, "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"], + v = [g, "alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"], + b = [g, "abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], + y = [b, "as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"], + x = "all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes", + w = [g, "debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"], + S = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END", + C = [h, "and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], + T = [h, "alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"], + E = [h, "case,done,elif,esac,eval,fi,function,in,local,set,then,until"], + k = [v, y, w, S + C, T, E], + _ = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/, + I = "str", + D = "kwd", + N = "com", + L = "typ", + M = "lit", + A = "pun", + R = "pln", + P = "tag", + F = "dec", + O = "src", + B = "atn", + j = "atv", + $ = "nocode", + G = "(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*", + H = /\S/, + q = o({ + keywords: k, + hashComments: !0, + cStyleComments: !0, + multiLineStrings: !0, + regexLiterals: !0 + }), + U = {}; + l(q, ["default-code"]), l(r([], [[R, /^[^]+/], [F, /^]*(?:>|$)/], [N, /^<\!--[\s\S]*?(?:-\->|$)/], ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/], ["lang-", /^<%([\s\S]+?)(?:%>|$)/], [A, /^(?:<[%?]|[%?]>)/], ["lang-", /^\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n\n\n \n\n\n \n\n\n \n\n]*>([\s\S]+?)<\/xmp\b[^>]*>/i], ["lang-js", /^", + rE: !0, + sL: "javascript" + } + }, { + b: "<%", + e: "%>", + sL: "vbscript" + }, + t, { + cN: "pi", + b: /<\?\w+/, + e: /\?>/, + r: 10 + }, { + cN: "tag", + b: "?", + e: "/?>", + c: [{ + cN: "title", + b: "[^ /><]+", + r: 0 + }, + n] + }] + } +}), hljs.registerLanguage("markdown", function() { + return { + c: [{ + cN: "header", + v: [{ + b: "^#{1,6}", + e: "$" + }, { + b: "^.+?\\n[=-]{2,}$" + }] + }, { + b: "<", + e: ">", + sL: "xml", + r: 0 + }, { + cN: "bullet", + b: "^([*+-]|(\\d+\\.))\\s+" + }, { + cN: "strong", + b: "[*_]{2}.+?[*_]{2}" + }, { + cN: "emphasis", + v: [{ + b: "\\*.+?\\*" + }, { + b: "_.+?_", + r: 0 + }] + }, { + cN: "blockquote", + b: "^>\\s+", + e: "$" + }, { + cN: "code", + v: [{ + b: "`.+?`" + }, { + b: "^( {4}| )", + e: "$", + r: 0 + }] + }, { + cN: "horizontal_rule", + b: "^[-\\*]{3,}", + e: "$" + }, { + b: "\\[.+?\\][\\(\\[].+?[\\)\\]]", + rB: !0, + c: [{ + cN: "link_label", + b: "\\[", + e: "\\]", + eB: !0, + rE: !0, + r: 0 + }, { + cN: "link_url", + b: "\\]\\(", + e: "\\)", + eB: !0, + eE: !0 + }, { + cN: "link_reference", + b: "\\]\\[", + e: "\\]", + eB: !0, + eE: !0 + }], + r: 10 + }, { + b: "^\\[.+\\]:", + e: "$", + rB: !0, + c: [{ + cN: "link_reference", + b: "\\[", + e: "\\]", + eB: !0, + eE: !0 + }, { + cN: "link_url", + b: "\\s", + e: "$" + }] + }] + } +}), hljs.registerLanguage("css", function(e) { + var t = "[a-zA-Z-][a-zA-Z0-9_-]*", + n = { + cN: "function", + b: t + "\\(", + e: "\\)", + c: ["self", e.NM, e.ASM, e.QSM] + }; + return { + cI: !0, + i: "[=/|']", + c: [e.CBLCLM, { + cN: "id", + b: "\\#[A-Za-z0-9_-]+" + }, { + cN: "class", + b: "\\.[A-Za-z0-9_-]+", + r: 0 + }, { + cN: "attr_selector", + b: "\\[", + e: "\\]", + i: "$" + }, { + cN: "pseudo", + b: ":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+" + }, { + cN: "at_rule", + b: "@(font-face|page)", + l: "[a-z-]+", + k: "font-face page" + }, { + cN: "at_rule", + b: "@", + e: "[{;]", + c: [{ + cN: "keyword", + b: /\S+/ + }, { + b: /\s/, + eW: !0, + eE: !0, + r: 0, + c: [n, e.ASM, e.QSM, e.NM] + }] + }, { + cN: "tag", + b: t, + r: 0 + }, { + cN: "rules", + b: "{", + e: "}", + i: "[^\\s]", + r: 0, + c: [e.CBLCLM, { + cN: "rule", + b: "[^\\s]", + rB: !0, + e: ";", + eW: !0, + c: [{ + cN: "attribute", + b: "[A-Z\\_\\.\\-]+", + e: ":", + eE: !0, + i: "[^\\s]", + starts: { + cN: "value", + eW: !0, + eE: !0, + c: [n, e.NM, e.QSM, e.ASM, e.CBLCLM, { + cN: "hexcolor", + b: "#[0-9A-Fa-f]+" + }, { + cN: "important", + b: "!important" + }] + } + }] + }] + }] + } +}), hljs.registerLanguage("lisp", function(e) { + var t = "[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*", + n = "(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?", + i = { + cN: "shebang", + b: "^#!", + e: "$" + }, r = { + cN: "literal", + b: "\\b(t{1}|nil)\\b" + }, o = { + cN: "number", + v: [{ + b: n, + r: 0 + }, { + b: "#b[0-1]+(/[0-1]+)?" + }, { + b: "#o[0-7]+(/[0-7]+)?" + }, { + b: "#x[0-9a-f]+(/[0-9a-f]+)?" + }, { + b: "#c\\(" + n + " +" + n, + e: "\\)" + }] + }, a = e.inherit(e.QSM, { + i: null + }), + s = { + cN: "comment", + b: ";", + e: "$" + }, l = { + cN: "variable", + b: "\\*", + e: "\\*" + }, c = { + cN: "keyword", + b: "[:&]" + t + }, u = { + b: "\\(", + e: "\\)", + c: ["self", r, a, o] + }, d = { + cN: "quoted", + c: [o, a, l, c, u], + v: [{ + b: "['`]\\(", + e: "\\)" + }, { + b: "\\(quote ", + e: "\\)", + k: { + title: "quote" + } + }] + }, p = { + cN: "list", + b: "\\(", + e: "\\)" + }, f = { + eW: !0, + r: 0 + }; + return p.c = [{ + cN: "title", + b: t + }, + f], f.c = [d, p, r, o, a, s, l, c], { + i: /\S/, + c: [o, i, r, a, s, d, p] + } +}), hljs.registerLanguage("profile", function(e) { + return { + c: [e.CNM, { + cN: "built_in", + b: "{", + e: "}$", + eB: !0, + eE: !0, + c: [e.ASM, e.QSM], + r: 0 + }, { + cN: "filename", + b: "[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}", + e: ":", + eE: !0 + }, { + cN: "header", + b: "(ncalls|tottime|cumtime)", + e: "$", + k: "ncalls tottime|10 cumtime|10 filename", + r: 10 + }, { + cN: "summary", + b: "function calls", + e: "$", + c: [e.CNM], + r: 10 + }, + e.ASM, e.QSM, { + cN: "function", + b: "\\(", + e: "\\)$", + c: [e.UTM], + r: 0 + }] + } +}), hljs.registerLanguage("http", function() { + return { + i: "\\S", + c: [{ + cN: "status", + b: "^HTTP/[0-9\\.]+", + e: "$", + c: [{ + cN: "number", + b: "\\b\\d{3}\\b" + }] + }, { + cN: "request", + b: "^[A-Z]+ (.*?) HTTP/[0-9\\.]+$", + rB: !0, + e: "$", + c: [{ + cN: "string", + b: " ", + e: " ", + eB: !0, + eE: !0 + }] + }, { + cN: "attribute", + b: "^\\w", + e: ": ", + eE: !0, + i: "\\n|\\s|=", + starts: { + cN: "string", + e: "$" + } + }, { + b: "\\n\\n", + starts: { + sL: "", + eW: !0 + } + }] + } +}), hljs.registerLanguage("java", function(e) { + var t = "false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws"; + return { + k: t, + i: /<\//, + c: [{ + cN: "javadoc", + b: "/\\*\\*", + e: "\\*/", + c: [{ + cN: "javadoctag", + b: "(^|\\s)@[A-Za-z]+" + }], + r: 10 + }, + e.CLCM, e.CBLCLM, e.ASM, e.QSM, { + bK: "protected public private", + e: /[{;=]/, + k: t, + c: [{ + cN: "class", + bK: "class interface", + eW: !0, + i: /[:"<>]/, + c: [{ + bK: "extends implements", + r: 10 + }, + e.UTM] + }, { + b: e.UIR + "\\s*\\(", + rB: !0, + c: [e.UTM] + }] + }, + e.CNM, { + cN: "annotation", + b: "@[A-Za-z]+" + }] + } +}), hljs.registerLanguage("fsharp", function(e) { + return { + k: "abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield", + c: [{ + cN: "string", + b: '@"', + e: '"', + c: [{ + b: '""' + }] + }, { + cN: "string", + b: '"""', + e: '"""' + }, { + cN: "comment", + b: "\\(\\*", + e: "\\*\\)" + }, { + cN: "class", + bK: "type", + e: "\\(|=|$", + c: [e.UTM] + }, { + cN: "annotation", + b: "\\[<", + e: ">\\]" + }, { + cN: "attribute", + b: "\\B('[A-Za-z])\\b", + c: [e.BE] + }, + e.CLCM, e.inherit(e.QSM, { + i: null + }), e.CNM] + } +}), hljs.registerLanguage("mathematica", function(e) { + return { + aliases: ["mma"], + l: "(\\$|\\b)" + e.IR + "\\b", + k: "AbelianGroup Abort AbortKernels AbortProtect Above Abs Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Active ActiveItem ActiveStyle AcyclicGraphQ AddOnHelpPath AddTo AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AffineTransform After AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowedDimensions AllowGroupClose AllowInlineCells AllowKernelInitialization AllowReverseGroupClose AllowScriptLevelChange AlphaChannel AlternatingGroup AlternativeHypothesis Alternatives AmbientLight Analytic AnchoredSearch And AndersonDarlingTest AngerJ AngleBracket AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotation Annuity AnnuityDue Antialiasing Antisymmetric Apart ApartSquareFree Appearance AppearanceElements AppellF1 Append AppendTo Apply ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess ARProcess Array ArrayComponents ArrayDepth ArrayFlatten ArrayPad ArrayPlot ArrayQ ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads AspectRatio AspectRatioFixed Assert Assuming Assumptions AstronomicalData Asynchronous AsynchronousTaskObject AsynchronousTasks AtomQ Attributes AugmentedSymmetricPolynomial AutoAction AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords Axes AxesEdge AxesLabel AxesOrigin AxesStyle Axis BabyMonsterGroupB Back Background BackgroundTasksSettings Backslash Backsubstitution Backward Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseForm Baseline BaselinePosition BaseStyle BatesDistribution BattleLemarieWavelet Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized BetweennessCentrality BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms Booleans BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryStyle Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BubbleChart BubbleChart3D BubbleScale BubbleSizes BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteCount ByteOrdering C CachedValue CacheGraphics CalendarData CalendarType CallPacket CanberraDistance Cancel CancelButton CandlestickChart Cap CapForm CapitalDifferentialD CardinalBSplineBasis CarmichaelLambda Cases Cashflow Casoratian Catalan CatalanNumber Catch CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterDot CentralMoment CentralMomentGeneratingFunction CForm ChampernowneNumber ChanVeseBinarize Character CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop Circle CircleBox CircleDot CircleMinus CirclePlus CircleTimes CirculantGraph CityData Clear ClearAll ClearAttributes ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent ClusteringComponents CMYKColor Coarse Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorCombine ColorConvert ColorData ColorDataFunction ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorSpace Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CommonDefaultFormatTypes Commonest CommonestFilter CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledFunction Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComponentMeasurements ComponentwiseContextMenu Compose ComposeList ComposeSeries Composition CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath Congruent Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphQ ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray Constants ConstrainedMax ConstrainedMin ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFilename ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean Control ControlActive ControlAlignment ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateDialog CreateDirectory CreateDocument CreateIntermediateDirectories CreatePalette CreatePalettePacket CreateScheduledTask CreateTemporary CreateWindow CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossingDetect CrossMatrix Csc Csch CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrentImage CurrentlySpeakingPacket CurrentValue CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition D DagumDistribution DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DataCompression DataDistribution DataRange DataReversed Date DateDelimiters DateDifference DateFunction DateList DateListLogPlot DateListPlot DatePattern DatePlus DateRange DateString DateTicksFormat DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayMatchQ DayName DayPlus DayRange DayRound DeBruijnGraph Debug DebugTag Decimal DeclareKnownSymbols DeclarePackage Decompose Decrement DedekindEta Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic Deinitialization Del Deletable Delete DeleteBorderComponents DeleteCases DeleteContents DeleteDirectory DeleteDuplicates DeleteFile DeleteSmallComponents DeleteWithContents DeletionWarning Delimiter DelimiterFlashTime DelimiterMatching Delimiters Denominator DensityGraphics DensityHistogram DensityPlot DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DescriptorStateSpace DesignMatrix Det DGaussianWavelet DiacriticalPositioning Diagonal DiagonalMatrix Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DifferenceDelta DifferenceOrder DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralGroup Dilation Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletCharacter DirichletConvolve DirichletDistribution DirichletL DirichletTransform DirichletWindow DisableConsolePrintPacket DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform DiscreteWaveletTransform Discriminant Disjunction Disk DiskBox DiskMatrix Dispatch DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentNotebook DominantColors DOSTextFormat Dot DotDashed DotEqual Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DSolve Dt DualLinearProgramming DualSystemsModel DumpGet DumpSave DuplicateFreeQ Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions E EccentricityCentrality EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeCost EdgeCount EdgeCoverQ EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData Eliminate EliminationOrder EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EnableConsolePrintPacket Enabled Encode End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfFile EndOfLine EndOfString EndPackage EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entropy EntropyFilter Environment Epilog Equal EqualColumns EqualRows EqualTilde EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerE EulerGamma EulerianGraphQ EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluationCell EvaluationCompletionAction EvaluationElements EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpToTrig ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalCall ExternalDataCharacterEncoding Extract ExtractArchive ExtremeValueDistribution FaceForm FaceGrids FaceGridsStyle Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail FailureDistribution False FARIMAProcess FEDisableConsolePrintPacket FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket Fibonacci FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileDate FileExistsQ FileExtension FileFormat FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileType FilledCurve FilledCurveBox Filling FillingStyle FillingTransform FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindArgMax FindArgMin FindClique FindClusters FindCurvePath FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEulerianCycle FindFaces FindFile FindFit FindGeneratingFunction FindGeoLocation FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMaximum FindMaximumFlow FindMaxValue FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindPermutation FindPostmanTour FindProcessParameters FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindThreshold FindVertexCover FindVertexCut Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstPassageTimeDistribution FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FittedModel FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlatTopWindow FlipView Floor FlushPrintOutputPacket Fold FoldList Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrequencySamplingFilterKernel FresnelC FresnelS Friday FrobeniusNumber FrobeniusSolve FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullOptions FullSimplify Function FunctionExpand FunctionInterpolation FunctionSpace FussellVeselyImportance GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins Gamma GammaDistribution GammaRegularized GapPenalty Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateConditions GeneratedCell GeneratedParameters GeneratingFunction Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDistance GeoGridPosition GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoPosition GeoPositionENU GeoPositionXYZ GeoProjectionData GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter Graph GraphAssortativity GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel GreatCircleDistance Greater GreaterEqual GreaterEqualLess GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterTilde Green Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain Gudermannian GumbelDistribution HaarWavelet HadamardMatrix HalfNormalDistribution HamiltonianGraphQ HammingDistance HammingWindow HankelH1 HankelH2 HankelMatrix HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash HashTable Haversine HazardFunction Head HeadCompose Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenSurface HighlightGraph HighlightImage HighpassFilter HigmanSimsGroupHS HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HitMissTransform HITSCentrality HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HotellingTSquareDistribution HoytDistribution HTMLSave Hue HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData I Identity IdentityMatrix If IgnoreCase Im Image Image3D Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageAspectRatio ImageAssemble ImageCache ImageCacheValid ImageCapture ImageChannels ImageClip ImageColorSpace ImageCompose ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDataPacket ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDistance ImageEffect ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageForestingComponents ImageForwardTransformation ImageHistogram ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarkers ImageMeasurements ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImageQ ImageRangeCache ImageReflect ImageRegion ImageResize ImageResolution ImageRotate ImageRotated ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions Implies Import ImportAutoReplacements ImportString ImprovementImportance In IncidenceGraph IncidenceList IncidenceMatrix IncludeConstantBasis IncludeFileExtension IncludePods IncludeSingularTerm Increment Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentUnit IndependentVertexSetQ Indeterminate IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers Infinity Infix Information Inherited InheritScope Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InlineCounterAssignments InlineCounterIncrements InlineRules Inner Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionPointObject InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Install InstallService InString Integer IntegerDigits IntegerExponent IntegerLength IntegerPart IntegerPartitions IntegerQ Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction InterpretTemplate InterquartileRange Interrupt InterruptSettings Intersection Interval IntervalIntersection IntervalMemberQ IntervalUnion Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHaversine InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InversePermutation InverseRadon InverseSeries InverseSurvivalFunction InverseWaveletTransform InverseWeierstrassP InverseZTransform Invisible InvisibleApplication InvisibleTimes IrreduciblePolynomialQ IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join Joined JoinedCurve JoinedCurveBox JoinForm JordanDecomposition JordanModelDecomposition K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelMixtureDistribution KernelObject Kernels Ket Khinchin KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnightTourGraph KnotData KnownUnitQ KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter Label Labeled LabeledSlider LabelingFunction LabelStyle LaguerreL LambdaComponents LambertW LanczosWindow LandauDistribution Language LanguageCategory LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCM LeafCount LeapYearQ LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessFullEqual LessGreater LessLess LessSlantEqual LessTilde LetterCharacter LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox LinearFilter LinearFractionalTransform LinearModelFit LinearOffsetFunction LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBreak LinebreakAdjustments LineBreakChart LineBreakWithin LineColor LineForm LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRead LinkReadHeld LinkReadyQ Links LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot Listen ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalClusteringCoefficient LocalizeVariables LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestAscendingSequence LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow Loopback LoopFreeGraphQ LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LyapunovSolve LyonsGroupLy MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules MangoldtLambda ManhattanDistance Manipulate Manipulator MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixPlot MatrixPower MatrixQ MatrixRank Max MaxBend MaxDetect MaxExtraBandwidths MaxExtraConditions MaxFeatures MaxFilter Maximize MaxIterations MaxMemoryUsed MaxMixtureKernels MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxValue MaxwellDistribution McLaughlinGroupMcL Mean MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter Median MedianDeviation MedianFilter Medium MeijerG MeixnerDistribution MemberQ MemoryConstrained MemoryInUse Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuPacket MenuSortingValue MenuStyle MenuView MergeDifferences Mesh MeshFunctions MeshRange MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation Method MethodOptions MexicanHatWavelet MeyerWavelet Min MinDetect MinFilter MinimalPolynomial MinimalStateSpaceModel Minimize Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingDataMethod MittagLefflerE MixedRadix MixedRadixQuantity MixtureDistribution Mod Modal Mode Modular ModularLambda Module Modulus MoebiusMu Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction Monday Monitor MonomialList MonomialOrder MonsterGroupM MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform Most MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovingAverage MovingMedian MoyalDistribution MultiedgeStyle MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution N NakagamiDistribution NameQ Names NamespaceBox Nand NArgMax NArgMin NBernoulliB NCache NDSolve NDSolveValue Nearest NearestFunction NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeMultinomialDistribution NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestList NestWhile NestWhileList NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextPrime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants None NonlinearModelFit NonlocalMeansFilter NonNegative NonPositive Nor NorlundB Norm Normal NormalDistribution NormalGrouping Normalize NormalizedSquaredEuclideanDistance NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde NotHumpDownHump NotHumpEqual NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms Null NullRecords NullSpace NullWords Number NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator NumberSigns NumberString Numerator NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OddQ Off Offset OLEData On ONanGroupON OneIdentity Opacity Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering Orderless OrnsteinUhlenbeckProcess Orthogonalize Out Outer OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OwenT OwnValues PackingMethod PaddedForm Padding PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageWidth PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParetoDistribution Part PartialCorrelationFunction PartialD ParticleData Partition PartitionsP PartitionsQ ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PerformanceGoal PeriodicInterpolation Periodogram PeriodogramArray PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PERTDistribution PetersenGraph PhaseMargins Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest Pink Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarGraphQ Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangePadding PlotRegion PlotStyle Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox PointBox PointFigureChart PointForm PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonBox PolygonBoxOptions PolygonHoleScale PolygonIntersections PolygonScale PolyhedronData PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position Positive PositiveDefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement PredictionRoot PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependTo PreserveImageOptions Previous PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitiveRoot PrincipalComponents PrincipalValue Print PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessEstimator ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions QBinomial QFactorial QGamma QHypergeometricPFQ QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ Quantile QuantilePlot Quantity QuantityForm QuantityMagnitude QuantityQ QuantityUnit Quartics QuartileDeviation Quartiles QuartileSkewness QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Random RandomChoice RandomComplex RandomFunction RandomGraph RandomImage RandomInteger RandomPermutation RandomPrime RandomReal RandomSample RandomSeed RandomVariate RandomWalkProcess Range RangeFilter RangeSpecification RankedMax RankedMin Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios Raw RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadList ReadProtected Real RealBlockDiagonalForm RealDigits RealExponent Reals Reap Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate RegionBinarize RegionFunction RegionPlot RegionPlot3D RegularExpression Regularization Reinstall Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot Remove RemoveAlphaChannel RemoveAsynchronousTask Removed RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart Repeated RepeatedNull RepeatedString Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated Resampling Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask Residue Resolve Rest Resultant ResumePacket Return ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulerUnits Run RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity SameQ SameTest SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveDefinitions SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTaskActiveQ ScheduledTaskData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition Sec Sech SechDistribution SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemialgebraicComponentInstances SendMail Sequence SequenceAlignment SequenceForm SequenceHold SequenceLimit Series SeriesCoefficient SeriesData SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPrecision SetProperty SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share Sharpen ShearingMatrix ShearingTransform ShenCastanMatrix Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortUpArrow Show ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiegelTheta SiegelTukeyTest Sign Signature SignedRankTest SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution Skip SliceDistribution Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDelayCompensator SmithWatermanSimilarity SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SocialMediaData Socket SokalSneathDissimilarity Solve SolveAlways SolveDelayed Sort SortBy Sound SoundAndGraphics SoundNote SoundVolume Sow Space SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution Speak SpeakTextPacket SpearmanRankTest SpearmanRho Spectrogram SpectrogramArray Specularity SpellingCorrection SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackInhibit StandardDeviation StandardDeviationFilter StandardForm Standardize StandbyDistribution Star StarGraph StartAsynchronousTask StartingStepSize StartOfLine StartOfString StartScheduledTask StartupSound StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringCount StringDrop StringExpression StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPosition StringQ StringReplace StringReplaceList StringReplacePart StringReverse StringRotateLeft StringRotateRight StringSkeleton StringSplit StringTake StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleBoxOptions StyleData StyleDefinitions StyleForm StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subset SubsetEqual Subsets SubStar Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde SuchThat Sum SumConvergence Sunday SuperDagger SuperMinus SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceColor SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SystemDialogInput SystemException SystemHelpPath SystemInformation SystemInformationData SystemOpen SystemOptions SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemStub Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeWhile Tally Tan Tanh TargetFunctions TargetUnits TautologyQ TelegraphProcess TemplateBox TemplateBoxOptions TemplateSlotSequence TemporalData Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCell TextClipboardType TextData TextForm TextJustification TextLine TextPacket TextParagraph TextRecognize TextRendering TextStyle Texture TextureCoordinateFunction TextureCoordinateScaling Therefore ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreeJSymbol Threshold Through Throw Thumbnail Thursday Ticks TicksStyle Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint Times TimesBy TimeSeriesForecast TimeSeriesInvertibility TimeUsed TimeValue TimeZone Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate ToDiscreteTimeModel ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform TopologicalSort ToRadicals ToRules ToString Total TotalHeight TotalVariationFilter TotalWidth TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField Translate TranslationTransform TransparentColor Transpose TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle TriangleWave TriangularDistribution Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean True TrueQ TruncatedDistribution TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow Tuples TuranGraph TuringMachine Transparent UnateQ Uncompress Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UndirectedEdge UndirectedGraph UndirectedGraphQ UndocumentedTestFEParserPacket UndocumentedTestGetSelectionPacket Unequal Unevaluated UniformDistribution UniformGraphDistribution UniformSumDistribution Uninstall Union UnionPlus Unique UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitTriangle UnitVector Unprotect UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpValues URL URLFetch URLFetchAsynchronous URLSave URLSaveAsynchronous UseGraphicsRange Using UsingFrontEnd V2Get ValidationLength Value ValueBox ValueBoxOptions ValueForm ValueQ ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerifyConvergence VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoigtDistribution VonMisesDistribution WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeberE Wedge Wednesday WeibullDistribution WeierstrassHalfPeriods WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WilksW WilksWTest WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult Word WordBoundary WordCharacter WordData WordSearch WordSeparators WorkingPrecision Write WriteString Wronskian XMLElement XMLObject Xnor Xor Yellow YuleDissimilarity ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZipfDistribution ZTest ZTransform $Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AssertFunction $Assumptions $AsynchronousTask $BaseDirectory $BatchInput $BatchOutput $BoxForms $ByteOrdering $Canceled $CharacterEncoding $CharacterEncodings $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $CreationDate $CurrentLink $DateStringFormat $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $Epilog $ExportFormats $Failed $FinancialDataSource $FormatType $FrontEnd $FrontEndSession $GeoLocation $HistoryLength $HomeDirectory $HTTPCookies $IgnoreEOF $ImagingDevices $ImportFormats $InitialDirectory $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $ModuleNumber $NetworkLicense $NewMessage $NewSymbol $Notebooks $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $PipeSupported $Post $Pre $PreferencesDirectory $PrePrint $PreRead $PrintForms $PrintLiteral $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $RandomState $RecursionLimit $ReleaseNumber $RootDirectory $ScheduledTask $ScriptCommandLine $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemWordLength $TemporaryDirectory $TemporaryPrefix $TextStyle $TimedOut $TimeUnit $TimeZone $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $Urgent $UserAddOnsDirectory $UserBaseDirectory $UserDocumentsDirectory $UserName $Version $VersionNumber", + c: [{ + cN: "comment", + b: /\(\*/, + e: /\*\)/ + }, + e.ASM, e.QSM, e.CNM, { + cN: "list", + b: /\{/, + e: /\}/, + i: /:/ + }] + } +}), hljs.registerLanguage("php", function(e) { + var t = { + cN: "variable", + b: "\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*" + }, n = { + cN: "preprocessor", + b: /<\?(php)?|\?>/ + }, i = { + cN: "string", + c: [e.BE, n], + v: [{ + b: 'b"', + e: '"' + }, { + b: "b'", + e: "'" + }, + e.inherit(e.ASM, { + i: null + }), e.inherit(e.QSM, { + i: null + })] + }, r = { + v: [e.BNM, e.CNM] + }; + return { + cI: !0, + k: "and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally", + c: [e.CLCM, e.HCM, { + cN: "comment", + b: "/\\*", + e: "\\*/", + c: [{ + cN: "phpdoc", + b: "\\s@[A-Za-z]+" + }, + n] + }, { + cN: "comment", + b: "__halt_compiler.+?;", + eW: !0, + k: "__halt_compiler", + l: e.UIR + }, { + cN: "string", + b: "<<<['\"]?\\w+['\"]?$", + e: "^\\w+;", + c: [e.BE] + }, + n, t, { + cN: "function", + bK: "function", + e: /[;{]/, + i: "\\$|\\[|%", + c: [e.UTM, { + cN: "params", + b: "\\(", + e: "\\)", + c: ["self", t, e.CBLCLM, i, r] + }] + }, { + cN: "class", + bK: "class interface", + e: "{", + i: /[:\(\$"]/, + c: [{ + bK: "extends implements", + r: 10 + }, + e.UTM] + }, { + bK: "namespace", + e: ";", + i: /[\.']/, + c: [e.UTM] + }, { + bK: "use", + e: ";", + c: [e.UTM] + }, { + b: "=>" + }, + i, r] + } +}), hljs.registerLanguage("haskell", function(e) { + var t = { + cN: "comment", + v: [{ + b: "--", + e: "$" + }, { + b: "{-", + e: "-}", + c: ["self"] + }] + }, n = { + cN: "pragma", + b: "{-#", + e: "#-}" + }, i = { + cN: "preprocessor", + b: "^#", + e: "$" + }, r = { + cN: "type", + b: "\\b[A-Z][\\w']*", + r: 0 + }, o = { + cN: "container", + b: "\\(", + e: "\\)", + i: '"', + c: [n, t, i, { + cN: "type", + b: "\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?" + }, + e.inherit(e.TM, { + b: "[_a-z][\\w']*" + })] + }, a = { + cN: "container", + b: "{", + e: "}", + c: o.c + }; + return { + k: "let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec", + c: [{ + cN: "module", + b: "\\bmodule\\b", + e: "where", + k: "module where", + c: [o, t], + i: "\\W\\.|;" + }, { + cN: "import", + b: "\\bimport\\b", + e: "$", + k: "import|0 qualified as hiding", + c: [o, t], + i: "\\W\\.|;" + }, { + cN: "class", + b: "^(\\s*)?(class|instance)\\b", + e: "where", + k: "class family instance where", + c: [r, o, t] + }, { + cN: "typedef", + b: "\\b(data|(new)?type)\\b", + e: "$", + k: "data family type newtype deriving", + c: [n, t, r, o, a] + }, { + cN: "default", + bK: "default", + e: "$", + c: [r, o, t] + }, { + cN: "infix", + bK: "infix infixl infixr", + e: "$", + c: [e.CNM, t] + }, { + cN: "foreign", + b: "\\bforeign\\b", + e: "$", + k: "foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe", + c: [r, e.QSM, t] + }, { + cN: "shebang", + b: "#!\\/usr\\/bin\\/env runhaskell", + e: "$" + }, + n, t, i, e.QSM, e.CNM, r, e.inherit(e.TM, { + b: "^[_a-z][\\w']*" + }), { + b: "->|<-" + }] + } +}), hljs.registerLanguage("1c", function(e) { + var t = "[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*", + n = "возврат дата для если и или иначе иначеесли исключение конецесли конецпопытки конецпроцедуры конецфункции конеццикла константа не перейти перем перечисление по пока попытка прервать продолжить процедура строка тогда фс функция цикл число экспорт", + i = "ansitooem oemtoansi ввестивидсубконто ввестидату ввестизначение ввестиперечисление ввестипериод ввестиплансчетов ввестистроку ввестичисло вопрос восстановитьзначение врег выбранныйплансчетов вызватьисключение датагод датамесяц датачисло добавитьмесяц завершитьработусистемы заголовоксистемы записьжурналарегистрации запуститьприложение зафиксироватьтранзакцию значениевстроку значениевстрокувнутр значениевфайл значениеизстроки значениеизстрокивнутр значениеизфайла имякомпьютера имяпользователя каталогвременныхфайлов каталогиб каталогпользователя каталогпрограммы кодсимв командасистемы конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лев лог лог10 макс максимальноеколичествосубконто мин монопольныйрежим названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найти найтипомеченныенаудаление найтиссылки началопериодаби началостандартногоинтервала начатьтранзакцию начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода нрег обработкаожидания окр описаниеошибки основнойжурналрасчетов основнойплансчетов основнойязык открытьформу открытьформумодально отменитьтранзакцию очиститьокносообщений периодстр полноеимяпользователя получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта прав праводоступа предупреждение префиксавтонумерации пустаястрока пустоезначение рабочаядаттьпустоезначение рабочаядата разделительстраниц разделительстрок разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо сигнал симв символтабуляции создатьобъект сокрл сокрлп сокрп сообщить состояние сохранитьзначение сред статусвозврата стрдлина стрзаменить стрколичествострок стрполучитьстроку стрчисловхождений сформироватьпозициюдокумента счетпокоду текущаядата текущеевремя типзначения типзначениястр удалитьобъекты установитьтана установитьтапо фиксшаблон формат цел шаблон", + r = { + cN: "dquote", + b: '""' + }, o = { + cN: "string", + b: '"', + e: '"|$', + c: [r] + }, a = { + cN: "string", + b: "\\|", + e: '"|$', + c: [r] + }; + return { + cI: !0, + l: t, + k: { + keyword: n, + built_in: i + }, + c: [e.CLCM, e.NM, o, a, { + cN: "function", + b: "(процедура|функция)", + e: "$", + l: t, + k: "процедура функция", + c: [e.inherit(e.TM, { + b: t + }), { + cN: "tail", + eW: !0, + c: [{ + cN: "params", + b: "\\(", + e: "\\)", + l: t, + k: "знач", + c: [o, a] + }, { + cN: "export", + b: "экспорт", + eW: !0, + l: t, + k: "экспорт", + c: [e.CLCM] + }] + }, + e.CLCM] + }, { + cN: "preprocessor", + b: "#", + e: "$" + }, { + cN: "date", + b: "'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})'" + }] + } +}), hljs.registerLanguage("python", function(e) { + var t = { + cN: "prompt", + b: /^(>>>|\.\.\.) / + }, n = { + cN: "string", + c: [e.BE], + v: [{ + b: /(u|b)?r?'''/, + e: /'''/, + c: [t], + r: 10 + }, { + b: /(u|b)?r?"""/, + e: /"""/, + c: [t], + r: 10 + }, { + b: /(u|r|ur)'/, + e: /'/, + r: 10 + }, { + b: /(u|r|ur)"/, + e: /"/, + r: 10 + }, { + b: /(b|br)'/, + e: /'/ + }, { + b: /(b|br)"/, + e: /"/ + }, + e.ASM, e.QSM] + }, i = { + cN: "number", + r: 0, + v: [{ + b: e.BNR + "[lLjJ]?" + }, { + b: "\\b(0o[0-7]+)[lLjJ]?" + }, { + b: e.CNR + "[lLjJ]?" + }] + }, r = { + cN: "params", + b: /\(/, + e: /\)/, + c: ["self", t, i, n] + }, o = { + e: /:/, + i: /[${=;\n]/, + c: [e.UTM, r] + }; + return { + k: { + keyword: "and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False", + built_in: "Ellipsis NotImplemented" + }, + i: /(<\/|->|\?)/, + c: [t, i, n, e.HCM, e.inherit(o, { + cN: "function", + bK: "def", + r: 10 + }), e.inherit(o, { + cN: "class", + bK: "class" + }), { + cN: "decorator", + b: /@/, + e: /$/ + }, { + b: /\b(print|exec)\(/ + }] + } +}), hljs.registerLanguage("smalltalk", function(e) { + var t = "[a-z][a-zA-Z0-9_]*", + n = { + cN: "char", + b: "\\$.{1}" + }, i = { + cN: "symbol", + b: "#" + e.UIR + }; + return { + k: "self super nil true false thisContext", + c: [{ + cN: "comment", + b: '"', + e: '"' + }, + e.ASM, { + cN: "class", + b: "\\b[A-Z][A-Za-z0-9_]*", + r: 0 + }, { + cN: "method", + b: t + ":", + r: 0 + }, + e.CNM, i, n, { + cN: "localvars", + b: "\\|[ ]*" + t + "([ ]+" + t + ")*[ ]*\\|", + rB: !0, + e: /\|/, + i: /\S/, + c: [{ + b: "(\\|[ ]*)?" + t + }] + }, { + cN: "array", + b: "\\#\\(", + e: "\\)", + c: [e.ASM, n, e.CNM, i] + }] + } +}), hljs.registerLanguage("tex", function() { + var e = { + cN: "command", + b: "\\\\[a-zA-Zа-яА-я]+[\\*]?" + }, t = { + cN: "command", + b: "\\\\[^a-zA-Zа-яА-я0-9]" + }, n = { + cN: "special", + b: "[{}\\[\\]\\~]", + r: 0 + }; + return { + c: [{ + b: "\\\\[a-zA-Zа-яА-я]+[\\*]? *= *-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?", + rB: !0, + c: [e, t, { + cN: "number", + b: " *=", + e: "-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?", + eB: !0 + }], + r: 10 + }, + e, t, n, { + cN: "formula", + b: "\\$\\$", + e: "\\$\\$", + c: [e, t, n], + r: 0 + }, { + cN: "formula", + b: "\\$", + e: "\\$", + c: [e, t, n], + r: 0 + }, { + cN: "comment", + b: "%", + e: "$", + r: 0 + }] + } +}), hljs.registerLanguage("actionscript", function(e) { + var t = "[a-zA-Z_$][a-zA-Z0-9_$]*", + n = "([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)", + i = { + cN: "rest_arg", + b: "[.]{3}", + e: t, + r: 10 + }; + return { + k: { + keyword: "as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with", + literal: "true false null undefined" + }, + c: [e.ASM, e.QSM, e.CLCM, e.CBLCLM, e.CNM, { + cN: "package", + bK: "package", + e: "{", + c: [e.TM] + }, { + cN: "class", + bK: "class interface", + e: "{", + c: [{ + bK: "extends implements" + }, + e.TM] + }, { + cN: "preprocessor", + bK: "import include", + e: ";" + }, { + cN: "function", + bK: "function", + e: "[{;]", + i: "\\S", + c: [e.TM, { + cN: "params", + b: "\\(", + e: "\\)", + c: [e.ASM, e.QSM, e.CLCM, e.CBLCLM, i] + }, { + cN: "type", + b: ":", + e: n, + r: 10 + }] + }] + } +}), hljs.registerLanguage("sql", function(e) { + return { + cI: !0, + i: /[<>]/, + c: [{ + cN: "operator", + b: "\\b(begin|end|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant|merge)\\b(?!:)", + e: ";", + eW: !0, + k: { + keyword: "all partial global month current_timestamp using go revoke smallint indicator end-exec disconnect zone with character assertion to add current_user usage input local alter match collate real then rollback get read timestamp session_user not integer bit unique day minute desc insert execute like ilike|2 level decimal drop continue isolation found where constraints domain right national some module transaction relative second connect escape close system_user for deferred section cast current sqlstate allocate intersect deallocate numeric public preserve full goto initially asc no key output collation group by union session both last language constraint column of space foreign deferrable prior connection unknown action commit view or first into float year primary cascaded except restrict set references names table outer open select size are rows from prepare distinct leading create only next inner authorization schema corresponding option declare precision immediate else timezone_minute external varying translation true case exception join hour default double scroll value cursor descriptor values dec fetch procedure delete and false int is describe char as at in varchar null trailing any absolute current_time end grant privileges when cross check write current_date pad begin temporary exec time update catalog user sql date on identity timezone_hour natural whenever interval work order cascade diagnostics nchar having left call do handler load replace truncate start lock show pragma exists number trigger if before after each row merge matched database", + aggregate: "count sum min max avg" + }, + c: [{ + cN: "string", + b: "'", + e: "'", + c: [e.BE, { + b: "''" + }] + }, { + cN: "string", + b: '"', + e: '"', + c: [e.BE, { + b: '""' + }] + }, { + cN: "string", + b: "`", + e: "`", + c: [e.BE] + }, + e.CNM] + }, + e.CBLCLM, { + cN: "comment", + b: "--", + e: "$" + }] + } +}), hljs.registerLanguage("handlebars", function() { + var e = "each in with if else unless bindattr action collection debugger log outlet template unbound view yield"; + return { + cI: !0, + sL: "xml", + subLanguageMode: "continuous", + c: [{ + cN: "expression", + b: "{{", + e: "}}", + c: [{ + cN: "begin-block", + b: "#[a-zA-Z- .]+", + k: e + }, { + cN: "string", + b: '"', + e: '"' + }, { + cN: "end-block", + b: "\\/[a-zA-Z- .]+", + k: e + }, { + cN: "variable", + b: "[a-zA-Z-.]+", + k: e + }] + }] + } +}), hljs.registerLanguage("vala", function(e) { + return { + k: { + keyword: "char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var", + built_in: "DBus GLib CCode Gee Object", + literal: "false true null" + }, + c: [{ + cN: "class", + bK: "class interface delegate namespace", + e: "{", + i: "[^,:\\n\\s\\.]", + c: [e.UTM] + }, + e.CLCM, e.CBLCLM, { + cN: "string", + b: '"""', + e: '"""', + r: 5 + }, + e.ASM, e.QSM, e.CNM, { + cN: "preprocessor", + b: "^#", + e: "$", + r: 2 + }, { + cN: "constant", + b: " [A-Z_]+ ", + r: 0 + }] + } +}), hljs.registerLanguage("ini", function(e) { + return { + cI: !0, + i: /\S/, + c: [{ + cN: "comment", + b: ";", + e: "$" + }, { + cN: "title", + b: "^\\[", + e: "\\]" + }, { + cN: "setting", + b: "^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*", + e: "$", + c: [{ + cN: "value", + eW: !0, + k: "on off true false yes no", + c: [e.QSM, e.NM], + r: 0 + }] + }] + } +}), hljs.registerLanguage("livecodeserver", function(e) { + var t = { + cN: "variable", + b: "\\b[gtps][A-Z]+[A-Za-z0-9_\\-]*\\b|\\$_[A-Z]+", + r: 0 + }, n = { + cN: "comment", + e: "$", + v: [e.CBLCLM, e.HCM, { + b: "--" + }, { + b: "[^:]//" + }] + }, i = e.inherit(e.TM, { + v: [{ + b: "\\b_*rig[A-Z]+[A-Za-z0-9_\\-]*" + }, { + b: "\\b_[a-z0-9\\-]+" + }] + }), + r = e.inherit(e.TM, { + b: "\\b([A-Za-z0-9_\\-]+)\\b" + }); + return { + cI: !1, + k: { + keyword: "after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if", + constant: "SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK", + operator: "div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys", + built_in: "put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg base64Decode base64Encode baseConvert binaryDecode binaryEncode byteToNum cachedURL cachedURLs charToNum cipherNames commandNames compound compress constantNames cos date dateFormat decompress directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames global globals hasMemory hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge millisec millisecs millisecond milliseconds min monthNames num number numToByte numToChar offset open openfiles openProcesses openProcessIDs openSockets paramCount param params peerAddress pendingMessages platform processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_Execute revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sec secs seconds sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName tick ticks time to toLower toUpper transpose trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus value variableNames version waitDepth weekdayNames wordOffset add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load multiply socket process post seek rel relative read from process rename replace require resetAll revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split subtract union unload wait write" + }, + c: [t, { + cN: "keyword", + b: "\\bend\\sif\\b" + }, { + cN: "function", + bK: "function", + e: "$", + c: [t, r, e.ASM, e.QSM, e.BNM, e.CNM, i] + }, { + cN: "function", + bK: "end", + e: "$", + c: [r, i] + }, { + cN: "command", + bK: "command on", + e: "$", + c: [t, r, e.ASM, e.QSM, e.BNM, e.CNM, i] + }, { + cN: "command", + bK: "end", + e: "$", + c: [r, i] + }, { + cN: "preprocessor", + b: "<\\?rev|<\\?lc|<\\?livecode", + r: 10 + }, { + cN: "preprocessor", + b: "<\\?" + }, { + cN: "preprocessor", + b: "\\?>" + }, + n, e.ASM, e.QSM, e.BNM, e.CNM, i], + i: ";$|^\\[|^=" + } +}), hljs.registerLanguage("d", function(e) { + var t = { + keyword: "abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__", + built_in: "bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring", + literal: "false null true" + }, n = "(0|[1-9][\\d_]*)", + i = "(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)", + r = "0[bB][01_]+", + o = "([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)", + a = "0[xX]" + o, + s = "([eE][+-]?" + i + ")", + l = "(" + i + "(\\.\\d*|" + s + ")|\\d+\\." + i + i + "|\\." + n + s + "?)", + c = "(0[xX](" + o + "\\." + o + "|\\.?" + o + ")[pP][+-]?" + i + ")", + u = "(" + n + "|" + r + "|" + a + ")", + d = "(" + c + "|" + l + ")", + p = "\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};", + f = { + cN: "number", + b: "\\b" + u + "(L|u|U|Lu|LU|uL|UL)?", + r: 0 + }, h = { + cN: "number", + b: "\\b(" + d + "([fF]|L|i|[fF]i|Li)?|" + u + "(i|[fF]i|Li))", + r: 0 + }, m = { + cN: "string", + b: "'(" + p + "|.)", + e: "'", + i: "." + }, g = { + b: p, + r: 0 + }, v = { + cN: "string", + b: '"', + c: [g], + e: '"[cwd]?' + }, b = { + cN: "string", + b: '[rq]"', + e: '"[cwd]?', + r: 5 + }, y = { + cN: "string", + b: "`", + e: "`[cwd]?" + }, x = { + cN: "string", + b: 'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?', + r: 10 + }, w = { + cN: "string", + b: 'q"\\{', + e: '\\}"' + }, S = { + cN: "shebang", + b: "^#!", + e: "$", + r: 5 + }, C = { + cN: "preprocessor", + b: "#(line)", + e: "$", + r: 5 + }, T = { + cN: "keyword", + b: "@[a-zA-Z_][a-zA-Z_\\d]*" + }, E = { + cN: "comment", + b: "\\/\\+", + c: ["self"], + e: "\\+\\/", + r: 10 + }; + return { + l: e.UIR, + k: t, + c: [e.CLCM, e.CBLCLM, E, x, v, b, y, w, h, f, m, S, C, T] + } +}), hljs.registerLanguage("vbnet", function(e) { + return { + cI: !0, + k: { + keyword: "addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor", + built_in: "boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort", + literal: "true false nothing" + }, + i: "//|{|}|endif|gosub|variant|wend", + c: [e.inherit(e.QSM, { + c: [{ + b: '""' + }] + }), { + cN: "comment", + b: "'", + e: "$", + rB: !0, + c: [{ + cN: "xmlDocTag", + b: "'''|" + }, { + cN: "xmlDocTag", + b: "?", + e: ">" + }] + }, + e.CNM, { + cN: "preprocessor", + b: "#", + e: "$", + k: "if else elseif end region externalsource" + }] + } +}), hljs.registerLanguage("axapta", function(e) { + return { + k: "false int abstract private char boolean static null if for true while long throw finally protected final return void enum else break new catch byte super case short default double public try this switch continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count order group by asc desc index hint like dispaly edit client server ttsbegin ttscommit str real date container anytype common div mod", + c: [e.CLCM, e.CBLCLM, e.ASM, e.QSM, e.CNM, { + cN: "preprocessor", + b: "#", + e: "$" + }, { + cN: "class", + bK: "class interface", + e: "{", + i: ":", + c: [{ + cN: "inheritance", + bK: "extends implements", + r: 10 + }, + e.UTM] + }] + } +}), hljs.registerLanguage("perl", function(e) { + var t = "getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when", + n = { + cN: "subst", + b: "[$@]\\{", + e: "\\}", + k: t + }, i = { + b: "->{", + e: "}" + }, r = { + cN: "variable", + v: [{ + b: /\$\d/ + }, { + b: /[\$\%\@\*](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/ + }, { + b: /[\$\%\@\*][^\s\w{]/, + r: 0 + }] + }, o = { + cN: "comment", + b: "^(__END__|__DATA__)", + e: "\\n$", + r: 5 + }, a = [e.BE, n, r], + s = [r, e.HCM, o, { + cN: "comment", + b: "^\\=\\w", + e: "\\=cut", + eW: !0 + }, + i, { + cN: "string", + c: a, + v: [{ + b: "q[qwxr]?\\s*\\(", + e: "\\)", + r: 5 + }, { + b: "q[qwxr]?\\s*\\[", + e: "\\]", + r: 5 + }, { + b: "q[qwxr]?\\s*\\{", + e: "\\}", + r: 5 + }, { + b: "q[qwxr]?\\s*\\|", + e: "\\|", + r: 5 + }, { + b: "q[qwxr]?\\s*\\<", + e: "\\>", + r: 5 + }, { + b: "qw\\s+q", + e: "q", + r: 5 + }, { + b: "'", + e: "'", + c: [e.BE] + }, { + b: '"', + e: '"' + }, { + b: "`", + e: "`", + c: [e.BE] + }, { + b: "{\\w+}", + c: [], + r: 0 + }, { + b: "-?\\w+\\s*\\=\\>", + c: [], + r: 0 + }] + }, { + cN: "number", + b: "(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b", + r: 0 + }, { + b: "(\\/\\/|" + e.RSR + "|\\b(split|return|print|reverse|grep)\\b)\\s*", + k: "split return print reverse grep", + r: 0, + c: [e.HCM, o, { + cN: "regexp", + b: "(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*", + r: 10 + }, { + cN: "regexp", + b: "(m|qr)?/", + e: "/[a-z]*", + c: [e.BE], + r: 0 + }] + }, { + cN: "sub", + bK: "sub", + e: "(\\s*\\(.*?\\))?[;{]", + r: 5 + }, { + cN: "operator", + b: "-\\w\\b", + r: 0 + }]; + return n.c = s, i.c = s, { + k: t, + c: s + } +}), hljs.registerLanguage("scala", function(e) { + var t = { + cN: "annotation", + b: "@[A-Za-z]+" + }, n = { + cN: "string", + b: 'u?r?"""', + e: '"""', + r: 10 + }; + return { + k: "type yield lazy override def with val var false true sealed abstract private trait object null if for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws", + c: [{ + cN: "javadoc", + b: "/\\*\\*", + e: "\\*/", + c: [{ + cN: "javadoctag", + b: "@[A-Za-z]+" + }], + r: 10 + }, + e.CLCM, e.CBLCLM, n, e.ASM, e.QSM, { + cN: "class", + b: "((case )?class |object |trait )", + e: "({|$)", + i: ":", + k: "case class trait object", + c: [{ + bK: "extends with", + r: 10 + }, + e.UTM, { + cN: "params", + b: "\\(", + e: "\\)", + c: [e.ASM, e.QSM, n, t] + }] + }, + e.CNM, t] + } +}), hljs.registerLanguage("cmake", function(e) { + return { + cI: !0, + k: { + keyword: "add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_minimum_required cmake_policy configure_file create_test_sourcelist define_property else elseif enable_language enable_testing endforeach endfunction endif endmacro endwhile execute_process export find_file find_library find_package find_path find_program fltk_wrap_ui foreach function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install link_directories load_cache load_command macro mark_as_advanced message option output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_link_libraries try_compile try_run unset variable_watch while build_name exec_program export_library_dependencies install_files install_programs install_targets link_libraries make_directory remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or", + operator: "equal less greater strless strgreater strequal matches" + }, + c: [{ + cN: "envvar", + b: "\\${", + e: "}" + }, + e.HCM, e.QSM, e.NM] + } +}), hljs.registerLanguage("ocaml", function(e) { + return { + k: { + keyword: "and as assert asr begin class constraint do done downto else end exception external false for fun function functor if in include inherit initializer land lazy let lor lsl lsr lxor match method mod module mutable new object of open or private rec ref sig struct then to true try type val virtual when while with parser value", + built_in: "bool char float int list unit array exn option int32 int64 nativeint format4 format6 lazy_t in_channel out_channel string" + }, + i: /\/\//, + c: [{ + cN: "string", + b: '"""', + e: '"""' + }, { + cN: "comment", + b: "\\(\\*", + e: "\\*\\)", + c: ["self"] + }, { + cN: "class", + bK: "type", + e: "\\(|=|$", + c: [e.UTM] + }, { + cN: "annotation", + b: "\\[<", + e: ">\\]" + }, + e.CBLCLM, e.inherit(e.ASM, { + i: null + }), e.inherit(e.QSM, { + i: null + }), e.CNM] + } +}), hljs.registerLanguage("autohotkey", function(e) { + var t = { + cN: "escape", + b: "`[\\s\\S]" + }, n = { + cN: "comment", + b: ";", + e: "$", + r: 0 + }, i = [{ + cN: "built_in", + b: "A_[a-zA-Z0-9]+" + }, { + cN: "built_in", + bK: "ComSpec Clipboard ClipboardAll ErrorLevel" + }]; + return { + cI: !0, + k: { + keyword: "Break Continue Else Gosub If Loop Return While", + literal: "A true false NOT AND OR" + }, + c: i.concat([t, e.inherit(e.QSM, { + c: [t] + }), n, { + cN: "number", + b: e.NR, + r: 0 + }, { + cN: "var_expand", + b: "%", + e: "%", + i: "\\n", + c: [t] + }, { + cN: "label", + c: [t], + v: [{ + b: '^[^\\n";]+::(?!=)' + }, { + b: '^[^\\n";]+:(?!=)', + r: 0 + }] + }, { + b: ",\\s*,", + r: 10 + }]) + } +}), hljs.registerLanguage("objectivec", function(e) { + var t = { + keyword: "int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign self synchronized id nonatomic super unichar IBOutlet IBAction strong weak @private @protected @public @try @property @end @throw @catch @finally @synthesize @dynamic @selector @optional @required", + literal: "false true FALSE TRUE nil YES NO NULL", + built_in: "NSString NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController UINavigationBar UINavigationController UITabBarController UIPopoverController UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor UIFont UIApplication NSNotFound NSNotificationCenter NSNotification UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection UIInterfaceOrientation MPMoviePlayerController dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once" + }, n = /[a-zA-Z@][a-zA-Z0-9_]*/, + i = "@interface @class @protocol @implementation"; + return { + k: t, + l: n, + i: "", + c: [e.CLCM, e.CBLCLM, e.CNM, e.QSM, { + cN: "string", + b: "'", + e: "[^\\\\]'", + i: "[^\\\\][^']" + }, { + cN: "preprocessor", + b: "#import", + e: "$", + c: [{ + cN: "title", + b: '"', + e: '"' + }, { + cN: "title", + b: "<", + e: ">" + }] + }, { + cN: "preprocessor", + b: "#", + e: "$" + }, { + cN: "class", + b: "(" + i.split(" ").join("|") + ")\\b", + e: "({|$)", + k: i, + l: n, + c: [e.UTM] + }, { + cN: "variable", + b: "\\." + e.UIR, + r: 0 + }] + } +}), hljs.registerLanguage("avrasm", function(e) { + return { + cI: !0, + k: { + keyword: "adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr", + built_in: "r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf" + }, + c: [e.CBLCLM, { + cN: "comment", + b: ";", + e: "$", + r: 0 + }, + e.CNM, e.BNM, { + cN: "number", + b: "\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)" + }, + e.QSM, { + cN: "string", + b: "'", + e: "[^\\\\]'", + i: "[^\\\\][^']" + }, { + cN: "label", + b: "^[A-Za-z0-9_.$]+:" + }, { + cN: "preprocessor", + b: "#", + e: "$" + }, { + cN: "preprocessor", + b: "\\.[a-zA-Z]+" + }, { + cN: "localvars", + b: "@[0-9]+" + }] + } +}), hljs.registerLanguage("vhdl", function(e) { + return { + cI: !0, + k: { + keyword: "abs access after alias all and architecture array assert attribute begin block body buffer bus case component configuration constant context cover disconnect downto default else elsif end entity exit fairness file for force function generate generic group guarded if impure in inertial inout is label library linkage literal loop map mod nand new next nor not null of on open or others out package port postponed procedure process property protected pure range record register reject release rem report restrict restrict_guarantee return rol ror select sequence severity shared signal sla sll sra srl strong subtype then to transport type unaffected units until use variable vmode vprop vunit wait when while with xnor xor", + typename: "boolean bit character severity_level integer time delay_length natural positive string bit_vector file_open_kind file_open_status std_ulogic std_ulogic_vector std_logic std_logic_vector unsigned signed boolean_vector integer_vector real_vector time_vector" + }, + i: "{", + c: [e.CBLCLM, { + cN: "comment", + b: "--", + e: "$" + }, + e.QSM, e.CNM, { + cN: "literal", + b: "'(U|X|0|1|Z|W|L|H|-)'", + c: [e.BE] + }, { + cN: "attribute", + b: "'[A-Za-z](_?[A-Za-z0-9])*", + c: [e.BE] + }] + } +}), hljs.registerLanguage("coffeescript", function(e) { + var t = { + keyword: "in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not", + literal: "true false null undefined yes no on off", + reserved: "case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf", + built_in: "npm require console print module exports global window document" + }, n = "[A-Za-z$_][0-9A-Za-z$_]*", + i = e.inherit(e.TM, { + b: n + }), + r = { + cN: "subst", + b: /#\{/, + e: /}/, + k: t + }, o = [e.BNM, e.inherit(e.CNM, { + starts: { + e: "(\\s*/)?", + r: 0 + } + }), { + cN: "string", + v: [{ + b: /'''/, + e: /'''/, + c: [e.BE] + }, { + b: /'/, + e: /'/, + c: [e.BE] + }, { + b: /"""/, + e: /"""/, + c: [e.BE, r] + }, { + b: /"/, + e: /"/, + c: [e.BE, r] + }] + }, { + cN: "regexp", + v: [{ + b: "///", + e: "///", + c: [r, e.HCM] + }, { + b: "//[gim]*", + r: 0 + }, { + b: "/\\S(\\\\.|[^\\n])*?/[gim]*(?=\\s|\\W|$)" + }] + }, { + cN: "property", + b: "@" + n + }, { + b: "`", + e: "`", + eB: !0, + eE: !0, + sL: "javascript" + }]; + return r.c = o, { + k: t, + c: o.concat([{ + cN: "comment", + b: "###", + e: "###" + }, + e.HCM, { + cN: "function", + b: "(" + n + "\\s*=\\s*)?(\\(.*\\))?\\s*\\B[-=]>", + e: "[-=]>", + rB: !0, + c: [i, { + cN: "params", + b: "\\(", + rB: !0, + c: [{ + b: /\(/, + e: /\)/, + k: t, + c: ["self"].concat(o) + }] + }] + }, { + cN: "class", + bK: "class", + e: "$", + i: /[:="\[\]]/, + c: [{ + bK: "extends", + eW: !0, + i: /[:="\[\]]/, + c: [i] + }, + i] + }, { + cN: "attribute", + b: n + ":", + e: ":", + rB: !0, + eE: !0, + r: 0 + }]) + } +}), hljs.registerLanguage("mizar", function() { + return { + k: ["environ vocabularies notations constructors definitions registrations theorems schemes requirements", "begin end definition registration cluster existence pred func defpred deffunc theorem proof", "let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from", "be being by means equals implies iff redefine define now not or attr is mode suppose per cases set", "thesis contradiction scheme reserve struct", "correctness compatibility coherence symmetry assymetry reflexivity irreflexivity", "connectedness uniqueness commutativity idempotence involutiveness projectivity"].join(" "), + c: [{ + cN: "comment", + b: "::", + e: "$" + }] + } +}), hljs.registerLanguage("nginx", function(e) { + var t = { + cN: "variable", + v: [{ + b: /\$\d+/ + }, { + b: /\$\{/, + e: /}/ + }, { + b: "[\\$\\@]" + e.UIR + }] + }, n = { + eW: !0, + l: "[a-z/_]+", + k: { + built_in: "on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll" + }, + r: 0, + i: "=>", + c: [e.HCM, { + cN: "string", + c: [e.BE, t], + v: [{ + b: /"/, + e: /"/ + }, { + b: /'/, + e: /'/ + }] + }, { + cN: "url", + b: "([a-z]+):/", + e: "\\s", + eW: !0, + eE: !0 + }, { + cN: "regexp", + c: [e.BE, t], + v: [{ + b: "\\s\\^", + e: "\\s|{|;", + rE: !0 + }, { + b: "~\\*?\\s+", + e: "\\s|{|;", + rE: !0 + }, { + b: "\\*(\\.[a-z\\-]+)+" + }, { + b: "([a-z\\-]+\\.)+\\*" + }] + }, { + cN: "number", + b: "\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b" + }, { + cN: "number", + b: "\\b\\d+[kKmMgGdshdwy]*\\b", + r: 0 + }, + t] + }; + return { + c: [e.HCM, { + b: e.UIR + "\\s", + e: ";|{", + rB: !0, + c: [e.inherit(e.UTM, { + starts: n + })], + r: 0 + }], + i: "[^\\s\\}]" + } +}), hljs.registerLanguage("erlang-repl", function(e) { + return { + k: { + special_functions: "spawn spawn_link self", + reserved: "after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor" + }, + c: [{ + cN: "prompt", + b: "^[0-9]+> ", + r: 10 + }, { + cN: "comment", + b: "%", + e: "$" + }, { + cN: "number", + b: "\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)", + r: 0 + }, + e.ASM, e.QSM, { + cN: "constant", + b: "\\?(::)?([A-Z]\\w*(::)?)+" + }, { + cN: "arrow", + b: "->" + }, { + cN: "ok", + b: "ok" + }, { + cN: "exclamation_mark", + b: "!" + }, { + cN: "function_or_atom", + b: "(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)", + r: 0 + }, { + cN: "variable", + b: "[A-Z][a-zA-Z0-9_']*", + r: 0 + }] + } +}), hljs.registerLanguage("r", function(e) { + var t = "([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*"; + return { + c: [e.HCM, { + b: t, + l: t, + k: { + keyword: "function if in break next repeat else for return switch while try tryCatch|10 stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...|10", + literal: "NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10" + }, + r: 0 + }, { + cN: "number", + b: "0[xX][0-9a-fA-F]+[Li]?\\b", + r: 0 + }, { + cN: "number", + b: "\\d+(?:[eE][+\\-]?\\d*)?L\\b", + r: 0 + }, { + cN: "number", + b: "\\d+\\.(?!\\d)(?:i\\b)?", + r: 0 + }, { + cN: "number", + b: "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b", + r: 0 + }, { + cN: "number", + b: "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b", + r: 0 + }, { + b: "`", + e: "`", + r: 0 + }, { + cN: "string", + c: [e.BE], + v: [{ + b: '"', + e: '"' + }, { + b: "'", + e: "'" + }] + }] + } +}), hljs.registerLanguage("json", function(e) { + var t = { + literal: "true false null" + }, n = [e.QSM, e.CNM], + i = { + cN: "value", + e: ",", + eW: !0, + eE: !0, + c: n, + k: t + }, r = { + b: "{", + e: "}", + c: [{ + cN: "attribute", + b: '\\s*"', + e: '"\\s*:\\s*', + eB: !0, + eE: !0, + c: [e.BE], + i: "\\n", + starts: i + }], + i: "\\S" + }, o = { + b: "\\[", + e: "\\]", + c: [e.inherit(i, { + cN: null + })], + i: "\\S" + }; + return n.splice(n.length, 0, r, o), { + c: n, + k: t, + i: "\\S" + } +}), hljs.registerLanguage("django", function() { + var e = { + cN: "filter", + b: /\|[A-Za-z]+\:?/, + k: "truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone", + c: [{ + cN: "argument", + b: /"/, + e: /"/ + }, { + cN: "argument", + b: /'/, + e: /'/ + }] + }; + return { + cI: !0, + sL: "xml", + subLanguageMode: "continuous", + c: [{ + cN: "template_comment", + b: /\{%\s*comment\s*%}/, + e: /\{%\s*endcomment\s*%}/ + }, { + cN: "template_comment", + b: /\{#/, + e: /#}/ + }, { + cN: "template_tag", + b: /\{%/, + e: /%}/, + k: "comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor in ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup by as ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim", + c: [e] + }, { + cN: "variable", + b: /\{\{/, + e: /}}/, + c: [e] + }] + } +}), hljs.registerLanguage("delphi", function(e) { + var t = "exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure", + n = { + cN: "comment", + v: [{ + b: /\{/, + e: /\}/, + r: 0 + }, { + b: /\(\*/, + e: /\*\)/, + r: 10 + }] + }, i = { + cN: "string", + b: /'/, + e: /'/, + c: [{ + b: /''/ + }] + }, r = { + cN: "string", + b: /(#\d+)+/ + }, o = { + b: e.IR + "\\s*=\\s*class\\s*\\(", + rB: !0, + c: [e.TM] + }, a = { + cN: "function", + bK: "function constructor destructor procedure", + e: /[:;]/, + k: "function constructor|10 destructor|10 procedure|10", + c: [e.TM, { + cN: "params", + b: /\(/, + e: /\)/, + k: t, + c: [i, r] + }, + n] + }; + return { + cI: !0, + k: t, + i: /("|\$[G-Zg-z]|\/\*|<\/)/, + c: [n, e.CLCM, i, r, e.NM, o, a] + } +}), hljs.registerLanguage("vbscript", function(e) { + return { + cI: !0, + k: { + keyword: "call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto", + built_in: "lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion scriptengine split scriptengineminorversion cint sin datepart ltrim sqr scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw chrw regexp server response request cstr err", + literal: "true false null nothing empty" + }, + i: "//", + c: [e.inherit(e.QSM, { + c: [{ + b: '""' + }] + }), { + cN: "comment", + b: /'/, + e: /$/, + r: 0 + }, + e.CNM] + } +}), hljs.registerLanguage("oxygene", function(e) { + var t = "abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained", + n = { + cN: "comment", + b: "{", + e: "}", + r: 0 + }, i = { + cN: "comment", + b: "\\(\\*", + e: "\\*\\)", + r: 10 + }, r = { + cN: "string", + b: "'", + e: "'", + c: [{ + b: "''" + }] + }, o = { + cN: "string", + b: "(#\\d+)+" + }, a = { + cN: "function", + bK: "function constructor destructor procedure method", + e: "[:;]", + k: "function constructor|10 destructor|10 procedure|10 method|10", + c: [e.TM, { + cN: "params", + b: "\\(", + e: "\\)", + k: t, + c: [r, o] + }, + n, i] + }; + return { + cI: !0, + k: t, + i: '("|\\$[G-Zg-z]|\\/\\*|)', + c: [n, i, e.CLCM, r, o, e.NM, a, { + cN: "class", + b: "=\\bclass\\b", + e: "end;", + k: t, + c: [r, o, n, i, e.CLCM, a] + }] + } +}), hljs.registerLanguage("mel", function(e) { + return { + k: "int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration panelHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType selectedNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFromName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform", + i: "", + c: [e.CNM, e.ASM, e.QSM, { + cN: "string", + b: "`", + e: "`", + c: [e.BE] + }, { + cN: "variable", + v: [{ + b: "\\$\\d" + }, { + b: "[\\$\\%\\@](\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)" + }, { + b: "\\*(\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)", + r: 0 + }] + }, + e.CLCM, e.CBLCLM] + } +}), hljs.registerLanguage("dos", function() { + return { + cI: !0, + k: { + flow: "if else goto for in do call exit not exist errorlevel defined equ neq lss leq gtr geq", + keyword: "shift cd dir echo setlocal endlocal set pause copy", + stream: "prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux", + winutils: "ping net ipconfig taskkill xcopy ren del" + }, + c: [{ + cN: "envvar", + b: "%%[^ ]" + }, { + cN: "envvar", + b: "%[^ ]+?%" + }, { + cN: "envvar", + b: "![^ ]+?!" + }, { + cN: "number", + b: "\\b\\d+", + r: 0 + }, { + cN: "comment", + b: "@?rem", + e: "$" + }] + } +}), hljs.registerLanguage("apache", function(e) { + var t = { + cN: "number", + b: "[\\$%]\\d+" + }; + return { + cI: !0, + c: [e.HCM, { + cN: "tag", + b: "?", + e: ">" + }, { + cN: "keyword", + b: /\w+/, + r: 0, + k: { + common: "order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername" + }, + starts: { + e: /$/, + r: 0, + k: { + literal: "on off all" + }, + c: [{ + cN: "sqbracket", + b: "\\s\\[", + e: "\\]$" + }, { + cN: "cbracket", + b: "[\\$%]\\{", + e: "\\}", + c: ["self", t] + }, + t, e.QSM] + } + }], + i: /\S/ + } +}), hljs.registerLanguage("scss", function(e) { + { + var t = "[a-zA-Z-][a-zA-Z0-9_-]*", + n = { + cN: "function", + b: t + "\\(", + e: "\\)", + c: ["self", e.NM, e.ASM, e.QSM] + }, i = { + cN: "hexcolor", + b: "#[0-9A-Fa-f]+" + }; + ({ + cN: "attribute", + b: "[A-Z\\_\\.\\-]+", + e: ":", + eE: !0, + i: "[^\\s]", + starts: { + cN: "value", + eW: !0, + eE: !0, + c: [n, i, e.NM, e.QSM, e.ASM, e.CBLCLM, { + cN: "important", + b: "!important" + }] + } + }) + } + return { + cI: !0, + i: "[=/|']", + c: [e.CLCM, e.CBLCLM, { + cN: "function", + b: t + "\\(", + e: "\\)", + c: ["self", e.NM, e.ASM, e.QSM] + }, { + cN: "id", + b: "\\#[A-Za-z0-9_-]+", + r: 0 + }, { + cN: "class", + b: "\\.[A-Za-z0-9_-]+", + r: 0 + }, { + cN: "attr_selector", + b: "\\[", + e: "\\]", + i: "$" + }, { + cN: "tag", + b: "\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b", + r: 0 + }, { + cN: "pseudo", + b: ":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)" + }, { + cN: "pseudo", + b: "::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)" + }, { + cN: "attribute", + b: "\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b", + i: "[^\\s]" + }, { + cN: "value", + b: "\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b" + }, { + cN: "value", + b: ":", + e: ";", + c: [i, e.NM, e.QSM, e.ASM, { + cN: "important", + b: "!important" + }] + }, { + cN: "at_rule", + b: "@", + e: "[{;]", + k: "mixin include extend for if else each while charset import debug media page content font-face namespace warn", + c: [n, e.QSM, e.ASM, i, e.NM, { + cN: "preprocessor", + b: "\\s[A-Za-z0-9_.-]+", + r: 0 + }] + }] + } +}), hljs.registerLanguage("applescript", function(e) { + var t = e.inherit(e.QSM, { + i: "" + }), + n = { + cN: "params", + b: "\\(", + e: "\\)", + c: ["self", e.CNM, t] + }, i = [{ + cN: "comment", + b: "--", + e: "$" + }, { + cN: "comment", + b: "\\(\\*", + e: "\\*\\)", + c: ["self", { + b: "--", + e: "$" + }] + }, + e.HCM]; + return { + k: { + keyword: "about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the then third through thru timeout times to transaction try until where while whose with without", + constant: "AppleScript false linefeed return pi quote result space tab true", + type: "alias application boolean class constant date file integer list number real record string text", + command: "activate beep count delay launch log offset read round run say summarize write", + property: "character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year" + }, + c: [t, e.CNM, { + cN: "type", + b: "\\bPOSIX file\\b" + }, { + cN: "command", + b: "\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b" + }, { + cN: "constant", + b: "\\b(text item delimiters|current application|missing value)\\b" + }, { + cN: "keyword", + b: "\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference))\\b" + }, { + cN: "property", + b: "\\b(POSIX path|(date|time) string|quoted form)\\b" + }, { + cN: "function_start", + bK: "on", + i: "[${=;\\n]", + c: [e.UTM, n] + }].concat(i), + i: "//" + } +}), hljs.registerLanguage("lasso", function(e) { + var t = "[a-zA-Z_][a-zA-Z0-9_.]*", + n = "<\\?(lasso(script)?|=)", + i = "\\]|\\?>", + r = { + literal: "true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft", + built_in: "array date decimal duration integer map pair string tag xml null bytes list queue set stack staticarray tie local var variable global data self inherited", + keyword: "error_code error_msg error_pop error_push error_reset cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome" + }, o = { + cN: "comment", + b: "", + r: 0 + }, a = { + cN: "preprocessor", + b: "\\[noprocess\\]", + starts: { + cN: "markup", + e: "\\[/noprocess\\]", + rE: !0, + c: [o] + } + }, s = { + cN: "preprocessor", + b: "\\[/noprocess|" + n + }, l = { + cN: "variable", + b: "'" + t + "'" + }, c = [e.CLCM, { + cN: "javadoc", + b: "/\\*\\*!", + e: "\\*/" + }, + e.CBLCLM, e.inherit(e.CNM, { + b: e.CNR + "|-?(infinity|nan)\\b" + }), e.inherit(e.ASM, { + i: null + }), e.inherit(e.QSM, { + i: null + }), { + cN: "string", + b: "`", + e: "`" + }, { + cN: "variable", + v: [{ + b: "[#$]" + t + }, { + b: "#", + e: "\\d+", + i: "\\W" + }] + }, { + cN: "tag", + b: "::\\s*", + e: t, + i: "\\W" + }, { + cN: "attribute", + b: "\\.\\.\\.|-" + e.UIR + }, { + cN: "subst", + v: [{ + b: "->\\s*", + c: [l] + }, { + b: ":=|/(?!\\w)=?|[-+*%=<>&|!?\\\\]+", + r: 0 + }] + }, { + cN: "built_in", + b: "\\.\\.?", + r: 0, + c: [l] + }, { + cN: "class", + bK: "define", + rE: !0, + e: "\\(|=>", + c: [e.inherit(e.TM, { + b: e.UIR + "(=(?!>))?" + })] + }]; + return { + aliases: ["ls", "lassoscript"], + cI: !0, + l: t + "|&[lg]t;", + k: r, + c: [{ + cN: "preprocessor", + b: i, + r: 0, + starts: { + cN: "markup", + e: "\\[|" + n, + rE: !0, + r: 0, + c: [o] + } + }, + a, s, { + cN: "preprocessor", + b: "\\[no_square_brackets", + starts: { + e: "\\[/no_square_brackets\\]", + l: t + "|&[lg]t;", + k: r, + c: [{ + cN: "preprocessor", + b: i, + r: 0, + starts: { + cN: "markup", + e: n, + rE: !0, + c: [o] + } + }, + a, s].concat(c) + } + }, { + cN: "preprocessor", + b: "\\[", + r: 0 + }, { + cN: "shebang", + b: "^#!.+lasso9\\b", + r: 10 + }].concat(c) + } +}), hljs.registerLanguage("cpp", function(e) { + var t = { + keyword: "false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long throw volatile static protected bool template mutable if public friend do return goto auto void enum else break new extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary", + built_in: "std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf" + }; + return { + aliases: ["c"], + k: t, + i: "", + c: [e.CLCM, e.CBLCLM, e.QSM, { + cN: "string", + b: "'\\\\?.", + e: "'", + i: "." + }, { + cN: "number", + b: "\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)" + }, + e.CNM, { + cN: "preprocessor", + b: "#", + e: "$", + c: [{ + b: "include\\s*<", + e: ">", + i: "\\n" + }, + e.CLCM] + }, { + cN: "stl_container", + b: "\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<", + e: ">", + k: t, + r: 10, + c: ["self"] + }] + } +}), hljs.registerLanguage("matlab", function(e) { + var t = [e.CNM, { + cN: "string", + b: "'", + e: "'", + c: [e.BE, { + b: "''" + }] + }]; + return { + k: { + keyword: "break case catch classdef continue else elseif end enumerated events for function global if methods otherwise parfor persistent properties return spmd switch try while", + built_in: "sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson" + }, + i: '(//|"|#|/\\*|\\s+/\\w+)', + c: [{ + cN: "function", + bK: "function", + e: "$", + c: [e.UTM, { + cN: "params", + b: "\\(", + e: "\\)" + }, { + cN: "params", + b: "\\[", + e: "\\]" + }] + }, { + cN: "transposed_variable", + b: "[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)", + e: "", + r: 0 + }, { + cN: "matrix", + b: "\\[", + e: "\\]'*[\\.']*", + c: t, + r: 0 + }, { + cN: "cell", + b: "\\{", + e: "\\}'*[\\.']*", + c: t, + i: /:/ + }, { + cN: "comment", + b: "\\%", + e: "$" + }].concat(t) + } +}), hljs.registerLanguage("scilab", function(e) { + var t = [e.CNM, { + cN: "string", + b: "'|\"", + e: "'|\"", + c: [e.BE, { + b: "''" + }] + }]; + return { + k: { + keyword: "abort break case clear catch continue do elseif else endfunction end for functionglobal if pause return resume select try then while%f %F %t %T %pi %eps %inf %nan %e %i %z %s", + built_in: "abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp errorexec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isemptyisinfisnan isvector lasterror length load linspace list listfiles log10 log2 logmax min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand realround sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tantype typename warning zeros matrix" + }, + i: '("|#|/\\*|\\s+/\\w+)', + c: [{ + cN: "function", + bK: "function endfunction", + e: "$", + k: "function endfunction|10", + c: [e.UTM, { + cN: "params", + b: "\\(", + e: "\\)" + }] + }, { + cN: "transposed_variable", + b: "[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)", + e: "", + r: 0 + }, { + cN: "matrix", + b: "\\[", + e: "\\]'*[\\.']*", + r: 0, + c: t + }, { + cN: "comment", + b: "//", + e: "$" + }].concat(t) + } +}), hljs.registerLanguage("makefile", function(e) { + var t = { + cN: "variable", + b: /\$\(/, + e: /\)/, + c: [e.BE] + }; + return { + c: [e.HCM, { + b: /^\w+\s*\W*=/, + rB: !0, + r: 0, + starts: { + cN: "constant", + e: /\s*\W*=/, + eE: !0, + starts: { + e: /$/, + r: 0, + c: [t] + } + } + }, { + cN: "title", + b: /^[\w]+:\s*$/ + }, { + cN: "phony", + b: /^\.PHONY:/, + e: /$/, + k: ".PHONY", + l: /[\.\w]+/ + }, { + b: /^\t+/, + e: /$/, + c: [e.QSM, t] + }] + } +}), hljs.registerLanguage("asciidoc", function() { + return { + c: [{ + cN: "comment", + b: "^/{4,}\\n", + e: "\\n/{4,}$", + r: 10 + }, { + cN: "comment", + b: "^//", + e: "$", + r: 0 + }, { + cN: "title", + b: "^\\.\\w.*$" + }, { + b: "^[=\\*]{4,}\\n", + e: "\\n^[=\\*]{4,}$", + r: 10 + }, { + cN: "header", + b: "^(={1,5}) .+?( \\1)?$", + r: 10 + }, { + cN: "header", + b: "^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$", + r: 10 + }, { + cN: "attribute", + b: "^:.+?:", + e: "\\s", + eE: !0, + r: 10 + }, { + cN: "attribute", + b: "^\\[.+?\\]$", + r: 0 + }, { + cN: "blockquote", + b: "^_{4,}\\n", + e: "\\n_{4,}$", + r: 10 + }, { + cN: "code", + b: "^[\\-\\.]{4,}\\n", + e: "\\n[\\-\\.]{4,}$", + r: 10 + }, { + b: "^\\+{4,}\\n", + e: "\\n\\+{4,}$", + c: [{ + b: "<", + e: ">", + sL: "xml", + r: 0 + }], + r: 10 + }, { + cN: "bullet", + b: "^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+" + }, { + cN: "label", + b: "^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+", + r: 10 + }, { + cN: "strong", + b: "\\B\\*(?![\\*\\s])", + e: "(\\n{2}|\\*)", + c: [{ + b: "\\\\*\\w", + r: 0 + }] + }, { + cN: "emphasis", + b: "\\B'(?!['\\s])", + e: "(\\n{2}|')", + c: [{ + b: "\\\\'\\w", + r: 0 + }], + r: 0 + }, { + cN: "emphasis", + b: "_(?![_\\s])", + e: "(\\n{2}|_)", + r: 0 + }, { + cN: "smartquote", + b: "``.+?''", + r: 10 + }, { + cN: "smartquote", + b: "`.+?'", + r: 10 + }, { + cN: "code", + b: "(`.+?`|\\+.+?\\+)", + r: 0 + }, { + cN: "code", + b: "^[ \\t]", + e: "$", + r: 0 + }, { + cN: "horizontal_rule", + b: "^'{3,}[ \\t]*$", + r: 10 + }, { + b: "(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]", + rB: !0, + c: [{ + b: "(link|image:?):", + r: 0 + }, { + cN: "link_url", + b: "\\w", + e: "[^\\[]+", + r: 0 + }, { + cN: "link_label", + b: "\\[", + e: "\\]", + eB: !0, + eE: !0, + r: 0 + }], + r: 10 + }] + } +}), hljs.registerLanguage("parser3", function(e) { + return { + sL: "xml", + r: 0, + c: [{ + cN: "comment", + b: "^#", + e: "$" + }, { + cN: "comment", + b: "\\^rem{", + e: "}", + r: 10, + c: [{ + b: "{", + e: "}", + c: ["self"] + }] + }, { + cN: "preprocessor", + b: "^@(?:BASE|USE|CLASS|OPTIONS)$", + r: 10 + }, { + cN: "title", + b: "@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$" + }, { + cN: "variable", + b: "\\$\\{?[\\w\\-\\.\\:]+\\}?" + }, { + cN: "keyword", + b: "\\^[\\w\\-\\.\\:]+" + }, { + cN: "number", + b: "\\^#[0-9a-fA-F]+" + }, + e.CNM] + } +}), hljs.registerLanguage("clojure", function(e) { + var t = { + built_in: "def cond apply if-not if-let if not not= = < < > <= <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize" + }, n = "[a-zA-Z_0-9\\!\\.\\?\\-\\+\\*\\/\\<\\=\\>\\&\\#\\$';]+", + i = "[\\s:\\(\\{]+\\d+(\\.\\d+)?", + r = { + cN: "number", + b: i, + r: 0 + }, o = e.inherit(e.QSM, { + i: null + }), + a = { + cN: "comment", + b: ";", + e: "$", + r: 0 + }, s = { + cN: "collection", + b: "[\\[\\{]", + e: "[\\]\\}]" + }, l = { + cN: "comment", + b: "\\^" + n + }, c = { + cN: "comment", + b: "\\^\\{", + e: "\\}" + }, u = { + cN: "attribute", + b: "[:]" + n + }, d = { + cN: "list", + b: "\\(", + e: "\\)" + }, p = { + eW: !0, + k: { + literal: "true false nil" + }, + r: 0 + }, f = { + k: t, + l: n, + cN: "title", + b: n, + starts: p + }; + return d.c = [{ + cN: "comment", + b: "comment" + }, + f, p], p.c = [d, o, l, c, a, u, s, r], s.c = [d, o, l, a, u, s, r], { + i: /\S/, + c: [a, d, { + cN: "prompt", + b: /^=> /, + starts: { + e: /\n\n|\Z/ + } + }] + } +}), hljs.registerLanguage("go", function(e) { + var t = { + keyword: "break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer", + constant: "true false iota nil", + typename: "bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune", + built_in: "append cap close complex copy imag len make new panic print println real recover delete" + }; + return { + aliases: ["golang"], + k: t, + i: "", + c: [e.CLCM, e.CBLCLM, e.QSM, { + cN: "string", + b: "'", + e: "[^\\\\]'" + }, { + cN: "string", + b: "`", + e: "`" + }, { + cN: "number", + b: "[^a-zA-Z_0-9](\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?", + r: 0 + }, + e.CNM] + } +}), define("highlightjs", function(e) { + return function() { + var t; + return t || e.hljs + } +}(this)); +var Markdown; +if(Markdown = "object" == typeof exports && "function" == typeof require ? exports : {}, function() { + function e(e) { + return e + } + + function t() { + return !1 + } + + function n() {} + + function i() {} + n.prototype = { + chain: function(t, n) { + var i = this[t]; + if(!i) throw new Error("unknown hook " + t); + this[t] = i === e ? n : function() { + var e = Array.prototype.slice.call(arguments, 0); + return e[0] = i.apply(null, e), n.apply(null, e) + } + }, + set: function(e, t) { + if(!this[e]) throw new Error("unknown hook " + e); + this[e] = t + }, + addNoop: function(t) { + this[t] = e + }, + addFalse: function(e) { + this[e] = t + } + }, Markdown.HookCollection = n, i.prototype = { + set: function(e, t) { + this["s_" + e] = t + }, + get: function(e) { + return this["s_" + e] + } + }, Markdown.Converter = function() { + function e(e) { + return e = e.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm, function(e, t, n, i, r, o) { + return t = t.toLowerCase(), P.set(t, C(n)), r ? i : (o && F.set(t, o.replace(/"/g, """)), "") + }) + } + + function t(e) { + return e = e.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm, r), e = e.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm, r), e = e.replace(/\n[ ]{0,3}((<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, r), e = e.replace(/\n\n[ ]{0,3}(-]|-[^>])(?:[^-]|-[^-])*)--)>[ \t]*(?=\n{2,}))/g, r), e = e.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g, r) + } + + function r(e, t) { + var n = t; + return n = n.replace(/^\n+/, ""), n = n.replace(/\n+$/g, ""), n = "\n\n~K" + (O.push(n) - 1) + "K\n\n" + } + + function o(e, n) { + e = R.preBlockGamut(e, j), e = f(e); + var i = "
\n"; + return e = e.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm, i), e = e.replace(/^[ ]{0,2}([ ]?-[ ]?){3,}[ \t]*$/gm, i), e = e.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm, i), e = h(e), e = g(e), e = w(e), e = R.postBlockGamut(e, j), e = t(e), e = S(e, n) + } + + function a(e) { + return e = R.preSpanGamut(e), e = b(e), e = s(e), e = T(e), e = u(e), e = l(e), e = k(e), e = e.replace(/~P/g, "://"), e = C(e), e = A._DoItalicsAndBold ? A._DoItalicsAndBold(e) : x(e), e = e.replace(/ +\n/g, "
\n"), e = R.postSpanGamut(e) + } + + function s(e) { + var t = /(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|-]|-[^>])(?:[^-]|-[^-])*)--)>)/gi; + return e = e.replace(t, function(e) { + var t = e.replace(/(.)<\/?code>(?=.)/g, "$1`"); + return t = L(t, "!" == e.charAt(1) ? "\\`*_/" : "\\`*_") + }) + } + + function l(e) { + return e = e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, c), e = e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()((?:\([^)]*\)|[^()\s])*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, c), e = e.replace(/(\[([^\[\]]+)\])()()()()()/g, c) + } + + function c(e, t, n, i, r, o, a, s) { + void 0 == s && (s = ""); + var l = t, + c = n.replace(/:\/\//g, "~P"), + u = i.toLowerCase(), + p = r, + f = s; + if("" == p) + if("" == u && (u = c.toLowerCase().replace(/ ?\n/g, " ")), p = "#" + u, void 0 != P.get(u)) p = P.get(u), void 0 != F.get(u) && (f = F.get(u)); + else { + if(!(l.search(/\(\s*\)$/m) > -1)) return l; + p = "" + } + p = N(p), p = L(p, "*_"); + var h = '" + c + "" + } + + function u(e) { + return e = e.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, p), e = e.replace(/(!\[(.*?)\]\s?\([ \t]*()(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, p) + } + + function d(e) { + return e.replace(/>/g, ">").replace(/" + } + + function f(e) { + return e = e.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm, function(e, t) { + return "" + a(t) + "
\n\n" + }), e = e.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm, function(e, t) { + return "" + a(t) + "
\n\n" + }), e = e.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm, function(e, t, n) { + var i = t.length; + return "" + a(n) + " \n\n" + }) + } + + function h(e, t) { + e += "~0"; + var n = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm; + return B ? e = e.replace(n, function(e, n, i) { + var r = n, + o = i.search(/[*+-]/g) > -1 ? "ul" : "ol", + a = m(r, o, t); + return a = a.replace(/\s+$/, ""), a = "<" + o + ">" + a + "" + o + ">\n" + }) : (n = /(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g, e = e.replace(n, function(e, t, n, i) { + var r = t, + o = n, + a = i.search(/[*+-]/g) > -1 ? "ul" : "ol", + s = m(o, a); + return s = r + "<" + a + ">\n" + s + "" + a + ">\n" + })), e = e.replace(/~0/, "") + } + + function m(e, t, n) { + B++, e = e.replace(/\n{2,}$/, "\n"), e += "~0"; + var i = $[t], + r = new RegExp("(^[ \\t]*)(" + i + ")[ \\t]+([^\\r]+?(\\n+))(?=(~0|\\1(" + i + ")[ \\t]+))", "gm"), + s = !1; + return e = e.replace(r, function(e, t, i, r) { + var l = r, + c = /\n\n$/.test(l), + u = c || l.search(/\n{2,}/) > -1; + return u || s ? l = o(I(l), !0) : (l = h(I(l), !0), l = l.replace(/\n$/, ""), n || (l = a(l))), s = c, "" + l + " \n" + }), e = e.replace(/~0/g, ""), B--, e + } + + function g(e) { + return e += "~0", e = e.replace(/(?:\n\n|^\n?)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g, function(e, t, n) { + var i = t, + r = n; + return i = y(I(i)), i = D(i), i = i.replace(/^\n+/g, ""), i = i.replace(/\n+$/g, ""), i = "", "\n\n" + i + "\n\n" + r + }), e = e.replace(/~0/, "") + } + + function v(e) { + return e = e.replace(/(^\n+|\n+$)/g, ""), "\n\n~K" + (O.push(e) - 1) + "K\n\n" + } + + function b(e) { + return e = e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, function(e, t, n, i) { + var r = i; + return r = r.replace(/^([ \t]*)/g, ""), r = r.replace(/[ \t]*$/g, ""), r = y(r), r = r.replace(/:\/\//g, "~P"), t + "" + i + "\n
" + r + "
" + }) + } + + function y(e) { + return e = e.replace(/&/g, "&"), e = e.replace(//g, ">"), e = L(e, "*_{}[]\\", !1) + } + + function x(e) { + return e = e.replace(/([\W_]|^)(\*\*|__)(?=\S)([^\r]*?\S[\*_]*)\2([\W_]|$)/g, "$1$3$4"), e = e.replace(/([\W_]|^)(\*|_)(?=\S)([^\r\*_]*?\S)\2([\W_]|$)/g, "$1$3$4") + } + + function w(e) { + return e = e.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm, function(e, t) { + var n = t; + return n = n.replace(/^[ \t]*>[ \t]?/gm, "~0"), n = n.replace(/~0/g, ""), n = n.replace(/^[ \t]+$/gm, ""), n = o(n), n = n.replace(/(^|\n)/g, "$1 "), n = n.replace(/(\s*[^\r]+?<\/pre>)/gm, function(e, t) { + var n = t; + return n = n.replace(/^ /gm, "~0"), n = n.replace(/~0/g, "") + }), v("\n" + n + "\n") + }) + } + + function S(e, t) { + e = e.replace(/^\n+/g, ""), e = e.replace(/\n+$/g, ""); + for(var n = e.split(/\n{2,}/g), i = [], r = /~K(\d+)K/, o = n.length, s = 0; o > s; s++) { + var l = n[s]; + r.test(l) ? i.push(l) : /\S/.test(l) && (l = a(l), l = l.replace(/^([ \t]*)/g, ""), l += "
", i.push(l)) + } + if(!t) { + o = i.length; + for(var s = 0; o > s; s++) + for(var c = !0; c;) c = !1, i[s] = i[s].replace(/~K(\d+)K/g, function(e, t) { + return c = !0, O[t] + }) + } + return i.join("\n\n") + } + + function C(e) { + return e = e.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, "&"), e = e.replace(/<(?![a-z\/?!]|~D)/gi, "<") + } + + function T(e) { + return e = e.replace(/\\(\\)/g, M), e = e.replace(/\\([`*_{}\[\]()>#+-.!])/g, M) + } + + function E(e, t, n, i) { + if(t) return e; + if(")" !== i.charAt(i.length - 1)) return "<" + n + i + ">"; + for(var r = i.match(/[()]/g), o = 0, a = 0; a < r.length; a++) "(" === r[a] ? 0 >= o ? o = 1 : o++ : o--; + var s = ""; + if(0 > o) { + var l = new RegExp("\\){1," + -o + "}$"); + i = i.replace(l, function(e) { + return s = e, "" + }) + } + if(s) { + var c = i.charAt(i.length - 1); + U.test(c) || (s = c + s, i = i.substr(0, i.length - 1)) + } + return "<" + n + i + ">" + s + } + + function k(e) { + e = e.replace(q, E); + var t = function(e, t) { + return '' + R.plainLinkText(t) + "" + }; + return e = e.replace(/<((https?|ftp):[^'">\s]+)>/gi, t) + } + + function _(e) { + return e = e.replace(/~E(\d+)E/g, function(e, t) { + var n = parseInt(t); + return String.fromCharCode(n) + }) + } + + function I(e) { + return e = e.replace(/^(\t|[ ]{1,4})/gm, "~0"), e = e.replace(/~0/g, "") + } + + function D(e) { + if(!/\t/.test(e)) return e; + var t, n = [" ", " ", " ", " "], + i = 0; + return e.replace(/[\n\t]/g, function(e, r) { + return "\n" === e ? (i = r + 1, e) : (t = (r - i) % 4, i = r + 1, n[t]) + }) + } + + function N(e) { + if(!e) return ""; + e.length; + return e.replace(z, function(e) { + return "~D" == e ? "%24" : ":" == e ? ":" : "%" + e.charCodeAt(0).toString(16) + }) + } + + function L(e, t, n) { + var i = "([" + t.replace(/([\[\]\\])/g, "\\$1") + "])"; + n && (i = "\\\\" + i); + var r = new RegExp(i, "g"); + return e = e.replace(r, M) + } + + function M(e, t) { + var n = t.charCodeAt(0); + return "~E" + n + "E" + } + var A = {}; + this.setOptions = function(e) { + A = e + }; + var R = this.hooks = new n; + R.addNoop("plainLinkText"), R.addNoop("preConversion"), R.addNoop("postNormalization"), R.addNoop("preBlockGamut"), R.addNoop("postBlockGamut"), R.addNoop("preSpanGamut"), R.addNoop("postSpanGamut"), R.addNoop("postConversion"); + var P, F, O, B; + this.makeHtml = function(n) { + if(P) throw new Error("Recursive call to converter.makeHtml"); + return P = new i, F = new i, O = [], B = 0, n = R.preConversion(n), n = n.replace(/~/g, "~T"), n = n.replace(/\$/g, "~D"), n = n.replace(/\r\n/g, "\n"), n = n.replace(/\r/g, "\n"), n = "\n\n" + n + "\n\n", n = D(n), n = n.replace(/^[ \t]+$/gm, ""), n = R.postNormalization(n), n = t(n), n = e(n), n = o(n), n = _(n), n = n.replace(/~D/g, "$$"), n = n.replace(/~T/g, "~"), n = R.postConversion(n), O = F = P = null, n + }; + var j = function(e) { + return o(e) + }, $ = { + ol: "\\d+[.]", + ul: "[*+-]" + }, G = "[-A-Z0-9+&@#/%?=~_|[\\]()!:,.;]", + H = "[-A-Z0-9+&@#/%=~_|[\\])]", + q = new RegExp('(="|<)?\\b(https?|ftp)(://' + G + "*" + H + ")(?=$|\\W)", "gi"), + U = new RegExp(H, "i"), + z = /(?:["'*()[\]:]|~D)/g + } +}(), define("libs/Markdown.Converter", function() {}), function() { + function e(e) { + return e.replace(/^\s+|\s+$/g, "") + } + + function t(e) { + return e.replace(/\s+$/g, "") + } + + function n(e) { + return e.replace(new RegExp("^(\\t|[ ]{1,4})", "gm"), "") + } + + function i(e, t) { + return -1 != e.indexOf(t) + } + + function r(e, t) { + return e.replace(/<[^>]*>?/gi, function(e) { + return e.match(t) ? e : "" + }) + } + + function o(e, t) { + for(var n = {}, i = 0; i < e.length; i++) n[e[i]] = e[i]; + for(i = 0; i < t.length; i++) n[t[i]] = t[i]; + var r = []; + for(var o in n) n.hasOwnProperty(o) && r.push(n[o]); + return r + } + + function a(e) { + return "" != e.charAt(0) && (e = "" + e), "" != e.charAt(e.length - 1) && (e += ""), e + } + + function s(e) { + return "" == e.charAt(0) && (e = e.substr(1)), "" == e.charAt(e.length - 1) && (e = e.substr(0, e.length - 1)), e + } + + function l(e, t) { + return r(c(e, t), m) + } + + function c(e, t) { + var n = t.blockGamutHookCallback(e); + return n = p(n), n = n.replace(/~D/g, "$$").replace(/~T/g, "~"), n = t.previousPostConversion(n) + } + + function u(e) { + return e.replace(/\\\|/g, "~I").replace(/\\:/g, "~i") + } + + function d(e) { + return e.replace(/~I/g, "|").replace(/~i/g, ":") + } + + function p(e) { + return e = e.replace(/~E(\d+)E/g, function(e, t) { + var n = parseInt(t); + return String.fromCharCode(n) + }) + } + + function f(e) { + return e.toLowerCase().replace(/\s+/g, "-").replace(/[^\w\-]+/g, "").replace(/\-\-+/g, "-").replace(/^-+/, "").replace(/-+$/, "") + } + + function h(e, t) { + var n = t; + return n = n.replace(/&\#8220;/g, '"'), n = n.replace(/&\#8221;/g, '"'), n = n.replace(/&\#8216;/g, "'"), n = n.replace(/&\#8217;/g, "'"), n = n.replace(/&\#8212;/g, "---"), n = n.replace(/&\#8211;/g, "--"), n = n.replace(/&\#8230;/g, "...") + } + var m = new RegExp(["^(<\\/?(a|abbr|acronym|applet|area|b|basefont|", "bdo|big|button|cite|code|del|dfn|em|figcaption|", "font|i|iframe|img|input|ins|kbd|label|map|", "mark|meter|object|param|progress|q|ruby|rp|rt|s|", "samp|script|select|small|span|strike|strong|", "sub|sup|textarea|time|tt|u|var|wbr)[^>]*>|", "<(br)\\s?\\/?>)$"].join(""), "i"); + Array.indexOf || (Array.prototype.indexOf = function(e) { + for(var t = 0; t < this.length; t++) + if(this[t] == e) return t; + return -1 + }), Markdown.Extra = function() { + this.converter = null, this.hashBlocks = [], this.footnotes = {}, this.usedFootnotes = [], this.attributeBlocks = !1, this.googleCodePrettify = !1, this.highlightJs = !1, this.tableClass = "", this.tabWidth = 4 + }, Markdown.Extra.init = function(e, t) { + var n = new Markdown.Extra, + r = [], + o = [], + a = [], + s = ["unHashExtraBlocks"]; + return t = t || {}, t.extensions = t.extensions || ["all"], i(t.extensions, "all") && (t.extensions = ["tables", "fenced_code_gfm", "def_list", "attr_list", "footnotes", "smartypants", "strikethrough", "newlines"]), o.push("wrapHeaders"), i(t.extensions, "attr_list") && (r.push("hashFcbAttributeBlocks"), o.push("hashHeaderAttributeBlocks"), s.push("applyAttributeBlocks"), n.attributeBlocks = !0), i(t.extensions, "fenced_code_gfm") && (o.push("fencedCodeBlocks"), r.push("fencedCodeBlocks")), i(t.extensions, "tables") && o.push("tables"), i(t.extensions, "def_list") && o.push("definitionLists"), i(t.extensions, "footnotes") && (r.push("stripFootnoteDefinitions"), o.push("doFootnotes"), s.push("printFootnotes")), i(t.extensions, "smartypants") && s.push("runSmartyPants"), i(t.extensions, "strikethrough") && a.push("strikethrough"), i(t.extensions, "newlines") && a.push("newlines"), e.hooks.chain("postNormalization", function(e) { + return n.doTransform(r, e) + "\n" + }), e.hooks.chain("preBlockGamut", function(e, t) { + return n.blockGamutHookCallback = t, e = u(e), e = n.doTransform(o, e) + "\n", e = d(e) + }), e.hooks.chain("postSpanGamut", function(e) { + return n.doTransform(a, e) + }), n.previousPostConversion = e.hooks.postConversion, e.hooks.chain("postConversion", function(e) { + return e = n.doTransform(s, e), n.hashBlocks = [], n.footnotes = {}, n.usedFootnotes = [], e + }), "highlighter" in t && (n.googleCodePrettify = "prettify" === t.highlighter, n.highlightJs = "highlight" === t.highlighter), "table_class" in t && (n.tableClass = t.table_class), n.converter = e, n + }, Markdown.Extra.prototype.doTransform = function(e, t) { + for(var n = 0; n < e.length; n++) t = this[e[n]](t); + return t + }, Markdown.Extra.prototype.hashExtraBlock = function(e) { + return "\n~X" + (this.hashBlocks.push(e) - 1) + "X
\n" + }, Markdown.Extra.prototype.hashExtraInline = function(e) { + return "~X" + (this.hashBlocks.push(e) - 1) + "X" + }, Markdown.Extra.prototype.unHashExtraBlocks = function(e) { + function t() { + var i = !1; + e = e.replace(/(?:)?~X(\d+)X(?:<\/p>)?/g, function(e, t) { + i = !0; + var r = parseInt(t, 10); + return n.hashBlocks[r] + }), i === !0 && t() + } + var n = this; + return t(), e + }, Markdown.Extra.prototype.wrapHeaders = function(e) { + function t(e) { + return "\n" + e + "\n" + } + return e = e.replace(/^.+[ \t]*\n=+[ \t]*\n+/gm, t), e = e.replace(/^.+[ \t]*\n-+[ \t]*\n+/gm, t), e = e.replace(/^\#{1,6}[ \t]*.+?[ \t]*\#*\n+/gm, t) + }; + var g = "\\{[ \\t]*((?:[#.][-_:a-zA-Z0-9]+[ \\t]*)+)\\}", + v = new RegExp("^(#{1,6}.*#{0,6})[ \\t]+" + g + "[ \\t]*(?:\\n|0x03)", "gm"), + b = new RegExp("^(.*)[ \\t]+" + g + "[ \\t]*\\n(?=[\\-|=]+\\s*(?:\\n|0x03))", "gm"), + y = new RegExp("^(```[ \\t]*[^{\\s]*)[ \\t]+" + g + "[ \\t]*\\n(?=([\\s\\S]*?)\\n```[ \\t]*(\\n|0x03))", "gm"); + Markdown.Extra.prototype.hashHeaderAttributeBlocks = function(e) { + function t(e, t, i) { + return "
~XX" + (n.hashBlocks.push(i) - 1) + "XX
\n" + t + "\n" + } + var n = this; + return e = e.replace(v, t), e = e.replace(b, t) + }, Markdown.Extra.prototype.hashFcbAttributeBlocks = function(e) { + function t(e, t, i) { + return "~XX" + (n.hashBlocks.push(i) - 1) + "XX
\n" + t + "\n" + } + var n = this; + return e.replace(y, t) + }, Markdown.Extra.prototype.applyAttributeBlocks = function(e) { + var t = this, + n = new RegExp('~XX(\\d+)XX
[\\s]*(?:<(h[1-6]|pre)(?: +class="(\\S+)")?(>[\\s\\S]*?\\2>))', "gm"); + return e = e.replace(n, function(e, n, i, r, a) { + if(!i) return ""; + for(var s = parseInt(n, 10), l = t.hashBlocks[s], c = l.match(/#[^\s#.]+/g) || [], u = c[0] ? ' id="' + c[0].substr(1, c[0].length - 1) + '"' : "", d = l.match(/\.[^\s#.]+/g) || [], p = 0; p < d.length; p++) d[p] = d[p].substr(1, d[p].length - 1); + var f = ""; + return r && (d = o(d, [r])), d.length > 0 && (f = ' class="' + d.join(" ") + '"'), "<" + i + u + f + a + }) + }, Markdown.Extra.prototype.tables = function(t) { + function n(t, n, r, o) { + n = n.replace(/^ *[|]/m, ""), r = r.replace(/^ *[|]/m, ""), o = o.replace(/^ *[|]/gm, ""), n = n.replace(/[|] *$/m, ""), r = r.replace(/[|] *$/m, ""), o = o.replace(/[|] *$/gm, ""), alignspecs = r.split(/ *[|] */), align = []; + for(var a = 0; a < alignspecs.length; a++) { + var s = alignspecs[a]; + align[a] = s.match(/^ *-+: *$/m) ? ' style="text-align:right;"' : s.match(/^ *:-+: *$/m) ? ' style="text-align:center;"' : s.match(/^ *:-+ *$/m) ? ' style="text-align:left;"' : "" + } + var c = n.split(/ *[|] */), + u = c.length, + d = i.tableClass ? ' class="' + i.tableClass + '"' : "", + p = ["\n", "\n", "
\n", i.hashExtraBlock(p) + } + var i = this, + r = new RegExp(["^", "[ ]{0,3}", "[|]", "(.+)\\n", "[ ]{0,3}", "[|]([ ]*[-:]+[-| :]*)\\n", "(", "(?:[ ]*[|].*\\n?)*", ")", "(?:\\n|$)"].join(""), "gm"), + o = new RegExp(["^", "[ ]{0,3}", "(\\S.*[|].*)\\n", "[ ]{0,3}", "([-:]+[ ]*[|][-| :]*)\\n", "(", "(?:.*[|].*\\n?)*", ")", "(?:\\n|$)"].join(""), "gm"); + return t = t.replace(r, n), t = t.replace(o, n) + }, Markdown.Extra.prototype.stripFootnoteDefinitions = function(e) { + var t = this; + return e = e.replace(/\n[ ]{0,3}\[\^(.+?)\]\:[ \t]*\n?([\s\S]*?)\n{1,2}((?=\n[ ]{0,3}\S)|$)/g, function(e, n, i) { + return n = f(n), i += "\n", i = i.replace(/^[ ]{0,3}/g, ""), t.footnotes[n] = i, "\n" + }) + }, Markdown.Extra.prototype.doFootnotes = function(e) { + var t = this; + if(t.isConvertingFootnote === !0) return e; + var n = 0; + return e = e.replace(/\[\^(.+?)\]/g, function(e, i) { + var r = f(i), + o = t.footnotes[r]; + if(void 0 === o) return e; + n++, t.usedFootnotes.push(r); + var a = '' + n + ""; + return t.hashExtraInline(a) + }) + }, Markdown.Extra.prototype.printFootnotes = function(e) { + var t = this; + if(0 === t.usedFootnotes.length) return e; + e += '\n\n\n"].join(""); + for(a = 0; u > a; a++) { + var f = l(e(c[a]), i); + p += [" \n\n"; + var h = o.split("\n"); + for(a = 0; a < h.length; a++) + if(!h[a].match(/^\s*$/)) { + for(var m = h[a].split(/ *[|] */), g = u - m.length, v = 0; g > v; v++) m.push(""); + for(p += "", f, " \n"].join("") + } + p += "\n", v = 0; u > v; v++) { + var b = l(e(m[v]), i); + p += [" \n" + } + return p += "", b, " \n"].join("") + } + p += "\n" + }, Markdown.Extra.prototype.fencedCodeBlocks = function(e) { + function t(e) { + return e = e.replace(/&/g, "&"), e = e.replace(//g, ">"), e = e.replace(/~D/g, "$$"), e = e.replace(/~T/g, "~") + } + var n = this; + return e = e.replace(/(?:^|\n)```[ \t]*(\S*)[ \t]*\n([\s\S]*?)\n```[ \t]*(?=\n)/g, function(e, i, r) { + var o = i, + a = r, + s = n.googleCodePrettify ? ' class="prettyprint"' : "", + l = ""; + o && (l = n.googleCodePrettify || n.highlightJs ? ' class="language-' + o + '"' : ' class="' + o + '"'); + var c = ["
\n\n\n'; + for(var n = 0; n < t.usedFootnotes.length; n++) { + var i = t.usedFootnotes[n], + r = t.footnotes[i]; + t.isConvertingFootnote = !0; + var o = l(r, t); + delete t.isConvertingFootnote, e += '
\n- ' + o + ' ↩
\n\n' + } + return e += ""].join(""); + return n.hashExtraBlock(c) + }) + }, Markdown.Extra.prototype.educatePants = function(e) { + var t = this, + n = "", + i = 0; + e.replace(/(?:)|(<)([a-zA-Z1-6]+)([^\n]*?>)([\s\S]*?)(<\/\2>)/g, function(r, o, a, s, l, c, u) { + var d = e.substring(i, u); + return n += t.applyPants(d), t.smartyPantsLastChar = n.substring(n.length - 1), i = u + r.length, o ? (/code|kbd|pre|script|noscript|iframe|math|ins|del|pre/i.test(a) ? t.smartyPantsLastChar = l.substring(l.length - 1) : l = t.educatePants(l), void(n += o + a + s + l + c)) : void(n += r) + }); + var r = e.substring(i); + return n += t.applyPants(r), t.smartyPantsLastChar = n.substring(n.length - 1), n + }, Markdown.Extra.prototype.applyPants = function(e) { + return e = e.replace(/---/g, "—").replace(/--/g, "–"), e = e.replace(/\.\.\./g, "…").replace(/\.\s\.\s\./g, "…"), e = e.replace(/``/g, "“").replace(/''/g, "”"), /^'$/.test(e) ? /\S/.test(this.smartyPantsLastChar) ? "’" : "‘" : /^"$/.test(e) ? /\S/.test(this.smartyPantsLastChar) ? "”" : "“" : (e = e.replace(/^'(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/, "’"), e = e.replace(/^"(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/, "”"), e = e.replace(/"'(?=\w)/g, "“‘"), e = e.replace(/'"(?=\w)/g, "‘“"), e = e.replace(/'(?=\d{2}s)/g, "’"), e = e.replace(/(\s| |--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)'(?=\w)/g, "$1‘"), e = e.replace(/([^\s\[\{\(\-])'/g, "$1’"), e = e.replace(/'(?=\s|s\b)/g, "’"), e = e.replace(/'/g, "‘"), e = e.replace(/(\s| |--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)"(?=\w)/g, "$1“"), e = e.replace(/([^\s\[\{\(\-])"/g, "$1”"), e = e.replace(/"(?=\s)/g, "”"), e = e.replace(/"/gi, "“")) + }, Markdown.Extra.prototype.runSmartyPants = function(e) { + return this.smartyPantsLastChar = "", e = this.educatePants(e), e = e.replace(/(<([a-zA-Z1-6]+)\b([^\n>]*?)(\/)?>)/g, h) + }, Markdown.Extra.prototype.definitionLists = function(t) { + var n = new RegExp(["(\\x02\\n?|\\n\\n)", "(?:", "(", "(", "[ ]{0,3}", "((?:[ \\t]*\\S.*\\n)+)", "\\n?", "[ ]{0,3}:[ ]+", ")", "([\\s\\S]+?)", "(", "(?=\\0x03)", "|", "(?=", "\\n{2,}", "(?=\\S)", "(?!", "[ ]{0,3}", "(?:\\S.*\\n)+?", "\\n?", "[ ]{0,3}:[ ]+", ")", "(?!", "[ ]{0,3}:[ ]+", ")", ")", ")", ")", ")"].join(""), "gm"), + i = this; + return t = a(t), t = t.replace(n, function(t, n, r) { + var o = e(i.processDefListItems(r)); + return o = "", t(a), "
\n" + o + "\n
", n + i.hashExtraBlock(o) + "\n\n" + }), s(t) + }, Markdown.Extra.prototype.processDefListItems = function(i) { + var r = this, + o = new RegExp(["(\\x02\\n?|\\n\\n+)", "(", "[ ]{0,3}", "(?![:][ ]|[ ])", "(?:\\S.*\\n)+?", ")", "(?=\\n?[ ]{0,3}:[ ])"].join(""), "gm"), + u = new RegExp(["\\n(\\n+)?", "(", "[ ]{0,3}", "[:][ ]+", ")", "([\\s\\S]+?)", "(?=\\n*", "(?:", "\\n[ ]{0,3}[:][ ]|", "|\\x03", ")", ")"].join(""), "gm"); + return i = a(i), i = i.replace(/\n{2,}(?=\\x03)/, "\n"), i = i.replace(o, function(t, n, i) { + for(var o = e(i).split("\n"), a = "", s = 0; s < o.length; s++) { + var c = o[s]; + c = l(e(c), r), a += "\n " + c + " " + } + return a + "\n" + }), i = i.replace(u, function(e, i, o, a) { + return i || a.match(/\n{2,}/) ? (a = Array(o.length + 1).join(" ") + a, a = n(a) + "\n\n", a = "\n" + c(a, r) + "\n") : (a = t(a), a = l(n(a), r)), "\n" + a + " \n" + }), s(i) + }, Markdown.Extra.prototype.strikethrough = function(e) { + return e.replace(/([\W_]|^)~T~T(?=\S)([^\r]*?\S[\*_]*)~T~T([\W_]|$)/g, "$1$2$3") + }, Markdown.Extra.prototype.newlines = function(e) { + return e.replace(/(<(?:br|\/li)>)?\n/g, function(e, t) { + return t ? e : "
\n" + }) + } +}(), define("pagedown-extra", function() {}), define("extensions/markdownExtra", ["jquery", "underscore", "utils", "classes/Extension", "text!html/markdownExtraSettingsBlock.html", "google-code-prettify", "highlightjs", "pagedown-extra"], function(e, t, n, i, r, o, a) { + var s = new i("markdownExtra", "Markdown Extra", !0); + s.settingsBlock = r, s.defaultConfig = { + extensions: ["fenced_code_gfm", "tables", "def_list", "attr_list", "footnotes", "smartypants", "strikethrough", "newlines"], + intraword: !0, + comments: !0, + highlighter: "prettify" + }, s.onLoadSettings = function() { + function e(e) { + return t.some(s.config.extensions, function(t) { + return t == e + }) + } + n.setInputChecked("#input-markdownextra-fencedcodegfm", e("fenced_code_gfm")), n.setInputChecked("#input-markdownextra-tables", e("tables")), n.setInputChecked("#input-markdownextra-deflist", e("def_list")), n.setInputChecked("#input-markdownextra-attrlist", e("attr_list")), n.setInputChecked("#input-markdownextra-footnotes", e("footnotes")), n.setInputChecked("#input-markdownextra-smartypants", e("smartypants")), n.setInputChecked("#input-markdownextra-strikethrough", e("strikethrough")), n.setInputChecked("#input-markdownextra-newlines", e("newlines")), n.setInputChecked("#input-markdownextra-intraword", s.config.intraword), n.setInputChecked("#input-markdownextra-comments", s.config.comments), n.setInputValue("#input-markdownextra-highlighter", s.config.highlighter) + }, s.onSaveSettings = function(e) { + e.extensions = [], n.getInputChecked("#input-markdownextra-fencedcodegfm") && e.extensions.push("fenced_code_gfm"), n.getInputChecked("#input-markdownextra-tables") && e.extensions.push("tables"), n.getInputChecked("#input-markdownextra-deflist") && e.extensions.push("def_list"), n.getInputChecked("#input-markdownextra-attrlist") && e.extensions.push("attr_list"), n.getInputChecked("#input-markdownextra-footnotes") && e.extensions.push("footnotes"), n.getInputChecked("#input-markdownextra-smartypants") && e.extensions.push("smartypants"), n.getInputChecked("#input-markdownextra-strikethrough") && e.extensions.push("strikethrough"), n.getInputChecked("#input-markdownextra-newlines") && e.extensions.push("newlines"), e.intraword = n.getInputChecked("#input-markdownextra-intraword"), e.comments = n.getInputChecked("#input-markdownextra-comments"), e.highlighter = n.getInputValue("#input-markdownextra-highlighter") + }; + var l; + return s.onEventMgrCreated = function(e) { + l = e + }, s.onPagedownConfigure = function(e) { + var n = e.getConverter(); + if(s.config.intraword === !0) { + var i = { + _DoItalicsAndBold: function(e) { + return e = e.replace(/([^\w*]|^)(\*\*|__)(?=\S)(.+?[*_]*)(?=\S)\2(?=[^\w*]|$)/g, "$1$3"), e = e.replace(/([^\w*]|^)(\*|_)(?=\S)(.+?)(?=\S)\2(?=[^\w*]|$)/g, "$1$3") + } + }; + n.setOptions(i) + } + s.config.comments === !0 && n.hooks.chain("postConversion", function(e) { + return e.replace(//g, function(e) { + return e.replace(/^$/, ' $1 ') + }) + }); + var r = { + extensions: s.config.extensions + }; + if("highlight" == s.config.highlighter) { + r.highlighter = "prettify"; + var l = document.getElementById("preview-contents"); + e.hooks.chain("onPreviewRefresh", function() { + t.each(l.querySelectorAll(".prettyprint > code"), function(e) { + !e.highlighted && a.highlightBlock(e), e.highlighted = !0 + }) + }) + } else "prettify" == s.config.highlighter && (r.highlighter = "prettify", e.hooks.chain("onPreviewRefresh", o.prettyPrint)); + Markdown.Extra.init(n, r) + }, s +}), define("text!html/mathJaxSettingsBlock.html", [], function() { + return 'Allows StackEdit to interpret LaTeX mathematical expressions.
\n\n\nMore info' +}), define("text!libs/mathjax_config.js", [], function() { + return 'MathJax.Hub.Config({\n "HTML-CSS": {\n preferredFont: "TeX",\n availableFonts: [\n "STIX",\n "TeX"\n ],\n linebreaks: {\n automatic: true\n },\n EqnChunk: 10,\n imageFont: null\n },\n tex2jax: <%= tex2jax || \'{ inlineMath: [["$","$"],["\\\\\\\\\\\\\\\\(","\\\\\\\\\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\\\\\[","\\\\\\\\]"]], processEscapes: true }\' %>,\n TeX: $.extend({\n noUndefined: {\n attributes: {\n mathcolor: "red",\n mathbackground: "#FFEEEE",\n mathsize: "90%"\n }\n },\n Safe: {\n allow: {\n URLs: "safe",\n classes: "safe",\n cssIDs: "safe",\n styles: "safe",\n fontsize: "all"\n }\n }\n }, <%= tex %>),\n messageStyle: "none"\n});\n' +}), define("libs/mathjax_init", ["settings", "text!libs/mathjax_config.js"], function(e, t) { + var n = document.createElement("script"); + n.type = "text/x-mathjax-config", n.innerHTML = _.template(t, { + tex: e.extensionSettings.mathJax ? e.extensionSettings.mathJax.tex : "undefined", + tex2jax: e.extensionSettings.mathJax ? e.extensionSettings.mathJax.tex2jax : void 0 + }), document.getElementsByTagName("head")[0].appendChild(n) +}), define("extensions/mathJax", ["utils", "classes/Extension", "text!html/mathJaxSettingsBlock.html", "mathjax"], function(e, t, n) { + function i(e, t, n) { + var i = u.slice(e, t + 1).join("").replace(/&/g, "&").replace(//g, ">"); + for(x.Browser.isMSIE && (i = i.replace(/(%[^\n]*)\n/g, "$1\n \n\n\n \n\n\n \n\n\n \n\n
\n")); t > e;) u[t] = "", t--; + u[e] = "@@" + m.length + "@@", n && (i = n(i)), m.push(i), d = p = f = null + } + + function r(e) { + d = p = f = null, m = []; + var t; + /`/.test(e) ? (e = e.replace(/~/g, "~T").replace(/(^|[^\\])(`+)([^\n]*?[^`\n])\2(?!`)/gm, function(e) { + return e.replace(/\$/g, "~D") + }), t = function(e) { + return e.replace(/~([TD])/g, function(e, t) { + return { + T: "~", + D: "$" + }[t] + }) + }) : t = function(e) { + return e + }, u = w(e.replace(/\r\n?/g, "\n"), S); + for(var e = 1, n = u.length; n > e; e += 2) { + var r = u[e]; + "@" === r.charAt(0) ? (u[e] = "@@" + m.length + "@@", m.push(r)) : d ? r === p ? h ? f = e : i(d, e, t) : r.match(/\n.*\n/) ? (f && (e = f, i(d, e, t)), d = p = f = null, h = 0) : "{" === r ? h++ : "}" === r && h && h-- : r === y || "$$" === r ? (d = e, p = r, h = 0) : "begin" === r.substr(1, 5) && (d = e, p = "\\end" + r.substr(6), h = 0) + } + return f && i(d, f, t), t(u.join("")) + } + + function o(e) { + return e = e.replace(/@@(\d+)@@/g, function(e, t) { + return m[t] + }), m = null, e + } + + function a() { + v = !1, x.cancelTypeset = !1, x.Queue(["Typeset", x, b]), x.Queue(c) + } + + function s() { + !v && (v = !0, x.Cancel(), x.Queue(a)) + } + var l = new t("mathJax", "MathJax", !0); + l.settingsBlock = n, l.defaultConfig = { + tex: "{}", + tex2jax: '{ inlineMath: [["$","$"],["\\\\\\\\(","\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\[","\\\\]"]], processEscapes: true }' + }, l.onLoadSettings = function() { + e.setInputValue("#input-mathjax-config-tex", l.config.tex), e.setInputValue("#input-mathjax-config-tex2jax", l.config.tex2jax) + }, l.onSaveSettings = function(t, n) { + t.tex = e.getInputJsValue("#input-mathjax-config-tex", n), t.tex2jax = e.getInputJsValue("#input-mathjax-config-tex2jax", n) + }, l.onPagedownConfigure = function(e) { + b = document.getElementById("preview-contents"); + var t = e.getConverter(); + t.hooks.chain("preConversion", r), t.hooks.chain("postConversion", o) + }; + var c; + l.onAsyncPreview = function(e) { + c = e, s() + }; + var u, d, p, f, h, m, g = !1, + v = !1, + b = null, + y = "$", + x = MathJax.Hub; + x.Queue(function() { + g = !0, x.processUpdateTime = 50, x.Config({ + "HTML-CSS": { + EqnChunk: 10, + EqnChunkFactor: 1 + }, + SVG: { + EqnChunk: 10, + EqnChunkFactor: 1 + } + }) + }); + var w, S = /(\$\$|\\(?:begin|end)\{[a-z]*\*?\}|\\[\\{}$]|[{}]|(?:\n\s*)+|@@\d+@@)/i; + return w = 3 === "aba".split(/(b)/).length ? function(e, t) { + return e.split(t) + } : function(e, t) { + var n, i = []; + if(!t.global) { + n = t.toString(); + var r = ""; + n = n.replace(/^\/(.*)\/([im]*)$/, function(e, t, n) { + return r = n, t + }), t = RegExp(n, r + "g") + } + for(var o = t.lastIndex = 0; n = t.exec(e);) i.push(e.substring(o, n.index)), i.push.apply(i, n.slice(1)), o = n.index + n[0].length; + return i.push(e.substring(o)), i + }, + function() { + var e = MathJax.Hub; + if(!e.Cancel) { + e.cancelTypeset = !1, e.Register.StartupHook("HTML-CSS Jax Config", function() { + var t = MathJax.OutputJax["HTML-CSS"], + n = t.Translate; + t.Augment({ + Translate: function(i, r) { + if(e.cancelTypeset || r.cancelled) throw Error("MathJax Canceled"); + return n.call(t, i, r) + } + }) + }), e.Register.StartupHook("SVG Jax Config", function() { + var t = MathJax.OutputJax.SVG, + n = t.Translate; + t.Augment({ + Translate: function(i, r) { + if(e.cancelTypeset || r.cancelled) throw Error("MathJax Canceled"); + return n.call(t, i, r) + } + }) + }), e.Register.StartupHook("TeX Jax Config", function() { + var t = MathJax.InputJax.TeX, + n = t.Translate; + t.Augment({ + Translate: function(i, r) { + if(e.cancelTypeset || r.cancelled) throw Error("MathJax Canceled"); + return n.call(t, i, r) + } + }) + }); + var t = e.processError; + e.processError = function(n, i, r) { + return "MathJax Canceled" !== n.message ? t.call(e, n, i, r) : (MathJax.Message.Clear(0, 0), i.jaxIDs = [], i.jax = {}, i.scripts = [], i.i = i.j = 0, i.cancelled = !0, null) + }, e.Cancel = function() { + this.cancelTypeset = !0 + } + } + }(), l +}), define("text!html/partialRenderingSettingsBlock.html", [], function() { + return "Renders modified sections only.
\n\n Note: Document sections are based on title elements (h1, h2...). Therefore if\n your document does not contain any title, performance will not be increased.\n" +}), define("extensions/partialRendering", ["underscore", "crel", "extensions/markdownExtra", "classes/Extension", "text!html/partialRenderingSettingsBlock.html"], function(e, t, n, i, r) { + function o() { + var t = [], + n = "\n"; + if(m = !1, e.each(g, function(e) { + var i = '\n\n\n' + e.text + "\n\n"; + h && (i = i.replace(/^```.*\n[\s\S]*?\n```|\n[ ]{0,3}\[\^(.+?)\]\:[ \t]*\n?([\s\S]*?)\n{1,2}((?=\n[ ]{0,3}\S)|$)/gm, function(e, t) { + return t ? (m = !0, n += e.replace(/^\s*\n/gm, "") + "\n", "") : e + })), i = i.replace(/^```.*\n[\s\S]*?\n```|^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm, function(e, t) { + return t ? (n += e.replace(/^\s*\n/gm, "") + "\n", "") : e + }), t.push({ + id: e.id, + text: i + "\n" + }) + }), y = [], b = [], d = void 0, x === !0 || u != n) return x = !1, u = n, b = v, v = t, void(y = t); + var i = v.length; + e.some(v, function(e, n) { + return n >= t.length || e.text != t[n].text ? (i = n, !0) : void 0 + }); + var r = -v.length; + e.some(v.slice().reverse(), function(e, n) { + return n >= t.length || e.text != t[t.length - n - 1].text ? (r = -n, !0) : void 0 + }), i - r > v.length && (r = i - v.length); + var o = v.slice(0, i); + y = t.slice(i, t.length + r); + var a = v.slice(v.length + r, v.length); + d = e.first(a), b = v.slice(i, v.length + r), v = o.concat(y).concat(a) + } + + function a(e) { + var t = e.id.substring(3); + w[t] = e + } + + function s() { + function n(n) { + for(var i = t("div", { + id: "wmd-preview-section-" + n.id, + "class": "wmd-preview-section preview-content" + }), o = !1; r;) { + var s = r.nextSibling, + l = "se-preview-section-delimiter" == r.className; + if(o === !0 && "DIV" == r.tagName && l) break; + o = !0, "DIV" == r.tagName && "footnotes" == r.className ? e.each(r.querySelectorAll("ol > li"), a) : l || i.appendChild(r), r = s + } + return i + } + e.each(b, function(e) { + var t = document.getElementById("wmd-preview-section-" + e.id); + f.removeChild(t) + }); + var i = document.getElementById("wmd-preview"), + r = i.firstChild, + o = document.createDocumentFragment(); + e.each(y, function(e) { + o.appendChild(n(e)) + }), i.innerHTML = ""; + var s = p; + void 0 !== d && (s = document.getElementById("wmd-preview-section-" + d.id)), f.insertBefore(o, s), p.innerHTML = ""; + var l = []; + if(m === !0) { + var c = t("ol"); + e.each(f.querySelectorAll("a.footnote"), function(e, t) { + e.textContent = t + 1; + var n = e.id.substring(6); + l.push(n), c.appendChild(w[n].cloneNode(!0)) + }), l.length > 0 && p.appendChild(t("div", { + "class": "footnotes" + }, t("hr"), c)), w = e.pick(w, l) + } + } + var l = new i("partialRendering", "Partial Rendering", !0); + l.settingsBlock = r; + var c, u, d, p, f, h = !1, + m = !1, + g = [], + v = [], + b = [], + y = [], + x = !1, + w = {}; + return l.onSectionsCreated = function(e) { + g = e + }, l.onPagedownConfigure = function(t) { + c = t.getConverter(), c.hooks.chain("preConversion", function() { + o(); + var t = e.map(y, function(e) { + return e.text + }); + return t.push(u + "\n\n"), t.join("") + }), t.hooks.chain("onPreviewRefresh", function() { + s() + }) + }, l.onInit = function() { + n.enabled && e.some(n.config.extensions, function(e) { + return "footnotes" == e + }) && (h = !0) + }, l.onReady = function() { + p = t("div", { + id: "wmd-preview-section-footnotes", + "class": "preview-content" + }), f = document.getElementById("preview-contents"), f.appendChild(p) + }, l.onFileSelected = function() { + x = !0 + }, l +}), define("extensions/markdownSectionParser", ["underscore", "extensions/markdownExtra", "extensions/mathJax", "extensions/partialRendering", "classes/Extension", "crel"], function(e, t, n, i, r, o) { + function a(e, t) { + function n(e, t) { + var n = o.substring(a, t); + u.push({ + id: ++f, + text: n, + textWithFrontMatter: i + n + }), i = "" + } + if(e === p) { + var i = (p.frontMatter || {})._frontMatter || "", + r = t.substring(i.length), + o = r + "\n\n"; + u = []; + var a = 0; + o.replace(d, function(e, t) { + n(a, t), a = t + }), n(a, r.length), s.onSectionsCreated(u) + } + } + var s, l = new r("markdownSectionParser", "Markdown section parser"); + l.onEventMgrCreated = function(e) { + s = e + }; + var c, u = [], + d = "^.+[ \\t]*\\n=+[ \\t]*\\n+|^.+[ \\t]*\\n-+[ \\t]*\\n+|^\\#{1,6}[ \\t]*.+?[ \\t]*\\#*\\n+"; + l.onPagedownConfigure = function(r) { + t.enabled && e.some(t.config.extensions, function(e) { + return "fenced_code_gfm" == e + }) && (d = "^```.*\\n[\\s\\S]*?\\n```|" + d), n.enabled && (d = "^[ \\t]*\\n\\$\\$[\\s\\S]*?\\$\\$|" + d, d = "^[ \\t]*\\n\\\\\\\\[[\\s\\S]*?\\\\\\\\]|" + d, d = "^[ \\t]*\\n\\\\?\\\\begin\\{[a-z]*\\*?\\}[\\s\\S]*?\\\\end\\{[a-z]*\\*?\\}|" + d), d = new RegExp(d, "gm"); + var a = r.getConverter(); + i.enabled || (a.hooks.chain("preConversion", function() { + return e.reduce(u, function(e, t) { + return e + '\n\n\n' + t.text + "\n\n" + }, "") + }), r.hooks.chain("onPreviewRefresh", function() { + function e() { + for(var e = o("div", { + "class": "wmd-preview-section preview-content" + }), t = !1; n;) { + var i = n.nextSibling, + r = "se-preview-section-delimiter" == n.className; + if(t === !0 && "DIV" == n.tagName && r) break; + t = !0, r || e.appendChild(n), n = i + } + return e + } + var t = document.getElementById("wmd-preview"), + n = t.firstChild, + i = document.createDocumentFragment(); + u.forEach(function(t) { + i.appendChild(e(t)) + }), c.innerHTML = "", c.appendChild(t), c.appendChild(i) + })) + }, l.onReady = function() { + c = document.getElementById("preview-contents") + }; + var p; + l.onFileSelected = function(e) { + p = e + }; + var f = 0; + return l.onFileOpen = a, l.onContentChanged = a, l +}), define("text!html/buttonMarkdownSyntax.html", [], function() { + return '\n \n' +}), define("extensions/buttonMarkdownSyntax", ["jquery", "classes/Extension", "text!html/buttonMarkdownSyntax.html"], function(e, t, n) { + var i = new t("buttonMarkdownSyntax", 'Button "Markdown syntax', !0, !0); + return i.settingsBlock = 'Adds a "Markdown syntax" button over the preview.
', i.onCreatePreviewButton = function() { + return n + }, i +}), define("extensions/googleAnalytics", ["jquery", "underscore", "constants", "utils", "classes/Extension", "settings"], function(e, t, n, i, r, o) { + function a() { + i.currentTime - d > 18e4 && (_gaq.push(["_trackPageview"]), d = i.currentTime) + } + var s = new r("googleAnalytics", "Google Analytics", !0); + s.settingsBlock = "Sends anonymous statistics about usage and errors to help improve StackEdit.
"; + var l = !1, + c = !1; + window._gaq = []; + var u = function() { + if(l === !1 && c === !1) { + var t = "/ga.js"; + location.search.match(/(\?|&)console/) && (t = "/u/ga_debug.js"), e.ajax({ + url: "https://ssl.google-analytics.com" + t, + dataType: "script" + }).done(function() { + l = !0 + }) + } + }, d = 0; + s.onPeriodicRun = function() { + a() + }, s.onReady = function() { + _gaq.push(["_setAccount", n.GOOGLE_ANALYTICS_ACCOUNT_ID]), a(), _gaq.push(["_trackEvent", "About", "version", n.VERSION]), _gaq.push(["_trackEvent", "Settings", "layoutOrientation", "" + o.layoutOrientation]), _gaq.push(["_trackEvent", "Settings", "theme", "" + window.theme]), _gaq.push(["_trackEvent", "Settings", "lazyRendering", "" + o.lazyRendering]), _gaq.push(["_trackEvent", "Settings", "editorFontFamily", "" + o.editorFontFamily]), _gaq.push(["_trackEvent", "Settings", "editorFontSize", "" + o.editorFontSize]), _gaq.push(["_trackEvent", "Settings", "defaultContent backlink", "" + (-1 !== o.defaultContent.indexOf(n.MAIN_URL))]), _gaq.push(["_trackEvent", "Settings", "commitMsg backlink", "" + (-1 !== o.commitMsg.indexOf(n.MAIN_URL))]), _gaq.push(["_trackEvent", "Settings", "sshProxy unchanged", "" + (o.sshProxy == n.SSH_PROXY_URL)]), t.each(o.extensionSettings, function(e, t) { + _gaq.push(["_trackEvent", "Extensions", t + " enabled", "" + (e.enabled === !0)]) + }), window.onerror = function(e, t, n) { + _gaq.push(["_trackEvent", "Error", e, t + ":" + n + i.formatEventList()]) + }, u() + }, s.onOfflineChanged = function(e) { + c = e, u() + }; + var p = 0; + return s.onSyncRunning = function(e) { + e === !0 && (p = (new Date).getTime()) + }, s.onPublishRunning = function(e) { + e === !0 && (p = (new Date).getTime()) + }, s.onSyncSuccess = function() { + var e = (new Date).getTime(); + _gaq.push(["_trackTiming", "Sync", "SyncTime", e - p]) + }, s.onSyncImportSuccess = function(e, t) { + _gaq.push(["_trackEvent", "Sync", "SyncImport"]), _gaq.push(["_trackEvent", "Sync", "SyncImport provider", t.providerId]) + }, s.onSyncExportSuccess = function(e, t) { + _gaq.push(["_trackEvent", "Sync", "SyncExport"]), _gaq.push(["_trackEvent", "Sync", "SyncExport provider", t.provider.providerId]) + }, s.onPublishSuccess = function(e) { + var n = (new Date).getTime(); + _gaq.push(["_trackTiming", "Publish", "PublishSuccess", n - p]), t.each(e.publishLocations, function(e) { + _gaq.push(["_trackEvent", "Publish", "PublishSuccess provider", e.provider.providerId]) + }) + }, s.onNewPublishSuccess = function(e, t) { + _gaq.push(["_trackEvent", "Publish", "NewPublish provider", t.provider.providerId]) + }, s.onError = function(e) { + !t.isString(e) && e.message && _gaq.push(["_trackEvent", "Error", "message", e.message + i.formatEventList()]) + }, s +}), define("extensions/twitter", ["jquery", "underscore", "constants", "utils", "classes/Extension"], function(e, t, n, i, r) { + var o = new r("twitter", "Twitter", !1, !0), + a = !1, + s = !1, + l = function() { + a === !1 && s === !1 && e.ajax({ + url: "https://platform.twitter.com/widgets.js", + dataType: "script" + }).done(function() { + a = !0 + }) + }; + return o.onReady = function() { + l() + }, o.onOfflineChanged = function(e) { + s = e, l() + }, o.onTweet = function() { + a && window.twttr.widgets.load() + }, o +}), define("text!html/dialogAbout.html", [], function() { + return '\n\n' +}), define("extensions/dialogAbout", ["underscore", "constants", "utils", "classes/Extension", "text!html/dialogAbout.html"], function(e, t, n, i, r) { + var o = new i("dialogAbout", 'Dialog "About"'), + a = { + Bootstrap: "http://getbootstrap.com/", + "Bootstrap Tour": "http://bootstraptour.com/", + crel: "https://github.com/KoryNunn/crel", + "FileSaver.js": "https://github.com/eligrey/FileSaver.js/", + Fontello: "http://fontello.com/", + "Font Awesome and others...": "res/libs/fontello/LICENSE.txt", + Gatekeeper: "https://github.com/prose/gatekeeper", + "Github.js": "https://github.com/michael/github", + "Hammer.js": "http://eightmedia.github.io/hammer.js/", + "Highlight.js": "http://softwaremaniacs.org/soft/highlight/en/", + jGrowl: "https://github.com/stanlemon/jGrowl/", + jQuery: "http://jquery.com/", + jsondiffpatch: "https://github.com/benjamine/jsondiffpatch", + MathJax: "http://www.mathjax.org/", + Mousetrap: "http://craig.is/killing/mice", + PageDown: "https://code.google.com/p/pagedown/", + "PageDown Extra": "https://github.com/jmcmanus/pagedown-extra/", + Prettify: "https://code.google.com/p/google-code-prettify/", + Prism: "http://prismjs.com/", + Rangy: "https://code.google.com/p/rangy/", + RequireJS: "http://requirejs.org/", + "RequireJS LESS plugin": "https://github.com/guybedford/require-less", + "stacktrace.js": "http://stacktracejs.com/", + "to-markdown": "https://github.com/domchristie/to-markdown", + "Underscore.js": "http://underscorejs.org/", + waitForImages: "https://github.com/alexanderdickson/waitForImages", + XRegExp: "https://github.com/slevithan/xregexp", + "yaml.js": "https://github.com/jeremyfa/yaml.js" + }, s = { + "StackEdit Download Proxy": "https://github.com/benweet/stackedit-download-proxy", + "StackEdit HTMLtoPDF": "https://github.com/benweet/stackedit-htmltopdf", + "StackEdit Picasa Proxy": "https://github.com/benweet/stackedit-picasa-proxy", + "StackEdit SSH Proxy": "https://github.com/benweet/stackedit-ssh-proxy", + "StackEdit Tumblr Proxy": "https://github.com/benweet/stackedit-tumblr-proxy", + "StackEdit WordPress Proxy": "https://github.com/benweet/stackedit-wordpress-proxy" + }; + return o.onReady = function() { + n.addModal("modal-about", e.template(r, { + libraries: a, + projects: s, + version: t.VERSION + })) + }, o +}), define("text!html/dialogManagePublicationLocation.html", [], function() { + return ' \n\n' +}), define("extensions/dialogManagePublication", ["jquery", "underscore", "classes/Extension", "text!html/dialogManagePublicationLocation.html"], function(e, t, n, i) { + var r, o = new n("dialogManagePublication", 'Dialog "Manage publication"', !1, !0); + o.onEventMgrCreated = function(e) { + r = e + }; + var a, s, l, c = function(e) { + if(void 0 === e || e === a) { + l.toggleClass("hide", 0 === t.size(a.publishLocations)); + var n = t.reduce(a.publishLocations, function(e, n) { + var r = t.omit(n, "provider", "publishIndex", "sharingLink"); + return r.password && (r.password = "********"), r = JSON.stringify(r).replace(/{|}|"/g, "").replace(/,/g, ", "), e + t.template(i, { + publishAttributes: n, + publishDesc: r + }) + }, ""); + s.innerHTML = n + } + }; + return o.onFileSelected = function(e) { + a = e, c(e) + }, o.onNewPublishSuccess = c, o.onPublishRemoved = c, o.onReady = function() { + var t = document.querySelector(".modal-manage-publish"); + s = t.querySelector(".publish-list"), l = e(document.querySelectorAll(".show-already-published")), e(s).on("click", ".remove-button", function() { + var t = e(this), + n = a.publishLocations[t.data("publishIndex")]; + a.removePublishLocation(n), r.onPublishRemoved(a, n) + }) + }, o +}), define("text!html/dialogManageSynchronizationLocation.html", [], function() { + return '\n' +}), define("extensions/dialogManageSynchronization", ["jquery", "underscore", "classes/Extension", "text!html/dialogManageSynchronizationLocation.html"], function(e, t, n, i) { + var r, o = new n("dialogManageSynchronization", 'Dialog "Manage synchronization"', !1, !0); + o.onEventMgrCreated = function(e) { + r = e + }; + var a; + o.onSynchronizerCreated = function(e) { + a = e + }; + var s, l, c, u = function(e) { + if(void 0 === e || e === s) { + c.toggleClass("hide", 0 === t.size(s.syncLocations)); + var n = t.reduce(s.syncLocations, function(e, n) { + return e + t.template(i, { + syncAttributes: n, + syncDesc: n.id || n.path + }) + }, ""); + l.innerHTML = n + } + }; + return o.onFileSelected = function(e) { + s = e, u(e) + }, o.onSyncExportSuccess = u, o.onSyncRemoved = u, o.onReady = function() { + var t = document.querySelector(".modal-manage-sync"); + l = t.querySelector(".sync-list"), c = e(document.querySelectorAll(".show-already-synchronized")), e(l).on("click", ".remove-button", function() { + var t = e(this), + n = s.syncLocations[t.data("syncIndex")]; + s.removeSyncLocation(n), r.onSyncRemoved(s, n) + }) + }, o +}), define("text!html/dialogManageSharingLocation.html", [], function() { + return ' \n\n' +}), define("extensions/dialogManageSharing", ["jquery", "underscore", "classes/Extension", "text!html/dialogManageSharingLocation.html"], function(e, t, n, i) { + var r, o = new n("dialogManageSharing", 'Button "Share"', !1, !0); + o.onEventMgrCreated = function(e) { + r = e + }; + var a, s, l, c, u = function(e) { + if(void 0 === e || e === a) { + var n = t.reduce(a.publishLocations, function(e, n) { + return n.sharingLink && (e += t.template(i, { + link: n.sharingLink, + title: a.title + })), e + }, ""); + s.innerHTML = n, r.onTweet(), l.toggleClass("hide", 0 === n.length), c.toggleClass("hide", 0 !== n.length) + } + }; + return o.onFileSelected = function(e) { + a = e, u(e) + }, o.onNewPublishSuccess = function(t, n) { + u(t), n.sharingLink && (e(".modal").modal("hide"), e(".modal-manage-sharing").modal("show")) + }, o.onPublishRemoved = u, o.onReady = function() { + var t = document.querySelector(".modal-manage-sharing"); + s = t.querySelector(".share-list"), l = e(t.querySelectorAll(".msg-share-list")), c = e(t.querySelectorAll(".msg-no-share")) + }, o +}), function() { + var e = this, + t = {}, n = !1; + "undefined" != typeof module && module.exports ? (module.exports = t, e.toMarkdown = t, n = !0) : e.toMarkdown = t, t.converter = function(e) { + e && e.elements && $.isArray(e.elements) && (c = c.concat(e.elements)), this.makeMd = function(e, t) { + var r; + if(n) { + var o = require("jsdom"); + o.env({ + html: e, + scripts: ["http://code.jquery.com/jquery-1.6.4.min.js"], + done: function(n, r) { + "function" == typeof t && t(i(e, r.$)) + } + }) + } else r = i(e, $); + return r + } + }; + var i = function(e, t) { + e = e.replace(/(\d+)\. /g, "$1\\. "); + var n = t(""), + i = n.html(e); + i.find("*:not(pre, code)").contents().filter(function() { + return 3 === this.nodeType && /^\s+$/.test(this.nodeValue) + }).remove(); + for(var r = [], o = 0, s = c.length; s > o; o++) r.push(c[o].selector); + for(r = r.join(","); i.find(r).length;) + for(var o = 0, s = c.length; s > o; o++) $matches = i.find(c[o].selector + ':not(:has("' + r + '"))'), $matches.each(function(e, n) { + var i = t(n); + i.before(c[o].replacement(i.html(), i)).remove() + }); + return a(i.html()) + }, r = function(e) { + return e.replace(/^[\n\r\f]+|[\n\r\f]+$/g, "") + }, o = function(e) { + return String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"') + }, a = function(e) { + return e = e.replace(/^[\t\r\n]+|[\t\r\n]+$/g, ""), e = e.replace(/\n\s+\n/g, "\n\n"), e = e.replace(/\n{3,}/g, "\n\n"), e = o(e) + }, s = function(e) { + return e = r(e), e ? "**" + e + "**" : "" + }, l = function(e) { + return e = r(e), e ? "_" + e + "_" : "" + }, c = [{ + selector: "p", + replacement: function(e) { + return e = $.trim(e), e ? "\n\n" + e + "\n\n" : "" + } + }, { + selector: "br", + replacement: function() { + return "\n" + } + }, { + selector: "h1,h2,h3,h4,h5,h6", + replacement: function(e, t) { + e = $.trim(e); + for(var n = t.prop("nodeName").charAt(1), i = "", r = 0; n > r; r++) i += "#"; + return e ? "\n\n" + i + " " + e + "\n\n" : "" + } + }, { + selector: "hr", + replacement: function() { + return "\n\n* * *\n\n" + } + }, { + selector: "a[href]", + replacement: function(e, t) { + if(e) { + e = r(e); + var n = t.attr("href"), + i = t.attr("title") || ""; + return "[" + e + "](" + n + (i ? ' "' + i + '"' : "") + ")" + } + return !1 + } + }, { + selector: "b", + replacement: s + }, { + selector: "strong", + replacement: s + }, { + selector: "i", + replacement: l + }, { + selector: "em", + replacement: l + }, { + selector: "code", + replacement: function(e) { + return e = r(e), e ? "`" + e + "`" : "" + } + }, { + selector: "img", + replacement: function(e, t) { + var n = t.attr("alt") || "", + i = t.attr("src") || "", + r = t.attr("title") || ""; + return "![" + n + "](" + i + (r ? ' "' + r + '"' : "") + ")" + } + }, { + selector: "pre", + replacement: function(e) { + return /^\s*\`/.test(e) ? (e = e.replace(/\`/g, ""), " " + e.replace(/\n/g, "\n ")) : "" + } + }, { + selector: "li", + replacement: function(e, t) { + e = e.replace(/^\s+|\s+$/, "").replace(/\n/gm, "\n "); + var n = "* ", + i = "", + r = t.parent(), + o = r.contents().filter(function() { + return 1 === this.nodeType && "LI" === this.nodeName || 3 === this.nodeType + }), + a = o.index(t) + 1; + return n = r.is("ol") ? a + ". " : "* ", a == o.length && (t.parents("li").length || (i = "\n"), e = e.replace(/\s+$/, ""), t.unwrap()), n + e + i + "\n" + } + }, { + selector: "blockquote", + replacement: function(e) { + return e = e = $.trim(e).replace(/\n{3,}/g, "\n\n"), e = e.replace(/\n/g, "\n> "), "> " + e + } + }] +}(), define("toMarkdown", ["jquery"], function(e) { + return function() { + var t; + return t || e.toMarkdown + } +}(this)), define("extensions/dialogOpenHarddrive", ["jquery", "underscore", "constants", "utils", "classes/Extension", "toMarkdown"], function(e, t, n, i, r, o) { + function a(i) { + i.stopPropagation(), i.preventDefault(); + var r = (i.dataTransfer || i.target).files; + e(".modal-import-harddrive-markdown, .modal-import-harddrive-html").modal("hide"), t.each(r, function(t) { + if(!e(i.target).is("#wmd-input *") || !t.name.match(/.(jpe?g|png|gif)$/i)) { + var r = new FileReader; + r.onload = function(e) { + return function(t) { + var n = t.target.result; + if(n.match(/\uFFFD/)) return void p.onError(e.name + " is a binary file."); + if(n = f ? f(n) : n, void 0 === n) return void p.onError(e.name + " is not a valid HTML file."); + var i = e.name, + r = i.lastIndexOf("."); + i = -1 !== r ? i.substring(0, r) : i; + var o = u.createFile(i, n); + u.selectFile(o) + } + }(t); + var o = t.slice(0, n.IMPORT_FILE_MAX_CONTENT_SIZE); + r.readAsText(o) + } + }) + } + + function s(e) { + f = void 0, a(e) + } + + function l(e) { + f = m, a(e) + } + + function c(e) { + e.stopPropagation(), e.preventDefault(), e.dataTransfer.dropEffect = "copy" + } + var u, d = new r("dialogOpenHarddrive", 'Dialog "Open from"'); + d.onFileMgrCreated = function(e) { + u = e + }; + var p; + d.onEventMgrCreated = function(e) { + p = e + }; + var f, h, m = function(e) { + return h.makeMd(e) + }; + return d.onReady = function() { + h = new o.converter, e("#input-file-import-harddrive-markdown").change(s), e("#dropzone-import-harddrive-markdown, #wmd-input").each(function() { + this.addEventListener("dragover", c, !1), this.addEventListener("drop", s, !1) + }), e("#input-file-import-harddrive-html").change(l), e("#dropzone-import-harddrive-html").each(function() { + this.addEventListener("dragover", c, !1), this.addEventListener("drop", l, !1) + }), e(".action-convert-html").click(function(e) { + var t = i.getInputTextValue("#input-convert-html", e); + if(void 0 !== t) { + if(t = h.makeMd(t), void 0 === t) return void p.onError("Invalid HTML code."); + var n = u.createFile(void 0, t); + u.selectFile(n) + } + }) + }, d +}), define("extensions/documentTitle", ["jquery", "underscore", "classes/Extension"], function(e, t, n) { + var i, r, o = new n("documentTitle", "Document Title"), + a = t.debounce(function(t) { + if(t === i) { + var n = i.title; + document.title = "StackEdit – " + n, r.html(i.composeTitle()), e(".file-title").text(n), e(".input-file-title").val(n) + } + }, 50); + return o.onFileSelected = function(e) { + i = e, a(e) + }, o.onTitleChanged = a, o.onSyncExportSuccess = a, o.onSyncRemoved = a, o.onNewPublishSuccess = a, o.onPublishRemoved = a, o.onReady = a, o.onReady = function() { + r = e(".file-title-navbar"), r.hover(function() { + var e = r[0].scrollWidth - r.outerWidth(); + r.stop(!0, !0).animate({ + scrollLeft: e + }, 15 * e, "linear") + }, function() { + r.stop(!0, !0).scrollLeft(0) + }).click(function() { + r.stop(!0, !0).scrollLeft(0) + }) + }, o +}), function(e, t) { + function n(e, t, n) { + return e.addEventListener ? void e.addEventListener(t, n, !1) : void e.attachEvent("on" + t, n) + } + + function i(e) { + if("keypress" == e.type) { + var t = String.fromCharCode(e.which); + return e.shiftKey || (t = t.toLowerCase()), t + } + return T[e.which] ? T[e.which] : E[e.which] ? E[e.which] : String.fromCharCode(e.which).toLowerCase() + } + + function r(e, t) { + return e.sort().join(",") === t.sort().join(",") + } + + function o(e) { + e = e || {}; + var t, n = !1; + for(t in N) e[t] ? n = !0 : N[t] = 0; + n || (A = !1) + } + + function a(e, t, n, i, o, a) { + var s, l, c = [], + u = n.type; + if(!I[e]) return []; + for("keyup" == u && f(e) && (t = [e]), s = 0; s < I[e].length; ++s) + if(l = I[e][s], (i || !l.seq || N[l.seq] == l.level) && u == l.action && ("keypress" == u && !n.metaKey && !n.ctrlKey || r(t, l.modifiers))) { + var d = !i && l.combo == o, + p = i && l.seq == i && l.level == a; + (d || p) && I[e].splice(s, 1), c.push(l) + } + return c + } + + function s(e) { + var t = []; + return e.shiftKey && t.push("shift"), e.altKey && t.push("alt"), e.ctrlKey && t.push("ctrl"), e.metaKey && t.push("meta"), t + } + + function l(e) { + return e.preventDefault ? void e.preventDefault() : void(e.returnValue = !1) + } + + function c(e) { + return e.stopPropagation ? void e.stopPropagation() : void(e.cancelBubble = !0) + } + + function u(e, t, n, i) { + P.stopCallback(t, t.target || t.srcElement, n, i) || e(t, n) === !1 && (l(t), c(t)) + } + + function d(e, t, n) { + var i, r = a(e, t, n), + s = {}, l = 0, + c = !1; + for(i = 0; i < r.length; ++i) r[i].seq && (l = Math.max(l, r[i].level)); + for(i = 0; i < r.length; ++i) + if(r[i].seq) { + if(r[i].level != l) continue; + c = !0, s[r[i].seq] = 1, u(r[i].callback, n, r[i].combo, r[i].seq) + } else c || u(r[i].callback, n, r[i].combo); + var d = "keypress" == n.type && M; + n.type != A || f(e) || d || o(s), M = c && "keydown" == n.type + } + + function p(e) { + "number" != typeof e.which && (e.which = e.keyCode); + var t = i(e); + if(t) return "keyup" == e.type && L === t ? void(L = !1) : void P.handleKey(t, s(e), e) + } + + function f(e) { + return "shift" == e || "ctrl" == e || "alt" == e || "meta" == e + } + + function h() { + clearTimeout(C), C = setTimeout(o, 1e3) + } + + function m() { + if(!S) { + S = {}; + for(var e in T) e > 95 && 112 > e || T.hasOwnProperty(e) && (S[T[e]] = e) + } + return S + } + + function g(e, t, n) { + return n || (n = m()[e] ? "keydown" : "keypress"), "keypress" == n && t.length && (n = "keydown"), n + } + + function v(e, t, n, r) { + function a(t) { + return function() { + A = t, ++N[e], h() + } + } + + function s(t) { + u(n, t, e), "keyup" !== r && (L = i(t)), setTimeout(o, 10) + } + N[e] = 0; + for(var l = 0; l < t.length; ++l) { + var c = l + 1 === t.length, + d = c ? s : a(r || y(t[l + 1]).action); + x(t[l], d, r, e, l) + } + } + + function b(e) { + return "+" === e ? ["+"] : e.split("+") + } + + function y(e, t) { + var n, i, r, o = []; + for(n = b(e), r = 0; r < n.length; ++r) i = n[r], _[i] && (i = _[i]), t && "keypress" != t && k[i] && (i = k[i], o.push("shift")), f(i) && o.push(i); + return t = g(i, o, t), { + key: i, + modifiers: o, + action: t + } + } + + function x(e, t, n, i, r) { + D[e + ":" + n] = t, e = e.replace(/\s+/g, " "); + var o, s = e.split(" "); + return s.length > 1 ? void v(e, s, t, n) : (o = y(e, n), I[o.key] = I[o.key] || [], a(o.key, o.modifiers, { + type: o.action + }, i, e, r), void I[o.key][i ? "unshift" : "push"]({ + callback: t, + modifiers: o.modifiers, + action: o.action, + seq: i, + level: r, + combo: e + })) + } + + function w(e, t, n) { + for(var i = 0; i < e.length; ++i) x(e[i], t, n) + } + for(var S, C, T = { + 8: "backspace", + 9: "tab", + 13: "enter", + 16: "shift", + 17: "ctrl", + 18: "alt", + 20: "capslock", + 27: "esc", + 32: "space", + 33: "pageup", + 34: "pagedown", + 35: "end", + 36: "home", + 37: "left", + 38: "up", + 39: "right", + 40: "down", + 45: "ins", + 46: "del", + 91: "meta", + 93: "meta", + 224: "meta" + }, E = { + 106: "*", + 107: "+", + 109: "-", + 110: ".", + 111: "/", + 186: ";", + 187: "=", + 188: ",", + 189: "-", + 190: ".", + 191: "/", + 192: "`", + 219: "[", + 220: "\\", + 221: "]", + 222: "'" + }, k = { + "~": "`", + "!": "1", + "@": "2", + "#": "3", + $: "4", + "%": "5", + "^": "6", + "&": "7", + "*": "8", + "(": "9", + ")": "0", + _: "-", + "+": "=", + ":": ";", + '"': "'", + "<": ",", + ">": ".", + "?": "/", + "|": "\\" + }, _ = { + option: "alt", + command: "meta", + "return": "enter", + escape: "esc", + mod: /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? "meta" : "ctrl" + }, I = {}, D = {}, N = {}, L = !1, M = !1, A = !1, R = 1; 20 > R; ++R) T[111 + R] = "f" + R; + for(R = 0; 9 >= R; ++R) T[R + 96] = R; + n(t, "keypress", p), n(t, "keydown", p), n(t, "keyup", p); + var P = { + bind: function(e, t, n) { + return e = e instanceof Array ? e : [e], w(e, t, n), this + }, + unbind: function(e, t) { + return P.bind(e, function() {}, t) + }, + trigger: function(e, t) { + return D[e + ":" + t] && D[e + ":" + t]({}, e), this + }, + reset: function() { + return I = {}, D = {}, this + }, + stopCallback: function(e, t) { + return(" " + t.className + " ").indexOf(" mousetrap ") > -1 ? !1 : "INPUT" == t.tagName || "SELECT" == t.tagName || "TEXTAREA" == t.tagName || t.isContentEditable + }, + handleKey: d + }; + e.Mousetrap = P, "function" == typeof define && define.amd && define("mousetrap", P) +}(window, document), define("classes/FileDescriptor", ["underscore", "utils", "storage"], function(e, t, n) { + function i(e, t, i, r) { + this.fileIndex = e, this._title = t || n[e + ".title"], this._editorScrollTop = parseInt(n[e + ".editorScrollTop"]) || 0, this._editorStart = parseInt(n[e + ".editorEnd"]) || 0, this._editorEnd = parseInt(n[e + ".editorEnd"]) || 0, this._previewScrollTop = parseInt(n[e + ".previewScrollTop"]) || 0, this._selectTime = parseInt(n[e + ".selectTime"]) || 0, this._discussionList = JSON.parse(n[e + ".discussionList"] || "{}"), this.syncLocations = i || {}, this.publishLocations = r || {}, Object.defineProperty(this, "title", { + get: function() { + return this._title + }, + set: function(e) { + this._title = e, n[this.fileIndex + ".title"] = e + } + }), Object.defineProperty(this, "content", { + get: function() { + return n[this.fileIndex + ".content"] + }, + set: function(e) { + n[this.fileIndex + ".content"] = e + } + }), Object.defineProperty(this, "editorScrollTop", { + get: function() { + return this._editorScrollTop + }, + set: function(e) { + this._editorScrollTop = e, n[this.fileIndex + ".editorScrollTop"] = e + } + }), Object.defineProperty(this, "editorStart", { + get: function() { + return this._editorStart + }, + set: function(e) { + this._editorStart = e, n[this.fileIndex + ".editorStart"] = e + } + }), Object.defineProperty(this, "editorEnd", { + get: function() { + return this._editorEnd + }, + set: function(e) { + this._editorEnd = e, n[this.fileIndex + ".editorEnd"] = e + } + }), Object.defineProperty(this, "previewScrollTop", { + get: function() { + return this._previewScrollTop + }, + set: function(e) { + this._previewScrollTop = e, n[this.fileIndex + ".previewScrollTop"] = e + } + }), Object.defineProperty(this, "selectTime", { + get: function() { + return this._selectTime + }, + set: function(e) { + this._selectTime = e, n[this.fileIndex + ".selectTime"] = e + } + }), Object.defineProperty(this, "discussionList", { + get: function() { + return this._discussionList + }, + set: function(e) { + this._discussionList = e, n[this.fileIndex + ".discussionList"] = JSON.stringify(e) + } + }), Object.defineProperty(this, "discussionListJSON", { + get: function() { + return n[this.fileIndex + ".discussionList"] || "{}" + }, + set: function(e) { + this._discussionList = JSON.parse(e), n[this.fileIndex + ".discussionList"] = e + } + }) + } + return i.prototype.addSyncLocation = function(e) { + t.storeAttributes(e), t.appendIndexToArray(this.fileIndex + ".sync", e.syncIndex), this.syncLocations[e.syncIndex] = e + }, i.prototype.removeSyncLocation = function(e) { + t.removeIndexFromArray(this.fileIndex + ".sync", e.syncIndex), delete this.syncLocations[e.syncIndex] + }, i.prototype.addPublishLocation = function(e) { + t.storeAttributes(e), t.appendIndexToArray(this.fileIndex + ".publish", e.publishIndex), this.publishLocations[e.publishIndex] = e + }, i.prototype.removePublishLocation = function(e) { + t.removeIndexFromArray(this.fileIndex + ".publish", e.publishIndex), delete this.publishLocations[e.publishIndex] + }, i.prototype.composeTitle = function() { + var t = []; + return e.chain(this.syncLocations).sortBy(function(e) { + return e.provider.providerId + }).each(function(e) { + t.push('') + }), 0 !== e.size(this.syncLocations) && t.push(''), e.chain(this.publishLocations).sortBy(function(e) { + return e.provider.providerId + }).each(function(e) { + t.push('') + }), 0 !== e.size(this.publishLocations) && t.push(''), t.push(e.escape(this.title)), t.join("") + }, i +}), define("fileSystem", ["underscore", "utils", "classes/FileDescriptor", "storage"], function(e, t, n, i) { + var r = {}; + return t.retrieveIndexArray("file.list").forEach(function(e) { + r[e] = new n(e) + }), Object.keys(i).forEach(function(e) { + var t = e.match(/(file\.\S+?)\.\S+/); + t && !r.hasOwnProperty(t[1]) && i.removeItem(e) + }), r +}), define("text!html/documentSelectorSettingsBlock.html", [], function() { + return 'Allows toggling document with keyboard shortcuts.
\n\n' +}), define("extensions/documentSelector", ["jquery", "underscore", "crel", "utils", "classes/Extension", "mousetrap", "fileSystem", "text!html/documentSelectorSettingsBlock.html"], function(e, t, n, i, r, o, a, s) { + var l = new r("documentSelector", "Document Selector", !0); + l.settingsBlock = s, l.defaultConfig = { + orderBy: "mru", + shortcutPrevious: "Ctrl+[", + shortcutNext: "Ctrl+]" + }, l.onLoadSettings = function() { + i.setInputValue("#select-document-selector-orderby", l.config.orderBy), i.setInputValue("#input-document-selector-shortcut-previous", l.config.shortcutPrevious), i.setInputValue("#input-document-selector-shortcut-next", l.config.shortcutNext) + }, l.onSaveSettings = function(e, t) { + e.orderBy = i.getInputValue("#select-document-selector-orderby"), e.shortcutPrevious = i.getInputTextValue("#input-document-selector-shortcut-previous", t), e.shortcutNext = i.getInputTextValue("#input-document-selector-shortcut-next", t) + }; + var c; + l.onFileMgrCreated = function(e) { + c = e + }; + var u, d, p, f, h, m, g, v = ['\n \n\n\n \n\n\n \n\n\n \n\n\n \n\n\n \n\n" data-file-index="<%= fileDesc.fileIndex %>">', ' ', " <%= fileDesc.composeTitle() %>", " ", " "].join(""), + b = t.debounce(function() { + var n = t.chain(a).sortBy(f).reduce(function(e, n) { + return e + t.template(v, { + fileDesc: n, + isCurrent: n === h + }) + }, "").value(); + u.innerHTML = n, p = [], d = {}, t.each(u.querySelectorAll("li"), function(t) { + var n = e(t); + p.push(n); + var i = a[n.data("fileIndex")]; + d[i.fileIndex] = n + }) + }, 50); + return l.onFileSelected = function(e) { + h = e, b() + }, l.onFileCreated = b, l.onFileDeleted = b, l.onTitleChanged = b, l.onSyncExportSuccess = b, l.onSyncRemoved = b, l.onNewPublishSuccess = b, l.onPublishRemoved = b, l.onReady = function() { + g = e("#wmd-input"), "title" == l.config.orderBy ? f = function(e) { + return e.title.toLowerCase() + } : "mru" == l.config.orderBy && (f = function(e) { + return -e.selectTime + }), u = n("ul", { + "class": "dropdown-menu dropdown-file-selector" + }), document.querySelector(".navbar").appendChild(n("div", n("div", { + "data-toggle": "dropdown" + }), u)); + var i = e(u).dropdown(), + r = e(".document-panel .collapse-button"); + r.prop("title", t.template("<%= title %> <%= shortcutPrevious %> <%= shortcutNext %>", { + title: r.prop("title"), + shortcutPrevious: l.config.shortcutPrevious, + shortcutNext: l.config.shortcutNext + })); + var s = l.config.shortcutPrevious.toLowerCase(); + o.bind(s, function() { + void 0 === m && (i.dropdown("toggle"), m = d[h.fileIndex]); + var e = t.indexOf(p, m) - 1; + return -2 === e && (e = -1), m = p[(e + p.length) % p.length], setTimeout(function() { + m.find("a").focus() + }, 10), !1 + }); + var v = l.config.shortcutNext.toLowerCase(); + o.bind(l.config.shortcutNext.toLowerCase(), function() { + void 0 === m && (i.dropdown("toggle"), m = d[h.fileIndex]); + var e = t.indexOf(p, m) + 1; + return m = p[e % p.length], setTimeout(function() { + m.find("a").focus() + }, 10), !1 + }); + var b = s.indexOf("+"), + y = -1 === b ? s : s.substring(0, b), + x = v.indexOf("+"), + w = -1 === x ? v : v.substring(0, x); + o.bind([y, w], function() { + void 0 !== m && m.find("a").click() + }, "keyup"), i.on("click", "a", function() { + m = void 0; + var t = e(this.parentNode), + n = a[t.data("fileIndex")]; + t.hasClass("disabled") ? g.focus() : c.selectFile(n) + }) + }, l +}), define("classes/FolderDescriptor", ["underscore", "utils", "storage", "fileSystem"], function(e, t, n, i) { + function r(r, o) { + this.folderIndex = r, this._name = o || n[r + ".name"], this.fileList = {}, e.each(t.retrieveIndexArray(r + ".files"), function(e) { + try { + var n = i[e]; + n.folder = this, this.fileList[e] = n + } catch(o) { + t.removeIndexFromArray(r + ".files", e) + } + }, this), Object.defineProperty(this, "name", { + get: function() { + return this._name + }, + set: function(e) { + this._name = e, n[this.folderIndex + ".name"] = e + } + }) + } + return r.prototype.addFile = function(e) { + e.folder = this, t.appendIndexToArray(this.folderIndex + ".files", e.fileIndex), this.fileList[e.fileIndex] = e + }, r.prototype.removeFile = function(e) { + e.folder = void 0, t.removeIndexFromArray(this.folderIndex + ".files", e.fileIndex), delete this.fileList[e.fileIndex] + }, r +}), define("folderList", ["underscore", "utils", "storage", "classes/FolderDescriptor", "storage"], function(e, t, n, i) { + var r = {}; + return t.retrieveIndexArray("folder.list").forEach(function(e) { + r[e] = new i(e) + }), Object.keys(n).forEach(function(e) { + var t = e.match(/(folder\.\S+?)\.\S+/); + t && !r.hasOwnProperty(t[1]) && n.removeItem(e) + }), r +}), define("extensions/documentPanel", ["jquery", "underscore", "utils", "classes/Extension", "folderList", "fileSystem"], function(e, t, n, i, r, o) { + function a(n) { + if(n != y) { + if(y = n, b.scrollTop = 0, !n) return f.addClass("hide"), void d.removeClass("hide"); + var i = n.toLowerCase().split(/\s+/); + t.each(p.querySelectorAll(".file"), function(n) { + var r = e(n), + o = r.text().toLowerCase(); + r.toggle(!t.some(i, function(e) { + return -1 === o.indexOf(e) + })) + }), f.removeClass("hide"), d.addClass("hide") + } + } + var s, l = new i("documentPanel", "Document Panel"); + l.onFileMgrCreated = function(e) { + s = e + }; + var c, u, d, p, f, h, m = ['', '', " <%= _.size(folderDesc.fileList) %>", "", ' <%= folderDesc.name %>', "", '', " <%= fileListHtml %>", ""].join(""), + g = ['"', ' data-file-index="<%= fileDesc.fileIndex %>">', " <%= fileDesc.composeTitle() %>", ""].join(""), + v = t.debounce(function() { + var e = t.filter(o, function(e) { + return void 0 === e.folder + }), + n = t.chain(e).sortBy(function(e) { + return e.title.toLowerCase() + }).reduce(function(e, n) { + return e + "" + t.template(g, { + fileDesc: n, + selectedFileDesc: h + }) + " " + }, "").value(); + n = n && ' ", t.chain(r).sortBy(function(e) { + return e.name.toLowerCase() + }).each(function(e) { + var i = t.chain(e.fileList).sortBy(function(e) { + return e.title.toLowerCase() + }).reduce(function(e, n) { + return e + "" + t.template(g, { + fileDesc: n, + selectedFileDesc: h + }) + " " + }, "").value(); + i = i && ' ", n += t.template(m, { + folderDesc: e, + fileListHtml: i, + id: e.folderIndex.replace(".", "") + }) + }), u.innerHTML = n; + var i = t.chain(o).sortBy(function(e) { + return e.title.toLowerCase() + }).reduce(function(e, n) { + return e + "" + t.template(g, { + fileDesc: n, + selectedFileDesc: h + }) + " " + }, "").value(); + i = ' ", p.innerHTML = i + }, 50); + l.onFileSelected = function(e) { + h = e, v() + }, l.onFileCreated = v, l.onFileDeleted = v, l.onTitleChanged = v, l.onSyncExportSuccess = v, l.onSyncRemoved = v, l.onNewPublishSuccess = v, l.onPublishRemoved = v, l.onFoldersChanged = v; + var b, y = ""; + return l.onReady = function() { + c = document.querySelector(".document-panel"), b = c.querySelector(".panel-content"), u = c.querySelector(".document-list"), d = e(u), p = c.querySelector(".document-list-filtered"), f = e(p), e(c).on("show.layout.toggle", function() { + var t = h.folder; + void 0 !== t && e(c.querySelector(".file-list." + t.folderIndex.replace(".", ""))).collapse("show") + }).on("shown.layout.toggle", function() { + var e = u.querySelector(".file.active"); + e && (b.scrollTop += e.getBoundingClientRect().top - 240) + }).on("hidden.layout.toggle", function() { + t.val(""), a("") + }).on("click", ".file", function() { + var t = e(this), + n = o[t.data("fileIndex")]; + n && n !== h && s.selectFile(n) + }); + var t = e(c.querySelector(".search-bar .form-control")); + t.bind("propertychange keyup input paste", function() { + a(t.val()) + }) + }, l +}), define("extensions/documentManager", ["jquery", "underscore", "constants", "utils", "storage", "classes/Extension", "classes/FolderDescriptor", "folderList", "fileSystem"], function(e, t, n, i, r, o, a, s, l) { + function c() { + D = [], I = [], t.each(v.querySelectorAll('input[type="checkbox"]:checked'), function(t) { + var n = e(t.parentNode.parentNode), + i = s[n.data("folderIndex")], + r = l[n.data("fileIndex")]; + void 0 !== i ? D.push(i) : void 0 !== r && I.push(r) + }) + } + + function u() { + if(0 === t.size(I)) return void d(); + var n = t.chain(I).sortBy(function(e) { + return e.title.toLowerCase() + }).reduce(function(e, n) { + return e + t.template(_, { + fileDesc: n + }) + }, "").value(); + b.innerHTML = '' + n + "
", e(g.querySelectorAll(".document-list")).addClass("hide"), e(g.querySelectorAll(".confirm-delete, .selected-document-list")).removeClass("hide") + } + + function d() { + t.each(I, function(e) { + e.folder && e.folder.removeFile(e), p.deleteFile(e) + }), t.each(D, function(e) { + i.removeIndexFromArray("folder.list", e.folderIndex), delete s[e.folderIndex] + }), h.onFoldersChanged() + } + var p, f = new o("documentManager", "Document Manager", !1, !0); + f.onFileMgrCreated = function(e) { + p = e + }; + var h; + f.onEventMgrCreated = function(e) { + h = e + }; + var m, g, v, b, y, x, w, S, C, T = ['', '', '', '', '<%= _.size(folderDesc.fileList) %>', '', "<%= folderDesc.name %>", '', '<%= fileListHtml %>'].join(""), + E = ['', '', '', '', ' '].join(""), + k = ['', '<%= fileDesc.composeTitle() %>', '<%= _.size(folderDesc.fileList) %>', '', "<%= folderDesc.name %>"].join(""), + _ = ['', ' '].join(""), + I = [], + D = [], + N = t.debounce(function() { + c(), y.toggleClass("disabled", 0 === t.size(s) || 0 === t.size(I)), x.toggleClass("disabled", 0 === t.size(D) && 0 === t.size(I)) + }, 50), + L = t.debounce(function() { + if(m !== !1) { + N(), S.text(t.size(l)), C.text(t.size(s) + 1), w = t.filter(l, function(e) { + return void 0 === e.folder + }); + var e = ['', '', '<%= fileDesc.composeTitle() %>', t.size(w), "", '', "ROOT folder"].join(""), + n = t.chain(w).sortBy(function(e) { + return e.title.toLowerCase() + }).reduce(function(e, n) { + return e + t.template(E, { + fileDesc: n + }) + }, "").value(); + n = n && ' ", e += '' + n + "", t.chain(s).sortBy(function(e) { + return e.name.toLowerCase() + }).each(function(n) { + var i = t.chain(n.fileList).sortBy(function(e) { + return e.title.toLowerCase() + }).reduce(function(e, n) { + return e + t.template(E, { + fileDesc: n + }) + }, "").value(); + i = i && ' ", e += t.template(T, { + folderDesc: n, + fileListHtml: i, + id: n.folderIndex.replace(".", "") + }) + }), v.innerHTML = e + } + }, 50); + return f.onFileCreated = L, f.onFileDeleted = L, f.onSyncExportSuccess = L, f.onSyncRemoved = L, f.onNewPublishSuccess = L, f.onPublishRemoved = L, f.onFoldersChanged = L, f.onTitleChanged = function(t) { + m !== !1 && (e(v).find('[data-file-index="' + t.fileIndex + '"] .name').html(t.composeTitle()).removeClass("hide"), e(v.querySelectorAll(".input-rename")).addClass("hide")) + }, f.onReady = function() { + g = document.querySelector(".modal-document-manager"), v = g.querySelector(".list-group.document-list"), S = e(g.querySelectorAll(".document-count")), C = e(g.querySelectorAll(".folder-count")), b = g.querySelector(".list-group.selected-document-list"); + var o = g.querySelector(".list-group.select-folder-list"); + e(g).on("show.bs.modal", function() { + m = !0, L(), setTimeout(function() { + e(v.querySelectorAll(".root-folder")).click() + }, 250) + }).on("hide.bs.modal", function() { + m = !1, v.innerHTML = "" + }), e(g.querySelectorAll(".action-create-folder")).click(function() { + var o; + do o = "folder." + i.randomString(); while (t.has(s, o)); + r[o + ".name"] = n.DEFAULT_FOLDER_NAME; + var l = new a(o, n.DEFAULT_FOLDER_NAME); + i.appendIndexToArray("folder.list", o), s[o] = l, h.onFoldersChanged(), setTimeout(function() { + var t = e(g.querySelector('[data-folder-index="' + o + '"] .button-rename')).click(); + g.scrollTop += t.offset().top - 50 + }, 60) + }), e(g.querySelectorAll(".action-select-all")).click(function() { + e(v.querySelectorAll('input[type="checkbox"]')).prop("checked", !0).change() + }), e(g.querySelectorAll(".action-unselect-all")).click(function() { + e(v.querySelectorAll('input[type="checkbox"]')).prop("checked", !1).change() + }); + var p = e(g.querySelectorAll(".action-delete-items")).click(function() { + x.hasClass("disabled") || (c(), u()) + }); + x = p.parent(), e(g.querySelectorAll(".action-delete-items-confirm")).click(function() { + d(), e(g.querySelectorAll(".document-list")).removeClass("hide"), e(g.querySelectorAll(".confirm-delete, .selected-document-list")).addClass("hide") + }); + var f = e(g.querySelectorAll(".action-move-items")).click(function() { + if(!y.hasClass("disabled")) { + c(); + var n = ['', '', t.size(w), "", '', "ROOT folder"].join(""); + n += t.chain(s).sortBy(function(e) { + return e.name.toLowerCase() + }).reduce(function(e, n) { + return e + t.template(k, { + folderDesc: n + }) + }, "").value(), o.innerHTML = n, t.each(o.querySelectorAll(".folder"), function(n) { + n = e(n), n.click(function() { + var i = s[n.data("folderIndex")]; + t.each(I, function(e) { + e.folder && e.folder.removeFile(e), i && i.addFile(e) + }), h.onFoldersChanged(), e(g.querySelectorAll(".document-list")).removeClass("hide"), e(g.querySelectorAll(".choose-folder, .select-folder-list")).addClass("hide") + }) + }), e(g.querySelectorAll(".document-list")).addClass("hide"), e(g.querySelectorAll(".choose-folder, .select-folder-list")).removeClass("hide") + } + }); + y = f.parent(), e(g.querySelectorAll(".action-cancel")).click(function() { + e(g.querySelectorAll(".document-list")).removeClass("hide"), e(g.querySelectorAll(".confirm-delete, .choose-folder, .selected-document-list, .select-folder-list")).addClass("hide") + }), e(v).on("click", ".button-delete", function(t) { + t.stopPropagation(); + var n = e(this), + i = n.parent(), + r = s[i.data("folderIndex")], + o = l[i.data("fileIndex")]; + I = [], D = [], r ? (D.push(r), I = r.fileList) : o && I.push(o), u() + }).on("click", ".button-rename", function(t) { + t.stopPropagation(); + var n, i = e(this.parentNode), + r = s[i.data("folderIndex")], + o = l[i.data("fileIndex")]; + r ? n = r.name : o && (n = o.title), i.find(".name").addClass("hide"), i.find(".input-rename").removeClass("hide").val(n)[0].select() + }).on("blur keyup", ".input-rename", function(t) { + function n() { + var t = i.parent(), + n = e.trim(i.val()), + r = s[t.data("folderIndex")], + o = l[t.data("fileIndex")]; + n && r && n != r.name ? (r.name = n, h.onFoldersChanged()) : n && o && n != o.title ? (o.title = n, h.onTitleChanged(o)) : (i.addClass("hide"), t.find(".name").removeClass("hide")) + } + var i = e(this); + void 0 === t.keyCode ? n() : 13 == t.keyCode ? (n(), t.stopPropagation()) : 27 == t.keyCode && (i.val(""), n(), t.stopPropagation()) + }).on("click", ".file .checkbox", function(e) { + e.stopPropagation() + }).on("change", ".file .checkbox input", function() { + e(this).parents(".file-list").prev().find(".checkbox input").prop("checked", !1), N() + }).on("click", ".folder .checkbox", function(e) { + e.stopPropagation() + }).on("change", ".folder .checkbox input", function() { + e(this).parents(".folder").next().find(".checkbox input").prop("checked", this.checked), N() + }) + }, f +}), define("extensions/workingIndicator", ["jquery", "underscore", "crel", "classes/Extension"], function(e, t, n, i) { + var r, o, a = new i("workingIndicator", "Working Indicator"), + s = ["@<%= prefix %>keyframes <%= name %> {", " 0% { opacity:<%= z %>; }", " <%= start %>.01% { opacity:<%= alpha %>; }", " <%= start %>.02% { opacity:1; }", " <%= ((start + trail) % 100) %>.01% { opacity:<%= alpha %>; }", " 100% { opacity:<%= z %>; }", "}"].join("\n"); + return a.onAsyncRunning = function(e) { + r.toggleClass("working", e), o.toggleClass("hide", !e) + }, a.onReady = function() { + function i(e) { + e.z = Math.max(1 - (1 - e.alpha) / e.trail * (100 - e.start), e.alpha), a += t.template(s, t.extend({ + prefix: "" + }, e)), a += t.template(s, t.extend({ + prefix: "-webkit-" + }, e)) + } + var a = ""; + r = e(document.body), o = e(''), e(".working-indicator").append(o); + for(var l = 0; 3 > l; l++) { + var c = "working-indicator-bar" + l; + i({ + name: c, + alpha: .25, + start: 20 * l, + trail: 50 + }); + var u = c + " 0.7s linear infinite"; + o.append(e('