├── .gitignore ├── AndroidManifest.xml ├── README.md ├── assets └── www │ ├── css │ ├── shClojureExtra.css │ ├── shCoreDefault.css │ └── style.css │ ├── img │ ├── cd_logo.png │ ├── icon.png │ └── search.png │ ├── index.html │ └── js │ ├── actions.js │ ├── mootools-core-1.4.3-full-nocompat-yc.js │ ├── phonegap-1.3.0.js │ ├── shBrushClojure.js │ └── shCore.js ├── epl-v10.html ├── libs └── phonegap-1.3.0.jar ├── project.properties ├── res ├── drawable │ └── icon.png ├── values │ └── strings.xml └── xml │ ├── phonegap.xml │ └── plugins.xml └── src └── info └── sunng └── clojuredocs └── App.java /.gitignore: -------------------------------------------------------------------------------- 1 | *.apk 2 | *.iml 3 | .idea/ 4 | out 5 | gen/ 6 | 7 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ClojureDocs Android 2 | 3 | This is an android app for [clojuredocs.org](http://clojuredocs.org). 4 | 5 | You can download the lastest version from 6 | [github](https://github.com/sunng87/clojuredocs-android/downloads). 7 | 8 | Any pull request is welcomed. 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/www/css/shClojureExtra.css: -------------------------------------------------------------------------------- 1 | .clojure.syntaxhighlighter .meta { 2 | opacity: 0.6 !important; 3 | } 4 | 5 | .clojure.syntaxhighlighter .invalid { 6 | color: yellow !important; 7 | background: red !important; 8 | } 9 | 10 | .clojure.syntaxhighlighter .quoted { 11 | font-style: italic !important; 12 | } 13 | -------------------------------------------------------------------------------- /assets/www/css/shCoreDefault.css: -------------------------------------------------------------------------------- 1 | /** 2 | * SyntaxHighlighter 3 | * http://alexgorbatchev.com/SyntaxHighlighter 4 | * 5 | * SyntaxHighlighter is donationware. If you are using it, please donate. 6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html 7 | * 8 | * @version 9 | * 3.0.83 (July 02 2010) 10 | * 11 | * @copyright 12 | * Copyright (C) 2004-2010 Alex Gorbatchev. 13 | * 14 | * @license 15 | * Dual licensed under the MIT and GPL licenses. 16 | */ 17 | .syntaxhighlighter a, 18 | .syntaxhighlighter div, 19 | .syntaxhighlighter code, 20 | .syntaxhighlighter table, 21 | .syntaxhighlighter table td, 22 | .syntaxhighlighter table tr, 23 | .syntaxhighlighter table tbody, 24 | .syntaxhighlighter table thead, 25 | .syntaxhighlighter table caption, 26 | .syntaxhighlighter textarea { 27 | -moz-border-radius: 0 0 0 0 !important; 28 | -webkit-border-radius: 0 0 0 0 !important; 29 | background: none !important; 30 | border: 0 !important; 31 | bottom: auto !important; 32 | float: none !important; 33 | height: auto !important; 34 | left: auto !important; 35 | line-height: 1.1em !important; 36 | margin: 0 !important; 37 | outline: 0 !important; 38 | overflow: visible !important; 39 | padding: 0 !important; 40 | position: static !important; 41 | right: auto !important; 42 | text-align: left !important; 43 | top: auto !important; 44 | vertical-align: baseline !important; 45 | width: auto !important; 46 | box-sizing: content-box !important; 47 | font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; 48 | font-weight: normal !important; 49 | font-style: normal !important; 50 | font-size: 1em !important; 51 | min-height: inherit !important; 52 | min-height: auto !important; 53 | } 54 | 55 | .syntaxhighlighter { 56 | width: 100% !important; 57 | margin: 1em 0 1em 0 !important; 58 | position: relative !important; 59 | overflow: auto !important; 60 | font-size: 1em !important; 61 | } 62 | .syntaxhighlighter.source { 63 | overflow: hidden !important; 64 | } 65 | .syntaxhighlighter .bold { 66 | font-weight: bold !important; 67 | } 68 | .syntaxhighlighter .italic { 69 | font-style: italic !important; 70 | } 71 | .syntaxhighlighter .line { 72 | white-space: pre !important; 73 | } 74 | .syntaxhighlighter table { 75 | width: 100% !important; 76 | } 77 | .syntaxhighlighter table caption { 78 | text-align: left !important; 79 | padding: .5em 0 0.5em 1em !important; 80 | } 81 | .syntaxhighlighter table td.code { 82 | width: 100% !important; 83 | } 84 | .syntaxhighlighter table td.code .container { 85 | position: relative !important; 86 | } 87 | .syntaxhighlighter table td.code .container textarea { 88 | box-sizing: border-box !important; 89 | position: absolute !important; 90 | left: 0 !important; 91 | top: 0 !important; 92 | width: 100% !important; 93 | height: 100% !important; 94 | border: none !important; 95 | background: white !important; 96 | padding-left: 1em !important; 97 | overflow: hidden !important; 98 | white-space: pre !important; 99 | } 100 | .syntaxhighlighter table td.gutter .line { 101 | text-align: right !important; 102 | padding: 0 0.5em 0 1em !important; 103 | } 104 | .syntaxhighlighter table td.code .line { 105 | padding: 0 1em !important; 106 | } 107 | .syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line { 108 | padding-left: 0em !important; 109 | } 110 | .syntaxhighlighter.show { 111 | display: block !important; 112 | } 113 | .syntaxhighlighter.collapsed table { 114 | display: none !important; 115 | } 116 | .syntaxhighlighter.collapsed .toolbar { 117 | padding: 0.1em 0.8em 0em 0.8em !important; 118 | font-size: 1em !important; 119 | position: static !important; 120 | width: auto !important; 121 | height: auto !important; 122 | } 123 | .syntaxhighlighter.collapsed .toolbar span { 124 | display: inline !important; 125 | margin-right: 1em !important; 126 | } 127 | .syntaxhighlighter.collapsed .toolbar span a { 128 | padding: 0 !important; 129 | display: none !important; 130 | } 131 | .syntaxhighlighter.collapsed .toolbar span a.expandSource { 132 | display: inline !important; 133 | } 134 | .syntaxhighlighter .toolbar { 135 | position: absolute !important; 136 | right: 1px !important; 137 | top: 1px !important; 138 | width: 11px !important; 139 | height: 11px !important; 140 | font-size: 10px !important; 141 | z-index: 10 !important; 142 | } 143 | .syntaxhighlighter .toolbar span.title { 144 | display: inline !important; 145 | } 146 | .syntaxhighlighter .toolbar a { 147 | display: block !important; 148 | text-align: center !important; 149 | text-decoration: none !important; 150 | padding-top: 1px !important; 151 | } 152 | .syntaxhighlighter .toolbar a.expandSource { 153 | display: none !important; 154 | } 155 | .syntaxhighlighter.ie { 156 | font-size: .9em !important; 157 | padding: 1px 0 1px 0 !important; 158 | } 159 | .syntaxhighlighter.ie .toolbar { 160 | line-height: 8px !important; 161 | } 162 | .syntaxhighlighter.ie .toolbar a { 163 | padding-top: 0px !important; 164 | } 165 | .syntaxhighlighter.printing .line.alt1 .content, 166 | .syntaxhighlighter.printing .line.alt2 .content, 167 | .syntaxhighlighter.printing .line.highlighted .number, 168 | .syntaxhighlighter.printing .line.highlighted.alt1 .content, 169 | .syntaxhighlighter.printing .line.highlighted.alt2 .content { 170 | background: none !important; 171 | } 172 | .syntaxhighlighter.printing .line .number { 173 | color: #bbbbbb !important; 174 | } 175 | .syntaxhighlighter.printing .line .content { 176 | color: black !important; 177 | } 178 | .syntaxhighlighter.printing .toolbar { 179 | display: none !important; 180 | } 181 | .syntaxhighlighter.printing a { 182 | text-decoration: none !important; 183 | } 184 | .syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a { 185 | color: black !important; 186 | } 187 | .syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a { 188 | color: #008200 !important; 189 | } 190 | .syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a { 191 | color: blue !important; 192 | } 193 | .syntaxhighlighter.printing .keyword { 194 | color: #006699 !important; 195 | font-weight: bold !important; 196 | } 197 | .syntaxhighlighter.printing .preprocessor { 198 | color: gray !important; 199 | } 200 | .syntaxhighlighter.printing .variable { 201 | color: #aa7700 !important; 202 | } 203 | .syntaxhighlighter.printing .value { 204 | color: #009900 !important; 205 | } 206 | .syntaxhighlighter.printing .functions { 207 | color: #ff1493 !important; 208 | } 209 | .syntaxhighlighter.printing .constants { 210 | color: #0066cc !important; 211 | } 212 | .syntaxhighlighter.printing .script { 213 | font-weight: bold !important; 214 | } 215 | .syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a { 216 | color: gray !important; 217 | } 218 | .syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a { 219 | color: #ff1493 !important; 220 | } 221 | .syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a { 222 | color: red !important; 223 | } 224 | .syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a { 225 | color: black !important; 226 | } 227 | 228 | .syntaxhighlighter { 229 | background-color: white !important; 230 | } 231 | .syntaxhighlighter .line.alt1 { 232 | background-color: white !important; 233 | } 234 | .syntaxhighlighter .line.alt2 { 235 | background-color: white !important; 236 | } 237 | .syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { 238 | background-color: #e0e0e0 !important; 239 | } 240 | .syntaxhighlighter .line.highlighted.number { 241 | color: black !important; 242 | } 243 | .syntaxhighlighter table caption { 244 | color: black !important; 245 | } 246 | .syntaxhighlighter .gutter { 247 | color: #afafaf !important; 248 | } 249 | .syntaxhighlighter .gutter .line { 250 | border-right: 3px solid #6ce26c !important; 251 | } 252 | .syntaxhighlighter .gutter .line.highlighted { 253 | background-color: #6ce26c !important; 254 | color: white !important; 255 | } 256 | .syntaxhighlighter.printing .line .content { 257 | border: none !important; 258 | } 259 | .syntaxhighlighter.collapsed { 260 | overflow: visible !important; 261 | } 262 | .syntaxhighlighter.collapsed .toolbar { 263 | color: blue !important; 264 | background: white !important; 265 | border: 1px solid #6ce26c !important; 266 | } 267 | .syntaxhighlighter.collapsed .toolbar a { 268 | color: blue !important; 269 | } 270 | .syntaxhighlighter.collapsed .toolbar a:hover { 271 | color: red !important; 272 | } 273 | .syntaxhighlighter .toolbar { 274 | color: white !important; 275 | background: #6ce26c !important; 276 | border: none !important; 277 | } 278 | .syntaxhighlighter .toolbar a { 279 | color: white !important; 280 | } 281 | .syntaxhighlighter .toolbar a:hover { 282 | color: black !important; 283 | } 284 | .syntaxhighlighter .plain, .syntaxhighlighter .plain a { 285 | color: black !important; 286 | } 287 | .syntaxhighlighter .comments, .syntaxhighlighter .comments a { 288 | color: #008200 !important; 289 | } 290 | .syntaxhighlighter .string, .syntaxhighlighter .string a { 291 | color: blue !important; 292 | } 293 | .syntaxhighlighter .keyword { 294 | color: #006699 !important; 295 | } 296 | .syntaxhighlighter .preprocessor { 297 | color: gray !important; 298 | } 299 | .syntaxhighlighter .variable { 300 | color: #aa7700 !important; 301 | } 302 | .syntaxhighlighter .value { 303 | color: #009900 !important; 304 | } 305 | .syntaxhighlighter .functions { 306 | color: #ff1493 !important; 307 | } 308 | .syntaxhighlighter .constants { 309 | color: #0066cc !important; 310 | } 311 | .syntaxhighlighter .script { 312 | font-weight: bold !important; 313 | color: #006699 !important; 314 | background-color: none !important; 315 | } 316 | .syntaxhighlighter .color1, .syntaxhighlighter .color1 a { 317 | color: gray !important; 318 | } 319 | .syntaxhighlighter .color2, .syntaxhighlighter .color2 a { 320 | color: #ff1493 !important; 321 | } 322 | .syntaxhighlighter .color3, .syntaxhighlighter .color3 a { 323 | color: red !important; 324 | } 325 | 326 | .syntaxhighlighter .keyword { 327 | font-weight: bold !important; 328 | } 329 | -------------------------------------------------------------------------------- /assets/www/css/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-size:1em; 3 | background-color:#F8F8F8; 4 | margin:0; 5 | } 6 | #search { 7 | padding:4px; 8 | border-bottom:1px #CCC solid; 9 | background-color:#ccc; 10 | background-image:-webkit-gradient(linear, left top, left bottom, from(#eee), to(#ccc)); 11 | } 12 | #searchbox { 13 | padding:5px; 14 | width:89%; 15 | border:1px #CCC solid; 16 | border-right:0; 17 | border-radius:5px 0 0 5px; 18 | outline:0; 19 | font-size:1em; 20 | } 21 | #searchbtn { 22 | outline:0; 23 | border-radius:0 5px 5px 0; 24 | margin:0; 25 | padding:5px; 26 | border:1px #CCC solid; 27 | border-left:0; 28 | width:10%; 29 | font-size:1em; 30 | background:#AAA url('../img/search.png') center center no-repeat; 31 | } 32 | #searchbtn:hover { 33 | background:#999 url('../img/search.png') center center no-repeat; 34 | } 35 | #content { 36 | } 37 | #home { 38 | padding:10px; 39 | } 40 | #home p {line-height:150%;} 41 | 42 | ul { 43 | margin:0; 44 | padding:0; 45 | } 46 | li.search_result_item { 47 | list-style:none; 48 | 49 | border-bottom:1px #CCC solid; 50 | overflow:hidden; 51 | } 52 | li.search_result_item a{ 53 | text-decoration:none; 54 | display:block; 55 | padding:12px 4px 12px 4px; 56 | -webkit-tap-highlight-color:rgba(128,128,128,1); 57 | } 58 | li.search_result_item a:hover{ 59 | background-color:#EEE; 60 | } 61 | 62 | span.search_result_item_ns { 63 | font-size:0.8em; 64 | color:#666; 65 | } 66 | span.search_result_item_fname{ 67 | font-size:1.2em; 68 | font-weight:bold; 69 | color:#000; 70 | } 71 | 72 | #footer { 73 | bottom:0; 74 | background-color:#EEE; 75 | color:#999; 76 | font-size:0.8em; 77 | padding:2px; 78 | margin-bottom:0; 79 | } 80 | 81 | #loading { 82 | margin:auto; 83 | top:100px; 84 | left:100px; 85 | position:absolute; 86 | border-radius:5px; 87 | background-color:rgba(0, 0, 0, 0.7); 88 | color:white; 89 | padding:1.4em; 90 | text-align:center; 91 | font-weight:bold; 92 | box-shadow:0 0 20px #86D69C; 93 | } 94 | #tip { 95 | margin:auto; 96 | top:100px; 97 | left:100px; 98 | position:absolute; 99 | border-radius:5px; 100 | background-color:rgba(0, 0, 0, 0.7); 101 | color:white; 102 | padding:1.4em; 103 | text-align:center; 104 | font-weight:bold; 105 | box-shadow:0 0 20px #86D69C; 106 | } 107 | 108 | #fcontainer{ 109 | padding:5px; 110 | } 111 | h2 {margin:5px 0 5px 0;} 112 | p.fns {color:#666; margin:0;margin-top:2px; font-size:0.8em;} 113 | #usages {margin-top:5px; font-size:1em; font-family:monospace; list-style:none;} 114 | 115 | h3 {border-top:1px #CCC solid; margin-top:10px; padding-top:8px; margin-bottom:5px; color:#363636;} 116 | div.syntaxhighlighter {font-size:0.8em !important; } 117 | 118 | #allBtn { 119 | padding:5px 10px; 120 | color:#333; 121 | text-decoration:none; 122 | border:1px #EEE solid; 123 | border-radius:3px; 124 | font-weight:bold; 125 | text-shadow:0 1px 1px #FFF; 126 | background-image:-webkit-gradient(linear, left top, left bottom, from(#CCC), to(#AAA)); 127 | } 128 | #allBtn:hover { 129 | background-image:-webkit-gradient(linear, left top, left bottom, from(#EEE), to(#CCC)); 130 | } 131 | -------------------------------------------------------------------------------- /assets/www/img/cd_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunng87/clojuredocs-android/86e44b8b8887143e0775d4e65fe9c114a381c1ed/assets/www/img/cd_logo.png -------------------------------------------------------------------------------- /assets/www/img/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunng87/clojuredocs-android/86e44b8b8887143e0775d4e65fe9c114a381c1ed/assets/www/img/icon.png -------------------------------------------------------------------------------- /assets/www/img/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunng87/clojuredocs-android/86e44b8b8887143e0775d4e65fe9c114a381c1ed/assets/www/img/search.png -------------------------------------------------------------------------------- /assets/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ClojureDocs Android 5 | 6 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 |
19 | 23 | 24 |
25 |
26 |

ClojureDocs

27 |

Community Powered Documents and Examples for the Clojure 28 | Programming Language.

29 | 30 |

Browse All Functions

31 |

Clojure is a dynamic programming language that targets the 32 | Java Virtual Machine (and the CLR, and JavaScript). It is 33 | designed to be a general-purpose language, combining the 34 | approachability and interactive development of a scripting 35 | language with an efficient and robust infrastructure for 36 | multithreaded programming.
From clojure.org

37 |
38 | 39 | 106 |
107 | 112 |
113 | 114 | 115 | -------------------------------------------------------------------------------- /assets/www/js/actions.js: -------------------------------------------------------------------------------- 1 | var android_clojuredocs = {}; 2 | 3 | android_clojuredocs.init = function() { 4 | 5 | android_clojuredocs.server = 6 | window.location.protocol == "file:" ? 7 | "http://clojuredocs.org":"http://127.0.0.1:8088"; 8 | 9 | $('searchbtn').addEvent('click', function(e) { 10 | var token = $('searchbox').get('value'); 11 | android_clojuredocs.dosearch(token); 12 | }); 13 | $('searchbox').addEvent('keydown', function(e) { 14 | if (e.key == 'enter'){ 15 | var token = $('searchbox').get('value'); 16 | android_clojuredocs.dosearch(token); 17 | } 18 | }); 19 | $('allBtn').addEvent('click', android_clojuredocs.browseAll); 20 | 21 | android_clojuredocs.current_view = "HOME"; 22 | console.log("Initialized.") 23 | }; 24 | 25 | android_clojuredocs.dosearch = function(token) { 26 | var url = android_clojuredocs.server + "/search?lib=clojure_core&q=" + token; 27 | var r = new Request.HTML({ 28 | "url":url, 29 | "evalScripts": false, 30 | "filter": ".search_result", 31 | "onSuccess": function(_, resultDom, _, _) { 32 | android_clojuredocs.after_search(resultDom); 33 | }}); 34 | r.get(); 35 | android_clojuredocs.start_loading(); 36 | }; 37 | 38 | android_clojuredocs.after_search = function(results) { 39 | android_clojuredocs.end_loading(); 40 | console.log(results.length); 41 | if (results.length > 0) { 42 | 43 | // remove existed search results and function view 44 | if($("search_result_container")){$("search_result_container").destroy()} 45 | if($("fcontainer")){$("fcontainer").destroy()} 46 | 47 | var parentList = new Element("ul", {"id": "search_result_container"}); 48 | for (var i=0; ia"); 51 | var ns = ele.getElement("h4>span.ns>a"); 52 | 53 | var new_name = '' 54 | + fname.get("text") + "" 55 | + '
(' 56 | + ns.get("text") + ')'; 57 | var link = fname.get("href"); 58 | 59 | var newEle = new Element("li", {"class": "search_result_item"}); 60 | var clickable = new Element("a", {html:new_name, href:"javascript:;"}); 61 | clickable.addEvent("click", function(target) { 62 | return function(){ 63 | android_clojuredocs.open_function(target) 64 | }; 65 | }(link)); 66 | newEle.grab(clickable); 67 | 68 | newEle.inject(parentList, "bottom"); 69 | } 70 | // hide home view 71 | $("home").setStyle("display", "none"); 72 | parentList.inject($("content")); 73 | android_clojuredocs.current_view = "SEARCH"; 74 | } else { 75 | android_clojuredocs.showtip("No results Found."); 76 | } 77 | }; 78 | 79 | android_clojuredocs.start_loading = function() { 80 | //navigator.notification.progressStart("Waiting...", "Loading content..."); 81 | //navigator.notification.activityStart(); 82 | PhoneGap.exec(null, null, "Notification", "activityStart", ["Please wait...","Loading..."]); 83 | } 84 | android_clojuredocs.end_loading = function() { 85 | //navigator.notification.progressStop(); 86 | //navigator.notification.activityStop(); 87 | PhoneGap.exec(null, null, "Notification", "activityStop", []); 88 | } 89 | 90 | android_clojuredocs.open_function = function(url) { 91 | android_clojuredocs.start_loading(); 92 | console.log(url); 93 | var r = new Request.HTML({ 94 | "url":android_clojuredocs.server + url, 95 | "evalScripts": false, 96 | "onSuccess": function(_, resultDom, _, _) { 97 | android_clojuredocs.after_page_loaded(resultDom); 98 | } 99 | }); 100 | r.get(); 101 | }; 102 | 103 | android_clojuredocs.after_page_loaded = function(result){ 104 | var nameele = result.filter("div.function_header")[0]; 105 | var fname = nameele.getElement("h1").get("text").trim(); 106 | var fns = nameele.getElement("h2>span.ns>a").get("text").trim(); 107 | 108 | var fusages = result.filter("div.usage li").map(function(e){return e.get("text")}); 109 | 110 | var docele = result.filter("div.doc")[0]; 111 | var fdocs = docele? docele.getElement("div.content").get("text"): "Not Available"; 112 | 113 | var sourceele = result.filter("div.source_content")[0]; 114 | var fsource = sourceele?sourceele.getElement("pre").get("text"):null; 115 | 116 | var exampleele = result.filter("div.examples")[0]; 117 | var fexamples = exampleele.getElements("pre").map( 118 | function(e){return e.get("text")}); 119 | console.log(fexamples); 120 | 121 | if($("fcontainer")){$("fcontainer").destroy()} 122 | var container = new Element("div", { 123 | "id": "fcontainer", 124 | }); 125 | var ns = new Element("p", {"text": fns, "class":"fns"}); 126 | ns.inject( container); 127 | var title = new Element("h2", {"text": fname}); 128 | title.inject( container); 129 | 130 | var usages = new Element("ul", {"id": "usages"}); 131 | fusages.each(function(i){ 132 | var u = new Element("li", {"text": i}); 133 | u.inject( usages); 134 | }); 135 | usages.inject( container); 136 | 137 | var doctitle = new Element("h3", {"text": "Docstring"}); 138 | doctitle.inject( container); 139 | var doc = new Element("div", {"class": "fdoc", "text": fdocs}); 140 | doc.inject( container); 141 | 142 | var srctitle = new Element("h3", {"text": "Sources"}); 143 | srctitle.inject( container); 144 | var src = new Element("div", {"class": "source"}); 145 | var srchightlight; 146 | if (fsource!=null){ 147 | srchightlight = new Element("pre", {"class": "brush:clojure","text": fsource}); 148 | } else { 149 | srchightlight = new Element("p", {"text": "Not Available"}); 150 | } 151 | 152 | srchightlight.inject( src); 153 | src.inject( container); 154 | 155 | var exampletitle = new Element("h3", {"text": "Examples"}); 156 | exampletitle.inject( container); 157 | if(fexamples.length > 0){ 158 | fexamples.each(function(e){ 159 | var exm = new Element("div", {"class": "source"}); 160 | var exmhighlight = new Element("pre", {"class": "brush:clojure", 161 | "text": e}); 162 | exmhighlight.inject(exm); 163 | exm.inject( container); 164 | }); 165 | } else { 166 | new Element("div", {"text": "Not Available"}).inject(container); 167 | } 168 | 169 | $('search_result_container').setStyle("display", "none"); 170 | $('content').grab(container); 171 | 172 | android_clojuredocs.current_view = "FUNCTION"; 173 | 174 | scrollTo(0,1); 175 | android_clojuredocs.end_loading(); 176 | SyntaxHighlighter.highlight({gutter: false, toolbar: false}); 177 | }; 178 | 179 | android_clojuredocs.showtip=function(msg){ 180 | navigator.notification.alert(msg); 181 | } 182 | 183 | android_clojuredocs.onback=function() { 184 | if (android_clojuredocs.current_view == "FUNCTION") { 185 | $('fcontainer').destroy(); 186 | $('search_result_container').setStyle("display", "block"); 187 | android_clojuredocs.current_view = "SEARCH" 188 | } else if (android_clojuredocs.current_view == "SEARCH"){ 189 | $('search_result_container').destroy(); 190 | $('home').setStyle("display", "block"); 191 | android_clojuredocs.current_view = "HOME" 192 | } else { 193 | device.exitApp(); 194 | } 195 | } 196 | 197 | android_clojuredocs.browseAll=function() { 198 | var url = android_clojuredocs.server + "/clojure_core"; 199 | var r = new Request.HTML({ 200 | "url":url, 201 | "evalScripts": false, 202 | "filter": "span.function", 203 | "onSuccess": function(_, resultDom, _, _) { 204 | android_clojuredocs.after_list(resultDom); 205 | }}); 206 | r.get(); 207 | android_clojuredocs.start_loading(); 208 | } 209 | android_clojuredocs.after_list=function(results){ 210 | // remove existed search results and function view 211 | if($("search_result_container")){$("search_result_container").destroy()} 212 | if($("fcontainer")){$("fcontainer").destroy()} 213 | 214 | var parentList = new Element("ul", {"id": "search_result_container"}); 215 | results.each(function(e){ 216 | var linkEle = e.getElement("a"); 217 | var link = linkEle.get("href"); 218 | var fname = linkEle.get("text"); 219 | var ns = link.match(/\/clojure_core\/(.+?)\//i)[1]; 220 | 221 | var new_name = '' 222 | + fname + "" 223 | + '
(' 224 | + ns + ')'; 225 | 226 | var newEle = new Element("li", {"class": "search_result_item"}); 227 | var clickable = new Element("a", {html: new_name, href:"javascript:;"}); 228 | clickable.addEvent("click", function(target) { 229 | return function(){ 230 | android_clojuredocs.open_function(target) 231 | }; 232 | }(link)); 233 | newEle.grab(clickable); 234 | 235 | newEle.inject(parentList, "bottom"); 236 | }); 237 | // hide home view 238 | $("home").setStyle("display", "none"); 239 | parentList.inject($("content")); 240 | android_clojuredocs.current_view = "SEARCH"; 241 | android_clojuredocs.end_loading(); 242 | } 243 | 244 | window.addEvent("domready", android_clojuredocs.init); 245 | document.addEventListener("deviceready", 246 | function(){ 247 | document.addEventListener("backbutton", android_clojuredocs.onback, false); 248 | document.addEventListener("searchbutton", function(){$('searchbox').focus()}, false)}, 249 | true); 250 | 251 | -------------------------------------------------------------------------------- /assets/www/js/mootools-core-1.4.3-full-nocompat-yc.js: -------------------------------------------------------------------------------- 1 | /* 2 | --- 3 | MooTools: the javascript framework 4 | 5 | web build: 6 | - http://mootools.net/core/76bf47062d6c1983d66ce47ad66aa0e0 7 | 8 | packager build: 9 | - packager build Core/Core Core/Array Core/String Core/Number Core/Function Core/Object Core/Event Core/Browser Core/Class Core/Class.Extras Core/Slick.Parser Core/Slick.Finder Core/Element Core/Element.Style Core/Element.Event Core/Element.Delegation Core/Element.Dimensions Core/Fx Core/Fx.CSS Core/Fx.Tween Core/Fx.Morph Core/Fx.Transitions Core/Request Core/Request.HTML Core/Request.JSON Core/Cookie Core/JSON Core/DOMReady Core/Swiff 10 | 11 | copyrights: 12 | - [MooTools](http://mootools.net) 13 | 14 | licenses: 15 | - [MIT License](http://mootools.net/license.txt) 16 | ... 17 | */ 18 | 19 | (function(){this.MooTools={version:"1.4.3",build:"bc7009653bfa5156129540228449e2901649b026"};var o=this.typeOf=function(i){if(i==null){return"null";}if(i.$family!=null){return i.$family(); 20 | }if(i.nodeName){if(i.nodeType==1){return"element";}if(i.nodeType==3){return(/\S/).test(i.nodeValue)?"textnode":"whitespace";}}else{if(typeof i.length=="number"){if(i.callee){return"arguments"; 21 | }if("item" in i){return"collection";}}}return typeof i;};var j=this.instanceOf=function(t,i){if(t==null){return false;}var s=t.$constructor||t.constructor; 22 | while(s){if(s===i){return true;}s=s.parent;}return t instanceof i;};var f=this.Function;var p=true;for(var k in {toString:1}){p=null;}if(p){p=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]; 23 | }f.prototype.overloadSetter=function(s){var i=this;return function(u,t){if(u==null){return this;}if(s||typeof u!="string"){for(var v in u){i.call(this,v,u[v]); 24 | }if(p){for(var w=p.length;w--;){v=p[w];if(u.hasOwnProperty(v)){i.call(this,v,u[v]);}}}}else{i.call(this,u,t);}return this;};};f.prototype.overloadGetter=function(s){var i=this; 25 | return function(u){var v,t;if(s||typeof u!="string"){v=u;}else{if(arguments.length>1){v=arguments;}}if(v){t={};for(var w=0;w>>0; 46 | b>>0;b>>0;for(var a=(d<0)?Math.max(0,b+d):d||0;a>>0,b=Array(d);for(var a=0;a>>0; 49 | b-1:String(this).indexOf(a)>-1;},trim:function(){return String(this).replace(/^\s+|\s+$/g,""); 60 | },clean:function(){return String(this).replace(/\s+/g," ").trim();},camelCase:function(){return String(this).replace(/-\D/g,function(a){return a.charAt(1).toUpperCase(); 61 | });},hyphenate:function(){return String(this).replace(/[A-Z]/g,function(a){return("-"+a.charAt(0).toLowerCase());});},capitalize:function(){return String(this).replace(/\b[a-z]/g,function(a){return a.toUpperCase(); 62 | });},escapeRegExp:function(){return String(this).replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1");},toInt:function(a){return parseInt(this,a||10);},toFloat:function(){return parseFloat(this); 63 | },hexToRgb:function(b){var a=String(this).match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return(a)?a.slice(1).hexToRgb(b):null;},rgbToHex:function(b){var a=String(this).match(/\d{1,3}/g); 64 | return(a)?a.rgbToHex(b):null;},substitute:function(a,b){return String(this).replace(b||(/\\?\{([^{}]+)\}/g),function(d,c){if(d.charAt(0)=="\\"){return d.slice(1); 65 | }return(a[c]!=null)?a[c]:"";});}});Number.implement({limit:function(b,a){return Math.min(a,Math.max(b,this));},round:function(a){a=Math.pow(10,a||0).toFixed(a<0?-a:0); 66 | return Math.round(this*a)/a;},times:function(b,c){for(var a=0;a1?Array.slice(arguments,1):null,d=function(){};var c=function(){var g=e,h=arguments.length;if(this instanceof c){d.prototype=a.prototype; 71 | g=new d;}var f=(!b&&!h)?a.call(g):a.apply(g,b&&h?b.concat(Array.slice(arguments)):b||arguments);return g==e?f:g;};return c;},pass:function(b,c){var a=this; 72 | if(b!=null){b=Array.from(b);}return function(){return a.apply(c,b||arguments);};},delay:function(b,c,a){return setTimeout(this.pass((a==null?[]:a),c),b); 73 | },periodical:function(c,b,a){return setInterval(this.pass((a==null?[]:a),b),c);}});(function(){var a=Object.prototype.hasOwnProperty;Object.extend({subset:function(d,g){var f={}; 74 | for(var e=0,b=g.length;e]*>([\s\S]*?)<\/script>/gi,function(q,r){e+=r+"\n"; 89 | return"";});if(o===true){n.exec(e);}else{if(typeOf(o)=="function"){o(e,p);}}return p;});n.extend({Document:this.Document,Window:this.Window,Element:this.Element,Event:this.Event}); 90 | this.Window=this.$constructor=new Type("Window",function(){});this.$family=Function.from("window").hide();Window.mirror(function(e,o){g[e]=o;});this.Document=j.$constructor=new Type("Document",function(){}); 91 | j.$family=Function.from("document").hide();Document.mirror(function(e,o){j[e]=o;});j.html=j.documentElement;if(!j.head){j.head=j.getElementsByTagName("head")[0]; 92 | }if(j.execCommand){try{j.execCommand("BackgroundImageCache",false,true);}catch(f){}}if(this.attachEvent&&!this.addEventListener){var c=function(){this.detachEvent("onunload",c); 93 | j.head=j.html=j.window=null;};this.attachEvent("onunload",c);}var l=Array.from;try{l(j.html.childNodes);}catch(f){Array.from=function(o){if(typeof o!="string"&&Type.isEnumerable(o)&&typeOf(o)!="array"){var e=o.length,p=new Array(e); 94 | while(e--){p[e]=o[e];}return p;}return l(o);};var k=Array.prototype,m=k.slice;["pop","push","reverse","shift","sort","splice","unshift","concat","join","slice"].each(function(e){var o=k[e]; 95 | Array[e]=function(p){return o.apply(Array.from(p),m.call(arguments,1));};});}})();(function(){var b={};var a=this.DOMEvent=new Type("DOMEvent",function(c,g){if(!g){g=window; 96 | }c=c||g.event;if(c.$extended){return c;}this.event=c;this.$extended=true;this.shift=c.shiftKey;this.control=c.ctrlKey;this.alt=c.altKey;this.meta=c.metaKey; 97 | var i=this.type=c.type;var h=c.target||c.srcElement;while(h&&h.nodeType==3){h=h.parentNode;}this.target=document.id(h);if(i.indexOf("key")==0){var d=this.code=(c.which||c.keyCode); 98 | this.key=b[d];if(i=="keydown"){if(d>111&&d<124){this.key="f"+(d-111);}else{if(d>95&&d<106){this.key=d-96;}}}if(this.key==null){this.key=String.fromCharCode(d).toLowerCase(); 99 | }}else{if(i=="click"||i=="dblclick"||i=="contextmenu"||i=="DOMMouseScroll"||i.indexOf("mouse")==0){var j=g.document;j=(!j.compatMode||j.compatMode=="CSS1Compat")?j.html:j.body; 100 | this.page={x:(c.pageX!=null)?c.pageX:c.clientX+j.scrollLeft,y:(c.pageY!=null)?c.pageY:c.clientY+j.scrollTop};this.client={x:(c.pageX!=null)?c.pageX-g.pageXOffset:c.clientX,y:(c.pageY!=null)?c.pageY-g.pageYOffset:c.clientY}; 101 | if(i=="DOMMouseScroll"||i=="mousewheel"){this.wheel=(c.wheelDelta)?c.wheelDelta/120:-(c.detail||0)/3;}this.rightClick=(c.which==3||c.button==2);if(i=="mouseover"||i=="mouseout"){var k=c.relatedTarget||c[(i=="mouseover"?"from":"to")+"Element"]; 102 | while(k&&k.nodeType==3){k=k.parentNode;}this.relatedTarget=document.id(k);}}else{if(i.indexOf("touch")==0||i.indexOf("gesture")==0){this.rotation=c.rotation; 103 | this.scale=c.scale;this.targetTouches=c.targetTouches;this.changedTouches=c.changedTouches;var f=this.touches=c.touches;if(f&&f[0]){var e=f[0];this.page={x:e.pageX,y:e.pageY}; 104 | this.client={x:e.clientX,y:e.clientY};}}}}if(!this.client){this.client={};}if(!this.page){this.page={};}});a.implement({stop:function(){return this.preventDefault().stopPropagation(); 105 | },stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation();}else{this.event.cancelBubble=true;}return this;},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault(); 106 | }else{this.event.returnValue=false;}return this;}});a.defineKey=function(d,c){b[d]=c;return this;};a.defineKeys=a.defineKey.overloadSetter(true);a.defineKeys({"38":"up","40":"down","37":"left","39":"right","27":"esc","32":"space","8":"backspace","9":"tab","46":"delete","13":"enter"}); 107 | })();(function(){var a=this.Class=new Type("Class",function(h){if(instanceOf(h,Function)){h={initialize:h};}var g=function(){e(this);if(g.$prototyping){return this; 108 | }this.$caller=null;var i=(this.initialize)?this.initialize.apply(this,arguments):this;this.$caller=this.caller=null;return i;}.extend(this).implement(h); 109 | g.$constructor=a;g.prototype.$constructor=g;g.prototype.parent=c;return g;});var c=function(){if(!this.$caller){throw new Error('The method "parent" cannot be called.'); 110 | }var g=this.$caller.$name,h=this.$caller.$owner.parent,i=(h)?h.prototype[g]:null;if(!i){throw new Error('The method "'+g+'" has no parent.');}return i.apply(this,arguments); 111 | };var e=function(g){for(var h in g){var j=g[h];switch(typeOf(j)){case"object":var i=function(){};i.prototype=j;g[h]=e(new i);break;case"array":g[h]=j.clone(); 112 | break;}}return g;};var b=function(g,h,j){if(j.$origin){j=j.$origin;}var i=function(){if(j.$protected&&this.$caller==null){throw new Error('The method "'+h+'" cannot be called.'); 113 | }var l=this.caller,m=this.$caller;this.caller=m;this.$caller=i;var k=j.apply(this,arguments);this.$caller=m;this.caller=l;return k;}.extend({$owner:g,$origin:j,$name:h}); 114 | return i;};var f=function(h,i,g){if(a.Mutators.hasOwnProperty(h)){i=a.Mutators[h].call(this,i);if(i==null){return this;}}if(typeOf(i)=="function"){if(i.$hidden){return this; 115 | }this.prototype[h]=(g)?i:b(this,h,i);}else{Object.merge(this.prototype,h,i);}return this;};var d=function(g){g.$prototyping=true;var h=new g;delete g.$prototyping; 116 | return h;};a.implement("implement",f.overloadSetter());a.Mutators={Extends:function(g){this.parent=g;this.prototype=d(g);},Implements:function(g){Array.from(g).each(function(j){var h=new j; 117 | for(var i in h){f.call(this,i,h[i],true);}},this);}};})();(function(){this.Chain=new Class({$chain:[],chain:function(){this.$chain.append(Array.flatten(arguments)); 118 | return this;},callChain:function(){return(this.$chain.length)?this.$chain.shift().apply(this,arguments):false;},clearChain:function(){this.$chain.empty(); 119 | return this;}});var a=function(b){return b.replace(/^on([A-Z])/,function(c,d){return d.toLowerCase();});};this.Events=new Class({$events:{},addEvent:function(d,c,b){d=a(d); 120 | this.$events[d]=(this.$events[d]||[]).include(c);if(b){c.internal=true;}return this;},addEvents:function(b){for(var c in b){this.addEvent(c,b[c]);}return this; 121 | },fireEvent:function(e,c,b){e=a(e);var d=this.$events[e];if(!d){return this;}c=Array.from(c);d.each(function(f){if(b){f.delay(b,this,c);}else{f.apply(this,c); 122 | }},this);return this;},removeEvent:function(e,d){e=a(e);var c=this.$events[e];if(c&&!d.internal){var b=c.indexOf(d);if(b!=-1){delete c[b];}}return this; 123 | },removeEvents:function(d){var e;if(typeOf(d)=="object"){for(e in d){this.removeEvent(e,d[e]);}return this;}if(d){d=a(d);}for(e in this.$events){if(d&&d!=e){continue; 124 | }var c=this.$events[e];for(var b=c.length;b--;){if(b in c){this.removeEvent(e,c[b]);}}}return this;}});this.Options=new Class({setOptions:function(){var b=this.options=Object.merge.apply(null,[{},this.options].append(arguments)); 125 | if(this.addEvent){for(var c in b){if(typeOf(b[c])!="function"||!(/^on[A-Z]/).test(c)){continue;}this.addEvent(c,b[c]);delete b[c];}}return this;}});})(); 126 | (function(){var k,n,l,g,a={},c={},m=/\\/g;var e=function(q,p){if(q==null){return null;}if(q.Slick===true){return q;}q=(""+q).replace(/^\s+|\s+$/g,"");g=!!p; 127 | var o=(g)?c:a;if(o[q]){return o[q];}k={Slick:true,expressions:[],raw:q,reverse:function(){return e(this.raw,true);}};n=-1;while(q!=(q=q.replace(j,b))){}k.length=k.expressions.length; 128 | return o[k.raw]=(g)?h(k):k;};var i=function(o){if(o==="!"){return" ";}else{if(o===" "){return"!";}else{if((/^!/).test(o)){return o.replace(/^!/,"");}else{return"!"+o; 129 | }}}};var h=function(u){var r=u.expressions;for(var p=0;p+)\\s*|(\\s+)|(+|\\*)|\\#(+)|\\.(+)|\\[\\s*(+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:([\"']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(+)(?:\\((?:(?:([\"'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)".replace(//,"["+f(">+~`!@$%^&={}\\;/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(//g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")); 132 | function b(x,s,D,z,r,C,q,B,A,y,u,F,G,v,p,w){if(s||n===-1){k.expressions[++n]=[];l=-1;if(s){return"";}}if(D||z||l===-1){D=D||" ";var t=k.expressions[n]; 133 | if(g&&t[l]){t[l].reverseCombinator=i(D);}t[++l]={combinator:D,tag:"*"};}var o=k.expressions[n][l];if(r){o.tag=r.replace(m,"");}else{if(C){o.id=C.replace(m,""); 134 | }else{if(q){q=q.replace(m,"");if(!o.classList){o.classList=[];}if(!o.classes){o.classes=[];}o.classList.push(q);o.classes.push({value:q,regexp:new RegExp("(^|\\s)"+f(q)+"(\\s|$)")}); 135 | }else{if(G){w=w||p;w=w?w.replace(m,""):null;if(!o.pseudos){o.pseudos=[];}o.pseudos.push({key:G.replace(m,""),value:w,type:F.length==1?"class":"element"}); 136 | }else{if(B){B=B.replace(m,"");u=(u||"").replace(m,"");var E,H;switch(A){case"^=":H=new RegExp("^"+f(u));break;case"$=":H=new RegExp(f(u)+"$");break;case"~=":H=new RegExp("(^|\\s)"+f(u)+"(\\s|$)"); 137 | break;case"|=":H=new RegExp("^"+f(u)+"(-|$)");break;case"=":E=function(I){return u==I;};break;case"*=":E=function(I){return I&&I.indexOf(u)>-1;};break; 138 | case"!=":E=function(I){return u!=I;};break;default:E=function(I){return !!I;};}if(u==""&&(/^[*$^]=$/).test(A)){E=function(){return false;};}if(!E){E=function(I){return I&&H.test(I); 139 | };}if(!o.attributes){o.attributes=[];}o.attributes.push({key:B,operator:A,value:u,test:E});}}}}}return"";}var d=(this.Slick||{});d.parse=function(o){return e(o); 140 | };d.escapeRegExp=f;if(!this.Slick){this.Slick=d;}}).apply((typeof exports!="undefined")?exports:this);(function(){var k={},m={},d=Object.prototype.toString; 141 | k.isNativeCode=function(c){return(/\{\s*\[native code\]\s*\}/).test(""+c);};k.isXML=function(c){return(!!c.xmlVersion)||(!!c.xml)||(d.call(c)=="[object XMLDocument]")||(c.nodeType==9&&c.documentElement.nodeName!="HTML"); 142 | };k.setDocument=function(x){var u=x.nodeType;if(u==9){}else{if(u){x=x.ownerDocument;}else{if(x.navigator){x=x.document;}else{return;}}}if(this.document===x){return; 143 | }this.document=x;var z=x.documentElement,v=this.getUIDXML(z),p=m[v],B;if(p){for(B in p){this[B]=p[B];}return;}p=m[v]={};p.root=z;p.isXMLDocument=this.isXML(x); 144 | p.brokenStarGEBTN=p.starSelectsClosedQSA=p.idGetsName=p.brokenMixedCaseQSA=p.brokenGEBCN=p.brokenCheckedQSA=p.brokenEmptyAttributeQSA=p.isHTMLDocument=p.nativeMatchesSelector=false; 145 | var n,o,y,r,s;var t,c="slick_uniqueid";var A=x.createElement("div");var q=x.body||x.getElementsByTagName("body")[0]||z;q.appendChild(A);try{A.innerHTML=''; 146 | p.isHTMLDocument=!!x.getElementById(c);}catch(w){}if(p.isHTMLDocument){A.style.display="none";A.appendChild(x.createComment(""));o=(A.getElementsByTagName("*").length>1); 147 | try{A.innerHTML="foo";t=A.getElementsByTagName("*");n=(t&&!!t.length&&t[0].nodeName.charAt(0)=="/");}catch(w){}p.brokenStarGEBTN=o||n;try{A.innerHTML=''; 148 | p.idGetsName=x.getElementById(c)===A.firstChild;}catch(w){}if(A.getElementsByClassName){try{A.innerHTML='';A.getElementsByClassName("b").length; 149 | A.firstChild.className="b";r=(A.getElementsByClassName("b").length!=2);}catch(w){}try{A.innerHTML='';y=(A.getElementsByClassName("a").length!=2); 150 | }catch(w){}p.brokenGEBCN=r||y;}if(A.querySelectorAll){try{A.innerHTML="foo";t=A.querySelectorAll("*");p.starSelectsClosedQSA=(t&&!!t.length&&t[0].nodeName.charAt(0)=="/"); 151 | }catch(w){}try{A.innerHTML='';p.brokenMixedCaseQSA=!A.querySelectorAll(".MiX").length;}catch(w){}try{A.innerHTML=''; 152 | p.brokenCheckedQSA=(A.querySelectorAll(":checked").length==0);}catch(w){}try{A.innerHTML='';p.brokenEmptyAttributeQSA=(A.querySelectorAll('[class*=""]').length!=0); 153 | }catch(w){}}try{A.innerHTML='
';s=(A.firstChild.getAttribute("action")!="s");}catch(w){}p.nativeMatchesSelector=z.matchesSelector||z.mozMatchesSelector||z.webkitMatchesSelector; 154 | if(p.nativeMatchesSelector){try{p.nativeMatchesSelector.call(z,":slick");p.nativeMatchesSelector=null;}catch(w){}}}try{z.slick_expando=1;delete z.slick_expando; 155 | p.getUID=this.getUIDHTML;}catch(w){p.getUID=this.getUIDXML;}q.removeChild(A);A=t=q=null;p.getAttribute=(p.isHTMLDocument&&s)?function(E,C){var F=this.attributeGetters[C]; 156 | if(F){return F.call(E);}var D=E.getAttributeNode(C);return(D)?D.nodeValue:null;}:function(D,C){var E=this.attributeGetters[C];return(E)?E.call(D):D.getAttribute(C); 157 | };p.hasAttribute=(z&&this.isNativeCode(z.hasAttribute))?function(D,C){return D.hasAttribute(C);}:function(D,C){D=D.getAttributeNode(C);return !!(D&&(D.specified||D.nodeValue)); 158 | };p.contains=(z&&this.isNativeCode(z.contains))?function(C,D){return C.contains(D);}:(z&&z.compareDocumentPosition)?function(C,D){return C===D||!!(C.compareDocumentPosition(D)&16); 159 | }:function(C,D){if(D){do{if(D===C){return true;}}while((D=D.parentNode));}return false;};p.documentSorter=(z.compareDocumentPosition)?function(D,C){if(!D.compareDocumentPosition||!C.compareDocumentPosition){return 0; 160 | }return D.compareDocumentPosition(C)&4?-1:D===C?0:1;}:("sourceIndex" in z)?function(D,C){if(!D.sourceIndex||!C.sourceIndex){return 0;}return D.sourceIndex-C.sourceIndex; 161 | }:(x.createRange)?function(F,D){if(!F.ownerDocument||!D.ownerDocument){return 0;}var E=F.ownerDocument.createRange(),C=D.ownerDocument.createRange();E.setStart(F,0); 162 | E.setEnd(F,0);C.setStart(D,0);C.setEnd(D,0);return E.compareBoundaryPoints(Range.START_TO_END,C);}:null;z=null;for(B in p){this[B]=p[B];}};var f=/^([#.]?)((?:[\w-]+|\*))$/,h=/\[.+[*$^]=(?:""|'')?\]/,g={}; 163 | k.search=function(U,z,H,s){var p=this.found=(s)?null:(H||[]);if(!U){return p;}else{if(U.navigator){U=U.document;}else{if(!U.nodeType){return p;}}}var F,O,V=this.uniques={},I=!!(H&&H.length),y=(U.nodeType==9); 164 | if(this.document!==(y?U:U.ownerDocument)){this.setDocument(U);}if(I){for(O=p.length;O--;){V[this.getUID(p[O])]=true;}}if(typeof z=="string"){var r=z.match(f); 165 | simpleSelectors:if(r){var u=r[1],v=r[2],A,E;if(!u){if(v=="*"&&this.brokenStarGEBTN){break simpleSelectors;}E=U.getElementsByTagName(v);if(s){return E[0]||null; 166 | }for(O=0;A=E[O++];){if(!(I&&V[this.getUID(A)])){p.push(A);}}}else{if(u=="#"){if(!this.isHTMLDocument||!y){break simpleSelectors;}A=U.getElementById(v); 167 | if(!A){return p;}if(this.idGetsName&&A.getAttributeNode("id").nodeValue!=v){break simpleSelectors;}if(s){return A||null;}if(!(I&&V[this.getUID(A)])){p.push(A); 168 | }}else{if(u=="."){if(!this.isHTMLDocument||((!U.getElementsByClassName||this.brokenGEBCN)&&U.querySelectorAll)){break simpleSelectors;}if(U.getElementsByClassName&&!this.brokenGEBCN){E=U.getElementsByClassName(v); 169 | if(s){return E[0]||null;}for(O=0;A=E[O++];){if(!(I&&V[this.getUID(A)])){p.push(A);}}}else{var T=new RegExp("(^|\\s)"+e.escapeRegExp(v)+"(\\s|$)");E=U.getElementsByTagName("*"); 170 | for(O=0;A=E[O++];){className=A.className;if(!(className&&T.test(className))){continue;}if(s){return A;}if(!(I&&V[this.getUID(A)])){p.push(A);}}}}}}if(I){this.sort(p); 171 | }return(s)?null:p;}querySelector:if(U.querySelectorAll){if(!this.isHTMLDocument||g[z]||this.brokenMixedCaseQSA||(this.brokenCheckedQSA&&z.indexOf(":checked")>-1)||(this.brokenEmptyAttributeQSA&&h.test(z))||(!y&&z.indexOf(",")>-1)||e.disableQSA){break querySelector; 172 | }var S=z,x=U;if(!y){var C=x.getAttribute("id"),t="slickid__";x.setAttribute("id",t);S="#"+t+" "+S;U=x.parentNode;}try{if(s){return U.querySelector(S)||null; 173 | }else{E=U.querySelectorAll(S);}}catch(Q){g[z]=1;break querySelector;}finally{if(!y){if(C){x.setAttribute("id",C);}else{x.removeAttribute("id");}U=x;}}if(this.starSelectsClosedQSA){for(O=0; 174 | A=E[O++];){if(A.nodeName>"@"&&!(I&&V[this.getUID(A)])){p.push(A);}}}else{for(O=0;A=E[O++];){if(!(I&&V[this.getUID(A)])){p.push(A);}}}if(I){this.sort(p); 175 | }return p;}F=this.Slick.parse(z);if(!F.length){return p;}}else{if(z==null){return p;}else{if(z.Slick){F=z;}else{if(this.contains(U.documentElement||U,z)){(p)?p.push(z):p=z; 176 | return p;}else{return p;}}}}this.posNTH={};this.posNTHLast={};this.posNTHType={};this.posNTHTypeLast={};this.push=(!I&&(s||(F.length==1&&F.expressions[0].length==1)))?this.pushArray:this.pushUID; 177 | if(p==null){p=[];}var M,L,K;var B,J,D,c,q,G,W;var N,P,o,w,R=F.expressions;search:for(O=0;(P=R[O]);O++){for(M=0;(o=P[M]);M++){B="combinator:"+o.combinator; 178 | if(!this[B]){continue search;}J=(this.isXMLDocument)?o.tag:o.tag.toUpperCase();D=o.id;c=o.classList;q=o.classes;G=o.attributes;W=o.pseudos;w=(M===(P.length-1)); 179 | this.bitUniques={};if(w){this.uniques=V;this.found=p;}else{this.uniques={};this.found=[];}if(M===0){this[B](U,J,D,q,G,W,c);if(s&&w&&p.length){break search; 180 | }}else{if(s&&w){for(L=0,K=N.length;L1)){this.sort(p);}return(s)?(p[0]||null):p;};k.uidx=1;k.uidk="slick-uniqueid";k.getUIDXML=function(n){var c=n.getAttribute(this.uidk); 182 | if(!c){c=this.uidx++;n.setAttribute(this.uidk,c);}return c;};k.getUIDHTML=function(c){return c.uniqueNumber||(c.uniqueNumber=this.uidx++);};k.sort=function(c){if(!this.documentSorter){return c; 183 | }c.sort(this.documentSorter);return c;};k.cacheNTH={};k.matchNTH=/^([+-]?\d*)?([a-z]+)?([+-]\d+)?$/;k.parseNTHArgument=function(q){var o=q.match(this.matchNTH); 184 | if(!o){return false;}var p=o[2]||false;var n=o[1]||1;if(n=="-"){n=-1;}var c=+o[3]||0;o=(p=="n")?{a:n,b:c}:(p=="odd")?{a:2,b:1}:(p=="even")?{a:2,b:0}:{a:0,b:n}; 185 | return(this.cacheNTH[q]=o);};k.createNTHPseudo=function(p,n,c,o){return function(s,q){var u=this.getUID(s);if(!this[c][u]){var A=s.parentNode;if(!A){return false; 186 | }var r=A[p],t=1;if(o){var z=s.nodeName;do{if(r.nodeName!=z){continue;}this[c][this.getUID(r)]=t++;}while((r=r[n]));}else{do{if(r.nodeType!=1){continue; 187 | }this[c][this.getUID(r)]=t++;}while((r=r[n]));}}q=q||"n";var v=this.cacheNTH[q]||this.parseNTHArgument(q);if(!v){return false;}var y=v.a,x=v.b,w=this[c][u]; 188 | if(y==0){return x==w;}if(y>0){if(w":function(p,c,r,o,n,q){if((p=p.firstChild)){do{if(p.nodeType==1){this.push(p,c,r,o,n,q); 203 | }}while((p=p.nextSibling));}},"+":function(p,c,r,o,n,q){while((p=p.nextSibling)){if(p.nodeType==1){this.push(p,c,r,o,n,q);break;}}},"^":function(p,c,r,o,n,q){p=p.firstChild; 204 | if(p){if(p.nodeType==1){this.push(p,c,r,o,n,q);}else{this["combinator:+"](p,c,r,o,n,q);}}},"~":function(q,c,s,p,n,r){while((q=q.nextSibling)){if(q.nodeType!=1){continue; 205 | }var o=this.getUID(q);if(this.bitUniques[o]){break;}this.bitUniques[o]=true;this.push(q,c,s,p,n,r);}},"++":function(p,c,r,o,n,q){this["combinator:+"](p,c,r,o,n,q); 206 | this["combinator:!+"](p,c,r,o,n,q);},"~~":function(p,c,r,o,n,q){this["combinator:~"](p,c,r,o,n,q);this["combinator:!~"](p,c,r,o,n,q);},"!":function(p,c,r,o,n,q){while((p=p.parentNode)){if(p!==this.document){this.push(p,c,r,o,n,q); 207 | }}},"!>":function(p,c,r,o,n,q){p=p.parentNode;if(p!==this.document){this.push(p,c,r,o,n,q);}},"!+":function(p,c,r,o,n,q){while((p=p.previousSibling)){if(p.nodeType==1){this.push(p,c,r,o,n,q); 208 | break;}}},"!^":function(p,c,r,o,n,q){p=p.lastChild;if(p){if(p.nodeType==1){this.push(p,c,r,o,n,q);}else{this["combinator:!+"](p,c,r,o,n,q);}}},"!~":function(q,c,s,p,n,r){while((q=q.previousSibling)){if(q.nodeType!=1){continue; 209 | }var o=this.getUID(q);if(this.bitUniques[o]){break;}this.bitUniques[o]=true;this.push(q,c,s,p,n,r);}}};for(var i in j){k["combinator:"+i]=j[i];}var l={empty:function(c){var n=c.firstChild; 210 | return !(n&&n.nodeType==1)&&!(c.innerText||c.textContent||"").length;},not:function(c,n){return !this.matchNode(c,n);},contains:function(c,n){return(c.innerText||c.textContent||"").indexOf(n)>-1; 211 | },"first-child":function(c){while((c=c.previousSibling)){if(c.nodeType==1){return false;}}return true;},"last-child":function(c){while((c=c.nextSibling)){if(c.nodeType==1){return false; 212 | }}return true;},"only-child":function(o){var n=o;while((n=n.previousSibling)){if(n.nodeType==1){return false;}}var c=o;while((c=c.nextSibling)){if(c.nodeType==1){return false; 213 | }}return true;},"nth-child":k.createNTHPseudo("firstChild","nextSibling","posNTH"),"nth-last-child":k.createNTHPseudo("lastChild","previousSibling","posNTHLast"),"nth-of-type":k.createNTHPseudo("firstChild","nextSibling","posNTHType",true),"nth-last-of-type":k.createNTHPseudo("lastChild","previousSibling","posNTHTypeLast",true),index:function(n,c){return this["pseudo:nth-child"](n,""+c+1); 214 | },even:function(c){return this["pseudo:nth-child"](c,"2n");},odd:function(c){return this["pseudo:nth-child"](c,"2n+1");},"first-of-type":function(c){var n=c.nodeName; 215 | while((c=c.previousSibling)){if(c.nodeName==n){return false;}}return true;},"last-of-type":function(c){var n=c.nodeName;while((c=c.nextSibling)){if(c.nodeName==n){return false; 216 | }}return true;},"only-of-type":function(o){var n=o,p=o.nodeName;while((n=n.previousSibling)){if(n.nodeName==p){return false;}}var c=o;while((c=c.nextSibling)){if(c.nodeName==p){return false; 217 | }}return true;},enabled:function(c){return !c.disabled;},disabled:function(c){return c.disabled;},checked:function(c){return c.checked||c.selected;},focus:function(c){return this.isHTMLDocument&&this.document.activeElement===c&&(c.href||c.type||this.hasAttribute(c,"tabindex")); 218 | },root:function(c){return(c===this.root);},selected:function(c){return c.selected;}};for(var b in l){k["pseudo:"+b]=l[b];}var a=k.attributeGetters={"class":function(){return this.getAttribute("class")||this.className; 219 | },"for":function(){return("htmlFor" in this)?this.htmlFor:this.getAttribute("for");},href:function(){return("href" in this)?this.getAttribute("href",2):this.getAttribute("href"); 220 | },style:function(){return(this.style)?this.style.cssText:this.getAttribute("style");},tabindex:function(){var c=this.getAttributeNode("tabindex");return(c&&c.specified)?c.nodeValue:null; 221 | },type:function(){return this.getAttribute("type");},maxlength:function(){var c=this.getAttributeNode("maxLength");return(c&&c.specified)?c.nodeValue:null; 222 | }};a.MAXLENGTH=a.maxLength=a.maxlength;var e=k.Slick=(this.Slick||{});e.version="1.1.6";e.search=function(n,o,c){return k.search(n,o,c);};e.find=function(c,n){return k.search(c,n,null,true); 223 | };e.contains=function(c,n){k.setDocument(c);return k.contains(c,n);};e.getAttribute=function(n,c){k.setDocument(n);return k.getAttribute(n,c);};e.hasAttribute=function(n,c){k.setDocument(n); 224 | return k.hasAttribute(n,c);};e.match=function(n,c){if(!(n&&c)){return false;}if(!c||c===n){return true;}k.setDocument(n);return k.matchNode(n,c);};e.defineAttributeGetter=function(c,n){k.attributeGetters[c]=n; 225 | return this;};e.lookupAttributeGetter=function(c){return k.attributeGetters[c];};e.definePseudo=function(c,n){k["pseudo:"+c]=function(p,o){return n.call(p,o); 226 | };return this;};e.lookupPseudo=function(c){var n=k["pseudo:"+c];if(n){return function(o){return n.call(this,o);};}return null;};e.override=function(n,c){k.override(n,c); 227 | return this;};e.isXML=k.isXML;e.uidOf=function(c){return k.getUIDHTML(c);};if(!this.Slick){this.Slick=e;}}).apply((typeof exports!="undefined")?exports:this); 228 | var Element=function(b,g){var h=Element.Constructors[b];if(h){return h(g);}if(typeof b!="string"){return document.id(b).set(g);}if(!g){g={};}if(!(/^[\w-]+$/).test(b)){var e=Slick.parse(b).expressions[0][0]; 229 | b=(e.tag=="*")?"div":e.tag;if(e.id&&g.id==null){g.id=e.id;}var d=e.attributes;if(d){for(var a,f=0,c=d.length;f=this.length){delete this[g--]; 245 | }return e;}.protect());}Elements.implement(Array.prototype);Array.mirror(Elements);var d;try{d=(document.createElement("").name=="x");}catch(b){}var c=function(e){return(""+e).replace(/&/g,"&").replace(/"/g,"""); 246 | };Document.implement({newElement:function(e,g){if(g&&g.checked!=null){g.defaultChecked=g.checked;}if(d&&g){e="<"+e;if(g.name){e+=' name="'+c(g.name)+'"'; 247 | }if(g.type){e+=' type="'+c(g.type)+'"';}e+=">";delete g.name;delete g.type;}return this.id(this.createElement(e)).set(g);}});})();(function(){Slick.uidOf(window); 248 | Slick.uidOf(document);Document.implement({newTextNode:function(e){return this.createTextNode(e);},getDocument:function(){return this;},getWindow:function(){return this.window; 249 | },id:(function(){var e={string:function(E,D,l){E=Slick.find(l,"#"+E.replace(/(\W)/g,"\\$1"));return(E)?e.element(E,D):null;},element:function(D,E){Slick.uidOf(D); 250 | if(!E&&!D.$family&&!(/^(?:object|embed)$/i).test(D.tagName)){var l=D.fireEvent;D._fireEvent=function(F,G){return l(F,G);};Object.append(D,Element.Prototype); 251 | }return D;},object:function(D,E,l){if(D.toElement){return e.element(D.toElement(l),E);}return null;}};e.textnode=e.whitespace=e.window=e.document=function(l){return l; 252 | };return function(D,F,E){if(D&&D.$family&&D.uniqueNumber){return D;}var l=typeOf(D);return(e[l])?e[l](D,F,E||document):null;};})()});if(window.$==null){Window.implement("$",function(e,l){return document.id(e,l,this.document); 253 | });}Window.implement({getDocument:function(){return this.document;},getWindow:function(){return this;}});[Document,Element].invoke("implement",{getElements:function(e){return Slick.search(this,e,new Elements); 254 | },getElement:function(e){return document.id(Slick.find(this,e));}});var n={contains:function(e){return Slick.contains(this,e);}};if(!document.contains){Document.implement(n); 255 | }if(!document.createElement("div").contains){Element.implement(n);}var r=function(E,D){if(!E){return D;}E=Object.clone(Slick.parse(E));var l=E.expressions; 256 | for(var e=l.length;e--;){l[e][0].combinator=D;}return E;};Object.forEach({getNext:"~",getPrevious:"!~",getParent:"!"},function(e,l){Element.implement(l,function(D){return this.getElement(r(D,e)); 257 | });});Object.forEach({getAllNext:"~",getAllPrevious:"!~",getSiblings:"~~",getChildren:">",getParents:"!"},function(e,l){Element.implement(l,function(D){return this.getElements(r(D,e)); 258 | });});Element.implement({getFirst:function(e){return document.id(Slick.search(this,r(e,">"))[0]);},getLast:function(e){return document.id(Slick.search(this,r(e,">")).getLast()); 259 | },getWindow:function(){return this.ownerDocument.window;},getDocument:function(){return this.ownerDocument;},getElementById:function(e){return document.id(Slick.find(this,"#"+(""+e).replace(/(\W)/g,"\\$1"))); 260 | },match:function(e){return !e||Slick.match(this,e);}});if(window.$$==null){Window.implement("$$",function(e){if(arguments.length==1){if(typeof e=="string"){return Slick.search(this.document,e,new Elements); 261 | }else{if(Type.isEnumerable(e)){return new Elements(e);}}}return new Elements(arguments);});}var w={before:function(l,e){var D=e.parentNode;if(D){D.insertBefore(l,e); 262 | }},after:function(l,e){var D=e.parentNode;if(D){D.insertBefore(l,e.nextSibling);}},bottom:function(l,e){e.appendChild(l);},top:function(l,e){e.insertBefore(l,e.firstChild); 263 | }};w.inside=w.bottom;var k={},d={};var m={};Array.forEach(["type","value","defaultValue","accessKey","cellPadding","cellSpacing","colSpan","frameBorder","rowSpan","tabIndex","useMap"],function(e){m[e.toLowerCase()]=e; 264 | });m.html="innerHTML";m.text=(document.createElement("div").textContent==null)?"innerText":"textContent";Object.forEach(m,function(l,e){d[e]=function(D,E){D[l]=E; 265 | };k[e]=function(D){return D[l];};});var x=["compact","nowrap","ismap","declare","noshade","checked","disabled","readOnly","multiple","selected","noresize","defer","defaultChecked","autofocus","controls","autoplay","loop"]; 266 | var i={};Array.forEach(x,function(e){var l=e.toLowerCase();i[l]=e;d[l]=function(D,E){D[e]=!!E;};k[l]=function(D){return !!D[e];};});Object.append(d,{"class":function(e,l){("className" in e)?e.className=(l||""):e.setAttribute("class",l); 267 | },"for":function(e,l){("htmlFor" in e)?e.htmlFor=l:e.setAttribute("for",l);},style:function(e,l){(e.style)?e.style.cssText=l:e.setAttribute("style",l); 268 | },value:function(e,l){e.value=(l!=null)?l:"";}});k["class"]=function(e){return("className" in e)?e.className||null:e.getAttribute("class");};var f=document.createElement("button"); 269 | try{f.type="button";}catch(z){}if(f.type!="button"){d.type=function(e,l){e.setAttribute("type",l);};}f=null;var q=(function(e){e.random="attribute";return(e.getAttribute("random")=="attribute"); 270 | })(document.createElement("div"));if(q){var g={};}Element.implement({setProperty:function(e,l){var D=d[e.toLowerCase()];if(D){D(this,l);}else{if(l==null){this.removeAttribute(e); 271 | }else{this.setAttribute(e,l);if(q){g[e]=true;}}}return this;},setProperties:function(e){for(var l in e){this.setProperty(l,e[l]);}return this;},getProperty:function(E){var D=k[E.toLowerCase()]; 272 | if(D){return D(this);}if(q&&!g[E]){var l=this.getAttributeNode(E);if(!l||l.expando){return null;}}var e=Slick.getAttribute(this,E);return(!e&&!Slick.hasAttribute(this,E))?null:e; 273 | },getProperties:function(){var e=Array.from(arguments);return e.map(this.getProperty,this).associate(e);},removeProperty:function(e){return this.setProperty(e,null); 274 | },removeProperties:function(){Array.each(arguments,this.removeProperty,this);return this;},set:function(D,l){var e=Element.Properties[D];(e&&e.set)?e.set.call(this,l):this.setProperty(D,l); 275 | }.overloadSetter(),get:function(l){var e=Element.Properties[l];return(e&&e.get)?e.get.apply(this):this.getProperty(l);}.overloadGetter(),erase:function(l){var e=Element.Properties[l]; 276 | (e&&e.erase)?e.erase.apply(this):this.removeProperty(l);return this;},hasClass:function(e){return this.className.clean().contains(e," ");},addClass:function(e){if(!this.hasClass(e)){this.className=(this.className+" "+e).clean(); 277 | }return this;},removeClass:function(e){this.className=this.className.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)"),"$1");return this;},toggleClass:function(e,l){if(l==null){l=!this.hasClass(e); 278 | }return(l)?this.addClass(e):this.removeClass(e);},adopt:function(){var E=this,e,G=Array.flatten(arguments),F=G.length;if(F>1){E=e=document.createDocumentFragment(); 279 | }for(var D=0;D"; 300 | var a=(t.childNodes.length==1);if(!a){var s="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),b=document.createDocumentFragment(),u=s.length; 301 | while(u--){b.createElement(s[u]);}}t=null;var h=Function.attempt(function(){var e=document.createElement("table");e.innerHTML="";return true; 302 | });var c=document.createElement("tr"),p="";c.innerHTML=p;var y=(c.innerHTML==p);c=null;if(!h||!y||!a){Element.Properties.html.set=(function(l){var e={table:[1,"","
"],select:[1,""],tbody:[2,"","
"],tr:[3,"","
"]}; 303 | e.thead=e.tfoot=e.tbody;return function(D){var E=e[this.get("tag")];if(!E&&!a){E=[0,"",""];}if(!E){return l.call(this,D);}var H=E[0],G=document.createElement("div"),F=G; 304 | if(!a){b.appendChild(G);}G.innerHTML=[E[1],D,E[2]].flatten().join("");while(H--){F=F.firstChild;}this.empty().adopt(F.childNodes);if(!a){b.removeChild(G); 305 | }G=null;};})(Element.Properties.html.set);}var o=document.createElement("form");o.innerHTML="";if(o.firstChild.value!="s"){Element.Properties.value={set:function(G){var l=this.get("tag"); 306 | if(l!="select"){return this.setProperty("value",G);}var D=this.getElements("option");for(var E=0;E0?"visible":"hidden"; 311 | };var d=(h?function(j,i){j.style.opacity=i;}:(a?function(j,i){if(!j.currentStyle||!j.currentStyle.hasLayout){j.style.zoom=1;}i=(i*100).limit(0,100).round(); 312 | i=(i==100)?"":"alpha(opacity="+i+")";var k=j.style.filter||j.getComputedStyle("filter")||"";j.style.filter=g.test(k)?k.replace(g,i):k+i;}:b));var e=(h?function(j){var i=j.style.opacity||j.getComputedStyle("opacity"); 313 | return(i=="")?1:i.toFloat();}:(a?function(j){var k=(j.style.filter||j.getComputedStyle("filter")),i;if(k){i=k.match(g);}return(i==null||k==null)?1:(i[1]/100); 314 | }:function(j){var i=j.retrieve("$opacity");if(i==null){i=(j.style.visibility=="hidden"?0:1);}return i;}));var c=(f.style.cssFloat==null)?"styleFloat":"cssFloat"; 315 | Element.implement({getComputedStyle:function(k){if(this.currentStyle){return this.currentStyle[k.camelCase()];}var j=Element.getDocument(this).defaultView,i=j?j.getComputedStyle(this,null):null; 316 | return(i)?i.getPropertyValue((k==c)?"float":k.hyphenate()):null;},setStyle:function(j,i){if(j=="opacity"){d(this,parseFloat(i));return this;}j=(j=="float"?c:j).camelCase(); 317 | if(typeOf(i)!="string"){var k=(Element.Styles[j]||"@").split(" ");i=Array.from(i).map(function(m,l){if(!k[l]){return"";}return(typeOf(m)=="number")?k[l].replace("@",Math.round(m)):m; 318 | }).join(" ");}else{if(i==String(Number(i))){i=Math.round(i);}}this.style[j]=i;return this;},getStyle:function(o){if(o=="opacity"){return e(this);}o=(o=="float"?c:o).camelCase(); 319 | var i=this.style[o];if(!i||o=="zIndex"){i=[];for(var n in Element.ShortStyles){if(o!=n){continue;}for(var m in Element.ShortStyles[n]){i.push(this.getStyle(m)); 320 | }return i.join(" ");}i=this.getComputedStyle(o);}if(i){i=String(i);var k=i.match(/rgba?\([\d\s,]+\)/);if(k){i=i.replace(k[0],k[0].rgbToHex());}}if(Browser.opera||(Browser.ie&&isNaN(parseFloat(i)))){if((/^(height|width)$/).test(o)){var j=(o=="width")?["left","right"]:["top","bottom"],l=0; 321 | j.each(function(p){l+=this.getStyle("border-"+p+"-width").toInt()+this.getStyle("padding-"+p).toInt();},this);return this["offset"+o.capitalize()]-l+"px"; 322 | }if(Browser.opera&&String(i).indexOf("px")!=-1){return i;}if((/^border(.+)Width|margin|padding/).test(o)){return"0px";}}return i;},setStyles:function(j){for(var i in j){this.setStyle(i,j[i]); 323 | }return this;},getStyles:function(){var i={};Array.flatten(arguments).each(function(j){i[j]=this.getStyle(j);},this);return i;}});Element.Styles={left:"@px",top:"@px",bottom:"@px",right:"@px",width:"@px",height:"@px",maxWidth:"@px",maxHeight:"@px",minWidth:"@px",minHeight:"@px",backgroundColor:"rgb(@, @, @)",backgroundPosition:"@px @px",color:"rgb(@, @, @)",fontSize:"@px",letterSpacing:"@px",lineHeight:"@px",clip:"rect(@px @px @px @px)",margin:"@px @px @px @px",padding:"@px @px @px @px",border:"@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)",borderWidth:"@px @px @px @px",borderStyle:"@ @ @ @",borderColor:"rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)",zIndex:"@",zoom:"@",fontWeight:"@",textIndent:"@px",opacity:"@"}; 324 | Element.ShortStyles={margin:{},padding:{},border:{},borderWidth:{},borderStyle:{},borderColor:{}};["Top","Right","Bottom","Left"].each(function(o){var n=Element.ShortStyles; 325 | var j=Element.Styles;["margin","padding"].each(function(p){var q=p+o;n[p][q]=j[q]="@px";});var m="border"+o;n.border[m]=j[m]="@px @ rgb(@, @, @)";var l=m+"Width",i=m+"Style",k=m+"Color"; 326 | n[m]={};n.borderWidth[l]=n[m][l]=j[l]="@px";n.borderStyle[i]=n[m][i]=j[i]="@";n.borderColor[k]=n[m][k]=j[k]="rgb(@, @, @)";});})();(function(){Element.Properties.events={set:function(b){this.addEvents(b); 327 | }};[Element,Window,Document].invoke("implement",{addEvent:function(f,h){var i=this.retrieve("events",{});if(!i[f]){i[f]={keys:[],values:[]};}if(i[f].keys.contains(h)){return this; 328 | }i[f].keys.push(h);var g=f,b=Element.Events[f],d=h,j=this;if(b){if(b.onAdd){b.onAdd.call(this,h,f);}if(b.condition){d=function(k){if(b.condition.call(this,k,f)){return h.call(this,k); 329 | }return true;};}if(b.base){g=Function.from(b.base).call(this,f);}}var e=function(){return h.call(j);};var c=Element.NativeEvents[g];if(c){if(c==2){e=function(k){k=new DOMEvent(k,j.getWindow()); 330 | if(d.call(j,k)===false){k.stop();}};}this.addListener(g,e,arguments[2]);}i[f].values.push(e);return this;},removeEvent:function(e,d){var c=this.retrieve("events"); 331 | if(!c||!c[e]){return this;}var h=c[e];var b=h.keys.indexOf(d);if(b==-1){return this;}var g=h.values[b];delete h.keys[b];delete h.values[b];var f=Element.Events[e]; 332 | if(f){if(f.onRemove){f.onRemove.call(this,d,e);}if(f.base){e=Function.from(f.base).call(this,e);}}return(Element.NativeEvents[e])?this.removeListener(e,g,arguments[2]):this; 333 | },addEvents:function(b){for(var c in b){this.addEvent(c,b[c]);}return this;},removeEvents:function(b){var d;if(typeOf(b)=="object"){for(d in b){this.removeEvent(d,b[d]); 334 | }return this;}var c=this.retrieve("events");if(!c){return this;}if(!b){for(d in c){this.removeEvents(d);}this.eliminate("events");}else{if(c[b]){c[b].keys.each(function(e){this.removeEvent(b,e); 335 | },this);delete c[b];}}return this;},fireEvent:function(e,c,b){var d=this.retrieve("events");if(!d||!d[e]){return this;}c=Array.from(c);d[e].keys.each(function(f){if(b){f.delay(b,this,c); 336 | }else{f.apply(this,c);}},this);return this;},cloneEvents:function(e,d){e=document.id(e);var c=e.retrieve("events");if(!c){return this;}if(!d){for(var b in c){this.cloneEvents(e,b); 337 | }}else{if(c[d]){c[d].keys.each(function(f){this.addEvent(d,f);},this);}}return this;}});Element.NativeEvents={click:2,dblclick:2,mouseup:2,mousedown:2,contextmenu:2,mousewheel:2,DOMMouseScroll:2,mouseover:2,mouseout:2,mousemove:2,selectstart:2,selectend:2,keydown:2,keypress:2,keyup:2,orientationchange:2,touchstart:2,touchmove:2,touchend:2,touchcancel:2,gesturestart:2,gesturechange:2,gestureend:2,focus:2,blur:2,change:2,reset:2,select:2,submit:2,paste:2,input:2,load:2,unload:1,beforeunload:2,resize:1,move:1,DOMContentLoaded:1,readystatechange:1,error:1,abort:1,scroll:1}; 338 | Element.Events={mousewheel:{base:(Browser.firefox)?"DOMMouseScroll":"mousewheel"}};if("onmouseenter" in document.documentElement){Element.NativeEvents.mouseenter=Element.NativeEvents.mouseleave=2; 339 | }else{var a=function(b){var c=b.relatedTarget;if(c==null){return true;}if(!c){return false;}return(c!=this&&c.prefix!="xul"&&typeOf(this)!="document"&&!this.contains(c)); 340 | };Element.Events.mouseenter={base:"mouseover",condition:a};Element.Events.mouseleave={base:"mouseout",condition:a};}if(!window.addEventListener){Element.NativeEvents.propertychange=2; 341 | Element.Events.change={base:function(){var b=this.type;return(this.get("tag")=="input"&&(b=="radio"||b=="checkbox"))?"propertychange":"change";},condition:function(b){return this.type!="radio"||(b.event.propertyName=="checked"&&this.checked); 342 | }};}})();(function(){var c=!!window.addEventListener;Element.NativeEvents.focusin=Element.NativeEvents.focusout=2;var k=function(l,m,n,o,p){while(p&&p!=l){if(m(p,o)){return n.call(p,o,p); 343 | }p=document.id(p.parentNode);}};var a={mouseenter:{base:"mouseover"},mouseleave:{base:"mouseout"},focus:{base:"focus"+(c?"":"in"),capture:true},blur:{base:c?"blur":"focusout",capture:true}}; 344 | var b="$delegation:";var i=function(l){return{base:"focusin",remove:function(m,o){var p=m.retrieve(b+l+"listeners",{})[o];if(p&&p.forms){for(var n=p.forms.length; 345 | n--;){p.forms[n].removeEvent(l,p.fns[n]);}}},listen:function(x,r,v,n,t,s){var o=(t.get("tag")=="form")?t:n.target.getParent("form");if(!o){return;}var u=x.retrieve(b+l+"listeners",{}),p=u[s]||{forms:[],fns:[]},m=p.forms,w=p.fns; 346 | if(m.indexOf(o)!=-1){return;}m.push(o);var q=function(y){k(x,r,v,y,t);};o.addEvent(l,q);w.push(q);u[s]=p;x.store(b+l+"listeners",u);}};};var d=function(l){return{base:"focusin",listen:function(m,n,p,q,r){var o={blur:function(){this.removeEvents(o); 347 | }};o[l]=function(s){k(m,n,p,s,r);};q.target.addEvents(o);}};};if(!c){Object.append(a,{submit:i("submit"),reset:i("reset"),change:d("change"),select:d("select")}); 348 | }var h=Element.prototype,f=h.addEvent,j=h.removeEvent;var e=function(l,m){return function(r,q,n){if(r.indexOf(":relay")==-1){return l.call(this,r,q,n); 349 | }var o=Slick.parse(r).expressions[0][0];if(o.pseudos[0].key!="relay"){return l.call(this,r,q,n);}var p=o.tag;o.pseudos.slice(1).each(function(s){p+=":"+s.key+(s.value?"("+s.value+")":""); 350 | });l.call(this,r,q);return m.call(this,p,o.pseudos[0].value,q);};};var g={addEvent:function(v,q,x){var t=this.retrieve("$delegates",{}),r=t[v];if(r){for(var y in r){if(r[y].fn==x&&r[y].match==q){return this; 351 | }}}var p=v,u=q,o=x,n=a[v]||{};v=n.base||p;q=function(B){return Slick.match(B,u);};var w=Element.Events[p];if(w&&w.condition){var l=q,m=w.condition;q=function(C,B){return l(C,B)&&m.call(C,B,v); 352 | };}var z=this,s=String.uniqueID();var A=n.listen?function(B,C){if(!C&&B&&B.target){C=B.target;}if(C){n.listen(z,q,x,B,C,s);}}:function(B,C){if(!C&&B&&B.target){C=B.target; 353 | }if(C){k(z,q,x,B,C);}};if(!r){r={};}r[s]={match:u,fn:o,delegator:A};t[p]=r;return f.call(this,v,A,n.capture);},removeEvent:function(r,n,t,u){var q=this.retrieve("$delegates",{}),p=q[r]; 354 | if(!p){return this;}if(u){var m=r,w=p[u].delegator,l=a[r]||{};r=l.base||m;if(l.remove){l.remove(this,u);}delete p[u];q[m]=p;return j.call(this,r,w);}var o,v; 355 | if(t){for(o in p){v=p[o];if(v.match==n&&v.fn==t){return g.removeEvent.call(this,r,n,t,o);}}}else{for(o in p){v=p[o];if(v.match==n){g.removeEvent.call(this,r,n,v.fn,o); 356 | }}}return this;}};[Element,Window,Document].invoke("implement",{addEvent:e(f,g.addEvent),removeEvent:e(j,g.removeEvent)});})();(function(){var h=document.createElement("div"),e=document.createElement("div"); 357 | h.style.height="0";h.appendChild(e);var d=(e.offsetParent===h);h=e=null;var l=function(m){return k(m,"position")!="static"||a(m);};var i=function(m){return l(m)||(/^(?:table|td|th)$/i).test(m.tagName); 358 | };Element.implement({scrollTo:function(m,n){if(a(this)){this.getWindow().scrollTo(m,n);}else{this.scrollLeft=m;this.scrollTop=n;}return this;},getSize:function(){if(a(this)){return this.getWindow().getSize(); 359 | }return{x:this.offsetWidth,y:this.offsetHeight};},getScrollSize:function(){if(a(this)){return this.getWindow().getScrollSize();}return{x:this.scrollWidth,y:this.scrollHeight}; 360 | },getScroll:function(){if(a(this)){return this.getWindow().getScroll();}return{x:this.scrollLeft,y:this.scrollTop};},getScrolls:function(){var n=this.parentNode,m={x:0,y:0}; 361 | while(n&&!a(n)){m.x+=n.scrollLeft;m.y+=n.scrollTop;n=n.parentNode;}return m;},getOffsetParent:d?function(){var m=this;if(a(m)||k(m,"position")=="fixed"){return null; 362 | }var n=(k(m,"position")=="static")?i:l;while((m=m.parentNode)){if(n(m)){return m;}}return null;}:function(){var m=this;if(a(m)||k(m,"position")=="fixed"){return null; 363 | }try{return m.offsetParent;}catch(n){}return null;},getOffsets:function(){if(this.getBoundingClientRect&&!Browser.Platform.ios){var r=this.getBoundingClientRect(),o=document.id(this.getDocument().documentElement),q=o.getScroll(),t=this.getScrolls(),s=(k(this,"position")=="fixed"); 364 | return{x:r.left.toInt()+t.x+((s)?0:q.x)-o.clientLeft,y:r.top.toInt()+t.y+((s)?0:q.y)-o.clientTop};}var n=this,m={x:0,y:0};if(a(this)){return m;}while(n&&!a(n)){m.x+=n.offsetLeft; 365 | m.y+=n.offsetTop;if(Browser.firefox){if(!c(n)){m.x+=b(n);m.y+=g(n);}var p=n.parentNode;if(p&&k(p,"overflow")!="visible"){m.x+=b(p);m.y+=g(p);}}else{if(n!=this&&Browser.safari){m.x+=b(n); 366 | m.y+=g(n);}}n=n.offsetParent;}if(Browser.firefox&&!c(this)){m.x-=b(this);m.y-=g(this);}return m;},getPosition:function(p){var q=this.getOffsets(),n=this.getScrolls(); 367 | var m={x:q.x-n.x,y:q.y-n.y};if(p&&(p=document.id(p))){var o=p.getPosition();return{x:m.x-o.x-b(p),y:m.y-o.y-g(p)};}return m;},getCoordinates:function(o){if(a(this)){return this.getWindow().getCoordinates(); 368 | }var m=this.getPosition(o),n=this.getSize();var p={left:m.x,top:m.y,width:n.x,height:n.y};p.right=p.left+p.width;p.bottom=p.top+p.height;return p;},computePosition:function(m){return{left:m.x-j(this,"margin-left"),top:m.y-j(this,"margin-top")}; 369 | },setPosition:function(m){return this.setStyles(this.computePosition(m));}});[Document,Window].invoke("implement",{getSize:function(){var m=f(this);return{x:m.clientWidth,y:m.clientHeight}; 370 | },getScroll:function(){var n=this.getWindow(),m=f(this);return{x:n.pageXOffset||m.scrollLeft,y:n.pageYOffset||m.scrollTop};},getScrollSize:function(){var o=f(this),n=this.getSize(),m=this.getDocument().body; 371 | return{x:Math.max(o.scrollWidth,m.scrollWidth,n.x),y:Math.max(o.scrollHeight,m.scrollHeight,n.y)};},getPosition:function(){return{x:0,y:0};},getCoordinates:function(){var m=this.getSize(); 372 | return{top:0,left:0,bottom:m.y,right:m.x,height:m.y,width:m.x};}});var k=Element.getComputedStyle;function j(m,n){return k(m,n).toInt()||0;}function c(m){return k(m,"-moz-box-sizing")=="border-box"; 373 | }function g(m){return j(m,"border-top-width");}function b(m){return j(m,"border-left-width");}function a(m){return(/^(?:body|html)$/i).test(m.tagName); 374 | }function f(m){var n=m.getDocument();return(!n.compatMode||n.compatMode=="CSS1Compat")?n.html:n.body;}})();Element.alias({position:"setPosition"});[Window,Document,Element].invoke("implement",{getHeight:function(){return this.getSize().y; 375 | },getWidth:function(){return this.getSize().x;},getScrollTop:function(){return this.getScroll().y;},getScrollLeft:function(){return this.getScroll().x; 376 | },getScrollHeight:function(){return this.getScrollSize().y;},getScrollWidth:function(){return this.getScrollSize().x;},getTop:function(){return this.getPosition().y; 377 | },getLeft:function(){return this.getPosition().x;}});(function(){var f=this.Fx=new Class({Implements:[Chain,Events,Options],options:{fps:60,unit:false,duration:500,frames:null,frameSkip:true,link:"ignore"},initialize:function(g){this.subject=this.subject||this; 378 | this.setOptions(g);},getTransition:function(){return function(g){return -(Math.cos(Math.PI*g)-1)/2;};},step:function(g){if(this.options.frameSkip){var h=(this.time!=null)?(g-this.time):0,i=h/this.frameInterval; 379 | this.time=g;this.frame+=i;}else{this.frame++;}if(this.frame=(7-4*d)/11){e=c*c-Math.pow((11-6*d-11*f)/4,2);break;}}return e; 423 | },Elastic:function(b,a){return Math.pow(2,10*--b)*Math.cos(20*b*Math.PI*(a&&a[0]||1)/3);}});["Quad","Cubic","Quart","Quint"].each(function(b,a){Fx.Transitions[b]=new Fx.Transition(function(c){return Math.pow(c,a+2); 424 | });});(function(){var d=function(){},a=("onprogress" in new Browser.Request);var c=this.Request=new Class({Implements:[Chain,Events,Options],options:{url:"",data:"",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:true,format:false,method:"post",link:"ignore",isSuccess:null,emulation:true,urlEncoded:true,encoding:"utf-8",evalScripts:false,evalResponse:false,timeout:0,noCache:false},initialize:function(e){this.xhr=new Browser.Request(); 425 | this.setOptions(e);this.headers=this.options.headers;},onStateChange:function(){var e=this.xhr;if(e.readyState!=4||!this.running){return;}this.running=false; 426 | this.status=0;Function.attempt(function(){var f=e.status;this.status=(f==1223)?204:f;}.bind(this));e.onreadystatechange=d;if(a){e.onprogress=e.onloadstart=d; 427 | }clearTimeout(this.timer);this.response={text:this.xhr.responseText||"",xml:this.xhr.responseXML};if(this.options.isSuccess.call(this,this.status)){this.success(this.response.text,this.response.xml); 428 | }else{this.failure();}},isSuccess:function(){var e=this.status;return(e>=200&&e<300);},isRunning:function(){return !!this.running;},processScripts:function(e){if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader("Content-type"))){return Browser.exec(e); 429 | }return e.stripScripts(this.options.evalScripts);},success:function(f,e){this.onSuccess(this.processScripts(f),e);},onSuccess:function(){this.fireEvent("complete",arguments).fireEvent("success",arguments).callChain(); 430 | },failure:function(){this.onFailure();},onFailure:function(){this.fireEvent("complete").fireEvent("failure",this.xhr);},loadstart:function(e){this.fireEvent("loadstart",[e,this.xhr]); 431 | },progress:function(e){this.fireEvent("progress",[e,this.xhr]);},timeout:function(){this.fireEvent("timeout",this.xhr);},setHeader:function(e,f){this.headers[e]=f; 432 | return this;},getHeader:function(e){return Function.attempt(function(){return this.xhr.getResponseHeader(e);}.bind(this));},check:function(){if(!this.running){return true; 433 | }switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(this.caller.pass(arguments,this));return false;}return false;},send:function(o){if(!this.check(o)){return this; 434 | }this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.running=true;var l=typeOf(o);if(l=="string"||l=="element"){o={data:o};}var h=this.options; 435 | o=Object.append({data:h.data,url:h.url,method:h.method},o);var j=o.data,f=String(o.url),e=o.method.toLowerCase();switch(typeOf(j)){case"element":j=document.id(j).toQueryString(); 436 | break;case"object":case"hash":j=Object.toQueryString(j);}if(this.options.format){var m="format="+this.options.format;j=(j)?m+"&"+j:m;}if(this.options.emulation&&!["get","post"].contains(e)){var k="_method="+e; 437 | j=(j)?k+"&"+j:k;e="post";}if(this.options.urlEncoded&&["post","put"].contains(e)){var g=(this.options.encoding)?"; charset="+this.options.encoding:"";this.headers["Content-type"]="application/x-www-form-urlencoded"+g; 438 | }if(!f){f=document.location.pathname;}var i=f.lastIndexOf("/");if(i>-1&&(i=f.indexOf("#"))>-1){f=f.substr(0,i);}if(this.options.noCache){f+=(f.contains("?")?"&":"?")+String.uniqueID(); 439 | }if(j&&e=="get"){f+=(f.contains("?")?"&":"?")+j;j=null;}var n=this.xhr;if(a){n.onloadstart=this.loadstart.bind(this);n.onprogress=this.progress.bind(this); 440 | }n.open(e.toUpperCase(),f,this.options.async,this.options.user,this.options.password);if(this.options.user&&"withCredentials" in n){n.withCredentials=true; 441 | }n.onreadystatechange=this.onStateChange.bind(this);Object.each(this.headers,function(q,p){try{n.setRequestHeader(p,q);}catch(r){this.fireEvent("exception",[p,q]); 442 | }},this);this.fireEvent("request");n.send(j);if(!this.options.async){this.onStateChange();}else{if(this.options.timeout){this.timer=this.timeout.delay(this.options.timeout,this); 443 | }}return this;},cancel:function(){if(!this.running){return this;}this.running=false;var e=this.xhr;e.abort();clearTimeout(this.timer);e.onreadystatechange=d; 444 | if(a){e.onprogress=e.onloadstart=d;}this.xhr=new Browser.Request();this.fireEvent("cancel");return this;}});var b={};["get","post","put","delete","GET","POST","PUT","DELETE"].each(function(e){b[e]=function(g){var f={method:e}; 445 | if(g!=null){f.data=g;}return this.send(f);};});c.implement(b);Element.Properties.send={set:function(e){var f=this.get("send").cancel();f.setOptions(e); 446 | return this;},get:function(){var e=this.retrieve("send");if(!e){e=new c({data:this,link:"cancel",method:this.get("method")||"post",url:this.get("action")}); 447 | this.store("send",e);}return e;}};Element.implement({send:function(e){var f=this.get("send");f.send({data:this,url:e||f.options.url});return this;}});})(); 448 | Request.HTML=new Class({Extends:Request,options:{update:false,append:false,evalScripts:true,filter:false,headers:{Accept:"text/html, application/xml, text/xml, */*"}},success:function(f){var e=this.options,c=this.response; 449 | c.html=f.stripScripts(function(h){c.javascript=h;});var d=c.html.match(/]*>([\s\S]*?)<\/body>/i);if(d){c.html=d[1];}var b=new Element("div").set("html",c.html); 450 | c.tree=b.childNodes;c.elements=b.getElements(e.filter||"*");if(e.filter){c.tree=c.elements;}if(e.update){var g=document.id(e.update).empty();if(e.filter){g.adopt(c.elements); 451 | }else{g.set("html",c.html);}}else{if(e.append){var a=document.id(e.append);if(e.filter){c.elements.reverse().inject(a);}else{a.adopt(b.getChildren());}}}if(e.evalScripts){Browser.exec(c.javascript); 452 | }this.onSuccess(c.tree,c.elements,c.html,c.javascript);}});Element.Properties.load={set:function(a){var b=this.get("load").cancel();b.setOptions(a);return this; 453 | },get:function(){var a=this.retrieve("load");if(!a){a=new Request.HTML({data:this,link:"cancel",update:this,method:"get"});this.store("load",a);}return a; 454 | }};Element.implement({load:function(){this.get("load").send(Array.link(arguments,{data:Type.isObject,url:Type.isString}));return this;}});if(typeof JSON=="undefined"){this.JSON={}; 455 | }(function(){var special={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};var escape=function(chr){return special[chr]||"\\u"+("0000"+chr.charCodeAt(0).toString(16)).slice(-4); 456 | };JSON.validate=function(string){string=string.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""); 457 | return(/^[\],:{}\s]*$/).test(string);};JSON.encode=JSON.stringify?function(obj){return JSON.stringify(obj);}:function(obj){if(obj&&obj.toJSON){obj=obj.toJSON(); 458 | }switch(typeOf(obj)){case"string":return'"'+obj.replace(/[\x00-\x1f\\"]/g,escape)+'"';case"array":return"["+obj.map(JSON.encode).clean()+"]";case"object":case"hash":var string=[]; 459 | Object.each(obj,function(value,key){var json=JSON.encode(value);if(json){string.push(JSON.encode(key)+":"+json);}});return"{"+string+"}";case"number":case"boolean":return""+obj; 460 | case"null":return"null";}return null;};JSON.decode=function(string,secure){if(!string||typeOf(string)!="string"){return null;}if(secure||JSON.secure){if(JSON.parse){return JSON.parse(string); 461 | }if(!JSON.validate(string)){throw new Error("JSON could not decode the input; security is enabled and the value is not secure.");}}return eval("("+string+")"); 462 | };})();Request.JSON=new Class({Extends:Request,options:{secure:true},initialize:function(a){this.parent(a);Object.append(this.headers,{Accept:"application/json","X-Request":"JSON"}); 463 | },success:function(c){var b;try{b=this.response.json=JSON.decode(c,this.options.secure);}catch(a){this.fireEvent("error",[c,a]);return;}if(b==null){this.onFailure(); 464 | }else{this.onSuccess(b,c);}}});var Cookie=new Class({Implements:Options,options:{path:"/",domain:false,duration:false,secure:false,document:document,encode:true},initialize:function(b,a){this.key=b; 465 | this.setOptions(a);},write:function(b){if(this.options.encode){b=encodeURIComponent(b);}if(this.options.domain){b+="; domain="+this.options.domain;}if(this.options.path){b+="; path="+this.options.path; 466 | }if(this.options.duration){var a=new Date();a.setTime(a.getTime()+this.options.duration*24*60*60*1000);b+="; expires="+a.toGMTString();}if(this.options.secure){b+="; secure"; 467 | }this.options.document.cookie=this.key+"="+b;return this;},read:function(){var a=this.options.document.cookie.match("(?:^|;)\\s*"+this.key.escapeRegExp()+"=([^;]*)"); 468 | return(a)?decodeURIComponent(a[1]):null;},dispose:function(){new Cookie(this.key,Object.merge({},this.options,{duration:-1})).write("");return this;}}); 469 | Cookie.write=function(b,c,a){return new Cookie(b,a).write(c);};Cookie.read=function(a){return new Cookie(a).read();};Cookie.dispose=function(b,a){return new Cookie(b,a).dispose(); 470 | };(function(i,k){var l,f,e=[],c,b,d=k.createElement("div");var g=function(){clearTimeout(b);if(l){return;}Browser.loaded=l=true;k.removeListener("DOMContentLoaded",g).removeListener("readystatechange",a); 471 | k.fireEvent("domready");i.fireEvent("domready");};var a=function(){for(var m=e.length;m--;){if(e[m]()){g();return true;}}return false;};var j=function(){clearTimeout(b); 472 | if(!a()){b=setTimeout(j,10);}};k.addListener("DOMContentLoaded",g);var h=function(){try{d.doScroll();return true;}catch(m){}return false;};if(d.doScroll&&!h()){e.push(h); 473 | c=true;}if(k.readyState){e.push(function(){var m=k.readyState;return(m=="loaded"||m=="complete");});}if("onreadystatechange" in k){k.addListener("readystatechange",a); 474 | }else{c=true;}if(c){j();}Element.Events.domready={onAdd:function(m){if(l){m.call(this);}}};Element.Events.load={base:"load",onAdd:function(m){if(f&&this==i){m.call(this); 475 | }},condition:function(){if(this==i){g();delete Element.Events.load;}return true;}};i.addEvent("load",function(){f=true;});})(window,document);(function(){var Swiff=this.Swiff=new Class({Implements:Options,options:{id:null,height:1,width:1,container:null,properties:{},params:{quality:"high",allowScriptAccess:"always",wMode:"window",swLiveConnect:true},callBacks:{},vars:{}},toElement:function(){return this.object; 476 | },initialize:function(path,options){this.instance="Swiff_"+String.uniqueID();this.setOptions(options);options=this.options;var id=this.id=options.id||this.instance; 477 | var container=document.id(options.container);Swiff.CallBacks[this.instance]={};var params=options.params,vars=options.vars,callBacks=options.callBacks; 478 | var properties=Object.append({height:options.height,width:options.width},options.properties);var self=this;for(var callBack in callBacks){Swiff.CallBacks[this.instance][callBack]=(function(option){return function(){return option.apply(self.object,arguments); 479 | };})(callBacks[callBack]);vars[callBack]="Swiff.CallBacks."+this.instance+"."+callBack;}params.flashVars=Object.toQueryString(vars);if(Browser.ie){properties.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"; 480 | params.movie=path;}else{properties.type="application/x-shockwave-flash";}properties.data=path;var build='';}}build+="";this.object=((container)?container.empty():new Element("div")).set("html",build).firstChild; 482 | },replaces:function(element){element=document.id(element,true);element.parentNode.replaceChild(this.toElement(),element);return this;},inject:function(element){document.id(element,true).appendChild(this.toElement()); 483 | return this;},remote:function(){return Swiff.remote.apply(Swiff,[this.toElement()].append(arguments));}});Swiff.CallBacks={};Swiff.remote=function(obj,fn){var rs=obj.CallFunction(''+__flash__argumentsToXML(arguments,2)+""); 484 | return eval(rs);};})(); -------------------------------------------------------------------------------- /assets/www/js/shBrushClojure.js: -------------------------------------------------------------------------------- 1 | // (inc clojure-brush) ;; an improved SyntaxHighlighter brush for clojure 2 | // 3 | // Copyright (C) 2011 Andrew Brehaut 4 | // 5 | // Distributed under the Eclipse Public License, the same as Clojure. 6 | // 7 | // https://github.com/brehaut/inc-clojure-brush 8 | // 9 | // Written by Andrew Brehaut 10 | // V0.9.1, November 2011 11 | 12 | if (typeof net == "undefined") net = {}; 13 | if (!(net.brehaut)) net.brehaut = {}; 14 | 15 | net.brehaut.ClojureTools = (function (SH) { 16 | "use strict"; 17 | // utiliies 18 | if (!Object.create) Object.create = function object(o) { 19 | function F() {}; 20 | F.prototype = o; 21 | return new F(); 22 | }; 23 | 24 | // data 25 | 26 | function Token(value, index, tag, length) { 27 | this.value = value; 28 | this.index = index; 29 | this.length = length || value.length; 30 | this.tag = tag; 31 | this.secondary_tags = {}; 32 | } 33 | 34 | // null_token exists so that LispNodes that have not had a closing tag attached 35 | // can have a dummy token to simplify annotation 36 | var null_token = new Token("", -1, "null", -1); 37 | 38 | /* LispNodes are aggregate nodes for sexpressions. 39 | * 40 | */ 41 | function LispNode(tag, children, opening) { 42 | this.tag = tag; // current metadata for syntax inference 43 | this.parent = null; // the parent expression 44 | this.list = children; // all the child forms in order 45 | this.opening = opening; // the token that opens this form. 46 | this.closing = null_token; // the token that closes this form. 47 | this.meta = null; // metadata nodes will be attached here if they are found 48 | } 49 | 50 | var null_lispnode = new LispNode("null", [], null_token); 51 | 52 | 53 | function PrefixNode(tag, token, attached_node) { 54 | this.tag = tag; 55 | this.token = token; 56 | this.attached_node = attached_node; 57 | this.parent = null; 58 | } 59 | 60 | 61 | 62 | // tokenize 63 | 64 | function tokenize(code) { 65 | var tokens = []; 66 | var tn = 0; 67 | 68 | var zero = "0".charCodeAt(0); 69 | var nine = "9".charCodeAt(0); 70 | var lower_a = "a".charCodeAt(0); 71 | var lower_f = "f".charCodeAt(0); 72 | var upper_a = "A".charCodeAt(0); 73 | var upper_f = "F".charCodeAt(0); 74 | 75 | var dispatch = false; // have we just seen a # character? 76 | 77 | // i tracks the start of the current window 78 | // extent is the window for slicing 79 | 80 | for (var i = 0, 81 | extent = i, 82 | j = code.length; 83 | i < j && extent <= j;) { 84 | 85 | var c = code[i]; 86 | 87 | // we care about capturing the whole token when dispatch is used, so back up the 88 | // starting index by 1 89 | if (dispatch) i--; 90 | 91 | switch (c) { 92 | // dispatch alters the value of the next thing read 93 | case "#": 94 | dispatch = true; 95 | i++; 96 | extent++; 97 | continue; 98 | 99 | case " ": // ignore whitespace 100 | case "\t": 101 | case "\n": 102 | case "\r": 103 | case ",": 104 | extent++ 105 | break; 106 | 107 | // simple terms 108 | case "^": 109 | case "`": 110 | case ")": 111 | case "[": 112 | case "]": 113 | case "}": 114 | case "@": 115 | tokens[tn++] = new Token(c, i, c, ++extent - i); 116 | break; 117 | 118 | case "'": 119 | tokens[tn++] = new Token(code.slice(i, ++extent), i, dispatch ? "#'" : "'", extent - i); 120 | break 121 | 122 | case "(": 123 | tokens[tn++] = new Token(code.slice(i, ++extent), i, dispatch ? "#(" : "(", extent - i); 124 | break; 125 | 126 | case "{": 127 | tokens[tn++] = new Token(code.slice(i, ++extent), i, dispatch ? "#{" : "{", extent - i); 128 | break; 129 | 130 | case "\\": 131 | if (code.slice(i + 1, i + 8) === "newline") { 132 | tokens[tn++] = new Token("\\newline", i, "value", 8); 133 | extent = i + 9; 134 | } 135 | else if (code.slice(i + 1, i + 6) === "space") { 136 | tokens[tn++] = new Token("\\space", i, "value", 6); 137 | extent = i + 6; 138 | } 139 | else if (code.slice(i + 1, i + 4) === "tab") { 140 | tokens[tn++] = new Token("\\tab", i, "value", 4); 141 | extent = i + 5; 142 | } // work around fun bug with &,>,< in character literals 143 | else if (code.slice(i + 1, i + 6) === "&") { 144 | tokens[tn++] = new Token("\\&", i, "value", 6); 145 | extent = i + 6; 146 | } 147 | else if (code.slice(i + 1, i + 5) === "<") { 148 | tokens[tn++] = new Token("\\<", i, "value", 5); 149 | extent = i + 5; 150 | } 151 | else if (code.slice(i + 1, i + 5) === ">") { 152 | tokens[tn++] = new Token("\\>", i, "value", 5); 153 | extent = i + 5; 154 | } 155 | 156 | else { 157 | extent += 2; 158 | tokens[tn++] = new Token(code.slice(i, extent), i, "value", 2); 159 | } 160 | break; 161 | 162 | case "~": // slice 163 | if (code[i + 1] === "@") { 164 | extent += 2; 165 | tokens[tn++] = new Token(code.slice(i, extent), i, "splice", 2); 166 | } 167 | else { 168 | tokens[tn++] = new Token(code.slice(i, ++extent), i, "unquote", 2); 169 | } 170 | break; 171 | 172 | // complicated terms 173 | case "\"": // strings and regexps 174 | for (extent++; extent <= j; extent++) { 175 | if (code[extent] === "\\") extent++; 176 | else if (code[extent] === "\"") break; 177 | } 178 | tokens[tn++] = new Token(code.slice(i, ++extent), i, dispatch ? "regexp" : "string", extent - i); 179 | break; 180 | 181 | case ";": 182 | for (; extent <= j && code[extent] !== "\n" && code[extent] !== "\r"; extent++); 183 | tokens[tn++] = new Token(code.slice(i, ++extent), i, "comments", extent - i); 184 | break; 185 | 186 | case "+": // numbers; fall through to symbol for + and - not prefixing a number 187 | case "-": 188 | case "0": 189 | case "1": 190 | case "2": 191 | case "3": 192 | case "4": 193 | case "5": 194 | case "6": 195 | case "7": 196 | case "8": 197 | case "9": 198 | // todo: exponents, hex 199 | // http://my.safaribooksonline.com/9781449310387/14?reader=pf&readerfullscreen=&readerleftmenu=1 200 | var c2 = code.charCodeAt(i + 1); 201 | if (((c === "+" || c === "-") && (c2 >= zero && c2 <= nine)) // prefixes 202 | || (c !== "+" && c !== "-")) { 203 | if (c === "+" || c === "-") extent++; 204 | for (; extent <= j; extent++) { 205 | var charCode = code.charCodeAt(extent); 206 | if (charCode < zero || charCode > nine) break; 207 | } 208 | 209 | c = code[extent]; 210 | c2 = code.charCodeAt(extent + 1); 211 | if ((c === "r" || c === "R" || c === "/" || c === ".") // interstitial characters 212 | && (c2 >= zero && c2 <= nine)) { 213 | for (extent++; extent <= j; extent++) { 214 | var charCode = code.charCodeAt(extent); 215 | if (charCode < zero || charCode > nine) break; 216 | } 217 | } 218 | 219 | c = code[extent]; 220 | c2 = code.charCodeAt(extent + 1); 221 | if ((c === "x" || c === "X") && 222 | ((c2 >= zero && c2 <= nine) 223 | || (c2 >= lower_a && c2 <= lower_f) 224 | || (c2 >= upper_a && c2 <= upper_f))) { 225 | for (extent++; extent <= j; extent++) { 226 | var charCode = code.charCodeAt(extent); 227 | if (((charCode >= zero && charCode <= nine) 228 | || (charCode >= lower_a && charCode <= lower_f) 229 | || (charCode >= upper_a && charCode <= upper_f))) continue; 230 | break; 231 | } 232 | } 233 | 234 | c = code[extent]; 235 | c2 = code.charCodeAt(extent + 1); 236 | if ((c === "e" || c === "E") 237 | && (c2 >= zero && c2 <= nine)) { 238 | for (extent++; extent <= j; extent++) { 239 | var charCode = code.charCodeAt(extent); 240 | if (charCode < zero || charCode > nine) break; 241 | } 242 | } 243 | 244 | c = code[extent]; 245 | if (c === "N" || c === "M") extent++; 246 | 247 | tokens[tn++] = new Token(code.slice(i, extent), i, "value", extent - i); 248 | break; 249 | } 250 | 251 | case "_": 252 | if (dispatch && c === "_") { 253 | tokens[tn++] = new Token(code.slice(i, ++extent), i, "skip", extent - i); 254 | break; 255 | } // if not a skip, fall through to symbols 256 | 257 | // Allow just about any other symbol as a symbol. This is far more permissive than 258 | // clojure actually allows, but should catch any weirdo crap that accidentally gets 259 | // into the code. 260 | default: 261 | for (extent++; extent <= j; extent++) { 262 | switch (code[extent]) { 263 | case " ": 264 | case "\t": 265 | case "\n": 266 | case "\r": 267 | case "\\": 268 | case ",": 269 | case "{": 270 | case "}": 271 | case "(": 272 | case ")": 273 | case "[": 274 | case "]": 275 | case "^": 276 | case "`": 277 | case "@": 278 | break; 279 | case ";": 280 | // theres a weird bug via syntax highligher that gives us escaped entities. 281 | // need to watch out for these 282 | if (code.slice(extent-3, extent+1) === "<" 283 | ||code.slice(extent-3, extent+1) === ">" 284 | ||code.slice(extent-4, extent+1) === "&") { 285 | continue; 286 | } 287 | break; 288 | default: 289 | continue; 290 | } 291 | break; 292 | } 293 | 294 | var value = code.slice(i, extent); 295 | var tag = "symbol"; 296 | if (value[0] == ":") { 297 | tag = "keyword"; 298 | } 299 | else if (value === "true" || value === "false" || value === "nil") { 300 | tag = "value"; 301 | } 302 | tokens[tn++] = new Token(value, i, tag, extent - i); 303 | } 304 | 305 | dispatch = false; 306 | i = extent; 307 | } 308 | 309 | return tokens; 310 | } 311 | 312 | 313 | function build_tree(tokens) { 314 | var toplevel = { 315 | list: [], 316 | tag: "toplevel", 317 | parent: null, 318 | opening: null, 319 | closing: null, 320 | depth: -1 321 | }; 322 | 323 | // loop variables hoisted out as semi globals to track position in token stream 324 | var i = -1; 325 | var j = tokens.length; 326 | 327 | var short_fn = false; // are we already inside a #( … ) function form? 328 | 329 | function parse_one(t) { 330 | // ignore special tokens and forms that dont belong in the tree 331 | for (; t && (t.tag === "comments" || t.tag === "invalid" || t.tag == "skip") && i < j; ) { 332 | if (t.tag === "skip") { 333 | t.tag = "preprocessor"; 334 | annotate_comment(parse_one(tokens[++i])); 335 | } 336 | t = tokens[++i]; 337 | } 338 | 339 | if (!t) return {}; // hackity hack 340 | 341 | switch (t.tag) { 342 | case "{": 343 | return build_aggregate(new LispNode("map", [], t), "}"); 344 | case "(": 345 | return build_aggregate(new LispNode("list", [], t), ")"); 346 | case "#{": 347 | return build_aggregate(new LispNode("set", [], t), "}"); 348 | case "[": 349 | return build_aggregate(new LispNode("vector", [], t), "]"); 350 | case "#(": // this is a bit hairy, but it annotates nested #( … ) forms as invalid 351 | var prev_short_fn = short_fn; 352 | try { 353 | short_fn = true; 354 | var aggregate = build_aggregate(new LispNode("list", [], t), ")"); 355 | if (prev_short_fn) { 356 | aggregate.opening.tag = "invalid"; 357 | aggregate.closing.tag = "invalid"; 358 | } 359 | return aggregate; 360 | } 361 | finally { 362 | short_fn = prev_short_fn; 363 | } 364 | case "'": 365 | return new PrefixNode("quote", t, parse_one(tokens[++i])); 366 | case "#'": 367 | return new PrefixNode("varquote", t, parse_one(tokens[++i])); 368 | case "@": 369 | return new PrefixNode("deref", t, parse_one(tokens[++i])); 370 | case "`": 371 | return new PrefixNode("syntaxquote", t, parse_one(tokens[++i])); 372 | case "unquote": 373 | return new PrefixNode("unquote", t, parse_one(tokens[++i])); 374 | case "splice": 375 | return new PrefixNode("splice", t, parse_one(tokens[++i])); 376 | case "^": 377 | t.tag = "meta"; 378 | var meta = parse_one(tokens[++i]); 379 | var next = parse_one(tokens[++i]); 380 | next.meta = meta; 381 | return next; 382 | } 383 | 384 | return t; 385 | } 386 | 387 | // build_aggregate collects to ether sub forms for one aggregate for. 388 | function build_aggregate(current, expected_closing) { 389 | for (i++; i < j; i++) { 390 | var t = tokens[i]; 391 | 392 | if (t.tag === "}" || t.tag === ")" || t.tag === "]") { 393 | if (t.tag !== expected_closing) t.tag = "invalid"; 394 | current.closing = t; 395 | if (expected_closing) return current; 396 | } 397 | var node = parse_one(t); 398 | 399 | node.parent = current; 400 | current.list[current.list.length] = node; 401 | } 402 | 403 | return current; 404 | } 405 | 406 | build_aggregate(toplevel, null); 407 | 408 | return toplevel; 409 | } 410 | 411 | // annotation rules to apply to a form based on its head 412 | 413 | var show_locals = true; // HACK. would rather not use a (semi)-global. 414 | 415 | /* annotate_comment is a special case annotation. 416 | * in addition to its role in styling specific forms, it is called by parse_one to 417 | * ignore any forms skipped with #_ 418 | */ 419 | function annotate_comment(exp) { 420 | exp.tag = "comments"; 421 | 422 | if (exp.list) { 423 | exp.opening.tag = "comments"; 424 | exp.closing.tag = "comments"; 425 | 426 | for (var i = 0; i < exp.list.length; i++) { 427 | var child = exp.list[i]; 428 | if (child.list) { 429 | annotate_comment(child); 430 | } 431 | if (child.attached_node) { 432 | annotate_comment(child.attached_node); 433 | } 434 | else { 435 | child.tag = "comments"; 436 | } 437 | } 438 | } 439 | } 440 | 441 | /* custom annotation rules are stored here */ 442 | var annotation_rules = {}; 443 | 444 | // this function is exposed to allow ad hoc extension of the customisation rules 445 | function register_annotation_rule(names, rule) { 446 | for (var i = 0; i < names.length; i++) { 447 | annotation_rules[names[i]] = rule; 448 | } 449 | } 450 | 451 | 452 | function annotate_destructuring (exp, scope) { 453 | if (exp.list) { 454 | if (exp.tag === "vector") { 455 | for (var i = 0; i < exp.list.length; i++) { 456 | annotate_destructuring(exp.list[i], scope); 457 | } 458 | } 459 | else if (exp.tag === "map") { 460 | for (var i = 0; i < exp.list.length; i += 2) { 461 | var key = exp.list[i]; 462 | var val = exp.list[i + 1]; 463 | 464 | if (key.tag === "keyword" && val.tag === "vector") { 465 | for (var ii = 0, jj = val.list.length; ii < jj; ii++) { 466 | if (val.list[ii].tag !== "symbol") continue; 467 | val.list[ii].tag = "variable"; 468 | scope[val.list[ii].value] = true; 469 | } 470 | } 471 | else { 472 | annotate_destructuring(key, scope); 473 | annotate_expressions(val, scope); 474 | } 475 | } 476 | } 477 | } 478 | else if (exp.tag === "symbol" && (exp.value !== "&" && exp.value !== "&")){ 479 | exp.tag = "variable"; 480 | scope[exp.value] = true; 481 | } 482 | } 483 | 484 | function _annotate_binding_vector (exp, scope) { 485 | if (exp.tag !== "vector") return; 486 | 487 | var bindings = exp.list; 488 | 489 | if (bindings.length % 2 === 1) return; 490 | 491 | for (var i = 0; i < bindings.length; i += 2) { 492 | annotate_destructuring(bindings[i], scope); 493 | annotate_expressions(bindings[i + 1], scope); 494 | } 495 | } 496 | 497 | function annotate_binding (exp, scope) { 498 | var bindings = exp.list[1]; 499 | if (!show_locals) return; // HACK 500 | 501 | if (bindings) { 502 | scope = Object.create(scope); 503 | _annotate_binding_vector(bindings, scope); 504 | } 505 | for (var i = 2; i < exp.list.length; i++) { 506 | annotate_expressions(exp.list[i], scope); 507 | } 508 | } 509 | 510 | function _annotate_function_body (exp, scope, start_idx) { 511 | var argvec = exp.list[start_idx]; 512 | if (argvec.tag !== "vector") return; 513 | 514 | scope = Object.create(scope); 515 | 516 | for (var i = 0, j = argvec.list.length; i < j; i++) { 517 | annotate_destructuring(argvec.list[i], scope); 518 | } 519 | 520 | for (var i = start_idx, j = exp.list.length; i < j; i++) { 521 | annotate_expressions(exp.list[i], scope); 522 | } 523 | } 524 | 525 | function annotate_function (exp, scope) { 526 | for (var i = 1, j = exp.list.length; i < j; i++) { 527 | var child = exp.list[i]; 528 | 529 | if (child.tag === "vector") { 530 | _annotate_function_body (exp, scope, i); 531 | return; 532 | } 533 | else if (child.tag === "list") { 534 | _annotate_function_body(child, scope, 0) 535 | } 536 | } 537 | } 538 | 539 | function annotate_letfn (exp, scope) { 540 | scope = Object.create(scope); 541 | var bindings = exp.list[1]; 542 | 543 | var fn; 544 | for (var i = 0, j = bindings.list.length; i < j; i++) { 545 | fn = bindings.list[i]; 546 | if (!fn.list[0]) continue; 547 | fn.list[0].tag = "variable"; 548 | scope[fn.list[0].value] = true; 549 | } 550 | 551 | for (i = 0, j = bindings.list.length; i < j; i++) { 552 | var fn = bindings.list[i]; 553 | annotate_function(fn, scope); 554 | } 555 | 556 | for (i = 2, j = exp.list.length; i < j; i++) { 557 | annotate_expressions(exp.list[i], scope); 558 | } 559 | } 560 | 561 | register_annotation_rule( 562 | ["comment"], 563 | annotate_comment 564 | ); 565 | 566 | register_annotation_rule( 567 | ["let", "when-let", "if-let", "binding", "doseq", "for", "dotimes", "let*"], 568 | annotate_binding 569 | ); 570 | 571 | register_annotation_rule( 572 | ["defn", "defn-", "fn", "bound-fn", "defmacro", "fn*", "defmethod"], 573 | annotate_function 574 | ); 575 | 576 | register_annotation_rule( 577 | ["letfn"], 578 | annotate_letfn 579 | ); 580 | 581 | // standard annotations 582 | 583 | function _annotate_metadata_recursive(meta, scope) { 584 | if (!meta) return; 585 | 586 | if (meta.list !== undefined && meta.list !== null) { 587 | for (var i = 0, j = meta.list.length; i < j; i++) { 588 | meta.opening.secondary_tags.meta = true 589 | meta.closing.secondary_tags.meta = true 590 | _annotate_metadata_recursive(meta.list[i], scope); 591 | } 592 | } 593 | else if (meta.attached_node) { 594 | meta.token.secondary_tags.meta = true; 595 | _annotate_metadata_recursive(meta.attached_node, scope); 596 | } 597 | else { 598 | meta.secondary_tags.meta = true; 599 | } 600 | } 601 | 602 | function annotate_metadata(exp) { 603 | if (!(exp && exp.meta)) return; 604 | var meta = exp.meta; 605 | 606 | annotate_expressions(meta, {}); 607 | _annotate_metadata_recursive(meta, {}); 608 | } 609 | 610 | 611 | function annotate_quoted(exp, scope) { 612 | if (!exp) return; 613 | 614 | if (exp.list !== undefined && exp.list !== null) { 615 | for (var i = 0, j = exp.list.length; i < j; i++) { 616 | exp.opening.secondary_tags.quoted = true 617 | exp.closing.secondary_tags.quoted = true 618 | annotate_quoted(exp.list[i], scope); 619 | } 620 | } 621 | else if (exp.attached_node) { 622 | if (exp.tag === "unquote" || exp.tag === "splice") return; 623 | exp.token.secondary_tags.quoted = true; 624 | annotate_quoted(exp.attached_node, scope); 625 | } 626 | else { 627 | exp.secondary_tags.quoted = true; 628 | } 629 | } 630 | 631 | 632 | function annotate_expressions(exp, scope) { 633 | annotate_metadata(exp); 634 | 635 | switch (exp.tag) { 636 | case "toplevel": 637 | for (var i = 0; i < exp.list.length; i++) { 638 | annotate_expressions(exp.list[i], scope); 639 | } 640 | break; 641 | 642 | case "list": // functions, macros, special forms, comments 643 | var head = exp.list[0]; 644 | 645 | if (head) { 646 | if (head.tag === "list" || head.tag === "vector" 647 | || head.tag === "map" || head.tag === "set") { 648 | annotate_expressions(head, scope); 649 | } 650 | else if (head.attached_node) { 651 | annotate_expressions(head.attached_node, scope); 652 | } 653 | else { 654 | head.tag = (head.value.match(/(^\.)|(\.$)|[A-Z].*\//) 655 | ? "method" 656 | : "function"); 657 | } 658 | 659 | // apply specific rules 660 | if (annotation_rules.hasOwnProperty(head.value)) { 661 | annotation_rules[head.value](exp, scope); 662 | } 663 | else { 664 | for (var i = 1; i < exp.list.length; i++) { 665 | annotate_expressions(exp.list[i], scope); 666 | } 667 | } 668 | } 669 | else { // empty list 670 | exp.opening.tag = "value"; 671 | exp.closing.tag = "value"; 672 | } 673 | 674 | break; 675 | 676 | case "vector": // data 677 | case "map": 678 | case "set": 679 | for (var i = 0; i < exp.list.length; i++) { 680 | annotate_expressions(exp.list[i], scope); 681 | } 682 | break; 683 | 684 | case "symbol": 685 | if (exp.value.match(/[A-Z].*\/[A-Z_]+/)) { 686 | exp.tag = "constant"; 687 | } 688 | else if (show_locals && scope[exp.value]) { 689 | exp.tag = "variable"; 690 | } 691 | else if (exp.tag === "symbol" && exp.value.match(/([A-Z].*\/)?[A-Z_]+/)) { 692 | exp.tag = "type"; 693 | } 694 | break; 695 | 696 | case "quote": 697 | case "syntaxquote": 698 | annotate_quoted(exp.attached_node, scope); 699 | 700 | default: 701 | if (exp.attached_node) annotate_expressions(exp.attached_node, scope); 702 | } 703 | } 704 | 705 | // translation of tag to css: 706 | var css_translation = { 707 | "constant": "constants", 708 | "keyword": "constants", 709 | "method": "color1", 710 | "type": "color3", 711 | "function": "functions", 712 | "string": "string", 713 | "regexp": "string", 714 | "value": "value", 715 | "comments": "comments", 716 | "symbol": "symbol", 717 | "variable": "variable", 718 | "splice": "preprocessor", 719 | "unquote": "preprocessor", 720 | "preprocessor": "preprocessor", 721 | "meta": "preprocessor", 722 | "'": "preprocessor", 723 | "#'": "preprocessor", 724 | "(": "plain", 725 | ")": "plain", 726 | "{": "keyword", 727 | "}": "keyword", 728 | "#{": "keyword", 729 | "[": "keyword", 730 | "]": "keyword", 731 | "invalid": "invalid", 732 | "@": "plain" 733 | }; 734 | 735 | function translate_tags_to_css(tokens) { 736 | for (var i = 0, j = tokens.length; i < j; i++) { 737 | var token = tokens[i]; 738 | token.css = css_translation[token.tag]; 739 | for (var k in token.secondary_tags) if (token.secondary_tags.hasOwnProperty(k)) 740 | token.css += " " + k ; 741 | }; 742 | } 743 | 744 | 745 | // create the new brush 746 | 747 | SH.brushes.Clojure = function () {}; 748 | SH.brushes.Clojure.prototype = new SyntaxHighlighter.Highlighter(); 749 | 750 | SH.brushes.Clojure.prototype.findMatches = function find_matches (regexpList, code) { 751 | // this is a nasty global hack. need to resolve this 752 | if (this.params && this.params.locals) { 753 | show_locals = this.params.locals === true || this.params.locals === "true"; 754 | } 755 | else { 756 | show_locals = true; 757 | } 758 | 759 | var tokens = tokenize(code); 760 | annotate_expressions(build_tree(tokens), {}); 761 | translate_tags_to_css(tokens); 762 | 763 | return tokens; 764 | }; 765 | 766 | SH.brushes.Clojure.aliases = ['clojure', 'Clojure', 'clj']; 767 | SH.brushes.Clojure.register_annotation_rule = register_annotation_rule; 768 | 769 | return { 770 | tokenize: tokenize, 771 | build_tree: build_tree 772 | }; 773 | })(SyntaxHighlighter); 774 | -------------------------------------------------------------------------------- /assets/www/js/shCore.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SyntaxHighlighter 3 | * http://alexgorbatchev.com/SyntaxHighlighter 4 | * 5 | * SyntaxHighlighter is donationware. If you are using it, please donate. 6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html 7 | * 8 | * @version 9 | * 3.0.83 (July 02 2010) 10 | * 11 | * @copyright 12 | * Copyright (C) 2004-2010 Alex Gorbatchev. 13 | * 14 | * @license 15 | * Dual licensed under the MIT and GPL licenses. 16 | */ 17 | eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('K M;I(M)1S 2U("2a\'t 4k M 4K 2g 3l 4G 4H");(6(){6 r(f,e){I(!M.1R(f))1S 3m("3s 15 4R");K a=f.1w;f=M(f.1m,t(f)+(e||""));I(a)f.1w={1m:a.1m,19:a.19?a.19.1a(0):N};H f}6 t(f){H(f.1J?"g":"")+(f.4s?"i":"")+(f.4p?"m":"")+(f.4v?"x":"")+(f.3n?"y":"")}6 B(f,e,a,b){K c=u.L,d,h,g;v=R;5K{O(;c--;){g=u[c];I(a&g.3r&&(!g.2p||g.2p.W(b))){g.2q.12=e;I((h=g.2q.X(f))&&h.P===e){d={3k:g.2b.W(b,h,a),1C:h};1N}}}}5v(i){1S i}5q{v=11}H d}6 p(f,e,a){I(3b.Z.1i)H f.1i(e,a);O(a=a||0;a-1},3d:6(g){e+=g}};c1&&p(e,"")>-1){a=15(J.1m,n.Q.W(t(J),"g",""));n.Q.W(f.1a(e.P),a,6(){O(K c=1;c<14.L-2;c++)I(14[c]===1d)e[c]=1d})}I(J.1w&&J.1w.19)O(K b=1;be.P&&J.12--}H e};I(!D)15.Z.1A=6(f){(f=n.X.W(J,f))&&J.1J&&!f[0].L&&J.12>f.P&&J.12--;H!!f};1r.Z.1C=6(f){M.1R(f)||(f=15(f));I(f.1J){K e=n.1C.1p(J,14);f.12=0;H e}H f.X(J)};1r.Z.Q=6(f,e){K a=M.1R(f),b,c;I(a&&1j e.58()==="3f"&&e.1i("${")===-1&&y)H n.Q.1p(J,14);I(a){I(f.1w)b=f.1w.19}Y f+="";I(1j e==="6")c=n.Q.W(J,f,6(){I(b){14[0]=1f 1r(14[0]);O(K d=0;dd.L-3;){i=1r.Z.1a.W(g,-1)+i;g=1Q.3i(g/10)}H(g?d[g]||"":"$")+i}Y{g=+i;I(g<=d.L-3)H d[g];g=b?p(b,i):-1;H g>-1?d[g+1]:h}})})}I(a&&f.1J)f.12=0;H c};1r.Z.1e=6(f,e){I(!M.1R(f))H n.1e.1p(J,14);K a=J+"",b=[],c=0,d,h;I(e===1d||+e<0)e=5D;Y{e=1Q.3i(+e);I(!e)H[]}O(f=M.3c(f);d=f.X(a);){I(f.12>c){b.U(a.1a(c,d.P));d.L>1&&d.P=e)1N}f.12===d.P&&f.12++}I(c===a.L){I(!n.1A.W(f,"")||h)b.U("")}Y b.U(a.1a(c));H b.L>e?b.1a(0,e):b};M.1h(/\\(\\?#[^)]*\\)/,6(f){H n.1A.W(A,f.2S.1a(f.P+f[0].L))?"":"(?:)"});M.1h(/\\((?!\\?)/,6(){J.19.U(N);H"("});M.1h(/\\(\\?<([$\\w]+)>/,6(f){J.19.U(f[1]);J.2N=R;H"("});M.1h(/\\\\k<([\\w$]+)>/,6(f){K e=p(J.19,f[1]);H e>-1?"\\\\"+(e+1)+(3R(f.2S.3a(f.P+f[0].L))?"":"(?:)"):f[0]});M.1h(/\\[\\^?]/,6(f){H f[0]==="[]"?"\\\\b\\\\B":"[\\\\s\\\\S]"});M.1h(/^\\(\\?([5A]+)\\)/,6(f){J.3d(f[1]);H""});M.1h(/(?:\\s+|#.*)+/,6(f){H n.1A.W(A,f.2S.1a(f.P+f[0].L))?"":"(?:)"},M.1B,6(){H J.2K("x")});M.1h(/\\./,6(){H"[\\\\s\\\\S]"},M.1B,6(){H J.2K("s")})})();1j 2e!="1d"&&(2e.M=M);K 1v=6(){6 r(a,b){a.1l.1i(b)!=-1||(a.1l+=" "+b)}6 t(a){H a.1i("3e")==0?a:"3e"+a}6 B(a){H e.1Y.2A[t(a)]}6 p(a,b,c){I(a==N)H N;K d=c!=R?a.3G:[a.2G],h={"#":"1c",".":"1l"}[b.1o(0,1)]||"3h",g,i;g=h!="3h"?b.1o(1):b.5u();I((a[h]||"").1i(g)!=-1)H a;O(a=0;d&&a\'+c+""});H a}6 n(a,b){a.1e("\\n");O(K c="",d=0;d<50;d++)c+=" ";H a=v(a,6(h){I(h.1i("\\t")==-1)H h;O(K g=0;(g=h.1i("\\t"))!=-1;)h=h.1o(0,g)+c.1o(0,b-g%b)+h.1o(g+1,h.L);H h})}6 x(a){H a.Q(/^\\s+|\\s+$/g,"")}6 D(a,b){I(a.Pb.P)H 1;Y I(a.Lb.L)H 1;H 0}6 y(a,b){6 c(k){H k[0]}O(K d=N,h=[],g=b.2D?b.2D:c;(d=b.1I.X(a))!=N;){K i=g(d,b);I(1j i=="3f")i=[1f e.2L(i,d.P,b.23)];h=h.1O(i)}H h}6 E(a){K b=/(.*)((&1G;|&1y;).*)/;H a.Q(e.3A.3M,6(c){K d="",h=N;I(h=b.X(c)){c=h[1];d=h[2]}H\'\'+c+""+d})}6 z(){O(K a=1E.36("1k"),b=[],c=0;c<1z 4I="1Z://2y.3L.3K/4L/5L"><3J><4N 1Z-4M="5G-5M" 6K="2O/1z; 6J=6I-8" /><1t>6L 1v<3B 1L="25-6M:6Q,6P,6O,6N-6F;6y-2f:#6x;2f:#6w;25-22:6v;2O-3D:3C;">1v3v 3.0.76 (72 73 3x)1Z://3u.2w/1v70 17 6U 71.6T 6X-3x 6Y 6D.6t 61 60 J 1k, 5Z 5R 5V <2R/>5U 5T 5S!\'}},1Y:{2j:N,2A:{}},1U:{},3A:{6n:/\\/\\*[\\s\\S]*?\\*\\//2c,6m:/\\/\\/.*$/2c,6l:/#.*$/2c,6k:/"([^\\\\"\\n]|\\\\.)*"/g,6o:/\'([^\\\\\'\\n]|\\\\.)*\'/g,6p:1f M(\'"([^\\\\\\\\"]|\\\\\\\\.)*"\',"3z"),6s:1f M("\'([^\\\\\\\\\']|\\\\\\\\.)*\'","3z"),6q:/(&1y;|<)!--[\\s\\S]*?--(&1G;|>)/2c,3M:/\\w+:\\/\\/[\\w-.\\/?%&=:@;]*/g,6a:{18:/(&1y;|<)\\?=?/g,1b:/\\?(&1G;|>)/g},69:{18:/(&1y;|<)%=?/g,1b:/%(&1G;|>)/g},6d:{18:/(&1y;|<)\\s*1k.*?(&1G;|>)/2T,1b:/(&1y;|<)\\/\\s*1k\\s*(&1G;|>)/2T}},16:{1H:6(a){6 b(i,k){H e.16.2o(i,k,e.13.1x[k])}O(K c=\'\',d=e.16.2x,h=d.2X,g=0;g";H c},2o:6(a,b,c){H\'<2W>\'+c+""},2b:6(a){K b=a.1F,c=b.1l||"";b=B(p(b,".20",R).1c);K d=6(h){H(h=15(h+"6f(\\\\w+)").X(c))?h[1]:N}("6g");b&&d&&e.16.2x[d].2B(b);a.3N()},2x:{2X:["21","2P"],21:{1H:6(a){I(a.V("2l")!=R)H"";K b=a.V("1t");H e.16.2o(a,"21",b?b:e.13.1x.21)},2B:6(a){a=1E.6j(t(a.1c));a.1l=a.1l.Q("47","")}},2P:{2B:6(){K a="68=0";a+=", 18="+(31.30-33)/2+", 32="+(31.2Z-2Y)/2+", 30=33, 2Z=2Y";a=a.Q(/^,/,"");a=1P.6Z("","38",a);a.2C();K b=a.1E;b.6W(e.13.1x.37);b.6V();a.2C()}}}},35:6(a,b){K c;I(b)c=[b];Y{c=1E.36(e.13.34);O(K d=[],h=0;h(.*?))\\\\]$"),s=1f M("(?<27>[\\\\w-]+)\\\\s*:\\\\s*(?<1T>[\\\\w-%#]+|\\\\[.*?\\\\]|\\".*?\\"|\'.*?\')\\\\s*;?","g");(j=s.X(k))!=N;){K o=j.1T.Q(/^[\'"]|[\'"]$/g,"");I(o!=N&&m.1A(o)){o=m.X(o);o=o.2V.L>0?o.2V.1e(/\\s*,\\s*/):[]}l[j.27]=o}g={1F:g,1n:C(i,l)};g.1n.1D!=N&&d.U(g)}H d},1M:6(a,b){K c=J.35(a,b),d=N,h=e.13;I(c.L!==0)O(K g=0;g")==o-3){m=m.4h(0,o-3);s=R}l=s?m:l}I((i.1t||"")!="")k.1t=i.1t;k.1D=j;d.2Q(k);b=d.2F(l);I((i.1c||"")!="")b.1c=i.1c;i.2G.74(b,i)}}},2E:6(a){w(1P,"4k",6(){e.1M(a)})}};e.2E=e.2E;e.1M=e.1M;e.2L=6(a,b,c){J.1T=a;J.P=b;J.L=a.L;J.23=c;J.1V=N};e.2L.Z.1q=6(){H J.1T};e.4l=6(a){6 b(j,l){O(K m=0;md)1N;Y I(g.P==c.P&&g.L>c.L)a[b]=N;Y I(g.P>=c.P&&g.P\'+c+""},3Q:6(a,b){K c="",d=a.1e("\\n").L,h=2u(J.V("2i-1s")),g=J.V("2z-1s-2t");I(g==R)g=(h+d-1).1q().L;Y I(3R(g)==R)g=0;O(K i=0;i\'+j+"":"")+i)}H a},4f:6(a){H a?"<4a>"+a+"":""},4b:6(a,b){6 c(l){H(l=l?l.1V||g:g)?l+" ":""}O(K d=0,h="",g=J.V("1D",""),i=0;i|&1y;2R\\s*\\/?&1G;/2T;I(e.13.46==R)b=b.Q(h,"\\n");I(e.13.44==R)b=b.Q(h,"");b=b.1e("\\n");h=/^\\s*/;g=4Q;O(K i=0;i0;i++){K k=b[i];I(x(k).L!=0){k=h.X(k);I(k==N){a=a;1N a}g=1Q.4q(k[0].L,g)}}I(g>0)O(i=0;i\'+(J.V("16")?e.16.1H(J):"")+\'<3Z 5z="0" 5H="0" 5J="0">\'+J.4f(J.V("1t"))+"<3T><3P>"+(1u?\'<2d 1g="1u">\'+J.3Q(a)+"":"")+\'<2d 1g="17">\'+b+""},2F:6(a){I(a===N)a="";J.17=a;K b=J.3Y("T");b.3X=J.1H(a);J.V("16")&&w(p(b,".16"),"5c",e.16.2b);J.V("3V-17")&&w(p(b,".17"),"56",f);H b},2Q:6(a){J.1c=""+1Q.5d(1Q.5n()*5k).1q();e.1Y.2A[t(J.1c)]=J;J.1n=C(e.2v,a||{});I(J.V("2k")==R)J.1n.16=J.1n.1u=11},5j:6(a){a=a.Q(/^\\s+|\\s+$/g,"").Q(/\\s+/g,"|");H"\\\\b(?:"+a+")\\\\b"},5f:6(a){J.28={18:{1I:a.18,23:"1k"},1b:{1I:a.1b,23:"1k"},17:1f M("(?<18>"+a.18.1m+")(?<17>.*?)(?<1b>"+a.1b.1m+")","5o")}}};H e}();1j 2e!="1d"&&(2e.1v=1v);',62,441,'||||||function|||||||||||||||||||||||||||||||||||||return|if|this|var|length|XRegExp|null|for|index|replace|true||div|push|getParam|call|exec|else|prototype||false|lastIndex|config|arguments|RegExp|toolbar|code|left|captureNames|slice|right|id|undefined|split|new|class|addToken|indexOf|typeof|script|className|source|params|substr|apply|toString|String|line|title|gutter|SyntaxHighlighter|_xregexp|strings|lt|html|test|OUTSIDE_CLASS|match|brush|document|target|gt|getHtml|regex|global|join|style|highlight|break|concat|window|Math|isRegExp|throw|value|brushes|brushName|space|alert|vars|http|syntaxhighlighter|expandSource|size|css|case|font|Fa|name|htmlScript|dA|can|handler|gm|td|exports|color|in|href|first|discoveredBrushes|light|collapse|object|cache|getButtonHtml|trigger|pattern|getLineHtml|nbsp|numbers|parseInt|defaults|com|items|www|pad|highlighters|execute|focus|func|all|getDiv|parentNode|navigator|INSIDE_CLASS|regexList|hasFlag|Match|useScriptTags|hasNamedCapture|text|help|init|br|input|gi|Error|values|span|list|250|height|width|screen|top|500|tagName|findElements|getElementsByTagName|aboutDialog|_blank|appendChild|charAt|Array|copyAsGlobal|setFlag|highlighter_|string|attachEvent|nodeName|floor|backref|output|the|TypeError|sticky|Za|iterate|freezeTokens|scope|type|textarea|alexgorbatchev|version|margin|2010|005896|gs|regexLib|body|center|align|noBrush|require|childNodes|DTD|xhtml1|head|org|w3|url|preventDefault|container|tr|getLineNumbersHtml|isNaN|userAgent|tbody|isLineHighlighted|quick|void|innerHTML|create|table|links|auto|smart|tab|stripBrs|tabs|bloggerMode|collapsed|plain|getCodeLinesHtml|caption|getMatchesHtml|findMatches|figureOutLineNumbers|removeNestedMatches|getTitleHtml|brushNotHtmlScript|substring|createElement|Highlighter|load|HtmlScript|Brush|pre|expand|multiline|min|Can|ignoreCase|find|blur|extended|toLowerCase|aliases|addEventListener|innerText|textContent|wasn|select|createTextNode|removeChild|option|same|frame|xmlns|dtd|twice|1999|equiv|meta|htmlscript|transitional|1E3|expected|PUBLIC|DOCTYPE|on|W3C|XHTML|TR|EN|Transitional||configured|srcElement|Object|after|run|dblclick|matchChain|valueOf|constructor|default|switch|click|round|execAt|forHtmlScript|token|gimy|functions|getKeywords|1E6|escape|within|random|sgi|another|finally|supply|MSIE|ie|toUpperCase|catch|returnValue|definition|event|border|imsx|constructing|one|Infinity|from|when|Content|cellpadding|flags|cellspacing|try|xhtml|Type|spaces|2930402|hosted_button_id|lastIndexOf|donate|active|development|keep|to|xclick|_s|Xml|please|like|you|paypal|cgi|cmd|webscr|bin|highlighted|scrollbars|aspScriptTags|phpScriptTags|sort|max|scriptScriptTags|toolbar_item|_|command|command_|number|getElementById|doubleQuotedString|singleLinePerlComments|singleLineCComments|multiLineCComments|singleQuotedString|multiLineDoubleQuotedString|xmlComments|alt|multiLineSingleQuotedString|If|https|1em|000|fff|background|5em|xx|bottom|75em|Gorbatchev|large|serif|CDATA|continue|utf|charset|content|About|family|sans|Helvetica|Arial|Geneva|3em|nogutter|Copyright|syntax|close|write|2004|Alex|open|JavaScript|highlighter|July|02|replaceChild|offset|83'.split('|'),0,{})) 18 | -------------------------------------------------------------------------------- /epl-v10.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Eclipse Public License - Version 1.0 8 | 25 | 26 | 27 | 28 | 29 | 30 |

Eclipse Public License - v 1.0

31 | 32 |

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE 33 | PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR 34 | DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS 35 | AGREEMENT.

36 | 37 |

1. DEFINITIONS

38 | 39 |

"Contribution" means:

40 | 41 |

a) in the case of the initial Contributor, the initial 42 | code and documentation distributed under this Agreement, and

43 |

b) in the case of each subsequent Contributor:

44 |

i) changes to the Program, and

45 |

ii) additions to the Program;

46 |

where such changes and/or additions to the Program 47 | originate from and are distributed by that particular Contributor. A 48 | Contribution 'originates' from a Contributor if it was added to the 49 | Program by such Contributor itself or anyone acting on such 50 | Contributor's behalf. Contributions do not include additions to the 51 | Program which: (i) are separate modules of software distributed in 52 | conjunction with the Program under their own license agreement, and (ii) 53 | are not derivative works of the Program.

54 | 55 |

"Contributor" means any person or entity that distributes 56 | the Program.

57 | 58 |

"Licensed Patents" mean patent claims licensable by a 59 | Contributor which are necessarily infringed by the use or sale of its 60 | Contribution alone or when combined with the Program.

61 | 62 |

"Program" means the Contributions distributed in accordance 63 | with this Agreement.

64 | 65 |

"Recipient" means anyone who receives the Program under 66 | this Agreement, including all Contributors.

67 | 68 |

2. GRANT OF RIGHTS

69 | 70 |

a) Subject to the terms of this Agreement, each 71 | Contributor hereby grants Recipient a non-exclusive, worldwide, 72 | royalty-free copyright license to reproduce, prepare derivative works 73 | of, publicly display, publicly perform, distribute and sublicense the 74 | Contribution of such Contributor, if any, and such derivative works, in 75 | source code and object code form.

76 | 77 |

b) Subject to the terms of this Agreement, each 78 | Contributor hereby grants Recipient a non-exclusive, worldwide, 79 | royalty-free patent license under Licensed Patents to make, use, sell, 80 | offer to sell, import and otherwise transfer the Contribution of such 81 | Contributor, if any, in source code and object code form. This patent 82 | license shall apply to the combination of the Contribution and the 83 | Program if, at the time the Contribution is added by the Contributor, 84 | such addition of the Contribution causes such combination to be covered 85 | by the Licensed Patents. The patent license shall not apply to any other 86 | combinations which include the Contribution. No hardware per se is 87 | licensed hereunder.

88 | 89 |

c) Recipient understands that although each Contributor 90 | grants the licenses to its Contributions set forth herein, no assurances 91 | are provided by any Contributor that the Program does not infringe the 92 | patent or other intellectual property rights of any other entity. Each 93 | Contributor disclaims any liability to Recipient for claims brought by 94 | any other entity based on infringement of intellectual property rights 95 | or otherwise. As a condition to exercising the rights and licenses 96 | granted hereunder, each Recipient hereby assumes sole responsibility to 97 | secure any other intellectual property rights needed, if any. For 98 | example, if a third party patent license is required to allow Recipient 99 | to distribute the Program, it is Recipient's responsibility to acquire 100 | that license before distributing the Program.

