ArcherSysOS 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. checksums.yaml +7 -0
  2. data/-interactive +0 -0
  3. data/.302.html.swp +0 -0
  4. data/.AerodiaServer.rb.swp +0 -0
  5. data/.README.md.swp +0 -0
  6. data/.archersys_os_peace.py.swp +0 -0
  7. data/.authorize.php.swp +0 -0
  8. data/.buildinfo +4 -0
  9. data/.git.cmd.swp +0 -0
  10. data/.gitconfig +1 -0
  11. data/.gitignore +9 -0
  12. data/.htaccess +12 -0
  13. data/.index.php.swl +0 -0
  14. data/.index.php.swm +0 -0
  15. data/.index.php.swn +0 -0
  16. data/.index.php.swo +0 -0
  17. data/.index.php.swp +0 -0
  18. data/.irb.cmd.swp +0 -0
  19. data/.irb_history +436 -0
  20. data/.irbrc +24 -0
  21. data/.irbrc~ +24 -0
  22. data/.livesearch.php.swp +0 -0
  23. data/.login.php.swl +0 -0
  24. data/.login.php.swm +0 -0
  25. data/.login.php.swn +0 -0
  26. data/.login.php.swo +0 -0
  27. data/.login.php.swp +0 -0
  28. data/.logout.php.swp +0 -0
  29. data/.npmrc +96 -0
  30. data/.os-desktop.php.swp +0 -0
  31. data/.pythonrc.py +11 -0
  32. data/.railsrc +1 -0
  33. data/.travis.yml +3 -0
  34. data/.vimstarter.bat.swp +0 -0
  35. data/302.html +8 -0
  36. data/401.html +43 -0
  37. data/403.html +9 -0
  38. data/404.html +43 -0
  39. data/7imperialisminjapan2.ppt +0 -0
  40. data/8_imperialism_by_the_united_states2.ppt +0 -0
  41. data/AbstractArrbyKlass.rb +16 -0
  42. data/AbstractImplementation.rb +10 -0
  43. data/Aerodia2.scn +0 -0
  44. data/AerodiaServer.rb +130 -0
  45. data/AerodiaServer.rb~ +129 -0
  46. data/AerodiaServer.txt +53 -0
  47. data/ArcherCGI.txt +8 -0
  48. data/ArcherDBM.rb +30 -0
  49. data/ArcherSysOS.gemspec +33 -0
  50. data/ArcherSysOS.rb +13 -0
  51. data/ArcherSysOS.rb.txt +13 -0
  52. data/ArcherSysOSDate.rb +10 -0
  53. data/ArcherSysOSOptionsParser.rb +108 -0
  54. data/ArcherSysOSOptionsParser.rb~ +108 -0
  55. data/ArcherVMCashewDelegator.rb +17 -0
  56. data/ArcherVMCashewLogger.rb +55 -0
  57. data/ArcherVMCashewLogger.rb~ +55 -0
  58. data/ArcherVMCashewTimeServer.rb +23 -0
  59. data/ArcherVMCashewTimeServer.rb~ +23 -0
  60. data/ArcherVMException.rb +13 -0
  61. data/CHANGELOG.md +4 -0
  62. data/CONTRIBUTING.md +8 -0
  63. data/CodeIgniter_2.2.0.zip +0 -0
  64. data/ConfigTest.php +11 -0
  65. data/F16MUDCockpitServlet.rb +14 -0
  66. data/F16MUDTape.rb +7 -0
  67. data/F16Shell.rb +42 -0
  68. data/Gemfile +4 -0
  69. data/LICENSE +19 -0
  70. data/Listing.rb +31 -0
  71. data/Middleware.rb +12 -0
  72. data/Middleware.txt +12 -0
  73. data/Movie.rb +8 -0
  74. data/MovieLibrary.rb +10 -0
  75. data/MySQLDumper1.24.4.zip +0 -0
  76. data/NotakerPro.aia +0 -0
  77. data/Num.rb +17 -0
  78. data/OSStartScreen.py +31 -0
  79. data/Product.rb +26 -0
  80. data/QAERODIACORP.sav +0 -0
  81. data/Queue.rb +16 -0
  82. data/Queue.rb~ +15 -0
  83. data/README.md +39 -0
  84. data/README.md~ +46 -0
  85. data/Rakefile +1 -0
  86. data/StockTickerServlet.rb +19 -0
  87. data/StockTickerServlet.rb~ +19 -0
  88. data/Symfony_cookbook_2.5.pdf +35637 -39
  89. data/Taxgator.rb +9 -0
  90. data/Tetris +2 -0
  91. data/Ticker.rb +63 -0
  92. data/Ticker.rb~ +63 -0
  93. data/WeakHash.rb +10 -0
  94. data/WikiPage.rb +27 -0
  95. data/WikiPage.rb~ +27 -0
  96. data/ZlibEngine.rb +20 -0
  97. data/_.swm +0 -0
  98. data/_.swn +0 -0
  99. data/_.swo +0 -0
  100. data/_.swp +0 -0
  101. data/acoserver_acoserver (2).sql +15131 -0
  102. data/acoserver_acoserver.sql +34707 -0
  103. data/acoserver_admin.sql +571 -0
  104. data/acoserver_games.sql +6344 -0
  105. data/acoserver_moodle.sql +16013 -0
  106. data/activate_docs_gen.bat +1 -0
  107. data/activate_docs_gen.txt +1 -0
  108. data/ager.py +6 -0
  109. data/alarmpy.py +6 -0
  110. data/american_imperialism2.ppt +0 -0
  111. data/apple-touch-icon.png +0 -0
  112. data/apps.php +35 -0
  113. data/apps.php.txt +7 -0
  114. data/arbylog.rb +16 -0
  115. data/archergit.py +6 -0
  116. data/archergit.py.txt +6 -0
  117. data/archergit.txt +6 -0
  118. data/archerlua.lua +3 -0
  119. data/archersys-logo.png +0 -0
  120. data/archersys.gemspec +32 -0
  121. data/archersys_os_peace.py +7 -0
  122. data/archersys_os_peace.py~ +5 -0
  123. data/autoexec.bat +3 -0
  124. data/bootstrap-tour.css +65 -0
  125. data/bootstrap-tour.js +698 -0
  126. data/bootstrap-tour.min.css +19 -0
  127. data/bootstrap-tour.min.js +19 -0
  128. data/bootstrap.css +7098 -0
  129. data/bootstrap.js +2002 -0
  130. data/bucketwise-master.zip +0 -0
  131. data/cargo.bat +1 -0
  132. data/cargo.cmd +1 -0
  133. data/changelog.txt +769 -0
  134. data/client_secrets.json +4 -0
  135. data/cockpitguess.py +12 -0
  136. data/collaborant-0.1.0.gem +0 -0
  137. data/composer.json +40 -0
  138. data/composer.lock +1484 -0
  139. data/composer.phar +0 -0
  140. data/conchtack_id.dat +0 -0
  141. data/config.json +4 -0
  142. data/config.php +17 -0
  143. data/config.ru +5 -0
  144. data/config.yml +16 -0
  145. data/console.html +8 -0
  146. data/console.php +42 -0
  147. data/contact.db +0 -0
  148. data/contacts.db +0 -0
  149. data/contrib-update.cmd +6 -0
  150. data/contrib-update.cmd~ +6 -0
  151. data/crossdomain.xml +9 -0
  152. data/cse.xml +25 -0
  153. data/depression_dbq.pdf +0 -0
  154. data/desktop-w10.php +6 -0
  155. data/desktop.html +33 -0
  156. data/desktop.php +310 -0
  157. data/dialogue.txt +13 -0
  158. data/dict.rb +15 -0
  159. data/dictionary_of_words.db +0 -0
  160. data/doc-create.html +5 -0
  161. data/doc-create.php +12 -0
  162. data/dokuwiki-d9556fbc2c1c07a0baaf81c07d4165f6.tgz +0 -0
  163. data/drive-appfolder.php +19 -0
  164. data/drive.php +49 -0
  165. data/dropbox-login.php +13 -0
  166. data/drupal-7.34.zip +0 -0
  167. data/dtop.php +131 -0
  168. data/f18mud.rb +2 -0
  169. data/favicon.ico +0 -0
  170. data/favicon.png +0 -0
  171. data/footer.html +5 -0
  172. data/forum.php +5 -0
  173. data/game1.py +171 -0
  174. data/genindex.html +164 -0
  175. data/git.cmd~ +2 -0
  176. data/github-ci.rb +6 -0
  177. data/histogram.py +36 -0
  178. data/htdocs.gemspec~ +31 -0
  179. data/https___summerjobs.dc.gov_(S(ryzytlym5hqgi255zgb4ojjk))_parental_consent_form.pdf +0 -0
  180. data/ieconfig.xml +12 -0
  181. data/imperialism_dbq_questions2.doc +0 -0
  182. data/imperialism_graphic_organizer2.docx +0 -0
  183. data/index-desktop.php +42 -0
  184. data/index-desktop.php.txt +14 -0
  185. data/index.html +175 -0
  186. data/index.php +302 -0
  187. data/index.php~ +315 -0
  188. data/info.php +3 -0
  189. data/iostarter.py +88 -0
  190. data/irb.cmd +3 -0
  191. data/irb.cmd~ +2 -0
  192. data/jquery-mobile-theme-105213-0.zip +0 -0
  193. data/jquery-ui-1.11.1.custom.zip +0 -0
  194. data/laravel-master.zip +0 -0
  195. data/laravel.phar +0 -0
  196. data/latest_specs.4.8 +0 -0
  197. data/latest_specs.4.8.gz +0 -0
  198. data/login.php +266 -0
  199. data/login.php~ +265 -0
  200. data/logout.php +13 -0
  201. data/logout.php~ +13 -0
  202. data/lua.bat +1 -0
  203. data/main.php +22 -0
  204. data/manage.py +10 -0
  205. data/manifest.appcache +22 -0
  206. data/manifest.json +19 -0
  207. data/manifest.webapp +14 -0
  208. data/meter.js +19 -0
  209. data/meter.php +17 -0
  210. data/mime.types +0 -0
  211. data/moodle.sqk +12123 -0
  212. data/moodle.sql +12123 -0
  213. data/movielibrary.rhtml +16 -0
  214. data/mud_login.rb +38 -0
  215. data/news.py +18 -0
  216. data/node.exe +0 -0
  217. data/node_etw_provider.man +153 -0
  218. data/node_perfctr_provider.man +107 -0
  219. data/nodejs-portable.bat +194 -0
  220. data/nodevars.bat +24 -0
  221. data/notifications-gateway.php +5 -0
  222. data/now.bat +3 -0
  223. data/npm +14 -0
  224. data/npm-debug.log +40 -0
  225. data/npm.cmd +6 -0
  226. data/objects.inv +0 -0
  227. data/ocular.phar +0 -0
  228. data/opensearch.xml +12 -0
  229. data/os-desktop.php +211 -0
  230. data/os-mobile.php +127 -0
  231. data/package.json +5 -0
  232. data/parse-js-blank-1.3.0.zip +0 -0
  233. data/partii.appcache +2 -0
  234. data/pear.conf +2 -0
  235. data/phpldapadmin-1.2.3.zip +0 -0
  236. data/phpliteAdmin_v1-9-5.zip +0 -0
  237. data/phpunit.cmd +1 -0
  238. data/phpunit.dist.xml +8 -0
  239. data/phpunit.phar +77428 -2
  240. data/phpunit.xml +8 -0
  241. data/pik.bat +3 -0
  242. data/pik.ps1 +3 -0
  243. data/pik_runner.exe +0 -0
  244. data/pip-selfcheck.json +1 -0
  245. data/prerelease_specs.4.8 +0 -0
  246. data/prerelease_specs.4.8.gz +0 -0
  247. data/producktivshellwin +0 -0
  248. data/profile.php +7 -0
  249. data/prototype.php +7 -0
  250. data/pyconsole.cmd +3 -0
  251. data/pyconsole.py +8 -0
  252. data/pygubu-asos.py +19 -0
  253. data/pythonray.py +62 -0
  254. data/pythonray.py~ +62 -0
  255. data/pyvenv.cfg +3 -0
  256. data/radius.py +12 -0
  257. data/react-0.11.2.zip +0 -0
  258. data/readme.txt +8 -0
  259. data/register.php +130 -0
  260. data/register.php~ +126 -0
  261. data/rockpaperscissors.py +68 -0
  262. data/rockpaperscissors.py~ +28 -0
  263. data/run_f16.rb +2 -0
  264. data/rustc.cmd +1 -0
  265. data/scrollbar.css +6 -0
  266. data/scrollbar.css~ +4 -0
  267. data/scrutinizer.yml +5 -0
  268. data/search.html +177 -0
  269. data/searchindex.js +1 -0
  270. data/setup-owncloud.php +300 -0
  271. data/setup.py +9 -0
  272. data/sinatra-1.4.5.gem +0 -0
  273. data/smartsheet.html +1 -0
  274. data/span.html +5 -0
  275. data/specs.4.8 +0 -0
  276. data/specs.4.8.gz +0 -0
  277. data/starter-kit-1.8.1.zip +0 -0
  278. data/startscreen.php +11 -0
  279. data/startscreen.py +33 -0
  280. data/startup.png +0 -0
  281. data/svg-edit-2.6.zip +0 -0
  282. data/symfony.com_pdf_Symfony_book_2.5.pdf +0 -0
  283. data/telnet-client.py +18 -0
  284. data/tess.py +26 -0
  285. data/time.css +279 -0
  286. data/time.html +2 -0
  287. data/time.php +56 -0
  288. data/tinymce_spellchecker_php_2_0_6_1.zip +0 -0
  289. data/urllib2.py +1371 -0
  290. data/uru.bat +12 -0
  291. data/uru.bat.bak +12 -0
  292. data/uru.ps1 +11 -0
  293. data/uru.ps1.bak +11 -0
  294. data/uru_rt.exe +0 -0
  295. data/vimstarter.bat +3 -0
  296. metadata +338 -0
