webruby 0.2.7 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1537) hide show
  1. checksums.yaml +4 -4
  2. data/lib/webruby/environment.rb +24 -8
  3. data/lib/webruby/rake/files.rake +6 -22
  4. data/lib/webruby/rake/general.rake +1 -1
  5. data/lib/webruby/rake/mruby.rake +1 -0
  6. data/lib/webruby/utility.rb +14 -0
  7. data/modules/mruby/AUTHORS +14 -0
  8. data/modules/mruby/CONTRIBUTING.md +7 -4
  9. data/modules/mruby/INSTALL +28 -11
  10. data/modules/mruby/MITL +13 -13
  11. data/modules/mruby/Makefile +4 -5
  12. data/modules/mruby/README.md +54 -49
  13. data/modules/mruby/Rakefile +36 -6
  14. data/modules/mruby/benchmark/ao-render.rb +1 -2
  15. data/modules/mruby/benchmark/bm_app_lc_fizzbuzz.rb +52 -0
  16. data/modules/mruby/benchmark/fib39.rb +0 -0
  17. data/modules/mruby/bintest/mrbc.rb +12 -0
  18. data/modules/mruby/build_config.rb +32 -2
  19. data/modules/mruby/doc/api/README.md +30 -0
  20. data/modules/mruby/doc/api/mruby.h.md +69 -0
  21. data/modules/mruby/doc/compile/README.md +208 -99
  22. data/modules/mruby/doc/debugger/README.md +370 -0
  23. data/modules/mruby/doc/language/Core.md +1590 -0
  24. data/modules/mruby/doc/language/README.md +9 -0
  25. data/modules/mruby/doc/language/generator.rb +15 -0
  26. data/modules/mruby/doc/language/mrbdoc/lib/mrbdoc_analyze.rb +231 -0
  27. data/modules/mruby/doc/language/mrbdoc/lib/mrbdoc_docu.rb +118 -0
  28. data/modules/mruby/doc/language/mrbdoc/mrbdoc.rb +38 -0
  29. data/modules/mruby/doc/mrbconf/README.md +160 -0
  30. data/modules/mruby/doc/mrbgems/README.md +136 -66
  31. data/modules/mruby/examples/mrbgems/c_and_ruby_extension_example/mrbgem.rake +1 -1
  32. data/modules/mruby/examples/mrbgems/c_and_ruby_extension_example/src/example.c +1 -1
  33. data/modules/mruby/examples/mrbgems/c_extension_example/mrbgem.rake +1 -1
  34. data/modules/mruby/examples/mrbgems/c_extension_example/src/example.c +1 -1
  35. data/modules/mruby/examples/mrbgems/ruby_extension_example/mrbgem.rake +1 -1
  36. data/modules/mruby/examples/targets/{ArduinoDue.rb → build_config_ArduinoDue.rb} +32 -6
  37. data/modules/mruby/examples/targets/build_config_IntelGalileo.rb +106 -0
  38. data/modules/mruby/examples/targets/{chipKitMax32.rb → build_config_chipKITMax32.rb} +26 -7
  39. data/modules/mruby/include/mrbconf.h +25 -1
  40. data/modules/mruby/include/mruby/array.h +32 -22
  41. data/modules/mruby/include/mruby/boxing_nan.h +94 -0
  42. data/modules/mruby/include/mruby/boxing_no.h +49 -0
  43. data/modules/mruby/include/mruby/boxing_word.h +119 -0
  44. data/modules/mruby/include/mruby/class.h +15 -13
  45. data/modules/mruby/include/mruby/compile.h +43 -36
  46. data/modules/mruby/include/mruby/data.h +13 -5
  47. data/modules/mruby/include/mruby/debug.h +9 -9
  48. data/modules/mruby/include/mruby/dump.h +32 -23
  49. data/modules/mruby/include/mruby/error.h +36 -0
  50. data/modules/mruby/include/mruby/gc.h +11 -6
  51. data/modules/mruby/include/mruby/hash.h +12 -12
  52. data/modules/mruby/include/mruby/irep.h +9 -3
  53. data/modules/mruby/include/mruby/khash.h +58 -41
  54. data/modules/mruby/include/mruby/numeric.h +38 -4
  55. data/modules/mruby/include/mruby/object.h +55 -0
  56. data/modules/mruby/include/mruby/opcode.h +160 -0
  57. data/modules/mruby/include/mruby/proc.h +19 -5
  58. data/modules/mruby/include/mruby/range.h +4 -3
  59. data/modules/mruby/include/mruby/re.h +20 -0
  60. data/modules/mruby/include/mruby/string.h +86 -47
  61. data/modules/mruby/include/mruby/value.h +100 -374
  62. data/modules/mruby/include/mruby/variable.h +34 -32
  63. data/modules/mruby/include/mruby/version.h +40 -0
  64. data/modules/mruby/include/mruby.h +211 -139
  65. data/modules/mruby/minirake +16 -9
  66. data/modules/mruby/mrbgems/default.gembox +12 -0
  67. data/modules/mruby/mrbgems/full-core.gembox +3 -3
  68. data/modules/mruby/mrbgems/mruby-array-ext/mrbgem.rake +1 -0
  69. data/modules/mruby/mrbgems/mruby-array-ext/mrblib/array.rb +488 -8
  70. data/modules/mruby/mrbgems/mruby-array-ext/src/array.c +57 -31
  71. data/modules/mruby/mrbgems/mruby-array-ext/test/array.rb +231 -45
  72. data/modules/mruby/mrbgems/mruby-bin-debugger/bintest/mrdb.rb +286 -0
  73. data/modules/mruby/mrbgems/mruby-bin-debugger/bintest/print.rb +701 -0
  74. data/modules/mruby/mrbgems/mruby-bin-debugger/mrbgem.rake +9 -0
  75. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c +516 -0
  76. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.h +26 -0
  77. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c +235 -0
  78. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.h +14 -0
  79. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c +78 -0
  80. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.h +13 -0
  81. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c +428 -0
  82. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdmisc.c +501 -0
  83. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdprint.c +58 -0
  84. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c +54 -0
  85. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c +746 -0
  86. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h +163 -0
  87. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h +16 -0
  88. data/modules/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdberror.h +20 -0
  89. data/modules/mruby/mrbgems/mruby-bin-mirb/bintest/mirb.rb +12 -0
  90. data/modules/mruby/mrbgems/mruby-bin-mirb/mrbgem.rake +14 -1
  91. data/modules/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +154 -72
  92. data/modules/mruby/mrbgems/mruby-bin-mruby/bintest/mruby.rb +46 -0
  93. data/modules/mruby/mrbgems/mruby-bin-mruby/mrbgem.rake +1 -0
  94. data/modules/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +37 -28
  95. data/modules/mruby/mrbgems/mruby-bin-mruby-config/mrbgem.rake +30 -0
  96. data/modules/mruby/mrbgems/mruby-bin-mruby-config/mruby-config +16 -0
  97. data/modules/mruby/mrbgems/mruby-bin-mruby-config/mruby-config.bat +30 -0
  98. data/modules/mruby/mrbgems/mruby-bin-strip/bintest/mruby-strip.rb +73 -0
  99. data/modules/mruby/mrbgems/mruby-bin-strip/mrbgem.rake +6 -0
  100. data/modules/mruby/mrbgems/mruby-bin-strip/tools/mruby-strip/mruby-strip.c +155 -0
  101. data/modules/mruby/mrbgems/mruby-enum-ext/mrbgem.rake +1 -0
  102. data/modules/mruby/mrbgems/mruby-enum-ext/mrblib/enum.rb +555 -21
  103. data/modules/mruby/mrbgems/mruby-enum-ext/test/enum.rb +119 -0
  104. data/modules/mruby/mrbgems/mruby-enum-lazy/mrbgem.rake +7 -0
  105. data/modules/mruby/mrbgems/mruby-enum-lazy/mrblib/lazy.rb +150 -0
  106. data/modules/mruby/mrbgems/mruby-enum-lazy/test/lazy.rb +47 -0
  107. data/modules/mruby/mrbgems/mruby-enumerator/mrbgem.rake +7 -0
  108. data/modules/mruby/mrbgems/mruby-enumerator/mrblib/enumerator.rb +636 -0
  109. data/modules/mruby/mrbgems/mruby-enumerator/test/enumerator.rb +537 -0
  110. data/modules/mruby/mrbgems/mruby-eval/mrbgem.rake +1 -0
  111. data/modules/mruby/mrbgems/mruby-eval/src/eval.c +243 -4
  112. data/modules/mruby/mrbgems/mruby-eval/test/eval.rb +80 -0
  113. data/modules/mruby/mrbgems/mruby-exit/mrbgem.rake +1 -0
  114. data/modules/mruby/mrbgems/mruby-exit/src/mruby-exit.c +1 -1
  115. data/modules/mruby/mrbgems/mruby-fiber/mrbgem.rake +1 -0
  116. data/modules/mruby/mrbgems/mruby-fiber/src/fiber.c +157 -51
  117. data/modules/mruby/mrbgems/mruby-fiber/test/fiber.rb +179 -35
  118. data/modules/mruby/mrbgems/mruby-hash-ext/mrbgem.rake +3 -0
  119. data/modules/mruby/mrbgems/mruby-hash-ext/mrblib/hash.rb +241 -1
  120. data/modules/mruby/mrbgems/mruby-hash-ext/src/hash-ext.c +11 -19
  121. data/modules/mruby/mrbgems/mruby-hash-ext/test/hash.rb +138 -1
  122. data/modules/mruby/mrbgems/mruby-kernel-ext/mrbgem.rake +5 -0
  123. data/modules/mruby/mrbgems/mruby-kernel-ext/src/kernel.c +183 -0
  124. data/modules/mruby/mrbgems/mruby-kernel-ext/test/kernel.rb +53 -0
  125. data/modules/mruby/mrbgems/mruby-math/mrbgem.rake +1 -0
  126. data/modules/mruby/mrbgems/mruby-math/src/math.c +107 -14
  127. data/modules/mruby/mrbgems/mruby-math/test/math.rb +16 -0
  128. data/modules/mruby/mrbgems/mruby-numeric-ext/mrbgem.rake +1 -0
  129. data/modules/mruby/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb +5 -0
  130. data/modules/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb +9 -1
  131. data/modules/mruby/mrbgems/mruby-object-ext/mrbgem.rake +1 -0
  132. data/modules/mruby/mrbgems/mruby-object-ext/mrblib/object.rb +19 -0
  133. data/modules/mruby/mrbgems/mruby-object-ext/src/object.c +5 -8
  134. data/modules/mruby/mrbgems/mruby-object-ext/test/object.rb +16 -0
  135. data/modules/mruby/mrbgems/mruby-objectspace/mrbgem.rake +1 -0
  136. data/modules/mruby/mrbgems/mruby-objectspace/src/mruby_objectspace.c +121 -53
  137. data/modules/mruby/mrbgems/mruby-objectspace/test/objectspace.rb +27 -4
  138. data/modules/mruby/mrbgems/mruby-print/mrbgem.rake +1 -0
  139. data/modules/mruby/mrbgems/mruby-print/src/print.c +3 -5
  140. data/modules/mruby/mrbgems/mruby-proc-ext/mrbgem.rake +1 -0
  141. data/modules/mruby/mrbgems/mruby-proc-ext/src/proc.c +89 -19
  142. data/modules/mruby/mrbgems/mruby-proc-ext/test/proc.c +56 -0
  143. data/modules/mruby/mrbgems/mruby-proc-ext/test/proc.rb +47 -0
  144. data/modules/mruby/mrbgems/mruby-random/mrbgem.rake +1 -0
  145. data/modules/mruby/mrbgems/mruby-random/src/mt19937ar.c +30 -25
  146. data/modules/mruby/mrbgems/mruby-random/src/mt19937ar.h +6 -3
  147. data/modules/mruby/mrbgems/mruby-random/src/random.c +157 -137
  148. data/modules/mruby/mrbgems/mruby-random/src/random.h +3 -3
  149. data/modules/mruby/mrbgems/mruby-random/test/random.rb +9 -9
  150. data/modules/mruby/mrbgems/mruby-range-ext/mrbgem.rake +1 -0
  151. data/modules/mruby/mrbgems/mruby-range-ext/src/range.c +57 -3
  152. data/modules/mruby/mrbgems/mruby-range-ext/test/range.rb +9 -0
  153. data/modules/mruby/mrbgems/mruby-sprintf/mrbgem.rake +1 -0
  154. data/modules/mruby/mrbgems/mruby-sprintf/mrblib/string.rb +9 -0
  155. data/modules/mruby/mrbgems/mruby-sprintf/src/sprintf.c +29 -23
  156. data/modules/mruby/mrbgems/mruby-sprintf/test/sprintf.rb +7 -2
  157. data/modules/mruby/mrbgems/mruby-string-ext/mrbgem.rake +1 -0
  158. data/modules/mruby/mrbgems/mruby-string-ext/mrblib/string.rb +250 -11
  159. data/modules/mruby/mrbgems/mruby-string-ext/src/string.c +220 -5
  160. data/modules/mruby/mrbgems/mruby-string-ext/test/string.rb +326 -4
  161. data/modules/mruby/mrbgems/mruby-string-utf8/mrbgem.rake +2 -0
  162. data/modules/mruby/mrbgems/mruby-string-utf8/src/string.c +486 -52
  163. data/modules/mruby/mrbgems/mruby-string-utf8/test/string.rb +97 -14
  164. data/modules/mruby/mrbgems/mruby-struct/mrbgem.rake +1 -0
  165. data/modules/mruby/mrbgems/mruby-struct/mrblib/struct.rb +31 -0
  166. data/modules/mruby/mrbgems/mruby-struct/src/struct.c +178 -196
  167. data/modules/mruby/mrbgems/mruby-struct/test/struct.rb +115 -61
  168. data/modules/mruby/mrbgems/mruby-symbol-ext/mrbgem.rake +1 -0
  169. data/modules/mruby/mrbgems/mruby-symbol-ext/mrblib/symbol.rb +22 -17
  170. data/modules/mruby/mrbgems/mruby-symbol-ext/src/symbol.c +20 -11
  171. data/modules/mruby/mrbgems/mruby-symbol-ext/test/symbol.rb +14 -0
  172. data/modules/mruby/mrbgems/mruby-time/mrbgem.rake +1 -0
  173. data/modules/mruby/mrbgems/mruby-time/mrblib/time.rb +9 -0
  174. data/modules/mruby/mrbgems/mruby-time/src/time.c +98 -37
  175. data/modules/mruby/mrbgems/mruby-time/test/time.rb +152 -148
  176. data/modules/mruby/mrbgems/mruby-toplevel-ext/mrbgem.rake +1 -0
  177. data/modules/mruby/mrbgems/mruby-toplevel-ext/test/toplevel.rb +1 -1
  178. data/modules/mruby/mrblib/array.rb +110 -4
  179. data/modules/mruby/mrblib/class.rb +1 -22
  180. data/modules/mruby/mrblib/compar.rb +10 -30
  181. data/modules/mruby/mrblib/enum.rb +64 -52
  182. data/modules/mruby/mrblib/error.rb +9 -4
  183. data/modules/mruby/mrblib/hash.rb +164 -23
  184. data/modules/mruby/mrblib/kernel.rb +26 -22
  185. data/modules/mruby/mrblib/mrblib.rake +4 -4
  186. data/modules/mruby/mrblib/numeric.rb +22 -9
  187. data/modules/mruby/mrblib/range.rb +24 -2
  188. data/modules/mruby/mrblib/string.rb +15 -3
  189. data/modules/mruby/src/array.c +279 -339
  190. data/modules/mruby/src/backtrace.c +68 -16
  191. data/modules/mruby/src/class.c +539 -379
  192. data/modules/mruby/src/codegen.c +424 -207
  193. data/modules/mruby/src/compar.c +1 -1
  194. data/modules/mruby/src/crc.c +7 -6
  195. data/modules/mruby/src/debug.c +37 -36
  196. data/modules/mruby/src/dump.c +463 -213
  197. data/modules/mruby/src/enum.c +1 -1
  198. data/modules/mruby/src/error.c +91 -92
  199. data/modules/mruby/src/error.h +3 -19
  200. data/modules/mruby/src/etc.c +85 -82
  201. data/modules/mruby/src/gc.c +134 -108
  202. data/modules/mruby/src/hash.c +161 -565
  203. data/modules/mruby/src/init.c +2 -13
  204. data/modules/mruby/src/kernel.c +217 -251
  205. data/modules/mruby/src/load.c +280 -283
  206. data/modules/mruby/src/mrb_throw.h +41 -0
  207. data/modules/mruby/src/mruby_core.rake +57 -7
  208. data/modules/mruby/src/node.h +104 -104
  209. data/modules/mruby/src/numeric.c +221 -208
  210. data/modules/mruby/src/object.c +41 -42
  211. data/modules/mruby/src/opcode.h +2 -160
  212. data/modules/mruby/src/parse.y +3430 -3223
  213. data/modules/mruby/src/pool.c +13 -9
  214. data/modules/mruby/src/print.c +20 -17
  215. data/modules/mruby/src/proc.c +77 -21
  216. data/modules/mruby/src/range.c +55 -45
  217. data/modules/mruby/src/state.c +95 -31
  218. data/modules/mruby/src/string.c +462 -468
  219. data/modules/mruby/src/symbol.c +95 -85
  220. data/modules/mruby/src/variable.c +104 -74
  221. data/modules/mruby/src/version.c +13 -0
  222. data/modules/mruby/src/vm.c +528 -296
  223. data/modules/mruby/tasks/libmruby.rake +9 -5
  224. data/modules/mruby/tasks/mrbgem_spec.rake +130 -26
  225. data/modules/mruby/tasks/mrbgems.rake +21 -11
  226. data/modules/mruby/tasks/mrbgems_test.rake +46 -40
  227. data/modules/mruby/tasks/mruby_build.rake +54 -12
  228. data/modules/mruby/tasks/mruby_build_commands.rake +34 -5
  229. data/modules/mruby/tasks/mruby_build_gem.rake +25 -3
  230. data/modules/mruby/tasks/ruby_ext.rake +11 -2
  231. data/modules/mruby/tasks/toolchains/clang.rake +2 -1
  232. data/modules/mruby/tasks/toolchains/gcc.rake +26 -3
  233. data/modules/mruby/tasks/toolchains/visualcpp.rake +17 -8
  234. data/modules/mruby/test/assert.rb +30 -8
  235. data/modules/mruby/test/bintest.rb +10 -0
  236. data/modules/mruby/test/driver.c +74 -24
  237. data/modules/mruby/test/init_mrbtest.c +21 -2
  238. data/modules/mruby/test/mrbtest.rake +27 -5
  239. data/modules/mruby/test/t/argumenterror.rb +0 -5
  240. data/modules/mruby/test/t/array.rb +23 -7
  241. data/modules/mruby/test/t/bs_block.rb +32 -0
  242. data/modules/mruby/test/t/class.rb +29 -5
  243. data/modules/mruby/test/t/comparable.rb +20 -12
  244. data/modules/mruby/test/t/enumerable.rb +33 -7
  245. data/modules/mruby/test/t/exception.rb +63 -38
  246. data/modules/mruby/test/t/false.rb +2 -4
  247. data/modules/mruby/test/t/float.rb +39 -4
  248. data/modules/mruby/test/t/hash.rb +40 -6
  249. data/modules/mruby/test/t/indexerror.rb +0 -4
  250. data/modules/mruby/test/t/integer.rb +41 -5
  251. data/modules/mruby/test/t/kernel.rb +90 -3
  252. data/modules/mruby/test/t/localjumperror.rb +4 -4
  253. data/modules/mruby/test/t/methods.rb +1 -1
  254. data/modules/mruby/test/t/module.rb +43 -13
  255. data/modules/mruby/test/t/nameerror.rb +0 -4
  256. data/modules/mruby/test/t/nil.rb +5 -0
  257. data/modules/mruby/test/t/nomethoderror.rb +11 -2
  258. data/modules/mruby/test/t/numeric.rb +18 -4
  259. data/modules/mruby/test/t/proc.rb +59 -6
  260. data/modules/mruby/test/t/range.rb +15 -5
  261. data/modules/mruby/test/t/rangeerror.rb +0 -4
  262. data/modules/mruby/test/t/standarderror.rb +0 -4
  263. data/modules/mruby/test/t/string.rb +56 -12
  264. data/modules/mruby/test/t/superclass.rb +46 -0
  265. data/modules/mruby/test/t/symbol.rb +0 -4
  266. data/modules/mruby/test/t/syntax.rb +134 -1
  267. data/modules/mruby/test/t/true.rb +2 -4
  268. data/modules/mruby/test/t/typeerror.rb +0 -5
  269. data/modules/mruby/test/t/unicode.rb +35 -0
  270. data/modules/mruby/tools/mrbc/mrbc.c +9 -12
  271. data/modules/mruby/travis_config.rb +22 -2
  272. metadata +98 -1299
  273. data/modules/emscripten/AUTHORS +0 -117
  274. data/modules/emscripten/CONTRIBUTING.markdown +0 -5
  275. data/modules/emscripten/ChangeLog +0 -468
  276. data/modules/emscripten/LICENSE +0 -94
  277. data/modules/emscripten/README.markdown +0 -14
  278. data/modules/emscripten/cmake/Modules/FindOpenAL.cmake +0 -26
  279. data/modules/emscripten/cmake/Platform/Emscripten.cmake +0 -228
  280. data/modules/emscripten/em++ +0 -12
  281. data/modules/emscripten/em++.bat +0 -2
  282. data/modules/emscripten/em-config +0 -24
  283. data/modules/emscripten/em-config.bat +0 -2
  284. data/modules/emscripten/emar +0 -24
  285. data/modules/emscripten/emar.bat +0 -2
  286. data/modules/emscripten/emcc +0 -2069
  287. data/modules/emscripten/emcc.bat +0 -2
  288. data/modules/emscripten/emcc.py +0 -5
  289. data/modules/emscripten/emconfigure +0 -27
  290. data/modules/emscripten/emconfigure.bat +0 -2
  291. data/modules/emscripten/emlink.py +0 -33
  292. data/modules/emscripten/emmake +0 -29
  293. data/modules/emscripten/emmake.bat +0 -2
  294. data/modules/emscripten/emranlib +0 -9
  295. data/modules/emscripten/emranlib.bat +0 -2
  296. data/modules/emscripten/emrun +0 -1087
  297. data/modules/emscripten/emrun.bat +0 -2
  298. data/modules/emscripten/emscons +0 -20
  299. data/modules/emscripten/emscripten.py +0 -1347
  300. data/modules/emscripten/package.json +0 -7
  301. data/modules/emscripten/patches/README +0 -4
  302. data/modules/emscripten/patches/series +0 -2
  303. data/modules/emscripten/scons-tools/closure.py +0 -28
  304. data/modules/emscripten/scons-tools/emscripten.py +0 -364
  305. data/modules/emscripten/scons-tools/llvm.py +0 -34
  306. data/modules/emscripten/src/analyzer.js +0 -1781
  307. data/modules/emscripten/src/closure-externs.js +0 -110
  308. data/modules/emscripten/src/compiler.html +0 -48
  309. data/modules/emscripten/src/compiler.js +0 -331
  310. data/modules/emscripten/src/compiler_phase.html +0 -33
  311. data/modules/emscripten/src/corruptionCheck.js +0 -98
  312. data/modules/emscripten/src/determinstic.js +0 -20
  313. data/modules/emscripten/src/embind/embind.js +0 -1677
  314. data/modules/emscripten/src/embind/emval.js +0 -284
  315. data/modules/emscripten/src/emrun_postjs.js +0 -20
  316. data/modules/emscripten/src/emrun_prejs.js +0 -5
  317. data/modules/emscripten/src/emscripten-source-map.min.js +0 -31
  318. data/modules/emscripten/src/experimental/allow_loopvars_from_memsetcpy_inasm.diff +0 -97
  319. data/modules/emscripten/src/experimental/batching.diff +0 -44
  320. data/modules/emscripten/src/experimental/functypeopt.diff +0 -113
  321. data/modules/emscripten/src/experimental/multiple_heaps.diff +0 -175
  322. data/modules/emscripten/src/experimental/noncallgraphprofiling.diff +0 -197
  323. data/modules/emscripten/src/experimental/optimize_memcpy_for_ta1.diff +0 -124
  324. data/modules/emscripten/src/experimental/remove__label__s.diff +0 -140
  325. data/modules/emscripten/src/experimental/renderer_cache_hash.diff +0 -99
  326. data/modules/emscripten/src/experimental/sdl_key_forwarding.diff +0 -57
  327. data/modules/emscripten/src/experimental/simplifyGeneratedFunctionsDetection.diff +0 -336
  328. data/modules/emscripten/src/experimental/stringCache.diff +0 -147
  329. data/modules/emscripten/src/fastLong.js +0 -299
  330. data/modules/emscripten/src/gl-matrix.js +0 -1952
  331. data/modules/emscripten/src/headless.js +0 -295
  332. data/modules/emscripten/src/headlessCanvas.js +0 -618
  333. data/modules/emscripten/src/hello_world.js +0 -92
  334. data/modules/emscripten/src/intertyper.js +0 -1228
  335. data/modules/emscripten/src/jsifier.js +0 -1969
  336. data/modules/emscripten/src/library.js +0 -9196
  337. data/modules/emscripten/src/library_browser.js +0 -988
  338. data/modules/emscripten/src/library_egl.js +0 -564
  339. data/modules/emscripten/src/library_fs.js +0 -1619
  340. data/modules/emscripten/src/library_gc.js +0 -236
  341. data/modules/emscripten/src/library_gl.js +0 -5194
  342. data/modules/emscripten/src/library_glfw.js +0 -585
  343. data/modules/emscripten/src/library_glut.js +0 -504
  344. data/modules/emscripten/src/library_idbfs.js +0 -216
  345. data/modules/emscripten/src/library_jansson.js +0 -320
  346. data/modules/emscripten/src/library_memfs.js +0 -303
  347. data/modules/emscripten/src/library_nodefs.js +0 -286
  348. data/modules/emscripten/src/library_openal.js +0 -915
  349. data/modules/emscripten/src/library_path.js +0 -133
  350. data/modules/emscripten/src/library_sdl.js +0 -2728
  351. data/modules/emscripten/src/library_sockfs.js +0 -578
  352. data/modules/emscripten/src/library_strtok_r.c +0 -97
  353. data/modules/emscripten/src/library_tty.js +0 -146
  354. data/modules/emscripten/src/library_uuid.js +0 -140
  355. data/modules/emscripten/src/library_xlib.js +0 -23
  356. data/modules/emscripten/src/long.js +0 -1609
  357. data/modules/emscripten/src/modules.js +0 -543
  358. data/modules/emscripten/src/parseTools.js +0 -2723
  359. data/modules/emscripten/src/postamble.js +0 -239
  360. data/modules/emscripten/src/postamble_sharedlib.js +0 -16
  361. data/modules/emscripten/src/preamble.js +0 -1233
  362. data/modules/emscripten/src/preamble_sharedlib.js +0 -25
  363. data/modules/emscripten/src/proxyClient.js +0 -82
  364. data/modules/emscripten/src/proxyWorker.js +0 -143
  365. data/modules/emscripten/src/relooper/README.markdown +0 -14
  366. data/modules/emscripten/src/relooper/Relooper.cpp +0 -1301
  367. data/modules/emscripten/src/relooper/Relooper.h +0 -257
  368. data/modules/emscripten/src/relooper/doit.sh +0 -70
  369. data/modules/emscripten/src/relooper/emscripten/glue.js +0 -67
  370. data/modules/emscripten/src/relooper/emscripten/test.js +0 -44
  371. data/modules/emscripten/src/relooper/fuzzer.py +0 -131
  372. data/modules/emscripten/src/relooper/ministring.h +0 -35
  373. data/modules/emscripten/src/relooper/paper.pdf +0 -0
  374. data/modules/emscripten/src/relooper/test.cpp +0 -290
  375. data/modules/emscripten/src/relooper/test.txt +0 -317
  376. data/modules/emscripten/src/relooper/test2.c +0 -44
  377. data/modules/emscripten/src/relooper/test2.txt +0 -26
  378. data/modules/emscripten/src/relooper/test3.c +0 -42
  379. data/modules/emscripten/src/relooper/test3.txt +0 -56
  380. data/modules/emscripten/src/relooper/test4.cpp +0 -40
  381. data/modules/emscripten/src/relooper/test4.txt +0 -44
  382. data/modules/emscripten/src/relooper/test5.cpp +0 -40
  383. data/modules/emscripten/src/relooper/test5.txt +0 -56
  384. data/modules/emscripten/src/relooper/test6.cpp +0 -31
  385. data/modules/emscripten/src/relooper/test6.txt +0 -26
  386. data/modules/emscripten/src/relooper/test_dead.cpp +0 -28
  387. data/modules/emscripten/src/relooper/test_dead.txt +0 -9
  388. data/modules/emscripten/src/relooper/test_debug.cpp +0 -30
  389. data/modules/emscripten/src/relooper/test_debug.txt +0 -142
  390. data/modules/emscripten/src/relooper/test_fuzz1.cpp +0 -52
  391. data/modules/emscripten/src/relooper/test_fuzz1.txt +0 -72
  392. data/modules/emscripten/src/relooper/test_fuzz2.cpp +0 -34
  393. data/modules/emscripten/src/relooper/test_fuzz2.txt +0 -30
  394. data/modules/emscripten/src/relooper/test_fuzz3.cpp +0 -36
  395. data/modules/emscripten/src/relooper/test_fuzz3.txt +0 -25
  396. data/modules/emscripten/src/relooper/test_fuzz4.cpp +0 -38
  397. data/modules/emscripten/src/relooper/test_fuzz4.txt +0 -41
  398. data/modules/emscripten/src/relooper/test_fuzz5.cpp +0 -57
  399. data/modules/emscripten/src/relooper/test_fuzz5.txt +0 -86
  400. data/modules/emscripten/src/relooper/test_fuzz6.cpp +0 -322
  401. data/modules/emscripten/src/relooper/test_fuzz6.txt +0 -291
  402. data/modules/emscripten/src/relooper/test_inf.cpp +0 -813
  403. data/modules/emscripten/src/relooper/test_inf.txt +0 -1131
  404. data/modules/emscripten/src/relooper/testit.sh +0 -62
  405. data/modules/emscripten/src/relooper/updateit.sh +0 -17
  406. data/modules/emscripten/src/runtime.js +0 -604
  407. data/modules/emscripten/src/settings.js +0 -476
  408. data/modules/emscripten/src/shell.html +0 -95
  409. data/modules/emscripten/src/shell.js +0 -173
  410. data/modules/emscripten/src/shell_sharedlib.js +0 -29
  411. data/modules/emscripten/src/simd.js +0 -1128
  412. data/modules/emscripten/src/socket.io.js +0 -3870
  413. data/modules/emscripten/src/struct_info.json +0 -1077
  414. data/modules/emscripten/src/utility.js +0 -411
  415. data/modules/emscripten/src/wrtcp.js +0 -821
  416. data/modules/emscripten/system/bin/sdl-config +0 -13
  417. data/modules/emscripten/system/include/AL/al.h +0 -172
  418. data/modules/emscripten/system/include/AL/alc.h +0 -84
  419. data/modules/emscripten/system/include/EGL/egl.h +0 -329
  420. data/modules/emscripten/system/include/EGL/eglext.h +0 -398
  421. data/modules/emscripten/system/include/EGL/eglplatform.h +0 -141
  422. data/modules/emscripten/system/include/GL/freeglut_std.h +0 -628
  423. data/modules/emscripten/system/include/GL/gl.h +0 -2241
  424. data/modules/emscripten/system/include/GL/glew.h +0 -6
  425. data/modules/emscripten/system/include/GL/glext.h +0 -11127
  426. data/modules/emscripten/system/include/GL/glfw.h +0 -518
  427. data/modules/emscripten/system/include/GL/glu.h +0 -353
  428. data/modules/emscripten/system/include/GL/glut.h +0 -21
  429. data/modules/emscripten/system/include/GLES/gl.h +0 -770
  430. data/modules/emscripten/system/include/GLES/glext.h +0 -1278
  431. data/modules/emscripten/system/include/GLES/glplatform.h +0 -30
  432. data/modules/emscripten/system/include/GLES2/gl2.h +0 -621
  433. data/modules/emscripten/system/include/GLES2/gl2ext.h +0 -803
  434. data/modules/emscripten/system/include/GLES2/gl2platform.h +0 -30
  435. data/modules/emscripten/system/include/KHR/khrplatform.h +0 -277
  436. data/modules/emscripten/system/include/SDL/COPYING +0 -19
  437. data/modules/emscripten/system/include/SDL/SDL.h +0 -162
  438. data/modules/emscripten/system/include/SDL/SDL_assert.h +0 -241
  439. data/modules/emscripten/system/include/SDL/SDL_atomic.h +0 -318
  440. data/modules/emscripten/system/include/SDL/SDL_audio.h +0 -509
  441. data/modules/emscripten/system/include/SDL/SDL_blendmode.h +0 -60
  442. data/modules/emscripten/system/include/SDL/SDL_clipboard.h +0 -75
  443. data/modules/emscripten/system/include/SDL/SDL_compat.h +0 -365
  444. data/modules/emscripten/system/include/SDL/SDL_config.h +0 -48
  445. data/modules/emscripten/system/include/SDL/SDL_config.h.in +0 -297
  446. data/modules/emscripten/system/include/SDL/SDL_config_android.h +0 -133
  447. data/modules/emscripten/system/include/SDL/SDL_config_iphoneos.h +0 -148
  448. data/modules/emscripten/system/include/SDL/SDL_config_macosx.h +0 -172
  449. data/modules/emscripten/system/include/SDL/SDL_config_minimal.h +0 -74
  450. data/modules/emscripten/system/include/SDL/SDL_config_nintendods.h +0 -129
  451. data/modules/emscripten/system/include/SDL/SDL_config_pandora.h +0 -125
  452. data/modules/emscripten/system/include/SDL/SDL_config_windows.h +0 -207
  453. data/modules/emscripten/system/include/SDL/SDL_config_wiz.h +0 -119
  454. data/modules/emscripten/system/include/SDL/SDL_copying.h +0 -20
  455. data/modules/emscripten/system/include/SDL/SDL_cpuinfo.h +0 -150
  456. data/modules/emscripten/system/include/SDL/SDL_endian.h +0 -248
  457. data/modules/emscripten/system/include/SDL/SDL_error.h +0 -77
  458. data/modules/emscripten/system/include/SDL/SDL_events.h +0 -640
  459. data/modules/emscripten/system/include/SDL/SDL_gesture.h +0 -91
  460. data/modules/emscripten/system/include/SDL/SDL_gfxPrimitives.h +0 -246
  461. data/modules/emscripten/system/include/SDL/SDL_haptic.h +0 -1200
  462. data/modules/emscripten/system/include/SDL/SDL_hints.h +0 -206
  463. data/modules/emscripten/system/include/SDL/SDL_image.h +0 -138
  464. data/modules/emscripten/system/include/SDL/SDL_input.h +0 -87
  465. data/modules/emscripten/system/include/SDL/SDL_joystick.h +0 -208
  466. data/modules/emscripten/system/include/SDL/SDL_keyboard.h +0 -169
  467. data/modules/emscripten/system/include/SDL/SDL_keycode.h +0 -344
  468. data/modules/emscripten/system/include/SDL/SDL_loadso.h +0 -85
  469. data/modules/emscripten/system/include/SDL/SDL_log.h +0 -211
  470. data/modules/emscripten/system/include/SDL/SDL_main.h +0 -98
  471. data/modules/emscripten/system/include/SDL/SDL_mixer.h +0 -634
  472. data/modules/emscripten/system/include/SDL/SDL_mouse.h +0 -213
  473. data/modules/emscripten/system/include/SDL/SDL_mutex.h +0 -248
  474. data/modules/emscripten/system/include/SDL/SDL_name.h +0 -11
  475. data/modules/emscripten/system/include/SDL/SDL_opengl.h +0 -11116
  476. data/modules/emscripten/system/include/SDL/SDL_opengles.h +0 -38
  477. data/modules/emscripten/system/include/SDL/SDL_opengles2.h +0 -38
  478. data/modules/emscripten/system/include/SDL/SDL_pixels.h +0 -423
  479. data/modules/emscripten/system/include/SDL/SDL_platform.h +0 -160
  480. data/modules/emscripten/system/include/SDL/SDL_power.h +0 -79
  481. data/modules/emscripten/system/include/SDL/SDL_quit.h +0 -58
  482. data/modules/emscripten/system/include/SDL/SDL_rect.h +0 -136
  483. data/modules/emscripten/system/include/SDL/SDL_render.h +0 -615
  484. data/modules/emscripten/system/include/SDL/SDL_revision.h +0 -2
  485. data/modules/emscripten/system/include/SDL/SDL_revision.h.orig +0 -2
  486. data/modules/emscripten/system/include/SDL/SDL_rotozoom.h +0 -123
  487. data/modules/emscripten/system/include/SDL/SDL_rwops.h +0 -220
  488. data/modules/emscripten/system/include/SDL/SDL_scancode.h +0 -398
  489. data/modules/emscripten/system/include/SDL/SDL_shape.h +0 -147
  490. data/modules/emscripten/system/include/SDL/SDL_stdinc.h +0 -764
  491. data/modules/emscripten/system/include/SDL/SDL_surface.h +0 -499
  492. data/modules/emscripten/system/include/SDL/SDL_syswm.h +0 -241
  493. data/modules/emscripten/system/include/SDL/SDL_thread.h +0 -182
  494. data/modules/emscripten/system/include/SDL/SDL_timer.h +0 -108
  495. data/modules/emscripten/system/include/SDL/SDL_touch.h +0 -124
  496. data/modules/emscripten/system/include/SDL/SDL_ttf.h +0 -249
  497. data/modules/emscripten/system/include/SDL/SDL_types.h +0 -29
  498. data/modules/emscripten/system/include/SDL/SDL_version.h +0 -166
  499. data/modules/emscripten/system/include/SDL/SDL_video.h +0 -820
  500. data/modules/emscripten/system/include/SDL/begin_code.h +0 -135
  501. data/modules/emscripten/system/include/SDL/close_code.h +0 -37
  502. data/modules/emscripten/system/include/X11/X.h +0 -717
  503. data/modules/emscripten/system/include/X11/Xatom.h +0 -79
  504. data/modules/emscripten/system/include/X11/Xfuncproto.h +0 -127
  505. data/modules/emscripten/system/include/X11/Xlib.h +0 -4023
  506. data/modules/emscripten/system/include/X11/Xosdefs.h +0 -116
  507. data/modules/emscripten/system/include/X11/Xutil.h +0 -826
  508. data/modules/emscripten/system/include/X11/keysym.h +0 -73
  509. data/modules/emscripten/system/include/X11/keysymdef.h +0 -2389
  510. data/modules/emscripten/system/include/compat/ctype.h +0 -34
  511. data/modules/emscripten/system/include/compat/malloc.h +0 -48
  512. data/modules/emscripten/system/include/compat/math.h +0 -14
  513. data/modules/emscripten/system/include/compat/netdb.h +0 -22
  514. data/modules/emscripten/system/include/compat/stdarg.h +0 -16
  515. data/modules/emscripten/system/include/compat/stdlib.h +0 -16
  516. data/modules/emscripten/system/include/compat/string.h +0 -17
  517. data/modules/emscripten/system/include/compat/sys/socketvar.h +0 -14
  518. data/modules/emscripten/system/include/compat/sys/stat.h +0 -20
  519. data/modules/emscripten/system/include/compat/sys/timeb.h +0 -35
  520. data/modules/emscripten/system/include/compat/time.h +0 -18
  521. data/modules/emscripten/system/include/compat/unistd.h +0 -16
  522. data/modules/emscripten/system/include/compat/wchar.h +0 -23
  523. data/modules/emscripten/system/include/compat/wctype.h +0 -23
  524. data/modules/emscripten/system/include/compat/xlocale.h +0 -19
  525. data/modules/emscripten/system/include/emscripten/bind.h +0 -1210
  526. data/modules/emscripten/system/include/emscripten/emmintrin.h +0 -87
  527. data/modules/emscripten/system/include/emscripten/emscripten.h +0 -519
  528. data/modules/emscripten/system/include/emscripten/val.h +0 -311
  529. data/modules/emscripten/system/include/emscripten/vector.h +0 -34
  530. data/modules/emscripten/system/include/emscripten/wire.h +0 -393
  531. data/modules/emscripten/system/include/emscripten/xmmintrin.h +0 -131
  532. data/modules/emscripten/system/include/execinfo.h +0 -44
  533. data/modules/emscripten/system/include/gc.h +0 -70
  534. data/modules/emscripten/system/include/gfx/png.h +0 -3798
  535. data/modules/emscripten/system/include/gfx/pngconf.h +0 -1665
  536. data/modules/emscripten/system/include/gfx/tiff.h +0 -654
  537. data/modules/emscripten/system/include/gfx/tiffconf.h +0 -104
  538. data/modules/emscripten/system/include/gfx/tiffio.h +0 -526
  539. data/modules/emscripten/system/include/gfx/tiffvers.h +0 -9
  540. data/modules/emscripten/system/include/jansson.h +0 -323
  541. data/modules/emscripten/system/include/jansson_config.h +0 -54
  542. data/modules/emscripten/system/include/libc/aio.h +0 -69
  543. data/modules/emscripten/system/include/libc/alloca.h +0 -21
  544. data/modules/emscripten/system/include/libc/ar.h +0 -25
  545. data/modules/emscripten/system/include/libc/arpa/ftp.h +0 -35
  546. data/modules/emscripten/system/include/libc/arpa/inet.h +0 -36
  547. data/modules/emscripten/system/include/libc/arpa/nameser.h +0 -467
  548. data/modules/emscripten/system/include/libc/arpa/nameser_compat.h +0 -2
  549. data/modules/emscripten/system/include/libc/arpa/telnet.h +0 -251
  550. data/modules/emscripten/system/include/libc/arpa/tftp.h +0 -31
  551. data/modules/emscripten/system/include/libc/assert.h +0 -19
  552. data/modules/emscripten/system/include/libc/bits/alltypes.h +0 -397
  553. data/modules/emscripten/system/include/libc/bits/endian.h +0 -1
  554. data/modules/emscripten/system/include/libc/bits/errno.h +0 -134
  555. data/modules/emscripten/system/include/libc/bits/fcntl.h +0 -38
  556. data/modules/emscripten/system/include/libc/bits/fenv.h +0 -34
  557. data/modules/emscripten/system/include/libc/bits/float.h +0 -17
  558. data/modules/emscripten/system/include/libc/bits/io.h +0 -0
  559. data/modules/emscripten/system/include/libc/bits/ioctl.h +0 -197
  560. data/modules/emscripten/system/include/libc/bits/ipc.h +0 -14
  561. data/modules/emscripten/system/include/libc/bits/limits.h +0 -8
  562. data/modules/emscripten/system/include/libc/bits/mman.h +0 -62
  563. data/modules/emscripten/system/include/libc/bits/msg.h +0 -16
  564. data/modules/emscripten/system/include/libc/bits/posix.h +0 -2
  565. data/modules/emscripten/system/include/libc/bits/reg.h +0 -19
  566. data/modules/emscripten/system/include/libc/bits/setjmp.h +0 -1
  567. data/modules/emscripten/system/include/libc/bits/shm.h +0 -18
  568. data/modules/emscripten/system/include/libc/bits/signal.h +0 -112
  569. data/modules/emscripten/system/include/libc/bits/socket.h +0 -17
  570. data/modules/emscripten/system/include/libc/bits/stat.h +0 -22
  571. data/modules/emscripten/system/include/libc/bits/statfs.h +0 -7
  572. data/modules/emscripten/system/include/libc/bits/stdarg.h +0 -4
  573. data/modules/emscripten/system/include/libc/bits/stdint.h +0 -20
  574. data/modules/emscripten/system/include/libc/bits/syscall.h +0 -696
  575. data/modules/emscripten/system/include/libc/bits/termios.h +0 -160
  576. data/modules/emscripten/system/include/libc/bits/user.h +0 -48
  577. data/modules/emscripten/system/include/libc/byteswap.h +0 -26
  578. data/modules/emscripten/system/include/libc/complex.h +0 -125
  579. data/modules/emscripten/system/include/libc/cpio.h +0 -29
  580. data/modules/emscripten/system/include/libc/crypt.h +0 -20
  581. data/modules/emscripten/system/include/libc/ctype.h +0 -67
  582. data/modules/emscripten/system/include/libc/dirent.h +0 -79
  583. data/modules/emscripten/system/include/libc/dlfcn.h +0 -42
  584. data/modules/emscripten/system/include/libc/elf.h +0 -2555
  585. data/modules/emscripten/system/include/libc/endian.h +0 -82
  586. data/modules/emscripten/system/include/libc/err.h +0 -25
  587. data/modules/emscripten/system/include/libc/errno.h +0 -27
  588. data/modules/emscripten/system/include/libc/fcntl.h +0 -175
  589. data/modules/emscripten/system/include/libc/features.h +0 -32
  590. data/modules/emscripten/system/include/libc/fenv.h +0 -28
  591. data/modules/emscripten/system/include/libc/float.h +0 -34
  592. data/modules/emscripten/system/include/libc/fnmatch.h +0 -29
  593. data/modules/emscripten/system/include/libc/ftw.h +0 -42
  594. data/modules/emscripten/system/include/libc/getopt.h +0 -31
  595. data/modules/emscripten/system/include/libc/glob.h +0 -48
  596. data/modules/emscripten/system/include/libc/grp.h +0 -52
  597. data/modules/emscripten/system/include/libc/iconv.h +0 -24
  598. data/modules/emscripten/system/include/libc/ifaddrs.h +0 -35
  599. data/modules/emscripten/system/include/libc/inttypes.h +0 -227
  600. data/modules/emscripten/system/include/libc/iso646.h +0 -20
  601. data/modules/emscripten/system/include/libc/langinfo.h +0 -88
  602. data/modules/emscripten/system/include/libc/lastlog.h +0 -1
  603. data/modules/emscripten/system/include/libc/libgen.h +0 -15
  604. data/modules/emscripten/system/include/libc/libintl.h +0 -25
  605. data/modules/emscripten/system/include/libc/limits.h +0 -146
  606. data/modules/emscripten/system/include/libc/link.h +0 -54
  607. data/modules/emscripten/system/include/libc/locale.h +0 -82
  608. data/modules/emscripten/system/include/libc/malloc.h +0 -0
  609. data/modules/emscripten/system/include/libc/math.h +0 -422
  610. data/modules/emscripten/system/include/libc/memory.h +0 -1
  611. data/modules/emscripten/system/include/libc/mntent.h +0 -44
  612. data/modules/emscripten/system/include/libc/monetary.h +0 -23
  613. data/modules/emscripten/system/include/libc/mqueue.h +0 -36
  614. data/modules/emscripten/system/include/libc/net/ethernet.h +0 -55
  615. data/modules/emscripten/system/include/libc/net/if.h +0 -135
  616. data/modules/emscripten/system/include/libc/net/if_arp.h +0 -133
  617. data/modules/emscripten/system/include/libc/net/route.h +0 -124
  618. data/modules/emscripten/system/include/libc/netdb.h +0 -161
  619. data/modules/emscripten/system/include/libc/netinet/ether.h +0 -14
  620. data/modules/emscripten/system/include/libc/netinet/icmp6.h +0 -305
  621. data/modules/emscripten/system/include/libc/netinet/if_ether.h +0 -126
  622. data/modules/emscripten/system/include/libc/netinet/in.h +0 -336
  623. data/modules/emscripten/system/include/libc/netinet/in_systm.h +0 -9
  624. data/modules/emscripten/system/include/libc/netinet/ip.h +0 -186
  625. data/modules/emscripten/system/include/libc/netinet/ip6.h +0 -142
  626. data/modules/emscripten/system/include/libc/netinet/ip_icmp.h +0 -192
  627. data/modules/emscripten/system/include/libc/netinet/tcp.h +0 -71
  628. data/modules/emscripten/system/include/libc/netinet/udp.h +0 -35
  629. data/modules/emscripten/system/include/libc/netpacket/packet.h +0 -44
  630. data/modules/emscripten/system/include/libc/nl_types.h +0 -22
  631. data/modules/emscripten/system/include/libc/paths.h +0 -32
  632. data/modules/emscripten/system/include/libc/poll.h +0 -46
  633. data/modules/emscripten/system/include/libc/pthread.h +0 -222
  634. data/modules/emscripten/system/include/libc/pty.h +0 -18
  635. data/modules/emscripten/system/include/libc/pwd.h +0 -49
  636. data/modules/emscripten/system/include/libc/readme.txt +0 -3
  637. data/modules/emscripten/system/include/libc/regex.h +0 -62
  638. data/modules/emscripten/system/include/libc/resolv.h +0 -144
  639. data/modules/emscripten/system/include/libc/sched.h +0 -132
  640. data/modules/emscripten/system/include/libc/search.h +0 -51
  641. data/modules/emscripten/system/include/libc/semaphore.h +0 -35
  642. data/modules/emscripten/system/include/libc/setjmp.h +0 -42
  643. data/modules/emscripten/system/include/libc/shadow.h +0 -44
  644. data/modules/emscripten/system/include/libc/signal.h +0 -255
  645. data/modules/emscripten/system/include/libc/spawn.h +0 -74
  646. data/modules/emscripten/system/include/libc/stdalign.h +0 -15
  647. data/modules/emscripten/system/include/libc/stdarg.h +0 -25
  648. data/modules/emscripten/system/include/libc/stdbool.h +0 -14
  649. data/modules/emscripten/system/include/libc/stddef.h +0 -18
  650. data/modules/emscripten/system/include/libc/stdint.h +0 -117
  651. data/modules/emscripten/system/include/libc/stdio.h +0 -199
  652. data/modules/emscripten/system/include/libc/stdio_ext.h +0 -34
  653. data/modules/emscripten/system/include/libc/stdlib.h +0 -171
  654. data/modules/emscripten/system/include/libc/stdnoreturn.h +0 -5
  655. data/modules/emscripten/system/include/libc/string.h +0 -102
  656. data/modules/emscripten/system/include/libc/strings.h +0 -35
  657. data/modules/emscripten/system/include/libc/stropts.h +0 -139
  658. data/modules/emscripten/system/include/libc/sys/acct.h +0 -75
  659. data/modules/emscripten/system/include/libc/sys/cachectl.h +0 -22
  660. data/modules/emscripten/system/include/libc/sys/dir.h +0 -2
  661. data/modules/emscripten/system/include/libc/sys/epoll.h +0 -67
  662. data/modules/emscripten/system/include/libc/sys/errno.h +0 -2
  663. data/modules/emscripten/system/include/libc/sys/eventfd.h +0 -26
  664. data/modules/emscripten/system/include/libc/sys/fcntl.h +0 -2
  665. data/modules/emscripten/system/include/libc/sys/file.h +0 -21
  666. data/modules/emscripten/system/include/libc/sys/fsuid.h +0 -20
  667. data/modules/emscripten/system/include/libc/sys/inotify.h +0 -57
  668. data/modules/emscripten/system/include/libc/sys/io.h +0 -17
  669. data/modules/emscripten/system/include/libc/sys/ioctl.h +0 -14
  670. data/modules/emscripten/system/include/libc/sys/ipc.h +0 -42
  671. data/modules/emscripten/system/include/libc/sys/klog.h +0 -14
  672. data/modules/emscripten/system/include/libc/sys/mman.h +0 -55
  673. data/modules/emscripten/system/include/libc/sys/mount.h +0 -72
  674. data/modules/emscripten/system/include/libc/sys/msg.h +0 -52
  675. data/modules/emscripten/system/include/libc/sys/mtio.h +0 -188
  676. data/modules/emscripten/system/include/libc/sys/param.h +0 -35
  677. data/modules/emscripten/system/include/libc/sys/personality.h +0 -46
  678. data/modules/emscripten/system/include/libc/sys/poll.h +0 -2
  679. data/modules/emscripten/system/include/libc/sys/prctl.h +0 -101
  680. data/modules/emscripten/system/include/libc/sys/procfs.h +0 -65
  681. data/modules/emscripten/system/include/libc/sys/ptrace.h +0 -96
  682. data/modules/emscripten/system/include/libc/sys/reboot.h +0 -20
  683. data/modules/emscripten/system/include/libc/sys/reg.h +0 -9
  684. data/modules/emscripten/system/include/libc/sys/resource.h +0 -103
  685. data/modules/emscripten/system/include/libc/sys/select.h +0 -42
  686. data/modules/emscripten/system/include/libc/sys/sem.h +0 -82
  687. data/modules/emscripten/system/include/libc/sys/sendfile.h +0 -22
  688. data/modules/emscripten/system/include/libc/sys/shm.h +0 -61
  689. data/modules/emscripten/system/include/libc/sys/signal.h +0 -2
  690. data/modules/emscripten/system/include/libc/sys/signalfd.h +0 -44
  691. data/modules/emscripten/system/include/libc/sys/socket.h +0 -299
  692. data/modules/emscripten/system/include/libc/sys/stat.h +0 -114
  693. data/modules/emscripten/system/include/libc/sys/statfs.h +0 -32
  694. data/modules/emscripten/system/include/libc/sys/statvfs.h +0 -57
  695. data/modules/emscripten/system/include/libc/sys/stropts.h +0 -1
  696. data/modules/emscripten/system/include/libc/sys/swap.h +0 -21
  697. data/modules/emscripten/system/include/libc/sys/syscall.h +0 -6
  698. data/modules/emscripten/system/include/libc/sys/sysctl.h +0 -17
  699. data/modules/emscripten/system/include/libc/sys/sysinfo.h +0 -36
  700. data/modules/emscripten/system/include/libc/sys/syslog.h +0 -1
  701. data/modules/emscripten/system/include/libc/sys/sysmacros.h +0 -15
  702. data/modules/emscripten/system/include/libc/sys/termios.h +0 -2
  703. data/modules/emscripten/system/include/libc/sys/time.h +0 -57
  704. data/modules/emscripten/system/include/libc/sys/timerfd.h +0 -24
  705. data/modules/emscripten/system/include/libc/sys/times.h +0 -26
  706. data/modules/emscripten/system/include/libc/sys/timex.h +0 -98
  707. data/modules/emscripten/system/include/libc/sys/ttydefaults.h +0 -39
  708. data/modules/emscripten/system/include/libc/sys/types.h +0 -91
  709. data/modules/emscripten/system/include/libc/sys/ucontext.h +0 -1
  710. data/modules/emscripten/system/include/libc/sys/uio.h +0 -48
  711. data/modules/emscripten/system/include/libc/sys/un.h +0 -32
  712. data/modules/emscripten/system/include/libc/sys/user.h +0 -16
  713. data/modules/emscripten/system/include/libc/sys/utsname.h +0 -30
  714. data/modules/emscripten/system/include/libc/sys/vfs.h +0 -1
  715. data/modules/emscripten/system/include/libc/sys/wait.h +0 -55
  716. data/modules/emscripten/system/include/libc/sys/xattr.h +0 -30
  717. data/modules/emscripten/system/include/libc/syscall.h +0 -1
  718. data/modules/emscripten/system/include/libc/sysexits.h +0 -21
  719. data/modules/emscripten/system/include/libc/syslog.h +0 -104
  720. data/modules/emscripten/system/include/libc/tar.h +0 -33
  721. data/modules/emscripten/system/include/libc/termios.h +0 -46
  722. data/modules/emscripten/system/include/libc/tgmath.h +0 -270
  723. data/modules/emscripten/system/include/libc/time.h +0 -132
  724. data/modules/emscripten/system/include/libc/ucontext.h +0 -25
  725. data/modules/emscripten/system/include/libc/ulimit.h +0 -17
  726. data/modules/emscripten/system/include/libc/unistd.h +0 -519
  727. data/modules/emscripten/system/include/libc/utime.h +0 -24
  728. data/modules/emscripten/system/include/libc/utmp.h +0 -47
  729. data/modules/emscripten/system/include/libc/utmpx.h +0 -58
  730. data/modules/emscripten/system/include/libc/values.h +0 -39
  731. data/modules/emscripten/system/include/libc/wchar.h +0 -183
  732. data/modules/emscripten/system/include/libc/wctype.h +0 -77
  733. data/modules/emscripten/system/include/libc/wordexp.h +0 -42
  734. data/modules/emscripten/system/include/libcxx/CREDITS.TXT +0 -123
  735. data/modules/emscripten/system/include/libcxx/LICENSE.txt +0 -76
  736. data/modules/emscripten/system/include/libcxx/__bit_reference +0 -1287
  737. data/modules/emscripten/system/include/libcxx/__config +0 -610
  738. data/modules/emscripten/system/include/libcxx/__debug +0 -218
  739. data/modules/emscripten/system/include/libcxx/__functional_03 +0 -2130
  740. data/modules/emscripten/system/include/libcxx/__functional_base +0 -615
  741. data/modules/emscripten/system/include/libcxx/__functional_base_03 +0 -1087
  742. data/modules/emscripten/system/include/libcxx/__hash_table +0 -2457
  743. data/modules/emscripten/system/include/libcxx/__locale +0 -1445
  744. data/modules/emscripten/system/include/libcxx/__mutex_base +0 -407
  745. data/modules/emscripten/system/include/libcxx/__split_buffer +0 -654
  746. data/modules/emscripten/system/include/libcxx/__sso_allocator +0 -77
  747. data/modules/emscripten/system/include/libcxx/__std_stream +0 -359
  748. data/modules/emscripten/system/include/libcxx/__tree +0 -2309
  749. data/modules/emscripten/system/include/libcxx/__tuple +0 -305
  750. data/modules/emscripten/system/include/libcxx/__tuple_03 +0 -27
  751. data/modules/emscripten/system/include/libcxx/__undef_min_max +0 -27
  752. data/modules/emscripten/system/include/libcxx/algorithm +0 -5679
  753. data/modules/emscripten/system/include/libcxx/array +0 -342
  754. data/modules/emscripten/system/include/libcxx/atomic +0 -1531
  755. data/modules/emscripten/system/include/libcxx/bitset +0 -1081
  756. data/modules/emscripten/system/include/libcxx/cassert +0 -25
  757. data/modules/emscripten/system/include/libcxx/ccomplex +0 -29
  758. data/modules/emscripten/system/include/libcxx/cctype +0 -164
  759. data/modules/emscripten/system/include/libcxx/cerrno +0 -393
  760. data/modules/emscripten/system/include/libcxx/cfenv +0 -82
  761. data/modules/emscripten/system/include/libcxx/cfloat +0 -78
  762. data/modules/emscripten/system/include/libcxx/chrono +0 -1027
  763. data/modules/emscripten/system/include/libcxx/cinttypes +0 -259
  764. data/modules/emscripten/system/include/libcxx/ciso646 +0 -25
  765. data/modules/emscripten/system/include/libcxx/climits +0 -48
  766. data/modules/emscripten/system/include/libcxx/clocale +0 -53
  767. data/modules/emscripten/system/include/libcxx/cmath +0 -1690
  768. data/modules/emscripten/system/include/libcxx/codecvt +0 -550
  769. data/modules/emscripten/system/include/libcxx/complex +0 -1567
  770. data/modules/emscripten/system/include/libcxx/complex.h +0 -35
  771. data/modules/emscripten/system/include/libcxx/condition_variable +0 -256
  772. data/modules/emscripten/system/include/libcxx/csetjmp +0 -52
  773. data/modules/emscripten/system/include/libcxx/csignal +0 -58
  774. data/modules/emscripten/system/include/libcxx/cstdarg +0 -48
  775. data/modules/emscripten/system/include/libcxx/cstdbool +0 -32
  776. data/modules/emscripten/system/include/libcxx/cstddef +0 -103
  777. data/modules/emscripten/system/include/libcxx/cstdint +0 -191
  778. data/modules/emscripten/system/include/libcxx/cstdio +0 -182
  779. data/modules/emscripten/system/include/libcxx/cstdlib +0 -172
  780. data/modules/emscripten/system/include/libcxx/cstring +0 -112
  781. data/modules/emscripten/system/include/libcxx/ctgmath +0 -29
  782. data/modules/emscripten/system/include/libcxx/ctime +0 -72
  783. data/modules/emscripten/system/include/libcxx/cwchar +0 -217
  784. data/modules/emscripten/system/include/libcxx/cwctype +0 -213
  785. data/modules/emscripten/system/include/libcxx/deque +0 -2873
  786. data/modules/emscripten/system/include/libcxx/dynarray +0 -311
  787. data/modules/emscripten/system/include/libcxx/exception +0 -250
  788. data/modules/emscripten/system/include/libcxx/ext/__hash +0 -46
  789. data/modules/emscripten/system/include/libcxx/ext/hash_map +0 -1007
  790. data/modules/emscripten/system/include/libcxx/ext/hash_set +0 -661
  791. data/modules/emscripten/system/include/libcxx/forward_list +0 -1663
  792. data/modules/emscripten/system/include/libcxx/fstream +0 -1431
  793. data/modules/emscripten/system/include/libcxx/functional +0 -2418
  794. data/modules/emscripten/system/include/libcxx/future +0 -2615
  795. data/modules/emscripten/system/include/libcxx/initializer_list +0 -118
  796. data/modules/emscripten/system/include/libcxx/iomanip +0 -651
  797. data/modules/emscripten/system/include/libcxx/ios +0 -1023
  798. data/modules/emscripten/system/include/libcxx/iosfwd +0 -194
  799. data/modules/emscripten/system/include/libcxx/iostream +0 -60
  800. data/modules/emscripten/system/include/libcxx/istream +0 -1716
  801. data/modules/emscripten/system/include/libcxx/iterator +0 -1568
  802. data/modules/emscripten/system/include/libcxx/limits +0 -813
  803. data/modules/emscripten/system/include/libcxx/list +0 -2355
  804. data/modules/emscripten/system/include/libcxx/locale +0 -4465
  805. data/modules/emscripten/system/include/libcxx/map +0 -2045
  806. data/modules/emscripten/system/include/libcxx/memory +0 -5448
  807. data/modules/emscripten/system/include/libcxx/mutex +0 -566
  808. data/modules/emscripten/system/include/libcxx/new +0 -146
  809. data/modules/emscripten/system/include/libcxx/numeric +0 -197
  810. data/modules/emscripten/system/include/libcxx/optional +0 -697
  811. data/modules/emscripten/system/include/libcxx/ostream +0 -1295
  812. data/modules/emscripten/system/include/libcxx/queue +0 -717
  813. data/modules/emscripten/system/include/libcxx/random +0 -6725
  814. data/modules/emscripten/system/include/libcxx/ratio +0 -487
  815. data/modules/emscripten/system/include/libcxx/readme.txt +0 -1
  816. data/modules/emscripten/system/include/libcxx/regex +0 -6487
  817. data/modules/emscripten/system/include/libcxx/scoped_allocator +0 -578
  818. data/modules/emscripten/system/include/libcxx/set +0 -1189
  819. data/modules/emscripten/system/include/libcxx/shared_mutex +0 -419
  820. data/modules/emscripten/system/include/libcxx/sstream +0 -972
  821. data/modules/emscripten/system/include/libcxx/stack +0 -292
  822. data/modules/emscripten/system/include/libcxx/stdexcept +0 -162
  823. data/modules/emscripten/system/include/libcxx/streambuf +0 -564
  824. data/modules/emscripten/system/include/libcxx/string +0 -4198
  825. data/modules/emscripten/system/include/libcxx/strstream +0 -400
  826. data/modules/emscripten/system/include/libcxx/support/ibm/limits.h +0 -99
  827. data/modules/emscripten/system/include/libcxx/support/ibm/support.h +0 -54
  828. data/modules/emscripten/system/include/libcxx/support/ibm/xlocale.h +0 -326
  829. data/modules/emscripten/system/include/libcxx/support/solaris/floatingpoint.h +0 -5
  830. data/modules/emscripten/system/include/libcxx/support/solaris/wchar.h +0 -38
  831. data/modules/emscripten/system/include/libcxx/support/solaris/xlocale.h +0 -146
  832. data/modules/emscripten/system/include/libcxx/support/win32/limits_win32.h +0 -79
  833. data/modules/emscripten/system/include/libcxx/support/win32/locale_win32.h +0 -129
  834. data/modules/emscripten/system/include/libcxx/support/win32/math_win32.h +0 -115
  835. data/modules/emscripten/system/include/libcxx/support/win32/support.h +0 -119
  836. data/modules/emscripten/system/include/libcxx/system_error +0 -642
  837. data/modules/emscripten/system/include/libcxx/tgmath.h +0 -29
  838. data/modules/emscripten/system/include/libcxx/thread +0 -458
  839. data/modules/emscripten/system/include/libcxx/tuple +0 -1102
  840. data/modules/emscripten/system/include/libcxx/type_traits +0 -3292
  841. data/modules/emscripten/system/include/libcxx/typeindex +0 -103
  842. data/modules/emscripten/system/include/libcxx/typeinfo +0 -124
  843. data/modules/emscripten/system/include/libcxx/unordered_map +0 -2078
  844. data/modules/emscripten/system/include/libcxx/unordered_set +0 -1379
  845. data/modules/emscripten/system/include/libcxx/utility +0 -768
  846. data/modules/emscripten/system/include/libcxx/valarray +0 -4779
  847. data/modules/emscripten/system/include/libcxx/vector +0 -3246
  848. data/modules/emscripten/system/include/unwind.h +0 -154
  849. data/modules/emscripten/system/include/uuid/uuid.h +0 -35
  850. data/modules/emscripten/system/include/zconf.h +0 -428
  851. data/modules/emscripten/system/include/zlib.h +0 -1613
  852. data/modules/emscripten/system/lib/compiler-rt/LICENSE.TXT +0 -97
  853. data/modules/emscripten/system/lib/compiler-rt/divdi3.c +0 -47
  854. data/modules/emscripten/system/lib/compiler-rt/int_endianness.h +0 -116
  855. data/modules/emscripten/system/lib/compiler-rt/int_lib.h +0 -46
  856. data/modules/emscripten/system/lib/compiler-rt/int_math.h +0 -67
  857. data/modules/emscripten/system/lib/compiler-rt/int_types.h +0 -140
  858. data/modules/emscripten/system/lib/compiler-rt/int_util.h +0 -29
  859. data/modules/emscripten/system/lib/compiler-rt/muldi3.c +0 -56
  860. data/modules/emscripten/system/lib/compiler-rt/readme.txt +0 -20
  861. data/modules/emscripten/system/lib/compiler-rt/udivdi3.c +0 -36
  862. data/modules/emscripten/system/lib/compiler-rt/udivmoddi4.c +0 -251
  863. data/modules/emscripten/system/lib/debugging.cpp +0 -24
  864. data/modules/emscripten/system/lib/dlmalloc.c +0 -6297
  865. data/modules/emscripten/system/lib/embind/bind.cpp +0 -63
  866. data/modules/emscripten/system/lib/libc/gen/err.c +0 -49
  867. data/modules/emscripten/system/lib/libc/gen/errx.c +0 -49
  868. data/modules/emscripten/system/lib/libc/gen/verr.c +0 -58
  869. data/modules/emscripten/system/lib/libc/gen/verrx.c +0 -51
  870. data/modules/emscripten/system/lib/libc/gen/vwarn.c +0 -55
  871. data/modules/emscripten/system/lib/libc/gen/vwarnx.c +0 -48
  872. data/modules/emscripten/system/lib/libc/gen/warn.c +0 -49
  873. data/modules/emscripten/system/lib/libc/gen/warnx.c +0 -49
  874. data/modules/emscripten/system/lib/libc/musl/COPYRIGHT +0 -92
  875. data/modules/emscripten/system/lib/libc/musl/readme.txt +0 -9
  876. data/modules/emscripten/system/lib/libc/musl/src/ctype/alpha.h +0 -125
  877. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswalnum.c +0 -7
  878. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswalpha.c +0 -14
  879. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswblank.c +0 -8
  880. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswcntrl.c +0 -10
  881. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswctype.c +0 -63
  882. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswdigit.c +0 -9
  883. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswgraph.c +0 -7
  884. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswlower.c +0 -6
  885. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswprint.c +0 -19
  886. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswpunct.c +0 -12
  887. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswspace.c +0 -19
  888. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswupper.c +0 -6
  889. data/modules/emscripten/system/lib/libc/musl/src/ctype/iswxdigit.c +0 -7
  890. data/modules/emscripten/system/lib/libc/musl/src/ctype/nonspacing.h +0 -62
  891. data/modules/emscripten/system/lib/libc/musl/src/ctype/punct.h +0 -109
  892. data/modules/emscripten/system/lib/libc/musl/src/ctype/towctrans.c +0 -268
  893. data/modules/emscripten/system/lib/libc/musl/src/ctype/wcswidth.c +0 -8
  894. data/modules/emscripten/system/lib/libc/musl/src/ctype/wctrans.c +0 -16
  895. data/modules/emscripten/system/lib/libc/musl/src/ctype/wcwidth.c +0 -29
  896. data/modules/emscripten/system/lib/libc/musl/src/ctype/wide.h +0 -42
  897. data/modules/emscripten/system/lib/libc/musl/src/internal/libc.c +0 -22
  898. data/modules/emscripten/system/lib/libc/musl/src/internal/libc.h +0 -71
  899. data/modules/emscripten/system/lib/libc/musl/src/internal/locale_impl.h +0 -5
  900. data/modules/emscripten/system/lib/libc/musl/src/internal/stdio_impl.h +0 -92
  901. data/modules/emscripten/system/lib/libc/musl/src/locale/big5.h +0 -1085
  902. data/modules/emscripten/system/lib/libc/musl/src/locale/codepages.h +0 -238
  903. data/modules/emscripten/system/lib/libc/musl/src/locale/gb18030.h +0 -1836
  904. data/modules/emscripten/system/lib/libc/musl/src/locale/hkscs.h +0 -390
  905. data/modules/emscripten/system/lib/libc/musl/src/locale/iconv.c +0 -454
  906. data/modules/emscripten/system/lib/libc/musl/src/locale/iswalnum_l.c +0 -6
  907. data/modules/emscripten/system/lib/libc/musl/src/locale/iswalpha_l.c +0 -6
  908. data/modules/emscripten/system/lib/libc/musl/src/locale/iswblank_l.c +0 -6
  909. data/modules/emscripten/system/lib/libc/musl/src/locale/iswcntrl_l.c +0 -6
  910. data/modules/emscripten/system/lib/libc/musl/src/locale/iswctype_l.c +0 -9
  911. data/modules/emscripten/system/lib/libc/musl/src/locale/iswdigit_l.c +0 -6
  912. data/modules/emscripten/system/lib/libc/musl/src/locale/iswgraph_l.c +0 -6
  913. data/modules/emscripten/system/lib/libc/musl/src/locale/iswlower_l.c +0 -6
  914. data/modules/emscripten/system/lib/libc/musl/src/locale/iswprint_l.c +0 -6
  915. data/modules/emscripten/system/lib/libc/musl/src/locale/iswpunct_l.c +0 -6
  916. data/modules/emscripten/system/lib/libc/musl/src/locale/iswspace_l.c +0 -6
  917. data/modules/emscripten/system/lib/libc/musl/src/locale/iswupper_l.c +0 -6
  918. data/modules/emscripten/system/lib/libc/musl/src/locale/iswxdigit_l.c +0 -6
  919. data/modules/emscripten/system/lib/libc/musl/src/locale/jis0208.h +0 -550
  920. data/modules/emscripten/system/lib/libc/musl/src/locale/ksc.h +0 -640
  921. data/modules/emscripten/system/lib/libc/musl/src/locale/legacychars.h +0 -39
  922. data/modules/emscripten/system/lib/libc/musl/src/locale/strfmon.c +0 -101
  923. data/modules/emscripten/system/lib/libc/musl/src/locale/strxfrm.c +0 -18
  924. data/modules/emscripten/system/lib/libc/musl/src/locale/towctrans_l.c +0 -6
  925. data/modules/emscripten/system/lib/libc/musl/src/locale/towlower_l.c +0 -9
  926. data/modules/emscripten/system/lib/libc/musl/src/locale/towupper_l.c +0 -9
  927. data/modules/emscripten/system/lib/libc/musl/src/locale/wcscoll.c +0 -16
  928. data/modules/emscripten/system/lib/libc/musl/src/locale/wcscoll_l.c +0 -6
  929. data/modules/emscripten/system/lib/libc/musl/src/locale/wcsxfrm.c +0 -21
  930. data/modules/emscripten/system/lib/libc/musl/src/locale/wcsxfrm_l.c +0 -6
  931. data/modules/emscripten/system/lib/libc/musl/src/locale/wctrans_l.c +0 -6
  932. data/modules/emscripten/system/lib/libc/musl/src/locale/wctype_l.c +0 -9
  933. data/modules/emscripten/system/lib/libc/musl/src/multibyte/btowc.c +0 -7
  934. data/modules/emscripten/system/lib/libc/musl/src/multibyte/internal.c +0 -38
  935. data/modules/emscripten/system/lib/libc/musl/src/multibyte/internal.h +0 -22
  936. data/modules/emscripten/system/lib/libc/musl/src/multibyte/mblen.c +0 -17
  937. data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbrlen.c +0 -18
  938. data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbrtowc.c +0 -57
  939. data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbsinit.c +0 -17
  940. data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbsnrtowcs.c +0 -65
  941. data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbsrtowcs.c +0 -100
  942. data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbstowcs.c +0 -7
  943. data/modules/emscripten/system/lib/libc/musl/src/multibyte/mbtowc.c +0 -53
  944. data/modules/emscripten/system/lib/libc/musl/src/multibyte/wcrtomb.c +0 -38
  945. data/modules/emscripten/system/lib/libc/musl/src/multibyte/wcsnrtombs.c +0 -52
  946. data/modules/emscripten/system/lib/libc/musl/src/multibyte/wcsrtombs.c +0 -58
  947. data/modules/emscripten/system/lib/libc/musl/src/multibyte/wcstombs.c +0 -7
  948. data/modules/emscripten/system/lib/libc/musl/src/multibyte/wctob.c +0 -8
  949. data/modules/emscripten/system/lib/libc/musl/src/multibyte/wctomb.c +0 -18
  950. data/modules/emscripten/system/lib/libc/musl/src/regex/regcomp.c +0 -3352
  951. data/modules/emscripten/system/lib/libc/musl/src/regex/regerror.c +0 -35
  952. data/modules/emscripten/system/lib/libc/musl/src/regex/regexec.c +0 -1011
  953. data/modules/emscripten/system/lib/libc/musl/src/regex/tre-mem.c +0 -158
  954. data/modules/emscripten/system/lib/libc/musl/src/regex/tre.h +0 -231
  955. data/modules/emscripten/system/lib/libc/musl/src/stdio/fwprintf.c +0 -13
  956. data/modules/emscripten/system/lib/libc/musl/src/stdio/swprintf.c +0 -14
  957. data/modules/emscripten/system/lib/libc/musl/src/stdio/vfwprintf.c +0 -361
  958. data/modules/emscripten/system/lib/libc/musl/src/stdio/vswprintf.c +0 -53
  959. data/modules/emscripten/system/lib/libc/musl/src/stdio/vwprintf.c +0 -7
  960. data/modules/emscripten/system/lib/libc/musl/src/stdio/wprintf.c +0 -13
  961. data/modules/emscripten/system/lib/libc/musl/src/stdlib/ecvt.c +0 -19
  962. data/modules/emscripten/system/lib/libc/musl/src/stdlib/fcvt.c +0 -25
  963. data/modules/emscripten/system/lib/libc/musl/src/stdlib/gcvt.c +0 -8
  964. data/modules/emscripten/system/lib/libc/musl/src/string/wcpcpy.c +0 -6
  965. data/modules/emscripten/system/lib/libc/musl/src/string/wcpncpy.c +0 -6
  966. data/modules/emscripten/system/lib/libc/musl/src/string/wcscasecmp.c +0 -7
  967. data/modules/emscripten/system/lib/libc/musl/src/string/wcscasecmp_l.c +0 -6
  968. data/modules/emscripten/system/lib/libc/musl/src/string/wcscat.c +0 -7
  969. data/modules/emscripten/system/lib/libc/musl/src/string/wcschr.c +0 -8
  970. data/modules/emscripten/system/lib/libc/musl/src/string/wcscmp.c +0 -7
  971. data/modules/emscripten/system/lib/libc/musl/src/string/wcscpy.c +0 -8
  972. data/modules/emscripten/system/lib/libc/musl/src/string/wcscspn.c +0 -10
  973. data/modules/emscripten/system/lib/libc/musl/src/string/wcsdup.c +0 -11
  974. data/modules/emscripten/system/lib/libc/musl/src/string/wcslen.c +0 -8
  975. data/modules/emscripten/system/lib/libc/musl/src/string/wcsncasecmp.c +0 -9
  976. data/modules/emscripten/system/lib/libc/musl/src/string/wcsncasecmp_l.c +0 -6
  977. data/modules/emscripten/system/lib/libc/musl/src/string/wcsncat.c +0 -10
  978. data/modules/emscripten/system/lib/libc/musl/src/string/wcsncmp.c +0 -7
  979. data/modules/emscripten/system/lib/libc/musl/src/string/wcsncpy.c +0 -9
  980. data/modules/emscripten/system/lib/libc/musl/src/string/wcsnlen.c +0 -8
  981. data/modules/emscripten/system/lib/libc/musl/src/string/wcspbrk.c +0 -7
  982. data/modules/emscripten/system/lib/libc/musl/src/string/wcsrchr.c +0 -8
  983. data/modules/emscripten/system/lib/libc/musl/src/string/wcsspn.c +0 -8
  984. data/modules/emscripten/system/lib/libc/musl/src/string/wcsstr.c +0 -108
  985. data/modules/emscripten/system/lib/libc/musl/src/string/wcstok.c +0 -12
  986. data/modules/emscripten/system/lib/libc/musl/src/string/wcswcs.c +0 -6
  987. data/modules/emscripten/system/lib/libc/musl/src/string/wmemchr.c +0 -8
  988. data/modules/emscripten/system/lib/libc/musl/src/string/wmemcmp.c +0 -8
  989. data/modules/emscripten/system/lib/libc/musl/src/string/wmemcpy.c +0 -9
  990. data/modules/emscripten/system/lib/libc/musl/src/string/wmemmove.c +0 -12
  991. data/modules/emscripten/system/lib/libc/musl/src/string/wmemset.c +0 -9
  992. data/modules/emscripten/system/lib/libc/stdlib/getopt_long.c +0 -511
  993. data/modules/emscripten/system/lib/libc/stdlib/strtod.c +0 -305
  994. data/modules/emscripten/system/lib/libc.symbols +0 -81
  995. data/modules/emscripten/system/lib/libcextra.symbols +0 -115
  996. data/modules/emscripten/system/lib/libcxx/CREDITS.TXT +0 -123
  997. data/modules/emscripten/system/lib/libcxx/LICENSE.txt +0 -76
  998. data/modules/emscripten/system/lib/libcxx/algorithm.cpp +0 -84
  999. data/modules/emscripten/system/lib/libcxx/bind.cpp +0 -30
  1000. data/modules/emscripten/system/lib/libcxx/chrono.cpp +0 -132
  1001. data/modules/emscripten/system/lib/libcxx/condition_variable.cpp +0 -81
  1002. data/modules/emscripten/system/lib/libcxx/debug.cpp +0 -530
  1003. data/modules/emscripten/system/lib/libcxx/exception.cpp +0 -307
  1004. data/modules/emscripten/system/lib/libcxx/future.cpp +0 -291
  1005. data/modules/emscripten/system/lib/libcxx/hash.cpp +0 -570
  1006. data/modules/emscripten/system/lib/libcxx/ios.cpp +0 -460
  1007. data/modules/emscripten/system/lib/libcxx/iostream.cpp +0 -68
  1008. data/modules/emscripten/system/lib/libcxx/locale.cpp +0 -6169
  1009. data/modules/emscripten/system/lib/libcxx/memory.cpp +0 -223
  1010. data/modules/emscripten/system/lib/libcxx/mutex.cpp +0 -253
  1011. data/modules/emscripten/system/lib/libcxx/new.cpp +0 -239
  1012. data/modules/emscripten/system/lib/libcxx/optional.cpp +0 -25
  1013. data/modules/emscripten/system/lib/libcxx/random.cpp +0 -74
  1014. data/modules/emscripten/system/lib/libcxx/readme.txt +0 -1
  1015. data/modules/emscripten/system/lib/libcxx/regex.cpp +0 -325
  1016. data/modules/emscripten/system/lib/libcxx/shared_mutex.cpp +0 -101
  1017. data/modules/emscripten/system/lib/libcxx/stdexcept.cpp +0 -200
  1018. data/modules/emscripten/system/lib/libcxx/string.cpp +0 -530
  1019. data/modules/emscripten/system/lib/libcxx/strstream.cpp +0 -329
  1020. data/modules/emscripten/system/lib/libcxx/support/solaris/README +0 -4
  1021. data/modules/emscripten/system/lib/libcxx/support/solaris/mbsnrtowcs.inc +0 -76
  1022. data/modules/emscripten/system/lib/libcxx/support/solaris/wcsnrtombs.inc +0 -93
  1023. data/modules/emscripten/system/lib/libcxx/support/solaris/xlocale.c +0 -245
  1024. data/modules/emscripten/system/lib/libcxx/support/win32/locale_win32.cpp +0 -95
  1025. data/modules/emscripten/system/lib/libcxx/support/win32/support.cpp +0 -166
  1026. data/modules/emscripten/system/lib/libcxx/symbols +0 -2699
  1027. data/modules/emscripten/system/lib/libcxx/system_error.cpp +0 -205
  1028. data/modules/emscripten/system/lib/libcxx/thread.cpp +0 -225
  1029. data/modules/emscripten/system/lib/libcxx/typeinfo.cpp +0 -73
  1030. data/modules/emscripten/system/lib/libcxx/utility.cpp +0 -17
  1031. data/modules/emscripten/system/lib/libcxx/valarray.cpp +0 -56
  1032. data/modules/emscripten/system/lib/libcxxabi/CREDITS.TXT +0 -38
  1033. data/modules/emscripten/system/lib/libcxxabi/LICENSE.TXT +0 -76
  1034. data/modules/emscripten/system/lib/libcxxabi/include/cxa_demangle.h +0 -167
  1035. data/modules/emscripten/system/lib/libcxxabi/include/cxxabi.h +0 -175
  1036. data/modules/emscripten/system/lib/libcxxabi/lib/buildit +0 -99
  1037. data/modules/emscripten/system/lib/libcxxabi/readme.txt +0 -1
  1038. data/modules/emscripten/system/lib/libcxxabi/src/abort_message.cpp +0 -50
  1039. data/modules/emscripten/system/lib/libcxxabi/src/abort_message.h +0 -33
  1040. data/modules/emscripten/system/lib/libcxxabi/src/cxa_aux_runtime.cpp +0 -34
  1041. data/modules/emscripten/system/lib/libcxxabi/src/cxa_demangle.cpp +0 -11036
  1042. data/modules/emscripten/system/lib/libcxxabi/src/cxa_exception.cpp +0 -622
  1043. data/modules/emscripten/system/lib/libcxxabi/src/cxa_exception.hpp +0 -123
  1044. data/modules/emscripten/system/lib/libcxxabi/src/cxa_exception_storage.cpp +0 -91
  1045. data/modules/emscripten/system/lib/libcxxabi/src/cxa_guard.cpp +0 -231
  1046. data/modules/emscripten/system/lib/libcxxabi/src/cxa_handlers.cpp +0 -125
  1047. data/modules/emscripten/system/lib/libcxxabi/src/cxa_handlers.hpp +0 -54
  1048. data/modules/emscripten/system/lib/libcxxabi/src/cxa_new_delete.cpp +0 -242
  1049. data/modules/emscripten/system/lib/libcxxabi/src/cxa_personality.cpp +0 -1055
  1050. data/modules/emscripten/system/lib/libcxxabi/src/cxa_unexpected.cpp +0 -27
  1051. data/modules/emscripten/system/lib/libcxxabi/src/cxa_vector.cpp +0 -367
  1052. data/modules/emscripten/system/lib/libcxxabi/src/cxa_virtual.cpp +0 -31
  1053. data/modules/emscripten/system/lib/libcxxabi/src/exception.cpp +0 -41
  1054. data/modules/emscripten/system/lib/libcxxabi/src/fallback_malloc.ipp +0 -174
  1055. data/modules/emscripten/system/lib/libcxxabi/src/private_typeinfo.cpp +0 -1146
  1056. data/modules/emscripten/system/lib/libcxxabi/src/private_typeinfo.h +0 -248
  1057. data/modules/emscripten/system/lib/libcxxabi/src/stdexcept.cpp +0 -169
  1058. data/modules/emscripten/system/lib/libcxxabi/src/typeinfo.cpp +0 -53
  1059. data/modules/emscripten/system/lib/libcxxabi/symbols +0 -236
  1060. data/modules/emscripten/system/lib/sdl.cpp +0 -13
  1061. data/modules/emscripten/system/lib/sdl.symbols +0 -1
  1062. data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/CppHeaderParser.py +0 -2347
  1063. data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/__init__.py +0 -4
  1064. data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/doc/CppHeaderParser.html +0 -657
  1065. data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/examples/SampleClass.h +0 -147
  1066. data/modules/emscripten/third_party/CppHeaderParser/CppHeaderParser/examples/readSampleClass.py +0 -74
  1067. data/modules/emscripten/third_party/CppHeaderParser/PKG-INFO +0 -249
  1068. data/modules/emscripten/third_party/CppHeaderParser/README.html +0 -544
  1069. data/modules/emscripten/third_party/CppHeaderParser/README.txt +0 -226
  1070. data/modules/emscripten/third_party/CppHeaderParser/setup.py +0 -43
  1071. data/modules/emscripten/third_party/ansidecl.h +0 -371
  1072. data/modules/emscripten/third_party/closure-compiler/COPYING +0 -202
  1073. data/modules/emscripten/third_party/closure-compiler/README +0 -292
  1074. data/modules/emscripten/third_party/closure-compiler/compiler.jar +0 -0
  1075. data/modules/emscripten/third_party/closure-compiler/readme.txt +0 -3
  1076. data/modules/emscripten/third_party/cp-demangle.h +0 -161
  1077. data/modules/emscripten/third_party/demangle.h +0 -549
  1078. data/modules/emscripten/third_party/demangler.py +0 -49
  1079. data/modules/emscripten/third_party/gcc_demangler.c +0 -4226
  1080. data/modules/emscripten/third_party/gcc_demangler.js +0 -21282
  1081. data/modules/emscripten/third_party/jni/emjvm.cpp +0 -133
  1082. data/modules/emscripten/third_party/jni/emjvm.h +0 -8
  1083. data/modules/emscripten/third_party/jni/emjvm.js +0 -185
  1084. data/modules/emscripten/third_party/jni/jni.h +0 -1154
  1085. data/modules/emscripten/third_party/libiberty.h +0 -634
  1086. data/modules/emscripten/third_party/lzma.js/README.markdown +0 -37
  1087. data/modules/emscripten/third_party/lzma.js/doit.bat +0 -4
  1088. data/modules/emscripten/third_party/lzma.js/doit.sh +0 -44
  1089. data/modules/emscripten/third_party/lzma.js/lzip/AUTHORS +0 -7
  1090. data/modules/emscripten/third_party/lzma.js/lzip/COPYING +0 -676
  1091. data/modules/emscripten/third_party/lzma.js/lzip/ChangeLog +0 -201
  1092. data/modules/emscripten/third_party/lzma.js/lzip/INSTALL +0 -56
  1093. data/modules/emscripten/third_party/lzma.js/lzip/Makefile +0 -160
  1094. data/modules/emscripten/third_party/lzma.js/lzip/Makefile.in +0 -138
  1095. data/modules/emscripten/third_party/lzma.js/lzip/NEWS +0 -22
  1096. data/modules/emscripten/third_party/lzma.js/lzip/README +0 -77
  1097. data/modules/emscripten/third_party/lzma.js/lzip/arg_parser.cc +0 -204
  1098. data/modules/emscripten/third_party/lzma.js/lzip/arg_parser.h +0 -106
  1099. data/modules/emscripten/third_party/lzma.js/lzip/configure +0 -192
  1100. data/modules/emscripten/third_party/lzma.js/lzip/decoder.cc +0 -252
  1101. data/modules/emscripten/third_party/lzma.js/lzip/decoder.h +0 -268
  1102. data/modules/emscripten/third_party/lzma.js/lzip/encoder.cc +0 -643
  1103. data/modules/emscripten/third_party/lzma.js/lzip/encoder.h +0 -582
  1104. data/modules/emscripten/third_party/lzma.js/lzip/fast_encoder.cc +0 -378
  1105. data/modules/emscripten/third_party/lzma.js/lzip/fast_encoder.h +0 -171
  1106. data/modules/emscripten/third_party/lzma.js/lzip/lzip.h +0 -264
  1107. data/modules/emscripten/third_party/lzma.js/lzip/main.cc +0 -545
  1108. data/modules/emscripten/third_party/lzma.js/lzma-decoder.js +0 -27
  1109. data/modules/emscripten/third_party/lzma.js/lzma-full.js +0 -27
  1110. data/modules/emscripten/third_party/lzma.js/native_test.sh +0 -5
  1111. data/modules/emscripten/third_party/lzma.js/post.js +0 -13
  1112. data/modules/emscripten/third_party/lzma.js/pre.js +0 -13
  1113. data/modules/emscripten/third_party/lzma.js/test-decoder.js +0 -39
  1114. data/modules/emscripten/third_party/lzma.js/test-full.html +0 -9
  1115. data/modules/emscripten/third_party/lzma.js/test-full.js +0 -78
  1116. data/modules/emscripten/third_party/ply/ANNOUNCE +0 -40
  1117. data/modules/emscripten/third_party/ply/CHANGES +0 -1093
  1118. data/modules/emscripten/third_party/ply/PKG-INFO +0 -22
  1119. data/modules/emscripten/third_party/ply/README +0 -271
  1120. data/modules/emscripten/third_party/ply/TODO +0 -16
  1121. data/modules/emscripten/third_party/ply/doc/internal.html +0 -874
  1122. data/modules/emscripten/third_party/ply/doc/makedoc.py +0 -194
  1123. data/modules/emscripten/third_party/ply/doc/ply.html +0 -3262
  1124. data/modules/emscripten/third_party/ply/example/BASIC/README +0 -79
  1125. data/modules/emscripten/third_party/ply/example/BASIC/basic.py +0 -71
  1126. data/modules/emscripten/third_party/ply/example/BASIC/basiclex.py +0 -74
  1127. data/modules/emscripten/third_party/ply/example/BASIC/basiclog.py +0 -79
  1128. data/modules/emscripten/third_party/ply/example/BASIC/basinterp.py +0 -441
  1129. data/modules/emscripten/third_party/ply/example/BASIC/basparse.py +0 -424
  1130. data/modules/emscripten/third_party/ply/example/BASIC/dim.bas +0 -14
  1131. data/modules/emscripten/third_party/ply/example/BASIC/func.bas +0 -5
  1132. data/modules/emscripten/third_party/ply/example/BASIC/gcd.bas +0 -22
  1133. data/modules/emscripten/third_party/ply/example/BASIC/gosub.bas +0 -13
  1134. data/modules/emscripten/third_party/ply/example/BASIC/hello.bas +0 -4
  1135. data/modules/emscripten/third_party/ply/example/BASIC/linear.bas +0 -17
  1136. data/modules/emscripten/third_party/ply/example/BASIC/maxsin.bas +0 -12
  1137. data/modules/emscripten/third_party/ply/example/BASIC/powers.bas +0 -13
  1138. data/modules/emscripten/third_party/ply/example/BASIC/rand.bas +0 -4
  1139. data/modules/emscripten/third_party/ply/example/BASIC/sales.bas +0 -20
  1140. data/modules/emscripten/third_party/ply/example/BASIC/sears.bas +0 -18
  1141. data/modules/emscripten/third_party/ply/example/BASIC/sqrt1.bas +0 -5
  1142. data/modules/emscripten/third_party/ply/example/BASIC/sqrt2.bas +0 -4
  1143. data/modules/emscripten/third_party/ply/example/GardenSnake/GardenSnake.py +0 -709
  1144. data/modules/emscripten/third_party/ply/example/GardenSnake/README +0 -5
  1145. data/modules/emscripten/third_party/ply/example/README +0 -10
  1146. data/modules/emscripten/third_party/ply/example/ansic/README +0 -2
  1147. data/modules/emscripten/third_party/ply/example/ansic/clex.py +0 -164
  1148. data/modules/emscripten/third_party/ply/example/ansic/cparse.py +0 -863
  1149. data/modules/emscripten/third_party/ply/example/calc/calc.py +0 -107
  1150. data/modules/emscripten/third_party/ply/example/calcdebug/calc.py +0 -113
  1151. data/modules/emscripten/third_party/ply/example/classcalc/calc.py +0 -157
  1152. data/modules/emscripten/third_party/ply/example/cleanup.sh +0 -2
  1153. data/modules/emscripten/third_party/ply/example/closurecalc/calc.py +0 -130
  1154. data/modules/emscripten/third_party/ply/example/hedit/hedit.py +0 -48
  1155. data/modules/emscripten/third_party/ply/example/newclasscalc/calc.py +0 -160
  1156. data/modules/emscripten/third_party/ply/example/optcalc/README +0 -9
  1157. data/modules/emscripten/third_party/ply/example/optcalc/calc.py +0 -119
  1158. data/modules/emscripten/third_party/ply/example/unicalc/calc.py +0 -117
  1159. data/modules/emscripten/third_party/ply/example/yply/README +0 -41
  1160. data/modules/emscripten/third_party/ply/example/yply/ylex.py +0 -112
  1161. data/modules/emscripten/third_party/ply/example/yply/yparse.py +0 -217
  1162. data/modules/emscripten/third_party/ply/example/yply/yply.py +0 -53
  1163. data/modules/emscripten/third_party/ply/ply/__init__.py +0 -4
  1164. data/modules/emscripten/third_party/ply/ply/cpp.py +0 -898
  1165. data/modules/emscripten/third_party/ply/ply/ctokens.py +0 -133
  1166. data/modules/emscripten/third_party/ply/ply/lex.py +0 -1058
  1167. data/modules/emscripten/third_party/ply/ply/yacc.py +0 -3276
  1168. data/modules/emscripten/third_party/ply/setup.py +0 -31
  1169. data/modules/emscripten/third_party/ply/test/README +0 -7
  1170. data/modules/emscripten/third_party/ply/test/calclex.py +0 -49
  1171. data/modules/emscripten/third_party/ply/test/cleanup.sh +0 -4
  1172. data/modules/emscripten/third_party/ply/test/lex_closure.py +0 -54
  1173. data/modules/emscripten/third_party/ply/test/lex_doc1.py +0 -26
  1174. data/modules/emscripten/third_party/ply/test/lex_dup1.py +0 -29
  1175. data/modules/emscripten/third_party/ply/test/lex_dup2.py +0 -33
  1176. data/modules/emscripten/third_party/ply/test/lex_dup3.py +0 -31
  1177. data/modules/emscripten/third_party/ply/test/lex_empty.py +0 -20
  1178. data/modules/emscripten/third_party/ply/test/lex_error1.py +0 -24
  1179. data/modules/emscripten/third_party/ply/test/lex_error2.py +0 -26
  1180. data/modules/emscripten/third_party/ply/test/lex_error3.py +0 -27
  1181. data/modules/emscripten/third_party/ply/test/lex_error4.py +0 -27
  1182. data/modules/emscripten/third_party/ply/test/lex_hedit.py +0 -47
  1183. data/modules/emscripten/third_party/ply/test/lex_ignore.py +0 -31
  1184. data/modules/emscripten/third_party/ply/test/lex_ignore2.py +0 -29
  1185. data/modules/emscripten/third_party/ply/test/lex_literal1.py +0 -25
  1186. data/modules/emscripten/third_party/ply/test/lex_literal2.py +0 -25
  1187. data/modules/emscripten/third_party/ply/test/lex_many_tokens.py +0 -27
  1188. data/modules/emscripten/third_party/ply/test/lex_module.py +0 -10
  1189. data/modules/emscripten/third_party/ply/test/lex_module_import.py +0 -42
  1190. data/modules/emscripten/third_party/ply/test/lex_object.py +0 -55
  1191. data/modules/emscripten/third_party/ply/test/lex_opt_alias.py +0 -54
  1192. data/modules/emscripten/third_party/ply/test/lex_optimize.py +0 -50
  1193. data/modules/emscripten/third_party/ply/test/lex_optimize2.py +0 -50
  1194. data/modules/emscripten/third_party/ply/test/lex_optimize3.py +0 -52
  1195. data/modules/emscripten/third_party/ply/test/lex_re1.py +0 -27
  1196. data/modules/emscripten/third_party/ply/test/lex_re2.py +0 -27
  1197. data/modules/emscripten/third_party/ply/test/lex_re3.py +0 -29
  1198. data/modules/emscripten/third_party/ply/test/lex_rule1.py +0 -27
  1199. data/modules/emscripten/third_party/ply/test/lex_rule2.py +0 -29
  1200. data/modules/emscripten/third_party/ply/test/lex_rule3.py +0 -27
  1201. data/modules/emscripten/third_party/ply/test/lex_state1.py +0 -40
  1202. data/modules/emscripten/third_party/ply/test/lex_state2.py +0 -40
  1203. data/modules/emscripten/third_party/ply/test/lex_state3.py +0 -42
  1204. data/modules/emscripten/third_party/ply/test/lex_state4.py +0 -41
  1205. data/modules/emscripten/third_party/ply/test/lex_state5.py +0 -40
  1206. data/modules/emscripten/third_party/ply/test/lex_state_noerror.py +0 -39
  1207. data/modules/emscripten/third_party/ply/test/lex_state_norule.py +0 -40
  1208. data/modules/emscripten/third_party/ply/test/lex_state_try.py +0 -45
  1209. data/modules/emscripten/third_party/ply/test/lex_token1.py +0 -19
  1210. data/modules/emscripten/third_party/ply/test/lex_token2.py +0 -22
  1211. data/modules/emscripten/third_party/ply/test/lex_token3.py +0 -24
  1212. data/modules/emscripten/third_party/ply/test/lex_token4.py +0 -26
  1213. data/modules/emscripten/third_party/ply/test/lex_token5.py +0 -31
  1214. data/modules/emscripten/third_party/ply/test/lex_token_dup.py +0 -29
  1215. data/modules/emscripten/third_party/ply/test/testlex.py +0 -606
  1216. data/modules/emscripten/third_party/ply/test/testyacc.py +0 -347
  1217. data/modules/emscripten/third_party/ply/test/yacc_badargs.py +0 -68
  1218. data/modules/emscripten/third_party/ply/test/yacc_badid.py +0 -77
  1219. data/modules/emscripten/third_party/ply/test/yacc_badprec.py +0 -64
  1220. data/modules/emscripten/third_party/ply/test/yacc_badprec2.py +0 -68
  1221. data/modules/emscripten/third_party/ply/test/yacc_badprec3.py +0 -68
  1222. data/modules/emscripten/third_party/ply/test/yacc_badrule.py +0 -68
  1223. data/modules/emscripten/third_party/ply/test/yacc_badtok.py +0 -68
  1224. data/modules/emscripten/third_party/ply/test/yacc_dup.py +0 -68
  1225. data/modules/emscripten/third_party/ply/test/yacc_error1.py +0 -68
  1226. data/modules/emscripten/third_party/ply/test/yacc_error2.py +0 -68
  1227. data/modules/emscripten/third_party/ply/test/yacc_error3.py +0 -67
  1228. data/modules/emscripten/third_party/ply/test/yacc_error4.py +0 -72
  1229. data/modules/emscripten/third_party/ply/test/yacc_inf.py +0 -56
  1230. data/modules/emscripten/third_party/ply/test/yacc_literal.py +0 -69
  1231. data/modules/emscripten/third_party/ply/test/yacc_misplaced.py +0 -68
  1232. data/modules/emscripten/third_party/ply/test/yacc_missing1.py +0 -68
  1233. data/modules/emscripten/third_party/ply/test/yacc_nested.py +0 -33
  1234. data/modules/emscripten/third_party/ply/test/yacc_nodoc.py +0 -67
  1235. data/modules/emscripten/third_party/ply/test/yacc_noerror.py +0 -66
  1236. data/modules/emscripten/third_party/ply/test/yacc_nop.py +0 -68
  1237. data/modules/emscripten/third_party/ply/test/yacc_notfunc.py +0 -66
  1238. data/modules/emscripten/third_party/ply/test/yacc_notok.py +0 -67
  1239. data/modules/emscripten/third_party/ply/test/yacc_prec1.py +0 -68
  1240. data/modules/emscripten/third_party/ply/test/yacc_rr.py +0 -72
  1241. data/modules/emscripten/third_party/ply/test/yacc_rr_unused.py +0 -30
  1242. data/modules/emscripten/third_party/ply/test/yacc_simple.py +0 -68
  1243. data/modules/emscripten/third_party/ply/test/yacc_sr.py +0 -63
  1244. data/modules/emscripten/third_party/ply/test/yacc_term1.py +0 -68
  1245. data/modules/emscripten/third_party/ply/test/yacc_unused.py +0 -77
  1246. data/modules/emscripten/third_party/ply/test/yacc_unused_rule.py +0 -72
  1247. data/modules/emscripten/third_party/ply/test/yacc_uprec.py +0 -63
  1248. data/modules/emscripten/third_party/ply/test/yacc_uprec2.py +0 -63
  1249. data/modules/emscripten/third_party/readme.txt +0 -7
  1250. data/modules/emscripten/third_party/stb_image.c +0 -4673
  1251. data/modules/emscripten/third_party/websockify/CHANGES.txt +0 -23
  1252. data/modules/emscripten/third_party/websockify/LICENSE.txt +0 -16
  1253. data/modules/emscripten/third_party/websockify/MANIFEST.in +0 -1
  1254. data/modules/emscripten/third_party/websockify/Makefile +0 -11
  1255. data/modules/emscripten/third_party/websockify/README.md +0 -168
  1256. data/modules/emscripten/third_party/websockify/Windows/Windows Service Readme.txt +0 -39
  1257. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/Program.cs +0 -24
  1258. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.Designer.cs +0 -61
  1259. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.cs +0 -19
  1260. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/ProjectInstaller.resx +0 -129
  1261. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/Properties/AssemblyInfo.cs +0 -36
  1262. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/Service1.Designer.cs +0 -37
  1263. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/Service1.cs +0 -41
  1264. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.csproj +0 -75
  1265. data/modules/emscripten/third_party/websockify/Windows/noVNC Websocket Service Project/noVNC Websocket.sln +0 -20
  1266. data/modules/emscripten/third_party/websockify/docs/LICENSE.GPL-3 +0 -621
  1267. data/modules/emscripten/third_party/websockify/docs/LICENSE.LGPL-3 +0 -165
  1268. data/modules/emscripten/third_party/websockify/docs/LICENSE.MPL-2.0 +0 -373
  1269. data/modules/emscripten/third_party/websockify/docs/TODO +0 -9
  1270. data/modules/emscripten/third_party/websockify/docs/flash_policy.txt +0 -4
  1271. data/modules/emscripten/third_party/websockify/docs/latency_results.txt +0 -114
  1272. data/modules/emscripten/third_party/websockify/docs/notes +0 -17
  1273. data/modules/emscripten/third_party/websockify/docs/release.txt +0 -9
  1274. data/modules/emscripten/third_party/websockify/docs/websockify.1 +0 -110
  1275. data/modules/emscripten/third_party/websockify/include/VT100.js +0 -919
  1276. data/modules/emscripten/third_party/websockify/include/base64.js +0 -114
  1277. data/modules/emscripten/third_party/websockify/include/keysym.js +0 -99
  1278. data/modules/emscripten/third_party/websockify/include/util.js +0 -359
  1279. data/modules/emscripten/third_party/websockify/include/web-socket-js/README.txt +0 -109
  1280. data/modules/emscripten/third_party/websockify/include/web-socket-js/WebSocketMain.swf +0 -0
  1281. data/modules/emscripten/third_party/websockify/include/web-socket-js/swfobject.js +0 -4
  1282. data/modules/emscripten/third_party/websockify/include/web-socket-js/web_socket.js +0 -391
  1283. data/modules/emscripten/third_party/websockify/include/websock.js +0 -422
  1284. data/modules/emscripten/third_party/websockify/include/webutil.js +0 -216
  1285. data/modules/emscripten/third_party/websockify/include/wsirc.js +0 -235
  1286. data/modules/emscripten/third_party/websockify/include/wstelnet.js +0 -335
  1287. data/modules/emscripten/third_party/websockify/other/Makefile +0 -14
  1288. data/modules/emscripten/third_party/websockify/other/README.md +0 -51
  1289. data/modules/emscripten/third_party/websockify/other/launch.sh +0 -108
  1290. data/modules/emscripten/third_party/websockify/other/project.clj +0 -13
  1291. data/modules/emscripten/third_party/websockify/other/websocket.c +0 -802
  1292. data/modules/emscripten/third_party/websockify/other/websocket.h +0 -84
  1293. data/modules/emscripten/third_party/websockify/other/websocket.rb +0 -456
  1294. data/modules/emscripten/third_party/websockify/other/websockify.c +0 -385
  1295. data/modules/emscripten/third_party/websockify/other/websockify.clj +0 -233
  1296. data/modules/emscripten/third_party/websockify/other/websockify.js +0 -196
  1297. data/modules/emscripten/third_party/websockify/other/websockify.rb +0 -171
  1298. data/modules/emscripten/third_party/websockify/other/wswrap +0 -22
  1299. data/modules/emscripten/third_party/websockify/rebind +0 -18
  1300. data/modules/emscripten/third_party/websockify/rebind.c +0 -94
  1301. data/modules/emscripten/third_party/websockify/run +0 -5
  1302. data/modules/emscripten/third_party/websockify/setup.py +0 -30
  1303. data/modules/emscripten/third_party/websockify/tests/b64_vs_utf8.py +0 -29
  1304. data/modules/emscripten/third_party/websockify/tests/base64.html +0 -91
  1305. data/modules/emscripten/third_party/websockify/tests/base64.js +0 -12
  1306. data/modules/emscripten/third_party/websockify/tests/echo.html +0 -148
  1307. data/modules/emscripten/third_party/websockify/tests/echo.py +0 -75
  1308. data/modules/emscripten/third_party/websockify/tests/echo.rb +0 -62
  1309. data/modules/emscripten/third_party/websockify/tests/latency.html +0 -290
  1310. data/modules/emscripten/third_party/websockify/tests/latency.py +0 -75
  1311. data/modules/emscripten/third_party/websockify/tests/load.html +0 -250
  1312. data/modules/emscripten/third_party/websockify/tests/load.py +0 -167
  1313. data/modules/emscripten/third_party/websockify/tests/plain_echo.html +0 -168
  1314. data/modules/emscripten/third_party/websockify/tests/simple.html +0 -68
  1315. data/modules/emscripten/third_party/websockify/tests/utf8-list.py +0 -22
  1316. data/modules/emscripten/third_party/websockify/websockify/__init__.py +0 -2
  1317. data/modules/emscripten/third_party/websockify/websockify/websocket.py +0 -982
  1318. data/modules/emscripten/third_party/websockify/websockify/websocketproxy.py +0 -393
  1319. data/modules/emscripten/third_party/websockify/websockify.py +0 -5
  1320. data/modules/emscripten/third_party/websockify/wsirc.html +0 -99
  1321. data/modules/emscripten/third_party/websockify/wstelnet.html +0 -74
  1322. data/modules/emscripten/tools/__init__.py +0 -0
  1323. data/modules/emscripten/tools/asm_module.py +0 -275
  1324. data/modules/emscripten/tools/autodebugger.py +0 -291
  1325. data/modules/emscripten/tools/autodebugger_c.py +0 -37
  1326. data/modules/emscripten/tools/autodebugger_indenter.py +0 -18
  1327. data/modules/emscripten/tools/autodebugger_js.py +0 -47
  1328. data/modules/emscripten/tools/autodediffer.py +0 -60
  1329. data/modules/emscripten/tools/bindings_generator.py +0 -832
  1330. data/modules/emscripten/tools/bisect_pair.py +0 -88
  1331. data/modules/emscripten/tools/cache.py +0 -196
  1332. data/modules/emscripten/tools/clean_webconsole.py +0 -34
  1333. data/modules/emscripten/tools/crunch-worker.js +0 -124
  1334. data/modules/emscripten/tools/diff_autodebugger.py +0 -15
  1335. data/modules/emscripten/tools/eliminator/asm-eliminator-test-output.js +0 -307
  1336. data/modules/emscripten/tools/eliminator/asm-eliminator-test.js +0 -382
  1337. data/modules/emscripten/tools/eliminator/eliminator-test-output.js +0 -6136
  1338. data/modules/emscripten/tools/eliminator/eliminator-test.js +0 -8879
  1339. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/README.html +0 -888
  1340. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/README.org +0 -463
  1341. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/bin/uglifyjs +0 -317
  1342. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/docstyle.css +0 -75
  1343. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/lib/object-ast.js +0 -75
  1344. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/lib/parse-js.js +0 -1363
  1345. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/lib/process.js +0 -2005
  1346. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/lib/squeeze-more.js +0 -51
  1347. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/package.json +0 -22
  1348. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/beautify.js +0 -28
  1349. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/testparser.js +0 -402
  1350. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/array1.js +0 -1
  1351. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/array2.js +0 -1
  1352. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/array3.js +0 -1
  1353. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/array4.js +0 -1
  1354. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/assignment.js +0 -1
  1355. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/concatstring.js +0 -1
  1356. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/const.js +0 -1
  1357. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/empty-blocks.js +0 -1
  1358. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/forstatement.js +0 -1
  1359. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/if.js +0 -1
  1360. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/ifreturn.js +0 -1
  1361. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/ifreturn2.js +0 -1
  1362. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue10.js +0 -1
  1363. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue11.js +0 -1
  1364. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue13.js +0 -1
  1365. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue14.js +0 -1
  1366. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue16.js +0 -1
  1367. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue17.js +0 -1
  1368. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue20.js +0 -1
  1369. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue21.js +0 -1
  1370. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue25.js +0 -1
  1371. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue27.js +0 -1
  1372. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue28.js +0 -1
  1373. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue29.js +0 -1
  1374. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue30.js +0 -1
  1375. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue34.js +0 -1
  1376. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue4.js +0 -1
  1377. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue48.js +0 -1
  1378. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue50.js +0 -1
  1379. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue53.js +0 -1
  1380. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue54.1.js +0 -1
  1381. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue68.js +0 -1
  1382. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue69.js +0 -1
  1383. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/issue9.js +0 -1
  1384. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/mangle.js +0 -1
  1385. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/strict-equals.js +0 -1
  1386. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/var.js +0 -1
  1387. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/expected/with.js +0 -1
  1388. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/array1.js +0 -3
  1389. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/array2.js +0 -4
  1390. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/array3.js +0 -4
  1391. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/array4.js +0 -6
  1392. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/assignment.js +0 -20
  1393. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/concatstring.js +0 -3
  1394. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/const.js +0 -5
  1395. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/empty-blocks.js +0 -4
  1396. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/forstatement.js +0 -10
  1397. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/if.js +0 -6
  1398. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/ifreturn.js +0 -9
  1399. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/ifreturn2.js +0 -16
  1400. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue10.js +0 -1
  1401. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue11.js +0 -3
  1402. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue13.js +0 -1
  1403. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue14.js +0 -1
  1404. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue16.js +0 -1
  1405. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue17.js +0 -4
  1406. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue20.js +0 -1
  1407. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue21.js +0 -6
  1408. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue25.js +0 -7
  1409. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue27.js +0 -1
  1410. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue28.js +0 -3
  1411. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue29.js +0 -1
  1412. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue30.js +0 -3
  1413. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue34.js +0 -3
  1414. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue4.js +0 -3
  1415. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue48.js +0 -1
  1416. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue50.js +0 -9
  1417. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue53.js +0 -1
  1418. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue54.1.js +0 -3
  1419. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue68.js +0 -5
  1420. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue69.js +0 -1
  1421. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/issue9.js +0 -4
  1422. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/mangle.js +0 -5
  1423. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/strict-equals.js +0 -3
  1424. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/var.js +0 -3
  1425. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/compress/test/with.js +0 -2
  1426. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/test/unit/scripts.js +0 -55
  1427. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/tmp/hoist.js +0 -33
  1428. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/tmp/instrument.js +0 -97
  1429. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/tmp/instrument2.js +0 -138
  1430. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/tmp/test.js +0 -16
  1431. data/modules/emscripten/tools/eliminator/node_modules/uglify-js/uglify-js.js +0 -17
  1432. data/modules/emscripten/tools/eliminator/safe-eliminator-test-output.js +0 -85
  1433. data/modules/emscripten/tools/eliminator/safe-eliminator-test.js +0 -103
  1434. data/modules/emscripten/tools/emconfiguren.py +0 -19
  1435. data/modules/emscripten/tools/emmaken.py +0 -230
  1436. data/modules/emscripten/tools/emmakenxx.py +0 -18
  1437. data/modules/emscripten/tools/exec_llvm.py +0 -50
  1438. data/modules/emscripten/tools/file2json.py +0 -49
  1439. data/modules/emscripten/tools/file_packager.py +0 -719
  1440. data/modules/emscripten/tools/find_bigfuncs.py +0 -23
  1441. data/modules/emscripten/tools/find_bigis.py +0 -18
  1442. data/modules/emscripten/tools/find_bigvars.py +0 -24
  1443. data/modules/emscripten/tools/fix_closure.py +0 -88
  1444. data/modules/emscripten/tools/gen_struct_info.py +0 -509
  1445. data/modules/emscripten/tools/ie7_fix.py +0 -14
  1446. data/modules/emscripten/tools/js-optimizer.js +0 -4023
  1447. data/modules/emscripten/tools/js_optimizer.py +0 -357
  1448. data/modules/emscripten/tools/jsrun.py +0 -37
  1449. data/modules/emscripten/tools/ll-strip.py +0 -56
  1450. data/modules/emscripten/tools/make_file.py +0 -19
  1451. data/modules/emscripten/tools/make_minigzip.py +0 -13
  1452. data/modules/emscripten/tools/merge_asm.py +0 -26
  1453. data/modules/emscripten/tools/namespacer.py +0 -95
  1454. data/modules/emscripten/tools/nativize_llvm.py +0 -34
  1455. data/modules/emscripten/tools/node_modules/source-map/CHANGELOG.md +0 -58
  1456. data/modules/emscripten/tools/node_modules/source-map/LICENSE +0 -28
  1457. data/modules/emscripten/tools/node_modules/source-map/Makefile.dryice.js +0 -166
  1458. data/modules/emscripten/tools/node_modules/source-map/README.md +0 -347
  1459. data/modules/emscripten/tools/node_modules/source-map/build/assert-shim.js +0 -56
  1460. data/modules/emscripten/tools/node_modules/source-map/build/mini-require.js +0 -152
  1461. data/modules/emscripten/tools/node_modules/source-map/build/prefix-source-map.jsm +0 -20
  1462. data/modules/emscripten/tools/node_modules/source-map/build/prefix-utils.jsm +0 -18
  1463. data/modules/emscripten/tools/node_modules/source-map/build/suffix-browser.js +0 -8
  1464. data/modules/emscripten/tools/node_modules/source-map/build/suffix-source-map.jsm +0 -6
  1465. data/modules/emscripten/tools/node_modules/source-map/build/suffix-utils.jsm +0 -21
  1466. data/modules/emscripten/tools/node_modules/source-map/build/test-prefix.js +0 -8
  1467. data/modules/emscripten/tools/node_modules/source-map/build/test-suffix.js +0 -3
  1468. data/modules/emscripten/tools/node_modules/source-map/lib/source-map/array-set.js +0 -96
  1469. data/modules/emscripten/tools/node_modules/source-map/lib/source-map/base64-vlq.js +0 -144
  1470. data/modules/emscripten/tools/node_modules/source-map/lib/source-map/base64.js +0 -42
  1471. data/modules/emscripten/tools/node_modules/source-map/lib/source-map/binary-search.js +0 -81
  1472. data/modules/emscripten/tools/node_modules/source-map/lib/source-map/source-map-consumer.js +0 -430
  1473. data/modules/emscripten/tools/node_modules/source-map/lib/source-map/source-map-generator.js +0 -381
  1474. data/modules/emscripten/tools/node_modules/source-map/lib/source-map/source-node.js +0 -353
  1475. data/modules/emscripten/tools/node_modules/source-map/lib/source-map/util.js +0 -117
  1476. data/modules/emscripten/tools/node_modules/source-map/lib/source-map.js +0 -8
  1477. data/modules/emscripten/tools/node_modules/source-map/node_modules/amdefine/LICENSE +0 -58
  1478. data/modules/emscripten/tools/node_modules/source-map/node_modules/amdefine/README.md +0 -119
  1479. data/modules/emscripten/tools/node_modules/source-map/node_modules/amdefine/amdefine.js +0 -299
  1480. data/modules/emscripten/tools/node_modules/source-map/node_modules/amdefine/package.json +0 -33
  1481. data/modules/emscripten/tools/node_modules/source-map/package.json +0 -74
  1482. data/modules/emscripten/tools/node_modules/source-map/test/run-tests.js +0 -73
  1483. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-api.js +0 -26
  1484. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-array-set.js +0 -71
  1485. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-base64-vlq.js +0 -24
  1486. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-base64.js +0 -35
  1487. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-binary-search.js +0 -54
  1488. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-dog-fooding.js +0 -72
  1489. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-source-map-consumer.js +0 -306
  1490. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-source-map-generator.js +0 -391
  1491. data/modules/emscripten/tools/node_modules/source-map/test/source-map/test-source-node.js +0 -282
  1492. data/modules/emscripten/tools/node_modules/source-map/test/source-map/util.js +0 -152
  1493. data/modules/emscripten/tools/reproduceriter.js +0 -216
  1494. data/modules/emscripten/tools/reproduceriter.py +0 -160
  1495. data/modules/emscripten/tools/response_file.py +0 -34
  1496. data/modules/emscripten/tools/scan_js.py +0 -20
  1497. data/modules/emscripten/tools/scan_ll.py +0 -18
  1498. data/modules/emscripten/tools/scons/site_scons/site_tools/emscripten/__init__.py +0 -3
  1499. data/modules/emscripten/tools/scons/site_scons/site_tools/emscripten/emscripten.py +0 -46
  1500. data/modules/emscripten/tools/settings_template_readonly.py +0 -49
  1501. data/modules/emscripten/tools/shared.py +0 -1705
  1502. data/modules/emscripten/tools/source-maps/sourcemap2json.js +0 -15
  1503. data/modules/emscripten/tools/source-maps/sourcemapper.js +0 -208
  1504. data/modules/emscripten/tools/split.py +0 -105
  1505. data/modules/emscripten/tools/split_asm.py +0 -30
  1506. data/modules/emscripten/tools/tempfiles.py +0 -41
  1507. data/modules/emscripten/tools/test-js-optimizer-asm-last-output.js +0 -75
  1508. data/modules/emscripten/tools/test-js-optimizer-asm-last.js +0 -91
  1509. data/modules/emscripten/tools/test-js-optimizer-asm-minlast-output.js +0 -2
  1510. data/modules/emscripten/tools/test-js-optimizer-asm-minlast.js +0 -8
  1511. data/modules/emscripten/tools/test-js-optimizer-asm-outline1-output.js +0 -929
  1512. data/modules/emscripten/tools/test-js-optimizer-asm-outline1.js +0 -351
  1513. data/modules/emscripten/tools/test-js-optimizer-asm-outline2-output.js +0 -793
  1514. data/modules/emscripten/tools/test-js-optimizer-asm-outline2.js +0 -606
  1515. data/modules/emscripten/tools/test-js-optimizer-asm-outline3-output.js +0 -28
  1516. data/modules/emscripten/tools/test-js-optimizer-asm-outline3.js +0 -30
  1517. data/modules/emscripten/tools/test-js-optimizer-asm-pre-output.js +0 -522
  1518. data/modules/emscripten/tools/test-js-optimizer-asm-pre.js +0 -533
  1519. data/modules/emscripten/tools/test-js-optimizer-asm-regs-min-output.js +0 -36
  1520. data/modules/emscripten/tools/test-js-optimizer-asm-regs-min.js +0 -37
  1521. data/modules/emscripten/tools/test-js-optimizer-asm-regs-output.js +0 -106
  1522. data/modules/emscripten/tools/test-js-optimizer-asm-regs.js +0 -110
  1523. data/modules/emscripten/tools/test-js-optimizer-asm-relocate-output.js +0 -9
  1524. data/modules/emscripten/tools/test-js-optimizer-asm-relocate.js +0 -12
  1525. data/modules/emscripten/tools/test-js-optimizer-output.js +0 -291
  1526. data/modules/emscripten/tools/test-js-optimizer-regs-output.js +0 -232
  1527. data/modules/emscripten/tools/test-js-optimizer-regs.js +0 -237
  1528. data/modules/emscripten/tools/test-js-optimizer-t2-output.js +0 -91
  1529. data/modules/emscripten/tools/test-js-optimizer-t2.js +0 -92
  1530. data/modules/emscripten/tools/test-js-optimizer-t2c-output.js +0 -17
  1531. data/modules/emscripten/tools/test-js-optimizer-t2c.js +0 -18
  1532. data/modules/emscripten/tools/test-js-optimizer-t3-output.js +0 -49
  1533. data/modules/emscripten/tools/test-js-optimizer-t3.js +0 -50
  1534. data/modules/emscripten/tools/test-js-optimizer.js +0 -401
  1535. data/modules/emscripten/tools/validate_asmjs.py +0 -82
  1536. data/modules/mruby/mrblib/print.rb +0 -18
  1537. data/modules/mruby/src/re.h +0 -12
