commit 457edc3d9427fb42d9d2647057c2625ba97bcf99 Author: Yann Esposito (Yogsototh) Date: Tue Nov 18 22:35:07 2014 +0100 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5df1b9b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.sass-cache diff --git a/css/back.png b/css/back.png new file mode 100644 index 0000000..b450f20 Binary files /dev/null and b/css/back.png differ diff --git a/css/base.css b/css/base.css new file mode 100644 index 0000000..a8b3f16 --- /dev/null +++ b/css/base.css @@ -0,0 +1,169 @@ +/*GENERAL */ +body { + font-family: "Futura", sans-serif; + font-size: 4em; + line-height: 4em; + min-height: 740px; + background-color: #444444; + background-image: url("back.png"); + margin: 0; + border: 0; + padding: 0; + color: #eeeeee; + box-shadow: 0 0 50px black inset; + -webkit-font-smoothing: antialiased; } + +/*STEP STYLES */ +a { + color: #cccccc; } + a:hover { + color: #e47e30; } + +b { + color: #cccccc; } + +h1 { + margin-top: 0; } + +.hi { + color: #e47e30; } + +.hi2 { + color: #cccccc; } + +ul li { + height: 1.5em; } + +.step { + width: 1960px; + height: 1080px; + font-size: 1.2em; + line-height: 2em; + min-height: 500px; + display: block; + padding: 40px 60px; + text-shadow: 0 2px 2px rgba(0, 0, 0, 0.1); + letter-spacing: -1px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + -o-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: opacity 1s; + -moz-transition: opacity 1s; + -ms-transition: opacity 1s; + -o-transition: opacity 1s; + transition: opacity 1s; } + .step:not(.active) { + opacity: 1; } + +/* fade out inactive slides */ +/* hint on the first slide */ +.hint { + position: fixed; + left: 0; + right: 0; + bottom: 0px; + background: #333333; + color: white; + text-align: right; + padding: 10px; + z-index: 100; + opacity: 0; + -webkit-transform: translateY(400px); + -moz-transform: translateY(400px); + -ms-transform: translateY(400px); + -o-transform: translateY(400px); + transform: translateY(400px); + -webkit-transition: opacity 1s, -webkit-transform 0.5s 1s; + -moz-transition: opacity 1s, -moz-transform 0.5s 1s; + -ms-transition: opacity 1s, -ms-transform 0.5s 1s; + -o-transition: opacity 1s, -o-transform 0.5s 1s; + transition: opacity 1s, transform 0.5s 1s; } + +.step-home + .hint { + opacity: 1; + -webkit-transition: opacity 1s 5s, -webkit-transform 0.5s; + -moz-transition: opacity 1s 5s, -moz-transform 0.5s; + -ms-transition: opacity 1s 5s, -ms-transform 0.5s; + -o-transition: opacity 1s 5s, -o-transform 0.5s; + transition: opacity 1s 5s, transform 0.5s; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } + +/*NOT SUPPORTED STYLES */ +.not-supported .step { + position: relative; + opacity: 1; + margin: 20px auto; } + +/*PRINT STYLE */ +@media print { + body { + background: white; } + + .hint { + display: none; } + + #simple { + width: auto; + margin: 0 5%; + padding: 0; + border: 0; + float: none !important; + color: black; + background: transparent; } + + .step { + page-break-after: always; + opacity: 1; + clear: both; + display: block; + float: none !important; + position: relative; + margin: 20px auto; + -webkit-transition: rotate(0deg); + -moz-transition: rotate(0deg); + -ms-transition: rotate(0deg); + -o-transition: rotate(0deg); + transition: rotate(0deg); } + .step:not(.active) { + opacity: 1; } } +/* ---- */ +#title { + text-align: center; } + #title h1 { + font-size: 3em; + font-weight: bold; } + #title h2 { + font-size: 1em; + color: #e47e30; } + #title author { + color: #cccccc; + font-style: italic; } + +.background { + color: white; + font-family: Impact, sans-serif; + font-size: 1.5em; + width: 100%; + height: 100%; + padding: 1em; + background: no-repeat; + background-size: 100% auto; } + +.right { + float: right; } + +.darktext { + color: black; } + .darktext p { + background: rgba(255, 255, 255, 0.8); } + +.cleartext { + color: white; } + .cleartext p { + background: rgba(0, 0, 0, 0.8); } diff --git a/css/base.sass b/css/base.sass new file mode 100644 index 0000000..eaebaa8 --- /dev/null +++ b/css/base.sass @@ -0,0 +1,178 @@ +/** GENERAL * +$background: #444 +$text: #EEE +$mainColor: #E47E30 +$sndColor: #CCC + +// @import url(http://fonts.googleapis.com/css?family=Vollkorn:400italic,700italic,400,700) + +body + font-family: 'Futura', sans-serif + font-size: 4em + line-height: 4em + min-height: 740px + background-color: $background + background-image: url('back.png') + margin: 0 + border: 0 + padding: 0 + color: $text + box-shadow: 0 0 50px #000 inset + -webkit-font-smoothing: antialiased + +/** STEP STYLES * + +a + color: $sndColor + &:hover + color: $mainColor + +b + color: $sndColor + +h1 + margin-top: 0 + +.hi + color: $mainColor +.hi2 + color: $sndColor + +ul + li + height: 1.5em + +.step + width: 1960px + height: 1080px + font-size: 1.2em + line-height: 2em + min-height: 500px + display: block + padding: 40px 60px + text-shadow: 0 2px 2px rgba(0, 0, 0, 0.1) + letter-spacing: -1px + -webkit-box-sizing: border-box + -moz-box-sizing: border-box + -ms-box-sizing: border-box + -o-box-sizing: border-box + box-sizing: border-box + -webkit-transition: opacity 1s + -moz-transition: opacity 1s + -ms-transition: opacity 1s + -o-transition: opacity 1s + transition: opacity 1s + &:not(.active) + opacity: 1 + +/* fade out inactive slides + +/* hint on the first slide + +.hint + position: fixed + left: 0 + right: 0 + bottom: 0px + background: #333 + color: #fff + text-align: right + padding: 10px + z-index: 100 + opacity: 0 + -webkit-transform: translateY(400px) + -moz-transform: translateY(400px) + -ms-transform: translateY(400px) + -o-transform: translateY(400px) + transform: translateY(400px) + -webkit-transition: opacity 1s, -webkit-transform 0.5s 1s + -moz-transition: opacity 1s, -moz-transform 0.5s 1s + -ms-transition: opacity 1s, -ms-transform 0.5s 1s + -o-transition: opacity 1s, -o-transform 0.5s 1s + transition: opacity 1s, transform 0.5s 1s + +.step-home + .hint + opacity: 1 + -webkit-transition: opacity 1s 5s, -webkit-transform 0.5s + -moz-transition: opacity 1s 5s, -moz-transform 0.5s + -ms-transition: opacity 1s 5s, -ms-transform 0.5s + -o-transition: opacity 1s 5s, -o-transform 0.5s + transition: opacity 1s 5s, transform 0.5s + -webkit-transform: translateY(0px) + -moz-transform: translateY(0px) + -ms-transform: translateY(0px) + -o-transform: translateY(0px) + transform: translateY(0px) + +/** NOT SUPPORTED STYLES * + +.not-supported .step + position: relative + opacity: 1 + margin: 20px auto + +/** PRINT STYLE * +@media print + body + background: white + .hint + display: none + #simple + width: auto + margin: 0 5% + padding: 0 + border: 0 + float: none !important + color: black + background: transparent + .step + page-break-after: always + opacity: 1 + clear: both + display: block + float: none !important + position: relative + margin: 20px auto + -webkit-transition: rotate(0deg) + -moz-transition: rotate(0deg) + -ms-transition: rotate(0deg) + -o-transition: rotate(0deg) + transition: rotate(0deg) + &:not(.active) + opacity: 1 + +/* ---- */ +#title + text-align: center + h1 + font-size: 3em + font-weight: bold + h2 + font-size: 1em + color: $mainColor + author + color: $sndColor + font-style: italic + +.background + color: #FFF + font-family: Impact, sans-serif + font-size: 1.5em + width: 100% + height: 100% + padding: 1em + background: no-repeat + background-size: 100% auto + +.right + float: right + +.darktext + color: #000 + p + background: rgba(255,255,255,0.8) + +.cleartext + color: #FFF + p + background: rgba(0,0,0,0.8) diff --git a/css/solarized.css b/css/solarized.css new file mode 100644 index 0000000..b74532a --- /dev/null +++ b/css/solarized.css @@ -0,0 +1,72 @@ +/* base03 */ +pre { + border: solid 4px rgba(0, 0, 0, 0.7); + padding: 0.8em; + background-color: rgba(0, 0, 0, 0.5); + font-size: 0.8em; + font-family: monaco, monospace; + line-height: 2em; + /* background: #f3f4f5 */ + color: #657b83; + color: #839496; + display: block; } + pre .high0 { + color: #586e75; } + pre .high, pre .high1 { + color: #073642; } + pre .high2 { + color: #002b36; } + pre .DiffInserted, pre .DiffChanged, pre .DiffHeader, pre .DiffDeleted, pre .EmbeddedSource, pre .EmbeddedSourceBright { + color: #839496; } + pre .DiffHeader { + font-style: italic; } + pre .EmbeddedSource, pre .EmbeddedSourceBright { + background-color: #073642; } + pre .low, pre .line-numbers, pre .DoctypeXmlProcessing { + color: #586e75; } + pre .Comment { + color: #586e75; + font-style: italic; } + pre .yellow, pre .CssClass, pre .CssPropertyName, pre .Entity, pre .MarkupList { + color: #b58900; } + pre .EntityInheritedClass { + color: #b58900; + font-style: italic; } + pre .orange, pre .String, pre .StringRegexp, pre .StringEmbeddedSource, pre .StringConstant, pre .MetaTagAll { + color: #cb4b16; } + pre .red { + color: #dc322f; } + pre .InvalidIllegal, pre .CssAtRule, pre .InvalidDeprecated { + color: #dc322f; + font-style: italic; } + pre .magenta, pre .CCCPreprocessorLine, pre .CCCPreprocessorDirective { + color: #d33682; } + pre .violet, pre .Constant { + color: #6c71c4; } + pre .blue, pre .Storage, pre .Variable, pre .CssId, pre .SupportFunction, pre .MetaTagInline, pre .StringRegexpSpecial, pre .CssTagName, pre .StringVariable, pre .Support { + color: #268bd2; } + pre .cyan, pre .MarkupHeading, pre .CssAdditionalConstants, pre .CssPropertyValue, pre .SupportConstant { + color: #2aa198; } + pre .green, pre .CssPseudoClass, pre .Keyword, pre .CssConstructorArgument { + color: #859900; } + pre code { + /* background: $base03; */ + color: #657b83; + background-color: #f3f4f5; } + pre .comment, pre .template_comment, pre .diff .header, pre .doctype, pre .lisp .string, pre .javadoc { + color: #93a1a1; + font-style: italic; } + pre .keyword, pre .css .rule .keyword, pre .winutils, pre .javascript .title, pre .method, pre .addition, pre .css .tag, pre .lisp .title { + color: #859900; } + pre .number, pre .command, pre .string, pre .tag .value, pre .phpdoc, pre .tex .formula, pre .regexp, pre .hexcolor { + color: #2aa198; } + pre .title, pre .localvars, pre .function .title, pre .chunk, pre .decorator, pre .builtin, pre .built_in, pre .lisp .title, pre .identifier, pre .title .keymethods, pre .id { + color: #268bd2; } + pre .attribute, pre .variable, pre .instancevar, pre .lisp .body, pre .smalltalk .number, pre .constant, pre .class .title, pre .parent, pre .haskell .label { + color: #b58900; } + pre .preprocessor, pre .pi, pre .shebang, pre .symbol, pre .diff .change, pre .special, pre .keymethods, pre .attr_selector, pre .important, pre .subst, pre .cdata { + color: #cb4b16; } + pre .deletion { + color: #dc322f; } + pre .tex .formula { + background: #eee8d5; } diff --git a/css/solarized.sass b/css/solarized.sass new file mode 100644 index 0000000..4fa73e5 --- /dev/null +++ b/css/solarized.sass @@ -0,0 +1,90 @@ +$base03 : #002b36 +$base02 : #073642 +$base01 : #586e75 +$base00 : #657b83 +$base0 : #839496 +$base1 : #93a1a1 +$base2 : #eee8d5 +$base3 : #fdf6e3 +$yellow : #b58900 +$orange : #cb4b16 +$red : #dc322f +$magenta: #d33682 +$violet : #6c71c4 +$blue : #268bd2 +$cyan : #2aa198 +$green : #859900 + +/* base03 + +pre + border: solid 4px rgba(0,0,0,0.7) + padding: .8em + background-color: rgba(0,0,0,0.5) + font-size: 0.8em + font-family: monaco, monospace + line-height: 2em + /* background: #f3f4f5 */ + color: $base00 + .high0 + color: $base01 + .high, .high1 + color: $base02 + .high2 + color: $base03 + color: $base0 + .DiffInserted, .DiffChanged, .DiffHeader, .DiffDeleted, .EmbeddedSource, .EmbeddedSourceBright + color: $base0 + .DiffHeader + font-style: italic + .EmbeddedSource, .EmbeddedSourceBright + background-color: $base02 + .low, .line-numbers, .DoctypeXmlProcessing + color: $base01 + .Comment + color: $base01 + font-style: italic + .yellow, .CssClass, .CssPropertyName, .Entity, .MarkupList + color: $yellow + .EntityInheritedClass + color: $yellow + font-style: italic + .orange, .String, .StringRegexp, .StringEmbeddedSource, .StringConstant, .MetaTagAll + color: $orange + .red + color: $red + .InvalidIllegal, .CssAtRule, .InvalidDeprecated + color: $red + font-style: italic + .magenta, .CCCPreprocessorLine, .CCCPreprocessorDirective + color: $magenta + .violet, .Constant + color: $violet + .blue, .Storage, .Variable, .CssId, .SupportFunction, .MetaTagInline, .StringRegexpSpecial, .CssTagName, .StringVariable, .Support + color: $blue + .cyan, .MarkupHeading, .CssAdditionalConstants, .CssPropertyValue, .SupportConstant + color: $cyan + .green, .CssPseudoClass, .Keyword, .CssConstructorArgument + color: $green + display: block + code + /* background: $base03; + color: $base00 + background-color: #f3f4f5 + .comment, .template_comment, .diff .header, .doctype, .lisp .string, .javadoc + color: $base1 + font-style: italic + .keyword, .css .rule .keyword, .winutils, .javascript .title, .method, .addition, .css .tag, .lisp .title + color: $green + .number, .command, .string, .tag .value, .phpdoc, .tex .formula, .regexp, .hexcolor + color: $cyan + .title, .localvars, .function .title, .chunk, .decorator, .builtin, .built_in, .lisp .title, .identifier, .title .keymethods, .id + color: $blue + .attribute, .variable, .instancevar, .lisp .body, .smalltalk .number, .constant, .class .title, .parent, .haskell .label + color: $yellow + .preprocessor, .pi, .shebang, .symbol, .diff .change, .special, .keymethods, .attr_selector, .important, .subst, .cdata + color: $orange + .deletion + color: $red + .tex .formula + background: $base2 diff --git a/example.hs b/example.hs new file mode 100644 index 0000000..0f2c4fd --- /dev/null +++ b/example.hs @@ -0,0 +1,5 @@ +sort :: (Ord a) => [a] -> [a] +sort [] = [] +sort (x:xs) = sort (filter (=x) xs) diff --git a/img/fonctionnel.jpg b/img/fonctionnel.jpg new file mode 100644 index 0000000..c6e999a Binary files /dev/null and b/img/fonctionnel.jpg differ diff --git a/img/lazy.jpg b/img/lazy.jpg new file mode 100644 index 0000000..1cdf0d7 Binary files /dev/null and b/img/lazy.jpg differ diff --git a/img/pure.jpg b/img/pure.jpg new file mode 100644 index 0000000..3d5abbb Binary files /dev/null and b/img/pure.jpg differ diff --git a/img/static-type.jpg b/img/static-type.jpg new file mode 100644 index 0000000..f0eb177 Binary files /dev/null and b/img/static-type.jpg differ diff --git a/img/what.jpg b/img/what.jpg new file mode 100644 index 0000000..e7c862c Binary files /dev/null and b/img/what.jpg differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..e99b0bc --- /dev/null +++ b/index.html @@ -0,0 +1,265 @@ + + + + + Vigiglobe - compojure-api + + + + + + + + + + + + + + +
+
+

compojure-api

+

Swagger & Schema FTW!

+ + Guillaume Buisson & Yann Esposito +
+ Vigiglobe +
+
+
+

API?

+
  • Documentation? +
  • Fast? +
  • Libraries? +
+
+
+
+

Language Fonctionnel

+
+

Déclaratif vs Impératif

+
+
+
+
+

Pur

+

vs disfonctionnel

+
+
+
+
+

Fainéant

+
+
+
+

⇒ Structures infinies !!!

+
+
+
+
+

Système de Typage Moderne

+
+
+
+

⇒ Agréable & Utile !

+
+
+
+

Propriétés par défaut

+
  • Fonctionnel par défaut +
  • Pur par défaut +
  • Fainéant par défaut +
  • Système de typage hors du commun +
+ Encourage les bons choix par défaut +
+
+

Utilisation

+
  • Protège contre la distraction +
  • Protège contre sa bêtise +
  • Force les meilleurs usages +
  • Diminue le nombre de tests nécessaires +
+
+
+

Production ?

+
  • OUI (CUFP) +
  • Très peu de bugs (finance, web, ...) +
  • De nombreuses bibliothèques (hackage) +
  • Adaptabilité du code phénoménale +
+
+
+

Vitesse

+
  • C : ~ ½× +
  • Java : ~ 1× +
  • Dart : ~ 5× +
  • Python : ~ 12× +
  • Ruby : ~ 13× +
  • PHP : ~ 28× +
+ source CLBG +
+ +
+

Workflows (basic)

+
  1. Programmer +
  2. tester en cliquant/scrollant, REPL, etc... +
  3. 90% → détecter une erreur ⇒ goto 1 +
  4. envoyer en (recette/production) +
  5. 50% (10% si recette) → Erreur en production ⇒ ARGH!!! goto 1 +
+
+
+

Workflows (TDD)

+
  1. Écrire des tests (voir workflow basic) +
  2. Programmer +
  3. lancer les tests (66% erreur ⇒ goto 2 ou 1) +
  4. tester en cliquant/scrollant, REPL, etc... +
  5. 30% détecter une erreur ⇒ goto 1 +
  6. envoyer en (recette/production) +
  7. 5 à 10%: Erreur en production ⇒ ARGH !!! goto 1 +
+
+
+

Workflows Haskell (Type DD)

+
  1. Programmer +
  2. Compiler (90% erreur, corriger avec l'aide goto 1) +
  3. tester en cliquant/scrollant, REPL, etc... +
  4. 3% → détecter une erreur ⇒ goto 1 +
  5. envoyer en (recette/production) +
  6. 0.5% → Erreur en production ⇒ ARGH !!! goto 1 +
+
+
+

0,5% c'est encore trop!

+

+ QuickCheck, SmallCheck:
+ engendrent des tests unitaires aléatoirement +
+ HUnit:
+ Tests unitaires +

+
+
+

Facile ?

+
  • Pas vraiment +
  • Nécessite un réel investissement +
  • Aide à la conception +
+
+ +
+

Exemples (1)

+
[1,2,3] == [1..3]
+[1,2,3] == [1,2] ++ [3]
+[1,2,3] == 1:2:[]
+[1,3..10] == [1,3,5,7,9]
+[1,3..10] !! 3 == 7
+[1,'a',3] 
+[(1,'a'),(3,'c')] 
+
+
+
+

Exemples (2)

+
fib = 0:1:zipWith (+) fib (tail fib)
+
+take 15 fib ⇔
+[0,1,1,2,3,5,8,13,21,34,55,89,144,233,377]
+
+fib !! 200 ⇔
+280571172992510140037611932413038677189525
+
+
+ +
+

Exemples (3)

+
sort [] = []
+sort (x:xs) = sort [y | y <- xs, y < x] ++
+              [x] ++
+              sort [y | y <- xs, y >= x]
+
+
+ +
+

Exemples (3bis)

+
sort [] = []
+sort (x:xs) = sort (filter (< x) xs) ++
+              [x] ++
+              sort (filter (>= x) xs)
+
+
+ +
+

Le bon choix par défaut

+
+data Metres a = Metres a
+data Pieds a = Pieds a
+
+launchTheMissiles :: Metres Integer -> IO ()
+launchTheMissiles n = do ...
+
+launchTheMissile 100 
+hauteur = Pieds 3000
+launchTheMissile hauteur 
+launchTheMissile (pieds2Metres hauteur) 
+
+ +
+

IO DSL

+
main = do
+    putStrLn "Quel est votre nom?"
+    nom <- readLine
+    putStrLn ("Bonjour " ++ nom)
+
+
+ +
+

Conclusion

+
  • Language très haut niveau +
  • Rapide +
  • Sûr / moins de tests nécessaires +
  • Le bon choix par défaut +
  • Ouvre l'esprit +
+
+ +
+ +
+

Use arrow keys to navigate

+
+ + + + + + + diff --git a/js/highlight/LICENSE b/js/highlight/LICENSE new file mode 100644 index 0000000..422deb7 --- /dev/null +++ b/js/highlight/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2006, Ivan Sagalaev +All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of highlight.js nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/js/highlight/README.md b/js/highlight/README.md new file mode 100644 index 0000000..82a5d1f --- /dev/null +++ b/js/highlight/README.md @@ -0,0 +1,167 @@ +# Highlight.js + +Highlight.js highlights syntax in code examples on blogs, forums and, +in fact, on any web page. It's very easy to use because it works +automatically: finds blocks of code, detects a language, highlights it. + +Autodetection can be fine tuned when it fails by itself (see "Heuristics"). + + +## Basic usage + +Link the library and a stylesheet from your page and hook highlighting to +the page load event: + +```html + + + +``` + +This will highlight all code on the page marked up as `
 .. 
`. +If you use different markup or need to apply highlighting dynamically, read +"Custom initialization" below. + +- You can download your own customized version of "highlight.pack.js" or + use the hosted one as described on the download page: + + +- Style themes are available in the download package or as hosted files. + To create a custom style for your site see the class reference in the file + [classref.txt][cr] from the downloaded package. + +[cr]: http://github.com/isagalaev/highlight.js/blob/master/classref.txt + + +## node.js + +Highlight.js can be used under node.js. The package with all supported languages is +installable from NPM: + + npm install highlight.js + +Alternatively, you can build it from the source with only languages you need: + + python3 tools/build.py -tnode lang1 lang2 .. + +Using the library: + +```javascript +var hljs = require('highlight.js'); + +// If you know the language +hljs.highlight(lang, code).value; + +// Automatic language detection +hljs.highlightAuto(code).value; +``` + + +## AMD + +Highlight.js can be used with an AMD loader. You will need to build it from +source in order to do so: + +```bash +$ python3 tools/build.py -tamd lang1 lang2 .. +``` + +Which will generate a `build/highlight.pack.js` which will load as an AMD +module with support for the built languages and can be used like so: + +```javascript +require(["highlight.js/build/highlight.pack"], function(hljs){ + + // If you know the language + hljs.highlight(lang, code).value; + + // Automatic language detection + hljs.highlightAuto(code).value; +}); +``` + + +## Tab replacement + +You can replace TAB ('\x09') characters used for indentation in your code +with some fixed number of spaces or with a `` to give them special +styling: + +```html + +``` + +## Custom initialization + +If you use different markup for code blocks you can initialize them manually +with `highlightBlock(code, tabReplace, useBR)` function. It takes a DOM element +containing the code to highlight and optionally a string with which to replace +TAB characters. + +Initialization using, for example, jQuery might look like this: + +```javascript +$(document).ready(function() { + $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); +}); +``` + +You can use `highlightBlock` to highlight blocks dynamically inserted into +the page. Just make sure you don't do it twice for already highlighted +blocks. + +If your code container relies on `
` tags instead of line breaks (i.e. if +it's not `
`) pass `true` into the third parameter of `highlightBlock`
+to make highlight.js use `
` in the output: + +```javascript +$('div.code').each(function(i, e) {hljs.highlightBlock(e, null, true)}); +``` + + +## Heuristics + +Autodetection of a code's language is done using a simple heuristic: +the program tries to highlight a fragment with all available languages and +counts all syntactic structures that it finds along the way. The language +with greatest count wins. + +This means that in short fragments the probability of an error is high +(and it really happens sometimes). In this cases you can set the fragment's +language explicitly by assigning a class to the `` element: + +```html +
...
+``` + +You can use class names recommended in HTML5: "language-html", +"language-php". Classes also can be assigned to the `
` element.
+
+To disable highlighting of a fragment altogether use "no-highlight" class:
+
+```html
+
...
+``` + + +## Export + +File export.html contains a little program that allows you to paste in a code +snippet and then copy and paste the resulting HTML code generated by the +highlighter. This is useful in situations when you can't use the script itself +on a site. + + +## Meta + +- Version: 7.5 +- URL: http://highlightjs.org/ + +For the license terms see LICENSE files. +For authors and contributors see AUTHORS.en.txt file. diff --git a/js/highlight/README.ru.md b/js/highlight/README.ru.md new file mode 100644 index 0000000..c87b3b3 --- /dev/null +++ b/js/highlight/README.ru.md @@ -0,0 +1,172 @@ +# Highlight.js + +Highlight.js нужен для подсветки синтаксиса в примерах кода в блогах, +форумах и вообще на любых веб-страницах. Пользоваться им очень просто, +потому что работает он автоматически: сам находит блоки кода, сам +определяет язык, сам подсвечивает. + +Автоопределением языка можно управлять, когда оно не справляется само (см. +дальше "Эвристика"). + + +## Простое использование + +Подключите библиотеку и стиль на страницу и повесть вызов подсветки на +загрузку страницы: + +```html + + + +``` + +Весь код на странице, обрамлённый в теги `
 .. 
` +будет автоматически подсвечен. Если вы используете другие теги или хотите +подсвечивать блоки кода динамически, читайте "Инициализацию вручную" ниже. + +- Вы можете скачать собственную версию "highlight.pack.js" или сослаться + на захостенный файл, как описано на странице загрузки: + + +- Стилевые темы можно найти в загруженном архиве или также использовать + захостенные. Чтобы сделать собственный стиль для своего сайта, вам + будет полезен справочник классов в файле [classref.txt][cr], который тоже + есть в архиве. + +[cr]: http://github.com/isagalaev/highlight.js/blob/master/classref.txt + + +## node.js + +Highlight.js можно использовать в node.js. Библиотеку со всеми возможными языками можно +установить с NPM: + + npm install highlight.js + +Также её можно собрать из исходников с только теми языками, которые нужны: + + python3 tools/build.py -tnode lang1 lang2 .. + +Использование библиотеки: + +```javascript +var hljs = require('highlight.js'); + +// Если вы знаете язык +hljs.highlight(lang, code).value; + +// Автоопределение языка +hljs.highlightAuto(code).value; +``` + + +## AMD + +Highlight.js можно использовать с загрузчиком AMD-модулей. Для этого его +нужно собрать из исходников следующей командой: + +```bash +$ python3 tools/build.py -tamd lang1 lang2 .. +``` + +Она создаст файл `build/highlight.pack.js`, который является загружаемым +AMD-модулем и содержит все выбранные при сборке языки. Используется он так: + +```javascript +require(["highlight.js/build/highlight.pack"], function(hljs){ + + // Если вы знаете язык + hljs.highlight(lang, code).value; + + // Автоопределение языка + hljs.highlightAuto(code).value; +}); +``` + + +## Замена TABов + +Также вы можете заменить символы TAB ('\x09'), используемые для отступов, на +фиксированное количество пробелов или на отдельный ``, чтобы задать ему +какой-нибудь специальный стиль: + +```html + +``` + + +## Инициализация вручную + +Если вы используете другие теги для блоков кода, вы можете инициализировать их +явно с помощью функции `highlightBlock(code, tabReplace, useBR)`. Она принимает +DOM-элемент с текстом расцвечиваемого кода и опционально - строчку для замены +символов TAB. + +Например с использованием jQuery код инициализации может выглядеть так: + +```javascript +$(document).ready(function() { + $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); +}); +``` + +`highlightBlock` можно также использовать, чтобы подсветить блоки кода, +добавленные на страницу динамически. Только убедитесь, что вы не делаете этого +повторно для уже раскрашенных блоков. + +Если ваш блок кода использует `
` вместо переводов строки (т.е. если это не +`
`), передайте `true` третьим параметром в `highlightBlock`:
+
+```javascript
+$('div.code').each(function(i, e) {hljs.highlightBlock(e, null, true)});
+```
+
+
+## Эвристика
+
+Определение языка, на котором написан фрагмент, делается с помощью
+довольно простой эвристики: программа пытается расцветить фрагмент всеми
+языками подряд, и для каждого языка считает количество подошедших
+синтаксически конструкций и ключевых слов. Для какого языка нашлось больше,
+тот и выбирается.
+
+Это означает, что в коротких фрагментах высока вероятность ошибки, что
+периодически и случается. Чтобы указать язык фрагмента явно, надо написать
+его название в виде класса к элементу ``:
+
+```html
+
...
+``` + +Можно использовать рекомендованные в HTML5 названия классов: +"language-html", "language-php". Также можно назначать классы на элемент +`
`.
+
+Чтобы запретить расцветку фрагмента вообще, используется класс "no-highlight":
+
+```html
+
...
+``` + + +## Экспорт + +В файле export.html находится небольшая программка, которая показывает и дает +скопировать непосредственно HTML-код подсветки для любого заданного фрагмента кода. +Это может понадобится например на сайте, на котором нельзя подключить сам скрипт +highlight.js. + + +## Координаты + +- Версия: 7.5 +- URL: http://highlightjs.org/ + +Лицензионное соглашение читайте в файле LICENSE. +Список авторов и соавторов читайте в файле AUTHORS.ru.txt diff --git a/js/highlight/classref.txt b/js/highlight/classref.txt new file mode 100644 index 0000000..8113987 --- /dev/null +++ b/js/highlight/classref.txt @@ -0,0 +1,733 @@ +This is a full list of available classes corresponding to languages' +syntactic structures. The parentheses after language name contain identifiers +used as class names in `` element. + +Python ("python"): + + keyword keyword + built_in built-in objects (None, False, True and Ellipsis) + number number + string string (of any type) + comment comment + decorator @-decorator for functions + function function header "def some_name(...):" + class class header "class SomeName(...):" + title name of a function or a class inside a header + params everything inside parentheses in a function's or class' header + +Python profiler results ("profile"): + + number number + string string + built_in built-in function entry + filename filename in an entry + summary profiling summary + header header of table of results + keyword column header + function function name in an entry (including parentheses) + title actual name of a function in an entry (excluding parentheses) + prompt interpreter prompt (>>> or ...) + +Ruby ("ruby"): + + keyword keyword + string string + subst in-string substitution (#{...}) + comment comment + yardoctag YARD tag + function function header "def some_name(...):" + class class header "class SomeName(...):" + title name of a function or a class inside a header + parent name of a parent class + symbol symbol + +Haml ("haml"): + + tag any tag starting with "%" + title tag's name + attribute tag's attribute + keyword tag's attribute that is a keyword + string attribute's value that is a string + value attribute's value, shorthand id or class for tag + comment comment + doctype !!! declaration + bullet line defined by variable + +Perl ("perl"): + + keyword keyword + comment comment + number number + string string + regexp regular expression + sub subroutine header (from "sub" till "{") + variable variable starting with "$", "%", "@" + operator operator + pod plain old doc + +PHP ("php"): + + keyword keyword + number number + string string (of any type) + comment comment + phpdoc phpdoc params in comments + variable variable starting with "$" + preprocessor preprocessor marks: "" + +Scala ("scala"): + + keyword keyword + number number + string string + comment comment + annotation annotation + javadoc javadoc comment + javadoctag @-tag in javadoc + class class header + title class name inside a header + params everything in parentheses inside a class header + inheritance keywords "extends" and "with" inside class header + +Go ("go"): + + comment comment + string string constant + number number + keyword language keywords + constant true false nil iota + typename built-in plain types (int, string etc.) + built_in built-in functions + +HTML, XML ("xml"): + + tag any tag from "<" till ">" + attribute tag's attribute with or without value + value attribute's value + comment comment + pi processing instruction () + doctype declaration + cdata CDATA section + +Lasso ("lasso"): + + preprocessor delimiters and interpreter flags + shebang Lasso 9 shell script header + comment single- or multi-line comment + javadoc doc comment + keyword keyword + literal keyword representing a value + built_in built-in types and variables + number number + string string + variable variable reference starting with "#" or "$" + tag tag literal + attribute named or rest parameter in method signature + class type, trait, or method header + title name following "define" inside a header + +CSS ("css"): + + tag tag in selectors + id #some_name in selectors + class .some_name in selectors + at_rule @-rule till first "{" or ";" + attr_selector attribute selector (square brackets in a[href^=http://]) + pseudo pseudo classes and elemens (:after, ::after etc.) + comment comment + rules everything from "{" till "}" + attribute property name inside a rule + value property value inside a rule, from ":" till ";" or + till the end of rule block + number number within a value + string string within a value + hexcolor hex color (#FFFFFF) within a value + function CSS function within a value + important "!important" symbol + +SCSS ("scss"): + + tag tag in selectors + id #some_name in selectors + class .some_name in selectors + at_rule @-rule till first "{" or ";" + attr_selector attribute selector (square brackets in a[href^=http://]) + pseudo pseudo classes and elemens (:after, ::after etc.) + comment comment + rules everything from "{" till "}" + attribute property name inside a rule + value property value inside a rule, from ":" till ";" or + till the end of rule block + number number within a value + string string within a value + hexcolor hex color (#FFFFFF) within a value + function CSS function within a value + important "!important" symbol + variable variable starting with "$" + preprocessor keywords after @ + +Markdown ("markdown"): + + header header + bullet list bullet + emphasis emphasis + strong strong emphasis + blockquote blockquote + code code + horizontal_rule horizontal rule + link_label link label + link_url link url + +AsciiDoc ("asciidoc"): + + header heading + bullet list or labeled bullet + emphasis emphasis + strong strong emphasis + blockquote blockquote + code inline or block code + horizontal_rule horizontal rule + link_label link or image label + link_url link or image url + comment comment + attribute document attribute, block attributes + label admonition label + +Django ("django"): + + keyword HTML tag in HTML, default tags and default filters in templates + tag any tag from "<" till ">" + comment comment + doctype declaration + attribute tag's attribute with or withou value + value attribute's value + template_tag template tag {% .. %} + variable template variable {{ .. }} + template_comment template comment, both {# .. #} and {% comment %} + filter filter from "|" till the next filter or the end of tag + argument filter argument + +Handlebars ("handlebars"): + + expression expression to be evaluated + variable variable + begin-block the beginning of a block + end-block the ending of a block + string string + +JSON ("json"): + + number number + literal "true", "false" and "null" + string string value + attribute name of an object property + value value of an object property + +JavaScript ("javascript"): + + keyword keyword + comment comment + number number + literal special literal: "true", "false" and "null" + string string + regexp regular expression + function header of a function + title name of a function inside a header + params parentheses and everything inside them in a function's header + +CoffeeScript ("coffeescript"): + + keyword keyword + comment comment + number number + literal special literal: "true", "false" and "null" + built_in built-in objects and functions ("window", "console", "require", etc...) + string string + subst #{ ... } interpolation in double-quoted strings + regexp regular expression + function header of a function + class header of a class + title name of a function variable inside a header + params parentheses and everything inside them in a function's header + property @-property within class and functions + +ActionScript ("actionscript"): + + comment comment + string string + number number + keyword keywords + literal literal + reserved reserved keyword + title name of declaration (package, class or function) + preprocessor preprocessor directive (import, include) + type type of returned value (for functions) + package package (named or not) + class class/interface + function function + param params of function + rest_arg rest argument of function + +VBScript ("vbscript"): + + keyword keyword + number number + string string + comment comment + built_in built-in function + +VB.Net ("vbnet"): + + keyword keyword + built_in built-in types + literal "true", "false" and "nothing" + string string + comment comment + xmlDocTag xmldoc tag ("'''", "", "<..>") + preprocessor preprocessor directive + +HTTP ("http"): + + request first line of a request + status first line of a response + attribute header name + string header value or query string in a request line + number status code + +Lua ("lua"): + + keyword keyword + number number + string string + comment comment + built_in built-in operator + function header of a function + title name of a function inside a header + params everything inside parentheses in a function's header + long_brackets multiline string in [=[ .. ]=] + +Delphi ("delphi"): + + keyword keyword + comment comment (of any type) + number number + string string + function header of a function, procedure, constructor and destructor + title name of a function, procedure, constructor or destructor + inside a header + params everything inside parentheses in a function's header + class class' body from "= class" till "end;" + +Java ("java"): + + keyword keyword + number number + string string + comment commment + annotaion annotation + javadoc javadoc comment + class class header from "class" till "{" + title class name inside a header + params everything in parentheses inside a class header + inheritance keywords "extends" and "implements" inside class header + +C++ ("cpp"): + + keyword keyword + number number + string string and character + comment comment + preprocessor preprocessor directive + stl_container instantiation of STL containers ("vector<...>") + +Objective C ("objectivec"): + + keyword keyword + built_in Cocoa/Cocoa Touch constants and classes + number number + string string + comment comment + preprocessor preprocessor directive + class interface/implementation, protocol and forward class declaration + variable properties and struct accesors + +Vala ("vala"): + + keyword keyword + number number + string string + comment comment + class class definitions + title in class definition + constant ALL_UPPER_CASE + +C# ("cs"): + + keyword keyword + number number + string string + comment commment + xmlDocTag xmldoc tag ("///", "", "<..>") + +F# ("fsharp"): + + keywords keyword + number number + string string + commment comment + class any custom F# type + title the name of a custom F# type + annotation any attribute + +OCaml ("ocaml"): + keywords keyword + number number + string string + commment comment + class any custom OCaml type + title the name of a custom OCaml type + annotation any attribute + +D ("d"): + + comment comment + string string constant + number number + keyword language keywords (including @attributes) + constant true false null + built_in built-in plain types (int, string etc.) + +RenderMan RSL ("rsl"): + + keyword keyword + number number + string string (including @"..") + comment comment + preprocessor preprocessor directive + shader sahder keywords + shading shading keywords + built_in built-in function + +RenderMan RIB ("rib"): + + keyword keyword + number number + string string + comment comment + commands command + +Maya Embedded Language ("mel"): + + keyword keyword + number number + string string + comment comment + variable variable + +SQL ("sql"): + + keyword keyword (mostly SQL'92 and SQL'99) + number number + string string (of any type: "..", '..', `..`) + comment comment + aggregate aggregate function + +Smalltalk ("smalltalk"): + + keyword keyword + number number + string string + comment commment + symbol symbol + array array + class name of a class + char char + localvars block of local variables + +Lisp ("lisp"): + + keyword keyword + number number + string string + comment commment + variable variable + literal b, t and nil + list non-quoted list + title first symbol in a non-quoted list + body remainder of the non-quoted list + quoted quoted list, both "(quote .. )" and "'(..)" + +Clojure ("clojure"): + + comment comments and hints + string string + number number + collection collections + attribute :keyword + title function name (built-in or user defined) + built_in built-in function name + +Ini ("ini"): + + title title of a section + value value of a setting of any type + string string + number number + keyword boolean value keyword + +Apache ("apache"): + + keyword keyword + number number + comment commment + literal On and Off + sqbracket variables in rewrites "%{..}" + cbracket options in rewrites "[..]" + tag begin and end of a configuration section + +Nginx ("nginx"): + + title directive title + string string + number number + comment comment + built_in built-in constant + variable $-variable + regexp regexp + +Diff ("diff"): + + header file header + chunk chunk header within a file + addition added lines + deletion deleted lines + change changed lines + +DOS ("dos"): + + keyword keyword + flow batch control keyword + stream DOS special files ("con", "prn", ...) + winutils some commands (see dos.js specifically) + envvar environment variables + +Bash ("bash"): + + keyword keyword + string string + number number + comment comment + literal special literal: "true" и "false" + variable variable + shebang script interpreter header + +Makefile ("makefile"): + + keyword keyword ".PHONY" within the phony line + string string + comment comment + variable $(..) variable + title target title + constant constant within the initial definition + +CMake ("cmake"): + + keyword keyword + number number + string string + comment commment + envvar $-variable + operator operator (LESS, STREQUAL, MATCHES, etc) + +Axapta ("axapta"): + + keyword keyword + number number + string string + comment commment + class class header from "class" till "{" + title class name inside a header + params everything in parentheses inside a class header + inheritance keywords "extends" and "implements" inside class header + preprocessor preprocessor directive + +Oracle Rules Language ("ruleslanguage"): + + comment comment + string string constant + number number + keyword language keywords + built_in built-in functions + array array stem + +1C ("1c"): + + keyword keyword + number number + date date + string string + comment commment + function header of function or procudure + title function name inside a header + params everything in parentheses inside a function header + preprocessor preprocessor directive + +AVR assembler ("avrasm"): + + keyword keyword + built_in pre-defined register + number number + string string + comment commment + label label + preprocessor preprocessor directive + localvars substitution in .macro + +VHDL ("vhdl"): + + keyword keyword + number number + string string + comment commment + literal signal logical value + typename typename + attribute signal attribute + +Parser3 ("parser3"): + + keyword keyword + number number + comment commment + variable variable starting with "$" + preprocessor preprocessor directive + title user-defined name starting with "@" + +LiveCode Server ("livecodeserver"): + + variable variable starting with "g", "t", "p", "s", "$_" + string string + comment comment + number number + title name of a command or a function + keyword keyword + constant constant + operator operator + built_in built_in functions and commands + function header of a function + command header of a command + preprocessor preprocessor marks: "" + +TeX ("tex"): + + comment comment + number number + command command + parameter parameter + formula formula + special special symbol + +Haskell ("haskell"): + + comment comment + pragma GHC pragma + preprocessor CPP preprocessor directive + keyword keyword + number number + string string + title function or variable name + type value, type or type class constructor name (i.e. capitalized) + container (..., ...) or {...; ...} list in declaration or record + module module declaration + import import declaration + class type class or instance declaration + typedef type declaration (type, newtype, data) + default default declaration + infix infix declaration + foreign FFI declaration + shebang shebang line + +Erlang ("erlang"): + + comment comment + string string + number number + keyword keyword + record_name record access (#record_name) + title name of declaration function + variable variable (starts with capital letter or with _) + pp.keywords module's attribute (-attribute) + function_name atom or atom:atom in case of function call + +Rust ("rust"): + + comment comment + string string + number number + keyword keyword + title name of declaration + preprocessor preprocessor directive + +Matlab ("matlab"): + + comment comment + string string + number number + keyword keyword + title function name + function function + param params of function + matrix matrix in [ .. ] + cell cell in { .. } + +Scilab ("scilab"): + + comment comment + string string + number number + keyword keyword + title function name + function function + param params of function + matrix matrix in [ .. ] + +R ("r"): + + comment comment + string string constant + number number + keyword language keywords (function, if) plus "structural" + functions (attach, require, setClass) + literal special literal: TRUE, FALSE, NULL, NA, etc. + +OpenGL Shading Language ("glsl"): + + comment comment + number number + preprocessor preprocessor directive + keyword keyword + built_in GLSL built-in functions and variables + literal true false + +AppleScript ("applescript"): + + keyword keyword + command core AppleScript command + constant AppleScript built in constant + type AppleScript variable type (integer, etc.) + property Applescript built in property (length, etc.) + number number + string string + comment comment + title name of a handler + +Brainfuck ("brainfuck"): + + title Brainfuck while loop command + literal Brainfuck inc and dec commands + comment comment + string Brainfuck input and output commands + +Mizar ("mizar"): + + keyword keyword + comment comment diff --git a/js/highlight/highlight.pack.js b/js/highlight/highlight.pack.js new file mode 100644 index 0000000..767bd60 --- /dev/null +++ b/js/highlight/highlight.pack.js @@ -0,0 +1 @@ +var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(//gm,">")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName.toUpperCase()=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName.toUpperCase()=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+(q.parentNode?q.parentNode.className:"")).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o"}function x(z){y+=""}function o(z){(z.event=="start"?t:x)(z.node)}while(p.length||r.length){var w=u();y+=l(v.substr(q,w[0].offset-q));q=w[0].offset;if(w==p){s.reverse().forEach(x);do{o(w.splice(0,1)[0]);w=u()}while(w==p&&w.length&&w[0].offset==q);s.reverse().forEach(t)}else{if(w[0].event=="start"){s.push(w[0].node)}else{s.pop()}o(w.splice(0,1)[0])}}return y+l(v.substr(q))}function f(r){function o(s){return(s&&s.source)||s}function p(t,s){return RegExp(o(t),"m"+(r.cI?"i":"")+(s?"g":""))}function q(z,x){if(z.compiled){return}z.compiled=true;var u=[];if(z.k){var s={};function A(B,t){if(r.cI){t=t.toLowerCase()}t.split(" ").forEach(function(C){var D=C.split("|");s[D[0]]=[B,D[1]?Number(D[1]):1];u.push(D[0])})}z.lR=p(z.l||"\\b"+hljs.IR+"\\b(?!\\.)",true);if(typeof z.k=="string"){A("keyword",z.k)}else{for(var y in z.k){if(!z.k.hasOwnProperty(y)){continue}A(y,z.k[y])}}z.k=s}if(x){if(z.bWK){z.b="\\b("+u.join("|")+")\\b(?!\\.)\\s*"}z.bR=p(z.b?z.b:"\\B|\\b");if(!z.e&&!z.eW){z.e="\\B|\\b"}if(z.e){z.eR=p(z.e)}z.tE=o(z.e)||"";if(z.eW&&x.tE){z.tE+=(z.e?"|":"")+x.tE}}if(z.i){z.iR=p(z.i)}if(z.r===undefined){z.r=1}if(!z.c){z.c=[]}for(var w=0;w'+O[0]+""}else{r+=O[0]}Q=B.lR.lastIndex;O=B.lR.exec(N)}return r+N.substr(Q)}function z(){if(B.sL&&!e[B.sL]){return l(w)}var N=B.subLanguageMode=="continuous"?B.top:undefined;var r=B.sL?d(B.sL,w,true,N):g(w);if(B.r>0){v+=r.keyword_count;A+=r.r}B.top=r.top;return''+r.value+""}function L(){return B.sL!==undefined?z():I()}function K(O,r){var N=O.cN?'':"";if(O.rB){x+=N;w=""}else{if(O.eB){x+=l(r)+N;w=""}else{x+=N;w=r}}B=Object.create(O,{parent:{value:B}})}function D(N,r){w+=N;if(r===undefined){x+=L();return 0}var P=o(r,B);if(P){x+=L();K(P,r);return P.rB?0:r.length}var Q=s(B,r);if(Q){var O=B;if(!(O.rE||O.eE)){w+=r}x+=L();do{if(B.cN){x+=""}A+=B.r;B=B.parent}while(B!=Q.parent);if(O.eE){x+=l(r)}w="";if(Q.starts){K(Q.starts,"")}return O.rE?0:r.length}if(t(r,B)){throw new Error('Illegal lexem "'+r+'" for mode "'+(B.cN||"")+'"')}w+=r;return r.length||1}var H=e[E];if(!H){throw new Error('Unknown language: "'+E+'"')}f(H);var B=M||H;var x="";for(var F=B;F!=H;F=F.parent){if(F.cN){x=''+x}}var w="";var A=0;var v=0;try{var u,q,p=0;while(true){B.t.lastIndex=p;u=B.t.exec(G);if(!u){break}q=D(G.substr(p,u.index-p),u[0]);p=u.index+q}D(G.substr(p));for(var F=B;F.parent;F=F.parent){if(F.cN){x+=""}}return{r:A,keyword_count:v,value:x,language:E,top:B}}catch(J){if(J.message.indexOf("Illegal")!=-1){return{r:0,keyword_count:0,value:l(G)}}else{throw J}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s,false);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"
")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v,true):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElementNS("http://www.w3.org/1999/xhtml","pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml","pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gim]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.bash=function(a){var c={cN:"variable",b:/\$[\w\d#@][\w\d_]*/};var b={cN:"variable",b:/\$\{(.*?)\}/};var e={cN:"string",b:/"/,e:/"/,c:[a.BE,c,b,{cN:"variable",b:/\$\(/,e:/\)/,c:a.BE}],r:0};var d={cN:"string",b:/'/,e:/'/,r:0};return{l:/-?[a-z]+/,k:{keyword:"if then else elif fi for break continue while in do done exit return set declare case esac export exec",literal:"true false",built_in:"printf echo read cd pwd pushd popd dirs let eval unset typeset readonly getopts source shopt caller type hash bind help sudo",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:true,c:[{cN:"title",b:/\w[\w\d_]*/}],r:0},a.HCM,a.NM,e,d,c,b]}}(hljs);hljs.LANGUAGES.cs=function(a){return{k:"abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long namespace new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async await ascending descending from get group into join let orderby partial select set value var where yield",c:[{cN:"comment",b:"///",e:"$",rB:true,c:[{cN:"xmlDocTag",b:"///|"},{cN:"xmlDocTag",b:""}]},a.CLCM,a.CBLCLM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line region endregion pragma checksum"},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},a.ASM,a.QSM,a.CNM]}}(hljs);hljs.LANGUAGES.brainfuck=function(a){return{c:[{cN:"comment",b:"[^\\[\\]\\.,\\+\\-<> \r\n]",rE:true,e:"[\\[\\]\\.,\\+\\-<> \r\n]",r:0},{cN:"title",b:"[\\[\\]]",r:0},{cN:"string",b:"[\\.,]",r:0},{cN:"literal",b:"[\\+\\-]"}]}}(hljs);hljs.LANGUAGES.ruby=function(e){var a="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?";var j="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var g={keyword:"and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include"};var c={cN:"yardoctag",b:"@[A-Za-z]+"};var k=[{cN:"comment",b:"#",e:"$",c:[c]},{cN:"comment",b:"^\\=begin",e:"^\\=end",c:[c],r:10},{cN:"comment",b:"^__END__",e:"\\n$"}];var d={cN:"subst",b:"#\\{",e:"}",l:a,k:g};var i=[e.BE,d];var b=[{cN:"string",b:"'",e:"'",c:i,r:0},{cN:"string",b:'"',e:'"',c:i,r:0},{cN:"string",b:"%[qw]?\\(",e:"\\)",c:i},{cN:"string",b:"%[qw]?\\[",e:"\\]",c:i},{cN:"string",b:"%[qw]?{",e:"}",c:i},{cN:"string",b:"%[qw]?<",e:">",c:i,r:10},{cN:"string",b:"%[qw]?/",e:"/",c:i,r:10},{cN:"string",b:"%[qw]?%",e:"%",c:i,r:10},{cN:"string",b:"%[qw]?-",e:"-",c:i,r:10},{cN:"string",b:"%[qw]?\\|",e:"\\|",c:i,r:10},{cN:"string",b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}];var h={cN:"function",bWK:true,e:" |$|;",k:"def",c:[{cN:"title",b:j,l:a,k:g},{cN:"params",b:"\\(",e:"\\)",l:a,k:g}].concat(k)};var f=k.concat(b.concat([{cN:"class",bWK:true,e:"$|;",k:"class module",c:[{cN:"title",b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?",r:0},{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+e.IR+"::)?"+e.IR}]}].concat(k)},h,{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:b.concat([{b:j}]),r:0},{cN:"symbol",b:a+":",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:k.concat([{cN:"regexp",b:"/",e:"/[a-z]*",i:"\\n",c:[e.BE,d]},{cN:"regexp",b:"%r{",e:"}[a-z]*",i:"\\n",c:[e.BE,d]},{cN:"regexp",b:"%r\\(",e:"\\)[a-z]*",i:"\\n",c:[e.BE,d]},{cN:"regexp",b:"%r!",e:"![a-z]*",i:"\\n",c:[e.BE,d]},{cN:"regexp",b:"%r\\[",e:"\\][a-z]*",i:"\\n",c:[e.BE,d]}]),r:0}]));d.c=f;h.c[1].c=f;return{l:a,k:g,c:f}}(hljs);hljs.LANGUAGES.diff=function(a){return{c:[{cN:"chunk",b:"^\\@\\@ +\\-\\d+,\\d+ +\\+\\d+,\\d+ +\\@\\@$",r:10},{cN:"chunk",b:"^\\*\\*\\* +\\d+,\\d+ +\\*\\*\\*\\*$",r:10},{cN:"chunk",b:"^\\-\\-\\- +\\d+,\\d+ +\\-\\-\\-\\-$",r:10},{cN:"header",b:"Index: ",e:"$"},{cN:"header",b:"=====",e:"=====$"},{cN:"header",b:"^\\-\\-\\-",e:"$"},{cN:"header",b:"^\\*{3} ",e:"$"},{cN:"header",b:"^\\+\\+\\+",e:"$"},{cN:"header",b:"\\*{5}",e:"\\*{5}$"},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}}(hljs);hljs.LANGUAGES.haml=function(a){return{cI:true,c:[{cN:"doctype",b:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$",r:10},{cN:"comment",b:"^\\s*(-#|/).*$",r:0},{b:"^\\s*-(?!#)",starts:{e:"\\n",sL:"ruby"},r:0},{cN:"tag",b:"^\\s*%",c:[{cN:"title",b:"\\w+",r:0},{cN:"value",b:"[#\\.]\\w+",r:0},{b:"{\\s*",e:"\\s*}",eE:true,c:[{b:":\\w+\\s*=>",e:",\\s+",rB:true,eW:true,r:0,c:[{cN:"symbol",b:":\\w+",r:0},{cN:"string",b:'"',e:'"',r:0},{cN:"string",b:"'",e:"'",r:0},{b:"\\w+",r:0}]},],r:0},{b:"\\(\\s*",e:"\\s*\\)",eE:true,c:[{b:"\\w+\\s*=",e:"\\s+",rB:true,eW:true,r:0,c:[{cN:"attribute",b:"\\w+",r:0},{cN:"string",b:'"',e:'"',r:0},{cN:"string",b:"'",e:"'",r:0},{b:"\\w+",r:0}]},],r:0}],r:10},{cN:"bullet",b:"^\\s*[=~]\\s*",r:0},{b:"#{",starts:{e:"}",sL:"ruby"},r:0}]}}(hljs);hljs.LANGUAGES.javascript=function(a){return{k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const",literal:"true false null undefined NaN Infinity"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,a.REGEXP_MODE,{b:/;/,sL:"xml"}],r:0},{cN:"function",bWK:true,e:/{/,k:"function",c:[{cN:"title",b:/[A-Za-z$_][0-9A-Za-z$_]*/},{cN:"params",b:/\(/,e:/\)/,c:[a.CLCM,a.CBLCLM],i:/["'\(]/}],i:/\[|%/}]}}(hljs);hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,r:0,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[b],starts:{e:"",rE:true,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"",r:0,c:[{cN:"title",b:"[^ /><]+"},b]}]}}(hljs);hljs.LANGUAGES.markdown=function(a){return{c:[{cN:"header",b:"^#{1,3}",e:"$"},{cN:"header",b:"^.+?\\n[=-]{2,}$"},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",b:"\\*.+?\\*"},{cN:"emphasis",b:"_.+?_",r:0},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",b:"`.+?`"},{cN:"code",b:"^ ",e:"$",r:0},{cN:"horizontal_rule",b:"^-{3,}",e:"$"},{b:"\\[.+?\\]\\(.+?\\)",rB:true,c:[{cN:"link_label",b:"\\[.+\\]"},{cN:"link_url",b:"\\(",e:"\\)",eB:true,eE:true}]}]}}(hljs);hljs.LANGUAGES.css=function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*";var c={cN:"function",b:b+"\\(",e:"\\)",c:["self",a.NM,a.ASM,a.QSM]};return{cI:true,i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:true,eE:true,r:0,c:[c,a.ASM,a.QSM,a.NM]}]},{cN:"tag",b:b,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[c,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}}(hljs);hljs.LANGUAGES.lisp=function(i){var l="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*";var m="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?";var k={cN:"shebang",b:"^#!",e:"$"};var a={cN:"literal",b:"\\b(t{1}|nil)\\b"};var d=[{cN:"number",b:m,r:0},{cN:"number",b:"#b[0-1]+(/[0-1]+)?"},{cN:"number",b:"#o[0-7]+(/[0-7]+)?"},{cN:"number",b:"#x[0-9a-f]+(/[0-9a-f]+)?"},{cN:"number",b:"#c\\("+m+" +"+m,e:"\\)"}];var h={cN:"string",b:'"',e:'"',c:[i.BE],r:0};var n={cN:"comment",b:";",e:"$"};var g={cN:"variable",b:"\\*",e:"\\*"};var o={cN:"keyword",b:"[:&]"+l};var b={b:"\\(",e:"\\)",c:["self",a,h].concat(d)};var e={cN:"quoted",b:"['`]\\(",e:"\\)",c:d.concat([h,g,o,b])};var c={cN:"quoted",b:"\\(quote ",e:"\\)",k:{title:"quote"},c:d.concat([h,g,o,b])};var j={cN:"list",b:"\\(",e:"\\)"};var f={eW:true,r:0};j.c=[{cN:"title",b:l},f];f.c=[e,c,j,a].concat(d).concat([h,n,g,o]);return{i:/\S/,c:d.concat([k,a,h,n,e,c,j])}}(hljs);hljs.LANGUAGES.http=function(a){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:true,e:"$",c:[{cN:"string",b:" ",e:" ",eB:true,eE:true}]},{cN:"attribute",b:"^\\w",e:": ",eE:true,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:true}}]}}(hljs);hljs.LANGUAGES.java=function(a){return{k:"false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws",c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"(^|\\s)@[A-Za-z]+"}],r:10},a.CLCM,a.CBLCLM,a.ASM,a.QSM,{cN:"class",bWK:true,e:"{",k:"class interface",eE:true,i:":",c:[{bWK:true,k:"extends implements",r:10},{cN:"title",b:a.UIR}]},a.CNM,{cN:"annotation",b:"@[A-Za-z]+"}]}}(hljs);hljs.LANGUAGES.php=function(a){var e={cN:"variable",b:"\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"};var b=[a.inherit(a.ASM,{i:null}),a.inherit(a.QSM,{i:null}),{cN:"string",b:'b"',e:'"',c:[a.BE]},{cN:"string",b:"b'",e:"'",c:[a.BE]}];var c=[a.BNM,a.CNM];var d={cN:"title",b:a.UIR};return{cI:true,l:a.UIR,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return implements parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try this switch continue endfor endif declare unset true false namespace trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[a.CLCM,a.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"}]},{cN:"comment",b:"__halt_compiler.+?;",eW:true,k:"__halt_compiler",l:a.UIR},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[a.BE]},{cN:"preprocessor",b:"<\\?php",r:10},{cN:"preprocessor",b:"\\?>"},e,{cN:"function",bWK:true,e:"{",k:"function",i:"\\$|\\[|%",c:[d,{cN:"params",b:"\\(",e:"\\)",c:["self",e,a.CBLCLM].concat(b).concat(c)}]},{cN:"class",bWK:true,e:"{",k:"class",i:"[:\\(\\$]",c:[{bWK:true,eW:true,k:"extends",c:[d]},d]},{b:"=>"}].concat(b).concat(c)}}(hljs);hljs.LANGUAGES.haskell=function(f){var h={cN:"comment",b:"--",e:"$"};var g={cN:"comment",c:["self"],b:"{-",e:"-}"};var e={cN:"pragma",b:"{-#",e:"#-}"};var b={cN:"preprocessor",b:"^#",e:"$"};var d={cN:"type",b:"\\b[A-Z][\\w']*",r:0};var c={cN:"container",b:"\\(",e:"\\)",i:'"',c:[e,h,g,b,{cN:"type",b:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},{cN:"title",b:"[_a-z][\\w']*"}]};var a={cN:"container",b:"{",e:"}",c:c.c};return{k:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",c:[{cN:"module",b:"\\bmodule ",e:"where",k:"module where",c:[c,g],i:"\\W\\.|;"},{cN:"import",b:"\\bimport ",e:"$",k:"import qualified as hiding",c:[c,h,g],i:"\\W\\.|;"},{cN:"class",b:"\\b(class |instance )",e:"where",k:"class family instance where",c:[d,c,g]},{cN:"typedef",b:"\\b(data |(new)?type )",e:"$",k:"data family type newtype deriving",c:[e,h,g,d,c,a]},{cN:"default",b:"\\bdefault ",e:"$",k:"default",c:[d,c,h,g]},{cN:"infix",b:"\\b(infix |infixl |infixr )",e:"$",k:"infix infixl infixr",c:[f.CNM,h,g]},{cN:"foreign",b:"\\bforeign ",e:"$",k:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",c:[d,f.QSM,h,g]},{cN:"shebang",b:"#!\\/usr\\/bin\\/env runhaskell",e:"$"},e,h,g,b,f.QSM,f.CNM,d,{cN:"title",b:"^[_a-z][\\w']*"},{b:"->|<-"}]}}(hljs);hljs.LANGUAGES.python=function(a){var f={cN:"prompt",b:/^(>>>|\.\.\.) /};var c=[{cN:"string",b:/(u|b)?r?'''/,e:/'''/,c:[f],r:10},{cN:"string",b:/(u|b)?r?"""/,e:/"""/,c:[f],r:10},{cN:"string",b:/(u|r|ur)'/,e:/'/,c:[a.BE],r:10},{cN:"string",b:/(u|r|ur)"/,e:/"/,c:[a.BE],r:10},{cN:"string",b:/(b|br)'/,e:/'/,c:[a.BE]},{cN:"string",b:/(b|br)"/,e:/"/,c:[a.BE]}].concat([a.ASM,a.QSM]);var e={cN:"title",b:a.UIR};var d={cN:"params",b:/\(/,e:/\)/,c:["self",a.CNM,f].concat(c)};var b={bWK:true,e:/:/,i:/[${=;\n]/,c:[e,d],r:10};return{k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:c.concat([f,a.HCM,a.inherit(b,{cN:"function",k:"def"}),a.inherit(b,{cN:"class",k:"class"}),a.CNM,{cN:"decorator",b:/@/,e:/$/},{b:/\b(print|exec)\(/}])}}(hljs);hljs.LANGUAGES.sql=function(a){return{cI:true,c:[{cN:"operator",b:"(begin|end|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant)\\b(?!:)",e:";",eW:true,k:{keyword:"all partial global month current_timestamp using go revoke smallint indicator end-exec disconnect zone with character assertion to add current_user usage input local alter match collate real then rollback get read timestamp session_user not integer bit unique day minute desc insert execute like ilike|2 level decimal drop continue isolation found where constraints domain right national some module transaction relative second connect escape close system_user for deferred section cast current sqlstate allocate intersect deallocate numeric public preserve full goto initially asc no key output collation group by union session both last language constraint column of space foreign deferrable prior connection unknown action commit view or first into float year primary cascaded except restrict set references names table outer open select size are rows from prepare distinct leading create only next inner authorization schema corresponding option declare precision immediate else timezone_minute external varying translation true case exception join hour default double scroll value cursor descriptor values dec fetch procedure delete and false int is describe char as at in varchar null trailing any absolute current_time end grant privileges when cross check write current_date pad begin temporary exec time update catalog user sql date on identity timezone_hour natural whenever interval work order cascade diagnostics nchar having left call do handler load replace truncate start lock show pragma exists number trigger if before after each row",aggregate:"count sum min max avg"},c:[{cN:"string",b:"'",e:"'",c:[a.BE,{b:"''"}],r:0},{cN:"string",b:'"',e:'"',c:[a.BE,{b:'""'}],r:0},{cN:"string",b:"`",e:"`",c:[a.BE]},a.CNM]},a.CBLCLM,{cN:"comment",b:"--",e:"$"}]}}(hljs);hljs.LANGUAGES.ini=function(a){return{cI:true,i:"[^\\s]",c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:true,k:"on off true false yes no",c:[a.QSM,a.NM],r:0}]}]}}(hljs);hljs.LANGUAGES.perl=function(e){var a="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when";var d={cN:"subst",b:"[$@]\\{",e:"\\}",k:a,r:10};var b={cN:"variable",b:"\\$\\d"};var i={cN:"variable",b:"[\\$\\%\\@\\*](\\^\\w\\b|#\\w+(\\:\\:\\w+)*|[^\\s\\w{]|{\\w+}|\\w+(\\:\\:\\w*)*)"};var f=[e.BE,d,b,i];var h={b:"->",c:[{b:e.IR},{b:"{",e:"}"}]};var g={cN:"comment",b:"^(__END__|__DATA__)",e:"\\n$",r:5};var c=[b,i,e.HCM,g,{cN:"comment",b:"^\\=\\w",e:"\\=cut",eW:true},h,{cN:"string",b:"q[qwxr]?\\s*\\(",e:"\\)",c:f,r:5},{cN:"string",b:"q[qwxr]?\\s*\\[",e:"\\]",c:f,r:5},{cN:"string",b:"q[qwxr]?\\s*\\{",e:"\\}",c:f,r:5},{cN:"string",b:"q[qwxr]?\\s*\\|",e:"\\|",c:f,r:5},{cN:"string",b:"q[qwxr]?\\s*\\<",e:"\\>",c:f,r:5},{cN:"string",b:"qw\\s+q",e:"q",c:f,r:5},{cN:"string",b:"'",e:"'",c:[e.BE],r:0},{cN:"string",b:'"',e:'"',c:f,r:0},{cN:"string",b:"`",e:"`",c:[e.BE]},{cN:"string",b:"{\\w+}",r:0},{cN:"string",b:"-?\\w+\\s*\\=\\>",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"("+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,g,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"sub",bWK:true,e:"(\\s*\\(.*?\\))?[;{]",k:"sub",r:5},{cN:"operator",b:"-\\w\\b",r:0}];d.c=c;h.c[1].c=c;return{k:a,c:c}}(hljs);hljs.LANGUAGES.ocaml=function(a){return{k:{keyword:"and as assert asr begin class constraint do done downto else end exception external false for fun function functor if in include inherit initializer land lazy let lor lsl lsr lxor match method mod module mutable new object of open or private rec ref sig struct then to true try type val virtual when while with parser value",built_in:"bool char float int list unit array exn option int32 int64 nativeint format4 format6 lazy_t in_channel out_channel string",},i:/\/\//,c:[{cN:"string",b:'"""',e:'"""'},{cN:"comment",b:"\\(\\*",e:"\\*\\)",c:["self"]},{cN:"class",bWK:true,e:"\\(|=|$",k:"type",c:[{cN:"title",b:a.UIR}]},{cN:"annotation",b:"\\[<",e:">\\]"},a.CBLCLM,a.inherit(a.ASM,{i:null}),a.inherit(a.QSM,{i:null}),a.CNM]}}(hljs);hljs.LANGUAGES.objectivec=function(a){var b={keyword:"int float while private char catch export sizeof typedef const struct for union unsigned long volatile static protected bool mutable if public do return goto void enum else break extern asm case short default double throw register explicit signed typename try this switch continue wchar_t inline readonly assign property self synchronized end synthesize id optional required nonatomic super unichar finally dynamic IBOutlet IBAction selector strong weak readonly",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"NSString NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController UINavigationBar UINavigationController UITabBarController UIPopoverController UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor UIFont UIApplication NSNotFound NSNotificationCenter NSNotification UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection UIInterfaceOrientation MPMoviePlayerController dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"};return{k:b,i:""}]},{cN:"preprocessor",b:"#",e:"$"},{cN:"class",bWK:true,e:"({|$)",k:"interface class protocol implementation",c:[{cN:"id",b:a.UIR}]},{cN:"variable",b:"\\."+a.UIR,r:0}]}}(hljs);hljs.LANGUAGES.coffeescript=function(c){var b={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",reserved:"case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf",built_in:"npm require console print module exports global window document"};var a="[A-Za-z$_][0-9A-Za-z$_]*";var f={cN:"title",b:a};var e={cN:"subst",b:"#\\{",e:"}",k:b,};var d=[c.BNM,c.inherit(c.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",b:"'''",e:"'''",c:[c.BE]},{cN:"string",b:"'",e:"'",c:[c.BE],r:0},{cN:"string",b:'"""',e:'"""',c:[c.BE,e]},{cN:"string",b:'"',e:'"',c:[c.BE,e],r:0},{cN:"regexp",b:"///",e:"///",c:[c.HCM]},{cN:"regexp",b:"//[gim]*",r:0},{cN:"regexp",b:"/\\S(\\\\.|[^\\n])*?/[gim]*(?=\\s|\\W|$)"},{cN:"property",b:"@"+a},{b:"`",e:"`",eB:true,eE:true,sL:"javascript"}];e.c=d;return{k:b,c:d.concat([{cN:"comment",b:"###",e:"###"},c.HCM,{cN:"function",b:"("+a+"\\s*=\\s*)?(\\(.*\\))?\\s*[-=]>",e:"[-=]>",rB:true,c:[f,{cN:"params",b:"\\(",rB:true,c:[{b:/\(/,e:/\)/,k:b,c:["self"].concat(d)}]}]},{cN:"class",bWK:true,k:"class",e:"$",i:"[:\\[\\]]",c:[{bWK:true,k:"extends",eW:true,i:":",c:[f]},f]},{cN:"attribute",b:a+":",e:":",rB:true,eE:true}])}}(hljs);hljs.LANGUAGES.r=function(a){var b="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{c:[a.HCM,{b:b,l:b,k:{keyword:"function if in break next repeat else for return switch while try tryCatch|10 stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...|10",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},r:0},{cN:"number",b:"0[xX][0-9a-fA-F]+[Li]?\\b",r:0},{cN:"number",b:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",r:0},{cN:"number",b:"\\d+\\.(?!\\d)(?:i\\b)?",r:0},{cN:"number",b:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{cN:"number",b:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{b:"`",e:"`",r:0},{cN:"string",b:'"',e:'"',c:[a.BE],r:0},{cN:"string",b:"'",e:"'",c:[a.BE],r:0}]}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs);hljs.LANGUAGES.apache=function(a){var b={cN:"number",b:"[\\$%]\\d+"};return{cI:true,c:[a.HCM,{cN:"tag",b:""},{cN:"keyword",b:/\w+/,r:0,k:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"sqbracket",b:"\\s\\[",e:"\\]$"},{cN:"cbracket",b:"[\\$%]\\{",e:"\\}",c:["self",b]},b,a.QSM]}}],i:/\S/}}(hljs);hljs.LANGUAGES.scss=function(a){var c="[a-zA-Z-][a-zA-Z0-9_-]*";var d={cN:"function",b:c+"\\(",e:"\\)",c:["self",a.NM,a.ASM,a.QSM]};var b={cN:"hexcolor",b:"#[0-9A-Fa-f]+"};var e={cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[d,b,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"important",b:"!important"}]}};return{cI:true,i:"[=/|']",c:[a.CLCM,a.CBLCLM,{cN:"function",b:c+"\\(",e:"\\)",c:["self",a.NM,a.ASM,a.QSM]},{cN:"id",b:"\\#[A-Za-z0-9_-]+",r:0},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"tag",b:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",r:0},{cN:"pseudo",b:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{cN:"pseudo",b:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},{cN:"attribute",b:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",i:"[^\\s]"},{cN:"value",b:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{cN:"value",b:":",e:";",c:[b,a.NM,a.QSM,a.ASM,{cN:"important",b:"!important"}]},{cN:"at_rule",b:"@",e:"[{;]",k:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",c:[d,a.QSM,a.ASM,b,a.NM,{cN:"preprocessor",b:"\\s[A-Za-z0-9_.-]+",r:0}]}]}}(hljs);hljs.LANGUAGES.cpp=function(a){var b={keyword:"false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long throw volatile static protected bool template mutable if public friend do return goto auto void enum else break new extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex",built_in:"std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr"};return{k:b,i:"",i:"\\n"},a.CLCM]},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:b,r:10,c:["self"]}]}}(hljs);hljs.LANGUAGES.makefile=function(a){var b={cN:"variable",b:/\$\(/,e:/\)/,c:a.BE};return{c:[a.HCM,{b:/^\w+\s*\W*=/,rB:true,r:0,starts:{cN:"constant",e:/\s*\W*=/,eE:true,starts:{e:/$/,r:0,c:[b],}}},{cN:"title",b:/^[\w]+:\s*$/},{cN:"phony",b:/^\.PHONY:/,e:/$/,k:".PHONY",l:/[\.\w]+/},{b:/^\t+/,e:/$/,c:[a.QSM,b]}]}}(hljs);hljs.LANGUAGES.clojure=function(l){var e={built_in:"def cond apply if-not if-let if not not= = < < > <= <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for doseq dosync dotimes and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import intern refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! import use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if throw printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time ns assert re-find re-groups rand-int rand mod locking assert-valid-fdecl alias namespace resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! memfn to-array future future-call into-array aset gen-class reduce merge map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"};var f="[a-zA-Z_0-9\\!\\.\\?\\-\\+\\*\\/\\<\\=\\>\\&\\#\\$';]+";var a="[\\s:\\(\\{]+\\d+(\\.\\d+)?";var d={cN:"number",b:a,r:0};var j={cN:"string",b:'"',e:'"',c:[l.BE],r:0};var o={cN:"comment",b:";",e:"$",r:0};var n={cN:"collection",b:"[\\[\\{]",e:"[\\]\\}]"};var c={cN:"comment",b:"\\^"+f};var b={cN:"comment",b:"\\^\\{",e:"\\}"};var h={cN:"attribute",b:"[:]"+f};var m={cN:"list",b:"\\(",e:"\\)"};var g={eW:true,k:{literal:"true false nil"},r:0};var i={k:e,l:f,cN:"title",b:f,starts:g};m.c=[{cN:"comment",b:"comment"},i,g];g.c=[m,j,c,b,o,h,n,d];n.c=[m,j,c,o,h,n,d];return{i:/\S/,c:[o,m]}}(hljs); \ No newline at end of file diff --git a/js/highlight/highlight.zip b/js/highlight/highlight.zip new file mode 100644 index 0000000..30e3fa4 Binary files /dev/null and b/js/highlight/highlight.zip differ diff --git a/js/highlight/styles/arta.css b/js/highlight/styles/arta.css new file mode 100644 index 0000000..e224db8 --- /dev/null +++ b/js/highlight/styles/arta.css @@ -0,0 +1,160 @@ +/* +Date: 17.V.2011 +Author: pumbur +*/ + +pre code +{ + display: block; padding: 0.5em; + background: #222; +} + +pre .profile .header *, +pre .ini .title, +pre .nginx .title +{ + color: #fff; +} + +pre .comment, +pre .javadoc, +pre .preprocessor, +pre .preprocessor .title, +pre .pragma, +pre .shebang, +pre .profile .summary, +pre .diff, +pre .pi, +pre .doctype, +pre .tag, +pre .template_comment, +pre .css .rules, +pre .tex .special +{ + color: #444; +} + +pre .string, +pre .symbol, +pre .diff .change, +pre .regexp, +pre .xml .attribute, +pre .smalltalk .char, +pre .xml .value, +pre .ini .value, +pre .clojure .attribute, +pre .coffeescript .attribute +{ + color: #ffcc33; +} + +pre .number, +pre .addition +{ + color: #00cc66; +} + +pre .built_in, +pre .literal, +pre .vhdl .typename, +pre .go .constant, +pre .go .typename, +pre .ini .keyword, +pre .lua .title, +pre .perl .variable, +pre .php .variable, +pre .mel .variable, +pre .django .variable, +pre .css .funtion, +pre .smalltalk .method, +pre .hexcolor, +pre .important, +pre .flow, +pre .inheritance, +pre .parser3 .variable +{ + color: #32AAEE; +} + +pre .keyword, +pre .tag .title, +pre .css .tag, +pre .css .class, +pre .css .id, +pre .css .pseudo, +pre .css .attr_selector, +pre .lisp .title, +pre .clojure .built_in, +pre .winutils, +pre .tex .command, +pre .request, +pre .status +{ + color: #6644aa; +} + +pre .title, +pre .ruby .constant, +pre .vala .constant, +pre .parent, +pre .deletion, +pre .template_tag, +pre .css .keyword, +pre .objectivec .class .id, +pre .smalltalk .class, +pre .lisp .keyword, +pre .apache .tag, +pre .nginx .variable, +pre .envvar, +pre .bash .variable, +pre .go .built_in, +pre .vbscript .built_in, +pre .lua .built_in, +pre .rsl .built_in, +pre .tail, +pre .avrasm .label, +pre .tex .formula, +pre .tex .formula * +{ + color: #bb1166; +} + +pre .yardoctag, +pre .phpdoc, +pre .profile .header, +pre .ini .title, +pre .apache .tag, +pre .parser3 .title +{ + font-weight: bold; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata +{ + opacity: 0.6; +} + +pre code, +pre .javascript, +pre .css, +pre .xml, +pre .subst, +pre .diff .chunk, +pre .css .value, +pre .css .attribute, +pre .lisp .string, +pre .lisp .number, +pre .tail .params, +pre .container, +pre .haskell *, +pre .erlang *, +pre .erlang_repl * +{ + color: #aaa; +} diff --git a/js/highlight/styles/ascetic.css b/js/highlight/styles/ascetic.css new file mode 100644 index 0000000..63349b7 --- /dev/null +++ b/js/highlight/styles/ascetic.css @@ -0,0 +1,50 @@ +/* + +Original style from softwaremaniacs.org (c) Ivan Sagalaev + +*/ + +pre code { + display: block; padding: 0.5em; + background: white; color: black; +} + +pre .string, +pre .tag .value, +pre .filter .argument, +pre .addition, +pre .change, +pre .apache .tag, +pre .apache .cbracket, +pre .nginx .built_in, +pre .tex .formula { + color: #888; +} + +pre .comment, +pre .template_comment, +pre .shebang, +pre .doctype, +pre .pi, +pre .javadoc, +pre .deletion, +pre .apache .sqbracket { + color: #CCC; +} + +pre .keyword, +pre .tag .title, +pre .ini .title, +pre .lisp .title, +pre .clojure .title, +pre .http .title, +pre .nginx .title, +pre .css .tag, +pre .winutils, +pre .flow, +pre .apache .tag, +pre .tex .command, +pre .request, +pre .status { + font-weight: bold; +} diff --git a/js/highlight/styles/brown_paper.css b/js/highlight/styles/brown_paper.css new file mode 100644 index 0000000..46ce452 --- /dev/null +++ b/js/highlight/styles/brown_paper.css @@ -0,0 +1,105 @@ +/* + +Brown Paper style from goldblog.com.ua (c) Zaripov Yura + +*/ + +pre code { + display: block; padding: 0.5em; + background:#b7a68e url(./brown_papersq.png); +} + +pre .keyword, +pre .literal, +pre .change, +pre .winutils, +pre .flow, +pre .lisp .title, +pre .clojure .built_in, +pre .nginx .title, +pre .tex .special, +pre .request, +pre .status { + color:#005599; + font-weight:bold; +} + +pre code, +pre .subst, +pre .tag .keyword { + color: #363C69; +} + +pre .string, +pre .title, +pre .haskell .type, +pre .tag .value, +pre .css .rules .value, +pre .preprocessor, +pre .pragma, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .ruby .class .parent, +pre .built_in, +pre .sql .aggregate, +pre .django .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .javadoc, +pre .ruby .string, +pre .django .filter .argument, +pre .smalltalk .localvars, +pre .smalltalk .array, +pre .attr_selector, +pre .pseudo, +pre .addition, +pre .stream, +pre .envvar, +pre .apache .tag, +pre .apache .cbracket, +pre .tex .number { + color: #2C009F; +} + +pre .comment, +pre .java .annotation, +pre .python .decorator, +pre .template_comment, +pre .pi, +pre .doctype, +pre .deletion, +pre .shebang, +pre .apache .sqbracket, +pre .nginx .built_in, +pre .tex .formula { + color: #802022; +} + +pre .keyword, +pre .literal, +pre .css .id, +pre .phpdoc, +pre .title, +pre .haskell .type, +pre .vbscript .built_in, +pre .sql .aggregate, +pre .rsl .built_in, +pre .smalltalk .class, +pre .diff .header, +pre .chunk, +pre .winutils, +pre .bash .variable, +pre .apache .tag, +pre .tex .command { + font-weight: bold; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.8; +} diff --git a/js/highlight/styles/brown_papersq.png b/js/highlight/styles/brown_papersq.png new file mode 100644 index 0000000..3813903 Binary files /dev/null and b/js/highlight/styles/brown_papersq.png differ diff --git a/js/highlight/styles/dark.css b/js/highlight/styles/dark.css new file mode 100644 index 0000000..07fd56e --- /dev/null +++ b/js/highlight/styles/dark.css @@ -0,0 +1,105 @@ +/* + +Dark style from softwaremaniacs.org (c) Ivan Sagalaev + +*/ + +pre code { + display: block; padding: 0.5em; + background: #444; +} + +pre .keyword, +pre .literal, +pre .change, +pre .winutils, +pre .flow, +pre .lisp .title, +pre .clojure .built_in, +pre .nginx .title, +pre .tex .special { + color: white; +} + +pre code, +pre .subst { + color: #DDD; +} + +pre .string, +pre .title, +pre .haskell .type, +pre .ini .title, +pre .tag .value, +pre .css .rules .value, +pre .preprocessor, +pre .pragma, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .ruby .class .parent, +pre .built_in, +pre .sql .aggregate, +pre .django .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .javadoc, +pre .ruby .string, +pre .django .filter .argument, +pre .smalltalk .localvars, +pre .smalltalk .array, +pre .attr_selector, +pre .pseudo, +pre .addition, +pre .stream, +pre .envvar, +pre .apache .tag, +pre .apache .cbracket, +pre .tex .command, +pre .prompt, +pre .coffeescript .attribute { + color: #D88; +} + +pre .comment, +pre .java .annotation, +pre .python .decorator, +pre .template_comment, +pre .pi, +pre .doctype, +pre .deletion, +pre .shebang, +pre .apache .sqbracket, +pre .tex .formula { + color: #777; +} + +pre .keyword, +pre .literal, +pre .title, +pre .css .id, +pre .phpdoc, +pre .haskell .type, +pre .vbscript .built_in, +pre .sql .aggregate, +pre .rsl .built_in, +pre .smalltalk .class, +pre .diff .header, +pre .chunk, +pre .winutils, +pre .bash .variable, +pre .apache .tag, +pre .tex .special, +pre .request, +pre .status { + font-weight: bold; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} diff --git a/js/highlight/styles/default.css b/js/highlight/styles/default.css new file mode 100644 index 0000000..f46bcac --- /dev/null +++ b/js/highlight/styles/default.css @@ -0,0 +1,153 @@ +/* + +Original style from softwaremaniacs.org (c) Ivan Sagalaev + +*/ + +pre code { + display: block; padding: 0.5em; + background: #F0F0F0; +} + +pre code, +pre .subst, +pre .tag .title, +pre .lisp .title, +pre .clojure .built_in, +pre .nginx .title { + color: black; +} + +pre .string, +pre .title, +pre .constant, +pre .parent, +pre .tag .value, +pre .rules .value, +pre .rules .value .number, +pre .preprocessor, +pre .pragma, +pre .haml .symbol, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .aggregate, +pre .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .addition, +pre .flow, +pre .stream, +pre .bash .variable, +pre .apache .tag, +pre .apache .cbracket, +pre .tex .command, +pre .tex .special, +pre .erlang_repl .function_or_atom, +pre .asciidoc .header, +pre .markdown .header, +pre .coffeescript .attribute { + color: #800; +} + +pre .smartquote, +pre .comment, +pre .annotation, +pre .template_comment, +pre .diff .header, +pre .chunk, +pre .asciidoc .blockquote, +pre .markdown .blockquote { + color: #888; +} + +pre .number, +pre .date, +pre .regexp, +pre .literal, +pre .hexcolor, +pre .smalltalk .symbol, +pre .smalltalk .char, +pre .go .constant, +pre .change, +pre .lasso .variable, +pre .makefile .variable, +pre .asciidoc .bullet, +pre .markdown .bullet, +pre .asciidoc .link_url, +pre .markdown .link_url { + color: #080; +} + +pre .label, +pre .javadoc, +pre .ruby .string, +pre .decorator, +pre .filter .argument, +pre .localvars, +pre .array, +pre .attr_selector, +pre .important, +pre .pseudo, +pre .pi, +pre .haml .bullet, +pre .doctype, +pre .deletion, +pre .envvar, +pre .shebang, +pre .apache .sqbracket, +pre .nginx .built_in, +pre .tex .formula, +pre .erlang_repl .reserved, +pre .prompt, +pre .asciidoc .link_label, +pre .markdown .link_label, +pre .vhdl .attribute, +pre .clojure .attribute, +pre .asciidoc .attribute, +pre .lasso .attribute, +pre .coffeescript .property, +pre .makefile .phony { + color: #88F +} + +pre .keyword, +pre .id, +pre .title, +pre .built_in, +pre .aggregate, +pre .css .tag, +pre .javadoctag, +pre .phpdoc, +pre .yardoctag, +pre .smalltalk .class, +pre .winutils, +pre .bash .variable, +pre .apache .tag, +pre .go .typename, +pre .tex .command, +pre .asciidoc .strong, +pre .markdown .strong, +pre .request, +pre .status { + font-weight: bold; +} + +pre .asciidoc .emphasis, +pre .markdown .emphasis { + font-style: italic; +} + +pre .nginx .built_in { + font-weight: normal; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .lasso .markup, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} diff --git a/js/highlight/styles/docco.css b/js/highlight/styles/docco.css new file mode 100644 index 0000000..e0b6f8c --- /dev/null +++ b/js/highlight/styles/docco.css @@ -0,0 +1,132 @@ +/* +Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars) +*/ + +pre code { + display: block; padding: 0.5em; + color: #000; + background: #f8f8ff +} + +pre .comment, +pre .template_comment, +pre .diff .header, +pre .javadoc { + color: #408080; + font-style: italic +} + +pre .keyword, +pre .assignment, +pre .literal, +pre .css .rule .keyword, +pre .winutils, +pre .javascript .title, +pre .lisp .title, +pre .subst { + color: #954121; +} + +pre .number, +pre .hexcolor { + color: #40a070 +} + +pre .string, +pre .tag .value, +pre .phpdoc, +pre .tex .formula { + color: #219161; +} + +pre .title, +pre .id { + color: #19469D; +} +pre .params { + color: #00F; +} + +pre .javascript .title, +pre .lisp .title, +pre .subst { + font-weight: normal +} + +pre .class .title, +pre .haskell .label, +pre .tex .command { + color: #458; + font-weight: bold +} + +pre .tag, +pre .tag .title, +pre .rules .property, +pre .django .tag .keyword { + color: #000080; + font-weight: normal +} + +pre .attribute, +pre .variable, +pre .instancevar, +pre .lisp .body { + color: #008080 +} + +pre .regexp { + color: #B68 +} + +pre .class { + color: #458; + font-weight: bold +} + +pre .symbol, +pre .ruby .symbol .string, +pre .ruby .symbol .keyword, +pre .ruby .symbol .keymethods, +pre .lisp .keyword, +pre .tex .special, +pre .input_number { + color: #990073 +} + +pre .builtin, +pre .constructor, +pre .built_in, +pre .lisp .title { + color: #0086b3 +} + +pre .preprocessor, +pre .pragma, +pre .pi, +pre .doctype, +pre .shebang, +pre .cdata { + color: #999; + font-weight: bold +} + +pre .deletion { + background: #fdd +} + +pre .addition { + background: #dfd +} + +pre .diff .change { + background: #0086b3 +} + +pre .chunk { + color: #aaa +} + +pre .tex .formula { + opacity: 0.5; +} diff --git a/js/highlight/styles/far.css b/js/highlight/styles/far.css new file mode 100644 index 0000000..728c2df --- /dev/null +++ b/js/highlight/styles/far.css @@ -0,0 +1,113 @@ +/* + +FAR Style (c) MajestiC + +*/ + +pre code { + display: block; padding: 0.5em; + background: #000080; +} + +pre code, +pre .subst { + color: #0FF; +} + +pre .string, +pre .ruby .string, +pre .haskell .type, +pre .tag .value, +pre .css .rules .value, +pre .css .rules .value .number, +pre .preprocessor, +pre .pragma, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .built_in, +pre .sql .aggregate, +pre .django .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .addition, +pre .apache .tag, +pre .apache .cbracket, +pre .tex .command, +pre .clojure .title, +pre .coffeescript .attribute { + color: #FF0; +} + +pre .keyword, +pre .css .id, +pre .title, +pre .haskell .type, +pre .vbscript .built_in, +pre .sql .aggregate, +pre .rsl .built_in, +pre .smalltalk .class, +pre .xml .tag .title, +pre .winutils, +pre .flow, +pre .change, +pre .envvar, +pre .bash .variable, +pre .tex .special, +pre .clojure .built_in { + color: #FFF; +} + +pre .comment, +pre .phpdoc, +pre .javadoc, +pre .java .annotation, +pre .template_comment, +pre .deletion, +pre .apache .sqbracket, +pre .tex .formula { + color: #888; +} + +pre .number, +pre .date, +pre .regexp, +pre .literal, +pre .smalltalk .symbol, +pre .smalltalk .char, +pre .clojure .attribute { + color: #0F0; +} + +pre .python .decorator, +pre .django .filter .argument, +pre .smalltalk .localvars, +pre .smalltalk .array, +pre .attr_selector, +pre .pseudo, +pre .xml .pi, +pre .diff .header, +pre .chunk, +pre .shebang, +pre .nginx .built_in, +pre .prompt { + color: #008080; +} + +pre .keyword, +pre .css .id, +pre .title, +pre .haskell .type, +pre .vbscript .built_in, +pre .sql .aggregate, +pre .rsl .built_in, +pre .smalltalk .class, +pre .winutils, +pre .flow, +pre .apache .tag, +pre .nginx .built_in, +pre .tex .command, +pre .tex .special, +pre .request, +pre .status { + font-weight: bold; +} diff --git a/js/highlight/styles/foundation.css b/js/highlight/styles/foundation.css new file mode 100644 index 0000000..b74d0d3 --- /dev/null +++ b/js/highlight/styles/foundation.css @@ -0,0 +1,133 @@ +/* +Description: Foundation 4 docs style for highlight.js +Author: Dan Allen +Website: http://foundation.zurb.com/docs/ +Version: 1.0 +Date: 2013-04-02 +*/ + +pre code { + display: block; padding: 0.5em; + background: #eee; +} + +pre .header, +pre .decorator, +pre .annotation { + color: #000077; +} + +pre .horizontal_rule, +pre .link_url, +pre .emphasis, +pre .attribute { + color: #070; +} + +pre .emphasis { + font-style: italic; +} + +pre .link_label, +pre .strong, +pre .value, +pre .string, +pre .scss .value .string { + color: #d14; +} + +pre .strong { + font-weight: bold; +} + +pre .blockquote, +pre .comment { + color: #998; + font-style: italic; +} + +pre .asciidoc .title, +pre .function .title { + color: #900; +} + +pre .class { + color: #458; +} + +pre .id, +pre .pseudo, +pre .constant, +pre .hexcolor { + color: teal; +} + +pre .variable { + color: #336699; +} + +pre .bullet, +pre .javadoc { + color: #997700; +} + +pre .pi, +pre .doctype { + color: #3344bb; +} + +pre .code, +pre .number { + color: #099; +} + +pre .important { + color: #f00; +} + +pre .smartquote, +pre .label { + color: #970; +} + +pre .preprocessor, +pre .pragma { + color: #579; +} + +pre .reserved, +pre .keyword, +pre .scss .value { + color: #000; +} + +pre .regexp { + background-color: #fff0ff; + color: #880088; +} + +pre .symbol { + color: #990073; +} + +pre .symbol .string { + color: #a60; +} + +pre .tag { + color: #007700; +} + +pre .at_rule, +pre .at_rule .keyword { + color: #088; +} + +pre .at_rule .preprocessor { + color: #808; +} + +pre .scss .tag, +pre .scss .attribute { + color: #339; +} diff --git a/js/highlight/styles/github.css b/js/highlight/styles/github.css new file mode 100644 index 0000000..f31bfdc --- /dev/null +++ b/js/highlight/styles/github.css @@ -0,0 +1,130 @@ +/* + +github.com style (c) Vasily Polovnyov + +*/ + +pre code { + display: block; padding: 0.5em; + color: #333; + background: #f8f8ff +} + +pre .comment, +pre .template_comment, +pre .diff .header, +pre .javadoc { + color: #998; + font-style: italic +} + +pre .keyword, +pre .css .rule .keyword, +pre .winutils, +pre .javascript .title, +pre .nginx .title, +pre .subst, +pre .request, +pre .status { + color: #333; + font-weight: bold +} + +pre .number, +pre .hexcolor, +pre .ruby .constant { + color: #099; +} + +pre .string, +pre .tag .value, +pre .phpdoc, +pre .tex .formula { + color: #d14 +} + +pre .title, +pre .id, +pre .coffeescript .params, +pre .scss .preprocessor { + color: #900; + font-weight: bold +} + +pre .javascript .title, +pre .lisp .title, +pre .clojure .title, +pre .subst { + font-weight: normal +} + +pre .class .title, +pre .haskell .type, +pre .vhdl .literal, +pre .tex .command { + color: #458; + font-weight: bold +} + +pre .tag, +pre .tag .title, +pre .rules .property, +pre .django .tag .keyword { + color: #000080; + font-weight: normal +} + +pre .attribute, +pre .variable, +pre .lisp .body { + color: #008080 +} + +pre .regexp { + color: #009926 +} + +pre .class { + color: #458; + font-weight: bold +} + +pre .symbol, +pre .ruby .symbol .string, +pre .lisp .keyword, +pre .tex .special, +pre .prompt { + color: #990073 +} + +pre .built_in, +pre .lisp .title, +pre .clojure .built_in { + color: #0086b3 +} + +pre .preprocessor, +pre .pragma, +pre .pi, +pre .doctype, +pre .shebang, +pre .cdata { + color: #999; + font-weight: bold +} + +pre .deletion { + background: #fdd +} + +pre .addition { + background: #dfd +} + +pre .diff .change { + background: #0086b3 +} + +pre .chunk { + color: #aaa +} diff --git a/js/highlight/styles/googlecode.css b/js/highlight/styles/googlecode.css new file mode 100644 index 0000000..9ef1c1d --- /dev/null +++ b/js/highlight/styles/googlecode.css @@ -0,0 +1,146 @@ +/* + +Google Code style (c) Aahan Krish + +*/ + +pre code { + display: block; padding: 0.5em; + background: white; color: black; +} + +pre .comment, +pre .template_comment, +pre .javadoc, +pre .comment * { + color: #800; +} + +pre .keyword, +pre .method, +pre .list .title, +pre .clojure .built_in, +pre .nginx .title, +pre .tag .title, +pre .setting .value, +pre .winutils, +pre .tex .command, +pre .http .title, +pre .request, +pre .status { + color: #008; +} + +pre .envvar, +pre .tex .special { + color: #660; +} + +pre .string, +pre .tag .value, +pre .cdata, +pre .filter .argument, +pre .attr_selector, +pre .apache .cbracket, +pre .date, +pre .regexp, +pre .coffeescript .attribute { + color: #080; +} + +pre .sub .identifier, +pre .pi, +pre .tag, +pre .tag .keyword, +pre .decorator, +pre .ini .title, +pre .shebang, +pre .prompt, +pre .hexcolor, +pre .rules .value, +pre .css .value .number, +pre .literal, +pre .symbol, +pre .ruby .symbol .string, +pre .number, +pre .css .function, +pre .clojure .attribute { + color: #066; +} + +pre .class .title, +pre .haskell .type, +pre .smalltalk .class, +pre .javadoctag, +pre .yardoctag, +pre .phpdoc, +pre .typename, +pre .tag .attribute, +pre .doctype, +pre .class .id, +pre .built_in, +pre .setting, +pre .params, +pre .variable, +pre .clojure .title { + color: #606; +} + +pre .css .tag, +pre .rules .property, +pre .pseudo, +pre .subst { + color: #000; +} + +pre .css .class, pre .css .id { + color: #9B703F; +} + +pre .value .important { + color: #ff7700; + font-weight: bold; +} + +pre .rules .keyword { + color: #C5AF75; +} + +pre .annotation, +pre .apache .sqbracket, +pre .nginx .built_in { + color: #9B859D; +} + +pre .preprocessor, +pre .preprocessor *, +pre .pragma { + color: #444; +} + +pre .tex .formula { + background-color: #EEE; + font-style: italic; +} + +pre .diff .header, +pre .chunk { + color: #808080; + font-weight: bold; +} + +pre .diff .change { + background-color: #BCCFF9; +} + +pre .addition { + background-color: #BAEEBA; +} + +pre .deletion { + background-color: #FFC8BD; +} + +pre .comment .yardoctag { + font-weight: bold; +} diff --git a/js/highlight/styles/idea.css b/js/highlight/styles/idea.css new file mode 100644 index 0000000..2959c7a --- /dev/null +++ b/js/highlight/styles/idea.css @@ -0,0 +1,122 @@ +/* + +Intellij Idea-like styling (c) Vasily Polovnyov + +*/ + +pre code { + display: block; padding: 0.5em; + color: #000; + background: #fff; +} + +pre .subst, +pre .title { + font-weight: normal; + color: #000; +} + +pre .comment, +pre .template_comment, +pre .javadoc, +pre .diff .header { + color: #808080; + font-style: italic; +} + +pre .annotation, +pre .decorator, +pre .preprocessor, +pre .pragma, +pre .doctype, +pre .pi, +pre .chunk, +pre .shebang, +pre .apache .cbracket, +pre .prompt, +pre .http .title { + color: #808000; +} + +pre .tag, +pre .pi { + background: #efefef; +} + +pre .tag .title, +pre .id, +pre .attr_selector, +pre .pseudo, +pre .literal, +pre .keyword, +pre .hexcolor, +pre .css .function, +pre .ini .title, +pre .css .class, +pre .list .title, +pre .clojure .title, +pre .nginx .title, +pre .tex .command, +pre .request, +pre .status { + font-weight: bold; + color: #000080; +} + +pre .attribute, +pre .rules .keyword, +pre .number, +pre .date, +pre .regexp, +pre .tex .special { + font-weight: bold; + color: #0000ff; +} + +pre .number, +pre .regexp { + font-weight: normal; +} + +pre .string, +pre .value, +pre .filter .argument, +pre .css .function .params, +pre .apache .tag { + color: #008000; + font-weight: bold; +} + +pre .symbol, +pre .ruby .symbol .string, +pre .char, +pre .tex .formula { + color: #000; + background: #d0eded; + font-style: italic; +} + +pre .phpdoc, +pre .yardoctag, +pre .javadoctag { + text-decoration: underline; +} + +pre .variable, +pre .envvar, +pre .apache .sqbracket, +pre .nginx .built_in { + color: #660e7a; +} + +pre .addition { + background: #baeeba; +} + +pre .deletion { + background: #ffc8bd; +} + +pre .diff .change { + background: #bccff9; +} diff --git a/js/highlight/styles/ir_black.css b/js/highlight/styles/ir_black.css new file mode 100644 index 0000000..9168283 --- /dev/null +++ b/js/highlight/styles/ir_black.css @@ -0,0 +1,105 @@ +/* + IR_Black style (c) Vasily Mikhailitchenko +*/ + +pre code { + display: block; padding: 0.5em; + background: #000; color: #f8f8f8; +} + +pre .shebang, +pre .comment, +pre .template_comment, +pre .javadoc { + color: #7c7c7c; +} + +pre .keyword, +pre .tag, +pre .tex .command, +pre .request, +pre .status, +pre .clojure .attribute { + color: #96CBFE; +} + +pre .sub .keyword, +pre .method, +pre .list .title, +pre .nginx .title { + color: #FFFFB6; +} + +pre .string, +pre .tag .value, +pre .cdata, +pre .filter .argument, +pre .attr_selector, +pre .apache .cbracket, +pre .date, +pre .coffeescript .attribute { + color: #A8FF60; +} + +pre .subst { + color: #DAEFA3; +} + +pre .regexp { + color: #E9C062; +} + +pre .title, +pre .sub .identifier, +pre .pi, +pre .decorator, +pre .tex .special, +pre .haskell .type, +pre .constant, +pre .smalltalk .class, +pre .javadoctag, +pre .yardoctag, +pre .phpdoc, +pre .nginx .built_in { + color: #FFFFB6; +} + +pre .symbol, +pre .ruby .symbol .string, +pre .number, +pre .variable, +pre .vbscript, +pre .literal { + color: #C6C5FE; +} + +pre .css .tag { + color: #96CBFE; +} + +pre .css .rules .property, +pre .css .id { + color: #FFFFB6; +} + +pre .css .class { + color: #FFF; +} + +pre .hexcolor { + color: #C6C5FE; +} + +pre .number { + color:#FF73FD; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.7; +} diff --git a/js/highlight/styles/magula.css b/js/highlight/styles/magula.css new file mode 100644 index 0000000..1c466dd --- /dev/null +++ b/js/highlight/styles/magula.css @@ -0,0 +1,123 @@ +/* +Description: Magula style for highligh.js +Author: Ruslan Keba +Website: http://rukeba.com/ +Version: 1.0 +Date: 2009-01-03 +Music: Aphex Twin / Xtal +*/ + +pre code { + display: block; padding: 0.5em; + background-color: #f4f4f4; +} + +pre code, +pre .subst, +pre .lisp .title, +pre .clojure .built_in { + color: black; +} + +pre .string, +pre .title, +pre .parent, +pre .tag .value, +pre .rules .value, +pre .rules .value .number, +pre .preprocessor, +pre .pragma, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .aggregate, +pre .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .addition, +pre .flow, +pre .stream, +pre .bash .variable, +pre .apache .cbracket, +pre .coffeescript .attribute { + color: #050; +} + +pre .comment, +pre .annotation, +pre .template_comment, +pre .diff .header, +pre .chunk { + color: #777; +} + +pre .number, +pre .date, +pre .regexp, +pre .literal, +pre .smalltalk .symbol, +pre .smalltalk .char, +pre .change, +pre .tex .special { + color: #800; +} + +pre .label, +pre .javadoc, +pre .ruby .string, +pre .decorator, +pre .filter .argument, +pre .localvars, +pre .array, +pre .attr_selector, +pre .pseudo, +pre .pi, +pre .doctype, +pre .deletion, +pre .envvar, +pre .shebang, +pre .apache .sqbracket, +pre .nginx .built_in, +pre .tex .formula, +pre .prompt, +pre .clojure .attribute { + color: #00e; +} + +pre .keyword, +pre .id, +pre .phpdoc, +pre .title, +pre .built_in, +pre .aggregate, +pre .smalltalk .class, +pre .winutils, +pre .bash .variable, +pre .apache .tag, +pre .xml .tag, +pre .tex .command, +pre .request, +pre .status { + font-weight: bold; + color: navy; +} + +pre .nginx .built_in { + font-weight: normal; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} + +/* --- */ +pre .apache .tag { + font-weight: bold; + color: blue; +} + diff --git a/js/highlight/styles/mono-blue.css b/js/highlight/styles/mono-blue.css new file mode 100644 index 0000000..85769e8 --- /dev/null +++ b/js/highlight/styles/mono-blue.css @@ -0,0 +1,62 @@ +/* + Five-color theme from a single blue hue. +*/ +pre code { + display: block; padding: 0.5em; + background: #EAEEF3; color: #00193A; +} + +pre .keyword, +pre .title, +pre .important, +pre .request, +pre .header, +pre .javadoctag { + font-weight: bold; +} + +pre .comment, +pre .chunk, +pre .template_comment { + color: #738191; +} + +pre .string, +pre .title, +pre .parent, +pre .built_in, +pre .literal, +pre .filename, +pre .value, +pre .addition, +pre .tag, +pre .argument, +pre .link_label, +pre .blockquote, +pre .header { + color: #0048AB; +} + +pre .decorator, +pre .prompt, +pre .yardoctag, +pre .subst, +pre .symbol, +pre .doctype, +pre .regexp, +pre .preprocessor, +pre .pragma, +pre .pi, +pre .attribute, +pre .attr_selector, +pre .javadoc, +pre .xmlDocTag, +pre .deletion, +pre .shebang, +pre .string .variable, +pre .link_url, +pre .bullet, +pre .sqbracket, +pre .phony { + color: #4C81C9; +} diff --git a/js/highlight/styles/monokai.css b/js/highlight/styles/monokai.css new file mode 100644 index 0000000..e0c3eb3 --- /dev/null +++ b/js/highlight/styles/monokai.css @@ -0,0 +1,127 @@ +/* +Monokai style - ported by Luigi Maselli - http://grigio.org +*/ + +pre code { + display: block; padding: 0.5em; + background: #272822; +} + +pre .tag, +pre .tag .title, +pre .keyword, +pre .literal, +pre .strong, +pre .change, +pre .winutils, +pre .flow, +pre .lisp .title, +pre .clojure .built_in, +pre .nginx .title, +pre .tex .special { + color: #F92672; +} + +pre code { + color: #DDD; +} + +pre code .constant, +pre .asciidoc .code { + color: #66D9EF; +} + +pre .code, +pre .class .title, +pre .header { + color: white; +} + +pre .link_label, +pre .attribute, +pre .symbol, +pre .symbol .string, +pre .value, +pre .regexp { + color: #BF79DB; +} + +pre .link_url, +pre .tag .value, +pre .string, +pre .bullet, +pre .subst, +pre .title, +pre .emphasis, +pre .haskell .type, +pre .preprocessor, +pre .pragma, +pre .ruby .class .parent, +pre .built_in, +pre .sql .aggregate, +pre .django .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .javadoc, +pre .django .filter .argument, +pre .smalltalk .localvars, +pre .smalltalk .array, +pre .attr_selector, +pre .pseudo, +pre .addition, +pre .stream, +pre .envvar, +pre .apache .tag, +pre .apache .cbracket, +pre .tex .command, +pre .prompt { + color: #A6E22E; +} + +pre .comment, +pre .java .annotation, +pre .smartquote, +pre .blockquote, +pre .horizontal_rule, +pre .python .decorator, +pre .template_comment, +pre .pi, +pre .doctype, +pre .deletion, +pre .shebang, +pre .apache .sqbracket, +pre .tex .formula { + color: #75715E; +} + +pre .keyword, +pre .literal, +pre .css .id, +pre .phpdoc, +pre .title, +pre .header, +pre .haskell .type, +pre .vbscript .built_in, +pre .sql .aggregate, +pre .rsl .built_in, +pre .smalltalk .class, +pre .diff .header, +pre .chunk, +pre .winutils, +pre .bash .variable, +pre .apache .tag, +pre .tex .special, +pre .request, +pre .status { + font-weight: bold; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} diff --git a/js/highlight/styles/monokai_sublime.css b/js/highlight/styles/monokai_sublime.css new file mode 100644 index 0000000..49a4eec --- /dev/null +++ b/js/highlight/styles/monokai_sublime.css @@ -0,0 +1,102 @@ +/* + +Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/ + +*/ + +pre code { + display: block; + padding: 0.5em; + background: #23241f; +} +pre .tag, +pre code { + color: #f8f8f2; +} +pre .keyword, +pre .function, +pre .literal, +pre .change, +pre .winutils, +pre .flow, +pre .lisp .title, +pre .clojure .built_in, +pre .nginx .title, +pre .tex .special { + color: #66d9ef; +} +pre .variable, +pre .params { + color: #fd9720; +} +pre .constant { + color: #66d9ef; +} +pre .title, +pre .class .title, +pre .css .class { + color: #a6e22e; +} +pre .attribute, +pre .symbol, +pre .symbol .string, +pre .tag .title, +pre .value, +pre .css .tag { + color: #f92672; +} +pre .number, +pre .preprocessor, +pre .pragma, +pre .regexp { + color: #ae81ff; +} +pre .tag .value, +pre .string, +pre .css .id, +pre .subst, +pre .haskell .type, +pre .ruby .class .parent, +pre .built_in, +pre .sql .aggregate, +pre .django .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .django .filter .argument, +pre .smalltalk .localvars, +pre .smalltalk .array, +pre .attr_selector, +pre .pseudo, +pre .addition, +pre .stream, +pre .envvar, +pre .apache .tag, +pre .apache .cbracket, +pre .tex .command, +pre .prompt { + color: #e6db74; +} +pre .comment, +pre .javadoc, +pre .java .annotation, +pre .python .decorator, +pre .template_comment, +pre .pi, +pre .doctype, +pre .deletion, +pre .shebang, +pre .apache .sqbracket, +pre .tex .formula { + color: #75715e; +} +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula { + opacity: 0.5; +} +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} diff --git a/js/highlight/styles/obsidian.css b/js/highlight/styles/obsidian.css new file mode 100644 index 0000000..b1b9df0 --- /dev/null +++ b/js/highlight/styles/obsidian.css @@ -0,0 +1,154 @@ +/** + * Obsidian style + * ported by Alexander Marenin (http://github.com/ioncreature) + */ + +pre code { + display: block; padding: 0.5em; + background: #282B2E; +} + +pre .keyword, +pre .literal, +pre .change, +pre .winutils, +pre .flow, +pre .lisp .title, +pre .clojure .built_in, +pre .nginx .title, +pre .css .id, +pre .tex .special { + color: #93C763; +} + +pre .number { + color: #FFCD22; +} + +pre code { + color: #E0E2E4; +} + +pre .css .tag, +pre .css .pseudo { + color: #D0D2B5; +} + +pre .attribute, +pre code .constant { + color: #668BB0; +} + +pre .xml .attribute { + color: #B3B689; +} + +pre .xml .tag .value { + color: #E8E2B7; +} + +pre .code, +pre .class .title, +pre .header { + color: white; +} + +pre .class, +pre .hexcolor { + color: #93C763; +} + +pre .regexp { + color: #D39745; +} + +pre .at_rule, +pre .at_rule .keyword { + color: #A082BD; +} + +pre .doctype { + color: #557182; +} + +pre .link_url, +pre .tag, +pre .tag .title, +pre .bullet, +pre .subst, +pre .emphasis, +pre .haskell .type, +pre .preprocessor, +pre .pragma, +pre .ruby .class .parent, +pre .built_in, +pre .sql .aggregate, +pre .django .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .javadoc, +pre .django .filter .argument, +pre .smalltalk .localvars, +pre .smalltalk .array, +pre .attr_selector, +pre .pseudo, +pre .addition, +pre .stream, +pre .envvar, +pre .apache .tag, +pre .apache .cbracket, +pre .tex .command, +pre .prompt { + color: #8CBBAD; +} + +pre .string { + color: #EC7600; +} + +pre .comment, +pre .java .annotation, +pre .blockquote, +pre .horizontal_rule, +pre .python .decorator, +pre .template_comment, +pre .pi, +pre .deletion, +pre .shebang, +pre .apache .sqbracket, +pre .tex .formula { + color: #818E96; +} + +pre .keyword, +pre .literal, +pre .css .id, +pre .phpdoc, +pre .title, +pre .header, +pre .haskell .type, +pre .vbscript .built_in, +pre .sql .aggregate, +pre .rsl .built_in, +pre .smalltalk .class, +pre .diff .header, +pre .chunk, +pre .winutils, +pre .bash .variable, +pre .apache .tag, +pre .tex .special, +pre .request, +pre .at_rule .keyword, +pre .status { + font-weight: bold; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} diff --git a/js/highlight/styles/pojoaque.css b/js/highlight/styles/pojoaque.css new file mode 100644 index 0000000..8c7e627 --- /dev/null +++ b/js/highlight/styles/pojoaque.css @@ -0,0 +1,105 @@ +/* + +Pojoaque Style by Jason Tate +http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html +Based on Solarized Style from http://ethanschoonover.com/solarized + +*/ + +pre code { + display: block; padding: 0.5em; + color: #DCCF8F; + background: url(./pojoaque.jpg) repeat scroll left top #181914; +} + +pre .comment, +pre .template_comment, +pre .diff .header, +pre .doctype, +pre .lisp .string, +pre .javadoc { + color: #586e75; + font-style: italic; +} + +pre .keyword, +pre .css .rule .keyword, +pre .winutils, +pre .javascript .title, +pre .method, +pre .addition, +pre .css .tag, +pre .clojure .title, +pre .nginx .title { + color: #B64926; +} + +pre .number, +pre .command, +pre .string, +pre .tag .value, +pre .phpdoc, +pre .tex .formula, +pre .regexp, +pre .hexcolor { + color: #468966; +} + +pre .title, +pre .localvars, +pre .function .title, +pre .chunk, +pre .decorator, +pre .built_in, +pre .lisp .title, +pre .clojure .built_in, +pre .identifier, +pre .id { + color: #FFB03B; +} + +pre .attribute, +pre .variable, +pre .lisp .body, +pre .smalltalk .number, +pre .constant, +pre .class .title, +pre .parent, +pre .haskell .type { + color: #b58900; +} + +pre .css .attribute { + color: #b89859; +} + +pre .css .number,pre .css .hexcolor{ + color: #DCCF8F; +} + +pre .css .class { + color: #d3a60c; +} + +pre .preprocessor, +pre .pragma, +pre .pi, +pre .shebang, +pre .symbol, +pre .symbol .string, +pre .diff .change, +pre .special, +pre .attr_selector, +pre .important, +pre .subst, +pre .cdata { + color: #cb4b16; +} + +pre .deletion { + color: #dc322f; +} + +pre .tex .formula { + background: #073642; +} diff --git a/js/highlight/styles/pojoaque.jpg b/js/highlight/styles/pojoaque.jpg new file mode 100644 index 0000000..9c07d4a Binary files /dev/null and b/js/highlight/styles/pojoaque.jpg differ diff --git a/js/highlight/styles/railscasts.css b/js/highlight/styles/railscasts.css new file mode 100644 index 0000000..fb6f145 --- /dev/null +++ b/js/highlight/styles/railscasts.css @@ -0,0 +1,182 @@ +/* + +Railscasts-like style (c) Visoft, Inc. (Damien White) + +*/ + +pre code { + display: block; + padding: 0.5em; + background: #232323; + color: #E6E1DC; +} + +pre .comment, +pre .template_comment, +pre .javadoc, +pre .shebang { + color: #BC9458; + font-style: italic; +} + +pre .keyword, +pre .ruby .function .keyword, +pre .request, +pre .status, +pre .nginx .title, +pre .method, +pre .list .title { + color: #C26230; +} + +pre .string, +pre .number, +pre .regexp, +pre .tag .value, +pre .cdata, +pre .filter .argument, +pre .attr_selector, +pre .apache .cbracket, +pre .date, +pre .tex .command, +pre .markdown .link_label { + color: #A5C261; +} + +pre .subst { + color: #519F50; +} + +pre .tag, +pre .tag .keyword, +pre .tag .title, +pre .doctype, +pre .sub .identifier, +pre .pi, +pre .input_number { + color: #E8BF6A; +} + +pre .identifier { + color: #D0D0FF; +} + +pre .class .title, +pre .haskell .type, +pre .smalltalk .class, +pre .javadoctag, +pre .yardoctag, +pre .phpdoc { + text-decoration: none; +} + +pre .constant { + color: #DA4939; +} + + +pre .symbol, +pre .built_in, +pre .ruby .symbol .string, +pre .ruby .symbol .identifier, +pre .markdown .link_url, +pre .attribute { + color: #6D9CBE; +} + +pre .markdown .link_url { + text-decoration: underline; +} + + + +pre .params, +pre .variable, +pre .clojure .attribute { + color: #D0D0FF; +} + +pre .css .tag, +pre .rules .property, +pre .pseudo, +pre .tex .special { + color: #CDA869; +} + +pre .css .class { + color: #9B703F; +} + +pre .rules .keyword { + color: #C5AF75; +} + +pre .rules .value { + color: #CF6A4C; +} + +pre .css .id { + color: #8B98AB; +} + +pre .annotation, +pre .apache .sqbracket, +pre .nginx .built_in { + color: #9B859D; +} + +pre .preprocessor, +pre .preprocessor * +pre .pragma { + color: #8996A8 !important; +} + +pre .hexcolor, +pre .css .value .number { + color: #A5C261; +} + +pre .title, +pre .decorator, +pre .css .function { + color: #FFC66D; +} + +pre .diff .header, +pre .chunk { + background-color: #2F33AB; + color: #E6E1DC; + display: inline-block; + width: 100%; +} + +pre .diff .change { + background-color: #4A410D; + color: #F8F8F8; + display: inline-block; + width: 100%; +} + +pre .addition { + background-color: #144212; + color: #E6E1DC; + display: inline-block; + width: 100%; +} + +pre .deletion { + background-color: #600; + color: #E6E1DC; + display: inline-block; + width: 100%; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.7; +} diff --git a/js/highlight/styles/rainbow.css b/js/highlight/styles/rainbow.css new file mode 100644 index 0000000..f4399e8 --- /dev/null +++ b/js/highlight/styles/rainbow.css @@ -0,0 +1,115 @@ +/* + +Style with support for rainbow parens + +*/ + +pre ::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; } +pre ::selection { background:#FF5E99; color:#fff; text-shadow: none; } + +pre code { + display: block; padding: 0.5em; + background: #474949; color: #D1D9E1; +} + + +pre .body, +pre .collection { + color: #D1D9E1; +} + +pre .comment, +pre .template_comment, +pre .diff .header, +pre .doctype, +pre .lisp .string, +pre .javadoc { + color: #969896; + font-style: italic; +} + +pre .keyword, +pre .clojure .attribute, +pre .winutils, +pre .javascript .title, +pre .addition, +pre .css .tag { + color: #cc99cc; +} + +pre .number { color: #f99157; } + +pre .command, +pre .string, +pre .tag .value, +pre .phpdoc, +pre .tex .formula, +pre .regexp, +pre .hexcolor { + color: #8abeb7; +} + +pre .title, +pre .localvars, +pre .function .title, +pre .chunk, +pre .decorator, +pre .built_in, +pre .lisp .title, +pre .identifier +{ + color: #b5bd68; +} + +pre .class .keyword +{ + color: #f2777a; +} + +pre .variable, +pre .lisp .body, +pre .smalltalk .number, +pre .constant, +pre .class .title, +pre .parent, +pre .haskell .label, +pre .id, +pre .lisp .title, +pre .clojure .title .built_in { + color: #ffcc66; +} + +pre .tag .title, +pre .rules .property, +pre .django .tag .keyword, +pre .clojure .title .built_in { + font-weight: bold; +} + +pre .attribute, +pre .clojure .title { + color: #81a2be; +} + +pre .preprocessor, +pre .pragma, +pre .pi, +pre .shebang, +pre .symbol, +pre .symbol .string, +pre .diff .change, +pre .special, +pre .attr_selector, +pre .important, +pre .subst, +pre .cdata { + color: #f99157; +} + +pre .deletion { + color: #dc322f; +} + +pre .tex .formula { + background: #eee8d5; +} diff --git a/js/highlight/styles/school_book.css b/js/highlight/styles/school_book.css new file mode 100644 index 0000000..12963b9 --- /dev/null +++ b/js/highlight/styles/school_book.css @@ -0,0 +1,113 @@ +/* + +School Book style from goldblog.com.ua (c) Zaripov Yura + +*/ + +pre code { + display: block; padding: 15px 0.5em 0.5em 30px; + font-size: 11px !important; + line-height:16px !important; +} + +pre{ + background:#f6f6ae url(./school_book.png); + border-top: solid 2px #d2e8b9; + border-bottom: solid 1px #d2e8b9; +} + +pre .keyword, +pre .literal, +pre .change, +pre .winutils, +pre .flow, +pre .lisp .title, +pre .clojure .built_in, +pre .nginx .title, +pre .tex .special { + color:#005599; + font-weight:bold; +} + +pre code, +pre .subst, +pre .tag .keyword { + color: #3E5915; +} + +pre .string, +pre .title, +pre .haskell .type, +pre .tag .value, +pre .css .rules .value, +pre .preprocessor, +pre .pragma, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .ruby .class .parent, +pre .built_in, +pre .sql .aggregate, +pre .django .template_tag, +pre .django .variable, +pre .smalltalk .class, +pre .javadoc, +pre .ruby .string, +pre .django .filter .argument, +pre .smalltalk .localvars, +pre .smalltalk .array, +pre .attr_selector, +pre .pseudo, +pre .addition, +pre .stream, +pre .envvar, +pre .apache .tag, +pre .apache .cbracket, +pre .nginx .built_in, +pre .tex .command, +pre .coffeescript .attribute { + color: #2C009F; +} + +pre .comment, +pre .java .annotation, +pre .python .decorator, +pre .template_comment, +pre .pi, +pre .doctype, +pre .deletion, +pre .shebang, +pre .apache .sqbracket { + color: #E60415; +} + +pre .keyword, +pre .literal, +pre .css .id, +pre .phpdoc, +pre .title, +pre .haskell .type, +pre .vbscript .built_in, +pre .sql .aggregate, +pre .rsl .built_in, +pre .smalltalk .class, +pre .xml .tag .title, +pre .diff .header, +pre .chunk, +pre .winutils, +pre .bash .variable, +pre .apache .tag, +pre .tex .command, +pre .request, +pre .status { + font-weight: bold; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} diff --git a/js/highlight/styles/school_book.png b/js/highlight/styles/school_book.png new file mode 100644 index 0000000..956e979 Binary files /dev/null and b/js/highlight/styles/school_book.png differ diff --git a/js/highlight/styles/solarized_dark.css b/js/highlight/styles/solarized_dark.css new file mode 100644 index 0000000..94d99b5 --- /dev/null +++ b/js/highlight/styles/solarized_dark.css @@ -0,0 +1,92 @@ +/* + +Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull + +*/ + +pre code { + display: block; padding: 0.5em; + background: #002b36; color: #839496; +} + +pre .comment, +pre .template_comment, +pre .diff .header, +pre .doctype, +pre .pi, +pre .lisp .string, +pre .javadoc { + color: #586e75; + font-style: italic; +} + +pre .keyword, +pre .winutils, +pre .method, +pre .addition, +pre .css .tag, +pre .request, +pre .status, +pre .nginx .title { + color: #859900; +} + +pre .number, +pre .command, +pre .string, +pre .tag .value, +pre .rules .value, +pre .phpdoc, +pre .tex .formula, +pre .regexp, +pre .hexcolor { + color: #2aa198; +} + +pre .title, +pre .localvars, +pre .chunk, +pre .decorator, +pre .built_in, +pre .identifier, +pre .vhdl .literal, +pre .id, +pre .css .function { + color: #268bd2; +} + +pre .attribute, +pre .variable, +pre .lisp .body, +pre .smalltalk .number, +pre .constant, +pre .class .title, +pre .parent, +pre .haskell .type { + color: #b58900; +} + +pre .preprocessor, +pre .preprocessor .keyword, +pre .pragma, +pre .shebang, +pre .symbol, +pre .symbol .string, +pre .diff .change, +pre .special, +pre .attr_selector, +pre .important, +pre .subst, +pre .cdata, +pre .clojure .title, +pre .css .pseudo { + color: #cb4b16; +} + +pre .deletion { + color: #dc322f; +} + +pre .tex .formula { + background: #073642; +} diff --git a/js/highlight/styles/solarized_light.css b/js/highlight/styles/solarized_light.css new file mode 100644 index 0000000..7e1339e --- /dev/null +++ b/js/highlight/styles/solarized_light.css @@ -0,0 +1,92 @@ +/* + +Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull + +*/ + +pre code { + display: block; padding: 0.5em; + background: #fdf6e3; color: #657b83; +} + +pre .comment, +pre .template_comment, +pre .diff .header, +pre .doctype, +pre .pi, +pre .lisp .string, +pre .javadoc { + color: #93a1a1; + font-style: italic; +} + +pre .keyword, +pre .winutils, +pre .method, +pre .addition, +pre .css .tag, +pre .request, +pre .status, +pre .nginx .title { + color: #859900; +} + +pre .number, +pre .command, +pre .string, +pre .tag .value, +pre .rules .value, +pre .phpdoc, +pre .tex .formula, +pre .regexp, +pre .hexcolor { + color: #2aa198; +} + +pre .title, +pre .localvars, +pre .chunk, +pre .decorator, +pre .built_in, +pre .identifier, +pre .vhdl .literal, +pre .id, +pre .css .function { + color: #268bd2; +} + +pre .attribute, +pre .variable, +pre .lisp .body, +pre .smalltalk .number, +pre .constant, +pre .class .title, +pre .parent, +pre .haskell .type { + color: #b58900; +} + +pre .preprocessor, +pre .preprocessor .keyword, +pre .pragma, +pre .shebang, +pre .symbol, +pre .symbol .string, +pre .diff .change, +pre .special, +pre .attr_selector, +pre .important, +pre .subst, +pre .cdata, +pre .clojure .title, +pre .css .pseudo { + color: #cb4b16; +} + +pre .deletion { + color: #dc322f; +} + +pre .tex .formula { + background: #eee8d5; +} diff --git a/js/highlight/styles/sunburst.css b/js/highlight/styles/sunburst.css new file mode 100644 index 0000000..6f1ed98 --- /dev/null +++ b/js/highlight/styles/sunburst.css @@ -0,0 +1,160 @@ +/* + +Sunburst-like style (c) Vasily Polovnyov + +*/ + +pre code { + display: block; padding: 0.5em; + background: #000; color: #f8f8f8; +} + +pre .comment, +pre .template_comment, +pre .javadoc { + color: #aeaeae; + font-style: italic; +} + +pre .keyword, +pre .ruby .function .keyword, +pre .request, +pre .status, +pre .nginx .title { + color: #E28964; +} + +pre .function .keyword, +pre .sub .keyword, +pre .method, +pre .list .title { + color: #99CF50; +} + +pre .string, +pre .tag .value, +pre .cdata, +pre .filter .argument, +pre .attr_selector, +pre .apache .cbracket, +pre .date, +pre .tex .command, +pre .coffeescript .attribute { + color: #65B042; +} + +pre .subst { + color: #DAEFA3; +} + +pre .regexp { + color: #E9C062; +} + +pre .title, +pre .sub .identifier, +pre .pi, +pre .tag, +pre .tag .keyword, +pre .decorator, +pre .shebang, +pre .prompt { + color: #89BDFF; +} + +pre .class .title, +pre .haskell .type, +pre .smalltalk .class, +pre .javadoctag, +pre .yardoctag, +pre .phpdoc { + text-decoration: underline; +} + +pre .symbol, +pre .ruby .symbol .string, +pre .number { + color: #3387CC; +} + +pre .params, +pre .variable, +pre .clojure .attribute { + color: #3E87E3; +} + +pre .css .tag, +pre .rules .property, +pre .pseudo, +pre .tex .special { + color: #CDA869; +} + +pre .css .class { + color: #9B703F; +} + +pre .rules .keyword { + color: #C5AF75; +} + +pre .rules .value { + color: #CF6A4C; +} + +pre .css .id { + color: #8B98AB; +} + +pre .annotation, +pre .apache .sqbracket, +pre .nginx .built_in { + color: #9B859D; +} + +pre .preprocessor, +pre .pragma { + color: #8996A8; +} + +pre .hexcolor, +pre .css .value .number { + color: #DD7B3B; +} + +pre .css .function { + color: #DAD085; +} + +pre .diff .header, +pre .chunk, +pre .tex .formula { + background-color: #0E2231; + color: #F8F8F8; + font-style: italic; +} + +pre .diff .change { + background-color: #4A410D; + color: #F8F8F8; +} + +pre .addition { + background-color: #253B22; + color: #F8F8F8; +} + +pre .deletion { + background-color: #420E09; + color: #F8F8F8; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} diff --git a/js/highlight/styles/tomorrow-night-blue.css b/js/highlight/styles/tomorrow-night-blue.css new file mode 100644 index 0000000..86de93c --- /dev/null +++ b/js/highlight/styles/tomorrow-night-blue.css @@ -0,0 +1,52 @@ +/* Tomorrow Night Blue Theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ +.tomorrow-comment, pre .comment, pre .title { + color: #7285b7; +} + +.tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo { + color: #ff9da4; +} + +.tomorrow-orange, pre .number, pre .preprocessor, pre .pragma, pre .built_in, pre .literal, pre .params, pre .constant { + color: #ffc58f; +} + +.tomorrow-yellow, pre .ruby .class .title, pre .css .rules .attribute { + color: #ffeead; +} + +.tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata { + color: #d1f1a9; +} + +.tomorrow-aqua, pre .css .hexcolor { + color: #99ffff; +} + +.tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title { + color: #bbdaff; +} + +.tomorrow-purple, pre .keyword, pre .javascript .function { + color: #ebbbff; +} + +pre code { + display: block; + background: #002451; + color: white; + padding: 0.5em; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} diff --git a/js/highlight/styles/tomorrow-night-bright.css b/js/highlight/styles/tomorrow-night-bright.css new file mode 100644 index 0000000..7e2450b --- /dev/null +++ b/js/highlight/styles/tomorrow-night-bright.css @@ -0,0 +1,51 @@ +/* Tomorrow Night Bright Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ +.tomorrow-comment, pre .comment, pre .title { + color: #969896; +} + +.tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo { + color: #d54e53; +} + +.tomorrow-orange, pre .number, pre .preprocessor, pre .pragma, pre .built_in, pre .literal, pre .params, pre .constant { + color: #e78c45; +} + +.tomorrow-yellow, pre .ruby .class .title, pre .css .rules .attribute { + color: #e7c547; +} + +.tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata { + color: #b9ca4a; +} + +.tomorrow-aqua, pre .css .hexcolor { + color: #70c0b1; +} + +.tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title { + color: #7aa6da; +} + +.tomorrow-purple, pre .keyword, pre .javascript .function { + color: #c397d8; +} + +pre code { + display: block; + background: black; + color: #eaeaea; + padding: 0.5em; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} diff --git a/js/highlight/styles/tomorrow-night-eighties.css b/js/highlight/styles/tomorrow-night-eighties.css new file mode 100644 index 0000000..bd0c45e --- /dev/null +++ b/js/highlight/styles/tomorrow-night-eighties.css @@ -0,0 +1,51 @@ +/* Tomorrow Night Eighties Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ +.tomorrow-comment, pre .comment, pre .title { + color: #999999; +} + +.tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo { + color: #f2777a; +} + +.tomorrow-orange, pre .number, pre .preprocessor, pre .pragma, pre .built_in, pre .literal, pre .params, pre .constant { + color: #f99157; +} + +.tomorrow-yellow, pre .ruby .class .title, pre .css .rules .attribute { + color: #ffcc66; +} + +.tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata { + color: #99cc99; +} + +.tomorrow-aqua, pre .css .hexcolor { + color: #66cccc; +} + +.tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title { + color: #6699cc; +} + +.tomorrow-purple, pre .keyword, pre .javascript .function { + color: #cc99cc; +} + +pre code { + display: block; + background: #2d2d2d; + color: #cccccc; + padding: 0.5em; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} diff --git a/js/highlight/styles/tomorrow-night.css b/js/highlight/styles/tomorrow-night.css new file mode 100644 index 0000000..2cc110b --- /dev/null +++ b/js/highlight/styles/tomorrow-night.css @@ -0,0 +1,52 @@ +/* Tomorrow Night Theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ +.tomorrow-comment, pre .comment, pre .title { + color: #969896; +} + +.tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo { + color: #cc6666; +} + +.tomorrow-orange, pre .number, pre .preprocessor, pre .pragma, pre .built_in, pre .literal, pre .params, pre .constant { + color: #de935f; +} + +.tomorrow-yellow, pre .ruby .class .title, pre .css .rules .attribute { + color: #f0c674; +} + +.tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata { + color: #b5bd68; +} + +.tomorrow-aqua, pre .css .hexcolor { + color: #8abeb7; +} + +.tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title { + color: #81a2be; +} + +.tomorrow-purple, pre .keyword, pre .javascript .function { + color: #b294bb; +} + +pre code { + display: block; + background: #1d1f21; + color: #c5c8c6; + padding: 0.5em; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} diff --git a/js/highlight/styles/tomorrow.css b/js/highlight/styles/tomorrow.css new file mode 100644 index 0000000..4da26b0 --- /dev/null +++ b/js/highlight/styles/tomorrow.css @@ -0,0 +1,49 @@ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ +.tomorrow-comment, pre .comment, pre .title { + color: #8e908c; +} + +.tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo { + color: #c82829; +} + +.tomorrow-orange, pre .number, pre .preprocessor, pre .pragma, pre .built_in, pre .literal, pre .params, pre .constant { + color: #f5871f; +} + +.tomorrow-yellow, pre .ruby .class .title, pre .css .rules .attribute { + color: #eab700; +} + +.tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata { + color: #718c00; +} + +.tomorrow-aqua, pre .css .hexcolor { + color: #3e999f; +} + +.tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title { + color: #4271ae; +} + +.tomorrow-purple, pre .keyword, pre .javascript .function { + color: #8959a8; +} + +pre code { + display: block; + background: white; + color: #4d4d4c; + padding: 0.5em; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} diff --git a/js/highlight/styles/vs.css b/js/highlight/styles/vs.css new file mode 100644 index 0000000..482ae25 --- /dev/null +++ b/js/highlight/styles/vs.css @@ -0,0 +1,89 @@ +/* + +Visual Studio-like style based on original C# coloring by Jason Diamond + +*/ +pre code { + display: block; padding: 0.5em; + background: white; color: black; +} + +pre .comment, +pre .annotation, +pre .template_comment, +pre .diff .header, +pre .chunk, +pre .apache .cbracket { + color: rgb(0, 128, 0); +} + +pre .keyword, +pre .id, +pre .built_in, +pre .smalltalk .class, +pre .winutils, +pre .bash .variable, +pre .tex .command, +pre .request, +pre .status, +pre .nginx .title, +pre .xml .tag, +pre .xml .tag .value { + color: rgb(0, 0, 255); +} + +pre .string, +pre .title, +pre .parent, +pre .tag .value, +pre .rules .value, +pre .rules .value .number, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .aggregate, +pre .template_tag, +pre .django .variable, +pre .addition, +pre .flow, +pre .stream, +pre .apache .tag, +pre .date, +pre .tex .formula, +pre .coffeescript .attribute { + color: rgb(163, 21, 21); +} + +pre .ruby .string, +pre .decorator, +pre .filter .argument, +pre .localvars, +pre .array, +pre .attr_selector, +pre .pseudo, +pre .pi, +pre .doctype, +pre .deletion, +pre .envvar, +pre .shebang, +pre .preprocessor, +pre .pragma, +pre .userType, +pre .apache .sqbracket, +pre .nginx .built_in, +pre .tex .special, +pre .prompt { + color: rgb(43, 145, 175); +} + +pre .phpdoc, +pre .javadoc, +pre .xmlDocTag { + color: rgb(128, 128, 128); +} + +pre .vhdl .typename { font-weight: bold; } +pre .vhdl .string { color: #666666; } +pre .vhdl .literal { color: rgb(163, 21, 21); } +pre .vhdl .attribute { color: #00B0E8; } + +pre .xml .attribute { color: rgb(255, 0, 0); } diff --git a/js/highlight/styles/xcode.css b/js/highlight/styles/xcode.css new file mode 100644 index 0000000..3b355a2 --- /dev/null +++ b/js/highlight/styles/xcode.css @@ -0,0 +1,157 @@ +/* + +XCode style (c) Angel Garcia + +*/ + +pre code { + display: block; padding: 0.5em; + background: #fff; color: black; +} + +pre .comment, +pre .template_comment, +pre .javadoc, +pre .comment * { + color: rgb(0,106,0); +} + +pre .keyword, +pre .literal, +pre .nginx .title { + color: rgb(170,13,145); +} +pre .method, +pre .list .title, +pre .tag .title, +pre .setting .value, +pre .winutils, +pre .tex .command, +pre .http .title, +pre .request, +pre .status { + color: #008; +} + +pre .envvar, +pre .tex .special { + color: #660; +} + +pre .string { + color: rgb(196,26,22); +} +pre .tag .value, +pre .cdata, +pre .filter .argument, +pre .attr_selector, +pre .apache .cbracket, +pre .date, +pre .regexp { + color: #080; +} + +pre .sub .identifier, +pre .pi, +pre .tag, +pre .tag .keyword, +pre .decorator, +pre .ini .title, +pre .shebang, +pre .prompt, +pre .hexcolor, +pre .rules .value, +pre .css .value .number, +pre .symbol, +pre .symbol .string, +pre .number, +pre .css .function, +pre .clojure .title, +pre .clojure .built_in, +pre .function .title, +pre .coffeescript .attribute { + color: rgb(28,0,207); +} + +pre .class .title, +pre .haskell .type, +pre .smalltalk .class, +pre .javadoctag, +pre .yardoctag, +pre .phpdoc, +pre .typename, +pre .tag .attribute, +pre .doctype, +pre .class .id, +pre .built_in, +pre .setting, +pre .params, +pre .clojure .attribute { + color: rgb(92,38,153); +} + +pre .variable { + color: rgb(63,110,116); +} +pre .css .tag, +pre .rules .property, +pre .pseudo, +pre .subst { + color: #000; +} + +pre .css .class, pre .css .id { + color: #9B703F; +} + +pre .value .important { + color: #ff7700; + font-weight: bold; +} + +pre .rules .keyword { + color: #C5AF75; +} + +pre .annotation, +pre .apache .sqbracket, +pre .nginx .built_in { + color: #9B859D; +} + +pre .preprocessor, +pre .preprocessor *, +pre .pragma { + color: rgb(100,56,32); +} + +pre .tex .formula { + background-color: #EEE; + font-style: italic; +} + +pre .diff .header, +pre .chunk { + color: #808080; + font-weight: bold; +} + +pre .diff .change { + background-color: #BCCFF9; +} + +pre .addition { + background-color: #BAEEBA; +} + +pre .deletion { + background-color: #FFC8BD; +} + +pre .comment .yardoctag { + font-weight: bold; +} + +pre .method .id { + color: #000; +} diff --git a/js/highlight/styles/zenburn.css b/js/highlight/styles/zenburn.css new file mode 100644 index 0000000..3fc6bd0 --- /dev/null +++ b/js/highlight/styles/zenburn.css @@ -0,0 +1,117 @@ +/* + +Zenburn style from voldmar.ru (c) Vladimir Epifanov +based on dark.css by Ivan Sagalaev + +*/ + +pre code { + display: block; padding: 0.5em; + background: #3F3F3F; + color: #DCDCDC; +} + +pre .keyword, +pre .tag, +pre .css .class, +pre .css .id, +pre .lisp .title, +pre .nginx .title, +pre .request, +pre .status, +pre .clojure .attribute { + color: #E3CEAB; +} + +pre .django .template_tag, +pre .django .variable, +pre .django .filter .argument { + color: #DCDCDC; +} + +pre .number, +pre .date { + color: #8CD0D3; +} + +pre .dos .envvar, +pre .dos .stream, +pre .variable, +pre .apache .sqbracket { + color: #EFDCBC; +} + +pre .dos .flow, +pre .diff .change, +pre .python .exception, +pre .python .built_in, +pre .literal, +pre .tex .special { + color: #EFEFAF; +} + +pre .diff .chunk, +pre .subst { + color: #8F8F8F; +} + +pre .dos .keyword, +pre .python .decorator, +pre .title, +pre .haskell .type, +pre .diff .header, +pre .ruby .class .parent, +pre .apache .tag, +pre .nginx .built_in, +pre .tex .command, +pre .prompt { + color: #efef8f; +} + +pre .dos .winutils, +pre .ruby .symbol, +pre .ruby .symbol .string, +pre .ruby .string { + color: #DCA3A3; +} + +pre .diff .deletion, +pre .string, +pre .tag .value, +pre .preprocessor, +pre .pragma, +pre .built_in, +pre .sql .aggregate, +pre .javadoc, +pre .smalltalk .class, +pre .smalltalk .localvars, +pre .smalltalk .array, +pre .css .rules .value, +pre .attr_selector, +pre .pseudo, +pre .apache .cbracket, +pre .tex .formula, +pre .coffeescript .attribute { + color: #CC9393; +} + +pre .shebang, +pre .diff .addition, +pre .comment, +pre .java .annotation, +pre .template_comment, +pre .pi, +pre .doctype { + color: #7F9F7F; +} + +pre .coffeescript .javascript, +pre .javascript .xml, +pre .tex .formula, +pre .xml .javascript, +pre .xml .vbscript, +pre .xml .css, +pre .xml .cdata { + opacity: 0.5; +} + diff --git a/js/jmpress.js b/js/jmpress.js new file mode 100644 index 0000000..efd0b78 --- /dev/null +++ b/js/jmpress.js @@ -0,0 +1,2706 @@ +/*! + * jmpress.js v0.4.5 + * http://jmpressjs.github.com/jmpress.js + * + * A jQuery plugin to build a website on the infinite canvas. + * + * Copyright 114 Kyle Robinson Young @shama & Tobias Koppers @sokra + * Licensed MIT + * http://www.opensource.org/licenses/mit-license.php + * + * Based on the foundation laid by Bartek Szopka @bartaz + */ +/* + * core.js + * The core of jmpress.js + */ +(function( $, document, window, undefined ) { + + 'use strict'; + + /** + * Set supported prefixes + * + * @access protected + * @return Function to get prefixed property + */ + var pfx = (function () { + var style = document.createElement('dummy').style, + prefixes = 'Webkit Moz O ms Khtml'.split(' '), + memory = {}; + return function ( prop ) { + if ( typeof memory[ prop ] === "undefined" ) { + var ucProp = prop.charAt(0).toUpperCase() + prop.substr(1), + props = (prop + ' ' + prefixes.join(ucProp + ' ') + ucProp).split(' '); + memory[ prop ] = null; + for ( var i in props ) { + if ( style[ props[i] ] !== undefined ) { + memory[ prop ] = props[i]; + break; + } + } + } + return memory[ prop ]; + }; + }()); + + /** + * map ex. "WebkitTransform" to "-webkit-transform" + */ + function mapProperty( name ) { + if(!name) { + return; + } + var index = 1 + name.substr(1).search(/[A-Z]/); + var prefix = name.substr(0, index).toLowerCase(); + var postfix = name.substr(index).toLowerCase(); + return "-" + prefix + "-" + postfix; + } + function addComma( attribute ) { + if(!attribute) { + return ""; + } + return attribute + ","; + } + /** + * Return an jquery object only if it's not empty + */ + function ifNotEmpty(el) { + if(el.length > 0) { + return el; + } + return null; + } + + /** + * Default Settings + */ + var defaults = { + /* CLASSES */ + stepSelector: '.step' + ,containerClass: '' + ,canvasClass: '' + ,areaClass: '' + ,notSupportedClass: 'not-supported' + + /* CONFIG */ + ,fullscreen: true + + /* ANIMATION */ + ,animation: { + transformOrigin: 'top left' + ,transitionProperty: addComma(mapProperty(pfx('transform'))) + addComma(mapProperty(pfx('perspective'))) + 'opacity' + ,transitionDuration: '1s' + ,transitionDelay: '500ms' + ,transitionTimingFunction: 'ease-in-out' + ,transformStyle: "preserve-3d" + } + ,transitionDuration: 1500 + }; + var callbacks = { + 'beforeChange': 1 + ,'beforeInitStep': 1 + ,'initStep': 1 + ,'checkNoSupport': 1 + ,'beforeInit': 1 + ,'afterInit': 1 + ,'beforeDeinit': 1 + ,'afterDeinit': 1 + ,'applyStep': 1 + ,'unapplyStep': 1 + ,'setInactive': 1 + ,'beforeActive': 1 + ,'setActive': 1 + ,'selectInitialStep': 1 + ,'selectPrev': 1 + ,'selectNext': 1 + ,'selectHome': 1 + ,'selectEnd': 1 + ,'idle': 1 + ,'applyTarget': 1 + }; + for(var callbackName in callbacks) { + defaults[callbackName] = []; + } + + + /** + * Initialize jmpress + */ + function init( args ) { + args = $.extend(true, {}, args || {}); + + // accept functions and arrays of functions as callbacks + var callbackArgs = {}; + var callbackName = null; + for (callbackName in callbacks) { + callbackArgs[callbackName] = $.isFunction( args[callbackName] ) ? + [ args[callbackName] ] : + args[callbackName]; + args[callbackName] = []; + } + + // MERGE SETTINGS + var settings = $.extend(true, {}, defaults, args); + + for (callbackName in callbacks) { + if (callbackArgs[callbackName]) { + Array.prototype.push.apply(settings[callbackName], callbackArgs[callbackName]); + } + } + + /*** MEMBER VARS ***/ + + var jmpress = $( this ) + ,container = null + ,area = null + ,oldStyle = { + container: "" + ,area: "" + } + ,canvas = null + ,current = null + ,active = false + ,activeSubstep = null + ,activeDelegated = false; + + + /*** MEMBER FUNCTIONS ***/ + // functions have to be called with this + + /** + * Init a single step + * + * @param element the element of the step + * @param idx number of step + */ + function doStepInit( element, idx ) { + var data = dataset( element ); + var step = { + oldStyle: $(element).attr("style") || "" + }; + + var callbackData = { + data: data + ,stepData: step + }; + callCallback.call(this, 'beforeInitStep', $(element), callbackData); + step.delegate = data.delegate; + callCallback.call(this, 'initStep', $(element), callbackData); + + $(element).data('stepData', step); + + if ( !$(element).attr('id') ) { + $(element).attr('id', 'step-' + (idx + 1)); + } + + callCallback.call(this, 'applyStep', $(element), callbackData); + } + /** + * Deinit a single step + * + * @param element the element of the step + */ + function doStepDeinit( element ) { + var stepData = $(element).data('stepData'); + + $(element).attr("style", stepData.oldStyle); + + callCallback.call(this, 'unapplyStep', $(element), { + stepData: stepData + }); + } + /** + * Reapplies stepData to the element + * + * @param element + */ + function doStepReapply( element ) { + callCallback.call(this, 'unapplyStep', $(element), { + stepData: element.data("stepData") + }); + + callCallback.call(this, 'applyStep', $(element), { + stepData: element.data("stepData") + }); + } + /** + * Completly deinit jmpress + * + */ + function deinit() { + if ( active ) { + callCallback.call(this, 'setInactive', active, { + stepData: $(active).data('stepData') + ,reason: "deinit" + } ); + } + if (current.jmpressClass) { + $(jmpress).removeClass(current.jmpressClass); + } + + callCallback.call(this, 'beforeDeinit', $(this), {}); + + $(settings.stepSelector, jmpress).each(function( idx ) { + doStepDeinit.call(jmpress, this ); + }); + + container.attr("style", oldStyle.container); + if(settings.fullscreen) { + $("html").attr("style", ""); + } + area.attr("style", oldStyle.area); + $(canvas).children().each(function() { + jmpress.append( $( this ) ); + }); + if( settings.fullscreen ) { + canvas.remove(); + } else { + canvas.remove(); + area.remove(); + } + + callCallback.call(this, 'afterDeinit', $(this), {}); + + $(jmpress).data("jmpressmethods", false); + + if(current.idleTimeout) { + clearTimeout(current.idleTimeout); + } + } + /** + * Call a callback + * + * @param callbackName String callback which should be called + * @param element some arguments to the callback + * @param eventData + */ + function callCallback( callbackName, element, eventData ) { + eventData.settings = settings; + eventData.current = current; + eventData.container = container; + eventData.parents = element ? getStepParents(element) : null; + eventData.current = current; + eventData.jmpress = this; + var result = {}; + $.each( settings[callbackName], function(idx, callback) { + result.value = callback.call( jmpress, element, eventData ) || result.value; + }); + return result.value; + } + /** + * + */ + function getStepParents( el ) { + return $(el).parentsUntil(jmpress).not(jmpress).filter(settings.stepSelector); + } + /** + * Reselect the active step + * + * @param String type reason of reselecting step + */ + function reselect( type ) { + return select( { step: active, substep: activeSubstep }, type); + } + /** + * Select a given step + * + * @param el element to select + * @param type reason of changing step + * @return Object element selected + */ + function select( el, type ) { + var substep; + if ( $.isPlainObject( el ) ) { + substep = el.substep; + el = el.step; + } + if ( typeof el === 'string') { + el = jmpress.find( el ).first(); + } + if ( !el || !$(el).data('stepData') ) { + return false; + } + + scrollFix.call(this); + + var step = $(el).data('stepData'); + + var cancelSelect = false; + callCallback.call(this, "beforeChange", el, { + stepData: step + ,reason: type + ,cancel: function() { + cancelSelect = true; + } + }); + if (cancelSelect) { + return undefined; + } + + var target = {}; + + var delegated = el; + if($(el).data("stepData").delegate) { + delegated = ifNotEmpty($(el).parentsUntil(jmpress).filter(settings.stepSelector).filter(step.delegate)) || + ifNotEmpty($(el).near(step.delegate)) || + ifNotEmpty($(el).near(step.delegate, true)) || + ifNotEmpty($(step.delegate, jmpress)); + if(delegated) { + step = delegated.data("stepData"); + } else { + // Do not delegate if expression not found + delegated = el; + } + } + if ( activeDelegated ) { + callCallback.call(this, 'setInactive', activeDelegated, { + stepData: $(activeDelegated).data('stepData') + ,delegatedFrom: active + ,reason: type + ,target: target + ,nextStep: delegated + ,nextSubstep: substep + ,nextStepData: step + } ); + } + var callbackData = { + stepData: step + ,delegatedFrom: el + ,reason: type + ,target: target + ,substep: substep + ,prevStep: activeDelegated + ,prevSubstep: activeSubstep + ,prevStepData: activeDelegated && $(activeDelegated).data('stepData') + }; + callCallback.call(this, 'beforeActive', delegated, callbackData); + callCallback.call(this, 'setActive', delegated, callbackData); + + // Set on step class on root element + if (current.jmpressClass) { + $(jmpress).removeClass(current.jmpressClass); + } + $(jmpress).addClass(current.jmpressClass = 'step-' + $(delegated).attr('id') ); + if (current.jmpressDelegatedClass) { + $(jmpress).removeClass(current.jmpressDelegatedClass); + } + $(jmpress).addClass(current.jmpressDelegatedClass = 'delegating-step-' + $(el).attr('id') ); + + callCallback.call(this, "applyTarget", delegated, $.extend({ + canvas: canvas + ,area: area + ,beforeActive: activeDelegated + }, callbackData)); + + active = el; + activeSubstep = callbackData.substep; + activeDelegated = delegated; + + if(current.idleTimeout) { + clearTimeout(current.idleTimeout); + } + current.idleTimeout = setTimeout(function() { + callCallback.call(this, 'idle', delegated, callbackData); + }, Math.max(1, settings.transitionDuration - 100)); + + return delegated; + } + /** + * This should fix ANY kind of buggy scrolling + */ + function scrollFix() { + (function fix() { + if ($(container)[0].tagName === "BODY") { + try { + window.scrollTo(0, 0); + } catch(e) {} + } + $(container).scrollTop(0); + $(container).scrollLeft(0); + function check() { + if ($(container).scrollTop() !== 0 || + $(container).scrollLeft() !== 0) { + fix(); + } + } + setTimeout(check, 1); + setTimeout(check, 10); + setTimeout(check, 100); + setTimeout(check, 200); + setTimeout(check, 400); + }()); + } + /** + * Alias for select + */ + function goTo( el ) { + return select.call(this, el, "jump" ); + } + /** + * Goto Next Slide + * + * @return Object newly active slide + */ + function next() { + return select.call(this, callCallback.call(this, 'selectNext', active, { + stepData: $(active).data('stepData') + ,substep: activeSubstep + }), "next" ); + } + /** + * Goto Previous Slide + * + * @return Object newly active slide + */ + function prev() { + return select.call(this, callCallback.call(this, 'selectPrev', active, { + stepData: $(active).data('stepData') + ,substep: activeSubstep + }), "prev" ); + } + /** + * Goto First Slide + * + * @return Object newly active slide + */ + function home() { + return select.call(this, callCallback.call(this, 'selectHome', active, { + stepData: $(active).data('stepData') + }), "home" ); + } + /** + * Goto Last Slide + * + * @return Object newly active slide + */ + function end() { + return select.call(this, callCallback.call(this, 'selectEnd', active, { + stepData: $(active).data('stepData') + }), "end" ); + } + /** + * Manipulate the canvas + * + * @param props + * @return Object + */ + function canvasMod( props ) { + css(canvas, props || {}); + return $(canvas); + } + /** + * Return current step + * + * @return Object + */ + function getActive() { + return activeDelegated && $(activeDelegated); + } + /** + * fire a callback + * + * @param callbackName + * @param element + * @param eventData + * @return void + */ + function fire( callbackName, element, eventData ) { + if( !callbacks[callbackName] ) { + $.error( "callback " + callbackName + " is not registered." ); + } else { + return callCallback.call(this, callbackName, element, eventData); + } + } + + /** + * PUBLIC METHODS LIST + */ + jmpress.data("jmpressmethods", { + select: select + ,reselect: reselect + ,scrollFix: scrollFix + ,goTo: goTo + ,next: next + ,prev: prev + ,home: home + ,end: end + ,canvas: canvasMod + ,container: function() { return container; } + ,settings: function() { return settings; } + ,active: getActive + ,current: function() { return current; } + ,fire: fire + ,init: function(step) { + doStepInit.call(this, $(step), current.nextIdNumber++); + } + ,deinit: function(step) { + if(step) { + doStepDeinit.call(this, $(step)); + } else { + deinit.call(this); + } + } + ,reapply: doStepReapply + }); + + /** + * Check for support + * This will be removed in near future, when support is coming + * + * @access protected + * @return void + */ + function checkSupport() { + var ua = navigator.userAgent.toLowerCase(); + return (ua.search(/(iphone)|(ipod)|(android)/) === -1) || (ua.search(/(chrome)/) !== -1); + } + + // BEGIN INIT + + // CHECK FOR SUPPORT + if (checkSupport() === false || callCallback.call(this, 'checkNoSupport', null, {})) { + // not supported + if (settings.notSupportedClass) { + jmpress.addClass(settings.notSupportedClass); + } + return; + } else { + if (settings.notSupportedClass) { + jmpress.removeClass(settings.notSupportedClass); + } + } + + // grabbing all steps + var steps = $(settings.stepSelector, jmpress); + + // GERNERAL INIT OF FRAME + container = jmpress; + area = $('
'); + canvas = $('
'); + $(jmpress).children().filter(steps).each(function() { + canvas.append( $( this ) ); + }); + if(settings.fullscreen) { + container = $('body'); + $("html").css({ + overflow: 'hidden' + }); + area = jmpress; + } + oldStyle.area = area.attr("style") || ""; + oldStyle.container = container.attr("style") || ""; + if(settings.fullscreen) { + container.css({ + height: '100%' + }); + jmpress.append( canvas ); + } else { + container.css({ + position: "relative" + }); + area.append( canvas ); + jmpress.append( area ); + } + + $(container).addClass(settings.containerClass); + $(area).addClass(settings.areaClass); + $(canvas).addClass(settings.canvasClass); + + document.documentElement.style.height = "100%"; + container.css({ + overflow: 'hidden' + }); + + var props = { + position: "absolute" + ,transitionDuration: '0s' + }; + props = $.extend({}, settings.animation, props); + css(area, props); + css(canvas, props); + + current = {}; + + callCallback.call(this, 'beforeInit', null, { + canvas: canvas, + area: area + }); + + // INITIALIZE EACH STEP + steps.each(function( idx ) { + doStepInit.call(jmpress, this, idx ); + }); + current.nextIdNumber = steps.length; + + callCallback.call(this, 'afterInit', null, {}); + + // START + select.call(this, callCallback.call(this, 'selectInitialStep', "init", {}) ); + + if (settings.initClass) { + $(steps).removeClass(settings.initClass); + } + } + /** + * Return default settings + * + * @return Object + */ + function getDefaults() { + return defaults; + } + /** + * Register a callback or a jmpress function + * + * @access public + * @param name String the name of the callback or function + * @param func Function? the function to be added + */ + function register(name, func) { + if( $.isFunction(func) ) { + if( methods[name] ) { + $.error( "function " + name + " is already registered." ); + } else { + methods[name] = func; + } + } else { + if( callbacks[name] ) { + $.error( "callback " + name + " is already registered." ); + } else { + callbacks[name] = 1; + defaults[name] = []; + } + } + } + /** + * Set CSS on element w/ prefixes + * + * @return Object element which properties were set + * + * TODO: Consider bypassing pfx and blindly set as jQuery + * already checks for support + */ + function css( el, props ) { + var key, pkey, cssObj = {}; + for ( key in props ) { + if ( props.hasOwnProperty(key) ) { + pkey = pfx(key); + if ( pkey !== null ) { + cssObj[pkey] = props[key]; + } + } + } + $(el).css(cssObj); + return el; + } + /** + * Return dataset for element + * + * @param el element + * @return Object + */ + function dataset( el ) { + if ( $(el)[0].dataset ) { + return $.extend({}, $(el)[0].dataset); + } + function toCamelcase( str ) { + str = str.split( '-' ); + for( var i = 1; i < str.length; i++ ) { + str[i] = str[i].substr(0, 1).toUpperCase() + str[i].substr(1); + } + return str.join( '' ); + } + var returnDataset = {}; + var attrs = $(el)[0].attributes; + $.each(attrs, function ( idx, attr ) { + if ( attr.nodeName.substr(0, 5) === "data-" ) { + returnDataset[ toCamelcase(attr.nodeName.substr(5)) ] = attr.nodeValue; + } + }); + return returnDataset; + } + /** + * Returns true, if jmpress is initialized + * + * @return bool + */ + function initialized() { + return !!$(this).data("jmpressmethods"); + } + + + /** + * PUBLIC STATIC METHODS LIST + */ + var methods = { + init: init + ,initialized: initialized + ,deinit: function() {} + ,css: css + ,pfx: pfx + ,defaults: getDefaults + ,register: register + ,dataset: dataset + }; + + /** + * $.jmpress() + */ + $.fn.jmpress = function( method ) { + function f() { + var jmpressmethods = $(this).data("jmpressmethods"); + if ( jmpressmethods && jmpressmethods[method] ) { + return jmpressmethods[method].apply( this, Array.prototype.slice.call( arguments, 1 )); + } else if ( methods[method] ) { + return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 )); + } else if ( callbacks[method] && jmpressmethods ) { + var settings = jmpressmethods.settings(); + var func = Array.prototype.slice.call( arguments, 1 )[0]; + if ($.isFunction( func )) { + settings[method] = settings[method] || []; + settings[method].push(func); + } + } else if ( typeof method === 'object' || ! method ) { + return init.apply( this, arguments ); + } else { + $.error( 'Method ' + method + ' does not exist on jQuery.jmpress' ); + } + // to allow chaining + return this; + } + var args = arguments; + var result; + $(this).each(function(idx, element) { + result = f.apply(element, args); + }); + return result; + }; + $.extend({ + jmpress: function( method ) { + if ( methods[method] ) { + return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 )); + } else if ( callbacks[method] ) { + // plugin interface + var func = Array.prototype.slice.call( arguments, 1 )[0]; + if ($.isFunction( func )) { + defaults[method].push(func); + } else { + $.error( 'Second parameter should be a function: $.jmpress( callbackName, callbackFunction )' ); + } + } else { + $.error( 'Method ' + method + ' does not exist on jQuery.jmpress' ); + } + } + }); + +}(jQuery, document, window)); + +/* + * near.js + * Find steps near each other + */ +(function( $, document, window, undefined ) { + + 'use strict'; + + // add near( selector, backwards = false) to jquery + + + function checkAndGo( elements, func, selector, backwards ) { + var next; + elements.each(function(idx, element) { + if(backwards) { + next = func(element, selector, backwards); + if (next) { + return false; + } + } + if( $(element).is(selector) ) { + next = element; + return false; + } + if(!backwards) { + next = func(element, selector, backwards); + if (next) { + return false; + } + } + }); + return next; + } + function findNextInChildren(item, selector, backwards) { + var children = $(item).children(); + if(backwards) { + children = $(children.get().reverse()); + } + return checkAndGo( children, findNextInChildren, selector, backwards ); + } + function findNextInSiblings(item, selector, backwards) { + return checkAndGo( + $(item)[backwards ? "prevAll" : "nextAll"](), + findNextInChildren, selector, backwards ); + } + function findNextInParents(item, selector, backwards) { + var next; + var parents = $(item).parents(); + parents = $(parents.get()); + $.each(parents.get(), function(idx, element) { + if( backwards && $(element).is(selector) ) { + next = element; + return false; + } + next = findNextInSiblings(element, selector, backwards); + if(next) { + return false; + } + }); + return next; + } + + $.fn.near = function( selector, backwards ) { + var array = []; + $(this).each(function(idx, element) { + var near = (backwards ? + false : + findNextInChildren( element, selector, backwards )) || + findNextInSiblings( element, selector, backwards ) || + findNextInParents( element, selector, backwards ); + if( near ) { + array.push(near); + } + }); + return $(array); + }; +}(jQuery, document, window)); +/* + * transform.js + * The engine that powers the transforms or falls back to other methods + */ +(function( $, document, window, undefined ) { + + 'use strict'; + + /* FUNCTIONS */ + function toCssNumber(number) { + return (Math.round(10000*number)/10000)+""; + } + + /** + * 3D and 2D engines + */ + var engines = { + 3: { + transform: function( el, data, settings ) { + var transform = 'translate(-' + settings.originX + ',-' + settings.originY + ')'; + $.each(data, function(idx, item) { + var coord = ["X", "Y", "Z"]; + var i; + if(item[0] === "translate") { // ["translate", x, y, z] + transform += " translate3d(" + toCssNumber(item[1] || 0) + "px," + toCssNumber(item[2] || 0) + "px," + toCssNumber(item[3] || 0) + "px)"; + } else if(item[0] === "rotate") { + var order = item[4] ? [1, 2, 3] : [3, 2, 1]; + for(i = 0; i < 3; i++) { + transform += " rotate" + coord[order[i]-1] + "(" + toCssNumber(item[order[i]] || 0) + "deg)"; + } + } else if(item[0] === "scale") { + for(i = 0; i < 3; i++) { + transform += " scale" + coord[i] + "(" + toCssNumber(item[i+1] || 1) + ")"; + } + } + }); + $.jmpress("css", el, $.extend({}, { transform: transform })); + } + } + ,2: { + transform: function( el, data, settings ) { + var transform = 'translate(-' + settings.originX + ',-' + settings.originY + ')'; + $.each(data, function(idx, item) { + var coord = ["X", "Y"]; + if(item[0] === "translate") { // ["translate", x, y, z] + transform += " translate(" + toCssNumber(item[1] || 0) + "px," + toCssNumber(item[2] || 0) + "px)"; + } else if(item[0] === "rotate") { + transform += " rotate(" + toCssNumber(item[3] || 0) + "deg)"; + } else if(item[0] === "scale") { + for(var i = 0; i < 2; i++) { + transform += " scale" + coord[i] + "(" + toCssNumber(item[i+1] || 1) + ")"; + } + } + }); + $.jmpress("css", el, $.extend({}, { transform: transform })); + } + } + }; + + /** + * Engine to power cross-browser translate, scale and rotate. + */ + var engine = (function() { + if ($.jmpress("pfx", "perspective")) { + return engines[3]; + } else if ($.jmpress("pfx", "transform")) { + return engines[2]; + } + }()); + + if(!engine) { + $.jmpress("checkNoSupport", function() { + return true; + }); + } + + var jmpressDefaults = $.jmpress("defaults"); + jmpressDefaults.reasonableAnimation = {}; + jmpressDefaults.originX = "50%"; + jmpressDefaults.originY = "50%"; + $.jmpress("initStep", function( step, eventData ) { + var data = eventData.data; + var stepData = eventData.stepData; + var pf = parseFloat; + $.extend(stepData, { + x: pf(data.x) || 0 + ,y: pf(data.y) || 0 + ,z: pf(data.z) || 0 + ,r: pf(data.r) || 0 + ,phi: pf(data.phi) || 0 + ,rotate: pf(data.rotate) || 0 + ,rotateX: pf(data.rotateX) || 0 + ,rotateY: pf(data.rotateY) || 0 + ,rotateZ: pf(data.rotateZ) || 0 + ,revertRotate: false + ,scale: pf(data.scale) || 1 + ,scaleX: pf(data.scaleX) || false + ,scaleY: pf(data.scaleY) || false + ,scaleZ: pf(data.scaleZ) || 1 + }); + }); + $.jmpress("beforeInit", function( nil, eventData ) { + $.jmpress("css", eventData.area, { + left: eventData.settings.originX, + top: eventData.settings.originY, + perspective: '1000px', + }); + }); + $.jmpress("afterInit", function( nil, eventData ) { + var stepSelector = eventData.settings.stepSelector, + current = eventData.current; + current.perspectiveScale = 1; + current.maxNestedDepth = 0; + var nestedSteps = $(eventData.jmpress).find(stepSelector).children(stepSelector); + while(nestedSteps.length) { + current.maxNestedDepth++; + nestedSteps = nestedSteps.children(stepSelector); + } + }); + $.jmpress("applyStep", function( step, eventData ) { + $.jmpress("css", $(step), { + position: "absolute" + ,transformStyle: "preserve-3d" + }); + if ( eventData.parents.length > 0 ) { + $.jmpress("css", $(step), { + top: "50%" + ,left: "50%" + }); + } + var sd = eventData.stepData; + var transform = [ + ["translate", + sd.x || (sd.r * Math.sin(sd.phi*Math.PI/180)), + sd.y || (-sd.r * Math.cos(sd.phi*Math.PI/180)), + sd.z], + ["rotate", + sd.rotateX, + sd.rotateY, + sd.rotateZ || sd.rotate, + true], + ["scale", + sd.scaleX || sd.scale, + sd.scaleY || sd.scale, + sd.scaleZ || sd.scale] + ]; + engine.transform( step, transform, eventData.settings ); + }); + $.jmpress("setActive", function( element, eventData ) { + var target = eventData.target; + var step = eventData.stepData; + var tf = target.transform = []; + target.perspectiveScale = 1; + + for(var i = eventData.current.maxNestedDepth; i > (eventData.parents.length || 0); i--) { + tf.push(["scale"], ["rotate"], ["translate"]); + } + + tf.push(["scale", + 1 / (step.scaleX || step.scale), + 1 / (step.scaleY || step.scale), + 1 / (step.scaleZ)]); + tf.push(["rotate", + -step.rotateX, + -step.rotateY, + -(step.rotateZ || step.rotate)]); + tf.push(["translate", + -(step.x || (step.r * Math.sin(step.phi*Math.PI/180))), + -(step.y || (-step.r * Math.cos(step.phi*Math.PI/180))), + -step.z]); + target.perspectiveScale *= (step.scaleX || step.scale); + + $.each(eventData.parents, function(idx, element) { + var step = $(element).data("stepData"); + tf.push(["scale", + 1 / (step.scaleX || step.scale), + 1 / (step.scaleY || step.scale), + 1 / (step.scaleZ)]); + tf.push(["rotate", + -step.rotateX, + -step.rotateY, + -(step.rotateZ || step.rotate)]); + tf.push(["translate", + -(step.x || (step.r * Math.sin(step.phi*Math.PI/180))), + -(step.y || (-step.r * Math.cos(step.phi*Math.PI/180))), + -step.z]); + target.perspectiveScale *= (step.scaleX || step.scale); + }); + + $.each(tf, function(idx, item) { + if(item[0] !== "rotate") { + return; + } + function lowRotate(name) { + if(eventData.current["rotate"+name+"-"+idx] === undefined) { + eventData.current["rotate"+name+"-"+idx] = item[name] || 0; + } + var cur = eventData.current["rotate"+name+"-"+idx], tar = item[name] || 0, + curmod = cur % 360, tarmod = tar % 360; + if(curmod < 0) { + curmod += 360; + } + if(tarmod < 0) { + tarmod += 360; + } + var diff = tarmod - curmod; + if(diff < -180) { + diff += 360; + } else if(diff > 180) { + diff -= 360; + } + eventData.current["rotate"+name+"-"+idx] = item[name] = cur + diff; + } + lowRotate(1); + lowRotate(2); + lowRotate(3); + }); + }); + $.jmpress("applyTarget", function( active, eventData ) { + + var target = eventData.target, + props, step = eventData.stepData, + settings = eventData.settings, + zoomin = target.perspectiveScale * 1.3 < eventData.current.perspectiveScale, + zoomout = target.perspectiveScale > eventData.current.perspectiveScale * 1.3; + + // extract first scale from transform + var lastScale = -1; + $.each(target.transform, function(idx, item) { + if(item.length <= 1) { + return; + } + if(item[0] === "rotate" && + item[1] % 360 === 0 && + item[2] % 360 === 0 && + item[3] % 360 === 0) { + return; + } + if(item[0] === "scale") { + lastScale = idx; + } else { + return false; + } + }); + + if(lastScale !== eventData.current.oldLastScale) { + zoomin = zoomout = false; + eventData.current.oldLastScale = lastScale; + } + + var extracted = []; + if(lastScale !== -1) { + while(lastScale >= 0) { + if(target.transform[lastScale][0] === "scale") { + extracted.push(target.transform[lastScale]); + target.transform[lastScale] = ["scale"]; + } + lastScale--; + } + } + + var animation = settings.animation; + if(settings.reasonableAnimation[eventData.reason]) { + animation = $.extend({}, + animation, + settings.reasonableAnimation[eventData.reason]); + } + + props = { + // to keep the perspective look similar for different scales + // we need to 'scale' the perspective, too + perspective: Math.round(target.perspectiveScale * 1000) + "px" + }; + props = $.extend({}, animation, props); + if (!zoomin) { + props.transitionDelay = '0s'; + } + if (!eventData.beforeActive) { + props.transitionDuration = '0s'; + props.transitionDelay = '0s'; + } + $.jmpress("css", eventData.area, props); + engine.transform(eventData.area, extracted, eventData.settings); + + props = $.extend({}, animation); + if (!zoomout) { + props.transitionDelay = '0s'; + } + if (!eventData.beforeActive) { + props.transitionDuration = '0s'; + props.transitionDelay = '0s'; + } + + eventData.current.perspectiveScale = target.perspectiveScale; + + $.jmpress("css", eventData.canvas, props); + engine.transform(eventData.canvas, target.transform, eventData.settings); + }); + +}(jQuery, document, window)); +/* + * active.js + * Set the active classes on steps + */ +(function( $, document, window, undefined ) { + + 'use strict'; + var $jmpress = $.jmpress; + + /* DEFINES */ + var activeClass = 'activeClass', + nestedActiveClass = 'nestedActiveClass'; + + /* DEFAULTS */ + var defaults = $jmpress( 'defaults' ); + defaults[nestedActiveClass] = "nested-active"; + defaults[activeClass] = "active"; + + /* HOOKS */ + $jmpress( 'setInactive', function( step, eventData ) { + var settings = eventData.settings, + activeClassSetting = settings[activeClass], + nestedActiveClassSettings = settings[nestedActiveClass]; + if(activeClassSetting) { + $(step).removeClass( activeClassSetting ); + } + if(nestedActiveClassSettings) { + $.each(eventData.parents, function(idx, element) { + $(element).removeClass(nestedActiveClassSettings); + }); + } + }); + $jmpress( 'setActive', function( step, eventData ) { + var settings = eventData.settings, + activeClassSetting = settings[activeClass], + nestedActiveClassSettings = settings[nestedActiveClass]; + if(activeClassSetting) { + $(step).addClass( activeClassSetting ); + } + if(nestedActiveClassSettings) { + $.each(eventData.parents, function(idx, element) { + $(element).addClass(nestedActiveClassSettings); + }); + } + }); + +}(jQuery, document, window)); +/* + * circular.js + * Repeat from start after end + */ +(function( $, document, window, undefined ) { + + 'use strict'; + var $jmpress = $.jmpress; + + /* FUNCTIONS */ + function firstSlide( step, eventData ) { + return $(this).find(eventData.settings.stepSelector).first(); + } + function prevOrNext( jmpress, step, eventData, prev) { + if (!step) { + return false; + } + var stepSelector = eventData.settings.stepSelector; + step = $(step); + do { + var item = step.near( stepSelector, prev ); + if (item.length === 0 || item.closest(jmpress).length === 0) { + item = $(jmpress).find(stepSelector)[prev?"last":"first"](); + } + if (!item.length) { + return false; + } + step = item; + } while( step.data("stepData").exclude ); + return step; + } + + /* HOOKS */ + $jmpress( 'initStep', function( step, eventData ) { + eventData.stepData.exclude = eventData.data.exclude && ["false", "no"].indexOf(eventData.data.exclude) === -1; + }); + $jmpress( 'selectInitialStep', firstSlide); + $jmpress( 'selectHome', firstSlide); + $jmpress( 'selectEnd', function( step, eventData ) { + return $(this).find(eventData.settings.stepSelector).last(); + }); + $jmpress( 'selectPrev', function( step, eventData ) { + return prevOrNext(this, step, eventData, true); + }); + $jmpress( 'selectNext', function( step, eventData ) { + return prevOrNext(this, step, eventData); + }); +}(jQuery, document, window)); +/* + * start.js + * Set the first step to start on + */ +(function( $, document, window, undefined ) { + + 'use strict'; + + /* HOOKS */ + $.jmpress( 'selectInitialStep', function( nil, eventData ) { + return eventData.settings.start; + }); + +}(jQuery, document, window)); +/* + * ways.js + * Control the flow of the steps + */ +(function( $, document, window, undefined ) { + + 'use strict'; + var $jmpress = $.jmpress; + + /* FUNCTIONS */ + function routeFunc( jmpress, route, type ) { + for(var i = 0; i < route.length - 1; i++) { + var from = route[i]; + var to = route[i+1]; + if($(jmpress).jmpress("initialized")) { + $(from, jmpress).data("stepData")[type] = to; + } else { + $(from, jmpress).attr('data-' + type, to); + } + } + } + function selectPrevOrNext( step, eventData, attr, prev ) { + var stepData = eventData.stepData; + if(stepData[attr]) { + var near = $(step).near(stepData[attr], prev); + if(near && near.length) { + return near; + } + near = $(stepData[attr], this)[prev?"last":"first"](); + if(near && near.length) { + return near; + } + } + } + + /* EXPORTED FUNCTIONS */ + $jmpress( 'register', 'route', function( route, unidirectional, reversedRoute ) { + if( typeof route === "string" ) { + route = [route, route]; + } + routeFunc(this, route, reversedRoute ? "prev" : "next"); + if (!unidirectional) { + routeFunc(this, route.reverse(), reversedRoute ? "next" : "prev"); + } + }); + + /* HOOKS */ + $jmpress( 'initStep', function( step, eventData ) { + for(var attr in {next:1,prev:1}) { + eventData.stepData[attr] = eventData.data[attr]; + } + }); + $jmpress( 'selectNext', function( step, eventData ) { + return selectPrevOrNext.call(this, step, eventData, "next"); + }); + $jmpress( 'selectPrev', function( step, eventData ) { + return selectPrevOrNext.call(this, step, eventData, "prev", true); + }); + +}(jQuery, document, window)); +/* + * ajax.js + * Load steps via ajax + */ +(function( $, document, window, undefined ) { + + 'use strict'; + var $jmpress = $.jmpress; + + /* DEFINES */ + var afterStepLoaded = 'ajax:afterStepLoaded', + loadStep = 'ajax:loadStep'; + + /* REGISTER EVENTS */ + $jmpress('register', loadStep); + $jmpress('register', afterStepLoaded); + + /* DEFAULTS */ + $jmpress('defaults').ajaxLoadedClass = "loaded"; + + /* HOOKS */ + $jmpress('initStep', function( step, eventData ) { + eventData.stepData.src = $(step).attr('href') || eventData.data.src || false; + eventData.stepData.srcLoaded = false; + }); + $jmpress(loadStep, function( step, eventData ) { + var stepData = eventData.stepData, + href = stepData && stepData.src, + settings = eventData.settings; + if ( href ) { + $(step).addClass( settings.ajaxLoadedClass ); + stepData.srcLoaded = true; + $(step).load(href, function(response, status, xhr) { + $(eventData.jmpress).jmpress('fire', afterStepLoaded, step, $.extend({}, eventData, { + response: response + ,status: status + ,xhr: xhr + })); + }); + } + }); + $jmpress('idle', function( step, eventData ) { + if (!step) { + return; + } + var settings = eventData.settings, + jmpress = $(this), + stepData = eventData.stepData; + var siblings = $(step) + .add( $(step).near( settings.stepSelector ) ) + .add( $(step).near( settings.stepSelector, true) ) + .add( jmpress.jmpress('fire', 'selectPrev', step, { + stepData: $(step).data('stepData') + })) + .add( jmpress.jmpress('fire', 'selectNext', step, { + stepData: $(step).data('stepData') + })); + siblings.each(function() { + var step = this, + stepData = $(step).data("stepData"); + if(!stepData.src || stepData.srcLoaded) { + return; + } + jmpress.jmpress('fire', loadStep, step, { + stepData: $(step).data('stepData') + }); + }); + }); + $jmpress("setActive", function(step, eventData) { + var stepData = $(step).data("stepData"); + if(!stepData.src || stepData.srcLoaded) { + return; + } + $(this).jmpress('fire', loadStep, step, { + stepData: $(step).data('stepData') + }); + }); + +}(jQuery, document, window)); +/* + * hash.js + * Detect and set the URL hash + */ +(function( $, document, window, undefined ) { + + 'use strict'; + var $jmpress = $.jmpress, + hashLink = "a[href^=#]"; + + /* FUNCTIONS */ + function randomString() { + return "" + Math.round(Math.random() * 100000, 0); + } + /** + * getElementFromUrl + * + * @return String or undefined + */ + function getElementFromUrl(settings) { + // get id from url # by removing `#` or `#/` from the beginning, + // so both "fallback" `#slide-id` and "enhanced" `#/slide-id` will work + // TODO SECURITY check user input to be valid! + try { + var el = $( '#' + window.location.hash.replace(/^#\/?/,"") ); + return el.length > 0 && el.is(settings.stepSelector) ? el : undefined; + } catch(e) {} + } + function setHash(stepid) { + var shouldBeHash = "#/" + stepid; + if(window.history && window.history.pushState) { + // shouldBeHash = "#" + stepid; + // consider this for future versions + // it has currently issues, when startup with a link with hash (webkit) + if(window.location.hash !== shouldBeHash) { + window.history.pushState({}, '', shouldBeHash); + } + } else { + if(window.location.hash !== shouldBeHash) { + window.location.hash = shouldBeHash; + } + } + } + + /* DEFAULTS */ + $jmpress('defaults').hash = { + use: true + ,update: true + ,bindChange: true + // NOTICE: {use: true, update: false, bindChange: true} + // will cause a error after clicking on a link to the current step + }; + + /* HOOKS */ + $jmpress('selectInitialStep', function( step, eventData ) { + var settings = eventData.settings, + hashSettings = settings.hash, + current = eventData.current, + jmpress = $(this); + eventData.current.hashNamespace = ".jmpress-"+randomString(); + // HASH CHANGE EVENT + if ( hashSettings.use ) { + if ( hashSettings.bindChange ) { + $(window).bind('hashchange'+current.hashNamespace, function(event) { + var urlItem = getElementFromUrl(settings); + if ( jmpress.jmpress('initialized') ) { + jmpress.jmpress("scrollFix"); + } + if(urlItem && urlItem.length) { + if(urlItem.attr("id") !== jmpress.jmpress("active").attr("id")) { + jmpress.jmpress('select', urlItem); + } + setHash(urlItem.attr("id")); + } + event.preventDefault(); + }); + $(hashLink).on("click"+current.hashNamespace, function(event) { + var href = $(this).attr("href"); + try { + if($(href).is(settings.stepSelector)) { + jmpress.jmpress("select", href); + event.preventDefault(); + event.stopPropagation(); + } + } catch(e) {} + }); + } + return getElementFromUrl(settings); + } + }); + $jmpress('afterDeinit', function( nil, eventData ) { + $(hashLink).off(eventData.current.hashNamespace); + $(window).unbind(eventData.current.hashNamespace); + }); + $jmpress('setActive', function( step, eventData ) { + var settings = eventData.settings, + current = eventData.current; + // `#/step-id` is used instead of `#step-id` to prevent default browser + // scrolling to element in hash + if ( settings.hash.use && settings.hash.update ) { + clearTimeout(current.hashtimeout); + current.hashtimeout = setTimeout(function() { + setHash($(eventData.delegatedFrom).attr('id')); + }, settings.transitionDuration + 200); + } + }); + +}(jQuery, document, window)); +/* + * keyboard.js + * Keyboard event mapping and default keyboard actions + */ +(function( $, document, window, undefined ) { + + 'use strict'; + var $jmpress = $.jmpress, + jmpressNext = "next", + jmpressPrev = "prev"; + + /* FUNCTIONS */ + function randomString() { + return "" + Math.round(Math.random() * 100000, 0); + } + function stopEvent(event) { + event.preventDefault(); + event.stopPropagation(); + } + + /* DEFAULTS */ + $jmpress('defaults').keyboard = { + use: true + ,keys: { + 33: jmpressPrev // pg up + ,37: jmpressPrev // left + ,38: jmpressPrev // up + + ,9: jmpressNext+":"+jmpressPrev // tab + ,32: jmpressNext // space + ,34: jmpressNext // pg down + ,39: jmpressNext // right + ,40: jmpressNext // down + + ,36: "home" // home + + ,35: "end" // end + } + ,ignore: { + "INPUT": [ + 32 // space + ,37 // left + ,38 // up + ,39 // right + ,40 // down + ] + ,"TEXTAREA": [ + 32 // space + ,37 // left + ,38 // up + ,39 // right + ,40 // down + ] + ,"SELECT": [ + 38 // up + ,40 // down + ] + } + ,tabSelector: "a[href]:visible, :input:visible" + }; + + /* HOOKS */ + $jmpress('afterInit', function( nil, eventData ) { + var settings = eventData.settings, + keyboardSettings = settings.keyboard, + ignoreKeyboardSettings = keyboardSettings.ignore, + current = eventData.current, + jmpress = $(this); + + // tabindex make it focusable so that it can recieve key events + if(!settings.fullscreen) { + jmpress.attr("tabindex", 0); + } + + current.keyboardNamespace = ".jmpress-"+randomString(); + + // KEYPRESS EVENT: this fixes a Opera bug + $(settings.fullscreen ? document : jmpress) + .bind("keypress"+current.keyboardNamespace, function( event ) { + + for( var nodeName in ignoreKeyboardSettings ) { + if ( event.target.nodeName === nodeName && ignoreKeyboardSettings[nodeName].indexOf(event.which) !== -1 ) { + return; + } + } + if(event.which >= 37 && event.which <= 40 || event.which === 32) { + stopEvent(event); + } + }); + // KEYDOWN EVENT + $(settings.fullscreen ? document : jmpress) + .bind("keydown"+current.keyboardNamespace, function( event ) { + var eventTarget = $(event.target); + + if ( !settings.fullscreen && !eventTarget.closest(jmpress).length || !keyboardSettings.use ) { + return; + } + + for( var nodeName in ignoreKeyboardSettings ) { + if ( eventTarget[0].nodeName === nodeName && ignoreKeyboardSettings[nodeName].indexOf(event.which) !== -1 ) { + return; + } + } + + var reverseSelect = false; + var nextFocus; + if (event.which === 9) { + // tab + if ( !eventTarget.closest( jmpress.jmpress('active') ).length ) { + if ( !event.shiftKey ) { + nextFocus = jmpress.jmpress('active').find("a[href], :input").filter(":visible").first(); + } else { + reverseSelect = true; + } + } else { + nextFocus = eventTarget.near( keyboardSettings.tabSelector, event.shiftKey ); + if( !$(nextFocus) + .closest( settings.stepSelector ) + .is(jmpress.jmpress('active') ) ) { + nextFocus = undefined; + } + } + if( nextFocus && nextFocus.length > 0 ) { + nextFocus.focus(); + jmpress.jmpress("scrollFix"); + stopEvent(event); + return; + } else { + if(event.shiftKey) { + reverseSelect = true; + } + } + } + + var action = keyboardSettings.keys[ event.which ]; + if ( typeof action === "string" ) { + if (action.indexOf(":") !== -1) { + action = action.split(":"); + action = event.shiftKey ? action[1] : action[0]; + } + jmpress.jmpress( action ); + stopEvent(event); + } else if ( $.isFunction(action) ) { + action.call(jmpress, event); + } else if ( action ) { + jmpress.jmpress.apply( jmpress, action ); + stopEvent(event); + } + + if (reverseSelect) { + // tab + nextFocus = jmpress.jmpress('active').find("a[href], :input").filter(":visible").last(); + nextFocus.focus(); + jmpress.jmpress("scrollFix"); + } + }); + }); + $jmpress('afterDeinit', function( nil, eventData ) { + $(document).unbind(eventData.current.keyboardNamespace); + }); + + +}(jQuery, document, window)); +/* + * viewport.js + * Scale to fit a given viewport + */ +(function( $, document, window, undefined ) { + + 'use strict'; + + function randomString() { + return "" + Math.round(Math.random() * 100000, 0); + } + + var browser = (function() { + var ua = navigator.userAgent.toLowerCase(); + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + return match[1] || ""; + }()); + + var defaults = $.jmpress("defaults"); + defaults.viewPort = { + width: false + ,height: false + ,maxScale: 0 + ,minScale: 0 + ,zoomable: 0 + ,zoomBindMove: true + ,zoomBindWheel: true + }; + var keys = defaults.keyboard.keys; + keys[browser === 'mozilla' ? 107 : 187] = "zoomIn"; // + + keys[browser === 'mozilla' ? 109 : 189] = "zoomOut"; // - + defaults.reasonableAnimation.resize = { + transitionDuration: '0s' + ,transitionDelay: '0ms' + }; + defaults.reasonableAnimation.zoom = { + transitionDuration: '0s' + ,transitionDelay: '0ms' + }; + $.jmpress("initStep", function( step, eventData ) { + for(var variable in {"viewPortHeight":1, "viewPortWidth":1, "viewPortMinScale":1, "viewPortMaxScale":1, "viewPortZoomable":1}) { + eventData.stepData[variable] = eventData.data[variable] && parseFloat(eventData.data[variable]); + } + }); + $.jmpress("afterInit", function( nil, eventData ) { + var jmpress = this; + eventData.current.viewPortNamespace = ".jmpress-"+randomString(); + $(window).bind("resize"+eventData.current.viewPortNamespace, function (event) { + $(jmpress).jmpress("reselect", "resize"); + }); + eventData.current.userZoom = 0; + eventData.current.userTranslateX = 0; + eventData.current.userTranslateY = 0; + if(eventData.settings.viewPort.zoomBindWheel) { + $(eventData.settings.fullscreen ? document : this) + .bind("mousewheel"+eventData.current.viewPortNamespace+" DOMMouseScroll"+eventData.current.viewPortNamespace, function( event, delta ) { + delta = delta || event.originalEvent.wheelDelta || -event.originalEvent.detail /* mozilla */; + var direction = (delta / Math.abs(delta)); + if(direction < 0) { + $(eventData.jmpress).jmpress("zoomOut", event.originalEvent.clientX, event.originalEvent.clientY); + } else if(direction > 0) { + $(eventData.jmpress).jmpress("zoomIn", event.originalEvent.clientX, event.originalEvent.clientY); + } + return false; + }); + } + if(eventData.settings.viewPort.zoomBindMove) { + $(eventData.settings.fullscreen ? document : this).bind("mousedown"+eventData.current.viewPortNamespace, function (event) { + if(eventData.current.userZoom) { + eventData.current.userTranslating = { x: event.clientX, y: event.clientY }; + event.preventDefault(); + event.stopImmediatePropagation(); + } + }).bind("mousemove"+eventData.current.viewPortNamespace, function (event) { + var userTranslating = eventData.current.userTranslating; + if(userTranslating) { + $(jmpress).jmpress("zoomTranslate", event.clientX - userTranslating.x, event.clientY - userTranslating.y); + userTranslating.x = event.clientX; + userTranslating.y = event.clientY; + event.preventDefault(); + event.stopImmediatePropagation(); + } + }).bind("mouseup"+eventData.current.viewPortNamespace, function (event) { + if(eventData.current.userTranslating) { + eventData.current.userTranslating = undefined; + event.preventDefault(); + event.stopImmediatePropagation(); + } + }); + } + }); + function maxAbs(value, range) { + return Math.max(Math.min(value, range), -range); + } + function zoom(x, y, direction) { + var current = $(this).jmpress("current"), + settings = $(this).jmpress("settings"), + stepData = $(this).jmpress("active").data("stepData"), + container = $(this).jmpress("container"); + if(current.userZoom === 0 && direction < 0) { + return; + } + var zoomableSteps = stepData.viewPortZoomable || settings.viewPort.zoomable; + if(current.userZoom === zoomableSteps && direction > 0) { + return; + } + current.userZoom += direction; + + var halfWidth = $(container).innerWidth()/2, + halfHeight = $(container).innerHeight()/2; + + x = x ? x - halfWidth : x; + y = y ? y - halfHeight : y; + + // TODO this is not perfect... too much math... :( + current.userTranslateX = + maxAbs(current.userTranslateX - direction * x / current.zoomOriginWindowScale / zoomableSteps, + halfWidth * current.userZoom * current.userZoom / zoomableSteps); + current.userTranslateY = + maxAbs(current.userTranslateY - direction * y / current.zoomOriginWindowScale / zoomableSteps, + halfHeight * current.userZoom * current.userZoom / zoomableSteps); + + $(this).jmpress("reselect", "zoom"); + } + $.jmpress("register", "zoomIn", function(x, y) { + zoom.call(this, x||0, y||0, 1); + }); + $.jmpress("register", "zoomOut", function(x, y) { + zoom.call(this, x||0, y||0, -1); + }); + $.jmpress("register", "zoomTranslate", function(x, y) { + var current = $(this).jmpress("current"), + settings = $(this).jmpress("settings"), + stepData = $(this).jmpress("active").data("stepData"), + container = $(this).jmpress("container"); + var zoomableSteps = stepData.viewPortZoomable || settings.viewPort.zoomable; + var halfWidth = $(container).innerWidth(), + halfHeight = $(container).innerHeight(); + current.userTranslateX = + maxAbs(current.userTranslateX + x / current.zoomOriginWindowScale, + halfWidth * current.userZoom * current.userZoom / zoomableSteps); + current.userTranslateY = + maxAbs(current.userTranslateY + y / current.zoomOriginWindowScale, + halfHeight * current.userZoom * current.userZoom / zoomableSteps); + $(this).jmpress("reselect", "zoom"); + }); + $.jmpress('afterDeinit', function( nil, eventData ) { + $(eventData.settings.fullscreen ? document : this).unbind(eventData.current.viewPortNamespace); + $(window).unbind(eventData.current.viewPortNamespace); + }); + $.jmpress("setActive", function( step, eventData ) { + var viewPort = eventData.settings.viewPort; + var viewPortHeight = eventData.stepData.viewPortHeight || viewPort.height; + var viewPortWidth = eventData.stepData.viewPortWidth || viewPort.width; + var viewPortMaxScale = eventData.stepData.viewPortMaxScale || viewPort.maxScale; + var viewPortMinScale = eventData.stepData.viewPortMinScale || viewPort.minScale; + // Correct the scale based on the window's size + var windowScaleY = viewPortHeight && $(eventData.container).innerHeight()/viewPortHeight; + var windowScaleX = viewPortWidth && $(eventData.container).innerWidth()/viewPortWidth; + var windowScale = (windowScaleX || windowScaleY) && Math.min( windowScaleX || windowScaleY, windowScaleY || windowScaleX ); + + if(windowScale) { + windowScale = windowScale || 1; + if(viewPortMaxScale) { + windowScale = Math.min(windowScale, viewPortMaxScale); + } + if(viewPortMinScale) { + windowScale = Math.max(windowScale, viewPortMinScale); + } + + var zoomableSteps = eventData.stepData.viewPortZoomable || eventData.settings.viewPort.zoomable; + if(zoomableSteps) { + var diff = (1/windowScale) - (1/viewPortMaxScale); + diff /= zoomableSteps; + windowScale = 1/((1/windowScale) - diff * eventData.current.userZoom); + } + + eventData.target.transform.reverse(); + if(eventData.current.userTranslateX && eventData.current.userTranslateY) { + eventData.target.transform.push(["translate", eventData.current.userTranslateX, eventData.current.userTranslateY, 0]); + } else { + eventData.target.transform.push(["translate"]); + } + eventData.target.transform.push(["scale", + windowScale, + windowScale, + 1]); + eventData.target.transform.reverse(); + eventData.target.perspectiveScale /= windowScale; + } + eventData.current.zoomOriginWindowScale = windowScale; + }); + $.jmpress("setInactive", function( step, eventData ) { + if(!eventData.nextStep || !step || $(eventData.nextStep).attr("id") !== $(step).attr("id")) { + eventData.current.userZoom = 0; + eventData.current.userTranslateX = 0; + eventData.current.userTranslateY = 0; + } + }); + +}(jQuery, document, window)); + +/* + * mouse.js + * Clicking to select a step + */ +(function( $, document, window, undefined ) { + + 'use strict'; + var $jmpress = $.jmpress; + + /* FUNCTIONS */ + function randomString() { + return "" + Math.round(Math.random() * 100000, 0); + } + + /* DEFAULTS */ + $jmpress("defaults").mouse = { + clickSelects: true + }; + + /* HOOKS */ + $jmpress("afterInit", function( nil, eventData ) { + var settings = eventData.settings, + stepSelector = settings.stepSelector, + current = eventData.current, + jmpress = $(this); + current.clickableStepsNamespace = ".jmpress-"+randomString(); + jmpress.bind("click"+current.clickableStepsNamespace, function(event) { + if (!settings.mouse.clickSelects || current.userZoom) { + return; + } + + // get clicked step + var clickedStep = $(event.target).closest(stepSelector); + + // clicks on the active step do default + if ( clickedStep.is( jmpress.jmpress("active") ) ) { + return; + } + + if (clickedStep.length) { + // select the clicked step + jmpress.jmpress("select", clickedStep[0], "click"); + event.preventDefault(); + event.stopPropagation(); + } + }); + }); + $jmpress('afterDeinit', function( nil, eventData ) { + $(this).unbind(eventData.current.clickableStepsNamespace); + }); + +}(jQuery, document, window)); +/* + * mobile.js + * Adds support for swipe on touch supported browsers + */ +(function( $, document, window, undefined ) { + + 'use strict'; + var $jmpress = $.jmpress; + + /* FUNCTIONS */ + function randomString() { + return "" + Math.round(Math.random() * 100000, 0); + } + + /* HOOKS */ + $jmpress( 'afterInit', function( step, eventData ) { + var settings = eventData.settings, + current = eventData.current, + jmpress = eventData.jmpress; + current.mobileNamespace = ".jmpress-"+randomString(); + var data, start = [0,0]; + $(settings.fullscreen ? document : jmpress) + .bind("touchstart"+current.mobileNamespace, function( event ) { + + data = event.originalEvent.touches[0]; + start = [ data.pageX, data.pageY ]; + + }).bind("touchmove"+current.mobileNamespace, function( event ) { + data = event.originalEvent.touches[0]; + event.preventDefault(); + return false; + }).bind("touchend"+current.mobileNamespace, function( event ) { + var end = [ data.pageX, data.pageY ], + diff = [ end[0]-start[0], end[1]-start[1] ]; + + if(Math.max(Math.abs(diff[0]), Math.abs(diff[1])) > 50) { + diff = Math.abs(diff[0]) > Math.abs(diff[1]) ? diff[0] : diff[1]; + $(jmpress).jmpress(diff > 0 ? "prev" : "next"); + event.preventDefault(); + return false; + } + }); + }); + $jmpress('afterDeinit', function( nil, eventData ) { + var settings = eventData.settings, + current = eventData.current, + jmpress = eventData.jmpress; + $(settings.fullscreen ? document : jmpress).unbind(current.mobileNamespace); + }); + +}(jQuery, document, window)); +/* + * templates.js + * The amazing template engine + */ +(function( $, document, window, undefined ) { + + 'use strict'; + var $jmpress = $.jmpress, + templateFromParentIdent = "_template_", + templateFromApplyIdent = "_applied_template_"; + + /* STATIC VARS */ + var templates = {}; + + /* FUNCTIONS */ + function addUndefined( target, values, prefix ) { + for( var name in values ) { + var targetName = name; + if ( prefix ) { + targetName = prefix + targetName.substr(0, 1).toUpperCase() + targetName.substr(1); + } + if ( $.isPlainObject(values[name]) ) { + addUndefined( target, values[name], targetName ); + } else if( target[targetName] === undefined ) { + target[targetName] = values[name]; + } + } + } + function applyChildrenTemplates( children, templateChildren ) { + if ($.isArray(templateChildren)) { + if (templateChildren.length < children.length) { + $.error("more nested steps than children in template"); + } else { + children.each(function(idx, child) { + child = $(child); + var tmpl = child.data(templateFromParentIdent) || {}; + addUndefined(tmpl, templateChildren[idx]); + child.data(templateFromParentIdent, tmpl); + }); + } + } else if($.isFunction(templateChildren)) { + children.each(function(idx, child) { + child = $(child); + var tmpl = child.data(templateFromParentIdent) || {}; + addUndefined(tmpl, templateChildren(idx, child, children)); + child.data(templateFromParentIdent, tmpl); + }); + } // TODO: else if(object) + } + function applyTemplate( data, element, template, eventData ) { + if (template.children) { + var children = element.children( eventData.settings.stepSelector ); + applyChildrenTemplates( children, template.children ); + } + applyTemplateData( data, template ); + } + function applyTemplateData( data, template ) { + addUndefined(data, template); + } + + /* HOOKS */ + $jmpress("beforeInitStep", function( step, eventData ) { + step = $(step); + var data = eventData.data, + templateFromAttr = data.template, + templateFromApply = step.data(templateFromApplyIdent), + templateFromParent = step.data(templateFromParentIdent); + if(templateFromAttr) { + $.each(templateFromAttr.split(" "), function(idx, tmpl) { + var template = templates[tmpl]; + applyTemplate( data, step, template, eventData ); + }); + } + if (templateFromApply) { + applyTemplate( data, step, templateFromApply, eventData ); + } + if (templateFromParent) { + applyTemplate( data, step, templateFromParent, eventData ); + step.data(templateFromParentIdent, null); + if(templateFromParent.template) { + $.each(templateFromParent.template.split(" "), function(idx, tmpl) { + var template = templates[tmpl]; + applyTemplate( data, step, template, eventData ); + }); + } + } + }); + $jmpress("beforeInit", function( nil, eventData ) { + var data = $jmpress("dataset", this), + dataTemplate = data.template, + stepSelector = eventData.settings.stepSelector; + if (dataTemplate) { + var template = templates[dataTemplate]; + applyChildrenTemplates( $(this).find(stepSelector).filter(function() { + return !$(this).parent().is(stepSelector); + }), template.children ); + } + }); + + /* EXPORTED FUNCTIONS */ + $jmpress("register", "template", function( name, tmpl ) { + if (templates[name]) { + templates[name] = $.extend(true, {}, templates[name], tmpl); + } else { + templates[name] = $.extend(true, {}, tmpl); + } + }); + $jmpress("register", "apply", function( selector, tmpl ) { + if( !tmpl ) { + // TODO ERROR because settings not found + var stepSelector = $(this).jmpress("settings").stepSelector; + applyChildrenTemplates( $(this).find(stepSelector).filter(function() { + return !$(this).parent().is(stepSelector); + }), selector ); + } else if($.isArray(tmpl)) { + applyChildrenTemplates( $(selector), tmpl ); + } else { + var template; + if(typeof tmpl === "string") { + template = templates[tmpl]; + } else { + template = $.extend(true, {}, tmpl); + } + $(selector).each(function(idx, element) { + element = $(element); + var tmpl = element.data(templateFromApplyIdent) || {}; + addUndefined(tmpl, template); + element.data(templateFromApplyIdent, tmpl); + }); + } + }); + +}(jQuery, document, window)); +/* + * jqevents.js + * Fires jQuery events + */ +(function( $, document, window, undefined ) { + + 'use strict'; + + /* HOOKS */ + // the events should not bubble up the tree + // elsewise nested jmpress would cause buggy behavior + $.jmpress("setActive", function( step, eventData ) { + if(eventData.prevStep !== step) { + $(step).triggerHandler("enterStep"); + } + }); + $.jmpress("setInactive", function( step, eventData ) { + if(eventData.nextStep !== step) { + $(step).triggerHandler("leaveStep"); + } + }); + +}(jQuery, document, window)); +/* + * animation.js + * Apply custom animations to steps + */ +(function( $, document, window, undefined ) { + + 'use strict'; + + function parseSubstepInfo(str) { + var arr = str.split(" "); + var className = arr[0]; + var config = { willClass: "will-"+className, doClass: "do-"+className, hasClass: "has-"+className }; + var state = ""; + for(var i = 1; i < arr.length; i++) { + var s = arr[i]; + switch(state) { + case "": + if(s === "after") { + state = "after"; + } else { + $.warn("unknown keyword in '"+str+"'. '"+s+"' unknown."); + } + break; + case "after": + if(s.match(/^[1-9][0-9]*m?s?/)) { + var value = parseFloat(s); + if(s.indexOf("ms") !== -1) { + value *= 1; + } else if(s.indexOf("s") !== -1) { + value *= 1000; + } else if(s.indexOf("m") !== -1) { + value *= 60000; + } + config.delay = value; + } else { + config.after = Array.prototype.slice.call(arr, i).join(" "); + i = arr.length; + } + } + } + return config; + } + function find(array, selector, start, end) { + end = end || (array.length - 1); + start = start || 0; + for(var i = start; i < end + 1; i++) { + if($(array[i].element).is(selector)) { + return i; + } + } + } + function addOn(list, substep, delay) { + $.each(substep._on, function(idx, child) { + list.push({substep: child.substep, delay: child.delay + delay}); + addOn(list, child.substep, child.delay + delay); + }); + } + $.jmpress("defaults").customAnimationDataAttribute = "jmpress"; + $.jmpress("afterInit", function( nil, eventData ) { + eventData.current.animationTimeouts = []; + eventData.current.animationCleanupWaiting = []; + }); + $.jmpress("applyStep", function( step, eventData ) { + // read custom animation from elements + var substepsData = {}; + var listOfSubsteps = []; + $(step).find("[data-"+eventData.settings.customAnimationDataAttribute+"]") + .each(function(idx, element) { + if($(element).closest(eventData.settings.stepSelector).is(step)) { + listOfSubsteps.push({element: element}); + } + }); + if(listOfSubsteps.length === 0) { + return; + } + $.each(listOfSubsteps, function(idx, substep) { + substep.info = parseSubstepInfo( + $(substep.element).data(eventData.settings.customAnimationDataAttribute)); + $(substep.element).addClass(substep.info.willClass); + substep._on = []; + substep._after = null; + }); + var current = {_after: undefined, _on: [], info: {}}; // virtual zero step + $.each(listOfSubsteps, function(idx, substep) { + var other = substep.info.after; + if(other) { + if(other === "step") { + other = current; + } else if(other === "prev") { + other = listOfSubsteps[idx-1]; + } else { + var index = find(listOfSubsteps, other, 0, idx - 1); + if(index === undefined) { + index = find(listOfSubsteps, other); + } + other = (index === undefined || index === idx) ? listOfSubsteps[idx-1] : listOfSubsteps[index]; + } + } else { + other = listOfSubsteps[idx-1]; + } + if(other) { + if(!substep.info.delay) { + if(!other._after) { + other._after = substep; + return; + } + other = other._after; + } + other._on.push({substep: substep, delay: substep.info.delay || 0}); + } + }); + if(current._after === undefined && current._on.length === 0) { + var startStep = find(listOfSubsteps, eventData.stepData.startSubstep) || 0; + current._after = listOfSubsteps[startStep]; + } + var substepsInOrder = []; + function findNextFunc(idx, item) { + if(item.substep._after) { + current = item.substep._after; + return false; + } + } + do { + var substepList = [{substep: current, delay: 0}]; + addOn(substepList, current, 0); + substepsInOrder.push(substepList); + current = null; + $.each(substepList, findNextFunc); + } while(current); + substepsData.list = substepsInOrder; + $(step).data("substepsData", substepsData); + }); + $.jmpress("unapplyStep", function( step, eventData ) { + var substepsData = $(step).data("substepsData"); + if(substepsData) { + $.each(substepsData.list, function(idx, activeSubsteps) { + $.each(activeSubsteps, function(idx, substep) { + if(substep.substep.info.willClass) { + $(substep.substep.element).removeClass(substep.substep.info.willClass); + } + if(substep.substep.info.hasClass) { + $(substep.substep.element).removeClass(substep.substep.info.hasClass); + } + if(substep.substep.info.doClass) { + $(substep.substep.element).removeClass(substep.substep.info.doClass); + } + }); + }); + } + }); + $.jmpress("setActive", function(step, eventData) { + var substepsData = $(step).data("substepsData"); + if(!substepsData) { + return; + } + if(eventData.substep === undefined) { + eventData.substep = + (eventData.reason === "prev" ? + substepsData.list.length-1 : + 0 + ); + } + var substep = eventData.substep; + $.each(eventData.current.animationTimeouts, function(idx, timeout) { + clearTimeout(timeout); + }); + eventData.current.animationTimeouts = []; + $.each(substepsData.list, function(idx, activeSubsteps) { + var applyHas = idx < substep; + var applyDo = idx <= substep; + $.each(activeSubsteps, function(idx, substep) { + if(substep.substep.info.hasClass) { + $(substep.substep.element)[(applyHas?"add":"remove")+"Class"](substep.substep.info.hasClass); + } + function applyIt() { + $(substep.substep.element).addClass(substep.substep.info.doClass); + } + if(applyDo && !applyHas && substep.delay && eventData.reason !== "prev") { + if(substep.substep.info.doClass) { + $(substep.substep.element).removeClass(substep.substep.info.doClass); + eventData.current.animationTimeouts.push(setTimeout(applyIt, substep.delay)); + } + } else { + if(substep.substep.info.doClass) { + $(substep.substep.element)[(applyDo?"add":"remove")+"Class"](substep.substep.info.doClass); + } + } + }); + }); + }); + $.jmpress("setInactive", function(step, eventData) { + if(eventData.nextStep === step) { + return; + } + function cleanupAnimation( substepsData ) { + $.each(substepsData.list, function(idx, activeSubsteps) { + $.each(activeSubsteps, function(idx, substep) { + if(substep.substep.info.hasClass) { + $(substep.substep.element).removeClass(substep.substep.info.hasClass); + } + if(substep.substep.info.doClass) { + $(substep.substep.element).removeClass(substep.substep.info.doClass); + } + }); + }); + } + $.each(eventData.current.animationCleanupWaiting, function(idx, item) { + cleanupAnimation(item); + }); + eventData.current.animationCleanupWaiting = []; + var substepsData = $(step).data("substepsData"); + if(substepsData) { + eventData.current.animationCleanupWaiting.push( substepsData ); + } + }); + $.jmpress("selectNext", function( step, eventData ) { + if(eventData.substep === undefined) { + return; + } + var substepsData = $(step).data("substepsData"); + if(!substepsData) { + return; + } + if(eventData.substep < substepsData.list.length-1) { + return {step: step, substep: eventData.substep+1}; + } + }); + $.jmpress("selectPrev", function( step, eventData ) { + if(eventData.substep === undefined) { + return; + } + var substepsData = $(step).data("substepsData"); + if(!substepsData) { + return; + } + if(eventData.substep > 0) { + return {step: step, substep: eventData.substep-1}; + } + }); + +}(jQuery, document, window)); +/* + * jmpress.toggle plugin + * For binding a key to toggle de/initialization of jmpress.js. + */ +(function( $, document, window, undefined ) { + 'use strict'; + $.jmpress("register", "toggle", function( key, config, initial ) { + var jmpress = this; + $(document).bind("keydown", function( event ) { + if ( event.keyCode === key ) { + if ($(jmpress).jmpress("initialized")) { + $(jmpress).jmpress("deinit"); + } else { + $(jmpress).jmpress(config); + } + } + }); + if ( initial ) { + $(jmpress).jmpress(config); + } + }); +}(jQuery, document, window)); + +/* + * jmpress.secondary plugin + * Apply a secondary animation when step is selected. + */ +(function( $, document, window, undefined ) { + 'use strict'; + $.jmpress("initStep", function( step, eventData ) { + for(var name in eventData.data) { + if(name.indexOf("secondary") === 0) { + eventData.stepData[name] = eventData.data[name]; + } + } + }); + function exchangeIf(childStepData, condition, step) { + if(childStepData.secondary && + childStepData.secondary.split(" ").indexOf(condition) !== -1) { + for(var name in childStepData) { + if(name.length > 9 && name.indexOf("secondary") === 0) { + var tmp = childStepData[name]; + var normal = name.substr(9); + normal = normal.substr(0, 1).toLowerCase() + normal.substr(1); + childStepData[name] = childStepData[normal]; + childStepData[normal] = tmp; + } + } + $(this).jmpress("reapply", $(step)); + } + } + $.jmpress("beforeActive", function( step, eventData ) { + exchangeIf.call(eventData.jmpress, $(step).data("stepData"), "self", step); + var parent = $(step).parent(); + $(parent) + .children(eventData.settings.stepSelector) + .each(function(idx, child) { + var childStepData = $(child).data("stepData"); + exchangeIf.call(eventData.jmpress, childStepData, "siblings", child); + }); + function grandchildrenFunc(idx, child) { + var childStepData = $(child).data("stepData"); + exchangeIf.call(eventData.jmpress, childStepData, "grandchildren", child); + } + for(var i = 1; i < eventData.parents.length; i++) { + $(eventData.parents[i]) + .children(eventData.settings.stepSelector) + .each(); + } + }); + $.jmpress("setInactive", function( step, eventData ) { + exchangeIf.call(eventData.jmpress, $(step).data("stepData"), "self", step); + var parent = $(step).parent(); + $(parent) + .children(eventData.settings.stepSelector) + .each(function(idx, child) { + var childStepData = $(child).data("stepData"); + exchangeIf.call(eventData.jmpress, childStepData, "siblings", child); + }); + function grandchildrenFunc(idx, child) { + var childStepData = $(child).data("stepData"); + exchangeIf.call(eventData.jmpress, childStepData, "grandchildren", child); + } + for(var i = 1; i < eventData.parents.length; i++) { + $(eventData.parents[i]) + .children(eventData.settings.stepSelector) + .each(grandchildrenFunc); + } + }); +}(jQuery, document, window)); + +/* + * jmpress.duration plugin + * For auto advancing steps after a given duration and optionally displaying a + * progress bar. + */ +(function( $, document, window, undefined ) { + 'use strict'; + + $.jmpress("defaults").duration = { + defaultValue: -1 + ,defaultAction: "next" + ,barSelector: undefined + ,barProperty: "width" + ,barPropertyStart: "0" + ,barPropertyEnd: "100%" + }; + $.jmpress("initStep", function( step, eventData ) { + eventData.stepData.duration = eventData.data.duration && parseInt(eventData.data.duration, 10); + eventData.stepData.durationAction = eventData.data.durationAction; + }); + $.jmpress("setInactive", function( step, eventData ) { + var settings = eventData.settings, + durationSettings = settings.duration, + current = eventData.current; + var dur = eventData.stepData.duration || durationSettings.defaultValue; + if( current.durationTimeout ) { + if( durationSettings.barSelector ) { + var css = { + transitionProperty: durationSettings.barProperty + ,transitionDuration: '0' + ,transitionDelay: '0' + ,transitionTimingFunction: 'linear' + }; + css[durationSettings.barProperty] = durationSettings.barPropertyStart; + var bars = $(durationSettings.barSelector); + $.jmpress("css", bars, css); + bars.each(function(idx, element) { + var next = $(element).next(); + var parent = $(element).parent(); + $(element).detach(); + if(next.length) { + next.insertBefore(element); + } else { + parent.append(element); + } + }); + } + clearTimeout(current.durationTimeout); + delete current.durationTimeout; + } + }); + $.jmpress("setActive", function( step, eventData ) { + var settings = eventData.settings, + durationSettings = settings.duration, + current = eventData.current; + var dur = eventData.stepData.duration || durationSettings.defaultValue; + if( dur && dur > 0 ) { + if( durationSettings.barSelector ) { + var css = { + transitionProperty: durationSettings.barProperty + ,transitionDuration: (dur-settings.transitionDuration*2/3-100)+"ms" + ,transitionDelay: (settings.transitionDuration*2/3)+'ms' + ,transitionTimingFunction: 'linear' + }; + css[durationSettings.barProperty] = durationSettings.barPropertyEnd; + $.jmpress("css", $(durationSettings.barSelector), css); + } + var jmpress = this; + if(current.durationTimeout) { + clearTimeout(current.durationTimeout); + current.durationTimeout = undefined; + } + current.durationTimeout = setTimeout(function() { + var action = eventData.stepData.durationAction || durationSettings.defaultAction; + $(jmpress).jmpress(action); + }, dur); + } + }); +}(jQuery, document, window)); + +/* + * jmpress.presentation-mode plugin + * Display a window for the presenter with notes and a control and view of the + * presentation + */ +(function( $, document, window, undefined ) { + + 'use strict'; + var $jmpress = $.jmpress; + + var PREFIX = "jmpress-presentation-"; + + /* FUNCTIONS */ + function randomString() { + return "" + Math.round(Math.random() * 100000, 0); + } + + /* DEFAULTS */ + $jmpress("defaults").presentationMode = { + use: true, + url: "presentation-screen.html", + notesUrl: false, + transferredValues: ["userZoom", "userTranslateX", "userTranslateY"] + }; + $jmpress("defaults").keyboard.keys[80] = "presentationPopup"; // p key + + /* HOOKS */ + $jmpress("afterInit", function( nil, eventData) { + var current = eventData.current; + + current.selectMessageListeners = []; + + if(eventData.settings.presentationMode.use) { + + window.addEventListener("message", function(event) { + // We do not test orgin, because we want to accept messages + // from all orgins + try { + if(typeof event.data !== "string" || event.data.indexOf(PREFIX) !== 0) { + return; + } + var json = JSON.parse(event.data.slice(PREFIX.length)); + switch(json.type) { + case "select": + $.each(eventData.settings.presentationMode.transferredValues, function(idx, name) { + eventData.current[name] = json[name]; + }); + if(/[a-z0-9\-]+/i.test(json.targetId) && typeof json.substep in {number:1,undefined:1}) { + $(eventData.jmpress).jmpress("select", {step: "#"+json.targetId, substep: json.substep}, json.reason); + } else { + $.error("For security reasons the targetId must match /[a-z0-9\\-]+/i and substep must be a number."); + } + break; + case "listen": + current.selectMessageListeners.push(event.source); + break; + case "ok": + clearTimeout(current.presentationPopupTimeout); + break; + case "read": + try { + event.source.postMessage(PREFIX + JSON.stringify({type: "url", url: window.location.href, notesUrl: eventData.settings.presentationMode.notesUrl}), "*"); + } catch(e) { + $.error("Cannot post message to source: " + e); + } + break; + default: + throw "Unknown message type: " + json.type; + } + } catch(e) { + $.error("Received message is malformed: " + e); + } + }); + try { + if(window.parent && window.parent !== window) { + window.parent.postMessage(PREFIX + JSON.stringify({ + "type": "afterInit" + }), "*"); + } + } catch(e) { + $.error("Cannot post message to parent: " + e); + } + } + }); + $jmpress("afterDeinit", function( nil, eventData) { + if(eventData.settings.presentationMode.use) { + try { + if(window.parent && window.parent !== window) { + window.parent.postMessage(PREFIX + JSON.stringify({ + "type": "afterDeinit" + }), "*"); + } + } catch(e) { + $.error("Cannot post message to parent: " + e); + } + } + }); + $jmpress("setActive", function( step, eventData) { + var stepId = $(eventData.delegatedFrom).attr("id"), + substep = eventData.substep, + reason = eventData.reason; + $.each(eventData.current.selectMessageListeners, function(idx, listener) { + try { + var msg = { + "type": "select", + "targetId": stepId, + "substep": substep, + "reason": reason + }; + $.each(eventData.settings.presentationMode.transferredValues, function(idx, name) { + msg[name] = eventData.current[name]; + }); + listener.postMessage(PREFIX + JSON.stringify(msg), "*"); + } catch(e) { + $.error("Cannot post message to listener: " + e); + } + }); + }); + $jmpress("register", "presentationPopup", function() { + function trySend() { + jmpress.jmpress("current").presentationPopupTimeout = setTimeout(trySend, 100); + try { + popup.postMessage(PREFIX + JSON.stringify({type: "url", url: window.location.href, notesUrl: jmpress.jmpress("settings").presentationMode.notesUrl}), "*"); + } catch(e) { + } + } + var jmpress = $(this), + popup; + if(jmpress.jmpress("settings").presentationMode.use) { + popup = window.open($(this).jmpress("settings").presentationMode.url); + jmpress.jmpress("current").presentationPopupTimeout = setTimeout(trySend, 100); + } + }); +}(jQuery, document, window)); diff --git a/js/jmpress.min.js b/js/jmpress.min.js new file mode 100644 index 0000000..fd46333 --- /dev/null +++ b/js/jmpress.min.js @@ -0,0 +1,14 @@ +/*! + * jmpress.js v0.4.5 + * http://jmpressjs.github.com/jmpress.js + * + * A jQuery plugin to build a website on the infinite canvas. + * + * Copyright 114 Kyle Robinson Young @shama & Tobias Koppers @sokra + * Licensed MIT + * http://www.opensource.org/licenses/mit-license.php + * + * Based on the foundation laid by Bartek Szopka @bartaz + */ +(function(e,t,s,a){"use strict";function r(e){if(e){var t=1+e.substr(1).search(/[A-Z]/),s=e.substr(0,t).toLowerCase(),a=e.substr(t).toLowerCase();return"-"+s+"-"+a}}function n(e){return e?e+",":""}function i(e){return e.length>0?e:null}function o(r){function n(t,s){var a=p(t),r={oldStyle:e(t).attr("style")||""},n={data:a,stepData:r};f.call(this,"beforeInitStep",e(t),n),r.delegate=a.delegate,f.call(this,"initStep",e(t),n),e(t).data("stepData",r),e(t).attr("id")||e(t).attr("id","step-"+(s+1)),f.call(this,"applyStep",e(t),n)}function o(t){var s=e(t).data("stepData");e(t).attr("style",s.oldStyle),f.call(this,"unapplyStep",e(t),{stepData:s})}function c(t){f.call(this,"unapplyStep",e(t),{stepData:t.data("stepData")}),f.call(this,"applyStep",e(t),{stepData:t.data("stepData")})}function u(){Z&&f.call(this,"setInactive",Z,{stepData:e(Z).data("stepData"),reason:"deinit"}),Y.jmpressClass&&e(I).removeClass(Y.jmpressClass),f.call(this,"beforeDeinit",e(this),{}),e(A.stepSelector,I).each(function(){o.call(I,this)}),k.attr("style",X.container),A.fullscreen&&e("html").attr("style",""),z.attr("style",X.area),e(O).children().each(function(){I.append(e(this))}),A.fullscreen?O.remove():(O.remove(),z.remove()),f.call(this,"afterDeinit",e(this),{}),e(I).data("jmpressmethods",!1),Y.idleTimeout&&clearTimeout(Y.idleTimeout)}function f(t,s,a){a.settings=A,a.current=Y,a.container=k,a.parents=s?d(s):null,a.current=Y,a.jmpress=this;var r={};return e.each(A[t],function(e,t){r.value=t.call(I,s,a)||r.value}),r.value}function d(t){return e(t).parentsUntil(I).not(I).filter(A.stepSelector)}function v(e){return g({step:Z,substep:F},e)}function g(t,s){var r;if(e.isPlainObject(t)&&(r=t.substep,t=t.step),"string"==typeof t&&(t=I.find(t).first()),!t||!e(t).data("stepData"))return!1;b.call(this);var n=e(t).data("stepData"),o=!1;if(f.call(this,"beforeChange",t,{stepData:n,reason:s,cancel:function(){o=!0}}),o)return a;var c={},u=t;e(t).data("stepData").delegate&&(u=i(e(t).parentsUntil(I).filter(A.stepSelector).filter(n.delegate))||i(e(t).near(n.delegate))||i(e(t).near(n.delegate,!0))||i(e(n.delegate,I)),u?n=u.data("stepData"):u=t),Q&&f.call(this,"setInactive",Q,{stepData:e(Q).data("stepData"),delegatedFrom:Z,reason:s,target:c,nextStep:u,nextSubstep:r,nextStepData:n});var l={stepData:n,delegatedFrom:t,reason:s,target:c,substep:r,prevStep:Q,prevSubstep:F,prevStepData:Q&&e(Q).data("stepData")};return f.call(this,"beforeActive",u,l),f.call(this,"setActive",u,l),Y.jmpressClass&&e(I).removeClass(Y.jmpressClass),e(I).addClass(Y.jmpressClass="step-"+e(u).attr("id")),Y.jmpressDelegatedClass&&e(I).removeClass(Y.jmpressDelegatedClass),e(I).addClass(Y.jmpressDelegatedClass="delegating-step-"+e(t).attr("id")),f.call(this,"applyTarget",u,e.extend({canvas:O,area:z,beforeActive:Q},l)),Z=t,F=l.substep,Q=u,Y.idleTimeout&&clearTimeout(Y.idleTimeout),Y.idleTimeout=setTimeout(function(){f.call(this,"idle",u,l)},Math.max(1,A.transitionDuration-100)),u}function b(){(function t(){function a(){(0!==e(k).scrollTop()||0!==e(k).scrollLeft())&&t()}if("BODY"===e(k)[0].tagName)try{s.scrollTo(0,0)}catch(r){}e(k).scrollTop(0),e(k).scrollLeft(0),setTimeout(a,1),setTimeout(a,10),setTimeout(a,100),setTimeout(a,200),setTimeout(a,400)})()}function j(e){return g.call(this,e,"jump")}function y(){return g.call(this,f.call(this,"selectNext",Z,{stepData:e(Z).data("stepData"),substep:F}),"next")}function D(){return g.call(this,f.call(this,"selectPrev",Z,{stepData:e(Z).data("stepData"),substep:F}),"prev")}function S(){return g.call(this,f.call(this,"selectHome",Z,{stepData:e(Z).data("stepData")}),"home")}function w(){return g.call(this,f.call(this,"selectEnd",Z,{stepData:e(Z).data("stepData")}),"end")}function x(t){return l(O,t||{}),e(O)}function C(){return Q&&e(Q)}function T(t,s,r){return h[t]?f.call(this,t,s,r):(e.error("callback "+t+" is not registered."),a)}function P(){var e=navigator.userAgent.toLowerCase();return-1===e.search(/(iphone)|(ipod)|(android)/)||-1!==e.search(/(chrome)/)}r=e.extend(!0,{},r||{});var M={},N=null;for(N in h)M[N]=e.isFunction(r[N])?[r[N]]:r[N],r[N]=[];var A=e.extend(!0,{},m,r);for(N in h)M[N]&&Array.prototype.push.apply(A[N],M[N]);var I=e(this),k=null,z=null,X={container:"",area:""},O=null,Y=null,Z=!1,F=null,Q=!1;if(I.data("jmpressmethods",{select:g,reselect:v,scrollFix:b,goTo:j,next:y,prev:D,home:S,end:w,canvas:x,container:function(){return k},settings:function(){return A},active:C,current:function(){return Y},fire:T,init:function(t){n.call(this,e(t),Y.nextIdNumber++)},deinit:function(t){t?o.call(this,e(t)):u.call(this)},reapply:c}),P()===!1||f.call(this,"checkNoSupport",null,{}))return A.notSupportedClass&&I.addClass(A.notSupportedClass),a;A.notSupportedClass&&I.removeClass(A.notSupportedClass);var L=e(A.stepSelector,I);k=I,z=e("
"),O=e("
"),e(I).children().filter(L).each(function(){O.append(e(this))}),A.fullscreen&&(k=e("body"),e("html").css({overflow:"hidden"}),z=I),X.area=z.attr("style")||"",X.container=k.attr("style")||"",A.fullscreen?(k.css({height:"100%"}),I.append(O)):(k.css({position:"relative"}),z.append(O),I.append(z)),e(k).addClass(A.containerClass),e(z).addClass(A.areaClass),e(O).addClass(A.canvasClass),t.documentElement.style.height="100%",k.css({overflow:"hidden"});var E={position:"absolute",transitionDuration:"0s"};E=e.extend({},A.animation,E),l(z,E),l(O,E),Y={},f.call(this,"beforeInit",null,{canvas:O,area:z}),L.each(function(e){n.call(I,this,e)}),Y.nextIdNumber=L.length,f.call(this,"afterInit",null,{}),g.call(this,f.call(this,"selectInitialStep","init",{})),A.initClass&&e(L).removeClass(A.initClass)}function c(){return m}function u(t,s){e.isFunction(s)?g[t]?e.error("function "+t+" is already registered."):g[t]=s:h[t]?e.error("callback "+t+" is already registered."):(h[t]=1,m[t]=[])}function l(t,s){var a,r,n={};for(a in s)s.hasOwnProperty(a)&&(r=d(a),null!==r&&(n[r]=s[a]));return e(t).css(n),t}function p(t){function s(e){e=e.split("-");for(var t=1;e.length>t;t++)e[t]=e[t].substr(0,1).toUpperCase()+e[t].substr(1);return e.join("")}if(e(t)[0].dataset)return e.extend({},e(t)[0].dataset);var a={},r=e(t)[0].attributes;return e.each(r,function(e,t){"data-"===t.nodeName.substr(0,5)&&(a[s(t.nodeName.substr(5))]=t.nodeValue)}),a}function f(){return!!e(this).data("jmpressmethods")}var d=function(){var e=t.createElement("dummy").style,s="Webkit Moz O ms Khtml".split(" "),r={};return function(t){if(r[t]===a){var n=t.charAt(0).toUpperCase()+t.substr(1),i=(t+" "+s.join(n+" ")+n).split(" ");r[t]=null;for(var o in i)if(e[i[o]]!==a){r[t]=i[o];break}}return r[t]}}(),m={stepSelector:".step",containerClass:"",canvasClass:"",areaClass:"",notSupportedClass:"not-supported",fullscreen:!0,animation:{transformOrigin:"top left",transitionProperty:n(r(d("transform")))+n(r(d("perspective")))+"opacity",transitionDuration:"1s",transitionDelay:"500ms",transitionTimingFunction:"ease-in-out",transformStyle:"preserve-3d"},transitionDuration:1500},h={beforeChange:1,beforeInitStep:1,initStep:1,checkNoSupport:1,beforeInit:1,afterInit:1,beforeDeinit:1,afterDeinit:1,applyStep:1,unapplyStep:1,setInactive:1,beforeActive:1,setActive:1,selectInitialStep:1,selectPrev:1,selectNext:1,selectHome:1,selectEnd:1,idle:1,applyTarget:1};for(var v in h)m[v]=[];var g={init:o,initialized:f,deinit:function(){},css:l,pfx:d,defaults:c,register:u,dataset:p};e.fn.jmpress=function(t){function s(){var s=e(this).data("jmpressmethods");if(s&&s[t])return s[t].apply(this,Array.prototype.slice.call(arguments,1));if(g[t])return g[t].apply(this,Array.prototype.slice.call(arguments,1));if(h[t]&&s){var a=s.settings(),r=Array.prototype.slice.call(arguments,1)[0];e.isFunction(r)&&(a[t]=a[t]||[],a[t].push(r))}else{if("object"==typeof t||!t)return o.apply(this,arguments);e.error("Method "+t+" does not exist on jQuery.jmpress")}return this}var a,r=arguments;return e(this).each(function(e,t){a=s.apply(t,r)}),a},e.extend({jmpress:function(t){if(g[t])return g[t].apply(this,Array.prototype.slice.call(arguments,1));if(h[t]){var s=Array.prototype.slice.call(arguments,1)[0];e.isFunction(s)?m[t].push(s):e.error("Second parameter should be a function: $.jmpress( callbackName, callbackFunction )")}else e.error("Method "+t+" does not exist on jQuery.jmpress")}})})(jQuery,document,window),function(e){"use strict";function t(t,s,a,r){var n;return t.each(function(t,i){return r&&(n=s(i,a,r))?!1:e(i).is(a)?(n=i,!1):!r&&(n=s(i,a,r))?!1:undefined}),n}function s(a,r,n){var i=e(a).children();return n&&(i=e(i.get().reverse())),t(i,s,r,n)}function a(a,r,n){return t(e(a)[n?"prevAll":"nextAll"](),s,r,n)}function r(t,s,r){var n,i=e(t).parents();return i=e(i.get()),e.each(i.get(),function(t,i){return r&&e(i).is(s)?(n=i,!1):(n=a(i,s,r),n?!1:undefined)}),n}e.fn.near=function(t,n){var i=[];return e(this).each(function(e,o){var c=(n?!1:s(o,t,n))||a(o,t,n)||r(o,t,n);c&&i.push(c)}),e(i)}}(jQuery,document,window),function(e,t,s,a){"use strict";function r(e){return Math.round(1e4*e)/1e4+""}var n={3:{transform:function(t,s,a){var n="translate(-"+a.originX+",-"+a.originY+")";e.each(s,function(e,t){var s,a=["X","Y","Z"];if("translate"===t[0])n+=" translate3d("+r(t[1]||0)+"px,"+r(t[2]||0)+"px,"+r(t[3]||0)+"px)";else if("rotate"===t[0]){var i=t[4]?[1,2,3]:[3,2,1];for(s=0;3>s;s++)n+=" rotate"+a[i[s]-1]+"("+r(t[i[s]]||0)+"deg)"}else if("scale"===t[0])for(s=0;3>s;s++)n+=" scale"+a[s]+"("+r(t[s+1]||1)+")"}),e.jmpress("css",t,e.extend({},{transform:n}))}},2:{transform:function(t,s,a){var n="translate(-"+a.originX+",-"+a.originY+")";e.each(s,function(e,t){var s=["X","Y"];if("translate"===t[0])n+=" translate("+r(t[1]||0)+"px,"+r(t[2]||0)+"px)";else if("rotate"===t[0])n+=" rotate("+r(t[3]||0)+"deg)";else if("scale"===t[0])for(var a=0;2>a;a++)n+=" scale"+s[a]+"("+r(t[a+1]||1)+")"}),e.jmpress("css",t,e.extend({},{transform:n}))}}},i=function(){return e.jmpress("pfx","perspective")?n[3]:e.jmpress("pfx","transform")?n[2]:a}();i||e.jmpress("checkNoSupport",function(){return!0});var o=e.jmpress("defaults");o.reasonableAnimation={},o.originX="50%",o.originY="50%",e.jmpress("initStep",function(t,s){var a=s.data,r=s.stepData,n=parseFloat;e.extend(r,{x:n(a.x)||0,y:n(a.y)||0,z:n(a.z)||0,r:n(a.r)||0,phi:n(a.phi)||0,rotate:n(a.rotate)||0,rotateX:n(a.rotateX)||0,rotateY:n(a.rotateY)||0,rotateZ:n(a.rotateZ)||0,revertRotate:!1,scale:n(a.scale)||1,scaleX:n(a.scaleX)||!1,scaleY:n(a.scaleY)||!1,scaleZ:n(a.scaleZ)||1})}),e.jmpress("beforeInit",function(t,s){e.jmpress("css",s.area,{left:s.settings.originX,top:s.settings.originY,perspective:"1000px"})}),e.jmpress("afterInit",function(t,s){var a=s.settings.stepSelector,r=s.current;r.perspectiveScale=1,r.maxNestedDepth=0;for(var n=e(s.jmpress).find(a).children(a);n.length;)r.maxNestedDepth++,n=n.children(a)}),e.jmpress("applyStep",function(t,s){e.jmpress("css",e(t),{position:"absolute",transformStyle:"preserve-3d"}),s.parents.length>0&&e.jmpress("css",e(t),{top:"50%",left:"50%"});var a=s.stepData,r=[["translate",a.x||a.r*Math.sin(a.phi*Math.PI/180),a.y||-a.r*Math.cos(a.phi*Math.PI/180),a.z],["rotate",a.rotateX,a.rotateY,a.rotateZ||a.rotate,!0],["scale",a.scaleX||a.scale,a.scaleY||a.scale,a.scaleZ||a.scale]];i.transform(t,r,s.settings)}),e.jmpress("setActive",function(t,s){var r=s.target,n=s.stepData,i=r.transform=[];r.perspectiveScale=1;for(var o=s.current.maxNestedDepth;o>(s.parents.length||0);o--)i.push(["scale"],["rotate"],["translate"]);i.push(["scale",1/(n.scaleX||n.scale),1/(n.scaleY||n.scale),1/n.scaleZ]),i.push(["rotate",-n.rotateX,-n.rotateY,-(n.rotateZ||n.rotate)]),i.push(["translate",-(n.x||n.r*Math.sin(n.phi*Math.PI/180)),-(n.y||-n.r*Math.cos(n.phi*Math.PI/180)),-n.z]),r.perspectiveScale*=n.scaleX||n.scale,e.each(s.parents,function(t,s){var a=e(s).data("stepData");i.push(["scale",1/(a.scaleX||a.scale),1/(a.scaleY||a.scale),1/a.scaleZ]),i.push(["rotate",-a.rotateX,-a.rotateY,-(a.rotateZ||a.rotate)]),i.push(["translate",-(a.x||a.r*Math.sin(a.phi*Math.PI/180)),-(a.y||-a.r*Math.cos(a.phi*Math.PI/180)),-a.z]),r.perspectiveScale*=a.scaleX||a.scale}),e.each(i,function(e,t){function r(r){s.current["rotate"+r+"-"+e]===a&&(s.current["rotate"+r+"-"+e]=t[r]||0);var n=s.current["rotate"+r+"-"+e],i=t[r]||0,o=n%360,c=i%360;0>o&&(o+=360),0>c&&(c+=360);var u=c-o;-180>u?u+=360:u>180&&(u-=360),s.current["rotate"+r+"-"+e]=t[r]=n+u}"rotate"===t[0]&&(r(1),r(2),r(3))})}),e.jmpress("applyTarget",function(t,s){var r,n=s.target,o=(s.stepData,s.settings),c=1.3*n.perspectiveScale1.3*s.current.perspectiveScale,l=-1;e.each(n.transform,function(e,t){return 1>=t.length||"rotate"===t[0]&&0===t[1]%360&&0===t[2]%360&&0===t[3]%360?a:"scale"!==t[0]?!1:(l=e,a)}),l!==s.current.oldLastScale&&(c=u=!1,s.current.oldLastScale=l);var p=[];if(-1!==l)for(;l>=0;)"scale"===n.transform[l][0]&&(p.push(n.transform[l]),n.transform[l]=["scale"]),l--;var f=o.animation;o.reasonableAnimation[s.reason]&&(f=e.extend({},f,o.reasonableAnimation[s.reason])),r={perspective:Math.round(1e3*n.perspectiveScale)+"px"},r=e.extend({},f,r),c||(r.transitionDelay="0s"),s.beforeActive||(r.transitionDuration="0s",r.transitionDelay="0s"),e.jmpress("css",s.area,r),i.transform(s.area,p,s.settings),r=e.extend({},f),u||(r.transitionDelay="0s"),s.beforeActive||(r.transitionDuration="0s",r.transitionDelay="0s"),s.current.perspectiveScale=n.perspectiveScale,e.jmpress("css",s.canvas,r),i.transform(s.canvas,n.transform,s.settings)})}(jQuery,document,window),function(e){"use strict";var t=e.jmpress,s="activeClass",a="nestedActiveClass",r=t("defaults");r[a]="nested-active",r[s]="active",t("setInactive",function(t,r){var n=r.settings,i=n[s],o=n[a];i&&e(t).removeClass(i),o&&e.each(r.parents,function(t,s){e(s).removeClass(o)})}),t("setActive",function(t,r){var n=r.settings,i=n[s],o=n[a];i&&e(t).addClass(i),o&&e.each(r.parents,function(t,s){e(s).addClass(o)})})}(jQuery,document,window),function(e){"use strict";function t(t,s){return e(this).find(s.settings.stepSelector).first()}function s(t,s,a,r){if(!s)return!1;var n=a.settings.stepSelector;s=e(s);do{var i=s.near(n,r);if((0===i.length||0===i.closest(t).length)&&(i=e(t).find(n)[r?"last":"first"]()),!i.length)return!1;s=i}while(s.data("stepData").exclude);return s}var a=e.jmpress;a("initStep",function(e,t){t.stepData.exclude=t.data.exclude&&-1===["false","no"].indexOf(t.data.exclude)}),a("selectInitialStep",t),a("selectHome",t),a("selectEnd",function(t,s){return e(this).find(s.settings.stepSelector).last()}),a("selectPrev",function(e,t){return s(this,e,t,!0)}),a("selectNext",function(e,t){return s(this,e,t)})}(jQuery,document,window),function(e){"use strict";e.jmpress("selectInitialStep",function(e,t){return t.settings.start})}(jQuery,document,window),function(e){"use strict";function t(t,s,a){for(var r=0;s.length-1>r;r++){var n=s[r],i=s[r+1];e(t).jmpress("initialized")?e(n,t).data("stepData")[a]=i:e(n,t).attr("data-"+a,i)}}function s(t,s,a,r){var n=s.stepData;if(n[a]){var i=e(t).near(n[a],r);if(i&&i.length)return i;if(i=e(n[a],this)[r?"last":"first"](),i&&i.length)return i}}var a=e.jmpress;a("register","route",function(e,s,a){"string"==typeof e&&(e=[e,e]),t(this,e,a?"prev":"next"),s||t(this,e.reverse(),a?"next":"prev")}),a("initStep",function(e,t){for(var s in{next:1,prev:1})t.stepData[s]=t.data[s]}),a("selectNext",function(e,t){return s.call(this,e,t,"next")}),a("selectPrev",function(e,t){return s.call(this,e,t,"prev",!0)})}(jQuery,document,window),function(e){"use strict";var t=e.jmpress,s="ajax:afterStepLoaded",a="ajax:loadStep";t("register",a),t("register",s),t("defaults").ajaxLoadedClass="loaded",t("initStep",function(t,s){s.stepData.src=e(t).attr("href")||s.data.src||!1,s.stepData.srcLoaded=!1}),t(a,function(t,a){var r=a.stepData,n=r&&r.src,i=a.settings;n&&(e(t).addClass(i.ajaxLoadedClass),r.srcLoaded=!0,e(t).load(n,function(r,n,i){e(a.jmpress).jmpress("fire",s,t,e.extend({},a,{response:r,status:n,xhr:i}))}))}),t("idle",function(t,s){if(t){var r=s.settings,n=e(this);s.stepData;var i=e(t).add(e(t).near(r.stepSelector)).add(e(t).near(r.stepSelector,!0)).add(n.jmpress("fire","selectPrev",t,{stepData:e(t).data("stepData")})).add(n.jmpress("fire","selectNext",t,{stepData:e(t).data("stepData")}));i.each(function(){var t=this,s=e(t).data("stepData");s.src&&!s.srcLoaded&&n.jmpress("fire",a,t,{stepData:e(t).data("stepData")})})}}),t("setActive",function(t){var s=e(t).data("stepData");s.src&&!s.srcLoaded&&e(this).jmpress("fire",a,t,{stepData:e(t).data("stepData")})})}(jQuery,document,window),function(e,t,s,a){"use strict";function r(){return""+Math.round(1e5*Math.random(),0)}function n(t){try{var r=e("#"+s.location.hash.replace(/^#\/?/,""));return r.length>0&&r.is(t.stepSelector)?r:a}catch(n){}}function i(e){var t="#/"+e;s.history&&s.history.pushState?s.location.hash!==t&&s.history.pushState({},"",t):s.location.hash!==t&&(s.location.hash=t)}var o=e.jmpress,c="a[href^=#]";o("defaults").hash={use:!0,update:!0,bindChange:!0},o("selectInitialStep",function(t,o){var u=o.settings,l=u.hash,p=o.current,f=e(this);return o.current.hashNamespace=".jmpress-"+r(),l.use?(l.bindChange&&(e(s).bind("hashchange"+p.hashNamespace,function(e){var t=n(u);f.jmpress("initialized")&&f.jmpress("scrollFix"),t&&t.length&&(t.attr("id")!==f.jmpress("active").attr("id")&&f.jmpress("select",t),i(t.attr("id"))),e.preventDefault()}),e(c).on("click"+p.hashNamespace,function(t){var s=e(this).attr("href");try{e(s).is(u.stepSelector)&&(f.jmpress("select",s),t.preventDefault(),t.stopPropagation())}catch(a){}})),n(u)):a}),o("afterDeinit",function(t,a){e(c).off(a.current.hashNamespace),e(s).unbind(a.current.hashNamespace)}),o("setActive",function(t,s){var a=s.settings,r=s.current;a.hash.use&&a.hash.update&&(clearTimeout(r.hashtimeout),r.hashtimeout=setTimeout(function(){i(e(s.delegatedFrom).attr("id"))},a.transitionDuration+200))})}(jQuery,document,window),function(e,t,s,a){"use strict";function r(){return""+Math.round(1e5*Math.random(),0)}function n(e){e.preventDefault(),e.stopPropagation()}var i=e.jmpress,o="next",c="prev";i("defaults").keyboard={use:!0,keys:{33:c,37:c,38:c,9:o+":"+c,32:o,34:o,39:o,40:o,36:"home",35:"end"},ignore:{INPUT:[32,37,38,39,40],TEXTAREA:[32,37,38,39,40],SELECT:[38,40]},tabSelector:"a[href]:visible, :input:visible"},i("afterInit",function(s,i){var o=i.settings,c=o.keyboard,u=c.ignore,l=i.current,p=e(this);o.fullscreen||p.attr("tabindex",0),l.keyboardNamespace=".jmpress-"+r(),e(o.fullscreen?t:p).bind("keypress"+l.keyboardNamespace,function(e){for(var t in u)if(e.target.nodeName===t&&-1!==u[t].indexOf(e.which))return;(e.which>=37&&40>=e.which||32===e.which)&&n(e)}),e(o.fullscreen?t:p).bind("keydown"+l.keyboardNamespace,function(t){var s=e(t.target);if((o.fullscreen||s.closest(p).length)&&c.use){for(var r in u)if(s[0].nodeName===r&&-1!==u[r].indexOf(t.which))return;var i,l=!1;if(9===t.which){if(s.closest(p.jmpress("active")).length?(i=s.near(c.tabSelector,t.shiftKey),e(i).closest(o.stepSelector).is(p.jmpress("active"))||(i=a)):t.shiftKey?l=!0:i=p.jmpress("active").find("a[href], :input").filter(":visible").first(),i&&i.length>0)return i.focus(),p.jmpress("scrollFix"),n(t),a;t.shiftKey&&(l=!0)}var f=c.keys[t.which];"string"==typeof f?(-1!==f.indexOf(":")&&(f=f.split(":"),f=t.shiftKey?f[1]:f[0]),p.jmpress(f),n(t)):e.isFunction(f)?f.call(p,t):f&&(p.jmpress.apply(p,f),n(t)),l&&(i=p.jmpress("active").find("a[href], :input").filter(":visible").last(),i.focus(),p.jmpress("scrollFix"))}})}),i("afterDeinit",function(s,a){e(t).unbind(a.current.keyboardNamespace)})}(jQuery,document,window),function(e,t,s,a){"use strict";function r(){return""+Math.round(1e5*Math.random(),0)}function n(e,t){return Math.max(Math.min(e,t),-t)}function i(t,s,a){var r=e(this).jmpress("current"),i=e(this).jmpress("settings"),o=e(this).jmpress("active").data("stepData"),c=e(this).jmpress("container");if(!(0===r.userZoom&&0>a)){var u=o.viewPortZoomable||i.viewPort.zoomable;if(!(r.userZoom===u&&a>0)){r.userZoom+=a;var l=e(c).innerWidth()/2,p=e(c).innerHeight()/2;t=t?t-l:t,s=s?s-p:s,r.userTranslateX=n(r.userTranslateX-a*t/r.zoomOriginWindowScale/u,l*r.userZoom*r.userZoom/u),r.userTranslateY=n(r.userTranslateY-a*s/r.zoomOriginWindowScale/u,p*r.userZoom*r.userZoom/u),e(this).jmpress("reselect","zoom")}}}var o=function(){var e=navigator.userAgent.toLowerCase(),t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return t[1]||""}(),c=e.jmpress("defaults");c.viewPort={width:!1,height:!1,maxScale:0,minScale:0,zoomable:0,zoomBindMove:!0,zoomBindWheel:!0};var u=c.keyboard.keys;u["mozilla"===o?107:187]="zoomIn",u["mozilla"===o?109:189]="zoomOut",c.reasonableAnimation.resize={transitionDuration:"0s",transitionDelay:"0ms"},c.reasonableAnimation.zoom={transitionDuration:"0s",transitionDelay:"0ms"},e.jmpress("initStep",function(e,t){for(var s in{viewPortHeight:1,viewPortWidth:1,viewPortMinScale:1,viewPortMaxScale:1,viewPortZoomable:1})t.stepData[s]=t.data[s]&&parseFloat(t.data[s])}),e.jmpress("afterInit",function(n,i){var o=this;i.current.viewPortNamespace=".jmpress-"+r(),e(s).bind("resize"+i.current.viewPortNamespace,function(){e(o).jmpress("reselect","resize")}),i.current.userZoom=0,i.current.userTranslateX=0,i.current.userTranslateY=0,i.settings.viewPort.zoomBindWheel&&e(i.settings.fullscreen?t:this).bind("mousewheel"+i.current.viewPortNamespace+" DOMMouseScroll"+i.current.viewPortNamespace,function(t,s){s=s||t.originalEvent.wheelDelta||-t.originalEvent.detail;var a=s/Math.abs(s);return 0>a?e(i.jmpress).jmpress("zoomOut",t.originalEvent.clientX,t.originalEvent.clientY):a>0&&e(i.jmpress).jmpress("zoomIn",t.originalEvent.clientX,t.originalEvent.clientY),!1}),i.settings.viewPort.zoomBindMove&&e(i.settings.fullscreen?t:this).bind("mousedown"+i.current.viewPortNamespace,function(e){i.current.userZoom&&(i.current.userTranslating={x:e.clientX,y:e.clientY},e.preventDefault(),e.stopImmediatePropagation())}).bind("mousemove"+i.current.viewPortNamespace,function(t){var s=i.current.userTranslating;s&&(e(o).jmpress("zoomTranslate",t.clientX-s.x,t.clientY-s.y),s.x=t.clientX,s.y=t.clientY,t.preventDefault(),t.stopImmediatePropagation())}).bind("mouseup"+i.current.viewPortNamespace,function(e){i.current.userTranslating&&(i.current.userTranslating=a,e.preventDefault(),e.stopImmediatePropagation())})}),e.jmpress("register","zoomIn",function(e,t){i.call(this,e||0,t||0,1)}),e.jmpress("register","zoomOut",function(e,t){i.call(this,e||0,t||0,-1)}),e.jmpress("register","zoomTranslate",function(t,s){var a=e(this).jmpress("current"),r=e(this).jmpress("settings"),i=e(this).jmpress("active").data("stepData"),o=e(this).jmpress("container"),c=i.viewPortZoomable||r.viewPort.zoomable,u=e(o).innerWidth(),l=e(o).innerHeight();a.userTranslateX=n(a.userTranslateX+t/a.zoomOriginWindowScale,u*a.userZoom*a.userZoom/c),a.userTranslateY=n(a.userTranslateY+s/a.zoomOriginWindowScale,l*a.userZoom*a.userZoom/c),e(this).jmpress("reselect","zoom")}),e.jmpress("afterDeinit",function(a,r){e(r.settings.fullscreen?t:this).unbind(r.current.viewPortNamespace),e(s).unbind(r.current.viewPortNamespace)}),e.jmpress("setActive",function(t,s){var a=s.settings.viewPort,r=s.stepData.viewPortHeight||a.height,n=s.stepData.viewPortWidth||a.width,i=s.stepData.viewPortMaxScale||a.maxScale,o=s.stepData.viewPortMinScale||a.minScale,c=r&&e(s.container).innerHeight()/r,u=n&&e(s.container).innerWidth()/n,l=(u||c)&&Math.min(u||c,c||u);if(l){l=l||1,i&&(l=Math.min(l,i)),o&&(l=Math.max(l,o));var p=s.stepData.viewPortZoomable||s.settings.viewPort.zoomable;if(p){var f=1/l-1/i;f/=p,l=1/(1/l-f*s.current.userZoom)}s.target.transform.reverse(),s.current.userTranslateX&&s.current.userTranslateY?s.target.transform.push(["translate",s.current.userTranslateX,s.current.userTranslateY,0]):s.target.transform.push(["translate"]),s.target.transform.push(["scale",l,l,1]),s.target.transform.reverse(),s.target.perspectiveScale/=l}s.current.zoomOriginWindowScale=l}),e.jmpress("setInactive",function(t,s){s.nextStep&&t&&e(s.nextStep).attr("id")===e(t).attr("id")||(s.current.userZoom=0,s.current.userTranslateX=0,s.current.userTranslateY=0)})}(jQuery,document,window),function(e){"use strict";function t(){return""+Math.round(1e5*Math.random(),0)}var s=e.jmpress;s("defaults").mouse={clickSelects:!0},s("afterInit",function(s,a){var r=a.settings,n=r.stepSelector,i=a.current,o=e(this);i.clickableStepsNamespace=".jmpress-"+t(),o.bind("click"+i.clickableStepsNamespace,function(t){if(r.mouse.clickSelects&&!i.userZoom){var s=e(t.target).closest(n);s.is(o.jmpress("active"))||s.length&&(o.jmpress("select",s[0],"click"),t.preventDefault(),t.stopPropagation())}})}),s("afterDeinit",function(t,s){e(this).unbind(s.current.clickableStepsNamespace)})}(jQuery,document,window),function(e,t){"use strict";function s(){return""+Math.round(1e5*Math.random(),0)}var a=e.jmpress;a("afterInit",function(a,r){var n=r.settings,i=r.current,o=r.jmpress;i.mobileNamespace=".jmpress-"+s();var c,u=[0,0];e(n.fullscreen?t:o).bind("touchstart"+i.mobileNamespace,function(e){c=e.originalEvent.touches[0],u=[c.pageX,c.pageY]}).bind("touchmove"+i.mobileNamespace,function(e){return c=e.originalEvent.touches[0],e.preventDefault(),!1}).bind("touchend"+i.mobileNamespace,function(t){var s=[c.pageX,c.pageY],a=[s[0]-u[0],s[1]-u[1]];return Math.max(Math.abs(a[0]),Math.abs(a[1]))>50?(a=Math.abs(a[0])>Math.abs(a[1])?a[0]:a[1],e(o).jmpress(a>0?"prev":"next"),t.preventDefault(),!1):undefined})}),a("afterDeinit",function(s,a){var r=a.settings,n=a.current,i=a.jmpress;e(r.fullscreen?t:i).unbind(n.mobileNamespace)})}(jQuery,document,window),function(e,t,s,a){"use strict";function r(t,s,n){for(var i in s){var o=i;n&&(o=n+o.substr(0,1).toUpperCase()+o.substr(1)),e.isPlainObject(s[i])?r(t,s[i],o):t[o]===a&&(t[o]=s[i])}}function n(t,s){e.isArray(s)?s.lengthi;i++){var o=s[i];switch(n){case"":"after"===o?n="after":e.warn("unknown keyword in '"+t+"'. '"+o+"' unknown.");break;case"after":if(o.match(/^[1-9][0-9]*m?s?/)){var c=parseFloat(o);-1!==o.indexOf("ms")?c*=1:-1!==o.indexOf("s")?c*=1e3:-1!==o.indexOf("m")&&(c*=6e4),r.delay=c}else r.after=Array.prototype.slice.call(s,i).join(" "),i=s.length}}return r}function n(t,s,a,r){r=r||t.length-1,a=a||0;for(var n=a;r+1>n;n++)if(e(t[n].element).is(s))return n}function i(t,s,a){e.each(s._on,function(e,s){t.push({substep:s.substep,delay:s.delay+a}),i(t,s.substep,s.delay+a)})}e.jmpress("defaults").customAnimationDataAttribute="jmpress",e.jmpress("afterInit",function(e,t){t.current.animationTimeouts=[],t.current.animationCleanupWaiting=[]}),e.jmpress("applyStep",function(t,s){function o(e,t){return t.substep._after?(l=t.substep._after,!1):a}var c={},u=[];if(e(t).find("[data-"+s.settings.customAnimationDataAttribute+"]").each(function(a,r){e(r).closest(s.settings.stepSelector).is(t)&&u.push({element:r})}),0!==u.length){e.each(u,function(t,a){a.info=r(e(a.element).data(s.settings.customAnimationDataAttribute)),e(a.element).addClass(a.info.willClass),a._on=[],a._after=null});var l={_after:a,_on:[],info:{}};if(e.each(u,function(e,t){var s=t.info.after;if(s)if("step"===s)s=l;else if("prev"===s)s=u[e-1];else{var r=n(u,s,0,e-1);r===a&&(r=n(u,s)),s=r===a||r===e?u[e-1]:u[r]}else s=u[e-1];if(s){if(!t.info.delay){if(!s._after)return s._after=t,a;s=s._after}s._on.push({substep:t,delay:t.info.delay||0})}}),l._after===a&&0===l._on.length){var p=n(u,s.stepData.startSubstep)||0;l._after=u[p]}var f=[];do{var d=[{substep:l,delay:0}];i(d,l,0),f.push(d),l=null,e.each(d,o)}while(l);c.list=f,e(t).data("substepsData",c)}}),e.jmpress("unapplyStep",function(t){var s=e(t).data("substepsData");s&&e.each(s.list,function(t,s){e.each(s,function(t,s){s.substep.info.willClass&&e(s.substep.element).removeClass(s.substep.info.willClass),s.substep.info.hasClass&&e(s.substep.element).removeClass(s.substep.info.hasClass),s.substep.info.doClass&&e(s.substep.element).removeClass(s.substep.info.doClass)})})}),e.jmpress("setActive",function(t,s){var r=e(t).data("substepsData");if(r){s.substep===a&&(s.substep="prev"===s.reason?r.list.length-1:0);var n=s.substep;e.each(s.current.animationTimeouts,function(e,t){clearTimeout(t)}),s.current.animationTimeouts=[],e.each(r.list,function(t,a){var r=n>t,i=n>=t;e.each(a,function(t,a){function n(){e(a.substep.element).addClass(a.substep.info.doClass)}a.substep.info.hasClass&&e(a.substep.element)[(r?"add":"remove")+"Class"](a.substep.info.hasClass),i&&!r&&a.delay&&"prev"!==s.reason?a.substep.info.doClass&&(e(a.substep.element).removeClass(a.substep.info.doClass),s.current.animationTimeouts.push(setTimeout(n,a.delay))):a.substep.info.doClass&&e(a.substep.element)[(i?"add":"remove")+"Class"](a.substep.info.doClass)})})}}),e.jmpress("setInactive",function(t,s){function a(t){e.each(t.list,function(t,s){e.each(s,function(t,s){s.substep.info.hasClass&&e(s.substep.element).removeClass(s.substep.info.hasClass),s.substep.info.doClass&&e(s.substep.element).removeClass(s.substep.info.doClass)})})}if(s.nextStep!==t){e.each(s.current.animationCleanupWaiting,function(e,t){a(t)}),s.current.animationCleanupWaiting=[];var r=e(t).data("substepsData");r&&s.current.animationCleanupWaiting.push(r)}}),e.jmpress("selectNext",function(t,s){if(s.substep!==a){var r=e(t).data("substepsData");if(r)return s.substep0?{step:t,substep:s.substep-1}:a}})}(jQuery,document,window),function(e,t){"use strict";e.jmpress("register","toggle",function(s,a,r){var n=this;e(t).bind("keydown",function(t){t.keyCode===s&&(e(n).jmpress("initialized")?e(n).jmpress("deinit"):e(n).jmpress(a))}),r&&e(n).jmpress(a)})}(jQuery,document,window),function(e){"use strict";function t(t,s,a){if(t.secondary&&-1!==t.secondary.split(" ").indexOf(s)){for(var r in t)if(r.length>9&&0===r.indexOf("secondary")){var n=t[r],i=r.substr(9);i=i.substr(0,1).toLowerCase()+i.substr(1),t[r]=t[i],t[i]=n}e(this).jmpress("reapply",e(a))}}e.jmpress("initStep",function(e,t){for(var s in t.data)0===s.indexOf("secondary")&&(t.stepData[s]=t.data[s])}),e.jmpress("beforeActive",function(s,a){t.call(a.jmpress,e(s).data("stepData"),"self",s);var r=e(s).parent();e(r).children(a.settings.stepSelector).each(function(s,r){var n=e(r).data("stepData");t.call(a.jmpress,n,"siblings",r)});for(var n=1;a.parents.length>n;n++)e(a.parents[n]).children(a.settings.stepSelector).each() +}),e.jmpress("setInactive",function(s,a){function r(s,r){var n=e(r).data("stepData");t.call(a.jmpress,n,"grandchildren",r)}t.call(a.jmpress,e(s).data("stepData"),"self",s);var n=e(s).parent();e(n).children(a.settings.stepSelector).each(function(s,r){var n=e(r).data("stepData");t.call(a.jmpress,n,"siblings",r)});for(var i=1;a.parents.length>i;i++)e(a.parents[i]).children(a.settings.stepSelector).each(r)})}(jQuery,document,window),function(e,t,s,a){"use strict";e.jmpress("defaults").duration={defaultValue:-1,defaultAction:"next",barSelector:a,barProperty:"width",barPropertyStart:"0",barPropertyEnd:"100%"},e.jmpress("initStep",function(e,t){t.stepData.duration=t.data.duration&&parseInt(t.data.duration,10),t.stepData.durationAction=t.data.durationAction}),e.jmpress("setInactive",function(t,s){var a=s.settings,r=a.duration,n=s.current;if(s.stepData.duration||r.defaultValue,n.durationTimeout){if(r.barSelector){var i={transitionProperty:r.barProperty,transitionDuration:"0",transitionDelay:"0",transitionTimingFunction:"linear"};i[r.barProperty]=r.barPropertyStart;var o=e(r.barSelector);e.jmpress("css",o,i),o.each(function(t,s){var a=e(s).next(),r=e(s).parent();e(s).detach(),a.length?a.insertBefore(s):r.append(s)})}clearTimeout(n.durationTimeout),delete n.durationTimeout}}),e.jmpress("setActive",function(t,s){var r=s.settings,n=r.duration,i=s.current,o=s.stepData.duration||n.defaultValue;if(o&&o>0){if(n.barSelector){var c={transitionProperty:n.barProperty,transitionDuration:o-2*r.transitionDuration/3-100+"ms",transitionDelay:2*r.transitionDuration/3+"ms",transitionTimingFunction:"linear"};c[n.barProperty]=n.barPropertyEnd,e.jmpress("css",e(n.barSelector),c)}var u=this;i.durationTimeout&&(clearTimeout(i.durationTimeout),i.durationTimeout=a),i.durationTimeout=setTimeout(function(){var t=s.stepData.durationAction||n.defaultAction;e(u).jmpress(t)},o)}})}(jQuery,document,window),function(e,t,s){"use strict";var a=e.jmpress,r="jmpress-presentation-";a("defaults").presentationMode={use:!0,url:"presentation-screen.html",notesUrl:!1,transferredValues:["userZoom","userTranslateX","userTranslateY"]},a("defaults").keyboard.keys[80]="presentationPopup",a("afterInit",function(t,a){var n=a.current;if(n.selectMessageListeners=[],a.settings.presentationMode.use){s.addEventListener("message",function(t){try{if("string"!=typeof t.data||0!==t.data.indexOf(r))return;var i=JSON.parse(t.data.slice(r.length));switch(i.type){case"select":e.each(a.settings.presentationMode.transferredValues,function(e,t){a.current[t]=i[t]}),/[a-z0-9\-]+/i.test(i.targetId)&&typeof i.substep in{number:1,undefined:1}?e(a.jmpress).jmpress("select",{step:"#"+i.targetId,substep:i.substep},i.reason):e.error("For security reasons the targetId must match /[a-z0-9\\-]+/i and substep must be a number.");break;case"listen":n.selectMessageListeners.push(t.source);break;case"ok":clearTimeout(n.presentationPopupTimeout);break;case"read":try{t.source.postMessage(r+JSON.stringify({type:"url",url:s.location.href,notesUrl:a.settings.presentationMode.notesUrl}),"*")}catch(o){e.error("Cannot post message to source: "+o)}break;default:throw"Unknown message type: "+i.type}}catch(o){e.error("Received message is malformed: "+o)}});try{s.parent&&s.parent!==s&&s.parent.postMessage(r+JSON.stringify({type:"afterInit"}),"*")}catch(i){e.error("Cannot post message to parent: "+i)}}}),a("afterDeinit",function(t,a){if(a.settings.presentationMode.use)try{s.parent&&s.parent!==s&&s.parent.postMessage(r+JSON.stringify({type:"afterDeinit"}),"*")}catch(n){e.error("Cannot post message to parent: "+n)}}),a("setActive",function(t,s){var a=e(s.delegatedFrom).attr("id"),n=s.substep,i=s.reason;e.each(s.current.selectMessageListeners,function(t,o){try{var c={type:"select",targetId:a,substep:n,reason:i};e.each(s.settings.presentationMode.transferredValues,function(e,t){c[t]=s.current[t]}),o.postMessage(r+JSON.stringify(c),"*")}catch(u){e.error("Cannot post message to listener: "+u)}})}),a("register","presentationPopup",function(){function t(){n.jmpress("current").presentationPopupTimeout=setTimeout(t,100);try{a.postMessage(r+JSON.stringify({type:"url",url:s.location.href,notesUrl:n.jmpress("settings").presentationMode.notesUrl}),"*")}catch(e){}}var a,n=e(this);n.jmpress("settings").presentationMode.use&&(a=s.open(e(this).jmpress("settings").presentationMode.url),n.jmpress("current").presentationPopupTimeout=setTimeout(t,100))})}(jQuery,document,window); \ No newline at end of file diff --git a/js/jquery-1.11.1.min.js b/js/jquery-1.11.1.min.js new file mode 100644 index 0000000..ab28a24 --- /dev/null +++ b/js/jquery-1.11.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h; +if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:k.htmlSerialize?[0,"",""]:[1,"X
","
"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("