101 | 102 |

d) Each Contributor represents that to its knowledge it 103 | has sufficient copyright rights in its Contribution, if any, to grant 104 | the copyright license set forth in this Agreement.

105 | 106 |

3. REQUIREMENTS

107 | 108 |

A Contributor may choose to distribute the Program in object code 109 | form under its own license agreement, provided that:

110 | 111 |

a) it complies with the terms and conditions of this 112 | Agreement; and

113 | 114 |

b) its license agreement:

115 | 116 |

i) effectively disclaims on behalf of all Contributors 117 | all warranties and conditions, express and implied, including warranties 118 | or conditions of title and non-infringement, and implied warranties or 119 | conditions of merchantability and fitness for a particular purpose;

120 | 121 |

ii) effectively excludes on behalf of all Contributors 122 | all liability for damages, including direct, indirect, special, 123 | incidental and consequential damages, such as lost profits;

124 | 125 |

iii) states that any provisions which differ from this 126 | Agreement are offered by that Contributor alone and not by any other 127 | party; and

128 | 129 |

iv) states that source code for the Program is available 130 | from such Contributor, and informs licensees how to obtain it in a 131 | reasonable manner on or through a medium customarily used for software 132 | exchange.

133 | 134 |

When the Program is made available in source code form:

135 | 136 |