@@ -1,3870 +0,0 @@
1
- /*! Socket.IO.js build:0.9.11, development. Copyright(c) 2011 LearnBoost <dev@learnboost.com> MIT Licensed */
2
-
3
- (function(global) {
4
-
5
- var io = ('undefined' === typeof module ? {} : module.exports);
6
-
7
- /**
8
- * socket.io
9
- * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
10
- * MIT Licensed
11
- */
12
-
13
- (function (exports) {
14
-
15
- /**
16
- * IO namespace.
17
- *
18
- * @namespace
19
- */
20
-
21
- var io = exports;
22
-
23
- /**
24
- * Socket.IO version
25
- *
26
- * @api public
27
- */
28
-
29
- io.version = '0.9.11';
30
-
31
- /**
32
- * Protocol implemented.
33
- *
34
- * @api public
35
- */
36
-
37
- io.protocol = 1;
38
-
39
- /**
40
- * Available transports, these will be populated with the available transports
41
- *
42
- * @api public
43
- */
44
-
45
- io.transports = [];
46
-
47
- /**
48
- * Keep track of jsonp callbacks.
49
- *
50
- * @api private
51
- */
52
-
53
- io.j = [];
54
-
55
- /**
56
- * Keep track of our io.Sockets
57
- *
58
- * @api private
59
- */
60
- io.sockets = {};
61
-
62
-
63
- /**
64
- * Manages connections to hosts.
65
- *
66
- * @param {String} uri
67
- * @Param {Boolean} force creation of new socket (defaults to false)
68
- * @api public
69
- */
70
-
71
- io.connect = function (host, details) {
72
- var uri = io.util.parseUri(host)
73
- , uuri
74
- , socket;
75
-
76
- if (global && global.location) {
77
- uri.protocol = uri.protocol || global.location.protocol.slice(0, -1);
78
- uri.host = uri.host || (global.document
79
- ? global.document.domain : global.location.hostname);
80
- uri.port = uri.port || global.location.port;
81
- }
82
-
83
- uuri = io.util.uniqueUri(uri);
84
-
85
- var options = {
86
- host: uri.host
87
- , secure: 'https' == uri.protocol
88
- , port: uri.port || ('https' == uri.protocol ? 443 : 80)
89
- , query: uri.query || ''
90
- };
91
-
92
- io.util.merge(options, details);
93
-
94
- if (options['force new connection'] || !io.sockets[uuri]) {
95
- socket = new io.Socket(options);
96
- }
97
-
98
- if (!options['force new connection'] && socket) {
99
- io.sockets[uuri] = socket;
100
- }
101
-
102
- socket = socket || io.sockets[uuri];
103
-
104
- // if path is different from '' or /
105
- return socket.of(uri.path.length > 1 ? uri.path : '');
106
- };
107
-
108
- })('object' === typeof module ? module.exports : (io = {}));
109
- /**
110
- * socket.io
111
- * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
112
- * MIT Licensed
113
- */
114
-
115
- (function (exports) {
116
-
117
- /**
118
- * Utilities namespace.
119
- *
120
- * @namespace
121
- */
122
-
123
- var util = exports.util = {};
124
-
125
- /**
126
- * Parses an URI
127
- *
128
- * @author Steven Levithan <stevenlevithan.com> (MIT license)
129
- * @api public
130
- */
131
-
132
- var re = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;
133
-
134
- var parts = ['source', 'protocol', 'authority', 'userInfo', 'user', 'password',
135
- 'host', 'port', 'relative', 'path', 'directory', 'file', 'query',
136
- 'anchor'];
137
-
138
- util.parseUri = function (str) {
139
- var m = re.exec(str || '')
140
- , uri = {}
141
- , i = 14;
142
-
143
- while (i--) {
144
- uri[parts[i]] = m[i] || '';
145
- }
146
-
147
- return uri;
148
- };
149
-
150
- /**
151
- * Produces a unique url that identifies a Socket.IO connection.
152
- *
153
- * @param {Object} uri
154
- * @api public
155
- */
156
-
157
- util.uniqueUri = function (uri) {
158
- var protocol = uri.protocol
159
- , host = uri.host
160
- , port = uri.port;
161
-
162
- if ('document' in global) {
163
- host = host || document.domain;
164
- port = port || (protocol == 'https'
165
- && document.location.protocol !== 'https:' ? 443 : document.location.port);
166
- } else {
167
- host = host || 'localhost';
168
-
169
- if (!port && protocol == 'https') {
170
- port = 443;
171
- }
172
- }
173
-
174
- return (protocol || 'http') + '://' + host + ':' + (port || 80);
175
- };
176
-
177
- /**
178
- * Mergest 2 query strings in to once unique query string
179
- *
180
- * @param {String} base
181
- * @param {String} addition
182
- * @api public
183
- */
184
-
185
- util.query = function (base, addition) {
186
- var query = util.chunkQuery(base || '')
187
- , components = [];
188
-
189
- util.merge(query, util.chunkQuery(addition || ''));
190
- for (var part in query) {
191
- if (query.hasOwnProperty(part)) {
192
- components.push(part + '=' + query[part]);
193
- }
194
- }
195
-
196
- return components.length ? '?' + components.join('&') : '';
197
- };
198
-
199
- /**
200
- * Transforms a querystring in to an object
201
- *
202
- * @param {String} qs
203
- * @api public
204
- */
205
-
206
- util.chunkQuery = function (qs) {
207
- var query = {}
208
- , params = qs.split('&')
209
- , i = 0
210
- , l = params.length
211
- , kv;
212
-
213
- for (; i < l; ++i) {
214
- kv = params[i].split('=');
215
- if (kv[0]) {
216
- query[kv[0]] = kv[1];
217
- }
218
- }
219
-
220
- return query;
221
- };
222
-
223
- /**
224
- * Executes the given function when the page is loaded.
225
- *
226
- * io.util.load(function () { console.log('page loaded'); });
227
- *
228
- * @param {Function} fn
229
- * @api public
230
- */
231
-
232
- var pageLoaded = false;
233
-
234
- util.load = function (fn) {
235
- if ('document' in global && document.readyState === 'complete' || pageLoaded) {
236
- return fn();
237
- }
238
-
239
- util.on(global, 'load', fn, false);
240
- };
241
-
242
- /**
243
- * Adds an event.
244
- *
245
- * @api private
246
- */
247
-
248
- util.on = function (element, event, fn, capture) {
249
- if (element.attachEvent) {
250
- element.attachEvent('on' + event, fn);
251
- } else if (element.addEventListener) {
252
- element.addEventListener(event, fn, capture);
253
- }
254
- };
255
-
256
- /**
257
- * Generates the correct `XMLHttpRequest` for regular and cross domain requests.
258
- *
259
- * @param {Boolean} [xdomain] Create a request that can be used cross domain.
260
- * @returns {XMLHttpRequest|false} If we can create a XMLHttpRequest.
261
- * @api private
262
- */
263
-
264
- util.request = function (xdomain) {
265
-
266
- if (xdomain && 'undefined' != typeof XDomainRequest && !util.ua.hasCORS) {
267
- return new XDomainRequest();
268
- }
269
-
270
- if ('undefined' != typeof XMLHttpRequest && (!xdomain || util.ua.hasCORS)) {
271
- return new XMLHttpRequest();
272
- }
273
-
274
- if (!xdomain) {
275
- try {
276
- return new window[(['Active'].concat('Object').join('X'))]('Microsoft.XMLHTTP');
277
- } catch(e) { }
278
- }
279
-
280
- return null;
281
- };
282
-
283
- /**
284
- * XHR based transport constructor.
285
- *
286
- * @constructor
287
- * @api public
288
- */
289
-
290
- /**
291
- * Change the internal pageLoaded value.
292
- */
293
-
294
- if ('undefined' != typeof window) {
295
- util.load(function () {
296
- pageLoaded = true;
297
- });
298
- }
299
-
300
- /**
301
- * Defers a function to ensure a spinner is not displayed by the browser
302
- *
303
- * @param {Function} fn
304
- * @api public
305
- */
306
-
307
- util.defer = function (fn) {
308
- if (!util.ua.webkit || 'undefined' != typeof importScripts) {
309
- return fn();
310
- }
311
-
312
- util.load(function () {
313
- setTimeout(fn, 100);
314
- });
315
- };
316
-
317
- /**
318
- * Merges two objects.
319
- *
320
- * @api public
321
- */
322
-
323
- util.merge = function merge (target, additional, deep, lastseen) {
324
- var seen = lastseen || []
325
- , depth = typeof deep == 'undefined' ? 2 : deep
326
- , prop;
327
-
328
- for (prop in additional) {
329
- if (additional.hasOwnProperty(prop) && util.indexOf(seen, prop) < 0) {
330
- if (typeof target[prop] !== 'object' || !depth) {
331
- target[prop] = additional[prop];
332
- seen.push(additional[prop]);
333
- } else {
334
- util.merge(target[prop], additional[prop], depth - 1, seen);
335
- }
336
- }
337
- }
338
-
339
- return target;
340
- };
341
-
342
- /**
343
- * Merges prototypes from objects
344
- *
345
- * @api public
346
- */
347
-
348
- util.mixin = function (ctor, ctor2) {
349
- util.merge(ctor.prototype, ctor2.prototype);
350
- };
351
-
352
- /**
353
- * Shortcut for prototypical and static inheritance.
354
- *
355
- * @api private
356
- */
357
-
358
- util.inherit = function (ctor, ctor2) {
359
- function f() {};
360
- f.prototype = ctor2.prototype;
361
- ctor.prototype = new f;
362
- };
363
-
364
- /**
365
- * Checks if the given object is an Array.
366
- *
367
- * io.util.isArray([]); // true
368
- * io.util.isArray({}); // false
369
- *
370
- * @param Object obj
371
- * @api public
372
- */
373
-
374
- util.isArray = Array.isArray || function (obj) {
375
- return Object.prototype.toString.call(obj) === '[object Array]';
376
- };
377
-
378
- /**
379
- * Intersects values of two arrays into a third
380
- *
381
- * @api public
382
- */
383
-
384
- util.intersect = function (arr, arr2) {
385
- var ret = []
386
- , longest = arr.length > arr2.length ? arr : arr2
387
- , shortest = arr.length > arr2.length ? arr2 : arr;
388
-
389
- for (var i = 0, l = shortest.length; i < l; i++) {
390
- if (~util.indexOf(longest, shortest[i]))
391
- ret.push(shortest[i]);
392
- }
393
-
394
- return ret;
395
- };
396
-
397
- /**
398
- * Array indexOf compatibility.
399
- *
400
- * @see bit.ly/a5Dxa2
401
- * @api public
402
- */
403
-
404
- util.indexOf = function (arr, o, i) {
405
-
406
- for (var j = arr.length, i = i < 0 ? i + j < 0 ? 0 : i + j : i || 0;
407
- i < j && arr[i] !== o; i++) {}
408
-
409
- return j <= i ? -1 : i;
410
- };
411
-
412
- /**
413
- * Converts enumerables to array.
414
- *
415
- * @api public
416
- */
417
-
418
- util.toArray = function (enu) {
419
- var arr = [];
420
-
421
- for (var i = 0, l = enu.length; i < l; i++)
422
- arr.push(enu[i]);
423
-
424
- return arr;
425
- };
426
-
427
- /**
428
- * UA / engines detection namespace.
429
- *
430
- * @namespace
431
- */
432
-
433
- util.ua = {};
434
-
435
- /**
436
- * Whether the UA supports CORS for XHR.
437
- *
438
- * @api public
439
- */
440
-
441
- util.ua.hasCORS = 'undefined' != typeof XMLHttpRequest && (function () {
442
- try {
443
- var a = new XMLHttpRequest();
444
- } catch (e) {
445
- return false;
446
- }
447
-
448
- return a.withCredentials != undefined;
449
- })();
450
-
451
- /**
452
- * Detect webkit.
453
- *
454
- * @api public
455
- */
456
-
457
- util.ua.webkit = 'undefined' != typeof navigator
458
- && /webkit/i.test(navigator.userAgent);
459
-
460
- /**
461
- * Detect iPad/iPhone/iPod.
462
- *
463
- * @api public
464
- */
465
-
466
- util.ua.iDevice = 'undefined' != typeof navigator
467
- && /iPad|iPhone|iPod/i.test(navigator.userAgent);
468
-
469
- })('undefined' != typeof io ? io : module.exports);
470
- /**
471
- * socket.io
472
- * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
473
- * MIT Licensed
474
- */
475
-
476
- (function (exports, io) {
477
-
478
- /**
479
- * Expose constructor.
480
- */
481
-
482
- exports.EventEmitter = EventEmitter;
483
-
484
- /**
485
- * Event emitter constructor.
486
- *
487
- * @api public.
488
- */
489
-
490
- function EventEmitter () {};
491
-
492
- /**
493
- * Adds a listener
494
- *
495
- * @api public
496
- */
497
-
498
- EventEmitter.prototype.on = function (name, fn) {
499
- if (!this.$events) {
500
- this.$events = {};
501
- }
502
-
503
- if (!this.$events[name]) {
504
- this.$events[name] = fn;
505
- } else if (io.util.isArray(this.$events[name])) {
506
- this.$events[name].push(fn);
507
- } else {
508
- this.$events[name] = [this.$events[name], fn];
509
- }
510
-
511
- return this;
512
- };
513
-
514
- EventEmitter.prototype.addListener = EventEmitter.prototype.on;
515
-
516
- /**
517
- * Adds a volatile listener.
518
- *
519
- * @api public
520
- */
521
-
522
- EventEmitter.prototype.once = function (name, fn) {
523
- var self = this;
524
-
525
- function on () {
526
- self.removeListener(name, on);
527
- fn.apply(this, arguments);
528
- };
529
-
530
- on.listener = fn;
531
- this.on(name, on);
532
-
533
- return this;
534
- };
535
-
536
- /**
537
- * Removes a listener.
538
- *
539
- * @api public
540
- */
541
-
542
- EventEmitter.prototype.removeListener = function (name, fn) {
543
- if (this.$events && this.$events[name]) {
544
- var list = this.$events[name];
545
-
546
- if (io.util.isArray(list)) {
547
- var pos = -1;
548
-
549
- for (var i = 0, l = list.length; i < l; i++) {
550
- if (list[i] === fn || (list[i].listener && list[i].listener === fn)) {
551
- pos = i;
552
- break;
553
- }
554
- }
555
-
556
- if (pos < 0) {
557
- return this;
558
- }
559
-
560
- list.splice(pos, 1);
561
-
562
- if (!list.length) {
563
- delete this.$events[name];
564
- }
565
- } else if (list === fn || (list.listener && list.listener === fn)) {
566
- delete this.$events[name];
567
- }
568
- }
569
-
570
- return this;
571
- };
572
-
573
- /**
574
- * Removes all listeners for an event.
575
- *
576
- * @api public
577
- */
578
-
579
- EventEmitter.prototype.removeAllListeners = function (name) {
580
- if (name === undefined) {
581
- this.$events = {};
582
- return this;
583
- }
584
-
585
- if (this.$events && this.$events[name]) {
586
- this.$events[name] = null;
587
- }
588
-
589
- return this;
590
- };
591
-
592
- /**
593
- * Gets all listeners for a certain event.
594
- *
595
- * @api publci
596
- */
597
-
598
- EventEmitter.prototype.listeners = function (name) {
599
- if (!this.$events) {
600
- this.$events = {};
601
- }
602
-
603
- if (!this.$events[name]) {
604
- this.$events[name] = [];
605
- }
606
-
607
- if (!io.util.isArray(this.$events[name])) {
608
- this.$events[name] = [this.$events[name]];
609
- }
610
-
611
- return this.$events[name];
612
- };
613
-
614
- /**
615
- * Emits an event.
616
- *
617
- * @api public
618
- */
619
-
620
- EventEmitter.prototype.emit = function (name) {
621
- if (!this.$events) {
622
- return false;
623
- }
624
-
625
- var handler = this.$events[name];
626
-
627
- if (!handler) {
628
- return false;
629
- }
630
-
631
- var args = Array.prototype.slice.call(arguments, 1);
632
-
633
- if ('function' == typeof handler) {
634
- handler.apply(this, args);
635
- } else if (io.util.isArray(handler)) {
636
- var listeners = handler.slice();
637
-
638
- for (var i = 0, l = listeners.length; i < l; i++) {
639
- listeners[i].apply(this, args);
640
- }
641
- } else {
642
- return false;
643
- }
644
-
645
- return true;
646
- };
647
-
648
- })(
649
- 'undefined' != typeof io ? io : module.exports
650
- , 'undefined' != typeof io ? io : module.parent.exports
651
- );
652
-
653
- /**
654
- * socket.io
655
- * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
656
- * MIT Licensed
657
- */
658
-
659
- /**
660
- * Based on JSON2 (http://www.JSON.org/js.html).
661
- */
662
-
663
- (function (exports, nativeJSON) {
664
- "use strict";
665
-
666
- // use native JSON if it's available
667
- if (nativeJSON && nativeJSON.parse){
668
- return exports.JSON = {
669
- parse: nativeJSON.parse
670
- , stringify: nativeJSON.stringify
671
- };
672
- }
673
-
674
- var JSON = exports.JSON = {};
675
-
676
- function f(n) {
677
- // Format integers to have at least two digits.
678
- return n < 10 ? '0' + n : n;
679
- }
680
-
681
- function date(d, key) {
682
- return isFinite(d.valueOf()) ?
683
- d.getUTCFullYear() + '-' +
684
- f(d.getUTCMonth() + 1) + '-' +
685
- f(d.getUTCDate()) + 'T' +
686
- f(d.getUTCHours()) + ':' +
687
- f(d.getUTCMinutes()) + ':' +
688
- f(d.getUTCSeconds()) + 'Z' : null;
689
- };
690
-
691
- var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
692
- escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
693
- gap,
694
- indent,
695
- meta = { // table of character substitutions
696
- '\b': '\\b',
697
- '\t': '\\t',
698
- '\n': '\\n',
699
- '\f': '\\f',
700
- '\r': '\\r',
701
- '"' : '\\"',
702
- '\\': '\\\\'
703
- },
704
- rep;
705
-
706
-
707
- function quote(string) {
708
-
709
- // If the string contains no control characters, no quote characters, and no
710
- // backslash characters, then we can safely slap some quotes around it.
711
- // Otherwise we must also replace the offending characters with safe escape
712
- // sequences.
713
-
714
- escapable.lastIndex = 0;
715
- return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
716
- var c = meta[a];
717
- return typeof c === 'string' ? c :
718
- '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
719
- }) + '"' : '"' + string + '"';
720
- }
721
-
722
-
723
- function str(key, holder) {
724
-
725
- // Produce a string from holder[key].
726
-
727
- var i, // The loop counter.
728
- k, // The member key.
729
- v, // The member value.
730
- length,
731
- mind = gap,
732
- partial,
733
- value = holder[key];
734
-
735
- // If the value has a toJSON method, call it to obtain a replacement value.
736
-
737
- if (value instanceof Date) {
738
- value = date(key);
739
- }
740
-
741
- // If we were called with a replacer function, then call the replacer to
742
- // obtain a replacement value.
743
-
744
- if (typeof rep === 'function') {
745
- value = rep.call(holder, key, value);
746
- }
747
-
748
- // What happens next depends on the value's type.
749
-
750
- switch (typeof value) {
751
- case 'string':
752
- return quote(value);
753
-
754
- case 'number':
755
-
756
- // JSON numbers must be finite. Encode non-finite numbers as null.
757
-
758
- return isFinite(value) ? String(value) : 'null';
759
-
760
- case 'boolean':
761
- case 'null':
762
-
763
- // If the value is a boolean or null, convert it to a string. Note:
764
- // typeof null does not produce 'null'. The case is included here in
765
- // the remote chance that this gets fixed someday.
766
-
767
- return String(value);
768
-
769
- // If the type is 'object', we might be dealing with an object or an array or
770
- // null.
771
-
772
- case 'object':
773
-
774
- // Due to a specification blunder in ECMAScript, typeof null is 'object',
775
- // so watch out for that case.
776
-
777
- if (!value) {
778
- return 'null';
779
- }
780
-
781
- // Make an array to hold the partial results of stringifying this object value.
782
-
783
- gap += indent;
784
- partial = [];
785
-
786
- // Is the value an array?
787
-
788
- if (Object.prototype.toString.apply(value) === '[object Array]') {
789
-
790
- // The value is an array. Stringify every element. Use null as a placeholder
791
- // for non-JSON values.
792
-
793
- length = value.length;
794
- for (i = 0; i < length; i += 1) {
795
- partial[i] = str(i, value) || 'null';
796
- }
797
-
798
- // Join all of the elements together, separated with commas, and wrap them in
799
- // brackets.
800
-
801
- v = partial.length === 0 ? '[]' : gap ?
802
- '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' :
803
- '[' + partial.join(',') + ']';
804
- gap = mind;
805
- return v;
806
- }
807
-
808
- // If the replacer is an array, use it to select the members to be stringified.
809
-
810
- if (rep && typeof rep === 'object') {
811
- length = rep.length;
812
- for (i = 0; i < length; i += 1) {
813
- if (typeof rep[i] === 'string') {
814
- k = rep[i];
815
- v = str(k, value);
816
- if (v) {
817
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
818
- }
819
- }
820
- }
821
- } else {
822
-
823
- // Otherwise, iterate through all of the keys in the object.
824
-
825
- for (k in value) {
826
- if (Object.prototype.hasOwnProperty.call(value, k)) {
827
- v = str(k, value);
828
- if (v) {
829
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
830
- }
831
- }
832
- }
833
- }
834
-
835
- // Join all of the member texts together, separated with commas,
836
- // and wrap them in braces.
837
-
838
- v = partial.length === 0 ? '{}' : gap ?
839
- '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' :
840
- '{' + partial.join(',') + '}';
841
- gap = mind;
842
- return v;
843
- }
844
- }
845
-
846
- // If the JSON object does not yet have a stringify method, give it one.
847
-
848
- JSON.stringify = function (value, replacer, space) {
849
-
850
- // The stringify method takes a value and an optional replacer, and an optional
851
- // space parameter, and returns a JSON text. The replacer can be a function
852
- // that can replace values, or an array of strings that will select the keys.
853
- // A default replacer method can be provided. Use of the space parameter can
854
- // produce text that is more easily readable.
855
-
856
- var i;
857
- gap = '';
858
- indent = '';
859
-
860
- // If the space parameter is a number, make an indent string containing that
861
- // many spaces.
862
-
863
- if (typeof space === 'number') {
864
- for (i = 0; i < space; i += 1) {
865
- indent += ' ';
866
- }
867
-
868
- // If the space parameter is a string, it will be used as the indent string.
869
-
870
- } else if (typeof space === 'string') {
871
- indent = space;
872
- }
873
-
874
- // If there is a replacer, it must be a function or an array.
875
- // Otherwise, throw an error.
876
-
877
- rep = replacer;
878
- if (replacer && typeof replacer !== 'function' &&
879
- (typeof replacer !== 'object' ||
880
- typeof replacer.length !== 'number')) {
881
- throw new Error('JSON.stringify');
882
- }
883
-
884
- // Make a fake root object containing our value under the key of ''.
885
- // Return the result of stringifying the value.
886
-
887
- return str('', {'': value});
888
- };
889
-
890
- // If the JSON object does not yet have a parse method, give it one.
891
-
892
- JSON.parse = function (text, reviver) {
893
- // The parse method takes a text and an optional reviver function, and returns
894
- // a JavaScript value if the text is a valid JSON text.
895
-
896
- var j;
897
-
898
- function walk(holder, key) {
899
-
900
- // The walk method is used to recursively walk the resulting structure so
901
- // that modifications can be made.
902
-
903
- var k, v, value = holder[key];
904
- if (value && typeof value === 'object') {
905
- for (k in value) {
906
- if (Object.prototype.hasOwnProperty.call(value, k)) {
907
- v = walk(value, k);
908
- if (v !== undefined) {
909
- value[k] = v;
910
- } else {
911
- delete value[k];
912
- }
913
- }
914
- }
915
- }
916
- return reviver.call(holder, key, value);
917
- }
918
-
919
-
920
- // Parsing happens in four stages. In the first stage, we replace certain
921
- // Unicode characters with escape sequences. JavaScript handles many characters
922
- // incorrectly, either silently deleting them, or treating them as line endings.
923
-
924
- text = String(text);
925
- cx.lastIndex = 0;
926
- if (cx.test(text)) {
927
- text = text.replace(cx, function (a) {
928
- return '\\u' +
929
- ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
930
- });
931
- }
932
-
933
- // In the second stage, we run the text against regular expressions that look
934
- // for non-JSON patterns. We are especially concerned with '()' and 'new'
935
- // because they can cause invocation, and '=' because it can cause mutation.
936
- // But just to be safe, we want to reject all unexpected forms.
937
-
938
- // We split the second stage into 4 regexp operations in order to work around
939
- // crippling inefficiencies in IE's and Safari's regexp engines. First we
940
- // replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
941
- // replace all simple value tokens with ']' characters. Third, we delete all
942
- // open brackets that follow a colon or comma or that begin the text. Finally,
943
- // we look to see that the remaining characters are only whitespace or ']' or
944
- // ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
945
-
946
- if (/^[\],:{}\s]*$/
947
- .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
948
- .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
949
- .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
950
-
951
- // In the third stage we use the eval function to compile the text into a
952
- // JavaScript structure. The '{' operator is subject to a syntactic ambiguity
953
- // in JavaScript: it can begin a block or an object literal. We wrap the text
954
- // in parens to eliminate the ambiguity.
955
-
956
- j = eval('(' + text + ')');
957
-
958
- // In the optional fourth stage, we recursively walk the new structure, passing
959
- // each name/value pair to a reviver function for possible transformation.
960
-
961
- return typeof reviver === 'function' ?
962
- walk({'': j}, '') : j;
963
- }
964
-
965
- // If the text is not JSON parseable, then a SyntaxError is thrown.
966
-
967
- throw new SyntaxError('JSON.parse');
968
- };
969
-
970
- })(
971
- 'undefined' != typeof io ? io : module.exports
972
- , typeof JSON !== 'undefined' ? JSON : undefined
973
- );
974
-
975
- /**
976
- * socket.io
977
- * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
978
- * MIT Licensed
979
- */
980
-
981
- (function (exports, io) {
982
-
983
- /**
984
- * Parser namespace.
985
- *
986
- * @namespace
987
- */
988
-
989
- var parser = exports.parser = {};
990
-
991
- /**
992
- * Packet types.
993
- */
994
-
995
- var packets = parser.packets = [
996
- 'disconnect'
997
- , 'connect'
998
- , 'heartbeat'
999
- , 'message'
1000
- , 'json'
1001
- , 'event'
1002
- , 'ack'
1003
- , 'error'
1004
- , 'noop'
1005
- ];
1006
-
1007
- /**
1008
- * Errors reasons.
1009
- */
1010
-
1011
- var reasons = parser.reasons = [
1012
- 'transport not supported'
1013
- , 'client not handshaken'
1014
- , 'unauthorized'
1015
- ];
1016
-
1017
- /**
1018
- * Errors advice.
1019
- */
1020
-
1021
- var advice = parser.advice = [
1022
- 'reconnect'
1023
- ];
1024
-
1025
- /**
1026
- * Shortcuts.
1027
- */
1028
-
1029
- var JSON = io.JSON
1030
- , indexOf = io.util.indexOf;
1031
-
1032
- /**
1033
- * Encodes a packet.
1034
- *
1035
- * @api private
1036
- */
1037
-
1038
- parser.encodePacket = function (packet) {
1039
- var type = indexOf(packets, packet.type)
1040
- , id = packet.id || ''
1041
- , endpoint = packet.endpoint || ''
1042
- , ack = packet.ack
1043
- , data = null;
1044
-
1045
- switch (packet.type) {
1046
- case 'error':
1047
- var reason = packet.reason ? indexOf(reasons, packet.reason) : ''
1048
- , adv = packet.advice ? indexOf(advice, packet.advice) : '';
1049
-
1050
- if (reason !== '' || adv !== '')
1051
- data = reason + (adv !== '' ? ('+' + adv) : '');
1052
-
1053
- break;
1054
-
1055
- case 'message':
1056
- if (packet.data !== '')
1057
- data = packet.data;
1058
- break;
1059
-
1060
- case 'event':
1061
- var ev = { name: packet.name };
1062
-
1063
- if (packet.args && packet.args.length) {
1064
- ev.args = packet.args;
1065
- }
1066
-
1067
- data = JSON.stringify(ev);
1068
- break;
1069
-
1070
- case 'json':
1071
- data = JSON.stringify(packet.data);
1072
- break;
1073
-
1074
- case 'connect':
1075
- if (packet.qs)
1076
- data = packet.qs;
1077
- break;
1078
-
1079
- case 'ack':
1080
- data = packet.ackId
1081
- + (packet.args && packet.args.length
1082
- ? '+' + JSON.stringify(packet.args) : '');
1083
- break;
1084
- }
1085
-
1086
- // construct packet with required fragments
1087
- var encoded = [
1088
- type
1089
- , id + (ack == 'data' ? '+' : '')
1090
- , endpoint
1091
- ];
1092
-
1093
- // data fragment is optional
1094
- if (data !== null && data !== undefined)
1095
- encoded.push(data);
1096
-
1097
- return encoded.join(':');
1098
- };
1099
-
1100
- /**
1101
- * Encodes multiple messages (payload).
1102
- *
1103
- * @param {Array} messages
1104
- * @api private
1105
- */
1106
-
1107
- parser.encodePayload = function (packets) {
1108
- var decoded = '';
1109
-
1110
- if (packets.length == 1)
1111
- return packets[0];
1112
-
1113
- for (var i = 0, l = packets.length; i < l; i++) {
1114
- var packet = packets[i];
1115
- decoded += '\ufffd' + packet.length + '\ufffd' + packets[i];
1116
- }
1117
-
1118
- return decoded;
1119
- };
1120
-
1121
- /**
1122
- * Decodes a packet
1123
- *
1124
- * @api private
1125
- */
1126
-
1127
- var regexp = /([^:]+):([0-9]+)?(\+)?:([^:]+)?:?([\s\S]*)?/;
1128
-
1129
- parser.decodePacket = function (data) {
1130
- var pieces = data.match(regexp);
1131
-
1132
- if (!pieces) return {};
1133
-
1134
- var id = pieces[2] || ''
1135
- , data = pieces[5] || ''
1136
- , packet = {
1137
- type: packets[pieces[1]]
1138
- , endpoint: pieces[4] || ''
1139
- };
1140
-
1141
- // whether we need to acknowledge the packet
1142
- if (id) {
1143
- packet.id = id;
1144
- if (pieces[3])
1145
- packet.ack = 'data';
1146
- else
1147
- packet.ack = true;
1148
- }
1149
-
1150
- // handle different packet types
1151
- switch (packet.type) {
1152
- case 'error':
1153
- var pieces = data.split('+');
1154
- packet.reason = reasons[pieces[0]] || '';
1155
- packet.advice = advice[pieces[1]] || '';
1156
- break;
1157
-
1158
- case 'message':
1159
- packet.data = data || '';
1160
- break;
1161
-
1162
- case 'event':
1163
- try {
1164
- var opts = JSON.parse(data);
1165
- packet.name = opts.name;
1166
- packet.args = opts.args;
1167
- } catch (e) { }
1168
-
1169
- packet.args = packet.args || [];
1170
- break;
1171
-
1172
- case 'json':
1173
- try {
1174
- packet.data = JSON.parse(data);
1175
- } catch (e) { }
1176
- break;
1177
-
1178
- case 'connect':
1179
- packet.qs = data || '';
1180
- break;
1181
-
1182
- case 'ack':
1183
- var pieces = data.match(/^([0-9]+)(\+)?(.*)/);
1184
- if (pieces) {
1185
- packet.ackId = pieces[1];
1186
- packet.args = [];
1187
-
1188
- if (pieces[3]) {
1189
- try {
1190
- packet.args = pieces[3] ? JSON.parse(pieces[3]) : [];
1191
- } catch (e) { }
1192
- }
1193
- }
1194
- break;
1195
-
1196
- case 'disconnect':
1197
- case 'heartbeat':
1198
- break;
1199
- };
1200
-
1201
- return packet;
1202
- };
1203
-
1204
- /**
1205
- * Decodes data payload. Detects multiple messages
1206
- *
1207
- * @return {Array} messages
1208
- * @api public
1209
- */
1210
-
1211
- parser.decodePayload = function (data) {
1212
- // IE doesn't like data[i] for unicode chars, charAt works fine
1213
- if (data.charAt(0) == '\ufffd') {
1214
- var ret = [];
1215
-
1216
- for (var i = 1, length = ''; i < data.length; i++) {
1217
- if (data.charAt(i) == '\ufffd') {
1218
- ret.push(parser.decodePacket(data.substr(i + 1).substr(0, length)));
1219
- i += Number(length) + 1;
1220
- length = '';
1221
- } else {
1222
- length += data.charAt(i);
1223
- }
1224
- }
1225
-
1226
- return ret;
1227
- } else {
1228
- return [parser.decodePacket(data)];
1229
- }
1230
- };
1231
-
1232
- })(
1233
- 'undefined' != typeof io ? io : module.exports
1234
- , 'undefined' != typeof io ? io : module.parent.exports
1235
- );
1236
- /**
1237
- * socket.io
1238
- * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
1239
- * MIT Licensed
1240
- */
1241
-
1242
- (function (exports, io) {
1243
-
1244
- /**
1245
- * Expose constructor.
1246
- */
1247
-
1248
- exports.Transport = Transport;
1249
-
1250
- /**
1251
- * This is the transport template for all supported transport methods.
1252
- *
1253
- * @constructor
1254
- * @api public
1255
- */
1256
-
1257
- function Transport (socket, sessid) {
1258
- this.socket = socket;
1259
- this.sessid = sessid;
1260
- };
1261
-
1262
- /**
1263
- * Apply EventEmitter mixin.
1264
- */
1265
-
1266
- io.util.mixin(Transport, io.EventEmitter);
1267
-
1268
-
1269
- /**
1270
- * Indicates whether heartbeats is enabled for this transport
1271
- *
1272
- * @api private
1273
- */
1274
-
1275
- Transport.prototype.heartbeats = function () {
1276
- return true;
1277
- };
1278
-
1279
- /**
1280
- * Handles the response from the server. When a new response is received
1281
- * it will automatically update the timeout, decode the message and
1282
- * forwards the response to the onMessage function for further processing.
1283
- *
1284
- * @param {String} data Response from the server.
1285
- * @api private
1286
- */
1287
-
1288
- Transport.prototype.onData = function (data) {
1289
- this.clearCloseTimeout();
1290
-
1291
- // If the connection in currently open (or in a reopening state) reset the close
1292
- // timeout since we have just received data. This check is necessary so
1293
- // that we don't reset the timeout on an explicitly disconnected connection.
1294
- if (this.socket.connected || this.socket.connecting || this.socket.reconnecting) {
1295
- this.setCloseTimeout();
1296
- }
1297
-
1298
- if (data !== '') {
1299
- // todo: we should only do decodePayload for xhr transports
1300
- var msgs = io.parser.decodePayload(data);
1301
-
1302
- if (msgs && msgs.length) {
1303
- for (var i = 0, l = msgs.length; i < l; i++) {
1304
- this.onPacket(msgs[i]);
1305
- }
1306
- }
1307
- }
1308
-
1309
- return this;
1310
- };
1311
-
1312
- /**
1313
- * Handles packets.
1314
- *
1315
- * @api private
1316
- */
1317
-
1318
- Transport.prototype.onPacket = function (packet) {
1319
- this.socket.setHeartbeatTimeout();
1320
-
1321
- if (packet.type == 'heartbeat') {
1322
- return this.onHeartbeat();
1323
- }
1324
-
1325
- if (packet.type == 'connect' && packet.endpoint == '') {
1326
- this.onConnect();
1327
- }
1328
-
1329
- if (packet.type == 'error' && packet.advice == 'reconnect') {
1330
- this.isOpen = false;
1331
- }
1332
-
1333
- this.socket.onPacket(packet);
1334
-
1335
- return this;
1336
- };
1337
-
1338
- /**
1339
- * Sets close timeout
1340
- *
1341
- * @api private
1342
- */
1343
-
1344
- Transport.prototype.setCloseTimeout = function () {
1345
- if (!this.closeTimeout) {
1346
- var self = this;
1347
-
1348
- this.closeTimeout = setTimeout(function () {
1349
- self.onDisconnect();
1350
- }, this.socket.closeTimeout);
1351
- }
1352
- };
1353
-
1354
- /**
1355
- * Called when transport disconnects.
1356
- *
1357
- * @api private
1358
- */
1359
-
1360
- Transport.prototype.onDisconnect = function () {
1361
- if (this.isOpen) this.close();
1362
- this.clearTimeouts();
1363
- this.socket.onDisconnect();
1364
- return this;
1365
- };
1366
-
1367
- /**
1368
- * Called when transport connects
1369
- *
1370
- * @api private
1371
- */
1372
-
1373
- Transport.prototype.onConnect = function () {
1374
- this.socket.onConnect();
1375
- return this;
1376
- };
1377
-
1378
- /**
1379
- * Clears close timeout
1380
- *
1381
- * @api private
1382
- */
1383
-
1384
- Transport.prototype.clearCloseTimeout = function () {
1385
- if (this.closeTimeout) {
1386
- clearTimeout(this.closeTimeout);
1387
- this.closeTimeout = null;
1388
- }
1389
- };
1390
-
1391
- /**
1392
- * Clear timeouts
1393
- *
1394
- * @api private
1395
- */
1396
-
1397
- Transport.prototype.clearTimeouts = function () {
1398
- this.clearCloseTimeout();
1399
-
1400
- if (this.reopenTimeout) {
1401
- clearTimeout(this.reopenTimeout);
1402
- }
1403
- };
1404
-
1405
- /**
1406
- * Sends a packet
1407
- *
1408
- * @param {Object} packet object.
1409
- * @api private
1410
- */
1411
-
1412
- Transport.prototype.packet = function (packet) {
1413
- this.send(io.parser.encodePacket(packet));
1414
- };
1415
-
1416
- /**
1417
- * Send the received heartbeat message back to server. So the server
1418
- * knows we are still connected.
1419
- *
1420
- * @param {String} heartbeat Heartbeat response from the server.
1421
- * @api private
1422
- */
1423
-
1424
- Transport.prototype.onHeartbeat = function (heartbeat) {
1425
- this.packet({ type: 'heartbeat' });
1426
- };
1427
-
1428
- /**
1429
- * Called when the transport opens.
1430
- *
1431
- * @api private
1432
- */
1433
-
1434
- Transport.prototype.onOpen = function () {
1435
- this.isOpen = true;
1436
- this.clearCloseTimeout();
1437
- this.socket.onOpen();
1438
- };
1439
-
1440
- /**
1441
- * Notifies the base when the connection with the Socket.IO server
1442
- * has been disconnected.
1443
- *
1444
- * @api private
1445
- */
1446
-
1447
- Transport.prototype.onClose = function () {
1448
- var self = this;
1449
-
1450
- /* FIXME: reopen delay causing a infinit loop
1451
- this.reopenTimeout = setTimeout(function () {
1452
- self.open();
1453
- }, this.socket.options['reopen delay']);*/
1454
-
1455
- this.isOpen = false;
1456
- this.socket.onClose();
1457
- this.onDisconnect();
1458
- };
1459
-
1460
- /**
1461
- * Generates a connection url based on the Socket.IO URL Protocol.
1462
- * See <https://github.com/learnboost/socket.io-node/> for more details.
1463
- *
1464
- * @returns {String} Connection url
1465
- * @api private
1466
- */
1467
-
1468
- Transport.prototype.prepareUrl = function () {
1469
- var options = this.socket.options;
1470
-
1471
- return this.scheme() + '://'
1472
- + options.host + ':' + options.port + '/'
1473
- + options.resource + '/' + io.protocol
1474
- + '/' + this.name + '/' + this.sessid;
1475
- };
1476
-
1477
- /**
1478
- * Checks if the transport is ready to start a connection.
1479
- *
1480
- * @param {Socket} socket The socket instance that needs a transport
1481
- * @param {Function} fn The callback
1482
- * @api private
1483
- */
1484
-
1485
- Transport.prototype.ready = function (socket, fn) {
1486
- fn.call(this);
1487
- };
1488
- })(
1489
- 'undefined' != typeof io ? io : module.exports
1490
- , 'undefined' != typeof io ? io : module.parent.exports
1491
- );
1492
- /**
1493
- * socket.io
1494
- * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
1495
- * MIT Licensed
1496
- */
1497
-
1498
- (function (exports, io) {
1499
-
1500
- /**
1501
- * Expose constructor.
1502
- */
1503
-
1504
- exports.Socket = Socket;
1505
-
1506
- /**
1507
- * Create a new `Socket.IO client` which can establish a persistent
1508
- * connection with a Socket.IO enabled server.
1509
- *
1510
- * @api public
1511
- */
1512
-
1513
- function Socket (options) {
1514
- this.options = {
1515
- port: 80
1516
- , secure: false
1517
- , document: 'document' in global ? document : false
1518
- , resource: 'socket.io'
1519
- , transports: io.transports
1520
- , 'connect timeout': 10000
1521
- , 'try multiple transports': true
1522
- , 'reconnect': true
1523
- , 'reconnection delay': 500
1524
- , 'reconnection limit': Infinity
1525
- , 'reopen delay': 3000
1526
- , 'max reconnection attempts': 10
1527
- , 'sync disconnect on unload': false
1528
- , 'auto connect': true
1529
- , 'flash policy port': 10843
1530
- , 'manualFlush': false
1531
- };
1532
-
1533
- io.util.merge(this.options, options);
1534
-
1535
- this.connected = false;
1536
- this.open = false;
1537
- this.connecting = false;
1538
- this.reconnecting = false;
1539
- this.namespaces = {};
1540
- this.buffer = [];
1541
- this.doBuffer = false;
1542
-
1543
- if (this.options['sync disconnect on unload'] &&
1544
- (!this.isXDomain() || io.util.ua.hasCORS)) {
1545
- var self = this;
1546
- io.util.on(global, 'beforeunload', function () {
1547
- self.disconnectSync();
1548
- }, false);
1549
- }
1550
-
1551
- if (this.options['auto connect']) {
1552
- this.connect();
1553
- }
1554
- };
1555
-
1556
- /**
1557
- * Apply EventEmitter mixin.
1558
- */
1559
-
1560
- io.util.mixin(Socket, io.EventEmitter);
1561
-
1562
- /**
1563
- * Returns a namespace listener/emitter for this socket
1564
- *
1565
- * @api public
1566
- */
1567
-
1568
- Socket.prototype.of = function (name) {
1569
- if (!this.namespaces[name]) {
1570
- this.namespaces[name] = new io.SocketNamespace(this, name);
1571
-
1572
- if (name !== '') {
1573
- this.namespaces[name].packet({ type: 'connect' });
1574
- }
1575
- }
1576
-
1577
- return this.namespaces[name];
1578
- };
1579
-
1580
- /**
1581
- * Emits the given event to the Socket and all namespaces
1582
- *
1583
- * @api private
1584
- */
1585
-
1586
- Socket.prototype.publish = function () {
1587
- this.emit.apply(this, arguments);
1588
-
1589
- var nsp;
1590
-
1591
- for (var i in this.namespaces) {
1592
- if (this.namespaces.hasOwnProperty(i)) {
1593
- nsp = this.of(i);
1594
- nsp.$emit.apply(nsp, arguments);
1595
- }
1596
- }
1597
- };
1598
-
1599
- /**
1600
- * Performs the handshake
1601
- *
1602
- * @api private
1603
- */
1604
-
1605
- function empty () { };
1606
-
1607
- Socket.prototype.handshake = function (fn) {
1608
- var self = this
1609
- , options = this.options;
1610
-
1611
- function complete (data) {
1612
- if (data instanceof Error) {
1613
- self.connecting = false;
1614
- self.onError(data.message);
1615
- } else {
1616
- fn.apply(null, data.split(':'));
1617
- }
1618
- };
1619
-
1620
- var url = [
1621
- 'http' + (options.secure ? 's' : '') + ':/'
1622
- , options.host + ':' + options.port
1623
- , options.resource
1624
- , io.protocol
1625
- , io.util.query(this.options.query, 't=' + +new Date)
1626
- ].join('/');
1627
-
1628
- if (this.isXDomain() && !io.util.ua.hasCORS) {
1629
- var insertAt = document.getElementsByTagName('script')[0]
1630
- , script = document.createElement('script');
1631
-
1632
- script.src = url + '&jsonp=' + io.j.length;
1633
- insertAt.parentNode.insertBefore(script, insertAt);
1634
-
1635
- io.j.push(function (data) {
1636
- complete(data);
1637
- script.parentNode.removeChild(script);
1638
- });
1639
- } else {
1640
- var xhr = io.util.request();
1641
-
1642
- xhr.open('GET', url, true);
1643
- if (this.isXDomain()) {
1644
- xhr.withCredentials = true;
1645
- }
1646
- xhr.onreadystatechange = function () {
1647
- if (xhr.readyState == 4) {
1648
- xhr.onreadystatechange = empty;
1649
-
1650
- if (xhr.status == 200) {
1651
- complete(xhr.responseText);
1652
- } else if (xhr.status == 403) {
1653
- self.onError(xhr.responseText);
1654
- } else {
1655
- self.connecting = false;
1656
- !self.reconnecting && self.onError(xhr.responseText);
1657
- }
1658
- }
1659
- };
1660
- xhr.send(null);
1661
- }
1662
- };
1663
-
1664
- /**
1665
- * Find an available transport based on the options supplied in the constructor.
1666
- *
1667
- * @api private
1668
- */
1669
-
1670
- Socket.prototype.getTransport = function (override) {
1671
- var transports = override || this.transports, match;
1672
-
1673
- for (var i = 0, transport; transport = transports[i]; i++) {
1674
- if (io.Transport[transport]
1675
- && io.Transport[transport].check(this)
1676
- && (!this.isXDomain() || io.Transport[transport].xdomainCheck(this))) {
1677
- return new io.Transport[transport](this, this.sessionid);
1678
- }
1679
- }
1680
-
1681
- return null;
1682
- };
1683
-
1684
- /**
1685
- * Connects to the server.
1686
- *
1687
- * @param {Function} [fn] Callback.
1688
- * @returns {io.Socket}
1689
- * @api public
1690
- */
1691
-
1692
- Socket.prototype.connect = function (fn) {
1693
- if (this.connecting) {
1694
- return this;
1695
- }
1696
-
1697
- var self = this;
1698
- self.connecting = true;
1699
-
1700
- this.handshake(function (sid, heartbeat, close, transports) {
1701
- self.sessionid = sid;
1702
- self.closeTimeout = close * 1000;
1703
- self.heartbeatTimeout = heartbeat * 1000;
1704
- if(!self.transports)
1705
- self.transports = self.origTransports = (transports ? io.util.intersect(
1706
- transports.split(',')
1707
- , self.options.transports
1708
- ) : self.options.transports);
1709
-
1710
- self.setHeartbeatTimeout();
1711
-
1712
- function connect (transports){
1713
- if (self.transport) self.transport.clearTimeouts();
1714
-
1715
- self.transport = self.getTransport(transports);
1716
- if (!self.transport) return self.publish('connect_failed');
1717
-
1718
- // once the transport is ready
1719
- self.transport.ready(self, function () {
1720
- self.connecting = true;
1721
- self.publish('connecting', self.transport.name);
1722
- self.transport.open();
1723
-
1724
- if (self.options['connect timeout']) {
1725
- self.connectTimeoutTimer = setTimeout(function () {
1726
- if (!self.connected) {
1727
- self.connecting = false;
1728
-
1729
- if (self.options['try multiple transports']) {
1730
- var remaining = self.transports;
1731
-
1732
- while (remaining.length > 0 && remaining.splice(0,1)[0] !=
1733
- self.transport.name) {}
1734
-
1735
- if (remaining.length){
1736
- connect(remaining);
1737
- } else {
1738
- self.publish('connect_failed');
1739
- }
1740
- }
1741
- }
1742
- }, self.options['connect timeout']);
1743
- }
1744
- });
1745
- }
1746
-
1747
- connect(self.transports);
1748
-
1749
- self.once('connect', function (){
1750
- clearTimeout(self.connectTimeoutTimer);
1751
-
1752
- fn && typeof fn == 'function' && fn();
1753
- });
1754
- });
1755
-
1756
- return this;
1757
- };
1758
-
1759
- /**
1760
- * Clears and sets a new heartbeat timeout using the value given by the
1761
- * server during the handshake.
1762
- *
1763
- * @api private
1764
- */
1765
-
1766
- Socket.prototype.setHeartbeatTimeout = function () {
1767
- clearTimeout(this.heartbeatTimeoutTimer);
1768
- if(this.transport && !this.transport.heartbeats()) return;
1769
-
1770
- var self = this;
1771
- this.heartbeatTimeoutTimer = setTimeout(function () {
1772
- self.transport.onClose();
1773
- }, this.heartbeatTimeout);
1774
- };
1775
-
1776
- /**
1777
- * Sends a message.
1778
- *
1779
- * @param {Object} data packet.
1780
- * @returns {io.Socket}
1781
- * @api public
1782
- */
1783
-
1784
- Socket.prototype.packet = function (data) {
1785
- if (this.connected && !this.doBuffer) {
1786
- this.transport.packet(data);
1787
- } else {
1788
- this.buffer.push(data);
1789
- }
1790
-
1791
- return this;
1792
- };
1793
-
1794
- /**
1795
- * Sets buffer state
1796
- *
1797
- * @api private
1798
- */
1799
-
1800
- Socket.prototype.setBuffer = function (v) {
1801
- this.doBuffer = v;
1802
-
1803
- if (!v && this.connected && this.buffer.length) {
1804
- if (!this.options['manualFlush']) {
1805
- this.flushBuffer();
1806
- }
1807
- }
1808
- };
1809
-
1810
- /**
1811
- * Flushes the buffer data over the wire.
1812
- * To be invoked manually when 'manualFlush' is set to true.
1813
- *
1814
- * @api public
1815
- */
1816
-
1817
- Socket.prototype.flushBuffer = function() {
1818
- this.transport.payload(this.buffer);
1819
- this.buffer = [];
1820
- };
1821
-
1822
-
1823
- /**
1824
- * Disconnect the established connect.
1825
- *
1826
- * @returns {io.Socket}
1827
- * @api public
1828
- */
1829
-
1830
- Socket.prototype.disconnect = function () {
1831
- if (this.connected || this.connecting) {
1832
- if (this.open) {
1833
- this.of('').packet({ type: 'disconnect' });
1834
- }
1835
-
1836
- // handle disconnection immediately
1837
- this.onDisconnect('booted');
1838
- }
1839
-
1840
- return this;
1841
- };
1842
-
1843
- /**
1844
- * Disconnects the socket with a sync XHR.
1845
- *
1846
- * @api private
1847
- */
1848
-
1849
- Socket.prototype.disconnectSync = function () {
1850
- // ensure disconnection
1851
- var xhr = io.util.request();
1852
- var uri = [
1853
- 'http' + (this.options.secure ? 's' : '') + ':/'
1854
- , this.options.host + ':' + this.options.port
1855
- , this.options.resource
1856
- , io.protocol
1857
- , ''
1858
- , this.sessionid
1859
- ].join('/') + '/?disconnect=1';
1860
-
1861
- xhr.open('GET', uri, false);
1862
- xhr.send(null);
1863
-
1864
- // handle disconnection immediately
1865
- this.onDisconnect('booted');
1866
- };
1867
-
1868
- /**
1869
- * Check if we need to use cross domain enabled transports. Cross domain would
1870
- * be a different port or different domain name.
1871
- *
1872
- * @returns {Boolean}
1873
- * @api private
1874
- */
1875
-
1876
- Socket.prototype.isXDomain = function () {
1877
-
1878
- var port = global.location.port ||
1879
- ('https:' == global.location.protocol ? 443 : 80);
1880
-
1881
- return this.options.host !== global.location.hostname
1882
- || this.options.port != port;
1883
- };
1884
-
1885
- /**
1886
- * Called upon handshake.
1887
- *
1888
- * @api private
1889
- */
1890
-
1891
- Socket.prototype.onConnect = function () {
1892
- if (!this.connected) {
1893
- this.connected = true;
1894
- this.connecting = false;
1895
- if (!this.doBuffer) {
1896
- // make sure to flush the buffer
1897
- this.setBuffer(false);
1898
- }
1899
- this.emit('connect');
1900
- }
1901
- };
1902
-
1903
- /**
1904
- * Called when the transport opens
1905
- *
1906
- * @api private
1907
- */
1908
-
1909
- Socket.prototype.onOpen = function () {
1910
- this.open = true;
1911
- };
1912
-
1913
- /**
1914
- * Called when the transport closes.
1915
- *
1916
- * @api private
1917
- */
1918
-
1919
- Socket.prototype.onClose = function () {
1920
- this.open = false;
1921
- clearTimeout(this.heartbeatTimeoutTimer);
1922
- };
1923
-
1924
- /**
1925
- * Called when the transport first opens a connection
1926
- *
1927
- * @param text
1928
- */
1929
-
1930
- Socket.prototype.onPacket = function (packet) {
1931
- this.of(packet.endpoint).onPacket(packet);
1932
- };
1933
-
1934
- /**
1935
- * Handles an error.
1936
- *
1937
- * @api private
1938
- */
1939
-
1940
- Socket.prototype.onError = function (err) {
1941
- if (err && err.advice) {
1942
- if (err.advice === 'reconnect' && (this.connected || this.connecting)) {
1943
- this.disconnect();
1944
- if (this.options.reconnect) {
1945
- this.reconnect();
1946
- }
1947
- }
1948
- }
1949
-
1950
- this.publish('error', err && err.reason ? err.reason : err);
1951
- };
1952
-
1953
- /**
1954
- * Called when the transport disconnects.
1955
- *
1956
- * @api private
1957
- */
1958
-
1959
- Socket.prototype.onDisconnect = function (reason) {
1960
- var wasConnected = this.connected
1961
- , wasConnecting = this.connecting;
1962
-
1963
- this.connected = false;
1964
- this.connecting = false;
1965
- this.open = false;
1966
-
1967
- if (wasConnected || wasConnecting) {
1968
- this.transport.close();
1969
- this.transport.clearTimeouts();
1970
- if (wasConnected) {
1971
- this.publish('disconnect', reason);
1972
-
1973
- if ('booted' != reason && this.options.reconnect && !this.reconnecting) {
1974
- this.reconnect();
1975
- }
1976
- }
1977
- }
1978
- };
1979
-
1980
- /**
1981
- * Called upon reconnection.
1982
- *
1983
- * @api private
1984
- */
1985
-
1986
- Socket.prototype.reconnect = function () {
1987
- this.reconnecting = true;
1988
- this.reconnectionAttempts = 0;
1989
- this.reconnectionDelay = this.options['reconnection delay'];
1990
-
1991
- var self = this
1992
- , maxAttempts = this.options['max reconnection attempts']
1993
- , tryMultiple = this.options['try multiple transports']
1994
- , limit = this.options['reconnection limit'];
1995
-
1996
- function reset () {
1997
- if (self.connected) {
1998
- for (var i in self.namespaces) {
1999
- if (self.namespaces.hasOwnProperty(i) && '' !== i) {
2000
- self.namespaces[i].packet({ type: 'connect' });
2001
- }
2002
- }
2003
- self.publish('reconnect', self.transport.name, self.reconnectionAttempts);
2004
- }
2005
-
2006
- clearTimeout(self.reconnectionTimer);
2007
-
2008
- self.removeListener('connect_failed', maybeReconnect);
2009
- self.removeListener('connect', maybeReconnect);
2010
-
2011
- self.reconnecting = false;
2012
-
2013
- delete self.reconnectionAttempts;
2014
- delete self.reconnectionDelay;
2015
- delete self.reconnectionTimer;
2016
- delete self.redoTransports;
2017
-
2018
- self.options['try multiple transports'] = tryMultiple;
2019
- };
2020
-
2021
- function maybeReconnect () {
2022
- if (!self.reconnecting) {
2023
- return;
2024
- }
2025
-
2026
- if (self.connected) {
2027
- return reset();
2028
- };
2029
-
2030
- if (self.connecting && self.reconnecting) {
2031
- return self.reconnectionTimer = setTimeout(maybeReconnect, 1000);
2032
- }
2033
-
2034
- if (self.reconnectionAttempts++ >= maxAttempts) {
2035
- if (!self.redoTransports) {
2036
- self.on('connect_failed', maybeReconnect);
2037
- self.options['try multiple transports'] = true;
2038
- self.transports = self.origTransports;
2039
- self.transport = self.getTransport();
2040
- self.redoTransports = true;
2041
- self.connect();
2042
- } else {
2043
- self.publish('reconnect_failed');
2044
- reset();
2045
- }
2046
- } else {
2047
- if (self.reconnectionDelay < limit) {
2048
- self.reconnectionDelay *= 2; // exponential back off
2049
- }
2050
-
2051
- self.connect();
2052
- self.publish('reconnecting', self.reconnectionDelay, self.reconnectionAttempts);
2053
- self.reconnectionTimer = setTimeout(maybeReconnect, self.reconnectionDelay);
2054
- }
2055
- };
2056
-
2057
- this.options['try multiple transports'] = false;
2058
- this.reconnectionTimer = setTimeout(maybeReconnect, this.reconnectionDelay);
2059
-
2060
- this.on('connect', maybeReconnect);
2061
- };
2062
-
2063
- })(
2064
- 'undefined' != typeof io ? io : module.exports
2065
- , 'undefined' != typeof io ? io : module.parent.exports
2066
- );
2067
- /**
2068
- * socket.io
2069
- * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
2070
- * MIT Licensed
2071
- */
2072
-
2073
- (function (exports, io) {
2074
-
2075
- /**
2076
- * Expose constructor.
2077
- */
2078
-
2079
- exports.SocketNamespace = SocketNamespace;
2080
-
2081
- /**
2082
- * Socket namespace constructor.
2083
- *
2084
- * @constructor
2085
- * @api public
2086
- */
2087
-
2088
- function SocketNamespace (socket, name) {
2089
- this.socket = socket;
2090
- this.name = name || '';
2091
- this.flags = {};
2092
- this.json = new Flag(this, 'json');
2093
- this.ackPackets = 0;
2094
- this.acks = {};
2095
- };
2096
-
2097
- /**
2098
- * Apply EventEmitter mixin.
2099
- */
2100
-
2101
- io.util.mixin(SocketNamespace, io.EventEmitter);
2102
-
2103
- /**
2104
- * Copies emit since we override it
2105
- *
2106
- * @api private
2107
- */
2108
-
2109
- SocketNamespace.prototype.$emit = io.EventEmitter.prototype.emit;
2110
-
2111
- /**
2112
- * Creates a new namespace, by proxying the request to the socket. This
2113
- * allows us to use the synax as we do on the server.
2114
- *
2115
- * @api public
2116
- */
2117
-
2118
- SocketNamespace.prototype.of = function () {
2119
- return this.socket.of.apply(this.socket, arguments);
2120
- };
2121
-
2122
- /**
2123
- * Sends a packet.
2124
- *
2125
- * @api private
2126
- */
2127
-
2128
- SocketNamespace.prototype.packet = function (packet) {
2129
- packet.endpoint = this.name;
2130
- this.socket.packet(packet);
2131
- this.flags = {};
2132
- return this;
2133
- };
2134
-
2135
- /**
2136
- * Sends a message
2137
- *
2138
- * @api public
2139
- */
2140
-
2141
- SocketNamespace.prototype.send = function (data, fn) {
2142
- var packet = {
2143
- type: this.flags.json ? 'json' : 'message'
2144
- , data: data
2145
- };
2146
-
2147
- if ('function' == typeof fn) {
2148
- packet.id = ++this.ackPackets;
2149
- packet.ack = true;
2150
- this.acks[packet.id] = fn;
2151
- }
2152
-
2153
- return this.packet(packet);
2154
- };
2155
-
2156
- /**
2157
- * Emits an event
2158
- *
2159
- * @api public
2160
- */
2161
-
2162
- SocketNamespace.prototype.emit = function (name) {
2163
- var args = Array.prototype.slice.call(arguments, 1)
2164
- , lastArg = args[args.length - 1]
2165
- , packet = {
2166
- type: 'event'
2167
- , name: name
2168
- };
2169
-
2170
- if ('function' == typeof lastArg) {
2171
- packet.id = ++this.ackPackets;
2172
- packet.ack = 'data';
2173
- this.acks[packet.id] = lastArg;
2174
- args = args.slice(0, args.length - 1);
2175
- }
2176
-
2177
- packet.args = args;
2178
-
2179
- return this.packet(packet);
2180
- };
2181
-
2182
- /**
2183
- * Disconnects the namespace
2184
- *
2185
- * @api private
2186
- */
2187
-
2188
- SocketNamespace.prototype.disconnect = function () {
2189
- if (this.name === '') {
2190
- this.socket.disconnect();
2191
- } else {
2192
- this.packet({ type: 'disconnect' });
2193
- this.$emit('disconnect');
2194
- }
2195
-
2196
- return this;
2197
- };
2198
-
2199
- /**
2200
- * Handles a packet
2201
- *
2202
- * @api private
2203
- */
2204
-
2205
- SocketNamespace.prototype.onPacket = function (packet) {
2206
- var self = this;
2207
-
2208
- function ack () {
2209
- self.packet({
2210
- type: 'ack'
2211
- , args: io.util.toArray(arguments)
2212
- , ackId: packet.id
2213
- });
2214
- };
2215
-
2216
- switch (packet.type) {
2217
- case 'connect':
2218
- this.$emit('connect');
2219
- break;
2220
-
2221
- case 'disconnect':
2222
- if (this.name === '') {
2223
- this.socket.onDisconnect(packet.reason || 'booted');
2224
- } else {
2225
- this.$emit('disconnect', packet.reason);
2226
- }
2227
- break;
2228
-
2229
- case 'message':
2230
- case 'json':
2231
- var params = ['message', packet.data];
2232
-
2233
- if (packet.ack == 'data') {
2234
- params.push(ack);
2235
- } else if (packet.ack) {
2236
- this.packet({ type: 'ack', ackId: packet.id });
2237
- }
2238
-
2239
- this.$emit.apply(this, params);
2240
- break;
2241
-
2242
- case 'event':
2243
- var params = [packet.name].concat(packet.args);
2244
-
2245
- if (packet.ack == 'data')
2246
- params.push(ack);
2247
-
2248
- this.$emit.apply(this, params);
2249
- break;
2250
-
2251
- case 'ack':
2252
- if (this.acks[packet.ackId]) {
2253
- this.acks[packet.ackId].apply(this, packet.args);
2254
- delete this.acks[packet.ackId];
2255
- }
2256
- break;
2257
-
2258
- case 'error':
2259
- if (packet.advice){
2260
- this.socket.onError(packet);
2261
- } else {
2262
- if (packet.reason == 'unauthorized') {
2263
- this.$emit('connect_failed', packet.reason);
2264
- } else {
2265
- this.$emit('error', packet.reason);
2266
- }
2267
- }
2268
- break;
2269
- }
2270
- };
2271
-
2272
- /**
2273
- * Flag interface.
2274
- *
2275
- * @api private
2276
- */
2277
-
2278
- function Flag (nsp, name) {
2279
- this.namespace = nsp;
2280
- this.name = name;
2281
- };
2282
-
2283
- /**
2284
- * Send a message
2285
- *
2286
- * @api public
2287
- */
2288
-
2289
- Flag.prototype.send = function () {
2290
- this.namespace.flags[this.name] = true;
2291
- this.namespace.send.apply(this.namespace, arguments);
2292
- };
2293
-
2294
- /**
2295
- * Emit an event
2296
- *
2297
- * @api public
2298
- */
2299
-
2300
- Flag.prototype.emit = function () {
2301
- this.namespace.flags[this.name] = true;
2302
- this.namespace.emit.apply(this.namespace, arguments);
2303
- };
2304
-
2305
- })(
2306
- 'undefined' != typeof io ? io : module.exports
2307
- , 'undefined' != typeof io ? io : module.parent.exports
2308
- );
2309
-
2310
- /**
2311
- * socket.io
2312
- * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
2313
- * MIT Licensed
2314
- */
2315
-
2316
- (function (exports, io) {
2317
-
2318
- /**
2319
- * Expose constructor.
2320
- */
2321
-
2322
- exports.websocket = WS;
2323
-
2324
- /**
2325
- * The WebSocket transport uses the HTML5 WebSocket API to establish an
2326
- * persistent connection with the Socket.IO server. This transport will also
2327
- * be inherited by the FlashSocket fallback as it provides a API compatible
2328
- * polyfill for the WebSockets.
2329
- *
2330
- * @constructor
2331
- * @extends {io.Transport}
2332
- * @api public
2333
- */
2334
-
2335
- function WS (socket) {
2336
- io.Transport.apply(this, arguments);
2337
- };
2338
-
2339
- /**
2340
- * Inherits from Transport.
2341
- */
2342
-
2343
- io.util.inherit(WS, io.Transport);
2344
-
2345
- /**
2346
- * Transport name
2347
- *
2348
- * @api public
2349
- */
2350
-
2351
- WS.prototype.name = 'websocket';
2352
-
2353
- /**
2354
- * Initializes a new `WebSocket` connection with the Socket.IO server. We attach
2355
- * all the appropriate listeners to handle the responses from the server.
2356
- *
2357
- * @returns {Transport}
2358
- * @api public
2359
- */
2360
-
2361
- WS.prototype.open = function () {
2362
- var query = io.util.query(this.socket.options.query)
2363
- , self = this
2364
- , Socket
2365
-
2366
-
2367
- if (!Socket) {
2368
- Socket = global.MozWebSocket || global.WebSocket;
2369
- }
2370
-
2371
- this.websocket = new Socket(this.prepareUrl() + query);
2372
-
2373
- this.websocket.onopen = function () {
2374
- self.onOpen();
2375
- self.socket.setBuffer(false);
2376
- };
2377
- this.websocket.onmessage = function (ev) {
2378
- self.onData(ev.data);
2379
- };
2380
- this.websocket.onclose = function () {
2381
- self.onClose();
2382
- self.socket.setBuffer(true);
2383
- };
2384
- this.websocket.onerror = function (e) {
2385
- self.onError(e);
2386
- };
2387
-
2388
- return this;
2389
- };
2390
-
2391
- /**
2392
- * Send a message to the Socket.IO server. The message will automatically be
2393
- * encoded in the correct message format.
2394
- *
2395
- * @returns {Transport}
2396
- * @api public
2397
- */
2398
-
2399
- // Do to a bug in the current IDevices browser, we need to wrap the send in a
2400
- // setTimeout, when they resume from sleeping the browser will crash if
2401
- // we don't allow the browser time to detect the socket has been closed
2402
- if (io.util.ua.iDevice) {
2403
- WS.prototype.send = function (data) {
2404
- var self = this;
2405
- setTimeout(function() {
2406
- self.websocket.send(data);
2407
- },0);
2408
- return this;
2409
- };
2410
- } else {
2411
- WS.prototype.send = function (data) {
2412
- this.websocket.send(data);
2413
- return this;
2414
- };
2415
- }
2416
-
2417
- /**
2418
- * Payload
2419
- *
2420
- * @api private
2421
- */
2422
-
2423
- WS.prototype.payload = function (arr) {
2424
- for (var i = 0, l = arr.length; i < l; i++) {
2425
- this.packet(arr[i]);
2426
- }
2427
- return this;
2428
- };
2429
-
2430
- /**
2431
- * Disconnect the established `WebSocket` connection.
2432
- *
2433
- * @returns {Transport}
2434
- * @api public
2435
- */
2436
-
2437
- WS.prototype.close = function () {
2438
- this.websocket.close();
2439
- return this;
2440
- };
2441
-
2442
- /**
2443
- * Handle the errors that `WebSocket` might be giving when we
2444
- * are attempting to connect or send messages.
2445
- *
2446
- * @param {Error} e The error.
2447
- * @api private
2448
- */
2449
-
2450
- WS.prototype.onError = function (e) {
2451
- this.socket.onError(e);
2452
- };
2453
-
2454
- /**
2455
- * Returns the appropriate scheme for the URI generation.
2456
- *
2457
- * @api private
2458
- */
2459
- WS.prototype.scheme = function () {
2460
- return this.socket.options.secure ? 'wss' : 'ws';
2461
- };
2462
-
2463
- /**
2464
- * Checks if the browser has support for native `WebSockets` and that
2465
- * it's not the polyfill created for the FlashSocket transport.
2466
- *
2467
- * @return {Boolean}
2468
- * @api public
2469
- */
2470
-
2471
- WS.check = function () {
2472
- return ('WebSocket' in global && !('__addTask' in WebSocket))
2473
- || 'MozWebSocket' in global;
2474
- };
2475
-
2476
- /**
2477
- * Check if the `WebSocket` transport support cross domain communications.
2478
- *
2479
- * @returns {Boolean}
2480
- * @api public
2481
- */
2482
-
2483
- WS.xdomainCheck = function () {
2484
- return true;
2485
- };
2486
-
2487
- /**
2488
- * Add the transport to your public io.transports array.
2489
- *
2490
- * @api private
2491
- */
2492
-
2493
- io.transports.push('websocket');
2494
-
2495
- })(
2496
- 'undefined' != typeof io ? io.Transport : module.exports
2497
- , 'undefined' != typeof io ? io : module.parent.exports
2498
- );
2499
-
2500
- /**
2501
- * socket.io
2502
- * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
2503
- * MIT Licensed
2504
- */
2505
-
2506
- (function (exports, io) {
2507
-
2508
- /**
2509
- * Expose constructor.
2510
- */
2511
-
2512
- exports.flashsocket = Flashsocket;
2513
-
2514
- /**
2515
- * The FlashSocket transport. This is a API wrapper for the HTML5 WebSocket
2516
- * specification. It uses a .swf file to communicate with the server. If you want
2517
- * to serve the .swf file from a other server than where the Socket.IO script is
2518
- * coming from you need to use the insecure version of the .swf. More information
2519
- * about this can be found on the github page.
2520
- *
2521
- * @constructor
2522
- * @extends {io.Transport.websocket}
2523
- * @api public
2524
- */
2525
-
2526
- function Flashsocket () {
2527
- io.Transport.websocket.apply(this, arguments);
2528
- };
2529
-
2530
- /**
2531
- * Inherits from Transport.
2532
- */
2533
-
2534
- io.util.inherit(Flashsocket, io.Transport.websocket);
2535
-
2536
- /**
2537
- * Transport name
2538
- *
2539
- * @api public
2540
- */
2541
-
2542
- Flashsocket.prototype.name = 'flashsocket';
2543
-
2544
- /**
2545
- * Disconnect the established `FlashSocket` connection. This is done by adding a
2546
- * new task to the FlashSocket. The rest will be handled off by the `WebSocket`
2547
- * transport.
2548
- *
2549
- * @returns {Transport}
2550
- * @api public
2551
- */
2552
-
2553
- Flashsocket.prototype.open = function () {
2554
- var self = this
2555
- , args = arguments;
2556
-
2557
- WebSocket.__addTask(function () {
2558
- io.Transport.websocket.prototype.open.apply(self, args);
2559
- });
2560
- return this;
2561
- };
2562
-
2563
- /**
2564
- * Sends a message to the Socket.IO server. This is done by adding a new
2565
- * task to the FlashSocket. The rest will be handled off by the `WebSocket`
2566
- * transport.
2567
- *
2568
- * @returns {Transport}
2569
- * @api public
2570
- */
2571
-
2572
- Flashsocket.prototype.send = function () {
2573
- var self = this, args = arguments;
2574
- WebSocket.__addTask(function () {
2575
- io.Transport.websocket.prototype.send.apply(self, args);
2576
- });
2577
- return this;
2578
- };
2579
-
2580
- /**
2581
- * Disconnects the established `FlashSocket` connection.
2582
- *
2583
- * @returns {Transport}
2584
- * @api public
2585
- */
2586
-
2587
- Flashsocket.prototype.close = function () {
2588
- WebSocket.__tasks.length = 0;
2589
- io.Transport.websocket.prototype.close.call(this);
2590
- return this;
2591
- };
2592
-
2593
- /**
2594
- * The WebSocket fall back needs to append the flash container to the body
2595
- * element, so we need to make sure we have access to it. Or defer the call
2596
- * until we are sure there is a body element.
2597
- *
2598
- * @param {Socket} socket The socket instance that needs a transport
2599
- * @param {Function} fn The callback
2600
- * @api private
2601
- */
2602
-
2603
- Flashsocket.prototype.ready = function (socket, fn) {
2604
- function init () {
2605
- var options = socket.options
2606
- , port = options['flash policy port']
2607
- , path = [
2608
- 'http' + (options.secure ? 's' : '') + ':/'
2609
- , options.host + ':' + options.port
2610
- , options.resource
2611
- , 'static/flashsocket'
2612
- , 'WebSocketMain' + (socket.isXDomain() ? 'Insecure' : '') + '.swf'
2613
- ];
2614
-
2615
- // Only start downloading the swf file when the checked that this browser
2616
- // actually supports it
2617
- if (!Flashsocket.loaded) {
2618
- if (typeof WEB_SOCKET_SWF_LOCATION === 'undefined') {
2619
- // Set the correct file based on the XDomain settings
2620
- WEB_SOCKET_SWF_LOCATION = path.join('/');
2621
- }
2622
-
2623
- if (port !== 843) {
2624
- WebSocket.loadFlashPolicyFile('xmlsocket://' + options.host + ':' + port);
2625
- }
2626
-
2627
- WebSocket.__initialize();
2628
- Flashsocket.loaded = true;
2629
- }
2630
-
2631
- fn.call(self);
2632
- }
2633
-
2634
- var self = this;
2635
- if (document.body) return init();
2636
-
2637
- io.util.load(init);
2638
- };
2639
-
2640
- /**
2641
- * Check if the FlashSocket transport is supported as it requires that the Adobe
2642
- * Flash Player plug-in version `10.0.0` or greater is installed. And also check if
2643
- * the polyfill is correctly loaded.
2644
- *
2645
- * @returns {Boolean}
2646
- * @api public
2647
- */
2648
-
2649
- Flashsocket.check = function () {
2650
- if (
2651
- typeof WebSocket == 'undefined'
2652
- || !('__initialize' in WebSocket) || !swfobject
2653
- ) return false;
2654
-
2655
- return swfobject.getFlashPlayerVersion().major >= 10;
2656
- };
2657
-
2658
- /**
2659
- * Check if the FlashSocket transport can be used as cross domain / cross origin
2660
- * transport. Because we can't see which type (secure or insecure) of .swf is used
2661
- * we will just return true.
2662
- *
2663
- * @returns {Boolean}
2664
- * @api public
2665
- */
2666
-
2667
- Flashsocket.xdomainCheck = function () {
2668
- return true;
2669
- };
2670
-
2671
- /**
2672
- * Disable AUTO_INITIALIZATION
2673
- */
2674
-
2675
- if (typeof window != 'undefined') {
2676
- WEB_SOCKET_DISABLE_AUTO_INITIALIZATION = true;
2677
- }
2678
-
2679
- /**
2680
- * Add the transport to your public io.transports array.
2681
- *
2682
- * @api private
2683
- */
2684
-
2685
- io.transports.push('flashsocket');
2686
- })(
2687
- 'undefined' != typeof io ? io.Transport : module.exports
2688
- , 'undefined' != typeof io ? io : module.parent.exports
2689
- );
2690
- /* SWFObject v2.2 <http://code.google.com/p/swfobject/>
2691
- is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
2692
- */
2693
- if ('undefined' != typeof window) {
2694
- var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O[(['Active'].concat('Object').join('X'))]!=D){try{var ad=new window[(['Active'].concat('Object').join('X'))](W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?(['Active'].concat('').join('X')):"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
2695
- }
2696
- // Copyright: Hiroshi Ichikawa <http://gimite.net/en/>
2697
- // License: New BSD License
2698
- // Reference: http://dev.w3.org/html5/websockets/
2699
- // Reference: http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol
2700
-
2701
- (function() {
2702
-
2703
- if ('undefined' == typeof window || window.WebSocket) return;
2704
-
2705
- var console = window.console;
2706
- if (!console || !console.log || !console.error) {
2707
- console = {log: function(){ }, error: function(){ }};
2708
- }
2709
-
2710
- if (!swfobject.hasFlashPlayerVersion("10.0.0")) {
2711
- console.error("Flash Player >= 10.0.0 is required.");
2712
- return;
2713
- }
2714
- if (location.protocol == "file:") {
2715
- console.error(
2716
- "WARNING: web-socket-js doesn't work in file:///... URL " +
2717
- "unless you set Flash Security Settings properly. " +
2718
- "Open the page via Web server i.e. http://...");
2719
- }
2720
-
2721
- /**
2722
- * This class represents a faux web socket.
2723
- * @param {string} url
2724
- * @param {array or string} protocols
2725
- * @param {string} proxyHost
2726
- * @param {int} proxyPort
2727
- * @param {string} headers
2728
- */
2729
- WebSocket = function(url, protocols, proxyHost, proxyPort, headers) {
2730
- var self = this;
2731
- self.__id = WebSocket.__nextId++;
2732
- WebSocket.__instances[self.__id] = self;
2733
- self.readyState = WebSocket.CONNECTING;
2734
- self.bufferedAmount = 0;
2735
- self.__events = {};
2736
- if (!protocols) {
2737
- protocols = [];
2738
- } else if (typeof protocols == "string") {
2739
- protocols = [protocols];
2740
- }
2741
- // Uses setTimeout() to make sure __createFlash() runs after the caller sets ws.onopen etc.
2742
- // Otherwise, when onopen fires immediately, onopen is called before it is set.
2743
- setTimeout(function() {
2744
- WebSocket.__addTask(function() {
2745
- WebSocket.__flash.create(
2746
- self.__id, url, protocols, proxyHost || null, proxyPort || 0, headers || null);
2747
- });
2748
- }, 0);
2749
- };
2750
-
2751
- /**
2752
- * Send data to the web socket.
2753
- * @param {string} data The data to send to the socket.
2754
- * @return {boolean} True for success, false for failure.
2755
- */
2756
- WebSocket.prototype.send = function(data) {
2757
- if (this.readyState == WebSocket.CONNECTING) {
2758
- throw "INVALID_STATE_ERR: Web Socket connection has not been established";
2759
- }
2760
- // We use encodeURIComponent() here, because FABridge doesn't work if
2761
- // the argument includes some characters. We don't use escape() here
2762
- // because of this:
2763
- // https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Functions#escape_and_unescape_Functions
2764
- // But it looks decodeURIComponent(encodeURIComponent(s)) doesn't
2765
- // preserve all Unicode characters either e.g. "\uffff" in Firefox.
2766
- // Note by wtritch: Hopefully this will not be necessary using ExternalInterface. Will require
2767
- // additional testing.
2768
- var result = WebSocket.__flash.send(this.__id, encodeURIComponent(data));
2769
- if (result < 0) { // success
2770
- return true;
2771
- } else {
2772
- this.bufferedAmount += result;
2773
- return false;
2774
- }
2775
- };
2776
-
2777
- /**
2778
- * Close this web socket gracefully.
2779
- */
2780
- WebSocket.prototype.close = function() {
2781
- if (this.readyState == WebSocket.CLOSED || this.readyState == WebSocket.CLOSING) {
2782
- return;
2783
- }
2784
- this.readyState = WebSocket.CLOSING;
2785
- WebSocket.__flash.close(this.__id);
2786
- };
2787
-
2788
- /**
2789
- * Implementation of {@link <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration">DOM 2 EventTarget Interface</a>}
2790
- *
2791
- * @param {string} type
2792
- * @param {function} listener
2793
- * @param {boolean} useCapture
2794
- * @return void
2795
- */
2796
- WebSocket.prototype.addEventListener = function(type, listener, useCapture) {
2797
- if (!(type in this.__events)) {
2798
- this.__events[type] = [];
2799
- }
2800
- this.__events[type].push(listener);
2801
- };
2802
-
2803
- /**
2804
- * Implementation of {@link <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration">DOM 2 EventTarget Interface</a>}
2805
- *
2806
- * @param {string} type
2807
- * @param {function} listener
2808
- * @param {boolean} useCapture
2809
- * @return void
2810
- */
2811
- WebSocket.prototype.removeEventListener = function(type, listener, useCapture) {
2812
- if (!(type in this.__events)) return;
2813
- var events = this.__events[type];
2814
- for (var i = events.length - 1; i >= 0; --i) {
2815
- if (events[i] === listener) {
2816
- events.splice(i, 1);
2817
- break;
2818
- }
2819
- }
2820
- };
2821
-
2822
- /**
2823
- * Implementation of {@link <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration">DOM 2 EventTarget Interface</a>}
2824
- *
2825
- * @param {Event} event
2826
- * @return void
2827
- */
2828
- WebSocket.prototype.dispatchEvent = function(event) {
2829
- var events = this.__events[event.type] || [];
2830
- for (var i = 0; i < events.length; ++i) {
2831
- events[i](event);
2832
- }
2833
- var handler = this["on" + event.type];
2834
- if (handler) handler(event);
2835
- };
2836
-
2837
- /**
2838
- * Handles an event from Flash.
2839
- * @param {Object} flashEvent
2840
- */
2841
- WebSocket.prototype.__handleEvent = function(flashEvent) {
2842
- if ("readyState" in flashEvent) {
2843
- this.readyState = flashEvent.readyState;
2844
- }
2845
- if ("protocol" in flashEvent) {
2846
- this.protocol = flashEvent.protocol;
2847
- }
2848
-
2849
- var jsEvent;
2850
- if (flashEvent.type == "open" || flashEvent.type == "error") {
2851
- jsEvent = this.__createSimpleEvent(flashEvent.type);
2852
- } else if (flashEvent.type == "close") {
2853
- // TODO implement jsEvent.wasClean
2854
- jsEvent = this.__createSimpleEvent("close");
2855
- } else if (flashEvent.type == "message") {
2856
- var data = decodeURIComponent(flashEvent.message);
2857
- jsEvent = this.__createMessageEvent("message", data);
2858
- } else {
2859
- throw "unknown event type: " + flashEvent.type;
2860
- }
2861
-
2862
- this.dispatchEvent(jsEvent);
2863
- };
2864
-
2865
- WebSocket.prototype.__createSimpleEvent = function(type) {
2866
- if (document.createEvent && window.Event) {
2867
- var event = document.createEvent("Event");
2868
- event.initEvent(type, false, false);
2869
- return event;
2870
- } else {
2871
- return {type: type, bubbles: false, cancelable: false};
2872
- }
2873
- };
2874
-
2875
- WebSocket.prototype.__createMessageEvent = function(type, data) {
2876
- if (document.createEvent && window.MessageEvent && !window.opera) {
2877
- var event = document.createEvent("MessageEvent");
2878
- event.initMessageEvent("message", false, false, data, null, null, window, null);
2879
- return event;
2880
- } else {
2881
- // IE and Opera, the latter one truncates the data parameter after any 0x00 bytes.
2882
- return {type: type, data: data, bubbles: false, cancelable: false};
2883
- }
2884
- };
2885
-
2886
- /**
2887
- * Define the WebSocket readyState enumeration.
2888
- */
2889
- WebSocket.CONNECTING = 0;
2890
- WebSocket.OPEN = 1;
2891
- WebSocket.CLOSING = 2;
2892
- WebSocket.CLOSED = 3;
2893
-
2894
- WebSocket.__flash = null;
2895
- WebSocket.__instances = {};
2896
- WebSocket.__tasks = [];
2897
- WebSocket.__nextId = 0;
2898
-
2899
- /**
2900
- * Load a new flash security policy file.
2901
- * @param {string} url
2902
- */
2903
- WebSocket.loadFlashPolicyFile = function(url){
2904
- WebSocket.__addTask(function() {
2905
- WebSocket.__flash.loadManualPolicyFile(url);
2906
- });
2907
- };
2908
-
2909
- /**
2910
- * Loads WebSocketMain.swf and creates WebSocketMain object in Flash.
2911
- */
2912
- WebSocket.__initialize = function() {
2913
- if (WebSocket.__flash) return;
2914
-
2915
- if (WebSocket.__swfLocation) {
2916
- // For backword compatibility.
2917
- window.WEB_SOCKET_SWF_LOCATION = WebSocket.__swfLocation;
2918
- }
2919
- if (!window.WEB_SOCKET_SWF_LOCATION) {
2920
- console.error("[WebSocket] set WEB_SOCKET_SWF_LOCATION to location of WebSocketMain.swf");
2921
- return;
2922
- }
2923
- var container = document.createElement("div");
2924
- container.id = "webSocketContainer";
2925
- // Hides Flash box. We cannot use display: none or visibility: hidden because it prevents
2926
- // Flash from loading at least in IE. So we move it out of the screen at (-100, -100).
2927
- // But this even doesn't work with Flash Lite (e.g. in Droid Incredible). So with Flash
2928
- // Lite, we put it at (0, 0). This shows 1x1 box visible at left-top corner but this is
2929
- // the best we can do as far as we know now.
2930
- container.style.position = "absolute";
2931
- if (WebSocket.__isFlashLite()) {
2932
- container.style.left = "0px";
2933
- container.style.top = "0px";
2934
- } else {
2935
- container.style.left = "-100px";
2936
- container.style.top = "-100px";
2937
- }
2938
- var holder = document.createElement("div");
2939
- holder.id = "webSocketFlash";
2940
- container.appendChild(holder);
2941
- document.body.appendChild(container);
2942
- // See this article for hasPriority:
2943
- // http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c36cfb8137124318eebc6-7ffd.html
2944
- swfobject.embedSWF(
2945
- WEB_SOCKET_SWF_LOCATION,
2946
- "webSocketFlash",
2947
- "1" /* width */,
2948
- "1" /* height */,
2949
- "10.0.0" /* SWF version */,
2950
- null,
2951
- null,
2952
- {hasPriority: true, swliveconnect : true, allowScriptAccess: "always"},
2953
- null,
2954
- function(e) {
2955
- if (!e.success) {
2956
- console.error("[WebSocket] swfobject.embedSWF failed");
2957
- }
2958
- });
2959
- };
2960
-
2961
- /**
2962
- * Called by Flash to notify JS that it's fully loaded and ready
2963
- * for communication.
2964
- */
2965
- WebSocket.__onFlashInitialized = function() {
2966
- // We need to set a timeout here to avoid round-trip calls
2967
- // to flash during the initialization process.
2968
- setTimeout(function() {
2969
- WebSocket.__flash = document.getElementById("webSocketFlash");
2970
- WebSocket.__flash.setCallerUrl(location.href);
2971
- WebSocket.__flash.setDebug(!!window.WEB_SOCKET_DEBUG);
2972
- for (var i = 0; i < WebSocket.__tasks.length; ++i) {
2973
- WebSocket.__tasks[i]();
2974
- }
2975
- WebSocket.__tasks = [];
2976
- }, 0);
2977
- };
2978
-
2979
- /**
2980
- * Called by Flash to notify WebSockets events are fired.
2981
- */
2982
- WebSocket.__onFlashEvent = function() {
2983
- setTimeout(function() {
2984
- try {
2985
- // Gets events using receiveEvents() instead of getting it from event object
2986
- // of Flash event. This is to make sure to keep message order.
2987
- // It seems sometimes Flash events don't arrive in the same order as they are sent.
2988
- var events = WebSocket.__flash.receiveEvents();
2989
- for (var i = 0; i < events.length; ++i) {
2990
- WebSocket.__instances[events[i].webSocketId].__handleEvent(events[i]);
2991
- }
2992
- } catch (e) {
2993
- console.error(e);
2994
- }
2995
- }, 0);
2996
- return true;
2997
- };
2998
-
2999
- // Called by Flash.
3000
- WebSocket.__log = function(message) {
3001
- console.log(decodeURIComponent(message));
3002
- };
3003
-
3004
- // Called by Flash.
3005
- WebSocket.__error = function(message) {
3006
- console.error(decodeURIComponent(message));
3007
- };
3008
-
3009
- WebSocket.__addTask = function(task) {
3010
- if (WebSocket.__flash) {
3011
- task();
3012
- } else {
3013
- WebSocket.__tasks.push(task);
3014
- }
3015
- };
3016
-
3017
- /**
3018
- * Test if the browser is running flash lite.
3019
- * @return {boolean} True if flash lite is running, false otherwise.
3020
- */
3021
- WebSocket.__isFlashLite = function() {
3022
- if (!window.navigator || !window.navigator.mimeTypes) {
3023
- return false;
3024
- }
3025
- var mimeType = window.navigator.mimeTypes["application/x-shockwave-flash"];
3026
- if (!mimeType || !mimeType.enabledPlugin || !mimeType.enabledPlugin.filename) {
3027
- return false;
3028
- }
3029
- return mimeType.enabledPlugin.filename.match(/flashlite/i) ? true : false;
3030
- };
3031
-
3032
- if (!window.WEB_SOCKET_DISABLE_AUTO_INITIALIZATION) {
3033
- if (window.addEventListener) {
3034
- window.addEventListener("load", function(){
3035
- WebSocket.__initialize();
3036
- }, false);
3037
- } else {
3038
- window.attachEvent("onload", function(){
3039
- WebSocket.__initialize();
3040
- });
3041
- }
3042
- }
3043
-
3044
- })();
3045
-
3046
- /**
3047
- * socket.io
3048
- * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
3049
- * MIT Licensed
3050
- */
3051
-
3052
- (function (exports, io) {
3053
-
3054
- /**
3055
- * Expose constructor.
3056
- *
3057
- * @api public
3058
- */
3059
-
3060
- exports.XHR = XHR;
3061
-
3062
- /**
3063
- * XHR constructor
3064
- *
3065
- * @costructor
3066
- * @api public
3067
- */
3068
-
3069
- function XHR (socket) {
3070
- if (!socket) return;
3071
-
3072
- io.Transport.apply(this, arguments);
3073
- this.sendBuffer = [];
3074
- };
3075
-
3076
- /**
3077
- * Inherits from Transport.
3078
- */
3079
-
3080
- io.util.inherit(XHR, io.Transport);
3081
-
3082
- /**
3083
- * Establish a connection
3084
- *
3085
- * @returns {Transport}
3086
- * @api public
3087
- */
3088
-
3089
- XHR.prototype.open = function () {
3090
- this.socket.setBuffer(false);
3091
- this.onOpen();
3092
- this.get();
3093
-
3094
- // we need to make sure the request succeeds since we have no indication
3095
- // whether the request opened or not until it succeeded.
3096
- this.setCloseTimeout();
3097
-
3098
- return this;
3099
- };
3100
-
3101
- /**
3102
- * Check if we need to send data to the Socket.IO server, if we have data in our
3103
- * buffer we encode it and forward it to the `post` method.
3104
- *
3105
- * @api private
3106
- */
3107
-
3108
- XHR.prototype.payload = function (payload) {
3109
- var msgs = [];
3110
-
3111
- for (var i = 0, l = payload.length; i < l; i++) {
3112
- msgs.push(io.parser.encodePacket(payload[i]));
3113
- }
3114
-
3115
- this.send(io.parser.encodePayload(msgs));
3116
- };
3117
-
3118
- /**
3119
- * Send data to the Socket.IO server.
3120
- *
3121
- * @param data The message
3122
- * @returns {Transport}
3123
- * @api public
3124
- */
3125
-
3126
- XHR.prototype.send = function (data) {
3127
- this.post(data);
3128
- return this;
3129
- };
3130
-
3131
- /**
3132
- * Posts a encoded message to the Socket.IO server.
3133
- *
3134
- * @param {String} data A encoded message.
3135
- * @api private
3136
- */
3137
-
3138
- function empty () { };
3139
-
3140
- XHR.prototype.post = function (data) {
3141
- var self = this;
3142
- this.socket.setBuffer(true);
3143
-
3144
- function stateChange () {
3145
- if (this.readyState == 4) {
3146
- this.onreadystatechange = empty;
3147
- self.posting = false;
3148
-
3149
- if (this.status == 200){
3150
- self.socket.setBuffer(false);
3151
- } else {
3152
- self.onClose();
3153
- }
3154
- }
3155
- }
3156
-
3157
- function onload () {
3158
- this.onload = empty;
3159
- self.socket.setBuffer(false);
3160
- };
3161
-
3162
- this.sendXHR = this.request('POST');
3163
-
3164
- if (global.XDomainRequest && this.sendXHR instanceof XDomainRequest) {
3165
- this.sendXHR.onload = this.sendXHR.onerror = onload;
3166
- } else {
3167
- this.sendXHR.onreadystatechange = stateChange;
3168
- }
3169
-
3170
- this.sendXHR.send(data);
3171
- };
3172
-
3173
- /**
3174
- * Disconnects the established `XHR` connection.
3175
- *
3176
- * @returns {Transport}
3177
- * @api public
3178
- */
3179
-
3180
- XHR.prototype.close = function () {
3181
- this.onClose();
3182
- return this;
3183
- };
3184
-
3185
- /**
3186
- * Generates a configured XHR request
3187
- *
3188
- * @param {String} url The url that needs to be requested.
3189
- * @param {String} method The method the request should use.
3190
- * @returns {XMLHttpRequest}
3191
- * @api private
3192
- */
3193
-
3194
- XHR.prototype.request = function (method) {
3195
- var req = io.util.request(this.socket.isXDomain())
3196
- , query = io.util.query(this.socket.options.query, 't=' + +new Date);
3197
-
3198
- req.open(method || 'GET', this.prepareUrl() + query, true);
3199
-
3200
- if (method == 'POST') {
3201
- try {
3202
- if (req.setRequestHeader) {
3203
- req.setRequestHeader('Content-type', 'text/plain;charset=UTF-8');
3204
- } else {
3205
- // XDomainRequest
3206
- req.contentType = 'text/plain';
3207
- }
3208
- } catch (e) {}
3209
- }
3210
-
3211
- return req;
3212
- };
3213
-
3214
- /**
3215
- * Returns the scheme to use for the transport URLs.
3216
- *
3217
- * @api private
3218
- */
3219
-
3220
- XHR.prototype.scheme = function () {
3221
- return this.socket.options.secure ? 'https' : 'http';
3222
- };
3223
-
3224
- /**
3225
- * Check if the XHR transports are supported
3226
- *
3227
- * @param {Boolean} xdomain Check if we support cross domain requests.
3228
- * @returns {Boolean}
3229
- * @api public
3230
- */
3231
-
3232
- XHR.check = function (socket, xdomain) {
3233
- try {
3234
- var request = io.util.request(xdomain),
3235
- usesXDomReq = (global.XDomainRequest && request instanceof XDomainRequest),
3236
- socketProtocol = (socket && socket.options && socket.options.secure ? 'https:' : 'http:'),
3237
- isXProtocol = (global.location && socketProtocol != global.location.protocol);
3238
- if (request && !(usesXDomReq && isXProtocol)) {
3239
- return true;
3240
- }
3241
- } catch(e) {}
3242
-
3243
- return false;
3244
- };
3245
-
3246
- /**
3247
- * Check if the XHR transport supports cross domain requests.
3248
- *
3249
- * @returns {Boolean}
3250
- * @api public
3251
- */
3252
-
3253
- XHR.xdomainCheck = function (socket) {
3254
- return XHR.check(socket, true);
3255
- };
3256
-
3257
- })(
3258
- 'undefined' != typeof io ? io.Transport : module.exports
3259
- , 'undefined' != typeof io ? io : module.parent.exports
3260
- );
3261
- /**
3262
- * socket.io
3263
- * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
3264
- * MIT Licensed
3265
- */
3266
-
3267
- (function (exports, io) {
3268
-
3269
- /**
3270
- * Expose constructor.
3271
- */
3272
-
3273
- exports.htmlfile = HTMLFile;
3274
-
3275
- /**
3276
- * The HTMLFile transport creates a `forever iframe` based transport
3277
- * for Internet Explorer. Regular forever iframe implementations will
3278
- * continuously trigger the browsers buzy indicators. If the forever iframe
3279
- * is created inside a `htmlfile` these indicators will not be trigged.
3280
- *
3281
- * @constructor
3282
- * @extends {io.Transport.XHR}
3283
- * @api public
3284
- */
3285
-
3286
- function HTMLFile (socket) {
3287
- io.Transport.XHR.apply(this, arguments);
3288
- };
3289
-
3290
- /**
3291
- * Inherits from XHR transport.
3292
- */
3293
-
3294
- io.util.inherit(HTMLFile, io.Transport.XHR);
3295
-
3296
- /**
3297
- * Transport name
3298
- *
3299
- * @api public
3300
- */
3301
-
3302
- HTMLFile.prototype.name = 'htmlfile';
3303
-
3304
- /**
3305
- * Creates a new Ac...eX `htmlfile` with a forever loading iframe
3306
- * that can be used to listen to messages. Inside the generated
3307
- * `htmlfile` a reference will be made to the HTMLFile transport.
3308
- *
3309
- * @api private
3310
- */
3311
-
3312
- HTMLFile.prototype.get = function () {
3313
- this.doc = new window[(['Active'].concat('Object').join('X'))]('htmlfile');
3314
- this.doc.open();
3315
- this.doc.write('<html></html>');
3316
- this.doc.close();
3317
- this.doc.parentWindow.s = this;
3318
-
3319
- var iframeC = this.doc.createElement('div');
3320
- iframeC.className = 'socketio';
3321
-
3322
- this.doc.body.appendChild(iframeC);
3323
- this.iframe = this.doc.createElement('iframe');
3324
-
3325
- iframeC.appendChild(this.iframe);
3326
-
3327
- var self = this
3328
- , query = io.util.query(this.socket.options.query, 't='+ +new Date);
3329
-
3330
- this.iframe.src = this.prepareUrl() + query;
3331
-
3332
- io.util.on(window, 'unload', function () {
3333
- self.destroy();
3334
- });
3335
- };
3336
-
3337
- /**
3338
- * The Socket.IO server will write script tags inside the forever
3339
- * iframe, this function will be used as callback for the incoming
3340
- * information.
3341
- *
3342
- * @param {String} data The message
3343
- * @param {document} doc Reference to the context
3344
- * @api private
3345
- */
3346
-
3347
- HTMLFile.prototype._ = function (data, doc) {
3348
- this.onData(data);
3349
- try {
3350
- var script = doc.getElementsByTagName('script')[0];
3351
- script.parentNode.removeChild(script);
3352
- } catch (e) { }
3353
- };
3354
-
3355
- /**
3356
- * Destroy the established connection, iframe and `htmlfile`.
3357
- * And calls the `CollectGarbage` function of Internet Explorer
3358
- * to release the memory.
3359
- *
3360
- * @api private
3361
- */
3362
-
3363
- HTMLFile.prototype.destroy = function () {
3364
- if (this.iframe){
3365
- try {
3366
- this.iframe.src = 'about:blank';
3367
- } catch(e){}
3368
-
3369
- this.doc = null;
3370
- this.iframe.parentNode.removeChild(this.iframe);
3371
- this.iframe = null;
3372
-
3373
- CollectGarbage();
3374
- }
3375
- };
3376
-
3377
- /**
3378
- * Disconnects the established connection.
3379
- *
3380
- * @returns {Transport} Chaining.
3381
- * @api public
3382
- */
3383
-
3384
- HTMLFile.prototype.close = function () {
3385
- this.destroy();
3386
- return io.Transport.XHR.prototype.close.call(this);
3387
- };
3388
-
3389
- /**
3390
- * Checks if the browser supports this transport. The browser
3391
- * must have an `Ac...eXObject` implementation.
3392
- *
3393
- * @return {Boolean}
3394
- * @api public
3395
- */
3396
-
3397
- HTMLFile.check = function (socket) {
3398
- if (typeof window != "undefined" && (['Active'].concat('Object').join('X')) in window){
3399
- try {
3400
- var a = new window[(['Active'].concat('Object').join('X'))]('htmlfile');
3401
- return a && io.Transport.XHR.check(socket);
3402
- } catch(e){}
3403
- }
3404
- return false;
3405
- };
3406
-
3407
- /**
3408
- * Check if cross domain requests are supported.
3409
- *
3410
- * @returns {Boolean}
3411
- * @api public
3412
- */
3413
-
3414
- HTMLFile.xdomainCheck = function () {
3415
- // we can probably do handling for sub-domains, we should
3416
- // test that it's cross domain but a subdomain here
3417
- return false;
3418
- };
3419
-
3420
- /**
3421
- * Add the transport to your public io.transports array.
3422
- *
3423
- * @api private
3424
- */
3425
-
3426
- io.transports.push('htmlfile');
3427
-
3428
- })(
3429
- 'undefined' != typeof io ? io.Transport : module.exports
3430
- , 'undefined' != typeof io ? io : module.parent.exports
3431
- );
3432
-
3433
- /**
3434
- * socket.io
3435
- * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
3436
- * MIT Licensed
3437
- */
3438
-
3439
- (function (exports, io) {
3440
-
3441
- /**
3442
- * Expose constructor.
3443
- */
3444
-
3445
- exports['xhr-polling'] = XHRPolling;
3446
-
3447
- /**
3448
- * The XHR-polling transport uses long polling XHR requests to create a
3449
- * "persistent" connection with the server.
3450
- *
3451
- * @constructor
3452
- * @api public
3453
- */
3454
-
3455
- function XHRPolling () {
3456
- io.Transport.XHR.apply(this, arguments);
3457
- };
3458
-
3459
- /**
3460
- * Inherits from XHR transport.
3461
- */
3462
-
3463
- io.util.inherit(XHRPolling, io.Transport.XHR);
3464
-
3465
- /**
3466
- * Merge the properties from XHR transport
3467
- */
3468
-
3469
- io.util.merge(XHRPolling, io.Transport.XHR);
3470
-
3471
- /**
3472
- * Transport name
3473
- *
3474
- * @api public
3475
- */
3476
-
3477
- XHRPolling.prototype.name = 'xhr-polling';
3478
-
3479
- /**
3480
- * Indicates whether heartbeats is enabled for this transport
3481
- *
3482
- * @api private
3483
- */
3484
-
3485
- XHRPolling.prototype.heartbeats = function () {
3486
- return false;
3487
- };
3488
-
3489
- /**
3490
- * Establish a connection, for iPhone and Android this will be done once the page
3491
- * is loaded.
3492
- *
3493
- * @returns {Transport} Chaining.
3494
- * @api public
3495
- */
3496
-
3497
- XHRPolling.prototype.open = function () {
3498
- var self = this;
3499
-
3500
- io.Transport.XHR.prototype.open.call(self);
3501
- return false;
3502
- };
3503
-
3504
- /**
3505
- * Starts a XHR request to wait for incoming messages.
3506
- *
3507
- * @api private
3508
- */
3509
-
3510
- function empty () {};
3511
-
3512
- XHRPolling.prototype.get = function () {
3513
- if (!this.isOpen) return;
3514
-
3515
- var self = this;
3516
-
3517
- function stateChange () {
3518
- if (this.readyState == 4) {
3519
- this.onreadystatechange = empty;
3520
-
3521
- if (this.status == 200) {
3522
- self.onData(this.responseText);
3523
- self.get();
3524
- } else {
3525
- self.onClose();
3526
- }
3527
- }
3528
- };
3529
-
3530
- function onload () {
3531
- this.onload = empty;
3532
- this.onerror = empty;
3533
- self.retryCounter = 1;
3534
- self.onData(this.responseText);
3535
- self.get();
3536
- };
3537
-
3538
- function onerror () {
3539
- self.retryCounter ++;
3540
- if(!self.retryCounter || self.retryCounter > 3) {
3541
- self.onClose();
3542
- } else {
3543
- self.get();
3544
- }
3545
- };
3546
-
3547
- this.xhr = this.request();
3548
-
3549
- if (global.XDomainRequest && this.xhr instanceof XDomainRequest) {
3550
- this.xhr.onload = onload;
3551
- this.xhr.onerror = onerror;
3552
- } else {
3553
- this.xhr.onreadystatechange = stateChange;
3554
- }
3555
-
3556
- this.xhr.send(null);
3557
- };
3558
-
3559
- /**
3560
- * Handle the unclean close behavior.
3561
- *
3562
- * @api private
3563
- */
3564
-
3565
- XHRPolling.prototype.onClose = function () {
3566
- io.Transport.XHR.prototype.onClose.call(this);
3567
-
3568
- if (this.xhr) {
3569
- this.xhr.onreadystatechange = this.xhr.onload = this.xhr.onerror = empty;
3570
- try {
3571
- this.xhr.abort();
3572
- } catch(e){}
3573
- this.xhr = null;
3574
- }
3575
- };
3576
-
3577
- /**
3578
- * Webkit based browsers show a infinit spinner when you start a XHR request
3579
- * before the browsers onload event is called so we need to defer opening of
3580
- * the transport until the onload event is called. Wrapping the cb in our
3581
- * defer method solve this.
3582
- *
3583
- * @param {Socket} socket The socket instance that needs a transport
3584
- * @param {Function} fn The callback
3585
- * @api private
3586
- */
3587
-
3588
- XHRPolling.prototype.ready = function (socket, fn) {
3589
- var self = this;
3590
-
3591
- io.util.defer(function () {
3592
- fn.call(self);
3593
- });
3594
- };
3595
-
3596
- /**
3597
- * Add the transport to your public io.transports array.
3598
- *
3599
- * @api private
3600
- */
3601
-
3602
- io.transports.push('xhr-polling');
3603
-
3604
- })(
3605
- 'undefined' != typeof io ? io.Transport : module.exports
3606
- , 'undefined' != typeof io ? io : module.parent.exports
3607
- );
3608
-
3609
- /**
3610
- * socket.io
3611
- * Copyright(c) 2011 LearnBoost <dev@learnboost.com>
3612
- * MIT Licensed
3613
- */
3614
-
3615
- (function (exports, io) {
3616
- /**
3617
- * There is a way to hide the loading indicator in Firefox. If you create and
3618
- * remove a iframe it will stop showing the current loading indicator.
3619
- * Unfortunately we can't feature detect that and UA sniffing is evil.
3620
- *
3621
- * @api private
3622
- */
3623
-
3624
- var indicator = global.document && "MozAppearance" in
3625
- global.document.documentElement.style;
3626
-
3627
- /**
3628
- * Expose constructor.
3629
- */
3630
-
3631
- exports['jsonp-polling'] = JSONPPolling;
3632
-
3633
- /**
3634
- * The JSONP transport creates an persistent connection by dynamically
3635
- * inserting a script tag in the page. This script tag will receive the
3636
- * information of the Socket.IO server. When new information is received
3637
- * it creates a new script tag for the new data stream.
3638
- *
3639
- * @constructor
3640
- * @extends {io.Transport.xhr-polling}
3641
- * @api public
3642
- */
3643
-
3644
- function JSONPPolling (socket) {
3645
- io.Transport['xhr-polling'].apply(this, arguments);
3646
-
3647
- this.index = io.j.length;
3648
-
3649
- var self = this;
3650
-
3651
- io.j.push(function (msg) {
3652
- self._(msg);
3653
- });
3654
- };
3655
-
3656
- /**
3657
- * Inherits from XHR polling transport.
3658
- */
3659
-
3660
- io.util.inherit(JSONPPolling, io.Transport['xhr-polling']);
3661
-
3662
- /**
3663
- * Transport name
3664
- *
3665
- * @api public
3666
- */
3667
-
3668
- JSONPPolling.prototype.name = 'jsonp-polling';
3669
-
3670
- /**
3671
- * Posts a encoded message to the Socket.IO server using an iframe.
3672
- * The iframe is used because script tags can create POST based requests.
3673
- * The iframe is positioned outside of the view so the user does not
3674
- * notice it's existence.
3675
- *
3676
- * @param {String} data A encoded message.
3677
- * @api private
3678
- */
3679
-
3680
- JSONPPolling.prototype.post = function (data) {
3681
- var self = this
3682
- , query = io.util.query(
3683
- this.socket.options.query
3684
- , 't='+ (+new Date) + '&i=' + this.index
3685
- );
3686
-
3687
- if (!this.form) {
3688
- var form = document.createElement('form')
3689
- , area = document.createElement('textarea')
3690
- , id = this.iframeId = 'socketio_iframe_' + this.index
3691
- , iframe;
3692
-
3693
- form.className = 'socketio';
3694
- form.style.position = 'absolute';
3695
- form.style.top = '0px';
3696
- form.style.left = '0px';
3697
- form.style.display = 'none';
3698
- form.target = id;
3699
- form.method = 'POST';
3700
- form.setAttribute('accept-charset', 'utf-8');
3701
- area.name = 'd';
3702
- form.appendChild(area);
3703
- document.body.appendChild(form);
3704
-
3705
- this.form = form;
3706
- this.area = area;
3707
- }
3708
-
3709
- this.form.action = this.prepareUrl() + query;
3710
-
3711
- function complete () {
3712
- initIframe();
3713
- self.socket.setBuffer(false);
3714
- };
3715
-
3716
- function initIframe () {
3717
- if (self.iframe) {
3718
- self.form.removeChild(self.iframe);
3719
- }
3720
-
3721
- try {
3722
- // ie6 dynamic iframes with target="" support (thanks Chris Lambacher)
3723
- iframe = document.createElement('<iframe name="'+ self.iframeId +'">');
3724
- } catch (e) {
3725
- iframe = document.createElement('iframe');
3726
- iframe.name = self.iframeId;
3727
- }
3728
-
3729
- iframe.id = self.iframeId;
3730
-
3731
- self.form.appendChild(iframe);
3732
- self.iframe = iframe;
3733
- };
3734
-
3735
- initIframe();
3736
-
3737
- // we temporarily stringify until we figure out how to prevent
3738
- // browsers from turning `\n` into `\r\n` in form inputs
3739
- this.area.value = io.JSON.stringify(data);
3740
-
3741
- try {
3742
- this.form.submit();
3743
- } catch(e) {}
3744
-
3745
- if (this.iframe.attachEvent) {
3746
- iframe.onreadystatechange = function () {
3747
- if (self.iframe.readyState == 'complete') {
3748
- complete();
3749
- }
3750
- };
3751
- } else {
3752
- this.iframe.onload = complete;
3753
- }
3754
-
3755
- this.socket.setBuffer(true);
3756
- };
3757
-
3758
- /**
3759
- * Creates a new JSONP poll that can be used to listen
3760
- * for messages from the Socket.IO server.
3761
- *
3762
- * @api private
3763
- */
3764
-
3765
- JSONPPolling.prototype.get = function () {
3766
- var self = this
3767
- , script = document.createElement('script')
3768
- , query = io.util.query(
3769
- this.socket.options.query
3770
- , 't='+ (+new Date) + '&i=' + this.index
3771
- );
3772
-
3773
- if (this.script) {
3774
- this.script.parentNode.removeChild(this.script);
3775
- this.script = null;
3776
- }
3777
-
3778
- script.async = true;
3779
- script.src = this.prepareUrl() + query;
3780
- script.onerror = function () {
3781
- self.onClose();
3782
- };
3783
-
3784
- var insertAt = document.getElementsByTagName('script')[0];
3785
- insertAt.parentNode.insertBefore(script, insertAt);
3786
- this.script = script;
3787
-
3788
- if (indicator) {
3789
- setTimeout(function () {
3790
- var iframe = document.createElement('iframe');
3791
- document.body.appendChild(iframe);
3792
- document.body.removeChild(iframe);
3793
- }, 100);
3794
- }
3795
- };
3796
-
3797
- /**
3798
- * Callback function for the incoming message stream from the Socket.IO server.
3799
- *
3800
- * @param {String} data The message
3801
- * @api private
3802
- */
3803
-
3804
- JSONPPolling.prototype._ = function (msg) {
3805
- this.onData(msg);
3806
- if (this.isOpen) {
3807
- this.get();
3808
- }
3809
- return this;
3810
- };
3811
-
3812
- /**
3813
- * The indicator hack only works after onload
3814
- *
3815
- * @param {Socket} socket The socket instance that needs a transport
3816
- * @param {Function} fn The callback
3817
- * @api private
3818
- */
3819
-
3820
- JSONPPolling.prototype.ready = function (socket, fn) {
3821
- var self = this;
3822
- if (!indicator) return fn.call(this);
3823
-
3824
- io.util.load(function () {
3825
- fn.call(self);
3826
- });
3827
- };
3828
-
3829
- /**
3830
- * Checks if browser supports this transport.
3831
- *
3832
- * @return {Boolean}
3833
- * @api public
3834
- */
3835
-
3836
- JSONPPolling.check = function () {
3837
- return 'document' in global;
3838
- };
3839
-
3840
- /**
3841
- * Check if cross domain requests are supported
3842
- *
3843
- * @returns {Boolean}
3844
- * @api public
3845
- */
3846
-
3847
- JSONPPolling.xdomainCheck = function () {
3848
- return true;
3849
- };
3850
-
3851
- /**
3852
- * Add the transport to your public io.transports array.
3853
- *
3854
- * @api private
3855
- */
3856
-
3857
- io.transports.push('jsonp-polling');
3858
-
3859
- })(
3860
- 'undefined' != typeof io ? io.Transport : module.exports
3861
- , 'undefined' != typeof io ? io : module.parent.exports
3862
- );
3863
-
3864
- if (typeof define === "function" && define.amd) {
3865
- define([], function () { return io; });
3866
- } else {
3867
- return io;
3868
- }
3869
-
3870
- })(window);