diff --git a/EnlighterJS/.gitignore b/EnlighterJS/.gitignore new file mode 100644 index 0000000..e2df200 --- /dev/null +++ b/EnlighterJS/.gitignore @@ -0,0 +1,9 @@ +.settings* +.idea/* +.project +.credentials* +gfx/* +PublicHtml/* +node_modules* +.tmp* +intern_* \ No newline at end of file diff --git a/EnlighterJS/Build/EnlighterJS.css b/EnlighterJS/Build/EnlighterJS.css new file mode 100644 index 0000000..b3f33c8 --- /dev/null +++ b/EnlighterJS/Build/EnlighterJS.css @@ -0,0 +1,2271 @@ +/*! EnlighterJS Syntax Highlighter 2.10.0 | MIT License (X11) | http://enlighterjs.org/ | November 17 2015 *//* +--- +description: EnlighterJS Theme-Base - All Themes are derived from these styles! Don't edit this file if you wan't to change styles! Use a derived theme! + +license: MIT-style + +authors: + - Andi Dittrich +... +*/ +/* Font Classes +----------------------------------------------------------------------------------- */ +/* BASE Styles +----------------------------------------------------------------------------------- */ +.EnlighterJS, +.EnlighterJSWrapper { + font-family: "Source Code Pro", "Liberation Mono", "Courier New", Courier, monospace; + font-size: 10px; + line-height: 16px; + overflow: auto; + white-space: pre-wrap; + word-wrap: break-word; + margin: 0px; + padding: 0px; +} +/* Wrapper/Container - contains all elements of an instance */ +.EnlighterJSWrapper { + position: relative; + /* RAW Styles */ + /* Show Toolbar on Mouseover */ +} +.EnlighterJSWrapper pre { + font-family: inherit; + background-color: #ffffff; + padding: 5px 5px 5px 10px; + margin: 0px 0px 20px 0px; + line-height: 18px; + font-size: 12px; + color: #444444; + border: none; + border-radius: 0px; + clear: none; + white-space: pre-wrap; + word-wrap: break-word; +} +.EnlighterJSWrapper:hover .EnlighterJSToolbar { + display: block; +} +/* Highlighted Object (List or Span) +----------------------------------------------------------------------------------- */ +.EnlighterJS { + /* Inline specific styles */ + /* LIST specific styles */ + /* Line Number Styles */ + /* default symbol style */ +} +span.EnlighterJS { + padding: 3px 5px 1px 5px; + border: solid 1px #e0e0e0; + color: #333333; + background-color: #f7f7f7; + margin: 0px 2px 0px 2px; +} +ol.EnlighterJS, +ul.EnlighterJS { + display: block; + font-size: 10px; + background-color: #f2f2f2; + color: #939393; + margin: 0px 0px 20px 0px; + padding: 0px; + text-indent: 0px; + list-style: none; + /* line styles */ +} +ol.EnlighterJS li, +ul.EnlighterJS li { + margin: 0px; + background-color: #ffffff; + border: solid 0px #ffffff; + padding: 0px 5px 0px 14px; + line-height: 14px; + color: #939393; + list-style: none; + font-size: inherit; + /* special line highlight color */ + /* top+bottom offsets */ +} +ol.EnlighterJS li .specialline, +ul.EnlighterJS li .specialline { + background-color: #F4F8FC; +} +ol.EnlighterJS li:FIRST-CHILD, +ul.EnlighterJS li:FIRST-CHILD { + padding-top: 5px; +} +ol.EnlighterJS li:LAST-CHILD, +ul.EnlighterJS li:LAST-CHILD { + padding-bottom: 5px; +} +ol.EnlighterJS li:AFTER, +ul.EnlighterJS li:AFTER { + content: ' '; +} +ol.EnlighterJS li { + list-style: decimal-leading-zero outside; + margin-left: 40px; + padding-left: 20px; +} +.EnlighterJS span { + color: #000000; + margin: 0px; + padding: 0px; + line-height: inherit; + font-size: 12px; + font-family: inherit; +} +/* TAB Panel - containing "buttons" to switch between multiple codeblocks +----------------------------------------------------------------------------------- */ +.EnlighterJSTabPane { + /* Button List */ +} +.EnlighterJSTabPane .controls ul { + margin: 0px 0px 0px 40px; + padding: 0px; +} +.EnlighterJSTabPane .controls li { + display: inline-block; + list-style: none; + padding: 3px 10px 3px 10px; + margin: 0px 5px 0px 5px; + background-color: #f2f2f2; + border-radius: 5px; + font-size: 12px; + color: #000000; + font-family: inherit; + cursor: pointer; +} +.EnlighterJSTabPane .controls .pane { + padding: 5px 0px 0px 0px; + clear: left; +} +/* Toolbar - containing buttons +----------------------------------------------------------------------------------- */ +.EnlighterJSToolbar { + position: absolute; + display: none; + right: 0px; + top: 0px; + height: 40px; + width: auto; + padding: 15px; + /* Button Container */ +} +.EnlighterJSToolbar > a { + float: right; + display: block; + border-radius: 3px; + z-index: 10; + background-color: #ffffff; + color: #717171; + cursor: pointer; + font-size: 12px; + padding: 0px; + border: solid 1px #e0e0e0; + margin: 0px 0px 0px 8px; + text-decoration: none; + width: 23px; + height: 23px; + background-position: 0px 0px; + background-size: contain; + font-family: inherit; + /* Show Toolbar on MouseOver */ + /* CLear Float Layout */ +} +.EnlighterJSToolbar > a:HOVER { + text-decoration: none; + border-color: #b0b0b0; +} +.EnlighterJSToolbar > a .clear { + clear: right; + content: ' '; + display: block; +} +/* Button Icons */ +.EnlighterJSWindowButton { + background-image: url("data:image/gif;base64,R0lGODlhLgAuAKIAADtJcYuWq6Wxw/L7/9Xz/+z6/////wAAACwAAAAALgAuAAAD02i63P4wykmrvTjrzbv/YCiOZCacaKquace+sOAKRG3feH7Oee/vnJNveANuhLWAcslsOpkYJOFJrQaitGSAyFVibUou0XuRhgmFtHrNXpMt5i26TWe/K/FaHQCoF+4UeXNtfH6AE4J7fXWHEol0hYxXZVlTcoqGk3CVZ5hsA6CNEY98paanoAOiEKSnrnypqw+PhIt0sg60bJG3mnicl5C2bbgNumu8xL6BKZ3CmVgozrXQHNN+vR3X2HbLGNvcasURVuVQ1ubmJevs7e7v8PHy7QkAOw=="); +} +.EnlighterJSRawButton { + background-image: url("data:image/gif;base64,R0lGODlhLgAuALMAADtJcez6/////7e3t6urq52dnXt7e3p6enFxcW1tbWdnZ2VlZQAAAAAAAAAAAAAAACwAAAAALgAuAAAE4lDISau9OOvNu/9gKI5kaZ6Zoa5sy6KTK7uwNN9qLahB7/+/gjCH4gGPPWGBeDICntBoj0AdGpqGXnQLmFaXV5MRCaQSrKfDgXwcuL/qA0nNBroHcPV8Xe/rR3R9dX8iCAiCdYYkhohsiiOMjUiPhYeSR5QhkVycUj2ZIJudnT6gH5GXP6YeCQmpQK0kra8/sSOzAaNdbLYiuLp1vSG4tAHCIAoKxT3JJMnLAc0jz8vSItS6nD7WIQsLWtlbPt4k3tDkI+bL6CLqxezd3vLz9PX05fb5+gs6/f7/AAMKHEgQQwQAOw=="); +} +.EnlighterJSInfoButton { + background-image: url("data:image/gif;base64,R0lGODlhLgAuALMAAL7C0MvO2aSqvbG2xjtJcUhVelVhhGJtjYmSqtjb4/Lz9m96l3yGoJaes+Xn7P///ywAAAAALgAuAAAEqvDJSau9OOvNu/9gKI5kaZ5o6ilB675wkKhSQNx4rhMN/Qi7IG7gQwiFAd/hGPQ9doeFdDpl+BI7pwagM2gzwJz1e1noBOSLQQdIW3Yz98Smo9oRzjATt3A29jloPmaAN0Q+BYU3cSoOOzEvTnQ4BXIUejd9lhJGOT2bD0s5h5uPoFg6oA9cOQWQLg4+mIBtNISKjClrigROvASaKpOFeKrGx8jJysvMzcgRADs="); +} +/* +--- +description: EnlighterJS standard style - Inspired by GitHub & Bootstrap colors; + +license: MIT-style X11 + +authors: + - Andi Dittrich + +styles: + base: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 12px + color: '#000000' + line: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 11px + line-height: 16px + color: '#aaaaaa' + raw: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 12px + line-height: 18px + color: '#717171' + background-color: '#ffffff' + hover: + background-color: '#fffcd3' + specialline: + background-color: '#fdf5f0' +... +*/ + +/* Inline specific styles */ +span.enlighterEnlighterJS{ + border-radius: 3px; + background-color: #fafafa; +} + +/* LIST specific styles */ +ol.enlighterEnlighterJS, ul.enlighterEnlighterJS, .enlighterEnlighterJSWrapper pre{ + font-size: 11px; + color: #939393; + border-radius: 8px; + border: solid 1px #e0e0e0; + background-color: #f9f9f9; +} + +/* line styles */ +ol.enlighterEnlighterJS li, ul.enlighterEnlighterJS li{ + border: solid 0px #ffffff; + padding: 1px 5px 1px 14px; + line-height: 16px; + color: #aaaaaa; +} +ol.enlighterEnlighterJS li{ + list-style: decimal outside; + border-left: 1px solid #e0e0e0; + padding: 1px 5px 1px 14px; +} + +/* special line highlight color */ +ol.enlighterEnlighterJS li.specialline, ul.enlighterEnlighterJS li.specialline { + background-color: #fdf5f0; +} + +/* hover effect */ +ol.enlighterEnlighterJS.hoverEnabled li:hover, ul.enlighterEnlighterJS.hoverEnabled li:hover { + background-color: #fffcd3; + border: solid 0px #ffffff; + color: #444444; +} +ol.enlighterEnlighterJS.hoverEnabled li:hover{ + border-left: 1px solid #e0e0e0; +} + +/* symbol styles */ +.enlighterEnlighterJS .de1 { color: #CF6A4C; } +.enlighterEnlighterJS .de2 { color: #CF6A4C; } +.enlighterEnlighterJS .kw1 { color: #286491; font-weight:bold; } +.enlighterEnlighterJS .kw2 { color: #4da0d2; } +.enlighterEnlighterJS .kw3 { color: #445588; } +.enlighterEnlighterJS .kw4 { color: #990073; } +.enlighterEnlighterJS .co1 { color: #9999aa; } +.enlighterEnlighterJS .co2 { color: #9999aa; } +.enlighterEnlighterJS .st0 { color: #dd1144; } +.enlighterEnlighterJS .st1 { color: #dd1144; } +.enlighterEnlighterJS .st2 { color: #dd1144; } +.enlighterEnlighterJS .nu0 { color: #009999; } +.enlighterEnlighterJS .me0 { color: #0086b3; } +.enlighterEnlighterJS .me1 { color: #0086b3; } +.enlighterEnlighterJS .br0 { color: #777; } +.enlighterEnlighterJS .sy0 { color: #777; } +.enlighterEnlighterJS .es0 { color: #777; } +.enlighterEnlighterJS .re0 { color: #009926; } + +/* Tab Panel */ +.enlighterEnlighterJSTabPane .controls{ + border-radius: 8px 8px 0px 0px; + background-color: #f9f9f9; + border: solid 1px #e0e0e0; + border-bottom-width: 0px; + padding: 5px; +} +.enlighterEnlighterJSTabPane .controls li { + border-radius: 4px; + border: solid 1px #e0e0e0; + font-size: 12px; + color: #000000; + background-color: transparent; + cursor: pointer; +} +.enlighterEnlighterJSTabPane .controls li:hover { + background-color: transparent; +} +.enlighterEnlighterJSTabPane .controls .selected,.enlighterEnlighterJSTabPane .controls .selected:hover{ + background-color: #e5e5e5; + color: #000000; + border-color: #c9c9c9; +} +.enlighterEnlighterJSTabPane .enlighterEnlighterJS, .enlighterEnlighterJSTabPane pre{ + border-radius: 0px 0px 8px 8px; +} +.enlighterEnlighterJSTabPane .pane{ + padding: 0px; +} + +/* Raw Code Pane */ +.enlighterEnlighterJSWrapper pre{ + background-color: #ffffff; + font-size: 12px; + color: #717171; +} + +/* Raw Button */ +.enlighterEnlighterJSWrapper .EnlighterJSRawButton{ + border-radius: 3px; + background-color: #f7f7f7; +}/* +--- +description: Godzilla - Inspired by MDN colors + +license: MIT-style X11 + +authors: + - Andi Dittrich + +styles: + base: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 14px + color: '#2b333a' + line: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 11px + line-height: 19px + color: '#f7f7f7' + raw: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 14px + line-height: 21px + color: '#2b333a' + background-color: '#f7f7f7' + hover: + background-color: '#f0f0f1' + specialline: + background-color: 'transparent' +... +*/ + +/* Inline specific styles */ +span.godzillaEnlighterJS{ + background-color: #f7f7f7; + border: dotted 1px #e0e0e1; + border-left: solid 2px #4a80b3; +} + +/* LIST specific styles (BLOCK) */ +ol.godzillaEnlighterJS, ul.godzillaEnlighterJS, .godzillaEnlighterJSWrapper pre{ + font-size: 11px; + background-color: #f0f0f1; + border-left: solid 6px #4a80b3; + background-image: url('data:image/gif;base64,R0lGODlhHgAeAJEAAPLz9ezt7vf39wAAACwAAAAAHgAeAAACYYyPqXvi/wCccr5gY3Y1491Z4fRlI3Rem5ByaymurQBT8nuDuM57wA8MCodEQA2V8yRjm6OmZ3G6oKSlrWlFYqlaJffpNWUvxbL5J2WNHenZrL2mxd/znfjLrm/v/Kg+UwAAOw=='); + background-repeat: repeat; + background-position: 0px 0px; + +} +.godzillaEnlighterJSWrapper pre{ + font-size: 14px; + line-height: 21px; + color: #2b333a; +} + +/* line styles */ +ol.godzillaEnlighterJS li, ul.godzillaEnlighterJS li{ + border: solid 0px #ffffff; + line-height: 19px; + color: #2b333a; + background-color: transparent; + padding: 0px 5px 0px 14px; +} +ol.godzillaEnlighterJS li{ + list-style: decimal outside; + color: #9c9ea0; +} + +/* default symbol styles */ +.godzillaEnlighterJS span{ + font-size: 14px; + color: #2b333a; +} +/* Symbol Styles */ +/* Delimiter e.g. */ +.godzillaEnlighterJS .de1 { color: #9b0d5c; font-weight: bold; } +.godzillaEnlighterJS .de2 { color: #9b0d5c; font-weight: bold; } + +/* Laanguage Kewords */ +.godzillaEnlighterJS .kw1 { color: #085789; font-weight: bold; } +.godzillaEnlighterJS .kw2 { color: #4284ae; font-weight: bold; } +.godzillaEnlighterJS .kw3 { color: #4284ae; } +.godzillaEnlighterJS .kw4 { color: #ae42a0; } + +/* Comments */ +.godzillaEnlighterJS .co1 { color: #6b7c8b; } +.godzillaEnlighterJS .co2 { color: #5b7c9c; } + +/* Strings */ +.godzillaEnlighterJS .st0 { color: #5e860f; } +.godzillaEnlighterJS .st1 { color: #5e860f; } +.godzillaEnlighterJS .st2 { color: #5e860f; } + +/* Numbers */ +.godzillaEnlighterJS .nu0 { color: #9b0d5c; } + +.godzillaEnlighterJS .me0 { color: #d0284a; } +.godzillaEnlighterJS .me1 { color: #d0284a; } + +/* Brackets */ +.godzillaEnlighterJS .br0 { color: #35434c; } + +/* Symbols */ +.godzillaEnlighterJS .sy0 { color: #35434c; } + +/* Escape Sequences */ +.godzillaEnlighterJS .es0 { } + +/* Regular Expression outside Strings */ +.godzillaEnlighterJS .re0 { color: #d2901d} + +/* hover effect */ +ol.godzillaEnlighterJS.hoverEnabled li:hover, ul.godzillaEnlighterJS.hoverEnabled li:hover { + background-color: #f0f0f1; +} +/* special line highlight color */ +ol.godzillaEnlighterJS li.specialline, ul.godzillaEnlighterJS li.specialline { + border-left: solid 5px #9b0d5c; + background-color: transparent; +} + +/* Tab Pane */ +.godzillaEnlighterJSTabPane .controls{ + background-color: #4a80b3; + padding: 5px 0px 5px 0px; +} +.godzillaEnlighterJSTabPane .controls ul{ + margin-left: 10px; +} +.godzillaEnlighterJSTabPane .controls li{ + border-radius: 0px; + background-color: transparent; + line-height: 20px; + font-size: 14px; + color: #f0f0f0; +} +.godzillaEnlighterJSTabPane .controls li:hover { + +} +.godzillaEnlighterJSTabPane .controls li.selected{ + background-color: #00417f; +}/* +--- +description: Beyond-Technology Theme - Inspired by GitHub & Bootstrap colors; + +license: MIT-style X11 + +authors: + - Andi Dittrich + +styles: + base: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 12px + color: '#000000' + line: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 11px + line-height: 18px + color: '#aaaaaa' + raw: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 13px + line-height: 20px + color: '#333333' + background-color: '#f7f7fa' + hover: + background-color: '#ffffe0' + specialline: + background-color: '#fff0f0' +... +*/ + +/* Inline specific styles */ +span.beyondEnlighterJS{ + border-radius: 3px; + background-color: #f7f7fa; + border: dotted 1px #e2e2e8; +} + +/* LIST specific styles */ +ol.beyondEnlighterJS, ul.beyondEnlighterJS, .beyondEnlighterJSWrapper pre{ + font-size: 11px; + color: #333333; + background-color: #f7f7fa; + border-radius: 5px; + border: solid 2px #e2e2e8; + padding: 10px 10px 10px 5px; +} + +/* line styles */ +ol.beyondEnlighterJS li, ul.beyondEnlighterJS li{ + border: solid 0px #ffffff; + padding: 1px 5px 1px 10px; + line-height: 18px; + color: #aaaaaa; + background-color: #f7f7fa; + margin-left: 0px; +} +ol.beyondEnlighterJS li:FIRST-CHILD, ol.beyondEnlighterJS li:LAST-CHILD{ + padding-top: 0px; + padding-bottom: 0px; +} + +ol.beyondEnlighterJS li{ + list-style: decimal inside; + border-left: 0px solid #e0e0e0; + padding: 1px 5px 1px 15px; +} + + +/* special line highlight color */ +ol.beyondEnlighterJS li.specialline, ul.beyondEnlighterJS li.specialline { + background-color: #ffffff; +} + +/* hover effect */ +ol.beyondEnlighterJS.hoverEnabled li:hover, ul.beyondEnlighterJS.hoverEnabled li:hover { + background-color: #ffffff; + border: solid 0px #ffffff; + color: #444444; +} + +.beyondEnlighterJS span{ + font-size: 13px; + color: #2f3235; +} + +/* symbol styles */ +.beyondEnlighterJS .de1 { color: #CF6A4C; } +.beyondEnlighterJS .de2 { color: #CF6A4C; } +.beyondEnlighterJS .kw1 { color: #286491; } +.beyondEnlighterJS .kw2 { color: #4da0d2; } +.beyondEnlighterJS .kw3 { color: #445588; } +.beyondEnlighterJS .kw4 { color: #990073; } +.beyondEnlighterJS .co1 { color: #8181a1; } +.beyondEnlighterJS .co2 { color: #8181a1; } +.beyondEnlighterJS .st0 { color: #dd1144; } +.beyondEnlighterJS .st1 { color: #dd1144; } +.beyondEnlighterJS .st2 { color: #049595; } +.beyondEnlighterJS .nu0 { color: #009999; } +.beyondEnlighterJS .me0 { color: #0086b3; } +.beyondEnlighterJS .me1 { color: #0086b3; } +.beyondEnlighterJS .br0 { color: #777; } +.beyondEnlighterJS .sy0 { color: #777; } +.beyondEnlighterJS .es0 { color: #777; } +.beyondEnlighterJS .re0 { color: #009926; } + +/* Tab Panel */ +.beyondEnlighterJSTabPane .controls{ + background-color: transparent; + padding: 5px 5px 0px 5px; +} +.beyondEnlighterJSTabPane .controls ul{ + margin-left: 20px; +} +.beyondEnlighterJSTabPane .controls li { + border-radius: 5px 5px 0px 0px; + border: solid 2px #e2e2e8; + border-bottom-width: 0px; + font-size: 12px; + color: #286491; + font-weight: bold; + background-color: #ffffff; + cursor: pointer; +} +.beyondEnlighterJSTabPane .controls li:hover { + background-color: transparent; +} +.beyondEnlighterJSTabPane .controls .selected,.beyondEnlighterJSTabPane .controls .selected:hover{ + background-color: #e2e2e8; + border-color: #d8d8dd; + color: #505050; +} +.beyondEnlighterJSTabPane .beyondEnlighterJS, .beyondEnlighterJSTabPane pre{ + border-radius: 8px; +} +.beyondEnlighterJSTabPane .pane{ + padding: 0px; +} +/* Raw Code Pane */ +.beyondEnlighterJSWrapper pre{ + background-color: #f7f7fa; + font-size: 13px; + color: #333333; + line-height: 20px; + padding: 15px; +}/* +--- +description: SyntaxHighlighter inspired theme. + +license: MIT Style X11 License + +authors: + - Andi Dittrich + +styles: + base: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 15px + color: '#000000' + background-color: '#f8f8f8' + line: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 14px + line-height: 20px + color: '#505050' + odd: '#ffffff' + even: '#f8f8f8' + raw: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 15px + line-height: 20px + color: '#000000' + background-color: '#ffffff' + hover: + background-color: '#ddf0dd' + specialline: + background-color: '#edf9ec' +... +*/ + +/* line number background */ +ol.classicEnlighterJS, ul.classicEnlighterJS{ + background-color: #f8f8f8; +} +/* borders on top&botton */ +.classicEnlighterJS, .classicEnlighterJSWrapper pre{ + border: 1px solid #e8e8e2; +} + +ol.classicEnlighterJS li, ul.classicEnlighterJS li{ + border: none; + border-left: solid 4px #52ce52; + line-height: 20px; + color: #505050; + font-size: 14px; + background-color: #ffffff; +} +ol.classicEnlighterJS li.even, ul.classicEnlighterJS li.even{ + background-color: #f8f8f8; +} + +/* inlline container style */ +span.classicEnlighterJS{ + background-color: transparent; + border: none; +} + +/* hover color */ +ol.classicEnlighterJS.hoverEnabled li:hover, ul.classicEnlighterJS.hoverEnabled li:hover{ + border: none; + border-left: solid 4px #52ce52; + background-color: #ddf0dd; +} + +/* special line highlight color */ +ol.classicEnlighterJS li.specialline, ul.classicEnlighterJS li.specialline { + background-color: #edf9ec; + border-left-color: #3fa03f; +} + +/* non leading zero */ +ol.classicEnlighterJS li { + color: #000000; + list-style-type: decimal; +} +.classicEnlighterJS span{ + font-size: 15px; +} + +/** Symbol styles */ +.classicEnlighterJS .de2 { background-color: #e0e010; font-weight: bold; } +.classicEnlighterJS .kw1 { color: #066da1; font-weight: bold; } +.classicEnlighterJS .kw2 { color: #404247; font-weight: bold; } +.classicEnlighterJS .kw3 { color: #404247;} +.classicEnlighterJS .kw4 { color: #d53aa9; } +.classicEnlighterJS .co1 { color: #888888; } +.classicEnlighterJS .co2 { color: #888888; } +.classicEnlighterJS .st0 { color: #2d47e6; } +.classicEnlighterJS .st1 { color: #2d47e6; } +.classicEnlighterJS .st2 { color: #d53aa9; font-weight: bold; } +.classicEnlighterJS .nu0 { color: #d53aa9; } +.classicEnlighterJS .me0 { color: #404247; } +.classicEnlighterJS .me1 { color: #404247; } +.classicEnlighterJS .br0 { color: #444444; } +.classicEnlighterJS .sy0 { color: #444444; } +.classicEnlighterJS .es0 { color: #444444; } +.classicEnlighterJS .re0 { color: #009926; } + +/* Raw Code Pane */ +.classicEnlighterJSWrapper pre{ + background-color: #ffffff; + font-size: 15px; + color: #000000; + line-height: 20px; +} + +/* Button Styles */ +.classicEnlighterJSWrapper .EnlighterJSToolbar > a{ + border-radius: 0px; +} + +/* Tab Styles */ +.classicEnlighterJSTabPane .controls{ + background-color: #f8f8f8; + height: 31px; + border: 1px solid #e8e8e2; + border-bottom-width: 0px; +} +.classicEnlighterJSTabPane .controls ul{ + margin: 0px 0px 0px 35px; +} +.classicEnlighterJSTabPane .controls li{ + border-radius: 0px; + font-size: 15px; + background-color: transparent; + line-height: 20px; + padding: 5px 10px 5px 10px; +} +.classicEnlighterJSTabPane .controls li.selected, .classicEnlighterJSTabPane .controls li.selected:hover{ + background-color: #52ce52; + color: #f9f9f9; + font-weight: bold; +} +.classicEnlighterJSTabPane .pane{ + padding: 0px; +} +.classicEnlighterJSTabPane .classicEnlighterJS{ + border-top-width: 0px; +} /* +--- +description: MooTwo - Inspired by mootools.net website (v2) colors + +license: MIT-style X11 + +authors: + - Andi Dittrich + +styles: + base: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 14px + color: '#000000' + line: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 11px + line-height: 18px + color: '#313437' + raw: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 14px + line-height: 22px + color: '#313437' + background-color: '#f0f0f1' + hover: + background-color: '#e9e9e9' + specialline: + background-color: '#e9e9e9' +... +*/ + +/* Inline specific styles */ +span.mootwoEnlighterJS{ + border-radius: 4px; + background-color: #f0f0f1; + border: solid 1px #f0f0f1; +} + +/* LIST specific styles (BLOCK) */ +ol.mootwoEnlighterJS, ul.mootwoEnlighterJS, .mootwoEnlighterJSWrapper pre{ + font-size: 11px; + background-color: #f0f0f1; + border: solid 1px #f0f0f1; + border-radius: 7px; +} +.mootwoEnlighterJSWrapper pre{ + font-size: 14px; + line-height: 22px; + color: #313437; +} + +/* line styles */ +ol.mootwoEnlighterJS li, ul.mootwoEnlighterJS li{ + border: solid 0px #ffffff; + line-height: 18px; + color: #313437; + background-color: #f0f0f1; + padding: 1px 5px 1px 14px; +} +ol.mootwoEnlighterJS li{ + list-style: decimal outside; + color: #9c9ea0; +} + +/* default symbol styles */ +.mootwoEnlighterJS span{ + font-size: 14px; + color: #313437; +} +/* Symbol Styles */ +/* Delimiter e.g. */ +.mootwoEnlighterJS .de1 {} +.mootwoEnlighterJS .de2 {} + +/* Laanguage Kewords */ +.mootwoEnlighterJS .kw1 { color: #b05098; font-weight: bold; } +.mootwoEnlighterJS .kw2 { color: #b05098; } +.mootwoEnlighterJS .kw3 { } +.mootwoEnlighterJS .kw4 { } + +/* Comments */ +.mootwoEnlighterJS .co1 { color: #9c9ea0; } +.mootwoEnlighterJS .co2 { color: #9c9ea0; } + +/* Strings */ +.mootwoEnlighterJS .st0 { color: #83a440; } +.mootwoEnlighterJS .st1 { color: #83a440; } +.mootwoEnlighterJS .st2 { color: #83a440; } + +/* Numbers */ +.mootwoEnlighterJS .nu0 { color: #429bc1; } + +.mootwoEnlighterJS .me0 { color: #666666; } +.mootwoEnlighterJS .me1 { color: #666666; } + +/* Brackets */ +.mootwoEnlighterJS .br0 { color: #909090; } + +/* Symbols */ +.mootwoEnlighterJS .sy0 { color: #864c08; } + +/* Escape Sequences */ +.mootwoEnlighterJS .es0 { } + +/* Regular Expression outside Strings */ +.mootwoEnlighterJS .re0 { } + +/* hover effect */ +ol.mootwoEnlighterJS.hoverEnabled li:hover, ul.mootwoEnlighterJS.hoverEnabled li:hover { + background-color: #e9e9e9; +} +/* special line highlight color */ +ol.mootwoEnlighterJS li.specialline, ul.mootwoEnlighterJS li.specialline { + background-color: #e9e9e9; +} + +/* Tab Pane */ +.mootwoEnlighterJSTabPane .controls{ + background-color: #585b5e; + padding: 10px 0px 10px 0px; + border-radius: 8px; +} +.mootwoEnlighterJSTabPane .controls ul{ + margin-left: 10px; +} +.mootwoEnlighterJSTabPane .controls li{ + border-radius: 0px; + background-color: transparent; + line-height: 20px; + font-size: 15px; + color: #f0f0f0; +} +.mootwoEnlighterJSTabPane .controls li:hover { + +} +.mootwoEnlighterJSTabPane .controls li.selected{ + text-decoration: underline; +}/* +--- +description: Eclipse inspired Theme + +license: MIT-style X11 + +authors: + - Andi Dittrich + +styles: + base: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 13px + color: '#000000' + line: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 11px + line-height: 16px + color: '#787878' + odd: '#ffffff' + even: '#ffffff' + raw: + font-family: "Source Code Pro", "Courier New", Courier, monospace + font-size: 13px + line-height: 18px + color: '#717171' + background-color: '#ffffff' + hover: + background-color: '#e8f2fe' + specialline: + background-color: '#f9f9f9' +... +*/ + +/* Inline specific styles */ +span.eclipseEnlighterJS{ + border-radius: 3px; + background-color: #f8f8f8; + border: solid 0px #ffffff; +} + +/* LIST specific styles */ +ol.eclipseEnlighterJS, ul.eclipseEnlighterJS, .eclipseEnlighterJSWrapper pre{ + font-size: 11px; + color: #939393; + border-radius: 5px; + border: solid 8px #f3f3f3; + background-color: #ffffff; +} + +/* line styles */ +ol.eclipseEnlighterJS li, ul.eclipseEnlighterJS li{ + padding: 1px 5px 1px 14px; + line-height: 16px; + color: #787878; +} +ol.eclipseEnlighterJS li{ + list-style: decimal outside; + border-left: 2px solid #f8f8f8; + padding: 1px 5px 1px 14px; +} + +/* special line highlight color */ +ol.eclipseEnlighterJS li.specialline, ul.eclipseEnlighterJS li.specialline { + background-color: #f9f9f9; + border-left-color: #f0f0f0; +} + +/* hover effect */ +ol.eclipseEnlighterJS.hoverEnabled li:hover, ul.eclipseEnlighterJS.hoverEnabled li:hover { + background-color: #e8f2fe; + color: #444444; +} +ol.eclipseEnlighterJS.hoverEnabled li:hover{ + border-left-color: #e0e0e0; +} + +.eclipseEnlighterJS span{ + font-size: 13px; +} + +/* symbol styles */ +.eclipseEnlighterJS .de1 { color: #3f7f95; } +.eclipseEnlighterJS .de2 { color: #3f7f95; } +.eclipseEnlighterJS .kw1 { color: #3f7f95; font-weight: bold; } +.eclipseEnlighterJS .kw2 { color: #7f007f; font-weight: bold; } +.eclipseEnlighterJS .kw3 { color: #445588; } +.eclipseEnlighterJS .kw4 { color: #990073; } +.eclipseEnlighterJS .co1 { color: #3f7f5f; } +.eclipseEnlighterJS .co2 { color: #3f5fbf; } +.eclipseEnlighterJS .st0 { color: #320fe3; } +.eclipseEnlighterJS .st1 { color: #990073; } +.eclipseEnlighterJS .st2 { color: #3f7f95; } +.eclipseEnlighterJS .nu0 { color: #000000; } +.eclipseEnlighterJS .me0 { color: #000000; } +.eclipseEnlighterJS .me1 { color: #000000; } +.eclipseEnlighterJS .br0 { color: #777; } +.eclipseEnlighterJS .sy0 { color: #777; } +.eclipseEnlighterJS .es0 { color: #777; } +.eclipseEnlighterJS .re0 { color: #009926; } + +/* Tab Panel */ +.eclipseEnlighterJSTabPane .controls{ + background-color: #f3f3f3; + height: 35px; + padding: 8px 0px 0px 20px; + border-radius: 5px 5px 0px 0px; +} +.eclipseEnlighterJSTabPane .controls li { + font-size: 12px; + color: #000000; + background-color: transparent; + cursor: pointer; + padding: 5px 10px 5px 10px; + border-radius: 5px 5px 0px 0px; +} +.eclipseEnlighterJSTabPane .controls li:hover { + background-color: transparent; +} +.eclipseEnlighterJSTabPane .controls .selected,.eclipseEnlighterJSTabPane .controls .selected:hover{ + background-color: #ffffff; + color: #000000; + border-color: #c9c9c9; +} +.eclipseEnlighterJSTabPane .eclipseEnlighterJS, .eclipseEnlighterJSTabPane pre{ + border-top-width: 0px; +} +.eclipseEnlighterJSTabPane .pane{ + padding: 0px; +} +.eclipseEnlighterJSTabPane ol.eclipseEnlighterJS, .eclipseEnlighterJSTabPane ul.eclipseEnlighterJS{ + border-radius: 0px 0px 5px 5px; +} +/* Raw Code Pane */ +.eclipseEnlighterJSWrapper pre{ + background-color: #ffffff; + font-size: 13px; + color: #717171; +} +.eclipseEnlighterJSTabPane .EnlighterJSToolbar{ + padding: 7px 15px 0px 0px; +}/* +--- +description: Droide Theme + +license: MIT-style X11 + +authors: + - Andi Dittrich + +styles: + base: + font-family: Consolas, "Source Code Pro", "Liberation Mono", "Courier New", Courier, monospace + font-size: 13px + color: '#404141' + line: + font-family: Consolas, "Source Code Pro", "Liberation Mono", "Courier New", Courier, monospace + font-size: 11px + line-height: 18px + color: '#707070' + raw: + font-family: Consolas, "Source Code Pro", "Liberation Mono", "Courier New", Courier, monospace + font-size: 13px + line-height: 18px + color: '#404141' + background-color: '#f7f7f9' + hover: + background-color: '#fae9d9' + specialline: + background-color: '#fae9d9' +... +*/ +.droideEnlighterJS, .droideEnlighterJSWrapper{ + font-family: Consolas, "Source Code Pro", "Liberation Mono", "Courier New", Courier, monospace; +} +/* Inline specific styles */ +span.droideEnlighterJS{ + background-color: #f7f7f9; + border: solid 1px #e0e0e0; +} + +/* LIST specific styles */ +ol.droideEnlighterJS, ul.droideEnlighterJS, .droideEnlighterJSWrapper pre{ + font-size: 13px; + color: #404141; + border: solid 1px #e0e0e0; + background-color: #f7f7f9; + paddding: 10px; +} + +/* line styles */ +ol.droideEnlighterJS li, ul.droideEnlighterJS li{ + border: solid 0px #ffffff; + padding: 1px 5px 1px 14px; + line-height: 18px; + color: #707070; + background-color: #f7f7f9; + font-size: 11px; +} +ol.droideEnlighterJS li{ + list-style: decimal outside; + border-left: 1px dashed #e0e0e0; + padding: 1px 5px 1px 14px; +} + +/* special line highlight color */ +ol.droideEnlighterJS li.specialline, ul.droideEnlighterJS li.specialline { + background-color: #fae9d9; + border-left: solid 5px #e07c19; +} + +/* hover effect */ +ol.droideEnlighterJS.hoverEnabled li:hover, ul.droideEnlighterJS.hoverEnabled li:hover { + background-color: #fae9d9; +} +ol.droideEnlighterJS.hoverEnabled li:hover{ + border-left-width: 1px; +} + +.droideEnlighterJS span{ + font-size: 13px; +} +/* symbol styles */ +.droideEnlighterJS .de1 { color: #CF6A4C; } +.droideEnlighterJS .de2 { color: #CF6A4C; } +.droideEnlighterJS .kw1 { color: #12217c; font-weight: bold; } +.droideEnlighterJS .kw2 { color: #6e0d6e; } +.droideEnlighterJS .kw3 { color: #445588; } +.droideEnlighterJS .kw4 { color: #990073; } +.droideEnlighterJS .co1 { color: #086b08; } +.droideEnlighterJS .co2 { color: #086b08; } +.droideEnlighterJS .st0 { color: #961414; } +.droideEnlighterJS .st1 { color: #963f14; } +.droideEnlighterJS .st2 { color: #961414; } +.droideEnlighterJS .nu0 { color: #009999; } +.droideEnlighterJS .me0 { } +.droideEnlighterJS .me1 { } +.droideEnlighterJS .br0 { } +.droideEnlighterJS .sy0 { } +.droideEnlighterJS .es0 { } +.droideEnlighterJS .re0 { color: #009926; } + +/* Tab Panel */ +.droideEnlighterJSTabPane .controls{ + background-color: transparent; + padding: 5px 5px 0px 5px; +} +.droideEnlighterJSTabPane .controls ul{ + margin: 0px; +} +.droideEnlighterJSTabPane .controls li { + border: solid 1px #e0e0e0; + font-size: 12px; + color: #000000; + background-color: transparent; + cursor: pointer; + border-radius: 0px; + border-bottom-width: 0px; + padding-bottom: 5px; + font-weight: bold; +} +.droideEnlighterJSTabPane .controls li:hover { + background-color: transparent; +} +.droideEnlighterJSTabPane .controls .selected,.droideEnlighterJSTabPane .controls .selected:hover{ + background-color: #f7f7f9; + color: #000000; + border-color: #c9c9c9; +} + +.droideEnlighterJSTabPane .pane{ + padding: 0px; +} + +/* Raw Code Pane */ +.droideEnlighterJSWrapper pre{ + background-color: #ffffff; + font-size: 13px; + color: #717171; +} + +/* Raw Button */ +.droideEnlighterJSWrapper .EnlighterJSRawButton{ +}/* +--- +description: Minimal Theme + +license: MIT-style X11 + +authors: + - Andi Dittrich + +styles: + base: + font-family: "Droid Sans Mono", "Courier New", Courier, monospace + font-size: 13px + color: '#2a2a2a' + line: + font-family: "Droid Sans Mono", "Courier New", Courier, monospace + font-size: 10px + line-height: 18px + color: '#a0a0a0' + raw: + font-family: "Droid Sans Mono", "Courier New", Courier, monospace + font-size: 13px + line-height: 18px + color: '#2a2a2a' + background-color: 'transparent' + hover: + background-color: '#f0f0f0' + specialline: + background-color: '#f9f9f9' +... +*/ +.minimalEnlighterJS, .minimalEnlighterJSWrapper{ + font-family: "Droid Sans Mono", "Courier New", Courier, monospace; +} +/* Inline specific styles */ +span.minimalEnlighterJS{ + background-color: transparent; + border: none; +} + +/* LIST specific styles */ +ol.minimalEnlighterJS, ul.minimalEnlighterJS, .minimalEnlighterJSWrapper pre{ + font-size: 13px; + color: #404141; + border-top: solid 3px #e0e0e0; + border-bottom: solid 3px #e0e0e0; + background-color: transparent; + padding: 10px 0px 10px 0px +} + +/* line styles */ +ol.minimalEnlighterJS li, ul.minimalEnlighterJS li{ + border: solid 0px #ffffff; + padding: 1px 5px 1px 0px; + line-height: 18px; + color: #a0a0a0; + background-color: transparent; + font-size: 10px; +} +ol.minimalEnlighterJS li{ + list-style: decimal inside; + padding: 1px 10px 1px 10px; + margin: 0px 0px 0px 0px; +} + +/* special line highlight color */ +ol.minimalEnlighterJS li.specialline, ul.minimalEnlighterJS li.specialline { + background-color: #f9f9f9; +} + +/* hover effect */ +ol.minimalEnlighterJS.hoverEnabled li:hover, ul.minimalEnlighterJS.hoverEnabled li:hover { + background-color: #f0f0f0; +} +ol.minimalEnlighterJS.hoverEnabled li:hover{ +} + +.minimalEnlighterJS span{ + font-size: 13px; + color: #2a2a2a; +} +/* symbol styles */ +.minimalEnlighterJS .de1 { color: #CF6A4C; } +.minimalEnlighterJS .de2 { color: #CF6A4C; } +.minimalEnlighterJS .kw1 { color: #12217c; font-weight: bold; } +.minimalEnlighterJS .kw2 { color: #445588; border-bottom: dotted 1px #445588; } +.minimalEnlighterJS .kw3 { color: #445588; } +.minimalEnlighterJS .kw4 { color: #990073; } +.minimalEnlighterJS .co1 { color: #a0a0a0; } +.minimalEnlighterJS .co2 { color: #a0a0a0; } +.minimalEnlighterJS .st0 { color: #387905; border-bottom: dotted 1px #387905; } +.minimalEnlighterJS .st1 { color: #217908; border-bottom: dotted 1px #387905; } +.minimalEnlighterJS .st2 { color: #217908; } +.minimalEnlighterJS .nu0 { color: #a61d1b; font-weight:bold; } +.minimalEnlighterJS .me0 { color: #12217c; background-color: #e0e0e0;} +.minimalEnlighterJS .me1 { color: #12217c; background-color: #e0e0e0; } +.minimalEnlighterJS .br0 { } +.minimalEnlighterJS .sy0 { } +.minimalEnlighterJS .es0 { } +.minimalEnlighterJS .re0 { color: #996700; border-bottom: solid 1px #996700;} + +/* Tab Panel */ +.minimalEnlighterJSTabPane .controls{ + background-color: transparent; + padding: 5px 5px 0px 5px; +} +.minimalEnlighterJSTabPane .controls ul{ + margin: 0px 0px 5px 0px; +} +.minimalEnlighterJSTabPane .controls li { + font-size: 12px; + color: #000000; + background-color: transparent; + cursor: pointer; + border-radius: 0px; + font-weight: bold; + text-transform: uppercase; + padding: 1px 6px 1px 6px; +} +.minimalEnlighterJSTabPane .controls li:hover { + background-color: transparent; +} +.minimalEnlighterJSTabPane .controls .selected,.minimalEnlighterJSTabPane .controls .selected:hover{ + background-color: #e0e0e0; + color: #2a2a2a; +} + +.minimalEnlighterJSTabPane .pane{ + padding: 0px; +} + +/* Raw Code Pane */ +.minimalEnlighterJSWrapper pre{ + background-color: transparent; + font-size: 13px; + color: #2a2a2a; +} + +/* Raw Button */ +.minimalEnlighterJSWrapper .EnlighterJSRawButton{ +}/* +--- +description: Dracula - Inspired by ATOM default Theme + +license: MIT-style X11 + +authors: + - Andi Dittrich + +styles: + base: + font-family: "Inconsolata", "Consolas", "Source Code Pro", "Courier New", Courier, monospace; + font-size: 17px + color: '#cfd5e0' + line: + font-family: "Inconsolata", "Consolas", "Source Code Pro", "Courier New", Courier, monospace; + font-size: 12px + line-height: 19px + color: '#cfd5e0' + raw: + font-family: "Inconsolata", "Consolas", "Source Code Pro", "Courier New", Courier, monospace; + font-size: 17px + line-height: 22px + color: '#cfd5e0' + background-color: '#272b33' + hover: + background-color: '#2e353e' + specialline: + background-color: '#282e36' +... +*/ + +.atomicEnlighterJS, .atomicEnlighterJSWrapper, .atomicEnlighterJSTabPane{ + font-family: "Inconsolata", "Consolas", "Source Code Pro", "Courier New", Courier, monospace; +} + +/* Inline specific styles */ +span.atomicEnlighterJS{ + background-color: #272b32; + padding: 3px 5px 3px 5px; +} + +/* LIST specific styles (BLOCK) */ +ol.atomicEnlighterJS, ul.atomicEnlighterJS, .atomicEnlighterJSWrapper pre{ + font-size: 12px; + background-color: #272b33; +} +.atomicEnlighterJSWrapper pre{ + font-size: 17px; + line-height: 22px; + color: #cfd5e0; +} + +/* line styles */ +ol.atomicEnlighterJS li, ul.atomicEnlighterJS li{ + border: solid 0px #ffffff; + line-height: 19px; + color: #2b333a; + background-color: transparent; + padding: 0px 10px 0px 10px; +} +ol.atomicEnlighterJS li{ + list-style: decimal inside; + color: #596174; + margin: 0px; +} + +/* default symbol styles */ +.atomicEnlighterJS span{ + font-size: 17px; + color: #cfd5e0; +} +/* Symbol Styles */ +/* Delimiter e.g. */ +.atomicEnlighterJS .de1 { color: #9b0d5c; font-weight: bold; } +.atomicEnlighterJS .de2 { color: #9b0d5c; font-weight: bold; } + +/* Laanguage Kewords */ +.atomicEnlighterJS .kw1 { color: #d171dd; font-weight: bold; } +.atomicEnlighterJS .kw2 { color: #d19252; border-bottom: dotted 1px #d19252;} +.atomicEnlighterJS .kw3 { color: #4284ae; } +.atomicEnlighterJS .kw4 { color: #ae42a0; } + +/* Comments */ +.atomicEnlighterJS .co1 { color: #6b7c8b; } +.atomicEnlighterJS .co2 { color: #5b7c9c; } + +/* Strings */ +.atomicEnlighterJS .st0 { color: #7cc379; } +.atomicEnlighterJS .st1 { color: #7cc379; } +.atomicEnlighterJS .st2 { color: #5e860f; } + +/* Numbers */ +.atomicEnlighterJS .nu0 { color: #D19A66; } + +.atomicEnlighterJS .me0 { color: #4284ae; } +.atomicEnlighterJS .me1 { color: #4284ae; } + +/* Brackets */ +.atomicEnlighterJS .br0 { color: #6b7c8b; font-weight: bold; } + +/* Symbols */ +.atomicEnlighterJS .sy0 { } + +/* Escape Sequences */ +.atomicEnlighterJS .es0 { } + +/* Regular Expression outside Strings */ +.atomicEnlighterJS .re0 { color: #d2901d} + +/* hover effect */ +ol.atomicEnlighterJS.hoverEnabled li:hover, ul.atomicEnlighterJS.hoverEnabled li:hover { + background-color: #2e353e; +} +/* special line highlight color */ +ol.atomicEnlighterJS li.specialline, ul.atomicEnlighterJS li.specialline { + background-color: #282e36; +} + +/* Tab Pane */ +.atomicEnlighterJSTabPane .controls{ + background-color: #121518; + padding: 5px 0px 0px 0px; +} +.atomicEnlighterJSTabPane .controls ul{ + margin-left: 10px; +} +.atomicEnlighterJSTabPane .controls li{ + border-radius: 0px; + background-color: transparent; + line-height: 25px; + font-size: 16px; + font-weight: bold; + color: #f0f0f0; + border-radius: 5px 5px 0px 0px; + text-transform: lowercase; +} +.atomicEnlighterJSTabPane .controls li:hover { + +} +.atomicEnlighterJSTabPane .controls li.selected{ + background-color: #272b33; +}/* +--- +description: Rowhammer Theme + +license: MIT-style X11 + +authors: + - Andi Dittrich + +styles: + base: + font-family: "Ubuntu Mono", "Source Code Pro", "Courier New", Courier, monospace; + font-size: 15px + color: '#121212' + line: + font-family: "Ubuntu Mono", "Source Code Pro", "Courier New", Courier, monospace; + font-size: 10px + line-height: 20px + color: '#94a9bf' + raw: + font-family: "Ubuntu Mono", "Source Code Pro", "Courier New", Courier, monospace; + font-size: 15px + line-height: 22px + color: '#2a2a2a' + background-color: 'transparent' + hover: + background-color: '#f0f0f0' + specialline: + background-color: '#f9f9f9' +... +*/ +.rowhammerEnlighterJS, .rowhammerEnlighterJSWrapper, .rowhammerEnlighterJSTabPane{ + font-family: "Ubuntu Mono", "Source Code Pro", "Courier New", Courier, monospace; +} +/* Inline specific styles */ +span.rowhammerEnlighterJS{ + background-color: transparent; + border: none; +} + +/* LIST specific styles */ +ol.rowhammerEnlighterJS, ul.rowhammerEnlighterJS, .rowhammerEnlighterJSWrapper pre{ + font-size: 13px; + color: #404141; + background-color: transparent; + padding: 10px 0px 10px 0px; +} + + +/* line styles */ +ol.rowhammerEnlighterJS li, ul.rowhammerEnlighterJS li{ + border: solid 0px #ffffff; + padding: 1px 5px 1px 0px; + line-height: 20px; + color: #94a9bf; + background-color: transparent; + font-size: 10px; + border-bottom: dotted 1px #e9e9f0; +} +ol.rowhammerEnlighterJS li:nth-of-type(1), ul.rowhammerEnlighterJS li:nth-of-type(1) { + border-top: dotted 1px #e9e9f0; +} + +ol.rowhammerEnlighterJS li{ + list-style: decimal-leading-zero inside; + padding: 1px 10px 1px 10px; + margin: 0px 0px 0px 0px; +} + +/* special line highlight color */ +ol.rowhammerEnlighterJS li.specialline, ul.rowhammerEnlighterJS li.specialline { + background-color: #f9f9f9; +} + +/* hover effect */ +ol.rowhammerEnlighterJS.hoverEnabled li:hover, ul.rowhammerEnlighterJS.hoverEnabled li:hover { + background-color: #f0f0f0; +} +ol.rowhammerEnlighterJS.hoverEnabled li:hover{ +} + +.rowhammerEnlighterJS span{ + font-size: 15px; + color: #121212; +} +/* symbol styles */ +/* Delimiter e.g. */ +.rowhammerEnlighterJS .de1 { color: #9b0d5c; font-weight: bold; } +.rowhammerEnlighterJS .de2 { color: #9b0d5c; font-weight: bold; } + +/* Laanguage Kewords */ +.rowhammerEnlighterJS .kw1 { color: #0077aa; font-weight: bold; border-bottom: dotted 1px #0077aa; } +.rowhammerEnlighterJS .kw2 { color: #0077aa; font-weight: bold; } +.rowhammerEnlighterJS .kw3 { color: #0077aa; } +.rowhammerEnlighterJS .kw4 { color: #ae42a0; } + +/* Comments */ +.rowhammerEnlighterJS .co1 { color: #758697; } +.rowhammerEnlighterJS .co2 { color: #758697; } + +/* Strings */ +.rowhammerEnlighterJS .st0 { color: #639500; border-bottom: dotted 1px #639500; } +.rowhammerEnlighterJS .st1 { color: #639500; } +.rowhammerEnlighterJS .st2 { color: #639500; } + +/* Numbers */ +.rowhammerEnlighterJS .nu0 { color: #9b0d5c; } + +.rowhammerEnlighterJS .me0 { color: #c2415b; font-weight: bold;} +.rowhammerEnlighterJS .me1 { color: #d0284a; font-weight: bold;} + +/* Brackets */ +.rowhammerEnlighterJS .br0 { color: #6b7c8b; font-weight: bold; } + +/* Symbols */ +.rowhammerEnlighterJS .sy0 { color: #35434c; font-weight: bold; } + +/* Escape Sequences */ +.rowhammerEnlighterJS .es0 { } + +/* Regular Expression outside Strings */ +.rowhammerEnlighterJS .re0 { color: #d2901d } + + +/* Tab Panel */ +.rowhammerEnlighterJSTabPane .controls{ + background-color: transparent; + padding: 5px 5px 0px 5px; +} +.rowhammerEnlighterJSTabPane .controls ul{ + margin: 0px 0px 5px 0px; +} +.rowhammerEnlighterJSTabPane .controls li { + font-size: 14px; + color: #758697; + background-color: transparent; + cursor: pointer; + border-radius: 0px; + font-weight: bold; + text-transform: uppercase; + padding: 1px 6px 1px 6px; +} +.rowhammerEnlighterJSTabPane .controls li:hover { + background-color: transparent; +} +.rowhammerEnlighterJSTabPane .controls .selected,.rowhammerEnlighterJSTabPane .controls .selected:hover{ + border-bottom: dotted 1px #758697; + background-color: #f0f0f0; +} + +.rowhammerEnlighterJSTabPane .pane{ + padding: 0px; +} + +/* Raw Code Pane */ +.rowhammerEnlighterJSWrapper pre{ + background-color: transparent; + font-size: 15px; + line-height: 22px; + color: #2a2a2a; +} + +/* Raw Button */ +.rowhammerEnlighterJSWrapper .EnlighterJSRawButton{ +}/* +--- +description: GitHub inspired theme. + +license: MIT-style + +authors: + - Andi Dittrich + - Jose Prado + +styles: + base: + font-family: Courier, monospace + font-size: 12px + color: '#000000' + line: + font-family: Courier, monospace + font-size: 10px + line-height: 16px + color: '#939393' + raw: + font-family: Courier, monospace + font-size: 12px + line-height: 20px + color: '#000000' + background-color: '#ffffff' + hover: + background-color: '#ffffcc' + specialline: + background-color: '#fffff2' +... +*/ + +/* borders on top&botton */ +.gitEnlighterJS, .gitEnlighterJSWrapper pre{ + border: 1px solid #eee; + font-family: Courier, monospace; +} + +/* no line borders */ +ol.gitEnlighterJS li, ul.gitEnlighterJS li{ + border: none; + line-height: 20px; +} + +/* hover color */ +ol.gitEnlighterJS.hoverEnabled li:hover, ul.gitEnlighterJS.hoverEnabled li:hover{ + background-color: #ffffcc; + border: none; +} + +/* special line highlight color */ +ol.gitEnlighterJS li.specialline, ul.gitEnlighterJS li.specialline { + background-color: #fffff2; +} + +/* non leading zero */ +ol.gitEnlighterJS { + list-style-type: decimal; +} + +/** Symbol styles */ +.gitEnlighterJS .de1 { color: #CF6A4C; } +.gitEnlighterJS .de2 { color: #CF6A4C; } +.gitEnlighterJS .kw1 { color: #000; font-weight: bold; } +.gitEnlighterJS .kw2 { color: #0086b3; } +.gitEnlighterJS .kw3 { color: #445588; font-weight: bold; } +.gitEnlighterJS .kw4 { color: #990073; } +.gitEnlighterJS .co1 { color: #999988; font-style: italic; } +.gitEnlighterJS .co2 { color: #999988; font-style: italic; } +.gitEnlighterJS .st0 { color: #dd1144; } +.gitEnlighterJS .st1 { color: #dd1144; } +.gitEnlighterJS .st2 { color: #dd1144; } +.gitEnlighterJS .nu0 { color: #009999; } +.gitEnlighterJS .me0 { color: #0086b3; } +.gitEnlighterJS .me1 { color: #0086b3; } +.gitEnlighterJS .br0 { color: #777; } +.gitEnlighterJS .sy0 { color: #777; } +.gitEnlighterJS .es0 { color: #777; } +.gitEnlighterJS .re0 { color: #009926; } + +/* Raw Code Pane */ +.gitEnlighterJSWrapper pre{ + background-color: #ffffff; + font-size: 12px; + color: #000000; + line-height: 20px; +} +.gitEnlighterJSWrapper .EnlighterJSToolbar > a{ + border-radius: 0px; +} + +/* Tab Styles */ +.gitEnlighterJSTabPane .controls{ + background-color: #f2f2f2; + border: 1px solid #eee; + border-bottom-width: 0px; +} +.gitEnlighterJSTabPane .controls ul{ + margin: 0px 0px 0px 35px; +} +.gitEnlighterJSTabPane .controls li{ + border-radius: 0px; +} +.gitEnlighterJSTabPane .controls li.selected{ + background-color: #e0e0e0; +} +.gitEnlighterJSTabPane .pane{ + padding: 0px; +} +.gitEnlighterJSTabPane .gitEnlighterJS{ + border-top-color: #e0e0e0; +} /* +--- +description: TextMate mocha inspired theme. + +license: MIT-style + +authors: +- Jose Prado +- Andi Dittrich + +styles: + base: + font-family: Monaco, Courier, Monospace + font-size: 12px + color: '#000000' + line: + font-family: Monaco, Courier, Monospace + font-size: 10px + line-height: 16px + color: '#f8f8f8' + raw: + font-family: Monaco, Courier, Monospace + font-size: 12px + line-height: 14px + color: '#e0e0e0' + background-color: '#2D2522' + hover: + background-color: '#423F43' + specialline: + background-color: '#423F43' +... +*/ +.mochaEnlighterJS, .mochaEnlighterJSWrapper{ + font-family: Monaco, Courier, monospace; +} + +.mochaEnlighterJSTabPane .controls li{ + background-color: #e5e5e5; + font-size: 12px; + color: #000000; + border-radius: 0px; +} +.mochaEnlighterJSTabPane .controls .selected, .mochaEnlighterJSTabPane .controls .selected:hover{ + background-color: #BBCCD5; +} + +/* Inline Styles */ +span.mochaEnlighterJS{ + background-color: #2D2522; + border: none; +} + +.mochaEnlighterJS { + color: #f8f8f8; +} +ol.mochaEnlighterJS { + background-color: #BBCCD5; + list-style-type: decimal; +} +ul.mochaEnlighterJS { + background-color: #BBCCD5; +} +ol.mochaEnlighterJS li, ul.mochaEnlighterJS li{ + border: none; + border-left: 2px solid #939393; + background-color: #2D2522; + color: #000000; +} +ol.mochaEnlighterJS.hoverEnabled li:hover, ul.mochaEnlighterJS.hoverEnabled li:hover{ + background-color: #423F43; + border: none; + border-left: 2px solid #939393; +} + +/* special line highlight color */ +ol.mochaEnlighterJS li.specialline, ul.mochaEnlighterJS li.specialline { + background-color: #423F43; +} + +.mochaEnlighterJS span{ + color: #f8f8f8; +} + +/** Symbol Styles */ +.mochaEnlighterJS .de1 { color: #CF6A4C; } +.mochaEnlighterJS .de2 { color: #CF6A4C; } +.mochaEnlighterJS .kw1 { color: #CDA869; } +.mochaEnlighterJS .kw2 { color: #CACD69; } +.mochaEnlighterJS .kw3 { color: #afc4db; } +.mochaEnlighterJS .kw4 { color: #CF6A4C; } +.mochaEnlighterJS .co1 { color: #5F5A60; font-style: italic; } +.mochaEnlighterJS .co2 { color: #5F5A60; font-style: italic; } +.mochaEnlighterJS .st0 { color: #8F9D6A; } +.mochaEnlighterJS .st1 { color: #8F9D6A; } +.mochaEnlighterJS .st2 { color: #DDF2A4; } +.mochaEnlighterJS .nu0 { color: #5B97B5; } +.mochaEnlighterJS .me0 { color: #C5AF75; } +.mochaEnlighterJS .me1 { color: #C5AF75; } +.mochaEnlighterJS .br0 { color: #777; } +.mochaEnlighterJS .sy0 { color: #777; } +.mochaEnlighterJS .es0 { color: #777; } +.mochaEnlighterJS .re0 { color: #B55B8B; } + +/* Raw Code Pane */ +.mochaEnlighterJSWrapper pre{ + background-color: #2D2522; + font-size: 12px; + color: #e0e0e0; + line-height: 14px; + border-left: 2px solid #939393; +} + +/* Tab Pane */ +.mochaEnlighterJSWrapper .EnlighterJSToolbar > a{ + border-radius: 0px; + opacity: 0.8; +} +.mochaEnlighterJSWrapper .EnlighterJSToolbar > a:hover{ + opacity: 1.0; +}/* +--- +description: Inspired by MooTools code coloring. + +license: MIT-style + +authors: + - Jose Prado + - Andi Dittrich + +styles: + base: + font-family: Monaco, Courier, monospace + font-size: 12px + color: '#000000' + line: + font-family: Monaco, Courier, monospace + font-size: 10px + line-height: 16px + color: '#939393' + raw: + font-family: Monaco, Courier, monospace + font-size: 12px + line-height: 16px + color: '#444444' + background-color: '#ffffff' + hover: + background-color: '#F4F8FC' + specialline: + background-color: '#F4F8FC' +... +*/ + +.mootoolsEnlighterJS, .mootoolsEnlighterJSWrapper{ + font-family: Monaco, Courier, monospace; +} + +/* line styles */ +ol.mootoolsEnlighterJS li, ul.mootoolsEnlighterJS li { + border-top: 1px solid #fff; + border-bottom: 1px solid #fff; +} +ol.mootoolsEnlighterJS li{ + border-left: 1px solid #939393; +} + +/* hover effect */ +ol.mootoolsEnlighterJS.hoverEnabled li:hover, ul.mootoolsEnlighterJS.hoverEnabled li:hover{ + border-top: 1px solid #eee; + border-bottom: 1px solid #eee; + background-color: #F4F8FC; +} + +/* theme symbol styles */ +.mootoolsEnlighterJS .de1 {} +.mootoolsEnlighterJS .de2 {} +.mootoolsEnlighterJS .kw1 { color: #1b609a; } +.mootoolsEnlighterJS .kw2 { color: #9a6f1b; } +.mootoolsEnlighterJS .kw3 { color: #784e0c; } +.mootoolsEnlighterJS .kw4 { color: #9a6f1b; } +.mootoolsEnlighterJS .co1 { color: #888888; } +.mootoolsEnlighterJS .co2 { color: #888888; } +.mootoolsEnlighterJS .st0 { color: #489a1b; } +.mootoolsEnlighterJS .st1 { color: #489a1b; } +.mootoolsEnlighterJS .st2 { color: #489a1b; } +.mootoolsEnlighterJS .nu0 { color: #70483d; } +.mootoolsEnlighterJS .me0 { color: #666666; } +.mootoolsEnlighterJS .me1 { color: #666666; } +.mootoolsEnlighterJS .br0 { color: #444444; } +.mootoolsEnlighterJS .sy0 { color: #444444; } +.mootoolsEnlighterJS .es0 { color: #444444; } +.mootoolsEnlighterJS .re0 { color: #784e0c; } + +/* Raw Code Pane */ +.mootoolsEnlighterJSWrapper pre{ + line-height: 16px; +} + +/* Toolbar */ +.mootoolsEnlighterJSTabPane .controls li{ + border-radius: 0px; +} +.mootoolsEnlighterJSTabPane .controls li:hover { + background-color: #e5e5e5; +} + +.mootoolsEnlighterJSTabPane .controls li.selected{ + background-color: #e5e5e5; +}/* +--- +description: Panic Coda inspired theme. + +license: MIT-style + +authors: +- Jose Prado +- Andi Dittrich + +styles: + base: + font-family: Monaco, Courier, monospace + font-size: 12px + color: '#000000' + line: + font-family: Monaco, Courier, monospace + font-size: 10px + line-height: 16px + color: '#939393' + raw: + font-family: Monaco, Courier, monospace + font-size: 12px + line-height: 16px + color: '#000000' + background-color: '#ffffff' + hover: + background-color: '#F4F8FC' + specialline: + background-color: '#F4F8FC' +... +*/ +.panicEnlighterJS, .panicEnlighterJSWrapper{ + font-family: Monaco, Courier, monospace; +} + +.panicEnlighterJSTabPane .controls li{ + background-color: #f2f2f2; +} +.panicEnlighterJSTabPane .controls li:hover{ + background-color: #e5e5e5; +} +.panicEnlighterJSTabPane .controls .selected, .panicEnlighterJSTabPane .controls .selected:hover{ + background-color: #E4F8FC; +} + +/* line styles */ +ol.panicEnlighterJS li, ul.panicEnlighterJS li { + border-top: 1px solid #fff; + border-bottom: 1px solid #fff; +} +ol.panicEnlighterJS li{ + border-left: 1px solid #939393; +} + +/* hover effect */ +ol.panicEnlighterJS.hoverEnabled li:hover, ul.panicEnlighterJS.hoverEnabled li:hover{ + border-top: 1px solid #eee; + border-bottom: 1px solid #eee; + background-color: #F4F8FC; +} + + +/** Symbol styles */ +.panicEnlighterJS .de1 { color: #A00083; } +.panicEnlighterJS .de2 { color: #A00083; } +.panicEnlighterJS .kw1 { color: #9F0050; } +.panicEnlighterJS .kw2 { color: #9F0050; } +.panicEnlighterJS .kw3 { color: #9a6c00; } +.panicEnlighterJS .kw4 { color: #9F0050; } +.panicEnlighterJS .co1 { color: #00721F; font-style: italic; } +.panicEnlighterJS .co2 { color: #00721F; font-style: italic; } +.panicEnlighterJS .st0 { color: #EF7300; } +.panicEnlighterJS .st1 { color: #8A000F; } +.panicEnlighterJS .st2 { color: #8A000F; } +.panicEnlighterJS .nu0 { color: #1600FF; } +.panicEnlighterJS .me0 { color: #00417f; } +.panicEnlighterJS .me1 { color: #00417f; } +.panicEnlighterJS .br0 { color: #000; } +.panicEnlighterJS .sy0 { color: #000; } +.panicEnlighterJS .es0 { color: #000; } +.panicEnlighterJS .re0 { color: #8A000F; } + +/* Raw Code Pane */ +.panicEnlighterJSWrapper pre{ + background-color: #ffffff; + font-size: 12px; + color: #000000; + line-height: 16px; +} +/* Tab Pane */ +.panicEnlighterJSWrapper .EnlighterJSToolbar > a{ + border-radius: 0px; +}/* +--- +description: MacRabbit Espresso inspired theme. + +license: MIT-style + +authors: +- Jose Prado +- Andi Dittrich + +styles: + base: + font-family: Monaco, Courier, Monospace + font-size: 12px + color: '#000000' + line: + font-family: Monaco, Courier, Monospace + font-size: 10px + line-height: 16px + color: '#939393' + raw: + font-family: Monaco, Courier, Monospace + font-size: 12px + line-height: 16px + color: '#000000' + background-color: '#ffffff' + hover: + background-color: '#F4F8FC' + specialline: + background-color: '#F4F8FC' +... +*/ +.tuttiEnlighterJS, .tuttiEnlighterJSWrapper{ + font-family: Monaco, Courier, monospace; +} + +.tuttiEnlighterJSTabPane .controls li{ + background-color: #ffffff; +} +.tuttiEnlighterJSTabPane .controls .selected, .tuttiEnlighterJSTabPane .controls .selected:hover, .tuttiEnlighterJSTabPane .controls li:hover{ + background-color: #F4F8FC; +} + +.tuttiEnlighterJS { + color: #000000; +} +ol.tuttiEnlighterJS { + background-color: #fbfbfb; + list-style-type: decimal; +} +ul.tuttiEnlighterJS { + background-color: #fbfbfb; +} + +span.tuttiEnlighterJS { + background-color: #f9f9f9; + border: none; +} + +ol.tuttiEnlighterJS li, ul.tuttiEnlighterJS li{ + border: none; + line-height: 16px; +} + +ol.tuttiEnlighterJS.hoverEnabled li:hover, ul.tuttiEnlighterJS.hoverEnabled li:hover{ + background-color: #F4F8FC; + color: #000000; + border: none; +} +/* special line highlight color */ +ol.tuttiEnlighterJS li.specialline, ul.tuttiEnlighterJS li.specialline { + background-color: #F4F8FC; +} + +/** Symbol styles */ +.tuttiEnlighterJS .de1 { color: #6eb13f; } +.tuttiEnlighterJS .de2 { color: #6eb13f; } +.tuttiEnlighterJS .kw1 { color: #8600c9; } +.tuttiEnlighterJS .kw2 { color: #3a1d72; font-weight: bold; } +.tuttiEnlighterJS .kw3 { color: #4F9FCF; } +.tuttiEnlighterJS .kw4 { color: #4F9FCF; } +.tuttiEnlighterJS .co1 { color: #bbb; } +.tuttiEnlighterJS .co2 { color: #bbb; } +.tuttiEnlighterJS .st0 { color: #bc670f; background-color: #fffdf7;} +.tuttiEnlighterJS .st1 { color: #bc670f; background-color: #fffdf7;} +.tuttiEnlighterJS .st2 { color: #bc670f; background-color: #fffdf7;} +.tuttiEnlighterJS .nu0 { color: #6700b9; } +.tuttiEnlighterJS .me0 { color: #000; } +.tuttiEnlighterJS .me1 { color: #6eb13f; font-weight: bold; } +.tuttiEnlighterJS .br0 { color: #4f4f4f; } +.tuttiEnlighterJS .sy0 { color: #626fc9; } +.tuttiEnlighterJS .es0 { color: #4f4f4f; } +.tuttiEnlighterJS .re0 { color: #d44950; } + +/* Raw Code Pane */ +.tuttiEnlighterJSWrapper pre{ + background-color: #ffffff; + font-size: 12px; + color: #000000; + line-height: 16px; +} + +/* Tab Pane */ +.tuttiEnlighterJSWrapper .EnlighterJSToolbar > a{ + border-radius: 0px; + opacity: 0.8; + border: none; + width: 21px; + height: 21px; +} +.tuttiEnlighterJSWrapper .EnlighterJSToolbar > a:HOVER{ + opacity: 1.0; +}/* +--- +description: TextMate twilight inspired theme. + +license: MIT-style + +authors: +- Jose Prado +- Andi Dittrich + +styles: + base: + font-family: Monaco, Courier, monospace + font-size: 12px + color: '#f8f8f8' + line: + font-family: Monaco, Courier, monospace + font-size: 10px + line-height: 16px + color: '#939393' + raw: + font-family: Monaco, Courier, monospace + font-size: 12px + line-height: 20px + color: '#f8f8f8' + background-color: '#141414' + hover: + background-color: '#202021' + specialline: + background-color: ' #202021' +... +*/ +.twilightEnlighterJS, .twilightEnlighterJSWrapper{ + font-family: Monaco, Courier, monospace; +} +.twilightEnlighterJSTabPane .controls li{ + background-color: #303030; + font-size: 12px; + color: #f2f2f2; + border-radius: 0px; +} +.twilightEnlighterJSTabPane .controls li:hover{ + color: #8F9657; + background-color: #303030; +} +.twilightEnlighterJSTabPane .controls .selected, .twilightEnlighterJSTabPane .controls .selected:hover{ + background-color: #000000; +} + +/* Inline Styles */ +span.twilightEnlighterJS{ + background-color: #141414; + border: none; +} + +.twilightEnlighterJS span{ + color: #f8f8f8; +} +ol.twilightEnlighterJS { + background-color: #f2f2f2; + list-style-type: decimal; + border: solid 1px #222222; +} +ul.twilightEnlighterJS { + background-color: #f2f2f2; + border: solid 1px #222222; +} +ol.twilightEnlighterJS li, ul.twilightEnlighterJS li{ + border: none; + border-left: 1px solid #939393; + line-height: 19px; + background-color: #141414; +} +ol.twilightEnlighterJS.hoverEnabled li:hover, ul.twilightEnlighterJS.hoverEnabled li:hover{ + background-color: #202021; + border: none; + border-left: 1px solid #939393; +} + +/* special line highlight color */ +ol.twilightEnlighterJS li.specialline, ul.twilightEnlighterJS li.specialline { + background-color: #202021; +} + +/** Symbol styles */ +.twilightEnlighterJS .de1 { color: #fff; } +.twilightEnlighterJS .de2 { color: #fff; } +.twilightEnlighterJS .kw1 { color: #CDA869; } +.twilightEnlighterJS .kw2 { color: #F9EE98; } +.twilightEnlighterJS .kw3 { color: #6F87A8; } +.twilightEnlighterJS .kw4 { color: #E96546; } +.twilightEnlighterJS .co1 { color: #5F5A60; } +.twilightEnlighterJS .co2 { color: #5F5A60; } +.twilightEnlighterJS .st0 { color: #8F9657; } +.twilightEnlighterJS .st1 { color: #8F9657; } +.twilightEnlighterJS .st2 { color: #8F9657; } +.twilightEnlighterJS .nu0 { color: #CF6745; } +.twilightEnlighterJS .me0 { color: #fff; } +.twilightEnlighterJS .me1 { color: #fff; } +.twilightEnlighterJS .br0 { color: #fff; } +.twilightEnlighterJS .sy0 { color: #fff; } +.twilightEnlighterJS .es0 { color: #fff; } +.twilightEnlighterJS .re0 { color: #E57A27; } + +/* Raw Code Pane */ +.twilightEnlighterJSWrapper pre{ + background-color: #141414; + font-size: 12px; + color: #f8f8f8; + line-height: 20px; +} +/* Tab Pane */ +.twilightEnlighterJSWrapper .EnlighterJSToolbar > a{ + border-radius: 0px; + opacity: 0.8; +} +.twilightEnlighterJSWrapper .EnlighterJSToolbar > a:hover{ + opacity: 1.0; +} diff --git a/EnlighterJS/Build/EnlighterJS.js b/EnlighterJS/Build/EnlighterJS.js new file mode 100644 index 0000000..01041b0 --- /dev/null +++ b/EnlighterJS/Build/EnlighterJS.js @@ -0,0 +1,3133 @@ +/*! EnlighterJS Syntax Highlighter 2.10.0 | MIT License (X11) | http://enlighterjs.org/ | November 17 2015 */ +(function() { + /* +--- +name: EnlighterJS +description: Syntax Highlighter based on the famous Lighter.js + +license: MIT-style X11 License + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS] +... + */ + var EJS = window.EnlighterJS = new Class({ + Implements: Options, + options: { + language: "generic", + theme: "Enlighter", + renderer: "Block", + indent: -1, + forceTheme: false, + rawButton: true, + windowButton: true, + infoButton: true, + ampersandCleanup: true, + rawcodeDoubleclick: false + }, + // used renderer instance + renderer: null, + // used codeblock to highlight + originalCodeblock: null, + // used container to store highlighted code + container: null, + // lightning active ? + isRendered: false, + // language alias manager + languageManager: null, + // toggle raw code + rawContentContainer: null, + // rendered output span/ou/ul container + output: null, + // input/output filter + textFilter: null, + // cached code input + rawCode: null, + /** + * @constructs + * @param {Element} originalCodeblock An Element containing code to highlight + * @param {Object} options The options object. + * @param {Element} container (optional) The output container - if not defined, the output will be injected after the originalCodeblock + */ + initialize: function(originalCodeblock, opt, container) { + this.setOptions(opt); + // create new language alias manager instance + this.languageManager = new EJS.LanguageManager(this.options); + // create new coe filter instance + this.textFilter = new EJS.TextFilter(this.options); + // initialize renderer + if (this.options.renderer == "Inline") { + this.renderer = new EJS.Renderer.InlineRenderer(this.options, this.textFilter); + } else { + this.renderer = new EJS.Renderer.BlockRenderer(this.options, this.textFilter); + } + // store codeblock element + this.originalCodeblock = EJS.Dom.id(originalCodeblock); + // store/create container + if (container) { + this.container = EJS.Dom.id(container); + } + }, + /** + * Takes a codeblock and highlights the code inside of it using the + * stored parser/compilers. It reads the class name to figure out what + * language and theme to use for highlighting. + * + * @return {EnlighterJS} The current EnlighterJS instance. + */ + enlight: function(enabled) { + // show highlighted sourcecode ? + if (enabled) { + // get element language + var rawLanguageName = this.originalCodeblock.get("data-enlighter-language"); + // ignore higlighting ? + if (rawLanguageName == "no-highlight") { + return; + } + // hide original codeblock + this.originalCodeblock.setStyle("display", "none"); + // EnlighterJS exists so just toggle display. + if (this.isRendered) { + this.container.setStyle("display", "inherit"); + return this; + } + // get language name - use alias manager to check language string and validate + var languageName = this.languageManager.getLanguage(rawLanguageName); + // get theme name - use options as fallback + var themeName = (this.options.forceTheme ? null : this.originalCodeblock.get("data-enlighter-theme")) || this.options.theme || "Enlighter"; + // special lines to highlight ? + var specialLines = new EJS.SpecialLineHighlighter(this.originalCodeblock.get("data-enlighter-highlight"), this.originalCodeblock.get("data-enlighter-lineoffset")); + // Load language parser + var language = new EJS.Language[languageName](this.getRawCode(true)); + // compile tokens -> generate output + this.output = this.renderer.render(language, specialLines, { + lineOffset: this.originalCodeblock.get("data-enlighter-lineoffset") || null, + lineNumbers: this.originalCodeblock.get("data-enlighter-linenumbers") + }); + // set class and id attributes. + this.output.addClass(themeName.toLowerCase() + "EnlighterJS").addClass("EnlighterJS"); + // add wrapper ? + if (this.options.renderer == "Block") { + // grab content into specific container or after original code block ? + if (!this.container) { + this.container = new EJS.Dom.Element("div"); + // put the highlighted code wrapper behind the original + this.container.inject(this.originalCodeblock, "after"); + } + // add wrapper class + this.container.addClass("EnlighterJSWrapper").addClass(themeName.toLowerCase() + "EnlighterJSWrapper"); + // add the highlighted code + this.container.grab(this.output); + // create raw content container + this.rawContentContainer = new EJS.Dom.Element("pre", { + text: this.getRawCode(false), + styles: { + display: "none" + } + }); + // add raw content container + this.container.grab(this.rawContentContainer); + // show raw code on double-click ? + if (this.options.rawcodeDoubleclick) { + this.container.addEvent("dblclick", function() { + this.toggleRawCode(); + }.bind(this)); + } + // toolbar ? + if (this.options.rawButton || this.options.windowButton || this.options.infoButton) { + this.container.grab(new EJS.UI.Toolbar(this)); + } + } else { + // grab content into specific container or after original code block ? + if (this.container) { + this.container.grab(this.output); + } else { + this.output.inject(this.originalCodeblock, "after"); + this.container = this.output; + } + } + // set render flag + this.isRendered = true; + } else { + // already highlighted ? + if (this.isRendered) { + this.originalCodeblock.setStyle("display", "inherit"); + this.container.setStyle("display", "none"); + } + } + return this; + }, + /** + * Disable highlighting and remove generated DOM + */ + dispose: function() { + // already highlighted ? + if (!this.isRendered) { + return; + } + // restore original codeblock + this.originalCodeblock.setStyle("display", null); + // hide highlighted code + this.container.setStyle("display", "none"); + this.rawContentContainer.setStyle("display", "none"); + // drop dom + this.container.dispose(); + this.rawContentContainer.dispose(); + this.container = null; + this.rawContentContainer = null; + // reset flag + this.isRendered = false; + }, + /** + * Extracts the raw code from given codeblock + * @return {String} The plain-text code (raw) + */ + getRawCode: function(reindent) { + // cached version available ? + var code = this.rawCode; + if (code == null) { + // get the raw content + code = this.originalCodeblock.get("html"); + // remove empty lines at the beginning+end of the codeblock + code = code.replace(/(^\s*\n|\n\s*$)/gi, ""); + // apply input filter + code = this.textFilter.filterInput(code); + // cleanup ampersand ? + if (this.options.ampersandCleanup === true) { + code = code.replace(/&/gim, "&"); + } + // replace html escaped chars + code = code.replace(/</gim, "<").replace(/>/gim, ">").replace(/ /gim, " "); + // cache it + this.rawCode = code; + } + // replace tabs with spaces ? + if (reindent === true) { + // get indent option value + var newIndent = this.options.indent.toInt(); + // re-indent code if specified + if (newIndent > -1) { + // match all tabs + code = code.replace(/(\t*)/gim, function(match, p1, offset, string) { + // replace n tabs with n*newIndent spaces + return new Array(newIndent * p1.length + 1).join(" "); + }); + } + } + return code; + }, + /** + * Hide/Show the RAW Code Container/Toggle Highlighted Code + */ + toggleRawCode: function(show) { + // initialization required! + if (this.output == null) { + return; + } + // argument set ? + if (typeof show != "boolean") { + show = this.rawContentContainer.getStyle("display") == "none"; + } + // toggle container visibility + if (show) { + this.output.setStyle("display", "none"); + this.rawContentContainer.setStyle("display", "block"); + } else { + this.output.setStyle("display", "block"); + this.rawContentContainer.setStyle("display", "none"); + } + }, + /** + * Takes a codeblock and highlights the code inside. The original codeblock is set to invisible + * @DEPRECATED since v2.0 - this method will be removed in the future + * + * @return {EnlighterJS} The current EnlighterJS instance. + */ + light: function() { + return this.enlight(true); + }, + /** + * Unlights a codeblock by hiding the enlighter element if present and re-displaying the original code. + * @DEPRECATED since v2.0 - this method will be removed in the future + * + * @return {EnlighterJS} The current EnlighterJS instance. + */ + unlight: function() { + return this.enlight(false); + } + }); + // register namespaces + EJS.Language = {}; + EJS.Tokenizer = {}; + EJS.Renderer = {}; + EJS.Util = {}; + EJS.UI = {}; + /* +--- +description: Filters the RAW Code from given pre tags + +license: MIT-style + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.TextFilter] +... +*/ + EJS.TextFilter = new Class({ + Implements: Options, + options: { + cryptex: { + enabled: false, + email: "protected.email@example.tld" + } + }, + initialize: function(options) { + this.setOptions(options); + }, + /** + * Apply Filter to text fragments output) + * @param textFragment + */ + filterOutput: function(textFragment) { + return textFragment; + }, + /** + * Apply filter to the input chain (text block) + * @param text + * @returns {*} + */ + filterInput: function(text) { + // apply cryptex email address filter ? + if (this.options.cryptex.enabled === true) { + text = text.replace(//gim, function(match, m1, m2, offset, string) { + if (m2 && m2.length > 2 && typeof window.Cryptex != "undefined") { + return window.Cryptex.decode(m2); + } else { + return this.options.cryptex.email; + } + }.bind(this)); + } + return text; + } + }); + /* +--- +description: EnlighterJS DOM Abstraction Layer (MooTools) + +license: MIT-style X11 License + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Dom] +... + */ + EJS.Dom = { + /** + * Selects a single DOM Eement by given css selector + * @param sel + * @returns + */ + getElement: function(sel) { + return document.getElement(sel); + }, + /** + * Selects a collection of DOM Eöements by given css selector + * @param sel + * @returns + */ + getElements: function(sel) { + return document.getElements(sel); + }, + /** + * Selects an Element by it's ID + * @param elementID + * @returns DOM Element + */ + id: function(elementID) { + return document.id(elementID); + } + }; + /* +--- +description: EnlighterJS DOM Abstraction Layer (MooTools) - Just an Alias for MooTools Element + +license: MIT-style X11 License + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Dom.Element] +... + */ + EJS.Dom.Element = Element; + /* +--- +name: Special Line Highlighter +description: Highlights special lines + +license: MIT-style X11 License + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.SpecialLineHighlighter] +... +*/ + EJS.SpecialLineHighlighter = new Class({ + // storage of line numbers to highlight + specialLines: {}, + /** + * @constructs + * @param {String} html attribute content "highlight" - scheme 4,5,6,10-12,19 + */ + initialize: function(lineNumberString, lineOffsetString) { + // special lines given ? + if (lineNumberString == null || lineNumberString.length == 0) { + return; + } + // line offset available ? + var lineOffset = lineOffsetString != null && lineOffsetString.toInt() > 1 ? lineOffsetString.toInt() - 1 : 0; + // split attribute string into segments + var segments = lineNumberString.split(","); + // iterate over segments + segments.each(function(item, index) { + // pattern xxxx-yyyy + var parts = item.match(/([0-9]+)-([0-9]+)/); + // single line or line-range + if (parts != null) { + // 2 items required + var start = parts[1].toInt() - lineOffset; + var stop = parts[2].toInt() - lineOffset; + // valid range ? + if (stop > start) { + // add lines to storage + for (var i = start; i <= stop; i++) { + this.specialLines["l" + i] = true; + } + } + } else { + // add line to storage + this.specialLines["l" + (item.toInt() - lineOffset)] = true; + } + }.bind(this)); + }, + /** + * Check if the given linenumber is a special line + * @param Integer lineNumber + * @returns {Boolean} + */ + isSpecialLine: function(lineNumber) { + return this.specialLines["l" + lineNumber] || false; + } + }); + /* +--- +description: defines a key/value object with language aliases e.g. javascript -> js + +license: MIT-style + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.LanguageManager] +... +*/ + EJS.LanguageManager = new Class({ + Implements: Options, + options: { + language: "generic" + }, + /** + * @constructs + * @param {Object} options The options object. + */ + initialize: function(options) { + this.setOptions(options); + }, + // map of language aliases + languageAliases: { + standard: "generic", + js: "javascript", + md: "markdown", + "c++": "cpp", + c: "cpp", + styles: "css", + bash: "shell", + py: "python", + html: "xml", + jquery: "javascript", + mootools: "javascript", + "ext.js": "javascript", + "c#": "csharp", + conf: "ini" + }, + // get language name, process aliases and default languages + getLanguage: function(languageName) { + // get default language + var defaultLanguage = this.options.language != null ? this.options.language.trim().toLowerCase() : ""; + // alias available ? + if (this.languageAliases[defaultLanguage]) { + defaultLanguage = this.languageAliases[defaultLanguage]; + } + // default language class available ? + if (defaultLanguage.trim() == "" || !EJS.Language[defaultLanguage]) { + defaultLanguage = "generic"; + } + // valid string ? + if (languageName == null || languageName.trim() == "") { + return defaultLanguage; + } + // "clean" languge name + languageName = languageName.trim().toLowerCase(); + // alias available ? + if (this.languageAliases[languageName]) { + languageName = this.languageAliases[languageName]; + } + // language class available ? + if (EJS.Language[languageName]) { + return languageName; + } else { + return defaultLanguage; + } + } + }); + /* +--- +description: Compiles an array of tokens into inline elements, grabbed into a outer container. + +license: MIT-style X11 + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Renderer.InlineRenderer] +... +*/ + EJS.Renderer.InlineRenderer = new Class({ + Implements: Options, + options: { + inlineContainerTag: "span" + }, + textFilter: null, + initialize: function(options, textFilter) { + this.setOptions(options); + this.textFilter = textFilter; + }, + /** + * Renders the generated Tokens + * + * @param {Language} language The Language used when parsing. + * @param {SpecialLineHighlighter} specialLines Instance to define the lines to highlight + * @return {Element} The renderer output + */ + render: function(language, specialLines, localOptions) { + // create output container element + var container = new EJS.Dom.Element(this.options.inlineContainerTag); + // generate output based on ordered list of tokens + language.getTokens().each(function(token, index) { + // create new inline element which contains the token - htmlspecialchars get escaped by mootools setText ! + container.grab(new EJS.Dom.Element("span", { + "class": token.alias, + text: this.textFilter.filterOutput(token.text) + })); + }, this); + return container; + } + }); + /* +--- +description: Renders the generated Tokens into li-elements, grabbed into a outer ul/ol-container. + +license: MIT-style X11 + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Renderer.BlockRenderer] +... +*/ + EJS.Renderer.BlockRenderer = new Class({ + Implements: Options, + options: { + hover: "hoverEnabled", + oddClassname: "odd", + evenClassname: "even", + showLinenumbers: true + }, + textFilter: null, + initialize: function(options, textFilter) { + this.setOptions(options); + this.textFilter = textFilter; + }, + /** + * Renders the generated Tokens + * + * @param {Language} language The Language used when parsing. + * @param {SpecialLineHighlighter} specialLines Instance to define the lines to highlight + * @return {Element} The renderer output + */ + render: function(language, specialLines, localOptions) { + // elememt shortcut + var _el = EJS.Dom.Element; + // create new outer container element - use ol tag if lineNumbers are enabled. element attribute settings are priorized + var container = null; + if (localOptions.lineNumbers != null) { + container = new _el(localOptions.lineNumbers.toLowerCase() === "true" ? "ol" : "ul"); + } else { + container = new _el(this.options.showLinenumbers ? "ol" : "ul"); + } + // add "start" attribute ? + if ((localOptions.lineNumbers || this.options.showLinenumbers) && localOptions.lineOffset && localOptions.lineOffset.toInt() > 1) { + container.set("start", localOptions.lineOffset); + } + // line number count + var lineCounter = 1; + var tokens = language.getTokens(); + var odd = " " + this.options.oddClassname || ""; + var even = " " + this.options.evenClassname || ""; + // current line element + var currentLine = new _el("li", { + "class": (specialLines.isSpecialLine(lineCounter) ? "specialline" : "") + odd + }); + // output filter + var addFragment = function(className, text) { + currentLine.grab(new _el("span", { + "class": className, + text: this.textFilter.filterOutput(text) + })); + }.bind(this); + // generate output based on ordered list of tokens + Array.each(tokens, function(token) { + // split the token into lines + var lines = token.text.split("\n"); + // linebreaks found ? + if (lines.length > 1) { + // just add the first line + addFragment(token.alias, lines.shift()); + // generate element for each line + Array.each(lines, function(line, lineNumber) { + // grab old line into output container + container.grab(currentLine); + // new line + lineCounter++; + // create new line, add special line classes; add odd/even classes + currentLine = new _el("li", { + "class": (specialLines.isSpecialLine(lineCounter) ? "specialline" : "") + (lineCounter % 2 == 0 ? even : odd) + }); + // create new token-element + addFragment(token.alias, line); + }); + } else { + addFragment(token.alias, token.text); + } + }); + // grab last line into container + container.grab(currentLine); + // highlight lines ? + if (this.options.hover && this.options.hover != "NULL") { + // add hover enable class + container.addClass(this.options.hover); + } + return container; + } + }); + /* +--- +description: Enlighter`s Standard Tokenizer Engine + +license: MIT-style + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [Tokenizer.Standard] +... +*/ + EJS.Tokenizer.Standard = new Class({ + initialize: function() {}, + getTokens: function(language, code) { + // create token object + var token = function(text, alias, index) { + return { + text: text, + alias: alias, + index: index, + length: text.length, + end: text.length + index + }; + }; + // token list + var rawTokens = this.getPreprocessedTokens(token); + // apply each rule to given sourcecode string + Array.each(language.getRules(), function(rule) { + var match; + // find ALL possible matches (also overlapping ones!) + while (match = rule.pattern.exec(code)) { + // overrides the usual regex behaviour of not matching results that overlap + rule.pattern.lastIndex = match.index + 1; + // matching groups used ? + if (match.length == 1) { + rawTokens.push(token(match[0], rule.alias, match.index)); + } else { + // get first matched group + for (var i = 1; i < match.length; i++) { + if (match[i] && match[i].length > 0) { + rawTokens.push(token(match[i], rule.alias, match.index + match[0].indexOf(match[i]))); + } + } + } + } + }); + // sort tokens by index (first occurrence) + rawTokens = rawTokens.sort(function(token1, token2) { + return token1.index - token2.index; + }); + // cleaned token list to render + var tokens = []; + // last token position + var lastTokenEnd = 0; + // iterate over raw token list and retain the first match - drop overlaps + for (var i = 0; i < rawTokens.length; i++) { + // unmatched text between tokens ? + if (lastTokenEnd < rawTokens[i].index) { + // create new start text token + tokens.push(token(code.substring(lastTokenEnd, rawTokens[i].index), "", lastTokenEnd)); + } + // push current token to list + tokens.push(rawTokens[i]); + // store last token position + lastTokenEnd = rawTokens[i].end; + // find next, non overlapping token + var nextTokenFound = false; + for (var j = i + 1; j < rawTokens.length; j++) { + if (rawTokens[j].index >= lastTokenEnd) { + // the "current" token -> i will be incremented in the next loop => j-1 + i = j - 1; + nextTokenFound = true; + break; + } + } + // final position reached ? + if (nextTokenFound === false) { + break; + } + } + // text fragments complete ? or is the final one missing ? + if (lastTokenEnd < code.length) { + tokens.push(token(code.substring(lastTokenEnd), "", lastTokenEnd)); + } + return tokens; + }, + // token pre-processing; can be overloaded by extending class + getPreprocessedTokens: function(token) { + return []; + } + }); + /* +--- +description: XML parser engine for EnlighterJS + +license: MIT-style + +authors: + - Andi Dittrich + - Jose Prado + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Tokenizer.Xml] +... +*/ + EnlighterJS.Tokenizer.Xml = new Class({ + Extends: EnlighterJS.Tokenizer.Standard, + code: null, + /** + * Store code to pre-process XML + */ + getTokens: function(language, code) { + this.code = code; + return this.parent(language, code); + }, + /** + * XML Syntax is preprocessed + */ + getPreprocessedTokens: function(token) { + // token list + var rawTokens = []; + // Tags + attributes matching and preprocessing. + var tagPattern = /((?:\<|<)[A-Z:_][A-Z0-9:.-]*)([\s\S]*?)(\/?(?:\>|>))/gi; + var attPattern = /\b([\w:-]+)([ \t]*)(=)([ \t]*)(['"][^'"]+['"]|[^'" \t]+)/gi; + // tmp storage + var match = null; + var attMatch = null; + var index = 0; + // Create array of matches containing opening tags, attributes, values, and separators. + while ((match = tagPattern.exec(this.code)) != null) { + rawTokens.push(token(match[1], "kw1", match.index)); + while ((attMatch = attPattern.exec(match[2])) != null) { + // Attributes + index = match.index + match[1].length + attMatch.index; + rawTokens.push(token(attMatch[1], "kw2", index)); + // Separators (=) + index += attMatch[1].length + attMatch[2].length; + rawTokens.push(token(attMatch[3], "kw1", index)); + // Values + index += attMatch[3].length + attMatch[4].length; + rawTokens.push(token(attMatch[5], "st0", index)); + } + rawTokens.push(token(match[3], "kw1", match.index + match[1].length + match[2].length)); + } + return rawTokens; + } + }); + /* +--- +name: CodeWindow +description: Opens a new Window with the raw-sourcecode within + +license: MIT-style X11 License + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.UI.CodeWindow] +... +*/ + EJS.UI.CodeWindow = function(code) { + // code "cleanup" + code = code.replace(/&/gim, "&").replace(//gim, ">"); + // open new window + var w = window.open("", "", "width=" + (window.screen.width - 200) + ", height=" + (screen.height - 300) + ", menubar=no, titlebar=no, toolbar=no, top=100, left=100, scrollbars=yes, status=no"); + // insert code + w.document.body.innerHTML = "
" + code + "
"; + w.document.title = "EnlighterJS Sourcecode"; + }; + /* +--- +name: Toolbar +description: Container which contains various buttons + +license: MIT-style X11 License + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.UI.Toolbar] +... +*/ + EJS.UI.Toolbar = new Class({ + Implements: Options, + options: { + toolbar: { + rawTitle: "Toggle RAW Code", + windowTitle: "Open Code in new Window", + infoTitle: "EnlighterJS Syntax Highlighter" + } + }, + // toolbar container + container: null, + initialize: function(enlighterInstance) { + // get options + this.setOptions(enlighterInstance.options); + // create outer container + this.container = new EJS.Dom.Element("div", { + "class": "EnlighterJSToolbar" + }); + // info button ? + if (this.options.infoButton) { + // create window "button" + this.container.grab(new EJS.Dom.Element("a", { + "class": "EnlighterJSInfoButton", + title: this.options.toolbar.infoTitle, + events: { + // open new window on click + click: function() { + window.open("http://enlighterjs.andidittrich.de"); + }.bind(this) + } + })); + } + // toggle button ? + if (this.options.rawButton) { + // create toggle "button" + this.container.grab(new EJS.Dom.Element("a", { + "class": "EnlighterJSRawButton", + title: this.options.toolbar.rawTitle, + events: { + click: function() { + // trigger toggle + enlighterInstance.toggleRawCode(); + }.bind(this) + } + })); + } + // code window button ? + if (this.options.windowButton) { + // create window "button" + this.container.grab(new EJS.Dom.Element("a", { + "class": "EnlighterJSWindowButton", + title: this.options.toolbar.windowTitle, + events: { + // open new window on click + click: function() { + EJS.UI.CodeWindow(enlighterInstance.getRawCode(false)); + }.bind(this) + } + })); + } + // clearfix + this.container.grab(new EJS.Dom.Element("span", { + "class": "clear" + })); + }, + toElement: function() { + return this.container; + } + }); + /* +--- +description: Extends MooTools.Element with the `enlight()` shortcut. Also adds `light()` and `unlight()` for backward compatibility with Lighter.js + +license: MIT-style X11 License + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [Element.enlight] +... + */ + Element.implement({ + /** + * Highlights an element/Removes Element highlighting + * + * @param {Object, Boolean} [options] EnlighterJS options Object or Boolean value to enable/disable highlighting + * @returns {Element} The current Element instance. + */ + enlight: function(options) { + // mixed input check - options available ? + options = typeof options == "undefined" ? {} : options; + // convert "true" to empty Object! + options = options === true ? {} : options; + // enlighter instance already available ? + var enlighter = this.retrieve("EnlighterInstance"); + // dispose element ? + if (options === "dispose" && enlighter) { + enlighter.dispose(); + this.eliminate("EnligterInstance"); + return this; + } + // hide highlighted sourcecode ? + if (options === false) { + if (enlighter !== null) { + enlighter.enlight(false); + } + } else { + // create new enlighter instance + if (enlighter === null) { + enlighter = new EJS(this, options, null); + this.store("EnlighterInstance", enlighter); + } + enlighter.enlight(options); + } + // element instance + return this; + }, + /** + * Highlights an element + * @DEPRECATED since v2.0 - this method will be removed in the future + * @param {Object} [options] EnlighterJS Options Object + * @returns {Element} The current Element instance. + */ + light: function(options) { + return this.enlight(options); + }, + /** + * Removes/hides Element highlighting + * @DEPRECATED since v2.0 - this method will be removed in the future + * @returns {Element} The current Element instance. + */ + unlight: function() { + return this.enlight(false); + } + }); + /* +--- +name: Helper +description: Helper to initialize multiple Enlighter instances on your page as well as code-groups + +license: MIT-style X11 License + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Util.Helper] +... +*/ + EJS.Util.Helper = function(elements, options) { + // break if no elements are selected/found + if (elements == null || elements.length && elements.length == 0) { + return; + } + // defaults + options = options || {}; + // element grouping disabled? + if (options.grouping && options.grouping === false) { + // highlight all elements + elements.enlight(options); + } else { + // get separated groups and single elements + var groups = {}; + var ungrouped = []; + // group elements + Array.each(elements, function(el) { + // extract group name + var groupName = el.get("data-enlighter-group"); + // build element tree + if (groupName) { + if (groups[groupName]) { + groups[groupName].push(el); + } else { + groups[groupName] = [ el ]; + } + } else { + ungrouped.push(el); + } + }); + // highlight single elements (non grouped) + ungrouped.each(function(el) { + el.enlight(options); + }); + // create & highlight groups + Object.each(groups, function(obj) { + // copy options + var localoptions = Object.clone(options); + // force theme defined within options (all group members should have the same theme as group-leader) + localoptions.forceTheme = true; + // get group-leader theme + localoptions.theme = obj[0].get("data-enlighter-theme") || options.theme || "Enlighter"; + // create new tab pane + var tabpane = new EJS.UI.TabPane(localoptions.theme); + // put enlighted objects into the tabpane + Array.each(obj, function(el, index) { + // create new tab - set title with fallback + var container = tabpane.addTab(el.get("data-enlighter-title") || el.get("data-enlighter-language") || localoptions.language); + // run enlighter + new EJS(el, localoptions, container).enlight(true); + }.bind(this)); + // select first tab (group-leader) + tabpane.getContainer().inject(obj[0], "before"); + tabpane.selectTab(0); + }.bind(this)); + } + }; + /* +--- +name: TapPane +description: Displays multiple code-blocks within a group + +license: MIT-style X11 License + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.UI.TabPane] +... +*/ + EJS.UI.TabPane = new Class({ + // wrapper container which contains the controls + panes + container: null, + // control container - contains the tab names + controlContainer: null, + // pane container - contains the tab panes + paneContainer: null, + // array of tab objects + tabs: [], + // current active tab + selectedTabIndex: 0, + /** + * @constructs + * @param {String} cssClassname The class-name of the outer container + */ + initialize: function(cssClassname) { + // create container + this.container = new EJS.Dom.Element("div", { + "class": "EnlighterJSTabPane " + cssClassname.toLowerCase() + "EnlighterJSTabPane" + }); + // create container structure + //
+ //
+ //
  • Tab1
  • ....
+ //
+ //
+ //
Enlighter Tab1
+ //
Enlighter Tab2
+ //
+ //
+ this.controlContainer = new EJS.Dom.Element("ul"); + this.paneContainer = new EJS.Dom.Element("div", { + "class": "pane" + }); + var controlWrapper = new EJS.Dom.Element("div", { + "class": "controls" + }); + controlWrapper.grab(this.controlContainer); + this.container.grab(controlWrapper); + this.container.grab(this.paneContainer); + }, + selectTab: function(index) { + if (index < this.tabs.length) { + // hide current tab + this.tabs[this.selectedTabIndex].pane.setStyle("display", "none"); + this.tabs[this.selectedTabIndex].control.removeClass("selected"); + // show selected tab + this.tabs[index].pane.setStyle("display", "block"); + this.tabs[index].control.addClass("selected"); + // store selected index + this.selectedTabIndex = index; + } + }, + addTab: function(name) { + // create new control element + var ctrl = new EJS.Dom.Element("li", { + text: name + }); + this.controlContainer.grab(ctrl); + // get new tab position + var tabIndex = this.tabs.length; + // select event - display tab + ctrl.addEvent("click", function() { + this.selectTab(tabIndex); + }.bind(this)); + // create new tab element + var tab = new EJS.Dom.Element("div", { + styles: { + display: "none" + } + }); + this.paneContainer.grab(tab); + // store new tab + this.tabs.push({ + control: ctrl, + pane: tab + }); + // return created tab element + return tab; + }, + getContainer: function() { + return this.container; + } + }); + /* +--- +description: Automatical element highlighting using meta tag options + +license: MIT-style X11 License + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS] +... +*/ + window.addEvent("domready", function() { + // metadata config available ? -> autoinit + var m = EJS.Dom.getElement('meta[name="EnlighterJS"]'); + // check instance + if (!m) { + return; + } + // create new options object + var options = { + language: m.get("data-language") || "generic", + theme: m.get("data-theme") || "Enlighter", + indent: m.get("data-indent").toInt() || -1, + hover: m.get("data-hover") || "hoverEnabled", + rawButton: m.get("data-rawcodebutton") === "true", + windowButton: m.get("data-windowbutton") === "true", + infoButton: m.get("data-infobutton") === "true", + showLinenumbers: m.get("data-linenumbers") !== "false" + }; + // selector available ? if not, match all pre-tags + var blockSelector = m.get("data-selector-block") || "pre"; + // selector available ? if not, match all pre-tags + var inlineSelector = m.get("data-selector-inline") || "code"; + // highlight all matching block tags + if (blockSelector != "NULL") { + options.renderer = "Block"; + EJS.Util.Helper(EJS.Dom.getElements(blockSelector), options); + } + // highlight all matching inline tags + if (inlineSelector != "NULL") { + options.renderer = "Inline"; + options.grouping = false; + EJS.Util.Helper(EJS.Dom.getElements(inlineSelector), options); + } + }); + /* +--- +description: Simple global-initialization of inline+block codeblocks + +license: MIT-style X11 License + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Util.Init] +... +*/ + EJS.Util.Init = function(blockSelector, inlineSelector, options) { + // defaults + options = options || {}; + // highlight all matching block tags + if (blockSelector) { + options.renderer = "Block"; + EJS.Util.Helper(EJS.Dom.getElements(blockSelector), options); + } + // highlight all matching inline tags + if (inlineSelector) { + options.renderer = "Inline"; + options.grouping = false; + EJS.Util.Helper(EJS.Dom.getElements(inlineSelector), options); + } + }; + /* +--- +description: Code parsing engine for EnlighterJS + +license: MIT-style + +authors: + - Jose Prado + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.generic] +... +*/ + EJS.Language.generic = new Class({ + tokenizerType: "Standard", + tokenizer: null, + code: null, + patterns: {}, + keywords: {}, + delimiters: { + start: null, + end: null + }, + // commonly used Regex Patterns + common: { + // Matches a C style single-line comment. + slashComments: /(?:^|[^\\])\/\/.*$/gm, + // Matches a Perl style single-line comment. + poundComments: /#.*$/gm, + // Matches a C style multi-line comment + multiComments: /\/\*[\s\S]*?\*\//gm, + // Matches a string enclosed by single quotes. Legacy. + aposStrings: /'[^'\\]*(?:\\.[^'\\]*)*'/gm, + // Matches a string enclosed by double quotes. Legacy. + quotedStrings: /"[^"\\]*(?:\\.[^"\\]*)*"/gm, + // Matches a string enclosed by single quotes across multiple lines. + multiLineSingleQuotedStrings: /'[^'\\]*(?:\\.[^'\\]*)*'/gm, + // Matches a string enclosed by double quotes across multiple lines. + multiLineDoubleQuotedStrings: /"[^"\\]*(?:\\.[^"\\]*)*"/gm, + // Matches both. + multiLineStrings: /'[^'\\]*(?:\\.[^'\\]*)*'|"[^"\\]*(?:\\.[^"\\]*)*"/gm, + // Matches a string enclosed by single quotes. + singleQuotedString: /'[^'\\\r\n]*(?:\\.[^'\\\r\n]*)*'/gm, + // Matches a string enclosed by double quotes. + doubleQuotedString: /"[^"\\\r\n]*(?:\\.[^"\\\r\n]*)*"/gm, + // Matches both. + strings: /'[^'\\\r\n]*(?:\\.[^'\\\r\n]*)*'|"[^"\\\r\n]*(?:\\.[^"\\\r\n]*)*"/gm, + // Matches a property: .property style. + properties: /\.([\w]+)\s*/gi, + // Matches a method call: .methodName() style. + methodCalls: /\.([\w]+)\s*\(/gm, + // Matches a function call: functionName() style. + functionCalls: /\b([\w]+)\s*\(/gm, + // Matches any of the common brackets. + brackets: /\{|}|\(|\)|\[|]/g, + // Matches integers, decimals, hexadecimals. + numbers: /\b((?:(\d+)?\.)?[0-9]+|0x[0-9A-F]+)\b/gi + }, + /** + * Constructor. + * + * @constructs + * @param {Object} + * options + */ + initialize: function(code) { + // initialize language options + this.setupLanguage(); + this.rules = []; + this.code = code; + // create new tokenizer + this.tokenizer = new EnlighterJS.Tokenizer[this.tokenizerType](); + // Add delimiter rules. + if (this.delimiters.start) { + this.rules.push({ + pattern: this.delimiters.start, + alias: "de1" + }); + } + if (this.delimiters.end) { + this.rules.push({ + pattern: this.delimiters.end, + alias: "de2" + }); + } + // Set Keyword Rules from this.keywords object. + Object.each(this.keywords, function(keywordSet, ruleName) { + // keyword set contains elements ? + if (keywordSet.csv != "") { + this.rules.push({ + pattern: this.csvToRegExp(keywordSet.csv, keywordSet.mod || "g"), + alias: keywordSet.alias + }); + } + }, this); + // Set Rules from this.patterns object. + Object.each(this.patterns, function(regex, ruleName) { + // add new rule entry + this.rules.push(regex); + }, this); + }, + getRuleByName: function(name) {}, + // override this method to setup language params + setupLanguage: function() { + // generic highlighting + this.patterns = { + strings: { + pattern: this.common.strings, + alias: "st0" + }, + fn: { + pattern: this.common.functionCalls, + alias: "kw1" + }, + me: { + pattern: this.common.methodCalls, + alias: "kw2" + }, + brackets: { + pattern: this.common.brackets, + alias: "br0" + }, + numbers: { + pattern: this.common.numbers, + alias: "nu0" + }, + comment0: { + pattern: this.common.slashComments, + alias: "co1" + }, + comment1: { + pattern: this.common.poundComments, + alias: "co1" + }, + comment3: { + pattern: this.common.multiComments, + alias: "co2" + } + }; + }, + getTokens: function() { + return this.tokenizer.getTokens(this, this.code); + }, + getRules: function() { + return this.rules; + }, + csvToRegExp: function(csv, mod) { + return new RegExp("\\b(" + csv.replace(/,\s*/g, "|") + ")\\b", mod); + }, + delimToRegExp: function(beg, esc, end, mod, suffix) { + beg = beg.escapeRegExp(); + if (esc) { + esc = esc.escapeRegExp(); + } + end = end ? end.escapeRegExp() : beg; + var pat = esc ? beg + "[^" + end + esc + "\\n]*(?:" + esc + ".[^" + end + esc + "\\n]*)*" + end : beg + "[^" + end + "\\n]*" + end; + return new RegExp(pat + (suffix || ""), mod || ""); + }, + strictRegExp: function() { + var regex = "("; + for (var i = 0; i < arguments.length; i++) { + regex += arguments[i].escapeRegExp(); + regex += i < arguments.length - 1 ? "|" : ""; + } + regex += ")"; + return new RegExp(regex, "gim"); + } + }); + /* +--- +description: ASM General Assembly Language + +license: MIT-style + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.asm] +... +*/ + EJS.Language.asm = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + this.patterns = { + // comments start with a semicolon (only single line comments available) + singleLineComments: { + pattern: /(;.*)$/gm, + alias: "co1" + }, + // controls - used e.g. in KEIL + controls: { + pattern: /(\$.*)$/gm, + alias: "co2" + }, + // "strings" may used in some assemblers for char constants + strings: { + pattern: this.common.strings, + alias: "st0" + }, + // general instructions (followed after a label or at a new line) + instruction: { + pattern: /(^|:)\s*?(\w+)\s+/gm, + alias: "kw3" + }, + // labels (jump targets) + label: { + pattern: /^\s*?([A-Z\?_][A-Z0-9\?_]+:)\s*?/gim, + alias: "kw1" + }, + // indirect addresses starts with @ + indirect: { + pattern: /@\w+/gi, + alias: "kw4" + }, + // immediate data + immediate: { + pattern: /#\w+/gi, + alias: "kw4" + }, + // Hexadecimal (two notations): 0aH (8051 asm) + hex: { + pattern: /[A-F0-9][A-F0-9$]+?H/gi, + alias: "nu0" + }, + // Decimal: \d+ (8051 asm) + integer: { + pattern: /\d[\d$]+?D/gi, + alias: "nu0" + }, + // Binary: 0b00001010, 0b11111111 (8051 asm) + binary: { + pattern: /[01][01$]+?B/gi, + alias: "nu0" + }, + // Octals: 1767q (8051 asm) + octals: { + pattern: /[0-7][0-7$]+?(?:Q|O)/gi, + alias: "nu0" + }, + // Hexadecimal (two notations): 0x0a, $0a, 0xff, $ff (generic) + hex2: { + pattern: /(0x[A-F0-9]+|\$[A-F0-9]+)/gi, + alias: "nu0" + }, + // Binary: 0b00001010, 0b11111111 (generic) + binary2: { + pattern: /(0b[01]+)/g, + alias: "nu0" + }, + // Decimal: \d+ (generic) + integer2: { + pattern: /\b(\d+)/g, + alias: "nu0" + }, + // e.g. LOW(), HIGH() .. + functions: { + pattern: this.common.functionCalls, + alias: "me0" + } + }; + } + }); + /* +--- +description: ATMEL AVR Assembly Language + +license: MIT-style + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.avrasm] +... +*/ + EJS.Language.avrasm = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + this.patterns = { + singleLineComments: { + pattern: /(;.*)$/gm, + alias: "co1" + }, + // available directives: BYTE,CSEG,DB,DEF,DEVICE,DSEG,DW,ENDMACRO,EQU,ESEG,EXIT,INCLUDE,LIST,LISTMAC,MACRO,NOLIST,ORG,SET + directives: { + pattern: /^\s*?\.(\w+)\s+/gm, + alias: "kw1" + }, + register: { + pattern: /\b(r\d{1,2})/gi, + alias: "kw1" + }, + macroparam: { + pattern: /(@[0-9])/gi, + alias: "kw4" + }, + label: { + pattern: /^\s*?(\w+:)\s*?/gm, + alias: "kw3" + }, + instruction: { + pattern: /(^|:)\s*?(\w+)\s+/gm, + alias: "kw3" + }, + strings: { + pattern: this.common.strings, + alias: "st0" + }, + // Hexadecimal (two notations): 0x0a, $0a, 0xff, $ff + hex: { + pattern: /(0x[A-F0-9]+|\$[A-F0-9]+)/gi, + alias: "nu0" + }, + // Binary: 0b00001010, 0b11111111 + binary: { + pattern: /(0b[01]+)/g, + alias: "nu0" + }, + // Decimal: \d+ + integer: { + pattern: /\b(\d+)/g, + alias: "nu0" + }, + // e.g. LOW(), HIGH() .. + functions: { + pattern: this.common.functionCalls, + alias: "me0" + }, + // io register alias e.g. DDRA, PORTB, TIMSK + ioregister: { + pattern: /\b[A-Z]{2,}[0-9]?[0-9]?\b/g, + alias: "kw4" + } + }; + } + }); + /* +--- +description: CSS (Cascading Style Sheets) + +license: MIT-style + +authors: + - Andi Dittrich + - Jose Prado + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.css] +... +*/ + EnlighterJS.Language.css = new Class({ + Extends: EnlighterJS.Language.generic, + setupLanguage: function() { + this.keywords = {}; + this.patterns = { + comments2: { + pattern: /\/\*![\s\S]*?\*\//gm, + alias: "co2" + }, + comments: { + pattern: this.common.multiComments, + alias: "co1" + }, + strings: { + pattern: this.common.strings, + alias: "st0" + }, + selectors: { + pattern: /(?:^|}|\/)\s*([^\\/{@]+)\s*\{/gi, + alias: "kw1" + }, + directives: { + pattern: /(@[a-z]+)\s+/gi, + alias: "kw2" + }, + rules: { + pattern: /([\w-]+)\s*:/g, + alias: "kw3" + }, + uri: { + pattern: /url\s*\([^\)]*\)/gi, + alias: "kw4" + }, + units: { + pattern: /\b(\d+[\.\d+-]?\s*(%|[a-z]{1,3})?)/gi, + alias: "nu0" + }, + hexColors: { + pattern: /(#[A-F0-9]{3}([A-F0-9]{3})?)\b/gi, + alias: "nu0" + }, + brackets: { + pattern: this.common.brackets, + alias: "br0" + }, + symbols: { + pattern: /,|\.|;|:|>/g, + alias: "sy0" + } + }; + } + }); + /* +--- +description: C/C++ Language + +license: MIT-style + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.cpp] +... +*/ + EJS.Language.cpp = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + this.keywords = { + cpp: { + csv: "and,and_eq,asm,auto,bitand,bitor,bool,break,case,catch,char,class,compl,const,const_cast,continue,default,delete,do,double,dynamic_cast,else,enum,explicit,export,extern,false,float,for,friend,goto,if,inline,int,long,mutable,namespace,new,not,not_eq,operator,or,or_eq,private,protected,public,register,reinterpret_cast,return,short,signed,sizeof,static,static_cast,struct,switch,template,this,throw,true,try,typedef,typeid,typename,union,unsigned,using,virtual,void,volatile,wchar_t,while,xor,xor_eq", + alias: "kw1" + }, + cppX11: { + csv: "alignas,alignof,char16_t,char32_t,constexpr,decltype,noexcept,nullptr,static_assert,thread_local", + alias: "kw4" + }, + directives: { + csv: "__LINE__,__FILE__,__DATE__,__TIME__,__cplusplus", + alias: "kw2" + } + }; + this.patterns = { + slashComments: { + pattern: this.common.slashComments, + alias: "co1" + }, + multiComments: { + pattern: this.common.multiComments, + alias: "co2" + }, + chars: { + pattern: this.common.singleQuotedString, + alias: "st0" + }, + strings: { + pattern: this.common.doubleQuotedString, + alias: "st1" + }, + annotation: { + pattern: /@[\W\w_][\w\d_]+/gm, + alias: "st1" + }, + numbers: { + pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim, + alias: "nu0" + }, + properties: { + pattern: this.common.properties, + alias: "me0" + }, + brackets: { + pattern: this.common.brackets, + alias: "br0" + }, + functionCalls: { + pattern: this.common.functionCalls, + alias: "de1" + }, + directives: { + pattern: /#.*$/gm, + alias: "kw2" + } + }; + } + }); + /* +--- +description: C# Language + +license: MIT-style + +authors: + - Joshua Maag + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.csharp] +... +*/ + EJS.Language.csharp = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + this.keywords = { + reserved: { + csv: "as, base, break, case, catch, checked, continue, default, do, else, event, explicit, false, finally, fixed, for, foreach, goto, if, implicit, internal, is, lock, namespace, new, null, operator, params, private, protected, public, ref, return, sizeof, stackalloc, switch, this, throw, true, try, typeof, unchecked, using, void, while", + alias: "kw1" + }, + keywords: { + csv: "abstract, async, class, const, delegate, dynamic, event, extern, in, interface, out, override, readonly, sealed, static, unsafe, virtual, volatile", + alias: "kw3" + }, + primitives: { + csv: "bool, byte, char, decimal, double, enum, float, int, long, sbyte, short, struct, uint, ulong, ushort, object, string", + alias: "kw2" + }, + internal: { + csv: "System", + alias: "kw4" + } + }; + this.patterns = { + slashComments: { + pattern: this.common.slashComments, + alias: "co1" + }, + multiComments: { + pattern: this.common.multiComments, + alias: "co2" + }, + chars: { + pattern: this.common.singleQuotedString, + alias: "st0" + }, + strings: { + pattern: this.common.doubleQuotedString, + alias: "st1" + }, + numbers: { + pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim, + alias: "nu0" + }, + brackets: { + pattern: this.common.brackets, + alias: "br0" + }, + functionCalls: { + pattern: this.common.functionCalls, + alias: "me0" + }, + methodCalls: { + pattern: this.common.methodCalls, + alias: "me1" + } + }; + } + }); + /* +--- +description: DIFF Highlighting + +license: MIT-style + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.diff] +... +*/ + EJS.Language.diff = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + this.keywords = {}; + this.patterns = { + comments: { + pattern: /^((---|\+\+\+) .*)/gm, + alias: "co1" + }, + stats: { + pattern: /^(@@.*@@\s*)/gm, + alias: "nu0" + }, + add: { + pattern: /^(\+.*)/gm, + alias: "re0" + }, + del: { + pattern: /^(-.*)/gm, + alias: "st0" + } + }; + } + }); + /* +--- +description: Ini/Conf/Property Highlighting + +license: MIT-style + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.ini] +... +*/ + EJS.Language.ini = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + this.keywords = {}; + this.patterns = { + singleLineComments: { + pattern: /(;.*)$/gm, + alias: "co1" + }, + section: { + pattern: /^\s*?(\[.*\])\s*?$/gm, + alias: "kw4" + }, + directive: { + pattern: /^\s*?[a-z0-9\._-]+\s*?=/gim, + alias: "kw1" + }, + "boolean": { + pattern: /\b(true|false|on|off|yes|no)\b/gim, + alias: "kw2" + }, + strings: { + pattern: this.common.doubleQuotedString, + alias: "st1" + }, + numbers: { + pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)[a-z]*?\b/gim, + alias: "nu0" + }, + brackets: { + pattern: this.common.brackets, + alias: "br0" + } + }; + } + }); + /* +--- +description: Java language + +license: MIT-style + +authors: + - Italo Maia + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.java] +... +*/ + EJS.Language.java = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function(code) { + this.keywords = { + reserved: { + csv: "continue, for, new, switch, assert, default, goto, synchronized, do, if, this, break, throw, else, throws, case, instanceof, return, transient, catch, try, final, finally, strictfp, volatile, const, native, super, while", + alias: "kw1" + }, + keywords: { + csv: "abstract, package, private, implements, protected, public, import, extends, interface, static, void, class", + alias: "kw3" + }, + primitives: { + csv: "byte, short, int, long, float, double, boolean, char, String", + alias: "kw2" + }, + internal: { + csv: "System", + alias: "kw4" + } + }, this.patterns = { + slashComments: { + pattern: this.common.slashComments, + alias: "co1" + }, + multiComments: { + pattern: this.common.multiComments, + alias: "co2" + }, + chars: { + pattern: this.common.singleQuotedString, + alias: "st0" + }, + strings: { + pattern: this.common.doubleQuotedString, + alias: "st1" + }, + annotation: { + pattern: /@[\W\w_][\w\d_]+/gm, + alias: "st1" + }, + numbers: { + pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim, + alias: "nu0" + }, + properties: { + pattern: this.common.properties, + alias: "me0" + }, + brackets: { + pattern: this.common.brackets, + alias: "br0" + }, + functionCalls: { + pattern: this.common.functionCalls, + alias: "kw1" + } + }; + } + }); + /* +--- +description: JavaScript language + +license: MIT-style + +authors: + - Jose Prado + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.javascript] +... +*/ + EJS.Language.javascript = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + this.keywords = { + commonKeywords: { + csv: "as, break, case, catch, continue, delete, do, else, eval, finally, for, if, in, is, instanceof, return, switch, this, throw, try, typeof, void, while, write, with", + alias: "kw1" + }, + langKeywords: { + csv: "class, const, default, debugger, export, extends, false, function, import, namespace, new, null, package, private, protected, public, super, true, use, var", + alias: "kw2" + }, + windowKeywords: { + csv: "alert, confirm, open, print, prompt", + alias: "kw3" + } + }; + this.patterns = { + slashComments: { + pattern: this.common.slashComments, + alias: "co1" + }, + multiComments: { + pattern: this.common.multiComments, + alias: "co2" + }, + strings: { + pattern: this.common.strings, + alias: "st0" + }, + methodCalls: { + pattern: this.common.properties, + alias: "me0" + }, + brackets: { + pattern: this.common.brackets, + alias: "br0" + }, + numbers: { + pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+)\b/gi, + alias: "nu0" + }, + regex: { + pattern: this.delimToRegExp("/", "\\", "/", "g", "[gimy]*"), + alias: "re0" + }, + symbols: { + pattern: /\+|-|\*|\/|%|!|@|&|\||\^|\<|\>|=|,|\.|;|\?|:/g, + alias: "sy0" + } + }; + this.delimiters = { + start: this.strictRegExp('") + }; + } + }); + /* +--- +description: JSON Object Highlighting + +license: MIT-style + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.json] +... +*/ + EJS.Language.json = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + this.keywords = { + values: { + csv: "true, false, null", + alias: "kw2" + } + }; + this.patterns = { + keys: { + pattern: /("[^"\\\r\n]+?")\s*?:/gi, + alias: "kw1" + }, + strings: { + pattern: this.common.strings, + alias: "st0" + }, + brackets: { + pattern: this.common.brackets, + alias: "br0" + }, + numbers: { + pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+)\b/gi, + alias: "nu0" + }, + symbols: { + pattern: /,|:/g, + alias: "sy0" + } + }; + this.delimiters = {}; + } + }); + /* +--- +description: LUA http://www.lua.org/ + +license: MIT-style + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.lua] +... +*/ + EJS.Language.lua = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + this.keywords = { + reserved: { + csv: "and,break,do,else,elseif,end,for,function,if,in,local,or,repeat,return,not,then,until,while", + alias: "kw1" + }, + values: { + csv: "false,nil,true", + alias: "kw2" + } + }; + this.patterns = { + multiLineComments: { + pattern: /--\[\[[\s\S]*?]]/g, + alias: "co1" + }, + singleLineComments: { + pattern: /(--.*)$/gm, + alias: "co1" + }, + specialComments: { + pattern: /---\[\[[\s\S]*?(]])/g, + alias: "co1" + }, + // single and double quoted strings + strings: { + pattern: this.common.strings, + alias: "st0" + }, + // multi line strings + mlstring: { + pattern: /(\[(=*)\[[\S\s]*?]\2])/g, + alias: "st1" + }, + brackets: { + pattern: this.common.brackets, + alias: "br0" + }, + numbers: { + pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?)/gim, + alias: "nu0" + }, + functionCalls: { + pattern: this.common.functionCalls, + alias: "me0" + }, + methodCalls: { + pattern: this.common.methodCalls, + alias: "me1" + } + }; + } + }); + /* +--- +description: Octave/Matlab Language + +license: MIT-style + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.matlab] +... +*/ + EJS.Language.matlab = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + this.keywords = { + // keywords: https://www.gnu.org/software/octave/doc/interpreter/Keywords.html + kw: { + csv: "__FILE__,__LINE__,break,case,catch,classdef,continue,do,else,elseif,end,end_try_catch,end_unwind_protect,endclassdef,endenumeration,endevents,endfor,endfunction,endif,endmethods,endparfor,endproperties,endswitch,endwhile,enumeration,events,for,function,global,if,methods,otherwise,parfor,persistent,properties,return,static,switch,try,until,unwind_protect,unwind_protect_cleanup,while", + alias: "kw1", + mod: "gi" + }, + "const": { + csv: "true, false", + alias: "kw3", + mod: "gi" + } + }; + this.patterns = { + lineComments: { + pattern: /%.*$/gm, + alias: "co1" + }, + blockComments: { + pattern: /%%.*$/gm, + alias: "co2" + }, + fn: { + pattern: this.common.functionCalls, + alias: "me0" + }, + fn2: { + pattern: /\b([\w]+)\s*;/gm, + alias: "me0" + }, + me: { + pattern: this.common.methodCalls, + alias: "me1" + }, + brackets: { + pattern: this.common.brackets, + alias: "br0" + }, + strings: { + pattern: this.common.singleQuotedString, + alias: "st0" + }, + numbers: { + pattern: this.common.numbers, + alias: "nu0" + }, + fhandle: { + pattern: /(@[\w]+)\s*/gm, + alias: "kw3" + }, + symbols: { + pattern: /\+|-|\*|\/|%|!|@|&|\||\^|<|>|=|,|\.|;|\?|:|\[|]/g, + alias: "sy0" + }, + classdef: { + pattern: /classdef\s+(\w+(?:\s*<\s*\w+)?)\s*$/gim, + alias: "kw4" + } + }; + } + }); + /* +--- +description: Markdown language + +license: MIT-style + +authors: + - Jose Prado + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.markdown] +... +*/ + EJS.Language.markdown = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function(code) { + this.patterns = { + header1: { + pattern: /^(.+)\n=+\n/gim, + alias: "st1" + }, + header2: { + pattern: /^(.+)\n-+\n/gim, + alias: "st2" + }, + header3: { + pattern: /[#]{1,6}.*/gim, + alias: "st0" + }, + ul: { + pattern: /^\*\s*.*/gim, + alias: "kw1" + }, + ol: { + pattern: /^\d+\..*/gim, + alias: "kw1" + }, + italics: { + pattern: /\*.*?\*/g, + alias: "kw3" + }, + bold: { + pattern: /\*\*.*?\*\*/g, + alias: "kw3" + }, + url: { + pattern: /\[[^\]]*\]\([^\)]*\)/g, + alias: "kw4" + } + }; + } + }); + /* +--- +description: Nullsoft Scriptable Install System (NSIS) + +license: MIT-style + +authors: + - Jan T. Sott + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.nsis] +... +*/ + EJS.Language.nsis = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + /** Set of keywords in CSV form. Add multiple keyword hashes for differentiate keyword sets. */ + this.keywords = { + commands: { + csv: "Function, PageEx, Section, SectionGroup, SubSection, Abort, AddBrandingImage, AddSize, AllowRootDirInstall, AllowSkipFiles, AutoCloseWindow, BGFont, BGGradient, BrandingText, BringToFront, Call, CallInstDLL, Caption, ChangeUI, CheckBitmap, ClearErrors, CompletedText, ComponentText, CopyFiles, CRCCheck, CreateDirectory, CreateFont, CreateShortCut, Delete, DeleteINISec, DeleteINIStr, DeleteRegKey, DeleteRegValue, DetailPrint, DetailsButtonText, DirText, DirVar, DirVerify, EnableWindow, EnumRegKey, EnumRegValue, Exch, Exec, ExecShell, ExecWait, ExpandEnvStrings, File, FileBufSize, FileClose, FileErrorText, FileOpen, FileRead, FileReadByte, FileReadUTF16LE, FileReadWord, FileSeek, FileWrite, FileWriteByte, FileWriteUTF16LE, FileWriteWord, FindClose, FindFirst, FindNext, FindWindow, FlushINI, FunctionEnd, GetCurInstType, GetCurrentAddress, GetDlgItem, GetDLLVersion, GetDLLVersionLocal, GetErrorLevel, GetFileTime, GetFileTimeLocal, GetFullPathName, GetFunctionAddress, GetInstDirError, GetLabelAddress, GetTempFileName, Goto, HideWindow, Icon, IfAbort, IfErrors, IfFileExists, IfRebootFlag, IfSilent, InitPluginsDir, InstallButtonText, InstallColors, InstallDir, InstallDirRegKey, InstProgressFlags, InstType, InstTypeGetText, InstTypeSetText, IntCmp, IntCmpU, IntFmt, IntOp, IsWindow, LangString, LicenseBkColor, LicenseData, LicenseForceSelection, LicenseLangString, LicenseText, LoadLanguageFile, LockWindow, LogSet, LogText, ManifestDPIAware, ManifestSupportedOS, MessageBox, MiscButtonText, Name, Nop, OutFile, Page, PageCallbacks, PageExEnd, Pop, Push, Quit, ReadEnvStr, ReadINIStr, ReadRegDWORD, ReadRegStr, Reboot, RegDLL, Rename, RequestExecutionLevel, ReserveFile, Return, RMDir, SearchPath, SectionEnd, SectionGetFlags, SectionGetInstTypes, SectionGetSize, SectionGetText, SectionGroupEnd, SectionIn, SectionSetFlags, SectionSetInstTypes, SectionSetSize, SectionSetText, SendMessage, SetAutoClose, SetBrandingImage, SetCompress, SetCompressor, SetCompressorDictSize, SetCtlColors, SetCurInstType, SetDatablockOptimize, SetDateSave, SetDetailsPrint, SetDetailsView, SetErrorLevel, SetErrors, SetFileAttributes, SetFont, SetOutPath, SetOverwrite, SetPluginUnload, SetRebootFlag, SetRegView, SetShellVarContext, SetSilent, ShowInstDetails, ShowUninstDetails, ShowWindow, SilentInstall, SilentUnInstall, Sleep, SpaceTexts, StrCmp, StrCmpS, StrCpy, StrLen, SubCaption, SubSectionEnd, Unicode, UninstallButtonText, UninstallCaption, UninstallIcon, UninstallSubCaption, UninstallText, UninstPage, UnRegDLL, Var, VIAddVersionKey, VIFileVersion, VIProductVersion, WindowIcon, WriteINIStr, WriteRegBin, WriteRegDWORD, WriteRegExpandStr, WriteRegStr, WriteUninstaller, XPStyle", + alias: "kw1" + }, + states: { + csv: "admin, all, auto, both, colored, false, force, hide, highest, lastused, leave, listonly, none, normal, notset, off, on, open, print, show, silent, silentlog, smooth, textonly, true, user", + alias: "kw2" + }, + statics: { + csv: "ARCHIVE, FILE_ATTRIBUTE_ARCHIVE, FILE_ATTRIBUTE_NORMAL, FILE_ATTRIBUTE_OFFLINE, FILE_ATTRIBUTE_READONLY, FILE_ATTRIBUTE_SYSTEM, FILE_ATTRIBUTE_TEMPORARY, HKCR, HKCU, HKDD, HKEY_CLASSES_ROOT, HKEY_CURRENT_CONFIG, HKEY_CURRENT_USER, HKEY_DYN_DATA, HKEY_LOCAL_MACHINE, HKEY_PERFORMANCE_DATA, HKEY_USERS, HKLM, HKPD, HKU, IDABORT, IDCANCEL, IDIGNORE, IDNO, IDOK, IDRETRY, IDYES, MB_ABORTRETRYIGNORE, MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON3, MB_DEFBUTTON4, MB_ICONEXCLAMATION, MB_ICONINFORMATION, MB_ICONQUESTION, MB_ICONSTOP, MB_OK, MB_OKCANCEL, MB_RETRYCANCEL, MB_RIGHT, MB_RTLREADING, MB_SETFOREGROUND, MB_TOPMOST, MB_USERICON, MB_YESNO, NORMAL, OFFLINE, READONLY, SHCTX, SHELL_CONTEXT, SYSTEM, TEMPORARY", + alias: "kw3" + } + }; + /** Set of RegEx patterns to match */ + this.patterns = { + brackets: { + pattern: this.common.brackets, + alias: "br0" + }, + commentMultiline: { + pattern: this.common.multiComments, + alias: "co2" + }, + commentPound: { + pattern: this.common.poundComments, + alias: "co1" + }, + commentSemicolon: { + pattern: /;.*$/gm, + alias: "co1" + }, + compilerFlags: { + pattern: /(!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|makensis|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning))/g, + alias: "kw2" + }, + defines: { + pattern: /[\$]\{{1,2}[0-9a-zA-Z_][\w]*[\}]/gim, + alias: "kw4" + }, + jumps: { + pattern: /([(\+|\-)]([0-9]+))/g, + alias: "nu0" + }, + langStrings: { + pattern: /[\$]\({1,2}[0-9a-zA-Z_][\w]*[\)]/gim, + alias: "kw3" + }, + escapeChars: { + pattern: /([\$]\\(n|r|t|[\$]))/g, + alias: "kw4" + }, + numbers: { + pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][\-+]?[0-9]+)?|0x[A-F0-9]+)\b/gi, + alias: "nu0" + }, + pluginCommands: { + pattern: /(([0-9a-zA-Z_]+)[:{2}]([0-9a-zA-Z_]+))/g, + alias: "kw2" + }, + strings: { + pattern: this.common.strings, + alias: "st0" + }, + variables: { + pattern: /[\$]{1,2}[0-9a-zA-Z_][\w]*/gim, + alias: "kw4" + } + }; + } + }); + /* +--- +description: PHP language + +license: MIT-style + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.php] +... +*/ + EnlighterJS.Language.php = new Class({ + Extends: EnlighterJS.Language.generic, + tokenizerType: "Standard", + setupLanguage: function() { + this.keywords = { + // http://php.net/manual/en/reserved.keywords.php + keywords: { + csv: "__halt_compiler,abstract,and,as,break,callable,case,catch,class,clone,const,continue,declare,default,do,else,elseif,enddeclare,endfor,endforeach,endif,endswitch,endwhile,extends,final,finally,function,global,goto,implements,instanceof,insteadof,interface,namespace,new,or,private,protected,public,static,throw,trait,try,use,var,xor,yield", + alias: "kw1" + }, + // http://php.net/manual/en/reserved.other-reserved-words.php + reserved: { + csv: "int,float,bool,string,true,false,null,resource,object,mixed,numeric", + alias: "kw4", + mod: "gi" + } + }; + this.patterns = { + keywordsFn: { + pattern: /(require_once|include_once|array|die|exit|echo|print|empty|eval|include|isset|list|require|unset|if|switch|while|foreach|for|return)(?:\s*\(|\s+)?/gi, + alias: "kw1" + }, + inherit: { + pattern: /(self|parent|\$this)/gi, + alias: "kw4" + }, + slashComments: { + pattern: this.common.slashComments, + alias: "co1" + }, + multiComments: { + pattern: this.common.multiComments, + alias: "co2" + }, + dqStrings: { + pattern: this.common.multiLineDoubleQuotedStrings, + alias: "st0" + }, + sqStrings: { + pattern: this.common.multiLineSingleQuotedStrings, + alias: "st1" + }, + heredocs: { + pattern: /(<<<\s*?('?)([A-Z0-9]+)\2[^\n]*?\n[\s\S]*?\n\3(?![A-Z0-9\s]))/gim, + alias: "st1" + }, + numbers: { + pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][\-+]?[0-9]+)?|0x[A-F0-9]+)\b/gi, + alias: "nu0" + }, + variables: { + pattern: /\$[A-Z_][\w]*/gim, + alias: "kw3" + }, + functions: { + pattern: this.common.functionCalls, + alias: "me0" + }, + methods: { + pattern: /(?:->|::)([\w]+)/gim, + alias: "me1" + }, + constants: { + pattern: /\b[A-Z][A-Z0-9_]+[A-Z]\b/g, + alias: "kw4" + }, + lconstants: { + pattern: /\b__[A-Z][A-Z0-9_]+__\b/g, + alias: "re0" + }, + brackets: { + pattern: this.common.brackets, + alias: "br0" + }, + symbols: { + pattern: /!|@|&|<|>|=|=>|-|\+/g, + alias: "sy0" + } + }; + // Delimiters + this.delimiters = { + start: this.strictRegExp("") + }; + } + }); + /* +--- +description: Python language + +license: MIT-style + +authors: + - Italo Maia + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.python] +... +*/ + EJS.Language.python = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + this.keywords = { + reserved: { + csv: "and, del, from, not, while, as, elif, global, or, with, assert, else, if, pass, yield, break, except, import, print, class, exec, in, raise, continue, finally, is, return, def, for, lambda, try", + alias: "kw1" + }, + functions: { + csv: "__import__, abs, all, any, apply, bin, callable, chr, cmp, coerce, compile, delattr, dir, divmod, eval, execfile, filter, format, getattr, globals, hasattr, hash, hex, id, input, intern, isinstance, issubclass, iter, len, locals, map, max, min, next, oct, open, ord, pow, print, range, raw_input, reduce, reload, repr, round, setattr, sorted, sum, unichr, vars, zip", + alias: "kw2" + }, + classes: { + csv: "ArithmeticError, AssertionError, AttributeError, BaseException, BufferError, BytesWarning, DeprecationWarning, EOFError, EnvironmentError, Exception, FloatingPointError, FutureWarning, GeneratorExit, IOError, ImportError, ImportWarning, IndentationError, IndexError, KeyError, KeyboardInterrupt, LookupError, MemoryError, NameError, NotImplementedError, OSError, OverflowError, PendingDeprecationWarning, ReferenceError, RuntimeError, RuntimeWarning, StandardError, StopIteration, SyntaxError, SyntaxWarning, SystemError, SystemExit, TabError, TypeError, UnboundLocalError, UnicodeDecodeError, UnicodeEncodeError, UnicodeError, UnicodeTranslateError, UnicodeWarning, UserWarning, ValueError, Warning, ZeroDivisionError, basestring, bool, buffer, bytearray, bytes, classmethod, complex, dict, enumerate, file, float, frozenset, int, list, long, object, property, reversed, set, slice, staticmethod, str, super, tuple, type, unicode, xrange", + alias: "kw2" + } + }, this.patterns = { + poundComments: { + pattern: this.common.poundComments, + alias: "co1" + }, + /* + 'multiComments': { + pattern: /^=begin[\s\S]*?^=end/gm, + alias: 'co2' + },*/ + multiStringComments1: { + pattern: /"""[\s\S]*?"""/gm, + alias: "co2" + }, + multiStringComments2: { + pattern: /'''[\s\S]*?'''/gm, + alias: "co2" + }, + strings: { + pattern: this.common.strings, + alias: "st0" + }, + tickStrings: { + pattern: this.delimToRegExp("`", "\\", "`", "gm"), + alias: "st0" + }, + delimString: { + pattern: /(%[q|Q|x]?(\W)[^\2\\\n]*(?:\\.[^\2\\]*)*(\2|\)|\]|\}))/gm, + alias: "st1" + }, + heredoc: { + pattern: /(<<(\'?)([A-Z0-9]+)\2[^\n]*?\n[\s\S]*\n\3(?![\w]))/gim, + alias: "st2" + }, + variables: { + pattern: /(@[A-Za-z_][\w]*|@@[A-Za-z_][\w]*|\$(?:\-[\S]|[\w]+)|\b[A-Z][\w]*)/g, + alias: "kw3" + }, + rubySymbols: { + pattern: /[^:](:[\w]+)/g, + alias: "kw4" + }, + constants: { + pattern: /\b[A-Z][\w]*/g, + alias: "kw3" + }, + numbers: { + pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim, + alias: "nu0" + }, + properties: { + pattern: this.common.properties, + alias: "me0" + }, + brackets: { + pattern: this.common.brackets, + alias: "br0" + }, + delimRegex: { + pattern: /(%r(\W)[^\2\\\n]*(?:\\.[^\2\\\n]*?)*(\2|\)|\]|\})[iomx]*)/gm, + alias: "re0" + }, + literalRegex: { + pattern: this.delimToRegExp("/", "\\", "/", "g", "[iomx]*"), + alias: "re0" + } + }; + } + }); + /* +--- +description: Cython language + +license: MIT-style + +authors: + - Andi Dittrich + - Devyn Collier Johnson + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.cython] +... +*/ + EJS.Language.cython = new Class({ + Extends: EJS.Language.python, + setupLanguage: function() { + // run origin language setup + this.parent(); + // append cython extension keywords + this.keywords.reserved.csv += ", __all__, include, cimport, pyximport, cythonize, cdef, cpdef, ctypedef, property, IF, ELIF, ELSE, DEF"; + this.keywords.functions.csv += ", __dealloc__, __get__, __init__, fopen"; + this.keywords.classes.csv += ", PyErr_Fetch, PyErr_Occurred, PyErr_WarnEx, char, double, extern, namespace, public, struct, void, union, unsigned, enum"; + } + }); + /* +--- +description: RAW Code + +license: MIT-style + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.raw] +... +*/ + EJS.Language.raw = new Class({ + Extends: EJS.Language.generic, + initialize: function(code) { + this.code = code; + }, + getTokens: function() { + // create token object + var token = function(text, alias, index) { + return { + text: text, + alias: alias, + index: index, + length: text.length, + end: text.length + index + }; + }; + // raw means "no-highlight" - return a single, unknown token with the given sourcecode + return [ token(this.code, "", 0) ]; + } + }); + /* +--- +description: Ruby language + +license: MIT-style + +authors: + - Jose Prado + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.ruby] +... +*/ + EJS.Language.ruby = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + this.keywords = { + reserved: { + csv: "__FILE__, __LINE__, alias, and, BEGIN, begin, break, case, class, def, defined, do, else, elsif, END, end, ensure, false, for, if, in, module, next, nil, not, or, redo, rescue, retry, return, self, super, then, true, undef, unless, until, when, while, yield", + alias: "kw1" + }, + functions: { + csv: "abort, at_exit, autoload, binding, block_given, callcc, caller, catch, chomp, chop, eval, exec, exit, exit!, fail, fork, format, gets, global_variables, gsub, lambda, proc, load, local_variables, loop, open, p, print, proc, putc, puts, raise, fail, rand, readline, readlines, require, scan, select, set_trace_func, sleep, split, sprintf, format, srand, syscall, system, sub, test, throw, trace_var, trap, untrace_var", + alias: "kw2" + }, + classes: { + csv: "Abbrev, ArgumentError, Array, Base64, Benchmark, Benchmark::Tms, Bignum, Binding, CGI, Cookie, HtmlExtension, QueryExtension, Session, FileStore, MemoryStore, Class, Comparable, Complex, ConditionVariable, Continuation, Data, Date, DateTime, Dir, EOFError, Enumerable, Errno, Exception, FalseClass, File, Constants, Stat, FileTest, FileUtils, CopyContext_, DryRun, NoWrite, Verbose, Find, Fixnum, Float, FloatDomainError, GC, Generator, Hash, IO, IOError, Iconv, Failure, IllegalSequence, InvalidCharacter, OutOfRange, IndexError, Integer, Interrupt, Kernel, LoadError, LocalJumpError, Logger, Application, LogDevice, Severity, ShiftingError, Marshal, MatchData, Math, Matrix, Method, Module, Mutex, NameError, NilClass, NoMemoryError, NoMethodError, NotImplementedError, Numeric, Object, ObjectSpace, Observable, Pathname, Precision, Proc, Process, GID, Status, Sys, UID, Queue, Range, RangeError, Regexp, RegexpError, RuntimeError, ScriptError, SecurityError, Set, Shellwords, Signal, SignalException, Singleton, SingletonClassMethods, SizedQueue, SortedSet, StandardError, String, StringScanner, StringScanner::Error, Struct, Symbol, SyncEnumerator, SyntaxError, SystemCallError, SystemExit, SystemStackError, Tempfile, Test, Unit, Thread, ThreadError, ThreadGroup, ThreadsWait, Time, TrueClass, TypeError, UnboundMethod, Vector, YAML, ZeroDivisionError, Zlib, BufError, DataError, Deflate, Error, GzipFile, CRCError, Error, LengthError, NoFooter, GzipReader, GzipWriter, Inflate, MemError, NeedDict, StreamEnd, StreamError, VersionError, ZStream, fatal", + alias: "kw2" + } + }, this.patterns = { + poundComments: { + pattern: this.common.poundComments, + alias: "co1" + }, + multiComments: { + pattern: /^=begin[\s\S]*?^=end/gm, + alias: "co2" + }, + strings: { + pattern: this.common.strings, + alias: "st0" + }, + tickStrings: { + pattern: this.delimToRegExp("`", "\\", "`", "gm"), + alias: "st0" + }, + delimString: { + pattern: /(%[q|Q|x]?(\W)[^\2\\\n]*(?:\\.[^\2\\]*)*(\2|\)|\]|\}))/gm, + alias: "st1" + }, + heredoc: { + pattern: /(<<(\'?)([A-Z0-9]+)\2[^\n]*?\n[\s\S]*\n\3(?![\w]))/gim, + alias: "st2" + }, + //'instanceVar': { pattern: /@[A-Z_][\w]*/gi, alias: 'kw3' }, + //'classVar': { pattern: /@@[A-Z_][\w]*/gi, alias: 'kw3' }, + //'globalVar': { pattern: /\$(?:\-[\S]|[\w]+)/gi, alias: 'kw3' }, + variables: { + pattern: /(@[A-Za-z_][\w]*|@@[A-Za-z_][\w]*|\$(?:\-[\S]|[\w]+)|\b[A-Z][\w]*)/g, + alias: "kw3" + }, + rubySymbols: { + pattern: /[^:](:[\w]+)/g, + alias: "kw4" + }, + constants: { + pattern: /\b[A-Z][\w]*/g, + alias: "kw3" + }, + numbers: { + pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim, + alias: "nu0" + }, + properties: { + pattern: this.common.properties, + alias: "me0" + }, + brackets: { + pattern: this.common.brackets, + alias: "br0" + }, + delimRegex: { + pattern: /(%r(\W)[^\2\\\n]*(?:\\.[^\2\\\n]*?)*(\2|\)|\]|\})[iomx]*)/gm, + alias: "re0" + }, + literalRegex: { + pattern: this.delimToRegExp("/", "\\", "/", "g", "[iomx]*"), + alias: "re0" + } + }; + } + }); + /* +--- +description: Rust Language https://doc.rust-lang.org + +license: MIT-style + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.rust] +... +*/ + EJS.Language.rust = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + this.keywords = { + // keywords: https://doc.rust-lang.org/syntax/parse/token/keywords/enum.Keyword.html + kw: { + csv: "As,Break,Crate,Else,Enum,Extern,False,Fn,For,If,Impl,In,Let,Loop,Match,Mod,Move,Mut,Pub,Ref,Return,Static,SelfValue,SelfType,Struct,Super,True,Trait,Type,Unsafe,Use,Virtual,While,Continue,Box,Const,Where,Proc,Alignof,Become,Offsetof,Priv,Pure,Sizeof,Typeof,Unsized,Yield,Do,Abstract,Final,Override,Macro", + alias: "kw1", + mod: "gi" + } + }; + this.patterns = { + slashComments: { + pattern: this.common.slashComments, + alias: "co1" + }, + multiComments: { + pattern: this.common.multiComments, + alias: "co1" + }, + slashDocComments: { + pattern: /(?:^|[^\\])\/\/[\/!].*$/gm, + alias: "co2" + }, + multiDocComments: { + pattern: /\/\*[\*!][\s\S]*?\*\//gm, + alias: "co2" + }, + chars: { + pattern: /'.'/gm, + alias: "st0" + }, + rawStrings: { + pattern: /r((#+)".*?"\2)/gm, + alias: "st1" + }, + strings: { + pattern: /("(?:\\.|\\\s*\n|\\s*\r\n|[^\\"])*")/g, + alias: "st1" + }, + directives: { + pattern: /^\s*#.*$/gm, + alias: "sy0" + }, + brackets: { + pattern: this.common.brackets, + alias: "br0" + }, + // https://doc.rust-lang.org/stable/reference.html#integer-literals + intLiteral: { + pattern: /\b([0-9_]+|0o[0-9_]+|0x[A-F0-9_]+|0b[0-1_]+)(u8|i8|u16|i16|u32|i32|u64|i64|isize|usize)?\b/gim, + alias: "nu0" + }, + // https://doc.rust-lang.org/stable/reference.html#floating-point-literals + floatLiteral: { + pattern: /\b([0-9_]+\.?[0-9_]+?(e\+[0-9_]+)?)(?:f32|f64)?\b/gim, + alias: "nu0" + }, + // method definitions + methodDefs: { + pattern: /fn\s+([\w]+)\s*(<\w+\s*>)?\(/gm, + alias: "kw2" + }, + // method/function calls + funCalls: { + pattern: /\b\.?([\w]+)\s*(\(|::)/gm, + alias: "kw3" + }, + // macro calls + macro: { + pattern: /\b([\w]+)!/gm, + alias: "kw4" + }, + symbols: { + pattern: /\+|-|\*|\/|%|!|@|&|\||\^|<|<<|>>|>|=|,|\.|;|\?|:|self/g, + alias: "sy0" + } + }; + } + }); + /* +--- +description: Shell/Bash Scripting + +license: MIT-style + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.shell] +... +*/ + EJS.Language.shell = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + this.keywords = { + keywords: { + csv: "if, fi, then, elif, else, for, do, done, until, while, break, continue, case, esac, return, function, in, eq, ne, gt, lt, ge, le", + alias: "kw1" + } + }; + this.patterns = { + comments: { + pattern: /((?:^\s*|\s+)#.*$)/gm, + alias: "co1" + }, + strings: { + pattern: this.common.strings, + alias: "st0" + }, + backticks: { + pattern: /`.*?`/gm, + alias: "st1" + }, + cases: { + pattern: /^\s*\w+\)\s*$/gm, + alias: "kw2" + }, + def: { + pattern: /^(\s*\w+)=/gm, + alias: "kw4" + }, + vars: { + pattern: /(\$\w+)\b/gim, + alias: "kw4" + }, + functions: { + pattern: /^\s*\w+\(\)\s*\{/gm, + alias: "kw3" + } + }; + } + }); + /* +--- +description: Squirrel Language http://www.squirrel-lang.org/ + +license: MIT-style + +authors: + - Andi Dittrich + - Devyn Collier Johnson + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.squirrel] +... +*/ + EJS.Language.squirrel = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + this.keywords = { + reserved: { + csv: "base,break,case,catch,class,clone,constructor,continue,const,default,delete,else,enum,extends,false,for,foreach,function,if,in,instanceof,local,null,resume,return,static,switch,this,throw,true,try,typeof,while,yield", + alias: "kw1" + } + }; + this.patterns = { + slashComments: { + pattern: this.common.slashComments, + alias: "co1" + }, + poundComments: { + pattern: this.common.poundComments, + alias: "co1" + }, + multiComments: { + pattern: this.common.multiComments, + alias: "co2" + }, + strings: { + pattern: this.common.doubleQuotedString, + alias: "st0" + }, + //'annotation': { pattern: /@[\W\w_][\w\d_]+/gm, alias: 'st1' }, + // int, float, octals, hex + numbers: { + pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+)\b/gim, + alias: "nu0" + }, + // chars are handled as numbers + charnumber: { + pattern: this.common.singleQuotedString, + alias: "nu0" + }, + brackets: { + pattern: this.common.brackets, + alias: "br0" + }, + functionCalls: { + pattern: this.common.functionCalls, + alias: "me0" + }, + methodCalls: { + pattern: this.common.methodCalls, + alias: "me1" + }, + properties: { + pattern: this.common.properties, + alias: "me1" + } + }; + } + }); + /* +--- +description: SQL Language + +license: MIT-style + +authors: + - Jose Prado + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.sql] +... +*/ + EJS.Language.sql = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + this.keywords = { + keywords: { + csv: "savepoint, start, absolute, action, add, after, alter, as, asc, at, authorization, begin, bigint, binary, bit, by, cascade, char, character, check, checkpoint, close, collate, column, commit, committed, connect, connection, constraint, contains, continue, create, cube, current, current_date, current_time, cursor, database, date, deallocate, dec, decimal, declare, default, delete, desc, distinct, double, drop, dynamic, else, end, end-exec, escape, except, exec, execute, false, fetch, first, float, for, force, foreign, forward, free, from, full, function, global, goto, grant, group, grouping, having, hour, ignore, index, inner, insensitive, insert, instead, int, integer, intersect, into, is, isolation, key, last, level, load, local, max, min, minute, modify, move, name, national, nchar, next, no, numeric, of, off, on, only, open, option, order, out, output, partial, password, precision, prepare, primary, prior, privileges, procedure, public, read, real, references, relative, repeatable, restrict, return, returns, revoke, rollback, rollup, rows, rule, schema, scroll, second, section, select, sequence, serializable, set, size, smallint, static, statistics, table, temp, temporary, then, time, timestamp, to, top, transaction, translation, trigger, true, truncate, uncommitted, union, unique, update, values, varchar, varying, view, when, where, with, work", + alias: "kw1", + mod: "gi" + }, + functions: { + csv: "abs, avg, case, cast, coalesce, convert, count, current_timestamp, current_user, day, isnull, left, lower, month, nullif, replace, right, session_user, space, substring, sum, system_user, upper, user, year", + alias: "kw2", + mod: "gi" + }, + operators: { + csv: "all, and, any, between, cross, in, join, like, not, null, or, outer, some, if", + alias: "kw3", + mod: "gi" + } + }, this.patterns = { + singleLineComments: { + pattern: /--(.*)$/gm, + alias: "co1" + }, + multiLineComments: { + pattern: this.common.multiComments, + alias: "co2" + }, + multiLineStrings: { + pattern: this.common.multiLineStrings, + alias: "st0" + }, + numbers: { + pattern: this.common.numbers, + alias: "nu0" + }, + columns: { + pattern: /`[^`\\]*(?:\\.[^`\\]*)*`/gm, + alias: "kw4" + } + }; + } + }); + /* +--- +description: VHDL Language + +license: MIT-style + +authors: + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.vhdl] +... +*/ + EJS.Language.vhdl = new Class({ + Extends: EJS.Language.generic, + setupLanguage: function() { + this.keywords = { + keywords: { + csv: "abs,access,after,alias,all,and,architecture,array,assert,attribute,begin,block,body,buffer,bus,case,component,configuration,constant,disconnect,downto,else,elsif,end,entity,exit,file,for,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,pure,range,record,register,reject,rem,report,return,rol,ror,select,severity,signal,shared,sla,sll,sra,srl,subtype,then,to,transport,type,unaffected,units,until,use,variable,wait,when,while,with,xnor,xor", + alias: "kw1", + mod: "gi" + }, + operators: { + csv: "abs,not,mod,rem,sll,srl,sla,sra,rol,ror,and,or,nand,nor,xor,xnor", + alias: "sy0" + } + }; + this.patterns = { + comments: { + pattern: /((?:^\s*|\s+)--.*$)/gm, + alias: "co1" + }, + uses: { + pattern: /^\s*(?:use|library)\s*(\S+);/gim, + alias: "kw4" + }, + functions: { + pattern: this.common.functionCalls, + alias: "kw2" + }, + operators: { + pattern: /\*\*|\*|\/|\+|\-|&|=|\/=|<|<=|>|>=/g, + alias: "sy0" + }, + strings: { + pattern: this.common.strings, + alias: "st1" + }, + numbers: { + pattern: this.common.numbers, + alias: "nu0" + }, + brackets: { + pattern: this.common.brackets, + alias: "br0" + } + }; + } + }); + /* +--- +description: XML/HTML language + +license: MIT-style + +authors: + - Jose Prado + - Andi Dittrich + +requires: + - Core/1.4.5 + +provides: [EnlighterJS.Language.xml] +... +*/ + EnlighterJS.Language.xml = new Class({ + Extends: EnlighterJS.Language.generic, + tokenizerType: "Xml", + setupLanguage: function() { + // Common HTML patterns + this.patterns = { + comments: { + pattern: /(?:<|<)!--[\s\S]*?--(?:>|>)/gim, + alias: "co2" + }, + cdata: { + pattern: /(?:<|<)!\[CDATA\[[\s\S]*?]](?:>|>)/gim, + alias: "st1" + }, + closingTags: { + pattern: /(?:<|<)\/[A-Z:_][A-Z0-9:.-]*?(?:>|>)/gi, + alias: "kw1" + }, + doctype: { + pattern: /(?:<|<)!DOCTYPE[\s\S]+?(?:>|>)/gim, + alias: "st2" + }, + version: { + pattern: /(?:<|<)\?xml[\s\S]+?\?(?:>|>)/gim, + alias: "kw2" + } + }; + } + }); +})(); \ No newline at end of file diff --git a/EnlighterJS/Build/EnlighterJS.min.css b/EnlighterJS/Build/EnlighterJS.min.css new file mode 100644 index 0000000..7a9fd3b --- /dev/null +++ b/EnlighterJS/Build/EnlighterJS.min.css @@ -0,0 +1 @@ +/*! EnlighterJS Syntax Highlighter 2.10.0 | MIT License (X11) | http://enlighterjs.org/ | November 17 2015 */.EnlighterJSToolbar>a .clear,ol.EnlighterJS li:AFTER,ul.EnlighterJS li:AFTER{content:' '}ol.gitEnlighterJS,ol.mochaEnlighterJS,ol.tuttiEnlighterJS,ol.twilightEnlighterJS{list-style-type:decimal}.EnlighterJS,.EnlighterJSWrapper{font-family:"Source Code Pro","Liberation Mono","Courier New",Courier,monospace;font-size:10px;line-height:16px;overflow:auto;white-space:pre-wrap;word-wrap:break-word;margin:0;padding:0}.EnlighterJSWrapper{position:relative}.EnlighterJSWrapper pre{font-family:inherit;background-color:#fff;padding:5px 5px 5px 10px;margin:0 0 20px;line-height:18px;font-size:12px;color:#444;border:none;border-radius:0;clear:none;white-space:pre-wrap;word-wrap:break-word}.EnlighterJSWrapper:hover .EnlighterJSToolbar{display:block}span.EnlighterJS{padding:3px 5px 1px;border:1px solid #e0e0e0;color:#333;background-color:#f7f7f7;margin:0 2px}ol.EnlighterJS,ul.EnlighterJS{display:block;font-size:10px;background-color:#f2f2f2;color:#939393;margin:0 0 20px;padding:0;text-indent:0;list-style:none}ol.EnlighterJS li,ul.EnlighterJS li{margin:0;background-color:#fff;border:0 solid #fff;padding:0 5px 0 14px;line-height:14px;color:#939393;list-style:none;font-size:inherit}ol.EnlighterJS li .specialline,ul.EnlighterJS li .specialline{background-color:#F4F8FC}ol.EnlighterJS li:FIRST-CHILD,ul.EnlighterJS li:FIRST-CHILD{padding-top:5px}ol.EnlighterJS li:LAST-CHILD,ul.EnlighterJS li:LAST-CHILD{padding-bottom:5px}ol.EnlighterJS li{list-style:decimal-leading-zero;margin-left:40px;padding-left:20px}.EnlighterJS span{color:#000;margin:0;padding:0;line-height:inherit;font-size:12px;font-family:inherit}.EnlighterJSTabPane .controls ul{margin:0 0 0 40px;padding:0}.EnlighterJSTabPane .controls li{display:inline-block;list-style:none;padding:3px 10px;margin:0 5px;background-color:#f2f2f2;border-radius:5px;font-size:12px;color:#000;font-family:inherit;cursor:pointer}.EnlighterJSTabPane .controls .pane{padding:5px 0 0;clear:left}.EnlighterJSToolbar{position:absolute;display:none;right:0;top:0;height:40px;width:auto;padding:15px}.EnlighterJSToolbar>a{float:right;display:block;border-radius:3px;z-index:10;background-color:#fff;color:#717171;cursor:pointer;font-size:12px;padding:0;border:1px solid #e0e0e0;margin:0 0 0 8px;text-decoration:none;width:23px;height:23px;background-position:0 0;background-size:contain;font-family:inherit}.EnlighterJSToolbar>a:HOVER{text-decoration:none;border-color:#b0b0b0}.EnlighterJSToolbar>a .clear{clear:right;display:block}.EnlighterJSWindowButton{background-image:url(data:image/gif;base64,R0lGODlhLgAuAKIAADtJcYuWq6Wxw/L7/9Xz/+z6/////wAAACwAAAAALgAuAAAD02i63P4wykmrvTjrzbv/YCiOZCacaKquace+sOAKRG3feH7Oee/vnJNveANuhLWAcslsOpkYJOFJrQaitGSAyFVibUou0XuRhgmFtHrNXpMt5i26TWe/K/FaHQCoF+4UeXNtfH6AE4J7fXWHEol0hYxXZVlTcoqGk3CVZ5hsA6CNEY98paanoAOiEKSnrnypqw+PhIt0sg60bJG3mnicl5C2bbgNumu8xL6BKZ3CmVgozrXQHNN+vR3X2HbLGNvcasURVuVQ1ubmJevs7e7v8PHy7QkAOw==)}.EnlighterJSRawButton{background-image:url(data:image/gif;base64,R0lGODlhLgAuALMAADtJcez6/////7e3t6urq52dnXt7e3p6enFxcW1tbWdnZ2VlZQAAAAAAAAAAAAAAACwAAAAALgAuAAAE4lDISau9OOvNu/9gKI5kaZ6Zoa5sy6KTK7uwNN9qLahB7/+/gjCH4gGPPWGBeDICntBoj0AdGpqGXnQLmFaXV5MRCaQSrKfDgXwcuL/qA0nNBroHcPV8Xe/rR3R9dX8iCAiCdYYkhohsiiOMjUiPhYeSR5QhkVycUj2ZIJudnT6gH5GXP6YeCQmpQK0kra8/sSOzAaNdbLYiuLp1vSG4tAHCIAoKxT3JJMnLAc0jz8vSItS6nD7WIQsLWtlbPt4k3tDkI+bL6CLqxezd3vLz9PX05fb5+gs6/f7/AAMKHEgQQwQAOw==)}.EnlighterJSInfoButton{background-image:url(data:image/gif;base64,R0lGODlhLgAuALMAAL7C0MvO2aSqvbG2xjtJcUhVelVhhGJtjYmSqtjb4/Lz9m96l3yGoJaes+Xn7P///ywAAAAALgAuAAAEqvDJSau9OOvNu/9gKI5kaZ5o6ilB675wkKhSQNx4rhMN/Qi7IG7gQwiFAd/hGPQ9doeFdDpl+BI7pwagM2gzwJz1e1noBOSLQQdIW3Yz98Smo9oRzjATt3A29jloPmaAN0Q+BYU3cSoOOzEvTnQ4BXIUejd9lhJGOT2bD0s5h5uPoFg6oA9cOQWQLg4+mIBtNISKjClrigROvASaKpOFeKrGx8jJysvMzcgRADs=)}span.enlighterEnlighterJS{border-radius:3px;background-color:#fafafa}.enlighterEnlighterJSWrapper pre,ol.enlighterEnlighterJS,ul.enlighterEnlighterJS{font-size:11px;color:#939393;border-radius:8px;border:1px solid #e0e0e0;background-color:#f9f9f9}ol.enlighterEnlighterJS li,ul.enlighterEnlighterJS li{border:0 solid #fff;padding:1px 5px 1px 14px;line-height:16px;color:#aaa}ol.enlighterEnlighterJS li{list-style:decimal;border-left:1px solid #e0e0e0;padding:1px 5px 1px 14px}ol.enlighterEnlighterJS li.specialline,ul.enlighterEnlighterJS li.specialline{background-color:#fdf5f0}ol.enlighterEnlighterJS.hoverEnabled li:hover,ul.enlighterEnlighterJS.hoverEnabled li:hover{background-color:#fffcd3;border:0 solid #fff;color:#444}ol.enlighterEnlighterJS.hoverEnabled li:hover{border-left:1px solid #e0e0e0}.enlighterEnlighterJS .de1,.enlighterEnlighterJS .de2{color:#CF6A4C}.enlighterEnlighterJS .kw1{color:#286491;font-weight:700}.enlighterEnlighterJS .kw2{color:#4da0d2}.enlighterEnlighterJS .kw3{color:#458}.enlighterEnlighterJS .kw4{color:#990073}.enlighterEnlighterJS .co1,.enlighterEnlighterJS .co2{color:#99a}.enlighterEnlighterJS .st0,.enlighterEnlighterJS .st1,.enlighterEnlighterJS .st2{color:#d14}.enlighterEnlighterJS .nu0{color:#099}.enlighterEnlighterJS .me0,.enlighterEnlighterJS .me1{color:#0086b3}.enlighterEnlighterJS .br0,.enlighterEnlighterJS .es0,.enlighterEnlighterJS .sy0{color:#777}.enlighterEnlighterJS .re0{color:#009926}.enlighterEnlighterJSTabPane .controls{border-radius:8px 8px 0 0;background-color:#f9f9f9;border:1px solid #e0e0e0;border-bottom-width:0;padding:5px}.enlighterEnlighterJSTabPane .controls li{border-radius:4px;border:1px solid #e0e0e0;font-size:12px;color:#000;background-color:transparent;cursor:pointer}.enlighterEnlighterJSTabPane .controls li:hover{background-color:transparent}.enlighterEnlighterJSTabPane .controls .selected,.enlighterEnlighterJSTabPane .controls .selected:hover{background-color:#e5e5e5;color:#000;border-color:#c9c9c9}.enlighterEnlighterJSTabPane .enlighterEnlighterJS,.enlighterEnlighterJSTabPane pre{border-radius:0 0 8px 8px}.enlighterEnlighterJSTabPane .pane{padding:0}.enlighterEnlighterJSWrapper pre{background-color:#fff;font-size:12px;color:#717171}.enlighterEnlighterJSWrapper .EnlighterJSRawButton{border-radius:3px;background-color:#f7f7f7}span.godzillaEnlighterJS{background-color:#f7f7f7;border:1px dotted #e0e0e1;border-left:solid 2px #4a80b3}.godzillaEnlighterJSWrapper pre,ol.godzillaEnlighterJS,ul.godzillaEnlighterJS{font-size:11px;background-color:#f0f0f1;border-left:solid 6px #4a80b3;background-image:url(data:image/gif;base64,R0lGODlhHgAeAJEAAPLz9ezt7vf39wAAACwAAAAAHgAeAAACYYyPqXvi/wCccr5gY3Y1491Z4fRlI3Rem5ByaymurQBT8nuDuM57wA8MCodEQA2V8yRjm6OmZ3G6oKSlrWlFYqlaJffpNWUvxbL5J2WNHenZrL2mxd/znfjLrm/v/Kg+UwAAOw==);background-repeat:repeat;background-position:0 0}.godzillaEnlighterJSWrapper pre{font-size:14px;line-height:21px;color:#2b333a}ol.godzillaEnlighterJS li,ul.godzillaEnlighterJS li{border:0 solid #fff;line-height:19px;color:#2b333a;background-color:transparent;padding:0 5px 0 14px}ol.godzillaEnlighterJS li{list-style:decimal;color:#9c9ea0}.godzillaEnlighterJS span{font-size:14px;color:#2b333a}.godzillaEnlighterJS .de1,.godzillaEnlighterJS .de2{color:#9b0d5c;font-weight:700}.godzillaEnlighterJS .kw1{color:#085789;font-weight:700}.godzillaEnlighterJS .kw2{color:#4284ae;font-weight:700}.godzillaEnlighterJS .kw3{color:#4284ae}.godzillaEnlighterJS .kw4{color:#ae42a0}.godzillaEnlighterJS .co1{color:#6b7c8b}.godzillaEnlighterJS .co2{color:#5b7c9c}.godzillaEnlighterJS .st0,.godzillaEnlighterJS .st1,.godzillaEnlighterJS .st2{color:#5e860f}.godzillaEnlighterJS .nu0{color:#9b0d5c}.godzillaEnlighterJS .me0,.godzillaEnlighterJS .me1{color:#d0284a}.godzillaEnlighterJS .br0,.godzillaEnlighterJS .sy0{color:#35434c}.godzillaEnlighterJS .re0{color:#d2901d}ol.godzillaEnlighterJS.hoverEnabled li:hover,ul.godzillaEnlighterJS.hoverEnabled li:hover{background-color:#f0f0f1}ol.godzillaEnlighterJS li.specialline,ul.godzillaEnlighterJS li.specialline{border-left:solid 5px #9b0d5c;background-color:transparent}.godzillaEnlighterJSTabPane .controls{background-color:#4a80b3;padding:5px 0}.godzillaEnlighterJSTabPane .controls ul{margin-left:10px}.godzillaEnlighterJSTabPane .controls li{border-radius:0;background-color:transparent;line-height:20px;font-size:14px;color:#f0f0f0}.godzillaEnlighterJSTabPane .controls li.selected{background-color:#00417f}span.beyondEnlighterJS{border-radius:3px;background-color:#f7f7fa;border:1px dotted #e2e2e8}.beyondEnlighterJSWrapper pre,ol.beyondEnlighterJS,ul.beyondEnlighterJS{font-size:11px;color:#333;background-color:#f7f7fa;border-radius:5px;border:2px solid #e2e2e8;padding:10px 10px 10px 5px}ol.beyondEnlighterJS li,ul.beyondEnlighterJS li{border:0 solid #fff;padding:1px 5px 1px 10px;line-height:18px;color:#aaa;background-color:#f7f7fa;margin-left:0}ol.beyondEnlighterJS li:FIRST-CHILD,ol.beyondEnlighterJS li:LAST-CHILD{padding-top:0;padding-bottom:0}ol.beyondEnlighterJS li{list-style:decimal inside;border-left:0 solid #e0e0e0;padding:1px 5px 1px 15px}ol.beyondEnlighterJS li.specialline,ul.beyondEnlighterJS li.specialline{background-color:#fff}ol.beyondEnlighterJS.hoverEnabled li:hover,ul.beyondEnlighterJS.hoverEnabled li:hover{background-color:#fff;border:0 solid #fff;color:#444}.beyondEnlighterJS span{font-size:13px;color:#2f3235}.beyondEnlighterJS .de1,.beyondEnlighterJS .de2{color:#CF6A4C}.beyondEnlighterJS .kw1{color:#286491}.beyondEnlighterJS .kw2{color:#4da0d2}.beyondEnlighterJS .kw3{color:#458}.beyondEnlighterJS .kw4{color:#990073}.beyondEnlighterJS .co1,.beyondEnlighterJS .co2{color:#8181a1}.beyondEnlighterJS .st0,.beyondEnlighterJS .st1{color:#d14}.beyondEnlighterJS .st2{color:#049595}.beyondEnlighterJS .nu0{color:#099}.beyondEnlighterJS .me0,.beyondEnlighterJS .me1{color:#0086b3}.beyondEnlighterJS .br0,.beyondEnlighterJS .es0,.beyondEnlighterJS .sy0{color:#777}.beyondEnlighterJS .re0{color:#009926}.beyondEnlighterJSTabPane .controls{background-color:transparent;padding:5px 5px 0}.beyondEnlighterJSTabPane .controls ul{margin-left:20px}.beyondEnlighterJSTabPane .controls li{border-radius:5px 5px 0 0;border:2px solid #e2e2e8;border-bottom-width:0;font-size:12px;color:#286491;font-weight:700;background-color:#fff;cursor:pointer}.beyondEnlighterJSTabPane .controls li:hover{background-color:transparent}.beyondEnlighterJSTabPane .controls .selected,.beyondEnlighterJSTabPane .controls .selected:hover{background-color:#e2e2e8;border-color:#d8d8dd;color:#505050}.beyondEnlighterJSTabPane .beyondEnlighterJS,.beyondEnlighterJSTabPane pre{border-radius:8px}.beyondEnlighterJSTabPane .pane{padding:0}.beyondEnlighterJSWrapper pre{background-color:#f7f7fa;font-size:13px;color:#333;line-height:20px;padding:15px}ol.classicEnlighterJS,ul.classicEnlighterJS{background-color:#f8f8f8}.classicEnlighterJS,.classicEnlighterJSWrapper pre{border:1px solid #e8e8e2}ol.classicEnlighterJS li,ul.classicEnlighterJS li{border:none;border-left:solid 4px #52ce52;line-height:20px;color:#505050;font-size:14px;background-color:#fff}ol.classicEnlighterJS li.even,ul.classicEnlighterJS li.even{background-color:#f8f8f8}span.classicEnlighterJS{background-color:transparent;border:none}ol.classicEnlighterJS.hoverEnabled li:hover,ul.classicEnlighterJS.hoverEnabled li:hover{border:none;border-left:solid 4px #52ce52;background-color:#ddf0dd}ol.classicEnlighterJS li.specialline,ul.classicEnlighterJS li.specialline{background-color:#edf9ec;border-left-color:#3fa03f}ol.classicEnlighterJS li{color:#000;list-style-type:decimal}.classicEnlighterJS span{font-size:15px}.classicEnlighterJS .de2{background-color:#e0e010;font-weight:700}.classicEnlighterJS .kw1{color:#066da1;font-weight:700}.classicEnlighterJS .kw2{color:#404247;font-weight:700}.classicEnlighterJS .kw3{color:#404247}.classicEnlighterJS .kw4{color:#d53aa9}.classicEnlighterJS .co1,.classicEnlighterJS .co2{color:#888}.classicEnlighterJS .st0,.classicEnlighterJS .st1{color:#2d47e6}.classicEnlighterJS .st2{color:#d53aa9;font-weight:700}.classicEnlighterJS .nu0{color:#d53aa9}.classicEnlighterJS .me0,.classicEnlighterJS .me1{color:#404247}.classicEnlighterJS .br0,.classicEnlighterJS .es0,.classicEnlighterJS .sy0{color:#444}.classicEnlighterJS .re0{color:#009926}.classicEnlighterJSWrapper pre{background-color:#fff;font-size:15px;color:#000;line-height:20px}.classicEnlighterJSWrapper .EnlighterJSToolbar>a{border-radius:0}.classicEnlighterJSTabPane .controls{background-color:#f8f8f8;height:31px;border:1px solid #e8e8e2;border-bottom-width:0}.classicEnlighterJSTabPane .controls ul{margin:0 0 0 35px}.classicEnlighterJSTabPane .controls li{border-radius:0;font-size:15px;background-color:transparent;line-height:20px;padding:5px 10px}.classicEnlighterJSTabPane .controls li.selected,.classicEnlighterJSTabPane .controls li.selected:hover{background-color:#52ce52;color:#f9f9f9;font-weight:700}.classicEnlighterJSTabPane .pane{padding:0}.classicEnlighterJSTabPane .classicEnlighterJS{border-top-width:0}span.mootwoEnlighterJS{border-radius:4px;background-color:#f0f0f1;border:1px solid #f0f0f1}.mootwoEnlighterJSWrapper pre,ol.mootwoEnlighterJS,ul.mootwoEnlighterJS{font-size:11px;background-color:#f0f0f1;border:1px solid #f0f0f1;border-radius:7px}.mootwoEnlighterJSWrapper pre{font-size:14px;line-height:22px;color:#313437}ol.mootwoEnlighterJS li,ul.mootwoEnlighterJS li{border:0 solid #fff;line-height:18px;color:#313437;background-color:#f0f0f1;padding:1px 5px 1px 14px}ol.mootwoEnlighterJS li{list-style:decimal;color:#9c9ea0}.mootwoEnlighterJS span{font-size:14px;color:#313437}.mootwoEnlighterJS .kw1{color:#b05098;font-weight:700}.mootwoEnlighterJS .kw2{color:#b05098}.mootwoEnlighterJS .co1,.mootwoEnlighterJS .co2{color:#9c9ea0}.mootwoEnlighterJS .st0,.mootwoEnlighterJS .st1,.mootwoEnlighterJS .st2{color:#83a440}.mootwoEnlighterJS .nu0{color:#429bc1}.mootwoEnlighterJS .me0,.mootwoEnlighterJS .me1{color:#666}.mootwoEnlighterJS .br0{color:#909090}.mootwoEnlighterJS .sy0{color:#864c08}ol.mootwoEnlighterJS li.specialline,ol.mootwoEnlighterJS.hoverEnabled li:hover,ul.mootwoEnlighterJS li.specialline,ul.mootwoEnlighterJS.hoverEnabled li:hover{background-color:#e9e9e9}.mootwoEnlighterJSTabPane .controls{background-color:#585b5e;padding:10px 0;border-radius:8px}.mootwoEnlighterJSTabPane .controls ul{margin-left:10px}.mootwoEnlighterJSTabPane .controls li{border-radius:0;background-color:transparent;line-height:20px;font-size:15px;color:#f0f0f0}.mootwoEnlighterJSTabPane .controls li.selected{text-decoration:underline}span.eclipseEnlighterJS{border-radius:3px;background-color:#f8f8f8;border:0 solid #fff}.eclipseEnlighterJSWrapper pre,ol.eclipseEnlighterJS,ul.eclipseEnlighterJS{font-size:11px;color:#939393;border-radius:5px;border:8px solid #f3f3f3;background-color:#fff}ol.eclipseEnlighterJS li,ul.eclipseEnlighterJS li{padding:1px 5px 1px 14px;line-height:16px;color:#787878}ol.eclipseEnlighterJS li{list-style:decimal;border-left:2px solid #f8f8f8;padding:1px 5px 1px 14px}ol.eclipseEnlighterJS li.specialline,ul.eclipseEnlighterJS li.specialline{background-color:#f9f9f9;border-left-color:#f0f0f0}ol.eclipseEnlighterJS.hoverEnabled li:hover,ul.eclipseEnlighterJS.hoverEnabled li:hover{background-color:#e8f2fe;color:#444}ol.eclipseEnlighterJS.hoverEnabled li:hover{border-left-color:#e0e0e0}.eclipseEnlighterJS span{font-size:13px}.eclipseEnlighterJS .de1,.eclipseEnlighterJS .de2{color:#3f7f95}.eclipseEnlighterJS .kw1{color:#3f7f95;font-weight:700}.eclipseEnlighterJS .kw2{color:#7f007f;font-weight:700}.eclipseEnlighterJS .kw3{color:#458}.eclipseEnlighterJS .kw4{color:#990073}.eclipseEnlighterJS .co1{color:#3f7f5f}.eclipseEnlighterJS .co2{color:#3f5fbf}.eclipseEnlighterJS .st0{color:#320fe3}.eclipseEnlighterJS .st1{color:#990073}.eclipseEnlighterJS .st2{color:#3f7f95}.eclipseEnlighterJS .me0,.eclipseEnlighterJS .me1,.eclipseEnlighterJS .nu0{color:#000}.eclipseEnlighterJS .br0,.eclipseEnlighterJS .es0,.eclipseEnlighterJS .sy0{color:#777}.eclipseEnlighterJS .re0{color:#009926}.eclipseEnlighterJSTabPane .controls{background-color:#f3f3f3;height:35px;padding:8px 0 0 20px;border-radius:5px 5px 0 0}.eclipseEnlighterJSTabPane .controls li{font-size:12px;color:#000;background-color:transparent;cursor:pointer;padding:5px 10px;border-radius:5px 5px 0 0}.eclipseEnlighterJSTabPane .controls li:hover{background-color:transparent}.eclipseEnlighterJSTabPane .controls .selected,.eclipseEnlighterJSTabPane .controls .selected:hover{background-color:#fff;color:#000;border-color:#c9c9c9}.eclipseEnlighterJSTabPane .eclipseEnlighterJS,.eclipseEnlighterJSTabPane pre{border-top-width:0}.eclipseEnlighterJSTabPane .pane{padding:0}.eclipseEnlighterJSTabPane ol.eclipseEnlighterJS,.eclipseEnlighterJSTabPane ul.eclipseEnlighterJS{border-radius:0 0 5px 5px}.eclipseEnlighterJSWrapper pre{background-color:#fff;font-size:13px;color:#717171}.eclipseEnlighterJSTabPane .EnlighterJSToolbar{padding:7px 15px 0 0}.droideEnlighterJS,.droideEnlighterJSWrapper{font-family:Consolas,"Source Code Pro","Liberation Mono","Courier New",Courier,monospace}span.droideEnlighterJS{background-color:#f7f7f9;border:1px solid #e0e0e0}.droideEnlighterJSWrapper pre,ol.droideEnlighterJS,ul.droideEnlighterJS{font-size:13px;color:#404141;border:1px solid #e0e0e0;background-color:#f7f7f9;paddding:10px}ol.droideEnlighterJS li,ul.droideEnlighterJS li{border:0 solid #fff;padding:1px 5px 1px 14px;line-height:18px;color:#707070;background-color:#f7f7f9;font-size:11px}ol.droideEnlighterJS li{list-style:decimal;border-left:1px dashed #e0e0e0;padding:1px 5px 1px 14px}ol.droideEnlighterJS li.specialline,ul.droideEnlighterJS li.specialline{background-color:#fae9d9;border-left:solid 5px #e07c19}ol.droideEnlighterJS.hoverEnabled li:hover,ul.droideEnlighterJS.hoverEnabled li:hover{background-color:#fae9d9}ol.droideEnlighterJS.hoverEnabled li:hover{border-left-width:1px}.droideEnlighterJS span{font-size:13px}.droideEnlighterJS .de1,.droideEnlighterJS .de2{color:#CF6A4C}.droideEnlighterJS .kw1{color:#12217c;font-weight:700}.droideEnlighterJS .kw2{color:#6e0d6e}.droideEnlighterJS .kw3{color:#458}.droideEnlighterJS .kw4{color:#990073}.droideEnlighterJS .co1,.droideEnlighterJS .co2{color:#086b08}.droideEnlighterJS .st0{color:#961414}.droideEnlighterJS .st1{color:#963f14}.droideEnlighterJS .st2{color:#961414}.droideEnlighterJS .nu0{color:#099}.droideEnlighterJS .re0{color:#009926}.droideEnlighterJSTabPane .controls{background-color:transparent;padding:5px 5px 0}.droideEnlighterJSTabPane .controls ul{margin:0}.droideEnlighterJSTabPane .controls li{border:1px solid #e0e0e0;font-size:12px;color:#000;background-color:transparent;cursor:pointer;border-radius:0;border-bottom-width:0;padding-bottom:5px;font-weight:700}.droideEnlighterJSTabPane .controls li:hover{background-color:transparent}.droideEnlighterJSTabPane .controls .selected,.droideEnlighterJSTabPane .controls .selected:hover{background-color:#f7f7f9;color:#000;border-color:#c9c9c9}.droideEnlighterJSTabPane .pane{padding:0}.droideEnlighterJSWrapper pre{background-color:#fff;font-size:13px;color:#717171}.minimalEnlighterJS,.minimalEnlighterJSWrapper{font-family:"Droid Sans Mono","Courier New",Courier,monospace}span.minimalEnlighterJS{background-color:transparent;border:none}.minimalEnlighterJSWrapper pre,ol.minimalEnlighterJS,ul.minimalEnlighterJS{font-size:13px;color:#404141;border-top:solid 3px #e0e0e0;border-bottom:solid 3px #e0e0e0;background-color:transparent;padding:10px 0}ol.minimalEnlighterJS li,ul.minimalEnlighterJS li{border:0 solid #fff;padding:1px 5px 1px 0;line-height:18px;color:#a0a0a0;background-color:transparent;font-size:10px}ol.minimalEnlighterJS li{list-style:decimal inside;padding:1px 10px;margin:0}ol.minimalEnlighterJS li.specialline,ul.minimalEnlighterJS li.specialline{background-color:#f9f9f9}ol.minimalEnlighterJS.hoverEnabled li:hover,ul.minimalEnlighterJS.hoverEnabled li:hover{background-color:#f0f0f0}.minimalEnlighterJS span{font-size:13px;color:#2a2a2a}.minimalEnlighterJS .de1,.minimalEnlighterJS .de2{color:#CF6A4C}.minimalEnlighterJS .kw1{color:#12217c;font-weight:700}.minimalEnlighterJS .kw2{color:#458;border-bottom:dotted 1px #458}.minimalEnlighterJS .kw3{color:#458}.minimalEnlighterJS .kw4{color:#990073}.minimalEnlighterJS .co1,.minimalEnlighterJS .co2{color:#a0a0a0}.minimalEnlighterJS .st0{color:#387905;border-bottom:dotted 1px #387905}.minimalEnlighterJS .st1{color:#217908;border-bottom:dotted 1px #387905}.minimalEnlighterJS .st2{color:#217908}.minimalEnlighterJS .nu0{color:#a61d1b;font-weight:700}.minimalEnlighterJS .me0,.minimalEnlighterJS .me1{color:#12217c;background-color:#e0e0e0}.minimalEnlighterJS .re0{color:#996700;border-bottom:solid 1px #996700}.minimalEnlighterJSTabPane .controls{background-color:transparent;padding:5px 5px 0}.minimalEnlighterJSTabPane .controls ul{margin:0 0 5px}.minimalEnlighterJSTabPane .controls li{font-size:12px;color:#000;background-color:transparent;cursor:pointer;border-radius:0;font-weight:700;text-transform:uppercase;padding:1px 6px}.minimalEnlighterJSTabPane .controls li:hover{background-color:transparent}.minimalEnlighterJSTabPane .controls .selected,.minimalEnlighterJSTabPane .controls .selected:hover{background-color:#e0e0e0;color:#2a2a2a}.minimalEnlighterJSTabPane .pane{padding:0}.minimalEnlighterJSWrapper pre{background-color:transparent;font-size:13px;color:#2a2a2a}.atomicEnlighterJS,.atomicEnlighterJSTabPane,.atomicEnlighterJSWrapper{font-family:Inconsolata,Consolas,"Source Code Pro","Courier New",Courier,monospace}span.atomicEnlighterJS{background-color:#272b32;padding:3px 5px}.atomicEnlighterJSWrapper pre,ol.atomicEnlighterJS,ul.atomicEnlighterJS{font-size:12px;background-color:#272b33}.atomicEnlighterJSWrapper pre{font-size:17px;line-height:22px;color:#cfd5e0}ol.atomicEnlighterJS li,ul.atomicEnlighterJS li{border:0 solid #fff;line-height:19px;color:#2b333a;background-color:transparent;padding:0 10px}ol.atomicEnlighterJS li{list-style:decimal inside;color:#596174;margin:0}.atomicEnlighterJS span{font-size:17px;color:#cfd5e0}.atomicEnlighterJS .de1,.atomicEnlighterJS .de2{color:#9b0d5c;font-weight:700}.atomicEnlighterJS .kw1{color:#d171dd;font-weight:700}.atomicEnlighterJS .kw2{color:#d19252;border-bottom:dotted 1px #d19252}.atomicEnlighterJS .kw3{color:#4284ae}.atomicEnlighterJS .kw4{color:#ae42a0}.atomicEnlighterJS .co1{color:#6b7c8b}.atomicEnlighterJS .co2{color:#5b7c9c}.atomicEnlighterJS .st0,.atomicEnlighterJS .st1{color:#7cc379}.atomicEnlighterJS .st2{color:#5e860f}.atomicEnlighterJS .nu0{color:#D19A66}.atomicEnlighterJS .me0,.atomicEnlighterJS .me1{color:#4284ae}.atomicEnlighterJS .br0{color:#6b7c8b;font-weight:700}.atomicEnlighterJS .re0{color:#d2901d}ol.atomicEnlighterJS.hoverEnabled li:hover,ul.atomicEnlighterJS.hoverEnabled li:hover{background-color:#2e353e}ol.atomicEnlighterJS li.specialline,ul.atomicEnlighterJS li.specialline{background-color:#282e36}.atomicEnlighterJSTabPane .controls{background-color:#121518;padding:5px 0 0}.atomicEnlighterJSTabPane .controls ul{margin-left:10px}.atomicEnlighterJSTabPane .controls li{background-color:transparent;line-height:25px;font-size:16px;font-weight:700;color:#f0f0f0;border-radius:5px 5px 0 0;text-transform:lowercase}.atomicEnlighterJSTabPane .controls li.selected{background-color:#272b33}.rowhammerEnlighterJS,.rowhammerEnlighterJSTabPane,.rowhammerEnlighterJSWrapper{font-family:"Ubuntu Mono","Source Code Pro","Courier New",Courier,monospace}span.rowhammerEnlighterJS{background-color:transparent;border:none}.rowhammerEnlighterJSWrapper pre,ol.rowhammerEnlighterJS,ul.rowhammerEnlighterJS{font-size:13px;color:#404141;background-color:transparent;padding:10px 0}ol.rowhammerEnlighterJS li,ul.rowhammerEnlighterJS li{border:0 solid #fff;padding:1px 5px 1px 0;line-height:20px;color:#94a9bf;background-color:transparent;font-size:10px;border-bottom:dotted 1px #e9e9f0}ol.rowhammerEnlighterJS li:nth-of-type(1),ul.rowhammerEnlighterJS li:nth-of-type(1){border-top:dotted 1px #e9e9f0}ol.rowhammerEnlighterJS li{list-style:decimal-leading-zero inside;padding:1px 10px;margin:0}ol.rowhammerEnlighterJS li.specialline,ul.rowhammerEnlighterJS li.specialline{background-color:#f9f9f9}ol.rowhammerEnlighterJS.hoverEnabled li:hover,ul.rowhammerEnlighterJS.hoverEnabled li:hover{background-color:#f0f0f0}.rowhammerEnlighterJS span{font-size:15px;color:#121212}.rowhammerEnlighterJS .de1,.rowhammerEnlighterJS .de2{color:#9b0d5c;font-weight:700}.rowhammerEnlighterJS .kw1{color:#07a;font-weight:700;border-bottom:dotted 1px #07a}.rowhammerEnlighterJS .kw2{color:#07a;font-weight:700}.rowhammerEnlighterJS .kw3{color:#07a}.rowhammerEnlighterJS .kw4{color:#ae42a0}.rowhammerEnlighterJS .co1,.rowhammerEnlighterJS .co2{color:#758697}.rowhammerEnlighterJS .st0{color:#639500;border-bottom:dotted 1px #639500}.rowhammerEnlighterJS .st1,.rowhammerEnlighterJS .st2{color:#639500}.rowhammerEnlighterJS .nu0{color:#9b0d5c}.rowhammerEnlighterJS .me0{color:#c2415b;font-weight:700}.rowhammerEnlighterJS .me1{color:#d0284a;font-weight:700}.rowhammerEnlighterJS .br0{color:#6b7c8b;font-weight:700}.rowhammerEnlighterJS .sy0{color:#35434c;font-weight:700}.rowhammerEnlighterJS .re0{color:#d2901d}.rowhammerEnlighterJSTabPane .controls{background-color:transparent;padding:5px 5px 0}.rowhammerEnlighterJSTabPane .controls ul{margin:0 0 5px}.rowhammerEnlighterJSTabPane .controls li{font-size:14px;color:#758697;background-color:transparent;cursor:pointer;border-radius:0;font-weight:700;text-transform:uppercase;padding:1px 6px}.gitEnlighterJSTabPane .pane,.rowhammerEnlighterJSTabPane .pane{padding:0}.rowhammerEnlighterJSTabPane .controls li:hover{background-color:transparent}.rowhammerEnlighterJSTabPane .controls .selected,.rowhammerEnlighterJSTabPane .controls .selected:hover{border-bottom:dotted 1px #758697;background-color:#f0f0f0}.rowhammerEnlighterJSWrapper pre{background-color:transparent;font-size:15px;line-height:22px;color:#2a2a2a}.gitEnlighterJS,.gitEnlighterJSWrapper pre{border:1px solid #eee;font-family:Courier,monospace}.mochaEnlighterJS,.mochaEnlighterJSWrapper,.mootoolsEnlighterJS,.mootoolsEnlighterJSWrapper,.panicEnlighterJS,.panicEnlighterJSWrapper,.tuttiEnlighterJS,.tuttiEnlighterJSWrapper,.twilightEnlighterJS,.twilightEnlighterJSWrapper{font-family:Monaco,Courier,monospace}ol.gitEnlighterJS li,ul.gitEnlighterJS li{border:none;line-height:20px}ol.gitEnlighterJS.hoverEnabled li:hover,ul.gitEnlighterJS.hoverEnabled li:hover{background-color:#ffc;border:none}ol.gitEnlighterJS li.specialline,ul.gitEnlighterJS li.specialline{background-color:#fffff2}.gitEnlighterJS .de1,.gitEnlighterJS .de2{color:#CF6A4C}.gitEnlighterJS .kw1{color:#000;font-weight:700}.gitEnlighterJS .kw2{color:#0086b3}.gitEnlighterJS .kw3{color:#458;font-weight:700}.gitEnlighterJS .kw4{color:#990073}.gitEnlighterJS .co1,.gitEnlighterJS .co2{color:#998;font-style:italic}.gitEnlighterJS .st0,.gitEnlighterJS .st1,.gitEnlighterJS .st2{color:#d14}.gitEnlighterJS .nu0{color:#099}.gitEnlighterJS .me0,.gitEnlighterJS .me1{color:#0086b3}.gitEnlighterJS .br0,.gitEnlighterJS .es0,.gitEnlighterJS .sy0{color:#777}.gitEnlighterJS .re0{color:#009926}.gitEnlighterJSWrapper pre{background-color:#fff;font-size:12px;color:#000;line-height:20px}.gitEnlighterJSWrapper .EnlighterJSToolbar>a{border-radius:0}.gitEnlighterJSTabPane .controls{background-color:#f2f2f2;border:1px solid #eee;border-bottom-width:0}.gitEnlighterJSTabPane .controls ul{margin:0 0 0 35px}.gitEnlighterJSTabPane .controls li{border-radius:0}.gitEnlighterJSTabPane .controls li.selected{background-color:#e0e0e0}.gitEnlighterJSTabPane .gitEnlighterJS{border-top-color:#e0e0e0}.mochaEnlighterJSTabPane .controls li{background-color:#e5e5e5;font-size:12px;color:#000;border-radius:0}.mochaEnlighterJSTabPane .controls .selected,.mochaEnlighterJSTabPane .controls .selected:hover{background-color:#BBCCD5}span.mochaEnlighterJS{background-color:#2D2522;border:none}ol.mochaEnlighterJS,ul.mochaEnlighterJS{background-color:#BBCCD5}.mochaEnlighterJS{color:#f8f8f8}ol.mochaEnlighterJS li,ul.mochaEnlighterJS li{border:none;border-left:2px solid #939393;background-color:#2D2522;color:#000}ol.mochaEnlighterJS.hoverEnabled li:hover,ul.mochaEnlighterJS.hoverEnabled li:hover{background-color:#423F43;border:none;border-left:2px solid #939393}ol.mochaEnlighterJS li.specialline,ul.mochaEnlighterJS li.specialline{background-color:#423F43}.mochaEnlighterJS span{color:#f8f8f8}.mochaEnlighterJS .de1,.mochaEnlighterJS .de2{color:#CF6A4C}.mochaEnlighterJS .kw1{color:#CDA869}.mochaEnlighterJS .kw2{color:#CACD69}.mochaEnlighterJS .kw3{color:#afc4db}.mochaEnlighterJS .kw4{color:#CF6A4C}.mochaEnlighterJS .co1,.mochaEnlighterJS .co2{color:#5F5A60;font-style:italic}.mochaEnlighterJS .st0,.mochaEnlighterJS .st1{color:#8F9D6A}.mochaEnlighterJS .st2{color:#DDF2A4}.mochaEnlighterJS .nu0{color:#5B97B5}.mochaEnlighterJS .me0,.mochaEnlighterJS .me1{color:#C5AF75}.mochaEnlighterJS .br0,.mochaEnlighterJS .es0,.mochaEnlighterJS .sy0{color:#777}.mochaEnlighterJS .re0{color:#B55B8B}.mochaEnlighterJSWrapper pre{background-color:#2D2522;font-size:12px;color:#e0e0e0;line-height:14px;border-left:2px solid #939393}ol.mootoolsEnlighterJS li,ol.panicEnlighterJS li{border-left:1px solid #939393}.mochaEnlighterJSWrapper .EnlighterJSToolbar>a{border-radius:0;opacity:.8}.mochaEnlighterJSWrapper .EnlighterJSToolbar>a:hover{opacity:1}ol.mootoolsEnlighterJS li,ul.mootoolsEnlighterJS li{border-top:1px solid #fff;border-bottom:1px solid #fff}ol.mootoolsEnlighterJS.hoverEnabled li:hover,ul.mootoolsEnlighterJS.hoverEnabled li:hover{border-top:1px solid #eee;border-bottom:1px solid #eee;background-color:#F4F8FC}.mootoolsEnlighterJS .kw1{color:#1b609a}.mootoolsEnlighterJS .kw2{color:#9a6f1b}.mootoolsEnlighterJS .kw3{color:#784e0c}.mootoolsEnlighterJS .kw4{color:#9a6f1b}.mootoolsEnlighterJS .co1,.mootoolsEnlighterJS .co2{color:#888}.mootoolsEnlighterJS .st0,.mootoolsEnlighterJS .st1,.mootoolsEnlighterJS .st2{color:#489a1b}.mootoolsEnlighterJS .nu0{color:#70483d}.mootoolsEnlighterJS .me0,.mootoolsEnlighterJS .me1{color:#666}.mootoolsEnlighterJS .br0,.mootoolsEnlighterJS .es0,.mootoolsEnlighterJS .sy0{color:#444}.mootoolsEnlighterJS .re0{color:#784e0c}.mootoolsEnlighterJSWrapper pre{line-height:16px}.mootoolsEnlighterJSTabPane .controls li{border-radius:0}.mootoolsEnlighterJSTabPane .controls li.selected,.mootoolsEnlighterJSTabPane .controls li:hover{background-color:#e5e5e5}.panicEnlighterJSTabPane .controls li{background-color:#f2f2f2}.panicEnlighterJSTabPane .controls li:hover{background-color:#e5e5e5}.panicEnlighterJSTabPane .controls .selected,.panicEnlighterJSTabPane .controls .selected:hover{background-color:#E4F8FC}ol.panicEnlighterJS li,ul.panicEnlighterJS li{border-top:1px solid #fff;border-bottom:1px solid #fff}ol.panicEnlighterJS.hoverEnabled li:hover,ul.panicEnlighterJS.hoverEnabled li:hover{border-top:1px solid #eee;border-bottom:1px solid #eee;background-color:#F4F8FC}.panicEnlighterJS .de1,.panicEnlighterJS .de2{color:#A00083}.panicEnlighterJS .kw1,.panicEnlighterJS .kw2{color:#9F0050}.panicEnlighterJS .kw3{color:#9a6c00}.panicEnlighterJS .kw4{color:#9F0050}.panicEnlighterJS .co1,.panicEnlighterJS .co2{color:#00721F;font-style:italic}.panicEnlighterJS .st0{color:#EF7300}.panicEnlighterJS .st1,.panicEnlighterJS .st2{color:#8A000F}.panicEnlighterJS .nu0{color:#1600FF}.panicEnlighterJS .me0,.panicEnlighterJS .me1{color:#00417f}.panicEnlighterJS .br0,.panicEnlighterJS .es0,.panicEnlighterJS .sy0{color:#000}.panicEnlighterJS .re0{color:#8A000F}.panicEnlighterJSWrapper pre{background-color:#fff;font-size:12px;color:#000;line-height:16px}.panicEnlighterJSWrapper .EnlighterJSToolbar>a{border-radius:0}.tuttiEnlighterJSTabPane .controls li{background-color:#fff}.tuttiEnlighterJSTabPane .controls .selected,.tuttiEnlighterJSTabPane .controls .selected:hover,.tuttiEnlighterJSTabPane .controls li:hover{background-color:#F4F8FC}ol.tuttiEnlighterJS,ul.tuttiEnlighterJS{background-color:#fbfbfb}.tuttiEnlighterJS{color:#000}span.tuttiEnlighterJS{background-color:#f9f9f9;border:none}ol.tuttiEnlighterJS li,ul.tuttiEnlighterJS li{border:none;line-height:16px}ol.tuttiEnlighterJS.hoverEnabled li:hover,ul.tuttiEnlighterJS.hoverEnabled li:hover{background-color:#F4F8FC;color:#000;border:none}ol.tuttiEnlighterJS li.specialline,ul.tuttiEnlighterJS li.specialline{background-color:#F4F8FC}.tuttiEnlighterJS .de1,.tuttiEnlighterJS .de2{color:#6eb13f}.tuttiEnlighterJS .kw1{color:#8600c9}.tuttiEnlighterJS .kw2{color:#3a1d72;font-weight:700}.tuttiEnlighterJS .kw3,.tuttiEnlighterJS .kw4{color:#4F9FCF}.tuttiEnlighterJS .co1,.tuttiEnlighterJS .co2{color:#bbb}.tuttiEnlighterJS .st0,.tuttiEnlighterJS .st1,.tuttiEnlighterJS .st2{color:#bc670f;background-color:#fffdf7}.tuttiEnlighterJS .nu0{color:#6700b9}.tuttiEnlighterJS .me0{color:#000}.tuttiEnlighterJS .me1{color:#6eb13f;font-weight:700}.tuttiEnlighterJS .br0{color:#4f4f4f}.tuttiEnlighterJS .sy0{color:#626fc9}.tuttiEnlighterJS .es0{color:#4f4f4f}.tuttiEnlighterJS .re0{color:#d44950}.tuttiEnlighterJSWrapper pre{background-color:#fff;font-size:12px;color:#000;line-height:16px}.tuttiEnlighterJSWrapper .EnlighterJSToolbar>a{border-radius:0;opacity:.8;border:none;width:21px;height:21px}.tuttiEnlighterJSWrapper .EnlighterJSToolbar>a:HOVER{opacity:1}.twilightEnlighterJSTabPane .controls li{background-color:#303030;font-size:12px;color:#f2f2f2;border-radius:0}.twilightEnlighterJSTabPane .controls li:hover{color:#8F9657;background-color:#303030}.twilightEnlighterJSTabPane .controls .selected,.twilightEnlighterJSTabPane .controls .selected:hover{background-color:#000}span.twilightEnlighterJS{background-color:#141414;border:none}ol.twilightEnlighterJS,ul.twilightEnlighterJS{background-color:#f2f2f2;border:1px solid #222}.twilightEnlighterJS span{color:#f8f8f8}ol.twilightEnlighterJS li,ul.twilightEnlighterJS li{border:none;border-left:1px solid #939393;line-height:19px;background-color:#141414}ol.twilightEnlighterJS.hoverEnabled li:hover,ul.twilightEnlighterJS.hoverEnabled li:hover{background-color:#202021;border:none;border-left:1px solid #939393}ol.twilightEnlighterJS li.specialline,ul.twilightEnlighterJS li.specialline{background-color:#202021}.twilightEnlighterJS .de1,.twilightEnlighterJS .de2{color:#fff}.twilightEnlighterJS .kw1{color:#CDA869}.twilightEnlighterJS .kw2{color:#F9EE98}.twilightEnlighterJS .kw3{color:#6F87A8}.twilightEnlighterJS .kw4{color:#E96546}.twilightEnlighterJS .co1,.twilightEnlighterJS .co2{color:#5F5A60}.twilightEnlighterJS .st0,.twilightEnlighterJS .st1,.twilightEnlighterJS .st2{color:#8F9657}.twilightEnlighterJS .nu0{color:#CF6745}.twilightEnlighterJS .br0,.twilightEnlighterJS .es0,.twilightEnlighterJS .me0,.twilightEnlighterJS .me1,.twilightEnlighterJS .sy0{color:#fff}.twilightEnlighterJS .re0{color:#E57A27}.twilightEnlighterJSWrapper pre{background-color:#141414;font-size:12px;color:#f8f8f8;line-height:20px}.twilightEnlighterJSWrapper .EnlighterJSToolbar>a{border-radius:0;opacity:.8}.twilightEnlighterJSWrapper .EnlighterJSToolbar>a:hover{opacity:1} \ No newline at end of file diff --git a/EnlighterJS/Build/EnlighterJS.min.js b/EnlighterJS/Build/EnlighterJS.min.js new file mode 100644 index 0000000..85446ee --- /dev/null +++ b/EnlighterJS/Build/EnlighterJS.min.js @@ -0,0 +1,3 @@ +/*! EnlighterJS Syntax Highlighter 2.10.0 | MIT License (X11) | http://enlighterjs.org/ | November 17 2015 */ +!function(){var e=window.EnlighterJS=new Class({Implements:Options,options:{language:"generic",theme:"Enlighter",renderer:"Block",indent:-1,forceTheme:!1,rawButton:!0,windowButton:!0,infoButton:!0,ampersandCleanup:!0,rawcodeDoubleclick:!1},renderer:null,originalCodeblock:null,container:null,isRendered:!1,languageManager:null,rawContentContainer:null,output:null,textFilter:null,rawCode:null,initialize:function(t,n,a){this.setOptions(n),this.languageManager=new e.LanguageManager(this.options),this.textFilter=new e.TextFilter(this.options),this.renderer="Inline"==this.options.renderer?new e.Renderer.InlineRenderer(this.options,this.textFilter):new e.Renderer.BlockRenderer(this.options,this.textFilter),this.originalCodeblock=e.Dom.id(t),a&&(this.container=e.Dom.id(a))},enlight:function(t){if(t){var n=this.originalCodeblock.get("data-enlighter-language");if("no-highlight"==n)return;if(this.originalCodeblock.setStyle("display","none"),this.isRendered)return this.container.setStyle("display","inherit"),this;var a=this.languageManager.getLanguage(n),i=(this.options.forceTheme?null:this.originalCodeblock.get("data-enlighter-theme"))||this.options.theme||"Enlighter",s=new e.SpecialLineHighlighter(this.originalCodeblock.get("data-enlighter-highlight"),this.originalCodeblock.get("data-enlighter-lineoffset")),r=new e.Language[a](this.getRawCode(!0));this.output=this.renderer.render(r,s,{lineOffset:this.originalCodeblock.get("data-enlighter-lineoffset")||null,lineNumbers:this.originalCodeblock.get("data-enlighter-linenumbers")}),this.output.addClass(i.toLowerCase()+"EnlighterJS").addClass("EnlighterJS"),"Block"==this.options.renderer?(this.container||(this.container=new e.Dom.Element("div"),this.container.inject(this.originalCodeblock,"after")),this.container.addClass("EnlighterJSWrapper").addClass(i.toLowerCase()+"EnlighterJSWrapper"),this.container.grab(this.output),this.rawContentContainer=new e.Dom.Element("pre",{text:this.getRawCode(!1),styles:{display:"none"}}),this.container.grab(this.rawContentContainer),this.options.rawcodeDoubleclick&&this.container.addEvent("dblclick",function(){this.toggleRawCode()}.bind(this)),(this.options.rawButton||this.options.windowButton||this.options.infoButton)&&this.container.grab(new e.UI.Toolbar(this))):this.container?this.container.grab(this.output):(this.output.inject(this.originalCodeblock,"after"),this.container=this.output),this.isRendered=!0}else this.isRendered&&(this.originalCodeblock.setStyle("display","inherit"),this.container.setStyle("display","none"));return this},dispose:function(){this.isRendered&&(this.originalCodeblock.setStyle("display",null),this.container.setStyle("display","none"),this.rawContentContainer.setStyle("display","none"),this.container.dispose(),this.rawContentContainer.dispose(),this.container=null,this.rawContentContainer=null,this.isRendered=!1)},getRawCode:function(e){var t=this.rawCode;if(null==t&&(t=this.originalCodeblock.get("html"),t=t.replace(/(^\s*\n|\n\s*$)/gi,""),t=this.textFilter.filterInput(t),this.options.ampersandCleanup===!0&&(t=t.replace(/&/gim,"&")),t=t.replace(/</gim,"<").replace(/>/gim,">").replace(/ /gim," "),this.rawCode=t),e===!0){var n=this.options.indent.toInt();n>-1&&(t=t.replace(/(\t*)/gim,function(e,t){return new Array(n*t.length+1).join(" ")}))}return t},toggleRawCode:function(e){null!=this.output&&("boolean"!=typeof e&&(e="none"==this.rawContentContainer.getStyle("display")),e?(this.output.setStyle("display","none"),this.rawContentContainer.setStyle("display","block")):(this.output.setStyle("display","block"),this.rawContentContainer.setStyle("display","none")))},light:function(){return this.enlight(!0)},unlight:function(){return this.enlight(!1)}});e.Language={},e.Tokenizer={},e.Renderer={},e.Util={},e.UI={},e.TextFilter=new Class({Implements:Options,options:{cryptex:{enabled:!1,email:"protected.email@example.tld"}},initialize:function(e){this.setOptions(e)},filterOutput:function(e){return e},filterInput:function(e){return this.options.cryptex.enabled===!0&&(e=e.replace(//gim,function(e,t,n){return n&&n.length>2&&"undefined"!=typeof window.Cryptex?window.Cryptex.decode(n):this.options.cryptex.email}.bind(this))),e}}),e.Dom={getElement:function(e){return document.getElement(e)},getElements:function(e){return document.getElements(e)},id:function(e){return document.id(e)}},e.Dom.Element=Element,e.SpecialLineHighlighter=new Class({specialLines:{},initialize:function(e,t){if(null!=e&&0!=e.length){var n=null!=t&&t.toInt()>1?t.toInt()-1:0,a=e.split(",");a.each(function(e){var t=e.match(/([0-9]+)-([0-9]+)/);if(null!=t){var a=t[1].toInt()-n,i=t[2].toInt()-n;if(i>a)for(var s=a;i>=s;s++)this.specialLines["l"+s]=!0}else this.specialLines["l"+(e.toInt()-n)]=!0}.bind(this))}},isSpecialLine:function(e){return this.specialLines["l"+e]||!1}}),e.LanguageManager=new Class({Implements:Options,options:{language:"generic"},initialize:function(e){this.setOptions(e)},languageAliases:{standard:"generic",js:"javascript",md:"markdown","c++":"cpp",c:"cpp",styles:"css",bash:"shell",py:"python",html:"xml",jquery:"javascript",mootools:"javascript","ext.js":"javascript","c#":"csharp",conf:"ini"},getLanguage:function(t){var n=null!=this.options.language?this.options.language.trim().toLowerCase():"";return this.languageAliases[n]&&(n=this.languageAliases[n]),""!=n.trim()&&e.Language[n]||(n="generic"),null==t||""==t.trim()?n:(t=t.trim().toLowerCase(),this.languageAliases[t]&&(t=this.languageAliases[t]),e.Language[t]?t:n)}}),e.Renderer.InlineRenderer=new Class({Implements:Options,options:{inlineContainerTag:"span"},textFilter:null,initialize:function(e,t){this.setOptions(e),this.textFilter=t},render:function(t){var n=new e.Dom.Element(this.options.inlineContainerTag);return t.getTokens().each(function(t){n.grab(new e.Dom.Element("span",{"class":t.alias,text:this.textFilter.filterOutput(t.text)}))},this),n}}),e.Renderer.BlockRenderer=new Class({Implements:Options,options:{hover:"hoverEnabled",oddClassname:"odd",evenClassname:"even",showLinenumbers:!0},textFilter:null,initialize:function(e,t){this.setOptions(e),this.textFilter=t},render:function(t,n,a){var i=e.Dom.Element,s=null;s=new i(null!=a.lineNumbers?"true"===a.lineNumbers.toLowerCase()?"ol":"ul":this.options.showLinenumbers?"ol":"ul"),(a.lineNumbers||this.options.showLinenumbers)&&a.lineOffset&&a.lineOffset.toInt()>1&&s.set("start",a.lineOffset);var r=1,o=t.getTokens(),l=" "+this.options.oddClassname||"",c=" "+this.options.evenClassname||"",g=new i("li",{"class":(n.isSpecialLine(r)?"specialline":"")+l}),u=function(e,t){g.grab(new i("span",{"class":e,text:this.textFilter.filterOutput(t)}))}.bind(this);return Array.each(o,function(e){var t=e.text.split("\n");t.length>1?(u(e.alias,t.shift()),Array.each(t,function(t){s.grab(g),r++,g=new i("li",{"class":(n.isSpecialLine(r)?"specialline":"")+(r%2==0?c:l)}),u(e.alias,t)})):u(e.alias,e.text)}),s.grab(g),this.options.hover&&"NULL"!=this.options.hover&&s.addClass(this.options.hover),s}}),e.Tokenizer.Standard=new Class({initialize:function(){},getTokens:function(e,t){var n=function(e,t,n){return{text:e,alias:t,index:n,length:e.length,end:e.length+n}},a=this.getPreprocessedTokens(n);Array.each(e.getRules(),function(e){for(var i;i=e.pattern.exec(t);)if(e.pattern.lastIndex=i.index+1,1==i.length)a.push(n(i[0],e.alias,i.index));else for(var s=1;s0&&a.push(n(i[s],e.alias,i.index+i[0].indexOf(i[s])))}),a=a.sort(function(e,t){return e.index-t.index});for(var i=[],s=0,r=0;r=s){r=l-1,o=!0;break}if(o===!1)break}return s))/gi,a=/\b([\w:-]+)([ \t]*)(=)([ \t]*)(['"][^'"]+['"]|[^'" \t]+)/gi,i=null,s=null,r=0;null!=(i=n.exec(this.code));){for(t.push(e(i[1],"kw1",i.index));null!=(s=a.exec(i[2]));)r=i.index+i[1].length+s.index,t.push(e(s[1],"kw2",r)),r+=s[1].length+s[2].length,t.push(e(s[3],"kw1",r)),r+=s[3].length+s[4].length,t.push(e(s[5],"st0",r));t.push(e(i[3],"kw1",i.index+i[1].length+i[2].length))}return t}}),e.UI.CodeWindow=function(e){e=e.replace(/&/gim,"&").replace(//gim,">");var t=window.open("","","width="+(window.screen.width-200)+", height="+(screen.height-300)+", menubar=no, titlebar=no, toolbar=no, top=100, left=100, scrollbars=yes, status=no");t.document.body.innerHTML="
"+e+"
",t.document.title="EnlighterJS Sourcecode"},e.UI.Toolbar=new Class({Implements:Options,options:{toolbar:{rawTitle:"Toggle RAW Code",windowTitle:"Open Code in new Window",infoTitle:"EnlighterJS Syntax Highlighter"}},container:null,initialize:function(t){this.setOptions(t.options),this.container=new e.Dom.Element("div",{"class":"EnlighterJSToolbar"}),this.options.infoButton&&this.container.grab(new e.Dom.Element("a",{"class":"EnlighterJSInfoButton",title:this.options.toolbar.infoTitle,events:{click:function(){window.open("http://enlighterjs.andidittrich.de")}.bind(this)}})),this.options.rawButton&&this.container.grab(new e.Dom.Element("a",{"class":"EnlighterJSRawButton",title:this.options.toolbar.rawTitle,events:{click:function(){t.toggleRawCode()}.bind(this)}})),this.options.windowButton&&this.container.grab(new e.Dom.Element("a",{"class":"EnlighterJSWindowButton",title:this.options.toolbar.windowTitle,events:{click:function(){e.UI.CodeWindow(t.getRawCode(!1))}.bind(this)}})),this.container.grab(new e.Dom.Element("span",{"class":"clear"}))},toElement:function(){return this.container}}),Element.implement({enlight:function(t){t="undefined"==typeof t?{}:t,t=t===!0?{}:t;var n=this.retrieve("EnlighterInstance");return"dispose"===t&&n?(n.dispose(),this.eliminate("EnligterInstance"),this):(t===!1?null!==n&&n.enlight(!1):(null===n&&(n=new e(this,t,null),this.store("EnlighterInstance",n)),n.enlight(t)),this)},light:function(e){return this.enlight(e)},unlight:function(){return this.enlight(!1)}}),e.Util.Helper=function(t,n){if(!(null==t||t.length&&0==t.length))if(n=n||{},n.grouping&&n.grouping===!1)t.enlight(n);else{var a={},i=[];Array.each(t,function(e){var t=e.get("data-enlighter-group");t?a[t]?a[t].push(e):a[t]=[e]:i.push(e)}),i.each(function(e){e.enlight(n)}),Object.each(a,function(t){var a=Object.clone(n);a.forceTheme=!0,a.theme=t[0].get("data-enlighter-theme")||n.theme||"Enlighter";var i=new e.UI.TabPane(a.theme);Array.each(t,function(t){var n=i.addTab(t.get("data-enlighter-title")||t.get("data-enlighter-language")||a.language);new e(t,a,n).enlight(!0)}.bind(this)),i.getContainer().inject(t[0],"before"),i.selectTab(0)}.bind(this))}},e.UI.TabPane=new Class({container:null,controlContainer:null,paneContainer:null,tabs:[],selectedTabIndex:0,initialize:function(t){this.container=new e.Dom.Element("div",{"class":"EnlighterJSTabPane "+t.toLowerCase()+"EnlighterJSTabPane"}),this.controlContainer=new e.Dom.Element("ul"),this.paneContainer=new e.Dom.Element("div",{"class":"pane"});var n=new e.Dom.Element("div",{"class":"controls"});n.grab(this.controlContainer),this.container.grab(n),this.container.grab(this.paneContainer)},selectTab:function(e){e/g,alias:"sy0"}}}}),e.Language.cpp=new Class({Extends:e.Language.generic,setupLanguage:function(){this.keywords={cpp:{csv:"and,and_eq,asm,auto,bitand,bitor,bool,break,case,catch,char,class,compl,const,const_cast,continue,default,delete,do,double,dynamic_cast,else,enum,explicit,export,extern,false,float,for,friend,goto,if,inline,int,long,mutable,namespace,new,not,not_eq,operator,or,or_eq,private,protected,public,register,reinterpret_cast,return,short,signed,sizeof,static,static_cast,struct,switch,template,this,throw,true,try,typedef,typeid,typename,union,unsigned,using,virtual,void,volatile,wchar_t,while,xor,xor_eq",alias:"kw1"},cppX11:{csv:"alignas,alignof,char16_t,char32_t,constexpr,decltype,noexcept,nullptr,static_assert,thread_local",alias:"kw4"},directives:{csv:"__LINE__,__FILE__,__DATE__,__TIME__,__cplusplus",alias:"kw2"}},this.patterns={slashComments:{pattern:this.common.slashComments,alias:"co1"},multiComments:{pattern:this.common.multiComments,alias:"co2"},chars:{pattern:this.common.singleQuotedString,alias:"st0"},strings:{pattern:this.common.doubleQuotedString,alias:"st1"},annotation:{pattern:/@[\W\w_][\w\d_]+/gm,alias:"st1"},numbers:{pattern:/\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim,alias:"nu0"},properties:{pattern:this.common.properties,alias:"me0"},brackets:{pattern:this.common.brackets,alias:"br0"},functionCalls:{pattern:this.common.functionCalls,alias:"de1"},directives:{pattern:/#.*$/gm,alias:"kw2"}}}}),e.Language.csharp=new Class({Extends:e.Language.generic,setupLanguage:function(){this.keywords={reserved:{csv:"as, base, break, case, catch, checked, continue, default, do, else, event, explicit, false, finally, fixed, for, foreach, goto, if, implicit, internal, is, lock, namespace, new, null, operator, params, private, protected, public, ref, return, sizeof, stackalloc, switch, this, throw, true, try, typeof, unchecked, using, void, while",alias:"kw1"},keywords:{csv:"abstract, async, class, const, delegate, dynamic, event, extern, in, interface, out, override, readonly, sealed, static, unsafe, virtual, volatile",alias:"kw3"},primitives:{csv:"bool, byte, char, decimal, double, enum, float, int, long, sbyte, short, struct, uint, ulong, ushort, object, string",alias:"kw2"},internal:{csv:"System",alias:"kw4"}},this.patterns={slashComments:{pattern:this.common.slashComments,alias:"co1"},multiComments:{pattern:this.common.multiComments,alias:"co2"},chars:{pattern:this.common.singleQuotedString,alias:"st0"},strings:{pattern:this.common.doubleQuotedString,alias:"st1"},numbers:{pattern:/\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim,alias:"nu0"},brackets:{pattern:this.common.brackets,alias:"br0"},functionCalls:{pattern:this.common.functionCalls,alias:"me0"},methodCalls:{pattern:this.common.methodCalls,alias:"me1"}}}}),e.Language.diff=new Class({Extends:e.Language.generic,setupLanguage:function(){this.keywords={},this.patterns={comments:{pattern:/^((---|\+\+\+) .*)/gm,alias:"co1"},stats:{pattern:/^(@@.*@@\s*)/gm,alias:"nu0"},add:{pattern:/^(\+.*)/gm,alias:"re0"},del:{pattern:/^(-.*)/gm,alias:"st0"}}}}),e.Language.ini=new Class({Extends:e.Language.generic,setupLanguage:function(){this.keywords={},this.patterns={singleLineComments:{pattern:/(;.*)$/gm,alias:"co1"},section:{pattern:/^\s*?(\[.*\])\s*?$/gm,alias:"kw4"},directive:{pattern:/^\s*?[a-z0-9\._-]+\s*?=/gim,alias:"kw1"},"boolean":{pattern:/\b(true|false|on|off|yes|no)\b/gim,alias:"kw2"},strings:{pattern:this.common.doubleQuotedString,alias:"st1"},numbers:{pattern:/\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)[a-z]*?\b/gim,alias:"nu0"},brackets:{pattern:this.common.brackets,alias:"br0"}}}}),e.Language.java=new Class({Extends:e.Language.generic,setupLanguage:function(){this.keywords={reserved:{csv:"continue, for, new, switch, assert, default, goto, synchronized, do, if, this, break, throw, else, throws, case, instanceof, return, transient, catch, try, final, finally, strictfp, volatile, const, native, super, while",alias:"kw1"},keywords:{csv:"abstract, package, private, implements, protected, public, import, extends, interface, static, void, class",alias:"kw3"},primitives:{csv:"byte, short, int, long, float, double, boolean, char, String",alias:"kw2"},internal:{csv:"System",alias:"kw4"}},this.patterns={slashComments:{pattern:this.common.slashComments,alias:"co1"},multiComments:{pattern:this.common.multiComments,alias:"co2"},chars:{pattern:this.common.singleQuotedString,alias:"st0"},strings:{pattern:this.common.doubleQuotedString,alias:"st1"},annotation:{pattern:/@[\W\w_][\w\d_]+/gm,alias:"st1"},numbers:{pattern:/\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim,alias:"nu0"},properties:{pattern:this.common.properties,alias:"me0"},brackets:{pattern:this.common.brackets,alias:"br0"},functionCalls:{pattern:this.common.functionCalls,alias:"kw1"}}}}),e.Language.javascript=new Class({Extends:e.Language.generic,setupLanguage:function(){this.keywords={commonKeywords:{csv:"as, break, case, catch, continue, delete, do, else, eval, finally, for, if, in, is, instanceof, return, switch, this, throw, try, typeof, void, while, write, with",alias:"kw1"},langKeywords:{csv:"class, const, default, debugger, export, extends, false, function, import, namespace, new, null, package, private, protected, public, super, true, use, var",alias:"kw2"},windowKeywords:{csv:"alert, confirm, open, print, prompt",alias:"kw3"}},this.patterns={slashComments:{pattern:this.common.slashComments,alias:"co1"},multiComments:{pattern:this.common.multiComments,alias:"co2"},strings:{pattern:this.common.strings,alias:"st0"},methodCalls:{pattern:this.common.properties,alias:"me0"},brackets:{pattern:this.common.brackets,alias:"br0"},numbers:{pattern:/\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+)\b/gi,alias:"nu0"},regex:{pattern:this.delimToRegExp("/","\\","/","g","[gimy]*"),alias:"re0"},symbols:{pattern:/\+|-|\*|\/|%|!|@|&|\||\^|\<|\>|=|,|\.|;|\?|:/g,alias:"sy0"}},this.delimiters={start:this.strictRegExp('")}}}),e.Language.json=new Class({Extends:e.Language.generic,setupLanguage:function(){this.keywords={values:{csv:"true, false, null",alias:"kw2"}},this.patterns={keys:{pattern:/("[^"\\\r\n]+?")\s*?:/gi,alias:"kw1"},strings:{pattern:this.common.strings,alias:"st0"},brackets:{pattern:this.common.brackets,alias:"br0"},numbers:{pattern:/\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+)\b/gi,alias:"nu0"},symbols:{pattern:/,|:/g,alias:"sy0"}},this.delimiters={}}}),e.Language.lua=new Class({Extends:e.Language.generic,setupLanguage:function(){this.keywords={reserved:{csv:"and,break,do,else,elseif,end,for,function,if,in,local,or,repeat,return,not,then,until,while",alias:"kw1"},values:{csv:"false,nil,true",alias:"kw2"}},this.patterns={multiLineComments:{pattern:/--\[\[[\s\S]*?]]/g,alias:"co1"},singleLineComments:{pattern:/(--.*)$/gm,alias:"co1"},specialComments:{pattern:/---\[\[[\s\S]*?(]])/g,alias:"co1"},strings:{pattern:this.common.strings,alias:"st0"},mlstring:{pattern:/(\[(=*)\[[\S\s]*?]\2])/g,alias:"st1"},brackets:{pattern:this.common.brackets,alias:"br0"},numbers:{pattern:/\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?)/gim,alias:"nu0"},functionCalls:{pattern:this.common.functionCalls,alias:"me0"},methodCalls:{pattern:this.common.methodCalls,alias:"me1"}}}}),e.Language.matlab=new Class({Extends:e.Language.generic,setupLanguage:function(){this.keywords={kw:{csv:"__FILE__,__LINE__,break,case,catch,classdef,continue,do,else,elseif,end,end_try_catch,end_unwind_protect,endclassdef,endenumeration,endevents,endfor,endfunction,endif,endmethods,endparfor,endproperties,endswitch,endwhile,enumeration,events,for,function,global,if,methods,otherwise,parfor,persistent,properties,return,static,switch,try,until,unwind_protect,unwind_protect_cleanup,while",alias:"kw1",mod:"gi"},"const":{csv:"true, false",alias:"kw3",mod:"gi"}},this.patterns={lineComments:{pattern:/%.*$/gm,alias:"co1"},blockComments:{pattern:/%%.*$/gm,alias:"co2"},fn:{pattern:this.common.functionCalls,alias:"me0"},fn2:{pattern:/\b([\w]+)\s*;/gm,alias:"me0"},me:{pattern:this.common.methodCalls,alias:"me1"},brackets:{pattern:this.common.brackets,alias:"br0"},strings:{pattern:this.common.singleQuotedString,alias:"st0"},numbers:{pattern:this.common.numbers,alias:"nu0"},fhandle:{pattern:/(@[\w]+)\s*/gm,alias:"kw3"},symbols:{pattern:/\+|-|\*|\/|%|!|@|&|\||\^|<|>|=|,|\.|;|\?|:|\[|]/g,alias:"sy0"},classdef:{pattern:/classdef\s+(\w+(?:\s*<\s*\w+)?)\s*$/gim,alias:"kw4"}}}}),e.Language.markdown=new Class({Extends:e.Language.generic,setupLanguage:function(){this.patterns={header1:{pattern:/^(.+)\n=+\n/gim,alias:"st1"},header2:{pattern:/^(.+)\n-+\n/gim,alias:"st2"},header3:{pattern:/[#]{1,6}.*/gim,alias:"st0"},ul:{pattern:/^\*\s*.*/gim,alias:"kw1"},ol:{pattern:/^\d+\..*/gim,alias:"kw1"},italics:{pattern:/\*.*?\*/g,alias:"kw3"},bold:{pattern:/\*\*.*?\*\*/g,alias:"kw3"},url:{pattern:/\[[^\]]*\]\([^\)]*\)/g,alias:"kw4"}}}}),e.Language.nsis=new Class({Extends:e.Language.generic,setupLanguage:function(){this.keywords={commands:{csv:"Function, PageEx, Section, SectionGroup, SubSection, Abort, AddBrandingImage, AddSize, AllowRootDirInstall, AllowSkipFiles, AutoCloseWindow, BGFont, BGGradient, BrandingText, BringToFront, Call, CallInstDLL, Caption, ChangeUI, CheckBitmap, ClearErrors, CompletedText, ComponentText, CopyFiles, CRCCheck, CreateDirectory, CreateFont, CreateShortCut, Delete, DeleteINISec, DeleteINIStr, DeleteRegKey, DeleteRegValue, DetailPrint, DetailsButtonText, DirText, DirVar, DirVerify, EnableWindow, EnumRegKey, EnumRegValue, Exch, Exec, ExecShell, ExecWait, ExpandEnvStrings, File, FileBufSize, FileClose, FileErrorText, FileOpen, FileRead, FileReadByte, FileReadUTF16LE, FileReadWord, FileSeek, FileWrite, FileWriteByte, FileWriteUTF16LE, FileWriteWord, FindClose, FindFirst, FindNext, FindWindow, FlushINI, FunctionEnd, GetCurInstType, GetCurrentAddress, GetDlgItem, GetDLLVersion, GetDLLVersionLocal, GetErrorLevel, GetFileTime, GetFileTimeLocal, GetFullPathName, GetFunctionAddress, GetInstDirError, GetLabelAddress, GetTempFileName, Goto, HideWindow, Icon, IfAbort, IfErrors, IfFileExists, IfRebootFlag, IfSilent, InitPluginsDir, InstallButtonText, InstallColors, InstallDir, InstallDirRegKey, InstProgressFlags, InstType, InstTypeGetText, InstTypeSetText, IntCmp, IntCmpU, IntFmt, IntOp, IsWindow, LangString, LicenseBkColor, LicenseData, LicenseForceSelection, LicenseLangString, LicenseText, LoadLanguageFile, LockWindow, LogSet, LogText, ManifestDPIAware, ManifestSupportedOS, MessageBox, MiscButtonText, Name, Nop, OutFile, Page, PageCallbacks, PageExEnd, Pop, Push, Quit, ReadEnvStr, ReadINIStr, ReadRegDWORD, ReadRegStr, Reboot, RegDLL, Rename, RequestExecutionLevel, ReserveFile, Return, RMDir, SearchPath, SectionEnd, SectionGetFlags, SectionGetInstTypes, SectionGetSize, SectionGetText, SectionGroupEnd, SectionIn, SectionSetFlags, SectionSetInstTypes, SectionSetSize, SectionSetText, SendMessage, SetAutoClose, SetBrandingImage, SetCompress, SetCompressor, SetCompressorDictSize, SetCtlColors, SetCurInstType, SetDatablockOptimize, SetDateSave, SetDetailsPrint, SetDetailsView, SetErrorLevel, SetErrors, SetFileAttributes, SetFont, SetOutPath, SetOverwrite, SetPluginUnload, SetRebootFlag, SetRegView, SetShellVarContext, SetSilent, ShowInstDetails, ShowUninstDetails, ShowWindow, SilentInstall, SilentUnInstall, Sleep, SpaceTexts, StrCmp, StrCmpS, StrCpy, StrLen, SubCaption, SubSectionEnd, Unicode, UninstallButtonText, UninstallCaption, UninstallIcon, UninstallSubCaption, UninstallText, UninstPage, UnRegDLL, Var, VIAddVersionKey, VIFileVersion, VIProductVersion, WindowIcon, WriteINIStr, WriteRegBin, WriteRegDWORD, WriteRegExpandStr, WriteRegStr, WriteUninstaller, XPStyle",alias:"kw1"},states:{csv:"admin, all, auto, both, colored, false, force, hide, highest, lastused, leave, listonly, none, normal, notset, off, on, open, print, show, silent, silentlog, smooth, textonly, true, user",alias:"kw2"},statics:{csv:"ARCHIVE, FILE_ATTRIBUTE_ARCHIVE, FILE_ATTRIBUTE_NORMAL, FILE_ATTRIBUTE_OFFLINE, FILE_ATTRIBUTE_READONLY, FILE_ATTRIBUTE_SYSTEM, FILE_ATTRIBUTE_TEMPORARY, HKCR, HKCU, HKDD, HKEY_CLASSES_ROOT, HKEY_CURRENT_CONFIG, HKEY_CURRENT_USER, HKEY_DYN_DATA, HKEY_LOCAL_MACHINE, HKEY_PERFORMANCE_DATA, HKEY_USERS, HKLM, HKPD, HKU, IDABORT, IDCANCEL, IDIGNORE, IDNO, IDOK, IDRETRY, IDYES, MB_ABORTRETRYIGNORE, MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON3, MB_DEFBUTTON4, MB_ICONEXCLAMATION, MB_ICONINFORMATION, MB_ICONQUESTION, MB_ICONSTOP, MB_OK, MB_OKCANCEL, MB_RETRYCANCEL, MB_RIGHT, MB_RTLREADING, MB_SETFOREGROUND, MB_TOPMOST, MB_USERICON, MB_YESNO, NORMAL, OFFLINE, READONLY, SHCTX, SHELL_CONTEXT, SYSTEM, TEMPORARY",alias:"kw3"}},this.patterns={brackets:{pattern:this.common.brackets,alias:"br0"},commentMultiline:{pattern:this.common.multiComments,alias:"co2"},commentPound:{pattern:this.common.poundComments,alias:"co1"},commentSemicolon:{pattern:/;.*$/gm,alias:"co1"},compilerFlags:{pattern:/(!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|makensis|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning))/g,alias:"kw2"},defines:{pattern:/[\$]\{{1,2}[0-9a-zA-Z_][\w]*[\}]/gim,alias:"kw4"},jumps:{pattern:/([(\+|\-)]([0-9]+))/g,alias:"nu0"},langStrings:{pattern:/[\$]\({1,2}[0-9a-zA-Z_][\w]*[\)]/gim,alias:"kw3"},escapeChars:{pattern:/([\$]\\(n|r|t|[\$]))/g,alias:"kw4"},numbers:{pattern:/\b((([0-9]+)?\.)?[0-9_]+([e][\-+]?[0-9]+)?|0x[A-F0-9]+)\b/gi,alias:"nu0"},pluginCommands:{pattern:/(([0-9a-zA-Z_]+)[:{2}]([0-9a-zA-Z_]+))/g,alias:"kw2"},strings:{pattern:this.common.strings,alias:"st0"},variables:{pattern:/[\$]{1,2}[0-9a-zA-Z_][\w]*/gim,alias:"kw4"}}}}),EnlighterJS.Language.php=new Class({Extends:EnlighterJS.Language.generic,tokenizerType:"Standard",setupLanguage:function(){this.keywords={keywords:{csv:"__halt_compiler,abstract,and,as,break,callable,case,catch,class,clone,const,continue,declare,default,do,else,elseif,enddeclare,endfor,endforeach,endif,endswitch,endwhile,extends,final,finally,function,global,goto,implements,instanceof,insteadof,interface,namespace,new,or,private,protected,public,static,throw,trait,try,use,var,xor,yield", +alias:"kw1"},reserved:{csv:"int,float,bool,string,true,false,null,resource,object,mixed,numeric",alias:"kw4",mod:"gi"}},this.patterns={keywordsFn:{pattern:/(require_once|include_once|array|die|exit|echo|print|empty|eval|include|isset|list|require|unset|if|switch|while|foreach|for|return)(?:\s*\(|\s+)?/gi,alias:"kw1"},inherit:{pattern:/(self|parent|\$this)/gi,alias:"kw4"},slashComments:{pattern:this.common.slashComments,alias:"co1"},multiComments:{pattern:this.common.multiComments,alias:"co2"},dqStrings:{pattern:this.common.multiLineDoubleQuotedStrings,alias:"st0"},sqStrings:{pattern:this.common.multiLineSingleQuotedStrings,alias:"st1"},heredocs:{pattern:/(<<<\s*?('?)([A-Z0-9]+)\2[^\n]*?\n[\s\S]*?\n\3(?![A-Z0-9\s]))/gim,alias:"st1"},numbers:{pattern:/\b((([0-9]+)?\.)?[0-9_]+([e][\-+]?[0-9]+)?|0x[A-F0-9]+)\b/gi,alias:"nu0"},variables:{pattern:/\$[A-Z_][\w]*/gim,alias:"kw3"},functions:{pattern:this.common.functionCalls,alias:"me0"},methods:{pattern:/(?:->|::)([\w]+)/gim,alias:"me1"},constants:{pattern:/\b[A-Z][A-Z0-9_]+[A-Z]\b/g,alias:"kw4"},lconstants:{pattern:/\b__[A-Z][A-Z0-9_]+__\b/g,alias:"re0"},brackets:{pattern:this.common.brackets,alias:"br0"},symbols:{pattern:/!|@|&|<|>|=|=>|-|\+/g,alias:"sy0"}},this.delimiters={start:this.strictRegExp("")}}}),e.Language.python=new Class({Extends:e.Language.generic,setupLanguage:function(){this.keywords={reserved:{csv:"and, del, from, not, while, as, elif, global, or, with, assert, else, if, pass, yield, break, except, import, print, class, exec, in, raise, continue, finally, is, return, def, for, lambda, try",alias:"kw1"},functions:{csv:"__import__, abs, all, any, apply, bin, callable, chr, cmp, coerce, compile, delattr, dir, divmod, eval, execfile, filter, format, getattr, globals, hasattr, hash, hex, id, input, intern, isinstance, issubclass, iter, len, locals, map, max, min, next, oct, open, ord, pow, print, range, raw_input, reduce, reload, repr, round, setattr, sorted, sum, unichr, vars, zip",alias:"kw2"},classes:{csv:"ArithmeticError, AssertionError, AttributeError, BaseException, BufferError, BytesWarning, DeprecationWarning, EOFError, EnvironmentError, Exception, FloatingPointError, FutureWarning, GeneratorExit, IOError, ImportError, ImportWarning, IndentationError, IndexError, KeyError, KeyboardInterrupt, LookupError, MemoryError, NameError, NotImplementedError, OSError, OverflowError, PendingDeprecationWarning, ReferenceError, RuntimeError, RuntimeWarning, StandardError, StopIteration, SyntaxError, SyntaxWarning, SystemError, SystemExit, TabError, TypeError, UnboundLocalError, UnicodeDecodeError, UnicodeEncodeError, UnicodeError, UnicodeTranslateError, UnicodeWarning, UserWarning, ValueError, Warning, ZeroDivisionError, basestring, bool, buffer, bytearray, bytes, classmethod, complex, dict, enumerate, file, float, frozenset, int, list, long, object, property, reversed, set, slice, staticmethod, str, super, tuple, type, unicode, xrange",alias:"kw2"}},this.patterns={poundComments:{pattern:this.common.poundComments,alias:"co1"},multiStringComments1:{pattern:/"""[\s\S]*?"""/gm,alias:"co2"},multiStringComments2:{pattern:/'''[\s\S]*?'''/gm,alias:"co2"},strings:{pattern:this.common.strings,alias:"st0"},tickStrings:{pattern:this.delimToRegExp("`","\\","`","gm"),alias:"st0"},delimString:{pattern:/(%[q|Q|x]?(\W)[^\2\\\n]*(?:\\.[^\2\\]*)*(\2|\)|\]|\}))/gm,alias:"st1"},heredoc:{pattern:/(<<(\'?)([A-Z0-9]+)\2[^\n]*?\n[\s\S]*\n\3(?![\w]))/gim,alias:"st2"},variables:{pattern:/(@[A-Za-z_][\w]*|@@[A-Za-z_][\w]*|\$(?:\-[\S]|[\w]+)|\b[A-Z][\w]*)/g,alias:"kw3"},rubySymbols:{pattern:/[^:](:[\w]+)/g,alias:"kw4"},constants:{pattern:/\b[A-Z][\w]*/g,alias:"kw3"},numbers:{pattern:/\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim,alias:"nu0"},properties:{pattern:this.common.properties,alias:"me0"},brackets:{pattern:this.common.brackets,alias:"br0"},delimRegex:{pattern:/(%r(\W)[^\2\\\n]*(?:\\.[^\2\\\n]*?)*(\2|\)|\]|\})[iomx]*)/gm,alias:"re0"},literalRegex:{pattern:this.delimToRegExp("/","\\","/","g","[iomx]*"),alias:"re0"}}}}),e.Language.cython=new Class({Extends:e.Language.python,setupLanguage:function(){this.parent(),this.keywords.reserved.csv+=", __all__, include, cimport, pyximport, cythonize, cdef, cpdef, ctypedef, property, IF, ELIF, ELSE, DEF",this.keywords.functions.csv+=", __dealloc__, __get__, __init__, fopen",this.keywords.classes.csv+=", PyErr_Fetch, PyErr_Occurred, PyErr_WarnEx, char, double, extern, namespace, public, struct, void, union, unsigned, enum"}}),e.Language.raw=new Class({Extends:e.Language.generic,initialize:function(e){this.code=e},getTokens:function(){var e=function(e,t,n){return{text:e,alias:t,index:n,length:e.length,end:e.length+n}};return[e(this.code,"",0)]}}),e.Language.ruby=new Class({Extends:e.Language.generic,setupLanguage:function(){this.keywords={reserved:{csv:"__FILE__, __LINE__, alias, and, BEGIN, begin, break, case, class, def, defined, do, else, elsif, END, end, ensure, false, for, if, in, module, next, nil, not, or, redo, rescue, retry, return, self, super, then, true, undef, unless, until, when, while, yield",alias:"kw1"},functions:{csv:"abort, at_exit, autoload, binding, block_given, callcc, caller, catch, chomp, chop, eval, exec, exit, exit!, fail, fork, format, gets, global_variables, gsub, lambda, proc, load, local_variables, loop, open, p, print, proc, putc, puts, raise, fail, rand, readline, readlines, require, scan, select, set_trace_func, sleep, split, sprintf, format, srand, syscall, system, sub, test, throw, trace_var, trap, untrace_var",alias:"kw2"},classes:{csv:"Abbrev, ArgumentError, Array, Base64, Benchmark, Benchmark::Tms, Bignum, Binding, CGI, Cookie, HtmlExtension, QueryExtension, Session, FileStore, MemoryStore, Class, Comparable, Complex, ConditionVariable, Continuation, Data, Date, DateTime, Dir, EOFError, Enumerable, Errno, Exception, FalseClass, File, Constants, Stat, FileTest, FileUtils, CopyContext_, DryRun, NoWrite, Verbose, Find, Fixnum, Float, FloatDomainError, GC, Generator, Hash, IO, IOError, Iconv, Failure, IllegalSequence, InvalidCharacter, OutOfRange, IndexError, Integer, Interrupt, Kernel, LoadError, LocalJumpError, Logger, Application, LogDevice, Severity, ShiftingError, Marshal, MatchData, Math, Matrix, Method, Module, Mutex, NameError, NilClass, NoMemoryError, NoMethodError, NotImplementedError, Numeric, Object, ObjectSpace, Observable, Pathname, Precision, Proc, Process, GID, Status, Sys, UID, Queue, Range, RangeError, Regexp, RegexpError, RuntimeError, ScriptError, SecurityError, Set, Shellwords, Signal, SignalException, Singleton, SingletonClassMethods, SizedQueue, SortedSet, StandardError, String, StringScanner, StringScanner::Error, Struct, Symbol, SyncEnumerator, SyntaxError, SystemCallError, SystemExit, SystemStackError, Tempfile, Test, Unit, Thread, ThreadError, ThreadGroup, ThreadsWait, Time, TrueClass, TypeError, UnboundMethod, Vector, YAML, ZeroDivisionError, Zlib, BufError, DataError, Deflate, Error, GzipFile, CRCError, Error, LengthError, NoFooter, GzipReader, GzipWriter, Inflate, MemError, NeedDict, StreamEnd, StreamError, VersionError, ZStream, fatal",alias:"kw2"}},this.patterns={poundComments:{pattern:this.common.poundComments,alias:"co1"},multiComments:{pattern:/^=begin[\s\S]*?^=end/gm,alias:"co2"},strings:{pattern:this.common.strings,alias:"st0"},tickStrings:{pattern:this.delimToRegExp("`","\\","`","gm"),alias:"st0"},delimString:{pattern:/(%[q|Q|x]?(\W)[^\2\\\n]*(?:\\.[^\2\\]*)*(\2|\)|\]|\}))/gm,alias:"st1"},heredoc:{pattern:/(<<(\'?)([A-Z0-9]+)\2[^\n]*?\n[\s\S]*\n\3(?![\w]))/gim,alias:"st2"},variables:{pattern:/(@[A-Za-z_][\w]*|@@[A-Za-z_][\w]*|\$(?:\-[\S]|[\w]+)|\b[A-Z][\w]*)/g,alias:"kw3"},rubySymbols:{pattern:/[^:](:[\w]+)/g,alias:"kw4"},constants:{pattern:/\b[A-Z][\w]*/g,alias:"kw3"},numbers:{pattern:/\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim,alias:"nu0"},properties:{pattern:this.common.properties,alias:"me0"},brackets:{pattern:this.common.brackets,alias:"br0"},delimRegex:{pattern:/(%r(\W)[^\2\\\n]*(?:\\.[^\2\\\n]*?)*(\2|\)|\]|\})[iomx]*)/gm,alias:"re0"},literalRegex:{pattern:this.delimToRegExp("/","\\","/","g","[iomx]*"),alias:"re0"}}}}),e.Language.rust=new Class({Extends:e.Language.generic,setupLanguage:function(){this.keywords={kw:{csv:"As,Break,Crate,Else,Enum,Extern,False,Fn,For,If,Impl,In,Let,Loop,Match,Mod,Move,Mut,Pub,Ref,Return,Static,SelfValue,SelfType,Struct,Super,True,Trait,Type,Unsafe,Use,Virtual,While,Continue,Box,Const,Where,Proc,Alignof,Become,Offsetof,Priv,Pure,Sizeof,Typeof,Unsized,Yield,Do,Abstract,Final,Override,Macro",alias:"kw1",mod:"gi"}},this.patterns={slashComments:{pattern:this.common.slashComments,alias:"co1"},multiComments:{pattern:this.common.multiComments,alias:"co1"},slashDocComments:{pattern:/(?:^|[^\\])\/\/[\/!].*$/gm,alias:"co2"},multiDocComments:{pattern:/\/\*[\*!][\s\S]*?\*\//gm,alias:"co2"},chars:{pattern:/'.'/gm,alias:"st0"},rawStrings:{pattern:/r((#+)".*?"\2)/gm,alias:"st1"},strings:{pattern:/("(?:\\.|\\\s*\n|\\s*\r\n|[^\\"])*")/g,alias:"st1"},directives:{pattern:/^\s*#.*$/gm,alias:"sy0"},brackets:{pattern:this.common.brackets,alias:"br0"},intLiteral:{pattern:/\b([0-9_]+|0o[0-9_]+|0x[A-F0-9_]+|0b[0-1_]+)(u8|i8|u16|i16|u32|i32|u64|i64|isize|usize)?\b/gim,alias:"nu0"},floatLiteral:{pattern:/\b([0-9_]+\.?[0-9_]+?(e\+[0-9_]+)?)(?:f32|f64)?\b/gim,alias:"nu0"},methodDefs:{pattern:/fn\s+([\w]+)\s*(<\w+\s*>)?\(/gm,alias:"kw2"},funCalls:{pattern:/\b\.?([\w]+)\s*(\(|::)/gm,alias:"kw3"},macro:{pattern:/\b([\w]+)!/gm,alias:"kw4"},symbols:{pattern:/\+|-|\*|\/|%|!|@|&|\||\^|<|<<|>>|>|=|,|\.|;|\?|:|self/g,alias:"sy0"}}}}),e.Language.shell=new Class({Extends:e.Language.generic,setupLanguage:function(){this.keywords={keywords:{csv:"if, fi, then, elif, else, for, do, done, until, while, break, continue, case, esac, return, function, in, eq, ne, gt, lt, ge, le",alias:"kw1"}},this.patterns={comments:{pattern:/((?:^\s*|\s+)#.*$)/gm,alias:"co1"},strings:{pattern:this.common.strings,alias:"st0"},backticks:{pattern:/`.*?`/gm,alias:"st1"},cases:{pattern:/^\s*\w+\)\s*$/gm,alias:"kw2"},def:{pattern:/^(\s*\w+)=/gm,alias:"kw4"},vars:{pattern:/(\$\w+)\b/gim,alias:"kw4"},functions:{pattern:/^\s*\w+\(\)\s*\{/gm,alias:"kw3"}}}}),e.Language.squirrel=new Class({Extends:e.Language.generic,setupLanguage:function(){this.keywords={reserved:{csv:"base,break,case,catch,class,clone,constructor,continue,const,default,delete,else,enum,extends,false,for,foreach,function,if,in,instanceof,local,null,resume,return,static,switch,this,throw,true,try,typeof,while,yield",alias:"kw1"}},this.patterns={slashComments:{pattern:this.common.slashComments,alias:"co1"},poundComments:{pattern:this.common.poundComments,alias:"co1"},multiComments:{pattern:this.common.multiComments,alias:"co2"},strings:{pattern:this.common.doubleQuotedString,alias:"st0"},numbers:{pattern:/\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+)\b/gim,alias:"nu0"},charnumber:{pattern:this.common.singleQuotedString,alias:"nu0"},brackets:{pattern:this.common.brackets,alias:"br0"},functionCalls:{pattern:this.common.functionCalls,alias:"me0"},methodCalls:{pattern:this.common.methodCalls,alias:"me1"},properties:{pattern:this.common.properties,alias:"me1"}}}}),e.Language.sql=new Class({Extends:e.Language.generic,setupLanguage:function(){this.keywords={keywords:{csv:"savepoint, start, absolute, action, add, after, alter, as, asc, at, authorization, begin, bigint, binary, bit, by, cascade, char, character, check, checkpoint, close, collate, column, commit, committed, connect, connection, constraint, contains, continue, create, cube, current, current_date, current_time, cursor, database, date, deallocate, dec, decimal, declare, default, delete, desc, distinct, double, drop, dynamic, else, end, end-exec, escape, except, exec, execute, false, fetch, first, float, for, force, foreign, forward, free, from, full, function, global, goto, grant, group, grouping, having, hour, ignore, index, inner, insensitive, insert, instead, int, integer, intersect, into, is, isolation, key, last, level, load, local, max, min, minute, modify, move, name, national, nchar, next, no, numeric, of, off, on, only, open, option, order, out, output, partial, password, precision, prepare, primary, prior, privileges, procedure, public, read, real, references, relative, repeatable, restrict, return, returns, revoke, rollback, rollup, rows, rule, schema, scroll, second, section, select, sequence, serializable, set, size, smallint, static, statistics, table, temp, temporary, then, time, timestamp, to, top, transaction, translation, trigger, true, truncate, uncommitted, union, unique, update, values, varchar, varying, view, when, where, with, work",alias:"kw1",mod:"gi"},functions:{csv:"abs, avg, case, cast, coalesce, convert, count, current_timestamp, current_user, day, isnull, left, lower, month, nullif, replace, right, session_user, space, substring, sum, system_user, upper, user, year",alias:"kw2",mod:"gi"},operators:{csv:"all, and, any, between, cross, in, join, like, not, null, or, outer, some, if",alias:"kw3",mod:"gi"}},this.patterns={singleLineComments:{pattern:/--(.*)$/gm,alias:"co1"},multiLineComments:{pattern:this.common.multiComments,alias:"co2"},multiLineStrings:{pattern:this.common.multiLineStrings,alias:"st0"},numbers:{pattern:this.common.numbers,alias:"nu0"},columns:{pattern:/`[^`\\]*(?:\\.[^`\\]*)*`/gm,alias:"kw4"}}}}),e.Language.vhdl=new Class({Extends:e.Language.generic,setupLanguage:function(){this.keywords={keywords:{csv:"abs,access,after,alias,all,and,architecture,array,assert,attribute,begin,block,body,buffer,bus,case,component,configuration,constant,disconnect,downto,else,elsif,end,entity,exit,file,for,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,pure,range,record,register,reject,rem,report,return,rol,ror,select,severity,signal,shared,sla,sll,sra,srl,subtype,then,to,transport,type,unaffected,units,until,use,variable,wait,when,while,with,xnor,xor",alias:"kw1",mod:"gi"},operators:{csv:"abs,not,mod,rem,sll,srl,sla,sra,rol,ror,and,or,nand,nor,xor,xnor",alias:"sy0"}},this.patterns={comments:{pattern:/((?:^\s*|\s+)--.*$)/gm,alias:"co1"},uses:{pattern:/^\s*(?:use|library)\s*(\S+);/gim,alias:"kw4"},functions:{pattern:this.common.functionCalls,alias:"kw2"},operators:{pattern:/\*\*|\*|\/|\+|\-|&|=|\/=|<|<=|>|>=/g,alias:"sy0"},strings:{pattern:this.common.strings,alias:"st1"},numbers:{pattern:this.common.numbers,alias:"nu0"},brackets:{pattern:this.common.brackets,alias:"br0"}}}}),EnlighterJS.Language.xml=new Class({Extends:EnlighterJS.Language.generic,tokenizerType:"Xml",setupLanguage:function(){this.patterns={comments:{pattern:/(?:<|<)!--[\s\S]*?--(?:>|>)/gim,alias:"co2"},cdata:{pattern:/(?:<|<)!\[CDATA\[[\s\S]*?]](?:>|>)/gim,alias:"st1"},closingTags:{pattern:/(?:<|<)\/[A-Z:_][A-Z0-9:.-]*?(?:>|>)/gi,alias:"kw1"},doctype:{pattern:/(?:<|<)!DOCTYPE[\s\S]+?(?:>|>)/gim,alias:"st2"},version:{pattern:/(?:<|<)\?xml[\s\S]+?\?(?:>|>)/gim,alias:"kw2"}}}})}(); \ No newline at end of file diff --git a/EnlighterJS/CHANGES.md b/EnlighterJS/CHANGES.md new file mode 100644 index 0000000..4c3d999 --- /dev/null +++ b/EnlighterJS/CHANGES.md @@ -0,0 +1,291 @@ +## Branch 2.x ## + +### Version 2.10 ### +* Added: [Cython](http://cython.org/) Language support - thanks to [DevynCJohnson on GitHub](https://github.com/AndiDittrich/EnlighterJS/pull/14) +* Added: [Squirrel](http://www.squirrel-lang.org/) Language support - thanks to [DevynCJohnson on GitHub](https://github.com/AndiDittrich/EnlighterJS/pull/16) +* Added: [General Assembly Language support](https://en.wikipedia.org/wiki/Assembly_language) - feature requested on [GitHub](https://github.com/AndiDittrich/EnlighterJS/issues/12) +* Added: [LUA](http://www.lua.org/) Language support +* Added: Minimal Theme (bright, high contrast) +* Added: Atomic Theme (dark, colorful) +* Added: Rowhammer Theme (light) +* Added: new social buttons to the website +* Added: contribution guidelines +* Added: missing AVR Assembly features (used [AVR-1022](www.atmel.com/Images/doc1022.pdf) reference) +* Added: new AVR Assembly testcase/example +* Added: support for multiple matching groups within patterns - thanks to [Krusen on GitHub](https://github.com/AndiDittrich/EnlighterJS/pull/11) +* Added: dispose() function to remove generated HTML from DOM - may required for high dynamic sites - feature requested on [GitHub](https://github.com/AndiDittrich/EnlighterJS/issues/9) +* Changed: used GFM style for the documentation (will break outdated MooTools-Forge markdown parser) +* Changed: the file extensions of `ThemeDevelopment` and `LanguageDevelopment` are changed to `.html` because PHP is not needed anymore during language/theme development +* Changed: removed some javascript keywords like `stop`, `close` +* Bugfix: removed `console.log` debugging output from tokenizer +* EnlighterJS has a new home **http://enlighterjs.org** + +### Version 2.9 ### +* Bugfix: the final character of highlighted code got removed by the tokenizer engine in case it's a text token with length=1 - thanks to [dan-j on GitHub](https://github.com/AndiDittrich/WordPress.Enlighter/issues/15) +* Bugfix: Generic highlighting was accidentally removed from EnlighterJS + +### Version 2.8.0 ### +* Bugfix: Under some special conditions the tokenizer repeats the last sequence of a codeblock - thanks to [Kalydon](https://github.com/AndiDittrich/EnlighterJS/issues/8) and [dan-j on GitHub](https://github.com/AndiDittrich/WordPress.Enlighter/issues/13) +* Bugfix: Wrong CSS Meta Data within the new Themes + +### Version 2.7.0 ### +* Added: [Rust](http://www.rust-lang.org/) language support - feature requested on [GitHub](https://github.com/AndiDittrich/EnlighterJS/issues/7) +* Added: [VHDL](http://en.wikipedia.org/wiki/VHDL) language support +* Added: [Matlab](http://en.wikipedia.org/wiki/MATLAB) language support +* Added: New Shell/Bash language engine +* Added: New PHP language engine +* Added: New CSS language engine - some styles have changed! +* Added: Shell script example +* Added: "MooTwo" theme inspired by the mootools.net website +* Added: "Godzilla" theme inspired by the MDN +* Added: "Droide" theme +* Added: New EnlighterJS Info Button (Toolbar) +* Added: New Tokenizer Engine which increases the rendering performance by nearly **700%** +* Added: Manifest `package.json` file to load required Node.js dependencies via npm (required for the build process) +* Moved: `LanguageDevelopment.html` and `ThemeDevelopment.html` back to the project root +* Removed: Build/Sources.json file - replaced by `.tmp/js.txt` and `.tmp/css.txt` (list of all used source files - required for development only!) +* Removed: Old Tokenizer Engines (`Smart`, `Lazy`, `Tokenizer`) +* Removed: CSS Class `unknown` from un-highlighted tokens (text) +* Bugfix: The Theme Selector of the language demo pages doesn't remove the default styles +* Bugfix: Wrong highlighting class used for SQL comments +* Changed: Smart Tokenizer Engine is used instead of the old Lazy Bruteforce matching +* Changed: All Fonts of the modern Themes are replaced by "Source Code Pro" as default +* Changed: CSS theme sources are converted to [LESS](http://lesscss.org) +* Changed: Classic Themes `kw3` color switched with `kw4` +* Changed: The *hover* css-class is now added to the outer `ol,ul` container instead of each `li` line - all themes have been adapted +* Changed: Inline gif imaages are used for the button toolbar instead of png images (size optimization) +* Many performance improvements +* Reduced the CSS and JS file-size by massive sourcecode optimizations (43kB JS; 28KB CSS; including all Themes and Languages!) +* New EnlighterJS Project Website + + +### Version 2.6.0 ### +* Added input/output TextFilter +* Added: Native JSON markup language support +* Added: Extended JSON language examples +* Added: Support for the [Cryptex WordPress Plugin](https://wordpress.org/plugins/cryptex) +* Added: New PHP Language Example +* Added: Alias `conf` for ini files +* Registered EnlighterJS within [bower](http://bower.io) package manager +* Some performance improvements (raw code is now cached) +* Semantic Versioning [semver](http://semver.org/) is used for releases + +### Version 2.5 ### +* Added DOM abstraction layer +* Added: Language "AVR Assembler" +* Added: Language "Ini" (ini, conf, property files) +* Added: XML Namespace highlighting +* Added: Theme Switcher to the Language Examples +* Changed: kw3 with kw4 color of the beyond-theme +* Changed: The compressed JS/CSS files are now named `Enlighter.min.js` and `Enlighter.min.css` +* Changed: javascript [Strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode) is used within the plugin namespace +* Changed: All Examples are moved to `Examples/` +* Bugfix: Screenshots are not available within the `PublicHtml` build +* Bugfix: Invalid bootstrap css paths within `Development.phtml` +* Bugfix: Highlighting of multi-line XML/HTML tags failed - thanks to [Suleiman19 on GitHub](https://github.com/AndiDittrich/WordPress.Enlighter/issues/8) +* Removed: ant-contrib package from utils +* Updated: MooTools to 1.5.1 +* Replaced YUI Compressor by [UglifyJS2](https://github.com/mishoo/UglifyJS2) and [clean-css](https://github.com/jakubpawlowicz/clean-css) + +### Version 2.4 ### +* Bugfix: Wrong line-font-size in the Enlighter-Theme YAML header +* Bugfix: Wrong styles within the Beyond-Themes YAML header +* Bugfix: Wrong line-font-size in the Eclipse-Theme YAML header +* Bugfix: General fixes within the Documentation + +### Version 2.3 ### +* Added Theme "Classic" +* Added Theme "Eclipse" +* Added Theme "Beyond" +* Added Language "Diff" for changelogs +* Added optional "Code Window" button which displays the raw-code in a new window +* Added optional "Info Button" +* Added "Toolbar Container" (containing all buttons) +* Added Metainit options `data-windowbutton` and `data-infobutton` +* Added `LanguageDevelopment.html` and `ThemeDevelopment.html` for rapid development startup +* Addded `EnlighterJS.Util.Init` utility function for easy script based initialization of inline+block code +* Added new Quickstart-page +* Added new Examples - including the new `EnlighterJS.Util.Init` utility function as well as some advanced examples! +* Added optional doubleklick event to toggle between highlighted- and raw-code +* Added new intro page +* Added new NSIS command as of NSIS 3.0b1 (see [release notes](http://nsis.sourceforge.net/Docs/AppendixF.html#v3.0b1-rl)) by [idleberg](https://github.com/idleberg) +* Changed XML coloring-scheme: comments are now handled as `co2` (multiline comments) +* Changed hover and specialline highlighting color of the Enlighter-Theme +* Chnaged button visibility: all toolbar buttons are visible by default +* Updated MooTools to the [NEW 1.5 Release](http://mootools.net/blog/2014/05/19/mootools-1-5-is-here/) +* Updated Bootstrap (used for the Examples) to `v3.2.0` +* Removed unused attribute `id` from generated container-element +* Replaced `.firstline` and `.lastLine` css classes with native :first-child/:last-child +* Replaced the `DynamicSourcefileLoader` (introduced in v2.0) with a PHP based version into `Development.phtml` (this will avoid some strange errors during debugging)´ +* Replaced `div` toolbar-button containers by `a` tags - title attribute supported for buildin tooltips +* Replaced text-buttons with icons +* Renamed javascript language "js" to "javascript" - an alias is added for backward compatibility +* Tested EnlighterJS with MooTools 1.5 +* Some internal changes (Theme CSS; HTML Structure; Toolbar buttons outsourced to `UI/Toolbar.js`) +* Moved the Documentation to `Docs/` and seperated the sections by file - `README.md` is automatically generated during the build-process + +### Version 2.2.1 ### +* Added Web-based Build-Service to easily generate custom EnlighterJS packages +* Added Webbuild Target (used for Promethium CloudBuilder Service) +* Improved Build-File +* Removed "Util/human-readable-filter.xml" - formattings moved into the "concat-compress" task +* Bugfix: Invalid directory names within buildfile + +### Version 2.2 ### +* Added language support for C# (csharp) [provided by Joshua Maag](https://github.com/joshmaag) +* Added C# language example +* Added language alias "c#" for language csharp +* Changed: using YUI compressed file within Examples+PublicHtml pages +* Bugfix: Indentation of first line got lost - thanks to [cdonts](http://wordpress.org/support/topic/no-indentation-in-the-first-line?replies=2) + +### Version 2.1 ### +* Added Changelog to doc pages +* Added Inline Highlighting example to the Theme-Demo page +* Added Build Version to doc pages +* Added option `ampersandCleanup` to enable/disable code cleanup for ampersand signs +* Added YAML metadata to each theme containing basic style informations - used within the official [Enlighter WordPress Plugin](http://wordpress.org/plugins/enlighter/) +* Improved theme designs +* Changed the tab design of the "Git" Theme +* Changed rgba background-color values of "Tutti" Theme to hex (#fffdf7) +* Bugifx: Option "data-enlighter-offset" not recognized if local option "data-enlighter-linenumbers" was missing +* Bugfix: Some CSS Container margin fixes +* Bugfix: Global options got modified by EnlighterJS.Util.Helper (using codegroups) which caused an unexcepted behaviour (options of multiple instances got merged) +* Bugfix: Added missing inline-theme-styles +* Bugfix: Optional linenumber-offset not recognized for highlighting/pointing out special lines of code +* Bugfix: Code cleanup for `nbsp;` escape sequence missing + +### Version 2.0 ### +* Added support for Inline-Syntax-Highlighting +* Added Python Testcase +* Added DynamicSourcefileLoader (js+css files) used for rapid-development without rebuild (only used within "Development.html") +* Added Development Playground "Development.html" +* Added Metainit selector options for inline and block content +* Added Bootstrap based Demo/Testcases/Templates +* Added New standard theme "Enlighter" +* Added Metainit option to disable inline/block highlighting - just use `NULL` as selector +* Added C Language Example +* Added new Markdown Language Example +* Added new Language Template `Source/Language/Template.mylang.js` with additional comments/instructions how to create your own language +* Added optional line-number-offset (`start` attribute of `ol` tag used) - just add `data-enlighter-lineoffset="5"` to your codeblock +* Added global option to enable/disable line-numbers. Local attribute overwrite via `data-enlighter-linenums="false"` is also available +* Added javascript language aliases for `jquery`, `mootools` and `ext.js` +* Added Inline code examples for each language +* Added optional "raw code" button to toggle between highlighted and raw code (usefull to copy code with original identation) - option disabled by default +* Improved Code Structure +* Improved XML Testcase +* Changed: "Compilers" replaced by `BlockRenderer` and `InlineRenderer` classes +* Changed: Testcase data moved to "Resources/TestcaseData" +* Changed: Renamed the old standard theme to "MooTools" +* Changed: Type of EnlighterJS.Util.Helper is changed from `Class` to `Function` - an instance was never used/necessary +* Changed: The option `compiler` is replaced by `renderer` Block/Inline +* Changed: Demo-URL to `http://enlighterjs.andidittrich.de/` +* Changed: CSS Class of the output container changed from `EnlighterJSRendererd` to `EnlighterJS` +* Changed: `Quickstart.html` and `Development.html` moved to project root +* Changed: Renamed language `md` to `markdown` - an alias is added for backward compatibility +* Changed: Option `altline` renamed to `hover` (also used by Metainit) +* Changed: Initialization of language parameters is now handled into `setupLanguage` +* Changed: All Themes are derived from `Base.css` +* Changed: The visibility of Line-Numbers is now controlled via global/local settings and not by the "compiler" option like in previous versions +* Changed: Block-Content is now always displayed as `ol` or `ul` container, depending on the line-number setting. +* Changed TabPane Container structure: `ul` item list is wrapped into a div container +* Changed: Language "no-highlight" will not trigger the Enlighter Engine and keep your code as it is (no styles are added). To display unhighlighted code with the enlighter styles, use `raw` as language instead. +* Changed: PHP is used to generate the Examples/Testcases +* Changed XML styling behaviour: attribute values are now expressed as class-type `st0` (string0) instead of kw2 +* Changed: Java function-calls are now expressed as class-type `kw0` (keyword0) +* Deprecated: The `EnlighterJS.light()` and `EnlighterJS.unlight()` methods got replaced by `enlight(bool)` - backward compatibility included until next major release +* Deprecated: The `Element.light()` and `Element.unlight()` extensions got replaced by `Element.enlight(bool|object)` - backward compatibility included until next major release +* Removed: Python ruby style multiline comments +* Removed: EnlighterJS.Language.standard is replaced by EnlighterJS.Language.generic - an alias is added for backward compatibility +* Removed the `compiler` option from Metainit options (not needed anymore: inline code is automatically handled by the InlineRenderer and all other code by the BlockRenderer) +* Removed `C` language class (used as alias for `cpp` before - now implemented as language alias) +* Removed `HTML` language class (used as alias for `xml` before - now implemented as language alias) +* Removed unused language names from language files - each language is named/identified by it's own (lowercase) classname +* Removed unused offsets from Tokenizers +* Removed unused Tokenizer.Smart from builds +* Updated ANT-contrib package to 1.0b3 +* Updated YUI Compressor to 2.4.8 +* Bugfix: Using Language-Aliases as default-language failed +* Bugifx: Python used Ruby Multiline String comment style instead of `""" """; ''' '''` +* Bugfix: CSS Class "unknown" added to TabPane container +* Bugfix: Theme settings of TabPane failed using EnlighterJS.Util.Helper directly +* Bugfix: Missing fallback when passing "null" as theme option +* Bugfix: Code cleaning for Ampersand `&` was processed as last - to handle chains like `&lt;` => `<` => `<` it is now processed first +* Bugfix: Added missing right+left borders to git theme + +## Branch 1.x ## + +### Version 1.8 ### +* Added highlighting for special-lines, just add the attribute `data-enlighter-highlight="1,2,8-10"` to highlight the lines 1,2,8,9,10 + +### Version 1.7.1 ### +* CSS Hotfix for bad linenumbers in Chrome @see http://wordpress.org/support/topic/bad-line-numbers-in-chrome?replies=3 - thanks to **cdonts** +* Added JSON language alias (parsed as javascript) + +### Version 1.7 ### +* Added Language Aliases - e.g. "javascript" is a valid name for EnlighterJS.Language.js + * Javascript -> js + * Markdown -> md + * no-highlight -> raw + * bash -> shell + * styles -> css + * c++ -> cpp +* Added check of default language within options - improoved fallback function to "standard" highlighting mode + +### Version 1.6 ### +* Fixed Testcase-Buildscript: Testcase files didn't got removed on build +* Bugfix: Added missing check of unknown languages (throws javascript error) +* Added RAW language: text is rendered unhighlighted +* Added lowercase-text-transforms to language- and theme-names - "GIT, Git, git" are valid names for the "git" theme + +### Version 1.5.2 ### +* Added Plugin section to readme file + +### Version 1.5.1 ### +* fixed YAML header within NSIS language support + +### Version 1.5 ### +* Added language support for NSIS (Nullsoft Scriptable Install System) provided by Jan T. Sott + +### Version 1.4 ### +* Added Quickstart Example +* Renamed *Tests/* to *Examples/* + +### Version 1.3 ### +* Added odd/even classes to Compiler.List +* Added Version+Build informations to css+js builds + +### Version 1.2 ### +* Replaced Compiler.Inline with a new version (full DOM based handling) +* Replaced Compiler.List with a new version (full DOM based handling) +* Removed the Compiler.Lines (it does exactly the same as Compiler.List, but used div-elements) +* Fixed rendering bug within html-comments (specialchars didn't got replaced - solved by new compilers) +* Moved all subclasses into EnlighterJS object-namespace +* Modified id-naming-scheme of generated output containers (old: Lighter_ + (new Date()); new: EnlighterJS_ + String.uniqueID()) +* Added class *EnlighterJSRendered* to generated container +* Modiefied the css-classname for theming (old: Lighter; new: EnligherJS) +* Replaced all standard-themes with rewritten versions - now they are all extending the standard theme, only the colors differs +* Reduced the size of the css files to ~8kB +* Enhanced the css robustness +* Modified the usage of *altLines* option: altLines now defines a name of a css class which is added on each line of the *List* view + +### Version 1.1 ### +* Added Cpp and C language support +* Added metatag-based initialization + +### Version 1.0 ### + +* Initial Release of EnlighterJS (fork of [Lighter.js](https://github.com/pradador/Lighter) v3.0) +* Added ANT based build-script and utilities (YUI-compressor) +* Included prebuilds within the new GIT repository +* Added current MooTools build (1.4.5) +* Modified the testcases (now generated by ANT-buildfile) +* Renamed Fuels/Flames/Wick into conventional scheme Language/Themes/Token/Tokenizer +* Added SQL, Java testcases +* Added Apache Ant-contrib package (required for the new build script) +* Removed Loader.js - themes&languages are now bundled with the build +* Modified the complete software-architecture (tokenizers are now initialized by the chosen language) +* Modified the usage - one EnlighterJS instance per codeblock is required (strict oop design) +* Modified the usage - HTML5 data- attributes are used instead of css class attribute language:theme combo +* Added XML and HTML support (incorrect html support got fixed) +* Added support for tab based code-groups (displays multiple code-blocks within a tab-pane) +* Removed the outdated class-documentation of Lighter.js (extensive documentation/inline comments are in the source files) \ No newline at end of file diff --git a/EnlighterJS/CONTRIBUTE.md b/EnlighterJS/CONTRIBUTE.md new file mode 100644 index 0000000..922c2a4 --- /dev/null +++ b/EnlighterJS/CONTRIBUTE.md @@ -0,0 +1,25 @@ + +Contribution +------------ + +EnlighterJS is OpenSource and managed on [GitHub](https://github.com/AndiDittrich/EnlighterJS) - if you like, you're welcome to contribute! +To simplify the release and quality control process, please follow these remarks: + +### Notices ### +* Your commits/pull-request should only contain changes of the `Source/`, `Resources/TestcaseData` directories or the Examples located into the root directory - otherwise i have to merge the request manually +* **Do not change** the files located into the `Examples/` or `Build/` directory - they are automatically generated during the build-process using data from `Resources/TestcaseData` +* Related software packages like MooTools, Bootstrap, ANT-contrib are updated by the maintainer +* If you form a concept of larger project changes, please [discuss](https://github.com/AndiDittrich/EnlighterJS/issues) them with the contributors **before** implementing + +### Documentation ### +* To change contents of the `README.md` file please edit the split files in `Docs/` - the readme file is automatically generated by merging these files during the build process + +### Adding a new Language ### +* First of all: take a look on other languages which are already available to learn about functions and coding styles +* To start with a new language please use the `LanguageDevelopment.phtml` workspace. It will automatically load `Source/Language/Template.mylang.js` (the startup file for your language development). +* Rename your language file `Template.mylang.js` to the **camel-cased** real language name - e.g. `Vhdl.js` +* Add detailed comments to each language rule! +* Keep the code as small as possible: e.g. use regex instead of long keyword lists +* In case your language is a superset of another one, please **extend** the origin language - do not copy the origin file +* Add an language testcase/demo to the `Resouces/TestcaseData` directory +* Finally create a [Pull Request on GitHub](https://help.github.com/articles/creating-a-pull-request/) - your changes will be reviewed and commonly added to the project diff --git a/EnlighterJS/Development.phtml b/EnlighterJS/Development.phtml new file mode 100644 index 0000000..6adaa74 --- /dev/null +++ b/EnlighterJS/Development.phtml @@ -0,0 +1,244 @@ + + + + + + + + + + EnlighterJS Playground + + + + + + + +css as $css){ + echo '', "\n"; + } +?> + + + + + + + + + + + + +
+ +

+ EnlighterJS Development Playground +

+ +
+ + +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor + local a = "Double Quoted\nString" invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +
+-- SOURCE: http://www.lua.org/manual/5.3/manual.html
+
+-- COMMENTS
+-- --------------------------------------------------
+
+-- This is a single line comment
+print "Hello World!"
+
+--[[Comments can be spread
+across several lines ]]
+print "Hello World!"
+
+---[[The long handled doubleshovel means that this code will run
+print "This will print because it is not a comment!"
+-- We can still include comments by prefixing them with a doubledash
+-- print "This will not print because it is commented out"
+]]
+
+-- STRINGS
+-- --------------------------------------------------
+local a = "Double Quoted\nString"
+local b = 'Double Quoted\nString'
+local c = [[Multi
+Line String
+    ]]
+
+a = 'alo\n123"'
+a = "alo\n123\""
+a = '\97lo\10\04923"'
+a = [[alo
+123"]]
+a = [==[
+alo
+123"]==]
+
+-- NUMBERS
+-- --------------------------------------------------
+a = 4
+b = 0.4
+c = 4.57e-3
+D = 0.3e12
+e = 5e+20
+
+-- TABLES
+-- --------------------------------------------------
+a = {}     -- create a table and store its reference in `a'
+k = "x"
+a[k] = 10        -- new entry, with key="x" and value=10
+a[20] = "great"  -- new entry, with key=20 and value="great"
+print(a["x"])    --> 10
+k = 20
+print(a[k])      --> "great"
+a["x"] = a["x"] + 1     -- increments entry "x"
+print(a["x"])    --> 11
+
+days = {"Sunday", "Monday", "Tuesday", "Wednesday",
+            "Thursday", "Friday", "Saturday"}
+
+-- EXAMPLE
+-- --------------------------------------------------
+line = io.read()     -- read a line
+n = tonumber(line)   -- try to convert it to a number
+if n == nil then
+  error(line .. " is not a valid number")
+else
+  print(n*2)
+end
+
+function foo (a)
+print("foo", a)
+return coroutine.yield(2*a)
+end
+
+co = coroutine.create(function (a,b)
+   print("co-body", a, b)
+   local r = foo(a+1)
+   print("co-body", r)
+   local r, s = coroutine.yield(a+b, a-b)
+   print("co-body", r, s)
+   return b, "end"
+end)
+
+print("main", coroutine.resume(co, 1, 10))
+print("main", coroutine.resume(co, "r"))
+print("main", coroutine.resume(co, "x", "y"))
+print("main", coroutine.resume(co, "x", "y"))
+
+list = nil
+    for line in io.lines() do
+      list = {next=list, value=line}
+    end
+
+x = 10
+local i = 1        -- local to the chunk
+
+while i<=x do
+  local x = i*2    -- local to the while body
+  print(x)         --> 2, 4, 6, 8, ...
+  i = i + 1
+end
+
+if i > 20 then
+  local x          -- local to the "then" body
+  x = 20
+  print(x + 2)
+else
+  print(x)         --> 10  (the global one)
+end
+
+print(x)           --> 10  (the global one)
+
+
+
+do
+  local a2 = 2*a
+  local d = sqrt(b^2 - 4*a*c)
+  x1 = (-b + d)/a2
+  x2 = (-b - d)/a2
+end          -- scope of `a2' and `d' ends here
+print(x1, x2)
+
+ + + + + +
+ + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/EnlighterJS/Docs/01-Intro.md b/EnlighterJS/Docs/01-Intro.md new file mode 100644 index 0000000..dd2f577 --- /dev/null +++ b/EnlighterJS/Docs/01-Intro.md @@ -0,0 +1,127 @@ +EnlighterJS +=========== + +EnlighterJS is a free, easy-to-use, syntax highlighting class developed for [MooTools](http://mootools.net "MooTools.net"). +Using it can be as simple as adding a single script and style to your website, choosing the elements you wish to highlight, and EnlighterJS takes care of the rest. +It also supports Inline-Syntax-Highlighting as well as the automatic creation of tab-panes to display groups of code together (useful for multi-language examples - e.g. html+css+js) +Take a look into the [Documentation](http://enlighterjs.org/Documentation.html) or view the [Theme Demo](http://enlighterjs.org/Themes.html) + +### Download ### +* [Download Latest Release](https://github.com/AndiDittrich/EnlighterJS/releases/latest) +* [Custom-Builds](http://enlighterjs.org/Builder.html) + +![Screenshot](http://enlighterjs.org/screenshot1.png) + +Features +-------- + +* Written in MooTools. Requires version 1.4+ +* Build-in support for most commonly used languages +* Easy to use with familiar MooTools syntax. +* Supports code-groups (displays multiple code-blocks within a tab-pane) +* Includes Inline Syntax highlighting +* Extensible language and theme engines - add your own one. +* Simple CSS based themes +* ANT build-script included for easy custom builds (Web-based Customizer also available) +* Small footprint +* Point out special lines of code +* Initialization can be performed by adding a simple html meta-tag or using a small piece of javascript +* Toolbar buttons to switch to raw-code or open it into a new window + +Plugins +------- +* [Enlighter for WordPress](http://wordpress.org/plugins/enlighter/) - The official EnlighterJS plugin for WordPress + +How to use +---------- +This is a minimalistic example how to highlight sourcecode with EnlighterJS. The working example (correct js+css paths) is available within the EnlighterJS package (Example1.html). + +```HTML + + ... + + + + + + + + + + + + ... + + + ... + +
+    $('#loading-example-btn').click(function () {
+      var btn = $(this)
+      btn.button('loading')
+      $.ajax(...).always(function () {
+        btn.button('reset')
+      });
+    });
+    
+ ... +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, window.addEvent('domready', function(){}); labore et dolore magna aliquyam erat.

+ +``` + +Build-in Languages & Themes +--------------------------- +The following Themes and Languages are included into the EnlighterJS standard package: + +### Languages ### +List of languages with their corresponding identifiers and supported aliases (wrapped into brackets behind the names) + +* **Assembly** (asm) +* **AVR Assembly** (avrasm) +* **CSS** (css) +* **C** (c) +* **C++** (cpp, c++) +* **C#** (csharp) +* **Cython** (cython) +* **HTML** (html) +* **Ini** (ini, conf) +* **Java** (java) +* **Javascript** (js, javascript, jquery, mootools, ext.js) +* **JSON** (json) +* **LUA** (lua) +* **NSIS** (nsis) +* **Markdown** (md, markdown) +* **Matlab/Octave** (octave, matlab) +* **PHP** (php) +* **Python** (py, python) +* **Ruby** (ruby( +* **Shellscript** (shell, bash) +* **SQL** (sql) +* **Squirrel** (squirrel) +* **XML** (xml) +* **Generic** (generic, standard) - default highlighting scheme +* **RAW** (raw) - raw code without highlighting with EnlighterJS container styles! +* **No-Highlight** (no-highlight) - disables highlighting and retains your page styles! + +### Themes ### +Theme identifiers are always expressed as lowercase! + +#### Modern Themes #### +* **Enlighter** (enlighter, standard) - Enlighter`s default Theme +* **Classic** (classic) - SyntaxHighlighter inspired +* **Eclipse** (eclipse) - Eclipse inspired +* **Beyond** (beyond) - BeyondTechnology Theme +* **Godzilla** (godzilla) - A MDN inspired Theme +* **MooTwo** (mootwo) - Inspired by the current MooTools Website +* **Droide** (droide) - Modern, minimalistic +* **Minimal** (minimal) - Bright, High contrast +* **Atomic** (atomic) - Dark, Colorful +* **Rowhammer** (rowhammer) - Light, Transparent, divided rows + +#### Legacy Themes (Lighter.js) #### +* **MooTools** (mootools) - MooTools Docs inspired Theme +* **Git** (git) - GitHub inspired +* **Mocha** (mocha) +* **Panic** (panic) +* **Tutti** (tutti) +* **Twilight** (twilight) \ No newline at end of file diff --git a/EnlighterJS/Docs/20-Usage.md b/EnlighterJS/Docs/20-Usage.md new file mode 100644 index 0000000..068f757 --- /dev/null +++ b/EnlighterJS/Docs/20-Usage.md @@ -0,0 +1,111 @@ + +Basic Usage +----------- + +Download EnlighterJS and extract the files or use [bower](http://bower.io). + +```shell +$bower install enlighterjs +``` + +Copy the prebuild files of the *Build/* directory into a web-accessible directory of your choice. + +Link to the EnlighterJS.min.js javascript file and the EnlighterJS.min.css stylesheet in the head section of your document **after** the MooTools file. +The example below assumes you moved the files into your scripts folder under "js/" and your styles folder under "css/". +The extension .min indicates that these files are already minified. **These files are ready for productive use!** +If you want to start developing, you should consider to use the uncompressed versions for easier debugging! + +Rendering options can be defined as global option (Metainit attributes or options object) or local option using the `data-enlighter-` attributes on each codeblock. +It is recommended to use local options only if necessary (e.g. to define a language for each block). + +### Integrate EnlighterJS ### + +The integration of EnlighterJS requires the following 3 steps: +1. Integrate MooTools.Core, EnlighterJS Script+Styles into your page +2. Prepare your source code elements on your page by adding a language identifier +3. ["Initialize"](#initialization) EnlighterJS to highlight the code + +Link to the EnlighterJS.yui.js javascript file and the EnlighterJS.yui.css stylesheet + +```html + + ... + + + + + + + + + ... + +``` + +Prepare your source code by giving the element (containing the code) an optional *data-enlighter-language* attribute with the language of the code. +**Notice**: Instead of Lighter.js *fuel:flame' syntax combo within the css classname, EnlighterJS will use HTML5 `data-` attributes! + +```html + +
var myClass = new Class({})
+ + +
php_info();
+``` + +Finally, use the following JavaScript code examples inside of a 'domready' or 'onload' callback to create the highlighted elements - this process is called *initialization*. +Be sure to check out the Options section to see the various options you can use. The Example pages have various examples you can use. +Further informations as well as some advanced examples are available within the [Initialization Section](#initialization). + +```js +// Use the Init utility function to highlight all pre elements - this is the recommended way and required to use the Code-Group feature +EnlighterJS.Util.Init('pre', null, { + language: 'php', + theme: 'Classic' +}); +``` + +Instead of initializing EnlighterJS manually, since version 1.1 it is possible to use a simple html-metatag (called *EnlighterJS Metainit*) to run Enlighter on your page (with basic config options). + +```html + + +``` + +### Some Examples ### +Since version 1.8, it's possible to highlight special lines of code. Just add the attribute `data-enlighter-highlight` to your codeblock and provide a set of lines to mark (ranges supported). + +```html + +
+this.tokens = tokens || [];
+options = this.options;
+
+ + +
+EnlighterJS.Util.Init('pre', null, {
+   indent : 2,
+   grouping: false
+});
+
+``` + +Version 2.0 introduces some amazing features like Inline-Syntax-Highlighting. The [Metainit](#metainit_initialization) tool performs this action automatically. + +```js +// Highlight all pre(block) + code(inline) tags and use Javascript as default language +EnlighterJS.Util.Init('pre', 'code', { + language: 'javascript' +}); +``` + +In some cases it might be usefull to start the linnumber counting with another value than 1 (maybe an excerpt). In this case you can add the `data-enlighter-lineoffset` attribute to your codeblock. + +```html + +
+this.tokens = tokens || [];
+options = this.options;
+
+``` \ No newline at end of file diff --git a/EnlighterJS/Docs/30-Initialization.md b/EnlighterJS/Docs/30-Initialization.md new file mode 100644 index 0000000..5b0d407 --- /dev/null +++ b/EnlighterJS/Docs/30-Initialization.md @@ -0,0 +1,91 @@ + +Initialization +-------------- + +Initialization means, that all elements (you wish to highlight) get selected and rendered by EnlighterJS. The original codeblock is set invisible and the rendered one is injected after. This task can be performed in **two different ways**: + +### 1. Metainit Initialization ## +Instead of initializing EnlighterJS by javascript, it's possible to use a simple html-metatag (called *EnlighterJS Metainit*) to run Enlighter on your page (with basic config options). This will be usefull if you only need a basic setup. Take a look into the examples *Examples/Testcase.Metainit.html* to see how it is working! +Basically Metainit takes the given html attribute options and converts them into a options object. These options will be passed to the `Enlighter.Util.Helper()` utility function - for inline elements (InlineRenderer) identified by `data-selector-inline` as well as block elements (BlockRenderer) by `data-selector-block`. +This will take all the work for you by adding a single line to the head section to use all the amazing EnlighterJS features like Inline-Syntax-Highlighting or CodeGroups! + +#### Example #### +Description: It enables block highlighting for all `pre` elements on the page as well as inline highlighting for all `code` elements. Javascript is set as default language used for highlighting. Each tab is replaced by four spaces to avoid rendering issues. Additionally the "raw code button" is enabled which allows the user to toggle between highlighted and unhighlighted code (e.g. to copy code). + +```html + + +``` + +#### Attributes #### +Following attributes are available (optional) and will be converted to the required options object to trigger `EnlighterJS.Util.Helper`. Take a look into the Metainit.js sources to see how it is working. + +* **name** (string) **REQUIRED** - This attribute identifies the metatag and has to be set to "EnlighterJS" (case sensitive) +* **data-language** (string) - Sets the default language of every codeblock (inline+block) on the page - default: **generic** +* **data-theme** (string) - Sets the default theme of every codeblock (inline+block) on the page - default: **enlighter** +* **data-indent** (number) - Number of spaces to replace tabs with (-1 means no replacement) - default: **-1** +* **data-selector-block** (string) - The CSS selector to match all codeblocks for block-highlighting. Use "NULL" to disable block highlighting - default: **pre** +* **data-selector-inline** (string) - The CSS selector to match all codeblocks for inline-highlighting. Use "NULL" to disable inline highlighting - default: **code** +* **data-rawcodebutton** (boolean) - Enables the optional "RAW Code Button" which will appear in ever codeblock (Block Renderer) to switch between highlighted and un-highlighted code - default: **false** +* **data-windowwbutton** (boolean) - Enables the optional " Button" which +* **data-infobutton** (boolean) - Enables the optional " Button" which +* **data-linenumbers** (boolean) - Display line-numbers in code-blocks (ol/li list used as container) - default: **true** +* **data-hover** (string) - Defines a css-classname which is added to each line. To enable build-in hover effects set it to "hoverEnabled" (default), *null* to disable it or to any custom class - default: **"hoverEnabled"** + +### 2. Javacript based Initialization ### +EnlighterJS provides 4 ways to get manually initialized: + +* Use the native `Element.enlight()` method which will automatically creates an EnlighterJS instance of the selected single element +* Create a new instance of `EnlighterJS` and provide the single element to highlight +* To use Code-Groups you have to use `EnlighterJS.Util.Helper` utility function + +**Notice:** You can pass any of the [Global Options](#global_options) with each method. Every method will invoke the `EnlighterJS` constructor. + +#### Option 1 - Native Element extension #### + +```js +// get element by it's ID and activate highlighting using markdown as language +document.id('myCustomCode').enlight({ + language: 'ruby', + indent: 2 +}); + +// disable highlighting +document.id('myCustomCode').enlight(false); + +// remove highlighting (drop generated HTML from DOM) +document.id('myHighlightedCode').enlight('dispose'); +``` + +#### Option 2 - Use an EnlighterJS instance (OOP Style) #### + +```js +// create a new EnlighterJS instance +var myEnlighter = new EnlighterJS(document.id('myCustomCode'), { + language: 'php', + showLinenumbers: false +}); + +// enable highlighting +myEnlighter.enlight(true); + +// remove highlighting (drop generated HTML from DOM) +myEnlighter.dispose(); +``` + +#### Option 3 - Use an EnlighterJS.Util.Helper utility function #### + +```js +// Highlight all code tags (inline code) and use Javascript as default language +EnlighterJS.Util.Helper(document.getElements('code'), { + language: 'javascript', + renderer: 'Inline' +}); + +// OPTION1 - Element style syntax - get element by it's ID +document.id('myJsCode').enlight(true); + +// OPTION2 - Element style syntax - highlight all pre elements with the class *myPhp* +// an EnlighterJS instance is automatically created +document.getElements('pre.myPhp').enlight({language: php}); +``` \ No newline at end of file diff --git a/EnlighterJS/Docs/40-Options.md b/EnlighterJS/Docs/40-Options.md new file mode 100644 index 0000000..48bc2c6 --- /dev/null +++ b/EnlighterJS/Docs/40-Options.md @@ -0,0 +1,76 @@ + +Options +------- + +Customize EnlighterJS` appearance by using the following configuration options. Try to start with one of the Example pages! + +### Global Options ### + +The following options can be passed to the following methods to customize the rendering behaviour: +* `EnlighterJS(codeblockElement, options = {}, container = null)` constructor +* `EnlighterJS.Util.Helper(elements, options = {})` utility function +* `EnlighterJS.Util.Init(blockSelector, inlineSelector, options= {})` utility function (recommended) + +#### Option Keys #### +* **language** - (string) The default language used if no `data-enlighter-language` attibutes are used - default: **"generic"** +* **theme** - (string) The default theme used if no `data-enlighter-theme` attibutes are used - default: **"enlighter"** +* **indent** - (integer) Number of spaces to replace tabs with (-1 means no replacement) - default: **-1** +* **hover** - (string) Defines a css-classname which is added to each line. To enable build-in hover effects set it to "hoverEnabled" (default), *null* to disable it or to any custom class - default: **"hoverEnabled"** +* **oddClassname** - (string) CSS-classname of all odd lines - default: **"odd"** +* **evenClassname** - (string) CSS-classname of all even lines - default: **"even"** +* **showLinenumbers** - (boolean) Display line-numbers in code-blocks (ol/li list used as container) - default: **true** +* **forceTheme** - (boolean) Forces the renderer to use ignore attribute theme setting `data-enlighter-theme` - default: **false** +* **renderer** - (string) Defines the renderer used to generate the output. Use `Inline` for Inline-Syntax-Highlighting or `Block` for standard highlighting - default: **Block** +* **rawButton** - (boolean) Enables the optional "RAW Code Button" which will appear in ever codeblock (Block Renderer) to switch between highlighted and un-highlighted code - default: **true** +* **infoButton** - (boolean) Enables the optional "Info Button" which provides a link to `enlighterjs.andidittrich.de` - default: **true** +* **windowButton** - (boolean) Enables the optional "Window Button" which opens a new window with the unhighlighted "raw" code within - default: **true** +* **grouping** - (boolean) Enables code-groups (only used by `EnlighterJS.Util.Helper` utility) - default: **true** +* **inlineContainerTag** - (string) The html tag-name of the container (inline-syntax-highlighting only) where the generated code is wrapped into - default: **"span"** +* **ampersandCleanup** - (boolean) Should the ampersand escape sequence `&amp;` automatically replaced by the ampersand sign during code cleanup ? Useful to resolve double escaped html code - default: **true** +* **rawcodeDoubleclick** - (boolean) Toggle RAW/Highlighted code on doubleclick ? - default: **false** +* **cryptex** - (object) Special options for use with the [Cryptex WordPress Plugin](https://wordpress.org/plugins/cryptex) + +#### Example #### + +```js +var options = { + language : 'javascript', + theme : 'Eclipse', + indent : 2, + forceTheme: false, + rawButton: false, + showLinenumbers: false, + renderer: 'Inline' +}; + +// Initialize EnlighterJS - use inline-highlighting only +EnlighterJS.Util.Init(null, 'code', options); +``` + +### Element Options ### + +Some options need to be applied directly to the container elements which holds the code to highlight. These "local" options will override all global options which are set. + +* **data-enlighter-language** (string) - The language of the codeblock - overrides the global default setting | Block+Inline Content option +* **data-enlighter-theme** (string) - The theme of the codeblock - overrides the global default setting | Block+Inline Content option +* **data-enlighter-group** (string) - The identifier of the codegroup where the codeblock belongs to | Block Content option +* **data-enlighter-title** (string) - The title/name of the tab | Block Content option +* **data-enlighter-linenumbers** (boolean) - Show/Hide the linenumbers of a codeblock (Values: "true", "false") | Block Content option +* **data-enlighter-highlight** (string) - A List of lines to point out, comma seperated (ranges are supported) e.g. "2,3,6-10" | Block Content option +* **data-enlighter-lineoffset** (number) - Start value of line-numbering e.g. "5" to start with line 5 - attribute `start` of the ol tag is set | Block Content option + +#### Example 1 #### + +```html +
+...
+
+``` + +#### Example 2 #### + +```html +

+EnlighterJS also supports alert('Inline Sourcecode highlighting'); (since version 2.0). +

+``` \ No newline at end of file diff --git a/EnlighterJS/Docs/50-Codegroups.md b/EnlighterJS/Docs/50-Codegroups.md new file mode 100644 index 0000000..30ea82e --- /dev/null +++ b/EnlighterJS/Docs/50-Codegroups.md @@ -0,0 +1,60 @@ + +Code-Groups +----------- + +This example shows how to use code-groups. You can define a new code-group by adding a `data-enlighter-group` attribute to your code tags you want to group. The value is used as an internal identifier and is not shown anywhere (e.g. use numerical identifiers). +The name/title of the tab is defined by a `data-enlighter-title` attribute. To use a corporate style within all code-blocks grouped together, the theme definition of the first code-block defined in your document (the group leader) is used as theme of the complete group - other theme definitions will be ignored. if no theme is specified, the default theme (defined in the options) will be used, which is recommended. + +### Define a Code-Group ### + +```html + +
+this.tokens = tokens || [];
+options = this.options;
+
+ + +
+import javax.swing.JOptionPane;
+
+public class OddEven {
+/**
+ * "input" is the number that the user gives to the computer
+ */
+private int input; // a whole number("int" means integer)
+
+ + +
+/** Test Snippet */
+$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
+   
+/* check connection */
+if (mysqli_connect_errno()) {
+    printf("Connect failed: %s\n", mysqli_connect_error());
+    exit();
+}
+
+``` + +### Initialize Code-Groups ### +The initialization of code-groups differs from the standard. You have to use the `EnlighterJS.Util.Helper` utility function (triggered by Metainit and EnlighterJS.Util.Init) - it does the complete initialization and grouping for you! +* JS-Initialization Chain: EnlighterJS.Util.Init -> **EnlighterJS.Util.Helper** -> EnlighterJS +* Metainit-Initialization Chain: EnlighterJS.Util.Metainit -> **EnlighterJS.Util.Helper** -> EnlighterJS + +Finally, use the following JavaScript code inside of a `domready` or `onload` event to create the highlighted elements. +Check out the options section to see the various options you can use. + +**Notice:** `grouping` has to set to `true` when using the javascript based initialization + +```js +// highlight all pre tags; no inline-highlighting +EnlighterJS.Util.Init('pre', null, { + indent: 4, + language: 'js', + theme: 'enlighter', + grouping: true, + rawButton: true +}); +``` \ No newline at end of file diff --git a/EnlighterJS/Docs/60-CustomBuilds.md b/EnlighterJS/Docs/60-CustomBuilds.md new file mode 100644 index 0000000..edffe27 --- /dev/null +++ b/EnlighterJS/Docs/60-CustomBuilds.md @@ -0,0 +1,43 @@ + +Custom Builds +------------- +The EnlighterJS project is using [Apache ANT](http://ant.apache.org/) as build-system. +[UglifyJS2](https://github.com/mishoo/UglifyJS2) and [clean-css](https://github.com/jakubpawlowicz/clean-css) are used to minify the production-ready javascript and css files. +To save bandwidth/traffic or include self-defined languages, you can easily customize your EnlighterJS build by editing the *build.xml* file (found in the root directory) and run Apache ANT (target *build*) + +### Cloud/Web based builder ### + +You can also use the web-based [EnlighterJS Builder](http://enlighterjs.org/Builder.html) to generate your customized package **without the need of ANT/development environment** - everything is done for you server-site! + +### Software Requirements ### + +* [Apache ANT 1.9](http://ant.apache.org/) +* [Ant-Contrib](http://sourceforge.net/projects/ant-contrib/files/ant-contrib/) +* [Node.js](https://nodejs.org/) +* [UglifyJS2](https://github.com/mishoo/UglifyJS2) +* [clean-css](https://github.com/jakubpawlowicz/clean-css) + +### Include/Exclude Languages and Themes ### + +If you want to remove some of the default theme you can edit the *include.themes* property and modify the list of css source files. +For Example: only include the modern themes + +```xml + + +``` + +Or Include only your custom themes (Note: they have to be located into `Source/Themes/`) + +```xml + + +```xml + +Removing/Adding languages is also easy as this - they are defined by the *include.languages* property. +For Example: only include html+css+js syntax highlighting (be careful - html is an alias for XML!, you have to include `Xml`) + +```xml + + +``` \ No newline at end of file diff --git a/EnlighterJS/Docs/70-Contribution.md b/EnlighterJS/Docs/70-Contribution.md new file mode 100644 index 0000000..922c2a4 --- /dev/null +++ b/EnlighterJS/Docs/70-Contribution.md @@ -0,0 +1,25 @@ + +Contribution +------------ + +EnlighterJS is OpenSource and managed on [GitHub](https://github.com/AndiDittrich/EnlighterJS) - if you like, you're welcome to contribute! +To simplify the release and quality control process, please follow these remarks: + +### Notices ### +* Your commits/pull-request should only contain changes of the `Source/`, `Resources/TestcaseData` directories or the Examples located into the root directory - otherwise i have to merge the request manually +* **Do not change** the files located into the `Examples/` or `Build/` directory - they are automatically generated during the build-process using data from `Resources/TestcaseData` +* Related software packages like MooTools, Bootstrap, ANT-contrib are updated by the maintainer +* If you form a concept of larger project changes, please [discuss](https://github.com/AndiDittrich/EnlighterJS/issues) them with the contributors **before** implementing + +### Documentation ### +* To change contents of the `README.md` file please edit the split files in `Docs/` - the readme file is automatically generated by merging these files during the build process + +### Adding a new Language ### +* First of all: take a look on other languages which are already available to learn about functions and coding styles +* To start with a new language please use the `LanguageDevelopment.phtml` workspace. It will automatically load `Source/Language/Template.mylang.js` (the startup file for your language development). +* Rename your language file `Template.mylang.js` to the **camel-cased** real language name - e.g. `Vhdl.js` +* Add detailed comments to each language rule! +* Keep the code as small as possible: e.g. use regex instead of long keyword lists +* In case your language is a superset of another one, please **extend** the origin language - do not copy the origin file +* Add an language testcase/demo to the `Resouces/TestcaseData` directory +* Finally create a [Pull Request on GitHub](https://help.github.com/articles/creating-a-pull-request/) - your changes will be reviewed and commonly added to the project diff --git a/EnlighterJS/Docs/80-Compatibility.md b/EnlighterJS/Docs/80-Compatibility.md new file mode 100644 index 0000000..b9554a6 --- /dev/null +++ b/EnlighterJS/Docs/80-Compatibility.md @@ -0,0 +1,17 @@ + +Compatibility +------------- + +All browsers supported by MooTools and with HTML5 capabilities for "data-" attributes are compatible with EnlighterJS. +It's possible that it may work with earlier/other browsers. + +* Chrome 10+ +* Safari 5+ +* Internet Explorer 6+ +* Firefox 2+ +* Opera 9+ + +EnlighterJS requires MooTools.Core/1.4 (no compat) - tested with: +* Core/1.4.5 +* Core/1.5.0 +* Core/1.5.1 \ No newline at end of file diff --git a/EnlighterJS/Docs/90-Screenshots.md b/EnlighterJS/Docs/90-Screenshots.md new file mode 100644 index 0000000..aa051e5 --- /dev/null +++ b/EnlighterJS/Docs/90-Screenshots.md @@ -0,0 +1,6 @@ + +Screenshots +----------- + +![Screenshot 1](http://enlighterjs.org/screenshot1.png) +![Screenshot 2](http://enlighterjs.org/screenshot2.png) diff --git a/EnlighterJS/Docs/99-License.md b/EnlighterJS/Docs/99-License.md new file mode 100644 index 0000000..f3a2c45 --- /dev/null +++ b/EnlighterJS/Docs/99-License.md @@ -0,0 +1,4 @@ +License +------- + +EnlighterJS is OpenSource and licensed under the Terms of [The MIT License (X11)](http://opensource.org/licenses/MIT). You're welcome to [contribute](https://github.com/AndiDittrich/EnlighterJS/blob/master/CONTRIBUTE.md)! diff --git a/EnlighterJS/Docs/Copy of 02-Usage.md.backup b/EnlighterJS/Docs/Copy of 02-Usage.md.backup new file mode 100644 index 0000000..bec9d95 --- /dev/null +++ b/EnlighterJS/Docs/Copy of 02-Usage.md.backup @@ -0,0 +1,97 @@ + +Basic Usage +----------- +Download EnlighterJS and extract the files. Copy the prebuild files of the *Build/* directory into a web-accessible directory of your choice. + +Link to the EnlighterJS.yui.js javascript file and the EnlighterJS.yui.css stylesheet in the head section of your document **after** the MooTools file. +The example below assumes you moved the files into your scripts folder under "js/" and your styles folder under "css/". +The extension .yui indicates that these files are compressed with the [Yahoo YUI Compressor](http://yui.github.io/yuicompressor/). **These files are ready for productive use!** +If you want to start developing, you should consider to use the uncompressed versions for easier debugging! + +Rendering options can be defined as global option (Metainit attributes or options object) or local option using the `data-enlighter-` attributes on each codeblock. +It is recommended to use local options only if necessary (e.g. to define a language for each block). + + + #HTML + + ... + + + + + + + + + ... + + +Prepare your source code by giving the element (containing the code) an optional *data-enlighter-language* attribute with the language of the code. +**Notice**: Instead of Lighter.js *fuel:flame' syntax combo within the css classname, EnlighterJS will use HTML5 `data-` attributes! + + #HTML + +
var myClass = new Class({})
+ + +
+ +Finally, use the following JavaScript code examples inside of a 'domready' or 'onload' callback to create the highlighted elements - this process is called initialization. +Be sure to check out the Options section to see the various options you can use. The Example pages have various examples you can use. +It's strongly recommended to use the Element style syntax or the EnlighterJS.Util.Helper class! Further informations are available within the [Initialization Section](#initialization). + + #JS + // OPTION1 - Element style syntax - get element by it's ID + document.id('myJsCode').enlight(true); + + // OPTION2 - Element style syntax - highlight all pre elements with the class *myPhp* + // an EnlighterJS instance is automatically created + document.getElements('pre.myPhp').enlight({language: php}); + + // OPTION3 - Use the Helper-Class to highlight all pre elements - this is the recommended way and required to use the Code-Group feature + EnlighterJS.Util.Helper(document.getElements('pre'), { + language: 'javascript', + theme: 'git' + }); + +Instead of initializing EnlighterJS manually, since version 1.1 it is possible to use a simple html-metatag (called *EnlighterJS Metainit*) to run Enlighter on your page (with basic config options). Further informations are available within the [Initialization Section](#initialization). + + #HTML + + + +Since version 1.8, it's possible to highlight special lines of code. Just add the attribute `data-enlighter-highlight` to your codeblock and provide a set of lines to mark (ranges supported). + + #HTML + +
+    this.tokens = tokens || [];
+    options = this.options;
+    
+ + +
+    EnlighterJS.Util.Helper(document.getElements('pre'), {
+       indent : 5,
+       grouping: false
+	});
+	
+ +Version 2.0 introduces some amazing features like Inline-Syntax-Highlighting. +Just change the renderer option to 'Inline' - and of course the [Metainit](#metainit_initialization) tool performs this action automatically + + #JS + // Highlight all code tags and use Javascript as default language + EnlighterJS.Util.Helper(document.getElements('code'), { + language: 'javascript', + renderer: 'Inline' + }); + +In some cases it might be usefull to start the linnumber counting with another value than 1 (maybe an excerpt). In this case you can add the `data-enlighter-lineoffset` attribute to your codeblock. + + #HTML + +
+    this.tokens = tokens || [];
+    options = this.options;
+    
\ No newline at end of file diff --git a/EnlighterJS/Examples/Example1.html b/EnlighterJS/Examples/Example1.html new file mode 100644 index 0000000..e011509 --- /dev/null +++ b/EnlighterJS/Examples/Example1.html @@ -0,0 +1,99 @@ + + + + + + + + + + + + Basic EnlighterJS Example | EnlighterJS + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +

Some Examples

+

jQuery Code (Javascript) - highlighted by EnlighterJS

+
+$('#loading-example-btn').click(function () {
+	var btn = $(this)
+	btn.button('loading')
+	$.ajax(...).always(function () {
+		btn.button('reset')
+	});
+});
+
+ +

Code-Tabs

+
+$('#loading-example-btn').click(function () {
+	var btn = $(this)
+	btn.button('loading')
+	$.ajax(...).always(function () {
+		btn.button('reset')
+	});
+});
+
+
+// initialize enlighterjs for block elements
+EnlighterJS.Util.Helper(document.getElements('pre'), {
+	// replace tabs with 2 spaces
+	indent: 2,
+	
+	// special hover class
+	hover: 'myHoverClass',
+	
+	// block element renderer
+	renderer: 'Block'
+});
+
+ +

Inline Code

+

EnlighterJS also supports alert('Inline Sourcecode highlighting'); (since version 2.0).

+ +
+ + +
+ + + \ No newline at end of file diff --git a/EnlighterJS/Examples/Example2-jsinit.html b/EnlighterJS/Examples/Example2-jsinit.html new file mode 100644 index 0000000..c637527 --- /dev/null +++ b/EnlighterJS/Examples/Example2-jsinit.html @@ -0,0 +1,108 @@ + + + + + + + + + + + + Javascript Initialization Example | EnlighterJS + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +

Some Examples

+

jQuery Code (Javascript) - highlighted by EnlighterJS

+
+$('#loading-example-btn').click(function () {
+	var btn = $(this)
+	btn.button('loading')
+	$.ajax(...).always(function () {
+		btn.button('reset')
+	});
+});
+
+

Inline Code

+

EnlighterJS also supports $content = print_r(array(1,2,3), true); (since version 2.0).

+ + +
+ + +
+ + + \ No newline at end of file diff --git a/EnlighterJS/Examples/Example3-advanced.html b/EnlighterJS/Examples/Example3-advanced.html new file mode 100644 index 0000000..8978e17 --- /dev/null +++ b/EnlighterJS/Examples/Example3-advanced.html @@ -0,0 +1,330 @@ + + + + + + + + + + + + Advanced Javascript Example | EnlighterJS + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+
Example 1 - Different Inline+Block Config
+
+

Javascript Code - default language JS

+
+$('#loading-example-btn').click(function () {
+	var btn = $(this)
+	btn.button('loading')
+	$.ajax(...).always(function () {
+		btn.button('reset')
+	});
+});
+
+ +

Inline PHP Code - Using classic Theme and PHP as default language

+

EnlighterJS also supports $content = print_r(array(1,2,3), true); (since version 2.0).
Not highlighted (selector not matching) $content = print_r(array(1,2,3), true);

+
+ + + + + + +
+
Example 2 - Using native Element.enlight() extension
+
+

Just want to highlight single elements on your page, maybe loaded dynamically and not available on domready ?

+
+ + +
+

XML Code

+
+<building name="GlobalDynamics Main Building" id="0xFA8A91C6617DFA1B">
+	<group level="2">
+		<room number="123">Conference Room A</room>
+		<room number="124">Conference Room B</room>
+		<room number="125">Conference Room C</room>
+		<room number="126">Conference Room D</room>
+	</group>
+	<group level="2">
+		<room number="17">John's Office</room>
+		<room number="19">Eric's Office</room>
+	</group>
+
+
+ + + + + + +
+
Example 3 - Using EnlighterJS in OOP context
+
+

This method is recommended if you want to do some advanced stuff

+
+ + +
+ +

XML Code

+
+<building name="GlobalDynamics Main Building" id="0xFA8A91C6617DFA1B">
+	<group level="2">
+		<room number="123">Conference Room A</room>
+		<room number="124">Conference Room B</room>
+		<room number="125">Conference Room C</room>
+		<room number="126">Conference Room D</room>
+	</group>
+	<group level="2">
+		<room number="17">John's Office</room>
+		<room number="19">Eric's Office</room>
+	</group>
+
+
+ + + + + +
+
Example 4 - Using Codegroups
+
+

If you need Codegroups, you have to use the EnlighterJS.Util.Helper utility function for initialiation which does the "magic" part for you!
+ Note: EnlighterJS.Util.Init as well as EnlighterJS.Util.Metainit trigger this utility!

+ +

XML Code

+
+<building name="GlobalDynamics Main Building" id="0xFA8A91C6617DFA1B">
+	<group level="2">
+		<room number="123">Conference Room A</room>
+		<room number="124">Conference Room B</room>
+		<room number="125">Conference Room C</room>
+		<room number="126">Conference Room D</room>
+	</group>
+	<group level="2">
+		<room number="17">John's Office</room>
+		<room number="19">Eric's Office</room>
+	</group>
+
+
+$('#loading-example-btn').click(function () {
+	var btn = $(this)
+	btn.button('loading')
+	$.ajax(...).always(function () {
+		btn.button('reset')
+	});
+});
+
+
+ + + + + + + + + + +
+
Example 5 - Dynamical Content/AJAX
+
+

You can also load dynamic content and highlight it! The most simple way is the use of EnlighterJS.Util.Init utility function!

+
+ +
+
+ + + +
+ + +
+ + + \ No newline at end of file diff --git a/EnlighterJS/LICENSE.md b/EnlighterJS/LICENSE.md new file mode 100644 index 0000000..ff3516d --- /dev/null +++ b/EnlighterJS/LICENSE.md @@ -0,0 +1,24 @@ +The MIT License (X11 License) + +Copyright (c) 2009 Jose Prado, 2013-2015 Andi Dittrich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/EnlighterJS/LanguageDevelopment.html b/EnlighterJS/LanguageDevelopment.html new file mode 100644 index 0000000..d7d212d --- /dev/null +++ b/EnlighterJS/LanguageDevelopment.html @@ -0,0 +1,96 @@ + + + + + + + + + + + + LanguageDevelopment | EnlighterJS + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
Start your Language-Development by editing the file Source/Language/Template.mylang.js - all changes will directly appear into this document without the need of a rebuild!
+ +

Inline Content

+

+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor + if FILE == 123.123 then + invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, + not highlighted + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. +

+ +

HTML Content

+
+<!##
+# This is a hash-style-comment
+if FILE == 123.123 then
+	echo 'testcase'
+elseif
+	echo "OH NO"
+endif
+##!>
+
+ + +
+ + +
+ + + \ No newline at end of file diff --git a/EnlighterJS/MooTools/MooTools-Core-1.5.2.js b/EnlighterJS/MooTools/MooTools-Core-1.5.2.js new file mode 100644 index 0000000..895ad4f --- /dev/null +++ b/EnlighterJS/MooTools/MooTools-Core-1.5.2.js @@ -0,0 +1,6131 @@ +/* MooTools: the javascript framework. license: MIT-style license. copyright: Copyright (c) 2006-2015 [Valerio Proietti](http://mad4milk.net/).*/ +/*! +Web Build: http://mootools.net/core/builder/e426a9ae7167c5807b173d5deff673fc +*/ +/* +--- + +name: Core + +description: The heart of MooTools. + +license: MIT-style license. + +copyright: Copyright (c) 2006-2015 [Valerio Proietti](http://mad4milk.net/). + +authors: The MooTools production team (http://mootools.net/developers/) + +inspiration: + - Class implementation inspired by [Base.js](http://dean.edwards.name/weblog/2006/03/base/) Copyright (c) 2006 Dean Edwards, [GNU Lesser General Public License](http://opensource.org/licenses/lgpl-license.php) + - Some functionality inspired by [Prototype.js](http://prototypejs.org) Copyright (c) 2005-2007 Sam Stephenson, [MIT License](http://opensource.org/licenses/mit-license.php) + +provides: [Core, MooTools, Type, typeOf, instanceOf, Native] + +... +*/ +/*! MooTools: the javascript framework. license: MIT-style license. copyright: Copyright (c) 2006-2015 [Valerio Proietti](http://mad4milk.net/).*/ +(function(){ + +this.MooTools = { + version: '1.5.2', + build: 'ed01297a1a19de0675404640e7377cf97694e131' +}; + +// typeOf, instanceOf + +var typeOf = this.typeOf = function(item){ + if (item == null) return 'null'; + if (item.$family != null) return item.$family(); + + if (item.nodeName){ + if (item.nodeType == 1) return 'element'; + if (item.nodeType == 3) return (/\S/).test(item.nodeValue) ? 'textnode' : 'whitespace'; + } else if (typeof item.length == 'number'){ + if ('callee' in item) return 'arguments'; + if ('item' in item) return 'collection'; + } + + return typeof item; +}; + +var instanceOf = this.instanceOf = function(item, object){ + if (item == null) return false; + var constructor = item.$constructor || item.constructor; + while (constructor){ + if (constructor === object) return true; + constructor = constructor.parent; + } + /**/ + if (!item.hasOwnProperty) return false; + /**/ + return item instanceof object; +}; + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/**/ +var enumerables = true; +for (var i in {toString: 1}) enumerables = null; +if (enumerables) enumerables = ['hasOwnProperty', 'valueOf', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'constructor']; +function forEachObjectEnumberableKey(object, fn, bind) { + if (enumerables) for (var i = enumerables.length; i--;){ + var k = enumerables[i]; + // signature has key-value, so overloadSetter can directly pass the + // method function, without swapping arguments. + if (hasOwnProperty.call(object, k)) fn.call(bind, k, object[k]); + } +} +/**/ + +// Function overloading + +var Function = this.Function; + +Function.prototype.overloadSetter = function(usePlural){ + var self = this; + return function(a, b){ + if (a == null) return this; + if (usePlural || typeof a != 'string'){ + for (var k in a) self.call(this, k, a[k]); + /**/ + forEachObjectEnumberableKey(a, self, this); + /**/ + } else { + self.call(this, a, b); + } + return this; + }; +}; + +Function.prototype.overloadGetter = function(usePlural){ + var self = this; + return function(a){ + var args, result; + if (typeof a != 'string') args = a; + else if (arguments.length > 1) args = arguments; + else if (usePlural) args = [a]; + if (args){ + result = {}; + for (var i = 0; i < args.length; i++) result[args[i]] = self.call(this, args[i]); + } else { + result = self.call(this, a); + } + return result; + }; +}; + +Function.prototype.extend = function(key, value){ + this[key] = value; +}.overloadSetter(); + +Function.prototype.implement = function(key, value){ + this.prototype[key] = value; +}.overloadSetter(); + +// From + +var slice = Array.prototype.slice; + +Function.from = function(item){ + return (typeOf(item) == 'function') ? item : function(){ + return item; + }; +}; + +Array.from = function(item){ + if (item == null) return []; + return (Type.isEnumerable(item) && typeof item != 'string') ? (typeOf(item) == 'array') ? item : slice.call(item) : [item]; +}; + +Number.from = function(item){ + var number = parseFloat(item); + return isFinite(number) ? number : null; +}; + +String.from = function(item){ + return item + ''; +}; + +// hide, protect + +Function.implement({ + + hide: function(){ + this.$hidden = true; + return this; + }, + + protect: function(){ + this.$protected = true; + return this; + } + +}); + +// Type + +var Type = this.Type = function(name, object){ + if (name){ + var lower = name.toLowerCase(); + var typeCheck = function(item){ + return (typeOf(item) == lower); + }; + + Type['is' + name] = typeCheck; + if (object != null){ + object.prototype.$family = (function(){ + return lower; + }).hide(); + + } + } + + if (object == null) return null; + + object.extend(this); + object.$constructor = Type; + object.prototype.$constructor = object; + + return object; +}; + +var toString = Object.prototype.toString; + +Type.isEnumerable = function(item){ + return (item != null && typeof item.length == 'number' && toString.call(item) != '[object Function]' ); +}; + +var hooks = {}; + +var hooksOf = function(object){ + var type = typeOf(object.prototype); + return hooks[type] || (hooks[type] = []); +}; + +var implement = function(name, method){ + if (method && method.$hidden) return; + + var hooks = hooksOf(this); + + for (var i = 0; i < hooks.length; i++){ + var hook = hooks[i]; + if (typeOf(hook) == 'type') implement.call(hook, name, method); + else hook.call(this, name, method); + } + + var previous = this.prototype[name]; + if (previous == null || !previous.$protected) this.prototype[name] = method; + + if (this[name] == null && typeOf(method) == 'function') extend.call(this, name, function(item){ + return method.apply(item, slice.call(arguments, 1)); + }); +}; + +var extend = function(name, method){ + if (method && method.$hidden) return; + var previous = this[name]; + if (previous == null || !previous.$protected) this[name] = method; +}; + +Type.implement({ + + implement: implement.overloadSetter(), + + extend: extend.overloadSetter(), + + alias: function(name, existing){ + implement.call(this, name, this.prototype[existing]); + }.overloadSetter(), + + mirror: function(hook){ + hooksOf(this).push(hook); + return this; + } + +}); + +new Type('Type', Type); + +// Default Types + +var force = function(name, object, methods){ + var isType = (object != Object), + prototype = object.prototype; + + if (isType) object = new Type(name, object); + + for (var i = 0, l = methods.length; i < l; i++){ + var key = methods[i], + generic = object[key], + proto = prototype[key]; + + if (generic) generic.protect(); + if (isType && proto) object.implement(key, proto.protect()); + } + + if (isType){ + var methodsEnumerable = prototype.propertyIsEnumerable(methods[0]); + object.forEachMethod = function(fn){ + if (!methodsEnumerable) for (var i = 0, l = methods.length; i < l; i++){ + fn.call(prototype, prototype[methods[i]], methods[i]); + } + for (var key in prototype) fn.call(prototype, prototype[key], key); + }; + } + + return force; +}; + +force('String', String, [ + 'charAt', 'charCodeAt', 'concat', 'contains', 'indexOf', 'lastIndexOf', 'match', 'quote', 'replace', 'search', + 'slice', 'split', 'substr', 'substring', 'trim', 'toLowerCase', 'toUpperCase' +])('Array', Array, [ + 'pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift', 'concat', 'join', 'slice', + 'indexOf', 'lastIndexOf', 'filter', 'forEach', 'every', 'map', 'some', 'reduce', 'reduceRight', 'contains' +])('Number', Number, [ + 'toExponential', 'toFixed', 'toLocaleString', 'toPrecision' +])('Function', Function, [ + 'apply', 'call', 'bind' +])('RegExp', RegExp, [ + 'exec', 'test' +])('Object', Object, [ + 'create', 'defineProperty', 'defineProperties', 'keys', + 'getPrototypeOf', 'getOwnPropertyDescriptor', 'getOwnPropertyNames', + 'preventExtensions', 'isExtensible', 'seal', 'isSealed', 'freeze', 'isFrozen' +])('Date', Date, ['now']); + +Object.extend = extend.overloadSetter(); + +Date.extend('now', function(){ + return +(new Date); +}); + +new Type('Boolean', Boolean); + +// fixes NaN returning as Number + +Number.prototype.$family = function(){ + return isFinite(this) ? 'number' : 'null'; +}.hide(); + +// Number.random + +Number.extend('random', function(min, max){ + return Math.floor(Math.random() * (max - min + 1) + min); +}); + +// forEach, each, keys + +Array.implement({ + + /**/ + forEach: function(fn, bind){ + for (var i = 0, l = this.length; i < l; i++){ + if (i in this) fn.call(bind, this[i], i, this); + } + }, + /**/ + + each: function(fn, bind){ + Array.forEach(this, fn, bind); + return this; + } + +}); + +Object.extend({ + + keys: function(object){ + var keys = []; + for (var k in object){ + if (hasOwnProperty.call(object, k)) keys.push(k); + } + /**/ + forEachObjectEnumberableKey(object, function(k){ + keys.push(k); + }); + /**/ + return keys; + }, + + forEach: function(object, fn, bind){ + Object.keys(object).forEach(function(key){ + fn.call(bind, object[key], key, object); + }); + } + +}); + +Object.each = Object.forEach; + + +// Array & Object cloning, Object merging and appending + +var cloneOf = function(item){ + switch (typeOf(item)){ + case 'array': return item.clone(); + case 'object': return Object.clone(item); + default: return item; + } +}; + +Array.implement('clone', function(){ + var i = this.length, clone = new Array(i); + while (i--) clone[i] = cloneOf(this[i]); + return clone; +}); + +var mergeOne = function(source, key, current){ + switch (typeOf(current)){ + case 'object': + if (typeOf(source[key]) == 'object') Object.merge(source[key], current); + else source[key] = Object.clone(current); + break; + case 'array': source[key] = current.clone(); break; + default: source[key] = current; + } + return source; +}; + +Object.extend({ + + merge: function(source, k, v){ + if (typeOf(k) == 'string') return mergeOne(source, k, v); + for (var i = 1, l = arguments.length; i < l; i++){ + var object = arguments[i]; + for (var key in object) mergeOne(source, key, object[key]); + } + return source; + }, + + clone: function(object){ + var clone = {}; + for (var key in object) clone[key] = cloneOf(object[key]); + return clone; + }, + + append: function(original){ + for (var i = 1, l = arguments.length; i < l; i++){ + var extended = arguments[i] || {}; + for (var key in extended) original[key] = extended[key]; + } + return original; + } + +}); + +// Object-less types + +['Object', 'WhiteSpace', 'TextNode', 'Collection', 'Arguments'].each(function(name){ + new Type(name); +}); + +// Unique ID + +var UID = Date.now(); + +String.extend('uniqueID', function(){ + return (UID++).toString(36); +}); + + + +})(); + +/* +--- + +name: Array + +description: Contains Array Prototypes like each, contains, and erase. + +license: MIT-style license. + +requires: [Type] + +provides: Array + +... +*/ + +Array.implement({ + + /**/ + every: function(fn, bind){ + for (var i = 0, l = this.length >>> 0; i < l; i++){ + if ((i in this) && !fn.call(bind, this[i], i, this)) return false; + } + return true; + }, + + filter: function(fn, bind){ + var results = []; + for (var value, i = 0, l = this.length >>> 0; i < l; i++) if (i in this){ + value = this[i]; + if (fn.call(bind, value, i, this)) results.push(value); + } + return results; + }, + + indexOf: function(item, from){ + var length = this.length >>> 0; + for (var i = (from < 0) ? Math.max(0, length + from) : from || 0; i < length; i++){ + if (this[i] === item) return i; + } + return -1; + }, + + map: function(fn, bind){ + var length = this.length >>> 0, results = Array(length); + for (var i = 0; i < length; i++){ + if (i in this) results[i] = fn.call(bind, this[i], i, this); + } + return results; + }, + + some: function(fn, bind){ + for (var i = 0, l = this.length >>> 0; i < l; i++){ + if ((i in this) && fn.call(bind, this[i], i, this)) return true; + } + return false; + }, + /**/ + + clean: function(){ + return this.filter(function(item){ + return item != null; + }); + }, + + invoke: function(methodName){ + var args = Array.slice(arguments, 1); + return this.map(function(item){ + return item[methodName].apply(item, args); + }); + }, + + associate: function(keys){ + var obj = {}, length = Math.min(this.length, keys.length); + for (var i = 0; i < length; i++) obj[keys[i]] = this[i]; + return obj; + }, + + link: function(object){ + var result = {}; + for (var i = 0, l = this.length; i < l; i++){ + for (var key in object){ + if (object[key](this[i])){ + result[key] = this[i]; + delete object[key]; + break; + } + } + } + return result; + }, + + contains: function(item, from){ + return this.indexOf(item, from) != -1; + }, + + append: function(array){ + this.push.apply(this, array); + return this; + }, + + getLast: function(){ + return (this.length) ? this[this.length - 1] : null; + }, + + getRandom: function(){ + return (this.length) ? this[Number.random(0, this.length - 1)] : null; + }, + + include: function(item){ + if (!this.contains(item)) this.push(item); + return this; + }, + + combine: function(array){ + for (var i = 0, l = array.length; i < l; i++) this.include(array[i]); + return this; + }, + + erase: function(item){ + for (var i = this.length; i--;){ + if (this[i] === item) this.splice(i, 1); + } + return this; + }, + + empty: function(){ + this.length = 0; + return this; + }, + + flatten: function(){ + var array = []; + for (var i = 0, l = this.length; i < l; i++){ + var type = typeOf(this[i]); + if (type == 'null') continue; + array = array.concat((type == 'array' || type == 'collection' || type == 'arguments' || instanceOf(this[i], Array)) ? Array.flatten(this[i]) : this[i]); + } + return array; + }, + + pick: function(){ + for (var i = 0, l = this.length; i < l; i++){ + if (this[i] != null) return this[i]; + } + return null; + }, + + hexToRgb: function(array){ + if (this.length != 3) return null; + var rgb = this.map(function(value){ + if (value.length == 1) value += value; + return parseInt(value, 16); + }); + return (array) ? rgb : 'rgb(' + rgb + ')'; + }, + + rgbToHex: function(array){ + if (this.length < 3) return null; + if (this.length == 4 && this[3] == 0 && !array) return 'transparent'; + var hex = []; + for (var i = 0; i < 3; i++){ + var bit = (this[i] - 0).toString(16); + hex.push((bit.length == 1) ? '0' + bit : bit); + } + return (array) ? hex : '#' + hex.join(''); + } + +}); + + + +/* +--- + +name: Function + +description: Contains Function Prototypes like create, bind, pass, and delay. + +license: MIT-style license. + +requires: Type + +provides: Function + +... +*/ + +Function.extend({ + + attempt: function(){ + for (var i = 0, l = arguments.length; i < l; i++){ + try { + return arguments[i](); + } catch (e){} + } + return null; + } + +}); + +Function.implement({ + + attempt: function(args, bind){ + try { + return this.apply(bind, Array.from(args)); + } catch (e){} + + return null; + }, + + /**/ + bind: function(that){ + var self = this, + args = arguments.length > 1 ? Array.slice(arguments, 1) : null, + F = function(){}; + + var bound = function(){ + var context = that, length = arguments.length; + if (this instanceof bound){ + F.prototype = self.prototype; + context = new F; + } + var result = (!args && !length) + ? self.call(context) + : self.apply(context, args && length ? args.concat(Array.slice(arguments)) : args || arguments); + return context == that ? result : context; + }; + return bound; + }, + /**/ + + pass: function(args, bind){ + var self = this; + if (args != null) args = Array.from(args); + return function(){ + return self.apply(bind, args || arguments); + }; + }, + + delay: function(delay, bind, args){ + return setTimeout(this.pass((args == null ? [] : args), bind), delay); + }, + + periodical: function(periodical, bind, args){ + return setInterval(this.pass((args == null ? [] : args), bind), periodical); + } + +}); + + + +/* +--- + +name: Number + +description: Contains Number Prototypes like limit, round, times, and ceil. + +license: MIT-style license. + +requires: Type + +provides: Number + +... +*/ + +Number.implement({ + + limit: function(min, max){ + return Math.min(max, Math.max(min, this)); + }, + + round: function(precision){ + precision = Math.pow(10, precision || 0).toFixed(precision < 0 ? -precision : 0); + return Math.round(this * precision) / precision; + }, + + times: function(fn, bind){ + for (var i = 0; i < this; i++) fn.call(bind, i, this); + }, + + toFloat: function(){ + return parseFloat(this); + }, + + toInt: function(base){ + return parseInt(this, base || 10); + } + +}); + +Number.alias('each', 'times'); + +(function(math){ + var methods = {}; + math.each(function(name){ + if (!Number[name]) methods[name] = function(){ + return Math[name].apply(null, [this].concat(Array.from(arguments))); + }; + }); + Number.implement(methods); +})(['abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'exp', 'floor', 'log', 'max', 'min', 'pow', 'sin', 'sqrt', 'tan']); + +/* +--- + +name: String + +description: Contains String Prototypes like camelCase, capitalize, test, and toInt. + +license: MIT-style license. + +requires: [Type, Array] + +provides: String + +... +*/ + +String.implement({ + + // + contains: function(string, index){ + return (index ? String(this).slice(index) : String(this)).indexOf(string) > -1; + }, + // + + test: function(regex, params){ + return ((typeOf(regex) == 'regexp') ? regex : new RegExp('' + regex, params)).test(this); + }, + + trim: function(){ + return String(this).replace(/^\s+|\s+$/g, ''); + }, + + clean: function(){ + return String(this).replace(/\s+/g, ' ').trim(); + }, + + camelCase: function(){ + return String(this).replace(/-\D/g, function(match){ + return match.charAt(1).toUpperCase(); + }); + }, + + hyphenate: function(){ + return String(this).replace(/[A-Z]/g, function(match){ + return ('-' + match.charAt(0).toLowerCase()); + }); + }, + + capitalize: function(){ + return String(this).replace(/\b[a-z]/g, function(match){ + return match.toUpperCase(); + }); + }, + + escapeRegExp: function(){ + return String(this).replace(/([-.*+?^${}()|[\]\/\\])/g, '\\$1'); + }, + + toInt: function(base){ + return parseInt(this, base || 10); + }, + + toFloat: function(){ + return parseFloat(this); + }, + + hexToRgb: function(array){ + var hex = String(this).match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/); + return (hex) ? hex.slice(1).hexToRgb(array) : null; + }, + + rgbToHex: function(array){ + var rgb = String(this).match(/\d{1,3}/g); + return (rgb) ? rgb.rgbToHex(array) : null; + }, + + substitute: function(object, regexp){ + return String(this).replace(regexp || (/\\?\{([^{}]+)\}/g), function(match, name){ + if (match.charAt(0) == '\\') return match.slice(1); + return (object[name] != null) ? object[name] : ''; + }); + } + +}); + + + +/* +--- + +name: Browser + +description: The Browser Object. Contains Browser initialization, Window and Document, and the Browser Hash. + +license: MIT-style license. + +requires: [Array, Function, Number, String] + +provides: [Browser, Window, Document] + +... +*/ + +(function(){ + +var document = this.document; +var window = document.window = this; + +var parse = function(ua, platform){ + ua = ua.toLowerCase(); + platform = (platform ? platform.toLowerCase() : ''); + + // chrome is included in the edge UA, so need to check for edge first, + // before checking if it's chrome. + var UA = ua.match(/(edge)[\s\/:]([\w\d\.]+)/); + if (!UA){ + UA = ua.match(/(opera|ie|firefox|chrome|trident|crios|version)[\s\/:]([\w\d\.]+)?.*?(safari|(?:rv[\s\/:]|version[\s\/:])([\w\d\.]+)|$)/) || [null, 'unknown', 0]; + } + + if (UA[1] == 'trident'){ + UA[1] = 'ie'; + if (UA[4]) UA[2] = UA[4]; + } else if (UA[1] == 'crios'){ + UA[1] = 'chrome'; + } + + platform = ua.match(/ip(?:ad|od|hone)/) ? 'ios' : (ua.match(/(?:webos|android)/) || ua.match(/mac|win|linux/) || ['other'])[0]; + if (platform == 'win') platform = 'windows'; + + return { + extend: Function.prototype.extend, + name: (UA[1] == 'version') ? UA[3] : UA[1], + version: parseFloat((UA[1] == 'opera' && UA[4]) ? UA[4] : UA[2]), + platform: platform + }; +}; + +var Browser = this.Browser = parse(navigator.userAgent, navigator.platform); + +if (Browser.name == 'ie' && document.documentMode){ + Browser.version = document.documentMode; +} + +Browser.extend({ + Features: { + xpath: !!(document.evaluate), + air: !!(window.runtime), + query: !!(document.querySelector), + json: !!(window.JSON) + }, + parseUA: parse +}); + + + +// Request + +Browser.Request = (function(){ + + var XMLHTTP = function(){ + return new XMLHttpRequest(); + }; + + var MSXML2 = function(){ + return new ActiveXObject('MSXML2.XMLHTTP'); + }; + + var MSXML = function(){ + return new ActiveXObject('Microsoft.XMLHTTP'); + }; + + return Function.attempt(function(){ + XMLHTTP(); + return XMLHTTP; + }, function(){ + MSXML2(); + return MSXML2; + }, function(){ + MSXML(); + return MSXML; + }); + +})(); + +Browser.Features.xhr = !!(Browser.Request); + + + +// String scripts + +Browser.exec = function(text){ + if (!text) return text; + if (window.execScript){ + window.execScript(text); + } else { + var script = document.createElement('script'); + script.setAttribute('type', 'text/javascript'); + script.text = text; + document.head.appendChild(script); + document.head.removeChild(script); + } + return text; +}; + +String.implement('stripScripts', function(exec){ + var scripts = ''; + var text = this.replace(/]*>([\s\S]*?)<\/script>/gi, function(all, code){ + scripts += code + '\n'; + return ''; + }); + if (exec === true) Browser.exec(scripts); + else if (typeOf(exec) == 'function') exec(scripts, text); + return text; +}); + +// Window, Document + +Browser.extend({ + Document: this.Document, + Window: this.Window, + Element: this.Element, + Event: this.Event +}); + +this.Window = this.$constructor = new Type('Window', function(){}); + +this.$family = Function.from('window').hide(); + +Window.mirror(function(name, method){ + window[name] = method; +}); + +this.Document = document.$constructor = new Type('Document', function(){}); + +document.$family = Function.from('document').hide(); + +Document.mirror(function(name, method){ + document[name] = method; +}); + +document.html = document.documentElement; +if (!document.head) document.head = document.getElementsByTagName('head')[0]; + +if (document.execCommand) try { + document.execCommand("BackgroundImageCache", false, true); +} catch (e){} + +/**/ +if (this.attachEvent && !this.addEventListener){ + var unloadEvent = function(){ + this.detachEvent('onunload', unloadEvent); + document.head = document.html = document.window = null; + window = this.Window = document = null; + }; + this.attachEvent('onunload', unloadEvent); +} + +// IE fails on collections and ) +var arrayFrom = Array.from; +try { + arrayFrom(document.html.childNodes); +} catch(e){ + Array.from = function(item){ + if (typeof item != 'string' && Type.isEnumerable(item) && typeOf(item) != 'array'){ + var i = item.length, array = new Array(i); + while (i--) array[i] = item[i]; + return array; + } + return arrayFrom(item); + }; + + var prototype = Array.prototype, + slice = prototype.slice; + ['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift', 'concat', 'join', 'slice'].each(function(name){ + var method = prototype[name]; + Array[name] = function(item){ + return method.apply(Array.from(item), slice.call(arguments, 1)); + }; + }); +} +/**/ + + + +})(); + +/* +--- + +name: Class + +description: Contains the Class Function for easily creating, extending, and implementing reusable Classes. + +license: MIT-style license. + +requires: [Array, String, Function, Number] + +provides: Class + +... +*/ + +(function(){ + +var Class = this.Class = new Type('Class', function(params){ + if (instanceOf(params, Function)) params = {initialize: params}; + + var newClass = function(){ + reset(this); + if (newClass.$prototyping) return this; + this.$caller = null; + this.$family = null; + var value = (this.initialize) ? this.initialize.apply(this, arguments) : this; + this.$caller = this.caller = null; + return value; + }.extend(this).implement(params); + + newClass.$constructor = Class; + newClass.prototype.$constructor = newClass; + newClass.prototype.parent = parent; + + return newClass; +}); + +var parent = function(){ + if (!this.$caller) throw new Error('The method "parent" cannot be called.'); + var name = this.$caller.$name, + parent = this.$caller.$owner.parent, + previous = (parent) ? parent.prototype[name] : null; + if (!previous) throw new Error('The method "' + name + '" has no parent.'); + return previous.apply(this, arguments); +}; + +var reset = function(object){ + for (var key in object){ + var value = object[key]; + switch (typeOf(value)){ + case 'object': + var F = function(){}; + F.prototype = value; + object[key] = reset(new F); + break; + case 'array': object[key] = value.clone(); break; + } + } + return object; +}; + +var wrap = function(self, key, method){ + if (method.$origin) method = method.$origin; + var wrapper = function(){ + if (method.$protected && this.$caller == null) throw new Error('The method "' + key + '" cannot be called.'); + var caller = this.caller, current = this.$caller; + this.caller = current; this.$caller = wrapper; + var result = method.apply(this, arguments); + this.$caller = current; this.caller = caller; + return result; + }.extend({$owner: self, $origin: method, $name: key}); + return wrapper; +}; + +var implement = function(key, value, retain){ + if (Class.Mutators.hasOwnProperty(key)){ + value = Class.Mutators[key].call(this, value); + if (value == null) return this; + } + + if (typeOf(value) == 'function'){ + if (value.$hidden) return this; + this.prototype[key] = (retain) ? value : wrap(this, key, value); + } else { + Object.merge(this.prototype, key, value); + } + + return this; +}; + +var getInstance = function(klass){ + klass.$prototyping = true; + var proto = new klass; + delete klass.$prototyping; + return proto; +}; + +Class.implement('implement', implement.overloadSetter()); + +Class.Mutators = { + + Extends: function(parent){ + this.parent = parent; + this.prototype = getInstance(parent); + }, + + Implements: function(items){ + Array.from(items).each(function(item){ + var instance = new item; + for (var key in instance) implement.call(this, key, instance[key], true); + }, this); + } +}; + +})(); + +/* +--- + +name: Class.Extras + +description: Contains Utility Classes that can be implemented into your own Classes to ease the execution of many common tasks. + +license: MIT-style license. + +requires: Class + +provides: [Class.Extras, Chain, Events, Options] + +... +*/ + +(function(){ + +this.Chain = new Class({ + + $chain: [], + + chain: function(){ + this.$chain.append(Array.flatten(arguments)); + return this; + }, + + callChain: function(){ + return (this.$chain.length) ? this.$chain.shift().apply(this, arguments) : false; + }, + + clearChain: function(){ + this.$chain.empty(); + return this; + } + +}); + +var removeOn = function(string){ + return string.replace(/^on([A-Z])/, function(full, first){ + return first.toLowerCase(); + }); +}; + +this.Events = new Class({ + + $events: {}, + + addEvent: function(type, fn, internal){ + type = removeOn(type); + + + + this.$events[type] = (this.$events[type] || []).include(fn); + if (internal) fn.internal = true; + return this; + }, + + addEvents: function(events){ + for (var type in events) this.addEvent(type, events[type]); + return this; + }, + + fireEvent: function(type, args, delay){ + type = removeOn(type); + var events = this.$events[type]; + if (!events) return this; + args = Array.from(args); + events.each(function(fn){ + if (delay) fn.delay(delay, this, args); + else fn.apply(this, args); + }, this); + return this; + }, + + removeEvent: function(type, fn){ + type = removeOn(type); + var events = this.$events[type]; + if (events && !fn.internal){ + var index = events.indexOf(fn); + if (index != -1) delete events[index]; + } + return this; + }, + + removeEvents: function(events){ + var type; + if (typeOf(events) == 'object'){ + for (type in events) this.removeEvent(type, events[type]); + return this; + } + if (events) events = removeOn(events); + for (type in this.$events){ + if (events && events != type) continue; + var fns = this.$events[type]; + for (var i = fns.length; i--;) if (i in fns){ + this.removeEvent(type, fns[i]); + } + } + return this; + } + +}); + +this.Options = new Class({ + + setOptions: function(){ + var options = this.options = Object.merge.apply(null, [{}, this.options].append(arguments)); + if (this.addEvent) for (var option in options){ + if (typeOf(options[option]) != 'function' || !(/^on[A-Z]/).test(option)) continue; + this.addEvent(option, options[option]); + delete options[option]; + } + return this; + } + +}); + +})(); + +/* +--- + +name: Object + +description: Object generic methods + +license: MIT-style license. + +requires: Type + +provides: [Object, Hash] + +... +*/ + +(function(){ + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +Object.extend({ + + subset: function(object, keys){ + var results = {}; + for (var i = 0, l = keys.length; i < l; i++){ + var k = keys[i]; + if (k in object) results[k] = object[k]; + } + return results; + }, + + map: function(object, fn, bind){ + var results = {}; + var keys = Object.keys(object); + for (var i = 0; i < keys.length; i++){ + var key = keys[i]; + results[key] = fn.call(bind, object[key], key, object); + } + return results; + }, + + filter: function(object, fn, bind){ + var results = {}; + var keys = Object.keys(object); + for (var i = 0; i < keys.length; i++){ + var key = keys[i], value = object[key]; + if (fn.call(bind, value, key, object)) results[key] = value; + } + return results; + }, + + every: function(object, fn, bind){ + var keys = Object.keys(object); + for (var i = 0; i < keys.length; i++){ + var key = keys[i]; + if (!fn.call(bind, object[key], key)) return false; + } + return true; + }, + + some: function(object, fn, bind){ + var keys = Object.keys(object); + for (var i = 0; i < keys.length; i++){ + var key = keys[i]; + if (fn.call(bind, object[key], key)) return true; + } + return false; + }, + + values: function(object){ + var values = []; + var keys = Object.keys(object); + for (var i = 0; i < keys.length; i++){ + var k = keys[i]; + values.push(object[k]); + } + return values; + }, + + getLength: function(object){ + return Object.keys(object).length; + }, + + keyOf: function(object, value){ + var keys = Object.keys(object); + for (var i = 0; i < keys.length; i++){ + var key = keys[i]; + if (object[key] === value) return key; + } + return null; + }, + + contains: function(object, value){ + return Object.keyOf(object, value) != null; + }, + + toQueryString: function(object, base){ + var queryString = []; + + Object.each(object, function(value, key){ + if (base) key = base + '[' + key + ']'; + var result; + switch (typeOf(value)){ + case 'object': result = Object.toQueryString(value, key); break; + case 'array': + var qs = {}; + value.each(function(val, i){ + qs[i] = val; + }); + result = Object.toQueryString(qs, key); + break; + default: result = key + '=' + encodeURIComponent(value); + } + if (value != null) queryString.push(result); + }); + + return queryString.join('&'); + } + +}); + +})(); + + + +/* +--- +name: Slick.Parser +description: Standalone CSS3 Selector parser +provides: Slick.Parser +... +*/ + +;(function(){ + +var parsed, + separatorIndex, + combinatorIndex, + reversed, + cache = {}, + reverseCache = {}, + reUnescape = /\\/g; + +var parse = function(expression, isReversed){ + if (expression == null) return null; + if (expression.Slick === true) return expression; + expression = ('' + expression).replace(/^\s+|\s+$/g, ''); + reversed = !!isReversed; + var currentCache = (reversed) ? reverseCache : cache; + if (currentCache[expression]) return currentCache[expression]; + parsed = { + Slick: true, + expressions: [], + raw: expression, + reverse: function(){ + return parse(this.raw, true); + } + }; + separatorIndex = -1; + while (expression != (expression = expression.replace(regexp, parser))); + parsed.length = parsed.expressions.length; + return currentCache[parsed.raw] = (reversed) ? reverse(parsed) : parsed; +}; + +var reverseCombinator = function(combinator){ + if (combinator === '!') return ' '; + else if (combinator === ' ') return '!'; + else if ((/^!/).test(combinator)) return combinator.replace(/^!/, ''); + else return '!' + combinator; +}; + +var reverse = function(expression){ + var expressions = expression.expressions; + for (var i = 0; i < expressions.length; i++){ + var exp = expressions[i]; + var last = {parts: [], tag: '*', combinator: reverseCombinator(exp[0].combinator)}; + + for (var j = 0; j < exp.length; j++){ + var cexp = exp[j]; + if (!cexp.reverseCombinator) cexp.reverseCombinator = ' '; + cexp.combinator = cexp.reverseCombinator; + delete cexp.reverseCombinator; + } + + exp.reverse().push(last); + } + return expression; +}; + +var escapeRegExp = function(string){// Credit: XRegExp 0.6.1 (c) 2007-2008 Steven Levithan MIT License + return string.replace(/[-[\]{}()*+?.\\^$|,#\s]/g, function(match){ + return '\\' + match; + }); +}; + +var regexp = new RegExp( +/* +#!/usr/bin/env ruby +puts "\t\t" + DATA.read.gsub(/\(\?x\)|\s+#.*$|\s+|\\$|\\n/,'') +__END__ + "(?x)^(?:\ + \\s* ( , ) \\s* # Separator \n\ + | \\s* ( + ) \\s* # Combinator \n\ + | ( \\s+ ) # CombinatorChildren \n\ + | ( + | \\* ) # Tag \n\ + | \\# ( + ) # ID \n\ + | \\. ( + ) # ClassName \n\ + | # Attribute \n\ + \\[ \ + \\s* (+) (?: \ + \\s* ([*^$!~|]?=) (?: \ + \\s* (?:\ + ([\"']?)(.*?)\\9 \ + )\ + ) \ + )? \\s* \ + \\](?!\\]) \n\ + | :+ ( + )(?:\ + \\( (?:\ + (?:([\"'])([^\\12]*)\\12)|((?:\\([^)]+\\)|[^()]*)+)\ + ) \\)\ + )?\ + )" +*/ + "^(?:\\s*(,)\\s*|\\s*(+)\\s*|(\\s+)|(+|\\*)|\\#(+)|\\.(+)|\\[\\s*(+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:([\"']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(+)(?:\\((?:(?:([\"'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)" + .replace(//, '[' + escapeRegExp(">+~`!@$%^&={}\\;/g, '(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])') + .replace(//g, '(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])') +); + +function parser( + rawMatch, + + separator, + combinator, + combinatorChildren, + + tagName, + id, + className, + + attributeKey, + attributeOperator, + attributeQuote, + attributeValue, + + pseudoMarker, + pseudoClass, + pseudoQuote, + pseudoClassQuotedValue, + pseudoClassValue +){ + if (separator || separatorIndex === -1){ + parsed.expressions[++separatorIndex] = []; + combinatorIndex = -1; + if (separator) return ''; + } + + if (combinator || combinatorChildren || combinatorIndex === -1){ + combinator = combinator || ' '; + var currentSeparator = parsed.expressions[separatorIndex]; + if (reversed && currentSeparator[combinatorIndex]) + currentSeparator[combinatorIndex].reverseCombinator = reverseCombinator(combinator); + currentSeparator[++combinatorIndex] = {combinator: combinator, tag: '*'}; + } + + var currentParsed = parsed.expressions[separatorIndex][combinatorIndex]; + + if (tagName){ + currentParsed.tag = tagName.replace(reUnescape, ''); + + } else if (id){ + currentParsed.id = id.replace(reUnescape, ''); + + } else if (className){ + className = className.replace(reUnescape, ''); + + if (!currentParsed.classList) currentParsed.classList = []; + if (!currentParsed.classes) currentParsed.classes = []; + currentParsed.classList.push(className); + currentParsed.classes.push({ + value: className, + regexp: new RegExp('(^|\\s)' + escapeRegExp(className) + '(\\s|$)') + }); + + } else if (pseudoClass){ + pseudoClassValue = pseudoClassValue || pseudoClassQuotedValue; + pseudoClassValue = pseudoClassValue ? pseudoClassValue.replace(reUnescape, '') : null; + + if (!currentParsed.pseudos) currentParsed.pseudos = []; + currentParsed.pseudos.push({ + key: pseudoClass.replace(reUnescape, ''), + value: pseudoClassValue, + type: pseudoMarker.length == 1 ? 'class' : 'element' + }); + + } else if (attributeKey){ + attributeKey = attributeKey.replace(reUnescape, ''); + attributeValue = (attributeValue || '').replace(reUnescape, ''); + + var test, regexp; + + switch (attributeOperator){ + case '^=' : regexp = new RegExp( '^'+ escapeRegExp(attributeValue) ); break; + case '$=' : regexp = new RegExp( escapeRegExp(attributeValue) +'$' ); break; + case '~=' : regexp = new RegExp( '(^|\\s)'+ escapeRegExp(attributeValue) +'(\\s|$)' ); break; + case '|=' : regexp = new RegExp( '^'+ escapeRegExp(attributeValue) +'(-|$)' ); break; + case '=' : test = function(value){ + return attributeValue == value; + }; break; + case '*=' : test = function(value){ + return value && value.indexOf(attributeValue) > -1; + }; break; + case '!=' : test = function(value){ + return attributeValue != value; + }; break; + default : test = function(value){ + return !!value; + }; + } + + if (attributeValue == '' && (/^[*$^]=$/).test(attributeOperator)) test = function(){ + return false; + }; + + if (!test) test = function(value){ + return value && regexp.test(value); + }; + + if (!currentParsed.attributes) currentParsed.attributes = []; + currentParsed.attributes.push({ + key: attributeKey, + operator: attributeOperator, + value: attributeValue, + test: test + }); + + } + + return ''; +}; + +// Slick NS + +var Slick = (this.Slick || {}); + +Slick.parse = function(expression){ + return parse(expression); +}; + +Slick.escapeRegExp = escapeRegExp; + +if (!this.Slick) this.Slick = Slick; + +}).apply(/**/(typeof exports != 'undefined') ? exports : /**/this); + +/* +--- +name: Slick.Finder +description: The new, superfast css selector engine. +provides: Slick.Finder +requires: Slick.Parser +... +*/ + +;(function(){ + +var local = {}, + featuresCache = {}, + toString = Object.prototype.toString; + +// Feature / Bug detection + +local.isNativeCode = function(fn){ + return (/\{\s*\[native code\]\s*\}/).test('' + fn); +}; + +local.isXML = function(document){ + return (!!document.xmlVersion) || (!!document.xml) || (toString.call(document) == '[object XMLDocument]') || + (document.nodeType == 9 && document.documentElement.nodeName != 'HTML'); +}; + +local.setDocument = function(document){ + + // convert elements / window arguments to document. if document cannot be extrapolated, the function returns. + var nodeType = document.nodeType; + if (nodeType == 9); // document + else if (nodeType) document = document.ownerDocument; // node + else if (document.navigator) document = document.document; // window + else return; + + // check if it's the old document + + if (this.document === document) return; + this.document = document; + + // check if we have done feature detection on this document before + + var root = document.documentElement, + rootUid = this.getUIDXML(root), + features = featuresCache[rootUid], + feature; + + if (features){ + for (feature in features){ + this[feature] = features[feature]; + } + return; + } + + features = featuresCache[rootUid] = {}; + + features.root = root; + features.isXMLDocument = this.isXML(document); + + features.brokenStarGEBTN + = features.starSelectsClosedQSA + = features.idGetsName + = features.brokenMixedCaseQSA + = features.brokenGEBCN + = features.brokenCheckedQSA + = features.brokenEmptyAttributeQSA + = features.isHTMLDocument + = features.nativeMatchesSelector + = false; + + var starSelectsClosed, starSelectsComments, + brokenSecondClassNameGEBCN, cachedGetElementsByClassName, + brokenFormAttributeGetter; + + var selected, id = 'slick_uniqueid'; + var testNode = document.createElement('div'); + + var testRoot = document.body || document.getElementsByTagName('body')[0] || root; + testRoot.appendChild(testNode); + + // on non-HTML documents innerHTML and getElementsById doesnt work properly + try { + testNode.innerHTML = ''; + features.isHTMLDocument = !!document.getElementById(id); + } catch(e){} + + if (features.isHTMLDocument){ + + testNode.style.display = 'none'; + + // IE returns comment nodes for getElementsByTagName('*') for some documents + testNode.appendChild(document.createComment('')); + starSelectsComments = (testNode.getElementsByTagName('*').length > 1); + + // IE returns closed nodes (EG:"") for getElementsByTagName('*') for some documents + try { + testNode.innerHTML = 'foo'; + selected = testNode.getElementsByTagName('*'); + starSelectsClosed = (selected && !!selected.length && selected[0].nodeName.charAt(0) == '/'); + } catch(e){}; + + features.brokenStarGEBTN = starSelectsComments || starSelectsClosed; + + // IE returns elements with the name instead of just id for getElementsById for some documents + try { + testNode.innerHTML = ''; + features.idGetsName = document.getElementById(id) === testNode.firstChild; + } catch(e){} + + if (testNode.getElementsByClassName){ + + // Safari 3.2 getElementsByClassName caches results + try { + testNode.innerHTML = ''; + testNode.getElementsByClassName('b').length; + testNode.firstChild.className = 'b'; + cachedGetElementsByClassName = (testNode.getElementsByClassName('b').length != 2); + } catch(e){}; + + // Opera 9.6 getElementsByClassName doesnt detects the class if its not the first one + try { + testNode.innerHTML = ''; + brokenSecondClassNameGEBCN = (testNode.getElementsByClassName('a').length != 2); + } catch(e){} + + features.brokenGEBCN = cachedGetElementsByClassName || brokenSecondClassNameGEBCN; + } + + if (testNode.querySelectorAll){ + // IE 8 returns closed nodes (EG:"") for querySelectorAll('*') for some documents + try { + testNode.innerHTML = 'foo'; + selected = testNode.querySelectorAll('*'); + features.starSelectsClosedQSA = (selected && !!selected.length && selected[0].nodeName.charAt(0) == '/'); + } catch(e){} + + // Safari 3.2 querySelectorAll doesnt work with mixedcase on quirksmode + try { + testNode.innerHTML = ''; + features.brokenMixedCaseQSA = !testNode.querySelectorAll('.MiX').length; + } catch(e){} + + // Webkit and Opera dont return selected options on querySelectorAll + try { + testNode.innerHTML = ''; + features.brokenCheckedQSA = (testNode.querySelectorAll(':checked').length == 0); + } catch(e){}; + + // IE returns incorrect results for attr[*^$]="" selectors on querySelectorAll + try { + testNode.innerHTML = ''; + features.brokenEmptyAttributeQSA = (testNode.querySelectorAll('[class*=""]').length != 0); + } catch(e){} + + } + + // IE6-7, if a form has an input of id x, form.getAttribute(x) returns a reference to the input + try { + testNode.innerHTML = '
'; + brokenFormAttributeGetter = (testNode.firstChild.getAttribute('action') != 's'); + } catch(e){} + + // native matchesSelector function + + features.nativeMatchesSelector = root.matches || /*root.msMatchesSelector ||*/ root.mozMatchesSelector || root.webkitMatchesSelector; + if (features.nativeMatchesSelector) try { + // if matchesSelector trows errors on incorrect sintaxes we can use it + features.nativeMatchesSelector.call(root, ':slick'); + features.nativeMatchesSelector = null; + } catch(e){} + + } + + try { + root.slick_expando = 1; + delete root.slick_expando; + features.getUID = this.getUIDHTML; + } catch(e){ + features.getUID = this.getUIDXML; + } + + testRoot.removeChild(testNode); + testNode = selected = testRoot = null; + + // getAttribute + + features.getAttribute = (features.isHTMLDocument && brokenFormAttributeGetter) ? function(node, name){ + var method = this.attributeGetters[name]; + if (method) return method.call(node); + var attributeNode = node.getAttributeNode(name); + return (attributeNode) ? attributeNode.nodeValue : null; + } : function(node, name){ + var method = this.attributeGetters[name]; + return (method) ? method.call(node) : node.getAttribute(name); + }; + + // hasAttribute + + features.hasAttribute = (root && this.isNativeCode(root.hasAttribute)) ? function(node, attribute){ + return node.hasAttribute(attribute); + } : function(node, attribute){ + node = node.getAttributeNode(attribute); + return !!(node && (node.specified || node.nodeValue)); + }; + + // contains + // FIXME: Add specs: local.contains should be different for xml and html documents? + var nativeRootContains = root && this.isNativeCode(root.contains), + nativeDocumentContains = document && this.isNativeCode(document.contains); + + features.contains = (nativeRootContains && nativeDocumentContains) ? function(context, node){ + return context.contains(node); + } : (nativeRootContains && !nativeDocumentContains) ? function(context, node){ + // IE8 does not have .contains on document. + return context === node || ((context === document) ? document.documentElement : context).contains(node); + } : (root && root.compareDocumentPosition) ? function(context, node){ + return context === node || !!(context.compareDocumentPosition(node) & 16); + } : function(context, node){ + if (node) do { + if (node === context) return true; + } while ((node = node.parentNode)); + return false; + }; + + // document order sorting + // credits to Sizzle (http://sizzlejs.com/) + + features.documentSorter = (root.compareDocumentPosition) ? function(a, b){ + if (!a.compareDocumentPosition || !b.compareDocumentPosition) return 0; + return a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1; + } : ('sourceIndex' in root) ? function(a, b){ + if (!a.sourceIndex || !b.sourceIndex) return 0; + return a.sourceIndex - b.sourceIndex; + } : (document.createRange) ? function(a, b){ + if (!a.ownerDocument || !b.ownerDocument) return 0; + var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange(); + aRange.setStart(a, 0); + aRange.setEnd(a, 0); + bRange.setStart(b, 0); + bRange.setEnd(b, 0); + return aRange.compareBoundaryPoints(Range.START_TO_END, bRange); + } : null ; + + root = null; + + for (feature in features){ + this[feature] = features[feature]; + } +}; + +// Main Method + +var reSimpleSelector = /^([#.]?)((?:[\w-]+|\*))$/, + reEmptyAttribute = /\[.+[*$^]=(?:""|'')?\]/, + qsaFailExpCache = {}; + +local.search = function(context, expression, append, first){ + + var found = this.found = (first) ? null : (append || []); + + if (!context) return found; + else if (context.navigator) context = context.document; // Convert the node from a window to a document + else if (!context.nodeType) return found; + + // setup + + var parsed, i, + uniques = this.uniques = {}, + hasOthers = !!(append && append.length), + contextIsDocument = (context.nodeType == 9); + + if (this.document !== (contextIsDocument ? context : context.ownerDocument)) this.setDocument(context); + + // avoid duplicating items already in the append array + if (hasOthers) for (i = found.length; i--;) uniques[this.getUID(found[i])] = true; + + // expression checks + + if (typeof expression == 'string'){ // expression is a string + + /**/ + var simpleSelector = expression.match(reSimpleSelector); + simpleSelectors: if (simpleSelector){ + + var symbol = simpleSelector[1], + name = simpleSelector[2], + node, nodes; + + if (!symbol){ + + if (name == '*' && this.brokenStarGEBTN) break simpleSelectors; + nodes = context.getElementsByTagName(name); + if (first) return nodes[0] || null; + for (i = 0; node = nodes[i++];){ + if (!(hasOthers && uniques[this.getUID(node)])) found.push(node); + } + + } else if (symbol == '#'){ + + if (!this.isHTMLDocument || !contextIsDocument) break simpleSelectors; + node = context.getElementById(name); + if (!node) return found; + if (this.idGetsName && node.getAttributeNode('id').nodeValue != name) break simpleSelectors; + if (first) return node || null; + if (!(hasOthers && uniques[this.getUID(node)])) found.push(node); + + } else if (symbol == '.'){ + + if (!this.isHTMLDocument || ((!context.getElementsByClassName || this.brokenGEBCN) && context.querySelectorAll)) break simpleSelectors; + if (context.getElementsByClassName && !this.brokenGEBCN){ + nodes = context.getElementsByClassName(name); + if (first) return nodes[0] || null; + for (i = 0; node = nodes[i++];){ + if (!(hasOthers && uniques[this.getUID(node)])) found.push(node); + } + } else { + var matchClass = new RegExp('(^|\\s)'+ Slick.escapeRegExp(name) +'(\\s|$)'); + nodes = context.getElementsByTagName('*'); + for (i = 0; node = nodes[i++];){ + className = node.className; + if (!(className && matchClass.test(className))) continue; + if (first) return node; + if (!(hasOthers && uniques[this.getUID(node)])) found.push(node); + } + } + + } + + if (hasOthers) this.sort(found); + return (first) ? null : found; + + } + /**/ + + /**/ + querySelector: if (context.querySelectorAll){ + + if (!this.isHTMLDocument + || qsaFailExpCache[expression] + //TODO: only skip when expression is actually mixed case + || this.brokenMixedCaseQSA + || (this.brokenCheckedQSA && expression.indexOf(':checked') > -1) + || (this.brokenEmptyAttributeQSA && reEmptyAttribute.test(expression)) + || (!contextIsDocument //Abort when !contextIsDocument and... + // there are multiple expressions in the selector + // since we currently only fix non-document rooted QSA for single expression selectors + && expression.indexOf(',') > -1 + ) + || Slick.disableQSA + ) break querySelector; + + var _expression = expression, _context = context; + if (!contextIsDocument){ + // non-document rooted QSA + // credits to Andrew Dupont + var currentId = _context.getAttribute('id'), slickid = 'slickid__'; + _context.setAttribute('id', slickid); + _expression = '#' + slickid + ' ' + _expression; + context = _context.parentNode; + } + + try { + if (first) return context.querySelector(_expression) || null; + else nodes = context.querySelectorAll(_expression); + } catch(e){ + qsaFailExpCache[expression] = 1; + break querySelector; + } finally { + if (!contextIsDocument){ + if (currentId) _context.setAttribute('id', currentId); + else _context.removeAttribute('id'); + context = _context; + } + } + + if (this.starSelectsClosedQSA) for (i = 0; node = nodes[i++];){ + if (node.nodeName > '@' && !(hasOthers && uniques[this.getUID(node)])) found.push(node); + } else for (i = 0; node = nodes[i++];){ + if (!(hasOthers && uniques[this.getUID(node)])) found.push(node); + } + + if (hasOthers) this.sort(found); + return found; + + } + /**/ + + parsed = this.Slick.parse(expression); + if (!parsed.length) return found; + } else if (expression == null){ // there is no expression + return found; + } else if (expression.Slick){ // expression is a parsed Slick object + parsed = expression; + } else if (this.contains(context.documentElement || context, expression)){ // expression is a node + (found) ? found.push(expression) : found = expression; + return found; + } else { // other junk + return found; + } + + /**//**/ + + // cache elements for the nth selectors + + this.posNTH = {}; + this.posNTHLast = {}; + this.posNTHType = {}; + this.posNTHTypeLast = {}; + + /**//**/ + + // if append is null and there is only a single selector with one expression use pushArray, else use pushUID + this.push = (!hasOthers && (first || (parsed.length == 1 && parsed.expressions[0].length == 1))) ? this.pushArray : this.pushUID; + + if (found == null) found = []; + + // default engine + + var j, m, n; + var combinator, tag, id, classList, classes, attributes, pseudos; + var currentItems, currentExpression, currentBit, lastBit, expressions = parsed.expressions; + + search: for (i = 0; (currentExpression = expressions[i]); i++) for (j = 0; (currentBit = currentExpression[j]); j++){ + + combinator = 'combinator:' + currentBit.combinator; + if (!this[combinator]) continue search; + + tag = (this.isXMLDocument) ? currentBit.tag : currentBit.tag.toUpperCase(); + id = currentBit.id; + classList = currentBit.classList; + classes = currentBit.classes; + attributes = currentBit.attributes; + pseudos = currentBit.pseudos; + lastBit = (j === (currentExpression.length - 1)); + + this.bitUniques = {}; + + if (lastBit){ + this.uniques = uniques; + this.found = found; + } else { + this.uniques = {}; + this.found = []; + } + + if (j === 0){ + this[combinator](context, tag, id, classes, attributes, pseudos, classList); + if (first && lastBit && found.length) break search; + } else { + if (first && lastBit) for (m = 0, n = currentItems.length; m < n; m++){ + this[combinator](currentItems[m], tag, id, classes, attributes, pseudos, classList); + if (found.length) break search; + } else for (m = 0, n = currentItems.length; m < n; m++) this[combinator](currentItems[m], tag, id, classes, attributes, pseudos, classList); + } + + currentItems = this.found; + } + + // should sort if there are nodes in append and if you pass multiple expressions. + if (hasOthers || (parsed.expressions.length > 1)) this.sort(found); + + return (first) ? (found[0] || null) : found; +}; + +// Utils + +local.uidx = 1; +local.uidk = 'slick-uniqueid'; + +local.getUIDXML = function(node){ + var uid = node.getAttribute(this.uidk); + if (!uid){ + uid = this.uidx++; + node.setAttribute(this.uidk, uid); + } + return uid; +}; + +local.getUIDHTML = function(node){ + return node.uniqueNumber || (node.uniqueNumber = this.uidx++); +}; + +// sort based on the setDocument documentSorter method. + +local.sort = function(results){ + if (!this.documentSorter) return results; + results.sort(this.documentSorter); + return results; +}; + +/**//**/ + +local.cacheNTH = {}; + +local.matchNTH = /^([+-]?\d*)?([a-z]+)?([+-]\d+)?$/; + +local.parseNTHArgument = function(argument){ + var parsed = argument.match(this.matchNTH); + if (!parsed) return false; + var special = parsed[2] || false; + var a = parsed[1] || 1; + if (a == '-') a = -1; + var b = +parsed[3] || 0; + parsed = + (special == 'n') ? {a: a, b: b} : + (special == 'odd') ? {a: 2, b: 1} : + (special == 'even') ? {a: 2, b: 0} : {a: 0, b: a}; + + return (this.cacheNTH[argument] = parsed); +}; + +local.createNTHPseudo = function(child, sibling, positions, ofType){ + return function(node, argument){ + var uid = this.getUID(node); + if (!this[positions][uid]){ + var parent = node.parentNode; + if (!parent) return false; + var el = parent[child], count = 1; + if (ofType){ + var nodeName = node.nodeName; + do { + if (el.nodeName != nodeName) continue; + this[positions][this.getUID(el)] = count++; + } while ((el = el[sibling])); + } else { + do { + if (el.nodeType != 1) continue; + this[positions][this.getUID(el)] = count++; + } while ((el = el[sibling])); + } + } + argument = argument || 'n'; + var parsed = this.cacheNTH[argument] || this.parseNTHArgument(argument); + if (!parsed) return false; + var a = parsed.a, b = parsed.b, pos = this[positions][uid]; + if (a == 0) return b == pos; + if (a > 0){ + if (pos < b) return false; + } else { + if (b < pos) return false; + } + return ((pos - b) % a) == 0; + }; +}; + +/**//**/ + +local.pushArray = function(node, tag, id, classes, attributes, pseudos){ + if (this.matchSelector(node, tag, id, classes, attributes, pseudos)) this.found.push(node); +}; + +local.pushUID = function(node, tag, id, classes, attributes, pseudos){ + var uid = this.getUID(node); + if (!this.uniques[uid] && this.matchSelector(node, tag, id, classes, attributes, pseudos)){ + this.uniques[uid] = true; + this.found.push(node); + } +}; + +local.matchNode = function(node, selector){ + if (this.isHTMLDocument && this.nativeMatchesSelector){ + try { + return this.nativeMatchesSelector.call(node, selector.replace(/\[([^=]+)=\s*([^'"\]]+?)\s*\]/g, '[$1="$2"]')); + } catch(matchError){} + } + + var parsed = this.Slick.parse(selector); + if (!parsed) return true; + + // simple (single) selectors + var expressions = parsed.expressions, simpleExpCounter = 0, i, currentExpression; + for (i = 0; (currentExpression = expressions[i]); i++){ + if (currentExpression.length == 1){ + var exp = currentExpression[0]; + if (this.matchSelector(node, (this.isXMLDocument) ? exp.tag : exp.tag.toUpperCase(), exp.id, exp.classes, exp.attributes, exp.pseudos)) return true; + simpleExpCounter++; + } + } + + if (simpleExpCounter == parsed.length) return false; + + var nodes = this.search(this.document, parsed), item; + for (i = 0; item = nodes[i++];){ + if (item === node) return true; + } + return false; +}; + +local.matchPseudo = function(node, name, argument){ + var pseudoName = 'pseudo:' + name; + if (this[pseudoName]) return this[pseudoName](node, argument); + var attribute = this.getAttribute(node, name); + return (argument) ? argument == attribute : !!attribute; +}; + +local.matchSelector = function(node, tag, id, classes, attributes, pseudos){ + if (tag){ + var nodeName = (this.isXMLDocument) ? node.nodeName : node.nodeName.toUpperCase(); + if (tag == '*'){ + if (nodeName < '@') return false; // Fix for comment nodes and closed nodes + } else { + if (nodeName != tag) return false; + } + } + + if (id && node.getAttribute('id') != id) return false; + + var i, part, cls; + if (classes) for (i = classes.length; i--;){ + cls = this.getAttribute(node, 'class'); + if (!(cls && classes[i].regexp.test(cls))) return false; + } + if (attributes) for (i = attributes.length; i--;){ + part = attributes[i]; + if (part.operator ? !part.test(this.getAttribute(node, part.key)) : !this.hasAttribute(node, part.key)) return false; + } + if (pseudos) for (i = pseudos.length; i--;){ + part = pseudos[i]; + if (!this.matchPseudo(node, part.key, part.value)) return false; + } + return true; +}; + +var combinators = { + + ' ': function(node, tag, id, classes, attributes, pseudos, classList){ // all child nodes, any level + + var i, item, children; + + if (this.isHTMLDocument){ + getById: if (id){ + item = this.document.getElementById(id); + if ((!item && node.all) || (this.idGetsName && item && item.getAttributeNode('id').nodeValue != id)){ + // all[id] returns all the elements with that name or id inside node + // if theres just one it will return the element, else it will be a collection + children = node.all[id]; + if (!children) return; + if (!children[0]) children = [children]; + for (i = 0; item = children[i++];){ + var idNode = item.getAttributeNode('id'); + if (idNode && idNode.nodeValue == id){ + this.push(item, tag, null, classes, attributes, pseudos); + break; + } + } + return; + } + if (!item){ + // if the context is in the dom we return, else we will try GEBTN, breaking the getById label + if (this.contains(this.root, node)) return; + else break getById; + } else if (this.document !== node && !this.contains(node, item)) return; + this.push(item, tag, null, classes, attributes, pseudos); + return; + } + getByClass: if (classes && node.getElementsByClassName && !this.brokenGEBCN){ + children = node.getElementsByClassName(classList.join(' ')); + if (!(children && children.length)) break getByClass; + for (i = 0; item = children[i++];) this.push(item, tag, id, null, attributes, pseudos); + return; + } + } + getByTag: { + children = node.getElementsByTagName(tag); + if (!(children && children.length)) break getByTag; + if (!this.brokenStarGEBTN) tag = null; + for (i = 0; item = children[i++];) this.push(item, tag, id, classes, attributes, pseudos); + } + }, + + '>': function(node, tag, id, classes, attributes, pseudos){ // direct children + if ((node = node.firstChild)) do { + if (node.nodeType == 1) this.push(node, tag, id, classes, attributes, pseudos); + } while ((node = node.nextSibling)); + }, + + '+': function(node, tag, id, classes, attributes, pseudos){ // next sibling + while ((node = node.nextSibling)) if (node.nodeType == 1){ + this.push(node, tag, id, classes, attributes, pseudos); + break; + } + }, + + '^': function(node, tag, id, classes, attributes, pseudos){ // first child + node = node.firstChild; + if (node){ + if (node.nodeType == 1) this.push(node, tag, id, classes, attributes, pseudos); + else this['combinator:+'](node, tag, id, classes, attributes, pseudos); + } + }, + + '~': function(node, tag, id, classes, attributes, pseudos){ // next siblings + while ((node = node.nextSibling)){ + if (node.nodeType != 1) continue; + var uid = this.getUID(node); + if (this.bitUniques[uid]) break; + this.bitUniques[uid] = true; + this.push(node, tag, id, classes, attributes, pseudos); + } + }, + + '++': function(node, tag, id, classes, attributes, pseudos){ // next sibling and previous sibling + this['combinator:+'](node, tag, id, classes, attributes, pseudos); + this['combinator:!+'](node, tag, id, classes, attributes, pseudos); + }, + + '~~': function(node, tag, id, classes, attributes, pseudos){ // next siblings and previous siblings + this['combinator:~'](node, tag, id, classes, attributes, pseudos); + this['combinator:!~'](node, tag, id, classes, attributes, pseudos); + }, + + '!': function(node, tag, id, classes, attributes, pseudos){ // all parent nodes up to document + while ((node = node.parentNode)) if (node !== this.document) this.push(node, tag, id, classes, attributes, pseudos); + }, + + '!>': function(node, tag, id, classes, attributes, pseudos){ // direct parent (one level) + node = node.parentNode; + if (node !== this.document) this.push(node, tag, id, classes, attributes, pseudos); + }, + + '!+': function(node, tag, id, classes, attributes, pseudos){ // previous sibling + while ((node = node.previousSibling)) if (node.nodeType == 1){ + this.push(node, tag, id, classes, attributes, pseudos); + break; + } + }, + + '!^': function(node, tag, id, classes, attributes, pseudos){ // last child + node = node.lastChild; + if (node){ + if (node.nodeType == 1) this.push(node, tag, id, classes, attributes, pseudos); + else this['combinator:!+'](node, tag, id, classes, attributes, pseudos); + } + }, + + '!~': function(node, tag, id, classes, attributes, pseudos){ // previous siblings + while ((node = node.previousSibling)){ + if (node.nodeType != 1) continue; + var uid = this.getUID(node); + if (this.bitUniques[uid]) break; + this.bitUniques[uid] = true; + this.push(node, tag, id, classes, attributes, pseudos); + } + } + +}; + +for (var c in combinators) local['combinator:' + c] = combinators[c]; + +var pseudos = { + + /**/ + + 'empty': function(node){ + var child = node.firstChild; + return !(child && child.nodeType == 1) && !(node.innerText || node.textContent || '').length; + }, + + 'not': function(node, expression){ + return !this.matchNode(node, expression); + }, + + 'contains': function(node, text){ + return (node.innerText || node.textContent || '').indexOf(text) > -1; + }, + + 'first-child': function(node){ + while ((node = node.previousSibling)) if (node.nodeType == 1) return false; + return true; + }, + + 'last-child': function(node){ + while ((node = node.nextSibling)) if (node.nodeType == 1) return false; + return true; + }, + + 'only-child': function(node){ + var prev = node; + while ((prev = prev.previousSibling)) if (prev.nodeType == 1) return false; + var next = node; + while ((next = next.nextSibling)) if (next.nodeType == 1) return false; + return true; + }, + + /**/ + + 'nth-child': local.createNTHPseudo('firstChild', 'nextSibling', 'posNTH'), + + 'nth-last-child': local.createNTHPseudo('lastChild', 'previousSibling', 'posNTHLast'), + + 'nth-of-type': local.createNTHPseudo('firstChild', 'nextSibling', 'posNTHType', true), + + 'nth-last-of-type': local.createNTHPseudo('lastChild', 'previousSibling', 'posNTHTypeLast', true), + + 'index': function(node, index){ + return this['pseudo:nth-child'](node, '' + (index + 1)); + }, + + 'even': function(node){ + return this['pseudo:nth-child'](node, '2n'); + }, + + 'odd': function(node){ + return this['pseudo:nth-child'](node, '2n+1'); + }, + + /**/ + + /**/ + + 'first-of-type': function(node){ + var nodeName = node.nodeName; + while ((node = node.previousSibling)) if (node.nodeName == nodeName) return false; + return true; + }, + + 'last-of-type': function(node){ + var nodeName = node.nodeName; + while ((node = node.nextSibling)) if (node.nodeName == nodeName) return false; + return true; + }, + + 'only-of-type': function(node){ + var prev = node, nodeName = node.nodeName; + while ((prev = prev.previousSibling)) if (prev.nodeName == nodeName) return false; + var next = node; + while ((next = next.nextSibling)) if (next.nodeName == nodeName) return false; + return true; + }, + + /**/ + + // custom pseudos + + 'enabled': function(node){ + return !node.disabled; + }, + + 'disabled': function(node){ + return node.disabled; + }, + + 'checked': function(node){ + return node.checked || node.selected; + }, + + 'focus': function(node){ + return this.isHTMLDocument && this.document.activeElement === node && (node.href || node.type || this.hasAttribute(node, 'tabindex')); + }, + + 'root': function(node){ + return (node === this.root); + }, + + 'selected': function(node){ + return node.selected; + } + + /**/ +}; + +for (var p in pseudos) local['pseudo:' + p] = pseudos[p]; + +// attributes methods + +var attributeGetters = local.attributeGetters = { + + 'for': function(){ + return ('htmlFor' in this) ? this.htmlFor : this.getAttribute('for'); + }, + + 'href': function(){ + return ('href' in this) ? this.getAttribute('href', 2) : this.getAttribute('href'); + }, + + 'style': function(){ + return (this.style) ? this.style.cssText : this.getAttribute('style'); + }, + + 'tabindex': function(){ + var attributeNode = this.getAttributeNode('tabindex'); + return (attributeNode && attributeNode.specified) ? attributeNode.nodeValue : null; + }, + + 'type': function(){ + return this.getAttribute('type'); + }, + + 'maxlength': function(){ + var attributeNode = this.getAttributeNode('maxLength'); + return (attributeNode && attributeNode.specified) ? attributeNode.nodeValue : null; + } + +}; + +attributeGetters.MAXLENGTH = attributeGetters.maxLength = attributeGetters.maxlength; + +// Slick + +var Slick = local.Slick = (this.Slick || {}); + +Slick.version = '1.1.7'; + +// Slick finder + +Slick.search = function(context, expression, append){ + return local.search(context, expression, append); +}; + +Slick.find = function(context, expression){ + return local.search(context, expression, null, true); +}; + +// Slick containment checker + +Slick.contains = function(container, node){ + local.setDocument(container); + return local.contains(container, node); +}; + +// Slick attribute getter + +Slick.getAttribute = function(node, name){ + local.setDocument(node); + return local.getAttribute(node, name); +}; + +Slick.hasAttribute = function(node, name){ + local.setDocument(node); + return local.hasAttribute(node, name); +}; + +// Slick matcher + +Slick.match = function(node, selector){ + if (!(node && selector)) return false; + if (!selector || selector === node) return true; + local.setDocument(node); + return local.matchNode(node, selector); +}; + +// Slick attribute accessor + +Slick.defineAttributeGetter = function(name, fn){ + local.attributeGetters[name] = fn; + return this; +}; + +Slick.lookupAttributeGetter = function(name){ + return local.attributeGetters[name]; +}; + +// Slick pseudo accessor + +Slick.definePseudo = function(name, fn){ + local['pseudo:' + name] = function(node, argument){ + return fn.call(node, argument); + }; + return this; +}; + +Slick.lookupPseudo = function(name){ + var pseudo = local['pseudo:' + name]; + if (pseudo) return function(argument){ + return pseudo.call(this, argument); + }; + return null; +}; + +// Slick overrides accessor + +Slick.override = function(regexp, fn){ + local.override(regexp, fn); + return this; +}; + +Slick.isXML = local.isXML; + +Slick.uidOf = function(node){ + return local.getUIDHTML(node); +}; + +if (!this.Slick) this.Slick = Slick; + +}).apply(/**/(typeof exports != 'undefined') ? exports : /**/this); + +/* +--- + +name: Element + +description: One of the most important items in MooTools. Contains the dollar function, the dollars function, and an handful of cross-browser, time-saver methods to let you easily work with HTML Elements. + +license: MIT-style license. + +requires: [Window, Document, Array, String, Function, Object, Number, Slick.Parser, Slick.Finder] + +provides: [Element, Elements, $, $$, IFrame, Selectors] + +... +*/ + +var Element = this.Element = function(tag, props){ + var konstructor = Element.Constructors[tag]; + if (konstructor) return konstructor(props); + if (typeof tag != 'string') return document.id(tag).set(props); + + if (!props) props = {}; + + if (!(/^[\w-]+$/).test(tag)){ + var parsed = Slick.parse(tag).expressions[0][0]; + tag = (parsed.tag == '*') ? 'div' : parsed.tag; + if (parsed.id && props.id == null) props.id = parsed.id; + + var attributes = parsed.attributes; + if (attributes) for (var attr, i = 0, l = attributes.length; i < l; i++){ + attr = attributes[i]; + if (props[attr.key] != null) continue; + + if (attr.value != null && attr.operator == '=') props[attr.key] = attr.value; + else if (!attr.value && !attr.operator) props[attr.key] = true; + } + + if (parsed.classList && props['class'] == null) props['class'] = parsed.classList.join(' '); + } + + return document.newElement(tag, props); +}; + + +if (Browser.Element){ + Element.prototype = Browser.Element.prototype; + // IE8 and IE9 require the wrapping. + Element.prototype._fireEvent = (function(fireEvent){ + return function(type, event){ + return fireEvent.call(this, type, event); + }; + })(Element.prototype.fireEvent); +} + +new Type('Element', Element).mirror(function(name){ + if (Array.prototype[name]) return; + + var obj = {}; + obj[name] = function(){ + var results = [], args = arguments, elements = true; + for (var i = 0, l = this.length; i < l; i++){ + var element = this[i], result = results[i] = element[name].apply(element, args); + elements = (elements && typeOf(result) == 'element'); + } + return (elements) ? new Elements(results) : results; + }; + + Elements.implement(obj); +}); + +if (!Browser.Element){ + Element.parent = Object; + + Element.Prototype = { + '$constructor': Element, + '$family': Function.from('element').hide() + }; + + Element.mirror(function(name, method){ + Element.Prototype[name] = method; + }); +} + +Element.Constructors = {}; + + + +var IFrame = new Type('IFrame', function(){ + var params = Array.link(arguments, { + properties: Type.isObject, + iframe: function(obj){ + return (obj != null); + } + }); + + var props = params.properties || {}, iframe; + if (params.iframe) iframe = document.id(params.iframe); + var onload = props.onload || function(){}; + delete props.onload; + props.id = props.name = [props.id, props.name, iframe ? (iframe.id || iframe.name) : 'IFrame_' + String.uniqueID()].pick(); + iframe = new Element(iframe || 'iframe', props); + + var onLoad = function(){ + onload.call(iframe.contentWindow); + }; + + if (window.frames[props.id]) onLoad(); + else iframe.addListener('load', onLoad); + return iframe; +}); + +var Elements = this.Elements = function(nodes){ + if (nodes && nodes.length){ + var uniques = {}, node; + for (var i = 0; node = nodes[i++];){ + var uid = Slick.uidOf(node); + if (!uniques[uid]){ + uniques[uid] = true; + this.push(node); + } + } + } +}; + +Elements.prototype = {length: 0}; +Elements.parent = Array; + +new Type('Elements', Elements).implement({ + + filter: function(filter, bind){ + if (!filter) return this; + return new Elements(Array.filter(this, (typeOf(filter) == 'string') ? function(item){ + return item.match(filter); + } : filter, bind)); + }.protect(), + + push: function(){ + var length = this.length; + for (var i = 0, l = arguments.length; i < l; i++){ + var item = document.id(arguments[i]); + if (item) this[length++] = item; + } + return (this.length = length); + }.protect(), + + unshift: function(){ + var items = []; + for (var i = 0, l = arguments.length; i < l; i++){ + var item = document.id(arguments[i]); + if (item) items.push(item); + } + return Array.prototype.unshift.apply(this, items); + }.protect(), + + concat: function(){ + var newElements = new Elements(this); + for (var i = 0, l = arguments.length; i < l; i++){ + var item = arguments[i]; + if (Type.isEnumerable(item)) newElements.append(item); + else newElements.push(item); + } + return newElements; + }.protect(), + + append: function(collection){ + for (var i = 0, l = collection.length; i < l; i++) this.push(collection[i]); + return this; + }.protect(), + + empty: function(){ + while (this.length) delete this[--this.length]; + return this; + }.protect() + +}); + + + +(function(){ + +// FF, IE +var splice = Array.prototype.splice, object = {'0': 0, '1': 1, length: 2}; + +splice.call(object, 1, 1); +if (object[1] == 1) Elements.implement('splice', function(){ + var length = this.length; + var result = splice.apply(this, arguments); + while (length >= this.length) delete this[length--]; + return result; +}.protect()); + +Array.forEachMethod(function(method, name){ + Elements.implement(name, method); +}); + +Array.mirror(Elements); + +/**/ +var createElementAcceptsHTML; +try { + createElementAcceptsHTML = (document.createElement('').name == 'x'); +} catch (e){} + +var escapeQuotes = function(html){ + return ('' + html).replace(/&/g, '&').replace(/"/g, '"'); +}; +/**/ + +/**/ +// #2479 - IE8 Cannot set HTML of style element +var canChangeStyleHTML = (function(){ + var div = document.createElement('style'), + flag = false; + try { + div.innerHTML = '#justTesing{margin: 0px;}'; + flag = !!div.innerHTML; + } catch(e){} + return flag; +})(); +/**/ + +Document.implement({ + + newElement: function(tag, props){ + if (props){ + if (props.checked != null) props.defaultChecked = props.checked; + if ((props.type == 'checkbox' || props.type == 'radio') && props.value == null) props.value = 'on'; + /**/ // IE needs the type to be set before changing content of style element + if (!canChangeStyleHTML && tag == 'style'){ + var styleElement = document.createElement('style'); + styleElement.setAttribute('type', 'text/css'); + if (props.type) delete props.type; + return this.id(styleElement).set(props); + } + /**/ + /**/// Fix for readonly name and type properties in IE < 8 + if (createElementAcceptsHTML){ + tag = '<' + tag; + if (props.name) tag += ' name="' + escapeQuotes(props.name) + '"'; + if (props.type) tag += ' type="' + escapeQuotes(props.type) + '"'; + tag += '>'; + delete props.name; + delete props.type; + } + /**/ + } + return this.id(this.createElement(tag)).set(props); + } + +}); + +})(); + +(function(){ + +Slick.uidOf(window); +Slick.uidOf(document); + +Document.implement({ + + newTextNode: function(text){ + return this.createTextNode(text); + }, + + getDocument: function(){ + return this; + }, + + getWindow: function(){ + return this.window; + }, + + id: (function(){ + + var types = { + + string: function(id, nocash, doc){ + id = Slick.find(doc, '#' + id.replace(/(\W)/g, '\\$1')); + return (id) ? types.element(id, nocash) : null; + }, + + element: function(el, nocash){ + Slick.uidOf(el); + if (!nocash && !el.$family && !(/^(?:object|embed)$/i).test(el.tagName)){ + var fireEvent = el.fireEvent; + // wrapping needed in IE7, or else crash + el._fireEvent = function(type, event){ + return fireEvent(type, event); + }; + Object.append(el, Element.Prototype); + } + return el; + }, + + object: function(obj, nocash, doc){ + if (obj.toElement) return types.element(obj.toElement(doc), nocash); + return null; + } + + }; + + types.textnode = types.whitespace = types.window = types.document = function(zero){ + return zero; + }; + + return function(el, nocash, doc){ + if (el && el.$family && el.uniqueNumber) return el; + var type = typeOf(el); + return (types[type]) ? types[type](el, nocash, doc || document) : null; + }; + + })() + +}); + +if (window.$ == null) Window.implement('$', function(el, nc){ + return document.id(el, nc, this.document); +}); + +Window.implement({ + + getDocument: function(){ + return this.document; + }, + + getWindow: function(){ + return this; + } + +}); + +[Document, Element].invoke('implement', { + + getElements: function(expression){ + return Slick.search(this, expression, new Elements); + }, + + getElement: function(expression){ + return document.id(Slick.find(this, expression)); + } + +}); + +var contains = {contains: function(element){ + return Slick.contains(this, element); +}}; + +if (!document.contains) Document.implement(contains); +if (!document.createElement('div').contains) Element.implement(contains); + + + +// tree walking + +var injectCombinator = function(expression, combinator){ + if (!expression) return combinator; + + expression = Object.clone(Slick.parse(expression)); + + var expressions = expression.expressions; + for (var i = expressions.length; i--;) + expressions[i][0].combinator = combinator; + + return expression; +}; + +Object.forEach({ + getNext: '~', + getPrevious: '!~', + getParent: '!' +}, function(combinator, method){ + Element.implement(method, function(expression){ + return this.getElement(injectCombinator(expression, combinator)); + }); +}); + +Object.forEach({ + getAllNext: '~', + getAllPrevious: '!~', + getSiblings: '~~', + getChildren: '>', + getParents: '!' +}, function(combinator, method){ + Element.implement(method, function(expression){ + return this.getElements(injectCombinator(expression, combinator)); + }); +}); + +Element.implement({ + + getFirst: function(expression){ + return document.id(Slick.search(this, injectCombinator(expression, '>'))[0]); + }, + + getLast: function(expression){ + return document.id(Slick.search(this, injectCombinator(expression, '>')).getLast()); + }, + + getWindow: function(){ + return this.ownerDocument.window; + }, + + getDocument: function(){ + return this.ownerDocument; + }, + + getElementById: function(id){ + return document.id(Slick.find(this, '#' + ('' + id).replace(/(\W)/g, '\\$1'))); + }, + + match: function(expression){ + return !expression || Slick.match(this, expression); + } + +}); + + + +if (window.$$ == null) Window.implement('$$', function(selector){ + if (arguments.length == 1){ + if (typeof selector == 'string') return Slick.search(this.document, selector, new Elements); + else if (Type.isEnumerable(selector)) return new Elements(selector); + } + return new Elements(arguments); +}); + +// Inserters + +var inserters = { + + before: function(context, element){ + var parent = element.parentNode; + if (parent) parent.insertBefore(context, element); + }, + + after: function(context, element){ + var parent = element.parentNode; + if (parent) parent.insertBefore(context, element.nextSibling); + }, + + bottom: function(context, element){ + element.appendChild(context); + }, + + top: function(context, element){ + element.insertBefore(context, element.firstChild); + } + +}; + +inserters.inside = inserters.bottom; + + + +// getProperty / setProperty + +var propertyGetters = {}, propertySetters = {}; + +// properties + +var properties = {}; +Array.forEach([ + 'type', 'value', 'defaultValue', 'accessKey', 'cellPadding', 'cellSpacing', 'colSpan', + 'frameBorder', 'rowSpan', 'tabIndex', 'useMap' +], function(property){ + properties[property.toLowerCase()] = property; +}); + +properties.html = 'innerHTML'; +properties.text = (document.createElement('div').textContent == null) ? 'innerText': 'textContent'; + +Object.forEach(properties, function(real, key){ + propertySetters[key] = function(node, value){ + node[real] = value; + }; + propertyGetters[key] = function(node){ + return node[real]; + }; +}); + +/**/ +propertySetters.text = (function(setter){ + return function(node, value){ + if (node.get('tag') == 'style') node.set('html', value); + else node[properties.text] = value; + }; +})(propertySetters.text); + +propertyGetters.text = (function(getter){ + return function(node){ + return (node.get('tag') == 'style') ? node.innerHTML : getter(node); + }; +})(propertyGetters.text); +/**/ + +// Booleans + +var bools = [ + 'compact', 'nowrap', 'ismap', 'declare', 'noshade', 'checked', + 'disabled', 'readOnly', 'multiple', 'selected', 'noresize', + 'defer', 'defaultChecked', 'autofocus', 'controls', 'autoplay', + 'loop' +]; + +var booleans = {}; +Array.forEach(bools, function(bool){ + var lower = bool.toLowerCase(); + booleans[lower] = bool; + propertySetters[lower] = function(node, value){ + node[bool] = !!value; + }; + propertyGetters[lower] = function(node){ + return !!node[bool]; + }; +}); + +// Special cases + +Object.append(propertySetters, { + + 'class': function(node, value){ + ('className' in node) ? node.className = (value || '') : node.setAttribute('class', value); + }, + + 'for': function(node, value){ + ('htmlFor' in node) ? node.htmlFor = value : node.setAttribute('for', value); + }, + + 'style': function(node, value){ + (node.style) ? node.style.cssText = value : node.setAttribute('style', value); + }, + + 'value': function(node, value){ + node.value = (value != null) ? value : ''; + } + +}); + +propertyGetters['class'] = function(node){ + return ('className' in node) ? node.className || null : node.getAttribute('class'); +}; + +/* */ +var el = document.createElement('button'); +// IE sets type as readonly and throws +try { el.type = 'button'; } catch(e){} +if (el.type != 'button') propertySetters.type = function(node, value){ + node.setAttribute('type', value); +}; +el = null; +/* */ + +/**/ + +/**/ +// #2479 - IE8 Cannot set HTML of style element +var canChangeStyleHTML = (function(){ + var div = document.createElement('style'), + flag = false; + try { + div.innerHTML = '#justTesing{margin: 0px;}'; + flag = !!div.innerHTML; + } catch(e){} + return flag; +})(); +/**/ + +var input = document.createElement('input'), volatileInputValue, html5InputSupport; + +// #2178 +input.value = 't'; +input.type = 'submit'; +volatileInputValue = input.value != 't'; + +// #2443 - IE throws "Invalid Argument" when trying to use html5 input types +try { + input.value = ''; + input.type = 'email'; + html5InputSupport = input.type == 'email'; +} catch(e){} + +input = null; + +if (volatileInputValue || !html5InputSupport) propertySetters.type = function(node, type){ + try { + var value = node.value; + node.type = type; + node.value = value; + } catch (e){} +}; +/**/ + +/* getProperty, setProperty */ + +/* */ +var pollutesGetAttribute = (function(div){ + div.random = 'attribute'; + return (div.getAttribute('random') == 'attribute'); +})(document.createElement('div')); + +var hasCloneBug = (function(test){ + test.innerHTML = ''; + return test.cloneNode(true).firstChild.childNodes.length != 1; +})(document.createElement('div')); +/* */ + +var hasClassList = !!document.createElement('div').classList; + +var classes = function(className){ + var classNames = (className || '').clean().split(" "), uniques = {}; + return classNames.filter(function(className){ + if (className !== "" && !uniques[className]) return uniques[className] = className; + }); +}; + +var addToClassList = function(name){ + this.classList.add(name); +}; + +var removeFromClassList = function(name){ + this.classList.remove(name); +}; + +Element.implement({ + + setProperty: function(name, value){ + var setter = propertySetters[name.toLowerCase()]; + if (setter){ + setter(this, value); + } else { + /* */ + var attributeWhiteList; + if (pollutesGetAttribute) attributeWhiteList = this.retrieve('$attributeWhiteList', {}); + /* */ + + if (value == null){ + this.removeAttribute(name); + /* */ + if (pollutesGetAttribute) delete attributeWhiteList[name]; + /* */ + } else { + this.setAttribute(name, '' + value); + /* */ + if (pollutesGetAttribute) attributeWhiteList[name] = true; + /* */ + } + } + return this; + }, + + setProperties: function(attributes){ + for (var attribute in attributes) this.setProperty(attribute, attributes[attribute]); + return this; + }, + + getProperty: function(name){ + var getter = propertyGetters[name.toLowerCase()]; + if (getter) return getter(this); + /* */ + if (pollutesGetAttribute){ + var attr = this.getAttributeNode(name), attributeWhiteList = this.retrieve('$attributeWhiteList', {}); + if (!attr) return null; + if (attr.expando && !attributeWhiteList[name]){ + var outer = this.outerHTML; + // segment by the opening tag and find mention of attribute name + if (outer.substr(0, outer.search(/\/?['"]?>(?![^<]*<['"])/)).indexOf(name) < 0) return null; + attributeWhiteList[name] = true; + } + } + /* */ + var result = Slick.getAttribute(this, name); + return (!result && !Slick.hasAttribute(this, name)) ? null : result; + }, + + getProperties: function(){ + var args = Array.from(arguments); + return args.map(this.getProperty, this).associate(args); + }, + + removeProperty: function(name){ + return this.setProperty(name, null); + }, + + removeProperties: function(){ + Array.each(arguments, this.removeProperty, this); + return this; + }, + + set: function(prop, value){ + var property = Element.Properties[prop]; + (property && property.set) ? property.set.call(this, value) : this.setProperty(prop, value); + }.overloadSetter(), + + get: function(prop){ + var property = Element.Properties[prop]; + return (property && property.get) ? property.get.apply(this) : this.getProperty(prop); + }.overloadGetter(), + + erase: function(prop){ + var property = Element.Properties[prop]; + (property && property.erase) ? property.erase.apply(this) : this.removeProperty(prop); + return this; + }, + + hasClass: hasClassList ? function(className){ + return this.classList.contains(className); + } : function(className){ + return classes(this.className).contains(className); + }, + + addClass: hasClassList ? function(className){ + classes(className).forEach(addToClassList, this); + return this; + } : function(className){ + this.className = classes(className + ' ' + this.className).join(' '); + return this; + }, + + removeClass: hasClassList ? function(className){ + classes(className).forEach(removeFromClassList, this); + return this; + } : function(className){ + var classNames = classes(this.className); + classes(className).forEach(classNames.erase, classNames); + this.className = classNames.join(' '); + return this; + }, + + toggleClass: function(className, force){ + if (force == null) force = !this.hasClass(className); + return (force) ? this.addClass(className) : this.removeClass(className); + }, + + adopt: function(){ + var parent = this, fragment, elements = Array.flatten(arguments), length = elements.length; + if (length > 1) parent = fragment = document.createDocumentFragment(); + + for (var i = 0; i < length; i++){ + var element = document.id(elements[i], true); + if (element) parent.appendChild(element); + } + + if (fragment) this.appendChild(fragment); + + return this; + }, + + appendText: function(text, where){ + return this.grab(this.getDocument().newTextNode(text), where); + }, + + grab: function(el, where){ + inserters[where || 'bottom'](document.id(el, true), this); + return this; + }, + + inject: function(el, where){ + inserters[where || 'bottom'](this, document.id(el, true)); + return this; + }, + + replaces: function(el){ + el = document.id(el, true); + el.parentNode.replaceChild(this, el); + return this; + }, + + wraps: function(el, where){ + el = document.id(el, true); + return this.replaces(el).grab(el, where); + }, + + getSelected: function(){ + this.selectedIndex; // Safari 3.2.1 + return new Elements(Array.from(this.options).filter(function(option){ + return option.selected; + })); + }, + + toQueryString: function(){ + var queryString = []; + this.getElements('input, select, textarea').each(function(el){ + var type = el.type; + if (!el.name || el.disabled || type == 'submit' || type == 'reset' || type == 'file' || type == 'image') return; + + var value = (el.get('tag') == 'select') ? el.getSelected().map(function(opt){ + // IE + return document.id(opt).get('value'); + }) : ((type == 'radio' || type == 'checkbox') && !el.checked) ? null : el.get('value'); + + Array.from(value).each(function(val){ + if (typeof val != 'undefined') queryString.push(encodeURIComponent(el.name) + '=' + encodeURIComponent(val)); + }); + }); + return queryString.join('&'); + } + +}); + + +// appendHTML + +var appendInserters = { + before: 'beforeBegin', + after: 'afterEnd', + bottom: 'beforeEnd', + top: 'afterBegin', + inside: 'beforeEnd' +}; + +Element.implement('appendHTML', ('insertAdjacentHTML' in document.createElement('div')) ? function(html, where){ + this.insertAdjacentHTML(appendInserters[where || 'bottom'], html); + return this; +} : function(html, where){ + var temp = new Element('div', {html: html}), + children = temp.childNodes, + fragment = temp.firstChild; + + if (!fragment) return this; + if (children.length > 1){ + fragment = document.createDocumentFragment(); + for (var i = 0, l = children.length; i < l; i++){ + fragment.appendChild(children[i]); + } + } + + inserters[where || 'bottom'](fragment, this); + return this; +}); + +var collected = {}, storage = {}; + +var get = function(uid){ + return (storage[uid] || (storage[uid] = {})); +}; + +var clean = function(item){ + var uid = item.uniqueNumber; + if (item.removeEvents) item.removeEvents(); + if (item.clearAttributes) item.clearAttributes(); + if (uid != null){ + delete collected[uid]; + delete storage[uid]; + } + return item; +}; + +var formProps = {input: 'checked', option: 'selected', textarea: 'value'}; + +Element.implement({ + + destroy: function(){ + var children = clean(this).getElementsByTagName('*'); + Array.each(children, clean); + Element.dispose(this); + return null; + }, + + empty: function(){ + Array.from(this.childNodes).each(Element.dispose); + return this; + }, + + dispose: function(){ + return (this.parentNode) ? this.parentNode.removeChild(this) : this; + }, + + clone: function(contents, keepid){ + contents = contents !== false; + var clone = this.cloneNode(contents), ce = [clone], te = [this], i; + + if (contents){ + ce.append(Array.from(clone.getElementsByTagName('*'))); + te.append(Array.from(this.getElementsByTagName('*'))); + } + + for (i = ce.length; i--;){ + var node = ce[i], element = te[i]; + if (!keepid) node.removeAttribute('id'); + /**/ + if (node.clearAttributes){ + node.clearAttributes(); + node.mergeAttributes(element); + node.removeAttribute('uniqueNumber'); + if (node.options){ + var no = node.options, eo = element.options; + for (var j = no.length; j--;) no[j].selected = eo[j].selected; + } + } + /**/ + var prop = formProps[element.tagName.toLowerCase()]; + if (prop && element[prop]) node[prop] = element[prop]; + } + + /**/ + if (hasCloneBug){ + var co = clone.getElementsByTagName('object'), to = this.getElementsByTagName('object'); + for (i = co.length; i--;) co[i].outerHTML = to[i].outerHTML; + } + /**/ + return document.id(clone); + } + +}); + +[Element, Window, Document].invoke('implement', { + + addListener: function(type, fn){ + if (window.attachEvent && !window.addEventListener){ + collected[Slick.uidOf(this)] = this; + } + if (this.addEventListener) this.addEventListener(type, fn, !!arguments[2]); + else this.attachEvent('on' + type, fn); + return this; + }, + + removeListener: function(type, fn){ + if (this.removeEventListener) this.removeEventListener(type, fn, !!arguments[2]); + else this.detachEvent('on' + type, fn); + return this; + }, + + retrieve: function(property, dflt){ + var storage = get(Slick.uidOf(this)), prop = storage[property]; + if (dflt != null && prop == null) prop = storage[property] = dflt; + return prop != null ? prop : null; + }, + + store: function(property, value){ + var storage = get(Slick.uidOf(this)); + storage[property] = value; + return this; + }, + + eliminate: function(property){ + var storage = get(Slick.uidOf(this)); + delete storage[property]; + return this; + } + +}); + +/**/ +if (window.attachEvent && !window.addEventListener){ + var gc = function(){ + Object.each(collected, clean); + if (window.CollectGarbage) CollectGarbage(); + window.removeListener('unload', gc); + }; + window.addListener('unload', gc); +} +/**/ + +Element.Properties = {}; + + + +Element.Properties.style = { + + set: function(style){ + this.style.cssText = style; + }, + + get: function(){ + return this.style.cssText; + }, + + erase: function(){ + this.style.cssText = ''; + } + +}; + +Element.Properties.tag = { + + get: function(){ + return this.tagName.toLowerCase(); + } + +}; + +Element.Properties.html = { + + set: function(html){ + if (html == null) html = ''; + else if (typeOf(html) == 'array') html = html.join(''); + + /**/ + if (this.styleSheet && !canChangeStyleHTML) this.styleSheet.cssText = html; + else /**/this.innerHTML = html; + }, + erase: function(){ + this.set('html', ''); + } + +}; + +var supportsHTML5Elements = true, supportsTableInnerHTML = true, supportsTRInnerHTML = true; + +/**/ +// technique by jdbarlett - http://jdbartlett.com/innershiv/ +var div = document.createElement('div'); +div.innerHTML = ''; +supportsHTML5Elements = (div.childNodes.length == 1); +if (!supportsHTML5Elements){ + var tags = 'abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video'.split(' '), + fragment = document.createDocumentFragment(), l = tags.length; + while (l--) fragment.createElement(tags[l]); +} +div = null; +/**/ + +/**/ +supportsTableInnerHTML = Function.attempt(function(){ + var table = document.createElement('table'); + table.innerHTML = ''; + return true; +}); + +/**/ +var tr = document.createElement('tr'), html = ''; +tr.innerHTML = html; +supportsTRInnerHTML = (tr.innerHTML == html); +tr = null; +/**/ + +if (!supportsTableInnerHTML || !supportsTRInnerHTML || !supportsHTML5Elements){ + + Element.Properties.html.set = (function(set){ + + var translations = { + table: [1, '', '
'], + select: [1, ''], + tbody: [2, '', '
'], + tr: [3, '', '
'] + }; + + translations.thead = translations.tfoot = translations.tbody; + + return function(html){ + + /**/ + if (this.styleSheet) return set.call(this, html); + /**/ + var wrap = translations[this.get('tag')]; + if (!wrap && !supportsHTML5Elements) wrap = [0, '', '']; + if (!wrap) return set.call(this, html); + + var level = wrap[0], wrapper = document.createElement('div'), target = wrapper; + if (!supportsHTML5Elements) fragment.appendChild(wrapper); + wrapper.innerHTML = [wrap[1], html, wrap[2]].flatten().join(''); + while (level--) target = target.firstChild; + this.empty().adopt(target.childNodes); + if (!supportsHTML5Elements) fragment.removeChild(wrapper); + wrapper = null; + }; + + })(Element.Properties.html.set); +} +/*
*/ + +/**/ +var testForm = document.createElement('form'); +testForm.innerHTML = ''; + +if (testForm.firstChild.value != 's') Element.Properties.value = { + + set: function(value){ + var tag = this.get('tag'); + if (tag != 'select') return this.setProperty('value', value); + var options = this.getElements('option'); + value = String(value); + for (var i = 0; i < options.length; i++){ + var option = options[i], + attr = option.getAttributeNode('value'), + optionValue = (attr && attr.specified) ? option.value : option.get('text'); + if (optionValue === value) return option.selected = true; + } + }, + + get: function(){ + var option = this, tag = option.get('tag'); + + if (tag != 'select' && tag != 'option') return this.getProperty('value'); + + if (tag == 'select' && !(option = option.getSelected()[0])) return ''; + + var attr = option.getAttributeNode('value'); + return (attr && attr.specified) ? option.value : option.get('text'); + } + +}; +testForm = null; +/**/ + +/**/ +if (document.createElement('div').getAttributeNode('id')) Element.Properties.id = { + set: function(id){ + this.id = this.getAttributeNode('id').value = id; + }, + get: function(){ + return this.id || null; + }, + erase: function(){ + this.id = this.getAttributeNode('id').value = ''; + } +}; +/**/ + +})(); + +/* +--- + +name: Event + +description: Contains the Event Type, to make the event object cross-browser. + +license: MIT-style license. + +requires: [Window, Document, Array, Function, String, Object] + +provides: Event + +... +*/ + +(function(){ + +var _keys = {}; +var normalizeWheelSpeed = function(event){ + var normalized; + if (event.wheelDelta){ + normalized = event.wheelDelta % 120 == 0 ? event.wheelDelta / 120 : event.wheelDelta / 12; + } else { + var rawAmount = event.deltaY || event.detail || 0; + normalized = -(rawAmount % 3 == 0 ? rawAmount / 3 : rawAmount * 10); + } + return normalized; +} + +var DOMEvent = this.DOMEvent = new Type('DOMEvent', function(event, win){ + if (!win) win = window; + event = event || win.event; + if (event.$extended) return event; + this.event = event; + this.$extended = true; + this.shift = event.shiftKey; + this.control = event.ctrlKey; + this.alt = event.altKey; + this.meta = event.metaKey; + var type = this.type = event.type; + var target = event.target || event.srcElement; + while (target && target.nodeType == 3) target = target.parentNode; + this.target = document.id(target); + + if (type.indexOf('key') == 0){ + var code = this.code = (event.which || event.keyCode); + if (!this.shift || type != 'keypress') this.key = _keys[code]; + if (type == 'keydown' || type == 'keyup'){ + if (code > 111 && code < 124) this.key = 'f' + (code - 111); + else if (code > 95 && code < 106) this.key = code - 96; + } + if (this.key == null) this.key = String.fromCharCode(code).toLowerCase(); + } else if (type == 'click' || type == 'dblclick' || type == 'contextmenu' || type == 'wheel' || type == 'DOMMouseScroll' || type.indexOf('mouse') == 0){ + var doc = win.document; + doc = (!doc.compatMode || doc.compatMode == 'CSS1Compat') ? doc.html : doc.body; + this.page = { + x: (event.pageX != null) ? event.pageX : event.clientX + doc.scrollLeft, + y: (event.pageY != null) ? event.pageY : event.clientY + doc.scrollTop + }; + this.client = { + x: (event.pageX != null) ? event.pageX - win.pageXOffset : event.clientX, + y: (event.pageY != null) ? event.pageY - win.pageYOffset : event.clientY + }; + if (type == 'DOMMouseScroll' || type == 'wheel' || type == 'mousewheel') this.wheel = normalizeWheelSpeed(event); + this.rightClick = (event.which == 3 || event.button == 2); + if (type == 'mouseover' || type == 'mouseout' || type == 'mouseenter' || type == 'mouseleave'){ + var overTarget = type == 'mouseover' || type == 'mouseenter'; + var related = event.relatedTarget || event[(overTarget ? 'from' : 'to') + 'Element']; + while (related && related.nodeType == 3) related = related.parentNode; + this.relatedTarget = document.id(related); + } + } else if (type.indexOf('touch') == 0 || type.indexOf('gesture') == 0){ + this.rotation = event.rotation; + this.scale = event.scale; + this.targetTouches = event.targetTouches; + this.changedTouches = event.changedTouches; + var touches = this.touches = event.touches; + if (touches && touches[0]){ + var touch = touches[0]; + this.page = {x: touch.pageX, y: touch.pageY}; + this.client = {x: touch.clientX, y: touch.clientY}; + } + } + + if (!this.client) this.client = {}; + if (!this.page) this.page = {}; +}); + +DOMEvent.implement({ + + stop: function(){ + return this.preventDefault().stopPropagation(); + }, + + stopPropagation: function(){ + if (this.event.stopPropagation) this.event.stopPropagation(); + else this.event.cancelBubble = true; + return this; + }, + + preventDefault: function(){ + if (this.event.preventDefault) this.event.preventDefault(); + else this.event.returnValue = false; + return this; + } + +}); + +DOMEvent.defineKey = function(code, key){ + _keys[code] = key; + return this; +}; + +DOMEvent.defineKeys = DOMEvent.defineKey.overloadSetter(true); + +DOMEvent.defineKeys({ + '38': 'up', '40': 'down', '37': 'left', '39': 'right', + '27': 'esc', '32': 'space', '8': 'backspace', '9': 'tab', + '46': 'delete', '13': 'enter' +}); + +})(); + + + + + +/* +--- + +name: Element.Event + +description: Contains Element methods for dealing with events. This file also includes mouseenter and mouseleave custom Element Events, if necessary. + +license: MIT-style license. + +requires: [Element, Event] + +provides: Element.Event + +... +*/ + +(function(){ + +Element.Properties.events = {set: function(events){ + this.addEvents(events); +}}; + +[Element, Window, Document].invoke('implement', { + + addEvent: function(type, fn){ + var events = this.retrieve('events', {}); + if (!events[type]) events[type] = {keys: [], values: []}; + if (events[type].keys.contains(fn)) return this; + events[type].keys.push(fn); + var realType = type, + custom = Element.Events[type], + condition = fn, + self = this; + if (custom){ + if (custom.onAdd) custom.onAdd.call(this, fn, type); + if (custom.condition){ + condition = function(event){ + if (custom.condition.call(this, event, type)) return fn.call(this, event); + return true; + }; + } + if (custom.base) realType = Function.from(custom.base).call(this, type); + } + var defn = function(){ + return fn.call(self); + }; + var nativeEvent = Element.NativeEvents[realType]; + if (nativeEvent){ + if (nativeEvent == 2){ + defn = function(event){ + event = new DOMEvent(event, self.getWindow()); + if (condition.call(self, event) === false) event.stop(); + }; + } + this.addListener(realType, defn, arguments[2]); + } + events[type].values.push(defn); + return this; + }, + + removeEvent: function(type, fn){ + var events = this.retrieve('events'); + if (!events || !events[type]) return this; + var list = events[type]; + var index = list.keys.indexOf(fn); + if (index == -1) return this; + var value = list.values[index]; + delete list.keys[index]; + delete list.values[index]; + var custom = Element.Events[type]; + if (custom){ + if (custom.onRemove) custom.onRemove.call(this, fn, type); + if (custom.base) type = Function.from(custom.base).call(this, type); + } + return (Element.NativeEvents[type]) ? this.removeListener(type, value, arguments[2]) : this; + }, + + addEvents: function(events){ + for (var event in events) this.addEvent(event, events[event]); + return this; + }, + + removeEvents: function(events){ + var type; + if (typeOf(events) == 'object'){ + for (type in events) this.removeEvent(type, events[type]); + return this; + } + var attached = this.retrieve('events'); + if (!attached) return this; + if (!events){ + for (type in attached) this.removeEvents(type); + this.eliminate('events'); + } else if (attached[events]){ + attached[events].keys.each(function(fn){ + this.removeEvent(events, fn); + }, this); + delete attached[events]; + } + return this; + }, + + fireEvent: function(type, args, delay){ + var events = this.retrieve('events'); + if (!events || !events[type]) return this; + args = Array.from(args); + + events[type].keys.each(function(fn){ + if (delay) fn.delay(delay, this, args); + else fn.apply(this, args); + }, this); + return this; + }, + + cloneEvents: function(from, type){ + from = document.id(from); + var events = from.retrieve('events'); + if (!events) return this; + if (!type){ + for (var eventType in events) this.cloneEvents(from, eventType); + } else if (events[type]){ + events[type].keys.each(function(fn){ + this.addEvent(type, fn); + }, this); + } + return this; + } + +}); + +Element.NativeEvents = { + click: 2, dblclick: 2, mouseup: 2, mousedown: 2, contextmenu: 2, //mouse buttons + wheel: 2, mousewheel: 2, DOMMouseScroll: 2, //mouse wheel + mouseover: 2, mouseout: 2, mousemove: 2, selectstart: 2, selectend: 2, //mouse movement + keydown: 2, keypress: 2, keyup: 2, //keyboard + orientationchange: 2, // mobile + touchstart: 2, touchmove: 2, touchend: 2, touchcancel: 2, // touch + gesturestart: 2, gesturechange: 2, gestureend: 2, // gesture + focus: 2, blur: 2, change: 2, reset: 2, select: 2, submit: 2, paste: 2, input: 2, //form elements + load: 2, unload: 1, beforeunload: 2, resize: 1, move: 1, DOMContentLoaded: 1, readystatechange: 1, //window + hashchange: 1, popstate: 2, pageshow: 2, pagehide: 2, // history + error: 1, abort: 1, scroll: 1, message: 2 //misc +}; + +Element.Events = { + mousewheel: { + base: 'onwheel' in document ? 'wheel' : 'onmousewheel' in document ? 'mousewheel' : 'DOMMouseScroll' + } +}; + +var check = function(event){ + var related = event.relatedTarget; + if (related == null) return true; + if (!related) return false; + return (related != this && related.prefix != 'xul' && typeOf(this) != 'document' && !this.contains(related)); +}; + +if ('onmouseenter' in document.documentElement){ + Element.NativeEvents.mouseenter = Element.NativeEvents.mouseleave = 2; + Element.MouseenterCheck = check; +} else { + Element.Events.mouseenter = { + base: 'mouseover', + condition: check + }; + + Element.Events.mouseleave = { + base: 'mouseout', + condition: check + }; +} + +/**/ +if (!window.addEventListener){ + Element.NativeEvents.propertychange = 2; + Element.Events.change = { + base: function(){ + var type = this.type; + return (this.get('tag') == 'input' && (type == 'radio' || type == 'checkbox')) ? 'propertychange' : 'change'; + }, + condition: function(event){ + return event.type != 'propertychange' || event.event.propertyName == 'checked'; + } + }; +} +/**/ + + + +})(); + +/* +--- + +name: Element.Delegation + +description: Extends the Element native object to include the delegate method for more efficient event management. + +license: MIT-style license. + +requires: [Element.Event] + +provides: [Element.Delegation] + +... +*/ + +(function(){ + +var eventListenerSupport = !!window.addEventListener; + +Element.NativeEvents.focusin = Element.NativeEvents.focusout = 2; + +var bubbleUp = function(self, match, fn, event, target){ + while (target && target != self){ + if (match(target, event)) return fn.call(target, event, target); + target = document.id(target.parentNode); + } +}; + +var map = { + mouseenter: { + base: 'mouseover', + condition: Element.MouseenterCheck + }, + mouseleave: { + base: 'mouseout', + condition: Element.MouseenterCheck + }, + focus: { + base: 'focus' + (eventListenerSupport ? '' : 'in'), + capture: true + }, + blur: { + base: eventListenerSupport ? 'blur' : 'focusout', + capture: true + } +}; + +/**/ +var _key = '$delegation:'; +var formObserver = function(type){ + + return { + + base: 'focusin', + + remove: function(self, uid){ + var list = self.retrieve(_key + type + 'listeners', {})[uid]; + if (list && list.forms) for (var i = list.forms.length; i--;){ + // the form may have been destroyed, so it won't have the + // removeEvent method anymore. In that case the event was + // removed as well. + if (list.forms[i].removeEvent) list.forms[i].removeEvent(type, list.fns[i]); + } + }, + + listen: function(self, match, fn, event, target, uid){ + var form = (target.get('tag') == 'form') ? target : event.target.getParent('form'); + if (!form) return; + + var listeners = self.retrieve(_key + type + 'listeners', {}), + listener = listeners[uid] || {forms: [], fns: []}, + forms = listener.forms, fns = listener.fns; + + if (forms.indexOf(form) != -1) return; + forms.push(form); + + var _fn = function(event){ + bubbleUp(self, match, fn, event, target); + }; + form.addEvent(type, _fn); + fns.push(_fn); + + listeners[uid] = listener; + self.store(_key + type + 'listeners', listeners); + } + }; +}; + +var inputObserver = function(type){ + return { + base: 'focusin', + listen: function(self, match, fn, event, target){ + var events = {blur: function(){ + this.removeEvents(events); + }}; + events[type] = function(event){ + bubbleUp(self, match, fn, event, target); + }; + event.target.addEvents(events); + } + }; +}; + +if (!eventListenerSupport) Object.append(map, { + submit: formObserver('submit'), + reset: formObserver('reset'), + change: inputObserver('change'), + select: inputObserver('select') +}); +/**/ + +var proto = Element.prototype, + addEvent = proto.addEvent, + removeEvent = proto.removeEvent; + +var relay = function(old, method){ + return function(type, fn, useCapture){ + if (type.indexOf(':relay') == -1) return old.call(this, type, fn, useCapture); + var parsed = Slick.parse(type).expressions[0][0]; + if (parsed.pseudos[0].key != 'relay') return old.call(this, type, fn, useCapture); + var newType = parsed.tag; + parsed.pseudos.slice(1).each(function(pseudo){ + newType += ':' + pseudo.key + (pseudo.value ? '(' + pseudo.value + ')' : ''); + }); + old.call(this, type, fn); + return method.call(this, newType, parsed.pseudos[0].value, fn); + }; +}; + +var delegation = { + + addEvent: function(type, match, fn){ + var storage = this.retrieve('$delegates', {}), stored = storage[type]; + if (stored) for (var _uid in stored){ + if (stored[_uid].fn == fn && stored[_uid].match == match) return this; + } + + var _type = type, _match = match, _fn = fn, _map = map[type] || {}; + type = _map.base || _type; + + match = function(target){ + return Slick.match(target, _match); + }; + + var elementEvent = Element.Events[_type]; + if (_map.condition || elementEvent && elementEvent.condition){ + var __match = match, condition = _map.condition || elementEvent.condition; + match = function(target, event){ + return __match(target, event) && condition.call(target, event, type); + }; + } + + var self = this, uid = String.uniqueID(); + var delegator = _map.listen ? function(event, target){ + if (!target && event && event.target) target = event.target; + if (target) _map.listen(self, match, fn, event, target, uid); + } : function(event, target){ + if (!target && event && event.target) target = event.target; + if (target) bubbleUp(self, match, fn, event, target); + }; + + if (!stored) stored = {}; + stored[uid] = { + match: _match, + fn: _fn, + delegator: delegator + }; + storage[_type] = stored; + return addEvent.call(this, type, delegator, _map.capture); + }, + + removeEvent: function(type, match, fn, _uid){ + var storage = this.retrieve('$delegates', {}), stored = storage[type]; + if (!stored) return this; + + if (_uid){ + var _type = type, delegator = stored[_uid].delegator, _map = map[type] || {}; + type = _map.base || _type; + if (_map.remove) _map.remove(this, _uid); + delete stored[_uid]; + storage[_type] = stored; + return removeEvent.call(this, type, delegator, _map.capture); + } + + var __uid, s; + if (fn) for (__uid in stored){ + s = stored[__uid]; + if (s.match == match && s.fn == fn) return delegation.removeEvent.call(this, type, match, fn, __uid); + } else for (__uid in stored){ + s = stored[__uid]; + if (s.match == match) delegation.removeEvent.call(this, type, match, s.fn, __uid); + } + return this; + } + +}; + +[Element, Window, Document].invoke('implement', { + addEvent: relay(addEvent, delegation.addEvent), + removeEvent: relay(removeEvent, delegation.removeEvent) +}); + +})(); + +/* +--- + +name: Element.Style + +description: Contains methods for interacting with the styles of Elements in a fashionable way. + +license: MIT-style license. + +requires: Element + +provides: Element.Style + +... +*/ + +(function(){ + +var html = document.html, el; + +// +// Check for oldIE, which does not remove styles when they're set to null +el = document.createElement('div'); +el.style.color = 'red'; +el.style.color = null; +var doesNotRemoveStyles = el.style.color == 'red'; + +// check for oldIE, which returns border* shorthand styles in the wrong order (color-width-style instead of width-style-color) +var border = '1px solid #123abc'; +el.style.border = border; +var returnsBordersInWrongOrder = el.style.border != border; +el = null; +// + +var hasGetComputedStyle = !!window.getComputedStyle, + supportBorderRadius = document.createElement('div').style.borderRadius != null; + +Element.Properties.styles = {set: function(styles){ + this.setStyles(styles); +}}; + +var hasOpacity = (html.style.opacity != null), + hasFilter = (html.style.filter != null), + reAlpha = /alpha\(opacity=([\d.]+)\)/i; + +var setVisibility = function(element, opacity){ + element.store('$opacity', opacity); + element.style.visibility = opacity > 0 || opacity == null ? 'visible' : 'hidden'; +}; + +// +var setFilter = function(element, regexp, value){ + var style = element.style, + filter = style.filter || element.getComputedStyle('filter') || ''; + style.filter = (regexp.test(filter) ? filter.replace(regexp, value) : filter + ' ' + value).trim(); + if (!style.filter) style.removeAttribute('filter'); +}; +// + +var setOpacity = (hasOpacity ? function(element, opacity){ + element.style.opacity = opacity; +} : (hasFilter ? function(element, opacity){ + if (!element.currentStyle || !element.currentStyle.hasLayout) element.style.zoom = 1; + if (opacity == null || opacity == 1){ + setFilter(element, reAlpha, ''); + if (opacity == 1 && getOpacity(element) != 1) setFilter(element, reAlpha, 'alpha(opacity=100)'); + } else { + setFilter(element, reAlpha, 'alpha(opacity=' + (opacity * 100).limit(0, 100).round() + ')'); + } +} : setVisibility)); + +var getOpacity = (hasOpacity ? function(element){ + var opacity = element.style.opacity || element.getComputedStyle('opacity'); + return (opacity == '') ? 1 : opacity.toFloat(); +} : (hasFilter ? function(element){ + var filter = (element.style.filter || element.getComputedStyle('filter')), + opacity; + if (filter) opacity = filter.match(reAlpha); + return (opacity == null || filter == null) ? 1 : (opacity[1] / 100); +} : function(element){ + var opacity = element.retrieve('$opacity'); + if (opacity == null) opacity = (element.style.visibility == 'hidden' ? 0 : 1); + return opacity; +})); + +var floatName = (html.style.cssFloat == null) ? 'styleFloat' : 'cssFloat', + namedPositions = {left: '0%', top: '0%', center: '50%', right: '100%', bottom: '100%'}, + hasBackgroundPositionXY = (html.style.backgroundPositionX != null), + prefixPattern = /^-(ms)-/; + +var camelCase = function(property){ + return property.replace(prefixPattern, '$1-').camelCase(); +} + +// +var removeStyle = function(style, property){ + if (property == 'backgroundPosition'){ + style.removeAttribute(property + 'X'); + property += 'Y'; + } + style.removeAttribute(property); +}; +// + +Element.implement({ + + getComputedStyle: function(property){ + if (!hasGetComputedStyle && this.currentStyle) return this.currentStyle[camelCase(property)]; + var defaultView = Element.getDocument(this).defaultView, + computed = defaultView ? defaultView.getComputedStyle(this, null) : null; + return (computed) ? computed.getPropertyValue((property == floatName) ? 'float' : property.hyphenate()) : ''; + }, + + setStyle: function(property, value){ + if (property == 'opacity'){ + if (value != null) value = parseFloat(value); + setOpacity(this, value); + return this; + } + property = camelCase(property == 'float' ? floatName : property); + if (typeOf(value) != 'string'){ + var map = (Element.Styles[property] || '@').split(' '); + value = Array.from(value).map(function(val, i){ + if (!map[i]) return ''; + return (typeOf(val) == 'number') ? map[i].replace('@', Math.round(val)) : val; + }).join(' '); + } else if (value == String(Number(value))){ + value = Math.round(value); + } + this.style[property] = value; + // + if ((value == '' || value == null) && doesNotRemoveStyles && this.style.removeAttribute){ + removeStyle(this.style, property); + } + // + return this; + }, + + getStyle: function(property){ + if (property == 'opacity') return getOpacity(this); + property = camelCase(property == 'float' ? floatName : property); + if (supportBorderRadius && property.indexOf('borderRadius') != -1){ + return ['borderTopLeftRadius', 'borderTopRightRadius', 'borderBottomRightRadius', 'borderBottomLeftRadius'].map(function(corner){ + return this.style[corner] || '0px'; + }, this).join(' '); + } + var result = this.style[property]; + if (!result || property == 'zIndex'){ + if (Element.ShortStyles.hasOwnProperty(property)){ + result = []; + for (var s in Element.ShortStyles[property]) result.push(this.getStyle(s)); + return result.join(' '); + } + result = this.getComputedStyle(property); + } + if (hasBackgroundPositionXY && /^backgroundPosition[XY]?$/.test(property)){ + return result.replace(/(top|right|bottom|left)/g, function(position){ + return namedPositions[position]; + }) || '0px'; + } + if (!result && property == 'backgroundPosition') return '0px 0px'; + if (result){ + result = String(result); + var color = result.match(/rgba?\([\d\s,]+\)/); + if (color) result = result.replace(color[0], color[0].rgbToHex()); + } + if (!hasGetComputedStyle && !this.style[property]){ + if ((/^(height|width)$/).test(property) && !(/px$/.test(result))){ + var values = (property == 'width') ? ['left', 'right'] : ['top', 'bottom'], size = 0; + values.each(function(value){ + size += this.getStyle('border-' + value + '-width').toInt() + this.getStyle('padding-' + value).toInt(); + }, this); + return this['offset' + property.capitalize()] - size + 'px'; + } + if ((/^border(.+)Width|margin|padding/).test(property) && isNaN(parseFloat(result))){ + return '0px'; + } + } + // + if (returnsBordersInWrongOrder && /^border(Top|Right|Bottom|Left)?$/.test(property) && /^#/.test(result)){ + return result.replace(/^(.+)\s(.+)\s(.+)$/, '$2 $3 $1'); + } + // + + return result; + }, + + setStyles: function(styles){ + for (var style in styles) this.setStyle(style, styles[style]); + return this; + }, + + getStyles: function(){ + var result = {}; + Array.flatten(arguments).each(function(key){ + result[key] = this.getStyle(key); + }, this); + return result; + } + +}); + +Element.Styles = { + left: '@px', top: '@px', bottom: '@px', right: '@px', + width: '@px', height: '@px', maxWidth: '@px', maxHeight: '@px', minWidth: '@px', minHeight: '@px', + backgroundColor: 'rgb(@, @, @)', backgroundSize: '@px', backgroundPosition: '@px @px', color: 'rgb(@, @, @)', + fontSize: '@px', letterSpacing: '@px', lineHeight: '@px', clip: 'rect(@px @px @px @px)', + margin: '@px @px @px @px', padding: '@px @px @px @px', border: '@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)', + borderWidth: '@px @px @px @px', borderStyle: '@ @ @ @', borderColor: 'rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)', + zIndex: '@', 'zoom': '@', fontWeight: '@', textIndent: '@px', opacity: '@', borderRadius: '@px @px @px @px' +}; + + + + + +Element.ShortStyles = {margin: {}, padding: {}, border: {}, borderWidth: {}, borderStyle: {}, borderColor: {}}; + +['Top', 'Right', 'Bottom', 'Left'].each(function(direction){ + var Short = Element.ShortStyles; + var All = Element.Styles; + ['margin', 'padding'].each(function(style){ + var sd = style + direction; + Short[style][sd] = All[sd] = '@px'; + }); + var bd = 'border' + direction; + Short.border[bd] = All[bd] = '@px @ rgb(@, @, @)'; + var bdw = bd + 'Width', bds = bd + 'Style', bdc = bd + 'Color'; + Short[bd] = {}; + Short.borderWidth[bdw] = Short[bd][bdw] = All[bdw] = '@px'; + Short.borderStyle[bds] = Short[bd][bds] = All[bds] = '@'; + Short.borderColor[bdc] = Short[bd][bdc] = All[bdc] = 'rgb(@, @, @)'; +}); + +if (hasBackgroundPositionXY) Element.ShortStyles.backgroundPosition = {backgroundPositionX: '@', backgroundPositionY: '@'}; +})(); + +/* +--- + +name: Element.Dimensions + +description: Contains methods to work with size, scroll, or positioning of Elements and the window object. + +license: MIT-style license. + +credits: + - Element positioning based on the [qooxdoo](http://qooxdoo.org/) code and smart browser fixes, [LGPL License](http://www.gnu.org/licenses/lgpl.html). + - Viewport dimensions based on [YUI](http://developer.yahoo.com/yui/) code, [BSD License](http://developer.yahoo.com/yui/license.html). + +requires: [Element, Element.Style] + +provides: [Element.Dimensions] + +... +*/ + +(function(){ + +var element = document.createElement('div'), + child = document.createElement('div'); +element.style.height = '0'; +element.appendChild(child); +var brokenOffsetParent = (child.offsetParent === element); +element = child = null; + +var heightComponents = ['height', 'paddingTop', 'paddingBottom', 'borderTopWidth', 'borderBottomWidth'], + widthComponents = ['width', 'paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth']; + +var svgCalculateSize = function(el){ + + var gCS = window.getComputedStyle(el), + bounds = {x: 0, y: 0}; + + heightComponents.each(function(css){ + bounds.y += parseFloat(gCS[css]); + }); + widthComponents.each(function(css){ + bounds.x += parseFloat(gCS[css]); + }); + return bounds; +}; + +var isOffset = function(el){ + return styleString(el, 'position') != 'static' || isBody(el); +}; + +var isOffsetStatic = function(el){ + return isOffset(el) || (/^(?:table|td|th)$/i).test(el.tagName); +}; + +Element.implement({ + + scrollTo: function(x, y){ + if (isBody(this)){ + this.getWindow().scrollTo(x, y); + } else { + this.scrollLeft = x; + this.scrollTop = y; + } + return this; + }, + + getSize: function(){ + if (isBody(this)) return this.getWindow().getSize(); + + // + // This if clause is because IE8- cannot calculate getBoundingClientRect of elements with visibility hidden. + if (!window.getComputedStyle) return {x: this.offsetWidth, y: this.offsetHeight}; + // + + // This svg section under, calling `svgCalculateSize()`, can be removed when FF fixed the svg size bug. + // Bug info: https://bugzilla.mozilla.org/show_bug.cgi?id=530985 + if (this.get('tag') == 'svg') return svgCalculateSize(this); + + try { + var bounds = this.getBoundingClientRect(); + return {x: bounds.width, y: bounds.height}; + } catch(e) { + return {x: 0, y: 0}; + } + }, + + getScrollSize: function(){ + if (isBody(this)) return this.getWindow().getScrollSize(); + return {x: this.scrollWidth, y: this.scrollHeight}; + }, + + getScroll: function(){ + if (isBody(this)) return this.getWindow().getScroll(); + return {x: this.scrollLeft, y: this.scrollTop}; + }, + + getScrolls: function(){ + var element = this.parentNode, position = {x: 0, y: 0}; + while (element && !isBody(element)){ + position.x += element.scrollLeft; + position.y += element.scrollTop; + element = element.parentNode; + } + return position; + }, + + getOffsetParent: brokenOffsetParent ? function(){ + var element = this; + if (isBody(element) || styleString(element, 'position') == 'fixed') return null; + + var isOffsetCheck = (styleString(element, 'position') == 'static') ? isOffsetStatic : isOffset; + while ((element = element.parentNode)){ + if (isOffsetCheck(element)) return element; + } + return null; + } : function(){ + var element = this; + if (isBody(element) || styleString(element, 'position') == 'fixed') return null; + + try { + return element.offsetParent; + } catch(e){} + return null; + }, + + getOffsets: function(){ + var hasGetBoundingClientRect = this.getBoundingClientRect; + + if (hasGetBoundingClientRect){ + var bound = this.getBoundingClientRect(), + html = document.id(this.getDocument().documentElement), + htmlScroll = html.getScroll(), + elemScrolls = this.getScrolls(), + isFixed = (styleString(this, 'position') == 'fixed'); + + return { + x: bound.left.toFloat() + elemScrolls.x + ((isFixed) ? 0 : htmlScroll.x) - html.clientLeft, + y: bound.top.toFloat() + elemScrolls.y + ((isFixed) ? 0 : htmlScroll.y) - html.clientTop + }; + } + + var element = this, position = {x: 0, y: 0}; + if (isBody(this)) return position; + + while (element && !isBody(element)){ + position.x += element.offsetLeft; + position.y += element.offsetTop; + + element = element.offsetParent; + } + + return position; + }, + + getPosition: function(relative){ + var offset = this.getOffsets(), + scroll = this.getScrolls(); + var position = { + x: offset.x - scroll.x, + y: offset.y - scroll.y + }; + + if (relative && (relative = document.id(relative))){ + var relativePosition = relative.getPosition(); + return {x: position.x - relativePosition.x - leftBorder(relative), y: position.y - relativePosition.y - topBorder(relative)}; + } + return position; + }, + + getCoordinates: function(element){ + if (isBody(this)) return this.getWindow().getCoordinates(); + var position = this.getPosition(element), + size = this.getSize(); + var obj = { + left: position.x, + top: position.y, + width: size.x, + height: size.y + }; + obj.right = obj.left + obj.width; + obj.bottom = obj.top + obj.height; + return obj; + }, + + computePosition: function(obj){ + return { + left: obj.x - styleNumber(this, 'margin-left'), + top: obj.y - styleNumber(this, 'margin-top') + }; + }, + + setPosition: function(obj){ + return this.setStyles(this.computePosition(obj)); + } + +}); + + +[Document, Window].invoke('implement', { + + getSize: function(){ + var doc = getCompatElement(this); + return {x: doc.clientWidth, y: doc.clientHeight}; + }, + + getScroll: function(){ + var win = this.getWindow(), doc = getCompatElement(this); + return {x: win.pageXOffset || doc.scrollLeft, y: win.pageYOffset || doc.scrollTop}; + }, + + getScrollSize: function(){ + var doc = getCompatElement(this), + min = this.getSize(), + body = this.getDocument().body; + + return {x: Math.max(doc.scrollWidth, body.scrollWidth, min.x), y: Math.max(doc.scrollHeight, body.scrollHeight, min.y)}; + }, + + getPosition: function(){ + return {x: 0, y: 0}; + }, + + getCoordinates: function(){ + var size = this.getSize(); + return {top: 0, left: 0, bottom: size.y, right: size.x, height: size.y, width: size.x}; + } + +}); + +// private methods + +var styleString = Element.getComputedStyle; + +function styleNumber(element, style){ + return styleString(element, style).toInt() || 0; +} + + + +function topBorder(element){ + return styleNumber(element, 'border-top-width'); +} + +function leftBorder(element){ + return styleNumber(element, 'border-left-width'); +} + +function isBody(element){ + return (/^(?:body|html)$/i).test(element.tagName); +} + +function getCompatElement(element){ + var doc = element.getDocument(); + return (!doc.compatMode || doc.compatMode == 'CSS1Compat') ? doc.html : doc.body; +} + +})(); + +//aliases +Element.alias({position: 'setPosition'}); //compatability + +[Window, Document, Element].invoke('implement', { + + getHeight: function(){ + return this.getSize().y; + }, + + getWidth: function(){ + return this.getSize().x; + }, + + getScrollTop: function(){ + return this.getScroll().y; + }, + + getScrollLeft: function(){ + return this.getScroll().x; + }, + + getScrollHeight: function(){ + return this.getScrollSize().y; + }, + + getScrollWidth: function(){ + return this.getScrollSize().x; + }, + + getTop: function(){ + return this.getPosition().y; + }, + + getLeft: function(){ + return this.getPosition().x; + } + +}); + +/* +--- + +name: Fx + +description: Contains the basic animation logic to be extended by all other Fx Classes. + +license: MIT-style license. + +requires: [Chain, Events, Options] + +provides: Fx + +... +*/ + +(function(){ + +var Fx = this.Fx = new Class({ + + Implements: [Chain, Events, Options], + + options: { + /* + onStart: nil, + onCancel: nil, + onComplete: nil, + */ + fps: 60, + unit: false, + duration: 500, + frames: null, + frameSkip: true, + link: 'ignore' + }, + + initialize: function(options){ + this.subject = this.subject || this; + this.setOptions(options); + }, + + getTransition: function(){ + return function(p){ + return -(Math.cos(Math.PI * p) - 1) / 2; + }; + }, + + step: function(now){ + if (this.options.frameSkip){ + var diff = (this.time != null) ? (now - this.time) : 0, frames = diff / this.frameInterval; + this.time = now; + this.frame += frames; + } else { + this.frame++; + } + + if (this.frame < this.frames){ + var delta = this.transition(this.frame / this.frames); + this.set(this.compute(this.from, this.to, delta)); + } else { + this.frame = this.frames; + this.set(this.compute(this.from, this.to, 1)); + this.stop(); + } + }, + + set: function(now){ + return now; + }, + + compute: function(from, to, delta){ + return Fx.compute(from, to, delta); + }, + + check: function(){ + if (!this.isRunning()) return true; + switch (this.options.link){ + case 'cancel': this.cancel(); return true; + case 'chain': this.chain(this.caller.pass(arguments, this)); return false; + } + return false; + }, + + start: function(from, to){ + if (!this.check(from, to)) return this; + this.from = from; + this.to = to; + this.frame = (this.options.frameSkip) ? 0 : -1; + this.time = null; + this.transition = this.getTransition(); + var frames = this.options.frames, fps = this.options.fps, duration = this.options.duration; + this.duration = Fx.Durations[duration] || duration.toInt(); + this.frameInterval = 1000 / fps; + this.frames = frames || Math.round(this.duration / this.frameInterval); + this.fireEvent('start', this.subject); + pushInstance.call(this, fps); + return this; + }, + + stop: function(){ + if (this.isRunning()){ + this.time = null; + pullInstance.call(this, this.options.fps); + if (this.frames == this.frame){ + this.fireEvent('complete', this.subject); + if (!this.callChain()) this.fireEvent('chainComplete', this.subject); + } else { + this.fireEvent('stop', this.subject); + } + } + return this; + }, + + cancel: function(){ + if (this.isRunning()){ + this.time = null; + pullInstance.call(this, this.options.fps); + this.frame = this.frames; + this.fireEvent('cancel', this.subject).clearChain(); + } + return this; + }, + + pause: function(){ + if (this.isRunning()){ + this.time = null; + pullInstance.call(this, this.options.fps); + } + return this; + }, + + resume: function(){ + if (this.isPaused()) pushInstance.call(this, this.options.fps); + return this; + }, + + isRunning: function(){ + var list = instances[this.options.fps]; + return list && list.contains(this); + }, + + isPaused: function(){ + return (this.frame < this.frames) && !this.isRunning(); + } + +}); + +Fx.compute = function(from, to, delta){ + return (to - from) * delta + from; +}; + +Fx.Durations = {'short': 250, 'normal': 500, 'long': 1000}; + +// global timers + +var instances = {}, timers = {}; + +var loop = function(){ + var now = Date.now(); + for (var i = this.length; i--;){ + var instance = this[i]; + if (instance) instance.step(now); + } +}; + +var pushInstance = function(fps){ + var list = instances[fps] || (instances[fps] = []); + list.push(this); + if (!timers[fps]) timers[fps] = loop.periodical(Math.round(1000 / fps), list); +}; + +var pullInstance = function(fps){ + var list = instances[fps]; + if (list){ + list.erase(this); + if (!list.length && timers[fps]){ + delete instances[fps]; + timers[fps] = clearInterval(timers[fps]); + } + } +}; + +})(); + +/* +--- + +name: Fx.CSS + +description: Contains the CSS animation logic. Used by Fx.Tween, Fx.Morph, Fx.Elements. + +license: MIT-style license. + +requires: [Fx, Element.Style] + +provides: Fx.CSS + +... +*/ + +Fx.CSS = new Class({ + + Extends: Fx, + + //prepares the base from/to object + + prepare: function(element, property, values){ + values = Array.from(values); + var from = values[0], to = values[1]; + if (to == null){ + to = from; + from = element.getStyle(property); + var unit = this.options.unit; + // adapted from: https://github.com/ryanmorr/fx/blob/master/fx.js#L299 + if (unit && from && typeof from == 'string' && from.slice(-unit.length) != unit && parseFloat(from) != 0){ + element.setStyle(property, to + unit); + var value = element.getComputedStyle(property); + // IE and Opera support pixelLeft or pixelWidth + if (!(/px$/.test(value))){ + value = element.style[('pixel-' + property).camelCase()]; + if (value == null){ + // adapted from Dean Edwards' http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + var left = element.style.left; + element.style.left = to + unit; + value = element.style.pixelLeft; + element.style.left = left; + } + } + from = (to || 1) / (parseFloat(value) || 1) * (parseFloat(from) || 0); + element.setStyle(property, from + unit); + } + } + return {from: this.parse(from), to: this.parse(to)}; + }, + + //parses a value into an array + + parse: function(value){ + value = Function.from(value)(); + value = (typeof value == 'string') ? value.split(' ') : Array.from(value); + return value.map(function(val){ + val = String(val); + var found = false; + Object.each(Fx.CSS.Parsers, function(parser, key){ + if (found) return; + var parsed = parser.parse(val); + if (parsed || parsed === 0) found = {value: parsed, parser: parser}; + }); + found = found || {value: val, parser: Fx.CSS.Parsers.String}; + return found; + }); + }, + + //computes by a from and to prepared objects, using their parsers. + + compute: function(from, to, delta){ + var computed = []; + (Math.min(from.length, to.length)).times(function(i){ + computed.push({value: from[i].parser.compute(from[i].value, to[i].value, delta), parser: from[i].parser}); + }); + computed.$family = Function.from('fx:css:value'); + return computed; + }, + + //serves the value as settable + + serve: function(value, unit){ + if (typeOf(value) != 'fx:css:value') value = this.parse(value); + var returned = []; + value.each(function(bit){ + returned = returned.concat(bit.parser.serve(bit.value, unit)); + }); + return returned; + }, + + //renders the change to an element + + render: function(element, property, value, unit){ + element.setStyle(property, this.serve(value, unit)); + }, + + //searches inside the page css to find the values for a selector + + search: function(selector){ + if (Fx.CSS.Cache[selector]) return Fx.CSS.Cache[selector]; + var to = {}, selectorTest = new RegExp('^' + selector.escapeRegExp() + '$'); + + var searchStyles = function(rules){ + Array.each(rules, function(rule, i){ + if (rule.media){ + searchStyles(rule.rules || rule.cssRules); + return; + } + if (!rule.style) return; + var selectorText = (rule.selectorText) ? rule.selectorText.replace(/^\w+/, function(m){ + return m.toLowerCase(); + }) : null; + if (!selectorText || !selectorTest.test(selectorText)) return; + Object.each(Element.Styles, function(value, style){ + if (!rule.style[style] || Element.ShortStyles[style]) return; + value = String(rule.style[style]); + to[style] = ((/^rgb/).test(value)) ? value.rgbToHex() : value; + }); + }); + }; + + Array.each(document.styleSheets, function(sheet, j){ + var href = sheet.href; + if (href && href.indexOf('://') > -1 && href.indexOf(document.domain) == -1) return; + var rules = sheet.rules || sheet.cssRules; + searchStyles(rules); + }); + return Fx.CSS.Cache[selector] = to; + } + +}); + +Fx.CSS.Cache = {}; + +Fx.CSS.Parsers = { + + Color: { + parse: function(value){ + if (value.match(/^#[0-9a-f]{3,6}$/i)) return value.hexToRgb(true); + return ((value = value.match(/(\d+),\s*(\d+),\s*(\d+)/))) ? [value[1], value[2], value[3]] : false; + }, + compute: function(from, to, delta){ + return from.map(function(value, i){ + return Math.round(Fx.compute(from[i], to[i], delta)); + }); + }, + serve: function(value){ + return value.map(Number); + } + }, + + Number: { + parse: parseFloat, + compute: Fx.compute, + serve: function(value, unit){ + return (unit) ? value + unit : value; + } + }, + + String: { + parse: Function.from(false), + compute: function(zero, one){ + return one; + }, + serve: function(zero){ + return zero; + } + } + +}; + + + +/* +--- + +name: Fx.Morph + +description: Formerly Fx.Styles, effect to transition any number of CSS properties for an element using an object of rules, or CSS based selector rules. + +license: MIT-style license. + +requires: Fx.CSS + +provides: Fx.Morph + +... +*/ + +Fx.Morph = new Class({ + + Extends: Fx.CSS, + + initialize: function(element, options){ + this.element = this.subject = document.id(element); + this.parent(options); + }, + + set: function(now){ + if (typeof now == 'string') now = this.search(now); + for (var p in now) this.render(this.element, p, now[p], this.options.unit); + return this; + }, + + compute: function(from, to, delta){ + var now = {}; + for (var p in from) now[p] = this.parent(from[p], to[p], delta); + return now; + }, + + start: function(properties){ + if (!this.check(properties)) return this; + if (typeof properties == 'string') properties = this.search(properties); + var from = {}, to = {}; + for (var p in properties){ + var parsed = this.prepare(this.element, p, properties[p]); + from[p] = parsed.from; + to[p] = parsed.to; + } + return this.parent(from, to); + } + +}); + +Element.Properties.morph = { + + set: function(options){ + this.get('morph').cancel().setOptions(options); + return this; + }, + + get: function(){ + var morph = this.retrieve('morph'); + if (!morph){ + morph = new Fx.Morph(this, {link: 'cancel'}); + this.store('morph', morph); + } + return morph; + } + +}; + +Element.implement({ + + morph: function(props){ + this.get('morph').start(props); + return this; + } + +}); + +/* +--- + +name: Fx.Transitions + +description: Contains a set of advanced transitions to be used with any of the Fx Classes. + +license: MIT-style license. + +credits: + - Easing Equations by Robert Penner, , modified and optimized to be used with MooTools. + +requires: Fx + +provides: Fx.Transitions + +... +*/ + +Fx.implement({ + + getTransition: function(){ + var trans = this.options.transition || Fx.Transitions.Sine.easeInOut; + if (typeof trans == 'string'){ + var data = trans.split(':'); + trans = Fx.Transitions; + trans = trans[data[0]] || trans[data[0].capitalize()]; + if (data[1]) trans = trans['ease' + data[1].capitalize() + (data[2] ? data[2].capitalize() : '')]; + } + return trans; + } + +}); + +Fx.Transition = function(transition, params){ + params = Array.from(params); + var easeIn = function(pos){ + return transition(pos, params); + }; + return Object.append(easeIn, { + easeIn: easeIn, + easeOut: function(pos){ + return 1 - transition(1 - pos, params); + }, + easeInOut: function(pos){ + return (pos <= 0.5 ? transition(2 * pos, params) : (2 - transition(2 * (1 - pos), params))) / 2; + } + }); +}; + +Fx.Transitions = { + + linear: function(zero){ + return zero; + } + +}; + + + +Fx.Transitions.extend = function(transitions){ + for (var transition in transitions) Fx.Transitions[transition] = new Fx.Transition(transitions[transition]); +}; + +Fx.Transitions.extend({ + + Pow: function(p, x){ + return Math.pow(p, x && x[0] || 6); + }, + + Expo: function(p){ + return Math.pow(2, 8 * (p - 1)); + }, + + Circ: function(p){ + return 1 - Math.sin(Math.acos(p)); + }, + + Sine: function(p){ + return 1 - Math.cos(p * Math.PI / 2); + }, + + Back: function(p, x){ + x = x && x[0] || 1.618; + return Math.pow(p, 2) * ((x + 1) * p - x); + }, + + Bounce: function(p){ + var value; + for (var a = 0, b = 1; 1; a += b, b /= 2){ + if (p >= (7 - 4 * a) / 11){ + value = b * b - Math.pow((11 - 6 * a - 11 * p) / 4, 2); + break; + } + } + return value; + }, + + Elastic: function(p, x){ + return Math.pow(2, 10 * --p) * Math.cos(20 * p * Math.PI * (x && x[0] || 1) / 3); + } + +}); + +['Quad', 'Cubic', 'Quart', 'Quint'].each(function(transition, i){ + Fx.Transitions[transition] = new Fx.Transition(function(p){ + return Math.pow(p, i + 2); + }); +}); + +/* +--- + +name: Fx.Tween + +description: Formerly Fx.Style, effect to transition any CSS property for an element. + +license: MIT-style license. + +requires: Fx.CSS + +provides: [Fx.Tween, Element.fade, Element.highlight] + +... +*/ + +Fx.Tween = new Class({ + + Extends: Fx.CSS, + + initialize: function(element, options){ + this.element = this.subject = document.id(element); + this.parent(options); + }, + + set: function(property, now){ + if (arguments.length == 1){ + now = property; + property = this.property || this.options.property; + } + this.render(this.element, property, now, this.options.unit); + return this; + }, + + start: function(property, from, to){ + if (!this.check(property, from, to)) return this; + var args = Array.flatten(arguments); + this.property = this.options.property || args.shift(); + var parsed = this.prepare(this.element, this.property, args); + return this.parent(parsed.from, parsed.to); + } + +}); + +Element.Properties.tween = { + + set: function(options){ + this.get('tween').cancel().setOptions(options); + return this; + }, + + get: function(){ + var tween = this.retrieve('tween'); + if (!tween){ + tween = new Fx.Tween(this, {link: 'cancel'}); + this.store('tween', tween); + } + return tween; + } + +}; + +Element.implement({ + + tween: function(property, from, to){ + this.get('tween').start(property, from, to); + return this; + }, + + fade: function(how){ + var fade = this.get('tween'), method, args = ['opacity'].append(arguments), toggle; + if (args[1] == null) args[1] = 'toggle'; + switch (args[1]){ + case 'in': method = 'start'; args[1] = 1; break; + case 'out': method = 'start'; args[1] = 0; break; + case 'show': method = 'set'; args[1] = 1; break; + case 'hide': method = 'set'; args[1] = 0; break; + case 'toggle': + var flag = this.retrieve('fade:flag', this.getStyle('opacity') == 1); + method = 'start'; + args[1] = flag ? 0 : 1; + this.store('fade:flag', !flag); + toggle = true; + break; + default: method = 'start'; + } + if (!toggle) this.eliminate('fade:flag'); + fade[method].apply(fade, args); + var to = args[args.length - 1]; + + if (method == 'set'){ + this.setStyle('visibility', to == 0 ? 'hidden' : 'visible'); + } else if (to != 0){ + if (fade.$chain.length){ + fade.chain(function(){ + this.element.setStyle('visibility', 'visible'); + this.callChain(); + }); + } else { + this.setStyle('visibility', 'visible'); + } + } else { + fade.chain(function(){ + if (this.element.getStyle('opacity')) return; + this.element.setStyle('visibility', 'hidden'); + this.callChain(); + }); + } + + return this; + }, + + highlight: function(start, end){ + if (!end){ + end = this.retrieve('highlight:original', this.getStyle('background-color')); + end = (end == 'transparent') ? '#fff' : end; + } + var tween = this.get('tween'); + tween.start('background-color', start || '#ffff88', end).chain(function(){ + this.setStyle('background-color', this.retrieve('highlight:original')); + tween.callChain(); + }.bind(this)); + return this; + } + +}); + +/* +--- + +name: Request + +description: Powerful all purpose Request Class. Uses XMLHTTPRequest. + +license: MIT-style license. + +requires: [Object, Element, Chain, Events, Options, Browser] + +provides: Request + +... +*/ + +(function(){ + +var empty = function(){}, + progressSupport = ('onprogress' in new Browser.Request); + +var Request = this.Request = new Class({ + + Implements: [Chain, Events, Options], + + options: {/* + onRequest: function(){}, + onLoadstart: function(event, xhr){}, + onProgress: function(event, xhr){}, + onComplete: function(){}, + onCancel: function(){}, + onSuccess: function(responseText, responseXML){}, + onFailure: function(xhr){}, + onException: function(headerName, value){}, + onTimeout: function(){}, + user: '', + password: '', + withCredentials: false,*/ + url: '', + data: '', + headers: { + 'X-Requested-With': 'XMLHttpRequest', + 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' + }, + async: true, + format: false, + method: 'post', + link: 'ignore', + isSuccess: null, + emulation: true, + urlEncoded: true, + encoding: 'utf-8', + evalScripts: false, + evalResponse: false, + timeout: 0, + noCache: false + }, + + initialize: function(options){ + this.xhr = new Browser.Request(); + this.setOptions(options); + this.headers = this.options.headers; + }, + + onStateChange: function(){ + var xhr = this.xhr; + if (xhr.readyState != 4 || !this.running) return; + this.running = false; + this.status = 0; + Function.attempt(function(){ + var status = xhr.status; + this.status = (status == 1223) ? 204 : status; + }.bind(this)); + xhr.onreadystatechange = empty; + if (progressSupport) xhr.onprogress = xhr.onloadstart = empty; + if (this.timer){ + clearTimeout(this.timer); + delete this.timer; + } + + this.response = {text: this.xhr.responseText || '', xml: this.xhr.responseXML}; + if (this.options.isSuccess.call(this, this.status)) + this.success(this.response.text, this.response.xml); + else + this.failure(); + }, + + isSuccess: function(){ + var status = this.status; + return (status >= 200 && status < 300); + }, + + isRunning: function(){ + return !!this.running; + }, + + processScripts: function(text){ + if (this.options.evalResponse || (/(ecma|java)script/).test(this.getHeader('Content-type'))) return Browser.exec(text); + return text.stripScripts(this.options.evalScripts); + }, + + success: function(text, xml){ + this.onSuccess(this.processScripts(text), xml); + }, + + onSuccess: function(){ + this.fireEvent('complete', arguments).fireEvent('success', arguments).callChain(); + }, + + failure: function(){ + this.onFailure(); + }, + + onFailure: function(){ + this.fireEvent('complete').fireEvent('failure', this.xhr); + }, + + loadstart: function(event){ + this.fireEvent('loadstart', [event, this.xhr]); + }, + + progress: function(event){ + this.fireEvent('progress', [event, this.xhr]); + }, + + timeout: function(){ + this.fireEvent('timeout', this.xhr); + }, + + setHeader: function(name, value){ + this.headers[name] = value; + return this; + }, + + getHeader: function(name){ + return Function.attempt(function(){ + return this.xhr.getResponseHeader(name); + }.bind(this)); + }, + + check: function(){ + if (!this.running) return true; + switch (this.options.link){ + case 'cancel': this.cancel(); return true; + case 'chain': this.chain(this.caller.pass(arguments, this)); return false; + } + return false; + }, + + send: function(options){ + if (!this.check(options)) return this; + + this.options.isSuccess = this.options.isSuccess || this.isSuccess; + this.running = true; + + var type = typeOf(options); + if (type == 'string' || type == 'element') options = {data: options}; + + var old = this.options; + options = Object.append({data: old.data, url: old.url, method: old.method}, options); + var data = options.data, url = String(options.url), method = options.method.toLowerCase(); + + switch (typeOf(data)){ + case 'element': data = document.id(data).toQueryString(); break; + case 'object': case 'hash': data = Object.toQueryString(data); + } + + if (this.options.format){ + var format = 'format=' + this.options.format; + data = (data) ? format + '&' + data : format; + } + + if (this.options.emulation && !['get', 'post'].contains(method)){ + var _method = '_method=' + method; + data = (data) ? _method + '&' + data : _method; + method = 'post'; + } + + if (this.options.urlEncoded && ['post', 'put'].contains(method)){ + var encoding = (this.options.encoding) ? '; charset=' + this.options.encoding : ''; + this.headers['Content-type'] = 'application/x-www-form-urlencoded' + encoding; + } + + if (!url) url = document.location.pathname; + + var trimPosition = url.lastIndexOf('/'); + if (trimPosition > -1 && (trimPosition = url.indexOf('#')) > -1) url = url.substr(0, trimPosition); + + if (this.options.noCache) + url += (url.indexOf('?') > -1 ? '&' : '?') + String.uniqueID(); + + if (data && (method == 'get' || method == 'delete')){ + url += (url.indexOf('?') > -1 ? '&' : '?') + data; + data = null; + } + + var xhr = this.xhr; + if (progressSupport){ + xhr.onloadstart = this.loadstart.bind(this); + xhr.onprogress = this.progress.bind(this); + } + + xhr.open(method.toUpperCase(), url, this.options.async, this.options.user, this.options.password); + if ((this.options.withCredentials) && 'withCredentials' in xhr) xhr.withCredentials = true; + + xhr.onreadystatechange = this.onStateChange.bind(this); + + Object.each(this.headers, function(value, key){ + try { + xhr.setRequestHeader(key, value); + } catch (e){ + this.fireEvent('exception', [key, value]); + } + }, this); + + this.fireEvent('request'); + xhr.send(data); + if (!this.options.async) this.onStateChange(); + else if (this.options.timeout) this.timer = this.timeout.delay(this.options.timeout, this); + return this; + }, + + cancel: function(){ + if (!this.running) return this; + this.running = false; + var xhr = this.xhr; + xhr.abort(); + if (this.timer){ + clearTimeout(this.timer); + delete this.timer; + } + xhr.onreadystatechange = empty; + if (progressSupport) xhr.onprogress = xhr.onloadstart = empty; + this.xhr = new Browser.Request(); + this.fireEvent('cancel'); + return this; + } + +}); + +var methods = {}; +['get', 'post', 'put', 'delete', 'patch', 'head', 'GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD'].each(function(method){ + methods[method] = function(data){ + var object = { + method: method + }; + if (data != null) object.data = data; + return this.send(object); + }; +}); + +Request.implement(methods); + +Element.Properties.send = { + + set: function(options){ + var send = this.get('send').cancel(); + send.setOptions(options); + return this; + }, + + get: function(){ + var send = this.retrieve('send'); + if (!send){ + send = new Request({ + data: this, link: 'cancel', method: this.get('method') || 'post', url: this.get('action') + }); + this.store('send', send); + } + return send; + } + +}; + +Element.implement({ + + send: function(url){ + var sender = this.get('send'); + sender.send({data: this, url: url || sender.options.url}); + return this; + } + +}); + +})(); + +/* +--- + +name: Request.HTML + +description: Extends the basic Request Class with additional methods for interacting with HTML responses. + +license: MIT-style license. + +requires: [Element, Request] + +provides: Request.HTML + +... +*/ + +Request.HTML = new Class({ + + Extends: Request, + + options: { + update: false, + append: false, + evalScripts: true, + filter: false, + headers: { + Accept: 'text/html, application/xml, text/xml, */*' + } + }, + + success: function(text){ + var options = this.options, response = this.response; + + response.html = text.stripScripts(function(script){ + response.javascript = script; + }); + + var match = response.html.match(/]*>([\s\S]*?)<\/body>/i); + if (match) response.html = match[1]; + var temp = new Element('div').set('html', response.html); + + response.tree = temp.childNodes; + response.elements = temp.getElements(options.filter || '*'); + + if (options.filter) response.tree = response.elements; + if (options.update){ + var update = document.id(options.update).empty(); + if (options.filter) update.adopt(response.elements); + else update.set('html', response.html); + } else if (options.append){ + var append = document.id(options.append); + if (options.filter) response.elements.reverse().inject(append); + else append.adopt(temp.getChildren()); + } + if (options.evalScripts) Browser.exec(response.javascript); + + this.onSuccess(response.tree, response.elements, response.html, response.javascript); + } + +}); + +Element.Properties.load = { + + set: function(options){ + var load = this.get('load').cancel(); + load.setOptions(options); + return this; + }, + + get: function(){ + var load = this.retrieve('load'); + if (!load){ + load = new Request.HTML({data: this, link: 'cancel', update: this, method: 'get'}); + this.store('load', load); + } + return load; + } + +}; + +Element.implement({ + + load: function(){ + this.get('load').send(Array.link(arguments, {data: Type.isObject, url: Type.isString})); + return this; + } + +}); + +/* +--- + +name: JSON + +description: JSON encoder and decoder. + +license: MIT-style license. + +SeeAlso: + +requires: [Array, String, Number, Function] + +provides: JSON + +... +*/ + +if (typeof JSON == 'undefined') this.JSON = {}; + + + +(function(){ + +var special = {'\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"' : '\\"', '\\': '\\\\'}; + +var escape = function(chr){ + return special[chr] || '\\u' + ('0000' + chr.charCodeAt(0).toString(16)).slice(-4); +}; + +JSON.validate = function(string){ + string = string.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@'). + replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']'). + replace(/(?:^|:|,)(?:\s*\[)+/g, ''); + + return (/^[\],:{}\s]*$/).test(string); +}; + +JSON.encode = JSON.stringify ? function(obj){ + return JSON.stringify(obj); +} : function(obj){ + if (obj && obj.toJSON) obj = obj.toJSON(); + + switch (typeOf(obj)){ + case 'string': + return '"' + obj.replace(/[\x00-\x1f\\"]/g, escape) + '"'; + case 'array': + return '[' + obj.map(JSON.encode).clean() + ']'; + case 'object': case 'hash': + var string = []; + Object.each(obj, function(value, key){ + var json = JSON.encode(value); + if (json) string.push(JSON.encode(key) + ':' + json); + }); + return '{' + string + '}'; + case 'number': case 'boolean': return '' + obj; + case 'null': return 'null'; + } + + return null; +}; + +JSON.secure = true; + + +JSON.decode = function(string, secure){ + if (!string || typeOf(string) != 'string') return null; + + if (secure == null) secure = JSON.secure; + if (secure){ + if (JSON.parse) return JSON.parse(string); + if (!JSON.validate(string)) throw new Error('JSON could not decode the input; security is enabled and the value is not secure.'); + } + + return eval('(' + string + ')'); +}; + +})(); + +/* +--- + +name: Request.JSON + +description: Extends the basic Request Class with additional methods for sending and receiving JSON data. + +license: MIT-style license. + +requires: [Request, JSON] + +provides: Request.JSON + +... +*/ + +Request.JSON = new Class({ + + Extends: Request, + + options: { + /*onError: function(text, error){},*/ + secure: true + }, + + initialize: function(options){ + this.parent(options); + Object.append(this.headers, { + 'Accept': 'application/json', + 'X-Request': 'JSON' + }); + }, + + success: function(text){ + var json; + try { + json = this.response.json = JSON.decode(text, this.options.secure); + } catch (error){ + this.fireEvent('error', [text, error]); + return; + } + if (json == null) this.onFailure(); + else this.onSuccess(json, text); + } + +}); + +/* +--- + +name: Cookie + +description: Class for creating, reading, and deleting browser Cookies. + +license: MIT-style license. + +credits: + - Based on the functions by Peter-Paul Koch (http://quirksmode.org). + +requires: [Options, Browser] + +provides: Cookie + +... +*/ + +var Cookie = new Class({ + + Implements: Options, + + options: { + path: '/', + domain: false, + duration: false, + secure: false, + document: document, + encode: true, + httpOnly: false + }, + + initialize: function(key, options){ + this.key = key; + this.setOptions(options); + }, + + write: function(value){ + if (this.options.encode) value = encodeURIComponent(value); + if (this.options.domain) value += '; domain=' + this.options.domain; + if (this.options.path) value += '; path=' + this.options.path; + if (this.options.duration){ + var date = new Date(); + date.setTime(date.getTime() + this.options.duration * 24 * 60 * 60 * 1000); + value += '; expires=' + date.toGMTString(); + } + if (this.options.secure) value += '; secure'; + if (this.options.httpOnly) value += '; HttpOnly'; + this.options.document.cookie = this.key + '=' + value; + return this; + }, + + read: function(){ + var value = this.options.document.cookie.match('(?:^|;)\\s*' + this.key.escapeRegExp() + '=([^;]*)'); + return (value) ? decodeURIComponent(value[1]) : null; + }, + + dispose: function(){ + new Cookie(this.key, Object.merge({}, this.options, {duration: -1})).write(''); + return this; + } + +}); + +Cookie.write = function(key, value, options){ + return new Cookie(key, options).write(value); +}; + +Cookie.read = function(key){ + return new Cookie(key).read(); +}; + +Cookie.dispose = function(key, options){ + return new Cookie(key, options).dispose(); +}; + +/* +--- + +name: DOMReady + +description: Contains the custom event domready. + +license: MIT-style license. + +requires: [Browser, Element, Element.Event] + +provides: [DOMReady, DomReady] + +... +*/ + +(function(window, document){ + +var ready, + loaded, + checks = [], + shouldPoll, + timer, + testElement = document.createElement('div'); + +var domready = function(){ + clearTimeout(timer); + if (!ready) { + Browser.loaded = ready = true; + document.removeListener('DOMContentLoaded', domready).removeListener('readystatechange', check); + document.fireEvent('domready'); + window.fireEvent('domready'); + } + // cleanup scope vars + document = window = testElement = null; +}; + +var check = function(){ + for (var i = checks.length; i--;) if (checks[i]()){ + domready(); + return true; + } + return false; +}; + +var poll = function(){ + clearTimeout(timer); + if (!check()) timer = setTimeout(poll, 10); +}; + +document.addListener('DOMContentLoaded', domready); + +/**/ +// doScroll technique by Diego Perini http://javascript.nwbox.com/IEContentLoaded/ +// testElement.doScroll() throws when the DOM is not ready, only in the top window +var doScrollWorks = function(){ + try { + testElement.doScroll(); + return true; + } catch (e){} + return false; +}; +// If doScroll works already, it can't be used to determine domready +// e.g. in an iframe +if (testElement.doScroll && !doScrollWorks()){ + checks.push(doScrollWorks); + shouldPoll = true; +} +/**/ + +if (document.readyState) checks.push(function(){ + var state = document.readyState; + return (state == 'loaded' || state == 'complete'); +}); + +if ('onreadystatechange' in document) document.addListener('readystatechange', check); +else shouldPoll = true; + +if (shouldPoll) poll(); + +Element.Events.domready = { + onAdd: function(fn){ + if (ready) fn.call(this); + } +}; + +// Make sure that domready fires before load +Element.Events.load = { + base: 'load', + onAdd: function(fn){ + if (loaded && this == window) fn.call(this); + }, + condition: function(){ + if (this == window){ + domready(); + delete Element.Events.load; + } + return true; + } +}; + +// This is based on the custom load event +window.addEvent('load', function(){ + loaded = true; +}); + +})(window, document); diff --git a/EnlighterJS/Quickstart.html b/EnlighterJS/Quickstart.html new file mode 100644 index 0000000..691767d --- /dev/null +++ b/EnlighterJS/Quickstart.html @@ -0,0 +1,266 @@ + + + + + + + + + + + + Quickstart First Steps with EnlighterJS | EnlighterJS + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+

Welcome to EnlighterJS - to start with it, follow these simple steps:

+
    +
  1. Download EnlighterJS and Include the files
  2. +
  3. Prepare your sourcecode
  4. +
  5. Initialize EnlighterJS
  6. +
+
+ +

1. Download & Include EnlighterJS files

+

Download EnlighterJS and extract the files. You will find some examples located in the *Examples/* directory. Copy the prebuild files of the *Build/* directory into a web-accessible directory of your choice.

+
<head>
+...
+<!-- Include EnlighterJS Styles -->
+<link rel="stylesheet" type="text/css" href="css/EnlighterJS.yui.css" />
+	 
+<!-- Include MooTools Framework -->
+<script type="text/javascript" src="js/mootools-core-1.4.5-full-nocompat.js"></script>
+
+<!-- Include EnlighterJS -->
+<script type="text/javascript" src="js/EnlighterJS.yui.js" ></script>
+...
+</head>
+
+ + +

2. Prepare your sourcecode

+

Starting with just a small piece of javascript code you wish to highlight. Prepare your sourcecode by giving the element (containing the code) an optional data-enlighter-language attribute with the language of the snippet.

+
+<pre data-enlighter-language="js">
+$('#loading-example-btn').click(function () {
+	var btn = $(this)
+	btn.button('loading')
+	$.ajax(...).always(function () {
+		btn.button('reset')
+	});
+});
+</pre>
+
+ + +

3. Initialize it!

+

The most simple and elegant way to use EnlighterJS on your page: just add a simple HTML-Meta-Tag to your page with the desired global config

+
<!-- Initialize EnlighterJS -->	
+<meta name="EnlighterJS" content="Advanced javascript based syntax highlighting" data-indent="4" data-selector-block="pre" data-selector-inline="code" data-language="javascript" />
+
+ +
+ +

Ready to use Examples!

+

Your instantaneous launch into the world of EnlighterJS. For further information, please refer to the Documentation.

+ +

Quickstart.html View file

+

The following code provides a minimalistic example how to use EnlighterJS on your page, using the Metainit initialization method. This will be the best choice for most users.
+Metainit just invokes EnlighterJS.Util.Helper() on domready using metatag attributes as options.

+ +
+
+    <!-- Include MooTools Framework -->
+    <script type="text/javascript" src="../Resources/MooTools.min.js"></script>
+
+    <!-- Include EnlighterJS -->
+    <script type="text/javascript" src="../Build/EnlighterJS.min.js"></script>
+
+	<!-- Initialize EnlighterJS; set default language+theme as well as some options -->	
+	<meta name="EnlighterJS" content="Advanced javascript based syntax highlighting" data-language="html" data-theme="enlighter" data-indent="4" data-selector-block="pre" data-selector-inline="code.special" data-rawcodebutton="true" data-windowbutton="true" data-infobutton="true" />
+</head>
+<body>
+	<!-- Begin page content -->
+
+ +

Quickstart-jsinit.html - Javascript Initialization View file

+

In some cases, it can be more effective using a javascript based initialization - e.g. use different configs for inline+block code.

+
+
+    <!-- Include MooTools Framework -->
+    <script type="text/javascript" src="../Resources/MooTools.min.js"></script>
+
+    <!-- Include EnlighterJS -->
+    <script type="text/javascript" src="../Build/EnlighterJS.min.js"></script>
+
+	<!-- Initialize EnlighterJS using the Helper Utility -->
+	<script type="text/javascript">
+		window.addEvent('domready', function(){
+			// Global EnlighterJS initialization for block code (selector: pre) and inline code (selector: code.special) with some options
+			// EnlighterJS.Util.Init(blockSelector:String, inlineSelector:String, options:Object)
+			EnlighterJS.Util.Init('pre', 'code.special', {
+				// reindent code -> replace tab with 2 spaces
+				indent: 2,
+				
+				// show all buttons
+				infoButton: true,
+				windowButton: true,
+				rawButton: true,
+				
+				// special hover class
+				hover: 'myHoverClass',
+				
+				// default language
+				language: 'php',
+				
+				// default theme
+				theme: 'classic',
+				
+				// toolbar labels
+				toolbar: {
+					rawTitle: 'RAW Code',
+					windowTitle: 'New Window',
+					infoTitle: 'EnlighterJS'
+				}
+			});
+		});
+	</script>
+	
+	<!-- Special Styles -->
+	<style type="text/css">
+
+ + +
+ +
+ + + + + + + \ No newline at end of file diff --git a/EnlighterJS/README.md b/EnlighterJS/README.md new file mode 100644 index 0000000..b0d1c39 --- /dev/null +++ b/EnlighterJS/README.md @@ -0,0 +1,560 @@ +EnlighterJS +=========== + +EnlighterJS is a free, easy-to-use, syntax highlighting class developed for [MooTools](http://mootools.net "MooTools.net"). +Using it can be as simple as adding a single script and style to your website, choosing the elements you wish to highlight, and EnlighterJS takes care of the rest. +It also supports Inline-Syntax-Highlighting as well as the automatic creation of tab-panes to display groups of code together (useful for multi-language examples - e.g. html+css+js) +Take a look into the [Documentation](http://enlighterjs.org/Documentation.html) or view the [Theme Demo](http://enlighterjs.org/Themes.html) + +### Download ### +* [Download Latest Release](https://github.com/AndiDittrich/EnlighterJS/releases/latest) +* [Custom-Builds](http://enlighterjs.org/Builder.html) + +![Screenshot](http://enlighterjs.org/screenshot1.png) + +Features +-------- + +* Written in MooTools. Requires version 1.4+ +* Build-in support for most commonly used languages +* Easy to use with familiar MooTools syntax. +* Supports code-groups (displays multiple code-blocks within a tab-pane) +* Includes Inline Syntax highlighting +* Extensible language and theme engines - add your own one. +* Simple CSS based themes +* ANT build-script included for easy custom builds (Web-based Customizer also available) +* Small footprint +* Point out special lines of code +* Initialization can be performed by adding a simple html meta-tag or using a small piece of javascript +* Toolbar buttons to switch to raw-code or open it into a new window + +Plugins +------- +* [Enlighter for WordPress](http://wordpress.org/plugins/enlighter/) - The official EnlighterJS plugin for WordPress + +How to use +---------- +This is a minimalistic example how to highlight sourcecode with EnlighterJS. The working example (correct js+css paths) is available within the EnlighterJS package (Example1.html). + +```HTML + + ... + + + + + + + + + + + + ... + + + ... + +
+    $('#loading-example-btn').click(function () {
+      var btn = $(this)
+      btn.button('loading')
+      $.ajax(...).always(function () {
+        btn.button('reset')
+      });
+    });
+    
+ ... +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, window.addEvent('domready', function(){}); labore et dolore magna aliquyam erat.

+ +``` + +Build-in Languages & Themes +--------------------------- +The following Themes and Languages are included into the EnlighterJS standard package: + +### Languages ### +List of languages with their corresponding identifiers and supported aliases (wrapped into brackets behind the names) + +* **Assembly** (asm) +* **AVR Assembly** (avrasm) +* **CSS** (css) +* **C** (c) +* **C++** (cpp, c++) +* **C#** (csharp) +* **Cython** (cython) +* **HTML** (html) +* **Ini** (ini, conf) +* **Java** (java) +* **Javascript** (js, javascript, jquery, mootools, ext.js) +* **JSON** (json) +* **LUA** (lua) +* **NSIS** (nsis) +* **Markdown** (md, markdown) +* **Matlab/Octave** (octave, matlab) +* **PHP** (php) +* **Python** (py, python) +* **Ruby** (ruby( +* **Shellscript** (shell, bash) +* **SQL** (sql) +* **Squirrel** (squirrel) +* **XML** (xml) +* **Generic** (generic, standard) - default highlighting scheme +* **RAW** (raw) - raw code without highlighting with EnlighterJS container styles! +* **No-Highlight** (no-highlight) - disables highlighting and retains your page styles! + +### Themes ### +Theme identifiers are always expressed as lowercase! + +#### Modern Themes #### +* **Enlighter** (enlighter, standard) - Enlighter`s default Theme +* **Classic** (classic) - SyntaxHighlighter inspired +* **Eclipse** (eclipse) - Eclipse inspired +* **Beyond** (beyond) - BeyondTechnology Theme +* **Godzilla** (godzilla) - A MDN inspired Theme +* **MooTwo** (mootwo) - Inspired by the current MooTools Website +* **Droide** (droide) - Modern, minimalistic +* **Minimal** (minimal) - Bright, High contrast +* **Atomic** (atomic) - Dark, Colorful +* **Rowhammer** (rowhammer) - Light, Transparent, divided rows + +#### Legacy Themes (Lighter.js) #### +* **MooTools** (mootools) - MooTools Docs inspired Theme +* **Git** (git) - GitHub inspired +* **Mocha** (mocha) +* **Panic** (panic) +* **Tutti** (tutti) +* **Twilight** (twilight) + +Basic Usage +----------- + +Download EnlighterJS and extract the files or use [bower](http://bower.io). + +```shell +$bower install enlighterjs +``` + +Copy the prebuild files of the *Build/* directory into a web-accessible directory of your choice. + +Link to the EnlighterJS.min.js javascript file and the EnlighterJS.min.css stylesheet in the head section of your document **after** the MooTools file. +The example below assumes you moved the files into your scripts folder under "js/" and your styles folder under "css/". +The extension .min indicates that these files are already minified. **These files are ready for productive use!** +If you want to start developing, you should consider to use the uncompressed versions for easier debugging! + +Rendering options can be defined as global option (Metainit attributes or options object) or local option using the `data-enlighter-` attributes on each codeblock. +It is recommended to use local options only if necessary (e.g. to define a language for each block). + +### Integrate EnlighterJS ### + +The integration of EnlighterJS requires the following 3 steps: +1. Integrate MooTools.Core, EnlighterJS Script+Styles into your page +2. Prepare your source code elements on your page by adding a language identifier +3. ["Initialize"](#initialization) EnlighterJS to highlight the code + +Link to the EnlighterJS.yui.js javascript file and the EnlighterJS.yui.css stylesheet + +```html + + ... + + + + + + + + + ... + +``` + +Prepare your source code by giving the element (containing the code) an optional *data-enlighter-language* attribute with the language of the code. +**Notice**: Instead of Lighter.js *fuel:flame' syntax combo within the css classname, EnlighterJS will use HTML5 `data-` attributes! + +```html + +
var myClass = new Class({})
+ + +
php_info();
+``` + +Finally, use the following JavaScript code examples inside of a 'domready' or 'onload' callback to create the highlighted elements - this process is called *initialization*. +Be sure to check out the Options section to see the various options you can use. The Example pages have various examples you can use. +Further informations as well as some advanced examples are available within the [Initialization Section](#initialization). + +```js +// Use the Init utility function to highlight all pre elements - this is the recommended way and required to use the Code-Group feature +EnlighterJS.Util.Init('pre', null, { + language: 'php', + theme: 'Classic' +}); +``` + +Instead of initializing EnlighterJS manually, since version 1.1 it is possible to use a simple html-metatag (called *EnlighterJS Metainit*) to run Enlighter on your page (with basic config options). + +```html + + +``` + +### Some Examples ### +Since version 1.8, it's possible to highlight special lines of code. Just add the attribute `data-enlighter-highlight` to your codeblock and provide a set of lines to mark (ranges supported). + +```html + +
+this.tokens = tokens || [];
+options = this.options;
+
+ + +
+EnlighterJS.Util.Init('pre', null, {
+   indent : 2,
+   grouping: false
+});
+
+``` + +Version 2.0 introduces some amazing features like Inline-Syntax-Highlighting. The [Metainit](#metainit_initialization) tool performs this action automatically. + +```js +// Highlight all pre(block) + code(inline) tags and use Javascript as default language +EnlighterJS.Util.Init('pre', 'code', { + language: 'javascript' +}); +``` + +In some cases it might be usefull to start the linnumber counting with another value than 1 (maybe an excerpt). In this case you can add the `data-enlighter-lineoffset` attribute to your codeblock. + +```html + +
+this.tokens = tokens || [];
+options = this.options;
+
+``` + +Initialization +-------------- + +Initialization means, that all elements (you wish to highlight) get selected and rendered by EnlighterJS. The original codeblock is set invisible and the rendered one is injected after. This task can be performed in **two different ways**: + +### 1. Metainit Initialization ## +Instead of initializing EnlighterJS by javascript, it's possible to use a simple html-metatag (called *EnlighterJS Metainit*) to run Enlighter on your page (with basic config options). This will be usefull if you only need a basic setup. Take a look into the examples *Examples/Testcase.Metainit.html* to see how it is working! +Basically Metainit takes the given html attribute options and converts them into a options object. These options will be passed to the `Enlighter.Util.Helper()` utility function - for inline elements (InlineRenderer) identified by `data-selector-inline` as well as block elements (BlockRenderer) by `data-selector-block`. +This will take all the work for you by adding a single line to the head section to use all the amazing EnlighterJS features like Inline-Syntax-Highlighting or CodeGroups! + +#### Example #### +Description: It enables block highlighting for all `pre` elements on the page as well as inline highlighting for all `code` elements. Javascript is set as default language used for highlighting. Each tab is replaced by four spaces to avoid rendering issues. Additionally the "raw code button" is enabled which allows the user to toggle between highlighted and unhighlighted code (e.g. to copy code). + +```html + + +``` + +#### Attributes #### +Following attributes are available (optional) and will be converted to the required options object to trigger `EnlighterJS.Util.Helper`. Take a look into the Metainit.js sources to see how it is working. + +* **name** (string) **REQUIRED** - This attribute identifies the metatag and has to be set to "EnlighterJS" (case sensitive) +* **data-language** (string) - Sets the default language of every codeblock (inline+block) on the page - default: **generic** +* **data-theme** (string) - Sets the default theme of every codeblock (inline+block) on the page - default: **enlighter** +* **data-indent** (number) - Number of spaces to replace tabs with (-1 means no replacement) - default: **-1** +* **data-selector-block** (string) - The CSS selector to match all codeblocks for block-highlighting. Use "NULL" to disable block highlighting - default: **pre** +* **data-selector-inline** (string) - The CSS selector to match all codeblocks for inline-highlighting. Use "NULL" to disable inline highlighting - default: **code** +* **data-rawcodebutton** (boolean) - Enables the optional "RAW Code Button" which will appear in ever codeblock (Block Renderer) to switch between highlighted and un-highlighted code - default: **false** +* **data-windowwbutton** (boolean) - Enables the optional " Button" which +* **data-infobutton** (boolean) - Enables the optional " Button" which +* **data-linenumbers** (boolean) - Display line-numbers in code-blocks (ol/li list used as container) - default: **true** +* **data-hover** (string) - Defines a css-classname which is added to each line. To enable build-in hover effects set it to "hoverEnabled" (default), *null* to disable it or to any custom class - default: **"hoverEnabled"** + +### 2. Javacript based Initialization ### +EnlighterJS provides 4 ways to get manually initialized: + +* Use the native `Element.enlight()` method which will automatically creates an EnlighterJS instance of the selected single element +* Create a new instance of `EnlighterJS` and provide the single element to highlight +* To use Code-Groups you have to use `EnlighterJS.Util.Helper` utility function + +**Notice:** You can pass any of the [Global Options](#global_options) with each method. Every method will invoke the `EnlighterJS` constructor. + +#### Option 1 - Native Element extension #### + +```js +// get element by it's ID and activate highlighting using markdown as language +document.id('myCustomCode').enlight({ + language: 'ruby', + indent: 2 +}); + +// disable highlighting +document.id('myCustomCode').enlight(false); + +// remove highlighting (drop generated HTML from DOM) +document.id('myHighlightedCode').enlight('dispose'); +``` + +#### Option 2 - Use an EnlighterJS instance (OOP Style) #### + +```js +// create a new EnlighterJS instance +var myEnlighter = new EnlighterJS(document.id('myCustomCode'), { + language: 'php', + showLinenumbers: false +}); + +// enable highlighting +myEnlighter.enlight(true); + +// remove highlighting (drop generated HTML from DOM) +myEnlighter.dispose(); +``` + +#### Option 3 - Use an EnlighterJS.Util.Helper utility function #### + +```js +// Highlight all code tags (inline code) and use Javascript as default language +EnlighterJS.Util.Helper(document.getElements('code'), { + language: 'javascript', + renderer: 'Inline' +}); + +// OPTION1 - Element style syntax - get element by it's ID +document.id('myJsCode').enlight(true); + +// OPTION2 - Element style syntax - highlight all pre elements with the class *myPhp* +// an EnlighterJS instance is automatically created +document.getElements('pre.myPhp').enlight({language: php}); +``` + +Options +------- + +Customize EnlighterJS` appearance by using the following configuration options. Try to start with one of the Example pages! + +### Global Options ### + +The following options can be passed to the following methods to customize the rendering behaviour: +* `EnlighterJS(codeblockElement, options = {}, container = null)` constructor +* `EnlighterJS.Util.Helper(elements, options = {})` utility function +* `EnlighterJS.Util.Init(blockSelector, inlineSelector, options= {})` utility function (recommended) + +#### Option Keys #### +* **language** - (string) The default language used if no `data-enlighter-language` attibutes are used - default: **"generic"** +* **theme** - (string) The default theme used if no `data-enlighter-theme` attibutes are used - default: **"enlighter"** +* **indent** - (integer) Number of spaces to replace tabs with (-1 means no replacement) - default: **-1** +* **hover** - (string) Defines a css-classname which is added to each line. To enable build-in hover effects set it to "hoverEnabled" (default), *null* to disable it or to any custom class - default: **"hoverEnabled"** +* **oddClassname** - (string) CSS-classname of all odd lines - default: **"odd"** +* **evenClassname** - (string) CSS-classname of all even lines - default: **"even"** +* **showLinenumbers** - (boolean) Display line-numbers in code-blocks (ol/li list used as container) - default: **true** +* **forceTheme** - (boolean) Forces the renderer to use ignore attribute theme setting `data-enlighter-theme` - default: **false** +* **renderer** - (string) Defines the renderer used to generate the output. Use `Inline` for Inline-Syntax-Highlighting or `Block` for standard highlighting - default: **Block** +* **rawButton** - (boolean) Enables the optional "RAW Code Button" which will appear in ever codeblock (Block Renderer) to switch between highlighted and un-highlighted code - default: **true** +* **infoButton** - (boolean) Enables the optional "Info Button" which provides a link to `enlighterjs.andidittrich.de` - default: **true** +* **windowButton** - (boolean) Enables the optional "Window Button" which opens a new window with the unhighlighted "raw" code within - default: **true** +* **grouping** - (boolean) Enables code-groups (only used by `EnlighterJS.Util.Helper` utility) - default: **true** +* **inlineContainerTag** - (string) The html tag-name of the container (inline-syntax-highlighting only) where the generated code is wrapped into - default: **"span"** +* **ampersandCleanup** - (boolean) Should the ampersand escape sequence `&amp;` automatically replaced by the ampersand sign during code cleanup ? Useful to resolve double escaped html code - default: **true** +* **rawcodeDoubleclick** - (boolean) Toggle RAW/Highlighted code on doubleclick ? - default: **false** +* **cryptex** - (object) Special options for use with the [Cryptex WordPress Plugin](https://wordpress.org/plugins/cryptex) + +#### Example #### + +```js +var options = { + language : 'javascript', + theme : 'Eclipse', + indent : 2, + forceTheme: false, + rawButton: false, + showLinenumbers: false, + renderer: 'Inline' +}; + +// Initialize EnlighterJS - use inline-highlighting only +EnlighterJS.Util.Init(null, 'code', options); +``` + +### Element Options ### + +Some options need to be applied directly to the container elements which holds the code to highlight. These "local" options will override all global options which are set. + +* **data-enlighter-language** (string) - The language of the codeblock - overrides the global default setting | Block+Inline Content option +* **data-enlighter-theme** (string) - The theme of the codeblock - overrides the global default setting | Block+Inline Content option +* **data-enlighter-group** (string) - The identifier of the codegroup where the codeblock belongs to | Block Content option +* **data-enlighter-title** (string) - The title/name of the tab | Block Content option +* **data-enlighter-linenumbers** (boolean) - Show/Hide the linenumbers of a codeblock (Values: "true", "false") | Block Content option +* **data-enlighter-highlight** (string) - A List of lines to point out, comma seperated (ranges are supported) e.g. "2,3,6-10" | Block Content option +* **data-enlighter-lineoffset** (number) - Start value of line-numbering e.g. "5" to start with line 5 - attribute `start` of the ol tag is set | Block Content option + +#### Example 1 #### + +```html +
+...
+
+``` + +#### Example 2 #### + +```html +

+EnlighterJS also supports alert('Inline Sourcecode highlighting'); (since version 2.0). +

+``` + +Code-Groups +----------- + +This example shows how to use code-groups. You can define a new code-group by adding a `data-enlighter-group` attribute to your code tags you want to group. The value is used as an internal identifier and is not shown anywhere (e.g. use numerical identifiers). +The name/title of the tab is defined by a `data-enlighter-title` attribute. To use a corporate style within all code-blocks grouped together, the theme definition of the first code-block defined in your document (the group leader) is used as theme of the complete group - other theme definitions will be ignored. if no theme is specified, the default theme (defined in the options) will be used, which is recommended. + +### Define a Code-Group ### + +```html + +
+this.tokens = tokens || [];
+options = this.options;
+
+ + +
+import javax.swing.JOptionPane;
+
+public class OddEven {
+/**
+ * "input" is the number that the user gives to the computer
+ */
+private int input; // a whole number("int" means integer)
+
+ + +
+/** Test Snippet */
+$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
+   
+/* check connection */
+if (mysqli_connect_errno()) {
+    printf("Connect failed: %s\n", mysqli_connect_error());
+    exit();
+}
+
+``` + +### Initialize Code-Groups ### +The initialization of code-groups differs from the standard. You have to use the `EnlighterJS.Util.Helper` utility function (triggered by Metainit and EnlighterJS.Util.Init) - it does the complete initialization and grouping for you! +* JS-Initialization Chain: EnlighterJS.Util.Init -> **EnlighterJS.Util.Helper** -> EnlighterJS +* Metainit-Initialization Chain: EnlighterJS.Util.Metainit -> **EnlighterJS.Util.Helper** -> EnlighterJS + +Finally, use the following JavaScript code inside of a `domready` or `onload` event to create the highlighted elements. +Check out the options section to see the various options you can use. + +**Notice:** `grouping` has to set to `true` when using the javascript based initialization + +```js +// highlight all pre tags; no inline-highlighting +EnlighterJS.Util.Init('pre', null, { + indent: 4, + language: 'js', + theme: 'enlighter', + grouping: true, + rawButton: true +}); +``` + +Custom Builds +------------- +The EnlighterJS project is using [Apache ANT](http://ant.apache.org/) as build-system. +[UglifyJS2](https://github.com/mishoo/UglifyJS2) and [clean-css](https://github.com/jakubpawlowicz/clean-css) are used to minify the production-ready javascript and css files. +To save bandwidth/traffic or include self-defined languages, you can easily customize your EnlighterJS build by editing the *build.xml* file (found in the root directory) and run Apache ANT (target *build*) + +### Cloud/Web based builder ### + +You can also use the web-based [EnlighterJS Builder](http://enlighterjs.org/Builder.html) to generate your customized package **without the need of ANT/development environment** - everything is done for you server-site! + +### Software Requirements ### + +* [Apache ANT 1.9](http://ant.apache.org/) +* [Ant-Contrib](http://sourceforge.net/projects/ant-contrib/files/ant-contrib/) +* [Node.js](https://nodejs.org/) +* [UglifyJS2](https://github.com/mishoo/UglifyJS2) +* [clean-css](https://github.com/jakubpawlowicz/clean-css) + +### Include/Exclude Languages and Themes ### + +If you want to remove some of the default theme you can edit the *include.themes* property and modify the list of css source files. +For Example: only include the modern themes + +```xml + + +``` + +Or Include only your custom themes (Note: they have to be located into `Source/Themes/`) + +```xml + + +```xml + +Removing/Adding languages is also easy as this - they are defined by the *include.languages* property. +For Example: only include html+css+js syntax highlighting (be careful - html is an alias for XML!, you have to include `Xml`) + +```xml + + +``` + +Contribution +------------ + +EnlighterJS is OpenSource and managed on [GitHub](https://github.com/AndiDittrich/EnlighterJS) - if you like, you're welcome to contribute! +To simplify the release and quality control process, please follow these remarks: + +### Notices ### +* Your commits/pull-request should only contain changes of the `Source/`, `Resources/TestcaseData` directories or the Examples located into the root directory - otherwise i have to merge the request manually +* **Do not change** the files located into the `Examples/` or `Build/` directory - they are automatically generated during the build-process using data from `Resources/TestcaseData` +* Related software packages like MooTools, Bootstrap, ANT-contrib are updated by the maintainer +* If you form a concept of larger project changes, please [discuss](https://github.com/AndiDittrich/EnlighterJS/issues) them with the contributors **before** implementing + +### Documentation ### +* To change contents of the `README.md` file please edit the split files in `Docs/` - the readme file is automatically generated by merging these files during the build process + +### Adding a new Language ### +* First of all: take a look on other languages which are already available to learn about functions and coding styles +* To start with a new language please use the `LanguageDevelopment.phtml` workspace. It will automatically load `Source/Language/Template.mylang.js` (the startup file for your language development). +* Rename your language file `Template.mylang.js` to the **camel-cased** real language name - e.g. `Vhdl.js` +* Add detailed comments to each language rule! +* Keep the code as small as possible: e.g. use regex instead of long keyword lists +* In case your language is a superset of another one, please **extend** the origin language - do not copy the origin file +* Add an language testcase/demo to the `Resouces/TestcaseData` directory +* Finally create a [Pull Request on GitHub](https://help.github.com/articles/creating-a-pull-request/) - your changes will be reviewed and commonly added to the project + +Compatibility +------------- + +All browsers supported by MooTools and with HTML5 capabilities for "data-" attributes are compatible with EnlighterJS. +It's possible that it may work with earlier/other browsers. + +* Chrome 10+ +* Safari 5+ +* Internet Explorer 6+ +* Firefox 2+ +* Opera 9+ + +EnlighterJS requires MooTools.Core/1.4 (no compat) - tested with: +* Core/1.4.5 +* Core/1.5.0 +* Core/1.5.1 + +Screenshots +----------- + +![Screenshot 1](http://enlighterjs.org/screenshot1.png) +![Screenshot 2](http://enlighterjs.org/screenshot2.png) +License +------- + +EnlighterJS is OpenSource and licensed under the Terms of [The MIT License (X11)](http://opensource.org/licenses/MIT). You're welcome to [contribute](https://github.com/AndiDittrich/EnlighterJS/blob/master/CONTRIBUTE.md)! diff --git a/EnlighterJS/Resources/EJS_brand.png b/EnlighterJS/Resources/EJS_brand.png new file mode 100644 index 0000000..0e42cdb Binary files /dev/null and b/EnlighterJS/Resources/EJS_brand.png differ diff --git a/EnlighterJS/Resources/EnlighterWeb.js b/EnlighterJS/Resources/EnlighterWeb.js new file mode 100644 index 0000000..364f732 --- /dev/null +++ b/EnlighterJS/Resources/EnlighterWeb.js @@ -0,0 +1,246 @@ + +function ContentNavigation(contentContainerSelector, navContainerSelector){ + // content navi + var nav = document.getElement(navContainerSelector); + + if (!nav || nav.get('data-autogen') !== 'true'){ + return; + } + + // get the content container + var contentContainer = document.getElement(contentContainerSelector); + + // container offset (absolute position) + var containerOffset = contentContainer.getPosition().y; + + // the current subsection + var currentSection = null; + + // unique heading id + var headingID = 1; + + // scroll spy observer + var h2Observer = { + elements : [], + currentAnchor : null, + currentItem : null + }; + + var h3Observer = { + elements : [], + currentAnchor : null, + currentItem : null + }; + + // get all h2, h3 elements + contentContainer.getElements('h2, h3').each(function(el){ + // create anchor name + var anchorName = el.get('text').replace(/\s+?/gi, '_').replace(/[^a-z0-9_ -]/gi, '') + '_' + headingID; + + // add invisible anchor + var anchor = new Element('span', { + 'class': 'anchor', + 'id': anchorName + }); + el.grab(anchor, 'before'); + + // generate navigation + if (el.tagName == 'H3' && currentSection){ + var h3 = new Element('li'); + h3.grab(new Element('a', { + text: el.get('text'), + href: '#' + anchorName + })); + currentSection.grab(h3); + + + + }else if (el.tagName == 'H2'){ + var h2 = new Element('li'); + h2.grab(new Element('a', { + text: el.get('text'), + href: '#' + anchorName + })); + + // open new section + currentSection = new Element('ul'); + h2.grab(currentSection); + nav.grab(h2); + } + + // scroll spy observer + (el.tagName == 'H3' ? h3Observer : h2Observer).elements.push({ + id: anchorName, + position: el.getPosition() + }); + + // increment id + headingID++; + }); + + // sort observers by position + h2Observer.elements.sort(function(a, b){ + return (a.position.y - b.position.y); + }); + h3Observer.elements.sort(function(a, b){ + return (a.position.y - b.position.y); + }); + + // add dummy elements (max position) + h2Observer.elements.push({position: {y: 9999999, x: 999999}}); + h3Observer.elements.push({position: {y: 9999999, x: 999999}}); + + window.addEvent('scroll', function(){ + // current scroll with calculated offset + var currentWindowScroll = window.getScroll().y + containerOffset; + + // update h2 & h3 elements + Array.each([h2Observer, h3Observer], function(observer){ + // find currently visible element + for (var i = 0; i < observer.elements.length; i++){ + + // element visible ? + if (observer.elements[i].position.y > currentWindowScroll){ + // the n-1th element is the currently active one + if (i>0){ + i = i-1; + } + + // element changed ? + if (observer.currentAnchor != observer.elements[i].id){ + // store current anchorID + observer.currentAnchor = observer.elements[i].id; + + // old highlighted menu item available ? + if (observer.currentItem){ + observer.currentItem.removeClass('spyActive'); + } + + // get new menu item to highlight by it's anchor link (get it's parent li container !) + observer.currentItem = nav.getElement('a[href="#' + observer.currentAnchor + '"]').getParent(); + + // highlight element + if (observer.currentItem){ + observer.currentItem.addClass('spyActive'); + } + } + break; + } + } + }); + }).fireEvent('scroll'); +}; + + +function ScrollSpyNavigation(navContainerSelector, contentContainerSelector){ + +}; + +function StickyNavigation(navContainerSelector){ + // navi container element + var naviContainer = document.getElement(navContainerSelector); + + // container available ? + if (!naviContainer || naviContainer.get('data-nav-static')){ + return; + } + + // initial scroll offset + // get absolute container position + var scrollLimit = naviContainer.getPosition().y; + + // get fixed position and use this value as offset + naviContainer.addClass('fixedPosition'); + scrollLimit = scrollLimit - naviContainer.getStyle('top').toInt(); + naviContainer.removeClass('fixedPosition'); + + // fixed sidebar + window.addEvent('scroll', function(){ + if (this.getScroll().y > scrollLimit){ + naviContainer.addClass('fixedPosition'); + }else{ + naviContainer.removeClass('fixedPosition'); + } + }); +}; + +window.addEvent('domready', function(){ + /* + var repo = window._github_profile.repos.EnlighterJS; + var user = window._github_profile.user; + + // create github buttons + document.id('ghb').grab(new GitHubButton({ + owner : 'AndiDittrich', + repo : 'EnlighterJS', + large : false, + type : 'star', + cache: false, + count: repo.stargazers + })).grab(new GitHubButton({ + owner : 'AndiDittrich', + repo : 'EnlighterJS', + large : false, + type : 'fork', + cache: false, + count: repo.forks + })).grab(new GitHubButton({ + owner : 'AndiDittrich', + repo : 'EnlighterJS', + large : false, + type : 'follow', + cache: false, + count: user.followers + }));*/ + + // social buttons + var out = document.id('ghb'); + + SocialButton(out, { + type: 'github-star', + username: 'AndiDittrich', + repo: 'EnlighterJS', + large: false, + text: 'Star' + }); + + SocialButton(out, { + type: 'github-fork', + username: 'AndiDittrich', + repo: 'EnlighterJS', + large: false, + text: 'Fork' + }); + + SocialButton(out, { + type: 'github-followers', + username: 'AndiDittrich', + large: false + }); + + SocialButton(out, { + type: 'github-opensource', + username: 'AndiDittrich', + large: false + }); + + SocialButton(out, { + type: 'twitter-followers', + username: 'andidittrich', + large: false + }); + + SocialButton(out, { + type: 'wordpress-plugin', + username: 'Andi Dittrich', + plugin: 'Enlighter', + large: false + }); + + + // initialize content navigation + ContentNavigation('article', '#content-nav'); + + // initialize sticky nav + StickyNavigation('#content-nav'); +}); \ No newline at end of file diff --git a/EnlighterJS/Resources/EnlighterWeb.less b/EnlighterJS/Resources/EnlighterWeb.less new file mode 100644 index 0000000..0d06b38 --- /dev/null +++ b/EnlighterJS/Resources/EnlighterWeb.less @@ -0,0 +1,329 @@ +// Bootstrap Framework +@import "bootstrap/bootstrap.less"; + +// Unofficial GitHubButtons +@import (inline) "social-buttons/social-buttons.css"; + +/*! EnlighterJS Syntax Highlighter | MIT License (X11) | http://enlighterjs.andidittrich.de/ */ +body{ + // credits bg + background-color: #202021; + + // Static Nav + padding: 50px 0px 0px 0px; +} + +footer { + background-color: #ffffff; + border-top: solid 1px #e0e0e0; + padding: 40px 0px 40px 0px; + + .footer-links { + a { + padding: 0px 10px 0px 10px; + } + span { + padding-right: 10px; + } + } + p.text-muted{ + padding-bottom: 15px; + } +} + +#ghb { + padding-bottom: 20px; + > div { + display: inline-block; + padding: 0px 20px 0px 0px; + } +} + + +/* Beyond Technology Corporate +------------------------------------------------ */ +#beyond_corporate_credits{ + background-color: #202021; + color: #929292; + padding: 10px 0px 10px 0px; + margin: 0px 0px 5px 0px; + + a{ + color: inherit; + } + .slogan{ + color: #e0e0e0; + } +} + +/* NAVS +------------------------------------------------ */ +nav{ + &.topnav{ + background-color: @brand-primary; + padding: 0px 0px 0px 0px; + height: 50px; + overflow: hidden; + border: none; + position: fixed; + left: 0px; + top: 0px; + width: 100%; + z-index: 100; + border-bottom: solid 1px lighten(@brand-primary, 5%); + + .glyphicon{ + color: #f0f0f0; + font-size: 16px; + padding-right: 10px; + } + + li{ + display: inline-block; + padding: 0px; + } + + a { + height: 50px; + line-height: 50px; + display: inline-block; + color: lighten(@brand-primary, 65%); + padding: 0px 15px 0px 15px; + + &:hover, &:active{ + text-decoration: none; + border-bottom: none; + color: #ffffff; + background-color: #192c48; + + .glyphicon{ + color: #ffffff; + } + } + } + + .container{ + + } + + .nav-tabs{ + border: none; + } + } + +} + +/* Header +------------------------------------------------ */ +header { + background-color: @brand-primary; + background-image: svg-gradient(to bottom, @brand-primary, lighten(@brand-primary, 10%)); + padding: 20px 0px 20px 0px; + color: #ffffff; + + h1{ + color: inherit; + font-size: 60px; + font-weight: normal; + } + .lead{ + color: lighten(@brand-primary, 65%); + } +} + +/* Notifications +------------------------------------------------ */ +#ReleaseNotifier{ + height: 40px; + background-color: #f9f9f9; + border-bottom: solid 1px #e0e0e0; + color: #707070; + + p{ + line-height: 40px; + } +} + + +/* Content Sections +------------------------------------------------ */ +section{ + padding: 15px 0px 15px 0px; + background-color: #f7f7fa; + // primary section + &:nth-of-type(2) { + background-color: #e0e0e0; + } +} + +/* CONTENT +------------------------------------------------ */ + +article{ + background-color: #ffffff; + padding: 10px 20px 50px 20px; + border-top: solid 0px #e0e0e0; + border-bottom: solid 1px #e0e0e0; + + span.anchor{ + display: block; + visibility: hidden; + position: relative; + top: -50px; + } + + .icon{ + display: block; + text-align: center; + font-size: 15px; + color: #a0a0a0; + padding: 20px 0px 0px 0px; + font-style: italic; + + .glyphicon{ + font-size: 50px; + color: #e0e0e0; + } + } + + .bordered{ + border: dashed 5px #f0f0f0; + padding: 10px 20px 30px 20px; + } + pre{ + background-color: #f5f5f5; + border-radius: 0px; + border: solid 1px #f0f0f0; + + &.raw{ + width: 50%; + margin: auto; + } + } + + h2{ + border-bottom: solid 5px #f0f0f0; + color: #535353; + font-size: 40px; + height: 60px; + margin: 50px 0px 20px 0px; + padding: 10px 0px 10px 0px; + + &:nth-of-type(1){ + margin-top: 0px; + } + } + h3 { + } + h4{ + padding-top: 25px; + } + p{ + } + + blockquote{ + font-size: 14px; + color: #707070; + } + + // fallback content nav + .sec-nav .btn{ + margin: 5px; + } +} + + +/* CONTENT NAVIGATION +-------------------------------------------------- */ +#content-nav{ + &.fixedPosition{ + position: fixed; + top: 70px; + } + + display: block; + position: relative; + width: auto; + height: auto; + top: 10px; + left: auto; + + list-style: none; + margin: 0px; + padding: 0px; + line-height: 18px; + + // scrollspy active + .spyActive{ + + > a{ + font-weight: bold; + } + + ul{ + display: block; + } + } + li{ + padding: 0px; + } + + a{ + color: lighten(@brand-primary, 15%); + text-decoration: none; + padding: 4px 5px 4px 5px; + display: block; + + + &:hover{ + background-color: #ffffff; + } + } + + + ul{ + list-style: none; + margin: 10px 0px 10px 15px; + padding: 0px; + line-height: 18px; + font-size: 12px; + display: none; + } +} + +/* To Top Button +-------------------------------------------------- */ +#ToTop{ + display: none; + position: fixed; + right: 50px; + top: 52%; + font-size: 35px; + width: 50px; + height: 50px; + + .visible-lg; + + a{ + color: #e0e0e0; + } + a:hover{ + text-decoration: none; + } +} + + +/* CLOUD BUILDER +-------------------------------------------------- */ +#builder-form .checkbox { + display: block; + padding: 3px 0px 3px 30px; +} + +#builder-form .checkbox label { + color: #707070; +} + +#builder-form a { + cursor: pointer; +} diff --git a/EnlighterJS/Resources/EnlighterWeb.min.css b/EnlighterJS/Resources/EnlighterWeb.min.css new file mode 100644 index 0000000..60dfcba --- /dev/null +++ b/EnlighterJS/Resources/EnlighterWeb.min.css @@ -0,0 +1,29 @@ +/*! + * Bootstrap v3.3.4 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{background:0 0!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href)")"}abbr[title]:after{content:" (" attr(title)")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(fonts/glyphicons-halflings-regular.eot);src:url(fonts/glyphicons-halflings-regular.eot?#iefix)format('embedded-opentype'),url(fonts/glyphicons-halflings-regular.woff2)format('woff2'),url(fonts/glyphicons-halflings-regular.woff)format('woff'),url(fonts/glyphicons-halflings-regular.ttf)format('truetype'),url(fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular)format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#5779a7;text-decoration:none}a:focus,a:hover{color:#3d5475;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{background-color:#fcf8e3;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#1a2432}a.text-primary:hover{color:#090c10}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#1a2432}a.bg-primary:hover{background-color:#090c10}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:"Source Code Pro",Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1400px){.container{width:1370px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1400px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-left:-20px;margin-top:4px \9}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0;min-height:34px}.form-control-static.input-lg,.form-control-static.input-sm{padding-left:0;padding-right:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.form-group-sm .form-control{height:30px;line-height:30px}select[multiple].form-group-sm .form-control,textarea.form-group-sm .form-control{height:auto}.form-group-sm .form-control-static{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;min-height:32px}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.form-group-lg .form-control{height:46px;line-height:46px}select[multiple].form-group-lg .form-control,textarea.form-group-lg .form-control{height:auto}.form-group-lg .form-control-static{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;min-height:38px}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}@media (min-width:768px){.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.33px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.active,.btn-default.focus,.btn-default:active,.btn-default:focus,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#1a2432;border-color:#111821}.btn-primary.active,.btn-primary.focus,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#090c10;border-color:#000}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#1a2432;border-color:#111821}.btn-primary .badge{color:#1a2432;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.active,.btn-success.focus,.btn-success:active,.btn-success:focus,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.active,.btn-info.focus,.btn-info:active,.btn-info:focus,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.active,.btn-warning.focus,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.active,.btn-danger.focus,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#5779a7;font-weight:400;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#3d5475;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#5779a7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#1a2432}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-left:0;padding-right:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px)and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px 15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin-top:8px;margin-bottom:8px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{background-color:#e7e7e7;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{background-color:#080808;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#1a2432}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#090c10}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#5779a7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-left:15px;padding-right:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#1a2432}.panel-primary>.panel-heading{color:#fff;background-color:#1a2432;border-color:#1a2432}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#1a2432}.panel-primary>.panel-heading .badge{color:#1a2432;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#1a2432}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.panel-body:after,.panel-body:before,.row:after,.row:before{content:" ";display:table}.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px)and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px)and (max-width:1399px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px)and (max-width:1399px){.visible-md-block{display:block!important}}@media (min-width:992px)and (max-width:1399px){.visible-md-inline{display:inline!important}}@media (min-width:992px)and (max-width:1399px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1400px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1400px){.visible-lg-block{display:block!important}}@media (min-width:1400px){.visible-lg-inline{display:inline!important}}@media (min-width:1400px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px)and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px)and (max-width:1399px){.hidden-md{display:none!important}}@media (min-width:1400px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}/*! +--- +name: GitHub-Buttons for MooTools, jQuery and PHP +description: Unofficial GitHub Buttons based on https://github.com/mdo/github-buttons + +license: Apache 2.0 License +version: 2.5.0 +build: 5dbc39345334d0b03ad0b90960943efb/May 6 2015 + +authors: + - Andi Dittrich (author of MooTools/jQuery/PHP based versions) + - Mark Otto (author of original github-buttons styles) + +download: https://github.com/AndiDittrich/MooTools.GitHub-Buttons +website: http://github-buttons.andidittrich.de +demo: http://github-buttons.andidittrich.de + +requires: + - Core/1.4.5 + - More/Number.Format + - More/Request.JSONP + +provides: [GitHubButton] +... +*/.github-btn{display:block;position:relative;height:20px;font:700 11px/14px "Helvetica Neue",Helvetica,Arial,sans-serif;overflow:hidden}.gh-btn,.gh-count,.gh-ico{float:left}.gh-btn,.gh-count{padding:2px 5px 2px 4px;color:#333;text-decoration:none;text-shadow:0 1px 0 #fff;white-space:nowrap;cursor:pointer;border-radius:3px}.gh-btn{background-color:#e6e6e6;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fafafa),to(#eaeaea));background-image:-webkit-linear-gradient(#fafafa,#eaeaea);background-image:-moz-linear-gradient(top,#fafafa,#eaeaea);background-image:-ms-linear-gradient(#fafafa,#eaeaea);background-image:-o-linear-gradient(#fafafa,#eaeaea);background-image:linear-gradient(#fafafa,#eaeaea);background-repeat:no-repeat;border:1px solid #d4d4d4;border-bottom-color:#bcbcbc}.gh-btn:active,.gh-btn:focus,.gh-btn:hover{color:#fff;text-decoration:none;text-shadow:0 -1px 0 rgba(0,0,0,.25);border-color:#518cc6 #518cc6 #2a65a0;background-color:#3072b3}.gh-btn:focus,.gh-btn:hover{background-image:-webkit-gradient(linear,0 0,0 100%,from(#599bdc),to(#3072b3));background-image:-webkit-linear-gradient(#599bdc,#3072b3);background-image:-moz-linear-gradient(top,#599bdc,#3072b3);background-image:-ms-linear-gradient(#599bdc,#3072b3);background-image:-o-linear-gradient(#599bdc,#3072b3);background-image:linear-gradient(#599bdc,#3072b3)}.gh-btn:active{background-image:none;-webkit-box-shadow:inset 0 2px 5px rgba(0,0,0,.1);-moz-box-shadow:inset 0 2px 5px rgba(0,0,0,.1);box-shadow:inset 0 2px 5px rgba(0,0,0,.1)}.gh-ico{width:14px;height:14px;margin-right:4px;vertical-align:3px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iMTMycHgiIGhlaWdodD0iNjZweCIgdmlld0JveD0iMCAwIDEzMiA2NiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTMyIDY2IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBmaWxsPSIjMzMzMzMzIiBkPSJNMzMsMS44Yy0xNy43LDAtMzIsMTQuMy0zMiwzMmMwLDE0LjEsOS4yLDI2LjEsMjEuOSwzMC40DQoJYzEuNiwwLjMsMi4yLTAuNywyLjItMS41YzAtMC44LDAtMi44LDAtNS40Yy04LjksMS45LTEwLjgtNC4zLTEwLjgtNC4zYy0xLjUtMy43LTMuNi00LjctMy42LTQuN2MtMi45LTIsMC4yLTEuOSwwLjItMS45DQoJYzMuMiwwLjIsNC45LDMuMyw0LjksMy4zYzIuOSw0LjksNy41LDMuNSw5LjMsMi43YzAuMy0yLjEsMS4xLTMuNSwyLTQuM2MtNy4xLTAuOC0xNC42LTMuNi0xNC42LTE1LjhjMC0zLjUsMS4yLTYuMywzLjMtOC42DQoJYy0wLjMtMC44LTEuNC00LjEsMC4zLTguNWMwLDAsMi43LTAuOSw4LjgsMy4zYzIuNi0wLjcsNS4zLTEuMSw4LTEuMWMyLjcsMCw1LjUsMC40LDgsMS4xYzYuMS00LjEsOC44LTMuMyw4LjgtMy4zDQoJYzEuNyw0LjQsMC42LDcuNywwLjMsOC41YzIuMSwyLjIsMy4zLDUuMSwzLjMsOC42YzAsMTIuMy03LjUsMTUtMTQuNiwxNS44YzEuMSwxLDIuMiwyLjksMi4yLDUuOWMwLDQuMywwLDcuNywwLDguOA0KCWMwLDAuOSwwLjYsMS45LDIuMiwxLjVDNTUuOCw1OS45LDY1LDQ3LjksNjUsMzMuOEM2NSwxNi4xLDUwLjcsMS44LDMzLDEuOHoiLz4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBmaWxsPSIjRkZGRkZGIiBkPSJNOTksMS44Yy0xNy43LDAtMzIsMTQuMy0zMiwzMmMwLDE0LjEsOS4yLDI2LjEsMjEuOSwzMC40DQoJYzEuNiwwLjMsMi4yLTAuNywyLjItMS41YzAtMC44LDAtMi44LDAtNS40Yy04LjksMS45LTEwLjgtNC4zLTEwLjgtNC4zYy0xLjUtMy43LTMuNi00LjctMy42LTQuN2MtMi45LTIsMC4yLTEuOSwwLjItMS45DQoJYzMuMiwwLjIsNC45LDMuMyw0LjksMy4zYzIuOSw0LjksNy41LDMuNSw5LjMsMi43YzAuMy0yLjEsMS4xLTMuNSwyLTQuM2MtNy4xLTAuOC0xNC42LTMuNi0xNC42LTE1LjhjMC0zLjUsMS4yLTYuMywzLjMtOC42DQoJYy0wLjMtMC44LTEuNC00LjEsMC4zLTguNWMwLDAsMi43LTAuOSw4LjgsMy4zYzIuNi0wLjcsNS4zLTEuMSw4LTEuMWMyLjcsMCw1LjUsMC40LDgsMS4xYzYuMS00LjEsOC44LTMuMyw4LjgtMy4zDQoJYzEuNyw0LjQsMC42LDcuNywwLjMsOC41YzIuMSwyLjIsMy4zLDUuMSwzLjMsOC42YzAsMTIuMy03LjUsMTUtMTQuNiwxNS44YzEuMSwxLDIuMiwyLjksMi4yLDUuOWMwLDQuMywwLDcuNywwLDguOA0KCWMwLDAuOSwwLjYsMS45LDIuMiwxLjVjMTIuNy00LjIsMjEuOS0xNi4yLDIxLjktMzAuNEMxMzEsMTYuMSwxMTYuNywxLjgsOTksMS44eiIvPg0KPC9zdmc+DQo=);background-size:28px 14px;background-repeat:no-repeat;background-position:0 0}.gh-btn:active .gh-ico,.gh-btn:focus .gh-ico,.gh-btn:hover .gh-ico{background-position:-14px 0}.gh-count{position:relative;display:block;margin-left:4px;background-color:#fafafa;border:1px solid #d4d4d4}.gh-count:focus,.gh-count:hover{color:#4183C4}.gh-count:after,.gh-count:before{content:'';position:absolute;display:inline-block;width:0;height:0;border-color:transparent;border-style:solid}.gh-count:before{top:50%;left:-3px;margin-top:-4px;border-width:4px 4px 4px 0;border-right-color:#fafafa}.gh-count:after{top:50%;left:-4px;z-index:-1;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#d4d4d4}.github-btn-large{height:30px}.github-btn-large .gh-btn,.github-btn-large .gh-count{padding:3px 10px 3px 8px;font-size:16px;line-height:22px;border-radius:4px}.github-btn-large .gh-ico{width:20px;height:20px;background-size:40px 20px}.github-btn-large .gh-btn:active .gh-ico,.github-btn-large .gh-btn:focus .gh-ico,.github-btn-large .gh-btn:hover .gh-ico{background-position:-20px 0}.github-btn-large .gh-count{margin-left:6px}.github-btn-large .gh-count:before{left:-5px;margin-top:-6px;border-width:6px 6px 6px 0}.github-btn-large .gh-count:after{left:-6px;margin-top:-7px;border-width:7px 7px 7px 0}/*! EnlighterJS Syntax Highlighter | MIT License (X11) | http://enlighterjs.andidittrich.de/ */body{background-color:#202021;padding:50px 0 0 0}footer{background-color:#fff;border-top:solid 1px #e0e0e0;padding:40px 0 40px 0}footer .footer-links a{padding:0 10px 0 10px}footer .footer-links span{padding-right:10px}footer p.text-muted{padding-bottom:15px}#ghb{padding-bottom:20px}#ghb>div{display:inline-block;padding:0 20px 0 0}#beyond_corporate_credits{background-color:#202021;color:#929292;padding:10px 0 10px 0;margin:0 0 5px 0}#beyond_corporate_credits a{color:inherit}#beyond_corporate_credits .slogan{color:#e0e0e0}nav.topnav{background-color:#1a2432;padding:0;height:50px;overflow:hidden;border:none;position:fixed;left:0;top:0;width:100%;z-index:100;border-bottom:solid 1px #233043}nav.topnav .glyphicon{color:#f0f0f0;font-size:16px;padding-right:10px}nav.topnav li{display:inline-block;padding:0}nav.topnav a{height:50px;line-height:50px;display:inline-block;color:#bcc9dc;padding:0 15px 0 15px}nav.topnav a:active,nav.topnav a:hover{text-decoration:none;border-bottom:none;color:#fff;background-color:#192c48}nav.topnav a:active .glyphicon,nav.topnav a:hover .glyphicon{color:#fff}nav.topnav .nav-tabs{border:none}header{background-color:#1a2432;background-image:url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%201%201%22%20preserveAspectRatio%3D%22none%22%3E%3ClinearGradient%20id%3D%22gradient%22%20gradientUnits%3D%22userSpaceOnUse%22%20x1%3D%220%25%22%20y1%3D%220%25%22%20x2%3D%220%25%22%20y2%3D%22100%25%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%231a2432%22%2F%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%232b3c54%22%2F%3E%3C%2FlinearGradient%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%221%22%20height%3D%221%22%20fill%3D%22url(%23gradient)%22%20%2F%3E%3C%2Fsvg%3E');padding:20px 0 20px 0;color:#fff}header h1{color:inherit;font-size:60px;font-weight:400}header .lead{color:#bcc9dc}#ReleaseNotifier{height:40px;background-color:#f9f9f9;border-bottom:solid 1px #e0e0e0;color:#707070}#ReleaseNotifier p{line-height:40px}section{padding:15px 0 15px 0;background-color:#f7f7fa}section:nth-of-type(2){background-color:#e0e0e0}article{background-color:#fff;padding:10px 20px 50px 20px;border-top:solid 0 #e0e0e0;border-bottom:solid 1px #e0e0e0}article span.anchor{display:block;visibility:hidden;position:relative;top:-50px}article .icon{display:block;text-align:center;font-size:15px;color:#a0a0a0;padding:20px 0 0 0;font-style:italic}article .icon .glyphicon{font-size:50px;color:#e0e0e0}article .bordered{border:dashed 5px #f0f0f0;padding:10px 20px 30px 20px}article pre{background-color:#f5f5f5;border-radius:0;border:solid 1px #f0f0f0}article pre.raw{width:50%;margin:auto}article h2{border-bottom:solid 5px #f0f0f0;color:#535353;font-size:40px;height:60px;margin:50px 0 20px 0;padding:10px 0 10px 0}article h2:nth-of-type(1){margin-top:0}article h4{padding-top:25px}article blockquote{font-size:14px;color:#707070}article .sec-nav .btn{margin:5px}#content-nav{display:block;position:relative;width:auto;height:auto;top:10px;left:auto;list-style:none;margin:0;padding:0;line-height:18px}#content-nav.fixedPosition{position:fixed;top:70px}#content-nav .spyActive>a{font-weight:700}#content-nav .spyActive ul{display:block}#content-nav li{padding:0}#content-nav a{color:#344864;text-decoration:none;padding:4px 5px 4px 5px;display:block}#content-nav a:hover{background-color:#fff}#content-nav ul{list-style:none;margin:10px 0 10px 15px;padding:0;line-height:18px;font-size:12px;display:none}#ToTop{display:none;position:fixed;right:50px;top:52%;font-size:35px;width:50px;height:50px;display:none!important}@media (min-width:1400px){#ToTop{display:block!important}table#ToTop{display:table}tr#ToTop{display:table-row!important}td#ToTop,th#ToTop{display:table-cell!important}}#ToTop a{color:#e0e0e0}#ToTop a:hover{text-decoration:none}#builder-form .checkbox{display:block;padding:3px 0 3px 30px}#builder-form .checkbox label{color:#707070}#builder-form a{cursor:pointer} \ No newline at end of file diff --git a/EnlighterJS/Resources/ExampleData/Example1.phtml b/EnlighterJS/Resources/ExampleData/Example1.phtml new file mode 100644 index 0000000..118204c --- /dev/null +++ b/EnlighterJS/Resources/ExampleData/Example1.phtml @@ -0,0 +1,40 @@ + + +

Some Examples

+

jQuery Code (Javascript) - highlighted by EnlighterJS

+
+$('#loading-example-btn').click(function () {
+	var btn = $(this)
+	btn.button('loading')
+	$.ajax(...).always(function () {
+		btn.button('reset')
+	});
+});
+
+ +

Code-Tabs

+
+$('#loading-example-btn').click(function () {
+	var btn = $(this)
+	btn.button('loading')
+	$.ajax(...).always(function () {
+		btn.button('reset')
+	});
+});
+
+
+// initialize enlighterjs for block elements
+EnlighterJS.Util.Helper(document.getElements('pre'), {
+	// replace tabs with 2 spaces
+	indent: 2,
+	
+	// special hover class
+	hover: 'myHoverClass',
+	
+	// block element renderer
+	renderer: 'Block'
+});
+
+ +

Inline Code

+

EnlighterJS also supports alert('Inline Sourcecode highlighting'); (since version 2.0).

diff --git a/EnlighterJS/Resources/ExampleData/Example2-jsinit.phtml b/EnlighterJS/Resources/ExampleData/Example2-jsinit.phtml new file mode 100644 index 0000000..cd189ea --- /dev/null +++ b/EnlighterJS/Resources/ExampleData/Example2-jsinit.phtml @@ -0,0 +1,49 @@ + + + + + +

Some Examples

+

jQuery Code (Javascript) - highlighted by EnlighterJS

+
+$('#loading-example-btn').click(function () {
+	var btn = $(this)
+	btn.button('loading')
+	$.ajax(...).always(function () {
+		btn.button('reset')
+	});
+});
+
+

Inline Code

+

EnlighterJS also supports $content = print_r(array(1,2,3), true); (since version 2.0).

+ diff --git a/EnlighterJS/Resources/ExampleData/Example3-advanced.phtml b/EnlighterJS/Resources/ExampleData/Example3-advanced.phtml new file mode 100644 index 0000000..ffd53b9 --- /dev/null +++ b/EnlighterJS/Resources/ExampleData/Example3-advanced.phtml @@ -0,0 +1,271 @@ + + + + + +
+
Example 1 - Different Inline+Block Config
+
+

Javascript Code - default language JS

+
+$('#loading-example-btn').click(function () {
+	var btn = $(this)
+	btn.button('loading')
+	$.ajax(...).always(function () {
+		btn.button('reset')
+	});
+});
+
+ +

Inline PHP Code - Using classic Theme and PHP as default language

+

EnlighterJS also supports $content = print_r(array(1,2,3), true); (since version 2.0).
Not highlighted (selector not matching) $content = print_r(array(1,2,3), true);

+
+ + + + + + +
+
Example 2 - Using native Element.enlight() extension
+
+

Just want to highlight single elements on your page, maybe loaded dynamically and not available on domready ?

+
+ + +
+

XML Code

+
+<building name="GlobalDynamics Main Building" id="0xFA8A91C6617DFA1B">
+	<group level="2">
+		<room number="123">Conference Room A</room>
+		<room number="124">Conference Room B</room>
+		<room number="125">Conference Room C</room>
+		<room number="126">Conference Room D</room>
+	</group>
+	<group level="2">
+		<room number="17">John's Office</room>
+		<room number="19">Eric's Office</room>
+	</group>
+
+
+ + + + + + +
+
Example 3 - Using EnlighterJS in OOP context
+
+

This method is recommended if you want to do some advanced stuff

+
+ + +
+ +

XML Code

+
+<building name="GlobalDynamics Main Building" id="0xFA8A91C6617DFA1B">
+	<group level="2">
+		<room number="123">Conference Room A</room>
+		<room number="124">Conference Room B</room>
+		<room number="125">Conference Room C</room>
+		<room number="126">Conference Room D</room>
+	</group>
+	<group level="2">
+		<room number="17">John's Office</room>
+		<room number="19">Eric's Office</room>
+	</group>
+
+
+ + + + + +
+
Example 4 - Using Codegroups
+
+

If you need Codegroups, you have to use the EnlighterJS.Util.Helper utility function for initialiation which does the "magic" part for you!
+ Note: EnlighterJS.Util.Init as well as EnlighterJS.Util.Metainit trigger this utility!

+ +

XML Code

+
+<building name="GlobalDynamics Main Building" id="0xFA8A91C6617DFA1B">
+	<group level="2">
+		<room number="123">Conference Room A</room>
+		<room number="124">Conference Room B</room>
+		<room number="125">Conference Room C</room>
+		<room number="126">Conference Room D</room>
+	</group>
+	<group level="2">
+		<room number="17">John's Office</room>
+		<room number="19">Eric's Office</room>
+	</group>
+
+
+$('#loading-example-btn').click(function () {
+	var btn = $(this)
+	btn.button('loading')
+	$.ajax(...).always(function () {
+		btn.button('reset')
+	});
+});
+
+
+ + + + + + + + + + +
+
Example 5 - Dynamical Content/AJAX
+
+

You can also load dynamic content and highlight it! The most simple way is the use of EnlighterJS.Util.Init utility function!

+
+ +
+
+ + diff --git a/EnlighterJS/Resources/ExampleData/LanguageDevelopment.phtml b/EnlighterJS/Resources/ExampleData/LanguageDevelopment.phtml new file mode 100644 index 0000000..68d63b4 --- /dev/null +++ b/EnlighterJS/Resources/ExampleData/LanguageDevelopment.phtml @@ -0,0 +1,73 @@ + + + + + + + + + + +
+ +
+ +
Start your Language-Development by editing the file Source/Language/Template.mylang.js - all changes will directly appear into this document without the need of a rebuild!
+ + +

Inline Content

+

+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor + if FILE == 123.123 then + invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, + not highlighted + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. +

+ +

HTML Content

+
+<!##
+# This is a hash-style-comment
+if FILE == 123.123 then
+	echo 'testcase'
+elseif
+	echo "OH NO"	
+endif
+##!>
+
+ + + + +
+ + +
+ + + \ No newline at end of file diff --git a/EnlighterJS/Resources/ExampleData/ThemeDevelopment.phtml b/EnlighterJS/Resources/ExampleData/ThemeDevelopment.phtml new file mode 100644 index 0000000..7231ff0 --- /dev/null +++ b/EnlighterJS/Resources/ExampleData/ThemeDevelopment.phtml @@ -0,0 +1,148 @@ + + + + + + + + + + + + +
+ +
+ +
Start your Theme-Development by editing the file Source/Themes/Template.MyTheme.css - all changes will directly appear into this document without the need of a rebuild!
+ + +

Inline Content

+

+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor + window.addEvent('domready', function(){}); + invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, + not highlighted + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. +

+ +

HTML Content

+
+<!DOCTYPE html>
+<head>
+		<!-- Include EnlighterJS Styles -->
+		<link rel="stylesheet" type="text/css" href="../Build/EnlighterJS.yui.css" />
+		
+		<!-- Include MooTools Framework -->
+		<script type="text/javascript" src="mootools-core-1.4.5-full-nocompat.js"></script>
+		
+		<!-- Include EnlighterJS -->
+		<script type="text/javascript" src="../Build/EnlighterJS.yui.js" ></script>
+		
+		<!-- Initialize EnlighterJS --> 
+		<script type="text/javascript">
+		window.addEvent('domready', function() {
+			// highlight all pre tags
+			$$('pre').light({
+				altLines : 'hover',
+				indent : 2,
+				editable: false
+			});
+		});
+		</script>
+
+<!-- Syntax highlight using Languages/Js.js and default theme --> 
+<pre data-enlighter-language="css">var myClass = new Class({})</pre> 
+ 
+<!-- Syntax highlight using Languages/Php.js and theme from Themes/Twilight.css --> 
+<pre data-enlighter-language="php" data-enlighter-theme="twilight"><?php php_info() ?></pre>
+
+
+ + +

JS Content

+
+window.addEvent('domready', function(){
+	// metadata config available ? -> autoinit
+	var m = document.getElement('meta[name="EnlighterJS"]');
+	
+	// check instance
+	if (!m){
+		return;
+	}
+	
+	// create new options object
+	var options = {
+		language: m.get('data-language') || 'generic',
+		theme: m.get('data-theme') || 'Enlighter',
+		indent: m.get('data-indent').toInt() || -1,
+		hover: m.get('data-hover') || 'hoverEnabled'
+	};
+		
+	// selector available ? if not, match all pre-tags
+	var blockSelector = m.get('data-selector-block') || 'pre';
+	
+	// selector available ? if not, match all code-tags
+	var inlineSelector = m.get('data-selector-inline') || 'code';
+});
+	
+ +
+
+
+// create output container element
+var container = new Element(this.options.containerTag);
+
+// set class and id attributes.
+container.addClass(theme + 'EnlighterJS');		
+container.addClass('EnlighterJSRendered');		
+container.set('id', 'EnlighterJS_' + String.uniqueID());
+
+// generate output based on ordered list of tokens
+language.getTokens().each(function(token, index){
+	// get classname
+	var className = 		 		   token.type ? (language.aliases[token.type] || token.type) : '';
+	
+	
+	
+	
+	// create new inline element which contains the token - htmlspecialchars get escaped by mootools setText !
+	container.grab(new Element('span', {
+		'class': className,
+		'text': token.text
+	}));
+});
+
+return container;
+	
+
+// set class and id attributes.
+container.addClass(theme + 'EnlighterJS');		
+container.addClass('EnlighterJSRendered');		
+container.set('id', 'EnlighterJS_' + String.uniqueID());
+
+

No-Highlight

+
+// create output container element
+var container = new Element(this.options.containerTag);
+
+// set class and id attributes.
+container.addClass(theme + 'EnlighterJS');		
+container.addClass('EnlighterJSRendered');		
+container.set('id', 'EnlighterJS_' + String.uniqueID());
+
+ + + +
+ + + +
+ + + \ No newline at end of file diff --git a/EnlighterJS/Resources/ExampleTemplate.phtml b/EnlighterJS/Resources/ExampleTemplate.phtml new file mode 100644 index 0000000..856712c --- /dev/null +++ b/EnlighterJS/Resources/ExampleTemplate.phtml @@ -0,0 +1,62 @@ + + + + + + + + + + + + <?php echo strip_tags($pageTitle); ?> | EnlighterJS + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +
+ + + \ No newline at end of file diff --git a/EnlighterJS/Resources/MooTools.min.js b/EnlighterJS/Resources/MooTools.min.js new file mode 100644 index 0000000..0e486d4 --- /dev/null +++ b/EnlighterJS/Resources/MooTools.min.js @@ -0,0 +1,5 @@ +/* MooTools: the javascript framework. license: MIT-style license. copyright: Copyright (c) 2006-2015 [Valerio Proietti](http://mad4milk.net/).*/ +!function(){this.MooTools={version:"1.5.1",build:"0542c135fdeb7feed7d9917e01447a408f22c876"};var t=this.typeOf=function(t){if(null==t)return"null";if(null!=t.$family)return t.$family();if(t.nodeName){if(1==t.nodeType)return"element";if(3==t.nodeType)return/\S/.test(t.nodeValue)?"textnode":"whitespace"}else if("number"==typeof t.length){if("callee"in t)return"arguments";if("item"in t)return"collection"}return typeof t},e=(this.instanceOf=function(t,e){if(null==t)return!1;for(var n=t.$constructor||t.constructor;n;){if(n===e)return!0;n=n.parent}return t.hasOwnProperty?t instanceof e:!1},this.Function),n=!0;for(var i in{toString:1})n=null;n&&(n=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]),e.prototype.overloadSetter=function(t){var e=this;return function(i,r){if(null==i)return this;if(t||"string"!=typeof i){for(var s in i)e.call(this,s,i[s]);if(n)for(var o=n.length;o--;)s=n[o],i.hasOwnProperty(s)&&e.call(this,s,i[s])}else e.call(this,i,r);return this}},e.prototype.overloadGetter=function(t){var e=this;return function(n){var i,r;if("string"!=typeof n?i=n:arguments.length>1?i=arguments:t&&(i=[n]),i){r={};for(var s=0;so;o++){var u=n[o],c=e[u],l=r[u];c&&c.protect(),i&&l&&e.implement(u,l.protect())}if(i){var f=r.propertyIsEnumerable(n[0]);e.forEachMethod=function(t){if(!f)for(var e=0,i=n.length;i>e;e++)t.call(r,r[n[e]],n[e]);for(var s in r)t.call(r,r[s],s)}}return h};h("String",String,["charAt","charCodeAt","concat","contains","indexOf","lastIndexOf","match","quote","replace","search","slice","split","substr","substring","trim","toLowerCase","toUpperCase"])("Array",Array,["pop","push","reverse","shift","sort","splice","unshift","concat","join","slice","indexOf","lastIndexOf","filter","forEach","every","map","some","reduce","reduceRight"])("Number",Number,["toExponential","toFixed","toLocaleString","toPrecision"])("Function",e,["apply","call","bind"])("RegExp",RegExp,["exec","test"])("Object",Object,["create","defineProperty","defineProperties","keys","getPrototypeOf","getOwnPropertyDescriptor","getOwnPropertyNames","preventExtensions","isExtensible","seal","isSealed","freeze","isFrozen"])("Date",Date,["now"]),Object.extend=l.overloadSetter(),Date.extend("now",function(){return+new Date}),new s("Boolean",Boolean),Number.prototype.$family=function(){return isFinite(this)?"number":"null"}.hide(),Number.extend("random",function(t,e){return Math.floor(Math.random()*(e-t+1)+t)});var f=Object.prototype.hasOwnProperty;Object.extend("forEach",function(t,e,n){for(var i in t)f.call(t,i)&&e.call(n,t[i],i,t)}),Object.each=Object.forEach,Array.implement({forEach:function(t,e){for(var n=0,i=this.length;i>n;n++)n in this&&t.call(e,this[n],n,this)},each:function(t,e){return Array.forEach(this,t,e),this}});var p=function(e){switch(t(e)){case"array":return e.clone();case"object":return Object.clone(e);default:return e}};Array.implement("clone",function(){for(var t=this.length,e=new Array(t);t--;)e[t]=p(this[t]);return e});var d=function(e,n,i){switch(t(i)){case"object":"object"==t(e[n])?Object.merge(e[n],i):e[n]=Object.clone(i);break;case"array":e[n]=i.clone();break;default:e[n]=i}return e};Object.extend({merge:function(e,n,i){if("string"==t(n))return d(e,n,i);for(var r=1,s=arguments.length;s>r;r++){var o=arguments[r];for(var a in o)d(e,a,o[a])}return e},clone:function(t){var e={};for(var n in t)e[n]=p(t[n]);return e},append:function(t){for(var e=1,n=arguments.length;n>e;e++){var i=arguments[e]||{};for(var r in i)t[r]=i[r]}return t}}),["Object","WhiteSpace","TextNode","Collection","Arguments"].each(function(t){new s(t)});var m=Date.now();String.extend("uniqueID",function(){return(m++).toString(36)})}(),Array.implement({every:function(t,e){for(var n=0,i=this.length>>>0;i>n;n++)if(n in this&&!t.call(e,this[n],n,this))return!1;return!0},filter:function(t,e){for(var n,i=[],r=0,s=this.length>>>0;s>r;r++)r in this&&(n=this[r],t.call(e,n,r,this)&&i.push(n));return i},indexOf:function(t,e){for(var n=this.length>>>0,i=0>e?Math.max(0,n+e):e||0;n>i;i++)if(this[i]===t)return i;return-1},map:function(t,e){for(var n=this.length>>>0,i=Array(n),r=0;n>r;r++)r in this&&(i[r]=t.call(e,this[r],r,this));return i},some:function(t,e){for(var n=0,i=this.length>>>0;i>n;n++)if(n in this&&t.call(e,this[n],n,this))return!0;return!1},clean:function(){return this.filter(function(t){return null!=t})},invoke:function(t){var e=Array.slice(arguments,1);return this.map(function(n){return n[t].apply(n,e)})},associate:function(t){for(var e={},n=Math.min(this.length,t.length),i=0;n>i;i++)e[t[i]]=this[i];return e},link:function(t){for(var e={},n=0,i=this.length;i>n;n++)for(var r in t)if(t[r](this[n])){e[r]=this[n],delete t[r];break}return e},contains:function(t,e){return-1!=this.indexOf(t,e)},append:function(t){return this.push.apply(this,t),this},getLast:function(){return this.length?this[this.length-1]:null},getRandom:function(){return this.length?this[Number.random(0,this.length-1)]:null},include:function(t){return this.contains(t)||this.push(t),this},combine:function(t){for(var e=0,n=t.length;n>e;e++)this.include(t[e]);return this},erase:function(t){for(var e=this.length;e--;)this[e]===t&&this.splice(e,1);return this},empty:function(){return this.length=0,this},flatten:function(){for(var t=[],e=0,n=this.length;n>e;e++){var i=typeOf(this[e]);"null"!=i&&(t=t.concat("array"==i||"collection"==i||"arguments"==i||instanceOf(this[e],Array)?Array.flatten(this[e]):this[e]))}return t},pick:function(){for(var t=0,e=this.length;e>t;t++)if(null!=this[t])return this[t];return null},hexToRgb:function(t){if(3!=this.length)return null;var e=this.map(function(t){return 1==t.length&&(t+=t),parseInt(t,16)});return t?e:"rgb("+e+")"},rgbToHex:function(t){if(this.length<3)return null;if(4==this.length&&0==this[3]&&!t)return"transparent";for(var e=[],n=0;3>n;n++){var i=(this[n]-0).toString(16);e.push(1==i.length?"0"+i:i)}return t?e:"#"+e.join("")}}),Function.extend({attempt:function(){for(var t=0,e=arguments.length;e>t;t++)try{return arguments[t]()}catch(n){}return null}}),Function.implement({attempt:function(t,e){try{return this.apply(e,Array.from(t))}catch(n){}return null},bind:function(t){var e=this,n=arguments.length>1?Array.slice(arguments,1):null,i=function(){},r=function(){var s=t,o=arguments.length;this instanceof r&&(i.prototype=e.prototype,s=new i);var a=n||o?e.apply(s,n&&o?n.concat(Array.slice(arguments)):n||arguments):e.call(s);return s==t?a:s};return r},pass:function(t,e){var n=this;return null!=t&&(t=Array.from(t)),function(){return n.apply(e,t||arguments)}},delay:function(t,e,n){return setTimeout(this.pass(null==n?[]:n,e),t)},periodical:function(t,e,n){return setInterval(this.pass(null==n?[]:n,e),t)}}),Number.implement({limit:function(t,e){return Math.min(e,Math.max(t,this))},round:function(t){return t=Math.pow(10,t||0).toFixed(0>t?-t:0),Math.round(this*t)/t},times:function(t,e){for(var n=0;this>n;n++)t.call(e,n,this)},toFloat:function(){return parseFloat(this)},toInt:function(t){return parseInt(this,t||10)}}),Number.alias("each","times"),function(t){var e={};t.each(function(t){Number[t]||(e[t]=function(){return Math[t].apply(null,[this].concat(Array.from(arguments)))})}),Number.implement(e)}(["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","sin","sqrt","tan"]),String.implement({contains:function(t,e){return(e?String(this).slice(e):String(this)).indexOf(t)>-1},test:function(t,e){return("regexp"==typeOf(t)?t:new RegExp(""+t,e)).test(this)},trim:function(){return String(this).replace(/^\s+|\s+$/g,"")},clean:function(){return String(this).replace(/\s+/g," ").trim()},camelCase:function(){return String(this).replace(/-\D/g,function(t){return t.charAt(1).toUpperCase()})},hyphenate:function(){return String(this).replace(/[A-Z]/g,function(t){return"-"+t.charAt(0).toLowerCase()})},capitalize:function(){return String(this).replace(/\b[a-z]/g,function(t){return t.toUpperCase()})},escapeRegExp:function(){return String(this).replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},toInt:function(t){return parseInt(this,t||10)},toFloat:function(){return parseFloat(this)},hexToRgb:function(t){var e=String(this).match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return e?e.slice(1).hexToRgb(t):null},rgbToHex:function(t){var e=String(this).match(/\d{1,3}/g);return e?e.rgbToHex(t):null},substitute:function(t,e){return String(this).replace(e||/\\?\{([^{}]+)\}/g,function(e,n){return"\\"==e.charAt(0)?e.slice(1):null!=t[n]?t[n]:""})}}),function(){var t=this.document,e=t.window=this,n=function(t,e){t=t.toLowerCase(),e=e?e.toLowerCase():"";var n=t.match(/(opera|ie|firefox|chrome|trident|crios|version)[\s\/:]([\w\d\.]+)?.*?(safari|(?:rv[\s\/:]|version[\s\/:])([\w\d\.]+)|$)/)||[null,"unknown",0];return"trident"==n[1]?(n[1]="ie",n[4]&&(n[2]=n[4])):"crios"==n[1]&&(n[1]="chrome"),e=t.match(/ip(?:ad|od|hone)/)?"ios":(t.match(/(?:webos|android)/)||e.match(/mac|win|linux/)||["other"])[0],"win"==e&&(e="windows"),{extend:Function.prototype.extend,name:"version"==n[1]?n[3]:n[1],version:parseFloat("opera"==n[1]&&n[4]?n[4]:n[2]),platform:e}},i=this.Browser=n(navigator.userAgent,navigator.platform);if("ie"==i.name&&(i.version=t.documentMode),i.extend({Features:{xpath:!!t.evaluate,air:!!e.runtime,query:!!t.querySelector,json:!!e.JSON},parseUA:n}),i.Request=function(){var t=function(){return new XMLHttpRequest},e=function(){return new ActiveXObject("MSXML2.XMLHTTP")},n=function(){return new ActiveXObject("Microsoft.XMLHTTP")};return Function.attempt(function(){return t(),t},function(){return e(),e},function(){return n(),n})}(),i.Features.xhr=!!i.Request,i.exec=function(n){if(!n)return n;if(e.execScript)e.execScript(n);else{var i=t.createElement("script");i.setAttribute("type","text/javascript"),i.text=n,t.head.appendChild(i),t.head.removeChild(i)}return n},String.implement("stripScripts",function(t){var e="",n=this.replace(/]*>([\s\S]*?)<\/script>/gi,function(t,n){return e+=n+"\n",""});return t===!0?i.exec(e):"function"==typeOf(t)&&t(e,n),n}),i.extend({Document:this.Document,Window:this.Window,Element:this.Element,Event:this.Event}),this.Window=this.$constructor=new Type("Window",function(){}),this.$family=Function.from("window").hide(),Window.mirror(function(t,n){e[t]=n}),this.Document=t.$constructor=new Type("Document",function(){}),t.$family=Function.from("document").hide(),Document.mirror(function(e,n){t[e]=n}),t.html=t.documentElement,t.head||(t.head=t.getElementsByTagName("head")[0]),t.execCommand)try{t.execCommand("BackgroundImageCache",!1,!0)}catch(r){}if(this.attachEvent&&!this.addEventListener){var s=function(){this.detachEvent("onunload",s),t.head=t.html=t.window=null,e=this.Window=t=null};this.attachEvent("onunload",s)}var o=Array.from;try{o(t.html.childNodes)}catch(r){Array.from=function(t){if("string"!=typeof t&&Type.isEnumerable(t)&&"array"!=typeOf(t)){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}return o(t)};var a=Array.prototype,u=a.slice;["pop","push","reverse","shift","sort","splice","unshift","concat","join","slice"].each(function(t){var e=a[t];Array[t]=function(t){return e.apply(Array.from(t),u.call(arguments,1))}})}}(),function(){var t=this.Class=new Type("Class",function(i){instanceOf(i,Function)&&(i={initialize:i});var r=function(){if(n(this),r.$prototyping)return this;this.$caller=null;var t=this.initialize?this.initialize.apply(this,arguments):this;return this.$caller=this.caller=null,t}.extend(this).implement(i);return r.$constructor=t,r.prototype.$constructor=r,r.prototype.parent=e,r}),e=function(){if(!this.$caller)throw new Error('The method "parent" cannot be called.');var t=this.$caller.$name,e=this.$caller.$owner.parent,n=e?e.prototype[t]:null;if(!n)throw new Error('The method "'+t+'" has no parent.');return n.apply(this,arguments)},n=function(t){for(var e in t){var i=t[e];switch(typeOf(i)){case"object":var r=function(){};r.prototype=i,t[e]=n(new r);break;case"array":t[e]=i.clone()}}return t},i=function(t,e,n){n.$origin&&(n=n.$origin);var i=function(){if(n.$protected&&null==this.$caller)throw new Error('The method "'+e+'" cannot be called.');var t=this.caller,r=this.$caller;this.caller=r,this.$caller=i;var s=n.apply(this,arguments);return this.$caller=r,this.caller=t,s}.extend({$owner:t,$origin:n,$name:e});return i},r=function(e,n,r){if(t.Mutators.hasOwnProperty(e)&&(n=t.Mutators[e].call(this,n),null==n))return this;if("function"==typeOf(n)){if(n.$hidden)return this;this.prototype[e]=r?n:i(this,e,n)}else Object.merge(this.prototype,e,n);return this},s=function(t){t.$prototyping=!0;var e=new t;return delete t.$prototyping,e};t.implement("implement",r.overloadSetter()),t.Mutators={Extends:function(t){this.parent=t,this.prototype=s(t)},Implements:function(t){Array.from(t).each(function(t){var e=new t;for(var n in e)r.call(this,n,e[n],!0)},this)}}}(),function(){this.Chain=new Class({$chain:[],chain:function(){return this.$chain.append(Array.flatten(arguments)),this},callChain:function(){return this.$chain.length?this.$chain.shift().apply(this,arguments):!1},clearChain:function(){return this.$chain.empty(),this}});var t=function(t){return t.replace(/^on([A-Z])/,function(t,e){return e.toLowerCase()})};this.Events=new Class({$events:{},addEvent:function(e,n,i){return e=t(e),this.$events[e]=(this.$events[e]||[]).include(n),i&&(n.internal=!0),this},addEvents:function(t){for(var e in t)this.addEvent(e,t[e]);return this},fireEvent:function(e,n,i){e=t(e);var r=this.$events[e];return r?(n=Array.from(n),r.each(function(t){i?t.delay(i,this,n):t.apply(this,n)},this),this):this},removeEvent:function(e,n){e=t(e);var i=this.$events[e];if(i&&!n.internal){var r=i.indexOf(n);-1!=r&&delete i[r]}return this},removeEvents:function(e){var n;if("object"==typeOf(e)){for(n in e)this.removeEvent(n,e[n]);return this}e&&(e=t(e));for(n in this.$events)if(!e||e==n)for(var i=this.$events[n],r=i.length;r--;)r in i&&this.removeEvent(n,i[r]);return this}}),this.Options=new Class({setOptions:function(){var t=this.options=Object.merge.apply(null,[{},this.options].append(arguments));if(this.addEvent)for(var e in t)"function"==typeOf(t[e])&&/^on[A-Z]/.test(e)&&(this.addEvent(e,t[e]),delete t[e]);return this}})}(),function(){var t=Object.prototype.hasOwnProperty;Object.extend({subset:function(t,e){for(var n={},i=0,r=e.length;r>i;i++){var s=e[i];s in t&&(n[s]=t[s])}return n},map:function(e,n,i){var r={};for(var s in e)t.call(e,s)&&(r[s]=n.call(i,e[s],s,e));return r},filter:function(e,n,i){var r={};for(var s in e){var o=e[s];t.call(e,s)&&n.call(i,o,s,e)&&(r[s]=o)}return r},every:function(e,n,i){for(var r in e)if(t.call(e,r)&&!n.call(i,e[r],r))return!1;return!0},some:function(e,n,i){for(var r in e)if(t.call(e,r)&&n.call(i,e[r],r))return!0;return!1},keys:function(e){var n=[];for(var i in e)t.call(e,i)&&n.push(i);return n},values:function(e){var n=[];for(var i in e)t.call(e,i)&&n.push(e[i]);return n},getLength:function(t){return Object.keys(t).length},keyOf:function(e,n){for(var i in e)if(t.call(e,i)&&e[i]===n)return i;return null},contains:function(t,e){return null!=Object.keyOf(t,e)},toQueryString:function(t,e){var n=[];return Object.each(t,function(t,i){e&&(i=e+"["+i+"]");var r;switch(typeOf(t)){case"object":r=Object.toQueryString(t,i);break;case"array":var s={};t.each(function(t,e){s[e]=t}),r=Object.toQueryString(s,i);break;default:r=i+"="+encodeURIComponent(t)}null!=t&&n.push(r)}),n.join("&")}})}(),function(){function t(t,s,o,u,l,f,p,d,m,v,g,y,b,x,S,E){if((s||-1===n)&&(e.expressions[++n]=[],i=-1,s))return"";if(o||u||-1===i){o=o||" ";var w=e.expressions[n];r&&w[i]&&(w[i].reverseCombinator=c(o)),w[++i]={combinator:o,tag:"*"}}var k=e.expressions[n][i];if(l)k.tag=l.replace(a,"");else if(f)k.id=f.replace(a,"");else if(p)p=p.replace(a,""),k.classList||(k.classList=[]),k.classes||(k.classes=[]),k.classList.push(p),k.classes.push({value:p,regexp:new RegExp("(^|\\s)"+h(p)+"(\\s|$)")});else if(b)E=E||S,E=E?E.replace(a,""):null,k.pseudos||(k.pseudos=[]),k.pseudos.push({key:b.replace(a,""),value:E,type:1==y.length?"class":"element"});else if(d){d=d.replace(a,""),g=(g||"").replace(a,"");var O,C;switch(m){case"^=":C=new RegExp("^"+h(g));break;case"$=":C=new RegExp(h(g)+"$");break;case"~=":C=new RegExp("(^|\\s)"+h(g)+"(\\s|$)");break;case"|=":C=new RegExp("^"+h(g)+"(-|$)");break;case"=":O=function(t){return g==t};break;case"*=":O=function(t){return t&&t.indexOf(g)>-1};break;case"!=":O=function(t){return g!=t};break;default:O=function(t){return!!t}}""==g&&/^[*$^]=$/.test(m)&&(O=function(){return!1}),O||(O=function(t){return t&&C.test(t)}),k.attributes||(k.attributes=[]),k.attributes.push({key:d,operator:m,value:g,test:O})}return""}var e,n,i,r,s={},o={},a=/\\/g,u=function(i,a){if(null==i)return null;if(i.Slick===!0)return i;i=(""+i).replace(/^\s+|\s+$/g,""),r=!!a;var c=r?o:s;if(c[i])return c[i];for(e={Slick:!0,expressions:[],raw:i,reverse:function(){return u(this.raw,!0)}},n=-1;i!=(i=i.replace(f,t)););return e.length=e.expressions.length,c[e.raw]=r?l(e):e},c=function(t){return"!"===t?" ":" "===t?"!":/^!/.test(t)?t.replace(/^!/,""):"!"+t},l=function(t){for(var e=t.expressions,n=0;n+)\\s*|(\\s+)|(+|\\*)|\\#(+)|\\.(+)|\\[\\s*(+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:([\"']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(+)(?:\\((?:(?:([\"'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)".replace(//,"["+h(">+~`!@$%^&={}\\;/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(//g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")),p=this.Slick||{};p.parse=function(t){return u(t)},p.escapeRegExp=h,this.Slick||(this.Slick=p)}.apply("undefined"!=typeof exports?exports:this),function(){var t={},e={},n=Object.prototype.toString;t.isNativeCode=function(t){return/\{\s*\[native code\]\s*\}/.test(""+t)},t.isXML=function(t){return!!t.xmlVersion||!!t.xml||"[object XMLDocument]"==n.call(t)||9==t.nodeType&&"HTML"!=t.documentElement.nodeName},t.setDocument=function(t){var n=t.nodeType;if(9==n);else if(n)t=t.ownerDocument;else{if(!t.navigator)return;t=t.document}if(this.document!==t){this.document=t;var i,r=t.documentElement,s=this.getUIDXML(r),o=e[s];if(o)for(i in o)this[i]=o[i];else{o=e[s]={},o.root=r,o.isXMLDocument=this.isXML(t),o.brokenStarGEBTN=o.starSelectsClosedQSA=o.idGetsName=o.brokenMixedCaseQSA=o.brokenGEBCN=o.brokenCheckedQSA=o.brokenEmptyAttributeQSA=o.isHTMLDocument=o.nativeMatchesSelector=!1;var a,u,c,l,h,f,p="slick_uniqueid",d=t.createElement("div"),m=t.body||t.getElementsByTagName("body")[0]||r;m.appendChild(d);try{d.innerHTML='',o.isHTMLDocument=!!t.getElementById(p)}catch(v){}if(o.isHTMLDocument){d.style.display="none",d.appendChild(t.createComment("")),u=d.getElementsByTagName("*").length>1;try{d.innerHTML="foo",f=d.getElementsByTagName("*"),a=f&&!!f.length&&"/"==f[0].nodeName.charAt(0)}catch(v){}o.brokenStarGEBTN=u||a;try{d.innerHTML='',o.idGetsName=t.getElementById(p)===d.firstChild}catch(v){}if(d.getElementsByClassName){try{d.innerHTML='',d.getElementsByClassName("b").length,d.firstChild.className="b",l=2!=d.getElementsByClassName("b").length}catch(v){}try{d.innerHTML='',c=2!=d.getElementsByClassName("a").length}catch(v){}o.brokenGEBCN=l||c}if(d.querySelectorAll){try{d.innerHTML="foo",f=d.querySelectorAll("*"),o.starSelectsClosedQSA=f&&!!f.length&&"/"==f[0].nodeName.charAt(0)}catch(v){}try{d.innerHTML='',o.brokenMixedCaseQSA=!d.querySelectorAll(".MiX").length}catch(v){}try{d.innerHTML='',o.brokenCheckedQSA=0==d.querySelectorAll(":checked").length}catch(v){}try{d.innerHTML='',o.brokenEmptyAttributeQSA=0!=d.querySelectorAll('[class*=""]').length}catch(v){}}try{d.innerHTML='
',h="s"!=d.firstChild.getAttribute("action")}catch(v){}if(o.nativeMatchesSelector=r.matches||r.mozMatchesSelector||r.webkitMatchesSelector,o.nativeMatchesSelector)try{o.nativeMatchesSelector.call(r,":slick"),o.nativeMatchesSelector=null}catch(v){}}try{r.slick_expando=1,delete r.slick_expando,o.getUID=this.getUIDHTML}catch(v){o.getUID=this.getUIDXML}m.removeChild(d),d=f=m=null,o.getAttribute=o.isHTMLDocument&&h?function(t,e){var n=this.attributeGetters[e];if(n)return n.call(t);var i=t.getAttributeNode(e);return i?i.nodeValue:null}:function(t,e){var n=this.attributeGetters[e];return n?n.call(t):t.getAttribute(e)},o.hasAttribute=r&&this.isNativeCode(r.hasAttribute)?function(t,e){return t.hasAttribute(e)}:function(t,e){return t=t.getAttributeNode(e),!(!t||!t.specified&&!t.nodeValue)};var g=r&&this.isNativeCode(r.contains),y=t&&this.isNativeCode(t.contains);o.contains=g&&y?function(t,e){return t.contains(e)}:g&&!y?function(e,n){return e===n||(e===t?t.documentElement:e).contains(n)}:r&&r.compareDocumentPosition?function(t,e){return t===e||!!(16&t.compareDocumentPosition(e))}:function(t,e){if(e)do if(e===t)return!0;while(e=e.parentNode);return!1},o.documentSorter=r.compareDocumentPosition?function(t,e){return t.compareDocumentPosition&&e.compareDocumentPosition?4&t.compareDocumentPosition(e)?-1:t===e?0:1:0}:"sourceIndex"in r?function(t,e){return t.sourceIndex&&e.sourceIndex?t.sourceIndex-e.sourceIndex:0}:t.createRange?function(t,e){if(!t.ownerDocument||!e.ownerDocument)return 0;var n=t.ownerDocument.createRange(),i=e.ownerDocument.createRange();return n.setStart(t,0),n.setEnd(t,0),i.setStart(e,0),i.setEnd(e,0),n.compareBoundaryPoints(Range.START_TO_END,i)}:null,r=null;for(i in o)this[i]=o[i]}}};var i=/^([#.]?)((?:[\w-]+|\*))$/,r=/\[.+[*$^]=(?:""|'')?\]/,s={};t.search=function(t,e,n,o){var a=this.found=o?null:n||[];if(!t)return a;if(t.navigator)t=t.document;else if(!t.nodeType)return a;var u,c,l=this.uniques={},f=!(!n||!n.length),p=9==t.nodeType;if(this.document!==(p?t:t.ownerDocument)&&this.setDocument(t),f)for(c=a.length;c--;)l[this.getUID(a[c])]=!0;if("string"==typeof e){var d=e.match(i);t:if(d){var m,v,g=d[1],y=d[2];if(g){if("#"==g){if(!this.isHTMLDocument||!p)break t;if(m=t.getElementById(y),!m)return a;if(this.idGetsName&&m.getAttributeNode("id").nodeValue!=y)break t;if(o)return m||null;f&&l[this.getUID(m)]||a.push(m)}else if("."==g){if(!this.isHTMLDocument||(!t.getElementsByClassName||this.brokenGEBCN)&&t.querySelectorAll)break t;if(t.getElementsByClassName&&!this.brokenGEBCN){if(v=t.getElementsByClassName(y),o)return v[0]||null;for(c=0;m=v[c++];)f&&l[this.getUID(m)]||a.push(m)}else{var b=new RegExp("(^|\\s)"+h.escapeRegExp(y)+"(\\s|$)");for(v=t.getElementsByTagName("*"),c=0;m=v[c++];)if(className=m.className,className&&b.test(className)){if(o)return m;f&&l[this.getUID(m)]||a.push(m)}}}}else{if("*"==y&&this.brokenStarGEBTN)break t;if(v=t.getElementsByTagName(y),o)return v[0]||null;for(c=0;m=v[c++];)f&&l[this.getUID(m)]||a.push(m)}return f&&this.sort(a),o?null:a}t:if(t.querySelectorAll){if(!this.isHTMLDocument||s[e]||this.brokenMixedCaseQSA||this.brokenCheckedQSA&&e.indexOf(":checked")>-1||this.brokenEmptyAttributeQSA&&r.test(e)||!p&&e.indexOf(",")>-1||h.disableQSA)break t;var x=e,S=t;if(!p){var E=S.getAttribute("id"),w="slickid__";S.setAttribute("id",w),x="#"+w+" "+x,t=S.parentNode}try{if(o)return t.querySelector(x)||null;v=t.querySelectorAll(x)}catch(k){s[e]=1;break t}finally{p||(E?S.setAttribute("id",E):S.removeAttribute("id"),t=S)}if(this.starSelectsClosedQSA)for(c=0;m=v[c++];)!(m.nodeName>"@")||f&&l[this.getUID(m)]||a.push(m);else for(c=0;m=v[c++];)f&&l[this.getUID(m)]||a.push(m);return f&&this.sort(a),a}if(u=this.Slick.parse(e),!u.length)return a}else{if(null==e)return a;if(!e.Slick)return this.contains(t.documentElement||t,e)?(a?a.push(e):a=e,a):a;u=e}this.posNTH={},this.posNTHLast={},this.posNTHType={},this.posNTHTypeLast={},this.push=!f&&(o||1==u.length&&1==u.expressions[0].length)?this.pushArray:this.pushUID,null==a&&(a=[]);var O,C,T,N,A,L,M,j,P,D,$,F,H,I,R=u.expressions;t:for(c=0;F=R[c];c++)for(O=0;H=F[O];O++){if(N="combinator:"+H.combinator,!this[N])continue t;if(A=this.isXMLDocument?H.tag:H.tag.toUpperCase(),L=H.id,M=H.classList,j=H.classes,P=H.attributes,D=H.pseudos,I=O===F.length-1,this.bitUniques={},I?(this.uniques=l,this.found=a):(this.uniques={},this.found=[]),0===O){if(this[N](t,A,L,j,P,D,M),o&&I&&a.length)break t}else if(o&&I){for(C=0,T=$.length;T>C;C++)if(this[N]($[C],A,L,j,P,D,M),a.length)break t}else for(C=0,T=$.length;T>C;C++)this[N]($[C],A,L,j,P,D,M);$=this.found}return(f||u.expressions.length>1)&&this.sort(a),o?a[0]||null:a},t.uidx=1,t.uidk="slick-uniqueid",t.getUIDXML=function(t){var e=t.getAttribute(this.uidk);return e||(e=this.uidx++,t.setAttribute(this.uidk,e)),e},t.getUIDHTML=function(t){return t.uniqueNumber||(t.uniqueNumber=this.uidx++)},t.sort=function(t){return this.documentSorter?(t.sort(this.documentSorter),t):t},t.cacheNTH={},t.matchNTH=/^([+-]?\d*)?([a-z]+)?([+-]\d+)?$/,t.parseNTHArgument=function(t){var e=t.match(this.matchNTH);if(!e)return!1;var n=e[2]||!1,i=e[1]||1;"-"==i&&(i=-1);var r=+e[3]||0;return e="n"==n?{a:i,b:r}:"odd"==n?{a:2,b:1}:"even"==n?{a:2,b:0}:{a:0,b:i},this.cacheNTH[t]=e},t.createNTHPseudo=function(t,e,n,i){return function(r,s){var o=this.getUID(r);if(!this[n][o]){var a=r.parentNode;if(!a)return!1;var u=a[t],c=1;if(i){var l=r.nodeName;do u.nodeName==l&&(this[n][this.getUID(u)]=c++);while(u=u[e])}else do 1==u.nodeType&&(this[n][this.getUID(u)]=c++);while(u=u[e])}s=s||"n";var h=this.cacheNTH[s]||this.parseNTHArgument(s);if(!h)return!1;var f=h.a,p=h.b,d=this[n][o];if(0==f)return p==d;if(f>0){if(p>d)return!1}else if(d>p)return!1;return(d-p)%f==0}},t.pushArray=function(t,e,n,i,r,s){this.matchSelector(t,e,n,i,r,s)&&this.found.push(t)},t.pushUID=function(t,e,n,i,r,s){var o=this.getUID(t);!this.uniques[o]&&this.matchSelector(t,e,n,i,r,s)&&(this.uniques[o]=!0,this.found.push(t))},t.matchNode=function(t,e){if(this.isHTMLDocument&&this.nativeMatchesSelector)try{return this.nativeMatchesSelector.call(t,e.replace(/\[([^=]+)=\s*([^'"\]]+?)\s*\]/g,'[$1="$2"]'))}catch(n){}var i=this.Slick.parse(e);if(!i)return!0;var r,s,o=i.expressions,a=0;for(r=0;s=o[r];r++)if(1==s.length){var u=s[0];if(this.matchSelector(t,this.isXMLDocument?u.tag:u.tag.toUpperCase(),u.id,u.classes,u.attributes,u.pseudos))return!0;a++}if(a==i.length)return!1;var c,l=this.search(this.document,i);for(r=0;c=l[r++];)if(c===t)return!0;return!1},t.matchPseudo=function(t,e,n){var i="pseudo:"+e;if(this[i])return this[i](t,n);var r=this.getAttribute(t,e);return n?n==r:!!r},t.matchSelector=function(t,e,n,i,r,s){if(e){var o=this.isXMLDocument?t.nodeName:t.nodeName.toUpperCase();if("*"==e){if("@">o)return!1}else if(o!=e)return!1}if(n&&t.getAttribute("id")!=n)return!1;var a,u,c;if(i)for(a=i.length;a--;)if(c=this.getAttribute(t,"class"),!c||!i[a].regexp.test(c))return!1;if(r)for(a=r.length;a--;)if(u=r[a],u.operator?!u.test(this.getAttribute(t,u.key)):!this.hasAttribute(t,u.key))return!1;if(s)for(a=s.length;a--;)if(u=s[a],!this.matchPseudo(t,u.key,u.value))return!1;return!0};var o={" ":function(t,e,n,i,r,s,o){var a,u,c;if(this.isHTMLDocument){t:if(n){if(u=this.document.getElementById(n),!u&&t.all||this.idGetsName&&u&&u.getAttributeNode("id").nodeValue!=n){if(c=t.all[n],!c)return;for(c[0]||(c=[c]),a=0;u=c[a++];){var l=u.getAttributeNode("id");if(l&&l.nodeValue==n){this.push(u,e,null,i,r,s);break}}return}if(!u){if(this.contains(this.root,t))return;break t}if(this.document!==t&&!this.contains(t,u))return;return void this.push(u,e,null,i,r,s)}t:if(i&&t.getElementsByClassName&&!this.brokenGEBCN){if(c=t.getElementsByClassName(o.join(" ")),!c||!c.length)break t;for(a=0;u=c[a++];)this.push(u,e,n,null,r,s);return}}if(c=t.getElementsByTagName(e),c&&c.length)for(this.brokenStarGEBTN||(e=null),a=0;u=c[a++];)this.push(u,e,n,i,r,s)},">":function(t,e,n,i,r,s){if(t=t.firstChild)do 1==t.nodeType&&this.push(t,e,n,i,r,s);while(t=t.nextSibling)},"+":function(t,e,n,i,r,s){for(;t=t.nextSibling;)if(1==t.nodeType){this.push(t,e,n,i,r,s);break}},"^":function(t,e,n,i,r,s){t=t.firstChild,t&&(1==t.nodeType?this.push(t,e,n,i,r,s):this["combinator:+"](t,e,n,i,r,s))},"~":function(t,e,n,i,r,s){for(;t=t.nextSibling;)if(1==t.nodeType){var o=this.getUID(t);if(this.bitUniques[o])break;this.bitUniques[o]=!0,this.push(t,e,n,i,r,s)}},"++":function(t,e,n,i,r,s){this["combinator:+"](t,e,n,i,r,s),this["combinator:!+"](t,e,n,i,r,s)},"~~":function(t,e,n,i,r,s){this["combinator:~"](t,e,n,i,r,s),this["combinator:!~"](t,e,n,i,r,s)},"!":function(t,e,n,i,r,s){for(;t=t.parentNode;)t!==this.document&&this.push(t,e,n,i,r,s)},"!>":function(t,e,n,i,r,s){t=t.parentNode,t!==this.document&&this.push(t,e,n,i,r,s)},"!+":function(t,e,n,i,r,s){for(;t=t.previousSibling;)if(1==t.nodeType){this.push(t,e,n,i,r,s);break}},"!^":function(t,e,n,i,r,s){t=t.lastChild,t&&(1==t.nodeType?this.push(t,e,n,i,r,s):this["combinator:!+"](t,e,n,i,r,s))},"!~":function(t,e,n,i,r,s){for(;t=t.previousSibling;)if(1==t.nodeType){var o=this.getUID(t);if(this.bitUniques[o])break;this.bitUniques[o]=!0,this.push(t,e,n,i,r,s)}}};for(var a in o)t["combinator:"+a]=o[a];var u={empty:function(t){var e=t.firstChild;return!(e&&1==e.nodeType||(t.innerText||t.textContent||"").length)},not:function(t,e){return!this.matchNode(t,e)},contains:function(t,e){return(t.innerText||t.textContent||"").indexOf(e)>-1},"first-child":function(t){for(;t=t.previousSibling;)if(1==t.nodeType)return!1;return!0},"last-child":function(t){for(;t=t.nextSibling;)if(1==t.nodeType)return!1;return!0},"only-child":function(t){for(var e=t;e=e.previousSibling;)if(1==e.nodeType)return!1;for(var n=t;n=n.nextSibling;)if(1==n.nodeType)return!1;return!0},"nth-child":t.createNTHPseudo("firstChild","nextSibling","posNTH"),"nth-last-child":t.createNTHPseudo("lastChild","previousSibling","posNTHLast"),"nth-of-type":t.createNTHPseudo("firstChild","nextSibling","posNTHType",!0),"nth-last-of-type":t.createNTHPseudo("lastChild","previousSibling","posNTHTypeLast",!0),index:function(t,e){return this["pseudo:nth-child"](t,""+(e+1)) +},even:function(t){return this["pseudo:nth-child"](t,"2n")},odd:function(t){return this["pseudo:nth-child"](t,"2n+1")},"first-of-type":function(t){for(var e=t.nodeName;t=t.previousSibling;)if(t.nodeName==e)return!1;return!0},"last-of-type":function(t){for(var e=t.nodeName;t=t.nextSibling;)if(t.nodeName==e)return!1;return!0},"only-of-type":function(t){for(var e=t,n=t.nodeName;e=e.previousSibling;)if(e.nodeName==n)return!1;for(var i=t;i=i.nextSibling;)if(i.nodeName==n)return!1;return!0},enabled:function(t){return!t.disabled},disabled:function(t){return t.disabled},checked:function(t){return t.checked||t.selected},focus:function(t){return this.isHTMLDocument&&this.document.activeElement===t&&(t.href||t.type||this.hasAttribute(t,"tabindex"))},root:function(t){return t===this.root},selected:function(t){return t.selected}};for(var c in u)t["pseudo:"+c]=u[c];var l=t.attributeGetters={"for":function(){return"htmlFor"in this?this.htmlFor:this.getAttribute("for")},href:function(){return"href"in this?this.getAttribute("href",2):this.getAttribute("href")},style:function(){return this.style?this.style.cssText:this.getAttribute("style")},tabindex:function(){var t=this.getAttributeNode("tabindex");return t&&t.specified?t.nodeValue:null},type:function(){return this.getAttribute("type")},maxlength:function(){var t=this.getAttributeNode("maxLength");return t&&t.specified?t.nodeValue:null}};l.MAXLENGTH=l.maxLength=l.maxlength;var h=t.Slick=this.Slick||{};h.version="1.1.7",h.search=function(e,n,i){return t.search(e,n,i)},h.find=function(e,n){return t.search(e,n,null,!0)},h.contains=function(e,n){return t.setDocument(e),t.contains(e,n)},h.getAttribute=function(e,n){return t.setDocument(e),t.getAttribute(e,n)},h.hasAttribute=function(e,n){return t.setDocument(e),t.hasAttribute(e,n)},h.match=function(e,n){return e&&n?n&&n!==e?(t.setDocument(e),t.matchNode(e,n)):!0:!1},h.defineAttributeGetter=function(e,n){return t.attributeGetters[e]=n,this},h.lookupAttributeGetter=function(e){return t.attributeGetters[e]},h.definePseudo=function(e,n){return t["pseudo:"+e]=function(t,e){return n.call(t,e)},this},h.lookupPseudo=function(e){var n=t["pseudo:"+e];return n?function(t){return n.call(this,t)}:null},h.override=function(e,n){return t.override(e,n),this},h.isXML=t.isXML,h.uidOf=function(e){return t.getUIDHTML(e)},this.Slick||(this.Slick=h)}.apply("undefined"!=typeof exports?exports:this);var Element=this.Element=function(t,e){var n=Element.Constructors[t];if(n)return n(e);if("string"!=typeof t)return document.id(t).set(e);if(e||(e={}),!/^[\w-]+$/.test(t)){var i=Slick.parse(t).expressions[0][0];t="*"==i.tag?"div":i.tag,i.id&&null==e.id&&(e.id=i.id);var r=i.attributes;if(r)for(var s,o=0,a=r.length;a>o;o++)s=r[o],null==e[s.key]&&(null!=s.value&&"="==s.operator?e[s.key]=s.value:s.value||s.operator||(e[s.key]=!0));i.classList&&null==e["class"]&&(e["class"]=i.classList.join(" "))}return document.newElement(t,e)};Browser.Element&&(Element.prototype=Browser.Element.prototype,Element.prototype._fireEvent=function(t){return function(e,n){return t.call(this,e,n)}}(Element.prototype.fireEvent)),new Type("Element",Element).mirror(function(t){if(!Array.prototype[t]){var e={};e[t]=function(){for(var e=[],n=arguments,i=!0,r=0,s=this.length;s>r;r++){var o=this[r],a=e[r]=o[t].apply(o,n);i=i&&"element"==typeOf(a)}return i?new Elements(e):e},Elements.implement(e)}}),Browser.Element||(Element.parent=Object,Element.Prototype={$constructor:Element,$family:Function.from("element").hide()},Element.mirror(function(t,e){Element.Prototype[t]=e})),Element.Constructors={};var IFrame=new Type("IFrame",function(){var t,e=Array.link(arguments,{properties:Type.isObject,iframe:function(t){return null!=t}}),n=e.properties||{};e.iframe&&(t=document.id(e.iframe));var i=n.onload||function(){};delete n.onload,n.id=n.name=[n.id,n.name,t?t.id||t.name:"IFrame_"+String.uniqueID()].pick(),t=new Element(t||"iframe",n);var r=function(){i.call(t.contentWindow)};return window.frames[n.id]?r():t.addListener("load",r),t}),Elements=this.Elements=function(t){if(t&&t.length)for(var e,n={},i=0;e=t[i++];){var r=Slick.uidOf(e);n[r]||(n[r]=!0,this.push(e))}};Elements.prototype={length:0},Elements.parent=Array,new Type("Elements",Elements).implement({filter:function(t,e){return t?new Elements(Array.filter(this,"string"==typeOf(t)?function(e){return e.match(t)}:t,e)):this}.protect(),push:function(){for(var t=this.length,e=0,n=arguments.length;n>e;e++){var i=document.id(arguments[e]);i&&(this[t++]=i)}return this.length=t}.protect(),unshift:function(){for(var t=[],e=0,n=arguments.length;n>e;e++){var i=document.id(arguments[e]);i&&t.push(i)}return Array.prototype.unshift.apply(this,t)}.protect(),concat:function(){for(var t=new Elements(this),e=0,n=arguments.length;n>e;e++){var i=arguments[e];Type.isEnumerable(i)?t.append(i):t.push(i)}return t}.protect(),append:function(t){for(var e=0,n=t.length;n>e;e++)this.push(t[e]);return this}.protect(),empty:function(){for(;this.length;)delete this[--this.length];return this}.protect()}),function(){var t=Array.prototype.splice,e={0:0,1:1,length:2};t.call(e,1,1),1==e[1]&&Elements.implement("splice",function(){for(var e=this.length,n=t.apply(this,arguments);e>=this.length;)delete this[e--];return n}.protect()),Array.forEachMethod(function(t,e){Elements.implement(e,t)}),Array.mirror(Elements);var n;try{n="x"==document.createElement("").name}catch(i){}var r=function(t){return(""+t).replace(/&/g,"&").replace(/"/g,""")},s=function(){var t=document.createElement("style"),e=!1;try{t.innerHTML="#justTesing{margin: 0px;}",e=!!t.innerHTML}catch(n){}return e}();Document.implement({newElement:function(t,e){if(e){if(null!=e.checked&&(e.defaultChecked=e.checked),"checkbox"!=e.type&&"radio"!=e.type||null!=e.value||(e.value="on"),!s&&"style"==t){var i=document.createElement("style");return i.setAttribute("type","text/css"),e.type&&delete e.type,this.id(i).set(e)}n&&(t="<"+t,e.name&&(t+=' name="'+r(e.name)+'"'),e.type&&(t+=' type="'+r(e.type)+'"'),t+=">",delete e.name,delete e.type)}return this.id(this.createElement(t)).set(e)}})}(),function(){Slick.uidOf(window),Slick.uidOf(document),Document.implement({newTextNode:function(t){return this.createTextNode(t)},getDocument:function(){return this},getWindow:function(){return this.window},id:function(){var t={string:function(e,n,i){return e=Slick.find(i,"#"+e.replace(/(\W)/g,"\\$1")),e?t.element(e,n):null},element:function(t,e){if(Slick.uidOf(t),!e&&!t.$family&&!/^(?:object|embed)$/i.test(t.tagName)){var n=t.fireEvent;t._fireEvent=function(t,e){return n(t,e)},Object.append(t,Element.Prototype)}return t},object:function(e,n,i){return e.toElement?t.element(e.toElement(i),n):null}};return t.textnode=t.whitespace=t.window=t.document=function(t){return t},function(e,n,i){if(e&&e.$family&&e.uniqueNumber)return e;var r=typeOf(e);return t[r]?t[r](e,n,i||document):null}}()}),null==window.$&&Window.implement("$",function(t,e){return document.id(t,e,this.document)}),Window.implement({getDocument:function(){return this.document},getWindow:function(){return this}}),[Document,Element].invoke("implement",{getElements:function(t){return Slick.search(this,t,new Elements)},getElement:function(t){return document.id(Slick.find(this,t))}});var t={contains:function(t){return Slick.contains(this,t)}};document.contains||Document.implement(t),document.createElement("div").contains||Element.implement(t);var e=function(t,e){if(!t)return e;t=Object.clone(Slick.parse(t));for(var n=t.expressions,i=n.length;i--;)n[i][0].combinator=e;return t};Object.forEach({getNext:"~",getPrevious:"!~",getParent:"!"},function(t,n){Element.implement(n,function(n){return this.getElement(e(n,t))})}),Object.forEach({getAllNext:"~",getAllPrevious:"!~",getSiblings:"~~",getChildren:">",getParents:"!"},function(t,n){Element.implement(n,function(n){return this.getElements(e(n,t))})}),Element.implement({getFirst:function(t){return document.id(Slick.search(this,e(t,">"))[0])},getLast:function(t){return document.id(Slick.search(this,e(t,">")).getLast())},getWindow:function(){return this.ownerDocument.window},getDocument:function(){return this.ownerDocument},getElementById:function(t){return document.id(Slick.find(this,"#"+(""+t).replace(/(\W)/g,"\\$1")))},match:function(t){return!t||Slick.match(this,t)}}),null==window.$$&&Window.implement("$$",function(t){if(1==arguments.length){if("string"==typeof t)return Slick.search(this.document,t,new Elements);if(Type.isEnumerable(t))return new Elements(t)}return new Elements(arguments)});var n={before:function(t,e){var n=e.parentNode;n&&n.insertBefore(t,e)},after:function(t,e){var n=e.parentNode;n&&n.insertBefore(t,e.nextSibling)},bottom:function(t,e){e.appendChild(t)},top:function(t,e){e.insertBefore(t,e.firstChild)}};n.inside=n.bottom;var i={},r={},s={};Array.forEach(["type","value","defaultValue","accessKey","cellPadding","cellSpacing","colSpan","frameBorder","rowSpan","tabIndex","useMap"],function(t){s[t.toLowerCase()]=t}),s.html="innerHTML",s.text=null==document.createElement("div").textContent?"innerText":"textContent",Object.forEach(s,function(t,e){r[e]=function(e,n){e[t]=n},i[e]=function(e){return e[t]}}),r.text=function(){return function(t,e){"style"==t.get("tag")?t.set("html",e):t[s.text]=e}}(r.text),i.text=function(t){return function(e){return"style"==e.get("tag")?e.innerHTML:t(e)}}(i.text);var o=["compact","nowrap","ismap","declare","noshade","checked","disabled","readOnly","multiple","selected","noresize","defer","defaultChecked","autofocus","controls","autoplay","loop"],a={};Array.forEach(o,function(t){var e=t.toLowerCase();a[e]=t,r[e]=function(e,n){e[t]=!!n},i[e]=function(e){return!!e[t]}}),Object.append(r,{"class":function(t,e){"className"in t?t.className=e||"":t.setAttribute("class",e)},"for":function(t,e){"htmlFor"in t?t.htmlFor=e:t.setAttribute("for",e)},style:function(t,e){t.style?t.style.cssText=e:t.setAttribute("style",e)},value:function(t,e){t.value=null!=e?e:""}}),i["class"]=function(t){return"className"in t?t.className||null:t.getAttribute("class")};var u=document.createElement("button");try{u.type="button"}catch(c){}"button"!=u.type&&(r.type=function(t,e){t.setAttribute("type",e)}),u=null;var l,h,f=function(){var t=document.createElement("style"),e=!1;try{t.innerHTML="#justTesing{margin: 0px;}",e=!!t.innerHTML}catch(n){}return e}(),p=document.createElement("input");p.value="t",p.type="submit",l="t"!=p.value;try{p.type="email",h="email"==p.type}catch(c){}p=null,(l||!h)&&(r.type=function(t,e){try{var n=t.value;t.type=e,t.value=n}catch(i){}});var d=function(t){return t.random="attribute","attribute"==t.getAttribute("random")}(document.createElement("div")),m=function(t){return t.innerHTML='',1!=t.cloneNode(!0).firstChild.childNodes.length}(document.createElement("div")),v=!!document.createElement("div").classList,g=function(t){var e=(t||"").clean().split(" "),n={};return e.filter(function(t){return""===t||n[t]?void 0:n[t]=t})},y=function(t){this.classList.add(t)},b=function(t){this.classList.remove(t)};Element.implement({setProperty:function(t,e){var n=r[t.toLowerCase()];if(n)n(this,e);else{var i;d&&(i=this.retrieve("$attributeWhiteList",{})),null==e?(this.removeAttribute(t),d&&delete i[t]):(this.setAttribute(t,""+e),d&&(i[t]=!0))}return this},setProperties:function(t){for(var e in t)this.setProperty(e,t[e]);return this},getProperty:function(t){var e=i[t.toLowerCase()];if(e)return e(this);if(d){var n=this.getAttributeNode(t),r=this.retrieve("$attributeWhiteList",{});if(!n)return null;if(n.expando&&!r[t]){var s=this.outerHTML;if(s.substr(0,s.search(/\/?['"]?>(?![^<]*<['"])/)).indexOf(t)<0)return null;r[t]=!0}}var o=Slick.getAttribute(this,t);return o||Slick.hasAttribute(this,t)?o:null},getProperties:function(){var t=Array.from(arguments);return t.map(this.getProperty,this).associate(t)},removeProperty:function(t){return this.setProperty(t,null)},removeProperties:function(){return Array.each(arguments,this.removeProperty,this),this},set:function(t,e){var n=Element.Properties[t];n&&n.set?n.set.call(this,e):this.setProperty(t,e)}.overloadSetter(),get:function(t){var e=Element.Properties[t];return e&&e.get?e.get.apply(this):this.getProperty(t)}.overloadGetter(),erase:function(t){var e=Element.Properties[t];return e&&e.erase?e.erase.apply(this):this.removeProperty(t),this},hasClass:v?function(t){return this.classList.contains(t)}:function(t){return g(this.className).contains(t)},addClass:v?function(t){return g(t).forEach(y,this),this}:function(t){return this.className=g(t+" "+this.className).join(" "),this},removeClass:v?function(t){return g(t).forEach(b,this),this}:function(t){var e=g(this.className);return g(t).forEach(e.erase,e),this.className=e.join(" "),this},toggleClass:function(t,e){return null==e&&(e=!this.hasClass(t)),e?this.addClass(t):this.removeClass(t)},adopt:function(){var t,e=this,n=Array.flatten(arguments),i=n.length;i>1&&(e=t=document.createDocumentFragment());for(var r=0;i>r;r++){var s=document.id(n[r],!0);s&&e.appendChild(s)}return t&&this.appendChild(t),this},appendText:function(t,e){return this.grab(this.getDocument().newTextNode(t),e)},grab:function(t,e){return n[e||"bottom"](document.id(t,!0),this),this},inject:function(t,e){return n[e||"bottom"](this,document.id(t,!0)),this},replaces:function(t){return t=document.id(t,!0),t.parentNode.replaceChild(this,t),this},wraps:function(t,e){return t=document.id(t,!0),this.replaces(t).grab(t,e)},getSelected:function(){return this.selectedIndex,new Elements(Array.from(this.options).filter(function(t){return t.selected}))},toQueryString:function(){var t=[];return this.getElements("input, select, textarea").each(function(e){var n=e.type;if(e.name&&!e.disabled&&"submit"!=n&&"reset"!=n&&"file"!=n&&"image"!=n){var i="select"==e.get("tag")?e.getSelected().map(function(t){return document.id(t).get("value")}):"radio"!=n&&"checkbox"!=n||e.checked?e.get("value"):null;Array.from(i).each(function(n){"undefined"!=typeof n&&t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(n))})}}),t.join("&")}});var x={before:"beforeBegin",after:"afterEnd",bottom:"beforeEnd",top:"afterBegin",inside:"beforeEnd"};Element.implement("appendHTML","insertAdjacentHTML"in document.createElement("div")?function(t,e){return this.insertAdjacentHTML(x[e||"bottom"],t),this}:function(t,e){var i=new Element("div",{html:t}),r=i.childNodes,s=i.firstChild;if(!s)return this;if(r.length>1){s=document.createDocumentFragment();for(var o=0,a=r.length;a>o;o++)s.appendChild(r[o])}return n[e||"bottom"](s,this),this});var S={},E={},w=function(t){return E[t]||(E[t]={})},k=function(t){var e=t.uniqueNumber;return t.removeEvents&&t.removeEvents(),t.clearAttributes&&t.clearAttributes(),null!=e&&(delete S[e],delete E[e]),t},O={input:"checked",option:"selected",textarea:"value"};if(Element.implement({destroy:function(){var t=k(this).getElementsByTagName("*");return Array.each(t,k),Element.dispose(this),null},empty:function(){return Array.from(this.childNodes).each(Element.dispose),this},dispose:function(){return this.parentNode?this.parentNode.removeChild(this):this},clone:function(t,e){t=t!==!1;var n,i=this.cloneNode(t),r=[i],s=[this];for(t&&(r.append(Array.from(i.getElementsByTagName("*"))),s.append(Array.from(this.getElementsByTagName("*")))),n=r.length;n--;){var o=r[n],a=s[n];if(e||o.removeAttribute("id"),o.clearAttributes&&(o.clearAttributes(),o.mergeAttributes(a),o.removeAttribute("uniqueNumber"),o.options))for(var u=o.options,c=a.options,l=u.length;l--;)u[l].selected=c[l].selected;var h=O[a.tagName.toLowerCase()];h&&a[h]&&(o[h]=a[h])}if(m){var f=i.getElementsByTagName("object"),p=this.getElementsByTagName("object");for(n=f.length;n--;)f[n].outerHTML=p[n].outerHTML}return document.id(i)}}),[Element,Window,Document].invoke("implement",{addListener:function(t,e){return window.attachEvent&&!window.addEventListener&&(S[Slick.uidOf(this)]=this),this.addEventListener?this.addEventListener(t,e,!!arguments[2]):this.attachEvent("on"+t,e),this},removeListener:function(t,e){return this.removeEventListener?this.removeEventListener(t,e,!!arguments[2]):this.detachEvent("on"+t,e),this},retrieve:function(t,e){var n=w(Slick.uidOf(this)),i=n[t];return null!=e&&null==i&&(i=n[t]=e),null!=i?i:null},store:function(t,e){var n=w(Slick.uidOf(this));return n[t]=e,this},eliminate:function(t){var e=w(Slick.uidOf(this));return delete e[t],this}}),window.attachEvent&&!window.addEventListener){var C=function(){Object.each(S,k),window.CollectGarbage&&CollectGarbage(),window.removeListener("unload",C)};window.addListener("unload",C)}Element.Properties={},Element.Properties.style={set:function(t){this.style.cssText=t},get:function(){return this.style.cssText},erase:function(){this.style.cssText=""}},Element.Properties.tag={get:function(){return this.tagName.toLowerCase()}},Element.Properties.html={set:function(t){null==t?t="":"array"==typeOf(t)&&(t=t.join("")),this.styleSheet&&!f?this.styleSheet.cssText=t:this.innerHTML=t},erase:function(){this.set("html","")}};var T=!0,N=!0,A=!0,L=document.createElement("div");if(L.innerHTML="",T=1==L.childNodes.length,!T)for(var M="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),j=document.createDocumentFragment(),P=M.length;P--;)j.createElement(M[P]);L=null,N=Function.attempt(function(){var t=document.createElement("table");return t.innerHTML="",!0});var D=document.createElement("tr"),$="";D.innerHTML=$,A=D.innerHTML==$,D=null,N&&A&&T||(Element.Properties.html.set=function(t){var e={table:[1,"","
"],select:[1,""],tbody:[2,"","
"],tr:[3,"","
"]};return e.thead=e.tfoot=e.tbody,function(n){if(this.styleSheet)return t.call(this,n);var i=e[this.get("tag")];if(i||T||(i=[0,"",""]),!i)return t.call(this,n);var r=i[0],s=document.createElement("div"),o=s;for(T||j.appendChild(s),s.innerHTML=[i[1],n,i[2]].flatten().join("");r--;)o=o.firstChild;this.empty().adopt(o.childNodes),T||j.removeChild(s),s=null}}(Element.Properties.html.set));var F=document.createElement("form");F.innerHTML="","s"!=F.firstChild.value&&(Element.Properties.value={set:function(t){var e=this.get("tag");if("select"!=e)return this.setProperty("value",t);var n=this.getElements("option");t=String(t);for(var i=0;i111&&124>o?this.key="f"+(o-111):o>95&&106>o&&(this.key=o-96)),null==this.key&&(this.key=String.fromCharCode(o).toLowerCase())}else if("click"==r||"dblclick"==r||"contextmenu"==r||"wheel"==r||"DOMMouseScroll"==r||0==r.indexOf("mouse")){var a=i.document;if(a=a.compatMode&&"CSS1Compat"!=a.compatMode?a.body:a.html,this.page={x:null!=n.pageX?n.pageX:n.clientX+a.scrollLeft,y:null!=n.pageY?n.pageY:n.clientY+a.scrollTop},this.client={x:null!=n.pageX?n.pageX-i.pageXOffset:n.clientX,y:null!=n.pageY?n.pageY-i.pageYOffset:n.clientY},("DOMMouseScroll"==r||"wheel"==r||"mousewheel"==r)&&(this.wheel=e(n)),this.rightClick=3==n.which||2==n.button,"mouseover"==r||"mouseout"==r){for(var u=n.relatedTarget||n[("mouseover"==r?"from":"to")+"Element"];u&&3==u.nodeType;)u=u.parentNode;this.relatedTarget=document.id(u)}}else if(0==r.indexOf("touch")||0==r.indexOf("gesture")){this.rotation=n.rotation,this.scale=n.scale,this.targetTouches=n.targetTouches,this.changedTouches=n.changedTouches;var c=this.touches=n.touches;if(c&&c[0]){var l=c[0];this.page={x:l.pageX,y:l.pageY},this.client={x:l.clientX,y:l.clientY}}}this.client||(this.client={}),this.page||(this.page={})});n.implement({stop:function(){return this.preventDefault().stopPropagation()},stopPropagation:function(){return this.event.stopPropagation?this.event.stopPropagation():this.event.cancelBubble=!0,this},preventDefault:function(){return this.event.preventDefault?this.event.preventDefault():this.event.returnValue=!1,this}}),n.defineKey=function(e,n){return t[e]=n,this},n.defineKeys=n.defineKey.overloadSetter(!0),n.defineKeys({38:"up",40:"down",37:"left",39:"right",27:"esc",32:"space",8:"backspace",9:"tab",46:"delete",13:"enter"})}(),function(){Element.Properties.events={set:function(t){this.addEvents(t)}},[Element,Window,Document].invoke("implement",{addEvent:function(t,e){var n=this.retrieve("events",{});if(n[t]||(n[t]={keys:[],values:[]}),n[t].keys.contains(e))return this;n[t].keys.push(e);var i=t,r=Element.Events[t],s=e,o=this;r&&(r.onAdd&&r.onAdd.call(this,e,t),r.condition&&(s=function(n){return r.condition.call(this,n,t)?e.call(this,n):!0}),r.base&&(i=Function.from(r.base).call(this,t)));var a=function(){return e.call(o)},u=Element.NativeEvents[i];return u&&(2==u&&(a=function(t){t=new DOMEvent(t,o.getWindow()),s.call(o,t)===!1&&t.stop()}),this.addListener(i,a,arguments[2])),n[t].values.push(a),this},removeEvent:function(t,e){var n=this.retrieve("events");if(!n||!n[t])return this;var i=n[t],r=i.keys.indexOf(e);if(-1==r)return this;var s=i.values[r];delete i.keys[r],delete i.values[r];var o=Element.Events[t];return o&&(o.onRemove&&o.onRemove.call(this,e,t),o.base&&(t=Function.from(o.base).call(this,t))),Element.NativeEvents[t]?this.removeListener(t,s,arguments[2]):this},addEvents:function(t){for(var e in t)this.addEvent(e,t[e]);return this},removeEvents:function(t){var e;if("object"==typeOf(t)){for(e in t)this.removeEvent(e,t[e]);return this}var n=this.retrieve("events");if(!n)return this;if(t)n[t]&&(n[t].keys.each(function(e){this.removeEvent(t,e)},this),delete n[t]);else{for(e in n)this.removeEvents(e);this.eliminate("events")}return this},fireEvent:function(t,e,n){var i=this.retrieve("events");return i&&i[t]?(e=Array.from(e),i[t].keys.each(function(t){n?t.delay(n,this,e):t.apply(this,e)},this),this):this},cloneEvents:function(t,e){t=document.id(t);var n=t.retrieve("events");if(!n)return this;if(e)n[e]&&n[e].keys.each(function(t){this.addEvent(e,t)},this);else for(var i in n)this.cloneEvents(t,i);return this}}),Element.NativeEvents={click:2,dblclick:2,mouseup:2,mousedown:2,contextmenu:2,wheel:2,mousewheel:2,DOMMouseScroll:2,mouseover:2,mouseout:2,mousemove:2,selectstart:2,selectend:2,keydown:2,keypress:2,keyup:2,orientationchange:2,touchstart:2,touchmove:2,touchend:2,touchcancel:2,gesturestart:2,gesturechange:2,gestureend:2,focus:2,blur:2,change:2,reset:2,select:2,submit:2,paste:2,input:2,load:2,unload:1,beforeunload:2,resize:1,move:1,DOMContentLoaded:1,readystatechange:1,hashchange:1,popstate:2,error:1,abort:1,scroll:1,message:2},Element.Events={mousewheel:{base:"onwheel"in document?"wheel":"onmousewheel"in document?"mousewheel":"DOMMouseScroll"}};var t=function(t){var e=t.relatedTarget;return null==e?!0:e?e!=this&&"xul"!=e.prefix&&"document"!=typeOf(this)&&!this.contains(e):!1};"onmouseenter"in document.documentElement?(Element.NativeEvents.mouseenter=Element.NativeEvents.mouseleave=2,Element.MouseenterCheck=t):(Element.Events.mouseenter={base:"mouseover",condition:t},Element.Events.mouseleave={base:"mouseout",condition:t}),window.addEventListener||(Element.NativeEvents.propertychange=2,Element.Events.change={base:function(){var t=this.type;return"input"!=this.get("tag")||"radio"!=t&&"checkbox"!=t?"change":"propertychange"},condition:function(t){return"propertychange"!=t.type||"checked"==t.event.propertyName}})}(),function(){var t=!!window.addEventListener;Element.NativeEvents.focusin=Element.NativeEvents.focusout=2;var e=function(t,e,n,i,r){for(;r&&r!=t;){if(e(r,i))return n.call(r,i,r);r=document.id(r.parentNode)}},n={mouseenter:{base:"mouseover",condition:Element.MouseenterCheck},mouseleave:{base:"mouseout",condition:Element.MouseenterCheck},focus:{base:"focus"+(t?"":"in"),capture:!0},blur:{base:t?"blur":"focusout",capture:!0}},i="$delegation:",r=function(t){return{base:"focusin",remove:function(e,n){var r=e.retrieve(i+t+"listeners",{})[n];if(r&&r.forms)for(var s=r.forms.length;s--;)r.forms[s].removeEvent&&r.forms[s].removeEvent(t,r.fns[s])},listen:function(n,r,s,o,a,u){var c="form"==a.get("tag")?a:o.target.getParent("form");if(c){var l=n.retrieve(i+t+"listeners",{}),h=l[u]||{forms:[],fns:[]},f=h.forms,p=h.fns;if(-1==f.indexOf(c)){f.push(c);var d=function(t){e(n,r,s,t,a)};c.addEvent(t,d),p.push(d),l[u]=h,n.store(i+t+"listeners",l)}}}}},s=function(t){return{base:"focusin",listen:function(n,i,r,s,o){var a={blur:function(){this.removeEvents(a)}};a[t]=function(t){e(n,i,r,t,o)},s.target.addEvents(a)}}};t||Object.append(n,{submit:r("submit"),reset:r("reset"),change:s("change"),select:s("select")});var o=Element.prototype,a=o.addEvent,u=o.removeEvent,c=function(t,e){return function(n,i,r){if(-1==n.indexOf(":relay"))return t.call(this,n,i,r);var s=Slick.parse(n).expressions[0][0];if("relay"!=s.pseudos[0].key)return t.call(this,n,i,r);var o=s.tag;return s.pseudos.slice(1).each(function(t){o+=":"+t.key+(t.value?"("+t.value+")":"")}),t.call(this,n,i),e.call(this,o,s.pseudos[0].value,i)}},l={addEvent:function(t,i,r){var s=this.retrieve("$delegates",{}),o=s[t];if(o)for(var u in o)if(o[u].fn==r&&o[u].match==i)return this;var c=t,l=i,h=r,f=n[t]||{};t=f.base||c,i=function(t){return Slick.match(t,l)};var p=Element.Events[c];if(f.condition||p&&p.condition){var d=i,m=f.condition||p.condition;i=function(e,n){return d(e,n)&&m.call(e,n,t)}}var v=this,g=String.uniqueID(),y=f.listen?function(t,e){!e&&t&&t.target&&(e=t.target),e&&f.listen(v,i,r,t,e,g)}:function(t,n){!n&&t&&t.target&&(n=t.target),n&&e(v,i,r,t,n)};return o||(o={}),o[g]={match:l,fn:h,delegator:y},s[c]=o,a.call(this,t,y,f.capture)},removeEvent:function(t,e,i,r){var s=this.retrieve("$delegates",{}),o=s[t];if(!o)return this;if(r){var a=t,c=o[r].delegator,h=n[t]||{};return t=h.base||a,h.remove&&h.remove(this,r),delete o[r],s[a]=o,u.call(this,t,c,h.capture)}var f,p;if(i){for(f in o)if(p=o[f],p.match==e&&p.fn==i)return l.removeEvent.call(this,t,e,i,f)}else for(f in o)p=o[f],p.match==e&&l.removeEvent.call(this,t,e,p.fn,f);return this}};[Element,Window,Document].invoke("implement",{addEvent:c(a,l.addEvent),removeEvent:c(u,l.removeEvent)})}(),function(){var t,e=document.html;t=document.createElement("div"),t.style.color="red",t.style.color=null;var n="red"==t.style.color,i="1px solid #123abc";t.style.border=i;var r=t.style.border!=i;t=null;var s=!!window.getComputedStyle,o=null!=document.createElement("div").style.borderRadius;Element.Properties.styles={set:function(t){this.setStyles(t)}};var a=null!=e.style.opacity,u=null!=e.style.filter,c=/alpha\(opacity=([\d.]+)\)/i,l=function(t,e){t.store("$opacity",e),t.style.visibility=e>0||null==e?"visible":"hidden"},h=function(t,e,n){var i=t.style,r=i.filter||t.getComputedStyle("filter")||"";i.filter=(e.test(r)?r.replace(e,n):r+" "+n).trim(),i.filter||i.removeAttribute("filter")},f=a?function(t,e){t.style.opacity=e}:u?function(t,e){t.currentStyle&&t.currentStyle.hasLayout||(t.style.zoom=1),null==e||1==e?(h(t,c,""),1==e&&1!=p(t)&&h(t,c,"alpha(opacity=100)")):h(t,c,"alpha(opacity="+(100*e).limit(0,100).round()+")")}:l,p=a?function(t){var e=t.style.opacity||t.getComputedStyle("opacity");return""==e?1:e.toFloat()}:u?function(t){var e,n=t.style.filter||t.getComputedStyle("filter");return n&&(e=n.match(c)),null==e||null==n?1:e[1]/100}:function(t){var e=t.retrieve("$opacity");return null==e&&(e="hidden"==t.style.visibility?0:1),e},d=null==e.style.cssFloat?"styleFloat":"cssFloat",m={left:"0%",top:"0%",center:"50%",right:"100%",bottom:"100%"},v=null!=e.style.backgroundPositionX,g=function(t,e){"backgroundPosition"==e&&(t.removeAttribute(e+"X"),e+="Y"),t.removeAttribute(e)};Element.implement({getComputedStyle:function(t){if(!s&&this.currentStyle)return this.currentStyle[t.camelCase()];var e=Element.getDocument(this).defaultView,n=e?e.getComputedStyle(this,null):null;return n?n.getPropertyValue(t==d?"float":t.hyphenate()):""},setStyle:function(t,e){if("opacity"==t)return null!=e&&(e=parseFloat(e)),f(this,e),this;if(t=("float"==t?d:t).camelCase(),"string"!=typeOf(e)){var i=(Element.Styles[t]||"@").split(" ");e=Array.from(e).map(function(t,e){return i[e]?"number"==typeOf(t)?i[e].replace("@",Math.round(t)):t:""}).join(" ")}else e==String(Number(e))&&(e=Math.round(e));return this.style[t]=e,(""==e||null==e)&&n&&this.style.removeAttribute&&g(this.style,t),this},getStyle:function(t){if("opacity"==t)return p(this);if(t=("float"==t?d:t).camelCase(),o&&-1!=t.indexOf("borderRadius"))return["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"].map(function(t){return this.style[t]||"0px"},this).join(" ");var e=this.style[t];if(!e||"zIndex"==t){if(Element.ShortStyles.hasOwnProperty(t)){e=[];for(var n in Element.ShortStyles[t])e.push(this.getStyle(n));return e.join(" ")}e=this.getComputedStyle(t)}if(v&&/^backgroundPosition[XY]?$/.test(t))return e.replace(/(top|right|bottom|left)/g,function(t){return m[t]})||"0px";if(!e&&"backgroundPosition"==t)return"0px 0px";if(e){e=String(e);var i=e.match(/rgba?\([\d\s,]+\)/);i&&(e=e.replace(i[0],i[0].rgbToHex()))}if(!s&&!this.style[t]){if(/^(height|width)$/.test(t)&&!/px$/.test(e)){var a="width"==t?["left","right"]:["top","bottom"],u=0;return a.each(function(t){u+=this.getStyle("border-"+t+"-width").toInt()+this.getStyle("padding-"+t).toInt()},this),this["offset"+t.capitalize()]-u+"px"}if(/^border(.+)Width|margin|padding/.test(t)&&isNaN(parseFloat(e)))return"0px"}return r&&/^border(Top|Right|Bottom|Left)?$/.test(t)&&/^#/.test(e)?e.replace(/^(.+)\s(.+)\s(.+)$/,"$2 $3 $1"):e},setStyles:function(t){for(var e in t)this.setStyle(e,t[e]);return this},getStyles:function(){var t={};return Array.flatten(arguments).each(function(e){t[e]=this.getStyle(e)},this),t}}),Element.Styles={left:"@px",top:"@px",bottom:"@px",right:"@px",width:"@px",height:"@px",maxWidth:"@px",maxHeight:"@px",minWidth:"@px",minHeight:"@px",backgroundColor:"rgb(@, @, @)",backgroundSize:"@px",backgroundPosition:"@px @px",color:"rgb(@, @, @)",fontSize:"@px",letterSpacing:"@px",lineHeight:"@px",clip:"rect(@px @px @px @px)",margin:"@px @px @px @px",padding:"@px @px @px @px",border:"@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)",borderWidth:"@px @px @px @px",borderStyle:"@ @ @ @",borderColor:"rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)",zIndex:"@",zoom:"@",fontWeight:"@",textIndent:"@px",opacity:"@",borderRadius:"@px @px @px @px"},Element.ShortStyles={margin:{},padding:{},border:{},borderWidth:{},borderStyle:{},borderColor:{}},["Top","Right","Bottom","Left"].each(function(t){var e=Element.ShortStyles,n=Element.Styles;["margin","padding"].each(function(i){var r=i+t;e[i][r]=n[r]="@px"});var i="border"+t;e.border[i]=n[i]="@px @ rgb(@, @, @)";var r=i+"Width",s=i+"Style",o=i+"Color";e[i]={},e.borderWidth[r]=e[i][r]=n[r]="@px",e.borderStyle[s]=e[i][s]=n[s]="@",e.borderColor[o]=e[i][o]=n[o]="rgb(@, @, @)"}),v&&(Element.ShortStyles.backgroundPosition={backgroundPositionX:"@",backgroundPositionY:"@"}) +}(),function(){function t(t,e){return p(t,e).toInt()||0}function e(e){return t(e,"border-top-width")}function n(e){return t(e,"border-left-width")}function i(t){return/^(?:body|html)$/i.test(t.tagName)}function r(t){var e=t.getDocument();return e.compatMode&&"CSS1Compat"!=e.compatMode?e.body:e.html}var s=document.createElement("div"),o=document.createElement("div");s.style.height="0",s.appendChild(o);var a=o.offsetParent===s;s=o=null;var u=["height","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth"],c=["width","paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],l=function(t){var e=window.getComputedStyle(t),n={x:0,y:0};return u.each(function(t){n.y+=parseFloat(e[t])}),c.each(function(t){n.x+=parseFloat(e[t])}),n},h=function(t){return"static"!=p(t,"position")||i(t)},f=function(t){return h(t)||/^(?:table|td|th)$/i.test(t.tagName)};Element.implement({scrollTo:function(t,e){return i(this)?this.getWindow().scrollTo(t,e):(this.scrollLeft=t,this.scrollTop=e),this},getSize:function(){if(i(this))return this.getWindow().getSize();if(!window.getComputedStyle)return{x:this.offsetWidth,y:this.offsetHeight};if("svg"==this.get("tag"))return l(this);var t=this.getBoundingClientRect();return{x:t.width,y:t.height}},getScrollSize:function(){return i(this)?this.getWindow().getScrollSize():{x:this.scrollWidth,y:this.scrollHeight}},getScroll:function(){return i(this)?this.getWindow().getScroll():{x:this.scrollLeft,y:this.scrollTop}},getScrolls:function(){for(var t=this.parentNode,e={x:0,y:0};t&&!i(t);)e.x+=t.scrollLeft,e.y+=t.scrollTop,t=t.parentNode;return e},getOffsetParent:a?function(){var t=this;if(i(t)||"fixed"==p(t,"position"))return null;for(var e="static"==p(t,"position")?f:h;t=t.parentNode;)if(e(t))return t;return null}:function(){var t=this;if(i(t)||"fixed"==p(t,"position"))return null;try{return t.offsetParent}catch(e){}return null},getOffsets:function(){var t=this.getBoundingClientRect;if(t){var e=this.getBoundingClientRect(),n=document.id(this.getDocument().documentElement),r=n.getScroll(),s=this.getScrolls(),o="fixed"==p(this,"position");return{x:e.left.toInt()+s.x+(o?0:r.x)-n.clientLeft,y:e.top.toInt()+s.y+(o?0:r.y)-n.clientTop}}var a=this,u={x:0,y:0};if(i(this))return u;for(;a&&!i(a);)u.x+=a.offsetLeft,u.y+=a.offsetTop,a=a.offsetParent;return u},getPosition:function(t){var i=this.getOffsets(),r=this.getScrolls(),s={x:i.x-r.x,y:i.y-r.y};if(t&&(t=document.id(t))){var o=t.getPosition();return{x:s.x-o.x-n(t),y:s.y-o.y-e(t)}}return s},getCoordinates:function(t){if(i(this))return this.getWindow().getCoordinates();var e=this.getPosition(t),n=this.getSize(),r={left:e.x,top:e.y,width:n.x,height:n.y};return r.right=r.left+r.width,r.bottom=r.top+r.height,r},computePosition:function(e){return{left:e.x-t(this,"margin-left"),top:e.y-t(this,"margin-top")}},setPosition:function(t){return this.setStyles(this.computePosition(t))}}),[Document,Window].invoke("implement",{getSize:function(){var t=r(this);return{x:t.clientWidth,y:t.clientHeight}},getScroll:function(){var t=this.getWindow(),e=r(this);return{x:t.pageXOffset||e.scrollLeft,y:t.pageYOffset||e.scrollTop}},getScrollSize:function(){var t=r(this),e=this.getSize(),n=this.getDocument().body;return{x:Math.max(t.scrollWidth,n.scrollWidth,e.x),y:Math.max(t.scrollHeight,n.scrollHeight,e.y)}},getPosition:function(){return{x:0,y:0}},getCoordinates:function(){var t=this.getSize();return{top:0,left:0,bottom:t.y,right:t.x,height:t.y,width:t.x}}});var p=Element.getComputedStyle}(),Element.alias({position:"setPosition"}),[Window,Document,Element].invoke("implement",{getHeight:function(){return this.getSize().y},getWidth:function(){return this.getSize().x},getScrollTop:function(){return this.getScroll().y},getScrollLeft:function(){return this.getScroll().x},getScrollHeight:function(){return this.getScrollSize().y},getScrollWidth:function(){return this.getScrollSize().x},getTop:function(){return this.getPosition().y},getLeft:function(){return this.getPosition().x}}),function(){var t=this.Fx=new Class({Implements:[Chain,Events,Options],options:{fps:60,unit:!1,duration:500,frames:null,frameSkip:!0,link:"ignore"},initialize:function(t){this.subject=this.subject||this,this.setOptions(t)},getTransition:function(){return function(t){return-(Math.cos(Math.PI*t)-1)/2}},step:function(t){if(this.options.frameSkip){var e=null!=this.time?t-this.time:0,n=e/this.frameInterval;this.time=t,this.frame+=n}else this.frame++;if(this.frame-1&&-1==e.indexOf(document.domain))){var n=t.rules||t.cssRules;i(n)}}),Fx.CSS.Cache[t]=e}}),Fx.CSS.Cache={},Fx.CSS.Parsers={Color:{parse:function(t){return t.match(/^#[0-9a-f]{3,6}$/i)?t.hexToRgb(!0):(t=t.match(/(\d+),\s*(\d+),\s*(\d+)/))?[t[1],t[2],t[3]]:!1},compute:function(t,e,n){return t.map(function(i,r){return Math.round(Fx.compute(t[r],e[r],n))})},serve:function(t){return t.map(Number)}},Number:{parse:parseFloat,compute:Fx.compute,serve:function(t,e){return e?t+e:t}},String:{parse:Function.from(!1),compute:function(t,e){return e},serve:function(t){return t}}},Fx.Morph=new Class({Extends:Fx.CSS,initialize:function(t,e){this.element=this.subject=document.id(t),this.parent(e)},set:function(t){"string"==typeof t&&(t=this.search(t));for(var e in t)this.render(this.element,e,t[e],this.options.unit);return this},compute:function(t,e,n){var i={};for(var r in t)i[r]=this.parent(t[r],e[r],n);return i},start:function(t){if(!this.check(t))return this;"string"==typeof t&&(t=this.search(t));var e={},n={};for(var i in t){var r=this.prepare(this.element,i,t[i]);e[i]=r.from,n[i]=r.to}return this.parent(e,n)}}),Element.Properties.morph={set:function(t){return this.get("morph").cancel().setOptions(t),this},get:function(){var t=this.retrieve("morph");return t||(t=new Fx.Morph(this,{link:"cancel"}),this.store("morph",t)),t}},Element.implement({morph:function(t){return this.get("morph").start(t),this}}),Fx.implement({getTransition:function(){var t=this.options.transition||Fx.Transitions.Sine.easeInOut;if("string"==typeof t){var e=t.split(":");t=Fx.Transitions,t=t[e[0]]||t[e[0].capitalize()],e[1]&&(t=t["ease"+e[1].capitalize()+(e[2]?e[2].capitalize():"")])}return t}}),Fx.Transition=function(t,e){e=Array.from(e);var n=function(n){return t(n,e)};return Object.append(n,{easeIn:n,easeOut:function(n){return 1-t(1-n,e)},easeInOut:function(n){return(.5>=n?t(2*n,e):2-t(2*(1-n),e))/2}})},Fx.Transitions={linear:function(t){return t}},Fx.Transitions.extend=function(t){for(var e in t)Fx.Transitions[e]=new Fx.Transition(t[e])},Fx.Transitions.extend({Pow:function(t,e){return Math.pow(t,e&&e[0]||6)},Expo:function(t){return Math.pow(2,8*(t-1))},Circ:function(t){return 1-Math.sin(Math.acos(t))},Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Back:function(t,e){return e=e&&e[0]||1.618,Math.pow(t,2)*((e+1)*t-e)},Bounce:function(t){for(var e,n=0,i=1;1;n+=i,i/=2)if(t>=(7-4*n)/11){e=i*i-Math.pow((11-6*n-11*t)/4,2);break}return e},Elastic:function(t,e){return Math.pow(2,10*--t)*Math.cos(20*t*Math.PI*(e&&e[0]||1)/3)}}),["Quad","Cubic","Quart","Quint"].each(function(t,e){Fx.Transitions[t]=new Fx.Transition(function(t){return Math.pow(t,e+2)})}),Fx.Tween=new Class({Extends:Fx.CSS,initialize:function(t,e){this.element=this.subject=document.id(t),this.parent(e)},set:function(t,e){return 1==arguments.length&&(e=t,t=this.property||this.options.property),this.render(this.element,t,e,this.options.unit),this},start:function(t,e,n){if(!this.check(t,e,n))return this;var i=Array.flatten(arguments);this.property=this.options.property||i.shift();var r=this.prepare(this.element,this.property,i);return this.parent(r.from,r.to)}}),Element.Properties.tween={set:function(t){return this.get("tween").cancel().setOptions(t),this},get:function(){var t=this.retrieve("tween");return t||(t=new Fx.Tween(this,{link:"cancel"}),this.store("tween",t)),t}},Element.implement({tween:function(t,e,n){return this.get("tween").start(t,e,n),this},fade:function(){var t,e,n=this.get("tween"),i=["opacity"].append(arguments);switch(null==i[1]&&(i[1]="toggle"),i[1]){case"in":t="start",i[1]=1;break;case"out":t="start",i[1]=0;break;case"show":t="set",i[1]=1;break;case"hide":t="set",i[1]=0;break;case"toggle":var r=this.retrieve("fade:flag",1==this.getStyle("opacity"));t="start",i[1]=r?0:1,this.store("fade:flag",!r),e=!0;break;default:t="start"}e||this.eliminate("fade:flag"),n[t].apply(n,i);var s=i[i.length-1];return"set"==t||0!=s?this.setStyle("visibility",0==s?"hidden":"visible"):n.chain(function(){this.element.setStyle("visibility","hidden"),this.callChain()}),this},highlight:function(t,e){e||(e=this.retrieve("highlight:original",this.getStyle("background-color")),e="transparent"==e?"#fff":e);var n=this.get("tween");return n.start("background-color",t||"#ffff88",e).chain(function(){this.setStyle("background-color",this.retrieve("highlight:original")),n.callChain()}.bind(this)),this}}),function(){var t=function(){},e="onprogress"in new Browser.Request,n=this.Request=new Class({Implements:[Chain,Events,Options],options:{url:"",data:"",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:!0,format:!1,method:"post",link:"ignore",isSuccess:null,emulation:!0,urlEncoded:!0,encoding:"utf-8",evalScripts:!1,evalResponse:!1,timeout:0,noCache:!1},initialize:function(t){this.xhr=new Browser.Request,this.setOptions(t),this.headers=this.options.headers},onStateChange:function(){var n=this.xhr;4==n.readyState&&this.running&&(this.running=!1,this.status=0,Function.attempt(function(){var t=n.status;this.status=1223==t?204:t}.bind(this)),n.onreadystatechange=t,e&&(n.onprogress=n.onloadstart=t),this.timer&&(clearTimeout(this.timer),delete this.timer),this.response={text:this.xhr.responseText||"",xml:this.xhr.responseXML},this.options.isSuccess.call(this,this.status)?this.success(this.response.text,this.response.xml):this.failure())},isSuccess:function(){var t=this.status;return t>=200&&300>t},isRunning:function(){return!!this.running},processScripts:function(t){return this.options.evalResponse||/(ecma|java)script/.test(this.getHeader("Content-type"))?Browser.exec(t):t.stripScripts(this.options.evalScripts)},success:function(t,e){this.onSuccess(this.processScripts(t),e)},onSuccess:function(){this.fireEvent("complete",arguments).fireEvent("success",arguments).callChain()},failure:function(){this.onFailure()},onFailure:function(){this.fireEvent("complete").fireEvent("failure",this.xhr)},loadstart:function(t){this.fireEvent("loadstart",[t,this.xhr])},progress:function(t){this.fireEvent("progress",[t,this.xhr])},timeout:function(){this.fireEvent("timeout",this.xhr)},setHeader:function(t,e){return this.headers[t]=e,this},getHeader:function(t){return Function.attempt(function(){return this.xhr.getResponseHeader(t)}.bind(this))},check:function(){if(!this.running)return!0;switch(this.options.link){case"cancel":return this.cancel(),!0;case"chain":return this.chain(this.caller.pass(arguments,this)),!1}return!1},send:function(t){if(!this.check(t))return this;this.options.isSuccess=this.options.isSuccess||this.isSuccess,this.running=!0;var n=typeOf(t);("string"==n||"element"==n)&&(t={data:t});var i=this.options;t=Object.append({data:i.data,url:i.url,method:i.method},t);var r=t.data,s=String(t.url),o=t.method.toLowerCase();switch(typeOf(r)){case"element":r=document.id(r).toQueryString();break;case"object":case"hash":r=Object.toQueryString(r)}if(this.options.format){var a="format="+this.options.format;r=r?a+"&"+r:a}if(this.options.emulation&&!["get","post"].contains(o)){var u="_method="+o;r=r?u+"&"+r:u,o="post"}if(this.options.urlEncoded&&["post","put"].contains(o)){var c=this.options.encoding?"; charset="+this.options.encoding:"";this.headers["Content-type"]="application/x-www-form-urlencoded"+c}s||(s=document.location.pathname);var l=s.lastIndexOf("/");l>-1&&(l=s.indexOf("#"))>-1&&(s=s.substr(0,l)),this.options.noCache&&(s+=(s.indexOf("?")>-1?"&":"?")+String.uniqueID()),!r||"get"!=o&&"delete"!=o||(s+=(s.indexOf("?")>-1?"&":"?")+r,r=null);var h=this.xhr;return e&&(h.onloadstart=this.loadstart.bind(this),h.onprogress=this.progress.bind(this)),h.open(o.toUpperCase(),s,this.options.async,this.options.user,this.options.password),this.options.withCredentials&&"withCredentials"in h&&(h.withCredentials=!0),h.onreadystatechange=this.onStateChange.bind(this),Object.each(this.headers,function(t,e){try{h.setRequestHeader(e,t)}catch(n){this.fireEvent("exception",[e,t])}},this),this.fireEvent("request"),h.send(r),this.options.async?this.options.timeout&&(this.timer=this.timeout.delay(this.options.timeout,this)):this.onStateChange(),this},cancel:function(){if(!this.running)return this;this.running=!1;var n=this.xhr;return n.abort(),this.timer&&(clearTimeout(this.timer),delete this.timer),n.onreadystatechange=t,e&&(n.onprogress=n.onloadstart=t),this.xhr=new Browser.Request,this.fireEvent("cancel"),this}}),i={};["get","post","put","delete","patch","head","GET","POST","PUT","DELETE","PATCH","HEAD"].each(function(t){i[t]=function(e){var n={method:t};return null!=e&&(n.data=e),this.send(n)}}),n.implement(i),Element.Properties.send={set:function(t){var e=this.get("send").cancel();return e.setOptions(t),this},get:function(){var t=this.retrieve("send");return t||(t=new n({data:this,link:"cancel",method:this.get("method")||"post",url:this.get("action")}),this.store("send",t)),t}},Element.implement({send:function(t){var e=this.get("send");return e.send({data:this,url:t||e.options.url}),this}})}(),Request.HTML=new Class({Extends:Request,options:{update:!1,append:!1,evalScripts:!0,filter:!1,headers:{Accept:"text/html, application/xml, text/xml, */*"}},success:function(t){var e=this.options,n=this.response;n.html=t.stripScripts(function(t){n.javascript=t});var i=n.html.match(/]*>([\s\S]*?)<\/body>/i);i&&(n.html=i[1]);var r=new Element("div").set("html",n.html);if(n.tree=r.childNodes,n.elements=r.getElements(e.filter||"*"),e.filter&&(n.tree=n.elements),e.update){var s=document.id(e.update).empty();e.filter?s.adopt(n.elements):s.set("html",n.html)}else if(e.append){var o=document.id(e.append);e.filter?n.elements.reverse().inject(o):o.adopt(r.getChildren())}e.evalScripts&&Browser.exec(n.javascript),this.onSuccess(n.tree,n.elements,n.html,n.javascript)}}),Element.Properties.load={set:function(t){var e=this.get("load").cancel();return e.setOptions(t),this},get:function(){var t=this.retrieve("load");return t||(t=new Request.HTML({data:this,link:"cancel",update:this,method:"get"}),this.store("load",t)),t}},Element.implement({load:function(){return this.get("load").send(Array.link(arguments,{data:Type.isObject,url:Type.isString})),this}}),"undefined"==typeof JSON&&(this.JSON={}),function(){var special={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},escape=function(t){return special[t]||"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)};JSON.validate=function(t){return t=t.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""),/^[\],:{}\s]*$/.test(t)},JSON.encode=JSON.stringify?function(t){return JSON.stringify(t)}:function(t){switch(t&&t.toJSON&&(t=t.toJSON()),typeOf(t)){case"string":return'"'+t.replace(/[\x00-\x1f\\"]/g,escape)+'"';case"array":return"["+t.map(JSON.encode).clean()+"]";case"object":case"hash":var e=[];return Object.each(t,function(t,n){var i=JSON.encode(t);i&&e.push(JSON.encode(n)+":"+i)}),"{"+e+"}";case"number":case"boolean":return""+t;case"null":return"null"}return null},JSON.secure=!0,JSON.decode=function(string,secure){if(!string||"string"!=typeOf(string))return null;if(null==secure&&(secure=JSON.secure),secure){if(JSON.parse)return JSON.parse(string);if(!JSON.validate(string))throw new Error("JSON could not decode the input; security is enabled and the value is not secure.")}return eval("("+string+")")}}(),Request.JSON=new Class({Extends:Request,options:{secure:!0},initialize:function(t){this.parent(t),Object.append(this.headers,{Accept:"application/json","X-Request":"JSON"})},success:function(t){var e;try{e=this.response.json=JSON.decode(t,this.options.secure)}catch(n){return void this.fireEvent("error",[t,n])}null==e?this.onFailure():this.onSuccess(e,t)}});var Cookie=new Class({Implements:Options,options:{path:"/",domain:!1,duration:!1,secure:!1,document:document,encode:!0},initialize:function(t,e){this.key=t,this.setOptions(e)},write:function(t){if(this.options.encode&&(t=encodeURIComponent(t)),this.options.domain&&(t+="; domain="+this.options.domain),this.options.path&&(t+="; path="+this.options.path),this.options.duration){var e=new Date;e.setTime(e.getTime()+24*this.options.duration*60*60*1e3),t+="; expires="+e.toGMTString()}return this.options.secure&&(t+="; secure"),this.options.document.cookie=this.key+"="+t,this},read:function(){var t=this.options.document.cookie.match("(?:^|;)\\s*"+this.key.escapeRegExp()+"=([^;]*)");return t?decodeURIComponent(t[1]):null},dispose:function(){return new Cookie(this.key,Object.merge({},this.options,{duration:-1})).write(""),this}});Cookie.write=function(t,e,n){return new Cookie(t,n).write(e)},Cookie.read=function(t){return new Cookie(t).read()},Cookie.dispose=function(t,e){return new Cookie(t,e).dispose()},function(t,e){var n,i,r,s,o=[],a=e.createElement("div"),u=function(){clearTimeout(s),n||(Browser.loaded=n=!0,e.removeListener("DOMContentLoaded",u).removeListener("readystatechange",c),e.fireEvent("domready"),t.fireEvent("domready")),e=t=a=null},c=function(){for(var t=o.length;t--;)if(o[t]())return u(),!0;return!1},l=function(){clearTimeout(s),c()||(s=setTimeout(l,10))};e.addListener("DOMContentLoaded",u);var h=function(){try{return a.doScroll(),!0}catch(t){}return!1};a.doScroll&&!h()&&(o.push(h),r=!0),e.readyState&&o.push(function(){var t=e.readyState;return"loaded"==t||"complete"==t}),"onreadystatechange"in e?e.addListener("readystatechange",c):r=!0,r&&l(),Element.Events.domready={onAdd:function(t){n&&t.call(this)}},Element.Events.load={base:"load",onAdd:function(e){i&&this==t&&e.call(this)},condition:function(){return this==t&&(u(),delete Element.Events.load),!0}},t.addEvent("load",function(){i=!0})}(window,document),MooTools.More={version:"1.5.1",build:"2dd695ba957196ae4b0275a690765d6636a61ccd"},Class.refactor=function(t,e){return Object.each(e,function(e,n){var i=t.prototype[n];i=i&&i.$origin||i||function(){},t.implement(n,"function"==typeof e?function(){var t=this.previous;this.previous=i;var n=e.apply(this,arguments);return this.previous=t,n}:e)}),t},Element.implement({isDisplayed:function(){return"none"!=this.getStyle("display")},isVisible:function(){var t=this.offsetWidth,e=this.offsetHeight;return 0==t&&0==e?!1:t>0&&e>0?!0:"none"!=this.style.display},toggle:function(){return this[this.isDisplayed()?"hide":"show"]()},hide:function(){var t;try{t=this.getStyle("display")}catch(e){}return"none"==t?this:this.store("element:_originalDisplay",t||"").setStyle("display","none")},show:function(t){return!t&&this.isDisplayed()?this:(t=t||this.retrieve("element:_originalDisplay")||"block",this.setStyle("display","none"==t?"block":t))},swapClass:function(t,e){return this.removeClass(t).addClass(e)}}),Document.implement({clearSelection:function(){if(window.getSelection){var t=window.getSelection();t&&t.removeAllRanges&&t.removeAllRanges()}else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(e){}}}),function(){var t=function(t,e){var n=[];return Object.each(e,function(e){Object.each(e,function(e){t.each(function(t){n.push(t+"-"+e+("border"==t?"-width":""))})})}),n},e=function(t,e){var n=0;return Object.each(e,function(e,i){i.test(t)&&(n+=e.toInt())}),n},n=function(t){return!(t&&!t.offsetHeight&&!t.offsetWidth)};Element.implement({measure:function(t){if(n(this))return t.call(this);for(var e=this.getParent(),i=[];!n(e)&&e!=document.body;)i.push(e.expose()),e=e.getParent();var r=this.expose(),s=t.call(this);return r(),i.each(function(t){t()}),s},expose:function(){if("none"!=this.getStyle("display"))return function(){};var t=this.style.cssText;return this.setStyles({display:"block",position:"absolute",visibility:"hidden"}),function(){this.style.cssText=t}.bind(this)},getDimensions:function(t){t=Object.merge({computeSize:!1},t);var e={x:0,y:0},n=function(t,e){return e.computeSize?t.getComputedSize(e):t.getSize()},i=this.getParent("body");if(i&&"none"==this.getStyle("display"))e=this.measure(function(){return n(this,t)});else if(i)try{e=n(this,t)}catch(r){}return Object.append(e,e.x||0===e.x?{width:e.x,height:e.y}:{x:e.width,y:e.height})},getComputedSize:function(n){n=Object.merge({styles:["padding","border"],planes:{height:["top","bottom"],width:["left","right"]},mode:"both"},n);var i,r={},s={width:0,height:0};return"vertical"==n.mode?(delete s.width,delete n.planes.width):"horizontal"==n.mode&&(delete s.height,delete n.planes.height),t(n.styles,n.planes).each(function(t){r[t]=this.getStyle(t).toInt()},this),Object.each(n.planes,function(t,n){var o=n.capitalize(),a=this.getStyle(n);"auto"!=a||i||(i=this.getDimensions()),a=r[n]="auto"==a?i[n]:a.toInt(),s["total"+o]=a,t.each(function(t){var n=e(t,r);s["computed"+t.capitalize()]=n,s["total"+o]+=n})},this),Object.append(s,r)}})}(),function(){var t=function(t){var e=t.options.hideInputs;if(window.OverText){var n=[null];OverText.each(function(t){n.include("."+t.options.labelClass)}),n&&(e+=n.join(", "))}return e?t.element.getElements(e):null};Fx.Reveal=new Class({Extends:Fx.Morph,options:{link:"cancel",styles:["padding","border","margin"],transitionOpacity:"opacity"in document.documentElement,mode:"vertical",display:function(){return"tr"!=this.element.get("tag")?"block":"table-row"},opacity:1,hideInputs:"opacity"in document.documentElement?null:"select, input, textarea, object, embed"},dissolve:function(){if(this.hiding||this.showing)"chain"==this.options.link?this.chain(this.dissolve.bind(this)):"cancel"!=this.options.link||this.hiding||(this.cancel(),this.dissolve());else if("none"!=this.element.getStyle("display")){this.hiding=!0,this.showing=!1,this.hidden=!0,this.cssText=this.element.style.cssText;var e=this.element.getComputedSize({styles:this.options.styles,mode:this.options.mode});this.options.transitionOpacity&&(e.opacity=this.options.opacity);var n={};Object.each(e,function(t,e){n[e]=[t,0]}),this.element.setStyles({display:Function.from(this.options.display).call(this),overflow:"hidden"});var i=t(this);i&&i.setStyle("visibility","hidden"),this.$chain.unshift(function(){this.hidden&&(this.hiding=!1,this.element.style.cssText=this.cssText,this.element.setStyle("display","none"),i&&i.setStyle("visibility","visible")),this.fireEvent("hide",this.element),this.callChain()}.bind(this)),this.start(n)}else this.callChain.delay(10,this),this.fireEvent("complete",this.element),this.fireEvent("hide",this.element);return this},reveal:function(){if(this.showing||this.hiding)"chain"==this.options.link?this.chain(this.reveal.bind(this)):"cancel"!=this.options.link||this.showing||(this.cancel(),this.reveal());else if("none"==this.element.getStyle("display")){this.hiding=!1,this.showing=!0,this.hidden=!1,this.cssText=this.element.style.cssText;var e;this.element.measure(function(){e=this.element.getComputedSize({styles:this.options.styles,mode:this.options.mode})}.bind(this)),null!=this.options.heightOverride&&(e.height=this.options.heightOverride.toInt()),null!=this.options.widthOverride&&(e.width=this.options.widthOverride.toInt()),this.options.transitionOpacity&&(this.element.setStyle("opacity",0),e.opacity=this.options.opacity);var n={height:0,display:Function.from(this.options.display).call(this)};Object.each(e,function(t,e){n[e]=0}),n.overflow="hidden",this.element.setStyles(n);var i=t(this);i&&i.setStyle("visibility","hidden"),this.$chain.unshift(function(){this.element.style.cssText=this.cssText,this.element.setStyle("display",Function.from(this.options.display).call(this)),this.hidden||(this.showing=!1),i&&i.setStyle("visibility","visible"),this.callChain(),this.fireEvent("show",this.element)}.bind(this)),this.start(e)}else this.callChain(),this.fireEvent("complete",this.element),this.fireEvent("show",this.element);return this},toggle:function(){return"none"==this.element.getStyle("display")?this.reveal():this.dissolve(),this},cancel:function(){return this.parent.apply(this,arguments),null!=this.cssText&&(this.element.style.cssText=this.cssText),this.hiding=!1,this.showing=!1,this}}),Element.Properties.reveal={set:function(t){return this.get("reveal").cancel().setOptions(t),this},get:function(){var t=this.retrieve("reveal");return t||(t=new Fx.Reveal(this),this.store("reveal",t)),t}},Element.Properties.dissolve=Element.Properties.reveal,Element.implement({reveal:function(t){return this.get("reveal").setOptions(t).reveal(),this},dissolve:function(t){return this.get("reveal").setOptions(t).dissolve(),this},nix:function(t){var e=Array.link(arguments,{destroy:Type.isBoolean,options:Type.isObject});return this.get("reveal").setOptions(t).dissolve().chain(function(){this[e.destroy?"destroy":"dispose"]()}.bind(this)),this},wink:function(){var t=Array.link(arguments,{duration:Type.isNumber,options:Type.isObject}),e=this.get("reveal").setOptions(t.options);e.reveal().chain(function(){(function(){e.dissolve()}).delay(t.duration||2e3)})}})}(),Fx.Elements=new Class({Extends:Fx.CSS,initialize:function(t,e){this.elements=this.subject=$$(t),this.parent(e)},compute:function(t,e,n){var i={};for(var r in t){var s=t[r],o=e[r],a=i[r]={};for(var u in s)a[u]=this.parent(s[u],o[u],n)}return i},set:function(t){for(var e in t)if(this.elements[e]){var n=t[e];for(var i in n)this.render(this.elements[e],i,n[i],this.options.unit)}return this},start:function(t){if(!this.check(t))return this;var e={},n={};for(var i in t)if(this.elements[i]){var r=t[i],s=e[i]={},o=n[i]={};for(var a in r){var u=this.prepare(this.elements[i],a,r[a]);s[a]=u.from,o[a]=u.to}}return this.parent(e,n)}}),Fx.Slide=new Class({Extends:Fx,options:{mode:"vertical",wrapper:!1,hideOverflow:!0,resetHeight:!1},initialize:function(t,e){t=this.element=this.subject=document.id(t),this.parent(e),e=this.options;var n=t.retrieve("wrapper"),i=t.getStyles("margin","position","overflow");e.hideOverflow&&(i=Object.append(i,{overflow:"hidden"})),e.wrapper&&(n=document.id(e.wrapper).setStyles(i)),n||(n=new Element("div",{styles:i}).wraps(t)),t.store("wrapper",n).setStyle("margin",0),"visible"==t.getStyle("overflow")&&t.setStyle("overflow","hidden"),this.now=[],this.open=!0,this.wrapper=n,this.addEvent("complete",function(){this.open=0!=n["offset"+this.layout.capitalize()],this.open&&this.options.resetHeight&&n.setStyle("height","")},!0)},vertical:function(){this.margin="margin-top",this.layout="height",this.offset=this.element.offsetHeight},horizontal:function(){this.margin="margin-left",this.layout="width",this.offset=this.element.offsetWidth},set:function(t){return this.element.setStyle(this.margin,t[0]),this.wrapper.setStyle(this.layout,t[1]),this},compute:function(t,e,n){return[0,1].map(function(i){return Fx.compute(t[i],e[i],n)})},start:function(t,e){if(!this.check(t,e))return this;this[e||this.options.mode]();var n,i=this.element.getStyle(this.margin).toInt(),r=this.wrapper.getStyle(this.layout).toInt(),s=[[i,r],[0,this.offset]],o=[[i,r],[-this.offset,0]];switch(t){case"in":n=s;break;case"out":n=o;break;case"toggle":n=0==r?s:o}return this.parent(n[0],n[1])},slideIn:function(t){return this.start("in",t)},slideOut:function(t){return this.start("out",t)},hide:function(t){return this[t||this.options.mode](),this.open=!1,this.set([-this.offset,0])},show:function(t){return this[t||this.options.mode](),this.open=!0,this.set([0,this.offset])},toggle:function(t){return this.start("toggle",t)}}),Element.Properties.slide={set:function(t){return this.get("slide").cancel().setOptions(t),this},get:function(){var t=this.retrieve("slide");return t||(t=new Fx.Slide(this,{link:"cancel"}),this.store("slide",t)),t}},Element.implement({slide:function(t,e){t=t||"toggle";var n,i=this.get("slide");switch(t){case"hide":i.hide(e);break;case"show":i.show(e);break;case"toggle":var r=this.retrieve("slide:flag",i.open);i[r?"slideOut":"slideIn"](e),this.store("slide:flag",!r),n=!0;break;default:i.start(t,e)}return n||this.eliminate("slide:flag"),this +}}),Request.JSONP=new Class({Implements:[Chain,Events,Options],options:{onRequest:function(t){this.options.log&&window.console&&console.log&&console.log("JSONP retrieving script with url:"+t)},onError:function(t){this.options.log&&window.console&&console.warn&&console.warn("JSONP "+t+" will fail in Internet Explorer, which enforces a 2083 bytes length limit on URIs")},url:"",callbackKey:"callback",injectScript:document.head,data:"",link:"ignore",timeout:0,log:!1},initialize:function(t){this.setOptions(t)},send:function(t){if(!Request.prototype.check.call(this,t))return this;this.running=!0;var e=typeOf(t);("string"==e||"element"==e)&&(t={data:t}),t=Object.merge(this.options,t||{});var n=t.data;switch(typeOf(n)){case"element":n=document.id(n).toQueryString();break;case"object":case"hash":n=Object.toQueryString(n)}var i=this.index=Request.JSONP.counter++,r=t.url+(t.url.test("\\?")?"&":"?")+t.callbackKey+"=Request.JSONP.request_map.request_"+i+(n?"&"+n:"");r.length>2083&&this.fireEvent("error",r),Request.JSONP.request_map["request_"+i]=function(){this.success(arguments,i)}.bind(this);var s=this.getScript(r).inject(t.injectScript);return this.fireEvent("request",[r,s]),t.timeout&&this.timeout.delay(t.timeout,this),this},getScript:function(t){return this.script||(this.script=new Element("script",{type:"text/javascript",async:!0,src:t})),this.script},success:function(t){this.running&&this.clear().fireEvent("complete",t).fireEvent("success",t).callChain()},cancel:function(){return this.running&&this.clear().fireEvent("cancel"),this},isRunning:function(){return!!this.running},clear:function(){return this.running=!1,this.script&&(this.script.destroy(),this.script=null),this},timeout:function(){return this.running&&(this.running=!1,this.fireEvent("timeout",[this.script.get("src"),this.script]).fireEvent("failure").cancel()),this}}),Request.JSONP.counter=0,Request.JSONP.request_map={},function(){var t=function(t){return null!=t},e=Object.prototype.hasOwnProperty;Object.extend({getFromPath:function(t,n){"string"==typeof n&&(n=n.split("."));for(var i=0,r=n.length;r>i;i++){if(!e.call(t,n[i]))return null;t=t[n[i]]}return t},cleanValues:function(e,n){n=n||t;for(var i in e)n(e[i])||delete e[i];return e},erase:function(t,n){return e.call(t,n)&&delete t[n],t},run:function(t){var e=Array.slice(arguments,1);for(var n in t)t[n].apply&&t[n].apply(t,e);return t}})}(),function(){var t=null,e={},n=function(t){return instanceOf(t,i.Set)?t:e[t]},i=this.Locale={define:function(n,r,s,o){var a;return instanceOf(n,i.Set)?(a=n.name,a&&(e[a]=n)):(a=n,e[a]||(e[a]=new i.Set(a)),n=e[a]),r&&n.define(r,s,o),t||(t=n),n},use:function(e){return e=n(e),e&&(t=e,this.fireEvent("change",e)),this},getCurrent:function(){return t},get:function(e,n){return t?t.get(e,n):""},inherit:function(t,e,i){return t=n(t),t&&t.inherit(e,i),this},list:function(){return Object.keys(e)}};Object.append(i,new Events),i.Set=new Class({sets:{},inherits:{locales:[],sets:{}},initialize:function(t){this.name=t||""},define:function(t,e,n){var i=this.sets[t];return i||(i={}),e&&("object"==typeOf(e)?i=Object.merge(i,e):i[e]=n),this.sets[t]=i,this},get:function(t,n,i){var r=Object.getFromPath(this.sets,t);if(null!=r){var s=typeOf(r);return"function"==s?r=r.apply(null,Array.from(n)):"object"==s&&(r=Object.clone(r)),r}var o=t.indexOf("."),a=0>o?t:t.substr(0,o),u=(this.inherits.sets[a]||[]).combine(this.inherits.locales).include("en-US");i||(i=[]);for(var c=0,l=u.length;l>c;c++)if(!i.contains(u[c])){i.include(u[c]);var h=e[u[c]];if(h&&(r=h.get(t,n,i),null!=r))return r}return""},inherit:function(t,e){t=Array.from(t),e&&!this.inherits.sets[e]&&(this.inherits.sets[e]=[]);for(var n=t.length;n--;)(e?this.inherits.sets[e]:this.inherits.locales).unshift(t[n]);return this}})}(),Locale.define("en-US","Number",{decimal:".",group:",",currency:{prefix:"$ "}}),Number.implement({format:function(t){var e=this;t=t?Object.clone(t):{};var n=function(e){return null!=t[e]?t[e]:Locale.get("Number."+e)},i=0>e,r=n("decimal"),s=n("precision"),o=n("group"),a=n("decimals");if(i){var u=n("negative")||{};null==u.prefix&&null==u.suffix&&(u.prefix="-"),["prefix","suffix"].each(function(e){u[e]&&(t[e]=n(e)+u[e])}),e=-e}var c=n("prefix"),l=n("suffix");""!==a&&a>=0&&20>=a&&(e=e.toFixed(a)),s>=1&&21>=s&&(e=(+e).toPrecision(s)),e+="";var h;if(n("scientific")===!1&&e.indexOf("e")>-1){var f=e.split("e"),p=+f[1];if(e=f[0].replace(".",""),0>p){for(p=-p-1,h=f[0].indexOf("."),h>-1&&(p-=h-1);p--;)e="0"+e;e="0."+e}else for(h=f[0].lastIndexOf("."),h>-1&&(p-=f[0].length-h-1);p--;)e+="0"}if("."!=r&&(e=e.replace(".",r)),o){h=e.lastIndexOf(r),h=h>-1?h:e.length;for(var d=e.substring(h),m=h;m--;)(h-m-1)%3==0&&m!=h-1&&(d=o+d),d=e.charAt(m)+d;e=d}return c&&(e=c+e),l&&(e+=l),e},formatCurrency:function(t){var e=Locale.get("Number.currency")||{};return null==e.scientific&&(e.scientific=!1),e.decimals=null!=t?t:null==e.decimals?2:e.decimals,this.format(e)},formatPercentage:function(t){var e=Locale.get("Number.percentage")||{};return null==e.suffix&&(e.suffix="%"),e.decimals=null!=t?t:null==e.decimals?2:e.decimals,this.format(e)}}); \ No newline at end of file diff --git a/EnlighterJS/Resources/Pages/Builder.phtml b/EnlighterJS/Resources/Pages/Builder.phtml new file mode 100644 index 0000000..9f04f13 --- /dev/null +++ b/EnlighterJS/Resources/Pages/Builder.phtml @@ -0,0 +1,117 @@ + +
+
+
+

Create your customized version

+ +

You can generate your customized EnlighterJS Builds by using the Promethium CloudBuilder. + Maybe you don't need all Theme/Languages and you want to strip down the package. + The Builder always uses the latest EnlighterJS release and automatically compresses the files (both compressed & uncompressed builds are included!). +

+ +
+ +
+
+
+
+
Language Support select all / select none
+
+ $d){ ?> +
+ +
+ +
+
+
+ +
+
+
Modern Themes select all / select none
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
Legacy Themes (Lighter.js) select all / select none
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
Special Features select all / select none
+
+
+ +
+
+
+ +
+ +
+ +
+ +

+
+ + +
+ +
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/Pages/Changelog.phtml b/EnlighterJS/Resources/Pages/Changelog.phtml new file mode 100644 index 0000000..03f5e9f --- /dev/null +++ b/EnlighterJS/Resources/Pages/Changelog.phtml @@ -0,0 +1,19 @@ +
+
+
+
+
+ +
+
+ + +
+
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/Pages/Documentation.phtml b/EnlighterJS/Resources/Pages/Documentation.phtml new file mode 100644 index 0000000..e88355b --- /dev/null +++ b/EnlighterJS/Resources/Pages/Documentation.phtml @@ -0,0 +1,19 @@ +
+
+
+
+
+ +
+
+ + +
+
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/Pages/GettingStarted.phtml b/EnlighterJS/Resources/Pages/GettingStarted.phtml new file mode 100644 index 0000000..7ff7570 --- /dev/null +++ b/EnlighterJS/Resources/Pages/GettingStarted.phtml @@ -0,0 +1,222 @@ +
+
+
+
+
+

Getting Started

+ +

EnlighterJS is a free, easy-to-use, syntax highlighting plugin developed for MooTools. Using it can be as simple as adding a single script and style to your website, choosing the elements you wish to highlight, and EnlighterJS takes care of the rest!

+
+
+

Prepare your sourecode

+

Just add the data-enlighter-language attribute to specify the programming language.

+
+<pre data-enlighter-language="js">
+Element.implement({
+...some js code..
+});
+</pre>
+
+
+ Roll the Drums..it will be magically transformed into
+
+
+ +
+

Highlighted Code

+
+Element.implement({
+    /**
+     * Highlights an element/Removes Element highlighting
+     *
+     * @param {Object, Boolean} [options] EnlighterJS options Object or Boolean value to enable/disable highlighting
+     * @returns {Element} The current Element instance.
+     */
+    enlight: function(options){
+        // mixed input check - options available ?
+        options = (typeof(options) == "undefined") ? {} : options;
+
+        // convert "true" to empty Object!
+        options = (options===true) ? {} : options;
+
+        // enlighter instance already available ?
+        var enlighter = this.retrieve('EnlighterInstance');
+
+        // hide highlighted sourcecode ?
+        if (options === false){
+            if (enlighter !== null) {
+                enlighter.enlight(false);
+            }
+        // highlight sourcecode and use options
+        }else{
+            // create new enlighter instance
+            if (enlighter === null) {
+                enlighter = new EJS(this, options, null);
+                this.store('EnlighterInstance', enlighter);
+            }
+            enlighter.enlight(options);
+        }
+
+        // element instance
+        return this;
+    },
+});
+                
+
+

Get It!

+

EnlighterJS is available as source download including pre-build css + js files.

+ +

Install with Bower

+

You can also use Bower (linked to the GitHub repository) to get the wanted version.

+ $ bower install enlighterjs + +
+

Manual Installation

+

Or download the latest Release from GitHub and extract the files to your workspace.

+ +

+ EnlighterJS.zip + EnlighterJS.tar.gz + Custom Package +

+ +

Integration

+

Three steps to success. EnlighterJS requires MooTools.Core >= 1.4.5.

+ +

1. Link the CSS + JS Files

+

Modify the paths to match your project settings.

+
<head>
+...
+<!-- Include EnlighterJS Styles -->
+<link rel="stylesheet" type="text/css" href="css/EnlighterJS.min.css" />
+
+<!-- Include MooTools Framework -->
+<script type="text/javascript" src="js/MooTools-More-1.5.1-compressed.js"></script>
+
+<!-- Include EnlighterJS -->
+<script type="text/javascript" src="js/EnlighterJS.min.js" ></script>
+...
+</head>
+
+

2. Prepare your sourcecode

+

Starting with just a small piece of javascript code you wish to highlight. Prepare your sourcecode by giving the element (containing the code) an optional data-enlighter-language attribute with the language of the snippet.

+
+<pre data-enlighter-language="js">
+$('#loading-example-btn').click(function () {
+	var btn = $(this)
+	btn.button('loading')
+	$.ajax(...).always(function () {
+		btn.button('reset')
+	});
+});
+</pre>
+
+ +

3. Initialize it!

+

The most simple and elegant way to use EnlighterJS on your page: just add a simple HTML-Meta-Tag to your page with the desired global config

+
<!-- Initialize EnlighterJS -->
+<meta name="EnlighterJS" content="Advanced javascript based syntax highlighting" data-indent="4" data-selector-block="pre" data-selector-inline="code" data-language="javascript" />
+
+ +

Ready to use Examples

+

Your instantaneous launch into the world of EnlighterJS. For further information, please refer to the Documentation.

+ +
+ +
+
+

Example1 View file

+

Minimal +

A minimalistic example how to use EnlighterJS on your page, using the Metainit initialization method. This will be the best choice for most users.

+
+ +
+

Example2 View file

+

Javascript based Initialization.

+

In some cases, it can be more effective using a javascript based initialization - e.g. use different configs for inline+block code.

+ +
+ +
+

Example3 View file

+

Advanced Usage

+

Some examples for special use-cases. Requires some deeper javascript knowledge.

+ +
+ +
+
+ + + +

WordPress Plugin

+
+
+

Enlighter - The most simple way to use EnlighterJS.
+ Full Visual-Editor-Integration. Build-in Theme Customizer.
+ Ready-to-use, Ready-to-post! +

+ Enlighter WordPress Plugin +
+
+ WordPress Visual Editor Integration +
+
+ + +

License FAQ

+

EnlighterJS is released under the Terms of The MIT License (X11). Copyright (c) 2009 Jose Prado, 2013-2015 Andi Dittrich and Contributors

+ +

Simplification not legally binding

+
+
+
+

It requires you to

+
    +
  • Keep the license and copyright notice included in the CSS and JavaScript files when you use them in your works
  • +
  • Included the FULL License in all copies or substantial portions of the Software
  • +
+ +

It forbids you to

+
    +
  • Redistribute any piece of EnlighterJS without proper attribution
  • +
  • Hold the authors liable for damages as the Software is provided as is without warranty of any kind
  • +
  • Remove Copyright/License information's
  • +
+
+
+

It permits you to

+
    +
  • Use EnlighterJS in personal/private projects
  • +
  • Use EnlighterJS in commercial projects
  • +
  • Use EnlighterJS in internal/closed source projects
  • +
  • Modify the source code
  • +
+ +

It does not require you to

+
    +
  • Push changes you've made back to the project
  • +
  • Add attribution notices/credits to your website
  • +
+
+
+
+ +

Full License

+
+ +
+
+ +
+ + +
+
+
diff --git a/EnlighterJS/Resources/Pages/Languages.phtml b/EnlighterJS/Resources/Pages/Languages.phtml new file mode 100644 index 0000000..4def4c4 --- /dev/null +++ b/EnlighterJS/Resources/Pages/Languages.phtml @@ -0,0 +1,77 @@ +
+
+
+
+
+ + + +

+ +
+ Select Theme + +
+ + + +
+ + +
+ +
+ + +
+
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/Pages/Plugins.phtml b/EnlighterJS/Resources/Pages/Plugins.phtml new file mode 100644 index 0000000..6b47bed --- /dev/null +++ b/EnlighterJS/Resources/Pages/Plugins.phtml @@ -0,0 +1,101 @@ +
+
+
+
+
+ +

Enlighter WordPress Plugin

+
+
+

Enlighter - The most simple way to use EnlighterJS.
+ Full Visual-Editor-Integration. Build-in Theme Customizer.
+ Ready-to-use, Ready-to-post! +

+ Enlighter WordPress Plugin +
+
+ WordPress Visual Editor Integration +
+
+ +

Tons of Features

+
+
+
+

Theme Customizer

+

+ Modify the EnlighterJS Themes without any CSS Knowledge + Theme Customizer +

+
+
+

Theme Live-Preview Mode

+

+ See all Theme modifications immediately + Live Preview Mode +

+
+
+
+ +

Feature List

+
    +
  • Support for all common used languages
  • +
  • Theme Customizer including LIVE Preview Mode
  • +
  • Inline Syntax Highlighting
  • +
  • Full Visual-Editor (TinyMCE) Integration (Admin Panel + Frontend)
  • +
  • Easy to use Text-Editor mode through the use of Shortcodes
  • +
  • Advanced configuration options (CDN usage, ..) are available within the options page.
  • +
  • Supports code-groups (displays multiple code-blocks within a tab-pane)
  • +
  • Outputs in various formats like ordered lists or inline. Choose the method that works best for you.
  • +
  • Extensible language and theme engines - add your own one.
  • +
  • Simple CSS based themes
  • +
  • Integrated CSS file caching (suitable for high traffic sites)
  • +
  • EnlighterJS is written in MooTools. Requires MooTools v1.4+ (included) and client enabled javascript
  • +
+ +

System requirements

+ +
    +
  • WordPress >= 3.9
  • +
  • PHP 5.3, including json functions
  • +
  • Webbrowser with enabled Javscript (required for highlighting)
  • +
  • Accessable cache directory (/wp-content/plugins/enlighter/cache/)
  • +
+ +

Installation

+

You can install the Enlighter package automatically with WordPress` Plugin Manager or manually by uploading the full package.

+
    +
  1. Download the .zip file of the plugin and extract the content
  2. +
  3. Upload the complete enlighter folder to the /wp-content/plugins/ directory
  4. +
  5. Activate the plugin through the 'Plugins' menu in WordPress
  6. +
  7. Goto to the Enlighter settings page and select the default theme which should be used.
  8. +
  9. That's it! You're done. You can select an editor style for your codefragment or enter the following code into a post or page to highlight it (e.g. javascript): [js]var enlighter = new EnlighterJS({});[/js]
  10. +
+ +

Compatibility

+

All browsers supported by MooTools (enabled Javascript required) and with HTML5 capabilities for "data-" attributes are compatible with Enlighter. It's possible that it may work with earlier/other browsers. + Generally Enlighter (which javascript part EnlighterJS is based on MooTools Javascript Framework) should work together with jQuery in noConflict Mode - when you are using jQuery within your WordPress Theme/Page you have to take care of it!

+ +
    +
  • Chrome 10+
  • +
  • Safari 5+
  • +
  • Internet Explorer 6+
  • +
  • Firefox 2+
  • +
  • Opera 9+
  • +
+
+ + +
+
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/Pages/Themes.phtml b/EnlighterJS/Resources/Pages/Themes.phtml new file mode 100644 index 0000000..0e4fc1c --- /dev/null +++ b/EnlighterJS/Resources/Pages/Themes.phtml @@ -0,0 +1,162 @@ +
+
+
+
+
+ + + +

Theme

+ +

Inline

+

+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. + window.addEvent('domready', function(){}); invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. +

+ +

Block with Line-Numbers

+
+<head>
+		<!-- Include EnlighterJS Styles -->
+		<link rel="stylesheet" type="text/css" href="../Build/EnlighterJS.yui.css" />
+
+		<!-- Include MooTools Framework -->
+		<script type="text/javascript" src="mootools-core-1.4.5-full-nocompat.js"></script>
+
+		<!-- Include EnlighterJS -->
+		<script type="text/javascript" src="../Build/EnlighterJS.yui.js" ></script>
+
+		<!-- Initialize EnlighterJS -->
+		<script type="text/javascript">
+		window.addEvent('domready', function() {
+			// highlight all pre tags
+			document.getElements('pre').enlight({
+				indent : 2
+			});
+		});
+		</script>
+</head>
+
+ +

Block without Line-Numbers

+
+<head>
+		<!-- Include EnlighterJS Styles -->
+		<link rel="stylesheet" type="text/css" href="../Build/EnlighterJS.yui.css" />
+
+		<!-- Include MooTools Framework -->
+		<script type="text/javascript" src="mootools-core-1.4.5-full-nocompat.js"></script>
+
+		<!-- Include EnlighterJS -->
+		<script type="text/javascript" src="../Build/EnlighterJS.yui.js" ></script>
+
+		<!-- Initialize EnlighterJS -->
+		<script type="text/javascript">
+		window.addEvent('domready', function() {
+			// highlight all pre tags
+			document.getElements('pre').enlight({
+				indent : 2
+			});
+		});
+		</script>
+</head>
+
+ +

With Tabs

+
+// Load language parser
+language = new EnlighterJS.Language[languageName](this.getRawCode(true));
+
+// compile tokens -> generate output
+var output = this.renderer.render(language, specialLines, {
+	lineOffset: (this.rawCodeblock.get('data-enlighter-lineoffset') || null),
+	lineNumbers: (this.rawCodeblock.get('data-enlighter-linenums') !== 'false')
+});
+
+// set class and id attributes.
+output.addClass(themeName.toLowerCase() + 'EnlighterJS');
+output.addClass('EnlighterJS');
+output.set('id', 'EnlighterJS_' + String.uniqueID());
+
+
+// Source:  http://en.wikipedia.org/wiki/Java_%28programming_language%29
+// OddEven.java
+import javax.swing.JOptionPane;
+
+public class OddEven {
+    /**
+     * "input" is the number that the user gives to the computer
+     */
+    private int input; // a whole number("int" means integer)
+
+    /**
+     * This is the constructor method. It gets called when an object of the OddEven type
+     * is being created.
+     */
+    public OddEven() {
+        /*
+         * In most Java programs constructors can initialize objects with default values, or create
+         * other objects that this object might use to perform its functions. In some Java programs, the
+         * constructor may simply be an empty function if nothing needs to be initialized prior to the
+         * functioning of the object. In this program's case, an empty constructor would suffice.
+         * A constructor must exist; however, if the user doesn't put one in then the compiler
+         * will create an empty one.
+         */
+    }
+}
+
+
+/** Test Snippet */
+$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
+
+/* check connection */
+if (mysqli_connect_errno()) {
+    printf("Connect failed: %s\n", mysqli_connect_error());
+    exit();
+}
+
+/* Create table doesn't return a resultset */
+if ($mysqli->query("CREATE TEMPORARY TABLE myCity LIKE City") === TRUE) {
+    printf("Table myCity successfully created.\n");
+}
+
+/* Select queries return a resultset */
+if ($result = $mysqli->query("SELECT Name FROM City LIMIT 10")) {
+    printf("Select returned %d rows.\n", $result->num_rows);
+
+    /* free result set */
+    $result->close();
+}
+
+ +
+ +
+ + +
+
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/assembly.html b/EnlighterJS/Resources/TestcaseData/assembly.html new file mode 100644 index 0000000..06758d8 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/assembly.html @@ -0,0 +1,101 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +MOV PSW,#107H ; register bank N invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +
+; COMMENTS
+; -----------------------------------------------------
+; Single Line Comment
+    ;Single Line Comment leading Whitespaces
+
+; NO
+; Multi
+; line
+; Comments
+
+
+; CONTROL STATEMENTS
+; -----------------------------------------------------
+$TITLE Assembly Testdata
+$TARGET mcu8051
+$ASSEMBLER keiluv01 /opt/keil/asm8051 -k -h -of=/dev/usbTTY1
+$INCLUDE (REG8051.INC)
+
+; NUMBERS
+; -----------------------------------------------------
+MOV edx,101001011010101b            ; binary number
+MOV edc, 101001011010101B           ; binary number
+MOV eda, 101$0010$1101$0101b        ; binary number with spacer
+MOV edx,101$0010$1101$0101B         ; binary number with spacer
+
+data_array0: DS 50H                 ; reserve 80 Bytes for data_array0
+data_array0: DS 0$50H               ; reserve 80 Bytes for data_array0 with spacer
+data_array0: DS 5050h               ; reserve 20.560 Bytes for data_array0
+data_array0: DS 50$5$0H             ; reserve 20.560 Bytes for data_array0 with spacer
+
+MOV edx,208781D                     ; decimal number
+MOV edc, 208781d                    ; decimal number
+MOV eda, 87$8171$2101D              ; decimal number with spacer
+MOV edx,87$8171$2101D               ; decimal number with spacer
+
+MOV edx,70q                         ; octal number
+MOV edc, 70O                        ; octal number
+MOV eda, 7$121q                     ; octal number with spacer
+MOV edx,104$4321$77Q                ; octal number with spacer
+
+
+; STRINGS
+; -----------------------------------------------------
+
+LDI R30, 'A'
+DB 18H, 'SDATA'
+
+
+; INSTRUCTIONS
+; -----------------------------------------------------
+
+LDI R30, 0x30               ; instruction start of line
+    LDI R30, 0x30           ; instruction start of line with whitespaces
+test: LDI R30, 0x30         ; instruction after label
+JMP test
+    MOV SP,#STACK - 1
+
+
+; FUNCTIONS
+; -----------------------------------------------------
+
+LDI R30, HIGH(temp0)
+DB 18H, SLS(tmp)
+
+
+; EXAMPLES
+; -----------------------------------------------------
+section .text
+   global _s_start
+
+_init:
+    MOV R4,@DR8       ; indirect access
+    MOV @DR8+50H,R4   ; access with constant offset
+    MOV K8,#WX        ; load addr
+
+start:
+    MOV	edx,10H  	  ; message length
+    MOV	ecx,xy        ; message
+    MOV	ebx,1
+    INT	0x80		  ; kernel call
+    ADD R1,R2
+    MOV VAR3,R1
+
+    MOV	eax,1		  ; system call
+    LDI R1,10H
+
+
+section .data
+
+section .eeprom
+
+section .flash
+
+
+END ; end of file (required)
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/avr-assembly.html b/EnlighterJS/Resources/TestcaseData/avr-assembly.html new file mode 100644 index 0000000..c61f81c --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/avr-assembly.html @@ -0,0 +1,113 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +.include "m8def.inc" invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +
+; SOURCE: AVR Assembler User Guide [DOC1022] www.atmel.com/Images/doc1022.pdf
+
+; COMMENTS
+; -----------------------------------------------------
+; Single Line Comment
+    ;Single Line Comment leading Whitespaces
+
+; NO
+; Multi
+; line
+; Comments
+
+; NUMBERS
+; -----------------------------------------------------
+.SET io_offset = 0x23
+.SET io_offset = $23
+.SET PORTA = io_offset + 2
+.SET PORTX = 0b11011101 efwefew
+
+.CSEG ; Start code segment
+    clr r2 ; Clear register 2
+    out porta,r2 ; Write to Port A
+
+; DIRECTIVES
+; -----------------------------------------------------
+.include "m8def.inc"
+.include "lcd.asm"
+
+.def PI = 3141
+.def BOLTZMANN = 13806
+.def temp1 = r16
+.def temp2 = r17
+.def temp3 = r18
+.def flag  = r22
+
+; OPERATORS
+; -----------------------------------------------------
+ldi r16,!0xf0 ; Load r16 with 0x00
+ldi r16,~0xf0 ; Load r16 with 0x0f
+ldi r16,-2 ; Load -2(0xfe) in r16
+ldi r30,label*2 ; Load r30 with label*2
+ldi r30,label/2 ; Load r30 with label/2
+ldi r30,c1+c2 ; Load r30 with c1+c2
+ldi r18,High(c1&c2) ;Load r18 with an expression
+ldi r18,Low(c1|c2) ;Load r18 with an expression
+ldi r18,Low(c1||c2) ;Load r18 with an expression
+
+
+
+
+; EXAMPLES
+; -----------------------------------------------------
+.DEF temp=R16
+.DEF ior=R0
+.CSEG
+
+ldi temp,0xf0 ; Load 0xf0 into temp register
+in ior,0x3f ; Read SREG into ior register
+eor temp,ior ; Exclusive or temp and ior
+
+init:
+
+.DSEG                   ; Start data segment
+    vartab: .BYTE 4     ; Reserve 4 bytes in SRAM
+.ESEG
+    eevar: .DW 0xff0f   ; Initialize one word in
+                        ; EEPROM
+.CSEG                   ; Start code segment
+    const: .DW 2        ; Write 0x0002 in prog.mem.
+    mov r1,r0           ; Do something
+
+
+.NOLIST                 ; Disable listfile generation
+.INCLUDE "macro.inc"     ; The included files will not
+.INCLUDE "const.def"     ; be shown in the listfile
+.LIST                   ; Reenable listfile generation
+
+.MACRO MACX             ; Define an example macro
+    add r0,@0           ; Do something
+    eor r1,@1           ; Do something
+.ENDMACRO               ; End macro definition
+.LISTMAC                ; Enable macro expansion
+    MACX r2,r1          ; Call macro, show expansion
+
+
+
+.CSEG
+    varlist:.DW 0,0xffff,0b1001110001010101,-32768,65535
+.ESEG
+    eevar: .DW 0xffff
+
+
+.DEF temp=R16
+.DEF ior=R0
+.CSEG
+    ldi temp,0xf0       ; Load 0xf0 into temp register
+    in ior,0x3f         ; Read SREG into ior register
+    eor temp,ior        ; Exclusive or temp and ior
+
+
+.DSEG
+    var1: .BYTE 1       ; reserve 1 byte to var1
+    table: .BYTE tab_size ; reserve tab_size bytes
+.CSEG
+    ldi r30,low(var1) ; Load Z register low
+    ldi r31,high(var1) ; Load Z register high
+    ld r1,Z ; Load VAR1 into register 1
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/c.html b/EnlighterJS/Resources/TestcaseData/c.html new file mode 100644 index 0000000..2153ef4 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/c.html @@ -0,0 +1,91 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +volatile uint8_t burstmodeDelayCounter = 0; invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +
+// http://andidittrich.de/index.php/2012/04/xbox-360-controller-advanced-rapid-fire-mod/
+#include "Trigger.h"
+#include "Calibration.h"
+
+// KEY STATES
+enum{KEYUP=0, KEYDOWN=1, FALLINGEDGE =2, RISINGEDGE=3, KEYDOWN_LONG=4};
+
+// SYTMEM STATE
+enum{OFFLINE, RAPIDFIRE_SLOW, RAPIDFIRE_FAST, RAPIDFIRE_BURST};
+
+// switch observer
+volatile uint8_t switchState0 = 2;
+volatile uint8_t switchState1 = 127;
+volatile uint8_t switchStateChange = 0;
+
+// system state
+volatile uint8_t systemState = OFFLINE;
+
+// led blink counter
+volatile uint8_t ledBlinkCounter = 0;
+
+// burstmode delay counter
+volatile uint8_t burstmodeDelayCounter = 0;
+
+// switch observer ISR - 48ms steady state required -> 122Hz Update Rate
+ISR (TIMER1_OVF_vect){
+	// increment burstmode counter
+	//burstmodeDelayCounter = burstmodeDelayCounter+1;
+
+	// LED BLink Action
+	if (systemState == RAPIDFIRE_FAST){
+		ledBlinkCounter = ledBlinkCounter+1;
+
+		// ~ 12 Hz Blink rate
+		if (ledBlinkCounter%20 == 0){
+			toggleStatusLed();
+		}
+	}
+
+	// LED BLink Action
+	if (systemState == RAPIDFIRE_BURST){
+		ledBlinkCounter = ledBlinkCounter+1;
+
+		// ~ 18 Hz Blink rate
+		if (ledBlinkCounter < 50){
+			if (ledBlinkCounter%10 == 0){
+				toggleStatusLed();
+			}
+		}else{
+			showStatusLed(0);
+		}
+	}
+
+	// SIGNAL A OBERVING (SWITCH)
+	if (bit_is_clear(PINB, PB4)){
+		// increment -> KEY PRESSED
+		if (switchState0<5){
+			switchState0++;
+		}else{
+			// FALLING EDGE DETECTED
+			if (switchStateChange==KEYUP){
+				switchStateChange = KEYDOWN;
+			}
+		}
+		if (switchState1<255){
+			switchState1++;
+		}else{
+			switchStateChange = KEYDOWN_LONG;
+		}
+	}else{
+		// decrement -> KEY RELEASED
+		if (switchState0>0){
+			switchState0--;
+		}else{
+			// RISING EDGE DETECTED
+			if (switchStateChange==KEYDOWN){
+				switchStateChange = FALLINGEDGE;
+			}
+		}
+		if (switchState1>0){
+			switchState1--;
+		}
+	}
+};
+
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/cpp.html b/EnlighterJS/Resources/TestcaseData/cpp.html new file mode 100644 index 0000000..ec111ad --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/cpp.html @@ -0,0 +1,50 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +void CRectangle::set_value(int a); invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ + +
+// SOURCE: http://www.cplusplus.com/doc/tutorial/classes/
+
+// classes example
+#include <iostream>
+#define DOIT 1
+using namespace std;
+
+class CRectangle {
+    int x, y;
+  public:
+    void set_values (int,int);
+    int area () {return (x*y);}
+};
+
+void CRectangle::set_values (int a, int b) {
+  x = a;
+  y = b;
+}
+
+/*
+void CRectangle::set_valueA (int a) {
+  x = a;
+}
+*/
+
+int main () {
+  CRectangle rect;
+  rect.set_values (3,4);
+  cout << "area: " << rect.area();
+  
+  CRectangle rect2 = new CRectangle();
+  
+  int x = 0x54b4c2;
+  int y = 291;
+  int z = 0b1110101;
+  
+  
+  #ifdef DOIT
+  cout << __FILE__ << __LINE__;
+  #endif
+  
+  return 0;
+}
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/csharp.html b/EnlighterJS/Resources/TestcaseData/csharp.html new file mode 100644 index 0000000..1f61c40 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/csharp.html @@ -0,0 +1,45 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +System.out.println("Hello World!"); invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +
+// Source: https://en.wikipedia.org/wiki/C_Sharp_syntax#Attributes
+public class EdibleAttribute : Attribute
+{
+    public EdibleAttribute() : base()
+    {
+ 
+    }
+ 
+    public EdibleAttribute(bool isNotPoisonous)
+    {
+        this.IsPoisonous = !isNotPoisonous;
+    }
+ 
+    public bool IsPoisonous { get; set; }
+}
+
+
+// Source:  https://en.wikipedia.org/wiki/C_Sharp_syntax#Events
+public class MainWindow : System.Windows.Controls.Window
+{
+    private Button button1;
+ 
+    public MainWindow()
+    {
+        button1 = new Button();
+        button1.Text = "Click me!";
+ 
+        /* Subscribe to the event */
+        button1.ClickEvent += button1_OnClick;
+ 
+        /* Alternate syntax that is considered old: 
+           button1.MouseClick += new MouseEventHandler(button1_OnClick); */
+    }
+ 
+    protected void button1_OnClick(object sender, MouseEventArgs e)
+    {
+        MessageBox.Show("Clicked!");
+    }
+}
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/css.html b/EnlighterJS/Resources/TestcaseData/css.html new file mode 100644 index 0000000..3c7150b --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/css.html @@ -0,0 +1,267 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +list-style: decimal-leading-zero outside; invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+
+/*!
+---
+description: EnlighterJS Theme-Base - All Themes are derived from these styles!
+
+...
+*/
+
+
+p {
+    font-family: "Times New Roman";
+    font-size: 20px;
+}
+@media screen {
+    p {
+        font-family: verdana, sans-serif;
+        font-size: 17px;
+    }
+}
+
+@media print {
+    p {
+        font-family: georgia, serif;
+        font-size: 14px;
+        color: blue;
+    }
+}
+
+html {
+  font-family: sans-serif;
+  -webkit-text-size-adjust: 100%;
+      -ms-text-size-adjust: 100%;
+}
+
+input.number,
+select.number,
+input[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+
+@media (min-width: 800) {
+  .navbar-right .dropdown-menu {
+    right: 0;
+    left: auto;
+  }
+  .navbar-right .dropdown-menu-left {
+    right: auto;
+    left: 0;
+  }
+}
+.btn-group-vertical > .btn:focus {
+  outline: 0;
+}
+
+.nav-pills > li.active > a:focus {
+  color: #fff;
+  background-color: #428bca;
+}
+
+/*
+---
+description: EnlighterJS Theme-Base - All Themes are derived from these styles! Don't edit this file if you wan't to change styles! Use a derived theme!
+
+license: MIT-style
+
+authors:
+  - Andi Dittrich
+...
+*/
+
+/* BASE Styles */
+.EnlighterJS, .EnlighterJSWrapper{
+	font-family: Monaco, Courier, Monospace;
+	font-size: 10px;
+	line-height: 16px;
+	overflow: auto;
+	white-space: pre-wrap;
+	word-wrap: break-word;
+	margin: 0px;
+	padding: 0px;
+}
+
+/* Wrapper/Container - contains all elements of an instance */
+.EnlighterJSWrapper{
+	position: relative;
+}
+
+/* RAW Styles */
+.EnlighterJSWrapper pre{
+	font-family: inherit;
+	background-color: #ffffff;
+	padding: 5px 5px 5px 10px;
+	margin: 0px 0px 20px 0px;
+	line-height: 18px;
+	font-size: 12px;
+	color: #444444;
+	border: none;
+	border-radius: 0px;
+	clear: none;
+	white-space: pre-wrap;
+	word-wrap: break-word;
+}
+
+/* Inline specific styles */
+span.EnlighterJS {
+	padding: 3px 5px 1px 5px;
+	border: solid 1px #e0e0e0;
+	color: #333333;
+	background-color: #f7f7f7;
+	margin: 0px 2px 0px 2px;
+}
+
+/* LIST specific styles */
+ol.EnlighterJS, ul.EnlighterJS{
+	color: #939393;
+	font-size: 10px;
+	background-color: #f2f2f2;
+	color: #939393;
+	margin: 0px 0px 20px 0px;
+	padding: 0px;
+	text-indent: 0px;
+	list-style: decimal-leading-zero outside;
+}
+
+/* line styles */
+ol.EnlighterJS li, ul.EnlighterJS li {
+	margin: 0px;
+	background-color: #ffffff;
+	border: solid 0px #ffffff;
+	padding: 0px 5px 0px 14px;
+	line-height: 14px;
+	color: #939393;
+	list-style: none;
+	font-size: inherit;
+}
+ol.EnlighterJS li{
+	list-style: decimal-leading-zero outside;
+	margin: 0px 0px 0px 40px;
+}
+
+/* no-linenumber style */
+ul.EnlighterJS, ul.EnlighterJS li{
+	list-style: none;
+	display: block;
+}
+ul.EnlighterJS li:AFTER{
+	content: ' ';
+}
+
+/* top+bottom offsets */
+ol.EnlighterJS li:FIRST-CHILD, ul.EnlighterJS li:FIRST-CHILD{
+	padding-top: 5px;
+}
+ol.EnlighterJS li:LAST-CHILD, ul.EnlighterJS li:LAST-CHILD{
+	padding-bottom: 5px;
+}
+
+/* special line highlight color */
+ol.EnlighterJS li.specialline, ul.EnlighterJS li.specialline {
+	background-color: #F4F8FC;
+}
+
+/* default symbol style */
+.EnlighterJS span {
+	color: #000000;
+	margin: 0px;
+	padding: 0px;
+	line-height: inherit;
+	font-size: 12px;
+}
+
+/* TAB Panel - containing "buttons" to switch between multiple codeblocks */
+.EnlighterJSTabPane .controls {
+}
+.EnlighterJSTabPane .controls ul{
+	margin: 0px 0px 0px 40px;
+	padding: 0px;
+}
+.EnlighterJSTabPane .controls li {
+	float: left;
+	display: block;
+	list-style: none;
+	padding: 3px 10px 3px 10px;
+	margin: 0px 5px 0px 5px;
+	background-color: #f2f2f2;
+	border-radius: 5px;
+	font-size: 12px;
+	color: #000000;
+	font-family: Courier, monospace;
+	cursor: pointer;
+}
+
+.EnlighterJSTabPane .controls .clearfixList{
+	clear: left;
+}
+.EnlighterJSTabPane .pane {
+	padding: 5px 0px 0px 0px;
+	clear: left;
+}
+
+/* Toolbar - containing buttons */
+.EnlighterJSToolbar{
+	position: absolute;
+	display: none;
+	right: 0px;
+	top: 0px;
+	height: 40px;
+	width: auto;
+	padding: 15px;
+}
+/* Button Container */
+.EnlighterJSToolbar > a{
+	float: right;
+	display: block;
+	border-radius: 3px;
+	z-index: 10;
+	background-color: #ffffff;
+	color: #717171;
+	cursor: pointer;
+	font-size: 12px;
+	padding: 0px;
+	border: solid 1px #e0e0e0;
+	margin: 0px 0px 0px 15px;
+	text-decoration: none;
+	width: 23px;
+	height: 23px;
+	background-position: 0px 0px;
+	background-size: contain;
+	margin-left: 8px;
+}
+.EnlighterJSToolbar > a:HOVER{
+	border-color: #b0b0b0;
+}
+
+/* Raw Button Identifiers */
+.EnlighterJSRawButton, .EnlighterJSWindowButton{}
+
+/* Show Toolbar on MouseOver */
+.EnlighterJSToolbar > a:HOVER{
+	text-decoration: none;
+}
+
+/* Button Icons */
+.EnlighterJSWindowButton{
+	background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAIAAADY27xgAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAALtJREFUeNpi/P//P8PgAEwMgwaMOmXUKaNOGSZOYcEjt2zTEWpZE+VnM1xCBQIMnGwoseDCviOjyZamEQQH2xavIduanukoeksyQ4ZLqECAV2wIJfbhCdqhHCoQIM4+WgcRD/z9i/z9i0ZDZdQpgzIzkwrYGGnsFFyZBVN8+6a+ERNBGzf2YQ0PTPFf/0dz0AjIzMS3k0dGqKD1o9Dap0TmqdFkS+cijpIuyJAJFcbRwdJRp4w6ZXg4BTAAcgIqryILA7oAAAAASUVORK5CYII=);
+}
+.EnlighterJSRawButton{
+	background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAIAAADY27xgAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAANxJREFUeNpi/P//P8PgAEwMgwaMOmXUKcQCFjxyNTU15Bna0tIyGkF0iCAIKKwnNrQ3Lp6HHLOkRtOQChUI8PcvwhceG/sYGBj4+PggXCUlJTLCZgiGCsTfA+YUUittHh4eZC4kmqqrqyHc1tbWYRdBxABTZw+s4n0N1cMo2X7//p0qdhBpzmgdNCIKfqqUiqMFP6lO+fPnD1XsINKcYdpeGXmZeYCT7a9fv6hiB5HmjBb8g7zgx+eUf//+UcW7RJoziHLQaLIlL4Iqs9NGXKgwjo7bjjpl1CkUAMAAJAZIyUY3BoQAAAAASUVORK5CYII=);
+}
+.EnlighterJSInfoButton{
+	background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAIAAADY27xgAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAHJJREFUeNrs18ENgCAMBVAwjuUEjuMgjOME7oUHE2O4YmIlr6eeyAv8Qsi11hSjphSmUFB+SJn7l1jW7WqOvXy5K7ej6WUlCOWZj86sZG/Q2PdKM8A9cXFAKCgoKCgoKCgoKCNT/A5RUFDerhMAAP//AwBh/xVVGTlP9gAAAABJRU5ErkJggg==);
+}
+
+/* Show Toolbar on Mouseover */
+.EnlighterJSWrapper:hover .EnlighterJSToolbar{
+	display: block;
+}
+.EnlighterJSToolbar .clear{
+	clear: right;
+	content: ' ';
+	display: block;
+}
+
+		
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/cython.html b/EnlighterJS/Resources/TestcaseData/cython.html new file mode 100644 index 0000000..9524370 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/cython.html @@ -0,0 +1,83 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +links = [element for element in liste if element < pivotelement] invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +
+# Hello World
+def say_hello():
+    print "Hello World!"
+
+'''
+Multiline String Comment Style1
+Hello
+'''        
+
+import pyximport; pyximport.install()
+
+# compile-time constant
+DEF _LIST = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
+
+# preprocessor conditional statements
+IF UNAME_SYSNAME == "Windows":
+    include "windows.pxi"
+ELIF UNAME_SYSNAME == "Linux":
+    include "linux.pxi"
+ELSE:
+    include "misc.pxi"
+
+"""
+Multiline String Comment Style2
+Hello, again
+"""
+
+def primes(int kmax):
+    """Function documentation comment
+    SOURCE: http://docs.cython.org/src/tutorial/cython_tutorial.html
+    """
+    cdef int n, k, i
+    cdef int p[1000]
+    result = []
+    if kmax > 1000:
+        kmax = 1000
+    k = 0
+    n = 2
+    while k < kmax:
+        i = 0
+        while i < k and n % p[i] != 0:
+            i = i + 1
+        if i == k:
+            p[k] = n
+            k = k + 1
+            result.append(n)
+        n = n + 1
+    return result
+
+# cdef examples
+cdef int i, j, k
+cdef float f, g[42], *h
+
+# struct, union, and enum data-types
+cdef struct Car:
+    int age
+    float mileage
+
+cdef union Country:
+    char *name
+    int *population
+
+cdef enum Planets:
+    Earth, Mars,
+    Saturn
+
+cdef enum PlanetType:
+    dwarf = 1
+    giant = 2
+    regular = 3
+
+# raise example
+# SOURCE: http://docs.cython.org/src/userguide/language_basics.html#checking-return-values-of-non-cython-functions
+cdef FILE* p
+p = fopen('spam.txt', 'r')
+if p == NULL:
+    raise SpamError('Couldn\'t open the spam file')
+
diff --git a/EnlighterJS/Resources/TestcaseData/diff.html b/EnlighterJS/Resources/TestcaseData/diff.html new file mode 100644 index 0000000..984e132 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/diff.html @@ -0,0 +1,65 @@ +
+--- enlighter/trunk/readme.txt	2014-06-06 23:40:41 UTC (rev 928010)
++++ enlighter/trunk/readme.txt	2014-06-06 23:41:44 UTC (rev 928011)
+@@ -4,7 +4,7 @@
+ Donate link: http://andidittrich.de/go/enlighterjs
+ Requires at least: 3.5
+ Tested up to: 3.9.1
+-Stable tag: 2.1
++Stable tag: 2.2
+ License: MIT X11-License
+ License URI: http://opensource.org/licenses/MIT
+ 
+@@ -21,7 +21,7 @@
+ * Support for all common used languages
+ * Theme Customizer
+ * Inline Syntax Highlighting
+-* Visual-Editor (TinyMCE) Integration
++* **Full** Visual-Editor (TinyMCE) Integration
+ * Easy to use Text-Editor mode through the use of Shortcodes
+ * Advanced configuration options (e.g. CDN usage) are available within the options page.
+ * Supports code-groups (displays multiple code-blocks within a tab-pane)
+@@ -198,15 +198,27 @@
+ 
+ 1. CSS highlighting Example (GIT Theme)
+ 2. Visual Editor Integration
+-3. Options Page - Appearance Settings
+-4. Options Page - Advanced Settings
+-5. Theme Customizer - General styles
+-6. Theme Customizer - Language Token styling
+-7. Special options for use with a CDN (Content Delivery Network)
+-8. Tab-Pane Example (multiple languages)
++3. Visual Editor Code Settings
++4. Visual Editor Inline/Block Formats
++5. Options Page - Appearance Settings
++6. Options Page - Advanced Settings
++7. Theme Customizer - General styles
++8. Theme Customizer - Language Token styling
++9. Special options for use with a CDN (Content Delivery Network)
++10. Tab-Pane Example (multiple languages)
+ 
+ == Changelog ==
+ 
++= 2.3 =
++* Added Tab / Tab-Shift keyhandler to re-indent code within an Enlighter-Codeblock (the `tabfocus` plugin will be deactivated! - you can't use the tab key anymore to leave the editor window)
++
++= 2.2 =
++* Added "Code Insert Dialog" to avoid copy-auto-formatting issues - feature requested on [WordPress Forums](http://wordpress.org/support/topic/code-indent-removed-by-wordpress-editor?replies=9#post-5652635)
++* Added "Enlighter Settings Button" to control the Enlighter Settings (highlight, show-linenumbers, ..) directly from the Visual-Editor - just click into a codeblock and the button will appear (requires WordPress >=3.9)
++* Added Enlighter Toolbar Menu-Buttons
++* New Visual-Editor integration style
++* Bugfix: Added missing codeblock-name for "C#"
++
+ = 2.1 =
+ * Added EnlighterJS 2.2
+ * Added language support for C# (csharp) [provided by Joshua Maag](https://github.com/joshmaag)
+@@ -281,6 +293,9 @@
+ 
+ == Upgrade Notice ==
+ 
++= 2.2 =
++Full Visual-Editor (TinyMCE4) Integration including codeblock-settings (WordPress >= 3.9 required)
++
+ = 2.0 =
+ Added Inline-Syntax-Highlighting as well as some other cool feature - please go to the settings page and click "Apply Settings"
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/generic.html b/EnlighterJS/Resources/TestcaseData/generic.html new file mode 100644 index 0000000..d53db4d --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/generic.html @@ -0,0 +1,25 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +Object.notify([3.141, "Test"]); invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +

Generic Highlighting

+
+// R Language Example using Generic Highlighting
+// Source: https://en.wikipedia.org/wiki/R_%28programming_language%29
+
+
+library(caTools)         # external package providing write.gif function
+jet.colors <- colorRampPalette(c("#00007F", "blue", "#007FFF", "cyan", "#7FFF7F",
+                                 "yellow", "#FF7F00", "red", "#7F0000"))
+m <- 1000                # define size
+C <- complex( real=rep(seq(-1.8,0.6, length.out=m), each=m ),
+              imag=rep(seq(-1.2,1.2, length.out=m), m ) )
+C <- matrix(C,m,m)       # reshape as square matrix of complex numbers
+Z <- 0                   # initialize Z to zero
+X <- array(0, c(m,m,20)) # initialize output 3D array
+for (k in 1:20) {        # loop with 20 iterations
+  Z <- Z^2+C             # the central difference equation
+  X[,,k] <- exp(-abs(Z)) # capture results
+}
+write.gif(X, "Mandelbrot.gif", col=jet.colors, delay=800)
+
diff --git a/EnlighterJS/Resources/TestcaseData/html.html b/EnlighterJS/Resources/TestcaseData/html.html new file mode 100644 index 0000000..3c720b8 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/html.html @@ -0,0 +1,33 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +<link rel="stylesheet" type="text/css" href="../Build/EnlighterJS.yui.css" /> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+
+<head>
+		<!-- Include EnlighterJS Styles -->
+		<link rel="stylesheet" type="text/css" href="../Build/EnlighterJS.yui.css" />
+		
+		<!-- Include MooTools Framework -->
+		<script type="text/javascript" src="mootools-core-1.4.5-full-nocompat.js"></script>
+		
+		<!-- Include EnlighterJS -->
+		<script type="text/javascript" src="../Build/EnlighterJS.yui.js" ></script>
+		
+		<!-- Initialize EnlighterJS --> 
+		<script type="text/javascript">
+		window.addEvent('domready', function() {
+			// highlight all pre tags
+			$$('pre').light({
+				altLines : 'hover',
+				indent : 2,
+				editable: false
+			});
+		});
+		</script>
+
+<!-- Syntax highlight using Languages/Js.js and default theme --> 
+<pre data-enlighter-language="css">var myClass = new Class({})</pre> 
+ 
+<!-- Syntax highlight using Languages/Php.js and theme from Themes/Twilight.css --> 
+<pre data-enlighter-language="php" data-enlighter-theme="twilight"><?php php_info() ?></pre>
+
+
diff --git a/EnlighterJS/Resources/TestcaseData/ini.html b/EnlighterJS/Resources/TestcaseData/ini.html new file mode 100644 index 0000000..94b6a58 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/ini.html @@ -0,0 +1,73 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +docref_root = "/phpmanual/" invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +

PHP.ini Example

+ +
+; An XML-RPC faultCode
+xmlrpc_error_number = 0
+
+; When PHP displays or logs an error, it has the capability of formatting the
+; error message as HTML for easier reading. This directive controls whether
+; the error message is formatted as HTML or not.
+; Note: This directive is hardcoded to Off for the CLI SAPI
+; Default Value: On
+; Development Value: On
+; Production value: On
+; http://php.net/html-errors
+html_errors = On
+
+docref_root = "/phpmanual/"
+
+; http://php.net/docref-ext
+docref_ext = .html
+
+
+[Session]
+; Handler used to store/retrieve data.
+; http://php.net/session.save-handler
+session.save_handler = files
+
+; Whether to use strict session mode.
+; Strict session mode does not accept uninitialized session ID and regenerate
+; session ID if browser sends uninitialized session ID. Strict mode protects
+; applications from session fixation via session adoption vulnerability. It is
+; disabled by default for maximum compatibility, but enabling it is encouraged.
+; https://wiki.php.net/rfc/strict_sessions
+session.use_strict_mode = 0
+
+; Whether to use cookies.
+; http://php.net/session.use-cookies
+session.use_cookies = 1
+
+; http://php.net/session.cookie-secure
+;session.cookie_secure =
+
+; This option forces PHP to fetch and use a cookie for storing and maintaining
+; the session id. We encourage this operation as it's very helpful in combating
+; session hijacking when not specifying and managing your own session id. It is
+; not the be-all and end-all of session hijacking defense, but it's a good start.
+; http://php.net/session.use-only-cookies
+session.use_only_cookies = 1
+
+ +

Lighttpd Config

+
+server.document-root = "/var/www/servers/www.example.org/pages/"
+
+server.port = 80
+
+server.username = "www"
+server.groupname = "www"
+
+mimetype.assign = (
+".html" => "text/html",
+".txt" => "text/plain",
+".jpg" => "image/jpeg",
+".png" => "image/png"
+)
+
+static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc" )
+index-file.names = ( "index.html" )
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/java.html b/EnlighterJS/Resources/TestcaseData/java.html new file mode 100644 index 0000000..e755126 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/java.html @@ -0,0 +1,93 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +System.out.println("Hello World!"); invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ + +
+public class Hello{
+	public static void main(String[] args)
+		throws IOException{
+	
+		System.out.println("Hello World!");
+	}
+}
+
+
+// Source:  http://en.wikipedia.org/wiki/Java_%28programming_language%29
+// OddEven.java
+import javax.swing.JOptionPane;
+ 
+public class OddEven{
+    /**
+     * "input" is the number that the user gives to the computer
+     */
+    private int input; // a whole number("int" means integer)
+ 
+    /**
+     * This is the constructor method. It gets called when an object of the OddEven type
+     * is being created.
+     */
+    public T OddEven() {
+        /*
+         * In most Java programs constructors can initialize objects with default values, or create
+         * other objects that this object might use to perform its functions. In some Java programs, the
+         * constructor may simply be an empty function if nothing needs to be initialized prior to the
+         * functioning of the object. In this program's case, an empty constructor would suffice.
+         * A constructor must exist; however, if the user doesn't put one in then the compiler
+         * will create an empty one.
+         */
+         return null;
+    }
+ 
+    /**
+     * This is the main method. It gets called when this class is run through a Java interpreter.
+     * @param args command line arguments (unused)
+     */
+    public static void main(final String[] args) {
+       /*
+        * This line of code creates a new instance of this class called "number" (also known as an
+        * Object) and initializes it by calling the constructor. The next line of code calls
+        * the "showDialog()" method, which brings up a prompt to ask you for a number
+        */
+       OddEven number = new OddEven();
+       number.showDialog();
+    }
+ 
+    public void showDialog() {
+        /*
+         * "try" makes sure nothing goes wrong. If something does,
+         * the interpreter skips to "catch" to see what it should do.
+         */
+        try {
+            /*
+             * The code below brings up a JOptionPane, which is a dialog box
+             * The String returned by the "showInputDialog()" method is converted into
+             * an integer, making the program treat it as a number instead of a word.
+             * After that, this method calls a second method, calculate() that will
+             * display either "Even" or "Odd."
+             */
+            this.input = Integer.parseInt(JOptionPane.showInputDialog("Please enter a number."));
+            this.calculate();
+        } catch (final NumberFormatException e) {
+            /*
+             * Getting in the catch block means that there was a problem with the format of
+             * the number. Probably some letters were typed in instead of a number.
+             */
+            System.err.println("ERROR: Invalid input. Please type in a numerical value.");
+        }
+    }
+ 
+    /**
+     * When this gets called, it sends a message to the interpreter.
+     * The interpreter usually shows it on the command prompt (For Windows users)
+     * or the terminal (For *nix users).(Assuming it's open)
+     */
+    private void calculate() {
+        if ((this.input % 2) == 0) {
+            JOptionPane.showMessageDialog(null, "Even");
+        } else {
+            JOptionPane.showMessageDialog(null, "Odd");
+        }
+    }
+}
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/javascript.html b/EnlighterJS/Resources/TestcaseData/javascript.html new file mode 100644 index 0000000..996dd42 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/javascript.html @@ -0,0 +1,268 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +var another_greeting = 'Greetings, people of Earth.'; invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +
+// Comments
+/* This
+ is a
+ block
+ * comment
+ */
+
+/** Numbers */
+345;    // an "integer", although there is only one numeric type in JavaScript
+34.5;   // a floating-point number
+3.45e2; // another floating-point, equivalent to 345
+0377;   // an octal integer equal to 255
+0xFF;   // a hexadecimal integer equal to 255, the letters A-F may be upper- or lowercase
+
+/** Strings */
+var greeting = "Hello, world!";
+var another_greeting = 'Greetings, people of Earth.';
+var escaped_strings = "Hello from an \" escaped string" + 'this should \' work';
+
+/** Regex */
+var regex = new RegExp("pattern" [, "flags"]);
+var literal = /pattern/gimy;
+
+/** Snippet */
+var Language = new Class({
+	
+	Implements: [Options],
+	options: {
+		matchType: "standard",
+		strict: false
+	},
+	language: '',
+	defaultTheme: 'standard',
+	
+	patterns: new Hash(),
+	keywords: new Hash(),
+	rules:    new Hash(),
+	delimiters: new Hash({
+		start: null,
+		end: null
+	}),
+
+	/************************
+	 * Common Regex Rules
+	 ***********************/
+	common: {	
+		slashComments: /(?:^|[^\\])\/\/.*$/gm, // Matches a C style single-line comment.
+		poundComments: /#.*$/gm,                 // Matches a Perl style single-line comment.
+		multiComments: /\/\*[\s\S]*?\*\//gm,     // Matches a C style multi-line comment.
+		aposStrings:   /'[^'\\]*(?:\\.[^'\\]*)*'/gm, // Matches a string enclosed by single quotes.
+		quotedStrings: /"[^"\\]*(?:\\.[^"\\]*)*"/gm, // Matches a string enclosed by double quotes.
+		strings:       /'[^'\\]*(?:\\.[^'\\]*)*'|"[^"\\]*(?:\\.[^"\\]*)*"/gm, // Matches both.
+		properties:    /\.([\w]+)\s*/gi,   // Matches a property: .property style.
+		methodCalls:   /\.([\w]+)\s*\(/gm, // Matches a method call: .methodName() style.
+		functionCalls: /\b([\w]+)\s*\(/gm,   // Matches a function call: functionName() style.
+		brackets:      /\{|\}|\(|\)|\[|\]/g, // Matches any of the common brackets.
+		numbers:       /\b((?:(\d+)?\.)?[0-9]+|0x[0-9A-F]+)\b/gi // Matches integers, decimals, hexadecimals.
+	},
+	
+	/************************
+	 * Language Constructor
+	 ***********************/
+	initialize: function(lighter, theme, options, tokens) {
+		this.setOptions(options);
+		this.tokens = tokens || [];
+		options = this.options;
+		
+		// Set Lighter/Language/Theme relationship.
+		this.lighter = lighter;
+		this.theme = new Theme[theme || this.defaultTheme](lighter, this);
+		
+		// Add delimiter rules if not in strict mode
+		if (!options.strict) {
+			if (this.delimiters.start) this.addLanguage('delimBeg', this.delimiters.start, 'de1');
+			if (this.delimiters.end)   this.addLanguage('delimEnd', this.delimiters.end,   'de2');
+		}
+		
+		// Set Keyword Rules from this.keywords object.
+		this.keywords.each(function(keywordSet, ruleName) {
+			if (keywordSet.csv != '') {
+				this.addLanguage(ruleName, this.csvToRegExp(keywordSet.csv, "g"), keywordSet.alias);
+			}
+		}, this);
+		
+		// Set Rules from this.patterns object.
+		this.patterns.each(function(regex, ruleName) {
+			this.addLanguage(ruleName, regex.pattern, regex.alias);
+		}, this);
+		
+		// Set builder object for matchType.
+		this.builder = new Hash({
+			'standard': this.findMatches,
+			'lazy':     this.findMatchesLazy
+		});
+		
+		/** Process source code based on match type. */
+		var codeBeg = 0,
+		    codeEnd = lighter.code.length,
+		    codeSeg = '',
+		    delim   = this.delimiters,
+		    matches = [],
+		    match   = null,
+		    endMatch = null;
+		
+		if (!options.strict) {
+			// Find matches through the complete source code.
+			matches.extend(this.builder[options.matchType].pass(lighter.code, this)());
+		} else if (delim.start && delim.end) {
+			// Find areas between language delimiters and find matches there.
+			while ((match = delim.start.exec(lighter.code)) != null ) {
+				delim.end.lastIndex = delim.start.lastIndex;
+				if ((endMatch = delim.end.exec(lighter.code)) != null ) {
+					matches.push(new Token(match[0], 'de1', match.index));
+					codeBeg = delim.start.lastIndex;
+					codeEnd = endMatch.index-1;
+					codeSeg = lighter.code.substring(codeBeg, codeEnd);
+					matches.extend(this.builder[options.matchType].pass([codeSeg, codeBeg], this)());
+					matches.push(new Token(endMatch[0], 'de2', endMatch.index));
+				}
+			}
+		}
+		this.tokens = matches;
+	},
+	
+	/************************
+	 * Regex Helper methods.
+	 ***********************/
+	addLanguage: function(languageName, RegEx, className) {
+		this.rules[languageName] = RegEx;
+		this.theme.addAlias(languageName, className);
+	},
+	csvToRegExp: function(csv, mod) {return new RegExp('\\b(' + csv.replace(/,\s*/g, '|') + ')\\b', mod);},
+	delimToRegExp: function(beg, esc, end, mod, suffix) {
+		beg = beg.escapeRegExp();
+		if (esc) esc = esc.escapeRegExp();
+		end = (end) ? end.escapeRegExp() : beg;
+		pat = (esc) ? beg+"[^"+end+esc+'\\n]*(?:'+esc+'.[^'+end+esc+'\\n]*)*'+end : beg+"[^"+end+'\\n]*'+end;
+		return new RegExp(pat+(suffix || ''), mod || '');
+	},
+	strictRegExp: function() {
+		var regex = '(';
+		for (var i = 0; i < arguments.length; i++) {
+			regex += arguments[i].escapeRegExp();
+			regex += (i < arguments.length - 1) ? '|' : '';
+		}
+		regex += ')';
+		return new RegExp(regex, "gim");
+	},
+	
+	/************************
+	 * Match finding Methods
+	 ***********************/
+	findMatches: function(code, offset) {
+		var tokens       = [],
+		    startIndex  = 0,
+		    matchIndex  = code.length
+		    insertIndex = 0,
+		    match      = null,
+		    type       = null,
+		    newToken    = null,
+		    rule       = null,
+		    rules      = {},
+		    currentMatch = null,
+		    futureMatch  = null;
+		
+		offset = (offset) ? offset : 0;
+		this.rules.each(function(regex, rule) {
+			rules[rule] = {pattern: regex, enabled: true, lastIndex: 0};
+		}, this);
+		    
+		while(startIndex < code.length) {
+			matchIndex = code.length;
+			match = null;
+			for (rule in rules) {
+				rules[rule].pattern.lastIndex = startIndex;
+				currentMatch = rules[rule].pattern.exec(code);
+				if (currentMatch === null) {
+					delete rules[rule];
+				} else {
+					if (currentMatch.index < matchIndex) {
+			      match      = currentMatch;
+			      type       = rule;
+			      matchIndex = currentMatch.index;
+			    } else if (currentMatch.index == matchIndex && match[0].length < currentMatch[0].length) {
+						match      = currentMatch;
+						type       = rule;
+						matchIndex = currentMatch.index;
+					}
+			    rules[rule].nextIndex = rules[rule].pattern.lastIndex - currentMatch[0].length;
+			  }
+			}
+			if (match != null) {
+				index = (match[1] && match[0].contains(match[1])) ? match.index + match[0].indexOf(match[1]) : match.index;
+				newToken = new Token(match[1] || match[0], type, index+offset);
+				tokens.push(newToken);
+				
+				futureMatch = rules[type].pattern.exec(code);
+	      if (!futureMatch) {
+	      	rules[type].nextIndex = code.length;
+	      } else {
+	      	rules[type].nextIndex = rules[type].pattern.lastIndex - futureMatch[0].length;
+	      }
+				
+				var min = code.length;
+				for (rule in rules) {
+					if (rules[rule].nextIndex < min) {
+						min = rules[rule].nextIndex;
+					}
+				}
+				startIndex = Math.max(min, newToken.end - offset);
+			} else {
+				break;
+			}
+		}
+		return tokens;
+	},
+	findMatchesLazy: function(code, offset) {
+		var tokens = this.tokens,
+		    match = null
+		    index = 0;
+		
+		offset = (offset) ? offset : 0;
+		
+		this.rules.each(function(regex, rule) {
+			while ((match = regex.exec(code)) != null) {
+				index = (match[1] && match[0].contains(match[1])) ? match.index + match[0].indexOf(match[1]) : match.index;
+				tokens.push(new Token(match[1] || match[0], rule, index + offset));
+			}
+		}, this);
+		return this.purgeTokens(tokens);
+	},
+	purgeTokens: function(tokens) {
+		tokens = tokens.sort(this.compareTokens);
+		for (var i = 0, j = 0; i < tokens.length; i++) {
+			if (tokens[i] == null) continue;
+			for (j = i+1; j < tokens.length && tokens[i] != null; j++) {
+				if      (tokens[j] == null)            {continue;}
+				else if (tokens[j].isBeyond(tokens[i])) {break;}
+				else if (tokens[j].overlaps(tokens[i])) {tokens[i] = null;}
+				else if (tokens[i].contains(tokens[j])) {tokens[j] = null;}
+			}
+		}
+		return tokens.clean();
+	},
+	compareTokens: function(token1, token2) {return token1.index - token2.index;}
+});
+
+var Token = new Class({
+
+	initialize: function(match, type, index) {
+		this.text   = match;
+		this.type   = type;
+		this.index  = index;
+		this.length = this.text.length;
+		this.end    = this.index + this.length;
+	},
+	contains: function(token) {return (token.index >= this.index && token.index < this.end);},
+	isBeyond: function(token) {return (this.index >= token.end);},
+	overlaps: function(token) {return (this.index == token.index && this.length > token.length);},
+	toString: function() {return this.index+' - '+this.text+' - '+this.end;}
+});
+
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/json.html b/EnlighterJS/Resources/TestcaseData/json.html new file mode 100644 index 0000000..0ec8bf0 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/json.html @@ -0,0 +1,29 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +{ value: 'Hello World' } invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +
+{
+  "Herausgeber": "Xema",
+  "Nummer": "1234-5678-9012-3456",
+  "Deckung": 2e+6,
+  "Währung": "EURO",
+  "Inhaber": {
+    "Name": "Mustermann",
+    "Vorname": "Max",
+    "männlich": true,
+    "Hobbys": [ "Reiten", "Golfen", "Lesen" ],
+    "Alter": 42,
+    "Kinder": [],
+    "Partner": null
+  }
+}
+
+{ "X1": 123, "Y1": 81.123, "Z1": false,
+    "T": [
+        { "x": 1, "y": 2},
+        { "x": 1, "y": 2},
+        { "x": 1, "y": 2},
+    ]
+}
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/less.html b/EnlighterJS/Resources/TestcaseData/less.html new file mode 100644 index 0000000..19ec31b --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/less.html @@ -0,0 +1,128 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +list-style: decimal-leading-zero outside; invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+
+@base: #f938ab;
+
+.box-shadow(@style, @c) when (iscolor(@c)) {
+  -webkit-box-shadow: @style @c;
+  box-shadow:         @style @c;
+}
+.box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {
+  .box-shadow(@style, rgba(0, 0, 0, @alpha));
+}
+.box {
+  color: saturate(@base, 5%);
+  border-color: lighten(@base, 30%);
+  div { .box-shadow(0 0 5px, 30%) }
+}
+
+#menu a {
+  color: #111;
+  .bordered;
+}
+
+.post a {
+  color: red;
+  .bordered;
+}
+
+.screen-color {
+  @media screen {
+    color: green;
+    @media (min-width: 768px) {
+      color: red;
+    }
+  }
+  @media tv {
+    color: black;
+  }
+}
+
+@base: 5%;
+@filler: @base * 2;
+@other: @base + @filler;
+
+color: #888 / 4;
+background-color: @base-color + #111;
+height: 100% / 2 + @filler;
+
+
+
+.weird-element {
+  content: ~"^//* some horrible but needed css hack";
+}
+
+@base: #f04615;
+@width: 0.5;
+
+.class {
+  width: percentage(@width); // returns `50%`
+  color: saturate(@base, 5%);
+  background-color: spin(lighten(@base, 25%), 8);
+}
+
+
+
+
+/* HEADER
+----------------------------------- */
+header{
+	a{
+		font-size: 13px;
+	}
+
+
+	.navbar-collapse li:hover ul{
+		display: block;
+	}
+
+	.navbar-beyond{
+		height: 70px;
+		.transition(500ms);
+
+		.navbar-brand span{
+			font-size: 11px;
+		}
+	}
+
+	.navbar-beyond-light{
+		height: 45px;
+		border-bottom: solid 1px #e7e7e7;
+		background-color: @color_bluegrey1 !important;
+
+		.navbar-brand{
+			color: #505050 !important;
+
+			&:hover, &:hover span{
+				color: #505050 !important;
+			}
+
+			span{
+				display: none;
+			}
+		}
+	}
+
+	.navbar-beyond-dark{
+		background-color: rgba(0,0,0,0.85);
+		border-bottom: none;
+
+		.navbar-brand{
+			color: #f0f0f0 !important;
+
+			&:hover, &:hover span{
+				color: #f0f0f0 !important;
+			}
+		}
+
+		.nav>li>a {
+			color: #d0d0d0 !important;
+		}
+
+		.navbar-collapse{
+			padding: 10px 0px 0px 0px;
+		}
+	}
+}
+		
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/lua.html b/EnlighterJS/Resources/TestcaseData/lua.html new file mode 100644 index 0000000..582b829 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/lua.html @@ -0,0 +1,146 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +local a = "Double Quoted\nString" invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +
+-- SOURCE: http://www.lua.org/manual/5.3/manual.html
+
+-- COMMENTS
+-- --------------------------------------------------
+
+-- This is a single line comment
+print "Hello World!"
+
+--[[Comments can be spread
+across several lines ]]
+print "Hello World!"
+
+---[[The long handled doubleshovel means that this code will run
+print "This will print because it is not a comment!"
+-- We can still include comments by prefixing them with a doubledash
+-- print "This will not print because it is commented out"
+]]
+
+-- STRINGS
+-- --------------------------------------------------
+local a = "Double Quoted\nString"
+local b = 'Double Quoted\nString'
+local c = [[Multi
+Line String
+    ]]
+
+a = 'alo\n123"'
+a = "alo\n123\""
+a = '\97lo\10\04923"'
+a = [[alo
+123"]]
+a = [==[
+alo
+123"]==]
+
+-- NUMBERS
+-- --------------------------------------------------
+a = 4
+b = 0.4
+c = 4.57e-3
+D = 0.3e12
+e = 5e+20
+
+-- CONSTANT
+-- --------------------------------------------------
+a = true
+b = false
+c = nil
+instance.merge(true, false, nil, 1234, 871.124E-12)
+
+-- LOGICAL OPERATORS
+-- --------------------------------------------------
+print(4 and 5)         --> 5
+print(nil and 13)      --> nil
+print(false and 13)    --> false
+print(4 or 5)          --> 4
+print(false or 5)      --> 5
+max = (x > y) and x or y
+print(not nil)      --> true
+print(not false)    --> true
+print(not 0)        --> false
+print(not not nil)  --> false
+
+-- TABLES
+-- --------------------------------------------------
+a = {}     -- create a table and store its reference in `a'
+k = "x"
+a[k] = 10        -- new entry, with key="x" and value=10
+a[20] = "great"  -- new entry, with key=20 and value="great"
+print(a["x"])    --> 10
+k = 20
+print(a[k])      --> "great"
+a["x"] = a["x"] + 1     -- increments entry "x"
+print(a["x"])    --> 11
+
+days = {"Sunday", "Monday", "Tuesday", "Wednesday",
+            "Thursday", "Friday", "Saturday"}
+
+-- EXAMPLE
+-- --------------------------------------------------
+line = io.read()     -- read a line
+n = tonumber(line)   -- try to convert it to a number
+if n == nil then
+  error(line .. " is not a valid number")
+else
+  print(n*2)
+end
+
+function foo (a)
+print("foo", a)
+return coroutine.yield(2*a)
+end
+
+co = coroutine.create(function (a,b)
+   print("co-body", a, b)
+   local r = foo(a+1)
+   print("co-body", r)
+   local r, s = coroutine.yield(a+b, a-b)
+   print("co-body", r, s)
+   return b, "end"
+end)
+
+print("main", coroutine.resume(co, 1, 10))
+print("main", coroutine.resume(co, "r"))
+print("main", coroutine.resume(co, "x", "y"))
+print("main", coroutine.resume(co, "x", "y"))
+
+list = nil
+    for line in io.lines() do
+      list = {next=list, value=line}
+    end
+
+x = 10
+local i = 1        -- local to the chunk
+
+while i<=x do
+  local x = i*2    -- local to the while body
+  print(x)         --> 2, 4, 6, 8, ...
+  i = i + 1
+end
+
+if i > 20 then
+  local x          -- local to the "then" body
+  x = 20
+  print(x + 2)
+else
+  print(x)         --> 10  (the global one)
+end
+
+print(x)           --> 10  (the global one)
+
+
+
+do
+  local a2 = 2*a
+  local d = sqrt(b^2 - 4*a*c)
+  x1 = (-b + d)/a2
+  x2 = (-b - d)/a2
+end          -- scope of `a2' and `d' ends here
+print(x1, x2)
+
diff --git a/EnlighterJS/Resources/TestcaseData/markdown.html b/EnlighterJS/Resources/TestcaseData/markdown.html new file mode 100644 index 0000000..b8d226e --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/markdown.html @@ -0,0 +1,96 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +### XmlToJsObject invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +
+XmlToJsObject
+===========
+
+XmlToJsObject is a free, easy-to-use utility to convert XML-Documents/XML-Strings to Javacript-Objects
+
+![Screenshot](http://static.andidittrich.de/XmlToJsObject/screenshot.jpg)
+
+Features
+--------
+
+* Easy XML to JS-Object conversion like JSON to JS-Object
+* Written in Pure-Javascipt (standalone - no framework like jQuery or MooTools required!)
+* Supports XML-Documents (from AJAX/XHR Requests) as well as XML-Strings
+* Smart-Mode automatically merges nodes+attributes for a much easier handling of config files
+* Ultra lightweight: only 3.9kB of Code (uncompressed); 1.64kB (yui compressed)
+* Well commented sourcecode allows easy user modifications/custom extensions
+* Native integration into MooTools (Object.fromXML)
+
+Demo
+----
+The following Examples require the `JSON.stringify` method (supported by all modern browsers)
+
+* [Example](http://static.andidittrich.de/XmlToJsObject/Example.html)
+* [MooTools Example](http://static.andidittrich.de/XmlToJsObject/Example.MooTools.html)
+* [Minimal Example](http://static.andidittrich.de/XmlToJsObject/Example.Minimal.html)
+
+Available Methods
+-----------------
+
+### XmlToJsObject
+Pure Javascript Implementation
+
+```js
+XmlToJsObject(data [, smartMode=true])
+```
+**Description:** Converts a XML-String, XMLNode or XMLDocument into a Javascript-Object
+
+**data**
+Type: mixed ( [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String), [XMLDocument](https://developer.mozilla.org/en-US/docs/Web/API/Node), [XMLNode](https://developer.mozilla.org/en-US/docs/Web/API/Node) )
+A valid XML-String, XMLNode or XMLDocument Node containing various child nodes and attributes
+	
+**smartMode**
+Type: [Boolean](http://www.w3schools.com/js/js_datatypes.asp)
+Optional (default=**true**) - Merge attribute names with node-names
+
+### Object.fromXML (MooTools)
+Native MooTools implementation: automatically available when using MooTools on your page!
+
+```js
+Object.fromXML(data [, smartMode=true])
+```
+**Description:** Converts a XML-String, XMLNode or XMLDocument into a Javascript-Object
+
+**data**
+Type: mixed ( [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String), [XMLDocument](https://developer.mozilla.org/en-US/docs/Web/API/Node), [XMLNode](https://developer.mozilla.org/en-US/docs/Web/API/Node) )
+A valid XML-String, XMLNode or XMLDocument Node containing various child nodes and attributes
+	
+**smartMode**
+Type: [Boolean](http://www.w3schools.com/js/js_datatypes.asp)
+Optional (default=**true**) - Merge attribute names with node-names
+
+	
+Tested With
+-----------
+* Firefox 27.0.1
+* Chrome 33.0.1750.117
+* Internet Explorer 11.0.9600.16518
+* Safari 5.1.7 (Windows)
+* Android 4.3 (WebView)
+
+
+Browser compatibility
+---------------------
+The XmlToJsObject Utility requires the [DOMParser](http://www.w3schools.com/dom/dom_parser.asp) object. If you want to support earlier versions of the InternetExplorer you can write a [fallback](http://www.w3schools.com/dom/dom_parser.asp) using `new ActiveXObject("Microsoft.XMLDOM")` instead of the DOMParser.
+
+Compatibility Reference: [https://developer.mozilla.org/en-US/docs/Web/API/DOMParser](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser)
+
+* Chrome 1.0+
+* Safari osx+ios (WebKit) 3.2+
+* Internet Explorer 9+
+* Firefox 1.7+
+* Opera 8+
+* Android-Webview 4.3 (Webkit Engine)
+
+
+License
+-------
+
+XmlToJsObject is licensed under [The MIT License (X11)](http://opensource.org/licenses/MIT)
+
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/matlab.html b/EnlighterJS/Resources/TestcaseData/matlab.html new file mode 100644 index 0000000..fccab67 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/matlab.html @@ -0,0 +1,226 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +[t,x] = meshgrid(-1:0.2:1, -1:0.2:1); invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +

Matlab Script

+
+function [X]=fkt1000(t, x)
+
+    lambda=-1000;
+    X = lambda*( x - exp(-t) ) - exp(-t);
+
+end
+
+function fRichtungsfeld(fhandle)
+    % create meshgrid
+    [t,x] = meshgrid(-1:0.2:1, -1:0.2:1);
+
+    % exec function
+    z = feval(fhandle, t, x);
+
+    % draw figure
+    figure;
+    quiver(t, x, ones(size(t)), z);
+    axis([-1,1,-1,1]);
+    xlabel('t');
+    ylabel('x');
+    title('Richtungsfeld, dx=dt=0.2');
+    legend('Richtungsfeld');
+end
+
+classdef Uebung5< handle
+   % Static Methods
+   methods(Static=true)
+
+       %%  Aufgabe 15
+       function Aufgabe15()
+            A = [
+                0.9635, 1.4266;
+                1.4266, 0.0365
+                ];
+
+            x0 = [
+                  0;
+                  1
+                 ];
+
+             p = PowerMethod(A);
+             iter = NumericIterator(p, x0);
+
+             % error < 10^-5
+             iter.addAbortConditionListener(ErrorCalculationListener(10^-5));
+
+             % start iteration
+             iter.start();
+
+             % print result
+             fprintf('Eigenwert: %10.10f\nEigenvektor:\n', p.getEigenwert());
+             Array.print(iter.getResult());
+
+            % Approximation Error < 1.000000e-005 @ 19 Iterations
+            % Eigenwert: 2.0000066033
+            % Eigenvektor:
+            %         0.8090129
+            %         0.5877909
+       end
+
+
+
+       %% Aufgabe 16
+       function Aufgabe16()
+           % referenz f�r tf=0.95
+           ref = fAufgabe16Ref();
+
+           % startwert
+           x0 = 1;
+           t0 = 0;
+           tf = 0.95;
+
+           % output buffer
+           buffer = {};
+           j = 1;
+
+           % schrittzahl, diskrete werte
+           n = [20, 100, 200, 1000, 2000, 10000, 20000, 100000];
+
+           % draw table
+           gui = table('Aufgabe 16');
+
+           % Verfahren anwenden
+           for i=1:1:length(n)
+                % schrittweite
+                h = (tf-t0)/(n(i)-1);
+
+                % set table output
+                buffer{j, 1} = n(i);
+                buffer{j, 2} = sprintf('%d', h);
+
+                duration = 0;
+
+                % euler
+                e = RungeKuttaMethod(@fAufgabe16, @fRKTEuler, t0, tf, h, x0);
+                buffer{j, 3} = sprintf('%d', abs(ref-e.getResult())/ref);
+                duration = duration + e.getDuration();
+
+                % heun
+                e = RungeKuttaMethod(@fAufgabe16, @fRKTHeun, t0, tf, h, x0);
+                buffer{j, 4} = sprintf('%d', abs(ref-e.getResult())/ref);
+                duration = duration + e.getDuration();
+
+                % mod euler
+                e = RungeKuttaMethod(@fAufgabe16, @fRKTMEuler, t0, tf, h, x0);
+                buffer{j, 5} = sprintf('%d', abs(ref-e.getResult())/ref);
+                duration = duration + e.getDuration();
+
+                % klassik RKV, just 4 fun ;)
+                e = RungeKuttaMethod(@fAufgabe16, @fRKTClassicRKM, t0, tf, h, x0);
+                buffer{j, 6} = sprintf('%d', abs(ref-e.getResult())/ref);
+                duration = duration + e.getDuration();
+
+                % set duration
+                buffer{j, 7} = sprintf('%d', duration);
+
+                % increment table row counter
+                j=j+1;
+
+                % tabelle updaten
+                gui.repaint(buffer);
+           end
+
+           % OUTPUT
+           % Result <h=5.000000e-002>: 6.460597267358655100
+           % Result <h=5.000000e-002>: 12.511638996887264000
+           % Result <h=5.000000e-002>: 12.048026035562726000
+           % Result <h=5.000000e-002>: 14.271173509689078000
+           % Result <h=9.595960e-003>: 17.964107899072395000
+           % Result <h=9.595960e-003>: 32.643393403424028000
+           % Result <h=9.595960e-003>: 32.155786064836953000
+           % Result <h=9.595960e-003>: 33.992428065470925000
+           % Result <h=4.773869e-003>: 25.392669207249959000
+           % Result <h=4.773869e-003>: 40.020849205774859000
+           % Result <h=4.773869e-003>: 39.753729672927300000
+           % Result <h=4.773869e-003>: 40.667817564725581000
+           % Result <h=9.509510e-004>: 41.312660057741127000
+           % Result <h=9.509510e-004>: 48.111744657920021000
+           % Result <h=9.509510e-004>: 48.088683279107258000
+           % Result <h=9.509510e-004>: 48.159528454354081000
+           % Result <h=4.752376e-004>: 45.338580595642853000
+           % Result <h=4.752376e-004>: 49.276209783713618000
+           % Result <h=4.752376e-004>: 49.269803171533532000
+           % Result <h=4.752376e-004>: 49.289181554821702000
+           % Result <h=9.500950e-005>: 49.333345578779792000
+           % Result <h=9.500950e-005>: 50.230354244304941000
+           % Result <h=9.500950e-005>: 50.230075076019553000
+           % Result <h=9.500950e-005>: 50.230908884512381000
+           % Result <h=4.750238e-005>: 49.894671915844583000
+           % Result <h=4.750238e-005>: 50.350966085905696000
+           % Result <h=4.750238e-005>: 50.350895538095877000
+           % Result <h=4.750238e-005>: 50.351105912323895000
+           % Result <h=9.500095e-006>: 50.355123772675057000
+           % Result <h=9.500095e-006>: 50.447664014784309000
+           % Result <h=9.500095e-006>: 50.447661168458090000
+           % Result <h=9.500095e-006>: 50.447669645483884000
+       end
+
+       %% Aufgabe 17
+       function Aufgabe17()
+            x0 = [
+                  1;
+                  0
+                 ];
+
+            % startwerte
+            t0 = 0;
+            tf = 50;
+
+            % schrittzahl
+            n = 1000;
+
+            % schrittweite
+            h = (tf-t0)/(n-1);
+
+            % Classic RKM
+            e = RungeKuttaMethod(@fAufgabe17, @fRKTClassicRKM, t0, tf, h, x0);
+
+            % cell array holen
+            result = e.getResults();
+
+            % cell array in 2 lineare double arrays konvertieren
+            x1 = [];
+            x2 = [];
+
+            for i=1:1:length(result)
+                x = result{i};
+                x1(i) = x(1);
+                x2(i) = x(2);
+            end
+
+            % phasenraum zeichnen
+            figure('Name', 'Aufgabe 17 - Phasenraum �ber x1, x2');
+            plot(x1, x2);
+            xlabel('x1');
+            ylabel('x2');
+
+            % x1(t) zeichnen
+            figure('Name', 'Aufgabe 17 - Abh�ngigkeiten von t');
+            subplot(2,1,1);
+            axis([0 50 -1 1]);
+            plot(t0:h:tf, x1);
+            xlabel('t');
+            ylabel('x1');
+
+            % x2(t) zeichnen
+            subplot(2,1,2);
+            axis([0 50 -1 1]);
+            plot(t0:h:tf, x2);
+            xlabel('t');
+            ylabel('x2');
+       end
+
+   % END STATIC METHODS
+   end
+
+% END CLASS
+end
+
+
diff --git a/EnlighterJS/Resources/TestcaseData/nohighlight.html b/EnlighterJS/Resources/TestcaseData/nohighlight.html new file mode 100644 index 0000000..df9039c --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/nohighlight.html @@ -0,0 +1,31 @@ +

Unhighlighted Code - retains your page styles!

+

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +<room number="123">Conference Room A</room> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +
+
+<building name="GlobalDynamics Main Building" id="0xFA8A91C6617DFA1B">
+	<group level="2">
+		<room number="123">Conference Room A</room>
+		<room number="124">Conference Room B</room>
+		<room number="125">Conference Room C</room>
+		<room number="126">Conference Room D</room>
+	</group>
+	<group level="2">
+		<room number="17">John's Office</room>
+		<room number="19">Eric's Office</room>
+	</group>
+	<group level="1">
+		<room number="091">Mainframe Housing A</room>
+		<room number="092">Mainframe Housing B</room>
+		<room number="090">Mainframe Power Supply Station</room>
+		<room number="089">Mainframe Backup Power Supply Station</room>
+	</group>
+	<group level="8">
+		<room number="1717" role="cto">CTO Office</room>
+		<room number="1819" role="ceo">CEO Office</room>
+		<room number="1820" role="cfo">CFO Office</room>
+	</group>
+</building>
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/nsis.html b/EnlighterJS/Resources/TestcaseData/nsis.html new file mode 100644 index 0000000..0034bc2 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/nsis.html @@ -0,0 +1,56 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +Name "installer_name" invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ + +
+/*
+  Everybody
+  needs a
+  multi-line
+  comment!
+*/
+
+; Includes ---------------------------------
+!include MUI2.nsh
+
+; Settings ---------------------------------
+Name "installer_name"
+OutFile "installer_name.exe"
+RequestExecutionLevel user
+CRCCheck on
+!ifdef x64
+  InstallDir "$PROGRAMFILES64\installer_name"
+!else
+  InstallDir "$PROGRAMFILES\installer_name"
+!endif
+
+; Pages ------------------------------------
+!insertmacro MUI_PAGE_COMPONENTS 
+!insertmacro MUI_PAGE_DIRECTORY
+!insertmacro MUI_PAGE_INSTFILES
+
+; Languages --------------------------------
+!insertmacro MUI_LANGUAGE "English"
+
+; Sections ---------------------------------
+Section "section_name" section_index
+	# your code here
+SectionEnd
+
+; Descriptions -----------------------------
+LangString DESC_section_index ${LANG_English} "section_description"
+
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+  !insertmacro MUI_DESCRIPTION_TEXT ${section_index} $(DESC_section_index)
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+; Functions --------------------------------
+Function .onInit
+	StrCpy $0 "Notepad"
+	MessageBox MB_YESNO "Do you want to run $0?" IDYES +2
+	Quit
+	nsExec:Exec "notepad.exe"
+FunctionEnd
+	
+
diff --git a/EnlighterJS/Resources/TestcaseData/php.html b/EnlighterJS/Resources/TestcaseData/php.html new file mode 100644 index 0000000..bdd2f0e --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/php.html @@ -0,0 +1,258 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +echo 'Arnold once said: "I\'ll be back"'; invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +
+<?php
+// Comments
+
+/*
+This is
+a comment
+block
+*/
+
+/** Keywords */
+
+die() echo() empty() exit() eval() include() include_once() isset() list() require() require_once() return() print() unset()
+
+__CLASS__ __DIR__ __FILE__ __FUNCTION__ __METHOD__ __NAMESPACE__
+
+abstract and array() as break case catch cfunction class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new old_function or private protected public static switch throw try use var while xor
+
+/** String's */
+echo 'this is a simple string';
+
+echo 'You can also have embedded newlines in 
+strings this way as it is \'
+okay to do'; // Don't you agree
+
+// Outputs: Arnold once said: "I'll be back"
+echo 'Arnold once said: "I\'ll be back"';
+
+// Heredoc
+$str = <<<EOD
+Example of string
+spanning multiple lines
+using heredoc syntax.
+EOD;
+
+// Nowdoc
+$str = <<<'EOD'
+Example of string
+spanning multiple lines
+using nowdoc syntax.
+EOD;
+
+/** Numbers */
+
+$a = 1234; // decimal number
+$a = -123; // a negative number
+$a = 0123; // octal number (equivalent to 83 decimal)
+$a = 0x1A; // hexadecimal number (equivalent to 26 decimal)
+$a = 1.234; 
+$b = 1.2e3; 
+$c = 7E-10;
+
+
+/**
+ * Displays GitHub Style Buttons using GitHub API v3
+ * @url http://github-buttons.andidittrich.de/
+ * @see https://developer.github.com/v3/
+ * @author Andi Dittrich $lt;http://andidittrich.de$gt;
+    * @license Dual-Licensed under "The MIT License (X11)" and "Apache 2.0 License"
+ * @version 1.2
+ *
+ */
+class GitHubButtons{
+
+	// global cache dir
+	private $_cacheDir;
+
+	function __construct($cacheDir = '.'){
+		// store cache dir
+		$this->_cacheDir = $cacheDir;
+	}
+
+	/**
+	 * Defines the default options -
+	 * @param array $options
+	 * @return multitype:
+	 */
+	private function mergeOptions($options){
+		$defaults = array(
+				// large or small button ?
+				'large' => false,
+
+				// GitHub username
+				'owner' => null,
+
+				// GitHub repository name
+				'repo' => null,
+
+				// Button type (star, fork, watch, follow)
+				'type' => 'star',
+
+				// custom button text
+				'text' => null,
+
+				// enabled/disable counter - manual set the value
+				'count' => true,
+
+				// enable caching by default
+				'cache' => true,
+
+				// cache lifetime in seconds (2h default)
+				'cacheLifetime' => 7200,
+
+				// text/count if GitHub API is unavailable
+				'errorText' => 'NA'
+		);
+		return array_merge($defaults, $options);
+	}
+
+	/**
+	 * Generate the HTML Output
+	 * @param array $options
+	 */
+	public function button($options){
+		// set default options
+		$options = $this->mergeOptions($options);
+
+		// vars
+		$text = '';
+		$count = null;
+		$buttonLink = 'https://github.com/' . $options['owner'] . '/';
+		$counterLink = 'https://github.com/' . $options['owner'] . '/';
+		$apiUrl = '';
+        $responseSelector = '';
+
+		// star, fork, follow, watch are supported
+		switch ($options['type']){
+			case 'star':
+                $apiUrl = 'repos/' . $options['owner'] . '/' . $options['repo'];
+				$text = 'Star';
+				$buttonLink .= $options['repo'];
+				$counterLink .= $options['repo'] . '/stargazers';
+                $responseSelector = 'stargazers_count';
+				break;
+
+			case 'fork':
+                $apiUrl = 'repos/' . $options['owner'] . '/' . $options['repo'];
+				$text = 'Fork';
+				$buttonLink .= $options['repo'];
+				$counterLink .= $options['repo'] . '/network';
+                $responseSelector = 'forks_count';
+				break;
+
+			case 'watch':
+                $apiUrl = 'repos/' . $options['owner'] . '/' . $options['repo'];
+				$text = 'Watchers';
+				$buttonLink .= $options['repo'];
+				$counterLink .= $options['repo'] . '/watchers';
+                $responseSelector = 'subscribers_count';
+				break;
+
+			case 'follow':
+				$counterLink .= 'followers';
+				$text = 'Follow @' . $options['owner'];
+				$apiUrl = 'users/'.$options['owner'];
+                $responseSelector = 'followers';
+				break;
+		}
+
+		// user defined text ?
+		if ($options['text']!=null){
+			$text = $options['text'];
+		}
+
+		// user defined count ?
+		if (is_numeric($options['count'])){
+			$count = $options['count'];
+		}else{
+			// fetch count
+			$response = $this->doApiRequest($apiUrl, $options['cache'], $options['cacheLifetime'], $responseSelector);
+
+			// valid ?
+			if (is_numeric($response)){
+				$count = $response;
+			}else{
+				$count = $options['errorText'];
+			}
+		}
+
+		// large button ?
+		$large = ($options['large']===true ? ' github-btn-large' : '');
+
+		return '';
+	}
+
+	/**
+	 * Do Single HTTP GET Request including caching
+	 * @param unknown $url
+	 * @return string
+	 */
+	private function doApiRequest($url, $cacheEnabled, $cacheLifetime, $selector){
+		// cache url
+		$cachefilename = $this->_cacheDir . '/github.'.sha1($url.$selector).'.cache.json';
+
+		// 1h cachetime
+		if ($cacheEnabled && file_exists($cachefilename) && filemtime($cachefilename) > (time()-$cacheLifetime)){
+			return file_get_contents($cachefilename);
+		}
+
+		$opts = array('http' =>
+				array(
+						'method'  => 'GET',
+						'protocol_version' => '1.1',
+						'user_agent' => 'GitHubButtons/1.1',
+						'header'  => array(
+								'Content-type: application/x-www-form-urlencoded;charset=UTF-8',
+								'Connection: close',
+								'Accept: application/vnd.github.v3+json'
+						)
+				)
+		);
+
+		// send request
+		$data = false;
+		try{
+			$data = @file_get_contents('https://api.github.com/'.$url, false, stream_context_create($opts));
+		}catch(Exception $error){}
+
+		// success ?
+		if ($data===false){
+			return false;
+		}else{
+			// decode data
+			$jdata = json_decode($data, true);
+
+            // extract
+            $cnt = $jdata[$selector];
+
+			if ($cacheEnabled){
+				// cache data
+				file_put_contents($cachefilename, $cnt);
+			}
+
+			// return resposne data
+			return $cnt;
+		}
+	}
+
+	// singleton instance
+	private static $__instance;
+
+	// get singelton instance
+	public static function getInstance($cacheDir=null){
+		// check if singelton instance is avaible
+		if (self::$__instance==null){
+			// create new instance if not
+			self::$__instance = new self($cacheDir);
+		}
+		return self::$__instance;
+	}
+}
+
+?>
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/python.html b/EnlighterJS/Resources/TestcaseData/python.html new file mode 100644 index 0000000..99e42dc --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/python.html @@ -0,0 +1,68 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +links = [element for element in liste if element < pivotelement] invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +
+# SOURCE: http://de.wikipedia.org/wiki/Python_%28Programmiersprache%29
+def stack():
+  l = []
+  def pop(): return l.pop()
+  def push(element): l.append(element)
+  def isempty(): return len(l) == 0
+  return pop, push, isempty
+ 
+POP, PUSH, ISEMPTY = stack()
+
+while True:
+    try:
+        num = raw_input("Eine Zahl eingeben: ")
+        num = int(num)
+        break
+    except ValueError:
+        print("Eine _Zahl_, bitte!")
+        
+'''
+Multiline String Comment Style1
+Hello
+'''        
+
+def curry(func, knownargument):
+    return lambda unknownargument: func(unknownargument, knownargument)
+    
+"""
+Multiline String Comment Style2
+Hello
+""" 
+
+def quicksort(liste):
+    if len(liste) <= 1:
+        return liste
+    pivotelement = liste.pop()
+    links  = [element for element in liste if element < pivotelement]
+    rechts = [element for element in liste if element >= pivotelement]
+    return quicksort(links) + [pivotelement] + quicksort(rechts)     
+
+using webapp.runner do (config):
+    config.time_zone = 'UTC'
+    config.log_level = 'debug'
+
+# @SOURCE: http://docs.python.org/2/tutorial/classes.html     
+class Mapping:
+    def __init__(self, iterable):
+        self.items_list = []
+        self.__update(iterable)
+
+    def update(self, iterable):
+        for item in iterable:
+            self.items_list.append(item)
+
+    __update = update   # private copy of original update() method
+
+class MappingSubclass(Mapping):
+
+    def update(self, keys, values):
+        # provides new signature for update()
+        # but does not break __init__()
+        for item in zip(keys, values):
+            self.items_list.append(item)    
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/raw.html b/EnlighterJS/Resources/TestcaseData/raw.html new file mode 100644 index 0000000..5a27c1a --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/raw.html @@ -0,0 +1,31 @@ +

Unhighlighted Code - with EnlighterJS Container Styles!

+

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +<room number="123">Conference Room A</room> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +
+
+<building name="GlobalDynamics Main Building" id="0xFA8A91C6617DFA1B">
+	<group level="2">
+		<room number="123">Conference Room A</room>
+		<room number="124">Conference Room B</room>
+		<room number="125">Conference Room C</room>
+		<room number="126">Conference Room D</room>
+	</group>
+	<group level="2">
+		<room number="17">John's Office</room>
+		<room number="19">Eric's Office</room>
+	</group>
+	<group level="1">
+		<room number="091">Mainframe Housing A</room>
+		<room number="092">Mainframe Housing B</room>
+		<room number="090">Mainframe Power Supply Station</room>
+		<room number="089">Mainframe Backup Power Supply Station</room>
+	</group>
+	<group level="8">
+		<room number="1717" role="cto">CTO Office</room>
+		<room number="1819" role="ceo">CEO Office</room>
+		<room number="1820" role="cfo">CFO Office</room>
+	</group>
+</building>
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/ruby.html b/EnlighterJS/Resources/TestcaseData/ruby.html new file mode 100644 index 0000000..0f129fc --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/ruby.html @@ -0,0 +1,105 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +@users = User.find_all_by_logins(@changesets.collect(&:author).uniq).index_by(&:login) invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +
+=begin
+Multi-line comment test.
+Below are various syntax specific statements
+to test the parser with.
+=end
+
+# Keywords
+alias    and     begin   BEGIN
+break    case    class   def      defined?   do
+else     elsif   END     end      ensure     false
+for      if      in      module   next       nil
+not      or      redo    rescue   retry      return
+self     super   then    true     undef      unless
+until    when    while   yield
+
+# String Tests
+'no interpolation, backslash notation not applied'
+"applied #{interpolation}, and backslashes\n"
+%q(no interpolation)
+%Q(applied #{interpolation} and backslashes)
+%(interpolation and backslashes)
+`echo command interpretation with interpolation and backslashes`
+%x(echo command interpretation with interpolation and backslashes)
+myString = <<DOC
+Multi line string in here doc form.
+  Output will match format of heredoc.
+DOC
+
+# Regular Expressions
+/pattern/
+/pattern/iomx
+%r{pattern}
+%r{pattern}iomx
+
+#Symbols
+:Object
+:myVariable
+::notASymbol
+
+# Number Tests
+123                       # Fixnum
+-123                      # Fixnum (signed)
+1_123                     # Fixnum (underscore is ignored)
+-543                      # Negative Fixnum
+123_456_789_123_456_789   # Bignum
+123.45                    # Float
+1.2e-3                    # Float
+0xaabb                    # (Hexadecimal) Fixnum
+0377                      # (Octal) Fixnum
+-0b1010                   # (Binary [negated]) Fixnum
+0b001_001                 # (Binary) Fixnum
+?a                        # ASCII character code for 'a' (97)
+?\C-a                     # Control-a (1)
+?\M-a                     # Meta-a (225)
+?\M-\C-a                  # Meta-Control-a (129)
+
+# Names
+fred  anObject  _x  three_two_one # Local Variables
+@name  @_  @Size                  # Instance Variables
+@@name  @@_  @@Size               # Class Variables
+def MyClass                       # Constants
+PI = 3.1415926
+class BigBlob
+$params  $PROGRAM  $!  $_  $-a  $-. #Global variables
+
+# Example snippet
+class HistoryController < ApplicationController
+  before_filter :find_node
+  before_filter :repository_member_required
+ 
+  caches_action_content :index
+ 
+	# Single Line Comment
+  def index
+    @changesets = current_repository.changesets.paginate_by_path(@node.path, :page => params[:page])
+    if api_format?
+      render :layout => false
+    else
+      @users = User.find_all_by_logins(@changesets.collect(&:author).uniq).index_by(&:login)
+    end
+  end
+  
+  protected
+    def find_node
+      full_path = if params[:paths].last.to_s =~ /\.atom$/
+        request.format = :atom
+        params[:paths].first(params[:paths].size - 1)
+      else
+        params[:paths]
+      end
+      @node = current_repository.node(full_path * "/")
+      unless @node.accessible_by?(current_user)
+        status_message :error, "You do not have access to this path."
+        false
+      else
+        true
+      end
+    end
+end
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/rust.html b/EnlighterJS/Resources/TestcaseData/rust.html new file mode 100644 index 0000000..7a5548b --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/rust.html @@ -0,0 +1,157 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor + let y = match *x { 0 => "zero", _ => "some" }; invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ + +
+#!Source: Rust Reference https://doc.rust-lang.org/stable/reference.html
+
+/// string literal
+let a = "foobar";
+let b = "foo\
+         bar";
+
+assert_eq!(a,b);
+
+"foo"; r"foo";                     // foo
+"\"foo\""; r#""foo""#;             // "foo"
+
+"foo #\"# bar";
+r##"foo #"# bar"##;                // foo #"# bar
+
+"\x52"; "R"; r"R";                 // R
+"\\x52"; r"\x52";                  // \x52
+b"hello";                          // byte string
+b'H';                              // byte
+
+/// integer literal
+123i32;                            // type i32
+123u32;                            // type u32
+123_u32;                           // type u32
+0xff_u8;                           // type u8
+0o70_i16;                          // type i16
+0b1111_1111_1001_0000_i32;         // type i32
+0usize;                            // type usize
+
+/// Floating-point literals
+123.0f64;        // type f64
+0.1f64;          // type f64
+0.1f32;          // type f32
+12E+99_f64;      // type f64
+1_234.0E+18f64   // type f64
+let x: f64 = 2.; // type f64
+
+
+/// lambda expression
+fn ten_times<F>(f: F) where F: Fn(i32) {
+    let mut i = 0i32;
+    while i < 10 {
+      f(i);
+      i += 1;
+    }
+}
+ten_times(|j| println!("hello, {}", j));
+
+
+/// Directives
+// Specify the crate name.
+#![crate_name = "projx"]
+
+// Specify the type of output artifact.
+#![crate_type = "lib"]
+
+// Turn on a warning.
+// This can be done in any module, not just the anonymous crate module.
+#![warn(non_camel_case_types)]
+
+#![feature(rand, collections, std_misc, duration, duration_span)]
+
+/// Match expressions
+let x = 1;
+
+match x {
+1 => println!("one"),
+2 => println!("two"),
+3 => println!("three"),
+4 => println!("four"),
+5 => println!("five"),
+_ => println!("something else"),
+}
+
+let x = 1;
+
+match x {
+e @ 1 ... 5 => println!("got a range element {}", e),
+_ => println!("anything"),
+}
+
+let y = match *x { 0 => "zero", _ => "some" };
+let z = match x { &0 => "zero", _ => "some" };
+
+assert_eq!(y, z);
+
+/// If let expressions
+let dish = ("Ham", "Eggs");
+
+// this body will be skipped because the pattern is refuted
+if let ("Bacon", b) = dish {
+    println!("Bacon is served with {}", b);
+}
+
+// this body will execute
+if let ("Ham", b) = dish {
+    println!("Ham is served with {}", b);
+}
+
+/// Trait objects
+trait Printable {
+  fn stringify(&self) -> String;
+}
+
+impl Printable for i32 {
+  fn stringify(&self) -> String { self.to_string() }
+}
+
+fn print(a: Box<Printable>) {
+println!("{}", a.stringify());
+}
+
+fn main() {
+    print(Box::new(10) as Box<Printable>);
+}
+
+fn to_vec<A: Clone>(xs: &[A]) -> Vec<A> {
+    if xs.is_empty() {
+       return vec![];
+    }
+    let first: A = xs[0].clone();
+    let mut rest: Vec<A> = to_vec(&xs[1..]);
+    rest.insert(0, first);
+    rest
+}
+
+/// Tuple types
+type Pair<'a> = (i32, &'a str);
+let p: Pair<'static> = (10, "hello");
+let (a, b) = p;
+assert!(b != "world");
+assert!(p.0 == 10);
+
+/// Use declarations
+use std::option::Option::{Some, None};
+use std::collections::hash_map::{self, HashMap};
+
+fn foo<T>(_: T){}
+    fn bar(map1: HashMap<String, usize>, map2: hash_map::HashMap<String, usize>){}
+
+    fn main() {
+    // Equivalent to 'foo(vec![std::option::Option::Some(1.0f64),
+    // std::option::Option::None]);'
+    foo(vec![Some(1.0f64), None]);
+
+    // Both `hash_map` and `HashMap` are in scope.
+    let map1 = HashMap::new();
+    let map2 = hash_map::HashMap::new();
+    bar(map1, map2);
+}
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/shell.html b/EnlighterJS/Resources/TestcaseData/shell.html new file mode 100644 index 0000000..2117001 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/shell.html @@ -0,0 +1,67 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +chmod 0775 /home/user1 invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +

Shell Script

+
+#!/bin/sh
+
+# Bin locations
+# ------------------------------------
+MYSQL_BIN=/usr/bin/mysql
+
+# Config
+# ------------------------------------
+MYSQL_CONF="$HOME/.mysql.cnf"
+
+# Uncompress Backup and run restore
+# ------------------------------------
+$MYSQL_BIN --defaults-extra-file=$MYSQL_CONF $1 < $2
+
+# allow input
+# three arguments: PROTOCOL SRC-IP PORT
+firewall_allow_input() {
+   if [ $# -eq 3 ]; then
+      /sbin/iptables -A INPUT -p $1 -s $2 -d $IP_EXTERNAL --dport $3 -m state --state NEW -j ACCEPT
+      return 0
+   else
+      echo "$0: syntax error for firewall_allow_input $1 $2 $3"
+      echo "$0: arguments: PROTOCOL DST-IP PORT"
+      return 1
+   fi
+}
+
+case "$1" in
+start)
+   firewall_start
+   exit 0
+;;
+
+stop)
+   firewall_stop
+   exit 0
+;;
+
+test)
+   firewall_test
+   exit 0
+;;
+
+restart)
+   firewall_restart
+   exit 0
+;;
+
+status)
+   firewall_status
+   exit 0
+;;
+
+*)
+   echo "$0: Iptables Firewall"
+   echo "$0: { start | stop | restart | status | test }"
+   exit 0
+;;
+esac
+
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/sql.html b/EnlighterJS/Resources/TestcaseData/sql.html new file mode 100644 index 0000000..94731a8 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/sql.html @@ -0,0 +1,36 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +UPDATE Account SET amount=amount-200 WHERE account_number=1234; invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ + + +
+/*Source:  http://en.wikipedia.org/wiki/SQL*/
+
+SELECT `Book.title` AS `Title`,
+ COUNT(*) AS `Authors`
+ FROM `Book` JOIN `Book_author`
+ ON `Book`.`isbn` = `Book_author`.`isbn`
+ GROUP BY `Book`.`title`;
+ 
+DELETE FROM `My_table`
+ WHERE `field2` = 'N'; 
+ 
+ 
+CREATE TABLE tbl_1(id INT);
+ INSERT INTO tbl_1(id) VALUES(1);
+ INSERT INTO tbl_1(id) VALUES(2);
+COMMIT;
+ UPDATE tbl_1 SET id=200 WHERE id=1;
+SAVEPOINT id_1upd;
+ UPDATE tbl_1 SET id=1000 WHERE id=2;
+ROLLBACK TO id_1upd;
+ SELECT id FROM tbl_1;
+ 
+START TRANSACTION;
+ UPDATE Account SET amount=amount-200 WHERE account_number=1234;
+ UPDATE Account SET amount=amount+200 WHERE account_number=2345;
+ 
+IF ERRORS=0 COMMIT;
+IF ERRORS<>0 ROLLBACK;  
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/squirrel.html b/EnlighterJS/Resources/TestcaseData/squirrel.html new file mode 100644 index 0000000..a362a31 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/squirrel.html @@ -0,0 +1,111 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +static num = 0; invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +
+// Squirrel support single-line comments
+# that use the pound/octothorpe and double-slashes
+/*
+As well as
+multi-line
+comments
+*/
+
+// Sample code below from http://www.squirrel-lang.org/doc/squirrel3.html
+
+local a = 123; //decimal
+local b = 0x0012; //hexadecimal
+local c = 075; //octal
+local d = 'w'; //char code
+
+// Floats
+local a=1.0;
+local b=0.234;
+local c=1.521E-21
+local d=9891.214e32
+
+// Array
+local a=["I","am","an","array"];
+
+function testy(arg)
+{
+    local a=10;
+    print(a);
+    return arg;
+}			
+	
+while(1)
+{
+    if(a<0) break;
+    a-=1;
+}
+
+local a=0;
+do
+{
+    print(a+"\n");
+    a+=1;
+} while(a>100)	
+
+local a=[10,23,33,41,589,56]
+foreach(val in a)
+    print("value="+val+"\n");
+
+// SOURCE: http://www.squirrel-lang.org/
+local table = {
+	a = "10"
+	subtable = {
+		array = [1,2,3]
+	},
+	[10 + 123] = "expression index"
+}
+
+local array=[ 1, 2, 3, { a = 10, b = "string" } ];
+
+foreach (i,val in array)
+{
+	::print("the type of val is"+typeof val);
+}
+
+/////////////////////////////////////////////
+
+class Entity
+{
+	constructor(etype,entityname)
+	{
+		name = entityname;
+		type = etype;
+	}
+
+	x = 0;
+	y = 0;
+	z = 0;
+	name = null;
+	type = null;
+}
+
+function Entity::MoveTo(newx,newy,newz)
+{
+	x = newx;
+	y = newy;
+	z = newz;
+}
+
+class Player extends Entity {
+	constructor(entityname)
+	{
+		base.constructor("Player",entityname)
+	}
+	function DoDomething()
+	{
+		::print("something");
+	}
+
+}
+
+local newplayer = Player("da playar");
+
+newplayer.MoveTo(100,200,300);
+print(newplayer.x + 1);
+
+
diff --git a/EnlighterJS/Resources/TestcaseData/unit.html b/EnlighterJS/Resources/TestcaseData/unit.html new file mode 100644 index 0000000..bf5cb32 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/unit.html @@ -0,0 +1,181 @@ +

Single Text Character Ending (; should be visible!)

+
int i=32; String k = "Hello World";
+ +

Line indentation of first line shouldn't removed

+
+	alert('hello world');
+	new FX.scroll(args);
+	}
+
+// other stuff	
+
+ +

Line-Offset 4

+
alert('hello world');
+ +

Line-Offset 4; Force Linenumbers OFF

+
alert('hello world');
+ +

Unknown Language - should be highlighted as standard

+
var x = "hello world";
+ +

RAW Code - should be rendered unhighlighted

+
var x = "hello world";
+// don't highlight me!!!
+ +

UPPERCASE language name- should be rendered as javascript

+
var x ={
+	 a: "hello world",
+	 b: 3
+	 };
+ +

Empty language attribute - should be rendered as standard

+
var x ={
+	 a: "hello world",
+	 b: 3
+	 };
+ +

UPPERCASE theme name - should be rendered as git theme

+
+if (this.options.editable) {
+    lighter.set('contenteditable', 'true');
+}
+	
+ +

Overlapping Regex Matches

+
+echo 'You can also have embedded newlines in
+strings this way as it is
+okay to do';
+
+// Outputs: Arnold once said: "I'll be back"
+echo 'Arnold once said: "I\'ll be back"';
+
+// Outputs: You deleted C:\*.*?
+echo 'You deleted C:\\*.*?';
+
+/** String's */
+echo    'this is a simple string';
+
+ +

Language Alias "mD" - should rendered as markdown

+
+### Version 1.5.2 ###
+* Added Plugin section to readme file
+
+### Version 1.5.1 ###
+* fixed YAML header within NSIS language support
+
+### Version 1.5 ###
+* Added language support for NSIS (Nullsoft Scriptable Install System) provided by Jan T. Sott
+
+### Version 1.4 ###
+* Added Quickstart Example
+* Renamed *Tests/* to *Examples/* 
+
+### Version 1.3 ###
+* Added odd/even classes to Compiler.List
+* Added Version+Build informations to css+js builds	
+	
+ +

No Code. Should render empty.

+

+
+	

Should rendered as full HTML comment - NOT &lt;!--

+
+	<!-- <meta name="MetaTest" version="1.9.2" /> -->
+	
+ +

Should also rendered as full HTML comment

+
+	<!--  -->
+	
+ +

Double escaped HTML metacharacters &amp;lt; should rendered as <

+
+&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
+&lt;building name="GlobalDynamics Main Building" id="0xFA8A91C6617DFA1B"&gt;
+&lt;group level="2"&gt;
+	
+ +

MooTools Theme

+
+if (this.options.editable) {
+    lighter.set('contenteditable', 'true');
+}
+	
+ +

Should be display in the style: comment,newline,code,newline,newline, comment

+
+// should the element set to be editable ?	
+if (this.options.editable) {
+
+// test
+	
+ +

No class - should render with default language/theme

+
+var myMootools = new Class({});
+	
+ +

Should be unlighted - enlight(false) is called on the element

+
+compile: function(language, theme, tokens)
+   {
+       var lighter = this._compile(language, theme, tokens);
+       
+       // Set class and id attributes.
+       lighter.set('class', theme + 'Lighter');
+       lighter.set('id', 'Lighter_' + Date.now());
+       
+       if (this.options.editable) {
+           lighter.set('contenteditable', 'true');
+       }
+       
+       return lighter;
+   },
+	
+ +

Should be lighted - enlight(false).enlight(true) is called on the element

+
+compile: function(language, theme, tokens)
+   {
+       var lighter = this._compile(language, theme, tokens);
+       return lighter;
+   },
+	
+ +

Should be grouped together - git theme

+
+console.info("Hello World - I'am Javascript");
+	
+
+System.out.println("Hello World - I'am Java");	
+	
+
+echo 'Hello World - I\'am PHP';	
+	
+ +

twilight theme - grouped (single element)

+
+if (this.options.editable) {
+    lighter.set('contenteditable', 'true');
+}
+	
+ +

mocha theme - grouped (single element, auto name)

+
+if (this.options.editable) {
+    lighter.set('contenteditable', 'true');
+}
+	
+ + \ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/vhdl.html b/EnlighterJS/Resources/TestcaseData/vhdl.html new file mode 100644 index 0000000..f626d4b --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/vhdl.html @@ -0,0 +1,66 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +use IEEE.numeric_std.all; -- for the unsigned type invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ +

Shell Script

+
+-- Source: http://en.wikipedia.org/wiki/VHDL
+
+library IEEE;
+use IEEE.std_logic_1164.all;
+use IEEE.numeric_std.all;    -- for the unsigned type
+
+entity COUNTER is
+  generic (
+    WIDTH : in natural := 32);
+  port (
+    RST   : in std_logic;
+    CLK   : in std_logic;
+    LOAD  : in std_logic;
+    DATA  : in std_logic_vector(WIDTH-1 downto 0);
+    Q     : out std_logic_vector(WIDTH-1 downto 0));
+end entity COUNTER;
+
+architecture RTL of COUNTER is
+  signal CNT : unsigned(WIDTH-1 downto 0);
+begin
+  process(RST, CLK) is
+  begin
+    if RST = '1' then
+      CNT <= (others => '0');
+    elsif rising_edge(CLK) then
+      if LOAD = '1' then
+        CNT <= unsigned(DATA); -- type is converted to unsigned
+      else
+        CNT <= CNT + 1;
+      end if;
+    end if;
+  end process;
+
+  Q <= std_logic_vector(CNT); -- type is converted back to std_logic_vector
+end architecture RTL;
+
+process
+begin
+  wait until START = '1'; -- wait until START is high
+
+  for i in 1 to 10 loop -- then wait for a few clock periods...
+    wait until rising_edge(CLK);
+  end loop;
+
+  for i in 1 to 10 loop 	-- write numbers 1 to 10 to DATA, 1 every cycle
+    DATA <= to_unsigned(i, 8);
+    wait until rising_edge(CLK);
+  end loop;
+
+  -- wait until the output changes
+  wait on RESULT;
+
+  -- now raise ACK for clock period
+  ACK <= '1';
+  wait until rising_edge(CLK);
+  ACK <= '0';
+
+  -- and so on...
+end process;
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/TestcaseData/xml.html b/EnlighterJS/Resources/TestcaseData/xml.html new file mode 100644 index 0000000..3516ae1 --- /dev/null +++ b/EnlighterJS/Resources/TestcaseData/xml.html @@ -0,0 +1,32 @@ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor +<room number="123">Conference Room A</room> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. +

+ + +
+
+<building name="GlobalDynamics Main Building"
+    core:id="0xFA8A91C6617DFA1B" core:uid="0898213-123123123-1230898123" xmlns:core="http://www.xmlnamespace.tld">
+	<core:group core:level="2">
+		<room number="123">Conference Room A</room>
+		<room number="124">Conference Room B</room>
+		<room number="125">Conference Room C</room>
+		<room number="126">Conference Room D</room>
+	</core:group>
+	<core:group core:level="2">
+		<room number="17">John's Office</room>
+		<room number="19">Eric's Office</room>
+	</core:group>
+	<core:group core:level="1">
+		<room number="091">Mainframe Housing A</room>
+		<room number="092">Mainframe Housing B</room>
+		<room number="090">Mainframe Power Supply Station</room>
+		<room number="089">Mainframe Backup Power Supply Station</room>
+	</core:group>
+	<core:group core:level="8">
+		<room number="1717" role="cto">CTO Office</room>
+		<room number="1819" role="ceo">CEO Office</room>
+		<room number="1820" role="cfo">CFO Office</room>
+	</core:group>
+</building>
+
\ No newline at end of file diff --git a/EnlighterJS/Resources/Web.phtml b/EnlighterJS/Resources/Web.phtml new file mode 100644 index 0000000..b58c6fd --- /dev/null +++ b/EnlighterJS/Resources/Web.phtml @@ -0,0 +1,99 @@ + + + + + + + + + + <?php echo $title; ?> + + + + + + + + + + + + + + + + +
+
+

+

+
+
+ +
+
+

EnlighterJS v is out including new Languages & Themes. View the Changelog

+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/EnlighterJS/Resources/bootstrap/LICENSE b/EnlighterJS/Resources/bootstrap/LICENSE new file mode 100644 index 0000000..f4c52d6 --- /dev/null +++ b/EnlighterJS/Resources/bootstrap/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2011-2015 Twitter, Inc + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/EnlighterJS/Resources/bootstrap/bootstrap.less b/EnlighterJS/Resources/bootstrap/bootstrap.less new file mode 100644 index 0000000..173fd15 --- /dev/null +++ b/EnlighterJS/Resources/bootstrap/bootstrap.less @@ -0,0 +1,58 @@ +/*! + * Bootstrap v3.3.4 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ +// Core variables +@import "variables.less"; + +@import "../../node_modules/bootstrap/less/mixins.less"; + + +// Reset and dependencies +@import "../../node_modules/bootstrap/less/normalize.less"; +@import "../../node_modules/bootstrap/less/print.less"; +@import "../../node_modules/bootstrap/less/glyphicons.less"; + +// Core CSS +@import "../../node_modules/bootstrap/less/scaffolding.less"; +@import "../../node_modules/bootstrap/less/type.less"; +@import "../../node_modules/bootstrap/less/code.less"; +@import "../../node_modules/bootstrap/less/grid.less"; +//@import "../../node_modules/bootstrap/less/tables.less"; +@import "../../node_modules/bootstrap/less/forms.less"; +@import "../../node_modules/bootstrap/less/buttons.less"; + +// Components +//@import "../../node_modules/bootstrap/less/component-animations.less"; +//@import "../../node_modules/bootstrap/less/dropdowns.less"; +//@import "../../node_modules/bootstrap/less/button-groups.less"; +@import "../../node_modules/bootstrap/less/input-groups.less"; +@import "../../node_modules/bootstrap/less/navs.less"; +@import "../../node_modules/bootstrap/less/navbar.less"; +//@import "../../node_modules/bootstrap/less/breadcrumbs.less"; +//@import "../../node_modules/bootstrap/less/pagination.less"; +//@import "../../node_modules/bootstrap/less/pager.less"; +@import "../../node_modules/bootstrap/less/labels.less"; +@import "../../node_modules/bootstrap/less/badges.less"; +//@import "../../node_modules/bootstrap/less/jumbotron.less"; +//@import "../../node_modules/bootstrap/less/thumbnails.less"; +@import "../../node_modules/bootstrap/less/alerts.less"; +//@import "../../node_modules/bootstrap/less/progress-bars.less"; +//@import "../../node_modules/bootstrap/less/media.less"; +//@import "../../node_modules/bootstrap/less/list-group.less"; +@import "../../node_modules/bootstrap/less/panels.less"; +//@import "../../node_modules/bootstrap/less/responsive-embed.less"; +@import "../../node_modules/bootstrap/less/wells.less"; +//@import "../../node_modules/bootstrap/less/close.less"; + +// Components w/ JavaScript +//@import "../../node_modules/bootstrap/less/modals.less"; +//@import "../../node_modules/bootstrap/less/tooltip.less"; +//@import "../../node_modules/bootstrap/less/popovers.less"; +//@import "../../node_modules/bootstrap/less/carousel.less"; + +// Utility classes +@import "../../node_modules/bootstrap/less/utilities.less"; +@import "../../node_modules/bootstrap/less/responsive-utilities.less"; + diff --git a/EnlighterJS/Resources/bootstrap/bootstrap.min.css b/EnlighterJS/Resources/bootstrap/bootstrap.min.css new file mode 100644 index 0000000..cd1c616 --- /dev/null +++ b/EnlighterJS/Resources/bootstrap/bootstrap.min.css @@ -0,0 +1,5 @@ +/*! + * Bootstrap v3.3.4 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px \9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.form-group-sm .form-control{height:30px;line-height:30px}select[multiple].form-group-sm .form-control,textarea.form-group-sm .form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:5px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.form-group-lg .form-control{height:46px;line-height:46px}select[multiple].form-group-lg .form-control,textarea.form-group-lg .form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:10px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.33px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.active,.btn-default.focus,.btn-default:active,.btn-default:focus,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.active,.btn-primary.focus,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.active,.btn-success.focus,.btn-success:active,.btn-success:focus,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.active,.btn-info.focus,.btn-info:active,.btn-info:focus,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.active,.btn-warning.focus,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.active,.btn-danger.focus,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px)and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px 15px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding:48px 0}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:400;line-height:1.4;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-weight:400;line-height:1.42857143;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000;perspective:1000}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;margin-top:-10px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px)and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px)and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px)and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px)and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} \ No newline at end of file diff --git a/EnlighterJS/Resources/bootstrap/fonts/glyphicons-halflings-regular.eot b/EnlighterJS/Resources/bootstrap/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000..b93a495 Binary files /dev/null and b/EnlighterJS/Resources/bootstrap/fonts/glyphicons-halflings-regular.eot differ diff --git a/EnlighterJS/Resources/bootstrap/fonts/glyphicons-halflings-regular.svg b/EnlighterJS/Resources/bootstrap/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 0000000..94fb549 --- /dev/null +++ b/EnlighterJS/Resources/bootstrap/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/EnlighterJS/Resources/bootstrap/fonts/glyphicons-halflings-regular.ttf b/EnlighterJS/Resources/bootstrap/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000..1413fc6 Binary files /dev/null and b/EnlighterJS/Resources/bootstrap/fonts/glyphicons-halflings-regular.ttf differ diff --git a/EnlighterJS/Resources/bootstrap/fonts/glyphicons-halflings-regular.woff b/EnlighterJS/Resources/bootstrap/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 0000000..9e61285 Binary files /dev/null and b/EnlighterJS/Resources/bootstrap/fonts/glyphicons-halflings-regular.woff differ diff --git a/EnlighterJS/Resources/bootstrap/fonts/glyphicons-halflings-regular.woff2 b/EnlighterJS/Resources/bootstrap/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 0000000..64539b5 Binary files /dev/null and b/EnlighterJS/Resources/bootstrap/fonts/glyphicons-halflings-regular.woff2 differ diff --git a/EnlighterJS/Resources/bootstrap/variables.less b/EnlighterJS/Resources/bootstrap/variables.less new file mode 100644 index 0000000..733f9f7 --- /dev/null +++ b/EnlighterJS/Resources/bootstrap/variables.less @@ -0,0 +1,861 @@ +// +// Variables +// -------------------------------------------------- + + +//== Colors +// +//## Gray and brand colors for use across Bootstrap. + +@gray-base: #000; +@gray-darker: lighten(@gray-base, 13.5%); // #222 +@gray-dark: lighten(@gray-base, 20%); // #333 +@gray: lighten(@gray-base, 33.5%); // #555 +@gray-light: lighten(@gray-base, 46.7%); // #777 +@gray-lighter: lighten(@gray-base, 93.5%); // #eee + +@brand-primary: #1a2432; //lighten(#1f3b5d, 30%); +@brand-success: #5cb85c; +@brand-info: #5bc0de; +@brand-warning: #f0ad4e; +@brand-danger: #d9534f; + + +//== Scaffolding +// +//## Settings for some of the most global styles. + +//** Background color for ``. +@body-bg: #fff; +//** Global text color on ``. +@text-color: @gray-dark; + +//** Global textual link color. +@link-color: lighten(@brand-primary, 35%); +//** Link hover color set via `darken()` function. +@link-hover-color: darken(@link-color, 15%); +//** Link hover decoration. +@link-hover-decoration: underline; + + +//== Typography +// +//## Font, line-height, and color for body text, headings, and more. + +@font-family-sans-serif: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; +@font-family-serif: Georgia, "Times New Roman", Times, serif; +//** Default monospace fonts for ``, ``, and `
`.
+@font-family-monospace:   "Source Code Pro", Consolas, "Courier New", monospace;
+@font-family-base:        @font-family-sans-serif;
+
+@font-size-base:          14px;
+@font-size-large:         ceil((@font-size-base * 1.25)); // ~18px
+@font-size-small:         ceil((@font-size-base * 0.85)); // ~12px
+
+@font-size-h1:            floor((@font-size-base * 2.6)); // ~36px
+@font-size-h2:            floor((@font-size-base * 2.15)); // ~30px
+@font-size-h3:            ceil((@font-size-base * 1.7)); // ~24px
+@font-size-h4:            ceil((@font-size-base * 1.25)); // ~18px
+@font-size-h5:            @font-size-base;
+@font-size-h6:            ceil((@font-size-base * 0.85)); // ~12px
+
+//** Unit-less `line-height` for use in components like buttons.
+@line-height-base:        1.428571429; // 20/14
+//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
+@line-height-computed:    floor((@font-size-base * @line-height-base)); // ~20px
+
+//** By default, this inherits from the ``.
+@headings-font-family:    inherit;
+@headings-font-weight:    500;
+@headings-line-height:    1.1;
+@headings-color:          inherit;
+
+
+//== Iconography
+//
+//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
+
+//** Load fonts from this directory.
+@icon-font-path:          "fonts/";
+//** File name for all font files.
+@icon-font-name:          "glyphicons-halflings-regular";
+//** Element ID within SVG icon file.
+@icon-font-svg-id:        "glyphicons_halflingsregular";
+
+
+//== Components
+//
+//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
+
+@padding-base-vertical:     6px;
+@padding-base-horizontal:   12px;
+
+@padding-large-vertical:    10px;
+@padding-large-horizontal:  16px;
+
+@padding-small-vertical:    5px;
+@padding-small-horizontal:  10px;
+
+@padding-xs-vertical:       1px;
+@padding-xs-horizontal:     5px;
+
+@line-height-large:         1.3333333; // extra decimals for Win 8.1 Chrome
+@line-height-small:         1.5;
+
+@border-radius-base:        4px;
+@border-radius-large:       6px;
+@border-radius-small:       3px;
+
+//** Global color for active items (e.g., navs or dropdowns).
+@component-active-color:    #fff;
+//** Global background color for active items (e.g., navs or dropdowns).
+@component-active-bg:       @brand-primary;
+
+//** Width of the `border` for generating carets that indicator dropdowns.
+@caret-width-base:          4px;
+//** Carets increase slightly in size for larger components.
+@caret-width-large:         5px;
+
+
+//== Tables
+//
+//## Customizes the `.table` component with basic values, each used across all table variations.
+
+//** Padding for ``s and ``s.
+@table-cell-padding:            8px;
+//** Padding for cells in `.table-condensed`.
+@table-condensed-cell-padding:  5px;
+
+//** Default background color used for all tables.
+@table-bg:                      transparent;
+//** Background color used for `.table-striped`.
+@table-bg-accent:               #f9f9f9;
+//** Background color used for `.table-hover`.
+@table-bg-hover:                #f5f5f5;
+@table-bg-active:               @table-bg-hover;
+
+//** Border color for table and cell borders.
+@table-border-color:            #ddd;
+
+
+//== Buttons
+//
+//## For each of Bootstrap's buttons, define text, background and border color.
+
+@btn-font-weight:                normal;
+
+@btn-default-color:              #333;
+@btn-default-bg:                 #fff;
+@btn-default-border:             #ccc;
+
+@btn-primary-color:              #fff;
+@btn-primary-bg:                 @brand-primary;
+@btn-primary-border:             darken(@btn-primary-bg, 5%);
+
+@btn-success-color:              #fff;
+@btn-success-bg:                 @brand-success;
+@btn-success-border:             darken(@btn-success-bg, 5%);
+
+@btn-info-color:                 #fff;
+@btn-info-bg:                    @brand-info;
+@btn-info-border:                darken(@btn-info-bg, 5%);
+
+@btn-warning-color:              #fff;
+@btn-warning-bg:                 @brand-warning;
+@btn-warning-border:             darken(@btn-warning-bg, 5%);
+
+@btn-danger-color:               #fff;
+@btn-danger-bg:                  @brand-danger;
+@btn-danger-border:              darken(@btn-danger-bg, 5%);
+
+@btn-link-disabled-color:        @gray-light;
+
+
+//== Forms
+//
+//##
+
+//** `` background color
+@input-bg:                       #fff;
+//** `` background color
+@input-bg-disabled:              @gray-lighter;
+
+//** Text color for ``s
+@input-color:                    @gray;
+//** `` border color
+@input-border:                   #ccc;
+
+// TODO: Rename `@input-border-radius` to `@input-border-radius-base` in v4
+//** Default `.form-control` border radius
+// This has no effect on ``s in CSS.
+@input-border-radius:            @border-radius-base;
+//** Large `.form-control` border radius
+@input-border-radius-large:      @border-radius-large;
+//** Small `.form-control` border radius
+@input-border-radius-small:      @border-radius-small;
+
+//** Border color for inputs on focus
+@input-border-focus:             #66afe9;
+
+//** Placeholder text color
+@input-color-placeholder:        #999;
+
+//** Default `.form-control` height
+@input-height-base:              (@line-height-computed + (@padding-base-vertical * 2) + 2);
+//** Large `.form-control` height
+@input-height-large:             (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
+//** Small `.form-control` height
+@input-height-small:             (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
+
+//** `.form-group` margin
+@form-group-margin-bottom:       15px;
+
+@legend-color:                   @gray-dark;
+@legend-border-color:            #e5e5e5;
+
+//** Background color for textual input addons
+@input-group-addon-bg:           @gray-lighter;
+//** Border color for textual input addons
+@input-group-addon-border-color: @input-border;
+
+//** Disabled cursor for form controls and buttons.
+@cursor-disabled:                not-allowed;
+
+
+//== Dropdowns
+//
+//## Dropdown menu container and contents.
+
+//** Background for the dropdown menu.
+@dropdown-bg:                    #fff;
+//** Dropdown menu `border-color`.
+@dropdown-border:                rgba(0,0,0,.15);
+//** Dropdown menu `border-color` **for IE8**.
+@dropdown-fallback-border:       #ccc;
+//** Divider color for between dropdown items.
+@dropdown-divider-bg:            #e5e5e5;
+
+//** Dropdown link text color.
+@dropdown-link-color:            @gray-dark;
+//** Hover color for dropdown links.
+@dropdown-link-hover-color:      darken(@gray-dark, 5%);
+//** Hover background for dropdown links.
+@dropdown-link-hover-bg:         #f5f5f5;
+
+//** Active dropdown menu item text color.
+@dropdown-link-active-color:     @component-active-color;
+//** Active dropdown menu item background color.
+@dropdown-link-active-bg:        @component-active-bg;
+
+//** Disabled dropdown menu item background color.
+@dropdown-link-disabled-color:   @gray-light;
+
+//** Text color for headers within dropdown menus.
+@dropdown-header-color:          @gray-light;
+
+//** Deprecated `@dropdown-caret-color` as of v3.1.0
+@dropdown-caret-color:           #000;
+
+
+//-- Z-index master list
+//
+// Warning: Avoid customizing these values. They're used for a bird's eye view
+// of components dependent on the z-axis and are designed to all work together.
+//
+// Note: These variables are not generated into the Customizer.
+
+@zindex-navbar:            1000;
+@zindex-dropdown:          1000;
+@zindex-popover:           1060;
+@zindex-tooltip:           1070;
+@zindex-navbar-fixed:      1030;
+@zindex-modal-background:  1040;
+@zindex-modal:             1050;
+
+
+//== Media queries breakpoints
+//
+//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
+
+// Extra small screen / phone
+//** Deprecated `@screen-xs` as of v3.0.1
+@screen-xs:                  480px;
+//** Deprecated `@screen-xs-min` as of v3.2.0
+@screen-xs-min:              @screen-xs;
+//** Deprecated `@screen-phone` as of v3.0.1
+@screen-phone:               @screen-xs-min;
+
+// Small screen / tablet
+//** Deprecated `@screen-sm` as of v3.0.1
+@screen-sm:                  768px;
+@screen-sm-min:              @screen-sm;
+//** Deprecated `@screen-tablet` as of v3.0.1
+@screen-tablet:              @screen-sm-min;
+
+// Medium screen / desktop
+//** Deprecated `@screen-md` as of v3.0.1
+@screen-md:                  992px;
+@screen-md-min:              @screen-md;
+//** Deprecated `@screen-desktop` as of v3.0.1
+@screen-desktop:             @screen-md-min;
+
+// Large screen / wide desktop
+//** Deprecated `@screen-lg` as of v3.0.1
+@screen-lg:                  1400px;
+@screen-lg-min:              @screen-lg;
+//** Deprecated `@screen-lg-desktop` as of v3.0.1
+@screen-lg-desktop:          @screen-lg-min;
+
+// So media queries don't overlap when required, provide a maximum
+@screen-xs-max:              (@screen-sm-min - 1);
+@screen-sm-max:              (@screen-md-min - 1);
+@screen-md-max:              (@screen-lg-min - 1);
+
+
+//== Grid system
+//
+//## Define your custom responsive grid.
+
+//** Number of columns in the grid.
+@grid-columns:              12;
+//** Padding between columns. Gets divided in half for the left and right.
+@grid-gutter-width:         30px;
+// Navbar collapse
+//** Point at which the navbar becomes uncollapsed.
+@grid-float-breakpoint:     @screen-sm-min;
+//** Point at which the navbar begins collapsing.
+@grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
+
+
+//== Container sizes
+//
+//## Define the maximum width of `.container` for different screen sizes.
+
+// Small screen / tablet
+@container-tablet:             (720px + @grid-gutter-width);
+//** For `@screen-sm-min` and up.
+@container-sm:                 @container-tablet;
+
+// Medium screen / desktop
+@container-desktop:            (940px + @grid-gutter-width);
+//** For `@screen-md-min` and up.
+@container-md:                 @container-desktop;
+
+// Large screen / wide desktop
+@container-large-desktop:      (1340px + @grid-gutter-width);
+//** For `@screen-lg-min` and up.
+@container-lg:                 @container-large-desktop;
+
+
+//== Navbar
+//
+//##
+
+// Basics of a navbar
+@navbar-height:                    50px;
+@navbar-margin-bottom:             @line-height-computed;
+@navbar-border-radius:             @border-radius-base;
+@navbar-padding-horizontal:        floor((@grid-gutter-width / 2));
+@navbar-padding-vertical:          ((@navbar-height - @line-height-computed) / 2);
+@navbar-collapse-max-height:       340px;
+
+@navbar-default-color:             #777;
+@navbar-default-bg:                #f8f8f8;
+@navbar-default-border:            darken(@navbar-default-bg, 6.5%);
+
+// Navbar links
+@navbar-default-link-color:                #777;
+@navbar-default-link-hover-color:          #333;
+@navbar-default-link-hover-bg:             transparent;
+@navbar-default-link-active-color:         #555;
+@navbar-default-link-active-bg:            darken(@navbar-default-bg, 6.5%);
+@navbar-default-link-disabled-color:       #ccc;
+@navbar-default-link-disabled-bg:          transparent;
+
+// Navbar brand label
+@navbar-default-brand-color:               @navbar-default-link-color;
+@navbar-default-brand-hover-color:         darken(@navbar-default-brand-color, 10%);
+@navbar-default-brand-hover-bg:            transparent;
+
+// Navbar toggle
+@navbar-default-toggle-hover-bg:           #ddd;
+@navbar-default-toggle-icon-bar-bg:        #888;
+@navbar-default-toggle-border-color:       #ddd;
+
+
+// Inverted navbar
+// Reset inverted navbar basics
+@navbar-inverse-color:                      lighten(@gray-light, 15%);
+@navbar-inverse-bg:                         #222;
+@navbar-inverse-border:                     darken(@navbar-inverse-bg, 10%);
+
+// Inverted navbar links
+@navbar-inverse-link-color:                 lighten(@gray-light, 15%);
+@navbar-inverse-link-hover-color:           #fff;
+@navbar-inverse-link-hover-bg:              transparent;
+@navbar-inverse-link-active-color:          @navbar-inverse-link-hover-color;
+@navbar-inverse-link-active-bg:             darken(@navbar-inverse-bg, 10%);
+@navbar-inverse-link-disabled-color:        #444;
+@navbar-inverse-link-disabled-bg:           transparent;
+
+// Inverted navbar brand label
+@navbar-inverse-brand-color:                @navbar-inverse-link-color;
+@navbar-inverse-brand-hover-color:          #fff;
+@navbar-inverse-brand-hover-bg:             transparent;
+
+// Inverted navbar toggle
+@navbar-inverse-toggle-hover-bg:            #333;
+@navbar-inverse-toggle-icon-bar-bg:         #fff;
+@navbar-inverse-toggle-border-color:        #333;
+
+
+//== Navs
+//
+//##
+
+//=== Shared nav styles
+@nav-link-padding:                          10px 15px;
+@nav-link-hover-bg:                         @gray-lighter;
+
+@nav-disabled-link-color:                   @gray-light;
+@nav-disabled-link-hover-color:             @gray-light;
+
+//== Tabs
+@nav-tabs-border-color:                     #ddd;
+
+@nav-tabs-link-hover-border-color:          @gray-lighter;
+
+@nav-tabs-active-link-hover-bg:             @body-bg;
+@nav-tabs-active-link-hover-color:          @gray;
+@nav-tabs-active-link-hover-border-color:   #ddd;
+
+@nav-tabs-justified-link-border-color:            #ddd;
+@nav-tabs-justified-active-link-border-color:     @body-bg;
+
+//== Pills
+@nav-pills-border-radius:                   @border-radius-base;
+@nav-pills-active-link-hover-bg:            @component-active-bg;
+@nav-pills-active-link-hover-color:         @component-active-color;
+
+
+//== Pagination
+//
+//##
+
+@pagination-color:                     @link-color;
+@pagination-bg:                        #fff;
+@pagination-border:                    #ddd;
+
+@pagination-hover-color:               @link-hover-color;
+@pagination-hover-bg:                  @gray-lighter;
+@pagination-hover-border:              #ddd;
+
+@pagination-active-color:              #fff;
+@pagination-active-bg:                 @brand-primary;
+@pagination-active-border:             @brand-primary;
+
+@pagination-disabled-color:            @gray-light;
+@pagination-disabled-bg:               #fff;
+@pagination-disabled-border:           #ddd;
+
+
+//== Pager
+//
+//##
+
+@pager-bg:                             @pagination-bg;
+@pager-border:                         @pagination-border;
+@pager-border-radius:                  15px;
+
+@pager-hover-bg:                       @pagination-hover-bg;
+
+@pager-active-bg:                      @pagination-active-bg;
+@pager-active-color:                   @pagination-active-color;
+
+@pager-disabled-color:                 @pagination-disabled-color;
+
+
+//== Jumbotron
+//
+//##
+
+@jumbotron-padding:              30px;
+@jumbotron-color:                inherit;
+@jumbotron-bg:                   @gray-lighter;
+@jumbotron-heading-color:        inherit;
+@jumbotron-font-size:            ceil((@font-size-base * 1.5));
+
+
+//== Form states and alerts
+//
+//## Define colors for form feedback states and, by default, alerts.
+
+@state-success-text:             #3c763d;
+@state-success-bg:               #dff0d8;
+@state-success-border:           darken(spin(@state-success-bg, -10), 5%);
+
+@state-info-text:                #31708f;
+@state-info-bg:                  #d9edf7;
+@state-info-border:              darken(spin(@state-info-bg, -10), 7%);
+
+@state-warning-text:             #8a6d3b;
+@state-warning-bg:               #fcf8e3;
+@state-warning-border:           darken(spin(@state-warning-bg, -10), 5%);
+
+@state-danger-text:              #a94442;
+@state-danger-bg:                #f2dede;
+@state-danger-border:            darken(spin(@state-danger-bg, -10), 5%);
+
+
+//== Tooltips
+//
+//##
+
+//** Tooltip max width
+@tooltip-max-width:           200px;
+//** Tooltip text color
+@tooltip-color:               #fff;
+//** Tooltip background color
+@tooltip-bg:                  #000;
+@tooltip-opacity:             .9;
+
+//** Tooltip arrow width
+@tooltip-arrow-width:         5px;
+//** Tooltip arrow color
+@tooltip-arrow-color:         @tooltip-bg;
+
+
+//== Popovers
+//
+//##
+
+//** Popover body background color
+@popover-bg:                          #fff;
+//** Popover maximum width
+@popover-max-width:                   276px;
+//** Popover border color
+@popover-border-color:                rgba(0,0,0,.2);
+//** Popover fallback border color
+@popover-fallback-border-color:       #ccc;
+
+//** Popover title background color
+@popover-title-bg:                    darken(@popover-bg, 3%);
+
+//** Popover arrow width
+@popover-arrow-width:                 10px;
+//** Popover arrow color
+@popover-arrow-color:                 @popover-bg;
+
+//** Popover outer arrow width
+@popover-arrow-outer-width:           (@popover-arrow-width + 1);
+//** Popover outer arrow color
+@popover-arrow-outer-color:           fadein(@popover-border-color, 5%);
+//** Popover outer arrow fallback color
+@popover-arrow-outer-fallback-color:  darken(@popover-fallback-border-color, 20%);
+
+
+//== Labels
+//
+//##
+
+//** Default label background color
+@label-default-bg:            @gray-light;
+//** Primary label background color
+@label-primary-bg:            @brand-primary;
+//** Success label background color
+@label-success-bg:            @brand-success;
+//** Info label background color
+@label-info-bg:               @brand-info;
+//** Warning label background color
+@label-warning-bg:            @brand-warning;
+//** Danger label background color
+@label-danger-bg:             @brand-danger;
+
+//** Default label text color
+@label-color:                 #fff;
+//** Default text color of a linked label
+@label-link-hover-color:      #fff;
+
+
+//== Modals
+//
+//##
+
+//** Padding applied to the modal body
+@modal-inner-padding:         15px;
+
+//** Padding applied to the modal title
+@modal-title-padding:         15px;
+//** Modal title line-height
+@modal-title-line-height:     @line-height-base;
+
+//** Background color of modal content area
+@modal-content-bg:                             #fff;
+//** Modal content border color
+@modal-content-border-color:                   rgba(0,0,0,.2);
+//** Modal content border color **for IE8**
+@modal-content-fallback-border-color:          #999;
+
+//** Modal backdrop background color
+@modal-backdrop-bg:           #000;
+//** Modal backdrop opacity
+@modal-backdrop-opacity:      .5;
+//** Modal header border color
+@modal-header-border-color:   #e5e5e5;
+//** Modal footer border color
+@modal-footer-border-color:   @modal-header-border-color;
+
+@modal-lg:                    900px;
+@modal-md:                    600px;
+@modal-sm:                    300px;
+
+
+//== Alerts
+//
+//## Define alert colors, border radius, and padding.
+
+@alert-padding:               15px;
+@alert-border-radius:         @border-radius-base;
+@alert-link-font-weight:      bold;
+
+@alert-success-bg:            @state-success-bg;
+@alert-success-text:          @state-success-text;
+@alert-success-border:        @state-success-border;
+
+@alert-info-bg:               @state-info-bg;
+@alert-info-text:             @state-info-text;
+@alert-info-border:           @state-info-border;
+
+@alert-warning-bg:            @state-warning-bg;
+@alert-warning-text:          @state-warning-text;
+@alert-warning-border:        @state-warning-border;
+
+@alert-danger-bg:             @state-danger-bg;
+@alert-danger-text:           @state-danger-text;
+@alert-danger-border:         @state-danger-border;
+
+
+//== Progress bars
+//
+//##
+
+//** Background color of the whole progress component
+@progress-bg:                 #f5f5f5;
+//** Progress bar text color
+@progress-bar-color:          #fff;
+//** Variable for setting rounded corners on progress bar.
+@progress-border-radius:      @border-radius-base;
+
+//** Default progress bar color
+@progress-bar-bg:             @brand-primary;
+//** Success progress bar color
+@progress-bar-success-bg:     @brand-success;
+//** Warning progress bar color
+@progress-bar-warning-bg:     @brand-warning;
+//** Danger progress bar color
+@progress-bar-danger-bg:      @brand-danger;
+//** Info progress bar color
+@progress-bar-info-bg:        @brand-info;
+
+
+//== List group
+//
+//##
+
+//** Background color on `.list-group-item`
+@list-group-bg:                 #fff;
+//** `.list-group-item` border color
+@list-group-border:             #ddd;
+//** List group border radius
+@list-group-border-radius:      @border-radius-base;
+
+//** Background color of single list items on hover
+@list-group-hover-bg:           #f5f5f5;
+//** Text color of active list items
+@list-group-active-color:       @component-active-color;
+//** Background color of active list items
+@list-group-active-bg:          @component-active-bg;
+//** Border color of active list elements
+@list-group-active-border:      @list-group-active-bg;
+//** Text color for content within active list items
+@list-group-active-text-color:  lighten(@list-group-active-bg, 40%);
+
+//** Text color of disabled list items
+@list-group-disabled-color:      @gray-light;
+//** Background color of disabled list items
+@list-group-disabled-bg:         @gray-lighter;
+//** Text color for content within disabled list items
+@list-group-disabled-text-color: @list-group-disabled-color;
+
+@list-group-link-color:         #555;
+@list-group-link-hover-color:   @list-group-link-color;
+@list-group-link-heading-color: #333;
+
+
+//== Panels
+//
+//##
+
+@panel-bg:                    #fff;
+@panel-body-padding:          15px;
+@panel-heading-padding:       10px 15px;
+@panel-footer-padding:        @panel-heading-padding;
+@panel-border-radius:         @border-radius-base;
+
+//** Border color for elements within panels
+@panel-inner-border:          #ddd;
+@panel-footer-bg:             #f5f5f5;
+
+@panel-default-text:          @gray-dark;
+@panel-default-border:        #ddd;
+@panel-default-heading-bg:    #f5f5f5;
+
+@panel-primary-text:          #fff;
+@panel-primary-border:        @brand-primary;
+@panel-primary-heading-bg:    @brand-primary;
+
+@panel-success-text:          @state-success-text;
+@panel-success-border:        @state-success-border;
+@panel-success-heading-bg:    @state-success-bg;
+
+@panel-info-text:             @state-info-text;
+@panel-info-border:           @state-info-border;
+@panel-info-heading-bg:       @state-info-bg;
+
+@panel-warning-text:          @state-warning-text;
+@panel-warning-border:        @state-warning-border;
+@panel-warning-heading-bg:    @state-warning-bg;
+
+@panel-danger-text:           @state-danger-text;
+@panel-danger-border:         @state-danger-border;
+@panel-danger-heading-bg:     @state-danger-bg;
+
+
+//== Thumbnails
+//
+//##
+
+//** Padding around the thumbnail image
+@thumbnail-padding:           4px;
+//** Thumbnail background color
+@thumbnail-bg:                @body-bg;
+//** Thumbnail border color
+@thumbnail-border:            #ddd;
+//** Thumbnail border radius
+@thumbnail-border-radius:     @border-radius-base;
+
+//** Custom text color for thumbnail captions
+@thumbnail-caption-color:     @text-color;
+//** Padding around the thumbnail caption
+@thumbnail-caption-padding:   9px;
+
+
+//== Wells
+//
+//##
+
+@well-bg:                     #f5f5f5;
+@well-border:                 darken(@well-bg, 7%);
+
+
+//== Badges
+//
+//##
+
+@badge-color:                 #fff;
+//** Linked badge text color on hover
+@badge-link-hover-color:      #fff;
+@badge-bg:                    @gray-light;
+
+//** Badge text color in active nav link
+@badge-active-color:          @link-color;
+//** Badge background color in active nav link
+@badge-active-bg:             #fff;
+
+@badge-font-weight:           bold;
+@badge-line-height:           1;
+@badge-border-radius:         10px;
+
+
+//== Breadcrumbs
+//
+//##
+
+@breadcrumb-padding-vertical:   8px;
+@breadcrumb-padding-horizontal: 15px;
+//** Breadcrumb background color
+@breadcrumb-bg:                 #f5f5f5;
+//** Breadcrumb text color
+@breadcrumb-color:              #ccc;
+//** Text color of current page in the breadcrumb
+@breadcrumb-active-color:       @gray-light;
+//** Textual separator for between breadcrumb elements
+@breadcrumb-separator:          "/";
+
+
+//== Carousel
+//
+//##
+
+@carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6);
+
+@carousel-control-color:                      #fff;
+@carousel-control-width:                      15%;
+@carousel-control-opacity:                    .5;
+@carousel-control-font-size:                  20px;
+
+@carousel-indicator-active-bg:                #fff;
+@carousel-indicator-border-color:             #fff;
+
+@carousel-caption-color:                      #fff;
+
+
+//== Close
+//
+//##
+
+@close-font-weight:           bold;
+@close-color:                 #000;
+@close-text-shadow:           0 1px 0 #fff;
+
+
+//== Code
+//
+//##
+
+@code-color:                  #c7254e;
+@code-bg:                     #f9f2f4;
+
+@kbd-color:                   #fff;
+@kbd-bg:                      #333;
+
+@pre-bg:                      #f5f5f5;
+@pre-color:                   @gray-dark;
+@pre-border-color:            #ccc;
+@pre-scrollable-max-height:   340px;
+
+
+//== Type
+//
+//##
+
+//** Horizontal offset for forms and lists.
+@component-offset-horizontal: 180px;
+//** Text muted color
+@text-muted:                  @gray-light;
+//** Abbreviations and acronyms border color
+@abbr-border-color:           @gray-light;
+//** Headings small color
+@headings-small-color:        @gray-light;
+//** Blockquote small color
+@blockquote-small-color:      @gray-light;
+//** Blockquote font size
+@blockquote-font-size:        (@font-size-base * 1.25);
+//** Blockquote border color
+@blockquote-border-color:     @gray-lighter;
+//** Page header border color
+@page-header-border-color:    @gray-lighter;
+//** Width of horizontal description list titles
+@dl-horizontal-offset:        @component-offset-horizontal;
+//** Horizontal line color.
+@hr-border:                   @gray-lighter;
diff --git a/EnlighterJS/Resources/favicon.png b/EnlighterJS/Resources/favicon.png
new file mode 100644
index 0000000..f370335
Binary files /dev/null and b/EnlighterJS/Resources/favicon.png differ
diff --git a/EnlighterJS/Resources/github-buttons/GitHubButtons.MooTools.js b/EnlighterJS/Resources/github-buttons/GitHubButtons.MooTools.js
new file mode 100644
index 0000000..f595133
--- /dev/null
+++ b/EnlighterJS/Resources/github-buttons/GitHubButtons.MooTools.js
@@ -0,0 +1,275 @@
+/*!
+---
+name: GitHub-Buttons for MooTools, jQuery and PHP
+description: Unofficial GitHub Buttons based on https://github.com/mdo/github-buttons
+
+license: Apache 2.0 License
+version: 2.5.0
+build: 54ff1b657e537f8107ee7373e0bfeeeb/May 6 2015
+
+authors:
+  - Andi Dittrich (author of MooTools/jQuery/PHP based versions)
+  - Mark Otto (author of original github-buttons styles)
+  
+download: https://github.com/AndiDittrich/MooTools.GitHub-Buttons
+website: http://github-buttons.andidittrich.de
+demo: http://github-buttons.andidittrich.de
+  
+requires:
+  - Core/1.4.5
+  - More/Number.Format
+  - More/Request.JSONP
+
+provides: [GitHubButton]
+...
+*//*
+---
+name: GitHub-Buttons
+description: Unofficial GitHub Buttons inspired by https://github.com/mdo/github-buttons
+
+license: Dual-Licensed under "The MIT License (X11)" and "Apache 2.0 License"
+
+authors:
+  - Andi Dittrich
+  
+requires:
+  - Core/1.4.5
+  - More/Number.Format
+  - More/Request.JSONP
+
+provides: [GitHubButton]
+...
+ */
+var GitHubButton = new Class({
+	Implements: Options,
+	
+	// contains the required html structure
+	buttonContainer: null,
+
+	options: {
+		// large or small button ?
+		large: false,
+		
+		// GitHub username
+		owner: null,
+		
+		// GitHub repository name
+		repo: null,
+		
+		// Button type (star, fork, watch, follow)
+		type: 'star',
+		
+		// custom button text
+		text: null,
+		
+		// enabled/disable counter - manual set the value
+		count: true,
+		
+		// enable/disable caching
+		cache: true,
+		
+		// cache lifetime in seconds (2h default)
+		cacheLifetime: 7200,
+		
+		// error text/count
+		errorText: 'NA'
+	},	
+	
+	initialize: function(options){
+		this.setOptions(options);
+
+		// jsonp rest service url
+		var url = 'https://api.github.com';
+		
+		// create repo url
+		var repoUrl = 'https://github.com/' + this.options.owner + '/' + this.options.repo + '/';
+		var actionUrl = 'https://github.com/' + this.options.owner + '/';
+		
+		// text to display
+		var text = '-';
+
+        // response object selector
+        var responseSelector = '';
+		
+		// star, fork, follow, watch are supported
+		switch (this.options.type){
+			case 'star':
+				url += '/repos/' + this.options.owner + '/' + this.options.repo;
+				text = 'Star';
+				actionUrl = repoUrl + 'stargazers';
+                responseSelector = 'stargazers_count';
+				break;
+				
+			case 'fork':
+				url += '/repos/' + this.options.owner + '/' + this.options.repo;
+				text = 'Fork';
+				actionUrl = repoUrl + 'network';
+                responseSelector = 'forks_count';
+				break;
+				
+			case 'watch':
+				url += '/repos/' + this.options.owner + '/' + this.options.repo;
+				actionUrl += this.options.repo + '/watchers';
+				text = 'Watchers';
+                responseSelector = 'subscribers_count';
+				break;
+				
+			case 'follow':
+				url += '/users/' + this.options.owner;
+				text = 'Follow @' + this.options.owner;
+				repoUrl = actionUrl;
+				actionUrl += 'followers';
+                responseSelector = 'followers';
+				break;
+		}
+		
+		// create html structure
+		// @see https://github.com/mdo/github-buttons/blob/master/github-btn.source.html
+		// 
+		//  
+		//    
+		//    
+		//  
+		//  
+		// 
+		
+		// create elements
+		this.buttonContainer = new Element('div', {
+			'class': 'github-btn ' + (this.options.large ? 'github-btn-large' : '')
+		});
+		var count = new Element('a', {
+			'class': 'gh-count',
+			href: actionUrl,
+			target: '_blank'
+		});
+		var ico = new Element('span', {
+			'class': 'gh-ico'
+		});
+		var txt = new Element('span', {
+			'class': 'gh-text',
+			text: (this.options.text ? this.options.text : text)
+		});
+		var button = new Element('a', {
+			'class': 'gh-btn',
+			href: repoUrl,
+			target: '_blank'
+		});
+		
+		// create structure
+		button.grab(ico).grab(txt);
+		this.buttonContainer.grab(button).grab(count);
+			
+		// which "count"-mode should be used ?
+		if (typeof this.options.count == 'boolean'){
+			// show count and request the data via JSONP ?
+			if (this.options.count){
+				// cache instance name
+				var cacheName = 'GHB_' + this.options.type + '_' + this.options.owner + '_' + this.options.repo + '_' + responseSelector;
+				
+				// cache version available ?
+				if (this.options.cache === true){
+					var cdata = this.retrieveItem(cacheName, this.options.cacheLifetime);
+					
+					if (cdata){
+						// update text
+						count.set('text', cdata.format({group: '.'}));
+						return;
+					}
+				}
+				
+				// request data
+				new Request.JSONP({
+					// the rest service url
+				    url: url,
+				    
+				    // jsonp callback get parameter
+				    // @see https://developer.github.com/v3/#json-p-callbacks
+				    callbackKey: 'callback',
+				    
+				    // request complete handler
+				    onComplete: function(response){
+				    	// valid reponse ? request limit not exceeeded ?
+				    	if (response.data && response.data[responseSelector]){
+                            // extract count
+                            var cnt = response.data[responseSelector];
+
+				    		// update text
+							count.set('text', cnt.format({group: '.'}));
+							
+							// update cache
+							if (this.options.cache === true){
+								this.storeItem(cacheName, cnt);
+							}
+							
+						// set error text	
+				    	}else{
+				    		count.set('text', this.options.errorText);
+				    	}
+				    }.bind(this)
+				}).send();
+			}else{
+				// hide counter
+				count.setStyle('display', 'none');
+			}
+			
+		}else{
+			// manually set the value
+			count.set('text', this.options.count.format({group: '.'}));
+		}		
+	},
+	
+	// magic method to use class instance as element
+	toElement: function(){
+		return this.buttonContainer;
+	},
+	
+	// use local storage as cache
+	storeItem: function(name, data){
+		// generate storage data
+		var d = JSON.encode({
+			time: (new Date().getTime()),
+			payload: data
+		});
+		
+		// try to use html5 features
+		if (typeof(Storage) !== "undefined"){
+			localStorage.setItem(name, d);
+		}
+	},
+	
+	// use local storage as cache
+	retrieveItem: function(name, cacheLifetime){
+		// try to use html5 features
+		if (typeof(Storage) !== "undefined"){
+			// get item
+			var ls = localStorage.getItem(name);
+			
+			// available ?
+			if (!ls){
+				return null;
+			}
+			
+			// decode json serialized data
+			ls = JSON.decode(ls);
+			
+			// lifetime expired ?
+			if (!ls.time || (ls.time + (cacheLifetime*1000)) < (new Date().getTime())){
+				return null;
+			}
+			
+			// valid payload ?
+			return (ls.payload ? ls.payload : null);
+		}else{
+			return null;
+		}
+	}
+});
+
+// Native Element extension - jQuery like usage
+(function(){
+	Element.implement({
+		GitHubButton: function(options){
+			this.grab(new GitHubButton(options));
+		}
+	});
+})();
\ No newline at end of file
diff --git a/EnlighterJS/Resources/github-buttons/GitHubButtons.css b/EnlighterJS/Resources/github-buttons/GitHubButtons.css
new file mode 100644
index 0000000..8931dd6
--- /dev/null
+++ b/EnlighterJS/Resources/github-buttons/GitHubButtons.css
@@ -0,0 +1,189 @@
+/*!
+---
+name: GitHub-Buttons for MooTools, jQuery and PHP
+description: Unofficial GitHub Buttons based on https://github.com/mdo/github-buttons
+
+license: Apache 2.0 License
+version: 2.5.0
+build: 5dbc39345334d0b03ad0b90960943efb/May 6 2015
+
+authors:
+  - Andi Dittrich (author of MooTools/jQuery/PHP based versions)
+  - Mark Otto (author of original github-buttons styles)
+  
+download: https://github.com/AndiDittrich/MooTools.GitHub-Buttons
+website: http://github-buttons.andidittrich.de
+demo: http://github-buttons.andidittrich.de
+  
+requires:
+  - Core/1.4.5
+  - More/Number.Format
+  - More/Request.JSONP
+
+provides: [GitHubButton]
+...
+*//*
+---
+description: GitHub-Buttons Styles - Improved for use within own pages
+
+license: Apache 2.0 License
+
+authors:
+  - Mark Otto
+  - github-buttons contributors (https://github.com/mdo/github-buttons)
+  - Andi Dittrich
+...
+*/
+.github-btn {
+	display: block;
+	position: relative;
+	height: 20px;
+	font: bold 11px/14px "Helvetica Neue", Helvetica, Arial, sans-serif;
+	overflow: hidden;
+}
+
+.gh-btn,.gh-count,.gh-ico {
+	float: left;
+}
+
+.gh-btn,.gh-count {
+	padding: 2px 5px 2px 4px;
+	color: #333;
+	text-decoration: none;
+	text-shadow: 0 1px 0 #fff;
+	white-space: nowrap;
+	cursor: pointer;
+	border-radius: 3px;
+}
+
+.gh-btn {
+	background-color: #e6e6e6;
+	background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fafafa),
+		to(#eaeaea));
+	background-image: -webkit-linear-gradient(#fafafa, #eaeaea);
+	background-image: -moz-linear-gradient(top, #fafafa, #eaeaea);
+	background-image: -ms-linear-gradient(#fafafa, #eaeaea);
+	background-image: -o-linear-gradient(#fafafa, #eaeaea);
+	background-image: linear-gradient(#fafafa, #eaeaea);
+	background-repeat: no-repeat;
+	border: 1px solid #d4d4d4;
+	border-bottom-color: #bcbcbc;
+}
+
+.gh-btn:hover,.gh-btn:focus,.gh-btn:active {
+	color: #fff;
+	text-decoration: none;
+	text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
+	border-color: #518cc6 #518cc6 #2a65a0;
+	background-color: #3072b3;
+}
+
+.gh-btn:hover,.gh-btn:focus {
+	background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#599bdc),
+		to(#3072b3));
+	background-image: -webkit-linear-gradient(#599bdc, #3072b3);
+	background-image: -moz-linear-gradient(top, #599bdc, #3072b3);
+	background-image: -ms-linear-gradient(#599bdc, #3072b3);
+	background-image: -o-linear-gradient(#599bdc, #3072b3);
+	background-image: linear-gradient(#599bdc, #3072b3);
+}
+
+.gh-btn:active {
+	background-image: none;
+	-webkit-box-shadow: inset 0 2px 5px rgba(0, 0, 0, .10);
+	-moz-box-shadow: inset 0 2px 5px rgba(0, 0, 0, .10);
+	box-shadow: inset 0 2px 5px rgba(0, 0, 0, .10);
+}
+
+.gh-ico {
+	width: 14px;
+	height: 14px;
+	margin-right: 4px;
+	vertical-align: 3px;
+	background-image:
+		url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iMTMycHgiIGhlaWdodD0iNjZweCIgdmlld0JveD0iMCAwIDEzMiA2NiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTMyIDY2IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBmaWxsPSIjMzMzMzMzIiBkPSJNMzMsMS44Yy0xNy43LDAtMzIsMTQuMy0zMiwzMmMwLDE0LjEsOS4yLDI2LjEsMjEuOSwzMC40DQoJYzEuNiwwLjMsMi4yLTAuNywyLjItMS41YzAtMC44LDAtMi44LDAtNS40Yy04LjksMS45LTEwLjgtNC4zLTEwLjgtNC4zYy0xLjUtMy43LTMuNi00LjctMy42LTQuN2MtMi45LTIsMC4yLTEuOSwwLjItMS45DQoJYzMuMiwwLjIsNC45LDMuMyw0LjksMy4zYzIuOSw0LjksNy41LDMuNSw5LjMsMi43YzAuMy0yLjEsMS4xLTMuNSwyLTQuM2MtNy4xLTAuOC0xNC42LTMuNi0xNC42LTE1LjhjMC0zLjUsMS4yLTYuMywzLjMtOC42DQoJYy0wLjMtMC44LTEuNC00LjEsMC4zLTguNWMwLDAsMi43LTAuOSw4LjgsMy4zYzIuNi0wLjcsNS4zLTEuMSw4LTEuMWMyLjcsMCw1LjUsMC40LDgsMS4xYzYuMS00LjEsOC44LTMuMyw4LjgtMy4zDQoJYzEuNyw0LjQsMC42LDcuNywwLjMsOC41YzIuMSwyLjIsMy4zLDUuMSwzLjMsOC42YzAsMTIuMy03LjUsMTUtMTQuNiwxNS44YzEuMSwxLDIuMiwyLjksMi4yLDUuOWMwLDQuMywwLDcuNywwLDguOA0KCWMwLDAuOSwwLjYsMS45LDIuMiwxLjVDNTUuOCw1OS45LDY1LDQ3LjksNjUsMzMuOEM2NSwxNi4xLDUwLjcsMS44LDMzLDEuOHoiLz4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBmaWxsPSIjRkZGRkZGIiBkPSJNOTksMS44Yy0xNy43LDAtMzIsMTQuMy0zMiwzMmMwLDE0LjEsOS4yLDI2LjEsMjEuOSwzMC40DQoJYzEuNiwwLjMsMi4yLTAuNywyLjItMS41YzAtMC44LDAtMi44LDAtNS40Yy04LjksMS45LTEwLjgtNC4zLTEwLjgtNC4zYy0xLjUtMy43LTMuNi00LjctMy42LTQuN2MtMi45LTIsMC4yLTEuOSwwLjItMS45DQoJYzMuMiwwLjIsNC45LDMuMyw0LjksMy4zYzIuOSw0LjksNy41LDMuNSw5LjMsMi43YzAuMy0yLjEsMS4xLTMuNSwyLTQuM2MtNy4xLTAuOC0xNC42LTMuNi0xNC42LTE1LjhjMC0zLjUsMS4yLTYuMywzLjMtOC42DQoJYy0wLjMtMC44LTEuNC00LjEsMC4zLTguNWMwLDAsMi43LTAuOSw4LjgsMy4zYzIuNi0wLjcsNS4zLTEuMSw4LTEuMWMyLjcsMCw1LjUsMC40LDgsMS4xYzYuMS00LjEsOC44LTMuMyw4LjgtMy4zDQoJYzEuNyw0LjQsMC42LDcuNywwLjMsOC41YzIuMSwyLjIsMy4zLDUuMSwzLjMsOC42YzAsMTIuMy03LjUsMTUtMTQuNiwxNS44YzEuMSwxLDIuMiwyLjksMi4yLDUuOWMwLDQuMywwLDcuNywwLDguOA0KCWMwLDAuOSwwLjYsMS45LDIuMiwxLjVjMTIuNy00LjIsMjEuOS0xNi4yLDIxLjktMzAuNEMxMzEsMTYuMSwxMTYuNywxLjgsOTksMS44eiIvPg0KPC9zdmc+DQo=);
+	background-size: 28px 14px;
+	background-repeat: no-repeat;
+	background-position: 0 0;
+}
+
+.gh-btn:hover .gh-ico,.gh-btn:focus .gh-ico,.gh-btn:active .gh-ico {
+	background-position: -14px 0;
+}
+
+.gh-count {
+	position: relative;
+	display: block;
+	margin-left: 4px;
+	background-color: #fafafa;
+	border: 1px solid #d4d4d4;
+}
+
+.gh-count:hover,.gh-count:focus {
+	color: #4183C4;
+}
+
+.gh-count:before,.gh-count:after {
+	content: '';
+	position: absolute;
+	display: inline-block;
+	width: 0;
+	height: 0;
+	border-color: transparent;
+	border-style: solid;
+}
+
+.gh-count:before {
+	top: 50%;
+	left: -3px;
+	margin-top: -4px;
+	border-width: 4px 4px 4px 0;
+	border-right-color: #fafafa;
+}
+
+.gh-count:after {
+	top: 50%;
+	left: -4px;
+	z-index: -1;
+	margin-top: -5px;
+	border-width: 5px 5px 5px 0;
+	border-right-color: #d4d4d4;
+}
+
+.github-btn-large {
+	height: 30px;
+}
+
+.github-btn-large .gh-btn,.github-btn-large .gh-count {
+	padding: 3px 10px 3px 8px;
+	font-size: 16px;
+	line-height: 22px;
+	border-radius: 4px;
+}
+
+.github-btn-large .gh-ico {
+	width: 20px;
+	height: 20px;
+	background-size: 40px 20px;
+}
+
+.github-btn-large .gh-btn:hover .gh-ico,.github-btn-large .gh-btn:focus .gh-ico,.github-btn-large .gh-btn:active .gh-ico
+	{
+	background-position: -20px 0;
+}
+
+.github-btn-large .gh-count {
+	margin-left: 6px;
+}
+
+.github-btn-large .gh-count:before {
+	left: -5px;
+	margin-top: -6px;
+	border-width: 6px 6px 6px 0;
+}
+
+.github-btn-large .gh-count:after {
+	left: -6px;
+	margin-top: -7px;
+	border-width: 7px 7px 7px 0;
+}
\ No newline at end of file
diff --git a/EnlighterJS/Resources/github-buttons/LICENSE.md b/EnlighterJS/Resources/github-buttons/LICENSE.md
new file mode 100644
index 0000000..01d481a
--- /dev/null
+++ b/EnlighterJS/Resources/github-buttons/LICENSE.md
@@ -0,0 +1,13 @@
+Copyright 2014 Mark Otto, 2014-2015 Andi Dittrich
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
\ No newline at end of file
diff --git a/EnlighterJS/Resources/img/noise.png b/EnlighterJS/Resources/img/noise.png
new file mode 100644
index 0000000..e082e0d
Binary files /dev/null and b/EnlighterJS/Resources/img/noise.png differ
diff --git a/EnlighterJS/Resources/img/screenshot-1.jpg b/EnlighterJS/Resources/img/screenshot-1.jpg
new file mode 100644
index 0000000..8791f5b
Binary files /dev/null and b/EnlighterJS/Resources/img/screenshot-1.jpg differ
diff --git a/EnlighterJS/Resources/img/screenshot-10.jpg b/EnlighterJS/Resources/img/screenshot-10.jpg
new file mode 100644
index 0000000..0e1fc56
Binary files /dev/null and b/EnlighterJS/Resources/img/screenshot-10.jpg differ
diff --git a/EnlighterJS/Resources/img/screenshot-11.jpg b/EnlighterJS/Resources/img/screenshot-11.jpg
new file mode 100644
index 0000000..e32a552
Binary files /dev/null and b/EnlighterJS/Resources/img/screenshot-11.jpg differ
diff --git a/EnlighterJS/Resources/img/screenshot-12.jpg b/EnlighterJS/Resources/img/screenshot-12.jpg
new file mode 100644
index 0000000..f4cd5df
Binary files /dev/null and b/EnlighterJS/Resources/img/screenshot-12.jpg differ
diff --git a/EnlighterJS/Resources/img/screenshot-2.jpg b/EnlighterJS/Resources/img/screenshot-2.jpg
new file mode 100644
index 0000000..39046ab
Binary files /dev/null and b/EnlighterJS/Resources/img/screenshot-2.jpg differ
diff --git a/EnlighterJS/Resources/img/screenshot-3.jpg b/EnlighterJS/Resources/img/screenshot-3.jpg
new file mode 100644
index 0000000..761ef24
Binary files /dev/null and b/EnlighterJS/Resources/img/screenshot-3.jpg differ
diff --git a/EnlighterJS/Resources/img/screenshot-4.jpg b/EnlighterJS/Resources/img/screenshot-4.jpg
new file mode 100644
index 0000000..61a7ede
Binary files /dev/null and b/EnlighterJS/Resources/img/screenshot-4.jpg differ
diff --git a/EnlighterJS/Resources/img/screenshot-5.jpg b/EnlighterJS/Resources/img/screenshot-5.jpg
new file mode 100644
index 0000000..fdabd32
Binary files /dev/null and b/EnlighterJS/Resources/img/screenshot-5.jpg differ
diff --git a/EnlighterJS/Resources/img/screenshot-6.jpg b/EnlighterJS/Resources/img/screenshot-6.jpg
new file mode 100644
index 0000000..814efaf
Binary files /dev/null and b/EnlighterJS/Resources/img/screenshot-6.jpg differ
diff --git a/EnlighterJS/Resources/img/screenshot-7.jpg b/EnlighterJS/Resources/img/screenshot-7.jpg
new file mode 100644
index 0000000..532cd29
Binary files /dev/null and b/EnlighterJS/Resources/img/screenshot-7.jpg differ
diff --git a/EnlighterJS/Resources/img/screenshot-8.jpg b/EnlighterJS/Resources/img/screenshot-8.jpg
new file mode 100644
index 0000000..02afa6d
Binary files /dev/null and b/EnlighterJS/Resources/img/screenshot-8.jpg differ
diff --git a/EnlighterJS/Resources/img/screenshot-9.jpg b/EnlighterJS/Resources/img/screenshot-9.jpg
new file mode 100644
index 0000000..463f1cd
Binary files /dev/null and b/EnlighterJS/Resources/img/screenshot-9.jpg differ
diff --git a/EnlighterJS/Resources/img/screenshot-includes.jpg b/EnlighterJS/Resources/img/screenshot-includes.jpg
new file mode 100644
index 0000000..ffd2312
Binary files /dev/null and b/EnlighterJS/Resources/img/screenshot-includes.jpg differ
diff --git a/EnlighterJS/Resources/img/slide1.jpg b/EnlighterJS/Resources/img/slide1.jpg
new file mode 100644
index 0000000..13df5e1
Binary files /dev/null and b/EnlighterJS/Resources/img/slide1.jpg differ
diff --git a/EnlighterJS/Resources/mootools-LICENSE b/EnlighterJS/Resources/mootools-LICENSE
new file mode 100644
index 0000000..b706155
--- /dev/null
+++ b/EnlighterJS/Resources/mootools-LICENSE
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2006-2009 Valerio Proietti, 
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file
diff --git a/EnlighterJS/Resources/notice.txt b/EnlighterJS/Resources/notice.txt
new file mode 100644
index 0000000..29894b3
--- /dev/null
+++ b/EnlighterJS/Resources/notice.txt
@@ -0,0 +1 @@
+/*! EnlighterJS Syntax Highlighter {{VERSION}} | MIT-Style X11 License | http://enlighterjs.andidittrich.de/ | build {{BUILD}}/{{DATE}} */
\ No newline at end of file
diff --git a/EnlighterJS/Resources/social-buttons/LICENSE.md b/EnlighterJS/Resources/social-buttons/LICENSE.md
new file mode 100644
index 0000000..01d481a
--- /dev/null
+++ b/EnlighterJS/Resources/social-buttons/LICENSE.md
@@ -0,0 +1,13 @@
+Copyright 2014 Mark Otto, 2014-2015 Andi Dittrich
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
\ No newline at end of file
diff --git a/EnlighterJS/Resources/social-buttons/social-buttons.css b/EnlighterJS/Resources/social-buttons/social-buttons.css
new file mode 100644
index 0000000..02ec474
--- /dev/null
+++ b/EnlighterJS/Resources/social-buttons/social-buttons.css
@@ -0,0 +1,143 @@
+/*
+---
+description: GitHub-Buttons Styles - Improved for use within own pages
+
+license: Apache 2.0 License
+
+authors:
+  - Mark Otto
+  - github-buttons contributors (https://github.com/mdo/github-buttons)
+  - Andi Dittrich
+...
+*/
+
+.social-button{
+    display: inline-block;
+    position: relative;
+    height: 20px;
+    font: bold 11px/14px "Helvetica Neue", Helvetica, Arial, sans-serif;
+    overflow: hidden;
+}
+
+.social-btn,
+.social-count {
+    float: left;
+    padding: 2px 5px 2px 4px;
+    color: #333;
+    text-decoration: none;
+    text-shadow: 0 1px 0 #fff;
+    white-space: nowrap;
+    cursor: pointer;
+    border-radius: 3px;
+}
+.social-btn {
+    background-color: #eee;
+    background-image: linear-gradient(to bottom, #fcfcfc 0, #eee 100%);
+    background-repeat: no-repeat;
+    border: 1px solid #d5d5d5;
+}
+.social-btn:hover,
+.social-btn:focus {
+    text-decoration: none;
+    background-color: #ddd;
+    background-image: linear-gradient(to bottom, #eee 0, #ddd 100%);
+    border-color: #ccc;
+}
+.social-btn:active {
+    background-image: none;
+    background-color: #dcdcdc;
+    border-color: #b5b5b5;
+    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
+}
+.github-ico {
+    float: left;
+    width: 14px;
+    height: 14px;
+    margin-right: 4px;
+    background-size: 100% 100%;
+    background-repeat: no-repeat;
+    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjQwcHgiIGhlaWdodD0iNDBweCIgdmlld0JveD0iMTIgMTIgNDAgNDAiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMTIgMTIgNDAgNDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGZpbGw9IiMzMzMzMzMiIGQ9Ik0zMiAxMy40Yy0xMC41IDAtMTkgOC41LTE5IDE5YzAgOC40IDUuNSAxNS41IDEzIDE4YzEgMC4yIDEuMy0wLjQgMS4zLTAuOWMwLTAuNSAwLTEuNyAwLTMuMiBjLTUuMyAxLjEtNi40LTIuNi02LjQtMi42QzIwIDQxLjYgMTguOCA0MSAxOC44IDQxYy0xLjctMS4yIDAuMS0xLjEgMC4xLTEuMWMxLjkgMC4xIDIuOSAyIDIuOSAyYzEuNyAyLjkgNC41IDIuMSA1LjUgMS42IGMwLjItMS4yIDAuNy0yLjEgMS4yLTIuNmMtNC4yLTAuNS04LjctMi4xLTguNy05LjRjMC0yLjEgMC43LTMuNyAyLTUuMWMtMC4yLTAuNS0wLjgtMi40IDAuMi01YzAgMCAxLjYtMC41IDUuMiAyIGMxLjUtMC40IDMuMS0wLjcgNC44LTAuN2MxLjYgMCAzLjMgMC4yIDQuNyAwLjdjMy42LTIuNCA1LjItMiA1LjItMmMxIDIuNiAwLjQgNC42IDAuMiA1YzEuMiAxLjMgMiAzIDIgNS4xYzAgNy4zLTQuNSA4LjktOC43IDkuNCBjMC43IDAuNiAxLjMgMS43IDEuMyAzLjVjMCAyLjYgMCA0LjYgMCA1LjJjMCAwLjUgMC40IDEuMSAxLjMgMC45YzcuNS0yLjYgMTMtOS43IDEzLTE4LjFDNTEgMjEuOSA0Mi41IDEzLjQgMzIgMTMuNHoiLz48L3N2Zz4=');
+}
+.wordpress-ico {
+    float: left;
+    width: 14px;
+    height: 14px;
+    margin-right: 4px;
+    background-size: 100% 100%;
+    background-repeat: no-repeat;
+    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2BJREFUeNpcU11MU2cYfs5PhRXoD1iko5QWKj+6tjJ/ICqaOOdwms3oxTYniZnLsmQXSyR6tSxm2YUxmTdLlgzmLuayzSyZPxNdNMQwSAe6AaUxUCn9NdaD0Ha0pVDac/Z+Ry7MTvKcnO/9nuc57/t978vZz/Thf08z4SPCXsKWtdgEYZDQS/C/SBbZq8PpVhcjPu9pgec/O7C5fvKd9ma+vlRJs3hkmeOvjPq33nkY+asoy18S/+IaH9xaBusI182GsobvP+jivcG4wzMdRUhKYKVQRGNNJfa7HXDba2a6+24p8VQ2SPy3CXnBuOstZvCVo9rwypWPD1vPXx02Dz4MYyGTg6wAHMcjlV3BWDCO1aJc1XeqS9vvDa4kssuNpLvDMnBS2oPj57qlS/e8LYWiDI8/hh0bayHyvFpagswmwhJ+6zmKEo2IXL4Qc33+QzmVs5sxTr3pso+LAtfy6cFt2NVcC17UQAGP04e2o+fwDsiUBS+K8D9Nqobp3Eod0zAtM+jq3tmq/2bAp25qS0uwSuKRoITRWUmNGcpegkCmv96fVdfj0XkwDdMyA7u7rto+EppHdCGDFrMRujItOEEDz0wciqJg3yYLHQaPWCqrGgwH5tC0obKBPmvVIqkmTtSsw8D0E2gEHnuazIAiw1alVQVt9SaUCwrWV2gRmU8jNJeEwHNsS2AG0UdSImg16eGJJOnkFXSSQXE1j1pdCW78eZ9YPNosBnSYS9E/NoOy4hKm4gvsKqPM4I/Lnql/OxurkckrGH+covT0eNVmwkQggt+H/gH71xtbHHDaLBgYm8KeViuYhsJ3mUHvbV/I3V5f+chaVQ5POKGm/cnrbfg7NIdgYgnJbA6brRvwLJuHUa/Dga2tfqYh2iVm4KO7//n93puZM/uaMvHFZeRWi+qhxXOARleFoakYNRQwm1zCF++9ljnR158lzY9My6/NRM+MlJo79vXV2MltlkBBBqalReiN61FjqYOUk1lLosNuChz/9maEcUlzlgnVWWDD9FP3djSc/U4dpoNOm/fd9hbdTsfLNkbyBJ6EfxmdXrztC7vZMAUvfHjx+OUHz4eJ9Q6hnPULwVjh3O2qcHUeEQ0mVyGdsKgjW1H5uJB6NpmeHLqW9g1PUoi1ZIqQ+U+AAQBxOVz5xw02pQAAAABJRU5ErkJggg==');
+}
+
+.twitter-ico {
+    float: left;
+    width: 20px;
+    height: 14px;
+    background: rgba(0, 0, 0, 0) url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAoCAYAAABq13MpAAAGcklEQVRYw+2YXUyTVxjHz4vJLiZGd7MtXi2LkZtdELM7lyzOG7Nk2RJvl8iujBiNV2JcMA0fwqCFEGCAfJRC+SyltqWFgnwUlIKAWB3yOVrAttQWC1ZCOi6ePc8LL74tVD6ly2KTf87J6Tnv+3uf8zzP+WAAwEhMIj8h1MViEs0Jlqi+we5oJFjGCX3D9X+fmKTmq/f/rzkRlX5fzkmNPhLVqW2DQ1Ify9eFAZ8kafUsURMX+qCo1BYry3oILKcfmLQb2N3Wzqhk48xn6YbLuwJO1cQeydAvURkWONtk5UoGgKsaXRPWo3LarVHSJvkRmXHm+6pHV3h4YdDp0gE7D5XUJPo6QyzLfwKscgZY1UtgChuwkjH4tOhpQPp4Nn430GeU/TcJ4sif5iV2V/NL6P/H81oTOIUVuPsO4AyeNVG9ehw4xTP4oubZ268VFiP2jd4Y9Hufw8TKJoAgufT2RZZikJ8s7JMzxTQw1QKwhtdrZY0Likd9Azjm1G6gpcOz8VzdFHC1E8AV9gKXYdCI3eWc9q96Tj0DnHEBuObXa6J60yvgtC740Tw3jf0Sgtzj89JhK6tyAKt2Ag9f+AxY8SgPyQMLUs5hd/hut/5MH3mp3z3H6eeBa7ADV/4UuNxO4DINw1GyZklMw/MhTut8BywCj2mb9wvAQdBN0z5ldJ1zlbemygusdn5NVBeA8b/Tart/D8CMyVrjjteNeo81v1rljF7gdC7gVNPAKUeAdwuaAb17MzS6yTdGmzPoWWJLXLG8Go9We1aDLCtWnRskA27zXqCfuP0Xj9ZNBHgwwQWE6acP4Nu9m6FxZn7tmbWEg2Zpg670U1rXUpB1xVbWOsjKF/YCTQHU5X5rjmn3+IP8djthMJaNe+6EhUbFmub8jefaPZ5NbtHk8TuX/1HsEZiXetJz5rc+11BMxw7Bsc+3bS99oUH/bgGRYCL/o93Hp7gKO7B6zzqwF342L7jWgaP3A03jzxrGTJzm5dausIVrlP/tU22KD+FhFJ1djjfma4/mbdf6vbZrgz6bbOTN6IvFgGU9cvcLLOjqi6WA5bp10RbTuRDe4vhR1594bTT74aA3ghEVJxL575cHBLuhC3rr+bPN06ajOkdgS4tj26UB79w6A9sO+oMpKk0j5zKbOrksk48reLiW6mjFE0Oj1U+2elbK7P7nNCNh0+dhQZOLSa0u3U8dttmTOvsKv5DQUo2gx0wLqz88eu2RTbwZxX412y1ehwnN1mES1sE6RdKjkneaTg8b+kD0Efoj9P8WWiKRbHnmo/bExMQbWEqwjBPawvU/VOjk5GQ9gmxagdLS0qzZ2dmQm5sLWVlZkJ6e3pmamjqD5eWIQ8vlcjtBpaSkyAUrIlxsQUEBKJVKqK6uhsrKSigrK4Pi4uLA48eP4yMO3dfXZyovLweCzMjIWCT4e/fuySsqKkCtVkNjYyNf1tXVwdjY2K7PiB8EurS01FpTUwO1tbVA8AgM2MZDErAgsvgez4gHD22325UqlWqVrEmqr6/nJVhZsDSW/v288NatW++9sFkPcjm6po9EdcFdqbx9+3Zs0LbUYrGMazSaVbFlxcKPgqGhIfNegfGlsRjwS1SGA6bAz8/P52eZRHV0Vyu5KyUA9IIrQYMGBwfT9Xr9kti6YivrdLr9nBEZBvHNvLw8ykIEvunCRiaTJRQVFQG5aUNDAy+qU/CTuyLwWyyNm86IDoejsaOjwxPqFkaj0b+8vLyvMyIaJV6hUPAxk5OTA2g5DcJvuAvOZD1lqtB30wxTbLW1tfEXNhvTkpSUJM/MzPQJKY6+UhjU3d3tWgfe75HrVE9PzxzFCr2jsLAQpFIppdlh/ABJVVXVECWCrWYZPcAfesPEnxHRyube3l4b5mAbWsU2ir/FxcUDOyOiv8ahpb0UN0L6pJRaUlIC5BY0A2TVUGgyII5xRuSM6Ha7LyJkgMDEuV+YfnG7WDQzDx48sERqwxTtdDrNFB9bwYUTBSNO+p2I7fImJyfPoF8PNTc37wic+hgMhqALm0isaNEIY6KVdSfQ5BoTExOq/8J++ioFOAV7S0tLWItTOyWF0AubiO0fMOjO42JlwgAMhFvMMJNteWFzqKC0j8Cc3Il7cR/t0SnVUZCFLiaYk1empqbCXtgctoUTcO+iQ5eYRUuv0EJCOZhAtVrtaldXl2dkZGTbC5tIuMa+L2z+BexZXK+OBaruAAAAAElFTkSuQmCC') 0 0 no-repeat;
+    background-position: -24px 0;
+    margin-right: 4px;
+    vertical-align: 3px;
+}
+
+.social-count {
+    position: relative;
+    display: block;
+    margin-left: 4px;
+    background-color: #fafafa;
+    border: 1px solid #d4d4d4;
+}
+.social-count:hover,
+.social-count:focus {
+    color: #4183C4;
+}
+.social-count:before,
+.social-count:after {
+    content: '';
+    position: absolute;
+    display: inline-block;
+    width: 0;
+    height: 0;
+    border-color: transparent;
+    border-style: solid;
+}
+.social-count:before {
+    top: 50%;
+    left: -3px;
+    margin-top: -4px;
+    border-width: 4px 4px 4px 0;
+    border-right-color: #fafafa;
+}
+.social-count:after {
+    top: 50%;
+    left: -4px;
+    z-index: -1;
+    margin-top: -5px;
+    border-width: 5px 5px 5px 0;
+    border-right-color: #d4d4d4;
+}
+.social-btn-large {
+    height: 30px;
+}
+.social-btn-large .social-btn,
+.social-btn-large .social-count {
+    padding: 3px 10px 3px 8px;
+    font-size: 16px;
+    line-height: 22px;
+    border-radius: 4px;
+}
+.social-btn-large .social-ico {
+    width: 20px;
+    height: 20px;
+}
+.social-btn-large .social-count {
+    margin-left: 6px;
+}
+.social-btn-large .social-count:before {
+    left: -5px;
+    margin-top: -6px;
+    border-width: 6px 6px 6px 0;
+}
+.social-btn-large .social-count:after {
+    left: -6px;
+    margin-top: -7px;
+    border-width: 7px 7px 7px 0;
+}
\ No newline at end of file
diff --git a/EnlighterJS/Resources/social-buttons/social-buttons.js b/EnlighterJS/Resources/social-buttons/social-buttons.js
new file mode 100644
index 0000000..0de31f6
--- /dev/null
+++ b/EnlighterJS/Resources/social-buttons/social-buttons.js
@@ -0,0 +1,165 @@
+(function(_w){
+
+    var defaultOptions = {
+        // large or small button ?
+        large: false,
+
+        // Button type github-(star, fork, watch, follow), twitter-(follow, tweets)
+        type: 'github-star',
+
+        // custom button text
+        text: null,
+
+        // github/twitter username
+        username: '',
+
+        // github repository name
+        repo: '',
+
+        // wordpress plugin name
+        plugin: ''
+    };
+
+    // global "socialbutton" function
+    _w.SocialButton = (function(target, opt){
+        var options = Object.merge({}, defaultOptions, opt || {});
+
+        // urls
+        var textUrl = '';
+        var counterUrl = '';
+
+        // website urls
+        var githubUserUrl = 'https://github.com/' + options.username + '/';
+        var githubRepoUrl = githubUserUrl + options.repo + '/';
+        var twitterUserUrl = 'https://twitter.com/' + options.username + '/'
+        var twitterFollowerUrl = twitterUserUrl + 'followers';
+        var wordpressUserUrl = 'https://profiles.wordpress.org/' + options.username + '/';
+        var wordpressPluginUrl = 'https://wordpress.org/plugins/' + options.plugin.toLowerCase() + '/';
+
+        // text to display
+        var text = '-';
+
+        // counter value
+        var count = 0;
+
+        // icon type
+        var iconType = 'twitter';
+
+        // star, fork, follow, watch are supported
+        switch (options.type){
+            case 'github-star':
+                text = 'Star #' + options.repo;;
+                textUrl = githubRepoUrl;
+                counterUrl = githubRepoUrl + 'stargazers';
+                count = _w._github_profile.repos[options.repo].stargazers;
+                iconType = 'github';
+                break;
+
+            case 'github-fork':
+                text = 'Fork #' + options.repo;
+                textUrl = githubRepoUrl;
+                counterUrl = githubRepoUrl + 'network';
+                count = _w._github_profile.repos[options.repo].forks;
+                iconType = 'github';
+                break;
+
+            case 'github-followers':
+                text = 'Follow @' + options.username;
+                textUrl = githubRepoUrl;
+                counterUrl = githubUserUrl + 'followers';
+                count = _w._github_profile.user.followers;
+                iconType = 'github';
+                break;
+
+            case 'github-opensource':
+                text = 'OpenSource @' + options.username;
+                textUrl = githubRepoUrl;
+                counterUrl = githubUserUrl + '?tab=repositories';
+                count = Object.keys(_w._github_profile.repos).length;
+                iconType = 'github';
+                break;
+
+            case 'twitter-followers':
+                text = 'Follow @' + options.username;
+                textUrl = twitterUserUrl;
+                counterUrl = twitterFollowerUrl;
+                count = _w._twitter_profile.user.followers;
+                iconType = 'twitter';
+                break;
+
+            case 'twitter-tweets':
+                text = 'Tweets @' + options.username;
+                textUrl = twitterUserUrl;
+                counterUrl = twitterUserUrl;
+                count = _w._twitter_profile.user.tweets;
+                iconType = 'twitter';
+                break;
+
+            case 'wordpress-user':
+                text = 'Plugins @' + options.username;
+                textUrl = wordpressUserUrl;
+                counterUrl = wordpressUserUrl + '#content-plugins';
+                count = Object.keys(_w._wordpress_profile.plugins).length;
+                iconType = 'wordpress';
+                break;
+
+            case 'wordpress-plugin':
+                text = options.plugin;
+                textUrl = wordpressPluginUrl;
+                counterUrl = wordpressPluginUrl + 'stats/';
+                count = _w._wordpress_profile.plugins[options.plugin.toLowerCase()].downloads;
+                iconType = 'wordpress';
+                break;
+        }
+
+        // text override ?
+        if (options.text !== null){
+            text = options.text;
+        }
+
+        // create html structure
+        // @see https://github.com/mdo/github-buttons/blob/master/github-btn.source.html
+        // 
+        //  
+        //    
+        //    
+        //  
+        //  
+        // 
+
+        // create elements
+        var buttonContainer = new Element('div', {
+            'class': 'social-button ' + (options.large ? 'social-btn-large' : '')
+        });
+        var counter = new Element('a', {
+            'class': 'social-count',
+            href: counterUrl,
+            target: '_blank',
+            text: count
+        });
+        var ico = new Element('span', {
+            'class': iconType + '-ico'
+        });
+        var txt = new Element('span', {
+            'class': 'social-text',
+            text: text
+        });
+        var button = new Element('a', {
+            'class': 'social-btn',
+            href: textUrl,
+            target: '_blank'
+        });
+
+        // create structure
+        button.grab(ico).grab(txt);
+        buttonContainer.grab(button);
+
+        // count set ?
+        if (count != null){
+            buttonContainer.grab(counter);
+        }
+
+        target.grab(buttonContainer);
+    });
+
+})(window);
\ No newline at end of file
diff --git a/EnlighterJS/Source/Dom/MooTools/Dom.js b/EnlighterJS/Source/Dom/MooTools/Dom.js
new file mode 100644
index 0000000..1806024
--- /dev/null
+++ b/EnlighterJS/Source/Dom/MooTools/Dom.js
@@ -0,0 +1,43 @@
+/*
+---
+description: EnlighterJS DOM Abstraction Layer (MooTools)
+
+license: MIT-style X11 License
+
+authors:
+  - Andi Dittrich
+
+requires:
+  - Core/1.4.5
+
+provides: [EnlighterJS.Dom]
+...
+ */
+EJS.Dom = {
+	/**
+	 * Selects a single DOM Eement by given css selector
+	 * @param sel
+	 * @returns
+	 */	
+	getElement: function(sel){
+		return document.getElement(sel);
+	},
+	
+	/**
+	 * Selects a collection of DOM Eöements by given css selector
+	 * @param sel
+	 * @returns
+	 */	
+	getElements: function(sel){
+		return document.getElements(sel);
+	},	
+		
+	/**
+	 * Selects an Element by it's ID
+	 * @param elementID
+	 * @returns DOM Element
+	 */	
+	id: function(elementID){
+		return document.id(elementID);
+	}	
+};
\ No newline at end of file
diff --git a/EnlighterJS/Source/Dom/MooTools/Element.js b/EnlighterJS/Source/Dom/MooTools/Element.js
new file mode 100644
index 0000000..fa83df3
--- /dev/null
+++ b/EnlighterJS/Source/Dom/MooTools/Element.js
@@ -0,0 +1,16 @@
+/*
+---
+description: EnlighterJS DOM Abstraction Layer (MooTools) - Just an Alias for MooTools Element
+
+license: MIT-style X11 License
+
+authors:
+  - Andi Dittrich
+
+requires:
+  - Core/1.4.5
+
+provides: [EnlighterJS.Dom.Element]
+...
+ */
+EJS.Dom.Element = Element;
\ No newline at end of file
diff --git a/EnlighterJS/Source/EnlighterJS.js b/EnlighterJS/Source/EnlighterJS.js
new file mode 100644
index 0000000..f579719
--- /dev/null
+++ b/EnlighterJS/Source/EnlighterJS.js
@@ -0,0 +1,333 @@
+/*
+---
+name: EnlighterJS
+description: Syntax Highlighter based on the famous Lighter.js
+
+license: MIT-style X11 License
+
+authors:
+  - Andi Dittrich
+  
+requires:
+  - Core/1.4.5
+
+provides: [EnlighterJS]
+...
+ */
+var EJS = window.EnlighterJS = new Class({
+
+	Implements : Options,
+
+	options : {
+		language : 'generic',
+		theme : 'Enlighter',
+		renderer: 'Block',
+		indent : -1,
+		forceTheme: false,
+		rawButton: true,
+		windowButton: true,
+		infoButton: true,
+		ampersandCleanup: true,
+		rawcodeDoubleclick: false
+	},
+
+	// used renderer instance
+	renderer: null,
+	
+	// used codeblock to highlight
+	originalCodeblock: null,
+	
+	// used container to store highlighted code
+	container: null,
+	
+	// lightning active ?
+	isRendered: false,
+	
+	// language alias manager
+	languageManager: null,
+
+	// toggle raw code
+	rawContentContainer: null,
+	
+	// rendered output span/ou/ul container
+	output: null,
+
+    // input/output filter
+	textFilter: null,
+
+    // cached code input
+    rawCode: null,
+
+	/**
+	 * @constructs
+	 * @param {Element} originalCodeblock An Element containing code to highlight
+	 * @param {Object} options The options object.
+	 * @param {Element} container (optional) The output container - if not defined, the output will be injected after the originalCodeblock
+	 */
+	initialize : function(originalCodeblock, opt, container) {
+		this.setOptions(opt);
+		
+		// create new language alias manager instance
+		this.languageManager = new EJS.LanguageManager(this.options);
+
+        // create new coe filter instance
+        this.textFilter = new EJS.TextFilter(this.options);
+				
+		// initialize renderer
+		if (this.options.renderer == 'Inline'){
+			this.renderer = new EJS.Renderer.InlineRenderer(this.options, this.textFilter);
+		}else{
+			this.renderer = new EJS.Renderer.BlockRenderer(this.options, this.textFilter);
+		}
+				
+		// store codeblock element
+		this.originalCodeblock = EJS.Dom.id(originalCodeblock);
+		
+		// store/create container
+		if (container){
+			this.container = EJS.Dom.id(container);
+		}
+	},
+
+	/**
+	 * Takes a codeblock and highlights the code inside of it using the
+	 * stored parser/compilers. It reads the class name to figure out what
+	 * language and theme to use for highlighting.
+	 * 
+	 * @return {EnlighterJS} The current EnlighterJS instance.
+	 */
+	enlight : function(enabled){
+		// show highlighted sourcecode ?
+		if (enabled){
+			// get element language
+			var rawLanguageName = this.originalCodeblock.get('data-enlighter-language');
+			
+			// ignore higlighting ?
+			if (rawLanguageName == 'no-highlight'){
+				return;
+			}
+			
+			// hide original codeblock
+			this.originalCodeblock.setStyle('display', 'none');
+			
+			// EnlighterJS exists so just toggle display.
+			if (this.isRendered) {				
+				this.container.setStyle('display', 'inherit');
+				return this;
+			}
+			
+			// get language name - use alias manager to check language string and validate
+			var languageName = this.languageManager.getLanguage(rawLanguageName);
+			
+			// get theme name - use options as fallback
+			var themeName = (this.options.forceTheme ? null : this.originalCodeblock.get('data-enlighter-theme')) || this.options.theme || 'Enlighter';
+			
+			// special lines to highlight ?
+			var specialLines = new EJS.SpecialLineHighlighter(this.originalCodeblock.get('data-enlighter-highlight'), this.originalCodeblock.get('data-enlighter-lineoffset'));
+			
+			// Load language parser
+			var language = new EJS.Language[languageName](this.getRawCode(true));
+			
+			// compile tokens -> generate output
+			this.output = this.renderer.render(language, specialLines, {
+				lineOffset: (this.originalCodeblock.get('data-enlighter-lineoffset') || null),
+				lineNumbers: this.originalCodeblock.get('data-enlighter-linenumbers')
+			});
+			
+			// set class and id attributes.
+			this.output.addClass(themeName.toLowerCase() + 'EnlighterJS').addClass('EnlighterJS');		
+	
+			// add wrapper ?
+			if (this.options.renderer == 'Block'){
+				// grab content into specific container or after original code block ?
+				if (!this.container) {
+					this.container = new EJS.Dom.Element('div');
+					
+					// put the highlighted code wrapper behind the original	
+					this.container.inject(this.originalCodeblock, 'after');
+				}
+				
+				// add wrapper class
+				this.container.addClass('EnlighterJSWrapper').addClass(themeName.toLowerCase() + 'EnlighterJSWrapper');
+				
+				// add the highlighted code
+				this.container.grab(this.output);
+				
+				// create raw content container
+				this.rawContentContainer = new EJS.Dom.Element('pre', {
+					text: this.getRawCode(false),
+					styles: {
+						'display': 'none'
+					}
+				});
+				
+				// add raw content container
+				this.container.grab(this.rawContentContainer);
+				
+				// show raw code on double-click ?
+				if (this.options.rawcodeDoubleclick){
+					this.container.addEvent('dblclick', function(){
+						this.toggleRawCode();
+					}.bind(this));
+				}
+				
+				// toolbar ?
+				if (this.options.rawButton || this.options.windowButton || this.options.infoButton){
+					this.container.grab(new EJS.UI.Toolbar(this));
+				}
+
+			// normal handling
+			}else{
+				// grab content into specific container or after original code block ?
+				if (this.container) {
+					this.container.grab(this.output);
+					
+				// just put the highlighted code behind the original	
+				}else{
+					this.output.inject(this.originalCodeblock, 'after');
+					this.container = this.output;
+				}
+			}
+			
+			// set render flag
+			this.isRendered = true;
+			
+		// disable highlighting	
+		}else{
+			// already highlighted ?
+			if (this.isRendered) {
+				this.originalCodeblock.setStyle('display', 'inherit');
+				this.container.setStyle('display', 'none');
+			}
+		}
+
+		return this;
+	},
+
+    /**
+     * Disable highlighting and remove generated DOM
+     */
+    dispose: function(){
+        // already highlighted ?
+        if (!this.isRendered) {
+            return;
+        }
+
+        // restore original codeblock
+        this.originalCodeblock.setStyle('display', null);
+
+        // hide highlighted code
+        this.container.setStyle('display', 'none');
+        this.rawContentContainer.setStyle('display', 'none');
+
+        // drop dom
+        this.container.dispose();
+        this.rawContentContainer.dispose();
+        this.container = null;
+        this.rawContentContainer = null;
+
+        // reset flag
+        this.isRendered = false;
+    },
+	
+	/**
+	 * Extracts the raw code from given codeblock
+	 * @return {String} The plain-text code (raw)
+	 */
+	getRawCode: function(reindent){
+
+        // cached version available ?
+        var code = this.rawCode;
+
+        if (code==null) {
+            // get the raw content
+            code = this.originalCodeblock.get('html');
+
+            // remove empty lines at the beginning+end of the codeblock
+            code = code.replace(/(^\s*\n|\n\s*$)/gi, '');
+
+            // apply input filter
+            code = this.textFilter.filterInput(code);
+
+            // cleanup ampersand ?
+            if (this.options.ampersandCleanup === true) {
+                code = code.replace(/&/gim, '&');
+            }
+
+            // replace html escaped chars
+            code = code.replace(/</gim, '<').replace(/>/gim, '>').replace(/ /gim, ' ');
+
+            // cache it
+            this.rawCode = code;
+        }
+
+		// replace tabs with spaces ?
+		if (reindent === true){
+			// get indent option value
+			var newIndent = this.options.indent.toInt();
+			
+			// re-indent code if specified
+			if (newIndent > -1){
+				// match all tabs
+				code = code.replace(/(\t*)/gim, function(match, p1, offset, string){
+					// replace n tabs with n*newIndent spaces
+					return (new Array(newIndent * p1.length + 1)).join(' ');
+				});
+			}
+		}
+		
+		return code;
+	},
+	
+	/**
+	 * Hide/Show the RAW Code Container/Toggle Highlighted Code
+	 */
+	toggleRawCode: function(show){
+		// initialization required!
+		if (this.output == null){
+			return;
+		}
+		
+		// argument set ?
+		if (typeof(show)!='boolean'){
+			show = (this.rawContentContainer.getStyle('display') == 'none');
+		}
+		
+		// toggle container visibility
+		if (show){
+			this.output.setStyle('display', 'none');
+			this.rawContentContainer.setStyle('display', 'block');
+		}else{
+			this.output.setStyle('display', 'block');
+			this.rawContentContainer.setStyle('display', 'none');
+		}
+	},
+
+    /**
+     * Takes a codeblock and highlights the code inside. The original codeblock is set to invisible
+     * @DEPRECATED since v2.0 - this method will be removed in the future
+     *
+     * @return {EnlighterJS} The current EnlighterJS instance.
+     */
+    light : function(){
+        return this.enlight(true);
+    },
+
+    /**
+     * Unlights a codeblock by hiding the enlighter element if present and re-displaying the original code.
+     * @DEPRECATED since v2.0 - this method will be removed in the future
+     *
+     * @return {EnlighterJS} The current EnlighterJS instance.
+     */
+    unlight : function() {
+        return this.enlight(false);
+    }
+});
+
+// register namespaces
+EJS.Language = {};
+EJS.Tokenizer = {};
+EJS.Renderer = {};
+EJS.Util = {};
+EJS.UI = {};
+
diff --git a/EnlighterJS/Source/Language/Assembly.js b/EnlighterJS/Source/Language/Assembly.js
new file mode 100644
index 0000000..d5a7373
--- /dev/null
+++ b/EnlighterJS/Source/Language/Assembly.js
@@ -0,0 +1,114 @@
+/*
+---
+description: ASM General Assembly Language
+
+license: MIT-style
+
+authors:
+  - Andi Dittrich
+
+requires:
+  - Core/1.4.5
+
+provides: [EnlighterJS.Language.asm]
+...
+*/
+EJS.Language.asm = new Class({
+	Extends : EJS.Language.generic,
+
+	setupLanguage: function(){
+
+		this.patterns = {
+            // comments start with a semicolon (only single line comments available)
+			'singleLineComments': {
+				pattern: /(;.*)$/gm,
+				alias: 'co1'
+			},
+
+            // controls - used e.g. in KEIL
+            'controls': {
+                pattern: /(\$.*)$/gm,
+                alias: 'co2'
+            },
+
+            // "strings" may used in some assemblers for char constants
+            'strings': {
+                pattern: this.common.strings,
+                alias: 'st0'
+            },
+
+            // general instructions (followed after a label or at a new line)
+            'instruction':{
+                pattern: /(^|:)\s*?(\w+)\s+/gm,
+                alias: 'kw3'
+            },
+
+            // labels (jump targets)
+            'label': {
+                pattern: /^\s*?([A-Z\?_][A-Z0-9\?_]+:)\s*?/gim,
+                alias: 'kw1'
+            },
+
+            // indirect addresses starts with @
+			'indirect': {
+				pattern: /@\w+/gi,
+				alias: 'kw4'
+			},
+
+            // immediate data
+            'immediate': {
+                pattern: /#\w+/gi,
+                alias: 'kw4'
+            },
+
+            // Hexadecimal (two notations): 0aH  (8051 asm)
+            'hex': {
+                pattern: /[A-F0-9][A-F0-9$]+?H/gi,
+                alias: 'nu0'
+            },
+
+            // Decimal: \d+  (8051 asm)
+            'integer': {
+                pattern: /\d[\d$]+?D/gi,
+                alias: 'nu0'
+            },
+
+            // Binary: 0b00001010, 0b11111111 (8051 asm)
+            'binary': {
+                pattern: /[01][01$]+?B/gi,
+                alias: 'nu0'
+            },
+
+            // Octals: 1767q (8051 asm)
+            'octals': {
+                pattern: /[0-7][0-7$]+?(?:Q|O)/gi,
+                alias: 'nu0'
+            },
+
+            // Hexadecimal (two notations): 0x0a, $0a, 0xff, $ff (generic)
+            'hex2': {
+                pattern: /(0x[A-F0-9]+|\$[A-F0-9]+)/gi,
+                alias: 'nu0'
+            },
+
+            // Binary: 0b00001010, 0b11111111 (generic)
+            'binary2': {
+                pattern: /(0b[01]+)/g,
+                alias: 'nu0'
+            },
+
+            // Decimal: \d+ (generic)
+            'integer2': {
+                pattern: /\b(\d+)/g,
+                alias: 'nu0'
+            },
+
+            // e.g. LOW(), HIGH() ..
+            'functions': {
+                pattern: this.common.functionCalls,
+                alias: 'me0'
+            },
+
+		};
+	}
+});
diff --git a/EnlighterJS/Source/Language/AvrAssembly.js b/EnlighterJS/Source/Language/AvrAssembly.js
new file mode 100644
index 0000000..8bb7118
--- /dev/null
+++ b/EnlighterJS/Source/Language/AvrAssembly.js
@@ -0,0 +1,89 @@
+/*
+---
+description: ATMEL AVR Assembly Language
+
+license: MIT-style
+
+authors:
+  - Andi Dittrich
+
+requires:
+  - Core/1.4.5
+
+provides: [EnlighterJS.Language.avrasm]
+...
+*/
+EJS.Language.avrasm = new Class({
+	Extends : EJS.Language.generic,
+
+	setupLanguage: function(){
+
+		this.patterns = {
+			'singleLineComments': {
+				pattern: /(;.*)$/gm,
+				alias: 'co1'
+			},
+
+            // available directives: BYTE,CSEG,DB,DEF,DEVICE,DSEG,DW,ENDMACRO,EQU,ESEG,EXIT,INCLUDE,LIST,LISTMAC,MACRO,NOLIST,ORG,SET
+			'directives': {
+				pattern: /^\s*?\.(\w+)\s+/gm,
+				alias: 'kw1'
+			},
+
+			'register': {
+				pattern: /\b(r\d{1,2})/gi,
+				alias: 'kw1'
+			},
+
+            'macroparam': {
+                pattern: /(@[0-9])/gi,
+                alias: 'kw4'
+            },
+
+			'label': {
+				pattern: /^\s*?(\w+:)\s*?/gm,
+				alias: 'kw3'
+			},
+
+            'instruction':{
+                pattern: /(^|:)\s*?(\w+)\s+/gm,
+                alias: 'kw3'
+            },
+
+			'strings': {
+	            pattern: this.common.strings,
+	            alias: 'st0'
+	        },
+
+            // Hexadecimal (two notations): 0x0a, $0a, 0xff, $ff
+            'hex': {
+                pattern: /(0x[A-F0-9]+|\$[A-F0-9]+)/gi,
+                alias: 'nu0'
+            },
+
+            // Binary: 0b00001010, 0b11111111
+            'binary': {
+                pattern: /(0b[01]+)/g,
+                alias: 'nu0'
+            },
+
+            // Decimal: \d+
+	        'integer': {
+                pattern: /\b(\d+)/g,
+                alias: 'nu0'
+            },
+
+            // e.g. LOW(), HIGH() ..
+            'functions': {
+                pattern: this.common.functionCalls,
+                alias: 'me0'
+            },
+
+            // io register alias e.g. DDRA, PORTB, TIMSK
+            'ioregister': {
+                pattern: /\b[A-Z]{2,}[0-9]?[0-9]?\b/g,
+                alias: 'kw4'
+            }
+		};
+	}
+});
diff --git a/EnlighterJS/Source/Language/CSharp.js b/EnlighterJS/Source/Language/CSharp.js
new file mode 100644
index 0000000..63cda4f
--- /dev/null
+++ b/EnlighterJS/Source/Language/CSharp.js
@@ -0,0 +1,52 @@
+/*
+---
+description: C# Language
+
+license: MIT-style
+
+authors:
+  - Joshua Maag
+
+requires:
+  - Core/1.4.5
+  
+provides: [EnlighterJS.Language.csharp]
+...
+*/
+EJS.Language.csharp = new Class ({
+    
+    Extends: EJS.Language.generic,
+
+    setupLanguage: function(){
+        this.keywords = {
+            reserved: {
+                csv:   "as, base, break, case, catch, checked, continue, default, do, else, event, explicit, false, finally, fixed, for, foreach, goto, if, implicit, internal, is, lock, namespace, new, null, operator, params, private, protected, public, ref, return, sizeof, stackalloc, switch, this, throw, true, try, typeof, unchecked, using, void, while",
+                alias: 'kw1'
+            },
+            keywords: {
+            	csv:   "abstract, async, class, const, delegate, dynamic, event, extern, in, interface, out, override, readonly, sealed, static, unsafe, virtual, volatile",
+            	alias: 'kw3'
+            },
+            primitives: {
+                csv:   "bool, byte, char, decimal, double, enum, float, int, long, sbyte, short, struct, uint, ulong, ushort, object, string",
+                alias: 'kw2'
+            },
+            internal: {
+            	csv:   "System",
+            	alias: 'kw4'
+            }
+        };
+        
+        this.patterns = {
+            'slashComments': { pattern: this.common.slashComments, alias: 'co1'},
+            'multiComments': { pattern: this.common.multiComments, alias: 'co2'},
+            'chars':         { pattern: this.common.singleQuotedString, alias: 'st0' },
+            'strings':       { pattern: this.common.doubleQuotedString, alias: 'st1' },
+            'numbers':       { pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim, alias: 'nu0' },
+            'brackets':      { pattern: this.common.brackets, alias: 'br0' },
+            'functionCalls': { pattern: this.common.functionCalls, alias: 'me0'},
+			'methodCalls':   { pattern: this.common.methodCalls, alias: 'me1'}
+        };
+        
+    }
+});
diff --git a/EnlighterJS/Source/Language/Cpp.js b/EnlighterJS/Source/Language/Cpp.js
new file mode 100644
index 0000000..5c6b3cd
--- /dev/null
+++ b/EnlighterJS/Source/Language/Cpp.js
@@ -0,0 +1,49 @@
+/*
+---
+description: C/C++ Language
+
+license: MIT-style
+
+authors:
+  - Andi Dittrich
+
+requires:
+  - Core/1.4.5
+
+provides: [EnlighterJS.Language.cpp]
+...
+*/
+EJS.Language.cpp = new Class({
+    
+    Extends: EJS.Language.generic,
+        
+    setupLanguage: function() {
+        this.keywords = {
+            cpp: {
+            	csv: "and,and_eq,asm,auto,bitand,bitor,bool,break,case,catch,char,class,compl,const,const_cast,continue,default,delete,do,double,dynamic_cast,else,enum,explicit,export,extern,false,float,for,friend,goto,if,inline,int,long,mutable,namespace,new,not,not_eq,operator,or,or_eq,private,protected,public,register,reinterpret_cast,return,short,signed,sizeof,static,static_cast,struct,switch,template,this,throw,true,try,typedef,typeid,typename,union,unsigned,using,virtual,void,volatile,wchar_t,while,xor,xor_eq",
+                alias: 'kw1'
+            },
+            cppX11: {
+            	csv: "alignas,alignof,char16_t,char32_t,constexpr,decltype,noexcept,nullptr,static_assert,thread_local",
+                alias: 'kw4'
+            },
+            directives: {
+            	csv: "__LINE__,__FILE__,__DATE__,__TIME__,__cplusplus",
+            	alias: 'kw2'
+            }
+        };
+        
+        this.patterns = {
+            'slashComments': { pattern: this.common.slashComments, alias: 'co1'},
+            'multiComments': { pattern: this.common.multiComments, alias: 'co2'},
+            'chars':         { pattern: this.common.singleQuotedString, alias: 'st0' },
+            'strings':       { pattern: this.common.doubleQuotedString, alias: 'st1' },
+            'annotation':    { pattern: /@[\W\w_][\w\d_]+/gm, alias: 'st1' },
+            'numbers':       { pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim, alias: 'nu0' },
+            'properties':    { pattern: this.common.properties, alias: 'me0' },
+            'brackets':      { pattern: this.common.brackets, alias: 'br0' },
+            'functionCalls': { pattern: this.common.functionCalls, alias: 'de1'},
+            'directives':	 { pattern: /#.*$/gm, alias: 'kw2'}
+        };
+    }
+});
diff --git a/EnlighterJS/Source/Language/Css.js b/EnlighterJS/Source/Language/Css.js
new file mode 100644
index 0000000..3010ede
--- /dev/null
+++ b/EnlighterJS/Source/Language/Css.js
@@ -0,0 +1,40 @@
+/*
+---
+description: CSS (Cascading Style Sheets)
+
+license: MIT-style
+
+authors:
+  - Andi Dittrich
+  - Jose Prado
+
+requires:
+  - Core/1.4.5
+
+provides: [EnlighterJS.Language.css]
+...
+*/
+EnlighterJS.Language.css = new Class({
+    
+    Extends: EnlighterJS.Language.generic,
+        
+    setupLanguage: function() {
+        
+        this.keywords = {
+        };
+        
+        this.patterns = {
+            'comments2':     { pattern: /\/\*![\s\S]*?\*\//gm,                         alias: 'co2'},
+            'comments':      { pattern: this.common.multiComments,                     alias: 'co1'},
+            'strings':       { pattern: this.common.strings,                           alias: 'st0' },
+            'selectors':     { pattern:  /(?:^|}|\/)\s*([^\\/{@]+)\s*\{/gi,            alias: 'kw1' },
+            'directives':    { pattern:  /(@[a-z]+)\s+/gi,                             alias: 'kw2' },
+            'rules':         { pattern: /([\w-]+)\s*:/g,                               alias: 'kw3' },
+            'uri':           { pattern: /url\s*\([^\)]*\)/gi,                          alias: 'kw4' },
+            'units':         { pattern: /\b(\d+[\.\d+-]?\s*(%|[a-z]{1,3})?)/gi,        alias: 'nu0' },
+            'hexColors':     { pattern: /(#[A-F0-9]{3}([A-F0-9]{3})?)\b/gi,            alias: 'nu0' },
+            'brackets':      { pattern: this.common.brackets,                          alias: 'br0'},
+            'symbols':       { pattern: /,|\.|;|:|>/g,                                 alias: 'sy0'}
+        };
+    }
+});
diff --git a/EnlighterJS/Source/Language/Cython.js b/EnlighterJS/Source/Language/Cython.js
new file mode 100644
index 0000000..46e18c0
--- /dev/null
+++ b/EnlighterJS/Source/Language/Cython.js
@@ -0,0 +1,30 @@
+/*
+---
+description: Cython language
+
+license: MIT-style
+
+authors:
+  - Andi Dittrich
+  - Devyn Collier Johnson
+
+requires:
+  - Core/1.4.5
+
+provides: [EnlighterJS.Language.cython]
+...
+*/
+EJS.Language.cython = new Class({
+    
+    Extends: EJS.Language.python,
+    
+    setupLanguage: function() {
+        // run origin language setup
+        this.parent();
+
+        // append cython extension keywords
+        this.keywords.reserved.csv += ', __all__, include, cimport, pyximport, cythonize, cdef, cpdef, ctypedef, property, IF, ELIF, ELSE, DEF';
+        this.keywords.functions.csv += ', __dealloc__, __get__, __init__, fopen';
+        this.keywords.classes.csv += ', PyErr_Fetch, PyErr_Occurred, PyErr_WarnEx, char, double, extern, namespace, public, struct, void, union, unsigned, enum';
+    }
+});
diff --git a/EnlighterJS/Source/Language/Diff.js b/EnlighterJS/Source/Language/Diff.js
new file mode 100644
index 0000000..f0bac65
--- /dev/null
+++ b/EnlighterJS/Source/Language/Diff.js
@@ -0,0 +1,46 @@
+/*
+---
+description: DIFF Highlighting
+
+license: MIT-style
+
+authors:
+  - Andi Dittrich
+
+requires:
+  - Core/1.4.5
+
+provides: [EnlighterJS.Language.diff]
+...
+*/
+EJS.Language.diff = new Class({
+	Extends : EJS.Language.generic,
+
+	setupLanguage: function(){
+		this.keywords = {
+		};
+
+		this.patterns = {
+			
+			'comments' : {
+				pattern : /^((---|\+\+\+) .*)/gm,
+				alias : 'co1'
+			},
+			
+			'stats' : {
+				pattern : /^(@@.*@@\s*)/gm,
+				alias : 'nu0'
+			},
+			
+			'add' : {
+				pattern : /^(\+.*)/gm,
+				alias : 're0'
+			},
+			
+			'del'  : {
+				pattern : /^(-.*)/gm,
+				alias : 'st0'
+			}
+		};
+	}
+});
diff --git a/EnlighterJS/Source/Language/Generic.js b/EnlighterJS/Source/Language/Generic.js
new file mode 100644
index 0000000..25bd1e9
--- /dev/null
+++ b/EnlighterJS/Source/Language/Generic.js
@@ -0,0 +1,184 @@
+/*
+---
+description: Code parsing engine for EnlighterJS
+
+license: MIT-style
+
+authors:
+  - Jose Prado
+  - Andi Dittrich
+
+requires:
+  - Core/1.4.5
+
+provides: [EnlighterJS.Language.generic]
+...
+*/
+EJS.Language.generic = new Class({
+
+	tokenizerType : 'Standard',
+	tokenizer : null,
+	code : null,
+
+	patterns : {},
+	keywords : {},
+
+	delimiters : {
+		start: null,
+		end: null
+	},
+
+
+	// commonly used Regex Patterns
+	common : {
+		// Matches a C style single-line comment.
+		slashComments : /(?:^|[^\\])\/\/.*$/gm,
+
+		// Matches a Perl style single-line comment.
+		poundComments : /#.*$/gm,
+
+		// Matches a C style multi-line comment
+		multiComments : /\/\*[\s\S]*?\*\//gm,
+
+		// Matches a string enclosed by single quotes. Legacy.
+		aposStrings : /'[^'\\]*(?:\\.[^'\\]*)*'/gm,
+
+		// Matches a string enclosed by double quotes. Legacy.
+		quotedStrings : /"[^"\\]*(?:\\.[^"\\]*)*"/gm,
+
+		// Matches a string enclosed by single quotes across multiple lines.
+		multiLineSingleQuotedStrings : /'[^'\\]*(?:\\.[^'\\]*)*'/gm,
+
+		// Matches a string enclosed by double quotes across multiple lines.
+		multiLineDoubleQuotedStrings : /"[^"\\]*(?:\\.[^"\\]*)*"/gm,
+
+		// Matches both.
+		multiLineStrings : /'[^'\\]*(?:\\.[^'\\]*)*'|"[^"\\]*(?:\\.[^"\\]*)*"/gm,
+
+		// Matches a string enclosed by single quotes.
+		singleQuotedString : /'[^'\\\r\n]*(?:\\.[^'\\\r\n]*)*'/gm,
+
+		// Matches a string enclosed by double quotes.
+		doubleQuotedString : /"[^"\\\r\n]*(?:\\.[^"\\\r\n]*)*"/gm,
+
+		// Matches both.
+		strings : /'[^'\\\r\n]*(?:\\.[^'\\\r\n]*)*'|"[^"\\\r\n]*(?:\\.[^"\\\r\n]*)*"/gm,
+
+		// Matches a property: .property style.
+		properties : /\.([\w]+)\s*/gi,
+
+		// Matches a method call: .methodName() style.
+		methodCalls : /\.([\w]+)\s*\(/gm,
+
+		// Matches a function call: functionName() style.
+		functionCalls : /\b([\w]+)\s*\(/gm,
+
+		// Matches any of the common brackets.
+		brackets : /\{|}|\(|\)|\[|]/g,
+
+		// Matches integers, decimals, hexadecimals.
+		numbers : /\b((?:(\d+)?\.)?[0-9]+|0x[0-9A-F]+)\b/gi
+	},
+
+	/**
+	 * Constructor.
+	 * 
+	 * @constructs
+	 * @param {Object}
+	 *            options
+	 */
+	initialize : function(code){
+		// initialize language options
+		this.setupLanguage();
+
+		this.rules = [];
+		this.code = code;
+
+		// create new tokenizer
+		this.tokenizer = new EnlighterJS.Tokenizer[this.tokenizerType]();
+
+		// Add delimiter rules.
+		if (this.delimiters.start){
+            this.rules.push({
+                pattern: this.delimiters.start,
+                alias: 'de1'
+            });
+		}
+
+		if (this.delimiters.end){
+            this.rules.push({
+                pattern: this.delimiters.end,
+                alias: 'de2'
+            });
+		}
+
+		// Set Keyword Rules from this.keywords object.
+		Object.each(this.keywords, function(keywordSet, ruleName){
+			// keyword set contains elements ?
+			if (keywordSet.csv != ''){
+                this.rules.push({
+                    pattern: this.csvToRegExp(keywordSet.csv, keywordSet.mod || "g"),
+                    alias: keywordSet.alias
+                });
+			}
+		}, this);
+
+		// Set Rules from this.patterns object.
+		Object.each(this.patterns, function(regex, ruleName){
+            // add new rule entry
+            this.rules.push(regex);
+		}, this);
+	},
+
+    getRuleByName: function(name){
+        //return this.rulesN[name];
+    },
+	
+	// override this method to setup language params
+	setupLanguage: function(){
+        // generic highlighting
+        this.patterns = {
+            strings: { pattern: this.common.strings, alias: 'st0'},
+            fn : { pattern: this.common.functionCalls, alias: 'kw1'},
+            me : { pattern: this.common.methodCalls, alias: 'kw2'},
+            brackets: { pattern: this.common.brackets, alias: 'br0' },
+            numbers: { pattern: this.common.numbers, alias: 'nu0'},
+            comment0: { pattern: this.common.slashComments, alias: 'co1'},
+            comment1: { pattern: this.common.poundComments, alias: 'co1'},
+            comment3: { pattern: this.common.multiComments, alias: 'co2'},
+        };
+	},
+
+	getTokens : function(){
+		return this.tokenizer.getTokens(this, this.code);
+	},
+
+	getRules : function(){
+		return this.rules;
+	},
+
+	csvToRegExp : function(csv, mod){
+		return new RegExp('\\b(' + csv.replace(/,\s*/g, '|') + ')\\b', mod);
+	},
+
+	delimToRegExp : function(beg, esc, end, mod, suffix){
+		beg = beg.escapeRegExp();
+		if (esc){
+			esc = esc.escapeRegExp();
+		}
+		end = (end) ? end.escapeRegExp() : beg;
+		var pat = (esc) ? beg + "[^" + end + esc + '\\n]*(?:' + esc + '.[^' + end + esc + '\\n]*)*' + end : beg + "[^" + end + '\\n]*' + end;
+
+		return new RegExp(pat + (suffix || ''), mod || '');
+	},
+
+	strictRegExp : function(){
+		var regex = '(';
+		for (var i = 0; i < arguments.length; i++){
+			regex += arguments[i].escapeRegExp();
+			regex += (i < arguments.length - 1) ? '|' : '';
+		}
+		regex += ')';
+		return new RegExp(regex, "gim");
+	}
+});
diff --git a/EnlighterJS/Source/Language/Ini.js b/EnlighterJS/Source/Language/Ini.js
new file mode 100644
index 0000000..766900a
--- /dev/null
+++ b/EnlighterJS/Source/Language/Ini.js
@@ -0,0 +1,58 @@
+/*
+---
+description: Ini/Conf/Property Highlighting
+
+license: MIT-style
+
+authors:
+  - Andi Dittrich
+
+requires:
+  - Core/1.4.5
+
+provides: [EnlighterJS.Language.ini]
+...
+*/
+EJS.Language.ini = new Class({
+	Extends : EJS.Language.generic,
+
+	setupLanguage: function(){
+		this.keywords = {
+		};
+
+		this.patterns = {
+			'singleLineComments': {
+				pattern: /(;.*)$/gm, 
+				alias: 'co1'
+			},
+			
+			'section': {
+				pattern: /^\s*?(\[.*\])\s*?$/gm, 
+				alias: 'kw4'
+			},
+			
+			'directive': {
+				pattern: /^\s*?[a-z0-9\._-]+\s*?=/gim,
+				alias: 'kw1'
+			},
+			
+			'boolean': {
+				pattern: /\b(true|false|on|off|yes|no)\b/gim, 
+				alias: 'kw2'
+			},
+			
+			'strings': {
+				pattern: this.common.doubleQuotedString, 
+				alias: 'st1'
+			},
+            'numbers': { 
+            	pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)[a-z]*?\b/gim, 
+            	alias: 'nu0'
+            },
+            'brackets': {
+            	pattern: this.common.brackets, 
+            	alias: 'br0'
+            }
+		};
+	}
+});
diff --git a/EnlighterJS/Source/Language/Java.js b/EnlighterJS/Source/Language/Java.js
new file mode 100644
index 0000000..73f26c4
--- /dev/null
+++ b/EnlighterJS/Source/Language/Java.js
@@ -0,0 +1,55 @@
+/*
+---
+description: Java language
+
+license: MIT-style
+
+authors:
+  - Italo Maia
+  - Andi Dittrich
+
+requires:
+  - Core/1.4.5
+  
+provides: [EnlighterJS.Language.java]
+...
+*/
+EJS.Language.java = new Class ({
+    
+    Extends: EJS.Language.generic,
+
+    setupLanguage: function(code)
+    {
+        this.keywords = {
+            reserved: {
+                csv:   "continue, for, new, switch, assert, default, goto, synchronized, do, if, this, break, throw, else, throws, case, instanceof, return, transient, catch, try, final, finally, strictfp, volatile, const, native, super, while",
+                alias: 'kw1'
+            },
+            keywords: {
+            	csv:   "abstract, package, private, implements, protected, public, import, extends, interface, static, void, class",
+            	alias: 'kw3'
+            },
+            primitives: {
+                csv:   "byte, short, int, long, float, double, boolean, char, String",
+                alias: 'kw2'
+            },
+            internal: {
+            	csv:   "System",
+            	alias: 'kw4'
+            }
+        },
+        
+        this.patterns = {
+            'slashComments': { pattern: this.common.slashComments, alias: 'co1'},
+            'multiComments': { pattern: this.common.multiComments, alias: 'co2'},
+            'chars':         { pattern: this.common.singleQuotedString, alias: 'st0' },
+            'strings':       { pattern: this.common.doubleQuotedString, alias: 'st1' },
+            'annotation':    { pattern: /@[\W\w_][\w\d_]+/gm, alias: 'st1' },
+            'numbers':       { pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim, alias: 'nu0' },
+            'properties':    { pattern: this.common.properties, alias: 'me0' },
+            'brackets':      { pattern: this.common.brackets, alias: 'br0' },
+            'functionCalls': { pattern: this.common.functionCalls, alias: 'kw1'}
+        };
+        
+    }
+});
diff --git a/EnlighterJS/Source/Language/Javascript.js b/EnlighterJS/Source/Language/Javascript.js
new file mode 100644
index 0000000..05a6689
--- /dev/null
+++ b/EnlighterJS/Source/Language/Javascript.js
@@ -0,0 +1,78 @@
+/*
+---
+description: JavaScript language
+
+license: MIT-style
+
+authors:
+  - Jose Prado
+
+requires:
+  - Core/1.4.5
+
+provides: [EnlighterJS.Language.javascript]
+...
+*/
+EJS.Language.javascript = new Class({
+    
+    Extends: EJS.Language.generic,
+    
+    setupLanguage: function()
+    {
+        this.keywords = {
+            commonKeywords: {
+                csv: "as, break, case, catch, continue, delete, do, else, eval, finally, for, if, in, is, instanceof, return, switch, this, throw, try, typeof, void, while, write, with",
+                alias: 'kw1'
+            },
+            langKeywords: {
+                csv: "class, const, default, debugger, export, extends, false, function, import, namespace, new, null, package, private, protected, public, super, true, use, var",
+                alias: 'kw2'
+            },
+            windowKeywords: {
+                csv: "alert, confirm, open, print, prompt",
+                alias: 'kw3'
+            }
+        };
+        
+        this.patterns = {
+            'slashComments': {
+                pattern: this.common.slashComments,
+                alias:   'co1'
+            },
+            'multiComments': {
+                pattern: this.common.multiComments,
+                alias:   'co2'
+            },
+            'strings': {
+                pattern: this.common.strings,
+                alias:   'st0'
+            },
+            'methodCalls': {
+                pattern: this.common.properties,
+                alias:   'me0'
+            },
+            'brackets': {
+                pattern: this.common.brackets,
+                alias:   'br0'
+            },
+            'numbers': {
+                pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+)\b/gi,
+                alias:   'nu0'
+            },
+            'regex': {
+                pattern: this.delimToRegExp("/", "\\", "/", "g", "[gimy]*"),
+                alias:   're0'
+            },
+            'symbols': {
+                pattern: /\+|-|\*|\/|%|!|@|&|\||\^|\<|\>|=|,|\.|;|\?|:/g,
+                alias:   'sy0'
+            }
+        };
+        
+        this.delimiters = {
+            start: this.strictRegExp('
+
+    
+    
+
+    
+    
+
+
+
+
+	
+	
+ +
+ +
Start your Theme-Development by editing the file Source/Themes/Template.MyTheme.css - all changes will directly appear into this document without the need of a rebuild!
+ + +

Inline Content

+

+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor + window.addEvent('domready', function(){}); + invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, + not highlighted + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. +

+ +

HTML Content

+
+<!DOCTYPE html>
+<head>
+		<!-- Include EnlighterJS Styles -->
+		<link rel="stylesheet" type="text/css" href="../Build/EnlighterJS.yui.css" />
+		
+		<!-- Include MooTools Framework -->
+		<script type="text/javascript" src="mootools-core-1.4.5-full-nocompat.js"></script>
+		
+		<!-- Include EnlighterJS -->
+		<script type="text/javascript" src="../Build/EnlighterJS.yui.js" ></script>
+		
+		<!-- Initialize EnlighterJS --> 
+		<script type="text/javascript">
+		window.addEvent('domready', function() {
+			// highlight all pre tags
+			$$('pre').light({
+				altLines : 'hover',
+				indent : 2,
+				editable: false
+			});
+		});
+		</script>
+
+<!-- Syntax highlight using Languages/Js.js and default theme --> 
+<pre data-enlighter-language="css">var myClass = new Class({})</pre> 
+ 
+<!-- Syntax highlight using Languages/Php.js and theme from Themes/Twilight.css --> 
+<pre data-enlighter-language="php" data-enlighter-theme="twilight"><?php php_info() ?></pre>
+
+
+ + +

JS Content

+
+window.addEvent('domready', function(){
+	// metadata config available ? -> autoinit
+	var m = document.getElement('meta[name="EnlighterJS"]');
+	
+	// check instance
+	if (!m){
+		return;
+	}
+	
+	// create new options object
+	var options = {
+		language: m.get('data-language') || 'generic',
+		theme: m.get('data-theme') || 'Enlighter',
+		indent: m.get('data-indent').toInt() || -1,
+		hover: m.get('data-hover') || 'hoverEnabled'
+	};
+		
+	// selector available ? if not, match all pre-tags
+	var blockSelector = m.get('data-selector-block') || 'pre';
+	
+	// selector available ? if not, match all code-tags
+	var inlineSelector = m.get('data-selector-inline') || 'code';
+});
+	
+ +
+
+
+// create output container element
+var container = new Element(this.options.containerTag);
+
+// set class and id attributes.
+container.addClass(theme + 'EnlighterJS');		
+container.addClass('EnlighterJSRendered');		
+container.set('id', 'EnlighterJS_' + String.uniqueID());
+
+// generate output based on ordered list of tokens
+language.getTokens().each(function(token, index){
+	// get classname
+	var className = 		 		   token.type ? (language.aliases[token.type] || token.type) : '';
+	
+	
+	
+	
+	// create new inline element which contains the token - htmlspecialchars get escaped by mootools setText !
+	container.grab(new Element('span', {
+		'class': className,
+		'text': token.text
+	}));
+});
+
+return container;
+	
+
+// set class and id attributes.
+container.addClass(theme + 'EnlighterJS');		
+container.addClass('EnlighterJSRendered');		
+container.set('id', 'EnlighterJS_' + String.uniqueID());
+
+

No-Highlight

+
+// create output container element
+var container = new Element(this.options.containerTag);
+
+// set class and id attributes.
+container.addClass(theme + 'EnlighterJS');		
+container.addClass('EnlighterJSRendered');		
+container.set('id', 'EnlighterJS_' + String.uniqueID());
+
+ + + +
+ + + +
+ + + \ No newline at end of file diff --git a/EnlighterJS/Util/ExampleGenerator.php b/EnlighterJS/Util/ExampleGenerator.php new file mode 100644 index 0000000..7120409 --- /dev/null +++ b/EnlighterJS/Util/ExampleGenerator.php @@ -0,0 +1,47 @@ +'; + +// === Basic Examples ================================================= +renderTemplate($outputDir.'Example1.html', array( + 'page' => 'Resources/ExampleData/Example1.phtml', + 'pageTitle' => 'Basic EnlighterJS Example', + 'header' => $metainit +)); +renderTemplate($outputDir.'Example2-jsinit.html', array( + 'page' => 'Resources/ExampleData/Example2-jsinit.phtml', + 'pageTitle' => 'Javascript Initialization Example', + 'header' => '' +)); +renderTemplate($outputDir.'Example3-advanced.html', array( + 'page' => 'Resources/ExampleData/Example3-advanced.phtml', + 'pageTitle' => 'Advanced Javascript Example', + 'header' => '' +)); + +/** + * Renders the template file and return HTML + * @param Array $vars + */ +function renderTemplate($destination, $vars = array()){ + file_put_contents($destination, captureTemplate('Resources/ExampleTemplate.phtml', $vars)); +} \ No newline at end of file diff --git a/EnlighterJS/Util/PageGenerator.php b/EnlighterJS/Util/PageGenerator.php new file mode 100644 index 0000000..6ddeda7 --- /dev/null +++ b/EnlighterJS/Util/PageGenerator.php @@ -0,0 +1,78 @@ +=3 ? $argv[2] : 'unknown')); +define('EJS_PACKAGE_ZIP', 'https://github.com/AndiDittrich/EnlighterJS/archive/v' . EJS_VERSION.'.zip'); +define('EJS_PACKAGE_TGZ', 'https://github.com/AndiDittrich/EnlighterJS/archive/v' . EJS_VERSION.'.tar.gz'); + +require('global.php'); + +// === GETTING STARTED ============================================================ +renderTemplate($outputDir.'index.html', array( + 'PAGE' => 'Resources/Pages/GettingStarted.phtml', + 'title' => 'EnlighterJS', + 'subtitle' => 'An OpenSource Syntax Highlighter', +)); + +// === Changelog ============================================================ +renderTemplate($outputDir.'Changelog.html', array( + 'PAGE' => 'Resources/Pages/Changelog.phtml', + 'title' => 'Changelog', + 'subtitle' => 'The History of EnlighterJS', +)); + + +// === Documentation ============================================================ +renderTemplate($outputDir.'Documentation.html', array( + 'PAGE' => 'Resources/Pages/Documentation.phtml', + 'title' => 'Documentation', + 'subtitle' => 'Feature Reference', +)); + +// === Languages ============================================================ +foreach ($languageExamples as $currentLanguage) { + renderTemplate($outputDir . 'Language.'.$currentLanguage.'.html', array( + 'PAGE' => 'Resources/Pages/Languages.phtml', + 'title' => 'Languages', + 'subtitle' => 'Build-In Support', + 'currentLanguage' => $currentLanguage, + 'languageExamples' => $languageExamples, + 'themes' => $themes + )); +} + +// === Themes ============================================================ +foreach ($themes as $theme) { + renderTemplate($outputDir . 'Theme.'.$theme.'.html', array( + 'PAGE' => 'Resources/Pages/Themes.phtml', + 'title' => 'Themes', + 'subtitle' => 'Enlighter`s Appearance', + 'theme' => $theme, + 'themes' => $themes + )); +} + +// === Builder ============================================================ +renderTemplate($outputDir.'Builder.html', array( + 'PAGE' => 'Resources/Pages/Builder.phtml', + 'title' => 'Builder', + 'subtitle' => 'Customized EnlighterJS Packages', + 'languages' => $languageDescriptions +)); + +// === Plugins ============================================================ +renderTemplate($outputDir.'Plugins.html', array( + 'PAGE' => 'Resources/Pages/Plugins.phtml', + 'title' => 'Plugins', + 'subtitle' => 'Extend, Integrate' +)); + +function renderTemplate($destination, $vars = array()){ + file_put_contents($destination, captureTemplate('Resources/Web.phtml', $vars)); +} diff --git a/EnlighterJS/Util/cli.php b/EnlighterJS/Util/cli.php new file mode 100644 index 0000000..10d882f --- /dev/null +++ b/EnlighterJS/Util/cli.php @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + + + + +
${cpnotice}
+ +
+ + + + + + + +
+
\ No newline at end of file diff --git a/EnlighterJS/Util/global.php b/EnlighterJS/Util/global.php new file mode 100644 index 0000000..b630680 --- /dev/null +++ b/EnlighterJS/Util/global.php @@ -0,0 +1,79 @@ +js = explode(' ', file_get_contents('.tmp/js.txt')); +$sources->css = explode(' ', file_get_contents('.tmp/css.txt')); + +// Theme name List +$themes = explode(' ', file_get_contents('.tmp/themes.txt')); + +// Language Example List +$languageExamples = array( + 'C', 'Cpp', 'CSharp', 'CSS', 'Cython', 'Diff', 'HTML', 'Java', 'Javascript', 'JSON', 'MarkDown', 'NSIS', 'PHP', 'Python', 'Ruby', 'SQL', + 'Unit', 'XML', 'RAW', 'NoHighlight', 'AVR-Assembly', 'Ini', 'Rust', 'Shell', 'VHDL', 'Matlab', 'Generic', 'Squirrel', 'LUA', 'Assembly' +); +asort($languageExamples); + +// all languages +$languageList = explode(' ', file_get_contents('.tmp/languages.txt')); +$languageDescriptions = array(); +foreach ($languageList as $l){ + // get file content + $f = file_get_contents('Source/Language/'.$l.'.js'); + + // extract description from header + preg_match('/^\s*description\:(.*)$/mi', $f, $matches); + + if (count($matches) == 2){ + $languageDescriptions[$l] = trim($matches[1]); + } +} + + +/** + * @param $file + * @param array $vars + * @return string + */ +function captureTemplate($file, $vars = array()){ + // exapand vars to local variables + extract($vars); + + // start capturing + ob_start(); + + // load local template file + require($file); + + // store captured content + $_generatedContent = ob_get_clean(); + return $_generatedContent; +} + +/** + * Render a Markdown Document using LightUp with Promethium CloudAPI + * @param unknown $content + */ +function renderMarkdownDocument($filename){ + $content = file_get_contents($filename); + + $postdata = http_build_query(array( + 'mddata' => $content, + 'highlightingMode' => 'enlighterjs', + 'addAnchors' => 'false' + )); + $opts = array( + 'http' => array ( + 'method' => 'POST', + 'header' => 'Content-type: application/x-www-form-urlencoded', + 'content' => $postdata + ) + ); + $htmlContent = file_get_contents('http://promethium.andidittrich.de/lightup/', false, stream_context_create($opts)); + + // remove first heading1 + return preg_replace('/

.*<\/h1>/', '', $htmlContent, 1); +} \ No newline at end of file diff --git a/EnlighterJS/Util/js-concat-compress.xml b/EnlighterJS/Util/js-concat-compress.xml new file mode 100644 index 0000000..a4efb5b --- /dev/null +++ b/EnlighterJS/Util/js-concat-compress.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/EnlighterJS/bower.json b/EnlighterJS/bower.json new file mode 100644 index 0000000..f8d2b4a --- /dev/null +++ b/EnlighterJS/bower.json @@ -0,0 +1,52 @@ +{ + "name": "enlighterjs", + "homepage": "http://enlighterjs.org", + "authors": [ + "Andi Dittrich " + ], + "description": "MooTools based Syntax Highlighter", + "main": [ + "Build/EnlighterJS.js", + "Build/EnlighterJS.css" + ], + "moduleType": [ + "globals" + ], + "keywords": [ + "c++", + "code", + "coding", + "cpp", + "css", + "customizable", + "html", + "java", + "javascript", + "mootools", + "php", + "Python", + "Ruby", + "shell", + "sourcecode", + "sql", + "syntax", + "highlighting", + "themes", + "visual", + "editor", + "xml" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "Util", + "Docs" + ], + "devDependencies": { + }, + + "dependencies": { + } +} diff --git a/EnlighterJS/build.xml b/EnlighterJS/build.xml new file mode 100644 index 0000000..89057fd --- /dev/null +++ b/EnlighterJS/build.xml @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/EnlighterJS/package.json b/EnlighterJS/package.json new file mode 100644 index 0000000..702ce39 --- /dev/null +++ b/EnlighterJS/package.json @@ -0,0 +1,55 @@ +{ + "name": "enlighterjs", + "description": "MooTools based Syntax Highlighter", + "version": "v2.10.0", + "homepage": "http://enlighterjs.org", + "author": { + "name": "Andi Dittrich", + "email": "opensource _AT andidittrich D-O-T de" + }, + "browser": "./Build/EnlighterJS.js", + "files": [ + "./Build/EnlighterJS.js", + "./Build/EnlighterJS.css" + ], + "keywords": [ + "c++", + "code", + "coding", + "cpp", + "css", + "customizable", + "html", + "java", + "javascript", + "mootools", + "php", + "Python", + "Ruby", + "shell", + "sourcecode", + "sql", + "syntax", + "highlighting", + "themes", + "visual", + "editor", + "xml" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/AndiDittrich/EnlighterJS/issues" + }, + "devDependencies": { + "clean-css": "~3.3.1", + "uglify-js": "~2.4.23", + "bootstrap": "~3.3.4", + "less-plugin-autoprefix": "~1.4.2", + "less": "~2.5.1" + }, + "repository": { + "type": "git", + "url": "https://github.com/AndiDittrich/EnlighterJS.git" + }, + "readmeFilename": "README.md" +} diff --git a/EnlighterJS/package.yml b/EnlighterJS/package.yml new file mode 100644 index 0000000..116f05b --- /dev/null +++ b/EnlighterJS/package.yml @@ -0,0 +1,8 @@ +# Forge +name: EnlighterJS +author: andidittrich +category: Interface +tags: [parser, syntax highlighter] +demo: http://enlighterjs.org/Themes.html +docs: http://enlighterjs.org +current: v2.10.0 \ No newline at end of file diff --git a/EnlighterJS/screenshot1.png b/EnlighterJS/screenshot1.png new file mode 100644 index 0000000..b653668 Binary files /dev/null and b/EnlighterJS/screenshot1.png differ diff --git a/EnlighterJS/screenshot2.png b/EnlighterJS/screenshot2.png new file mode 100644 index 0000000..31aec48 Binary files /dev/null and b/EnlighterJS/screenshot2.png differ diff --git a/all.php b/all.php new file mode 100644 index 0000000..b389dd9 --- /dev/null +++ b/all.php @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + achilletoupin.com - TPE + + + + + + + + + + + +
+ +
+ +

Notice - Introduction

+ + +

Théorie basique du son : l'onde sonore

+ + +

La chauve-souris

+ + +

Expérience 1 : les ultrasons

+ + +

Expérience 2 : le robot

+ + +

Conclusion

+ + +

Sources

+ + + + + +
+ + + +
+ + + + + + + + \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..b3c250f --- /dev/null +++ b/index.php @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + achilletoupin.com - TPE + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/index/documents/scenario.docx b/index/documents/scenario.docx new file mode 100644 index 0000000..b34369b Binary files /dev/null and b/index/documents/scenario.docx differ diff --git a/index/images/FreqEmission.png b/index/images/FreqEmission.png new file mode 100644 index 0000000..e96569a Binary files /dev/null and b/index/images/FreqEmission.png differ diff --git a/index/images/HC-SR04.png b/index/images/HC-SR04.png new file mode 100644 index 0000000..946838e Binary files /dev/null and b/index/images/HC-SR04.png differ diff --git a/index/images/arrow-right.png b/index/images/arrow-right.png new file mode 100644 index 0000000..28ff9e2 Binary files /dev/null and b/index/images/arrow-right.png differ diff --git a/index/images/bannerTpe.png b/index/images/bannerTpe.png new file mode 100644 index 0000000..6bfd94d Binary files /dev/null and b/index/images/bannerTpe.png differ diff --git a/index/images/favicon.gif b/index/images/favicon.gif new file mode 100644 index 0000000..a4a3a20 Binary files /dev/null and b/index/images/favicon.gif differ diff --git a/index/images/fleche_orange.png b/index/images/fleche_orange.png new file mode 100644 index 0000000..9c1fa09 Binary files /dev/null and b/index/images/fleche_orange.png differ diff --git a/index/images/fleche_orange_bas.png b/index/images/fleche_orange_bas.png new file mode 100644 index 0000000..e79b9ef Binary files /dev/null and b/index/images/fleche_orange_bas.png differ diff --git a/index/images/imgEx1/2015-11-19 16.30.01.jpg b/index/images/imgEx1/2015-11-19 16.30.01.jpg new file mode 100644 index 0000000..89faee7 Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.30.01.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.30.03.jpg b/index/images/imgEx1/2015-11-19 16.30.03.jpg new file mode 100644 index 0000000..32955e4 Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.30.03.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.30.11.jpg b/index/images/imgEx1/2015-11-19 16.30.11.jpg new file mode 100644 index 0000000..3274ca4 Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.30.11.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.30.51.jpg b/index/images/imgEx1/2015-11-19 16.30.51.jpg new file mode 100644 index 0000000..75412c2 Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.30.51.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.30.54.jpg b/index/images/imgEx1/2015-11-19 16.30.54.jpg new file mode 100644 index 0000000..e295216 Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.30.54.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.31.16-1.jpg b/index/images/imgEx1/2015-11-19 16.31.16-1.jpg new file mode 100644 index 0000000..d553a06 Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.31.16-1.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.31.16-2.jpg b/index/images/imgEx1/2015-11-19 16.31.16-2.jpg new file mode 100644 index 0000000..87bd3fd Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.31.16-2.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.33.41.jpg b/index/images/imgEx1/2015-11-19 16.33.41.jpg new file mode 100644 index 0000000..194703e Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.33.41.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.33.46.jpg b/index/images/imgEx1/2015-11-19 16.33.46.jpg new file mode 100644 index 0000000..b6e2b2e Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.33.46.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.33.54.jpg b/index/images/imgEx1/2015-11-19 16.33.54.jpg new file mode 100644 index 0000000..a133596 Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.33.54.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.36.12.jpg b/index/images/imgEx1/2015-11-19 16.36.12.jpg new file mode 100644 index 0000000..31ff48e Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.36.12.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.36.16.jpg b/index/images/imgEx1/2015-11-19 16.36.16.jpg new file mode 100644 index 0000000..1e1d491 Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.36.16.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.36.18.jpg b/index/images/imgEx1/2015-11-19 16.36.18.jpg new file mode 100644 index 0000000..10788c9 Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.36.18.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.36.21.jpg b/index/images/imgEx1/2015-11-19 16.36.21.jpg new file mode 100644 index 0000000..2448083 Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.36.21.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.36.30.jpg b/index/images/imgEx1/2015-11-19 16.36.30.jpg new file mode 100644 index 0000000..bd81481 Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.36.30.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.37.59.jpg b/index/images/imgEx1/2015-11-19 16.37.59.jpg new file mode 100644 index 0000000..ee558f1 Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.37.59.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.38.12.jpg b/index/images/imgEx1/2015-11-19 16.38.12.jpg new file mode 100644 index 0000000..9981190 Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.38.12.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.38.18.jpg b/index/images/imgEx1/2015-11-19 16.38.18.jpg new file mode 100644 index 0000000..07088ae Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.38.18.jpg differ diff --git a/index/images/imgEx1/2015-11-19 16.47.34.jpg b/index/images/imgEx1/2015-11-19 16.47.34.jpg new file mode 100644 index 0000000..402ceda Binary files /dev/null and b/index/images/imgEx1/2015-11-19 16.47.34.jpg differ diff --git a/index/images/imgEx2/2016-02-04_06.56.14.jpg b/index/images/imgEx2/2016-02-04_06.56.14.jpg new file mode 100644 index 0000000..116b24a Binary files /dev/null and b/index/images/imgEx2/2016-02-04_06.56.14.jpg differ diff --git a/index/images/imgEx2/2016-02-04_06.56.20.jpg b/index/images/imgEx2/2016-02-04_06.56.20.jpg new file mode 100644 index 0000000..3f8eb13 Binary files /dev/null and b/index/images/imgEx2/2016-02-04_06.56.20.jpg differ diff --git a/index/images/imgEx2/2016-02-04_06.56.37.jpg b/index/images/imgEx2/2016-02-04_06.56.37.jpg new file mode 100644 index 0000000..52c1fa9 Binary files /dev/null and b/index/images/imgEx2/2016-02-04_06.56.37.jpg differ diff --git a/index/images/imgEx2/2016-02-04_06.56.45.jpg b/index/images/imgEx2/2016-02-04_06.56.45.jpg new file mode 100644 index 0000000..3f34bfb Binary files /dev/null and b/index/images/imgEx2/2016-02-04_06.56.45.jpg differ diff --git a/index/images/imgEx2/2016-02-04_06.57.55.jpg b/index/images/imgEx2/2016-02-04_06.57.55.jpg new file mode 100644 index 0000000..0696af4 Binary files /dev/null and b/index/images/imgEx2/2016-02-04_06.57.55.jpg differ diff --git a/index/images/imgEx2/2016-02-04_06.57.59.jpg b/index/images/imgEx2/2016-02-04_06.57.59.jpg new file mode 100644 index 0000000..38136f6 Binary files /dev/null and b/index/images/imgEx2/2016-02-04_06.57.59.jpg differ diff --git a/index/images/imgEx2/2016-02-04_06.58.03.jpg b/index/images/imgEx2/2016-02-04_06.58.03.jpg new file mode 100644 index 0000000..dd1e1fc Binary files /dev/null and b/index/images/imgEx2/2016-02-04_06.58.03.jpg differ diff --git a/index/images/imgEx2/robotHC-SR04.gif b/index/images/imgEx2/robotHC-SR04.gif new file mode 100644 index 0000000..f71e04e Binary files /dev/null and b/index/images/imgEx2/robotHC-SR04.gif differ diff --git a/index/images/list.png b/index/images/list.png new file mode 100644 index 0000000..694c7dd Binary files /dev/null and b/index/images/list.png differ diff --git a/index/images/oreilleInterne.jpg b/index/images/oreilleInterne.jpg new file mode 100644 index 0000000..2390ea5 Binary files /dev/null and b/index/images/oreilleInterne.jpg differ diff --git a/index/includes/aside.php b/index/includes/aside.php new file mode 100644 index 0000000..fde6f63 --- /dev/null +++ b/index/includes/aside.php @@ -0,0 +1,25 @@ + \ No newline at end of file diff --git a/index/includes/c-s.php b/index/includes/c-s.php new file mode 100644 index 0000000..974f0ce --- /dev/null +++ b/index/includes/c-s.php @@ -0,0 +1,49 @@ +
+

Quelques bases sur la chauve-souris

+ +

Pendant des siècles, on s’est interrogé sur la façon dont elles sont capables de s’orienter dans le noir : est-ce grâce à une vision exceptionnelle ou à un sens totalement différent ? Le premier à tenter de résoudre ce mystère est un abbé italien de la fin du 18ème siècle : Lazzaro Spallanzani.

+ +
Lazzaro Spallanzani +
+

Lazzaro Spallanzani, biologiste italien du XVIIIè siècle

+
+
+ +

Fonction des ultrasons

+ +

Dans beaucoup de cas, l’utilisation de hautes fréquences confère un considérable avantage pour la communication et encore plus dans l’écholocation. Les chauves-souris sont capables d’exploiter les principes de la physique, en ayant recours par exemple à l’effet Doppler, et subissent les mêmes contraintes naturelles que les systèmes sonars fabriqués par l’homme.

+ +

Emission

+ +

Expliquons tout d’abord très rapidement le principe de l’écholocation. La chauve-souris émet un ultrason par ses cordes vocales et qui sort par la bouche ou le nez. Dès que cet ultrason rencontre un obstacle (proie, végétation...), il rebondit vers la chauve-souris. Celle-ci capte l’écho grâce à ses oreilles, son cerveau va alors calculer la distance, la vitesse, la position et la forme de l’objet détecté. Tout cela a lieu en une fraction de seconde. Il arrive que les chauves-souris émettent des cris audibles par l'homme, il ne s'agit alors évidemment pas d'ultra-sons, mais de cris que l'on qualifie de «cris sociaux», c'est-à-dire des cris qui sont utilisés par les chauves-souris pour communiquer entre elles (territorialité, agressivité, parade nuptiale, cri d'appel d'un jeune à sa mère, ...)

+ +

Toutes les chauves souris n'émettent pas des ultrasons de la même manière. Le type de cri varie en fonction des espèces et de la situation. Par exemple, en chasse, la chauve-souris émet plus fréquemment afin de pouvoir suivre sa proie avec précision, d'estimer sa taille et sa vitesse. Certaines chauve-souris émettent dans les fréquences audibles pour l'homme.

+ +
Emission espèces +
+

Diagramme des fréquences d'émission des chauves-souris pour différentes espèces

+
+
+ +

Réception et traitement des Informations

+ +

Les oreilles des chauves-souris sont adaptées à leur mode d’audition particulier. Comme chez la plupart des mammifères, la cochlée contient une membrane qui va propager les vibrations engendrées par l’arrivée d’ondes sonores sur le tympan. Ces vibrations vont stimuler les cellules ciliées de cette membrane qui vont à leur tour activer les cellules du ganglion spiral, le nerf auditif et enfin le cortex auditif. La fréquence de décharge dans les fibres du nerf auditif est proportionnelle à l’amplitude du son, c’est-à-dire que plus l’écho est intense, plus cette fréquence de décharge va être élevée. La durée des échos et les intervalles entre ceux-ci sont décryptés par le cerveau par la manière dont se succèdent les signaux nerveux qu’il reçoit. La fréquence des échos, enfin, est codée par les cellules de la membrane basilaire contenue dans la cochlée : la cochlée contient un  liquide qui stimule les cellules basilaires au rythme des vibrations.

+ +
+
+

L'oreille interne de la chauve-souris

+
+
+ +

Pourquoi plusieurs animaux utilisent des ultrasons plutôt que des sons «ordinaires» comme la majorité des animaux ?

+ +
    +
  • Hypothèse 1 : La première réponse possible conteste la question en pointant le fait qu’elle n’est due qu’à une vision anthropocentrique. L’audition humaine normale débute vers 2 kHz pour décliner progressivement dans les hautes fréquences jusqu’à 20 kHz. Le spectre audible des autres mammifères, quant à lui, a généralement la même dispersion mais pour des fréquences supérieures. Le spectre audible maximum des chauves-souris s’étend d’environ 20 kHz à 120 kHz. Il n’est donc pas surprenant que certains mammifères utilisent des ultrasons.
  • +
  • Hypothèse 2 : Pourquoi utiliser les sons "ordinaires" ? Pour les petits animaux, en effet, les ultrasons sont faciles à produire, à transmettre et à recevoir. Ce sont les basses fréquences qui sont difficiles à produire pour eux, principalement parce qu’elles nécessitent des structures corporelles importantes (le son le plus grave enregistré dans le monde animal est produit par la baleine).
  • +
  • Hypothèse 3 : Les propriétés des ultrasons donnent aux animaux qui les utilisent plusieurs avantages exploitables. La seule différence réelle entre les ultrasons et les sons «normaux» est que l’air absorbe plus les hautes fréquences, d’ailleurs, cet effet est amplifié au-delà de 20 kHz et dépend aussi du taux d’humidité du milieu.
  • +
+ +

Perturbations liées à l'environnement

+ +

Le milieu peut être ouvert (prairies...), dans ce cas, les chauves-souris chassent des insectes en vol sans être gênées par les échos de la végétation. Elles peuvent aussi chasser en lisière de la végétation, se nourrissant d’insectes en vol, ou à la surface de l’eau (qui agit comme un miroir pour l’écho si l’eau est calme), mangeant des poissons. Enfin, le milieu peut être dense, avec beaucoup de végétation. Dans ce dernier milieu, on distingue deux stratégies de chasse différentes adoptées par les chauves-souris : certaines vont attraper la nourriture sur une surface (au sol, sur une branche...), d’autres détectent les battements d’ailes des insectes et les capturent en vol. Mais beaucoup de chauves-souris ne chassent pas que dans un seul type d’habitat. On observe tout de même qu’elles vont plutôt vers des habitats présentant moins de perturbations que celui dont elles viennent. Les cris d’écholocation sont différents selon le type d’habitat, pour s’adapter aux différents problèmes à résoudre comme l’écho de la végétation perturbant celui de la proie.

+
diff --git a/index/includes/ccln.php b/index/includes/ccln.php new file mode 100644 index 0000000..7158471 --- /dev/null +++ b/index/includes/ccln.php @@ -0,0 +1,9 @@ +
+ +

Conclusion

+ +

Nous pouvons donc désormais affirmer qu’il est théoriquement possible de se déplacer uniquement à l’aide du son, et que certains animaux comme par exemple la chauve-souris peuvent l’effectuer.

+ +

A l’issue de ce TPE, nous présenterons un robot évitant les obstacles se déplaçant à l’aide du même phénomène : l’écholocation.

+ +
\ No newline at end of file diff --git a/index/includes/ex1.php b/index/includes/ex1.php new file mode 100644 index 0000000..6a1b7f4 --- /dev/null +++ b/index/includes/ex1.php @@ -0,0 +1,115 @@ +
+

Peut-on mesurer la distance grâce au son ?

+ +

Liste de matériel 1 :

+ +
    +
  • 1 oscilloscope
  • +
  • 1 générateur TBF
  • +
  • 1 émetteur d'ultrasons
  • +
  • 1 récepteur d'ultrasons
  • +
  • 1 règle d'1m
  • +
+ +

Protocole 1 : Vérifier le bon fonctionnement du montage

+ +

Le temps à trouver est 0,001s = 1ms

+ +
    +
  1. Placer l'émetteur et le récepteur à une distance de 34cm l'un de l'autre à l'aide de la règle.
  2. +
  3. Relier ces deux éléments à un oscilloscope.
  4. +
  5. Actionner l'émetteur grâce à un générateur TBF qui lui sera relié et réglé sur "discontinu"
  6. +
  7. Calibrer d'oscilloscope afin de voir au moins 2 émissions d'ultrasons
  8. +
  9. Grâce à l'oscilloscope, mesurer le temps écoulé entre l'émission et la réception du signal
  10. +
  11. Vérifier l'équation suivante :
  12. +
+ +

d = v / t
+t = d / v
+t = 0,34 / 340 //Avec t le temps mesuré.

+ +

Liste de matériel 2 : voir n°1

+ +

Protocole 2 : Trouver la distance grâce au son (un écho)

+ +
    +
  1. Placer l'émetteur et le récepteur à une distance inconnue mais <1m l'un de l'autre
  2. +
  3. Relier ces deux éléments à un oscilloscope.
  4. +
  5. Actionner l'émetteur grâce à un générateur TBF qui lui sera relié et réglé sur "discontinu"
  6. +
  7. Calibrer d'oscilloscope afin de voir au moins 2 émissions d'ultrasons
  8. +
  9. Grâce à l'oscilloscope, mesurer le temps écoulé entre l'émission et la réception du signal
  10. +
  11. Vérifier l'équation suivante :
  12. +
+ +

d = ( v * t ) / 2 // divisé par 2 car l'onde sonore fait un aller-retour
+d = ( 340m/s * t ) / 2 // avec t le temps mesuré.
+Vérifier le résultat avec la règle.

+ +

Peut-on utiliser les ultrasons pour calculer une distance avec précision (+- 1cm) ?

+ +

Compte rendu de l'éxperience n°1 :

+ +

Protocole 1 :

+ +
+
+

Montage du protocole 1, avec les émetteur et récepteur à 34cm l'un de l'autre

+
+
+ +

L'émetteur et le récepteur sont à une distance de 34cm l'un de l'autre. Ces deux éléments sont reliés à un oscilloscope. Actionner l'émetteur grâce à un générateur TBF qui lui sera relié et réglé sur "discontinu". L'oscilloscope est calibré afin de voir au moins 2 émissions d'ultrasons. Le temps mesuré entre l'émission et la réception du signal est de 1ms (voir figure suivante)

+

Le temps à trouver étant de 0,001s = 1ms, l'éxperience est un succès.

+ +
+
+

Oscilloscope affichant le temps entre l'émission et la réception pour une distance de 34cm

+
+
+ +

Protocole 2 : Mesurer une distance avec un écho

+ +

L'émetteur et le récepteur sont à une distance inconnue mais <1m l'un de l'autre, et reliés à un oscilloscope. Calibrer d'oscilloscope afin de voir au moins 2 émissions d'ultrasons. Le temps écoulé entre l'émission et la réception du signal est de 1.520ms (voir figure n°2)

+ +
+
+

Montage du protocole 2 : une paroi rigide est utilisée pour générer un écho.

+
+
+ +

Vérifier l'équation suivante :

+ +

d = ( v * t ) / 2 // divisé par 2 car l'onde sonore fait un aller-retour
+d = ( 340m/s * 0.00152 s ) / 2 // avec t le temps mesuré.
+d = 0.2584 m = 26cm environ

+ +

Ce résultat est vérifié à l'aide d'une règle.

+ +
+
+

Vue de l'écran de l'oscilloscope. Le temps entre l'émission et la réception de l'onde sonore est de 1.520ms.

+
+
+ +

Le résultat est vérifié, l'expérience est donc un succès.

+ +

Conclusion

+ +

Peut-on utiliser les ultrasons pour calculer une distance avec précision (+- 1cm) ?

+ +

D'après les précédents résultats, nous pouvons affirmer pouvoir mesurer une distance sans mètre et automatiquement à l'aide des ultrasons.

+ +

La vitesse du son dans l'air étant constante, le son étant une onde sonore et obéissant donc à certaines lois, il est possible, avec un organisme adapté, de se situer grâce aux ondes sonores (incluant les ultrasons)

+ +

La précision de ce système est de l'ordre du cm, ce qui est suffisant pour nos besoins.

+ +

Concrètement, notre utilisation de cette propriété

+

Nous utilisons cette propriété à travers un module pour carte arduino : le module HC-SR04

+ +
Module HC-SR04 +
+

Module HC-SR04

+Source de l'image
+
+ +

Ce module est un périphérique créé pour fonctionner avec une carte Arduino (voir expérience 2). Il est composé d'un émetteur et d'un récepteur d'ultrasons à 40KHz. Il envoie à la carte arduino le délai entre l'émission et la réception des utltasons qu'ils envoie par rafales. Ainsi cette dernière peut calculer la distance en temps réel, et agir en conséquence.

+
diff --git a/index/includes/ex2-full.php b/index/includes/ex2-full.php new file mode 100644 index 0000000..fd50d0c --- /dev/null +++ b/index/includes/ex2-full.php @@ -0,0 +1,376 @@ +
+

Fonctionnement

+ +

Le robot est composé de plusieurs éléments pour modélier la chauve - souris :

+ +
    +
  • Le module à ultrasons et son servo-moteur modélise les cordes vocales et les oreilles de la chauve-souris.
  • +
  • Les moteurs et roues modélisent le moyen de déplacement de la chauve-souris.
  • +
  • La carte arduino commande tous les éléments, elle modélise le cerveau de la chauve-souris.
  • +
  • Le chassis contient tous les composants.
  • +
+ +

Composants

+ +

Le module à ultrasons

+ +

Le module HC-SR04 permet d’évaluer les distances entre un objet mobile et les obstacles rencontrés. Il émet des ultrasons puis les capte après un écho grâce à ses émetteur et récepteur. Il est conçu pour fonctionner simplement avec une carte arduino.

+ +
Module HC-SR04 +
+

Module HC-SR04

+Source de l'image
+
+ +

Le servo-moteur

+ +

Le servo-moteur est un moteur électrique auquel on a ajouter un système lui permettant d'avoir une grande précision lors de sa rotation. Il permet de contrôler avec précision la direction du module à utrasons. Ainsi, le champ de vision du module est augmenté grâce à un mouvement de balayage.

+ +
Servo-moteur +
+

Servo moteur

+Source
+
+ +

Les moteurs

+ +

La carte arduino

+ +

Une carte Arduino est un circuit imprimé en matériel libre sur lequel se trouve un microcontrôleur. Il permet de traiter les informations collectées par les différents ports d'entrés de la carte, et de réagir en conséquence à travers les ports de sortie. On peut ainsi contrôler certains composants, ainsi qu'une variété de périphériques spécialement conçus pour lui. Il fonctionne grâce à du code du language C qui permet de réaliser des actions spécialement commandées.

+ +
Carte arduino UNO +
+

Carte Arduino UNO

+Source de l'image
+
+ +

Le chassis

+ +

Le chassis a pour fonction de relier tous les composants entre eux et faciliter le montage et la conception du robot. C'est un kit pour robot arduino, mais ne fournit pas de code ou de carte.

+ +
Le chassis +
+

Le chassis

+Source de l'image
+
+ +

Les batteries

+ +

Les batteries ont pour fonction d'alimenter le robot en électricité

+ +
La batterie 1La batterie 2 +
+

Les batteries

+Source de l'image
+
+ +

Construction

+ +

La contruction du robot a été très complexe, mais nous a appris beaucoup à propos de l'électronique,

+ +

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam et tellus et tellus euismod congue. Praesent diam ante, pellentesque lacinia vestibulum eget, iaculis eget est. Nullam justo dui, hendrerit eu nulla nec, aliquam posuere libero. Quisque ut ornare nisi, eu gravida sem. Maecenas et lacus sit amet quam maximus aliquet. Suspendisse sodales sapien sit amet arcu efficitur, vel rutrum mi aliquet. Cras mollis facilisis metus id bibendum. Ut vel diam pulvinar, lobortis diam non, placerat tellus. Morbi lacus velit, egestas id elit sit amet, dapibus accumsan justo. Nulla facilisi. Proin vestibulum neque condimentum urna molestie aliquet. Nunc fermentum suscipit libero, ac maximus diam scelerisque vitae. Integer sed auctor magna. Aliquam erat volutpat.

+ +

Logiciel

+ +

On utilise pour contôler les composants périphériques la carte Arduino. Celle-ci comporte des ports grâce auquels elle communique avec ses périphériques. Les ports n'ont pas tous les mêmes propriétés, c'est pourquoi il faut décider quels port sera responsable de quelle tâche. Faire un plan aide aussi énormément lors du montage électrique du robot : deux fils sont vite échangés, et retrouver une erreur est une tâche difficile qui fait perdre beaucoup de temps. Une carte arduino standart comporte 13 ports qui ne seront utiles.

+ +

Plan des ports Entrée/Sortie

+ +

Ports I/O (= Input/Output, c'est à dire Entrée/Sortie)

+ +

Ports 2, 4, 7, 8 et 13

+ +

Ports I/O capables de MLI (Modulation de la largeur d'impulsion)

+ +

Port 3, 5, 6, 9, 10 et 11

+ +

La Modulation de la largeur d'impulsion (MLI ; en anglais : Pulse Width Modulation, soit PWM) est une technique couramment utilisée pour synthétiser des signaux continus (analogues) à l'aide de circuits à fonctionnement tout ou rien (numériques). Cela permet de contôler de façon analogique (c'est à dire que le signal peut être de plusieurs valeurs d'intensité) avec un contrôleur numérique qui ne peut avoir que deux signaux : allumé ou éteint)

+ +
PWM +
+

Exemple de synthèse d'un signal grâce à la MLI

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Plan des ports utilisés, et leur fonction (Entrée ou sortie)
PortEntrée ou sortieFonction
2EntréeIndication de la position de la roue droite
4EntréeIndication de la position de la roue gauche
7EntréeSignal du module HC-SR04
3SortieContrôle de la vitesse de la roue droite
5SortieContrôle de la vitesse de la roue gauche
8SortieContrôle de la position du servo-moteur
12SortieEnvoi du signal pour le module HC-SR04
+ +

Le code de la carte arduino

+ +

 Il faut programmer la carte avec du code C pour lui dire quoi faire.

+ +

Les différentes actions à réaliser sont listées ci-dessous :

+ +
    +
  • Contôler les moteurs des roues pour se faire déplacer le robot +
      +
    • Tout droit
    • +
    • A gauche
    • +
    • A droite
    • +
    +
  • +
  • Orienter le module à ultrasons dans la direction souhaitée grâce au servo-moteur
  • +
  • Contrôler le module à ultrasons et ainsi connaître la position d'éventuels obstacles
  • +
  • Analyser les données et réagir en conséquence
  • +
+ +

A chaque tâche est dédiée une portion du code, qui est au final compacté en un seul document, envoyé à la carte Arduino.

+ +

Code du module à ultrasons HC-SR04 (source : HowToMechatronics.com) -

+ + + +

Code de contrôle des roues -

+ + + +

Code de contrôle du servo -

+ + + +

Code complet de l'arduino du robot -

+ + +
\ No newline at end of file diff --git a/index/includes/ex2.php b/index/includes/ex2.php new file mode 100644 index 0000000..d1a570b --- /dev/null +++ b/index/includes/ex2.php @@ -0,0 +1,74 @@ +
+

Présentation

+ +

Notre seconde expérience consiste en la fabrication d’un robot simple qui reproduit le moyen de localisation de la chauve-souris.

+ +

Ainsi nous reprenons d’une part ce sens des chauves-souris créé pas la nature et l’illustrons, et d’autre part les principes physiques exploités par cette technique, puisque nous recréons entièrement ce système nous-mêmes.

+ +

Ce robot et cette partie seront le thème majeur de l'oral et y seront donc exposés de manière précise et détaillée. Vous pouvez lire ici le compte rendu simplifié de cette expérience.

+ +

Explication

+ +

Pour simplifier, le robot ne se déplace que sur deux axes : il ne vole pas. C’est un robot qui se déplace au sol grâce à deux roues motorisées indépendantes. Ces deux roues, ainsi que l’intégralité du robot, sont contrôlés par un système autonome : une carte Arduino.

+ +

Une carte Arduino est un outil électronique programmable qui peut contrôler des périphériques.

+ +

Le robot est composé de plusieurs éléments pour modéliser la chauve - souris :

+ +
    +
  • Le module à ultrasons vu dans la partie précédente modélise les cordes vocales et les oreilles de la chauve-souris.
  • +
  • Les moteurs et roues modélisent le moyen de déplacement de la chauve-souris.
  • +
  • La carte Arduino commande tous les éléments, elle modélise le cerveau de la chauve-souris.
  • +
  • Le châssis contient tous les composants.
  • +
+ +

Fonctionnement basique

+ +

Une version simplifiée du fonctionnement du robot serait la suivante : le robot détecte des obstacles contre lesquels il pourrait potentiellement se heurter en mesurant la distance qui l’en sépare grâce à des ultrasons. Il réagit en conséquence et change de direction lorsqu’il détecte un tel objet.

+ +

Illustration

+ +

Voici ci-dessous des images dudit robot :

+ +
+
+

Vue générale du robot

+
+
+ +
+
+

Le module HC-SR04 monté sur le robot

+
+
+ +
+
+

Vue de l'organication générale des composants sur le robot

+
+
+ +
+
+

La carte Arduino UNO

+
+
+ +
+
+

Montage du protocole 1, avec les émetteur et récepteur à 34cm l'un de l'autre

+
+
+ +
+
+

Vue de dessous du robot : la carte de contrôle des moteurs

+
+
+ +
+
+

Démonstration du mouvement du module HC-SR04

+
+
+
diff --git a/index/includes/footer.php b/index/includes/footer.php new file mode 100644 index 0000000..b32c30b --- /dev/null +++ b/index/includes/footer.php @@ -0,0 +1,3 @@ +
+

Webdesign par Achille Toupin

+
\ No newline at end of file diff --git a/index/includes/header.php b/index/includes/header.php new file mode 100644 index 0000000..450db60 --- /dev/null +++ b/index/includes/header.php @@ -0,0 +1,12 @@ +
+ TPE G30 + +
\ No newline at end of file diff --git a/index/includes/headerAll.php b/index/includes/headerAll.php new file mode 100644 index 0000000..3af8d07 --- /dev/null +++ b/index/includes/headerAll.php @@ -0,0 +1,11 @@ +
+ TPE G30 + +
\ No newline at end of file diff --git a/index/includes/intro.php b/index/includes/intro.php new file mode 100644 index 0000000..af8322b --- /dev/null +++ b/index/includes/intro.php @@ -0,0 +1,18 @@ +
+ +

Le thème de notre TPE est celui de l’écholocalisation, ou écholocation. Nous avons, pour mêler SVT et physique, décidé d’étudier le comportement d’un animal en particulier : la chauve-souris.

+ +

Nous avons décidé d’aborder dès la première séance le thème du son, puis nous avons réfléchi à un lien avec l’autre discipline imposée : les SVT. Nous avons rétréci le champ de possibilité en se limitant à l’écholocation. Nous avons ensuite cherché une manière pertinente de formuler la problématique en fonction des thèmes que nous souhaitions aborder.

+ +

Nous avons abouti à la problématique suivante : Comment la chauve-souris se localise-t-elle grâce aux ultrasons ?

+ +

Il est bien connu que la chauve-souris peut se déplacer dans le noir, et qu'elle n’utilise pas seulement ses yeux pour se repérer mais aussi des ultrasons. Cependant, la manière exacte dont elle s’y prend reste peu connue et assez évoluée, c’est pour cela que nous allons vous expliquer comment cet animal intéressant s’y prend.

+ +

Ainsi nous commencerons par étudier le son, élément essentiel de son mode de déplacement, puis comment le chiroptère l’utilise à son avantage. Nous l'illustrerons par une expérience réalisée en laboratoire et une maquette fonctionnelle : un robot.

+ +

Le TPE est rendu sous forme de site internet. Le support nous a paru intéressant car accessible par tous, et permettant de présenter  différentes formes d’information : du simple texte aux tableaux complexes, en passant par les images et les animations. Il a été entièrement créé par Achille, qui l'a codé, a créé son style de mise en page et l'a téléchargé sur son site.

+ +

Achille s’est chargé de la partie physique, tandis qu’Antoine a réalisé celle sur la chauve-souris. Thomas s’est occupé des premières recherches ainsi que de compléter les deux parties au fur et à mesure du TPE. Le robot de la seconde expérience a été conçu ensemble par notre trinôme, chacun avançant ses idées. L’ensemble du projet a été principalement géré et organisé par Achille.

+ +

Les principales difficultés rencontrées, mis à part les habituelles difficultés liées au travail de groupe, ont été celles du support : les problèmes de codage, de mises à jour, sans compter le simple langage informatique ont représenté l’obstacle le plus important. La conception du robot a aussi été une source de difficultés : bien qu'étant en apparence simple, son fonctionnement nécessite des procédés complexes. Le manque d’informations précises concernant la chauve-souris et notamment son audition nous a aussi freiné dans les recherches.

+
diff --git a/index/includes/lorem.php b/index/includes/lorem.php new file mode 100644 index 0000000..e5f9713 --- /dev/null +++ b/index/includes/lorem.php @@ -0,0 +1 @@ +

Consectetur adipiscing elit. In scelerisque tincidunt risus, nec bibendum magna vulputate vel. In tristique nisl venenatis neque imperdiet commodo. Nam sed vulputate est. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed scelerisque purus sit amet augue condimentum, in tempus elit euismod. Aenean sed laoreet nunc, quis gravida turpis. Phasellus pretium sapien vitae tincidunt vestibulum. Integer ac semper mi, id pulvinar massa. In tempus augue dui, a dapibus risus eleifend in. Nunc volutpat nulla leo, eget rhoncus libero tincidunt in. Nullam aliquam leo leo.
Nullam fringilla sed metus at volutpat. Vivamus ut orci varius, ullamcorper nulla eu, molestie ipsum. Ut magna orci, mollis vel cursus dictum, adipiscing vitae lorem. Vivamus vitae tempus neque. Cras auctor cursus nisl eu laoreet. Vestibulum vitae felis faucibus ipsum iaculis fringilla. Donec dictum viverra lectus ut scelerisque. In laoreet feugiat elementum.
Curabitur eu bibendum tellus, at condimentum elit. Nunc lacus eros, volutpat in tristique vel, egestas quis libero. Aenean consectetur libero non scelerisque sollicitudin. Fusce lobortis felis erat, sit amet porta elit pretium nec. Nam risus sapien, eleifend ut arcu a, porttitor rutrum sapien. Vestibulum sed mauris vel mauris tempus dignissim. Class aptent taciti sociosqu ad litora torquent per conubia nostra

\ No newline at end of file diff --git a/index/includes/son.php b/index/includes/son.php new file mode 100644 index 0000000..56cf3ff --- /dev/null +++ b/index/includes/son.php @@ -0,0 +1,155 @@ +
+

Le son

+ +

Le son est la vibration d'un fluide qui se propage sous forme d'onde : quand on veut créer une onde sonore, on fait vibrer l'air. Le son ne se propage pas dans le vide : aucun fluide n'est disponible pour vibrer.
+Le son entraîne une modification infime de la pression atmosphérique.

+ +

L'amplitude de la vibration est plus ou moins importante selon le milieu
+(ex: dans un gaz la vitesse du son diminue lorsque la densité du gaz augmente (effet d'inertie)
+et/ou lorsque sa compressibilité (son aptitude à changer de volume sous l'effet de la pression) augmente.

+ +

Dans l'air, la vitesse du son est d'environ 340 m/s.

+ +

Le son est défini par :

+ +
    +
  • l'intensité/l'amplitude : correspond au "volume" du son.
  • +
  • La fréquence : le nombre de vibrations par seconde.
  • +
  • le timbre : la "forme" de la vibration.
  • +
+ +

Les ultrasons

+ +

Les ultrasons sont des ondes sonores non audibles dont les fréquences sont comprises entre 16 000 Hertz et 1 000 000 Hertz (16 kHz et 1 Mhz). Ils ont été découverts en 1883 par le physiologiste anglais Francis Galton. L'influence des nécessités de la lutte anti-sous-marine de la première guerre mondiale pousse à créer un système de sonar à ultrasons. Le physicien Paul Langevin travaille sur le premier générateur d’ultrasons qui apparaît en 1917 et est appelé le "triplet Langevin".

+ +
+
+

Paul Langevin

+
+
+ +

Une onde

+ +

Une onde ne correspond pas à un transport de matière mais d'énergie. Traduction : le son est en fait un changement de pression qui se déplace dans l’espace. Les molécules traversées se déplacent donc peu, sans migrer. Le milieu parcouru par l’onde subit alternativement des compressions et des dilatations.
+Les molécules s'entrechoquent et oscillent mais tout en restant autour de leurs positions initiales, comme le présente l'animation suivante :

+ +
Animation d'une onde longitudinale +
+

Animation d'une onde longitudinale

+ http://www.docsity.com/en/news/physics/physics-sound-visual-representation-gifs/
+
+ +

En réalité le son se propage dans trois dimensions, les ondes sont donc des sphères.

+ +

Milieux de diffusion

+ +

Pour se déplacer le son nécessite un milieu de propagation. Tout milieu constitué de molécules (gaz, liquides, solides) représente un milieu de propagation pour le son. La vitesse du son est plus grande dans un corps qui est plus dense. De ce fait, le son dans un liquide devrait se propager  plus vite que dans un gaz mais plus lentement que dans un solide.
+Ceci se vérifie la plupart des fois, mais la densité n’est pas le seul facteur à entrer en jeu. La capacité du corps à se déformer et à revenir à son état initial (le module d’élasticité) du milieu traversé influe aussi sur la vitesse du son.

+ +

La vitesse de propagation des ondes est déterminée par le comportement des molécules. Elle dépend de la masse des molécules et de la distance qui les sépare. En effet, si les molécules sont lourdes, elles se déplaceront plus lentement que des molécules légères et donc le temps nécessaire à la transmission du mouvement à la molécule voisine sera plus grand, dans ce cas l'onde ira donc moins vite. A noter que la distance entre les molécules importe plus sur la vitesse de propagation que leur masse.
+Entre autre, une onde se déplace plus rapidement lorsque les molécules traversées sont plus rapprochées, comme le montre le pendule de Newton où les billes misent en contact transmettent l’énergie quasi-instantanément.

+ +

La vitesse de l'onde n'est pas liée aux caractéristiques de l'onde sonore elle même mais à celles du milieu traversé. C'est à dire que dans un même milieu, tous les sons se propagent à la même vitesse.

+ +

Caractéristiques :

+ +

Fréquence

+ +

La fréquence est le nombre d’oscillations périodiques par seconde. On parlera également de la hauteur du son.
+Plus la fréquence d’un son sera élevée (onde resserée) et plus le son sera aigu. A l’inverse, plus la fréquence sera basse, plus le son sera grave.

+ +

La fréquence s’exprime en Hertz (Hz), un Hertz correspondant à un nombre d'oscillations
+par seconde.
+Les fréquences audibles par l’être humain s’étendent de 20 à 20 000 Hz en moyenne.
+En dessous de 20 Hz, il s’agit d’infrasons et d’ultrasons au-dessus de 20 000 Hz.

+ +

La fréquence peut se calculer à partir de la longueur d’onde (= la longueur d’une période, distance entre deux sommets) et la célérité du son dans le milieu traversé.
+La formule étant F = C/λ
+Avec λ (Lambda) en mètres
+C (célérité) en m/s (340 m/s pour l’air)
+F la fréquence en Hertz

+ +

440 Hz => 0.77 m = 77cm

+ +

Plus la fréquence augmente, plus la longueur d’onde diminue.

+ +

Intensité

+ +

L'intensité sonore correspond à la puissance, au volume du son. La représentation d'une onde sur un oscilloscope permet de voir son intensité par l’amplitude des courbes :

+ +
L'intensité d'une onde +
+

L'intensité d'une onde

+
+
+ +

Dans l'air, les variations d’intensité se traduisent par des variations de pression plus ou moins grandes. C'est à dire que si une source sonore émet beaucoup d'énergie, elle va fortement compresser les molécules se trouvant autour d'elle et cette forte compression va donner lieu à un son plus fort.

+ +

Une source sonore émet une certaine puissance, à mesure que l'onde s'éloigne de manière sphérique de la source, cette puissance totale se répartit sur une aire croissante. Quand la distance double, cette aire se multiplie par quatre. Etant donné que la puissance acoustique se mesure pour 1 mètre carré, elle se divise par quatre quand la distance à la source se multiplie par deux. La puissance sonore est donc inversement proportionnelle au carré de la distance. C'est pourquoi un son semble moins élévé avec la distance.

+ +

Le décibel (noté dB) est une autre mesure de la puissance sonore, un décibel valant 1 dixième de bel.
+L’échelle des bels est une échelle dite logarithmique de base 10 (logarithme décimal). Cela signifie que monter de 3dB double la puissance émise, de 6dB multiplie par 4 le volume, de 9dB multiplie par 8 (2x2x2) le volume et ainsi de suite. De plus ajouter 10dB (1 bel) multiplie le volume par  10.

+ +

Timbre

+ +

 Lorsqu’on écoute un piano et une guitare jouant une note de même hauteur (fréquence) et de même volume, on remarque évidemment que les sons ne sont pas identiques. Cela est dû aux « timbres » qui sont différents.
+Théorème de Fourier :
+Un son complexe peut être décomposé en une somme d’ondes sinusoïdales de fréquences et d’amplitudes données.

+ +
Théorème de Fourier +
+

Théorème de Fourier

+
+
+ +

 

+ +

Autrement dit, un son peut-être décomposé en plusieurs ondes sinusoïdales qui sont émises simultanément. Celles-ci additionnées donnent une seule onde, cette résultante est  donc l’onde du son obtenu. Ces dernières sont appelées harmoniques.

+ +

Un son pur est le plus simple qui puisse exister. Il s’agit d'un son  dont l’onde est parfaitement sinusoïdale. Et donc qui est démunie d’harmoniques. On ne trouve pas de tel son dans le nature, seul un appareil électronique peut générer ce type de son.

+ +
+
+

La fonction sinusoïdale

+
+
+ +

Toutes les ondes ne sont cependant pas composées d’une fondamentale et d’harmoniques. Certaines semblent être aléatoires puisqu’elles ne sont pas composées uniquement d’harmoniques et de ce fait ne semblent pas périodiques. Leurs hauteurs exactes ne peuvent être appréciées par l’oreille. C’est le cas de bruits irréguliers comme un claquement de porte pour un bruit impulsif ou une tondeuse pour un bruit prolongé.

+ +

Effet Doppler

+ +

L'effet Doppler est le décalage de fréquence d’une onde (onde mécanique, acoustique, électromagnétique...) entre la mesure à l'émission et la mesure à la réception lorsque la distance entre l'émetteur et le récepteur varie au cours du temps.

+ +
+
+

L'effet Doppler

+
+
+ +

Lorsque la source sonore se rapproche, la fréquence augmente et quand la source s'éloigne, la fréquence diminue.

+ +

Pour un observateur immobile (référentiel terrestre), le bruit émis par une voiture n’est pas le même lorsqu'elle s’approche que lorsqu'elle s’éloigne.
+Quand la voiture se rapproche, le son paraît plus aigu que le son perçu par le conducteur. Quand elle s’éloigne, le son paraît plus grave. C’est une manifestation de  l’effet Doppler.

+ +

Cet effet n'a que peu d'impact sur la chauve souris, car elle se déplace trop lentement.

+ +

La réflexion d'une onde (ou l'écho)

+ +

Un écho est le retour vers son émetteur d'un son réféchi par un obstacle.

+ +

Lorsqu’on schématise cette situation, l’angle de réflexion (ici i’) est égal à l’angle d’incidence (ici i).

+ +
Représentation de la réflexion d'une onde contre un obstacle +
+

Représentation de la réflexion d'une onde contre un obstacle

+
+
+ +

Il faut que l'émission soit perpendiculaire à l'obstacle pour que l'émetteur (qui est aussi le récepteur) puisse entendre le retour, ou que l'obstacle ait une partie perpendiculaire au "rayon" du son (comme un cylindre)

+ +

Le son ayant une vitesse limitée (vu plus haut) de 340 m/s dans l'air, il y a un court temps entre l'émission et la réception au même endroit d'un son. L'équation T(temps en s) = D(distance en m)/V(vitesse en m/s)

+ +

Nous pouvouns donc utiliser l’écho pour calculer une vitesse. La méthode est la suivante : une son est émis. Lorsqu’il rencontre un obstacle, son écho revient vers l’émetteur. En connaissant la vitesse de propagation du son (340 m/s) ainsi que on délai de retour, on peut calculer la distance de l’obstacle. (voir l'expérience n°1)

+ +

Une partie de l'onde est absorbée dans le matériau. Plus le matériau est dense, plus l'onde sera réfléchie. Un matériau poreux absorbera plus les ondes sonores qu'un matériau "normal".

+
diff --git a/index/includes/src.php b/index/includes/src.php new file mode 100644 index 0000000..cdcd0d0 --- /dev/null +++ b/index/includes/src.php @@ -0,0 +1,52 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nom du siteEditeur/AuteurDate d'édition ou de mise à jourAdresse du site
VigienaturePauline VAN LAERE2007 - 2008http://vigienature.mnhn.fr
MatterwavesGabriel LaFrenierejuin-11http://matterwaves.info/
DocsityDocsity2014http://www.docsity.com/en/news/physics/physics-sound-visual-representation-gifs/
DeunsDeunsNon spécifiéhttp://deuns.chez.com/sciences/ondes/ondes3.html
BanggoodBanggood2016http://www.banggood.com/fr/
WikipédiaCommunauté2016https://fr.wikipedia.org
+ +
\ No newline at end of file diff --git a/index/styleTpe.css b/index/styleTpe.css new file mode 100644 index 0000000..2c3df38 --- /dev/null +++ b/index/styleTpe.css @@ -0,0 +1,129 @@ +header +{ + padding: 0px; +} +header img +{ + margin: 0px; + border-radius: 10px; + margin-left: auto; + margin-right: auto; + text-align: center; + display: block; + width: 1100px; +} +header nav +{ + margin-top: 10px; + margin-bottom: 5px; + margin-left: auto; + margin-right: auto; + padding-left: 10px; +} +header nav div +{ + display: inline-block; + width: auto; + padding : 3px; + padding-right : 3px; + margin-right: 4px; + border: 1px solid #CCC; + padding: 5px; + box-shadow: 0px 5px 9px #b8b8b8; + background-color: #EBEBEB; + transition: margin-left 200ms; +} +header nav div:hover +{ + margin-left: 10px; + +} +article +{ + display: inline-block; + width: 820px; + border-right: solid 1px #e6e6e6; +} +article div +{ + background-color: none; + padding: 0px; + margin: 0px; + border: none; + width: auto; + display: inline; + vertical-align: top; +} +article div a +{ + display: inline; + text-align: left; + background-color: none; +} +article h2 a +{ + margin: 3px; +} +/*article p, h1, h2, h3, a +{ + margin : 3px; + text-align: left; + +}*/ +article h4 +{ + text-align: left; +} +article #arrowRight +{ + margin-left: 5px; + vertical-align: middle; +} +article #enCours +{ + cursor: wait; +} +table +{ + margin: 0 auto; + text-align: center; + border-collapse: collapse; + box-shadow: 0px 5px 9px #b8b8b8; +} +th, td, tr +{ + border: 1px solid #929292; + border-collapse: collapse; + padding: 3px; + text-align: center; +} +th +{ + Background-color: #bedbd8; +} +aside +{ + display: inline-block; + width: 220px; + vertical-align: top; + margin-left: 0px; +} +aside #todod ul +{ + list-style-type: disc; +} +aside #todod ul ul +{ + list-style-type: circle; +} +aside #todod ul ul ul +{ + list-style-type: square; +} +.EnlighterJSWrapper ol +{ + height: 500px; + overflow: auto; +} + + diff --git a/page1-son.php b/page1-son.php new file mode 100644 index 0000000..e7910a7 --- /dev/null +++ b/page1-son.php @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + achilletoupin.com - TPE + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/page2-cs.php b/page2-cs.php new file mode 100644 index 0000000..3c7e4b9 --- /dev/null +++ b/page2-cs.php @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + achilletoupin.com - TPE + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/page3-ex1.php b/page3-ex1.php new file mode 100644 index 0000000..59b43d0 --- /dev/null +++ b/page3-ex1.php @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + achilletoupin.com - TPE + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/page4-ex2.php b/page4-ex2.php new file mode 100644 index 0000000..a1aa3b7 --- /dev/null +++ b/page4-ex2.php @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + achilletoupin.com - TPE + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/page5-ccln.php b/page5-ccln.php new file mode 100644 index 0000000..003afc0 --- /dev/null +++ b/page5-ccln.php @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + achilletoupin.com - TPE + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/page6-src.php b/page6-src.php new file mode 100644 index 0000000..a3a15c1 --- /dev/null +++ b/page6-src.php @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + achilletoupin.com - TPE + + + + + + + + + + + +
+ +
+ + + +

Sources

+ + + + + +
+ + + +
+ + + + + + + + \ No newline at end of file diff --git a/pourquoiTpe.php b/pourquoiTpe.php new file mode 100644 index 0000000..d91c343 --- /dev/null +++ b/pourquoiTpe.php @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + achilletoupin.com - TPE + + + + + + +
+ +
+

Le T.P.E.

+ +

Cette partie du site expose le travail réalisé dans le carde du T.P.E. du groupe n°30 du Lycée Lavoisier.

+ +

Le T.P.E. ("Travaux personnels encadrés") est un exposé réalisé sur une durée de plusieurs mois et qui doit répondre à une problématique choisie. La présentation de ce travail se déroule devant un jury.

+ +

Chaque fillière (S, ES, L ...) se voit donner des thèmes en accord avec des matières (ici, la physique et la science et vie de la Terre).

+ +

Pour une meilleure compréhension du sujet, voir la notice.

+ +

Crédits

+ +

Je rends le code source de ce site entièrement libre de droit, mais pas son contenu (images, vidéos, etc.)

+ +

Le code source a été entièrement écrit par Achille Toupin

+ +
+ + + +
+ + + + + + + + \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..790c81d --- /dev/null +++ b/style.css @@ -0,0 +1,183 @@ +@font-face { + font-family: 'Centaur'; + src: url('fonts/CENTAUR.ttf') format('truetype'); + +} +@font-face { + font-family: 'Imprint MT Shadow'; + src: url('fonts/IMPRISHA.ttf') format('truetype'); + +} +html +{ + background-color: #E6E6E6; + color: #3F3F3F; + font-family: 'Centaur'; +} +p +{ + text-align: justify; + margin-bottom: 10px; +} +h1, h2, h3, h4, a +{ + text-align: center; + font-weight: normal; + color: #bc5313; + font-family: 'Imprint MT Shadow'; +} +h3 +{ + text-decoration: none; + font-family: 'Centaur'; +} +a +{ + cursor: pointer; +} +a:hover +{ + color: #ff7007; +} +header, article, aside, footer +{ + padding: 10px; +} +body +{ + width: 1100px; + margin-left: auto; + margin-right: auto; + background-color: #f8f7f7; + margin-top: 0px; + border-right: solid 1px #e6e6e6; + border-left: solid 1px #e6e6e6; + box-shadow: 0px 5px 9px #b8b8b8; +} +header +{ + border-bottom: solid 1px #e6e6e6; +} +header h1 +{ + text-transform: uppercase; + display: inline-block; + color: #ff660b; +} +header #headNav ul +{ + list-style-type: none; + display: block; + padding: 10px; + margin: 5px; + margin-right: 0px; + text-align: right; +} +header #headNav li +{ + display: inline-block; + padding: 0px; + margin-left: 10px; + text-align: right; +} +header #headNav a +{ + display: block; + padding: 0px; + margin: 0px; + font-size: 1.5em; +} +header #headNav a:hover +{ + text-decoration: underline; +} +article +{ + display: inline-block; + width: 870px; + border-right: solid 1px #e6e6e6; +} +article div +{ + background-color: #ECECEC; + padding: 6px; + margin: 5px; + border: 2px solid #E4E4E4; + width: 290px; + display: inline-block; + vertical-align: top; +} +article div a +{ + display: block; + text-align: center; +} +article div a img +{ + margin-right: 5px; +} +article #contact, #submit +{ + display: block; + margin-left: auto; + margin-right: auto; +} +article #contact +{ + width: 400px; + height: 200px; +} +aside +{ + display: inline-block; + width: 160px; + vertical-align: top; + margin-left: 0px; +} +aside ul +{ + padding-left: 10px; + +} +aside li a +{ + transition: padding-left 200ms; +} +aside li a:hover +{ + padding-left: 10px; + +} +aside h3, aside a +{ + text-align: left; + text-decoration: none; + font-family: 'Centaur'; +} +aside ul +{ + list-style-type: none; +} +footer +{ + border-top: solid 1px #e6e6e6; +} +figure +{ + display: block; + margin-left: auto; + margin-right: auto; + margin-bottom: 30px; + border: 1px solid #CCC; + padding: 5px; + box-shadow: 0px 5px 9px #b8b8b8; + text-align: center; +} +figure img +{ + display: inline; + width: auto; + max-width:100%; + max-height:100%; + margin-bottom: 10px; +} diff --git a/todo.php b/todo.php new file mode 100644 index 0000000..900babd --- /dev/null +++ b/todo.php @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + achilletoupin.com - TPE + + + + + + + +
+ +
+

Retour à l'accueil

+

Liste de tâches :

+
+
    +
  • Notice + +
      +
    • Problématique
    • +
    • Plan du site
    • +
    • Tâches de chacun
    • +
    +
  • +
  • Son +
      +
    • Shémas & images
    • +
    • écho
    • +
    • pression
    • +
    +
  • +
  • Chauve-souris +
      +
    • Expliaction de chaque organe
    • +
    • Images
    • +
    • Shéma pour voir les différentes parties ?
    • +
    • Zone d'émission
    • +
    +
  • +
  • Expérience 1 +
      +
    • Réaliser
    • +
    • Compte-rendu de l'éxperience 1
    • +
    • Conclusion
    • +
    +
  • +
  • Expérience 2 +
      +
    • Explication
    • +
    • Fonctionnement
    • +
    +
  • +
  • Conclusion
  • +
  • Rédiger la biblographie +
      +
    • Tableau
    • +
    +
  • +
+ + + +
+ + +
+ + + +
+ + + + + + + + \ No newline at end of file