a) it must be made available under this Agreement; and

137 | 138 |

b) a copy of this Agreement must be included with each 139 | copy of the Program.

140 | 141 |

Contributors may not remove or alter any copyright notices contained 142 | within the Program.

143 | 144 |

Each Contributor must identify itself as the originator of its 145 | Contribution, if any, in a manner that reasonably allows subsequent 146 | Recipients to identify the originator of the Contribution.

147 | 148 |

4. COMMERCIAL DISTRIBUTION

149 | 150 |

Commercial distributors of software may accept certain 151 | responsibilities with respect to end users, business partners and the 152 | like. While this license is intended to facilitate the commercial use of 153 | the Program, the Contributor who includes the Program in a commercial 154 | product offering should do so in a manner which does not create 155 | potential liability for other Contributors. Therefore, if a Contributor 156 | includes the Program in a commercial product offering, such Contributor 157 | ("Commercial Contributor") hereby agrees to defend and 158 | indemnify every other Contributor ("Indemnified Contributor") 159 | against any losses, damages and costs (collectively "Losses") 160 | arising from claims, lawsuits and other legal actions brought by a third 161 | party against the Indemnified Contributor to the extent caused by the 162 | acts or omissions of such Commercial Contributor in connection with its 163 | distribution of the Program in a commercial product offering. The 164 | obligations in this section do not apply to any claims or Losses 165 | relating to any actual or alleged intellectual property infringement. In 166 | order to qualify, an Indemnified Contributor must: a) promptly notify 167 | the Commercial Contributor in writing of such claim, and b) allow the 168 | Commercial Contributor to control, and cooperate with the Commercial 169 | Contributor in, the defense and any related settlement negotiations. The 170 | Indemnified Contributor may participate in any such claim at its own 171 | expense.

