freezerwatch 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (314) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/CODE_OF_CONDUCT.md +13 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +40 -0
  7. data/Rakefile +1 -0
  8. data/bin/console +14 -0
  9. data/bin/freezerwatch +9 -0
  10. data/bin/setup +7 -0
  11. data/freezerwatch.gemspec +23 -0
  12. data/lib/freezerwatch.rb +5 -0
  13. data/lib/freezerwatch/version.rb +3 -0
  14. data/node_modules/.bin/freezerwatch +139 -0
  15. data/node_modules/freezerwatch/.npmignore +3 -0
  16. data/node_modules/freezerwatch/.ruby-version +1 -0
  17. data/node_modules/freezerwatch/Gemfile +4 -0
  18. data/node_modules/freezerwatch/Gemfile.lock +79 -0
  19. data/node_modules/freezerwatch/LICENSE +23 -0
  20. data/node_modules/freezerwatch/README.md +41 -0
  21. data/node_modules/freezerwatch/Rakefile +13 -0
  22. data/node_modules/freezerwatch/freezerwatch.js +139 -0
  23. data/node_modules/freezerwatch/metrics/bigfiles_high_water_mark +1 -0
  24. data/node_modules/freezerwatch/metrics/cane_high_water_mark +1 -0
  25. data/node_modules/freezerwatch/metrics/flay_high_water_mark +1 -0
  26. data/node_modules/freezerwatch/metrics/flog_high_water_mark +1 -0
  27. data/node_modules/freezerwatch/metrics/punchlist_high_water_mark +2 -0
  28. data/node_modules/freezerwatch/metrics/reek_high_water_mark +1 -0
  29. data/node_modules/freezerwatch/metrics/rubocop_high_water_mark +1 -0
  30. data/node_modules/freezerwatch/node_modules/async/.jshintrc +25 -0
  31. data/node_modules/freezerwatch/node_modules/async/.travis.yml +6 -0
  32. data/node_modules/freezerwatch/node_modules/async/CHANGELOG.md +65 -0
  33. data/node_modules/freezerwatch/node_modules/async/LICENSE +19 -0
  34. data/node_modules/freezerwatch/node_modules/async/README.md +1803 -0
  35. data/node_modules/freezerwatch/node_modules/async/bower.json +43 -0
  36. data/node_modules/freezerwatch/node_modules/async/component.json +17 -0
  37. data/node_modules/freezerwatch/node_modules/async/coverage/base.css +182 -0
  38. data/node_modules/freezerwatch/node_modules/async/coverage/index.html +73 -0
  39. data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/base.css +182 -0
  40. data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/index.html +73 -0
  41. data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/lib/async.js.html +3900 -0
  42. data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/lib/index.html +73 -0
  43. data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/prettify.css +1 -0
  44. data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/prettify.js +1 -0
  45. data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  46. data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/sorter.js +156 -0
  47. data/node_modules/freezerwatch/node_modules/async/coverage/lcov.info +1452 -0
  48. data/node_modules/freezerwatch/node_modules/async/coverage/lib/async.js.html +3597 -0
  49. data/node_modules/freezerwatch/node_modules/async/coverage/lib/index.html +73 -0
  50. data/node_modules/freezerwatch/node_modules/async/coverage/prettify.css +1 -0
  51. data/node_modules/freezerwatch/node_modules/async/coverage/prettify.js +1 -0
  52. data/node_modules/freezerwatch/node_modules/async/coverage/sort-arrow-sprite.png +0 -0
  53. data/node_modules/freezerwatch/node_modules/async/coverage/sorter.js +156 -0
  54. data/node_modules/freezerwatch/node_modules/async/lib/async.js +1191 -0
  55. data/node_modules/freezerwatch/node_modules/async/nyc_output/5074.json +1 -0
  56. data/node_modules/freezerwatch/node_modules/async/package.json +96 -0
  57. data/node_modules/freezerwatch/node_modules/async/support/sync-package-managers.js +53 -0
  58. data/node_modules/freezerwatch/node_modules/lacrosse/.npmignore +15 -0
  59. data/node_modules/freezerwatch/node_modules/lacrosse/Client.js +60 -0
  60. data/node_modules/freezerwatch/node_modules/lacrosse/Device.js +38 -0
  61. data/node_modules/freezerwatch/node_modules/lacrosse/DeviceRawReadStream.js +36 -0
  62. data/node_modules/freezerwatch/node_modules/lacrosse/DeviceSingleRawReadStream.js +29 -0
  63. data/node_modules/freezerwatch/node_modules/lacrosse/DeviceStream.js +35 -0
  64. data/node_modules/freezerwatch/node_modules/lacrosse/LICENSE +23 -0
  65. data/node_modules/freezerwatch/node_modules/lacrosse/README.md +25 -0
  66. data/node_modules/freezerwatch/node_modules/lacrosse/index.js +1 -0
  67. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/.npmignore +2 -0
  68. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/.travis.yml +12 -0
  69. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/LICENSE +55 -0
  70. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/README.md +364 -0
  71. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/index.js +156 -0
  72. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/copy.js +8 -0
  73. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/debug.js +7 -0
  74. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/getSafe.js +34 -0
  75. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/optional.js +5 -0
  76. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/.bin/uuid +26 -0
  77. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/LICENSE +55 -0
  78. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/README.md +4 -0
  79. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/index.js +202 -0
  80. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/package.json +46 -0
  81. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/LICENSE +55 -0
  82. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/README.md +4 -0
  83. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/index.js +119 -0
  84. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/package.json +45 -0
  85. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/License +19 -0
  86. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/Readme.md +175 -0
  87. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/lib/form_data.js +351 -0
  88. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/.travis.yml +5 -0
  89. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +19 -0
  90. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/README.md +1647 -0
  91. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/bower.json +38 -0
  92. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/component.json +16 -0
  93. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +1123 -0
  94. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/package.json +84 -0
  95. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/support/sync-package-managers.js +53 -0
  96. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/License +19 -0
  97. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md +132 -0
  98. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js +188 -0
  99. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore +2 -0
  100. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License +19 -0
  101. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile +7 -0
  102. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md +154 -0
  103. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js +99 -0
  104. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json +42 -0
  105. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js +6 -0
  106. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js +38 -0
  107. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js +21 -0
  108. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js +14 -0
  109. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js +48 -0
  110. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js +15 -0
  111. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js +18 -0
  112. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js +13 -0
  113. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js +13 -0
  114. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js +7 -0
  115. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json +60 -0
  116. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/package.json +80 -0
  117. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/.npmignore +18 -0
  118. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/.travis.yml +5 -0
  119. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/LICENSE +24 -0
  120. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/Makefile +10 -0
  121. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/README.md +627 -0
  122. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/example/usage.js +78 -0
  123. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/images/hawk.png +0 -0
  124. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/images/logo.png +0 -0
  125. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/index.js +1 -0
  126. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/browser.js +485 -0
  127. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/client.js +367 -0
  128. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/crypto.js +111 -0
  129. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/index.js +15 -0
  130. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/server.js +524 -0
  131. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/utils.js +183 -0
  132. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore +18 -0
  133. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml +5 -0
  134. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE +24 -0
  135. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/Makefile +11 -0
  136. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/README.md +6 -0
  137. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png +0 -0
  138. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/index.js +1 -0
  139. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +207 -0
  140. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/package.json +64 -0
  141. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js +245 -0
  142. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore +18 -0
  143. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml +5 -0
  144. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE +24 -0
  145. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +11 -0
  146. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +6 -0
  147. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +1 -0
  148. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js +68 -0
  149. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +65 -0
  150. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js +101 -0
  151. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore +18 -0
  152. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml +5 -0
  153. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +33 -0
  154. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +10 -0
  155. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +436 -0
  156. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png +0 -0
  157. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +1 -0
  158. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +132 -0
  159. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +585 -0
  160. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +70 -0
  161. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js +86 -0
  162. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js +1078 -0
  163. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js +1 -0
  164. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js +1 -0
  165. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js +1 -0
  166. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore +18 -0
  167. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml +5 -0
  168. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE +24 -0
  169. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile +11 -0
  170. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/README.md +68 -0
  171. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js +16 -0
  172. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js +25 -0
  173. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/index.js +1 -0
  174. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js +409 -0
  175. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +65 -0
  176. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js +359 -0
  177. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/package.json +70 -0
  178. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/browser.js +771 -0
  179. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/client.js +206 -0
  180. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/crypto.js +86 -0
  181. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/index.js +316 -0
  182. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/message.js +246 -0
  183. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/readme.js +98 -0
  184. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/server.js +686 -0
  185. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/uri.js +456 -0
  186. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/utils.js +120 -0
  187. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/.dir-locals.el +6 -0
  188. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/.npmignore +7 -0
  189. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/LICENSE +18 -0
  190. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/README.md +79 -0
  191. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/http_signing.md +296 -0
  192. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/index.js +26 -0
  193. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/parser.js +304 -0
  194. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/signer.js +178 -0
  195. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/util.js +304 -0
  196. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/verify.js +42 -0
  197. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore +2 -0
  198. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE +19 -0
  199. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md +50 -0
  200. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js +13 -0
  201. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js +27 -0
  202. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js +267 -0
  203. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js +36 -0
  204. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js +317 -0
  205. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js +20 -0
  206. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +63 -0
  207. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js +172 -0
  208. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js +296 -0
  209. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +126 -0
  210. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +245 -0
  211. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +45 -0
  212. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/.npmignore +1 -0
  213. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG +78 -0
  214. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +24 -0
  215. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/README +82 -0
  216. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old +298 -0
  217. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js +245 -0
  218. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js +1485 -0
  219. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js +944 -0
  220. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype +241 -0
  221. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +42 -0
  222. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf +129 -0
  223. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle +839 -0
  224. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/package.json +72 -0
  225. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/.npmignore +1 -0
  226. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/CHANGELOG.md +14 -0
  227. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/LICENSE +15 -0
  228. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/Makefile +35 -0
  229. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/README.md +52 -0
  230. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/package.json +68 -0
  231. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/stringify.js +27 -0
  232. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/test/mocha.opts +2 -0
  233. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/test/stringify_test.js +246 -0
  234. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/LICENSE +19 -0
  235. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/README.md +66 -0
  236. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/mime.js +114 -0
  237. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/package.json +57 -0
  238. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/test.js +84 -0
  239. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/types/mime.types +1588 -0
  240. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/types/node.types +77 -0
  241. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/.npmignore +2 -0
  242. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/LICENSE.md +21 -0
  243. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/README.md +243 -0
  244. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/README.md +53 -0
  245. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu +174 -0
  246. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/bench.sh +34 -0
  247. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c +34 -0
  248. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js +84 -0
  249. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/bin/uuid +26 -0
  250. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/bower.json +23 -0
  251. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/component.json +18 -0
  252. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/package.json +65 -0
  253. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/compare_v1.js +63 -0
  254. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/test.html +17 -0
  255. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/test.js +228 -0
  256. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/uuid.js +247 -0
  257. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/LICENSE +55 -0
  258. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/README.md +4 -0
  259. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/index.js +43 -0
  260. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/package.json +48 -0
  261. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/test.js +49 -0
  262. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/.gitmodules +6 -0
  263. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/.npmignore +7 -0
  264. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/Readme.md +58 -0
  265. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/index.js +366 -0
  266. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/package.json +55 -0
  267. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/.jshintrc +72 -0
  268. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/.npmignore +3 -0
  269. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/LICENSE +78 -0
  270. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/README.md +380 -0
  271. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +230 -0
  272. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/cookie.js +947 -0
  273. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/memstore.js +102 -0
  274. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +69 -0
  275. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt +20 -0
  276. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md +176 -0
  277. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json +81 -0
  278. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js +530 -0
  279. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/package.json +63 -0
  280. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/public-suffix.txt +5229 -0
  281. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/test.js +1340 -0
  282. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/LICENSE +55 -0
  283. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/README.md +4 -0
  284. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/index.js +227 -0
  285. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/package.json +45 -0
  286. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/package.json +74 -0
  287. data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/request.js +1244 -0
  288. data/node_modules/freezerwatch/node_modules/lacrosse/package.json +34 -0
  289. data/node_modules/freezerwatch/node_modules/optparse/README.md +163 -0
  290. data/node_modules/freezerwatch/node_modules/optparse/TODO +1 -0
  291. data/node_modules/freezerwatch/node_modules/optparse/examples/browser-test.html +75 -0
  292. data/node_modules/freezerwatch/node_modules/optparse/examples/nodejs-test.js +86 -0
  293. data/node_modules/freezerwatch/node_modules/optparse/lib/optparse.js +309 -0
  294. data/node_modules/freezerwatch/node_modules/optparse/package.json +46 -0
  295. data/node_modules/freezerwatch/node_modules/optparse/seed.yml +5 -0
  296. data/node_modules/freezerwatch/node_modules/osenv/.npmignore +13 -0
  297. data/node_modules/freezerwatch/node_modules/osenv/.travis.yml +9 -0
  298. data/node_modules/freezerwatch/node_modules/osenv/LICENSE +15 -0
  299. data/node_modules/freezerwatch/node_modules/osenv/README.md +63 -0
  300. data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/index.js +24 -0
  301. data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/license +21 -0
  302. data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/package.json +70 -0
  303. data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/readme.md +33 -0
  304. data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/index.js +25 -0
  305. data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/license +21 -0
  306. data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/package.json +70 -0
  307. data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/readme.md +36 -0
  308. data/node_modules/freezerwatch/node_modules/osenv/osenv.js +72 -0
  309. data/node_modules/freezerwatch/node_modules/osenv/package.json +76 -0
  310. data/node_modules/freezerwatch/node_modules/osenv/test/unix.js +71 -0
  311. data/node_modules/freezerwatch/node_modules/osenv/test/windows.js +74 -0
  312. data/node_modules/freezerwatch/node_modules/osenv/x.tap +39 -0
  313. data/node_modules/freezerwatch/package.json +37 -0
  314. metadata +384 -0