@@ -0,0 +1 @@
1
+ docs-python/Scripts/activate
@@ -0,0 +1 @@
1
+ docs-python/Scripts/activate
data/ager.py ADDED
@@ -0,0 +1,6 @@
1
+ import datetime
2
+ name = input("What is your name?")
3
+ age = input("What is your Age?")
4
+ yrs_to_100 = (100 - int(age))
5
+ answer = (datetime.datetime.today().year + yrs_to_100)
6
+ print(name + " You will be a 100 in:" + str(answer))
@@ -0,0 +1,6 @@
1
+ def get_time_of_alarm():
2
+ hours_now = int(input("This Hour:"))
3
+ hours_in_wait = int(input("Time till alarm:"))
4
+ hours2 = hours_now + hours_in_wait
5
+ print str(hours2 % 24)
6
+ get_time_of_alarm()
Binary file
Binary file
@@ -0,0 +1,35 @@
1
+ <?php
2
+ require_once "config.php"
3
+ ?>
4
+ <!DOCTYPE HTML>
5
+ <html>
6
+ <head>
7
+ <title>My Apps</title>
8
+ <link rel="stylesheet" type="text/css" href="css/apps.css">
9
+ <meta name="viewport" content="width=device-width initial-scale=1.0 user-scalable=no">
10
+ <script src="js/libs/jquery.min.js"></script>
11
+ <script src="js/plugins/createbutton/jquery.createbutton.js"></script>
12
+ <script>
13
+ $(function(){
14
+ $(".navbar ul li").click(function(){
15
+ window.location.assign($(this).gotoLink());
16
+ });
17
+
18
+ });
19
+ </script>
20
+ </head>
21
+ <body>
22
+ <div class="apps">
23
+ <div class="apps-header">
24
+ <h1>Apps</h1>
25
+ </div>
26
+ <div class="navbar">
27
+ <ul>
28
+ <li goto="/admin/">
29
+ Goto the Admin Center
30
+ </li>
31
+ </ul>
32
+ </div>
33
+ </div>
34
+ </body>
35
+ </html>
@@ -0,0 +1,7 @@
1
+ <!DOCTYPE HTML>
2
+ <html>
3
+ <head>
4
+ </head>
5
+ <body>
6
+ </body>
7
+ </html>
@@ -0,0 +1,16 @@
1
+ require 'drb/drb'
2
+
3
+ SERVER_URI="druby://localhost:8787"
4
+
5
+ DRb.start_service
6
+
7
+ log_service=DRbObject.new_with_uri(SERVER_URI)
8
+
9
+ ["loga", "logb", "logc"].each do |logname|
10
+
11
+ logger=log_service.get_logger(logname)
12
+ puts "Log Something of your choice"
13
+ logmsg = gets.chomp
14
+ logger.log(logmsg)
15
+ end
16
+
@@ -0,0 +1,6 @@
1
+ import argparse, os
2
+
3
+ parser = argparse.ArgumentParser(description="ArcherGit Package Manager",prog="ArcherGit",epilog="ArcherGit 1.0.0 created by Weldon Henson")
4
+ parser.add_argument("package", help="installs an ArcherSys OS Application from Github")
5
+ args = parser.parse_args()
6
+ os.system("gitbin\Git1.9.4\cmd\git clone https://github.com/ArcherSys/" + args.package)
@@ -0,0 +1,6 @@
1
+ import argparse, os
2
+ parser = argparse.ArgumentParser()
3
+ parser.add_argument("package")
4
+ args = parser.parse_args()
5
+ os.system("git clone https://github.com/ArcherSys/" + args.package)
6
+
@@ -0,0 +1,6 @@
1
+ import argparse, os
2
+ parser = argparse.ArgumentParser()
3
+ parser.add_argument("package")
4
+ args = parser.parse_args()
5
+ os.system("git clone https://github.com/ArcherSys/" + args.package)
6
+
@@ -0,0 +1,3 @@
1
+ io.write("Name: ")
2
+ name = io.read()
3
+ _PROMPT = "\n"..name.."@"..os.time()..">"
Binary file
@@ -0,0 +1,32 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+
4
+ require "rubygems"
5
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
+
7
+ require 'ArcherSysOS\version.rb'
8
+
9
+
10
+ Gem::Specification.new do |spec|
11
+
12
+ spec.name = "ArcherSysOS"
13
+
14
+ spec.version = ArcherSysOS::VERSION
15
+
16
+ spec.authors = ["Weldon Henson"]
17
+
18
+ spec.email = ["acosf2014.pdflint@gmail.com"]
19
+
20
+
21
+ spec.summary = "ArcherVMCashew(ArcherSys OS Cashew)"
22
+ spec.description = "The ArcherSys Operating System packaged as a RubyGem"
23
+ spec.homepage = "https://archersys.github.io/ArcherSys"
24
+
25
+
26
+ spec.files = Dir.entries(".")
27
+ # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
28
+
29
+ # delete this section to allow pushing this gem to any host.
30
+
31
+ end
32
+
@@ -0,0 +1,7 @@
1
+
2
+ from turtle import *
3
+ from turtledemo import peace
4
+ peace.main()
5
+ home()
6
+ goto(0,160)
7
+ write("ArcherSys OS Cashew 3.2.0 ",True, "center")
@@ -0,0 +1,5 @@
1
+ from turtledemo import peace
2
+ peace.main()
3
+ home()
4
+ goto(0,160)
5
+ write("ArcherSys OS Cashew 3.2.0 ",True, "center")
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ TITLE ArcherVMCashew(ArcherSys Standard) V1.0
@@ -0,0 +1,65 @@
1
+ /* ===========================================================
2
+ # bootstrap-tour - v0.9.0
3
+ # http://bootstraptour.com
4
+ # ==============================================================
5
+ # Copyright 2012-2013 Ulrich Sossou
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ */
19
+ .tour-backdrop {
20
+ position: fixed;
21
+ top: 0;
22
+ right: 0;
23
+ bottom: 0;
24
+ left: 0;
25
+ z-index: 1100;
26
+ background-color: #000;
27
+ opacity: 0.8;
28
+ }
29
+ .tour-step-backdrop {
30
+ position: relative;
31
+ z-index: 1101;
32
+ background: inherit;
33
+ }
34
+ .tour-step-background {
35
+ position: absolute;
36
+ z-index: 1100;
37
+ background: inherit;
38
+ border-radius: 6px;
39
+ }
40
+ .popover[class*="tour-"] {
41
+ z-index: 1100;
42
+ }
43
+ .popover[class*="tour-"] .popover-navigation {
44
+ padding: 9px 14px;
45
+ }
46
+ .popover[class*="tour-"] .popover-navigation *[data-role="end"] {
47
+ float: right;
48
+ }
49
+ .popover[class*="tour-"] .popover-navigation *[data-role="prev"],
50
+ .popover[class*="tour-"] .popover-navigation *[data-role="next"],
51
+ .popover[class*="tour-"] .popover-navigation *[data-role="end"] {
52
+ cursor: pointer;
53
+ }
54
+ .popover[class*="tour-"] .popover-navigation *[data-role="prev"].disabled,
55
+ .popover[class*="tour-"] .popover-navigation *[data-role="next"].disabled,
56
+ .popover[class*="tour-"] .popover-navigation *[data-role="end"].disabled {
57
+ cursor: default;
58
+ }
59
+ .popover[class*="tour-"].orphan {
60
+ position: fixed;
61
+ margin-top: 0;
62
+ }
63
+ .popover[class*="tour-"].orphan .arrow {
64
+ display: none;
65
+ }
@@ -0,0 +1,698 @@
1
+ /* ===========================================================
2
+ # bootstrap-tour - v0.9.0
3
+ # http://bootstraptour.com
4
+ # ==============================================================
5
+ # Copyright 2012-2013 Ulrich Sossou
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ */
19
+ (function($, window) {
20
+ var Tour, document;
21
+ document = window.document;
22
+ Tour = (function() {
23
+ function Tour(options) {
24
+ this._options = $.extend({
25
+ name: "tour",
26
+ steps: [],
27
+ container: "body",
28
+ keyboard: true,
29
+ storage: window.localStorage,
30
+ debug: false,
31
+ backdrop: false,
32
+ redirect: true,
33
+ orphan: false,
34
+ duration: false,
35
+ basePath: "",
36
+ template: "<div class='popover'> <div class='arrow'></div> <h3 class='popover-title'></h3> <div class='popover-content'></div> <div class='popover-navigation'> <div class='btn-group'> <button class='btn btn-sm btn-default' data-role='prev'>&laquo; Prev</button> <button class='btn btn-sm btn-default' data-role='next'>Next &raquo;</button> <button class='btn btn-sm btn-default' data-role='pause-resume' data-pause-text='Pause' data-resume-text='Resume'>Pause</button> </div> <button class='btn btn-sm btn-default' data-role='end'>End tour</button> </div> </div>",
37
+ afterSetState: function(key, value) {},
38
+ afterGetState: function(key, value) {},
39
+ afterRemoveState: function(key) {},
40
+ onStart: function(tour) {},
41
+ onEnd: function(tour) {},
42
+ onShow: function(tour) {},
43
+ onShown: function(tour) {},
44
+ onHide: function(tour) {},
45
+ onHidden: function(tour) {},
46
+ onNext: function(tour) {},
47
+ onPrev: function(tour) {},
48
+ onPause: function(tour, duration) {},
49
+ onResume: function(tour, duration) {}
50
+ }, options);
51
+ this._force = false;
52
+ this._inited = false;
53
+ this.backdrop = {
54
+ overlay: null,
55
+ $element: null,
56
+ $background: null,
57
+ backgroundShown: false,
58
+ overlayElementShown: false
59
+ };
60
+ this;
61
+ }
62
+
63
+ Tour.prototype.addSteps = function(steps) {
64
+ var step, _i, _len;
65
+ for (_i = 0, _len = steps.length; _i < _len; _i++) {
66
+ step = steps[_i];
67
+ this.addStep(step);
68
+ }
69
+ return this;
70
+ };
71
+
72
+ Tour.prototype.addStep = function(step) {
73
+ this._options.steps.push(step);
74
+ return this;
75
+ };
76
+
77
+ Tour.prototype.getStep = function(i) {
78
+ if (this._options.steps[i] != null) {
79
+ return $.extend({
80
+ id: "step-" + i,
81
+ path: "",
82
+ placement: "right",
83
+ title: "",
84
+ content: "<p></p>",
85
+ next: i === this._options.steps.length - 1 ? -1 : i + 1,
86
+ prev: i - 1,
87
+ animation: true,
88
+ container: this._options.container,
89
+ backdrop: this._options.backdrop,
90
+ redirect: this._options.redirect,
91
+ orphan: this._options.orphan,
92
+ duration: this._options.duration,
93
+ template: this._options.template,
94
+ onShow: this._options.onShow,
95
+ onShown: this._options.onShown,
96
+ onHide: this._options.onHide,
97
+ onHidden: this._options.onHidden,
98
+ onNext: this._options.onNext,
99
+ onPrev: this._options.onPrev,
100
+ onPause: this._options.onPause,
101
+ onResume: this._options.onResume
102
+ }, this._options.steps[i]);
103
+ }
104
+ };
105
+
106
+ Tour.prototype.init = function(force) {
107
+ var _this = this;
108
+ this._force = force;
109
+ if (this.ended()) {
110
+ this._debug("Tour ended, init prevented.");
111
+ return this;
112
+ }
113
+ this.setCurrentStep();
114
+ this._initMouseNavigation();
115
+ this._initKeyboardNavigation();
116
+ this._onResize(function() {
117
+ return _this.showStep(_this._current);
118
+ });
119
+ if (this._current !== null) {
120
+ this.showStep(this._current);
121
+ }
122
+ this._inited = true;
123
+ return this;
124
+ };
125
+
126
+ Tour.prototype.start = function(force) {
127
+ var promise;
128
+ if (force == null) {
129
+ force = false;
130
+ }
131
+ if (!this._inited) {
132
+ this.init(force);
133
+ }
134
+ if (this._current === null) {
135
+ promise = this._makePromise(this._options.onStart != null ? this._options.onStart(this) : void 0);
136
+ this._callOnPromiseDone(promise, this.showStep, 0);
137
+ }
138
+ return this;
139
+ };
140
+
141
+ Tour.prototype.next = function() {
142
+ var promise;
143
+ promise = this.hideStep(this._current);
144
+ return this._callOnPromiseDone(promise, this._showNextStep);
145
+ };
146
+
147
+ Tour.prototype.prev = function() {
148
+ var promise;
149
+ promise = this.hideStep(this._current);
150
+ return this._callOnPromiseDone(promise, this._showPrevStep);
151
+ };
152
+
153
+ Tour.prototype.goTo = function(i) {
154
+ var promise;
155
+ promise = this.hideStep(this._current);
156
+ return this._callOnPromiseDone(promise, this.showStep, i);
157
+ };
158
+
159
+ Tour.prototype.end = function() {
160
+ var endHelper, promise,
161
+ _this = this;
162
+ endHelper = function(e) {
163
+ $(document).off("click.tour-" + _this._options.name);
164
+ $(document).off("keyup.tour-" + _this._options.name);
165
+ $(window).off("resize.tour-" + _this._options.name);
166
+ _this._setState("end", "yes");
167
+ _this._inited = false;
168
+ _this._force = false;
169
+ _this._clearTimer();
170
+ if (_this._options.onEnd != null) {
171
+ return _this._options.onEnd(_this);
172
+ }
173
+ };
174
+ promise = this.hideStep(this._current);
175
+ return this._callOnPromiseDone(promise, endHelper);
176
+ };
177
+
178
+ Tour.prototype.ended = function() {
179
+ return !this._force && !!this._getState("end");
180
+ };
181
+
182
+ Tour.prototype.restart = function() {
183
+ this._removeState("current_step");
184
+ this._removeState("end");
185
+ this.setCurrentStep(0);
186
+ return this.start();
187
+ };
188
+
189
+ Tour.prototype.pause = function() {
190
+ var step;
191
+ step = this.getStep(this._current);
192
+ if (!(step && step.duration)) {
193
+ return this;
194
+ }
195
+ this._paused = true;
196
+ this._duration -= new Date().getTime() - this._start;
197
+ window.clearTimeout(this._timer);
198
+ this._debug("Paused/Stopped step " + (this._current + 1) + " timer (" + this._duration + " remaining).");
199
+ if (step.onPause != null) {
200
+ return step.onPause(this, this._duration);
201
+ }
202
+ };
203
+
204
+ Tour.prototype.resume = function() {
205
+ var step,
206
+ _this = this;
207
+ step = this.getStep(this._current);
208
+ if (!(step && step.duration)) {
209
+ return this;
210
+ }
211
+ this._paused = false;
212
+ this._start = new Date().getTime();
213
+ this._duration = this._duration || step.duration;
214
+ this._timer = window.setTimeout(function() {
215
+ if (_this._isLast()) {
216
+ return _this.next();
217
+ } else {
218
+ return _this.end();
219
+ }
220
+ }, this._duration);
221
+ this._debug("Started step " + (this._current + 1) + " timer with duration " + this._duration);
222
+ if ((step.onResume != null) && this._duration !== step.duration) {
223
+ return step.onResume(this, this._duration);
224
+ }
225
+ };
226
+
227
+ Tour.prototype.hideStep = function(i) {
228
+ var hideStepHelper, promise, step,
229
+ _this = this;
230
+ step = this.getStep(i);
231
+ if (!step) {
232
+ return;
233
+ }
234
+ this._clearTimer();
235
+ promise = this._makePromise(step.onHide != null ? step.onHide(this, i) : void 0);
236
+ hideStepHelper = function(e) {
237
+ var $element;
238
+ $element = $(step.element);
239
+ if (!($element.data("bs.popover") || $element.data("popover"))) {
240
+ $element = $("body");
241
+ }
242
+ $element.popover("destroy");
243
+ if (step.reflex) {
244
+ $element.css("cursor", "").off("click.tour-" + _this._options.name);
245
+ }
246
+ if (step.backdrop) {
247
+ _this._hideBackdrop();
248
+ }
249
+ if (step.onHidden != null) {
250
+ return step.onHidden(_this);
251
+ }
252
+ };
253
+ this._callOnPromiseDone(promise, hideStepHelper);
254
+ return promise;
255
+ };
256
+
257
+ Tour.prototype.showStep = function(i) {
258
+ var promise, showStepHelper, skipToPrevious, step,
259
+ _this = this;
260
+ if (this.ended()) {
261
+ this._debug("Tour ended, showStep prevented.");
262
+ return this;
263
+ }
264
+ step = this.getStep(i);
265
+ if (!step) {
266
+ return;
267
+ }
268
+ skipToPrevious = i < this._current;
269
+ promise = this._makePromise(step.onShow != null ? step.onShow(this, i) : void 0);
270
+ showStepHelper = function(e) {
271
+ var current_path, path;
272
+ _this.setCurrentStep(i);
273
+ path = (function() {
274
+ switch (toString.call(step.path)) {
275
+ case "[object Function]":
276
+ return step.path();
277
+ case "[object String]":
278
+ return this._options.basePath + step.path;
279
+ default:
280
+ return step.path;
281
+ }
282
+ }).call(_this);
283
+ current_path = [document.location.pathname, document.location.hash].join("");
284
+ if (_this._isRedirect(path, current_path)) {
285
+ _this._redirect(step, path);
286
+ return;
287
+ }
288
+ if (_this._isOrphan(step)) {
289
+ if (!step.orphan) {
290
+ _this._debug("Skip the orphan step " + (_this._current + 1) + ". Orphan option is false and the element doesn't exist or is hidden.");
291
+ if (skipToPrevious) {
292
+ _this._showPrevStep();
293
+ } else {
294
+ _this._showNextStep();
295
+ }
296
+ return;
297
+ }
298
+ _this._debug("Show the orphan step " + (_this._current + 1) + ". Orphans option is true.");
299
+ }
300
+ if (step.backdrop) {
301
+ _this._showBackdrop(!_this._isOrphan(step) ? step.element : void 0);
302
+ }
303
+ _this._scrollIntoView(step.element, function() {
304
+ if ((step.element != null) && step.backdrop) {
305
+ _this._showOverlayElement(step.element);
306
+ }
307
+ _this._showPopover(step, i);
308
+ if (step.onShown != null) {
309
+ step.onShown(_this);
310
+ }
311
+ return _this._debug("Step " + (_this._current + 1) + " of " + _this._options.steps.length);
312
+ });
313
+ if (step.duration) {
314
+ return _this.resume();
315
+ }
316
+ };
317
+ this._callOnPromiseDone(promise, showStepHelper);
318
+ return promise;
319
+ };
320
+
321
+ Tour.prototype.getCurrentStep = function() {
322
+ return this._current;
323
+ };
324
+
325
+ Tour.prototype.setCurrentStep = function(value) {
326
+ if (value != null) {
327
+ this._current = value;
328
+ this._setState("current_step", value);
329
+ } else {
330
+ this._current = this._getState("current_step");
331
+ this._current = this._current === null ? null : parseInt(this._current, 10);
332
+ }
333
+ return this;
334
+ };
335
+
336
+ Tour.prototype._setState = function(key, value) {
337
+ var e, keyName;
338
+ if (this._options.storage) {
339
+ keyName = "" + this._options.name + "_" + key;
340
+ try {
341
+ this._options.storage.setItem(keyName, value);
342
+ } catch (_error) {
343
+ e = _error;
344
+ if (e.code === DOMException.QUOTA_EXCEEDED_ERR) {
345
+ this.debug("LocalStorage quota exceeded. State storage failed.");
346
+ }
347
+ }
348
+ return this._options.afterSetState(keyName, value);
349
+ } else {
350
+ if (this._state == null) {
351
+ this._state = {};
352
+ }
353
+ return this._state[key] = value;
354
+ }
355
+ };
356
+
357
+ Tour.prototype._removeState = function(key) {
358
+ var keyName;
359
+ if (this._options.storage) {
360
+ keyName = "" + this._options.name + "_" + key;
361
+ this._options.storage.removeItem(keyName);
362
+ return this._options.afterRemoveState(keyName);
363
+ } else {
364
+ if (this._state != null) {
365
+ return delete this._state[key];
366
+ }
367
+ }
368
+ };
369
+
370
+ Tour.prototype._getState = function(key) {
371
+ var keyName, value;
372
+ if (this._options.storage) {
373
+ keyName = "" + this._options.name + "_" + key;
374
+ value = this._options.storage.getItem(keyName);
375
+ } else {
376
+ if (this._state != null) {
377
+ value = this._state[key];
378
+ }
379
+ }
380
+ if (value === void 0 || value === "null") {
381
+ value = null;
382
+ }
383
+ this._options.afterGetState(key, value);
384
+ return value;
385
+ };
386
+
387
+ Tour.prototype._showNextStep = function() {
388
+ var promise, showNextStepHelper, step,
389
+ _this = this;
390
+ step = this.getStep(this._current);
391
+ showNextStepHelper = function(e) {
392
+ return _this.showStep(step.next);
393
+ };
394
+ promise = this._makePromise(step.onNext != null ? step.onNext(this) : void 0);
395
+ return this._callOnPromiseDone(promise, showNextStepHelper);
396
+ };
397
+
398
+ Tour.prototype._showPrevStep = function() {
399
+ var promise, showPrevStepHelper, step,
400
+ _this = this;
401
+ step = this.getStep(this._current);
402
+ showPrevStepHelper = function(e) {
403
+ return _this.showStep(step.prev);
404
+ };
405
+ promise = this._makePromise(step.onPrev != null ? step.onPrev(this) : void 0);
406
+ return this._callOnPromiseDone(promise, showPrevStepHelper);
407
+ };
408
+
409
+ Tour.prototype._debug = function(text) {
410
+ if (this._options.debug) {
411
+ return window.console.log("Bootstrap Tour '" + this._options.name + "' | " + text);
412
+ }
413
+ };
414
+
415
+ Tour.prototype._isRedirect = function(path, currentPath) {
416
+ return (path != null) && path !== "" && ((toString.call(path) === "[object RegExp]" && !path.test(currentPath)) || (toString.call(path) === "[object String]" && path.replace(/\?.*$/, "").replace(/\/?$/, "") !== currentPath.replace(/\/?$/, "")));
417
+ };
418
+
419
+ Tour.prototype._redirect = function(step, path) {
420
+ if ($.isFunction(step.redirect)) {
421
+ return step.redirect.call(this, path);
422
+ } else if (step.redirect === true) {
423
+ this._debug("Redirect to " + path);
424
+ return document.location.href = path;
425
+ }
426
+ };
427
+
428
+ Tour.prototype._isOrphan = function(step) {
429
+ return (step.element == null) || !$(step.element).length || $(step.element).is(":hidden") && ($(step.element)[0].namespaceURI !== "http://www.w3.org/2000/svg");
430
+ };
431
+
432
+ Tour.prototype._isLast = function() {
433
+ return this._current < this._options.steps.length - 1;
434
+ };
435
+
436
+ Tour.prototype._showPopover = function(step, i) {
437
+ var $element, $navigation, $template, $tip, isOrphan, options,
438
+ _this = this;
439
+ options = $.extend({}, this._options);
440
+ $template = $.isFunction(step.template) ? $(step.template(i, step)) : $(step.template);
441
+ $navigation = $template.find(".popover-navigation");
442
+ isOrphan = this._isOrphan(step);
443
+ if (isOrphan) {
444
+ step.element = "body";
445
+ step.placement = "top";
446
+ $template = $template.addClass("orphan");
447
+ }
448
+ $element = $(step.element);
449
+ $template.addClass("tour-" + this._options.name + " tour-" + this._options.name + "-" + i);
450
+ if (step.options) {
451
+ $.extend(options, step.options);
452
+ }
453
+ if (step.reflex) {
454
+ $element.css("cursor", "pointer").on("click.tour-" + this._options.name, function() {
455
+ if (_this._isLast()) {
456
+ return _this.next();
457
+ } else {
458
+ return _this.end();
459
+ }
460
+ });
461
+ }
462
+ if (step.prev < 0) {
463
+ $navigation.find("[data-role='prev']").addClass("disabled");
464
+ }
465
+ if (step.next < 0) {
466
+ $navigation.find("[data-role='next']").addClass("disabled");
467
+ }
468
+ if (!step.duration) {
469
+ $navigation.find("[data-role='pause-resume']").remove();
470
+ }
471
+ step.template = $template.clone().wrap("<div>").parent().html();
472
+ $element.popover({
473
+ placement: step.placement,
474
+ trigger: "manual",
475
+ title: step.title,
476
+ content: step.content,
477
+ html: true,
478
+ animation: step.animation,
479
+ container: step.container,
480
+ template: step.template,
481
+ selector: step.element
482
+ }).popover("show");
483
+ $tip = $element.data("bs.popover") ? $element.data("bs.popover").tip() : $element.data("popover").tip();
484
+ $tip.attr("id", step.id);
485
+ this._reposition($tip, step);
486
+ if (isOrphan) {
487
+ return this._center($tip);
488
+ }
489
+ };
490
+
491
+ Tour.prototype._reposition = function($tip, step) {
492
+ var offsetBottom, offsetHeight, offsetRight, offsetWidth, originalLeft, originalTop, tipOffset;
493
+ offsetWidth = $tip[0].offsetWidth;
494
+ offsetHeight = $tip[0].offsetHeight;
495
+ tipOffset = $tip.offset();
496
+ originalLeft = tipOffset.left;
497
+ originalTop = tipOffset.top;
498
+ offsetBottom = $(document).outerHeight() - tipOffset.top - $tip.outerHeight();
499
+ if (offsetBottom < 0) {
500
+ tipOffset.top = tipOffset.top + offsetBottom;
501
+ }
502
+ offsetRight = $("html").outerWidth() - tipOffset.left - $tip.outerWidth();
503
+ if (offsetRight < 0) {
504
+ tipOffset.left = tipOffset.left + offsetRight;
505
+ }
506
+ if (tipOffset.top < 0) {
507
+ tipOffset.top = 0;
508
+ }
509
+ if (tipOffset.left < 0) {
510
+ tipOffset.left = 0;
511
+ }
512
+ $tip.offset(tipOffset);
513
+ if (step.placement === "bottom" || step.placement === "top") {
514
+ if (originalLeft !== tipOffset.left) {
515
+ return this._replaceArrow($tip, (tipOffset.left - originalLeft) * 2, offsetWidth, "left");
516
+ }
517
+ } else {
518
+ if (originalTop !== tipOffset.top) {
519
+ return this._replaceArrow($tip, (tipOffset.top - originalTop) * 2, offsetHeight, "top");
520
+ }
521
+ }
522
+ };
523
+
524
+ Tour.prototype._center = function($tip) {
525
+ return $tip.css("top", $(window).outerHeight() / 2 - $tip.outerHeight() / 2);
526
+ };
527
+
528
+ Tour.prototype._replaceArrow = function($tip, delta, dimension, position) {
529
+ return $tip.find(".arrow").css(position, delta ? 50 * (1 - delta / dimension) + "%" : "");
530
+ };
531
+
532
+ Tour.prototype._scrollIntoView = function(element, callback) {
533
+ var $element, $window, counter, offsetTop, scrollTop, windowHeight,
534
+ _this = this;
535
+ $element = $(element);
536
+ if (!$element.length) {
537
+ return callback();
538
+ }
539
+ $window = $(window);
540
+ offsetTop = $element.offset().top;
541
+ windowHeight = $window.height();
542
+ scrollTop = Math.max(0, offsetTop - (windowHeight / 2));
543
+ this._debug("Scroll into view. ScrollTop: " + scrollTop + ". Element offset: " + offsetTop + ". Window height: " + windowHeight + ".");
544
+ counter = 0;
545
+ return $("body,html").stop(true, true).animate({
546
+ scrollTop: Math.ceil(scrollTop)
547
+ }, function() {
548
+ if (++counter === 2) {
549
+ callback();
550
+ return _this._debug("Scroll into view. Animation end element offset: " + ($element.offset().top) + ". Window height: " + ($window.height()) + ".");
551
+ }
552
+ });
553
+ };
554
+
555
+ Tour.prototype._onResize = function(callback, timeout) {
556
+ return $(window).on("resize.tour-" + this._options.name, function() {
557
+ clearTimeout(timeout);
558
+ return timeout = setTimeout(callback, 100);
559
+ });
560
+ };
561
+
562
+ Tour.prototype._initMouseNavigation = function() {
563
+ var _this = this;
564
+ _this = this;
565
+ return $(document).off("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='prev']:not(.disabled)").off("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='next']:not(.disabled)").off("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='end']").off("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='pause-resume']").on("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='next']:not(.disabled)", function(e) {
566
+ e.preventDefault();
567
+ return _this.next();
568
+ }).on("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='prev']:not(.disabled)", function(e) {
569
+ e.preventDefault();
570
+ return _this.prev();
571
+ }).on("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='end']", function(e) {
572
+ e.preventDefault();
573
+ return _this.end();
574
+ }).on("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='pause-resume']", function(e) {
575
+ var $this;
576
+ e.preventDefault();
577
+ $this = $(this);
578
+ $this.text(_this._paused ? $this.data("pause-text") : $this.data("resume-text"));
579
+ if (_this._paused) {
580
+ return _this.resume();
581
+ } else {
582
+ return _this.pause();
583
+ }
584
+ });
585
+ };
586
+
587
+ Tour.prototype._initKeyboardNavigation = function() {
588
+ var _this = this;
589
+ if (!this._options.keyboard) {
590
+ return;
591
+ }
592
+ return $(document).on("keyup.tour-" + this._options.name, function(e) {
593
+ if (!e.which) {
594
+ return;
595
+ }
596
+ switch (e.which) {
597
+ case 39:
598
+ e.preventDefault();
599
+ if (_this._isLast()) {
600
+ return _this.next();
601
+ } else {
602
+ return _this.end();
603
+ }
604
+ break;
605
+ case 37:
606
+ e.preventDefault();
607
+ if (_this._current > 0) {
608
+ return _this.prev();
609
+ }
610
+ break;
611
+ case 27:
612
+ e.preventDefault();
613
+ return _this.end();
614
+ }
615
+ });
616
+ };
617
+
618
+ Tour.prototype._makePromise = function(result) {
619
+ if (result && $.isFunction(result.then)) {
620
+ return result;
621
+ } else {
622
+ return null;
623
+ }
624
+ };
625
+
626
+ Tour.prototype._callOnPromiseDone = function(promise, cb, arg) {
627
+ var _this = this;
628
+ if (promise) {
629
+ return promise.then(function(e) {
630
+ return cb.call(_this, arg);
631
+ });
632
+ } else {
633
+ return cb.call(this, arg);
634
+ }
635
+ };
636
+
637
+ Tour.prototype._showBackdrop = function(element) {
638
+ if (this.backdrop.backgroundShown) {
639
+ return;
640
+ }
641
+ this.backdrop = $("<div/>", {
642
+ "class": "tour-backdrop"
643
+ });
644
+ this.backdrop.backgroundShown = true;
645
+ return $("body").append(this.backdrop);
646
+ };
647
+
648
+ Tour.prototype._hideBackdrop = function() {
649
+ this._hideOverlayElement();
650
+ return this._hideBackground();
651
+ };
652
+
653
+ Tour.prototype._hideBackground = function() {
654
+ this.backdrop.remove();
655
+ this.backdrop.overlay = null;
656
+ return this.backdrop.backgroundShown = false;
657
+ };
658
+
659
+ Tour.prototype._showOverlayElement = function(element) {
660
+ var $background, $element, offset;
661
+ $element = $(element);
662
+ if (!$element || $element.length === 0 || this.backdrop.overlayElementShown) {
663
+ return;
664
+ }
665
+ this.backdrop.overlayElementShown = true;
666
+ $background = $("<div/>");
667
+ offset = $element.offset();
668
+ offset.top = offset.top;
669
+ offset.left = offset.left;
670
+ $background.width($element.innerWidth()).height($element.innerHeight()).addClass("tour-step-background").offset(offset);
671
+ $element.addClass("tour-step-backdrop");
672
+ $("body").append($background);
673
+ this.backdrop.$element = $element;
674
+ return this.backdrop.$background = $background;
675
+ };
676
+
677
+ Tour.prototype._hideOverlayElement = function() {
678
+ if (!this.backdrop.overlayElementShown) {
679
+ return;
680
+ }
681
+ this.backdrop.$element.removeClass("tour-step-backdrop");
682
+ this.backdrop.$background.remove();
683
+ this.backdrop.$element = null;
684
+ this.backdrop.$background = null;
685
+ return this.backdrop.overlayElementShown = false;
686
+ };
687
+
688
+ Tour.prototype._clearTimer = function() {
689
+ window.clearTimeout(this._timer);
690
+ this._timer = null;
691
+ return this._duration = null;
692
+ };
693
+
694
+ return Tour;
695
+
696
+ })();
697
+ return window.Tour = Tour;
698
+ })(jQuery, window);