172 | 173 |

For example, a Contributor might include the Program in a commercial 174 | product offering, Product X. That Contributor is then a Commercial 175 | Contributor. If that Commercial Contributor then makes performance 176 | claims, or offers warranties related to Product X, those performance 177 | claims and warranties are such Commercial Contributor's responsibility 178 | alone. Under this section, the Commercial Contributor would have to 179 | defend claims against the other Contributors related to those 180 | performance claims and warranties, and if a court requires any other 181 | Contributor to pay any damages as a result, the Commercial Contributor 182 | must pay those damages.

183 | 184 |

5. NO WARRANTY

185 | 186 |

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS 187 | PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 188 | OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, 189 | ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY 190 | OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely 191 | responsible for determining the appropriateness of using and 192 | distributing the Program and assumes all risks associated with its 193 | exercise of rights under this Agreement , including but not limited to 194 | the risks and costs of program errors, compliance with applicable laws, 195 | damage to or loss of data, programs or equipment, and unavailability or 196 | interruption of operations.

197 | 198 |

6. DISCLAIMER OF LIABILITY

199 | 200 |

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT 201 | NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, 202 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING 203 | WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF 204 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 205 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR 206 | DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED 207 | HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

208 | 209 |

7. GENERAL

210 | 211 |