@@ -0,0 +1,530 @@
1
+ /*! https://mths.be/punycode v1.3.2 by @mathias */
2
+ ;(function(root) {
3
+
4
+ /** Detect free variables */
5
+ var freeExports = typeof exports == 'object' && exports &&
6
+ !exports.nodeType && exports;
7
+ var freeModule = typeof module == 'object' && module &&
8
+ !module.nodeType && module;
9
+ var freeGlobal = typeof global == 'object' && global;
10
+ if (
11
+ freeGlobal.global === freeGlobal ||
12
+ freeGlobal.window === freeGlobal ||
13
+ freeGlobal.self === freeGlobal
14
+ ) {
15
+ root = freeGlobal;
16
+ }
17
+
18
+ /**
19
+ * The `punycode` object.
20
+ * @name punycode
21
+ * @type Object
22
+ */
23
+ var punycode,
24
+
25
+ /** Highest positive signed 32-bit float value */
26
+ maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
27
+
28
+ /** Bootstring parameters */
29
+ base = 36,
30
+ tMin = 1,
31
+ tMax = 26,
32
+ skew = 38,
33
+ damp = 700,
34
+ initialBias = 72,
35
+ initialN = 128, // 0x80
36
+ delimiter = '-', // '\x2D'
37
+
38
+ /** Regular expressions */
39
+ regexPunycode = /^xn--/,
40
+ regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
41
+ regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
42
+
43
+ /** Error messages */
44
+ errors = {
45
+ 'overflow': 'Overflow: input needs wider integers to process',
46
+ 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
47
+ 'invalid-input': 'Invalid input'
48
+ },
49
+
50
+ /** Convenience shortcuts */
51
+ baseMinusTMin = base - tMin,
52
+ floor = Math.floor,
53
+ stringFromCharCode = String.fromCharCode,
54
+
55
+ /** Temporary variable */
56
+ key;
57
+
58
+ /*--------------------------------------------------------------------------*/
59
+
60
+ /**
61
+ * A generic error utility function.
62
+ * @private
63
+ * @param {String} type The error type.
64
+ * @returns {Error} Throws a `RangeError` with the applicable error message.
65
+ */
66
+ function error(type) {
67
+ throw RangeError(errors[type]);
68
+ }
69
+
70
+ /**
71
+ * A generic `Array#map` utility function.
72
+ * @private
73
+ * @param {Array} array The array to iterate over.
74
+ * @param {Function} callback The function that gets called for every array
75
+ * item.
76
+ * @returns {Array} A new array of values returned by the callback function.
77
+ */
78
+ function map(array, fn) {
79
+ var length = array.length;
80
+ var result = [];
81
+ while (length--) {
82
+ result[length] = fn(array[length]);
83
+ }
84
+ return result;
85
+ }
86
+
87
+ /**
88
+ * A simple `Array#map`-like wrapper to work with domain name strings or email
89
+ * addresses.
90
+ * @private
91
+ * @param {String} domain The domain name or email address.
92
+ * @param {Function} callback The function that gets called for every
93
+ * character.
94
+ * @returns {Array} A new string of characters returned by the callback
95
+ * function.
96
+ */
97
+ function mapDomain(string, fn) {
98
+ var parts = string.split('@');
99
+ var result = '';
100
+ if (parts.length > 1) {
101
+ // In email addresses, only the domain name should be punycoded. Leave
102
+ // the local part (i.e. everything up to `@`) intact.
103
+ result = parts[0] + '@';
104
+ string = parts[1];
105
+ }
106
+ // Avoid `split(regex)` for IE8 compatibility. See #17.
107
+ string = string.replace(regexSeparators, '\x2E');
108
+ var labels = string.split('.');
109
+ var encoded = map(labels, fn).join('.');
110
+ return result + encoded;
111
+ }
112
+
113
+ /**
114
+ * Creates an array containing the numeric code points of each Unicode
115
+ * character in the string. While JavaScript uses UCS-2 internally,
116
+ * this function will convert a pair of surrogate halves (each of which
117
+ * UCS-2 exposes as separate characters) into a single code point,
118
+ * matching UTF-16.
119
+ * @see `punycode.ucs2.encode`
120
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
121
+ * @memberOf punycode.ucs2
122
+ * @name decode
123
+ * @param {String} string The Unicode input string (UCS-2).
124
+ * @returns {Array} The new array of code points.
125
+ */
126
+ function ucs2decode(string) {
127
+ var output = [],
128
+ counter = 0,
129
+ length = string.length,
130
+ value,
131
+ extra;
132
+ while (counter < length) {
133
+ value = string.charCodeAt(counter++);
134
+ if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
135
+ // high surrogate, and there is a next character
136
+ extra = string.charCodeAt(counter++);
137
+ if ((extra & 0xFC00) == 0xDC00) { // low surrogate
138
+ output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
139
+ } else {
140
+ // unmatched surrogate; only append this code unit, in case the next
141
+ // code unit is the high surrogate of a surrogate pair
142
+ output.push(value);
143
+ counter--;
144
+ }
145
+ } else {
146
+ output.push(value);
147
+ }
148
+ }
149
+ return output;
150
+ }
151
+
152
+ /**
153
+ * Creates a string based on an array of numeric code points.
154
+ * @see `punycode.ucs2.decode`
155
+ * @memberOf punycode.ucs2
156
+ * @name encode
157
+ * @param {Array} codePoints The array of numeric code points.
158
+ * @returns {String} The new Unicode string (UCS-2).
159
+ */
160
+ function ucs2encode(array) {
161
+ return map(array, function(value) {
162
+ var output = '';
163
+ if (value > 0xFFFF) {
164
+ value -= 0x10000;
165
+ output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
166
+ value = 0xDC00 | value & 0x3FF;
167
+ }
168
+ output += stringFromCharCode(value);
169
+ return output;
170
+ }).join('');
171
+ }
172
+
173
+ /**
174
+ * Converts a basic code point into a digit/integer.
175
+ * @see `digitToBasic()`
176
+ * @private
177
+ * @param {Number} codePoint The basic numeric code point value.
178
+ * @returns {Number} The numeric value of a basic code point (for use in
179
+ * representing integers) in the range `0` to `base - 1`, or `base` if
180
+ * the code point does not represent a value.
181
+ */
182
+ function basicToDigit(codePoint) {
183
+ if (codePoint - 48 < 10) {
184
+ return codePoint - 22;
185
+ }
186
+ if (codePoint - 65 < 26) {
187
+ return codePoint - 65;
188
+ }
189
+ if (codePoint - 97 < 26) {
190
+ return codePoint - 97;
191
+ }
192
+ return base;
193
+ }
194
+
195
+ /**
196
+ * Converts a digit/integer into a basic code point.
197
+ * @see `basicToDigit()`
198
+ * @private
199
+ * @param {Number} digit The numeric value of a basic code point.
200
+ * @returns {Number} The basic code point whose value (when used for
201
+ * representing integers) is `digit`, which needs to be in the range
202
+ * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
203
+ * used; else, the lowercase form is used. The behavior is undefined
204
+ * if `flag` is non-zero and `digit` has no uppercase form.
205
+ */
206
+ function digitToBasic(digit, flag) {
207
+ // 0..25 map to ASCII a..z or A..Z
208
+ // 26..35 map to ASCII 0..9
209
+ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
210
+ }
211
+
212
+ /**
213
+ * Bias adaptation function as per section 3.4 of RFC 3492.
214
+ * http://tools.ietf.org/html/rfc3492#section-3.4
215
+ * @private
216
+ */
217
+ function adapt(delta, numPoints, firstTime) {
218
+ var k = 0;
219
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
220
+ delta += floor(delta / numPoints);
221
+ for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
222
+ delta = floor(delta / baseMinusTMin);
223
+ }
224
+ return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
225
+ }
226
+
227
+ /**
228
+ * Converts a Punycode string of ASCII-only symbols to a string of Unicode
229
+ * symbols.
230
+ * @memberOf punycode
231
+ * @param {String} input The Punycode string of ASCII-only symbols.
232
+ * @returns {String} The resulting string of Unicode symbols.
233
+ */
234
+ function decode(input) {
235
+ // Don't use UCS-2
236
+ var output = [],
237
+ inputLength = input.length,
238
+ out,
239
+ i = 0,
240
+ n = initialN,
241
+ bias = initialBias,
242
+ basic,
243
+ j,
244
+ index,
245
+ oldi,
246
+ w,
247
+ k,
248
+ digit,
249
+ t,
250
+ /** Cached calculation results */
251
+ baseMinusT;
252
+
253
+ // Handle the basic code points: let `basic` be the number of input code
254
+ // points before the last delimiter, or `0` if there is none, then copy
255
+ // the first basic code points to the output.
256
+
257
+ basic = input.lastIndexOf(delimiter);
258
+ if (basic < 0) {
259
+ basic = 0;
260
+ }
261
+
262
+ for (j = 0; j < basic; ++j) {
263
+ // if it's not a basic code point
264
+ if (input.charCodeAt(j) >= 0x80) {
265
+ error('not-basic');
266
+ }
267
+ output.push(input.charCodeAt(j));
268
+ }
269
+
270
+ // Main decoding loop: start just after the last delimiter if any basic code
271
+ // points were copied; start at the beginning otherwise.
272
+
273
+ for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
274
+
275
+ // `index` is the index of the next character to be consumed.
276
+ // Decode a generalized variable-length integer into `delta`,
277
+ // which gets added to `i`. The overflow checking is easier
278
+ // if we increase `i` as we go, then subtract off its starting
279
+ // value at the end to obtain `delta`.
280
+ for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
281
+
282
+ if (index >= inputLength) {
283
+ error('invalid-input');
284
+ }
285
+
286
+ digit = basicToDigit(input.charCodeAt(index++));
287
+
288
+ if (digit >= base || digit > floor((maxInt - i) / w)) {
289
+ error('overflow');
290
+ }
291
+
292
+ i += digit * w;
293
+ t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
294
+
295
+ if (digit < t) {
296
+ break;
297
+ }
298
+
299
+ baseMinusT = base - t;
300
+ if (w > floor(maxInt / baseMinusT)) {
301
+ error('overflow');
302
+ }
303
+
304
+ w *= baseMinusT;
305
+
306
+ }
307
+
308
+ out = output.length + 1;
309
+ bias = adapt(i - oldi, out, oldi == 0);
310
+
311
+ // `i` was supposed to wrap around from `out` to `0`,
312
+ // incrementing `n` each time, so we'll fix that now:
313
+ if (floor(i / out) > maxInt - n) {
314
+ error('overflow');
315
+ }
316
+
317
+ n += floor(i / out);
318
+ i %= out;
319
+
320
+ // Insert `n` at position `i` of the output
321
+ output.splice(i++, 0, n);
322
+
323
+ }
324
+
325
+ return ucs2encode(output);
326
+ }
327
+
328
+ /**
329
+ * Converts a string of Unicode symbols (e.g. a domain name label) to a
330
+ * Punycode string of ASCII-only symbols.
331
+ * @memberOf punycode
332
+ * @param {String} input The string of Unicode symbols.
333
+ * @returns {String} The resulting Punycode string of ASCII-only symbols.
334
+ */
335
+ function encode(input) {
336
+ var n,
337
+ delta,
338
+ handledCPCount,
339
+ basicLength,
340
+ bias,
341
+ j,
342
+ m,
343
+ q,
344
+ k,
345
+ t,
346
+ currentValue,
347
+ output = [],
348
+ /** `inputLength` will hold the number of code points in `input`. */
349
+ inputLength,
350
+ /** Cached calculation results */
351
+ handledCPCountPlusOne,
352
+ baseMinusT,
353
+ qMinusT;
354
+
355
+ // Convert the input in UCS-2 to Unicode
356
+ input = ucs2decode(input);
357
+
358
+ // Cache the length
359
+ inputLength = input.length;
360
+
361
+ // Initialize the state
362
+ n = initialN;
363
+ delta = 0;
364
+ bias = initialBias;
365
+
366
+ // Handle the basic code points
367
+ for (j = 0; j < inputLength; ++j) {
368
+ currentValue = input[j];
369
+ if (currentValue < 0x80) {
370
+ output.push(stringFromCharCode(currentValue));
371
+ }
372
+ }
373
+
374
+ handledCPCount = basicLength = output.length;
375
+
376
+ // `handledCPCount` is the number of code points that have been handled;
377
+ // `basicLength` is the number of basic code points.
378
+
379
+ // Finish the basic string - if it is not empty - with a delimiter
380
+ if (basicLength) {
381
+ output.push(delimiter);
382
+ }
383
+
384
+ // Main encoding loop:
385
+ while (handledCPCount < inputLength) {
386
+
387
+ // All non-basic code points < n have been handled already. Find the next
388
+ // larger one:
389
+ for (m = maxInt, j = 0; j < inputLength; ++j) {
390
+ currentValue = input[j];
391
+ if (currentValue >= n && currentValue < m) {
392
+ m = currentValue;
393
+ }
394
+ }
395
+
396
+ // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
397
+ // but guard against overflow
398
+ handledCPCountPlusOne = handledCPCount + 1;
399
+ if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
400
+ error('overflow');
401
+ }
402
+
403
+ delta += (m - n) * handledCPCountPlusOne;
404
+ n = m;
405
+
406
+ for (j = 0; j < inputLength; ++j) {
407
+ currentValue = input[j];
408
+
409
+ if (currentValue < n && ++delta > maxInt) {
410
+ error('overflow');
411
+ }
412
+
413
+ if (currentValue == n) {
414
+ // Represent delta as a generalized variable-length integer
415
+ for (q = delta, k = base; /* no condition */; k += base) {
416
+ t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
417
+ if (q < t) {
418
+ break;
419
+ }
420
+ qMinusT = q - t;
421
+ baseMinusT = base - t;
422
+ output.push(
423
+ stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
424
+ );
425
+ q = floor(qMinusT / baseMinusT);
426
+ }
427
+
428
+ output.push(stringFromCharCode(digitToBasic(q, 0)));
429
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
430
+ delta = 0;
431
+ ++handledCPCount;
432
+ }
433
+ }
434
+
435
+ ++delta;
436
+ ++n;
437
+
438
+ }
439
+ return output.join('');
440
+ }
441
+
442
+ /**
443
+ * Converts a Punycode string representing a domain name or an email address
444
+ * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
445
+ * it doesn't matter if you call it on a string that has already been
446
+ * converted to Unicode.
447
+ * @memberOf punycode
448
+ * @param {String} input The Punycoded domain name or email address to
449
+ * convert to Unicode.
450
+ * @returns {String} The Unicode representation of the given Punycode
451
+ * string.
452
+ */
453
+ function toUnicode(input) {
454
+ return mapDomain(input, function(string) {
455
+ return regexPunycode.test(string)
456
+ ? decode(string.slice(4).toLowerCase())
457
+ : string;
458
+ });
459
+ }
460
+
461
+ /**
462
+ * Converts a Unicode string representing a domain name or an email address to
463
+ * Punycode. Only the non-ASCII parts of the domain name will be converted,
464
+ * i.e. it doesn't matter if you call it with a domain that's already in
465
+ * ASCII.
466
+ * @memberOf punycode
467
+ * @param {String} input The domain name or email address to convert, as a
468
+ * Unicode string.
469
+ * @returns {String} The Punycode representation of the given domain name or
470
+ * email address.
471
+ */
472
+ function toASCII(input) {
473
+ return mapDomain(input, function(string) {
474
+ return regexNonASCII.test(string)
475
+ ? 'xn--' + encode(string)
476
+ : string;
477
+ });
478
+ }
479
+
480
+ /*--------------------------------------------------------------------------*/
481
+
482
+ /** Define the public API */
483
+ punycode = {
484
+ /**
485
+ * A string representing the current Punycode.js version number.
486
+ * @memberOf punycode
487
+ * @type String
488
+ */
489
+ 'version': '1.3.2',
490
+ /**
491
+ * An object of methods to convert from JavaScript's internal character
492
+ * representation (UCS-2) to Unicode code points, and back.
493
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
494
+ * @memberOf punycode
495
+ * @type Object
496
+ */
497
+ 'ucs2': {
498
+ 'decode': ucs2decode,
499
+ 'encode': ucs2encode
500
+ },
501
+ 'decode': decode,
502
+ 'encode': encode,
503
+ 'toASCII': toASCII,
504
+ 'toUnicode': toUnicode
505
+ };
506
+
507
+ /** Expose `punycode` */
508
+ // Some AMD build optimizers, like r.js, check for specific condition patterns
509
+ // like the following:
510
+ if (
511
+ typeof define == 'function' &&
512
+ typeof define.amd == 'object' &&
513
+ define.amd
514
+ ) {
515
+ define('punycode', function() {
516
+ return punycode;
517
+ });
518
+ } else if (freeExports && freeModule) {
519
+ if (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+
520
+ freeModule.exports = punycode;
521
+ } else { // in Narwhal or RingoJS v0.7.0-
522
+ for (key in punycode) {
523
+ punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
524
+ }
525
+ }
526
+ } else { // in Rhino or a web browser
527
+ root.punycode = punycode;
528
+ }
529
+
530
+ }(this));