If any provision of this Agreement is invalid or unenforceable under 212 | applicable law, it shall not affect the validity or enforceability of 213 | the remainder of the terms of this Agreement, and without further action 214 | by the parties hereto, such provision shall be reformed to the minimum 215 | extent necessary to make such provision valid and enforceable.

216 | 217 |

If Recipient institutes patent litigation against any entity 218 | (including a cross-claim or counterclaim in a lawsuit) alleging that the 219 | Program itself (excluding combinations of the Program with other 220 | software or hardware) infringes such Recipient's patent(s), then such 221 | Recipient's rights granted under Section 2(b) shall terminate as of the 222 | date such litigation is filed.

223 | 224 |

All Recipient's rights under this Agreement shall terminate if it 225 | fails to comply with any of the material terms or conditions of this 226 | Agreement and does not cure such failure in a reasonable period of time 227 | after becoming aware of such noncompliance. If all Recipient's rights 228 | under this Agreement terminate, Recipient agrees to cease use and 229 | distribution of the Program as soon as reasonably practicable. However, 230 | Recipient's obligations under this Agreement and any licenses granted by 231 | Recipient relating to the Program shall continue and survive.

232 | 233 |

Everyone is permitted to copy and distribute copies of this 234 | Agreement, but in order to avoid inconsistency the Agreement is 235 | copyrighted and may only be modified in the following manner. The 236 | Agreement Steward reserves the right to publish new versions (including 237 | revisions) of this Agreement from time to time. No one other than the 238 | Agreement Steward has the right to modify this Agreement. The Eclipse 239 | Foundation is the initial Agreement Steward. The Eclipse Foundation may 240 | assign the responsibility to serve as the Agreement Steward to a 241 | suitable separate entity. Each new version of the Agreement will be 242 | given a distinguishing version number. The Program (including 243 | Contributions) may always be distributed subject to the version of the 244 | Agreement under which it was received. In addition, after a new version 245 | of the Agreement is published, Contributor may elect to distribute the 246 | Program (including its Contributions) under the new version. Except as 247 | expressly stated in Sections 2(a) and 2(b) above, Recipient receives no 248 | rights or licenses to the intellectual property of any Contributor under 249 | this Agreement, whether expressly, by implication, estoppel or 250 | otherwise. All rights in the Program not expressly granted under this 251 | Agreement are reserved.

252 | 253 |

This Agreement is governed by the laws of the State of New York and 254 | the intellectual property laws of the United States of America. No party 255 | to this Agreement will bring a legal action under this Agreement more 256 | than one year after the cause of action arose. Each party waives its 257 | rights to a jury trial in any resulting litigation.

258 | 259 | 260 | 261 | -------------------------------------------------------------------------------- /libs/phonegap-1.3.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunng87/clojuredocs-android/86e44b8b8887143e0775d4e65fe9c114a381c1ed/libs/phonegap-1.3.0.jar -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by IntelliJ IDEA 2 | # Project target. 3 | target=android-15 4 | -------------------------------------------------------------------------------- /res/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunng87/clojuredocs-android/86e44b8b8887143e0775d4e65fe9c114a381c1ed/res/drawable/icon.png -------------------------------------------------------------------------------- /res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Clojure Docs 3 | -------------------------------------------------------------------------------- /res/xml/phonegap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/xml/plugins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/info/sunng/clojuredocs/App.java: -------------------------------------------------------------------------------- 1 | package info.sunng.clojuredocs; 2 | 3 | import android.os.Bundle; 4 | import com.phonegap.DroidGap; 5 | 6 | 7 | /** 8 | * User: Sun Ning 9 | * Date: 1/23/12 10 | * Time: 12:07 PM 11 | */ 12 | public class App extends DroidGap { 13 | 14 | @Override 15 | public void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | super.loadUrl("file:///android_asset/www/index.html"); 18 | } 19 | } 20 | --------------------------------------------------------------------------------